:root {
    --lf-blue: #0d6efd;
    --lf-blue-dark: #0a58ca;
    --lf-blue-darker: #052c65;
    --lf-blue-light: #e7f1ff;
    --lf-blue-soft: #f0f6ff;
    --lf-sidebar-admin: #0b1f3a;
    --lf-sidebar-admin-hover: rgba(255, 255, 255, 0.08);
    --lf-sidebar-admin-active: rgba(13, 110, 253, 0.35);
}

body {
    background-color: var(--lf-blue-soft);
}

/* Bootstrap primary override */
.btn-primary {
    --bs-btn-bg: var(--lf-blue);
    --bs-btn-border-color: var(--lf-blue);
    --bs-btn-hover-bg: var(--lf-blue-dark);
    --bs-btn-hover-border-color: var(--lf-blue-dark);
}

.text-primary {
    color: var(--lf-blue) !important;
}

.bg-primary {
    background-color: var(--lf-blue) !important;
}

.portal-sidebar {
    width: 260px;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    position: sticky;
    top: 0;
    align-self: flex-start;
    overflow: hidden;
}

/* LeadFlow scrollbars — customer portal (Firefox + WebKit) */
html.portal-customer {
    scrollbar-width: thin;
    scrollbar-color: var(--lf-blue) var(--lf-blue-soft);
}

html.portal-customer,
html.portal-customer * {
    scrollbar-width: thin;
    scrollbar-color: var(--lf-blue) var(--lf-blue-soft);
}

html.portal-customer::-webkit-scrollbar,
html.portal-customer *::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

html.portal-customer::-webkit-scrollbar-track,
html.portal-customer *::-webkit-scrollbar-track {
    background: var(--lf-blue-soft);
    border-radius: 999px;
}

html.portal-customer::-webkit-scrollbar-thumb,
html.portal-customer *::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3d8bfd 0%, var(--lf-blue) 100%);
    border-radius: 999px;
    border: 2px solid var(--lf-blue-soft);
}

html.portal-customer::-webkit-scrollbar-thumb:hover,
html.portal-customer *::-webkit-scrollbar-thumb:hover {
    background: var(--lf-blue-dark);
}

html.portal-customer::-webkit-scrollbar-corner,
html.portal-customer *::-webkit-scrollbar-corner {
    background: var(--lf-blue-soft);
}

.portal-scrollbar {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.portal-sidebar-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.portal-sidebar-brand,
.portal-sidebar-footer {
    flex-shrink: 0;
}

.portal-sidebar-admin {
    background: var(--lf-sidebar-admin);
    color: #fff;
}

.portal-sidebar-admin .nav-link {
    color: rgba(255, 255, 255, 0.78);
    border-radius: 0.5rem;
    padding: 0.55rem 0.85rem;
    margin-bottom: 0.2rem;
    font-weight: 500;
}

.portal-sidebar-admin .nav-link:hover,
.portal-sidebar-admin .nav-link:focus {
    color: #fff;
    background: var(--lf-sidebar-admin-hover);
}

.portal-sidebar-admin .nav-link.active {
    color: #fff;
    background: var(--lf-sidebar-admin-active);
    box-shadow: inset 3px 0 0 var(--lf-blue);
}

.portal-sidebar-light {
    background: #fff;
    border-right: 1px solid #dee2e6;
}

.portal-sidebar-light .nav-link {
    color: #495057;
    border-radius: 0.5rem;
    padding: 0.55rem 0.85rem;
    margin-bottom: 0.2rem;
    font-weight: 500;
}

.portal-sidebar-light .nav-link:hover,
.portal-sidebar-light .nav-link:focus {
    color: var(--lf-blue);
    background: var(--lf-blue-soft);
}

.portal-sidebar-light .nav-link.active {
    color: var(--lf-blue);
    background: var(--lf-blue-light);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--lf-blue);
}

.portal-nav-sections .portal-nav-section-label {
    color: #94a3b8;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    margin-top: 0.65rem;
    padding: 0.35rem 0.85rem 0.25rem;
    text-transform: uppercase;
}

.portal-nav-sections > .portal-nav-section-label:first-child {
    margin-top: 0;
    padding-top: 0;
}

.portal-nav-sections .nav-link {
    margin-bottom: 0.15rem;
}

.conversation-transactions-pagination .pagination {
    margin-bottom: 0;
    justify-content: center;
}

.conversation-transactions-pagination .page-link {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.conversation-transaction-card:hover {
    background: var(--lf-blue-soft);
    border-color: #cbd5e1 !important;
}

@keyframes conversation-tx-attention-pulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.55);
    }

    50% {
        box-shadow: 0 0 0 0.35rem rgba(245, 158, 11, 0.12);
    }
}

.conversation-transaction-card--attention {
    border-color: #f59e0b !important;
    background: #fffbeb;
    animation: conversation-tx-attention-pulse 2.2s ease-in-out infinite;
}

.conversation-transaction-card--attention:hover {
    background: #fef3c7;
}

.conversation-transaction-when {
    font-size: 0.625rem;
    line-height: 1.2;
    white-space: nowrap;
    flex-shrink: 0;
}

.conversation-tx-filters .form-select-sm {
    font-size: 0.6875rem;
}

