 :root {
    --sd-bg: #eef2f7;
    --sd-bg-accent: radial-gradient(circle at top right, rgba(85, 110, 230, 0.12), transparent 28%), linear-gradient(180deg, #f6f8fc 0%, #edf2f7 100%);
    --sd-surface: #f9fbfd;
    --sd-surface-2: #f1f5f9;
    --sd-surface-3: #e9eef5;
    --sd-border: rgba(20, 33, 61, 0.08);
    --sd-text: #243045;
    --sd-muted: #6f7d95;
    --sd-primary: #556ee6;
    --sd-primary-soft: rgba(85, 110, 230, 0.12);
    --sd-success: #34c38f;
    --sd-warning: #f1b44c;
    --sd-info: #50a5f1;
    --sd-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
    --sd-sidebar: linear-gradient(180deg, #2c3348 0%, #242b3d 100%);
    --sd-sidebar-text: rgba(255, 255, 255, 0.74);
    --sd-sidebar-active: #ffffff;
}

html[data-theme="dark"] {
    --sd-bg: #141a2f;
    --sd-bg-accent: radial-gradient(circle at top right, rgba(111, 134, 255, 0.18), transparent 28%), linear-gradient(180deg, #141a2f 0%, #101625 100%);
    --sd-surface: #1d2338;
    --sd-surface-2: #252c44;
    --sd-surface-3: #2d3550;
    --sd-border: rgba(255, 255, 255, 0.08);
    --sd-text: #edf2f7;
    --sd-muted: #9aa5c3;
    --sd-primary: #6f86ff;
    --sd-primary-soft: rgba(111, 134, 255, 0.18);
    --sd-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
    --sd-sidebar: linear-gradient(180deg, #111827 0%, #0f172a 100%);
    --sd-sidebar-text: rgba(255, 255, 255, 0.7);
    --sd-sidebar-active: #ffffff;
}

html {
    font-size: 14px;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 15px;
    }
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--sd-bg-accent);
    color: var(--sd-text);
    font-family: Inter, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

button, input {
    outline: none;
}

.app-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    grid-template-rows: 82px 1fr;
    grid-template-areas:
        "sidebar topbar"
        "sidebar content";
    min-height: 100vh;
}

.topbar {
    grid-area: topbar;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 1.5rem;
    background: rgba(249, 251, 253, 0.82);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--sd-border);
    position: sticky;
    top: 0;
    z-index: 30;
}

html[data-theme="dark"] .topbar {
    background: rgba(29, 35, 56, 0.88);
}

.sidebar {
    grid-area: sidebar;
    background: var(--sd-sidebar);
    color: var(--sd-sidebar-text);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: var(--sd-shadow);
    z-index: 35;
}

.page-content {
    grid-area: content;
    padding: 1.5rem;
}

.brand {
    min-width: 0;
}

.brand-mark-wrap {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(85, 110, 230, 0.16), rgba(241, 180, 76, 0.18));
    border: 1px solid var(--sd-border);
    overflow: hidden;
    flex: 0 0 auto;
}

.brand-mark {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.brand-copy {
    min-width: 0;
}

.brand-wordmark {
    height: 32px;
    width: auto;
    max-width: min(40vw, 260px);
    object-fit: contain;
    display: block;
}

.brand-mark-dark,
.brand-wordmark-dark {
    display: none;
}

html[data-theme="dark"] .brand-mark-light,
html[data-theme="dark"] .brand-wordmark-light {
    display: none;
}

html[data-theme="dark"] .brand-mark-dark,
html[data-theme="dark"] .brand-wordmark-dark {
    display: block;
}

.brand-subtitle {
    color: var(--sd-muted);
    font-size: 0.76rem;
    margin-top: 0.15rem;
    letter-spacing: 0.02em;
}

.nav-toggle,
.theme-toggle {
    border: 1px solid var(--sd-border);
    background: var(--sd-surface-2);
    color: var(--sd-text);
    border-radius: 14px;
    padding: 0.65rem 0.85rem;
}

.search-box {
    min-width: 320px;
    padding: 0.8rem 1rem;
    border-radius: 16px;
    background: var(--sd-surface-2);
    border: 1px solid var(--sd-border);
    gap: 0.75rem;
}

.search-box input {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--sd-text);
}

.search-box input::placeholder {
    color: var(--sd-muted);
}

.profile-chip {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: rgba(255,255,255,0.14);
    border-radius: 16px;
    padding: 0.35rem 0.45rem 0.35rem 0.85rem;
    border: 1px solid var(--sd-border);
}

.profile-chip-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.profile-chip-text strong {
    color: var(--sd-text);
    font-size: 0.92rem;
}

.profile-chip-text span {
    color: var(--sd-muted);
    font-size: 0.78rem;
}

.profile-chip-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--sd-primary), #34c38f);
    color: #fff;
    font-weight: 700;
}

.sidebar-brand-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 18px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.08);
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
}

.sidebar-brand-text strong {
    color: #fff;
    font-size: 1rem;
}

.sidebar-brand-text span {
    color: rgba(255,255,255,0.66);
    font-size: 0.76rem;
}

.sidebar-brand-badge {
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.28rem 0.55rem;
    font-size: 0.74rem;
}

.sidebar-section-label {
    color: rgba(255,255,255,0.45);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0 0.85rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    color: var(--sd-sidebar-text);
    padding: 0.95rem 1rem;
    border-radius: 14px;
    transition: all 0.2s ease;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(255,255,255,0.08);
    color: var(--sd-sidebar-active);
}

.sidebar-card {
    margin-top: auto;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: 1rem;
}

.sidebar-card-label {
    color: rgba(255,255,255,0.6);
    font-size: 0.78rem;
    margin-bottom: 0.5rem;
}

.sidebar-card h5 {
    color: #fff;
    margin-bottom: 0.35rem;
}

.sidebar-card span {
    color: rgba(255,255,255,0.72);
    font-size: 0.84rem;
}

.hero-panel,
.dashboard-card,
.metric-card {
    background: rgba(249, 251, 253, 0.86);
    border: 1px solid var(--sd-border);
    box-shadow: var(--sd-shadow);
}

html[data-theme="dark"] .hero-panel,
html[data-theme="dark"] .dashboard-card,
html[data-theme="dark"] .metric-card {
    background: rgba(29, 35, 56, 0.92);
}

.hero-panel {
    border-radius: 24px;
    padding: 1.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.hero-panel h1 {
    font-size: clamp(1.8rem, 2.8vw, 2.8rem);
    line-height: 1.15;
    margin: 0.65rem 0 0.9rem;
}

.hero-panel p,
.section-header p,
.metric-card p,
.pipeline-step span,
.stock-list li span {
    color: var(--sd-muted);
}

.badge-soft {
    display: inline-flex;
    align-items: center;
    padding: 0.42rem 0.8rem;
    border-radius: 999px;
    background: var(--sd-primary-soft);
    color: var(--sd-primary);
    font-weight: 600;
    font-size: 0.82rem;
}

.hero-actions {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.stats-grid,
.content-grid,
.pipeline-grid,
.quick-actions {
    display: grid;
    gap: 1rem;
}

.stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.content-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wide-card {
    grid-column: span 2;
}

.metric-card,
.dashboard-card {
    border-radius: 22px;
    padding: 1.25rem;
}

.metric-card {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.metric-card h3,
.pipeline-step h3 {
    margin: 0.2rem 0;
}

.metric-card span {
    color: var(--sd-success);
    font-size: 0.84rem;
    font-weight: 600;
}

.metric-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: var(--sd-primary-soft);
    color: var(--sd-primary);
    font-size: 1.25rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-header h4 {
    margin: 0;
}

.section-header p {
    margin: 0.35rem 0 0;
}

.section-header a {
    color: var(--sd-primary);
    text-decoration: none;
    font-weight: 600;
}

.pipeline-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pipeline-step {
    background: var(--sd-surface-2);
    border: 1px solid var(--sd-border);
    border-radius: 18px;
    padding: 1rem;
}

.quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quick-actions a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    color: var(--sd-text);
    padding: 1rem;
    border-radius: 18px;
    background: var(--sd-surface-2);
    border: 1px solid var(--sd-border);
    font-weight: 600;
}

.stock-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.stock-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.95rem 0;
    border-bottom: 1px solid var(--sd-border);
}

.stock-list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.stock-list li strong {
    color: var(--sd-warning);
}

.order-table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--sd-text);
    --bs-table-border-color: var(--sd-border);
}

