body {
    margin: 0;
    padding: 0;
    background: #f5f6fa;
    font-family: 'Inter', sans-serif;
    color: #333;
}

.main-wrapper {
    min-height: 100vh;
}

.sidebar {
    min-height: 100vh;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    padding: 20px 15px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.03);
}

/* Keep admin navigation fixed and offset content even when a page-specific
   style or modal element appears between the sidebar and the content. */
@media (min-width: 769px) {
    .admin-panel-sidebar {
        position: fixed;
        top: var(--admin-topbar-height, 70px);
        left: 0;
        bottom: 0;
        z-index: 990;
        width: 16.66666667%;
        height: calc(100vh - var(--admin-topbar-height, 70px));
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
    }

    .admin-panel-sidebar ~ .col-md-10 {
        margin-left: 16.66666667%;
    }
}

.sidebar-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 25px;
    color: #1f2937;
}

.sidebar-section {
    font-size: 12px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    margin-top: 20px;
    margin-bottom: 8px;
    padding-left: 10px;
}

.sidebar .nav-link {
    color: #374151;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 6px;
    font-size: 15px;
    transition: 0.2s;
}

.sidebar .nav-link i {
    margin-right: 8px;
}

.sidebar .nav-link:hover {
    background: #f3f4f6;
    color: #111827;
}

.sidebar .nav-link.active-link {
    background: #0075df;
    color: #fff;
    font-weight: 600;
}

.page-area {
    padding: 25px;
}

.page-header {
    background: #ffffff;
    border-radius: 14px;
    padding: 18px 22px;
    margin-bottom: 20px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    border-left: 6px solid #0075df;
}

.page-header h2 {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    color: #1f2937;
}

.card-box {
    background: #ffffff;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
}

.stats-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
    height: 100%;
}

.stats-card h5 {
    font-size: 15px;
    color: #6b7280;
    margin-bottom: 10px;
}