.conversation-tx-filter-toggle.active,
.inbox-list-filter-toggle.active {
    color: var(--bs-primary);
    border-color: var(--bs-primary);
    background: var(--lf-blue-soft, #eff6ff);
}

.storefront-settings-nav .nav-link.active .bi {
    opacity: 1 !important;
}

.storefront-settings-nav .nav-link:not(.active):hover {
    background: var(--lf-blue-soft);
}

.booking-availability-form-inbox .booking-availability-fields-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.booking-availability-form-inbox .booking-availability-field .form-control,
.booking-availability-form-inbox .booking-availability-field .form-select {
    width: 100%;
}

.booking-availability-form-inbox input[type="date"].js-booking-check-in,
.booking-availability-form-inbox input[type="date"].js-booking-check-out {
    min-height: 2.125rem;
}

.booking-availability-form-inbox .booking-availability-hints {
    margin-top: -0.25rem;
}

.booking-availability-form-inbox .booking-availability-hints .small {
    line-height: 1.4;
}

.order-panel-booking .border.rounded {
    border-color: #e9ecef !important;
}

.event-form-page .event-form-datetime {
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

.event-form-page .event-tier-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.event-form-page .event-tier-card {
    background: #fff;
    border: 1px solid #e3eaf5;
    box-shadow: 0 1px 2px rgba(11, 31, 58, 0.04);
}

.event-form-page .event-tier-list .form-text {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.course-form-page .course-lesson-card,
.course-form-page .course-session-card {
    border-color: #e3eaf5 !important;
    box-shadow: 0 1px 2px rgba(11, 31, 58, 0.04);
}

.course-form-page .course-form-datetime {
    min-width: 0;
    width: 100%;
}

@media (min-width: 768px) {
    .course-form-page .course-form-datetime {
        min-width: 12rem;
    }
}

@media (min-width: 768px) {
    .event-form-page .event-form-datetime {
        min-width: 13.5rem;
    }
}

.portal-header {
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    box-shadow: 0 1px 2px rgba(13, 110, 253, 0.04);
}

.stat-card {
    border: 0;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(11, 31, 58, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(13, 110, 253, 0.1);
}

.stat-card .stat-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--lf-blue-light);
    color: var(--lf-blue);
    font-size: 1.1rem;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0b1f3a;
    line-height: 1.2;
}

.dashboard-hero {
    background: linear-gradient(135deg, var(--lf-blue) 0%, var(--lf-blue-darker) 100%);
    border-radius: 0.85rem;
    color: #fff;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 24px rgba(13, 110, 253, 0.2);
}

.dashboard-hero h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.dashboard-hero.dashboard-hero-compact {
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 16px rgba(13, 110, 253, 0.15);
}

.dashboard-hero.dashboard-hero-compact h2 {
    font-size: 1.2rem;
}

.dashboard-hero .text-muted {
    color: rgba(255, 255, 255, 0.82) !important;
}

.dashboard-hero code {
    color: #0b1f3a;
    background: rgba(255, 255, 255, 0.92);
    padding: 0.15rem 0.45rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
}

.dashboard-hero .form-check-label {
    color: rgba(255, 255, 255, 0.95);
}

.quick-link-card {
    border: 1px solid #e3eaf5;
    border-radius: 0.75rem;
    transition: all 0.15s ease;
    text-decoration: none;
    color: inherit;
    height: 100%;
    background: #fff;
}

.quick-link-card:hover {
    border-color: var(--lf-blue);
    box-shadow: 0 4px 14px rgba(13, 110, 253, 0.12);
    color: inherit;
    transform: translateY(-2px);
}

.quick-link-card .quick-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.6rem;
    background: var(--lf-blue-light);
    color: var(--lf-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

.message-bubble {
    max-width: 90%;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
}

.message-bubble-user {
    background: #e9ecef;
}

.message-bubble-bot {
    background: var(--lf-blue-light);
}

.message-bubble-human {
    background: #fff3cd;
    margin-left: auto;
    border: 1px solid #ffe69c;
}

.conversation-message-image-link {
    display: block;
    line-height: 0;
    max-width: min(100%, 240px);
}

.conversation-message-image {
    display: block;
    max-width: min(100%, 240px);
    max-height: 240px;
    width: auto;
    height: auto;
    border-radius: 0.375rem;
    object-fit: contain;
    vertical-align: top;
}

.conversation-message-file {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(11, 31, 58, 0.12);
    color: var(--lf-blue);
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.3;
    word-break: break-word;
}

.conversation-message-file:hover {
    background: #fff;
    color: var(--lf-blue);
}

.usage-bar {
    height: 0.75rem;
    border-radius: 999px;
    background: #e9ecef;
    overflow: hidden;
}

.usage-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--lf-blue);
}

.auth-brand-panel {
    background: linear-gradient(145deg, var(--lf-sidebar-admin) 0%, var(--lf-blue) 55%, #3d8bfd 100%);
    min-height: 100vh;
}

.card {
    border-radius: 0.75rem;
    border-color: #e3eaf5;
}

.card.shadow-sm {
    box-shadow: 0 1px 3px rgba(11, 31, 58, 0.06) !important;
}

.product-categories-table td,
.catalog-categories-table td {
    vertical-align: middle;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.product-categories-table tbody tr:not(:last-child) td,
.catalog-categories-table tbody tr:not(:last-child) td {
    border-bottom: 1px solid var(--bs-border-color-translucent, rgba(0, 0, 0, 0.08));
}

.admin-panel {
    border: 0;
    border-radius: 0.85rem;
    box-shadow: 0 1px 3px rgba(11, 31, 58, 0.06);
    overflow: hidden;
}

.admin-panel-header {
    background: #fff;
    border-bottom: 1px solid #e3eaf5;
    padding: 1.25rem 1.5rem;
}

.admin-filter-bar {
    background: var(--lf-blue-soft);
    border: 1px solid #dbe7ff;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
}

.nav-tabs-custom {
    border-bottom: 1px solid #e3eaf5;
    gap: 0.25rem;
}

.nav-tabs-scroll-x {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

.nav-tabs-scroll-x::-webkit-scrollbar {
    height: 4px;
}

.nav-tabs-scroll-x::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.nav-tabs-custom .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.65rem 1rem;
    white-space: nowrap;
}

.nav-tabs-custom .nav-link:hover {
    border-bottom-color: #cbd5e1;
    color: var(--lf-blue);
}

.nav-tabs-custom .nav-link.active {
    background: transparent;
    border-bottom-color: var(--lf-blue);
    color: var(--lf-blue);
    font-weight: 600;
}

.order-detail-actions-panel {
    position: sticky;
    top: 1rem;
}

.order-detail-actions-tabs {
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    scrollbar-width: thin;
}

.order-detail-actions-tabs::-webkit-scrollbar {
    height: 4px;
}

.order-detail-actions-tabs::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.order-detail-actions-body {
    max-height: min(72vh, 680px);
    overflow-y: auto;
    overflow-x: hidden;
}

.admin-table {
    margin-bottom: 0;
}

.orders-index-table {
    table-layout: fixed;
    width: 100%;
    min-width: 56rem;
}

.orders-index-col-order {
    width: 16%;
}

.orders-index-col-type {
    width: 5.5%;
}

.orders-index-col-created {
    width: 12%;
}

.orders-index-col-customer {
    width: 19%;
}

.orders-index-col-total {
    width: 9%;
}

.orders-index-col-payment {
    width: 7.5%;
}

.orders-index-col-status {
    width: 6.5%;
}

.orders-index-col-tracking {
    width: 13%;
}

.orders-index-col-actions {
    width: 11%;
}

.products-index-table {
    table-layout: fixed;
    width: 100%;
    min-width: 36rem;
}

.products-index-col-product {
    width: 42%;
}

.products-index-col-sku {
    width: 22%;
}

.products-index-col-price {
    width: 12%;
}

.products-index-col-stock {
    width: 10%;
}

.products-index-col-actions {
    width: 14%;
}

.products-index-product-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.products-index-thumb {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    object-fit: cover;
}

.products-index-thumb-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8eef8 0%, #dbe7ff 100%);
    color: #0b1f3a;
    font-size: 0.95rem;
    font-weight: 700;
}

.products-index-product-meta {
    flex: 1 1 auto;
    min-width: 0;
}

.products-index-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.products-index-name:hover {
    color: var(--lf-blue, #0d6efd) !important;
}

.products-index-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.2rem;
}

.products-index-badges .badge {
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.15em 0.45em;
}

.products-index-sku {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.8125rem;
    color: #5c6b7a;
    background: #f4f6f9;
    border: 1px solid #e8ecf2;
    border-radius: 0.25rem;
    padding: 0.15rem 0.45rem;
}

.products-index-stock {
    font-variant-numeric: tabular-nums;
}

.products-index-row-actions {
    white-space: nowrap;
}

.products-index-card .card-header {
    min-height: 2.75rem;
}

.customer-source-badges .badge {
    font-size: 0.6875rem;
    font-weight: 500;
    max-width: 11rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.orders-index-type-badges .badge {
    font-size: 0.625rem;
    padding: 0.15em 0.35em;
    font-weight: 600;
    white-space: nowrap;
}

.orders-index-page-badge .badge {
    font-size: 0.625rem;
    padding: 0.2em 0.45em;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}

.orders-index-payment-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
}

.orders-index-payment-badges .badge {
    font-size: 0.65rem;
    padding: 0.2em 0.4em;
    white-space: nowrap;
}

.orders-index-col-status .badge {
    font-size: 0.65rem;
    padding: 0.25em 0.45em;
}

.orders-index-col-tracking .form-control-sm {
    min-width: 0;
    flex: 1 1 auto;
}

.admin-table thead th {
    background: var(--lf-blue-soft);
    color: #0b1f3a;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-bottom: 1px solid #dbe7ff;
    padding: 0.85rem 1.25rem;
    white-space: nowrap;
}

.admin-table tbody td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    border-bottom: 1px solid #eef2f8;
}

.admin-table tbody tr:hover {
    background: #fafcff;
}

.admin-table tbody tr:last-child td {
    border-bottom: 0;
}

.tenant-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.65rem;
    background: var(--lf-blue-light);
    color: var(--lf-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.tenant-meta-name {
    font-weight: 600;
    color: #0b1f3a;
    line-height: 1.2;
}

.tenant-meta-slug {
    font-size: 0.8rem;
    color: #6c757d;
}

.admin-empty {
    padding: 3rem 1.5rem;
    text-align: center;
    color: #6c757d;
}

.admin-empty-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--lf-blue-light);
    color: var(--lf-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}

.settings-section-card {
    border: 0;
    border-radius: 0.85rem;
    box-shadow: 0 1px 3px rgba(11, 31, 58, 0.06);
    overflow: hidden;
}

.subscription-billing-toggle .btn {
    flex: 1 1 50%;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

.subscription-billing-badge {
    display: inline-block;
    margin-left: 0.15rem;
    font-size: 0.8125rem;
    font-weight: 600;
    opacity: 0.9;
}

.subscription-module-scroll {
    max-height: min(32rem, 58vh);
    overflow-x: hidden;
    overflow-y: auto;
    margin-right: -0.25rem;
    padding-right: 0.35rem;
}

.subscription-module-pick {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    height: 100%;
    margin: 0;
    padding: 0.875rem 1rem;
    border: 1px solid #e3eaf5;
    border-radius: 0.65rem;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.subscription-module-pick:hover {
    border-color: #c5d4ea;
    background: #f8fafc;
}

.subscription-module-pick:has(.subscription-module-input:checked) {
    border-color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), 0.06);
    box-shadow: 0 0 0 1px rgba(var(--bs-primary-rgb), 0.12);
}

.subscription-module-input {
    flex-shrink: 0;
    width: 1.125rem;
    height: 1.125rem;
    margin: 0.125rem 0 0;
    float: none;
    position: static;
}

.subscription-module-pick-body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.subscription-module-pick-name {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.35;
    color: #1a2b42;
}

.subscription-module-pick-price {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.3;
    color: #5b6b82;
}

.subscription-module-pick-price--included {
    color: #198754;
}

.subscription-checkout-aside {
    position: sticky;
    top: 1rem;
}

.subscription-quote-total {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: #0b1f3a;
}

.subscription-quote-currency {
    font-size: 1rem;
    font-weight: 600;
    color: #5b6b82;
    margin-left: 0.25rem;
}

@media (max-width: 991.98px) {
    .subscription-checkout-aside {
        position: static;
    }

    .subscription-module-scroll {
        max-height: none;
    }
}

.voucher-modal-dialog {
    margin: 1rem auto;
    max-height: calc(100vh - 2rem);
    height: calc(100% - 2rem);
    display: flex;
    flex-direction: column;
}

.voucher-modal-dialog .voucher-modal {
    max-height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.voucher-modal form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.voucher-modal .modal-header,
.voucher-modal .modal-footer {
    flex-shrink: 0;
}

.voucher-modal .modal-body {
    padding-top: 0.75rem;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
}

.voucher-modal .modal-footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
    box-shadow: 0 -4px 12px rgba(11, 31, 58, 0.06);
}

.voucher-form-section {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #e8eef5;
}

.voucher-form-section-title {
    font-size: 0.6875rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #5c6b7f;
    font-weight: 600;
}

.voucher-product-picker {
    max-height: 9rem;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.25rem;
}

.voucher-product-picker-row {
    margin: 0;
    border-radius: 0.35rem;
}

.voucher-product-picker-row:hover {
    background: #f4f7fb;
}

.voucher-product-picker-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0.45rem 0.5rem;
    cursor: pointer;
    width: 100%;
    border-radius: 0.35rem;
}