.order-table thead th {
    color: var(--sd-muted);
    font-weight: 600;
    border-bottom-width: 1px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.42rem 0.72rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.status-pill.warning { background: rgba(241,180,76,0.16); color: #d8890a; }
.status-pill.info { background: rgba(80,165,241,0.16); color: #2a86d4; }
.status-pill.primary { background: rgba(85,110,230,0.16); color: var(--sd-primary); }
.status-pill.success { background: rgba(52,195,143,0.16); color: #1d9f70; }

.theme-icon-dark {
    display: none;
}

html[data-theme="dark"] .theme-icon-light {
    display: none;
}

html[data-theme="dark"] .theme-icon-dark {
    display: inline-block;
}

.page-overlay {
    display: none;
}

@media (max-width: 1199.98px) {
    .stats-grid,
    .content-grid,
    .pipeline-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wide-card {
        grid-column: span 2;
    }
}

@media (max-width: 991.98px) {
    .app-shell {
        grid-template-columns: 1fr;
        grid-template-rows: 82px 1fr;
        grid-template-areas:
            "topbar"
            "content";
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .page-overlay {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        z-index: 20;
    }

    body.sidebar-open .page-overlay {
        display: block;
    }

    .search-box {
        min-width: 220px;
    }
}

@media (max-width: 767.98px) {
    .topbar,
    .page-content {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero-panel,
    .section-header,
    .hero-actions,
    .metric-card,
    .profile-chip {
        flex-direction: column;
        align-items: flex-start;
    }

    .stats-grid,
    .content-grid,
    .pipeline-grid,
    .quick-actions {
        grid-template-columns: 1fr;
    }

    .wide-card {
        grid-column: auto;
    }

    .search-box,
    .profile-chip-text,
    .brand-subtitle {
        display: none !important;
    }

    .theme-toggle-label {
        display: none;
    }

    .brand-wordmark {
        height: 24px;
        max-width: 160px;
    }
}

/* ===============================
   SYSTEM ADMIN ACCESS PAGE CSS
   =============================== */

/* Page container */
.system-admin-container {
    padding: 24px;
}

/* Card styling */
.admin-card {
    border-radius: 14px;
    border: 1px solid #e6e9ef;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

    .admin-card:hover {
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
    }

/* Header */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.admin-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
}

/* Tabs */
.admin-tabs .nav-link {
    border-radius: 10px;
    margin-right: 8px;
    color: #6c757d;
    font-weight: 500;
    padding: 10px 18px;
    transition: 0.2s;
}

    .admin-tabs .nav-link.active {
        background: linear-gradient(135deg, #556ee6, #34c38f);
        color: #fff !important;
        box-shadow: 0 4px 10px rgba(85, 110, 230, 0.3);
    }

    .admin-tabs .nav-link:hover {
        background: #eef2ff;
    }

/* Table styling */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

    .admin-table th {
        background: #f7f9fc;
        font-weight: 600;
        color: #495057;
        padding: 12px;
        border-bottom: 1px solid #e6e9ef;
    }

    .admin-table td {
        padding: 12px;
        border-bottom: 1px solid #f1f3f6;
        vertical-align: middle;
    }

/* Buttons */
.btn-admin {
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
}

.btn-admin-primary {
    background: linear-gradient(135deg, #556ee6, #4054b2);
    color: #fff;
    border: none;
}

    .btn-admin-primary:hover {
        background: linear-gradient(135deg, #4054b2, #2f3c88);
    }

.btn-admin-success {
    background: linear-gradient(135deg, #34c38f, #1fa971);
    color: #fff;
    border: none;
}

    .btn-admin-success:hover {
        background: linear-gradient(135deg, #1fa971, #178a5c);
    }

.btn-admin-danger {
    background: linear-gradient(135deg, #f46a6a, #d94c4c);
    color: #fff;
    border: none;
}

/* Form inputs */
.admin-input {
    border-radius: 8px;
    border: 1px solid #dcdfe6;
    padding: 8px 12px;
    font-size: 14px;
    width: 100%;
    transition: 0.2s;
}

    .admin-input:focus {
        border-color: #556ee6;
        box-shadow: 0 0 0 2px rgba(85, 110, 230, 0.15);
        outline: none;
    }

/* Checkbox tree (for role mapping) */
.permission-tree {
    max-height: 350px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #e6e9ef;
    border-radius: 10px;
    background: #fafbff;
}

.permission-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

    .permission-item input {
        margin-right: 10px;
    }

/* Bulk upload cards */
.upload-card {
    border-radius: 12px;
    border: 1px dashed #cfd6e4;
    padding: 20px;
    text-align: center;
    background: #f9fbff;
    transition: 0.2s;
}

    .upload-card:hover {
        border-color: #556ee6;
        background: #f1f4ff;
    }

.upload-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

.upload-btn {
    margin-top: 10px;
}

/* Status badges */
.badge-active {
    background: #34c38f;
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
}

.badge-inactive {
    background: #f1f3f6;
    color: #6c757d;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
}

/* Search bar */
.admin-search {
    border-radius: 10px;
    border: 1px solid #e6e9ef;
    padding: 8px 14px;
    width: 250px;
}

/* Dark mode support (if toggle applied) */
body.dark-mode .admin-card {
    background: #2a3042;
    border-color: #32394e;
}

body.dark-mode .admin-title {
    color: #e9edf4;
}

body.dark-mode .admin-table th {
    background: #2f354b;
    color: #cfd6e4;
}

body.dark-mode .admin-table td {
    border-bottom: 1px solid #32394e;
    color: #dcdfe6;
}

body.dark-mode .admin-input {
    background: #2f354b;
    border-color: #3c445a;
    color: #fff;
}

body.dark-mode .permission-tree {
    background: #2f354b;
    border-color: #3c445a;
}

body.dark-mode .upload-card {
    background: #2f354b;
    border-color: #3c445a;
}

body.dark-mode .admin-tabs .nav-link.active {
    background: linear-gradient(135deg, #556ee6, #34c38f);
}

/* Smooth transitions */
* {
    transition: all 0.15s ease-in-out;
}
/* =========================================================
   SYSTEM ADMIN ACCESS SETUP ENHANCEMENTS
   ========================================================= */

.system-admin-page {
    padding: 0.5rem 0 1.5rem;
}

.page-header-card,
.glass-card,
.metric-card,
.mini-card,
.upload-card,
.mapping-panel {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(95, 108, 141, 0.16);
    border-radius: 24px;
    box-shadow: 0 20px 45px rgba(30, 41, 59, 0.08);
}

html[data-theme="dark"] .page-header-card,
html[data-theme="dark"] .glass-card,
html[data-theme="dark"] .metric-card,
html[data-theme="dark"] .mini-card,
html[data-theme="dark"] .upload-card,
html[data-theme="dark"] .mapping-panel {
    background: rgba(29, 35, 56, 0.92);
}

.page-header-card,
.glass-card {
    padding: 1.5rem;
}

.metric-card,
.mini-card,
.upload-card,
.mapping-panel {
    padding: 1.25rem;
    height: 100%;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(85, 110, 230, 0.12);
    color: var(--sd-primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.page-title {
    font-size: clamp(1.8rem, 2.2vw, 2.7rem);
    font-weight: 700;
    color: var(--sd-text);
}

.page-subtitle,
.section-subtitle,
.sub-cell,
.role-meta,
.metric-trend,
.upload-card p,
.check-item p,
.mapping-box li,
.mini-card li {
    color: var(--sd-muted);
}

.section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--sd-text);
}

.metric-label {
    display: block;
    font-size: 0.88rem;
    color: var(--sd-muted);
    margin-bottom: 0.35rem;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    color: var(--sd-text);
    margin-bottom: 0.45rem;
}

.checklist-grid,
.permission-grid,
.quick-action-list {
    display: grid;
    gap: 1rem;
}

.checklist-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.check-item,
.permission-card,
.mapping-box {
    padding: 1rem;
    border-radius: 20px;
    background: var(--sd-surface-2);
    border: 1px solid rgba(85, 110, 230, 0.08);
}

.check-item {
    display: flex;
    gap: 1rem;
}

.check-item h3,
.permission-card h3,
.upload-card h3,
.mapping-panel h3,
.mapping-box h4,
.mini-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--sd-text);
}

.check-icon,
.upload-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    background: var(--sd-success);
    flex-shrink: 0;
}

.progress-item .check-icon {
    background: var(--sd-warning);
}

.upload-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: rgba(85, 110, 230, 0.12);
    color: var(--sd-primary);
    margin-bottom: 1rem;
}

.quick-action-btn {
    width: 100%;
    text-align: left;
    padding: 0.95rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(95, 108, 141, 0.16);
    background: var(--sd-surface-2);
    color: var(--sd-text);
    transition: all 0.2s ease;
}

.quick-action-btn:hover,
.quick-action-btn:focus {
    transform: translateY(-1px);
    border-color: rgba(85, 110, 230, 0.35);
    background: #fff;
}

html[data-theme="dark"] .quick-action-btn:hover,
html[data-theme="dark"] .quick-action-btn:focus {
    background: rgba(255,255,255,0.03);
}

.access-pills {
    gap: 0.75rem;
}

.access-pills .nav-link {
    border: 1px solid rgba(95, 108, 141, 0.16);
    background: rgba(255, 255, 255, 0.72);
    color: var(--sd-text);
    font-weight: 600;
    border-radius: 14px;
    padding: 0.75rem 1.1rem;
}

.access-pills .nav-link.active {
    background: linear-gradient(135deg, #556ee6 0%, #667eea 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 10px 22px rgba(85, 110, 230, 0.22);
}

.toolbar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.toolbar-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-soft-primary {
    background: linear-gradient(135deg, #556ee6 0%, #667eea 100%);
    border-color: transparent;
    color: #fff;
    padding-inline: 1rem;
}

.btn-soft-primary:hover,
.btn-soft-primary:focus {
    color: #fff;
    opacity: 0.96;
}

.btn-glass {
    border-color: rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.18);
    color: var(--sd-text);
}

.custom-table {
    --bs-table-bg: transparent;
}

.custom-table thead th {
    color: var(--sd-muted);
    font-weight: 600;
    border-bottom-width: 1px;
    background: transparent;
}

.custom-table td,
.custom-table th {
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-color: rgba(95, 108, 141, 0.12);
    vertical-align: middle;
}

.status-badge,
.role-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-badge.active {
    background: rgba(52, 195, 143, 0.14);
    color: #118a5a;
}

.status-badge.restricted {
    background: rgba(85, 110, 230, 0.14);
    color: #4057c7;
}

.status-badge.draft,
.role-pill {
    background: rgba(85, 110, 230, 0.12);
    color: var(--sd-primary);
}

.selected-card {
    border-color: rgba(85, 110, 230, 0.35);
    box-shadow: 0 14px 30px rgba(85, 110, 230, 0.12);
}

.permission-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.permission-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.permission-tags span {
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(85, 110, 230, 0.12);
    font-size: 0.82rem;
    color: var(--sd-text);
}

html[data-theme="dark"] .permission-tags span {
    background: rgba(255,255,255,0.04);
}

.mapping-role {
    padding: 0.85rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(95, 108, 141, 0.16);
    background: var(--sd-surface-2);
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--sd-text);
}

.active-role {
    background: rgba(85, 110, 230, 0.12);
    border-color: rgba(85, 110, 230, 0.3);
    color: var(--sd-primary);
}

.mapping-box ul,
.mini-card ul {
    margin-bottom: 0;
    padding-left: 1.1rem;
}

.upload-actions {
    display: flex;
    gap: 1rem;
    font-weight: 600;
    flex-wrap: wrap;
}

.form-label-soft {
    font-weight: 600;
    color: var(--sd-text);
    margin-bottom: 0.45rem;
}

.admin-input {
    border-radius: 14px;
    border: 1px solid rgba(95, 108, 141, 0.18);
    background: rgba(255, 255, 255, 0.88);
    color: var(--sd-text);
    padding: 0.82rem 0.95rem;
}

html[data-theme="dark"] .admin-input {
    background: rgba(255,255,255,0.04);
}

.admin-input:focus {
    border-color: rgba(85, 110, 230, 0.55);
    box-shadow: 0 0 0 0.22rem rgba(85, 110, 230, 0.16);
}

.check-stack {
    display: grid;
    gap: 0.8rem;
}

.check-choice {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.85rem 0.9rem;
    border-radius: 14px;
    background: rgba(255,255,255,0.55);
    border: 1px solid rgba(95, 108, 141, 0.14);
    color: var(--sd-text);
}

html[data-theme="dark"] .check-choice {
    background: rgba(255,255,255,0.03);
}

.check-choice input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--sd-primary);
}

.text-danger.small:empty {
    display: none;
}

.sd-page-loader {
    position: fixed;
    inset: 0;
    background: rgba(10, 18, 35, 0.44);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1080;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.sd-page-loader.show {
    opacity: 1;
    visibility: visible;
}

.sd-page-loader-card {
    width: min(420px, calc(100vw - 2rem));
    background: rgba(255,255,255,0.96);
    border-radius: 26px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.22);
}

html[data-theme="dark"] .sd-page-loader-card {
    background: rgba(29, 35, 56, 0.96);
}

.sd-loader-orbit {
    width: 74px;
    height: 74px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    border: 4px solid rgba(85, 110, 230, 0.12);
    border-top-color: var(--sd-primary);
    display: grid;
    place-items: center;
    animation: supplydesk-spin 0.9s linear infinite;
    color: var(--sd-primary);
    font-size: 1.35rem;
}

keyframes supplydesk-spin {
    to { transform: rotate(360deg); }
}

.sd-toast-stack {
    position: fixed;
    top: 1rem;
    right: 1rem;
    display: grid;
    gap: 0.75rem;
    z-index: 1090;
    width: min(360px, calc(100vw - 2rem));
}

.sd-toast {
    display: grid;
    grid-template-columns: 42px 1fr 24px;
    gap: 0.85rem;
    align-items: start;
    background: rgba(255,255,255,0.98);
    border: 1px solid rgba(95,108,141,0.16);
    border-radius: 18px;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.14);
    padding: 0.95rem 1rem;
    transform: translateY(-8px);
    opacity: 0;
    transition: all 0.22s ease;
}

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

html[data-theme="dark"] .sd-toast {
    background: rgba(29,35,56,0.98);
}

.sd-toast-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #fff;
}

.sd-toast-success .sd-toast-icon { background: linear-gradient(135deg, #34c38f, #169b67); }
.sd-toast-error .sd-toast-icon { background: linear-gradient(135deg, #f46a6a, #d94848); }
.sd-toast-warning .sd-toast-icon { background: linear-gradient(135deg, #f1b44c, #ce8c15); }
.sd-toast-info .sd-toast-icon { background: linear-gradient(135deg, #50a5f1, #2b6cb0); }

.sd-toast-content strong {
    display: block;
    color: var(--sd-text);
    margin-bottom: 0.2rem;
}

.sd-toast-content div {
    color: var(--sd-muted);
    font-size: 0.9rem;
}

.sd-toast-close {
    border: 0;
    background: transparent;
    color: var(--sd-muted);
    padding: 0;
}

@media (max-width: 991.98px) {
    .page-header-card,
    .glass-card {
        padding: 1.25rem;
    }
}

/* =========================================================
   FINAL UI FIXES
   ========================================================= */

.form-select.admin-input,
textarea.admin-input,
input[type="file"].admin-input {
    min-height: 50px;
}

textarea.admin-input {
    resize: vertical;
}

input[type="file"].admin-input {
    padding: 0.55rem 0.75rem;
    line-height: 1.4;
}

input[type="file"].admin-input::file-selector-button {
    border: 0;
    margin-right: 0.8rem;
    padding: 0.58rem 0.9rem;
    border-radius: 10px;
    background: rgba(85, 110, 230, 0.12);
    color: var(--sd-primary);
    font-weight: 600;
}

html[data-theme="dark"] input[type="file"].admin-input::file-selector-button {
    background: rgba(111, 134, 255, 0.18);
    color: #dce4ff;
}

.admin-input::placeholder,
.form-select.admin-input,
textarea.admin-input::placeholder {
    color: var(--sd-muted);
}

.form-select.admin-input {
    background-position: right 1rem center;
}

.input-validation-error {
    border-color: rgba(244, 106, 106, 0.72) !important;
    box-shadow: 0 0 0 0.18rem rgba(244, 106, 106, 0.12) !important;
}

.field-validation-error,
.validation-summary-errors {
    color: #d94848;
    font-size: 0.84rem;
    font-weight: 500;
}

.btn[disabled],
.btn.is-loading {
    opacity: 0.75;
    pointer-events: none;
}

.upload-actions a {
    text-decoration: none;
    color: var(--sd-primary);
}

.upload-actions a:hover {
    text-decoration: underline;
}

.quick-action-btn,
.mapping-role,
.check-choice,
.upload-card,
.mini-card,
.permission-card,
.sidebar-link,
.btn,
.admin-input {
    transition: all 0.18s ease;
}

@media (max-width: 767.98px) {
    .topbar-right {
        gap: 0.65rem !important;
    }

    .profile-chip {
        padding-right: 0.65rem;
    }

    .access-pills {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.25rem;
    }

    .access-pills .nav-item {
        flex: 0 0 auto;
    }
}

.module-page .page-header-card.compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.action-btn-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.action-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    padding: 0;
    border: 1px solid transparent;
    transition: all 0.2s ease-in-out;
}

.btn-soft-primary {
    background: rgba(85, 110, 230, 0.18);
    color: var(--sd-primary);
    border-color: rgba(85, 110, 230, 0.25);
}

.btn-soft-danger {
    background: rgba(244, 106, 106, 0.18);
    color: #e74c3c;
    border-color: rgba(244, 106, 106, 0.25);
}

.accesssetup-page .module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.module-link-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    border-radius: 18px;
    text-decoration: none;
    color: var(--sd-text);
    background: var(--sd-surface);
    border: 1px solid var(--sd-border);
    transition: transform .2s ease, box-shadow .2s ease;
}

.module-link-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--sd-shadow);
}

.module-link-card i {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--sd-primary-soft);
    color: var(--sd-primary);
}

.module-link-card span {
    display: block;
    margin-top: .25rem;
    color: var(--sd-muted);
    font-size: .92rem;
}

.setup-checklist {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--sd-text);
}

.setup-checklist li + li {
    margin-top: .7rem;
}

.bulk-upload-card .template-actions .btn {
    border-radius: 999px;
}

.sd-progress {
    height: 18px;
    background: var(--sd-surface-3);
    border-radius: 999px;
    overflow: hidden;
}

.preview-stat {
    background: var(--sd-surface-2);
    border: 1px solid var(--sd-border);
    border-radius: 16px;
    padding: 1rem;
}

.preview-stat span {
    display: block;
    color: var(--sd-muted);
    margin-bottom: .35rem;
}

.preview-stat strong {
    font-size: 1.15rem;
}

.preview-table-wrap {
    max-height: 480px;
}

.row-invalid {
    background: rgba(244, 106, 106, 0.08);
}

.admin-master-card .modal-content,
.modal-content {
    border-radius: 20px;
    border: 1px solid var(--sd-border);
    background: var(--sd-surface);
}

.admin-master-card .table td,
.custom-table td.text-end {
    white-space: nowrap;
}

/* Access Setup single-entry workspace */
.module-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.module-switch {
    border: 1px solid var(--sd-border);
    background: var(--sd-surface-2);
    color: var(--sd-text);
    border-radius: 14px;
    padding: 0.85rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.module-switch.active {
    background: var(--sd-primary-soft);
    color: var(--sd-primary);
    border-color: rgba(85, 110, 230, 0.28);
    box-shadow: inset 0 0 0 1px rgba(85, 110, 230, 0.12);
}

.module-panel {
    display: none;
}

.module-panel.active {
    display: block;
}

.admin-form-card,
.admin-grid-card {
    background: var(--sd-surface);
    border: 1px solid var(--sd-border);
    border-radius: 20px;
    padding: 1.25rem;
    box-shadow: var(--sd-shadow);
    height: 100%;
}

.mini-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--sd-text);
}

.mini-subtitle {
    color: var(--sd-muted);
    font-size: 0.88rem;
}

.text-bg-primary-soft {
    background: rgba(85, 110, 230, 0.14);
    color: var(--sd-primary);
    border: 1px solid rgba(85, 110, 230, 0.18);
}

.admin-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.permission-check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem 1rem;
    background: var(--sd-surface-2);
    border: 1px solid var(--sd-border);
    border-radius: 16px;
    padding: 1rem;
}

.permission-check-grid label {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--sd-text);
    font-weight: 500;
}

.permission-check-grid input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

@media (max-width: 991.98px) {
    .permission-check-grid {
        grid-template-columns: 1fr;
    }
}

.logout-form {
    margin: 0;
}

.logout-btn {
    border: 1px solid var(--sd-border);
    background: var(--sd-surface-2);
    color: var(--sd-text);
    border-radius: 14px;
    padding: 0.72rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.logout-btn:hover,
.logout-btn:focus-visible {
    background: var(--sd-surface-3);
    color: var(--sd-text);
}

.sidebar-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sidebar-group-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border-radius: 16px;
    padding: 0.9rem 1rem;
    transition: all 0.2s ease;
}

.sidebar-group-title {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
}

.sidebar-group-toggle:hover,
.sidebar-group.open .sidebar-group-toggle,
.sidebar-group.current .sidebar-group-toggle {
    background: rgba(255,255,255,0.12);
    color: var(--sd-sidebar-active);
}

.sidebar-group-arrow {
    transition: transform 0.2s ease;
    font-size: 0.85rem;
}

.sidebar-group.open .sidebar-group-arrow,
.sidebar-group.current .sidebar-group-arrow {
    transform: rotate(180deg);
}

.sidebar-submenu {
    display: none;
    flex-direction: column;
    gap: 0.2rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid rgba(255,255,255,0.12);
}

.sidebar-group.open .sidebar-submenu {
    display: flex;
}

.sidebar-sublink {
    color: rgba(255,255,255,0.72);
    text-decoration: none;
    border-radius: 12px;
    padding: 0.7rem 0.9rem;
    transition: all 0.2s ease;
}

.sidebar-sublink:hover,
.sidebar-sublink.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.login-page {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(85, 110, 230, 0.24), transparent 22%),
        radial-gradient(circle at bottom right, rgba(52, 195, 143, 0.16), transparent 20%),
        linear-gradient(135deg, #eef4ff 0%, #edf2f7 46%, #f8fbff 100%);
    color: #243045;
}

html[data-theme="dark"] .login-page {
    background:
        radial-gradient(circle at top left, rgba(111, 134, 255, 0.22), transparent 24%),
        radial-gradient(circle at bottom right, rgba(52, 195, 143, 0.12), transparent 22%),
        linear-gradient(135deg, #101626 0%, #121a2d 46%, #0d1422 100%);
    color: #edf2f7;
}

.login-page-shell {
    min-height: 100vh;
    padding: 2rem;
    display: grid;
    grid-template-columns: minmax(340px, 1.08fr) minmax(360px, 0.92fr);
    gap: 1.6rem;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.login-backdrop-grid {
    position: absolute;
    inset: 1.5rem;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    background-image:
        linear-gradient(rgba(85, 110, 230, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(85, 110, 230, 0.04) 1px, transparent 1px);
    background-size: 34px 34px;
    pointer-events: none;
}

html[data-theme="dark"] .login-backdrop-grid {
    border-color: rgba(255, 255, 255, 0.06);
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

.login-backdrop-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(4px);
    opacity: 0.75;
}

.login-backdrop-orb-one {
    width: 320px;
    height: 320px;
    background: rgba(85, 110, 230, 0.14);
    top: -90px;
    right: 8%;
}

.login-backdrop-orb-two {
    width: 280px;
    height: 280px;
    background: rgba(52, 195, 143, 0.13);
    bottom: -100px;
    left: 6%;
}

.login-panel {
    position: relative;
    z-index: 1;
    backdrop-filter: blur(16px);
    border-radius: 30px;
    padding: 2.25rem;
}

.login-panel-brand {
    min-height: 680px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(145deg, rgba(59, 89, 209, 0.96), rgba(84, 111, 231, 0.9) 55%, rgba(45, 198, 154, 0.74) 100%);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 28px 70px rgba(31, 56, 123, 0.28);
}

.login-panel-brand p,
.login-panel-brand small,
.login-panel-brand code,
.login-panel-brand span {
    color: rgba(255,255,255,0.92);
}

.login-brand-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.login-brand-lockup {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
}

.login-logo-wrap {
    display: flex;
    align-items: center;
}

.login-logo {
    max-width: 220px;
    height: auto;
}

.login-logo-dark {
    display: none;
}

html[data-theme="dark"] .login-logo-light {
    display: none;
}

html[data-theme="dark"] .login-logo-dark {
    display: block;
}

.login-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.48rem 0.9rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.18);
    font-weight: 700;
    white-space: nowrap;
}

.login-copy-block {
    display: grid;
    gap: 0.85rem;
    margin-top: 1rem;
}

.login-eyebrow,
.login-form-overline {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.login-panel h1 {
    font-size: clamp(2.1rem, 3vw, 3.25rem);
    line-height: 1.08;
    margin: 0;
}

.login-lead {
    margin: 0;
    max-width: 38rem;
    font-size: 1rem;
    line-height: 1.7;
}

.login-feature-list {
    display: grid;
    gap: 1rem;
    margin-top: 1.8rem;
}

.login-feature-item {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 0.9rem;
    align-items: start;
    padding: 1rem 1.1rem;
    border-radius: 20px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.14);
}

.login-feature-item i {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: rgba(255,255,255,0.12);
    font-size: 1.1rem;
}

.login-feature-item strong,
.login-demo-card-head strong {
    display: block;
    color: #fff;
    margin-bottom: 0.2rem;
}

.login-demo-card {
    margin-top: 1.8rem;
    padding: 1.2rem;
    border-radius: 22px;
    background: rgba(8, 15, 35, 0.18);
    border: 1px solid rgba(255,255,255,0.12);
}

.login-demo-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.login-demo-values {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.login-demo-pill {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    border: 0;
    border-radius: 16px;
    padding: 0.95rem 1rem;
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-weight: 600;
}

.login-demo-pill:hover {
    background: rgba(255,255,255,0.18);
}

.login-panel-form {
    background: rgba(255,255,255,0.84);
    border: 1px solid rgba(255,255,255,0.62);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

html[data-theme="dark"] .login-panel-form {
    background: rgba(16, 23, 39, 0.76);
    border-color: rgba(255,255,255,0.08);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.32);
}

.login-form-header {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1rem;
}

.login-form-header h2 {
    margin: 0.2rem 0 0.35rem;
}

.login-form-header p {
    margin: 0;
    color: var(--sd-muted);
}

.login-theme-toggle {
    padding-inline: 0.95rem;
}

.login-form {
    display: grid;
    gap: 1.2rem;
}

.login-form-group {
    display: grid;
    gap: 0.45rem;
}

.login-label-row,
.login-form-tools,
.login-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.login-label-hint,
.login-tool-text {
    color: var(--sd-muted);
    font-size: 0.82rem;
}

.login-alert {
    border-radius: 16px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.login-input-wrap {
    position: relative;
}

.login-input-wrap i {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: var(--sd-muted);
}

.login-input-wrap .form-control {
    min-height: 56px;
    padding-left: 2.9rem;
    border-radius: 16px;
    border: 1px solid rgba(36, 48, 69, 0.12);
    background: rgba(249, 251, 253, 0.98);
    color: #243045;
    box-shadow: none;
}

html[data-theme="dark"] .login-input-wrap .form-control {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.08);
    color: #edf2f7;
}

html[data-theme="dark"] .login-input-wrap .form-control::placeholder {
    color: rgba(237, 242, 247, 0.42);
}

.login-input-wrap .form-control:focus {
    border-color: rgba(85, 110, 230, 0.5);
    box-shadow: 0 0 0 0.22rem rgba(85, 110, 230, 0.12);
}

.login-input-wrap-password .form-control {
    padding-right: 3.25rem;
}

.login-password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--sd-muted);
    width: 38px;
    height: 38px;
    border-radius: 12px;
}

.login-password-toggle:hover {
    background: var(--sd-primary-soft);
    color: var(--sd-primary);
}

.login-check {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.9rem;
    color: var(--sd-text);
}

.login-check input {
    accent-color: var(--sd-primary);
}

.login-capslock {
    display: none;
    align-items: center;
    gap: 0.4rem;
    color: #dc3545;
    font-size: 0.82rem;
}

.login-capslock.show {
    display: inline-flex;
}

.login-submit {
    width: 100%;
    min-height: 56px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    font-weight: 700;
    box-shadow: 0 16px 30px rgba(85, 110, 230, 0.2);
}

@media (max-width: 991.98px) {
    .login-page-shell {
        grid-template-columns: 1fr;
        padding: 1.25rem;
    }

    .search-box {
        min-width: 0;
    }
}

@media (max-width: 767.98px) {
    .topbar {
        padding: 0 1rem;
    }

    .page-content {
        padding: 1rem;
    }

    .profile-chip-text,
    .logout-btn span,
    .brand-subtitle {
        display: none;
    }

    .login-panel {
        padding: 1.5rem;
    }
}

/* Master module cards */
.admin-master-card {
    border-radius: 24px;
    border: 1px solid var(--sd-border);
    background: rgba(255,255,255,0.94);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

html[data-theme="dark"] .admin-master-card {
    background: rgba(18, 24, 40, 0.9);
}

.admin-master-card .card-body {
    padding: 1.5rem;
}

.admin-master-card h3 {
    color: var(--sd-text);
}

.admin-master-card .text-muted {
    color: var(--sd-muted) !important;
}

.custom-table tbody tr:hover {
    background: rgba(85, 110, 230, 0.04);
}

.sub-cell {
    margin-top: 0.2rem;
    color: var(--sd-muted);
    font-size: 0.88rem;
}


.master-toolbar {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.master-search {
    min-width: 280px;
    max-width: 360px;
}

.master-search .form-control {
    background: rgba(255,255,255,0.92);
}

.table-footer-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 1rem;
}

.sd-pager-summary {
    color: var(--sd-text-muted, #94a3b8);
    font-size: 0.92rem;
}

.sd-pager-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.sd-pager-page {
    min-width: 90px;
    text-align: center;
    color: var(--sd-text-muted, #94a3b8);
    font-size: 0.92rem;
}

.form-section-card {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 1rem;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.02);
    height: 100%;
}

[data-theme="dark"] .form-section-card {
    background: rgba(30, 41, 59, 0.45);
}

.form-section-card h6 {
    margin-bottom: 0.85rem;
    font-weight: 700;
}


.master-search {
    min-width: min(100%, 360px);
    max-width: 480px;
    flex: 1 1 360px;
    position: relative;
}

.master-search .form-control,
.access-grid-search .form-control {
    min-height: 46px;
    border-radius: 14px;
    border: 1px solid var(--sd-border);
    background: var(--sd-surface-2);
    color: var(--sd-text);
    padding-inline: 1rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.master-search .form-control::placeholder,
.access-grid-search .form-control::placeholder {
    color: var(--sd-muted);
}

.table-footer-bar {
    padding-top: 1rem;
}

.sd-pager-shell {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.sd-pager-summary {
    color: var(--sd-muted);
    font-size: 0.92rem;
}

.sd-pager-summary strong {
    color: var(--sd-text);
    font-weight: 700;
}

.sd-pager-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.sd-pager-numbers {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.25rem;
    border-radius: 999px;
    background: var(--sd-surface-2);
    border: 1px solid var(--sd-border);
}

.sd-page-btn {
    border: 1px solid var(--sd-border);
    background: var(--sd-surface);
    color: var(--sd-text);
    min-height: 38px;
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition: all 0.2s ease;
}

.sd-page-btn:hover:not(:disabled) {
    border-color: rgba(85, 110, 230, 0.35);
    background: var(--sd-primary-soft);
    color: var(--sd-primary);
}

.sd-page-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.sd-page-number {
    min-width: 38px;
    padding-inline: 0.6rem;
}

.sd-page-number.active {
    background: var(--sd-primary);
    border-color: var(--sd-primary);
    color: #fff;
    box-shadow: 0 10px 20px rgba(85, 110, 230, 0.25);
}

.sd-page-nav {
    background: transparent;
}

.access-grid-search {
    min-width: min(100%, 280px);
    max-width: 360px;
    width: 100%;
}

.access-grid-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

@media (max-width: 767.98px) {
    .sd-pager-shell,
    .sd-pager-actions,
    .access-grid-tools {
        flex-direction: column;
        align-items: stretch;
    }

    .sd-pager-numbers {
        justify-content: center;
    }
}


.bulk-upload-row > [class*="col-"] {
    min-width: 0;
}

.upload-action-group {
    flex-wrap: wrap;
}

.upload-action-group .btn {
    min-width: 0;
    white-space: nowrap;
}

.preview-table-wrap,
.validation-panel,
.bulk-upload-card,
.admin-master-card .card-body {
    min-width: 0;
}

#userBulkUploadForm,
#bulkUploadForm {
    overflow-x: clip;
}

@media (max-width: 991.98px) {
    .upload-action-group {
        width: 100%;
    }

    .upload-action-group .btn {
        flex: 1 1 calc(50% - .5rem);
    }
}

@media (max-width: 575.98px) {
    .page-content {
        padding: 1rem;
    }

    .upload-action-group .btn {
        flex: 1 1 100%;
    }

    .preview-stat {
        padding: .85rem;
    }

    .preview-table-wrap {
        max-height: 360px;
    }
}

/* Product and inventory module polish */
html[data-theme="dark"] body,
html[data-theme="dark"] .card,
html[data-theme="dark"] .table,
html[data-theme="dark"] .modal-title,
html[data-theme="dark"] .form-label,
html[data-theme="dark"] .custom-table td,
html[data-theme="dark"] .custom-table tbody,
html[data-theme="dark"] .custom-table strong,
html[data-theme="dark"] .preview-stat strong,
html[data-theme="dark"] .preview-stat,
html[data-theme="dark"] .preview-table-wrap,
html[data-theme="dark"] .table-responsive,
html[data-theme="dark"] .admin-master-card,
html[data-theme="dark"] .admin-master-card h4,
html[data-theme="dark"] .admin-master-card h5,
html[data-theme="dark"] .admin-master-card h6 {
    color: var(--sd-text) !important;
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] textarea.form-control,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .table,
html[data-theme="dark"] .table > :not(caption) > * > * {
    background-color: transparent;
    color: var(--sd-text);
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] textarea.form-control {
    border-color: rgba(255,255,255,0.12);
    background: rgba(37, 44, 68, 0.82);
}

html[data-theme="dark"] .form-control::placeholder,
html[data-theme="dark"] textarea.form-control::placeholder {
    color: rgba(237, 242, 247, 0.55);
}

html[data-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%);
}

.product-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.product-card {
    border: 1px solid var(--sd-border);
    border-radius: 20px;
    background: var(--sd-surface);
    overflow: hidden;
    box-shadow: var(--sd-shadow);
}

.product-thumb {
    aspect-ratio: 1 / 1;
    background: linear-gradient(180deg, var(--sd-surface-2), var(--sd-surface-3));
    display: grid;
    place-items: center;
}

.product-thumb img,
.product-image-preview img,
.table-product-thumb {
    object-fit: cover;
}

.product-thumb img,
.product-image-preview img {
    width: 100%;
    height: 100%;
}

.product-card-body {
    padding: 1rem;
}

.product-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--sd-text);
}

.product-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
    margin-top: 1rem;
}

.product-meta-grid span {
    display: block;
    font-size: .78rem;
    color: var(--sd-muted);
}

.product-meta-grid strong {
    color: var(--sd-text);
}

.product-image-preview {
    aspect-ratio: 1 / 1;
    border-radius: 18px;
    overflow: hidden;
    background: var(--sd-surface-2);
    border: 1px dashed var(--sd-border);
}

.table-product-thumb {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    border: 1px solid var(--sd-border);
    background: var(--sd-surface-2);
}

.empty-card {
    grid-column: 1 / -1;
    border: 1px dashed var(--sd-border);
    border-radius: 18px;
    background: var(--sd-surface-2);
}


/* Product + Inventory usability fixes */
.inventory-tip-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
    margin-top: 1rem;
}

.inventory-tip-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .45rem .75rem;
    border-radius: 999px;
    font-weight: 600;
    background: var(--sd-primary-soft);
    color: var(--sd-primary);
    border: 1px solid rgba(85, 110, 230, 0.22);
}

.inventory-tip-text {
    color: var(--sd-muted);
    font-size: .92rem;
}

.inventory-filter-btn.active {
    background: var(--sd-primary);
    color: #fff;
    border-color: var(--sd-primary);
}

.zero-stock-pill {
    background: rgba(241, 180, 76, 0.18);
    color: #f1b44c;
}

.inventory-empty-state {
    border: 1px dashed var(--sd-border);
    border-radius: 18px;
    background: var(--sd-surface-2);
    padding: 1.1rem 1.25rem;
    color: var(--sd-text);
}

.modal-backdrop.show {
    opacity: .72;
}

.modal-content {
    box-shadow: 0 22px 56px rgba(0, 0, 0, 0.36);
}

.modal-header,
.modal-footer {
    border-color: var(--sd-border);
    background: color-mix(in srgb, var(--sd-surface) 92%, transparent);
}

.modal-body {
    background: var(--sd-surface);
}

.modal .form-control,
.modal .form-select,
.modal textarea.form-control {
    min-height: 44px;
}

.modal .form-control,
.modal .form-select,
.modal textarea.form-control,
.modal .form-text {
    color: var(--sd-text);
}

.modal .form-text {
    color: var(--sd-muted) !important;
}

.modal-xl {
    max-width: 1140px;
}

html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-body,
html[data-theme="dark"] .modal-footer {
    background: #182134 !important;
}

html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer {
    box-shadow: inset 0 -1px 0 rgba(255,255,255,0.05);
}

html[data-theme="dark"] .modal .form-control,
html[data-theme="dark"] .modal .form-select,
html[data-theme="dark"] .modal textarea.form-control {
    background: #232d46 !important;
    border-color: rgba(255,255,255,0.12) !important;
    color: #eef4ff !important;
}

html[data-theme="dark"] .modal .form-control:focus,
html[data-theme="dark"] .modal .form-select:focus,
html[data-theme="dark"] .modal textarea.form-control:focus {
    background: #26314d !important;
    border-color: rgba(111,134,255,0.45) !important;
    box-shadow: 0 0 0 .2rem rgba(111,134,255,0.12) !important;
}

html[data-theme="dark"] .modal .form-control::placeholder,
html[data-theme="dark"] .modal textarea.form-control::placeholder,
html[data-theme="dark"] .modal .form-text,
html[data-theme="dark"] .text-muted {
    color: #aebad2 !important;
}

html[data-theme="dark"] .custom-table thead th {
    color: #d7def0;
    border-color: rgba(255,255,255,0.08);
}

html[data-theme="dark"] .custom-table tbody tr,
html[data-theme="dark"] .custom-table tbody td {
    border-color: rgba(255,255,255,0.05);
}

html[data-theme="dark"] .product-card,
html[data-theme="dark"] .form-section-card,
html[data-theme="dark"] .preview-stat,
html[data-theme="dark"] .inventory-empty-state {
    background: #1a2439;
}


.shop-shell-card,
.cart-shell-card,
.checkout-shell-card,
.checkout-summary-card {
    overflow: hidden;
}

.shop-product-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 22px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.shop-product-card.is-disabled {
    opacity: 0.72;
}

.shop-product-media {
    height: 180px;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shop-product-fallback {
    width: 84px;
    height: 84px;
    border-radius: 24px;
    background: rgba(85, 110, 230, 0.12);
    color: var(--sd-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.shop-product-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.shop-meta-row,
.checkout-summary-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.shop-price-row {
    font-size: 1.2rem;
    font-weight: 700;
}

.shop-action-row,
.cart-line-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.shop-qty-box {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 999px;
    padding: 0.25rem;
}

.shop-qty-btn {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--sd-text);
    font-weight: 700;
}

.shop-card-qty,
.cart-qty {
    width: 84px;
    text-align: center;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.cart-line-card {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 1rem;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 1rem;
    background: rgba(255,255,255,0.03);
}

.cart-line-media {
    height: 110px;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255,255,255,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-line-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-line-main {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.cart-summary-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 1rem;
}

.cart-summary-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

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

.checkout-profile-card,
.checkout-summary-item,
.checkout-help-box {
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    background: rgba(255,255,255,0.03);
}

.checkout-profile-card {
    padding: 1rem;
}

.checkout-profile-card span {
    display: block;
    color: var(--sd-muted);
    font-size: 0.82rem;
    margin-bottom: 0.35rem;
}

.checkout-profile-card strong {
    display: block;
    color: var(--sd-text);
}

.checkout-help-box,
.checkout-summary-item {
    padding: 0.9rem 1rem;
}

@media (max-width: 767.98px) {
    .cart-line-card {
        grid-template-columns: 1fr;
    }

    .shop-action-row,
    .cart-line-actions {
        align-items: stretch;
    }

    .shop-qty-box {
        width: 100%;
        justify-content: space-between;
    }
}

.order-simple-banner {
    display:flex;
    align-items:center;
    gap:.75rem;
    padding:.9rem 1rem;
    border:1px solid rgba(85,110,230,.28);
    border-radius:16px;
    background:rgba(85,110,230,.08);
    color:var(--sd-text);
}

.order-dashboard-cards .preview-stat,
#orderDetailsPanel .preview-stat,
.shop-product-card,
.cart-line-card,
.checkout-profile-card,
.checkout-summary-item {
    box-shadow:none;
}

.shop-product-card h5,
.shop-product-card strong,
.shop-product-card .shop-price-row,
.shop-product-card .shop-meta-row,
.shop-product-card .text-muted,
.cart-line-card .fw-semibold,
.checkout-profile-card strong {
    color: var(--sd-text) !important;
}

.shop-product-media {
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
}

.shop-product-image {
    object-fit: contain;
    padding: 1rem;
}

#orderDetailsPanel .table td,
#orderDetailsPanel .table th {
    vertical-align: middle;
}

#notificationList .btn {
    background: rgba(255,255,255,0.03);
    color: var(--sd-text);
}

html[data-theme="dark"] .order-simple-banner {
    background: rgba(85,110,230,.10);
}


/* Order workspace UX refresh */
.order-line-image,.order-line-fallback{width:60px;height:60px;object-fit:cover;display:flex;align-items:center;justify-content:center;background:rgba(148,163,184,.08);}
#orderGridBody tr{cursor:pointer;}
#orderGridBody tr.table-active td{box-shadow:inset 3px 0 0 #556ee6;}
#orderDetailsPanel .form-section-card,#approvalTrail .border,#statusTrail .border,#dispatchMetaCard{border-color:rgba(148,163,184,.18)!important;background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,.02));border-radius:18px!important;}
#orderDetailsPanel .preview-stat{min-height:96px;}
#notificationList .btn{transition:transform .15s ease,border-color .15s ease;}
#notificationList .btn:hover{transform:translateY(-1px);border-color:rgba(85,110,230,.45)!important;}
html[data-theme="dark"] #orderDetailsPanel .form-section-card,html[data-theme="dark"] #approvalTrail .border,html[data-theme="dark"] #statusTrail .border,html[data-theme="dark"] #dispatchMetaCard{background:rgba(15,23,42,.48)!important;}


.order-stage-strip{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:1rem}
.order-stage-strip i{flex:1 1 24px;height:2px;background:rgba(255,255,255,.08);min-width:24px}
.stage-chip{display:flex;align-items:center;gap:8px;padding:.6rem .9rem;border:1px solid rgba(255,255,255,.08);border-radius:999px;background:rgba(255,255,255,.02)}
.stage-chip span{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:rgba(255,255,255,.08);font-size:.8rem}
.stage-chip strong{font-size:.82rem}
.stage-chip.done{border-color:rgba(14,203,129,.25);background:rgba(14,203,129,.08)}
.stage-chip.current{box-shadow:0 0 0 1px rgba(91,114,255,.25) inset}
.order-line-image{width:44px;height:44px;object-fit:cover;background:#0f172a}

/* Order module final usability fixes */
.order-role-switch {
    border-radius: 999px;
    padding: .25rem;
    background: color-mix(in srgb, var(--sd-surface) 92%, transparent);
    border: 1px solid var(--sd-border);
}
.order-role-pill {
    border-radius: 999px !important;
    color: var(--sd-text) !important;
    border-color: transparent !important;
    background: transparent !important;
}
.order-role-pill.active {
    background: var(--sd-primary) !important;
    color: #fff !important;
    border-color: var(--sd-primary) !important;
}
.order-list-shell {
    max-height: 760px;
    overflow: auto;
    padding-right: .25rem;
}
.order-list-card {
    width: 100%;
    text-align: left;
    border: 1px solid var(--sd-border);
    border-radius: 18px;
    padding: 1rem;
    background: color-mix(in srgb, var(--sd-surface) 94%, transparent);
    color: var(--sd-text);
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.order-list-card .text-muted,
.order-list-card .small {
    color: var(--sd-muted) !important;
}
.order-list-card:hover,
.order-list-card.active {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--sd-primary) 45%, var(--sd-border));
    box-shadow: 0 14px 32px rgba(17, 24, 39, 0.12);
    background: color-mix(in srgb, var(--sd-primary) 10%, var(--sd-surface));
}
html[data-theme="dark"] .order-list-card {
    background: rgba(17, 24, 39, 0.76);
    border-color: rgba(148, 163, 184, 0.18);
}
html[data-theme="dark"] .order-list-card:hover,
html[data-theme="dark"] .order-list-card.active {
    background: rgba(30, 41, 59, 0.96);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
}
.detail-pointer-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: .65rem;
}
.detail-pointer-list li {
    display: grid;
    grid-template-columns: minmax(120px, 145px) minmax(0, 1fr);
    gap: .85rem;
    align-items: start;
    padding-bottom: .45rem;
    border-bottom: 1px dashed color-mix(in srgb, var(--sd-border) 88%, transparent);
}
.detail-pointer-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.detail-pointer-list span {
    color: var(--sd-muted);
    font-size: .86rem;
}
.detail-pointer-list strong {
    color: var(--sd-text);
    font-weight: 600;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}
.notification-highlight-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .85rem;
}
.notification-compact-card,
.notification-card {
    width: 100%;
    text-align: left;
    border: 1px solid var(--sd-border);
    border-radius: 18px;
    padding: 1rem;
    background: color-mix(in srgb, var(--sd-surface) 96%, transparent);
    color: var(--sd-text);
}
.notification-card {
    margin-bottom: .75rem;
}
.notification-card.is-read {
    opacity: .82;
}
.notification-title {
    font-weight: 700;
    color: var(--sd-text);
    margin-bottom: .15rem;
}
.notification-subtitle {
    color: var(--sd-muted);
    font-size: .9rem;
    line-height: 1.45;
}
.notification-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .4rem;
    min-width: 140px;
}
.notification-order-ref {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .25rem .55rem;
    border-radius: 999px;
    background: var(--sd-primary-soft);
    color: var(--sd-primary);
    font-size: .78rem;
    font-weight: 700;
}
.notification-time {
    font-size: .78rem;
    color: var(--sd-muted);
}
#notificationList {
    max-height: 420px;
    overflow: auto;
    padding-right: .25rem;
}
.order-notice-strip {
    border-top: 1px solid var(--sd-border);
    padding-top: 1rem;
}
@media (max-width: 1199.98px) {
    .notification-highlight-grid { grid-template-columns: 1fr; }
}
@media (max-width: 767.98px) {
    .detail-pointer-list li { grid-template-columns: 1fr; gap: .25rem; }
    .notification-side { align-items: flex-start; min-width: 0; }
}