.stats-card h2 {
    font-size: 30px;
    font-weight: 700;
    color: #0075df;
    margin: 0;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: #f9fafb;
    color: #374151;
    font-size: 14px;
    font-weight: 700;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.table tbody td {
    vertical-align: middle;
    font-size: 14px;
}

.form-label {
    font-weight: 600;
    color: #374151;
}

.form-control,
.form-select {
    border-radius: 10px;
    min-height: 44px;
    border: 1px solid #d1d5db;
    box-shadow: none;
}

.form-control:focus,
.form-select:focus {
    border-color: #0075df;
    box-shadow: 0 0 0 0.15rem rgba(255, 101, 74, 0.15);
}

textarea.form-control {
    min-height: 120px;
}

.btn {
    border-radius: 10px;
    padding: 9px 16px;
    font-weight: 600;
}

.btn-primary {
    background: #0075df;
    border-color: #0075df;
}

.btn-primary:hover {
    background: #e5533b;
    border-color: #e5533b;
}

.btn-warning,
.btn-info,
.btn-success,
.btn-danger,
.btn-secondary,
.btn-dark {
    font-weight: 600;
}

.badge-soft {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.status-pending {
    background: #fff7ed;
    color: #ea580c;
}

.status-processing {
    background: #eff6ff;
    color: #2563eb;
}

.status-ready {
    background: #ecfdf5;
    color: #059669;
}

.status-done {
    background: #eef2ff;
    color: #4338ca;
}

.status-rejected {
    background: #fef2f2;
    color: #dc2626;
}

.status-unpaid {
    background: #fef2f2;
    color: #dc2626;
}

.status-paid {
    background: #ecfdf5;
    color: #059669;
}

.login-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #fff5f3, #f5f6fa);
}

.login-card {
    border: none;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.login-card .card-header {
    background: #0075df;
    color: #fff;
    border-radius: 18px 18px 0 0 !important;
    font-size: 22px;
    font-weight: 700;
    padding: 18px 22px;
}

.submenu {
    padding-left: 18px;
    margin-top: 4px;
    margin-bottom: 8px;
}

.submenu .nav-link {
    font-size: 14px;
    padding: 8px 10px;
    color: #6b7280;
    border-radius: 8px;
}

.submenu .nav-link:hover {
    background: #f3f4f6;
    color: #111827;
}

.sidebar .nav-link[data-bs-toggle="collapse"] {
    font-weight: 600;
}
.submenu {
    padding-left: 18px;
    margin-top: 4px;
    margin-bottom: 8px;
}

.submenu .nav-link {
    font-size: 14px;
    padding: 8px 10px;
    color: #6b7280;
    border-radius: 8px;
    margin-bottom: 4px;
}

.submenu .nav-link:hover {
    background: #f3f4f6;
    color: #111827;
}

.active-sublink {
    background: #0075df1c;
    color: #0075df !important;
    font-weight: 600;
}

.menu-toggle {
    font-weight: 600;
}

.menu-toggle .arrow {
    transition: transform 0.3s ease;
}

.menu-toggle:not(.collapsed) .arrow {
    transform: rotate(180deg);
}
.topbar {
    min-height: 70px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    position: sticky;
    top: 0;
    z-index: 999;
}

.topbar-logo {
    width: var(--app-logo-width, 50px);
    height: var(--app-logo-height, 50px);
    object-fit: contain;
    flex: 0 0 auto;
}

.topbar-brand {
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
}

.top-icon-btn {
    border: none;
    background: #f9fafb;
    border-radius: 10px;
    padding: 8px 12px;
}

.top-icon-btn:hover {
    background: #f3f4f6;
}

.notification-badge {
    position: absolute;
    top: 3px;
    right: 4px;
    background: #0075df;
    color: #fff;
    font-size: 11px;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-menu {
    width: 390px;
    max-width: calc(100vw - 24px);
    max-height: 500px;
    overflow: hidden;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.2);
}

.notification-list {
    max-height: 410px;
    overflow-y: auto;
    background: #fff;
}

.notification-item {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 12px 14px;
    transition: background-color .18s ease, color .18s ease;
}

.notification-item-unread {
    background: #087bea;
    color: #fff;
}

.notification-item-unread:hover {
    background: #006fda;
}

.notification-item-read {
    background: #fff;
    color: #1f2937;
}

.notification-item-read:hover {
    background: #f8fafc;
}

.notification-main {
    min-width: 0;
    color: inherit;
}

.notification-main:hover {
    color: inherit;
}

.notification-title {
    margin-bottom: 4px;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.notification-message {
    font-size: 13px;
    line-height: 1.45;
    opacity: .92;
    overflow-wrap: anywhere;
}

.notification-time {
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.3;
    opacity: .78;
}

.notification-actions {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

.notification-read-btn,
.notification-read-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    border-radius: 999px;
    padding: 5px 8px;
    font-size: 11px;
    line-height: 1;
}

.notification-read-btn {
    border: 1px solid rgba(255, 255, 255, .78);
    background: rgba(255, 255, 255, .13);
    color: #fff;
    cursor: pointer;
}

.notification-read-btn:hover,
.notification-read-btn:focus {
    background: #fff;
    color: #087bea;
}

.notification-read-btn:disabled {
    opacity: .65;
    cursor: wait;
}

.notification-read-label {
    color: #64748b;
    background: #f1f5f9;
}

.notification-header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

@media (max-width: 575.98px) {
    .notification-menu {
        width: calc(100vw - 18px);
    }

    .notification-item {
        grid-template-columns: 1fr;
    }

    .notification-actions {
        justify-content: flex-start;
    }
}
.invoice-box {
    max-width: 1000px;
    margin: auto;
}

@media print {
    .sidebar,
    .topbar,
    .page-header,
    .btn {
        display: none !important;
    }

    .page-area,
    .card-box {
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
    }

    body {
        background: #fff !important;
    }
}
/* Professional button style */
.btn {
    border-radius: 8px !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    min-width: auto !important;
    box-shadow: none !important;
}

/* Main blue button style */
.btn-primary,
.btn-info,
.btn-warning,
.btn-success,
.btn-danger,
.btn-dark,
.btn-secondary {
    background: #0075DF !important;
    border: 1px solid #0075DF !important;
    color: #fff !important;
}

.btn-primary:hover,
.btn-info:hover,
.btn-warning:hover,
.btn-success:hover,
.btn-danger:hover,
.btn-dark:hover,
.btn-secondary:hover {
    background: #005fb4 !important;
    border-color: #005fb4 !important;
    color: #fff !important;
}

/* Small buttons */
.btn-sm {
    padding: 5px 10px !important;
    font-size: 12px !important;
    border-radius: 6px !important;
    background-color: #0075df;
    color: #fff;
}

/* Better spacing inside tables */
.table .btn {
    margin: 2px 2px 2px 0 !important;
}

/* Optional: action buttons in one line wrap nicely */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
table,
.table,
.table th,
.table td,
input,
select,
textarea,
button,
.btn,
.nav-link,
.sidebar,
.page-header,
.card-box,
.topbar,
.dropdown-menu {
    font-family: 'Inter', sans-serif !important;
}

.table th {
    font-size: 14px;
    font-weight: 600;
}

.table td {
    font-size: 14px;
    font-weight: 400;
}
.modal-dialog.modal-xl {
    max-width: 1100px;
}

.modal-body {
    max-height: 75vh;
    overflow-y: auto;
}

.modal-content {
    border-radius: 16px;
}

.modal-header,
.modal-footer {
    background: #fff;
    position: sticky;
    z-index: 2;
}

.modal-header {
    top: 0;
}
.table-card {
    background: #fff;
    border-radius: 18px;
    padding: 18px;
    overflow: hidden;
}

.table-scroll {
    overflow-x: auto;
    overflow-y: visible !important;
    position: relative;
}

.table-scroll .dropdown,
.table-scroll td,
.table-scroll th {
    position: relative;
}

.table-scroll .dropdown-menu {
    z-index: 9999 !important;
}

.table td,
.table th {
    vertical-align: middle;
    white-space: nowrap;
}

.table td.wrap,
.table th.wrap {
    white-space: normal;
}

/* Keep long admin permission lists inside the table instead of pushing the
   action column off screen. */
.admin-users-table {
    table-layout: fixed;
    width: 100%;
}

.admin-users-table .permissions-column {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.admin-permission-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 8px;
    align-items: flex-start;
}

/* Two permissions per line keeps a long access list readable without a
   horizontal scroll. */
.admin-permission-chip {
    flex: 0 1 calc(50% - 4px);
    min-width: 0;
    padding: 4px 7px;
    border-radius: 5px;
    background: #f1f5f9;
    color: #334155;
    font-size: 12px;
    line-height: 1.3;
    white-space: normal;
    overflow-wrap: anywhere;
}

.admin-users-table .actions-column {
    width: 170px;
    white-space: normal;
}

.admin-users-table .action-buttons {
    gap: 4px;
}

@media (max-width: 991.98px) {
    .admin-users-table {
        min-width: 760px;
    }

    .admin-users-table .permissions-column {
        min-width: 260px;
    }
}

@media (max-width: 575.98px) {
    .admin-permission-chip {
        flex-basis: 100%;
    }
}

.table thead th {
    background: #f8fafc;
    font-weight: 600;
}

.table-scroll::-webkit-scrollbar {
    height: 10px;
}
.table-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 20px;
}
.table-scroll::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.pagination-wrap {
    display: flex;
    justify-content: flex-end;
}

.pagination {
    margin-bottom: 0;
    gap: 6px;
}

.page-item .page-link {
    border: none;
    border-radius: 10px;
    padding: 8px 14px;
    color: #0075DF;
    font-weight: 600;
    background: #f1f5f9;
}

.page-item.active .page-link {
    background: #0075DF;
    color: #fff !important;
}

.pagination .page-item.active .page-link,
.pagination .active > .page-link {
    color: #fff !important;
}

.embro-pwa-install { position: fixed; z-index: 1085; right: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 11px 17px; background: var(--app-primary,#0075df); color: #fff; font-size: 13px; font-weight: 700; box-shadow: 0 12px 30px rgba(0,117,223,.3); }
.embro-pwa-install:hover, .embro-pwa-install:focus { color: #fff; filter: brightness(.94); }
@media (max-width: 767.98px) { .embro-pwa-install { right: 10px; bottom: 10px; } }

.page-item .page-link:hover {
    background: #dbeafe;
    color: #005fba;
}

.status-hold {
    background: #f3e8ff;
    color: #7c3aed;
}
.modal-footer {
    bottom: 0;
}
@media (max-width: 768px) {
    .sidebar {
        min-height: auto;
    }

    .page-area {
        padding: 15px;
    }

    .page-header h2 {
        font-size: 22px;
    }
}

/* Temporary mailbox activity toast; it does not enter the notification list. */
.email-activity-toast{position:fixed;left:24px;bottom:104px;z-index:1090;width:350px;max-width:calc(100vw - 48px);display:flex;align-items:center;gap:12px;padding:14px 16px;border-radius:14px;background:#0f172a;color:#fff;box-shadow:0 18px 45px rgba(15,23,42,.3);opacity:0;transform:translateY(16px);transition:opacity .45s ease,transform .45s ease;cursor:pointer}.email-activity-toast.show{opacity:1;transform:translateY(0)}.email-activity-toast-icon{width:40px;height:40px;flex:0 0 40px;border-radius:12px;display:flex;align-items:center;justify-content:center;background:#1677df;font-size:18px}.email-activity-toast-body{min-width:0;display:flex;flex-direction:column}.email-activity-toast-body strong{font-size:14px}.email-activity-toast-body span{font-size:12px;color:#dbeafe;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.email-activity-toast.is-error .email-activity-toast-icon{background:#dc2626}@media(max-width:768px){.email-activity-toast{left:12px;right:12px;bottom:16px;width:auto;max-width:none}}
/* Dashboard upgrade */
.dashboard-page {
    background: #f5f7fb;
}

.dashboard-hero {
    background: linear-gradient(135deg, #0075df, #083f7c);
    border-radius: 22px;
    padding: 28px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    box-shadow: 0 18px 38px rgba(0, 117, 223, 0.18);
}

.dashboard-eyebrow {
    display: inline-block;
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.28);
    color: #fff;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}

.dashboard-hero h2 {
    margin: 0;
    font-size: 30px;
    font-weight: 800;
}

.dashboard-hero p {
    margin: 8px 0 0;
    color: rgba(255,255,255,0.85);
    max-width: 680px;
}

.dashboard-hero-meta {
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 18px;
    padding: 14px 18px;
    min-width: 150px;
    text-align: right;
}

.dashboard-hero-meta span {
    display: block;
    font-size: 13px;
    color: rgba(255,255,255,0.78);
}

.dashboard-hero-meta strong {
    display: block;
    font-size: 18px;
    color: #fff;
}

.dashboard-stat-card {
    background: #fff;
    border-radius: 18px;
    padding: 20px;
    border: 1px solid #e8eef6;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    display: flex;
    gap: 15px;
    align-items: center;
    height: 100%;
}

.dashboard-stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: #eaf4ff;
    color: #0075df;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex: 0 0 auto;
}

.dashboard-stat-card span {
    display: block;
    font-size: 13px;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 4px;
}

.dashboard-stat-card h3 {
    margin: 0;
    color: #0f172a;
    font-size: 25px;
    font-weight: 800;
}

.dashboard-stat-card small {
    display: block;
    color: #94a3b8;
    margin-top: 4px;
    font-weight: 600;
}

.chart-card {
    background: #fff;
    border-radius: 18px;
    border: 1px solid #e8eef6;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    padding: 20px;
}

.chart-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.chart-card-header h5 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
}

.chart-card-header p {
    margin: 4px 0 0;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
}

.dashboard-table thead th {
    color: #64748b;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.03em;
}

.dashboard-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dashboard-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 14px 0;
    border-bottom: 1px solid #eef2f7;
}

.dashboard-list-item:last-child {
    border-bottom: 0;
}

.dashboard-list-item strong {
    display: block;
    color: #0f172a;
    font-weight: 800;
}

.dashboard-list-item span {
    display: block;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
    margin-top: 2px;
}

.dashboard-list-item b {
    color: #0075df;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .dashboard-hero {
        flex-direction: column;
        align-items: flex-start;
    }
    .dashboard-hero-meta {
        text-align: left;
        width: 100%;
    }
}


.import-export-toolbar {
    overflow: hidden;
}

.import-export-toolbar__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.import-export-toolbar__meta {
    flex: 1 1 280px;
}

.import-export-toolbar__badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 10px;
}

.import-export-toolbar__meta h6 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}

.import-export-toolbar__meta p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.import-export-toolbar__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 1 1 420px;
}