.voucher-product-picker-label .form-check-input {
    float: none;
    margin: 0;
    flex-shrink: 0;
}

.lesson-row trix-editor.storefront-trix-editor {
    min-height: 10rem;
    max-height: 24rem;
}

trix-editor.storefront-trix-editor {
    display: block;
    min-height: 14rem;
    max-height: 28rem;
    overflow-y: auto;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    background: #fff;
}

trix-editor.storefront-trix-editor trix-toolbar {
    border-radius: 0.375rem 0.375rem 0 0;
}

trix-editor.storefront-trix-editor .trix-content {
    overflow-wrap: anywhere;
}

trix-editor.storefront-trix-editor figure.attachment,
trix-editor.storefront-trix-editor .attachment--preview {
    display: inline-block;
    max-width: 100%;
    margin: 0.5rem 0;
    vertical-align: top;
}

trix-editor.storefront-trix-editor .attachment--preview img,
trix-editor.storefront-trix-editor figure img,
trix-editor.storefront-trix-editor .trix-content img {
    display: block;
    max-width: min(100%, 420px) !important;
    max-height: 240px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
    border-radius: 0.35rem;
}

.portal-permission-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
}

@media (min-width: 768px) {
    .portal-permission-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    #team-portal-access .portal-permission-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #team-portal-access .portal-permission-group--cols-3 .portal-permission-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.portal-permission-group {
    padding: 0.85rem 1rem;
    border: 1px solid #e8eef5;
    border-radius: 0.5rem;
    background: #fff;
}

.portal-permission-item {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.65rem 0.75rem;
    margin: 0;
    height: 100%;
    min-height: 0;
    border: 1px solid #e8eef5;
    border-radius: 0.5rem;
    background: #fafbfd;
    cursor: pointer;
}

.portal-permission-item-input {
    flex-shrink: 0;
    float: none !important;
    margin: 0.2rem 0 0 !important;
    margin-left: 0 !important;
    position: relative !important;
}

.portal-permission-item-body {
    flex: 1;
    min-width: 0;
    line-height: 1.35;
}

.admin-tenant-show-hero {
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.admin-tenant-chart-wrap {
    height: 280px;
    position: relative;
}

.admin-plan-feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

@media (min-width: 576px) {
    .admin-plan-feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .admin-plan-feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.admin-plan-feature-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0;
    padding: 0.65rem 0.75rem;
    border: 1px solid #e8eef5;
    border-radius: 0.5rem;
    background: #fafbfd;
    cursor: pointer;
    min-height: 100%;
}

.admin-plan-feature-check .form-check-input {
    float: none;
    margin: 0.15rem 0 0;
    flex-shrink: 0;
}

.admin-plan-feature-check-label {
    font-size: 0.875rem;
    line-height: 1.35;
    font-weight: 500;
    color: #212529;
}

.admin-plan-limits-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .admin-plan-limits-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: start;
    }
}

.admin-plan-limit-field {
    min-width: 0;
}

.admin-plan-limit-field .form-label {
    line-height: 1.3;
    min-height: 2.6em;
}

.settings-section-header {
    background: #fff;
    border-bottom: 1px solid #e3eaf5;
    padding: 1rem 1.25rem;
}

.settings-section-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.6rem;
    background: var(--lf-blue-light);
    color: var(--lf-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.follow-up-enabled-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding-left: 0;
    min-height: auto;
}

.follow-up-enabled-switch .form-check-input {
    width: 2.75em;
    height: 1.35em;
    margin: 0;
    float: none;
    flex-shrink: 0;
}