.order-list-card {
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255,255,255,0.04) !important;
}
html[data-theme="light"] .order-list-card {
    background: #f8fbff !important;
    border-color: rgba(99, 116, 153, 0.18) !important;
    color: #162033 !important;
}
html[data-theme="light"] .order-list-card .text-muted,
html[data-theme="light"] .order-list-card .small { color: #61708d !important; }
html[data-theme="dark"] .order-list-card {
    background: rgba(15, 23, 42, 0.92) !important;
    border-color: rgba(148, 163, 184, 0.20) !important;
    color: #e8eefc !important;
}
.order-list-group + .order-list-group { margin-top: 1rem; }
.order-list-group-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .75rem;
}
.order-list-group-head h6 {
    margin: 0;
    font-size: .95rem;
}
.order-list-group-head span {
    font-size: .8rem;
    color: var(--sd-muted);
}
.order-list-filters {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.order-list-filter {
    border-radius: 999px;
    border: 1px solid var(--sd-border);
    color: var(--sd-text);
    background: transparent;
}
.order-list-filter span { opacity: .8; margin-left: .25rem; }
.order-list-filter.active {
    background: var(--sd-primary);
    border-color: var(--sd-primary);
    color: #fff;
}
#notificationHighlights {
    min-height: 56px;
}
#notificationList {
    max-height: 440px;
    overflow: auto;
    padding-right: .25rem;
}
.notification-compact-card,
.notification-card {
    appearance: none;
    -webkit-appearance: none;
}
.detail-pointer-list li {
    grid-template-columns: minmax(118px, 135px) minmax(0, 1fr);
}
.detail-pointer-list strong {
    font-weight: 500;
}