.import-export-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.import-export-btn {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.import-file-trigger {
    min-height: 46px;
    min-width: 240px;
    max-width: 300px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0;
}

.import-file-trigger:hover {
    border-color: #0075df;
    box-shadow: 0 0 0 0.15rem rgba(0, 117, 223, 0.08);
}

.has-selected-file .import-file-trigger {
    border-color: #0075df;
    background: #f8fbff;
}

.import-file-trigger__icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #f3f4f6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0075df;
    font-size: 16px;
    flex: 0 0 34px;
}

.import-file-trigger__text {
    display: block;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    color: #374151;
}

.import-file-input {
    display: none;
}

@media (max-width: 767.98px) {
    .import-export-toolbar__actions,
    .import-export-form {
        width: 100%;
        justify-content: stretch;
    }

    .import-export-btn,
    .import-file-trigger {
        width: 100%;
        max-width: 100%;
        justify-content: center;
    }

    .import-file-trigger__text {
        max-width: none;
    }
}

.rerelease-file-label {
    display: inline;
    margin-left: 3px;
    color: #64748b;
    font-size: 9px !important;
    font-weight: 500;
    line-height: 1;
    text-decoration: none !important;
    pointer-events: none;
    white-space: nowrap;
}

/* Support chat module */
.chat-top-dropdown .top-icon-btn,
.notification-dropdown .top-icon-btn {
    position: relative;
}

.chat-menu {
    width: 390px;
    max-height: 520px;
    overflow: hidden;
    border: 0;
    border-radius: 18px;
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.18);
}

.chat-menu-header {
    padding: 14px 16px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #eef2f7;
    background: #fff;
}

.chat-menu-header strong {
    display: block;
    color: #0f172a;
    font-size: 15px;
}

.chat-menu-header span {
    display: block;
    color: #64748b;
    font-size: 12px;
    margin-top: 2px;
}

.chat-menu-all-link {
    color: #0d6efd;
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.chat-conversation-list {
    max-height: 440px;
    overflow-y: auto;
    background: #fff;
}

.chat-conversation-item {
    border-bottom: 1px solid #f1f5f9 !important;
    white-space: normal !important;
    padding: 12px 14px !important;
    display: flex !important;
    align-items: center;
    gap: 12px;
    transition: background 0.18s ease;
}

.chat-conversation-item:hover,
.chat-conversation-item.unread {
    background: #f5f9ff !important;
}

.chat-list-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e0f2fe, #bfdbfe);
    color: #1d4ed8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 13px;
}

.chat-list-main {
    min-width: 0;
    flex: 1;
    display: block;
}

.chat-list-row {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
}

.chat-list-row strong {
    color: #0f172a;
    font-size: 13px;
}

.chat-list-row small {
    color: #94a3b8;
    font-size: 11px;
    flex: 0 0 auto;
}

.chat-list-preview-row {
    margin-top: 2px;
}

.chat-list-preview {
    color: #64748b;
    font-size: 12px;
}

.chat-list-unread {
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #0d6efd;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    padding: 0 6px;
    flex: 0 0 auto;
}

.chat-support-widget {
    position: fixed;
    right: 24px;
    bottom: 22px;
    width: 370px;
    max-width: calc(100vw - 28px);
    height: 590px;
    max-height: calc(100vh - 92px);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
    z-index: 1100;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(24px) scale(0.98);
    transform-origin: right bottom;
    transition: opacity 0.22s ease, transform 0.22s ease;
    border: 1px solid rgba(148, 163, 184, 0.24);
}

.chat-support-widget.open {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.chat-widget-header {
    background: #fff;
    color: #0f172a;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #eef2f7;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
    z-index: 2;
}

.chat-widget-person {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 10px;
}

.chat-widget-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d6efd, #6d5dfc);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 900;
    flex: 0 0 auto;
    box-shadow: 0 8px 18px rgba(13, 110, 253, 0.28);
}

.chat-widget-person-text {
    min-width: 0;
}

.chat-widget-title {
    font-weight: 900;
    font-size: 15px;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 210px;
}

.chat-widget-subtitle {
    font-size: 12px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 1px;
}

.chat-online-dot {
    width: 7px;
    height: 7px;
    display: inline-block;
    border-radius: 50%;
    background: #22c55e;
}

.chat-widget-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.chat-widget-icon-btn {
    width: 31px;
    height: 31px;
    border: none;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s ease, color 0.18s ease;
}

.chat-widget-icon-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.chat-widget-messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px 18px 14px;
    overflow-x: hidden;
    background:
        radial-gradient(circle at top left, rgba(13, 110, 253, 0.08), transparent 32%),
        linear-gradient(180deg, #f8fbff 0%, #f3f6fb 100%);
}