.follow-up-enabled-switch .form-check-label {
    padding-left: 0;
    margin-left: 0;
    white-space: nowrap;
}

.follow-up-input-narrow {
    max-width: 7.5rem;
}

.follow-up-trigger-help:empty {
    display: none;
}

.follow-up-options .form-check-label {
    line-height: 1.45;
}

.follow-up-step-card {
    background: #f8fafc;
    border: 1px solid #e3eaf5;
    border-radius: 0.65rem;
    padding: 1rem 1.1rem;
    margin-bottom: 0.85rem;
}

.follow-up-step-card:last-child {
    margin-bottom: 0;
}

.follow-up-var-chip {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.6875rem;
    padding: 0.2rem 0.45rem;
}

.follow-up-var-chips {
    max-height: 5.5rem;
    overflow-y: auto;
}

.settings-tip-card {
    border: 1px solid #dbe7ff;
    border-radius: 0.85rem;
    background: #fff;
    box-shadow: 0 1px 3px rgba(11, 31, 58, 0.04);
}

.portal-upload-zone {
    position: relative;
    border: 1px dashed #ced4da;
    border-radius: 0.5rem;
    background: #f8f9fa;
    text-align: center;
    padding: 0.85rem 0.75rem;
}

.portal-upload-input {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.portal-upload-label {
    cursor: pointer;
    display: block;
}

.settings-tip-list {
    margin: 0;
    padding-left: 1.1rem;
}

.settings-tip-list li {
    margin-bottom: 0.65rem;
    color: #495057;
    font-size: 0.9rem;
}

.settings-tip-list li:last-child {
    margin-bottom: 0;
}

.ai-toggle-card {
    border: 1px solid #dbe7ff;
    border-radius: 0.75rem;
    background: var(--lf-blue-soft);
    padding: 1rem 1.15rem;
}

.ai-toggle-card.is-enabled {
    border-color: #badbcc;
    background: #edf7f1;
}

.form-control-code,
.form-control.font-monospace {
    background: #f8fafc;
    border-color: #dbe7ff;
    font-size: 0.875rem;
    line-height: 1.5;
}

.form-control-code:focus,
.form-control.font-monospace:focus {
    background: #fff;
    border-color: var(--lf-blue);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.12);
}

.settings-save-bar {
    position: sticky;
    bottom: 1rem;
    z-index: 20;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid #dbe7ff;
    border-radius: 0.85rem;
    box-shadow: 0 8px 24px rgba(11, 31, 58, 0.1);
    padding: 0.85rem 1.15rem;
}

.settings-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 0.85rem;
    font-weight: 500;
}

.facebook-page-card {
    border: 1px solid #dbe7ff;
    border-radius: 0.85rem;
    background: linear-gradient(135deg, #fff 0%, var(--lf-blue-soft) 100%);
    padding: 1.25rem 1.35rem;
}

.facebook-page-avatar {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 0.85rem;
    background: #1877f2;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.25);
}

.facebook-page-photo {
    border-radius: 0.85rem;
    object-fit: cover;
    border: 2px solid #dbe7ff;
    background: #fff;
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.15);
}

.setup-step {
    display: flex;
    gap: 0.85rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid #eef2f8;
}