.order-notification-card { position: static; z-index: 0; scroll-margin-top: 90px; }
.notification-compact-list { display: grid; grid-template-columns: 1fr; gap: .75rem; max-height: 260px; overflow: auto; }
.notification-compact-list.notification-list-expanded { max-height: 520px; }
.notification-list-expanded { max-height: 520px !important; }
.notification-card, .notification-compact-card { box-shadow: none; }
.inventory-summary-grid { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1rem; }
.inventory-summary-card { border:1px solid var(--sd-border); border-radius:18px; padding:1rem 1.1rem; background: color-mix(in srgb, var(--sd-surface) 96%, transparent); }
.inventory-summary-card span { display:block; color:var(--sd-muted); font-size:.82rem; margin-bottom:.35rem; }
.inventory-summary-card strong { display:block; font-size:1.35rem; color:var(--sd-text); }
.inventory-summary-card small { color:var(--sd-muted); display:block; margin-top:.25rem; }
#txTable td:last-child { max-width: 640px; white-space: normal; line-height: 1.45; }
@media (max-width: 991.98px) { .inventory-summary-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } .order-notification-card { position: static; } }
@media (max-width: 575.98px) { .inventory-summary-grid { grid-template-columns: 1fr; } }

#orderListFilters { display:block; }
#orderNotificationCard { clear: both; }