.chat-widget-empty {
    min-height: 100%;
    text-align: center;
    color: #64748b;
    font-size: 13px;
    padding: 55px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.chat-widget-empty i {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #e0edff;
    color: #0d6efd;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 4px;
}

.chat-widget-empty strong {
    color: #0f172a;
    font-size: 15px;
}

.chat-widget-empty span {
    font-size: 12px;
}

.chat-message-row {
    display: flex;
    margin-bottom: 12px;
    width: 100%;
    box-sizing: border-box;
}

.chat-message-row.mine {
    justify-content: flex-end;
}

.chat-message-row.theirs {
    justify-content: flex-start;
}

.chat-message-stack {
    max-width: calc(100% - 16px);
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.chat-message-row.mine .chat-message-stack {
    align-items: flex-end;
}

.chat-message-row.theirs .chat-message-stack {
    align-items: flex-start;
}

.chat-message-name {
    font-size: 11px;
    font-weight: 800;
    color: #64748b;
    margin: 0 0 4px 8px;
}

.chat-message-bubble {
    border-radius: 18px;
    padding: 9px 12px;
    max-width: 100%;
    box-sizing: border-box;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    background: #fff;
    color: #0f172a;
    border: 1px solid rgba(226, 232, 240, 0.92);
    overflow: hidden;
}

.chat-message-row.theirs .chat-message-bubble {
    border-bottom-left-radius: 7px;
}

.chat-message-row.mine .chat-message-bubble {
    background: linear-gradient(135deg, #0d6efd, #635bff);
    color: #fff;
    border-color: transparent;
    border-bottom-right-radius: 7px;
}

.chat-message-time {
    margin-top: 4px;
    font-size: 10px;
    color: #94a3b8;
    padding: 0 6px;
}

.chat-message-text {
    font-size: 13px;
    line-height: 1.42;
    word-break: break-word;
}

.chat-widget-form {
    padding: 10px 12px 12px;
    background: #fff;
    border-top: 1px solid #eef2f7;
}

.chat-widget-composer {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.chat-widget-form textarea {
    flex: 1;
    width: 100%;
    resize: none;
    border: none;
    border-radius: 18px;
    padding: 10px 12px;
    font-size: 13px;
    min-height: 38px;
    max-height: 110px;
    outline: none;
    background: #f1f5f9;
    color: #0f172a;
}

.chat-widget-form textarea:focus {
    background: #eef4ff;
    box-shadow: inset 0 0 0 1px rgba(13, 110, 253, 0.18);
}

.chat-attach-btn,
.chat-send-round {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    cursor: pointer;
    margin: 0;
}

.chat-attach-btn {
    background: #f1f5f9;
    color: #475569;
    border: none;
}

.chat-attach-btn:hover {
    background: #e2e8f0;
}

.chat-send-round {
    border: none;
    background: linear-gradient(135deg, #0d6efd, #635bff);
    color: #fff;
    box-shadow: 0 8px 16px rgba(13, 110, 253, 0.26);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.chat-send-round:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(13, 110, 253, 0.34);
}

.chat-send-round:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.chat-selected-files {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 8px;
}

.chat-selected-files span {
    background: #eef4ff;
    border-radius: 999px;
    color: #475569;
    padding: 4px 8px;
    max-width: 100%;
    font-size: 11px;
}

.chat-attachment {
    margin-top: 8px;
}

.chat-attachment-link {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    overflow: hidden;
    padding: 7px 9px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.06);
    color: inherit;
    text-decoration: none;
    font-size: 12px;
    max-width: 100%;
}

.chat-attachment-link span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-message-row.mine .chat-attachment-link {
    background: rgba(255,255,255,0.18);
    color: #fff;
}

.chat-attachment-link small {
    opacity: 0.72;
    white-space: nowrap;
}

.chat-image-preview img,
.chat-video-preview {
    display: block;
    max-width: 100%;
    width: auto;
    max-height: 165px;
    border-radius: 14px;
    margin-bottom: 7px;
    background: #e5e7eb;
    object-fit: cover;
}

.chat-toast {
    position: fixed;
    right: 24px;
    bottom: 630px;
    width: 345px;
    max-width: calc(100vw - 32px);
    background: #fff;
    color: #0f172a;
    border-radius: 16px;
    padding: 12px;
    z-index: 1110;
    cursor: pointer;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.22);
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    display: flex;
    gap: 10px;
    border: 1px solid rgba(226, 232, 240, 0.95);
}

.chat-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.chat-toast-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d6efd, #635bff);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.chat-toast-body {
    min-width: 0;
}

.chat-toast-title {
    font-weight: 900;
    font-size: 13px;
    margin-bottom: 2px;
}

.chat-toast-message {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Full messages page */
.messages-page .dashboard-hero {
    margin-bottom: 18px;
}

.messages-shell {
    min-height: calc(100vh - 175px);
    height: 720px;
    max-height: calc(100vh - 150px);
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    display: grid;
    grid-template-columns: 350px minmax(0, 1fr);
}

.messages-sidebar {
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
}

.messages-sidebar-header {
    padding: 18px;
    border-bottom: 1px solid #eef2f7;
}

.messages-sidebar-header h4 {
    font-weight: 900;
    color: #0f172a;
    margin: 0 0 10px;
}

.messages-search {
    position: relative;
}

.messages-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.messages-search input {
    width: 100%;
    border: none;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 10px 12px 10px 36px;
    font-size: 13px;
    outline: none;
}

.messages-search input:focus {
    background: #eef4ff;
    box-shadow: inset 0 0 0 1px rgba(13, 110, 253, 0.16);
}

.messages-conversation-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.messages-conversation-item {
    width: 100%;
    border: none;
    background: transparent;
    border-radius: 16px;
    padding: 12px 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    transition: background 0.16s ease;
}

.messages-conversation-item:hover,
.messages-conversation-item.active {
    background: #f1f6ff;
}

.messages-conversation-item.unread .messages-conversation-name,
.messages-conversation-item.unread .messages-conversation-preview {
    font-weight: 900;
    color: #0f172a;
}

.messages-conversation-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e0f2fe, #bfdbfe);
    color: #1d4ed8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    flex: 0 0 auto;
}

.messages-conversation-main {
    min-width: 0;
    flex: 1;
}

.messages-conversation-top,
.messages-conversation-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.messages-conversation-name {
    color: #0f172a;
    font-size: 14px;
}

.messages-conversation-time {
    color: #94a3b8;
    font-size: 11px;
    flex: 0 0 auto;
}

.messages-conversation-preview {
    color: #64748b;
    font-size: 12px;
}

.messages-unread-badge {
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #0d6efd;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 900;
    padding: 0 6px;
    flex: 0 0 auto;
}

.messages-chat-panel {
    display: flex;
    min-width: 0;
    flex-direction: column;
    background: linear-gradient(180deg, #f8fbff 0%, #f3f6fb 100%);
}

.messages-chat-header {
    height: 72px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.messages-chat-title {
    min-width: 0;
}

.messages-chat-title strong {
    color: #0f172a;
    font-size: 15px;
    font-weight: 900;
    display: block;
}

.messages-chat-title span {
    color: #64748b;
    font-size: 12px;
}

.messages-thread {
    flex: 1;
    overflow-y: auto;
    padding: 22px 26px;
}

.messages-thread-empty {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #64748b;
    padding: 24px;
}

.messages-thread-empty-inner {
    max-width: 340px;
}

.messages-thread-empty i {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #e0edff;
    color: #0d6efd;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 12px;
}

.messages-thread-empty h5 {
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 6px;
}

.messages-page-message-row {
    display: flex;
    margin-bottom: 14px;
}

.messages-page-message-row.mine {
    justify-content: flex-end;
}

.messages-page-message-row.theirs {
    justify-content: flex-start;
}

.messages-page-message-stack {
    max-width: min(70%, 680px);
    display: flex;
    flex-direction: column;
}

.messages-page-message-row.mine .messages-page-message-stack {
    align-items: flex-end;
}

.messages-page-message-name {
    font-size: 12px;
    font-weight: 900;
    color: #64748b;
    margin: 0 0 5px 10px;
}

.messages-page-message-bubble {
    border-radius: 20px;
    padding: 11px 14px;
    background: #fff;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.messages-page-message-row.theirs .messages-page-message-bubble {
    border-bottom-left-radius: 7px;
}

.messages-page-message-row.mine .messages-page-message-bubble {
    background: linear-gradient(135deg, #0d6efd, #635bff);
    color: #fff;
    border-color: transparent;
    border-bottom-right-radius: 7px;
}

.messages-page-message-text {
    line-height: 1.48;
    font-size: 14px;
    word-break: break-word;
}

.messages-page-message-time {
    color: #94a3b8;
    font-size: 11px;
    padding: 4px 8px 0;
}

.messages-composer {
    padding: 12px 16px 16px;
    background: #fff;
    border-top: 1px solid #e2e8f0;
}

.messages-composer-files {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.messages-composer-files span {
    background: #eef4ff;
    border-radius: 999px;
    color: #475569;
    padding: 4px 9px;
    font-size: 11px;
}

.messages-composer-row {
    display: flex;
    align-items: flex-end;
    gap: 9px;
}

.messages-composer textarea {
    flex: 1;
    min-height: 42px;
    max-height: 130px;
    resize: none;
    border: none;
    outline: none;
    border-radius: 21px;
    background: #f1f5f9;
    padding: 11px 14px;
    font-size: 14px;
}

.messages-composer textarea:focus {
    background: #eef4ff;
    box-shadow: inset 0 0 0 1px rgba(13, 110, 253, 0.16);
}

.messages-composer-attach,
.messages-composer-send {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.messages-composer-attach {
    background: #f1f5f9;
    color: #475569;
    cursor: pointer;
}

.messages-composer-send {
    background: linear-gradient(135deg, #0d6efd, #635bff);
    color: #fff;
    box-shadow: 0 8px 16px rgba(13, 110, 253, 0.23);
}

.messages-composer-send:disabled,
.messages-composer textarea:disabled,
.messages-composer-attach.disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

@media (max-width: 992px) {
    .messages-shell {
        grid-template-columns: 300px minmax(0, 1fr);
    }
}

@media (max-width: 768px) {
    .chat-menu {
        position: fixed !important;
        top: 70px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw;
        max-width: 100vw;
        margin: 0;
        transform: none !important;
        border-radius: 0 0 18px 18px;
        box-sizing: border-box;
    }

    .chat-support-widget {
        right: 12px;
        bottom: 12px;
        width: calc(100vw - 24px);
        height: 560px;
        max-height: calc(100vh - 24px);
    }

    .chat-toast {
        right: 12px;
        bottom: auto;
        top: 12px;
        width: calc(100vw - 24px);
    }

    .messages-shell {
        height: auto;
        min-height: 720px;
        max-height: none;
        grid-template-columns: 1fr;
    }

    .messages-sidebar {
        height: 310px;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }

    .messages-chat-panel {
        min-height: 520px;
    }

    .messages-thread {
        padding: 18px 14px;
    }

    .messages-page-message-stack {
        max-width: 86%;
    }
}

/* Super admin settings */
.settings-page .form-control-color {
    width: 76px;
    min-height: 44px;
    padding: 5px;
}

.settings-preview-card {
    position: sticky;
    top: 90px;
}

.settings-logo-preview {
    min-height: 150px;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
}

.settings-logo-preview img {
    max-width: 100%;
    max-height: 110px;
    object-fit: contain;
}


.settings-logo-section {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    background: #ffffff;
}

.settings-logo-preview.compact-preview {
    min-height: 110px;
}

.settings-logo-section .form-label {
    font-size: 13px;
    font-weight: 600;
}


/* Highlight Convert to Order button */
.btn-convert-order {
    background: #ff7a00 !important;
    border-color: #ff7a00 !important;
    color: #ffffff !important;
    box-shadow: 0 3px 10px rgba(255, 122, 0, 0.28) !important;
}

.btn-convert-order:hover,
.btn-convert-order:focus {
    background: #e66700 !important;
    border-color: #e66700 !important;
    color: #ffffff !important;
}

/* Realtime attachment uploader */
.realtime-upload-picker{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.realtime-upload-add{display:inline-flex;align-items:center;gap:8px;border:1px dashed #9ca3af;background:#fff;color:#374151;padding:10px 14px;border-radius:10px;cursor:pointer;font-weight:600;transition:.2s ease}
.realtime-upload-add:hover{border-color:var(--app-primary,#0075df);color:var(--app-primary,#0075df);background:#f8fbff}
.realtime-upload-add .plus-circle{width:24px;height:24px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:var(--app-primary,#0075df);color:#fff;font-size:18px;line-height:1}
.realtime-upload-help{font-size:12px;color:#6b7280}
.realtime-upload-list{display:flex;flex-direction:column;gap:8px;margin-top:10px}
.realtime-upload-item{display:flex;align-items:center;gap:10px;border:1px solid #e5e7eb;border-radius:10px;padding:10px;background:#fff}
.realtime-upload-item.uploaded{border-color:#bbf7d0;background:#f0fdf4}
.realtime-upload-item.upload-error{border-color:#fecaca;background:#fef2f2}
.realtime-upload-icon{width:34px;height:34px;border-radius:8px;background:#f3f4f6;display:flex;align-items:center;justify-content:center;flex:0 0 auto}
.realtime-upload-main{min-width:0;flex:1}
.realtime-upload-top{display:flex;justify-content:space-between;gap:12px;font-size:13px}
.realtime-upload-name{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.realtime-upload-size,.realtime-upload-status{font-size:11px;color:#6b7280}
.realtime-upload-progress{height:7px;margin:5px 0;background:#e5e7eb}
.realtime-upload-progress .progress-bar{font-size:0;background:var(--app-primary,#0075df)}
.realtime-upload-remove{border:0;background:transparent;color:#6b7280;width:30px;height:30px;border-radius:50%;flex:0 0 auto}
.realtime-upload-remove:hover{background:#fee2e2;color:#dc2626}
.chat-selected-files.realtime-upload-list,.messages-composer-files.realtime-upload-list{display:flex;flex-direction:column;gap:6px}
.chat-selected-files .realtime-upload-item,.messages-composer-files .realtime-upload-item{padding:7px 9px}

/* Professional realtime attachment gallery - 2026-06-18 */
.realtime-upload-shell{width:100%}
.realtime-upload-shell .realtime-upload-picker{display:block;width:100%}
.realtime-upload-shell.has-files .realtime-upload-picker{display:none}
.realtime-upload-add{width:100%;min-height:168px;display:flex;align-items:center;justify-content:center;text-align:center;border:2px dashed #b8c5d6;background:linear-gradient(180deg,#fbfdff 0%,#f5f8fc 100%);color:#334155;padding:22px;border-radius:16px;cursor:pointer;transition:border-color .2s ease,background .2s ease,box-shadow .2s ease,transform .2s ease}
.realtime-upload-add:hover,.realtime-upload-add:focus,.realtime-upload-add.is-dragging{border-color:var(--app-primary,#0075df);background:#f0f7ff;color:#0f172a;box-shadow:0 0 0 4px rgba(0,117,223,.09);outline:none}
.realtime-upload-add.is-dragging{transform:translateY(-1px)}
.realtime-upload-drop-content{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;pointer-events:none}
.realtime-upload-drop-icon{width:52px;height:52px;border-radius:16px;display:flex;align-items:center;justify-content:center;background:#e8f3ff;color:var(--app-primary,#0075df);font-size:27px;margin-bottom:5px}
.realtime-upload-drop-title{font-size:18px;font-weight:700;line-height:1.3;color:#172033}
.realtime-upload-drop-subtitle{font-size:15px;color:#64748b}
.realtime-upload-drop-subtitle strong{color:var(--app-primary,#0075df);font-weight:700}
.realtime-upload-drop-help{font-size:11px;color:#94a3b8;margin-top:5px}
.realtime-upload-help{display:none!important}

.realtime-upload-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(118px,118px));align-items:start;gap:14px;margin-top:12px;padding:2px;min-height:0}
.realtime-upload-list.is-dragging{border-radius:14px;box-shadow:0 0 0 3px rgba(0,117,223,.12);background:#f5faff}
.realtime-upload-item{display:block!important;width:118px;min-width:0;border:0!important;border-radius:14px!important;padding:0!important;background:transparent!important;overflow:visible;position:relative}
.realtime-upload-preview{height:118px;border:1px solid #dbe4ee;border-radius:14px;background:#eef3f8;overflow:hidden;position:relative;display:flex;align-items:center;justify-content:center;box-shadow:0 5px 14px rgba(15,23,42,.07)}
.realtime-upload-thumbnail{display:none;width:100%;height:100%;object-fit:cover}
.realtime-upload-thumbnail.is-visible{display:block}
.realtime-upload-file-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;color:#52637a;width:100%;height:100%;background:linear-gradient(145deg,#f8fafc,#e8eef5)}
.realtime-upload-file-placeholder i{font-size:34px;color:#6a7d95}
.realtime-upload-extension{max-width:78px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:#fff;border:1px solid #dbe4ee;border-radius:999px;padding:3px 8px;font-size:10px;font-weight:800;letter-spacing:.04em;color:#3b4b61}
.realtime-upload-item.is-image .realtime-upload-file-placeholder{display:none}
.realtime-upload-overlay{position:absolute;inset:0;background:rgba(15,23,42,.18);transition:background .18s ease}
.realtime-upload-item:hover .realtime-upload-overlay{background:rgba(15,23,42,.28)}
.realtime-upload-remove{position:absolute!important;left:50%;top:50%;transform:translate(-50%,-50%);z-index:4;width:38px!important;height:38px!important;border:0!important;border-radius:50%!important;display:flex!important;align-items:center;justify-content:center;background:rgba(255,255,255,.94)!important;color:#e11d48!important;box-shadow:0 5px 18px rgba(15,23,42,.24);font-size:17px;opacity:.98}
.realtime-upload-remove:hover{background:#fff!important;color:#be123c!important;transform:translate(-50%,-50%) scale(1.06)}
.realtime-upload-percent{position:absolute;left:8px;top:8px;z-index:3;border-radius:999px;padding:3px 7px;background:rgba(15,23,42,.72);color:#fff;font-size:9px;font-weight:700;line-height:1.2}
.realtime-upload-progress{position:absolute!important;left:0;right:0;bottom:0;height:5px!important;margin:0!important;border-radius:0!important;background:rgba(255,255,255,.6)!important;z-index:5;overflow:hidden}
.realtime-upload-progress span{display:block;height:100%;background:var(--app-primary,#0075df);transition:width .18s ease}
.realtime-upload-item.uploaded .realtime-upload-preview{border-color:#a7e8c0}
.realtime-upload-item.uploaded .realtime-upload-percent{background:rgba(5,150,105,.86)}
.realtime-upload-item.uploaded .realtime-upload-progress span{background:#10b981}
.realtime-upload-item.upload-error .realtime-upload-preview{border-color:#fecaca}
.realtime-upload-item.upload-error .realtime-upload-percent{background:rgba(220,38,38,.9)}
.realtime-upload-item.upload-error .realtime-upload-progress span{background:#ef4444}
.realtime-upload-meta{padding:7px 3px 0;text-align:left;min-width:0}
.realtime-upload-name{display:block;max-width:112px;font-size:10px!important;line-height:1.25;font-weight:700!important;color:#334155;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.realtime-upload-size{display:block;font-size:9px!important;line-height:1.3;color:#64748b!important;margin-top:2px}
.realtime-upload-status{display:block;font-size:8px!important;line-height:1.25;color:#7c8ba1!important;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.realtime-upload-item.uploaded .realtime-upload-status{color:#07855e!important}
.realtime-upload-item.upload-error .realtime-upload-status{color:#dc2626!important}
.realtime-upload-add-tile{width:118px;height:118px;border:2px dashed #b8c5d6;border-radius:14px;background:#f8fafc;color:#64748b;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;font-size:11px;font-weight:700;cursor:pointer;transition:.18s ease}
.realtime-upload-add-tile:hover,.realtime-upload-add-tile:focus{border-color:var(--app-primary,#0075df);background:#eef7ff;color:var(--app-primary,#0075df);outline:none;box-shadow:0 0 0 3px rgba(0,117,223,.08)}
.realtime-upload-add-tile:disabled{opacity:.45;cursor:not-allowed}
.realtime-upload-add-tile-icon{width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#e4edf7;font-size:19px}
.realtime-upload-add-tile:hover .realtime-upload-add-tile-icon{background:#d9ecff}

.chat-selected-files.realtime-upload-list,.messages-composer-files.realtime-upload-list{display:grid;grid-auto-flow:column;grid-auto-columns:84px;grid-template-columns:none;justify-content:start;overflow-x:auto;gap:9px;margin:0;padding:8px 10px 5px;max-width:100%}
.chat-selected-files .realtime-upload-item,.messages-composer-files .realtime-upload-item{width:84px!important;padding:0!important}
.chat-selected-files .realtime-upload-preview,.messages-composer-files .realtime-upload-preview{height:84px;border-radius:12px}
.chat-selected-files .realtime-upload-add-tile,.messages-composer-files .realtime-upload-add-tile{width:84px;height:84px;border-radius:12px;font-size:9px}
.chat-selected-files .realtime-upload-add-tile-icon,.messages-composer-files .realtime-upload-add-tile-icon{width:30px;height:30px;font-size:15px}
.chat-selected-files .realtime-upload-remove,.messages-composer-files .realtime-upload-remove{width:32px!important;height:32px!important;font-size:13px}
.chat-selected-files .realtime-upload-name,.messages-composer-files .realtime-upload-name{max-width:80px;font-size:8.5px!important}
.chat-selected-files .realtime-upload-size,.messages-composer-files .realtime-upload-size{font-size:8px!important}
.chat-selected-files .realtime-upload-status,.messages-composer-files .realtime-upload-status{display:none}
.chat-selected-files .realtime-upload-percent,.messages-composer-files .realtime-upload-percent{font-size:7px;left:5px;top:5px;padding:2px 5px}

@media (max-width:576px){
    .realtime-upload-add{min-height:142px;padding:18px 14px}
    .realtime-upload-drop-title{font-size:16px}
    .realtime-upload-list{grid-template-columns:repeat(auto-fill,minmax(96px,96px));gap:10px}
    .realtime-upload-item,.realtime-upload-add-tile{width:96px}
    .realtime-upload-preview,.realtime-upload-add-tile{height:96px}
    .realtime-upload-name{max-width:92px}
}
.chat-selected-files.realtime-upload-list span{background:transparent;border-radius:0;color:inherit;padding:0;max-width:none;font-size:inherit}
.chat-selected-files.realtime-upload-list .realtime-upload-extension{background:#fff;border-radius:999px;padding:3px 8px;max-width:58px;font-size:8px}
.chat-selected-files.realtime-upload-list .realtime-upload-add-tile-icon{background:#e4edf7;border-radius:50%}
.chat-selected-files.realtime-upload-list .realtime-upload-progress span{background:var(--app-primary,#0075df)}
.chat-selected-files.realtime-upload-list .uploaded .realtime-upload-progress span{background:#10b981}
.chat-selected-files.realtime-upload-list .upload-error .realtime-upload-progress span{background:#ef4444}
.realtime-upload-remove span{font-size:25px;line-height:1;font-weight:400;background:transparent!important;padding:0!important}
.realtime-upload-add-tile-icon{font-size:24px;font-weight:400;line-height:1}

/* 2026-06-19 notification and full-page chat refinements */
.notification-item-unread {
    background: #0075df;
    color: #ffffff;
}

.notification-item-unread:hover {
    background: #2f86dd;
}

.notification-read-btn:hover,
.notification-read-btn:focus {
    background: #ffffff;
    color: #2f86dd;
}

@media (min-width: 769px) {
    .messages-page {
        box-sizing: border-box;
        height: calc(100dvh - 70px);
        min-height: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .messages-page .dashboard-hero {
        flex: 0 0 auto;
        margin-bottom: 14px;
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .messages-page .messages-shell {
        flex: 1 1 auto;
        height: auto;
        min-height: 0;
        max-height: none;
    }

    .messages-page .messages-sidebar,
    .messages-page .messages-chat-panel {
        min-height: 0;
        overflow: hidden;
    }

    .messages-page .messages-thread,
    .messages-page .messages-conversation-list {
        min-height: 0;
        overscroll-behavior: contain;
    }

    .messages-page .messages-composer {
        position: relative;
        z-index: 5;
        flex: 0 0 auto;
        box-shadow: 0 -8px 22px rgba(15, 23, 42, 0.06);
    }
}

@media (max-width: 768px) {
    .messages-page {
        min-height: calc(100dvh - 70px);
    }

    .messages-chat-panel {
        overflow: hidden;
    }

    .messages-thread {
        min-height: 0;
        max-height: 62dvh;
    }

    .messages-composer {
        position: sticky;
        bottom: 0;
        z-index: 5;
        box-shadow: 0 -8px 22px rgba(15, 23, 42, 0.06);
    }
}


/* 2026-06-19 desktop activity toast and unread notification refinements */
.notification-item-unread {
    background: #3a8fe6;
    color: #ffffff;
    transition: none;
}

.notification-item-unread:hover,
.notification-item-unread:focus-within {
    background: #3a8fe6;
    color: #ffffff;
}

.notification-read-btn {
    background: #ffffff;
    color: #2b7ed1;
    border: 1px solid #ffffff;
    box-shadow: none;
}

.notification-read-btn:hover,
.notification-read-btn:focus {
    background: #ffffff;
    color: #2b7ed1;
    border-color: #ffffff;
    box-shadow: none;
}

@media (min-width: 769px) {
    .chat-toast {
        left: 24px;
        right: auto;
        bottom: 24px;
        top: auto;
        width: 350px;
        max-width: calc(100vw - 48px);
        transition: opacity .7s ease, transform .7s ease;
        transform: translateY(18px);
    }

    .chat-toast.show {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .chat-toast {
        display: none !important;
    }
}
#embroNavigationProgress{position:fixed;z-index:2147483647;left:0;right:0;top:0;height:3px;pointer-events:none;opacity:0;overflow:hidden;transition:opacity .12s ease}#embroNavigationProgress.show{opacity:1}#embroNavigationProgress span{display:block;width:35%;height:100%;background:var(--app-primary,#0075df);transform:translateX(-120%);animation:embro-navigation-progress .8s ease-in-out infinite}@keyframes embro-navigation-progress{0%{transform:translateX(-120%)}100%{transform:translateX(390%)}}

/* Shared responsive UI, professional prompts and light/dark themes. */
html, body { max-width: 100%; }
body { overflow-x: hidden; }
img, video, iframe, canvas, svg { max-width: 100%; }
.page-area, .main-content, .card, .modal-content, .dropdown-menu { min-width: 0; }
.text-break, td, th, p, a, label, .form-text, .dropdown-item { overflow-wrap: anywhere; word-break: break-word; }

.embro-ui-toast-stack { position: fixed; z-index: 2147483646; left: 18px; bottom: 18px; width: 360px; max-width: calc(100vw - 36px); display: grid; gap: 10px; }
.embro-ui-toast { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 13px 14px; color: #fff; background: #172033; border-radius: 13px; box-shadow: 0 18px 45px rgba(15,23,42,.28); opacity: 0; transform: translateY(12px); transition: .18s ease; }
.embro-ui-toast.show { opacity: 1; transform: none; }
.embro-ui-toast.is-success { background: #087f5b; }
.embro-ui-toast.is-error { background: #c92a2a; }
.embro-ui-toast.is-warning { background: #b45309; }
.embro-ui-toast button { border: 0; background: transparent; color: inherit; padding: 4px; }
.embro-ui-dialog { position: fixed; inset: 0; z-index: 2147483645; display: grid; place-items: center; padding: 18px; opacity: 0; transition: opacity .16s ease; box-sizing: border-box; overflow-y: auto; }
.embro-ui-dialog.show { opacity: 1; }
.embro-ui-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.58); backdrop-filter: blur(3px); }
.embro-ui-dialog-card { position: relative; width: min(430px, calc(100vw - 36px)); max-width: calc(100vw - 36px); padding: 26px; border-radius: 18px; background: #fff; color: #172033; box-shadow: 0 24px 70px rgba(15,23,42,.35); text-align: center; box-sizing: border-box; }
.embro-ui-dialog-icon { width: 48px; height: 48px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 50%; background: #e7f2ff; color: var(--app-primary,#0075df); font-size: 23px; }
.embro-ui-dialog-card h3 { margin: 0 0 8px; font-size: 20px; }
.embro-ui-dialog-card p { margin: 0 0 22px; color: #64748b; white-space: pre-wrap; }
.embro-ui-dialog-actions { display: flex; justify-content: center; gap: 10px; }

@media (max-width: 767.98px) {
    html, body, .main-wrapper, .container-fluid, .row, [class*="col-"] { max-width: 100% !important; }
    .page-area { width: 100%; padding-left: 10px !important; padding-right: 10px !important; overflow-x: hidden; }
    .table-responsive, .table-scroll { width: 100%; max-width: 100%; overflow: visible !important; }
    table.table { display: block; width: 100% !important; min-width: 0 !important; }
    table.table thead { display: none; }
    table.table tbody { display: grid; width: 100%; gap: 12px; }
    table.table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); width: 100%; padding: 8px; border: 1px solid #dfe6ef; border-radius: 12px; background: #fff; box-shadow: 0 3px 12px rgba(15,23,42,.05); }
    table.table tbody td { display: block; min-width: 0 !important; width: auto !important; max-width: none !important; white-space: normal !important; overflow-wrap: anywhere; word-break: break-word; padding: 8px; border: 0; font-size: 13px; line-height: 1.45; }
    table.table tbody td::before { content: attr(data-label); display: block; margin-bottom: 3px; color: #64748b; font-size: 10px; line-height: 1.25; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
    table.table tbody td[colspan] { grid-column: 1 / -1; }
    .table .btn, .table button, .table a.btn { max-width: 100%; white-space: normal; overflow-wrap: anywhere; padding: 6px 8px; font-size: 11px; }
    table.table tbody td:has(.btn) { display: flex; flex-direction: column; align-items: stretch; }
    table.table tbody td:has(.btn) .btn,
    table.table tbody td:has(.btn) form,
    table.table tbody td:has(.btn) form .btn { width: 100%; }
    table.table tbody td:has(.btn)::before { flex: 0 0 auto; }
    table.table tbody td .action-buttons { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: stretch; gap: 8px; width: 100%; }
    table.table tbody td .action-buttons > *, table.table tbody td .action-buttons form,
    table.table tbody td .action-buttons .btn { width: 100%; margin: 0 !important; }
    table.table tbody td[data-label="Action"],
    table.table tbody td[data-label="Actions"] { grid-column: 1 / -1; display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: stretch; gap: 8px; width: 100% !important; }
    table.table tbody td[data-label="Action"]::before,
    table.table tbody td[data-label="Actions"]::before,
    table.table tbody td[data-label="Action"] > .action-buttons,
    table.table tbody td[data-label="Actions"] > .action-buttons { grid-column: 1 / -1; }
    table.table tbody td[data-label="Action"] > .action-buttons,
    table.table tbody td[data-label="Actions"] > .action-buttons { grid-template-columns: repeat(2,minmax(0,1fr)); }
    table.table tbody td[data-label="Action"] > .btn,
    table.table tbody td[data-label="Actions"] > .btn,
    table.table tbody td[data-label="Action"] > form,
    table.table tbody td[data-label="Actions"] > form,
    table.table tbody td[data-label="Action"] > form .btn,
    table.table tbody td[data-label="Actions"] > form .btn { width: 100%; margin: 0 !important; }
    table.table tbody .client-main-row,
    table.table tbody .release-main-row { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom: 0; }
    table.table tbody .client-detail-row,
    table.table tbody .release-detail-row { grid-template-columns: 1fr; margin-top: -12px; border-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; box-shadow: 0 7px 12px rgba(15,23,42,.05); }
    table.table tbody .client-detail-row td,
    table.table tbody .release-detail-row td { grid-column: 1 / -1; padding-top: 4px; background: transparent !important; }
    .d-flex, .btn-group, .action-buttons { min-width: 0; }
    pre, code { white-space: pre-wrap; overflow-wrap: anywhere; }
    input, select, textarea, .form-control, .form-select { max-width: 100%; }
    .notification-dropdown { position: static; }
    .notification-menu { position: fixed !important; top: 64px !important; left: 10px !important; right: 10px !important; width: auto !important; max-width: none !important; max-height: calc(100dvh - 78px); margin: 0 !important; transform: none !important; border-radius: 14px; }
    .notification-header { gap: 8px; }
    .notification-header .btn { flex: 0 0 auto; white-space: nowrap; }
    .notification-list { max-height: calc(100dvh - 132px); overscroll-behavior: contain; }
    .notification-item { grid-template-columns: minmax(0,1fr); gap: 8px; padding: 11px 12px; }
    .notification-actions { justify-content: flex-start; }
    .notification-title, .notification-message, .notification-time { overflow-wrap: anywhere; word-break: break-word; }
    .topbar { width: 100%; max-width: 100%; padding-left: 10px !important; padding-right: 10px !important; }
    .topbar-right { gap: 5px !important; }
    .chat-selected-files.realtime-upload-list, .messages-composer-files.realtime-upload-list,
    .realtime-upload-list { grid-auto-flow: row; grid-template-columns: repeat(auto-fill,minmax(84px,84px)); overflow-x: hidden !important; white-space: normal; }
    .embro-ui-toast-stack { left: 10px; right: 10px; bottom: 10px; width: auto; max-width: none; }
    .embro-ui-dialog { padding: 12px; }
    .embro-ui-dialog-card { width: calc(100vw - 24px); max-width: calc(100vw - 24px); padding: 22px 16px; }
    .embro-ui-dialog-actions { width: 100%; flex-wrap: wrap; }
    .embro-ui-dialog-actions .btn { flex: 1 1 120px; min-width: 0; }
}
/* The APK updater is an in-app control and remains hidden in normal browsers. */
.embrogram-app-update-item { display: none; }
html.embrogram-native-android .embrogram-app-update-item { display: list-item; }

/* Phone and compact app layouts can report a CSS viewport wider than 767px. */
@media (max-width: 991.98px) {
    .chat-top-dropdown .chat-menu {
        position: fixed !important;
        inset: 70px 0 auto 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: 70px !important;
        width: 100vw !important;
        min-width: 100vw !important;
        max-width: 100vw !important;
        margin: 0 !important;
        transform: none !important;
        box-sizing: border-box !important;
        border-radius: 0 0 18px 18px;
    }

    body > .chat-menu.chat-menu-portaled {
        position: fixed !important;
        inset: 70px 0 auto 0 !important;
        display: block;
        width: 100vw !important;
        min-width: 100vw !important;
        max-width: 100vw !important;
        margin: 0 !important;
        transform: none !important;
        box-sizing: border-box !important;
        border-radius: 0 0 18px 18px;
        z-index: 2000;
    }

    .mail-page-toolbar > .d-flex,
    .mail-top-filter {
        width: 100% !important;
        max-width: 100% !important;
    }

    .mail-page-toolbar > .d-flex {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .mail-top-filter {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        flex: 0 0 auto !important;
    }

    .mail-top-filter > .col-12:first-of-type,
    .mail-top-filter > .col-12:nth-of-type(2),
    .mail-top-filter > .col-7,
    .mail-top-filter > .col-5 {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    .mail-top-filter input.form-control,
    .mail-top-filter select.form-select,
    .mail-top-filter .mail-folder-live-select,
    .mail-top-filter .choices,
    .mail-top-filter .choices__inner,
    .mail-top-filter .ts-wrapper,
    .mail-top-filter .searchable-select,
    .mail-top-filter .advanced-select,
    .mail-top-filter .advanced-select-input {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* Fallback prevents the native select and its searchable replacement appearing together. */
select.advanced-select-native {
    display: none !important;
}
/* Two-option Pay Now selector: dropdown-only, intentionally not searchable. */
.advanced-select-compact .advanced-select-input,
.advanced-select-compact .advanced-select-option {
    font-size: 11px !important;
}
.advanced-select-compact .advanced-select-input {
    cursor: pointer;
    text-overflow: ellipsis;
}

/*
 * Tablet and laptop tables keep the desktop table design. Content uses the
 * available horizontal space first and wraps onto another line when needed.
 */
@media (min-width: 768px) and (max-width: 1600px) {
    .card-box,
    .table-card,
    .admin-users-table-wrap,
    .table-responsive,
    .table-scroll {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .admin-users-table-wrap,
    .table-responsive,
    .table-scroll {
        overflow-x: auto !important;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        scrollbar-gutter: stable;
    }

    .table-responsive > table.table,
    .table-scroll > table.table {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        table-layout: auto !important;
    }

    /* Only genuinely wide lists need a wider scrolling canvas. */
    .table-responsive > table.table:has(thead th:nth-child(7)),
    .table-scroll > table.table:has(thead th:nth-child(7)) {
        min-width: 1250px !important;
        max-width: none !important;
    }

    table.table th,
    table.table td {
        min-width: 88px !important;
        max-width: none;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: anywhere !important;
        line-height: 1.35;
    }

    .admin-users-table {
        width: 100% !important;
        min-width: 1280px !important;
        table-layout: fixed !important;
    }

    .admin-users-table th,
    .admin-users-table td {
        min-width: 0 !important;
        white-space: normal !important;
        vertical-align: top;
    }

    .admin-users-table th:nth-child(1),
    .admin-users-table td:nth-child(1) { width: 55px; }
    .admin-users-table th:nth-child(2),
    .admin-users-table td:nth-child(2) { width: 170px; }
    .admin-users-table th:nth-child(3),
    .admin-users-table td:nth-child(3) { width: 150px; }
    .admin-users-table th:nth-child(4),
    .admin-users-table td:nth-child(4) { width: 230px; }
    .admin-users-table th:nth-child(5),
    .admin-users-table td:nth-child(5) { width: 145px; }
    .admin-users-table th:nth-child(6),
    .admin-users-table td:nth-child(6) { width: 115px; }

    .admin-users-table .permissions-column {
        width: 320px;
        min-width: 0 !important;
        max-width: none;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: anywhere !important;
        line-height: 1.45;
    }

    .admin-users-table .actions-column {
        width: 170px;
        min-width: 150px !important;
    }

    .admin-users-table .action-buttons {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start;
    }

    table.table .btn,
    table.table button,
    table.table a.btn {
        max-width: 100%;
        white-space: nowrap !important;
        word-break: keep-all !important;
        overflow-wrap: normal !important;
        padding-left: 7px !important;
        padding-right: 7px !important;
    }

    table.table tbody td:has(.btn),
    table.table tbody td[data-label="Download"],
    table.table tbody td[data-label="Preview"],
    table.table tbody td[data-label="Edit"],
    table.table tbody td[data-label="Delete"] {
        min-width: 102px !important;
    }

    /* Common wide-list columns need enough room for whole words before wrap. */
    table.table:not(.admin-users-table) th:first-child,
    table.table:not(.admin-users-table) td:first-child { min-width: 135px !important; }
    table.table:not(.admin-users-table) th:nth-child(2),
    table.table:not(.admin-users-table) td:nth-child(2) { min-width: 130px !important; }
    table.table:not(.admin-users-table) th:nth-child(6),
    table.table:not(.admin-users-table) td:nth-child(6) { min-width: 130px !important; }
}

@media (max-width: 767.98px) {
    table.table .btn,
    table.table button,
    table.table a.btn {
        white-space: nowrap !important;
        word-break: keep-all !important;
        overflow-wrap: normal !important;
        font-size: 10px !important;
    }
}