.setup-step:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.setup-step-icon {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.setup-step-icon.done {
    background: #d1e7dd;
    color: #198754;
}

.setup-step-icon.pending {
    background: #e9ecef;
    color: #6c757d;
}

.connect-cta-panel {
    border: 2px dashed #c5d9ff;
    border-radius: 0.85rem;
    background: #fff;
    padding: 2rem 1.5rem;
    text-align: center;
}

.page-select-card {
    border: 1px solid #dbe7ff;
    border-radius: 0.85rem;
    background: #fff;
    padding: 1rem 1.15rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.page-select-card:hover {
    border-color: var(--lf-blue);
    box-shadow: 0 4px 14px rgba(13, 110, 253, 0.1);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
}

.detail-item {
    border: 1px solid #e3eaf5;
    border-radius: 0.65rem;
    background: #fff;
    padding: 0.85rem 1rem;
}

.detail-item-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.detail-item-value {
    font-weight: 600;
    color: #0b1f3a;
    word-break: break-word;
}

.conversation-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--lf-blue-light);
    color: var(--lf-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.conversation-sender-photo {
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #dbe7ff;
    background: #fff;
}

.conversation-thread {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: min(32rem, 55vh);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.75rem;
    background: #f8fafc;
    border: 1px solid #e3eaf5;
    border-radius: 0.75rem;
    overscroll-behavior: contain;
}

.conversation-thread-load-more-wrap {
    display: flex;
    justify-content: center;
    padding: 0.35rem 0 0.65rem;
    flex-shrink: 0;
    background: linear-gradient(#f8fafc, rgba(248, 250, 252, 0.95));
}

.conversation-thread-load-more {
    font-size: 0.8125rem;
}

.follow-up-history-preview {
    font-size: 0.6875rem;
    white-space: pre-wrap;
    opacity: 0.9;
}

.follow-up-log-toggle {
    color: #64748b;
}

.follow-up-log-toggle:hover,
.follow-up-log-toggle:focus {
    color: #334155;
}

.follow-up-log-toggle[aria-expanded="true"] .follow-up-log-chevron {
    transform: rotate(180deg);
}

.follow-up-log-chevron {
    transition: transform 0.15s ease;
    font-size: 0.875rem;
}

.conversation-thread-row {
    display: flex;
    width: 100%;
    flex: 0 0 auto;
    position: relative;
    z-index: 0;
}

.conversation-thread-row:focus-within,
.conversation-thread-row:hover {
    z-index: 2;
}

.conversation-thread-row-continued:not(:has(.message-reply-context)) {
    margin-top: -0.35rem;
}

.conversation-thread-row-continued:not(:has(.message-reply-context)) .message-thread-stack > .message-bubble:last-child {
    border-top-left-radius: 0.35rem;
}

.conversation-thread-row-human.conversation-thread-row-continued:not(:has(.message-reply-context)) .message-thread-stack > .message-bubble:last-child,
.conversation-thread-row-bot.conversation-thread-row-continued:not(:has(.message-reply-context)) .message-thread-stack > .message-bubble:last-child {
    border-top-left-radius: 1.1rem;
    border-top-right-radius: 0.35rem;
}

.message-thread-stack .message-bubble-reply-preview + .message-bubble {
    position: relative;
    z-index: 1;
}

.conversation-thread-row-user {
    justify-content: flex-start;
}

.conversation-thread-row-user .message-bubble-shell {
    margin-right: auto;
}

.conversation-thread-row-bot,
.conversation-thread-row-human {
    justify-content: flex-end;
}

.conversation-thread-row-bot .message-bubble-shell,
.conversation-thread-row-human .message-bubble-shell {
    margin-left: auto;
}

.conversation-thread [data-conversation-thread-end] {
    height: 0;
    width: 100%;
    flex: 0 0 auto;
    overflow: hidden;
}

.conversation-thread .message-bubble {
    flex: 0 0 auto;
    width: fit-content;
    max-width: min(85%, 22rem);
}

.conversation-thread .message-bubble-user {
    margin-right: 0;
}

.conversation-thread .message-bubble-bot {
    margin-left: 0;
}

.conversation-thread .message-bubble-human {
    margin-left: 0;
}

.message-bubble-meta {
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 0.35rem;
}

.message-bubble-body {
    line-height: 1.5;
}

.message-bubble-text {
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.message-reactions-row {
    margin-top: 0.35rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.message-reactions-row:has(.message-reactions-display.d-none) {
    margin-top: 0;
}

.message-reactions-display {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.2rem;
}

.message-reaction-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.65rem;
    padding: 0.1rem 0.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 0.95rem;
    line-height: 1.2;
}

.message-bubble-shell {
    position: relative;
    max-width: min(85%, 22rem);
    overflow: visible;
}

.inbox-workspace-thread .message-bubble-shell {
    max-width: min(92%, 36rem);
}

.conversation-thread .message-bubble-shell .message-bubble {
    max-width: 100%;
}

.message-hover-toolbar {
    position: absolute;
    top: 0.15rem;
    right: 0.2rem;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.15rem 0.25rem;
    border-radius: 999px;
    background: rgba(32, 37, 43, 0.92);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
    opacity: 0;
    pointer-events: none;
    transform: translateY(2px);
    transition: opacity 0.12s ease, transform 0.12s ease;
}

.conversation-thread-row:hover .message-hover-toolbar,
.conversation-thread-row:focus-within .message-hover-toolbar,
.message-bubble-shell:focus-within .message-hover-toolbar,
.message-hover-toolbar.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.message-hover-btn {
    border: none;
    background: transparent;
    color: #e8eaed;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    cursor: pointer;
}

.message-hover-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.message-reactions-popover {
    position: absolute;
    top: calc(100% + 0.25rem);
    right: 0;
    left: auto;
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 0.15rem;
    padding: 0.25rem 0.35rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
    z-index: 6;
}

.conversation-thread-row-user .message-reactions-popover {
    left: 0;
    right: auto;
}

.conversation-thread-row-human .message-hover-toolbar,
.conversation-thread-row-bot .message-hover-toolbar {
    left: 0.2rem;
    right: auto;
}

.conversation-thread-row-human .message-reactions-popover,
.conversation-thread-row-bot .message-reactions-popover {
    left: 0;
    right: auto;
}

.message-reactions-popover-floating {
    position: fixed !important;
    z-index: 10050 !important;
    top: auto;
    right: auto !important;
    min-width: 13rem;
    display: inline-flex !important;
    pointer-events: auto;
}

.message-hover-toolbar.is-open {
    z-index: 1079;
}

.message-reactions-popover[hidden] {
    display: none !important;
}

.message-thread-stack {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    max-width: 100%;
}

.conversation-thread-row-user .message-thread-stack {
    align-items: flex-start;
}

.conversation-thread-row-human .message-thread-stack,
.conversation-thread-row-bot .message-thread-stack {
    align-items: flex-end;
}

.message-reply-context {
    margin: 0;
    padding: 0 0.35rem;
    font-size: 0.6875rem;
    line-height: 1.3;
    color: #65676b;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    max-width: min(92%, 36rem);
}

.message-reply-context-icon {
    font-size: 0.75rem;
    opacity: 0.85;
    flex-shrink: 0;
}

.conversation-thread-row-human .message-reply-context,
.conversation-thread-row-bot .message-reply-context {
    justify-content: flex-end;
    text-align: right;
}

.message-bubble-thread-reply {
    margin-top: 0.05rem;
}

.message-bubble-reply-preview {
    padding: 0.4rem 0.65rem;
    border-radius: 1.1rem;
    background: #e4e6eb;
    color: #050505;
    font-size: 0.8125rem;
    line-height: 1.35;
    max-width: min(85%, 18rem);
    box-shadow: none;
    border: none;
}

.message-reply-quote-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.inbox-workspace-thread .message-bubble {
    padding: 0.45rem 0.65rem;
    border-radius: 1.1rem;
    box-shadow: none;
}

.inbox-workspace-thread .message-bubble-user {
    background: #f0f2f5;
    border: none;
}

.inbox-workspace-thread .message-bubble-human,
.inbox-workspace-thread .message-bubble-bot {
    background: #0084ff;
    border: none;
    color: #fff;
    margin-left: 0;
}

.inbox-workspace-thread .message-bubble-human .message-bubble-meta,
.inbox-workspace-thread .message-bubble-bot .message-bubble-meta {
    color: rgba(255, 255, 255, 0.88);
}

.inbox-workspace-thread .message-bubble-human .message-bubble-text,
.inbox-workspace-thread .message-bubble-bot .message-bubble-text {
    color: #fff;
}

.inbox-workspace-thread .conversation-thread-row-human .message-bubble-reply-preview,
.inbox-workspace-thread .conversation-thread-row-bot .message-bubble-reply-preview {
    background: #d8dadf;
    color: #050505;
}

.inbox-workspace-thread .message-bubble-human .message-reaction-chip,
.inbox-workspace-thread .message-bubble-bot .message-reaction-chip {
    background: rgba(255, 255, 255, 0.95);
}

.inbox-workspace-thread .message-bubble-human .message-bubble-meta-time,
.inbox-workspace-thread .message-bubble-bot .message-bubble-meta-time {
    color: rgba(255, 255, 255, 0.75);
}

.conversation-reply-to-banner .conversation-reply-to-preview {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
}

.conversation-reply-to-banner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    padding: 0.45rem 0.55rem;
    border-radius: 0.45rem;
    border-left: 3px solid rgba(13, 110, 253, 0.75);
    background: #f0f6ff;
}

.conversation-reply-to-preview {
    font-weight: 600;
    color: #1e293b;
    word-break: break-word;
}

@media (hover: none) {
    .message-hover-toolbar {
        opacity: 1;
        pointer-events: auto;
        transform: none;
    }
}

.message-reaction-btn {
    border: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 999px;
    padding: 0.1rem 0.35rem;
    font-size: 0.95rem;
    line-height: 1.2;
    cursor: pointer;
    border: 1px solid transparent;
}

.message-reaction-btn:hover {
    border-color: rgba(13, 110, 253, 0.35);
    background: #fff;
}

.message-reaction-btn.is-active {
    border-color: rgba(13, 110, 253, 0.55);
    box-shadow: 0 0 0 1px rgba(13, 110, 253, 0.25);
}

.inbox-workspace-thread .message-bubble {
    max-width: min(92%, 36rem);
}

.inbox-workspace-thread .message-bubble-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 0.25rem;
    row-gap: 0.1rem;
    font-size: 0.7rem;
    line-height: 1.35;
}

.inbox-workspace-thread .message-bubble-time-short {
    display: none;
}

.inbox-workspace-thread .message-bubble-time-full {
    display: inline;
}

.inbox-workspace-topbar .inbox-workspace-status-badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.25em 0.5em;
}

.inbox-workspace-topbar .inbox-workspace-sender .tenant-meta-name {
    font-size: 0.875rem;
    line-height: 1.25;
}

.inbox-workspace-topbar .inbox-workspace-sender a.small {
    font-size: 0.6875rem;
    margin-top: 0 !important;
}

.inbox-workspace {
    border: 1px solid #e3eaf5;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 7.5rem);
    min-height: 22rem;
    max-height: calc(100vh - 5rem);
}

.inbox-workspace-body {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
}

[data-inbox-workspace-page] {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.inbox-workspace-loader {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.inbox-workspace-loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
}

.inbox-workspace-loader-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #5b6b82;
}

.inbox-list-item.is-navigating {
    position: relative;
    background-color: rgba(13, 110, 253, 0.06);
}

.inbox-list-item.is-navigating::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 0.75rem;
    width: 1rem;
    height: 1rem;
    margin-top: -0.5rem;
    border: 0.15em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: inbox-list-item-spin 0.65s linear infinite;
    color: var(--bs-primary);
    opacity: 0.85;
}