/* Notification center */
.notification-trigger {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    border: 1px solid rgba(130, 149, 184, 0.28);
    background: var(--surface-elevated, rgba(255,255,255,0.82));
    color: var(--text-primary, #25324b);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}
.notification-trigger:hover,
.notification-trigger:focus {
    color: var(--text-primary, #25324b);
    border-color: rgba(85, 110, 230, 0.35);
}
.notification-trigger i { font-size: 1.1rem; }
.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 12px rgba(239, 68, 68, 0.35);
}
.notification-badge.show { display: inline-flex; }
.notification-dropdown-panel {
    width: min(420px, calc(100vw - 24px));
    border: 1px solid rgba(130, 149, 184, 0.18);
    border-radius: 22px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
    background: var(--surface-elevated, #fff);
}
.notification-dropdown-header,
.notification-dropdown-footer {
    padding: 16px 18px;
    background: rgba(85, 110, 230, 0.04);
}
.notification-dropdown-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid rgba(130, 149, 184, 0.14);
}
.notification-dropdown-header h6,
.notification-dropdown-header p {
    margin: 0;
}
.notification-dropdown-header p {
    margin-top: 4px;
    color: var(--text-muted, #7b879f);
    font-size: 0.875rem;
}
.notification-mark-all {
    padding: 0;
    font-size: 0.875rem;
    text-decoration: none;
}
.notification-dropdown-body {
    max-height: 420px;
    overflow-y: auto;
    padding: 6px;
}
.notification-dropdown-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    margin-bottom: 4px;
}
.notification-dropdown-item:hover {
    background: rgba(85, 110, 230, 0.08);
    color: inherit;
}
.notification-dropdown-item.is-unread {
    background: rgba(85, 110, 230, 0.08);
}
.notification-dropdown-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(85, 110, 230, 0.12);
    color: #556ee6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
.notification-dropdown-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.notification-dropdown-copy strong,
.notification-dropdown-copy span,
.notification-dropdown-copy small {
    display: block;
}
.notification-dropdown-copy strong {
    color: var(--text-primary, #25324b);
    font-size: 0.94rem;
}
.notification-dropdown-copy span,
.notification-dropdown-copy small {
    color: var(--text-muted, #7b879f);
    line-height: 1.45;
}
.notification-dropdown-empty,
.notification-empty-state {
    padding: 36px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-muted, #7b879f);
    gap: 10px;
}
.notification-dropdown-empty i,
.notification-empty-icon {
    font-size: 1.4rem;
}
.notification-page-card .content-card-body {
    background: transparent;
}
.notification-page-count {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(85, 110, 230, 0.08);
    color: #556ee6;
    font-weight: 700;
    font-size: 0.875rem;
}
.notification-page-list {
    display: flex;
    flex-direction: column;
}
.notification-page-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 18px 22px;
    text-decoration: none;
    color: inherit;
    border-top: 1px solid rgba(130, 149, 184, 0.12);
}
.notification-page-item:first-child {
    border-top: 0;
}
.notification-page-item:hover {
    background: rgba(85, 110, 230, 0.06);
    color: inherit;
}
.notification-page-item.is-unread {
    background: rgba(85, 110, 230, 0.05);
}
.notification-page-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(85, 110, 230, 0.12);
    color: #556ee6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
.notification-page-content {
    flex: 1 1 auto;
    min-width: 0;
}
.notification-page-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 6px;
}
.notification-page-topline h5,
.notification-page-content p,
.notification-page-meta {
    margin: 0;
}
.notification-page-content p {
    color: var(--text-muted, #7b879f);
    line-height: 1.55;
}
.notification-page-time {
    color: var(--text-muted, #7b879f);
    font-size: 0.85rem;
    white-space: nowrap;
}
.notification-page-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 10px;
    color: var(--text-muted, #7b879f);
    font-size: 0.875rem;
}
.notification-page-meta i {
    margin-right: 6px;
}
.notification-page-status {
    flex: 0 0 auto;
}
@media (max-width: 768px) {
    .notification-page-item {
        flex-direction: column;
    }
    .notification-page-topline {
        flex-direction: column;
        align-items: flex-start;
    }
    .notification-page-status {
        width: 100%;
    }
}

/* Printing module */
.printing-page .print-section-card,
.printing-page .print-service-card,
.print-job-panel {
    background: var(--sd-surface-1, rgba(15,23,42,.92));
    border: 1px solid rgba(148,163,184,.12);
    border-radius: 18px;
}
.printing-page .print-service-card { min-height: 160px; }
.print-job-summary-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; }
.print-job-summary-card { padding:14px 16px; background: var(--sd-surface-2, rgba(30,41,59,.92)); border:1px solid rgba(148,163,184,.1); border-radius:16px; }
.print-job-summary-label { color: var(--sd-text-muted, #94a3b8); font-size:.82rem; margin-bottom:8px; }
.print-job-summary-value,.print-job-summary-subvalue { color: var(--sd-text-strong, #f8fafc); font-weight:700; word-break:break-word; }
.print-job-photo { width:54px; height:54px; object-fit:cover; border-radius:12px; border:1px solid rgba(148,163,184,.16); }
.print-job-photo-frame { width:54px; height:54px; display:flex; align-items:center; justify-content:center; border-radius:12px; background: var(--sd-surface-2, rgba(30,41,59,.9)); border:1px solid rgba(148,163,184,.14); }
@media (max-width: 1200px){ .print-job-summary-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width: 768px){ .print-job-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width: 575px){ .print-job-summary-grid { grid-template-columns:1fr; } }


/* ===== Clean printing flow refresh ===== */
.printing-top-actions .btn.active { pointer-events:none; }
.printing-page .admin-master-card { overflow: hidden; }
.print-section-card { min-height: 100%; }
.print-service-card {
  background: linear-gradient(180deg, rgba(24,33,61,.96), rgba(19,27,53,.94));
  border: 1px solid rgba(148,163,184,.12);
  border-radius: 22px;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.print-service-card:hover { transform: translateY(-1px); border-color: rgba(96,165,250,.28); box-shadow: 0 14px 34px rgba(2,6,23,.18); }
.print-service-card.compact { min-height: 168px; }
.print-service-head { display:flex; justify-content:space-between; gap:14px; align-items:flex-start; }
.print-service-title { font-size: 1.06rem; color: var(--sd-text-strong); }
.print-type-tag { background: rgba(14,165,233,.12); color: #7dd3fc; border:1px solid rgba(14,165,233,.22); padding:.35rem .6rem; border-radius:999px; font-size:.76rem; font-weight:700; white-space:nowrap; }
.qty-chip { display:inline-flex; align-items:center; justify-content:center; background:#fff; color:#111827; border-radius:8px; padding:.42rem .65rem; font-size:.76rem; font-weight:700; }
.bulk-form-card,.bulk-info-card { min-height: 100%; }
.bulk-print-page .form-label { font-weight:600; }
.bulk-print-page .form-text { color: var(--sd-text-muted) !important; }
.bulk-print-page .form-control[readonly] { background: var(--sd-surface-2); }
.template-banner { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:14px 16px; border-radius:14px; background: rgba(6,78,59,.2); border:1px solid rgba(6,182,212,.35); color:#67e8f9; }
.template-banner strong { color:#67e8f9; }
.bulk-info-list { display:grid; gap:18px; }
.bulk-info-item h6 { margin-bottom:6px; color: var(--sd-text-strong); font-size:1rem; }
.bulk-info-item p { margin:0; color: var(--sd-text-soft); line-height:1.65; }
.print-order-chip { display:inline-flex; align-items:center; border-radius:999px; padding:.4rem .7rem; background: rgba(59,130,246,.16); color:#93c5fd; border:1px solid rgba(59,130,246,.2); font-size:.78rem; font-weight:700; }
.print-order-meta { color: var(--sd-text-muted); font-size:.8rem; }
.print-job-toolbar-actions .btn { border-radius:14px; font-weight:600; padding:.72rem 1rem; }
.print-job-toolbar-actions .btn-outline-secondary { color: var(--sd-text-soft); border-color: rgba(148,163,184,.28); background: transparent; }
.print-job-toolbar-actions .btn-outline-secondary:hover { color: var(--sd-text-strong); background: rgba(148,163,184,.08); }
.print-job-toolbar-actions .btn:disabled, .print-job-toolbar-actions .btn.disabled { opacity:.72 !important; }
.print-job-summary-grid { margin-top: 8px; }
.print-job-summary-card { min-height: 130px; }
.print-job-summary-label { text-transform:none; letter-spacing:0; }
.print-job-summary-value { font-size: 1rem; line-height:1.35; }
.print-job-summary-subvalue { font-size:.9rem; line-height:1.45; }
.print-job-table thead th { padding-top:14px; padding-bottom:14px; }
.print-job-table tbody td { padding-top:16px; padding-bottom:16px; }
@media (max-width: 991px) {
  .printing-page .col-lg-6, .printing-page .col-xl-7, .printing-page .col-xl-5 { width: 100%; }
}

/* Live dashboard + reports */
.sd-live-hero,
.sd-report-hero,
.sd-report-filter-card,
.sd-report-table-card,
.sd-report-card,
.sd-report-stat,
.sd-live-metric,
.sd-live-card {
    background: var(--sd-surface);
    border: 1px solid var(--sd-border);
    border-radius: 24px;
    box-shadow: var(--sd-shadow);
}
.sd-live-hero,
.sd-report-hero {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    gap: 1.25rem;
    align-items: center;
}
.sd-live-hero h1,
.sd-report-hero h2,
.sd-report-page-head h2 { color: var(--sd-text); margin: .35rem 0; }
.sd-live-hero p,
.sd-report-hero p,
.sd-report-page-head p { color: var(--sd-muted); margin-bottom: 0; }
.sd-live-hero-meta {
    display: grid;
    grid-template-columns: repeat(3,minmax(120px,1fr));
    gap: .85rem;
    min-width: min(100%, 430px);
}
.sd-mini-stat {
    padding: .95rem 1rem;
    border-radius: 18px;
    background: var(--sd-surface-2);
    border: 1px solid var(--sd-border);
}
.sd-mini-stat span { display:block; color: var(--sd-muted); font-size: .82rem; }
.sd-mini-stat strong { display:block; font-size: 1.05rem; color: var(--sd-text); margin-top: .15rem; }
.sd-live-metrics,
.sd-report-stats {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 1rem;
}
.sd-report-stats { grid-template-columns: repeat(6,minmax(0,1fr)); }
.sd-live-metric,
.sd-report-stat {
    padding: 1.15rem 1.2rem;
}
.sd-live-metric h3,
.sd-report-stat strong { color: var(--sd-text); display:block; margin: .25rem 0; }
.sd-live-metric p,
.sd-report-stat span { color: var(--sd-muted); margin: 0; }
.sd-report-stat strong { font-size: 1.1rem; }
.sd-report-card {
    display: block;
    text-decoration: none;
    padding: 1.25rem;
    height: 100%;
    color: inherit;
}
.sd-report-card:hover { transform: translateY(-2px); }
.sd-report-card i { font-size: 1.45rem; color: var(--sd-primary); margin-bottom: .8rem; display:inline-block; }
.sd-report-card h5 { color: var(--sd-text); margin-bottom: .45rem; }
.sd-report-card p { color: var(--sd-muted); margin: 0; }
.sd-report-shell { display:flex; flex-direction:column; gap:1rem; }
.sd-report-filter-inline { display:flex; gap:.85rem; align-items:end; }
.sd-report-filter-inline label { display:block; color:var(--sd-muted); font-size:.8rem; margin-bottom:.3rem; }
.sd-report-page-head { display:flex; justify-content:space-between; gap:1rem; align-items:center; }
.sd-report-filter-card { padding: 1.15rem; }
.sd-report-table-card { overflow:hidden; }
.sd-live-card { padding: 1.25rem; }
.quick-actions-grid {
    display:grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap:.85rem;
}
.quick-action-btn {
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    gap:.15rem;
    border:1px solid var(--sd-border);
    background:var(--sd-surface-2);
    border-radius:18px;
    padding:1rem;
    color:var(--sd-text);
    text-decoration:none;
}
.quick-action-btn i { font-size:1.3rem; color:var(--sd-primary); }
.quick-action-btn span { font-weight:600; }
.quick-action-btn small { color:var(--sd-muted); }
.pipeline-step { border:1px solid var(--sd-border); border-radius:18px; background:var(--sd-surface-2); }
.pipeline-step.tone-success { box-shadow: inset 0 0 0 1px rgba(52,195,143,.15); }
.pipeline-step.tone-warning { box-shadow: inset 0 0 0 1px rgba(241,180,76,.15); }
.pipeline-step.tone-danger { box-shadow: inset 0 0 0 1px rgba(244,106,106,.15); }
.pipeline-step.tone-primary { box-shadow: inset 0 0 0 1px rgba(85,110,230,.15); }
.pipeline-step.tone-info { box-shadow: inset 0 0 0 1px rgba(80,165,241,.15); }
.sd-empty-state { color: var(--sd-muted); background: var(--sd-surface-2); border-radius: 18px; padding: 1rem; }
.sd-live-table thead th { background: var(--sd-surface-2); color: var(--sd-text); border-bottom-color: var(--sd-border); }
.sd-live-table tbody td { color: var(--sd-text); border-color: var(--sd-border); background: transparent; }
.sd-live-table tbody tr:hover td { background: var(--sd-primary-soft); }
.status-pill.danger { background: rgba(244,106,106,.14); color: #f46a6a; }
@media (max-width: 1200px) {
    .sd-report-stats { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 992px) {
    .sd-live-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .sd-live-hero,
    .sd-report-hero,
    .sd-report-page-head { flex-direction: column; align-items: stretch; }
    .sd-live-hero-meta,
    .sd-report-filter-inline { grid-template-columns: 1fr; min-width: 0; width: 100%; }
    .sd-report-filter-inline { display:grid; }
}
@media (max-width: 768px) {
    .sd-report-stats,
    .sd-live-metrics,
    .quick-actions-grid { grid-template-columns: 1fr; }
}


.sd-theme-btn { border-color: rgba(95,108,141,.18); color: var(--sd-text); background: var(--sd-surface-2); }
.sd-theme-btn:hover, .sd-theme-btn:focus { color: var(--sd-text); border-color: rgba(85,110,230,.35); background: var(--sd-surface-2); }
.sd-live-table thead th { white-space: nowrap; color: var(--sd-muted); background: transparent; }
.sd-live-table tbody td { color: var(--sd-text); }

.search-box {
    cursor: pointer;
}

.search-box input[readonly] {
    cursor: pointer;
}

.search-shortcut {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--sd-border);
    background: rgba(255,255,255,0.28);
    color: var(--sd-muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.workspace-assistant-modal {
    border-radius: 28px;
    overflow: hidden;
}

.workspace-assistant-shell {
    padding: 1.2rem;
    background: var(--sd-surface);
}

.workspace-assistant-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.workspace-assistant-icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(85,110,230,0.2), rgba(79,172,254,0.14));
    color: var(--sd-primary);
    font-size: 1.1rem;
}

.workspace-assistant-search {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: var(--sd-surface-2);
    border: 1px solid var(--sd-border);
}

.workspace-assistant-search i {
    color: var(--sd-muted);
}

.workspace-assistant-search .form-control {
    border: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    color: var(--sd-text);
}

.workspace-assistant-search .form-control:focus {
    box-shadow: none;
}

.workspace-assistant-summary {
    margin-top: 0.9rem;
    color: var(--sd-muted);
    font-size: 0.95rem;
}

.workspace-assistant-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1rem;
}

.workspace-suggestion-chip {
    border: 1px solid var(--sd-border);
    background: var(--sd-surface-2);
    color: var(--sd-text);
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    font-size: 0.82rem;
}

.workspace-assistant-results {
    margin-top: 1rem;
    display: grid;
    gap: 0.75rem;
    max-height: 420px;
    overflow: auto;
    padding-right: 0.15rem;
}

.workspace-assistant-empty {
    border: 1px dashed var(--sd-border);
    border-radius: 18px;
    padding: 1.1rem;
    color: var(--sd-muted);
    text-align: center;
}

.workspace-result-card {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    padding: 0.95rem 1rem;
    border: 1px solid var(--sd-border);
    border-radius: 18px;
    background: var(--sd-surface-2);
    text-decoration: none;
    color: inherit;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.workspace-result-card:hover,
.workspace-result-card.active {
    transform: translateY(-1px);
    border-color: rgba(85,110,230,0.45);
    box-shadow: 0 18px 34px rgba(15,23,42,0.08);
}

.workspace-result-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(85,110,230,0.12);
    color: var(--sd-primary);
    font-size: 1rem;
    flex-shrink: 0;
}

.workspace-result-copy {
    min-width: 0;
    flex: 1;
}

.workspace-result-copy strong {
    display: block;
    color: var(--sd-text);
}

.workspace-result-copy span {
    display: block;
    color: var(--sd-muted);
    font-size: 0.88rem;
    margin-top: 0.2rem;
}

.workspace-result-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    flex-shrink: 0;
}

.workspace-result-badge,
.workspace-result-category {
    border-radius: 999px;
    padding: 0.18rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 700;
}

.workspace-result-badge {
    background: rgba(85,110,230,0.14);
    color: var(--sd-primary);
}

.workspace-result-category {
    background: rgba(15,23,42,0.06);
    color: var(--sd-muted);
}


.page-content {
    min-width: 0;
}

.page-content > .container-fluid,
.page-content > .container,
.page-content > .row {
    max-width: 100%;
}

.profile-page-shell {
    display: grid;
    gap: 1.5rem;
}

.profile-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.profile-page-header h1,
.profile-page-header p {
    margin: 0;
}

.profile-page-header p {
    color: var(--sd-muted);
    margin-top: 0.35rem;
}

.profile-page-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 0.95rem;
    border-radius: 999px;
    border: 1px solid var(--sd-border);
    background: var(--sd-surface-2);
    color: var(--sd-text);
    white-space: nowrap;
}

.profile-page-chip i {
    color: var(--sd-primary);
}

.profile-card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.profile-card-title h3,
.profile-card-title h4,
.profile-card-title p {
    margin: 0;
}

.profile-card-title p {
    color: var(--sd-muted);
    margin-top: 0.25rem;
}

.form-control[readonly] {
    background: var(--sd-surface-2);
}

@media (max-width: 767.98px) {
    .profile-page-header,
    .profile-card-title {
        flex-direction: column;
        align-items: flex-start;
    }
}


.page-content {
    overflow-x: auto;
}

.page-content > .container-fluid.profile-page-shell {
    max-width: 1240px;
    margin: 0 auto;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.login-links-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.login-inline-link {
    color: var(--sd-primary);
    text-decoration: none;
}

.login-inline-link:hover {
    text-decoration: underline;
}

/* ===== UI hotfix: stable app shell only ===== */
#layout-wrapper.app-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    grid-template-rows: 82px minmax(0, 1fr);
    grid-template-areas:
        "sidebar topbar"
        "sidebar content";
    min-height: 100vh;
    height: 100vh;
    align-items: stretch;
}

.topbar {
    grid-area: topbar;
    min-height: 82px !important;
    height: 82px !important;
    padding: 0 1.5rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    overflow: hidden;
}

.topbar-left,
.topbar-right {
    display: flex !important;
    align-items: center !important;
    min-width: 0;
    flex-wrap: nowrap !important;
}

.topbar-left {
    gap: 1rem !important;
    flex: 1 1 auto;
    overflow: hidden;
}

.topbar-right {
    gap: 0.85rem !important;
    flex: 0 0 auto;
    margin-left: auto;
    justify-content: flex-end;
    overflow: hidden;
}

.brand,
.brand-copy {
    min-width: 0;
    max-width: 100%;
}

.brand-subtitle {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-box {
    min-width: 280px;
    max-width: 380px;
    flex: 0 1 380px;
}

    .search-box input {
        min-width: 0;
    }

.profile-chip {
    flex: 0 1 auto;
    min-width: 0;
}

.profile-chip-text {
    min-width: 0;
}

    .profile-chip-text strong,
    .profile-chip-text span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.logout-form {
    flex: 0 0 auto;
}

.sidebar {
    grid-area: sidebar;
    display: flex;
    flex-direction: column;
    justify-content: flex-start !important;
    align-items: stretch;
    align-self: stretch;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-brand-card,
.sidebar-section-label,
.sidebar-nav {
    flex: 0 0 auto;
}

.sidebar-card {
    margin-top: auto;
    flex: 0 0 auto;
}

.page-content {
    grid-area: content;
    min-width: 0;
    min-height: 0;
    padding: 1.5rem !important;
    overflow-x: hidden;
    overflow-y: auto;
}

    .page-content > :first-child,
    .sd-live-hero {
        margin-top: 0 !important;
    }

@media (max-width: 1199.98px) {
    .search-box {
        min-width: 220px;
        max-width: 300px;
        flex-basis: 300px;
    }
}

@media (max-width: 991.98px) {
    #layout-wrapper.app-shell {
        grid-template-columns: 1fr;
        grid-template-rows: 72px minmax(0, 1fr);
        grid-template-areas:
            "topbar"
            "content";
        height: auto;
        min-height: 100vh;
    }

    .topbar {
        height: 72px !important;
        min-height: 72px !important;
        padding: 0 1rem !important;
        gap: 0.75rem !important;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        min-height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        z-index: 60;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .page-content {
        padding: 1rem !important;
        overflow-y: visible;
    }

    .search-box {
        min-width: 0;
        max-width: 260px;
        flex-basis: 260px;
    }
}

@media (max-width: 767.98px) {
    .topbar-right {
        gap: 0.5rem !important;
    }

    .page-content {
        padding: 1rem !important;
    }
}

.topbar-right {
    min-width: 0;
    display: flex;
    justify-content: flex-end;
}

.topbar-actions {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap;
    overflow: hidden;
}

@keyframes supplydesk-spin {
    to {
        transform: rotate(360deg);
    }
}


/* =========================================================
   FINAL LAYOUT + TOPBAR + NOTIFICATION FIX
   Paste this at the END of site.css
   ========================================================= */

/* shell */
#layout-wrapper.app-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    grid-template-rows: 82px minmax(0, 1fr);
    grid-template-areas:
        "sidebar topbar"
        "sidebar content";
    min-height: 100vh;
    height: 100vh;
    align-items: stretch;
}

/* topbar */
.topbar {
    grid-area: topbar;
    min-height: 82px !important;
    height: 82px !important;
    padding: 0 1.5rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 1rem;
    flex-wrap: nowrap !important;
    overflow: visible !important;
    background: rgba(249, 251, 253, 0.82);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--sd-border);
    position: sticky;
    top: 0;
    z-index: 30;
}

html[data-theme="dark"] .topbar {
    background: rgba(29, 35, 56, 0.88);
}

/* topbar left/right */
.topbar-left,
.topbar-right {
    display: flex !important;
    align-items: center !important;
    min-width: 0;
    flex-wrap: nowrap !important;
}

.topbar-left {
    gap: 1rem !important;
    flex: 1 1 auto;
    overflow: hidden;
}

.topbar-right {
    min-width: 0;
    display: flex;
    justify-content: flex-end;
    gap: 0.85rem !important;
    flex: 0 0 auto;
    margin-left: auto;
    overflow: visible !important;
}

/* wrapper added in layout */
.topbar-actions {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap;
    overflow: visible !important;
}

/* brand */
.brand,
.brand-copy {
    min-width: 0;
    max-width: 100%;
}

.brand-subtitle {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* search */
.search-box {
    min-width: 280px;
    max-width: 380px;
    flex: 0 1 380px;
    padding: 0.8rem 1rem;
    border-radius: 16px;
    background: var(--sd-surface-2);
    border: 1px solid var(--sd-border);
    gap: 0.75rem;
    cursor: pointer;
}

    .search-box input {
        width: 100%;
        min-width: 0;
        border: 0;
        background: transparent;
        color: var(--sd-text);
        cursor: pointer;
    }

        .search-box input::placeholder {
            color: var(--sd-muted);
        }

.search-shortcut {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--sd-border);
    background: rgba(255,255,255,0.28);
    color: var(--sd-muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

/* theme button */
.theme-toggle {
    border: 1px solid var(--sd-border);
    background: var(--sd-surface-2);
    color: var(--sd-text);
    border-radius: 14px;
    padding: 0.65rem 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

/* profile chip */
.profile-chip {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: rgba(255,255,255,0.14);
    border-radius: 16px;
    padding: 0.35rem 0.45rem 0.35rem 0.85rem;
    border: 1px solid var(--sd-border);
    flex: 0 1 auto;
    min-width: 0;
}

.profile-chip-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
}

    .profile-chip-text strong,
    .profile-chip-text span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .profile-chip-text strong {
        color: var(--sd-text);
        font-size: 0.92rem;
    }

    .profile-chip-text span {
        color: var(--sd-muted);
        font-size: 0.78rem;
    }

.profile-chip-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--sd-primary), #34c38f);
    color: #fff;
    font-weight: 700;
    flex: 0 0 auto;
}

/* logout */
.logout-form {
    margin: 0;
    flex: 0 0 auto;
}

.logout-btn {
    border: 1px solid var(--sd-border);
    background: var(--sd-surface-2);
    color: var(--sd-text);
    border-radius: 14px;
    padding: 0.72rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    white-space: nowrap;
}

    .logout-btn:hover,
    .logout-btn:focus-visible {
        background: var(--sd-surface-3);
        color: var(--sd-text);
    }

/* sidebar */
.sidebar {
    grid-area: sidebar;
    background: var(--sd-sidebar);
    color: var(--sd-sidebar-text);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: var(--sd-shadow);
    z-index: 35;
    justify-content: flex-start !important;
    align-items: stretch;
    align-self: stretch;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.sidebar-brand-card,
.sidebar-section-label,
.sidebar-nav {
    flex: 0 0 auto;
}

.sidebar-card {
    margin-top: auto;
    flex: 0 0 auto;
}

/* page content */
.page-content {
    grid-area: content;
    min-width: 0;
    min-height: 0;
    padding: 1.5rem !important;
    overflow-x: hidden;
    overflow-y: auto;
}

    .page-content > :first-child,
    .sd-live-hero {
        margin-top: 0 !important;
    }

    .page-content > .container-fluid,
    .page-content > .container,
    .page-content > .row {
        max-width: 100%;
    }

/* notification dropdown */
.notification-dropdown-wrap {
    position: relative;
    overflow: visible !important;
}

.notification-trigger {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    border: 1px solid rgba(130, 149, 184, 0.28);
    background: var(--sd-surface-2);
    color: var(--sd-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

    .notification-trigger:hover,
    .notification-trigger:focus {
        color: var(--sd-text);
        border-color: rgba(85, 110, 230, 0.35);
    }

    .notification-trigger i {
        font-size: 1.1rem;
    }

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 12px rgba(239, 68, 68, 0.35);
}

    .notification-badge.show {
        display: inline-flex;
    }

.notification-dropdown-panel {
    width: min(420px, calc(100vw - 24px));
    border: 1px solid rgba(130, 149, 184, 0.18);
    border-radius: 22px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
    background: var(--sd-surface);
    z-index: 1065 !important;
    margin-top: 10px !important;
}

.notification-dropdown-header,
.notification-dropdown-footer {
    padding: 16px 18px;
    background: rgba(85, 110, 230, 0.04);
}

.notification-dropdown-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid rgba(130, 149, 184, 0.14);
}

    .notification-dropdown-header h6,
    .notification-dropdown-header p {
        margin: 0;
    }

    .notification-dropdown-header p {
        margin-top: 4px;
        color: var(--sd-muted);
        font-size: 0.875rem;
    }

.notification-mark-all {
    padding: 0;
    font-size: 0.875rem;
    text-decoration: none;
}

.notification-dropdown-body {
    max-height: 420px;
    overflow-y: auto;
    padding: 6px;
}

.notification-dropdown-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    margin-bottom: 4px;
}

    .notification-dropdown-item:hover {
        background: rgba(85, 110, 230, 0.08);
        color: inherit;
    }

    .notification-dropdown-item.is-unread {
        background: rgba(85, 110, 230, 0.08);
    }

.notification-dropdown-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(85, 110, 230, 0.12);
    color: #556ee6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.notification-dropdown-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

    .notification-dropdown-copy strong,
    .notification-dropdown-copy span,
    .notification-dropdown-copy small {
        display: block;
    }

    .notification-dropdown-copy strong {
        color: var(--sd-text);
        font-size: 0.94rem;
    }

    .notification-dropdown-copy span,
    .notification-dropdown-copy small {
        color: var(--sd-muted);
        line-height: 1.45;
    }

.notification-dropdown-empty {
    padding: 36px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--sd-muted);
    text-align: center;
    gap: 10px;
}

/* page loader animation */
@keyframes supplydesk-spin {
    to {
        transform: rotate(360deg);
    }
}

/* responsive */
@media (max-width: 1199.98px) {
    .search-box {
        min-width: 220px;
        max-width: 300px;
        flex-basis: 300px;
    }
}

@media (max-width: 991.98px) {
    #layout-wrapper.app-shell {
        grid-template-columns: 1fr;
        grid-template-rows: 72px minmax(0, 1fr);
        grid-template-areas:
            "topbar"
            "content";
        height: auto;
        min-height: 100vh;
    }

    .topbar {
        height: 72px !important;
        min-height: 72px !important;
        padding: 0 1rem !important;
        gap: 0.75rem !important;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        min-height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        z-index: 60;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .page-content {
        padding: 1rem !important;
        overflow-y: visible;
    }

    .search-box {
        min-width: 0;
        max-width: 260px;
        flex-basis: 260px;
    }

    .page-overlay {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        z-index: 20;
    }

    body.sidebar-open .page-overlay {
        display: block;
    }
}

@media (max-width: 767.98px) {
    .topbar,
    .page-content {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .topbar-right {
        gap: 0.5rem !important;
    }

    .profile-chip-text,
    .logout-btn span,
    .brand-subtitle,
    .theme-toggle-label,
    .search-box {
        display: none !important;
    }

    .page-content {
        padding: 1rem !important;
    }

    .brand-wordmark {
        height: 24px;
        max-width: 160px;
    }
}

.workspace-assistant-fab {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 3.5rem;
    height: 3.5rem;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #556ee6, #7c4dff);
    color: #fff;
    box-shadow: 0 18px 45px rgba(85, 110, 230, 0.35);
    z-index: 1040;
}

.workspace-assistant-snapshot {
    display: grid;
    gap: 1rem;
}

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

.workspace-insight-card,
.workspace-alert-card,
.assistant-dashboard-insight,
.assistant-dashboard-alert {
    display: flex;
    gap: 0.85rem;
    text-decoration: none;
    border-radius: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(140, 152, 164, 0.18);
    background: rgba(255,255,255,0.75);
    color: inherit;
}

[data-bs-theme="dark"] .workspace-insight-card,
[data-bs-theme="dark"] .workspace-alert-card,
[data-bs-theme="dark"] .assistant-dashboard-insight,
[data-bs-theme="dark"] .assistant-dashboard-alert {
    background: rgba(26, 32, 44, 0.88);
}

.workspace-insight-card strong,
.assistant-dashboard-insight strong {
    display: block;
    font-size: 1.1rem;
    margin-top: 0.15rem;
}

.workspace-insight-card span,
.assistant-dashboard-insight span {
    display: block;
    color: var(--bs-secondary-color);
    font-size: 0.82rem;
}

.workspace-insight-card small,
.assistant-dashboard-insight small,
.workspace-alert-card span,
.assistant-dashboard-alert span {
    display: block;
    color: var(--bs-secondary-color);
}

.workspace-insight-icon,
.assistant-dashboard-insight-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(85, 110, 230, 0.12);
    color: #556ee6;
    flex-shrink: 0;
}

.workspace-assistant-alerts,
.assistant-dashboard-alerts {
    display: grid;
    gap: 0.75rem;
}

.workspace-alert-card i,
.assistant-dashboard-alert i {
    margin-top: 0.15rem;
    color: #556ee6;
}

.workspace-assistant-results {
    margin-top: 0.35rem;
}

.assistant-dashboard-card {
    display: grid;
    gap: 1rem;
}

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

.assistant-dashboard-body {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1rem;
}

.assistant-actions-grid {
    margin-bottom: 1rem;
}

.assistant-mini-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.tone-danger { border-color: rgba(220, 53, 69, 0.18); }
.tone-warning { border-color: rgba(255, 193, 7, 0.22); }
.tone-success { border-color: rgba(25, 135, 84, 0.18); }
.tone-info { border-color: rgba(13, 202, 240, 0.18); }
.tone-primary { border-color: rgba(85, 110, 230, 0.18); }

.btn-soft-primary {
    border: 1px solid rgba(85, 110, 230, 0.18);
    background: rgba(85, 110, 230, 0.10);
    color: #556ee6;
}

@media (max-width: 991.98px) {
    .assistant-dashboard-body {
        grid-template-columns: 1fr;
    }
}


.dashboard-activity-feed {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.dashboard-activity-item {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 0.85rem 0.95rem;
    border-radius: 1rem;
    border: 1px solid rgba(140, 152, 164, 0.18);
    background: rgba(255,255,255,0.78);
}

[data-bs-theme="dark"] .dashboard-activity-item,
html[data-theme="dark"] .dashboard-activity-item {
    background: rgba(26, 32, 44, 0.88);
}

.dashboard-activity-icon {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(85, 110, 230, 0.12);
    color: #556ee6;
    flex-shrink: 0;
}

.dashboard-activity-copy strong,
.dashboard-activity-copy span,
.dashboard-activity-copy small {
    display: block;
}

.dashboard-activity-copy span,
.dashboard-activity-copy small {
    color: var(--bs-secondary-color);
}

.dashboard-activity-copy small {
    margin-top: 0.2rem;
    font-size: 0.76rem;
}

.dashboard-activity-empty {
    color: var(--bs-secondary-color);
    padding: 1rem 0;
}

.workspace-suggestion-chip.is-live {
    box-shadow: 0 0 0 1px rgba(80, 165, 241, 0.22) inset;
}

/* force theme-aware dashboard hero in both dark and light modes */
html[data-theme="dark"] .sd-live-hero,
html[data-bs-theme="dark"] .sd-live-hero {
    background: linear-gradient(135deg, #1b2340 0%, #202b4d 100%) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28) !important;
}

html[data-theme="dark"] .sd-live-hero h1,
html[data-bs-theme="dark"] .sd-live-hero h1 {
    color: #f8fbff !important;
}

html[data-theme="dark"] .sd-live-hero p,
html[data-bs-theme="dark"] .sd-live-hero p {
    color: rgba(232, 238, 255, 0.78) !important;
}

html[data-theme="dark"] .sd-live-hero .sd-mini-stat,
html[data-bs-theme="dark"] .sd-live-hero .sd-mini-stat {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .sd-live-hero .sd-mini-stat span,
html[data-bs-theme="dark"] .sd-live-hero .sd-mini-stat span {
    color: #9fb2d9 !important;
}

html[data-theme="dark"] .sd-live-hero .sd-mini-stat strong,
html[data-bs-theme="dark"] .sd-live-hero .sd-mini-stat strong {
    color: #ffffff !important;
}

html[data-theme="dark"] .sd-live-hero .sd-mini-stat small,
html[data-bs-theme="dark"] .sd-live-hero .sd-mini-stat small {
    color: rgba(232, 238, 255, 0.68) !important;
}

html[data-theme="dark"] .sd-live-hero .badge-soft,
html[data-bs-theme="dark"] .sd-live-hero .badge-soft {
    background: rgba(100, 149, 255, 0.16) !important;
    color: #9db8ff !important;
    border: 1px solid rgba(157, 184, 255, 0.16) !important;
}

html[data-theme="dark"] .sd-live-hero .sd-hero-pills span,
html[data-bs-theme="dark"] .sd-live-hero .sd-hero-pills span {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #dce7ff !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .sd-live-hero .sd-hero-pills strong,
html[data-bs-theme="dark"] .sd-live-hero .sd-hero-pills strong {
    color: #ffffff !important;
}

html[data-theme="light"] .sd-live-hero,
html[data-bs-theme="light"] .sd-live-hero,
html:not([data-theme="dark"]) .sd-live-hero {
    background: linear-gradient(135deg, #f9fbfd 0%, #eef3fb 100%) !important;
    border-color: rgba(20, 33, 61, 0.08) !important;
}

html[data-theme="light"] .sd-live-hero .sd-mini-stat,
html[data-bs-theme="light"] .sd-live-hero .sd-mini-stat,
html:not([data-theme="dark"]) .sd-live-hero .sd-mini-stat {
    background: #ffffff !important;
    border: 1px solid rgba(20, 33, 61, 0.08) !important;
}


.app-footer {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--sd-border);
    border-radius: 18px;
    background: var(--sd-surface);
    box-shadow: var(--sd-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: var(--sd-muted);
    font-size: 0.9rem;
}

.app-footer-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.app-footer a {
    color: var(--sd-primary);
    text-decoration: none;
    font-weight: 600;
}

.app-footer a:hover {
    text-decoration: underline;
}

.info-page-shell {
    display: grid;
    gap: 1.25rem;
}

.info-page-hero {
    background: linear-gradient(135deg, rgba(85, 110, 230, 0.14), rgba(52, 195, 143, 0.12));
    border: 1px solid var(--sd-border);
    border-radius: 24px;
    padding: 1.5rem 1.5rem 1.25rem;
    box-shadow: var(--sd-shadow);
}

.info-page-hero h1 {
    margin: 0.5rem 0 0.75rem;
}

.info-page-hero p {
    margin: 0;
    max-width: 58rem;
    color: var(--sd-muted);
    line-height: 1.7;
}

.info-page-badge {
    display: inline-flex;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: var(--sd-primary-soft);
    color: var(--sd-primary);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.info-page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.info-page-card {
    background: var(--sd-surface);
    border: 1px solid var(--sd-border);
    border-radius: 22px;
    padding: 1.25rem;
    box-shadow: var(--sd-shadow);
}

.info-page-card h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.info-page-card p,
.info-page-card li {
    color: var(--sd-muted);
    line-height: 1.7;
}

@media (max-width: 767.98px) {
    .app-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