@keyframes inbox-list-item-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .inbox-list-item.is-navigating::after {
        animation: none;
        border-right-color: currentColor;
        opacity: 0.5;
    }
}

/* Keep thread list visible; only the conversation + orders columns load underneath. */
.inbox-workspace--loading .inbox-workspace-col-center,
.inbox-workspace--loading .inbox-workspace-col-orders {
    visibility: hidden;
}

.inbox-workspace--loading .inbox-workspace-col-list {
    visibility: visible;
}

@media (min-width: 1400px) {
    .inbox-workspace--loading:has(.inbox-workspace-col-list) .inbox-workspace-loader {
        left: 25%;
        width: 75%;
    }
}

.inbox-workspace:not(.inbox-workspace--loading) .inbox-workspace-loader {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.inbox-workspace-loader[hidden] {
    display: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .inbox-workspace-loader {
        transition: none;
    }
}

.inbox-workspace-row {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    align-items: stretch;
    overflow: hidden;
}

.inbox-workspace-col {
    min-height: 0;
    min-width: 0;
    height: 100%;
    max-width: 100%;
}

.inbox-workspace-col-center {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.inbox-workspace-chat-stack {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.conversation-thread-viewport {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.conversation-thread-viewport > .conversation-thread {
    flex: 1 1 auto;
    min-height: 0;
}

.conversation-thread-scroll-down {
    position: absolute;
    right: 0.85rem;
    bottom: 0.85rem;
    z-index: 6;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 999px;
    border: 1px solid rgba(13, 110, 253, 0.25);
    background: #fff;
    color: #0d6efd;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.14);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

.conversation-thread-scroll-down:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.16);
    background: #f8fbff;
}

.conversation-thread-scroll-down[hidden] {
    display: none !important;
}

.inbox-workspace-thread {
    max-height: none;
    border: none;
    border-radius: 0;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.inbox-workspace-composer {
    flex-shrink: 0;
    z-index: 2;
    box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.06);
}

.inbox-composer {
    border: 1px solid #e2e8f0;
    border-radius: 1.25rem;
    padding: 0.5rem 0.65rem 0.45rem;
    background: #f8fafc;
}

.inbox-composer-input-wrap {
    margin-bottom: 0.35rem;
}

.inbox-composer-textarea {
    display: block;
    width: 100%;
    border: none;
    background: transparent;
    resize: none;
    padding: 0.25rem 0.35rem;
    font-size: 0.9375rem;
    line-height: 1.45;
    min-height: 2.5rem;
    max-height: 8rem;
}

.inbox-composer-textarea:focus {
    outline: none;
    box-shadow: none;
}

.inbox-composer-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 0.15rem;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.inbox-composer-toolbar-start {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.inbox-composer-menu-wrap,
.inbox-composer-inline-form {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.inbox-composer-icon-btn {
    border: none;
    background: transparent;
    color: #0d6efd;
    width: 2.125rem;
    height: 2.125rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0 0.45rem;
    cursor: pointer;
    font-size: 1.05rem;
    line-height: 1;
    flex-shrink: 0;
}

.inbox-composer-icon-btn:hover {
    background: rgba(13, 110, 253, 0.1);
}

.inbox-composer-icon-label {
    font-size: 0.75rem;
    font-weight: 600;
}

.inbox-composer-send-btn {
    border: none;
    background: #0d6efd;
    color: #fff;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
}

.inbox-composer-send-btn:hover {
    background: #0b5ed7;
}

.inbox-composer-menu-wrap {
    position: relative;
}

.inbox-composer-menu {
    position: absolute;
    bottom: calc(100% + 0.35rem);
    left: 0;
    z-index: 12;
    min-width: 11rem;
    max-width: min(18rem, 85vw);
    max-height: 14rem;
    overflow: auto;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 0.65rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    padding: 0.35rem 0;
}

.inbox-composer-menu[hidden] {
    display: none !important;
}

.inbox-composer-menu-title {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    padding: 0.25rem 0.65rem 0.35rem;
    margin: 0;
}

.inbox-composer-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.inbox-composer-menu-item {
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    padding: 0.4rem 0.65rem;
    font-size: 0.8125rem;
    cursor: pointer;
}

.inbox-composer-menu-item:hover {
    background: #f1f5f9;
}

.inbox-composer-sticker-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0 0.5rem 0.45rem;
    overflow-x: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

.inbox-composer-sticker-btn {
    border: none;
    background: #f8fafc;
    border-radius: 0.5rem;
    font-size: 1.35rem;
    line-height: 1;
    width: 2.25rem;
    height: 2.25rem;
    cursor: pointer;
}

.inbox-composer-sticker-btn:hover {
    background: #e2e8f0;
}

.inbox-composer-menu.inbox-composer-menu-emoji {
    width: 17.5rem;
    min-width: 0;
    max-width: min(17.5rem, calc(100vw - 2rem));
    max-height: min(16rem, 45vh);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
}

.inbox-composer-emoji-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0 0.5rem 0.35rem;
    overflow-x: hidden;
}

.inbox-composer-emoji-tab {
    border: none;
    background: #eef2ff;
    color: #334155;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    cursor: pointer;
}

.inbox-composer-emoji-tab.is-active {
    background: #0d6efd;
    color: #fff;
}

.inbox-composer-emoji-panel {
    overflow-x: hidden;
}

.inbox-composer-emoji-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.2rem;
    padding: 0 0.5rem 0.5rem;
    box-sizing: border-box;
}

.inbox-composer-emoji-btn {
    border: none;
    background: transparent;
    font-size: 1.25rem;
    line-height: 1.2;
    padding: 0.25rem;
    border-radius: 0.35rem;
    cursor: pointer;
    min-width: 0;
    aspect-ratio: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.inbox-composer-emoji-quick-send {
    overflow-x: hidden;
}

.inbox-composer-emoji-btn:hover {
    background: rgba(13, 110, 253, 0.1);
}

.inbox-composer-inline-form {
    display: inline-flex;
    margin: 0;
}

.inbox-messenger-templates {
    background: #f8fafc;
    border-color: #e2e8f0 !important;
}

.inbox-order-add-shortcuts .btn-sm {
    white-space: nowrap;
}

.inbox-quick-sends-details > summary {
    list-style: none;
    cursor: pointer;
}

.inbox-quick-sends-details > summary::-webkit-details-marker {
    display: none;
}

.inbox-quick-sends-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem 0.75rem;
}

.inbox-quick-sends-chevron {
    font-size: 0.75rem;
    transition: transform 0.15s ease;
    color: #64748b;
}

.inbox-quick-sends-details[open] .inbox-quick-sends-chevron {
    transform: rotate(180deg);
}

.inbox-quick-sends-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem 0.75rem;
    margin-bottom: 0.65rem;
}

.inbox-quick-sends-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.65rem;
}

.inbox-quick-sends-toolbar-divider {
    display: none;
    align-self: stretch;
    width: 1px;
    min-height: 2rem;
    margin: 0 0.15rem;
    background: #cbd5e1;
}

.inbox-quick-sends-order-cluster {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    flex: 1 1 12rem;
    min-width: 0;
}

.inbox-quick-sends-invoice {
    flex: 0 1 12.5rem;
    min-width: 9.5rem;
    max-width: 14rem;
}

.inbox-quick-sends-invoice .select2-container {
    width: 100% !important;
}

.inbox-quick-sends-invoice-badge {
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    white-space: nowrap;
}

.inbox-quick-sends-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

@media (min-width: 576px) {
    .inbox-quick-sends-toolbar-divider {
        display: block;
    }
}

.inbox-workspace-col-side {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.order-manage-pane {
    background: #fff;
}

.order-manage-tabs .nav-link {
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
}

.payment-method-qr-thumb {
    object-fit: contain;
    background: #fff;
}

.portal-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
}

.portal-nav-live-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.2;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.25);
    animation: portal-nav-live-pulse 1.8s ease-in-out infinite;
}

@keyframes portal-nav-live-pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.78;
    }
}

.portal-unread-dot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #dc2626;
    vertical-align: middle;
}

.conversation-sender-avatar-wrap {
    position: relative;
    display: inline-block;
    line-height: 0;
}

.portal-unread-dot--avatar {
    position: absolute;
    top: 0;
    right: 0;
    width: 0.625rem;
    height: 0.625rem;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
    transform: translate(20%, -20%);
    vertical-align: unset;
}

.conversation-sender-meta-indent-sm {
    margin-left: calc(2.5rem + 0.75rem);
}

.admin-table tbody tr.portal-row-unread {
    background-color: #fffbeb;
}

.admin-table tbody tr.portal-row-unread > td:first-child {
    box-shadow: inset 3px 0 0 #f59e0b;
}

.portal-fb-page-switcher .form-select {
    min-width: 10rem;
    max-width: 14rem;
}

.portal-fb-page-switcher-connect .portal-fb-page-switcher {
    display: block !important;
}

.inbox-assign-shortcut .form-select {
    min-width: 9.5rem;
    max-width: 12rem;
}

.inbox-list-item-unread {
    background: #fffbeb;
    box-shadow: inset 3px 0 0 #f59e0b;
}

.inbox-context-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 2.5rem;
    flex-shrink: 0;
}

.inbox-context-bar .inbox-context-meta {
    overflow: hidden;
}

.inbox-context-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.65rem;
    min-width: 0;
    font-size: 0.8125rem;
}

.inbox-context-page {
    white-space: nowrap;
}

.inbox-context-tags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.inbox-context-tags .badge {
    font-size: 0.65rem;
}

.inbox-context-assignee {
    white-space: nowrap;
}

.inbox-context-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.inbox-context-action {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #f8fafc;
    color: #475569;
    line-height: 1;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.inbox-context-action:hover {
    background: #fff;
    border-color: #cbd5e1;
    color: #0f172a;
}

.inbox-context-action.is-active {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff;
}

.inbox-context-action-badge {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    min-width: 1rem;
    height: 1rem;
    padding: 0 0.2rem;
    border-radius: 999px;
    background: #64748b;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1rem;
    text-align: center;
}

.inbox-context-action.is-active .inbox-context-action-badge {
    background: #fff;
    color: var(--bs-primary);
}

.inbox-context-action-badge-live {
    background: var(--bs-primary);
}

.inbox-context-action.is-active .inbox-context-action-badge-live {
    background: #fff;
    color: var(--bs-primary);
}

.inbox-customer-drawer {
    background: #f1f5f9;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.inbox-customer-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem 0;
    color: #334155;
}

.inbox-customer-drawer-body {
    max-height: min(36vh, 280px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 0.75rem;
}

.portal-container-default {
    max-width: 1400px;
}

.portal-container-inbox {
    max-width: none;
}

.portal-main-inbox {
    padding-bottom: 0.75rem;
}

@media (min-width: 1200px) {
    html.portal-customer:has(.inbox-workspace) {
        overflow: hidden;
        height: 100%;
    }

    html.portal-customer:has(.inbox-workspace) body {
        overflow: hidden;
        height: 100%;
    }

    html.portal-customer:has(.inbox-workspace) body > .d-flex {
        height: 100dvh;
        max-height: 100dvh;
        min-height: 0;
    }

    html.portal-customer:has(.inbox-workspace) body > .d-flex > .flex-grow-1 {
        display: flex;
        flex-direction: column;
        min-height: 0;
        max-height: 100dvh;
        overflow: hidden;
    }

    html.portal-customer:has(.inbox-workspace) .portal-main-inbox {
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    html.portal-customer:has(.inbox-workspace) .portal-container-inbox {
        flex: 1 1 auto;
        min-height: 0;
        min-width: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    html.portal-customer:has(.inbox-workspace) [data-inbox-workspace-page] {
        flex: 1 1 auto;
        min-height: 0;
        min-width: 0;
    }

    html.portal-customer:has(.inbox-workspace) .inbox-workspace {
        flex: 1 1 auto;
        min-height: 0;
        min-width: 0;
        max-height: none;
        height: auto;
        margin-bottom: 0 !important;
    }

    html.portal-customer:has(.inbox-workspace) .portal-main-inbox {
        padding: 0.5rem 0.75rem 0.75rem;
    }
}

@media (max-width: 1199.98px) {
    .inbox-workspace {
        height: auto;
        max-height: none;
        min-height: calc(100dvh - 7.5rem);
    }

    .inbox-workspace-row {
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    .inbox-workspace-col-center {
        order: 1;
        width: 100%;
        max-width: 100%;
        min-height: min(68vh, 560px);
        max-height: none;
    }

    .inbox-workspace-col-orders {
        order: 2;
        width: 100%;
        max-width: 100%;
        max-height: min(36vh, 320px);
        overflow: hidden;
        display: flex;
        flex-direction: column;
        flex-shrink: 0;
    }

    .inbox-workspace.inbox-workspace-side-collapsed .inbox-workspace-col-orders {
        display: none !important;
    }

    .inbox-workspace.inbox-workspace-side-collapsed .inbox-workspace-col-center {
        min-height: min(75vh, 640px);
    }
}

@media (min-width: 1200px) and (max-width: 1399.98px) {
    .inbox-workspace-col-chat,
    .inbox-workspace-col-orders {
        min-width: 0;
    }

    .inbox-workspace.inbox-workspace-side-collapsed .inbox-workspace-col-orders {
        display: none !important;
    }

    .inbox-workspace.inbox-workspace-side-collapsed .inbox-workspace-col-chat {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (max-width: 767.98px) {
    .inbox-workspace-composer {
        max-height: min(42vh, 18rem);
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .inbox-workspace-col-center {
        min-height: min(62vh, 480px);
    }

    .inbox-context-meta {
        font-size: 0.75rem;
    }

    .inbox-customer-drawer-body {
        max-height: min(28vh, 220px);
    }
}

/* Compact conversation column when chat shares width with orders / sidebar */
@media (max-width: 1599.98px) {
    .inbox-workspace-thread {
        padding: 0.5rem 0.45rem;
        gap: 0.35rem;
    }

    .inbox-workspace-thread .message-bubble-shell {
        max-width: min(88%, 18rem);
    }

    .inbox-workspace-thread .message-bubble {
        max-width: 100%;
        padding: 0.45rem 0.6rem;
        border-radius: 0.45rem;
    }

    .inbox-workspace-thread .message-bubble-body,
    .inbox-workspace-thread .message-bubble-text {
        font-size: 0.8125rem;
        line-height: 1.45;
    }

    .inbox-workspace-thread .message-bubble-meta {
        font-size: 0.625rem;
        margin-bottom: 0.2rem;
    }

    .inbox-workspace-thread .message-bubble-time-short {
        display: inline;
    }

    .inbox-workspace-thread .message-bubble-time-full {
        display: none;
    }

    .inbox-workspace-thread .conversation-message-image-link,
    .inbox-workspace-thread .conversation-message-image {
        max-width: min(100%, 160px);
        max-height: 160px;
    }

    .inbox-workspace-thread .conversation-message-file {
        font-size: 0.75rem;
        padding: 0.35rem 0.5rem;
    }

    .inbox-workspace-thread .conversation-system-note {
        font-size: 0.6875rem;
        padding: 0.25rem 0.35rem;
    }

    .inbox-workspace-topbar {
        padding-top: 0.35rem !important;
        padding-bottom: 0.35rem !important;
    }

    .inbox-workspace-topbar .inbox-workspace-sender .tenant-meta-name {
        font-size: 0.8125rem;
    }

    .inbox-workspace-composer {
        font-size: 0.8125rem;
    }

    .inbox-workspace-composer .form-label {
        font-size: 0.6875rem;
        margin-bottom: 0.15rem;
    }

    .inbox-workspace-composer .form-control-sm,
    .inbox-workspace-composer .form-select-sm {
        font-size: 0.8125rem;
        padding: 0.3rem 0.5rem;
    }

    .inbox-workspace-composer textarea.form-control-sm {
        min-height: 2.5rem;
    }

    .inbox-workspace-composer .btn-sm {
        font-size: 0.75rem;
        padding: 0.25rem 0.55rem;
    }

    .inbox-messenger-templates .btn-sm {
        font-size: 0.6875rem;
        padding: 0.2rem 0.45rem;
    }

    .inbox-quick-sends-summary .small {
        font-size: 0.6875rem !important;
    }

    .inbox-context-meta {
        font-size: 0.75rem;
        gap: 0.25rem 0.45rem;
    }

    .inbox-context-tags .badge {
        font-size: 0.6rem;
        padding: 0.2em 0.45em;
    }

    .inbox-context-action {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.8rem;
        border-radius: 0.4rem;
    }
}

@media (max-width: 1199.98px) {
    .inbox-workspace-col-orders:not([style*="display: none"]) {
        max-height: min(32vh, 260px);
    }

    .inbox-workspace.inbox-workspace-side-collapsed .inbox-workspace-col-center {
        min-height: min(78vh, 680px);
    }
}

@media (max-width: 991.98px) {
    .inbox-workspace-topbar .inbox-workspace-sender a.small {
        font-size: 0;
        gap: 0;
    }

    .inbox-workspace-topbar .inbox-workspace-sender a.small .bi {
        font-size: 0.85rem;
    }
}

@media (max-width: 575.98px) {
    .inbox-workspace-thread .message-bubble {
        max-width: 100%;
    }

    .inbox-workspace-composer {
        max-height: min(38vh, 16rem);
    }
}

.inbox-list-item {
    color: inherit;
    transition: background 0.12s ease;
}

.inbox-list-item:hover {
    background: #eef4ff;
}

.inbox-list-item-active {
    background: #e0f2f1;
    border-left: 3px solid var(--bs-primary, #0d6efd);
}

.order-status-chips .nav-link {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.35rem 0.75rem;
    color: #495057;
    font-size: 0.875rem;
}

.order-status-chips .nav-link.active {
    background: #0d3b66;
    border-color: #0d3b66;
    color: #fff;
}

.order-status-chips .badge {
    font-weight: 500;
    margin-left: 0.35rem;
}

.conversation-system-note {
    text-align: center;
    font-size: 0.75rem;
    color: #2e7d32;
    padding: 0.35rem 0.5rem;
    margin: 0.25rem 0;
}

.order-workspace-panel-fill {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.order-workspace-panel-fill > * {
    flex: 1 1 auto;
    min-height: 0;
}

.order-workspace-panel-fill > .conversation-transactions-panel,
.order-workspace-panel-fill > .order-manage-pane,
.order-panel-items-foot {
    box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.06);
    z-index: 2;
}

.order-workspace-panel-fill > .order-panel-items,
.order-workspace-panel-fill > .order-picker-panel,
.order-workspace-panel-fill > .order-panel-appointment,
.order-workspace-panel-fill > .order-panel-scroll,
.order-workspace-panel-fill > .order-panel-catalog {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.order-workspace-panel-fill > :not(.conversation-transactions-panel):not(.order-manage-pane):not(.order-panel-items):not(.order-picker-panel):not(.order-panel-appointment):not(.order-panel-catalog) {
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.order-workspace-head-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.5rem;
    align-items: center;
}

.order-workspace-back {
    flex-shrink: 0;
}

.order-workspace-invoice-form .select2-container {
    width: 100% !important;
    max-width: 100%;
}

.order-workspace-head-badges .badge {
    font-size: 0.6875rem;
    font-weight: 600;
}

.inbox-workspace-col-orders .order-workspace {
    flex: 1 1 auto;
    min-height: 0;
}

.order-workspace-panel-fill > .order-picker-panel,
.order-workspace-panel-fill > .order-panel-appointment,
.order-workspace-panel-fill > .order-panel-scroll,
.order-workspace-panel-fill > .order-panel-catalog {
    flex: 1 1 auto;
    min-height: 0;
}

.order-workspace-panel-fill > .order-panel-scroll,
.order-workspace-panel-fill > .order-panel-appointment.order-panel-scroll {
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.order-workspace-panel-fill > .order-panel-catalog,
.order-workspace-panel-fill > .order-picker-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.order-panel-catalog-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.order-picker-panel {
    background: #f8fafc;
}

.order-picker-form {
    min-height: 0;
}

.order-picker-body {
    -webkit-overflow-scrolling: touch;
}

.order-picker-thumb {
    aspect-ratio: 1;
    background: #fff;
    border: 1px solid #e2e8f0;
}

.order-picker-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.order-picker-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 4.5rem;
    color: #94a3b8;
    font-size: 1.25rem;
    background: #f1f5f9;
}

.order-picker-tile {
    cursor: pointer;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.5rem;
    background: #fff;
    height: 100%;
    transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}

.order-picker-tile:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.order-picker-tile:has(.order-picker-check:checked) {
    border-color: #0d9488;
    box-shadow: 0 0 0 1px #0d9488, 0 2px 8px rgba(13, 148, 136, 0.15);
}

.order-picker-tile:has(.order-picker-check:checked) .order-picker-thumb {
    border-color: #99f6e4;
}

.order-picker-meta {
    line-height: 1.35;
    min-height: 2.75rem;
}

.order-picker-variant {
    margin-top: 0.1rem;
}

.order-picker-footer {
    box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.06);
    z-index: 2;
}

.order-picker-pagination .pagination {
    margin-bottom: 0;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.order-picker-pagination .page-link {
    padding: 0.25rem 0.5rem;
    font-size: 0.8125rem;
}

.orders-index-row-actions {
    white-space: nowrap;
}

.orders-index-row-actions .btn {
    flex-shrink: 0;
}

.order-panel-tabs .nav-link {
    padding: 0.25rem 0.75rem;
}

.message-bubble-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* Course learn + portal rich text (matches storefront lesson/blog body) */
.storefront-richtext figure.attachment,
.storefront-richtext figure {
    margin: 1rem 0;
    max-width: 100%;
}

.storefront-richtext img {
    max-width: 100%;
    height: auto;
    border-radius: 0.35rem;
}

.storefront-richtext p {
    margin-bottom: 0.75rem;
}
