/* ============================================================================
   HEWA EDMS - Premium Design System
   Neumorphism + Glassmorphism | 2025/2026 Enterprise Dark Theme
   Oil & Gas Engineering Document Management
   ============================================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Noto+Sans+Arabic:wght@400;500;600;700&display=swap');

/* --- CSS Custom Properties: Hewa Web Portal (Default Blue Theme) --- */
:root {
    /* Core Palette â€” Deep Ocean Blue */
    --primary: #0f1729;
    --primary-light: #1a2a4a;
    --primary-hover: #162040;
    --primary-rgb: 15, 23, 41;

    /* Accent â€” Electric Blue */
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-light: #60a5fa;
    --accent-glow: rgba(59, 130, 246, 0.4);
    --accent-rgb: 59, 130, 246;

    /* Status Colors */
    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.15);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.15);
    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.15);
    --info: #06b6d4;
    --info-light: rgba(6, 182, 212, 0.15);

    /* Dark Neutrals - Deep Navy */
    --bg-body: #0b1120;
    --bg-surface: #111827;
    --bg-card: rgba(17, 24, 39, 0.6);
    --bg-sidebar: #0d1525;
    --bg-topnav: rgba(11, 17, 32, 0.85);
    --bg-hover: rgba(255, 255, 255, 0.04);
    --bg-active: rgba(59, 130, 246, 0.1);

    /* Glass Effect */
    --glass-bg: rgba(17, 24, 39, 0.45);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(20px);
    --glass-bg-hover: rgba(255, 255, 255, 0.06);

    /* Borders */
    --border: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.04);
    --border-accent: rgba(59, 130, 246, 0.3);

    /* Text */
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-on-dark: #e2e8f0;
    --text-on-dark-muted: #94a3b8;
    --text-heading: #f1f5f9;

    /* Layout */
    --topnav-height: 52px;
    --sidebar-width: 260px;
    --sidebar-collapsed: 64px;
    --border-radius: 10px;
    --border-radius-lg: 14px;
    --border-radius-xl: 20px;
    --font-ui: 'Inter', 'Noto Sans Arabic', 'Segoe UI', Tahoma, Arial, sans-serif;
    --font-ui-rtl: 'Noto Sans Arabic', 'Segoe UI', Tahoma, Arial, sans-serif;

    /* Neumorphic Shadows (Dark) */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px var(--accent-glow);
    --neu-raised: 6px 6px 12px rgba(0, 0, 0, 0.4), -4px -4px 10px rgba(255, 255, 255, 0.03);
    --neu-inset: inset 3px 3px 8px rgba(0, 0, 0, 0.4), inset -3px -3px 8px rgba(255, 255, 255, 0.03);
    --neu-flat: 2px 2px 6px rgba(0, 0, 0, 0.3), -2px -2px 6px rgba(255, 255, 255, 0.02);

    /* Transitions */
    --transition: all .25s cubic-bezier(.4, 0, .2, 1);
    --transition-fast: all .15s cubic-bezier(.4, 0, .2, 1);
    --transition-slow: all .4s cubic-bezier(.4, 0, .2, 1);

    /* Gradient Mesh */
    --mesh-gradient: radial-gradient(ellipse at 20% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
                     radial-gradient(ellipse at 80% 20%, rgba(6, 182, 212, 0.06) 0%, transparent 50%),
                     radial-gradient(ellipse at 40% 80%, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
}

/* â•â•â•â•â•â•â• ADMIN PORTAL THEME â•â•â•â•â•â•â• */
body.theme-admin {
    --accent: #a855f7;
    --accent-hover: #9333ea;
    --accent-light: #c084fc;
    --accent-glow: rgba(168, 85, 247, 0.4);
    --accent-rgb: 168, 85, 247;
    --bg-body: #0d0b14;
    --bg-surface: #14111f;
    --bg-card: rgba(20, 17, 31, 0.6);
    --bg-sidebar: #100e1a;
    --bg-topnav: rgba(13, 11, 20, 0.85);
    --bg-active: rgba(168, 85, 247, 0.1);
    --border-accent: rgba(168, 85, 247, 0.3);
    --glass-bg: rgba(20, 17, 31, 0.45);
    --mesh-gradient: radial-gradient(ellipse at 20% 50%, rgba(168, 85, 247, 0.08) 0%, transparent 50%),
                     radial-gradient(ellipse at 80% 20%, rgba(236, 72, 153, 0.06) 0%, transparent 50%),
                     radial-gradient(ellipse at 40% 80%, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
}

/* â•â•â•â•â•â•â• VENDOR PORTAL THEME â•â•â•â•â•â•â• */
body.theme-vendor {
    --accent: #f97316;
    --accent-hover: #ea580c;
    --accent-light: #fb923c;
    --accent-glow: rgba(249, 115, 22, 0.4);
    --accent-rgb: 249, 115, 22;
    --bg-body: #0d1210;
    --bg-surface: #111f1a;
    --bg-card: rgba(17, 31, 26, 0.6);
    --bg-sidebar: #0e1713;
    --bg-topnav: rgba(13, 18, 16, 0.85);
    --bg-active: rgba(249, 115, 22, 0.1);
    --border-accent: rgba(249, 115, 22, 0.3);
    --glass-bg: rgba(17, 31, 26, 0.45);
    --mesh-gradient: radial-gradient(ellipse at 20% 50%, rgba(249, 115, 22, 0.08) 0%, transparent 50%),
                     radial-gradient(ellipse at 80% 20%, rgba(16, 185, 129, 0.06) 0%, transparent 50%),
                     radial-gradient(ellipse at 40% 80%, rgba(234, 179, 8, 0.05) 0%, transparent 50%);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-ui);
    background: var(--bg-body);
    background-image: var(--mesh-gradient);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select,
option {
    font: inherit;
    font-family: inherit;
}

html[dir="rtl"] body,
html[dir="rtl"] button,
html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select,
html[dir="rtl"] option {
    font-family: var(--font-ui-rtl);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

/* ============================================================================
   TOP NAVIGATION BAR
   ============================================================================ */
.topnav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topnav-height);
    background: var(--bg-topnav);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    z-index: 1000;
    box-shadow: 0 1px 0 var(--glass-border), var(--shadow);
    border-bottom: 1px solid var(--glass-border);
}

.topnav__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-right: 1.5rem;
    border-right: 1px solid rgba(255, 255, 255, .1);
    margin-right: 0.5rem;
}

.topnav__brand-icon {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--accent), #7c3aed);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
}

.topnav__brand-text {
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -.5px;
}

.topnav__brand-text span {
    color: var(--accent-light);
}

.topnav__menu {
    display: flex;
    list-style: none;
    gap: 2px;
    flex: 1;
}

.topnav__menu-item {
    position: relative;
}

.topnav__menu-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 1rem;
    color: var(--text-on-dark-muted);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 6px;
    transition: var(--transition);
    white-space: nowrap;
}

.topnav__menu-link:hover,
.topnav__menu-link.active {
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

.topnav__menu-link.active {
    background: rgba(59, 130, 246, .2);
    color: var(--accent-light);
}

.topnav__right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.topnav__notification {
    position: relative;
    background: none;
    border: none;
    color: var(--text-on-dark-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: var(--transition);
    font-size: 1.1rem;
}

.topnav__notification:hover {
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

.topnav__badge {
    position: absolute;
    top: 0;
    right: -2px;
    background: var(--danger);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 10px;
    line-height: 1.3;
}

.topnav__user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 4px 8px 4px 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-on-dark);
}

.topnav__user:hover {
    background: rgba(255, 255, 255, .08);
}

.topnav__avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.78rem;
    color: #fff;
}

.topnav__user-name {
    font-size: 0.82rem;
    font-weight: 500;
}

.topnav__user-caret {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 0.72rem;
    opacity: 0.72;
    flex-shrink: 0;
}

/* ============================================================================
   SIDEBAR â€” Compact Modern Design
   ============================================================================ */
.sidebar {
    position: fixed;
    top: var(--topnav-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #0f172a 0%, #162038 50%, #1a2744 100%);
    overflow-y: auto;
    z-index: 900;
    transition: var(--transition);
    border-right: 1px solid rgba(255, 255, 255, .06);
}

.sidebar::-webkit-scrollbar {
    width: 3px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .12);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

/* --- Sidebar Profile Card --- */
.sidebar__profile {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .65rem .75rem;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.sidebar__profile-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .85rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(59,130,246,.3);
}

.sidebar__profile-info { flex: 1; min-width: 0; }

.sidebar__profile-name {
    color: var(--text-on-dark);
    font-size: .78rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar__profile-role {
    color: rgba(148,163,184,.65);
    font-size: .6rem;
    text-transform: uppercase;
    letter-spacing: .6px;
}

.sidebar__theme-toggle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.1);
    background: rgba(255,255,255,.06);
    cursor: pointer;
    font-size: .75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    flex-shrink: 0;
}
.sidebar__theme-toggle:hover {
    background: rgba(59,130,246,.2);
    border-color: rgba(59,130,246,.3);
}

/* --- Projects Switcher --- */
.sidebar__project-switcher {
    padding: .35rem .75rem;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.sidebar__project-select {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    color: #fff;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: .72rem;
    width: 100%;
    cursor: pointer;
    transition: border-color .2s;
}
.sidebar__project-select:focus {
    border-color: rgba(59,130,246,.5);
    outline: none;
}

/* --- Quick Search Filter --- */
.sidebar__search {
    padding: .4rem .75rem;
    border-bottom: 1px solid rgba(255,255,255,.06);
    position: relative;
    display: flex;
    align-items: center;
}

.sidebar__search-icon {
    position: absolute;
    left: 18px;
    font-size: .65rem;
    opacity: .5;
    pointer-events: none;
}

.sidebar__search-input {
    width: 100%;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    color: #e2e8f0;
    padding: 5px 8px 5px 28px;
    border-radius: 6px;
    font-size: .72rem;
    transition: all .2s;
}
.sidebar__search-input::placeholder { color: rgba(148,163,184,.4); }
.sidebar__search-input:focus {
    outline: none;
    border-color: rgba(59,130,246,.5);
    background: rgba(255,255,255,.1);
}

/* --- Pinned Favorites --- */
.sidebar__favorites {
    padding: .25rem 0;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.sidebar__favorites-title {
    padding: .3rem .75rem;
    font-size: .6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: #fbbf24;
}

/* Pin button on nav links */
.sidebar__pin-btn {
    opacity: 0;
    margin-left: auto;
    font-size: .6rem;
    cursor: pointer;
    transition: opacity .15s;
    flex-shrink: 0;
    padding: 2px;
    border: none;
    background: none;
    color: rgba(148,163,184,.6);
}
.sidebar__nav-link:hover .sidebar__pin-btn { opacity: 1; }
.sidebar__pin-btn.pinned { opacity: 1; color: #fbbf24; }

/* --- Light theme: full design tokens (unified slate / white; no dark “glass” leftovers) --- */
body.light-theme {
    --primary: #f1f5f9;
    --primary-light: #e2e8f0;
    --primary-hover: #cbd5e1;
    --primary-rgb: 241, 245, 249;

    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-light: #3b82f6;
    --accent-glow: rgba(37, 99, 235, 0.22);
    --accent-rgb: 37, 99, 235;

    --success: #059669;
    --success-light: rgba(5, 150, 105, 0.12);
    --warning: #d97706;
    --warning-light: rgba(217, 119, 6, 0.12);
    --danger: #dc2626;
    --danger-light: rgba(220, 38, 38, 0.12);
    --info: #0284c7;
    --info-light: rgba(2, 132, 199, 0.12);

    --bg-body: #eef2f7;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-sidebar: #f8fafc;
    --bg-topnav: #ffffff;
    --bg-hover: rgba(15, 23, 42, 0.05);
    --bg-active: rgba(37, 99, 235, 0.08);

    --glass-bg: #ffffff;
    --glass-border: rgba(15, 23, 42, 0.09);
    --glass-blur: none;
    --glass-bg-hover: #f1f5f9;

    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --border-accent: rgba(37, 99, 235, 0.24);

    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-on-dark: #0f172a;
    --text-on-dark-muted: #475569;
    --text-heading: #020617;

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 8px 22px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.1);
    --neu-flat: 0 1px 2px rgba(15, 23, 42, 0.04);

    --mesh-gradient: none;

    --surface: #f8fafc;
    --surface-card: #ffffff;
    --text: #0f172a;
}

body.light-theme {
    background: var(--bg-body);
    background-image: none;
    color: var(--text-primary);
}

body.light-theme .sidebar {
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
}

body.light-theme .sidebar--admin {
    background: linear-gradient(180deg, #faf5ff 0%, #f8fafc 48%, #f1f5f9 100%);
    border-right: 1px solid rgba(139, 92, 246, 0.18);
}

body.light-theme .sidebar--vendor {
    background: linear-gradient(180deg, #ecfdf5 0%, #f8fafc 50%, #f1f5f9 100%);
    border-right: 1px solid rgba(16, 185, 129, 0.2);
}

body.light-theme .main-content {
    background: var(--bg-body);
}

body.light-theme .topnav {
    background: var(--bg-topnav);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

body.light-theme .topnav__brand {
    border-right-color: var(--border);
}

body.light-theme .topnav__brand-text {
    color: var(--text-heading);
}

body.light-theme .topnav__brand-text span {
    color: var(--accent);
}

body.light-theme .topnav__menu-link {
    color: var(--text-secondary);
}

body.light-theme .topnav__menu-link:hover,
body.light-theme .topnav__menu-link.active {
    background: var(--bg-hover);
    color: var(--text-heading);
}

body.light-theme .topnav__menu-link.active {
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-hover);
}

body.light-theme .topnav__notification,
body.light-theme .topnav__icon-btn {
    color: var(--text-secondary);
}

body.light-theme .topnav__user {
    color: var(--text-primary);
}

body.light-theme .topnav__user:hover {
    background: var(--bg-hover);
}

body.light-theme .sidebar__profile-name,
body.light-theme .sidebar__search-input,
body.light-theme .sidebar__project-select {
    color: var(--text-primary);
}

body.light-theme .sidebar__section-title {
    color: var(--accent-hover);
}

body.light-theme .sidebar__nav-link {
    color: var(--text-secondary);
}

body.light-theme .sidebar__nav-link:hover {
    background: var(--bg-hover);
    color: var(--text-heading);
}

body.light-theme .sidebar__nav-link.active {
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-hover);
}

body.light-theme .sidebar__search-input {
    background: #ffffff;
    border-color: var(--border);
}

body.light-theme .sidebar__project-select {
    background: #ffffff;
    border-color: var(--border);
    color: var(--text-primary);
}

body.light-theme .sidebar__dropdown-toggle:hover {
    background: rgba(37, 99, 235, 0.08);
    color: var(--accent-hover);
}

body.light-theme .stat-card {
    background: #ffffff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.light-theme .stat-card:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-md);
}

body.light-theme .filter-toolbar {
    background: #f8fafc;
    border-bottom-color: var(--border);
}

body.light-theme .filter-toolbar__input {
    background: #ffffff;
    border-color: var(--border);
    color: var(--text-primary);
}

body.light-theme .global-search__input {
    background: #ffffff;
    border-color: var(--border);
    color: var(--text-primary);
}

body.light-theme .global-search__input:focus {
    background: #ffffff;
    border-color: var(--accent);
}

body.light-theme .global-search__input::placeholder {
    color: var(--text-muted);
}

body.light-theme .global-search > .topnav__shortcut-chip {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.15);
    color: var(--accent-hover);
}

body.light-theme .global-search__shortcut {
    background: #f1f5f9;
    border-color: var(--border);
    color: var(--text-muted);
}

body.light-theme .dashboard-hero__content,
body.light-theme .dashboard-hero__aside {
    background: #ffffff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

body.light-theme .dashboard-hero__content::before {
    background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.07), transparent 42%);
}

body.light-theme .dashboard-hero__eyebrow-badge {
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.18);
    color: #1d4ed8;
}

body.light-theme .dashboard-hero__eyebrow-text,
body.light-theme .dashboard-hero__summary {
    color: var(--text-secondary);
}

body.light-theme .dashboard-hero .page-header__title {
    color: var(--text-heading);
}

body.light-theme .dashboard-hero .page-header__subtitle {
    color: var(--text-secondary);
}

body.light-theme .dashboard-mini-card {
    background: #f8fafc;
    border-color: var(--border);
}

body.light-theme .breadcrumb {
    color: var(--text-muted);
}

body.light-theme .breadcrumb a {
    color: var(--text-secondary);
}


.sidebar__section {
    padding: .1rem 0;
}

/* --- Nested Sub-tabs (Assai Design/Supplier style) --- */
.sidebar__subtab { margin: 0; }

.sidebar__subtab-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .3rem .75rem .3rem 1.1rem;
    font-size: .7rem;
    font-weight: 600;
    color: rgba(148,163,184,.85);
    cursor: pointer;
    user-select: none;
    transition: background .15s, color .15s;
    border-left: 2px solid transparent;
}
.sidebar__subtab-toggle:hover {
    background: rgba(59,130,246,.1);
    color: #93c5fd;
    border-left-color: rgba(59,130,246,.3);
}
.sidebar__subtab-toggle .sidebar__chevron { font-size: .55rem; }
.sidebar__subtab-toggle.collapsed .sidebar__chevron { transform: rotate(-90deg); }

.sidebar__subtab-content {
    overflow: hidden;
    max-height: 600px;
    transition: max-height .25s cubic-bezier(.4,0,.2,1), opacity .2s ease;
    opacity: 1;
    border-left: 2px solid rgba(59,130,246,.12);
    margin-left: .75rem;
}
.sidebar__subtab-content.collapsed {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}
.sidebar__subtab-content .sidebar__nav-link {
    padding-left: 1.4rem;
    font-size: .8rem;
}

/* New badge for new items */
.sidebar__new-badge {
    font-size: .5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    padding: 1px 5px;
    border-radius: 6px;
    margin-left: 6px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.sidebar__section-title {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .4rem .75rem;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--accent-light);
    background: linear-gradient(90deg, rgba(59, 130, 246, .08), transparent);
    border-left: 2px solid var(--accent);
    margin-top: .15rem;
}

.sidebar__section-title::before {
    content: '';
    display: none;
}

.sidebar__nav {
    list-style: none;
}

.sidebar__nav-item {}

.sidebar__nav-link {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem .75rem .35rem 1.1rem;
    color: rgba(148, 163, 184, .8);
    font-size: 0.85rem;
    font-weight: 400;
    transition: all .15s ease;
    border-left: 2px solid transparent;
    position: relative;
}

.sidebar__nav-link:hover {
    background: rgba(255, 255, 255, .04);
    color: #e2e8f0;
    border-left-color: rgba(59, 130, 246, .4);
}

.sidebar__nav-link.active {
    background: rgba(59, 130, 246, .08);
    color: var(--accent-light);
    border-left-color: var(--accent);
    font-weight: 500;
}

.sidebar__nav-link .icon {
    font-size: .85rem;
    width: 18px;
    text-align: center;
    opacity: .8;
}

.sidebar__nav-link:hover .icon {
    opacity: 1;
}

.sidebar__nav-badge {
    margin-left: auto;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 8px;
    line-height: 1.3;
    box-shadow: 0 1px 3px rgba(239, 68, 68, .3);
}

/* --- Sidebar Collapsible Dropdown --- */
.sidebar__dropdown-toggle {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .55rem .75rem;
    font-size: 0.72rem;
    min-height: 32px;
    transition: background .2s ease, color .2s ease;
    border-bottom: 1px solid rgba(255,255,255,.04);
}

.sidebar__dropdown-toggle:hover {
    background: rgba(59, 130, 246, .18);
    color: #93c5fd;
}

.sidebar__dropdown-toggle:active {
    background: rgba(59, 130, 246, .25);
}

.sidebar__chevron {
    font-size: 0.65rem;
    transition: transform .25s cubic-bezier(.4,0,.2,1);
    opacity: .7;
    margin-left: auto;
    flex-shrink: 0;
}

.sidebar__dropdown-toggle.collapsed .sidebar__chevron {
    transform: rotate(-90deg);
}

.sidebar__dropdown-content {
    overflow: hidden;
    max-height: 800px;
    transition: max-height .3s cubic-bezier(.4,0,.2,1), opacity .2s ease;
    opacity: 1;
}

.sidebar__dropdown-content.collapsed {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}

/* Item count badge on collapsed section headers */
.sidebar__section-count {
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, .2);
    color: rgba(148, 163, 184, .9);
    font-size: 0.55rem;
    font-weight: 600;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    margin-left: auto;
    margin-right: 4px;
}

/* Expand/collapse all button */
.sidebar__toggle-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 10px;
    margin: 4px 8px;
    background: rgba(59, 130, 246, .08);
    border: 1px solid rgba(59, 130, 246, .15);
    border-radius: 6px;
    color: rgba(148, 163, 184, .8);
    font-size: 0.65rem;
    cursor: pointer;
    transition: all .2s;
}
.sidebar__toggle-all:hover {
    background: rgba(59, 130, 246, .15);
    color: #93c5fd;
}


/* ============================================================================
   SIDEBAR NAVIGATION - Developer Guide v1.0.0 (Assai-Style Accordion)
   ============================================================================ */

/* Sidebar wrapper â€” overrides existing .sidebar when <nav> is inside */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.sidebar-header {
  background: #1e3a6e;
  color: #ffffff;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid #1a3260;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.nav-level-1 {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
}

/* Level 1 â€” Main Tab Buttons */
.nav-main-tab-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,.06);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #e2e8f0);
  text-align: left;
  transition: background-color 0.15s ease;
  gap: 8px;
  font-family: inherit;
}

.nav-main-tab-btn:hover {
  background-color: rgba(255,255,255,.04);
}

/* Active state â€” when the tab is open */
.nav-main-tab-btn[aria-expanded="true"] {
  background-color: #2563eb;
  color: #ffffff;
}

.nav-main-tab-btn[aria-expanded="true"]:hover {
  background-color: #1d4ed8;
}

/* Tab Number Badge — Option G: Colored circular badge per tab */
.tab-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  transition: background-color 0.15s, color 0.15s;
}

/* Per-tab badge colors (using data-tab-id on parent button) */
[data-tab-id="documents"] .tab-number    { background: rgba(37,99,235,.2);  color: #60a5fa; }
[data-tab-id="distribution"] .tab-number { background: rgba(13,148,136,.2); color: #2dd4bf; }
[data-tab-id="correspondence"] .tab-number { background: rgba(99,102,241,.2); color: #a5b4fc; }
[data-tab-id="queries"] .tab-number      { background: rgba(217,119,6,.2);  color: #fbbf24; }
[data-tab-id="archiving"] .tab-number    { background: rgba(100,116,139,.2); color: #94a3b8; }
[data-tab-id="planning"] .tab-number     { background: rgba(5,150,105,.2);  color: #34d399; }
[data-tab-id="assets"] .tab-number       { background: rgba(234,88,12,.2);  color: #fb923c; }
[data-tab-id="concurrent"] .tab-number   { background: rgba(225,29,72,.2);  color: #fb7185; }
[data-tab-id="workflow"] .tab-number     { background: rgba(124,58,237,.2); color: #a78bfa; }
[data-tab-id="admin"] .tab-number        { background: rgba(30,58,110,.25); color: #93c5fd; }
[data-tab-id="general"] .tab-number      { background: rgba(14,165,233,.2); color: #38bdf8; }

/* When tab is active (expanded), badge becomes white-on-white-tinted */
[aria-expanded="true"] .tab-number {
  background: rgba(255,255,255,.2);
  color: #ffffff;
}


/* Level 2 â€” Sub-Tab Buttons & Direct Links */
.nav-level-2 {
  list-style: none;
  padding: 0;
  margin: 0;
  background-color: rgba(255,255,255,.02);
}

.nav-sub-tab-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px 8px 22px;
  background: none;
  border: none;
  border-top: 1px solid rgba(255,255,255,.04);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary, #94a3b8);
  text-align: left;
  transition: background-color 0.15s ease;
  font-family: inherit;
}

.nav-sub-tab-btn:hover {
  background-color: rgba(59,130,246,.08);
  color: var(--accent-light, #93c5fd);
}

.nav-sub-tab-btn[aria-expanded="true"] {
  background-color: rgba(59,130,246,.12);
  color: var(--accent-light, #93c5fd);
}

/* Direct link at level 2 (no chevron, has dot indicator) */
.nav-direct-link-a {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px 8px 22px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary, #94a3b8);
  text-decoration: none;
  border-top: 1px solid rgba(255,255,255,.04);
  transition: background-color 0.15s, color 0.15s;
}

.nav-direct-link-a:hover {
  background-color: rgba(255,255,255,.04);
  color: var(--text-primary, #e2e8f0);
}

.nav-direct-link-a.active {
  background-color: rgba(59,130,246,.1);
  color: var(--accent-light, #93c5fd);
}

/* Dot indicator for direct links */
.dot-indicator {
  display: inline-block;
  width: 5px;
  height: 5px;
  border: 1.5px solid rgba(148,163,184,.4);
  border-radius: 50%;
  flex-shrink: 0;
}

.nav-direct-link-a.active .dot-indicator {
  border-color: var(--accent-light, #93c5fd);
  background: rgba(59,130,246,.3);
}

/* Level 3 â€” Items */
.nav-level-3 {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-item-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px 6px 34px;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-secondary, #94a3b8);
  text-decoration: none;
  border-top: 1px solid rgba(255,255,255,.03);
  transition: background-color 0.12s, color 0.12s;
}

.nav-item-link::before {
  content: '';
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(148,163,184,.3);
  flex-shrink: 0;
}

.nav-item-link:hover {
  background-color: rgba(255,255,255,.04);
  color: var(--text-primary, #e2e8f0);
}

/* Active/current page */
.nav-item-link.active {
  background-color: rgba(59,130,246,.1);
  color: var(--accent-light, #93c5fd);
  font-weight: 600;
}
.nav-item-link.active::before {
  background: var(--accent-light, #93c5fd);
}

/* Expandable L3 item button */
.nav-item-exp-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px 6px 34px;
  background: none;
  border: none;
  border-top: 1px solid rgba(255,255,255,.03);
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary, #94a3b8);
  text-align: left;
  transition: background-color 0.12s;
  font-family: inherit;
}

.nav-item-exp-btn:hover {
  background-color: rgba(255,255,255,.04);
}

/* Level 4 â€” Sub-Items (Deepest Level) */
.nav-level-4 {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-sub-item-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px 5px 48px;
  font-size: 11px;
  font-weight: 400;
  color: rgba(148,163,184,.7);
  text-decoration: none;
  border-top: 1px solid rgba(255,255,255,.02);
  transition: background-color 0.12s, color 0.12s;
}

.nav-sub-item-link::before {
  content: '\2013';
  font-size: 9px;
  opacity: .4;
  margin-right: 2px;
}

.nav-sub-item-link:hover {
  background-color: rgba(255,255,255,.04);
  color: var(--text-secondary, #94a3b8);
}

/* Chevron Icon (CSS Only â€” No Image Required) */
.chevron-icon {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transform-origin: center;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  opacity: 0.4;
  margin-top: -2px;
}

/* Rotated when parent button is aria-expanded="true" */
button[aria-expanded="true"] .chevron-icon {
  transform: rotate(225deg);
  margin-top: 2px;
}

/* Panel (Collapsed / Expanded) */
.nav-panel[hidden] {
  display: none;
}

.nav-panel {
  display: block;
  animation: navSlideDown 0.18s ease-out;
}

@keyframes navSlideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Light Theme Overrides for Sidebar Navigation --- */

body.light-theme .sidebar-header {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    color: var(--text-heading);
    border-bottom: 1px solid var(--border);
}

body.light-theme .sidebar-subtitle,
body.light-theme .sidebar__profile-role {
    color: var(--text-muted);
}

body.light-theme .sidebar-header__badge,
body.light-theme .admin-sidebar__version,
body.light-theme .vendor-sidebar__version {
    border-color: var(--border);
    background: #ffffff;
    color: var(--text-secondary);
}

body.light-theme .admin-sidebar__title {
    color: var(--text-heading);
}

body.light-theme .admin-sidebar__back-link {
    color: var(--text-secondary);
    border-bottom-color: var(--border);
}

body.light-theme .admin-sidebar__back-link:hover {
    color: var(--accent-hover);
    background: var(--bg-hover);
}

/* Sidebar profile & project switcher in light mode */
body.light-theme .sidebar__profile { border-bottom: 1px solid #e5e7eb; }
body.light-theme .sidebar__project-switcher { border-bottom: 1px solid #e5e7eb; }

/* L1 -- Main Tab Buttons */
body.light-theme .nav-main-tab-btn {
  color: #1e293b;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}
body.light-theme .nav-main-tab-btn:hover {
  background-color: #f0f4ff;
  color: #1d4ed8;
}
body.light-theme .nav-main-tab-btn[aria-expanded="true"] {
  background-color: #2563eb;
  color: #ffffff;
}
body.light-theme .nav-main-tab-btn[aria-expanded="true"]:hover {
  background-color: #1d4ed8;
}

/* L2 -- Sub-Tab Buttons & Panel Background */
body.light-theme .nav-level-2 { background-color: #f8fafc; }
body.light-theme .nav-sub-tab-btn {
  color: #334155;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}
body.light-theme .nav-sub-tab-btn:hover {
  background-color: #eef2ff;
  color: #1d4ed8;
}
body.light-theme .nav-sub-tab-btn[aria-expanded="true"] {
  background-color: #dbeafe;
  color: #1d4ed8;
  font-weight: 700;
}

/* L2 -- Direct Links */
body.light-theme .nav-direct-link-a {
  color: #334155;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}
body.light-theme .nav-direct-link-a:hover {
  background-color: #eef2ff;
  color: #1d4ed8;
}
body.light-theme .nav-direct-link-a.active {
  background-color: #dbeafe;
  color: #1e3a8a;
  font-weight: 600;
}
body.light-theme .dot-indicator { border-color: #6b7280; }
body.light-theme .nav-direct-link-a.active .dot-indicator {
  border-color: #1e3a8a;
  background: rgba(37,99,235,.3);
}

/* L3 -- Item Links */
body.light-theme .nav-item-link {
  color: #374151;
  border-top: 1px solid #e5e7eb;
  background: #f1f5f9;
}
body.light-theme .nav-item-link:hover {
  background-color: #e0e7ff;
  color: #1d4ed8;
}
body.light-theme .nav-item-link.active {
  background-color: #bfdbfe;
  color: #1e3a8a;
  font-weight: 600;
}
body.light-theme .nav-item-link::before { background: #6b7280; }
body.light-theme .nav-item-link.active::before { background: #1d4ed8; }

/* L3 -- Expandable Items */
body.light-theme .nav-item-exp-btn {
  color: #334155;
  border-top: 1px solid #e5e7eb;
  background: #f1f5f9;
}
body.light-theme .nav-item-exp-btn:hover {
  background-color: #e0e7ff;
}

/* L4 -- Sub-Item Links */
body.light-theme .nav-sub-item-link {
  color: #4b5563;
  border-top: 1px solid #e5e7eb;
  background: #eef2ff;
}
body.light-theme .nav-sub-item-link:hover {
  background-color: #dbeafe;
  color: #1e40af;
}
body.light-theme .nav-sub-item-link::before { color: #6b7280; }

/* Chevron -- darker for visibility */
body.light-theme .chevron-icon { opacity: 0.6; }

/* Collapse button in light mode */
body.light-theme .sidebar__collapse-btn {
  color: #475569;
  border-top: 1px solid #e5e7eb;
}

/* Scrollbar in light mode */
body.light-theme .sidebar::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,.15);
}

/* Light theme -- badge colors (stronger for readability on white bg) */
body.light-theme [data-tab-id="documents"] .tab-number    { background: rgba(37,99,235,.15);  color: #1d4ed8; }
body.light-theme [data-tab-id="distribution"] .tab-number { background: rgba(13,148,136,.15); color: #0f766e; }
body.light-theme [data-tab-id="correspondence"] .tab-number { background: rgba(99,102,241,.15); color: #4f46e5; }
body.light-theme [data-tab-id="queries"] .tab-number      { background: rgba(217,119,6,.15);  color: #b45309; }
body.light-theme [data-tab-id="archiving"] .tab-number    { background: rgba(100,116,139,.15); color: #475569; }
body.light-theme [data-tab-id="planning"] .tab-number     { background: rgba(5,150,105,.15);  color: #047857; }
body.light-theme [data-tab-id="assets"] .tab-number       { background: rgba(234,88,12,.15);  color: #c2410c; }
body.light-theme [data-tab-id="concurrent"] .tab-number   { background: rgba(225,29,72,.15);  color: #be123c; }
body.light-theme [data-tab-id="workflow"] .tab-number      { background: rgba(124,58,237,.15); color: #6d28d9; }
body.light-theme [data-tab-id="admin"] .tab-number        { background: rgba(30,58,110,.15);  color: #1e3a6e; }
body.light-theme [data-tab-id="general"] .tab-number      { background: rgba(14,165,233,.15); color: #0369a1; }

/* ============================================================================
   MAIN CONTENT AREA
   ============================================================================ */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--topnav-height);
    padding: 1.25rem 1.5rem;
    min-height: calc(100vh - var(--topnav-height));
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.main-content__body {
    flex: 1 0 auto;
}

/* ============================================================================
   PAGE HEADER
   ============================================================================ */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-header__title .icon {
    color: var(--accent);
}

.page-header__subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ============================================================================
   CARDS
   ============================================================================ */
.card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card__header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card__body {
    padding: 1.25rem;
}

.card__footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border-light);
    background: var(--bg-hover);
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

/* --- Stat Cards (Dashboard) --- */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--border-radius-lg);
    padding: 1.25rem;
    border: 1px solid var(--glass-border);
    box-shadow: var(--neu-flat);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    border-radius: 0 3px 3px 0;
}

.stat-card:hover {
    box-shadow: var(--shadow-md), 0 0 15px rgba(var(--accent-rgb), 0.1);
    transform: translateY(-2px);
    border-color: var(--border-accent);
}

.stat-card--blue::before {
    background: var(--accent);
}

.stat-card--green::before {
    background: var(--success);
}

.stat-card--orange::before {
    background: var(--warning);
}

.stat-card--red::before {
    background: var(--danger);
}

.stat-card--purple::before {
    background: #8b5cf6;
}

.stat-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.stat-card--blue .stat-card__icon {
    background: var(--info-light);
    color: var(--accent);
}

.stat-card--green .stat-card__icon {
    background: var(--success-light);
    color: var(--success);
}

.stat-card--orange .stat-card__icon {
    background: var(--warning-light);
    color: var(--warning);
}

.stat-card--red .stat-card__icon {
    background: var(--danger-light);
    color: var(--danger);
}

.stat-card--purple .stat-card__icon {
    background: #ede9fe;
    color: #8b5cf6;
}

.stat-card__info {
    flex: 1;
}

.stat-card__label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-card__value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

.stat-card__detail {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ============================================================================
   DATA TABLE
   ============================================================================ */
.data-table-wrap {
    overflow-x: auto;
    border-radius: var(--border-radius-lg);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.data-table thead {
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 1;
}

.data-table th {
    padding: 0.65rem 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: rgba(59, 130, 246, .03);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table__doc-num {
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
}

.data-table__doc-num:hover {
    text-decoration: underline;
}

/* ============================================================================
   BADGES / STATUS PILLS
   ============================================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.badge--draft {
    background: #f1f5f9;
    color: #475569;
}

.badge--review {
    background: #fef3c7;
    color: #92400e;
}

.badge--approved {
    background: #d1fae5;
    color: #065f46;
}

.badge--active {
    background: #d1fae5;
    color: #065f46;
}

.badge--sent {
    background: #dbeafe;
    color: #1e40af;
}

.badge--received {
    background: #d1fae5;
    color: #065f46;
}

.badge--open {
    background: #dbeafe;
    color: #1e40af;
}

.badge--closed {
    background: #f1f5f9;
    color: #475569;
}

.badge--overdue {
    background: #fee2e2;
    color: #991b1b;
}

.badge--high {
    background: #fee2e2;
    color: #991b1b;
}

.badge--normal {
    background: #dbeafe;
    color: #1e40af;
}

.badge--low {
    background: #f1f5f9;
    color: #475569;
}

.badge--critical {
    background: #fee2e2;
    color: #991b1b;
}

.badge--incoming {
    background: #dbeafe;
    color: #1e40af;
}

.badge--outgoing {
    background: #ede9fe;
    color: #5b21b6;
}

/* ============================================================================
   BUTTONS
   ============================================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    font-family: inherit;
    text-decoration: none;
}

.btn--primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.btn--primary:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn--secondary {
    background: #fff;
    color: var(--text-primary);
    border-color: var(--border);
}

.btn--secondary:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
    color: var(--accent);
}

.btn--success {
    background: var(--success);
    color: #fff;
}

.btn--success:hover {
    background: #059669;
    color: #fff;
}

.btn--danger {
    background: var(--danger);
    color: #fff;
}

.btn--danger:hover {
    background: #dc2626;
    color: #fff;
}

.btn--ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn--ghost:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn--sm {
    padding: 0.3rem 0.65rem;
    font-size: 0.75rem;
}

.btn--lg {
    padding: 0.65rem 1.5rem;
    font-size: 0.9rem;
}

.btn-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ============================================================================
   FORMS
   ============================================================================ */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: inherit;
    color: var(--text-primary);
    background: #fff;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .12);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-row--3 {
    grid-template-columns: repeat(3, 1fr);
}

.form-row--4 {
    grid-template-columns: repeat(4, 1fr);
}

/* --- Search/Filter Panel --- */
.filter-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-lg);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.filter-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.filter-panel__title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-panel__actions {
    display: flex;
    gap: 0.5rem;
}

/* ============================================================================
   LOGIN PAGE â€” Glassmorphism + Neumorphism Hybrid
   ============================================================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1a4e 25%, #0d253f 50%, #16213e 75%, #0a0e27 100%);
    background-size: 400% 400%;
    animation: loginGradient 12s ease infinite;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59, 130, 246, .2) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    border-radius: 50%;
    animation: loginOrb1 8s ease-in-out infinite;
}

.login-page::after {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(124, 58, 237, .18) 0%, transparent 70%);
    bottom: -80px;
    left: -80px;
    border-radius: 50%;
    animation: loginOrb2 10s ease-in-out infinite;
}

@keyframes loginGradient {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@keyframes loginOrb1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-40px, 30px) scale(1.15);
    }
}

@keyframes loginOrb2 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(30px, -40px) scale(1.1);
    }
}

.login-card {
    width: 100%;
    max-width: 440px;
    /* Glassmorphism: frosted glass */
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 80px rgba(59, 130, 246, 0.06);
    overflow: hidden;
    position: relative;
    z-index: 1;
    animation: loginCardIn .6s cubic-bezier(.16, 1, .3, 1);
}

@keyframes loginCardIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-card__header {
    background: linear-gradient(135deg, rgba(59, 130, 246, .12), rgba(124, 58, 237, .1));
    padding: 2rem 2rem 1.5rem;
    text-align: center;
    position: relative;
}

.login-card__header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .15), transparent);
}

.login-card__logo {
    width: 68px;
    height: 68px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #3b82f6, #7c3aed, #06b6d4);
    background-size: 200% 200%;
    animation: logoGlow 4s ease infinite;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    box-shadow:
        0 10px 30px rgba(59, 130, 246, .3),
        0 0 20px rgba(59, 130, 246, .15);
    /* Neumorphism: soft raised effect */
    position: relative;
}

@keyframes logoGlow {

    0%,
    100% {
        background-position: 0% 50%;
        box-shadow: 0 10px 30px rgba(59, 130, 246, .3), 0 0 20px rgba(59, 130, 246, .15);
    }

    50% {
        background-position: 100% 50%;
        box-shadow: 0 10px 30px rgba(124, 58, 237, .3), 0 0 30px rgba(124, 58, 237, .2);
    }
}

.login-card__title {
    color: #fff;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -.5px;
}

.login-card__subtitle {
    color: rgba(255, 255, 255, .45);
    font-size: 0.82rem;
    margin-top: 4px;
    font-weight: 300;
}

.login-card__body {
    padding: 2rem;
}

/* Neumorphic form controls on login page */
.login-card__body .form-group {
    margin-bottom: 1.25rem;
}

.login-card__body .form-label {
    color: rgba(255, 255, 255, .5);
    font-size: .72rem;
    letter-spacing: .8px;
    text-transform: uppercase;
    font-weight: 500;
}

.login-card__body .form-control {
    /* Neumorphism inset effect on dark glass */
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: .7rem 1rem;
    color: #fff;
    font-size: .9rem;
    box-shadow:
        inset 2px 2px 4px rgba(0, 0, 0, .3),
        inset -1px -1px 3px rgba(255, 255, 255, .04);
    transition: all .25s ease;
}

.login-card__body .form-control:focus {
    border-color: rgba(59, 130, 246, .5);
    box-shadow:
        inset 2px 2px 4px rgba(0, 0, 0, .3),
        inset -1px -1px 3px rgba(255, 255, 255, .04),
        0 0 15px rgba(59, 130, 246, .15);
    background: rgba(0, 0, 0, 0.25);
}

.login-card__body .form-control::placeholder {
    color: rgba(255, 255, 255, .25);
}

.login-card__body .btn--primary {
    /* Neumorphic raised button */
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    border-radius: 12px;
    padding: .75rem 1.5rem;
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: .3px;
    box-shadow:
        0 4px 15px rgba(59, 130, 246, .35),
        0 0 20px rgba(59, 130, 246, .1),
        inset 0 1px 0 rgba(255, 255, 255, .15);
    transition: all .25s ease;
}

.login-card__body .btn--primary:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 25px rgba(59, 130, 246, .4),
        0 0 30px rgba(59, 130, 246, .15),
        inset 0 1px 0 rgba(255, 255, 255, .2);
}

/* Login remember me */
.login-card__body input[type="checkbox"] {
    accent-color: var(--accent);
}

.login-card__body label[for="rememberMe"] {
    color: rgba(255, 255, 255, .4) !important;
}

.login-card__footer {
    padding: .75rem 2rem;
    text-align: center;
    background: rgba(0, 0, 0, .15);
    font-size: 0.72rem;
    color: rgba(255, 255, 255, .25);
    border-top: 1px solid rgba(255, 255, 255, .06);
}

.login-card__body a {
    color: var(--accent-light);
}

.login-card__body a:hover {
    color: #fff;
}

/* ============================================================================
   EMPTY STATE
   ============================================================================ */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state__icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: .3;
}

.empty-state__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.empty-state__text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* ============================================================================
   VALIDATION
   ============================================================================ */
.validation-message,
.text-danger {
    color: var(--danger);
    font-size: 0.75rem;
    margin-top: 3px;
}

.input-validation-error {
    border-color: var(--danger) !important;
}

/* ============================================================================
   DETAIL VIEW
   ============================================================================ */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.detail-group {
    margin-bottom: 0.75rem;
}

.detail-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.detail-value {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* ============================================================================
   TABS
   ============================================================================ */
.tabs {
    display: flex;
    gap: 2px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1rem;
}

.tab {
    padding: 0.6rem 1.25rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: inherit;
}

.tab:hover {
    color: var(--accent);
}

.tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    font-weight: 600;
}

/* ============================================================================
   TOAST NOTIFICATIONS
   ============================================================================ */
.toast-container {
    position: fixed;
    top: calc(var(--topnav-height) + 1rem);
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--accent);
    min-width: 280px;
    max-width: 400px;
    animation: slideInRight .3s ease;
}

.toast--success {
    border-left-color: var(--success);
}

.toast--error {
    border-left-color: var(--danger);
}

.toast--warning {
    border-left-color: var(--warning);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================================================
   TIMELINE (Revisions)
   ============================================================================ */
.timeline {
    position: relative;
    padding-left: 1.5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline__item {
    position: relative;
    margin-bottom: 1.25rem;
    padding-left: 1.25rem;
}

.timeline__item::before {
    content: '';
    position: absolute;
    left: -1.55rem;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid #fff;
    box-shadow: var(--shadow-sm);
}

.timeline__date {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

.timeline__title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.timeline__text {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .form-row--3,
    .form-row--4 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .topnav__menu {
        display: none;
    }

    .stat-cards {
        grid-template-columns: 1fr 1fr;
    }

    .form-row,
    .form-row--3,
    .form-row--4 {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================================
   FILE UPLOAD
   ============================================================================ */
.file-upload {
    border: 2px dashed var(--border);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.file-upload:hover,
.file-upload.dragover {
    border-color: var(--accent);
    background: rgba(var(--accent-rgb), .03);
}

.file-upload__icon {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.file-upload__text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.file-upload__hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============================================================================
   PAGINATION
   ============================================================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 1rem;
    list-style: none;
}

.pagination__item {}

.pagination__link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.pagination__link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.pagination__link.active {
    background: var(--accent);
    color: #fff;
}

/* ============================================================================
   ACTION MENU (dropdown)
   ============================================================================ */
.action-menu {
    position: relative;
    display: inline-block;
}

.action-menu__trigger {
    background: none;
    border: 1px solid var(--border);
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.action-menu__trigger:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
}

.action-menu__dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    min-width: 160px;
    z-index: 100;
    padding: 4px;
}

.action-menu__dropdown.show {
    display: block;
}

.action-menu__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    font-size: 0.82rem;
    color: var(--text-primary);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    width: 100%;
    background: none;
    border: none;
    font-family: inherit;
    text-decoration: none;
}

.action-menu__item:hover {
    background: var(--bg-hover);
    color: var(--accent);
}

.action-menu__item--danger:hover {
    background: var(--danger-light);
    color: var(--danger);
}

/* ============================================================================
   LIGHT THEME OVERRIDES
   ============================================================================ */
[data-theme="light"] {
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-topnav: #0f172a;
    --bg-hover: #f1f5f9;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
}

[data-theme="dark"] {
    --bg-body: #0c1222;
    --bg-card: #1a2744;
    --bg-sidebar: #0f1b33;
    --bg-topnav: #070d1a;
    --bg-hover: #1e3050;
    --border: #2d4a7a;
    --border-light: #1e3a5e;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
}

[data-theme="dark"] .card {
    background: var(--bg-card);
    border-color: var(--border);
}

[data-theme="dark"] .data-table th {
    background: rgba(15, 23, 42, .7);
    color: #94a3b8;
}

[data-theme="dark"] .data-table td {
    border-bottom-color: var(--border);
    color: var(--text-primary);
}

[data-theme="dark"] .data-table tbody tr:hover {
    background: var(--bg-hover);
}

[data-theme="dark"] .form-control {
    background: rgba(15, 23, 42, .5);
    border-color: var(--border);
    color: var(--text-primary);
}

[data-theme="dark"] .page-header__title,
[data-theme="dark"] .card__title {
    color: var(--text-primary);
}

[data-theme="dark"] .page-header__subtitle {
    color: var(--text-secondary);
}

[data-theme="dark"] .stat-card {
    background: var(--bg-card);
    border-color: var(--border);
}

/* ============================================================================
   TOAST NOTIFICATIONS
   ============================================================================ */
#toast-container {
    position: fixed;
    top: 56px;
    right: 16px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 380px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #1e293b;
    color: #e2e8f0;
    font-size: .85rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .3);
    transform: translateX(120%);
    transition: transform .3s cubic-bezier(.16, 1, .3, 1), opacity .3s;
    opacity: 0;
    border-left: 4px solid #3b82f6;
}

.toast--show {
    transform: translateX(0);
    opacity: 1;
}

.toast--success {
    border-left-color: #10b981;
}

.toast--error {
    border-left-color: #ef4444;
}

.toast--warning {
    border-left-color: #f59e0b;
}

.toast--info {
    border-left-color: #3b82f6;
}

.toast__icon {
    font-size: 1.1rem;
}

.toast__msg {
    flex: 1;
}

.toast__close {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: .85rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.toast__close:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, .1);
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background .2s;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, .1);
}

/* PWA Install Button */
.pwa-install-btn {
    display: none;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #fff;
    border: none;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: .75rem;
    cursor: pointer;
    font-weight: 600;
    transition: opacity .2s;
}

.pwa-install-btn:hover {
    opacity: .85;
}

/* ============================================================================
   DROPDOWNS (User Menu, Language Switcher)
   ============================================================================ */
.topnav__dropdown-btn {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: 4px 10px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 6px;
    color: #fff;
    font-size: .78rem;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}

.topnav__dropdown-btn:hover {
    background: rgba(255, 255, 255, .12);
}

.dropdown__menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    padding: 4px 0;
    animation: dropdownIn .15s ease;
}

.dropdown__menu.show {
    display: block;
}

.dropdown__menu--right {
    right: 0;
    left: auto;
}

@keyframes dropdownIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown__header {
    padding: 8px 12px 2px;
    font-weight: 700;
    font-size: .82rem;
    color: var(--text-primary);
}

.dropdown__sub {
    padding: 0 12px 6px;
    font-size: .72rem;
    color: var(--text-muted);
}

.dropdown__divider {
    height: 1px;
    background: var(--border-light);
    margin: 4px 0;
}

.dropdown__item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: 7px 12px;
    font-size: .8rem;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    transition: background .1s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.dropdown__item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    min-width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(148, 163, 184, .14);
    color: var(--text-secondary);
    font-size: .78rem;
    line-height: 1;
}

.dropdown__item:hover {
    background: var(--bg-hover);
}

.dropdown__item:hover .dropdown__item-icon {
    color: var(--text-primary);
    border-color: rgba(96, 165, 250, .22);
}

.dropdown__item--active {
    background: rgba(59, 130, 246, .08);
    color: var(--accent);
    font-weight: 600;
}

.dropdown__item--danger:hover {
    background: rgba(239, 68, 68, .08);
    color: var(--danger);
}

.dropdown__item--danger:hover .dropdown__item-icon {
    color: var(--danger);
    border-color: rgba(239, 68, 68, .18);
    background: rgba(239, 68, 68, .08);
}

/* ============================================================================
   HAMBURGER (Mobile Sidebar Toggle)
   ============================================================================ */
.topnav__hamburger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 6px;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background .15s;
}

.topnav__hamburger:hover {
    background: rgba(255, 255, 255, .15);
}

/* ============================================================================
   SIDEBAR COLLAPSE
   ============================================================================ */
.sidebar {
    transition: transform .25s ease, width .25s ease;
}

.sidebar--collapsed {
    transform: translateX(-100%);
}

body.sidebar-collapsed .main-content {
    margin-left: 0;
}

.sidebar__collapse-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 8px;
    background: rgba(255, 255, 255, .04);
    border: none;
    border-top: 1px solid rgba(255, 255, 255, .06);
    color: rgba(148, 163, 184, .6);
    font-size: .75rem;
    cursor: pointer;
    transition: background .15s;
}

.sidebar__collapse-btn:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

/* â•â•â•â•â•â•â• COLLAPSED SIDEBAR â€” Icon-Only Mode â•â•â•â•â•â•â• */
.sidebar--collapsed {
    width: var(--sidebar-collapsed) !important;
    overflow: visible;
}
.sidebar--collapsed .sidebar__profile,
.sidebar--collapsed .sidebar__project-switcher,
.sidebar--collapsed .sidebar__search,
.sidebar--collapsed .sidebar__favorites,
.sidebar--collapsed .sidebar__toggle-all,
.sidebar--collapsed .sidebar__collapse-btn:last-of-type,
.sidebar--collapsed .sidebar__subtab,
.sidebar--collapsed .sidebar__chevron,
.sidebar--collapsed .sidebar__new-badge,
.sidebar--collapsed .sidebar__pin-btn,
.sidebar--collapsed .sidebar__item-count {
    display: none !important;
}
.sidebar--collapsed .sidebar__dropdown-content {
    display: none !important;
}
.sidebar--collapsed .sidebar__section-title {
    padding: 10px 0;
    justify-content: center;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    cursor: pointer;
    position: relative;
}
.sidebar--collapsed .sidebar__section-title span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-size: 1.1rem;
}
/* Tooltip on hover for collapsed */
.sidebar--collapsed .sidebar__section-title::after {
    content: attr(data-label);
    position: absolute;
    left: 68px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-surface);
    color: var(--text-primary);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--glass-border);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 2000;
}
.sidebar--collapsed .sidebar__section-title:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(4px);
}
.sidebar--collapsed .sidebar__section-title:hover {
    background: rgba(var(--accent-rgb), 0.1);
}

/* Collapsed sidebar collapse button */
.sidebar--collapsed .sidebar__collapse-btn:first-of-type {
    display: none !important;
}
.sidebar--collapsed .sidebar__collapse-btn {
    padding: 10px 0;
    justify-content: center;
    font-size: 1rem;
}

/* Adjust main content when sidebar collapsed */
body.sidebar-collapsed .main-content {
    margin-left: var(--sidebar-collapsed);
}

/* Sidebar Expand Button (floating, visible when collapsed) */
.sidebar-expand-btn {
    display: none;
    position: fixed;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: .9rem;
    cursor: pointer;
    z-index: 1060;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.sidebar-expand-btn:hover {
    background: var(--bg-active);
    color: var(--accent-light);
    transform: translateY(-50%) scale(1.1);
}

body.rtl .sidebar-expand-btn {
    left: auto;
    right: 6px;
}

/* â•â•â•â•â•â•â• ROLE-BASED SIDEBAR VISIBILITY â•â•â•â•â•â•â• */
body[data-role="Viewer"] .sidebar__section[data-req-role~="DocController"],
body[data-role="Viewer"] .sidebar__section[data-req-role~="Engineer"],
body[data-role="Viewer"] .sidebar__section[data-req-role~="Admin"],
body[data-role="Reviewer"] .sidebar__section[data-req-role~="DocController"],
body[data-role="Reviewer"] .sidebar__section[data-req-role~="Admin"],
body[data-role="Engineer"] .sidebar__section[data-req-role~="Admin"] {
    display: none;
}

/* ============================================================================
   DRAG & DROP UPLOAD ZONE
   ============================================================================ */
.drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all .2s ease;
    background: var(--bg-card);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.drop-zone:hover {
    border-color: var(--accent);
    background: rgba(59, 130, 246, .03);
}

.drop-zone--active {
    border-color: var(--accent);
    background: rgba(59, 130, 246, .08);
    transform: scale(1.01);
}

.drop-zone__progress {
    display: flex;
    align-items: center;
    gap: .75rem;
    width: 100%;
    max-width: 300px;
    margin-top: .75rem;
}

.drop-zone__progress-bar {
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.drop-zone__progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #22c55e);
    border-radius: 3px;
    transition: width .15s ease;
    width: 0%;
}

.drop-zone__progress-text {
    font-size: .72rem;
    font-weight: 700;
    color: var(--accent);
    min-width: 30px;
}

.drop-zone__file-info {
    text-align: left;
    width: 100%;
}

/* ============================================================================
   MOBILE RESPONSIVE
   ============================================================================ */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 1050;
    }

    .sidebar.sidebar--open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0 !important;
    }

    .stat-cards {
        grid-template-columns: 1fr 1fr !important;
    }

    .topnav__hamburger {
        display: flex;
    }

    .topnav__menu {
        display: none;
    }

    /* Sidebar overlay backdrop */
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .45);
        z-index: 1040;
    }

    .sidebar-overlay.show {
        display: block;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 13px;
    }

    .topnav {
        padding: 0 .75rem;
    }

    .topnav__user-name {
        display: none;
    }

    .topnav__brand-text {
        font-size: .9rem;
    }

    .main-content {
        padding: .75rem !important;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: .5rem;
    }

    .stat-cards {
        grid-template-columns: 1fr !important;
        gap: .5rem !important;
    }

    .detail-grid {
        grid-template-columns: 1fr !important;
    }

    .form-row {
        grid-template-columns: 1fr !important;
    }

    .data-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table {
        min-width: 600px;
    }

    .card__header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: .5rem;
    }

    .btn-group {
        flex-wrap: wrap;
    }

    #langCurrentLabel {
        display: none;
    }

    .pwa-install-btn {
        display: none;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 12px;
    }

    .stat-card {
        padding: .6rem !important;
    }

    .stat-card__icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .page-header__title {
        font-size: 1.2rem !important;
    }

    .topnav__right {
        gap: 4px;
    }
}

/* ============================================================================
   BREADCRUMBS
   ============================================================================ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .4rem 0;
    margin-bottom: .75rem;
    font-size: .78rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.breadcrumb__item {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.breadcrumb__item a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color .15s;
}

.breadcrumb__item a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.breadcrumb__sep {
    color: var(--text-muted);
    opacity: .5;
    font-size: .65rem;
}

.breadcrumb__current {
    color: var(--text-primary);
    font-weight: 600;
}

/* ============================================================================
   LOADING SKELETONS
   ============================================================================ */
.skeleton {
    background: linear-gradient(90deg, var(--bg-hover) 25%, rgba(255, 255, 255, .08) 50%, var(--bg-hover) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    border-radius: 6px;
}

@keyframes skeletonShimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-row {
    height: 16px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.skeleton-card {
    height: 80px;
    border-radius: var(--border-radius-lg);
}

.skeleton-title {
    height: 24px;
    width: 40%;
    margin-bottom: 12px;
}

.skeleton-text {
    height: 14px;
    width: 80%;
}

.skeleton-text--short {
    width: 45%;
}

.skeleton-text--medium {
    width: 65%;
}

/* Content fade-in after load */
.content-loaded {
    animation: contentFadeIn .4s ease;
}

@keyframes contentFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================================
   GLOBAL SEARCH BAR
   ============================================================================ */
.global-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: .45rem;
}

.global-search__input {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    color: #e2e8f0;
    padding: 5px 56px 5px 42px;
    font-size: .78rem;
    width: 180px;
    transition: all .2s;
    font-family: inherit;
}

.global-search__input:focus {
    outline: none;
    width: 260px;
    border-color: var(--accent);
    background: rgba(255, 255, 255, .12);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .15);
}

.global-search__input::placeholder {
    color: rgba(148, 163, 184, .6);
}

.global-search > .topnav__shortcut-chip {
    position: absolute;
    left: 8px;
    z-index: 1;
    min-width: 28px;
    height: 22px;
    padding: 0 .4rem;
    border-color: rgba(96, 165, 250, .22);
    background: rgba(59, 130, 246, .12);
    color: #dbeafe;
}

.global-search__shortcut {
    position: absolute;
    right: 8px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: .6rem;
    color: rgba(148, 163, 184, .7);
    font-family: monospace;
    pointer-events: none;
}

[data-theme="light"] .global-search__input {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

[data-theme="light"] .global-search__input:focus {
    background: #fff;
}

[data-theme="light"] .global-search__shortcut {
    background: #e2e8f0;
    border-color: #94a3b8;
    color: #475569;
}

/* ============================================================================
   SORTABLE TABLE HEADERS
   ============================================================================ */
.data-table th[data-sortable] {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 1.5rem;
}

.data-table th[data-sortable]:hover {
    background: rgba(59, 130, 246, .08);
    color: var(--accent);
}

.data-table th[data-sortable]::after {
    content: '\2195';
    position: absolute;
    right: 6px;
    opacity: .3;
    font-size: .7rem;
}

.data-table th[data-sortable].sort-asc::after {
    content: '\25B2';
    opacity: .8;
    color: var(--accent);
}

.data-table th[data-sortable].sort-desc::after {
    content: '\25BC';
    opacity: .8;
    color: var(--accent);
}

/* Filter Toolbar */
.filter-toolbar {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .75rem;
    background: var(--bg-hover);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.filter-toolbar__input {
    flex: 1;
    min-width: 150px;
    padding: 5px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: .78rem;
    font-family: inherit;
}

.filter-toolbar__input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, .15);
}

.filter-toolbar__count {
    font-size: .72rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ============================================================================
   SESSION TIMEOUT MODAL
   ============================================================================ */
.session-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, .65);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.session-modal.show {
    display: flex;
}

.session-modal__box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    max-width: 380px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
    animation: modalSlideIn .3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.session-modal__icon {
    font-size: 2.5rem;
    margin-bottom: .75rem;
}

.session-modal__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: .5rem;
}

.session-modal__text {
    font-size: .85rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.session-modal__timer {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--danger, #ef4444);
    margin-bottom: 1rem;
    font-variant-numeric: tabular-nums;
}

.session-modal__actions {
    display: flex;
    gap: .5rem;
    justify-content: center;
}

@media (max-width: 768px) {
    .global-search {
        display: none;
    }

    .breadcrumb {
        font-size: .72rem;
    }
}

/* ===== Tree Navigation (Assai Parity) ===== */
.tree-node {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem .65rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: .8rem;
    transition: all .15s ease;
    border: 1px solid transparent;
}

.tree-node:hover {
    background: var(--bg-hover);
    border-color: var(--border);
}

.tree-node.active {
    background: rgba(59, 130, 246, .12);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
}

.tree-node__icon {
    font-size: .85rem;
}

.tree-node__label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tree-node__count {
    font-size: .7rem;
    font-weight: 700;
    padding: .1rem .4rem;
    border-radius: 99px;
    background: var(--bg-hover);
    color: var(--text-muted);
    min-width: 20px;
    text-align: center;
}

.tree-node.active .tree-node__count {
    background: var(--accent);
    color: #fff;
}

.tree-tab {
    border: 1px solid var(--border) !important;
}

.tree-tab.active {
    background: var(--accent) !important;
    color: #fff !important;
    border-color: var(--accent) !important;
}

/* ===== Report Grid ===== */
.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.report-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
    transition: all .2s ease;
    background: var(--bg-card);
    cursor: default;
}

.report-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(59, 130, 246, .08);
    transform: translateY(-2px);
}

.report-card__icon {
    font-size: 2rem;
    margin-bottom: .5rem;
}

.report-card__title {
    font-weight: 700;
    font-size: .9rem;
    margin-bottom: .25rem;
}

.report-card__desc {
    font-size: .78rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.report-card__actions {
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
}

.report-category {
    margin-bottom: 1.5rem;
}

.report-category__title {
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    margin-bottom: .75rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--border);
}

/* ===== Document Viewer ===== */
.doc-viewer-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, .92);
    display: flex;
    flex-direction: column;
}

.doc-viewer-toolbar {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem 1rem;
    background: #1a1a2e;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    flex-shrink: 0;
}

.doc-viewer-toolbar__btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, .15);
    color: #e2e8f0;
    padding: .4rem .65rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: .82rem;
    transition: all .15s;
}

.doc-viewer-toolbar__btn:hover,
.doc-viewer-toolbar__btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.doc-viewer-toolbar__separator {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, .15);
    margin: 0 .25rem;
}

.doc-viewer-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.doc-viewer-canvas {
    flex: 1;
    overflow: auto;
    display: flex;
    justify-content: center;
    padding: 1rem;
}

.doc-viewer-sidebar {
    width: 300px;
    background: #1a1a2e;
    border-left: 1px solid rgba(255, 255, 255, .1);
    overflow-y: auto;
    padding: 1rem;
    display: none;
}

.doc-viewer-sidebar.open {
    display: block;
}

@media (max-width: 768px) {
    #treePanel {
        display: none !important;
    }

    .report-grid {
        grid-template-columns: 1fr;
    }

    .doc-viewer-sidebar {
        width: 100%;
    }
}

/* ===== Context Menu (Right-Click) ===== */
.ctx-menu {
    position: absolute;
    z-index: 9999;
    background: var(--bg-card, #1e293b);
    border: 1px solid var(--border, #334155);
    border-radius: 8px;
    padding: .35rem 0;
    min-width: 180px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
}

.ctx-menu__item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem 1rem;
    font-size: .82rem;
    cursor: pointer;
    color: var(--text, #e2e8f0);
    text-decoration: none;
    transition: background .15s;
}

.ctx-menu__item:hover {
    background: var(--bg-hover, #334155);
}

.ctx-menu__divider {
    height: 1px;
    background: var(--border, #334155);
    margin: .25rem 0;
}

/* ===== Tab Filters ===== */
.tab-filters {
    display: flex;
    gap: 0;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border, #334155);
}

.tab-filter {
    padding: .6rem 1.5rem;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-muted, #94a3b8);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all .2s;
    text-decoration: none;
    background: none;
    border-left: 0;
    border-right: 0;
    border-top: 0;
}

.tab-filter:hover {
    color: var(--text, #e2e8f0);
}

.tab-filter.active {
    color: var(--accent, #6366f1);
    border-bottom-color: var(--accent, #6366f1);
}

/* ===== Inbox Status Radio Filters ===== */
.radio-filters {
    display: flex;
    gap: 0;
    background: var(--bg-hover, #1e293b);
    border-radius: 8px;
    padding: .25rem;
    margin-bottom: 1rem;
}

.radio-filter {
    padding: .4rem 1rem;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: 6px;
    transition: all .2s;
}

.radio-filter.active,
.radio-filter:hover {
    background: var(--accent, #6366f1);
    color: #fff;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   ADMIN SIDEBAR â€” Distinct visual for the Admin Portal
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.sidebar--admin {
    background: linear-gradient(180deg, #1e1b4b 0%, #0f172a 100%);
    border-right: 2px solid rgba(139, 92, 246, 0.3);
}

.admin-sidebar__header {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: 1rem 1rem .6rem;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
    margin-bottom: .5rem;
}

.admin-sidebar__badge {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: #fff;
    font-size: .6rem;
    font-weight: 800;
    letter-spacing: .1em;
    padding: .2rem .5rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.admin-sidebar__title {
    color: #c4b5fd;
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: .03em;
}

.admin-sidebar__back-link {
    display: block;
    padding: .5rem 1rem;
    color: rgba(196, 181, 253, 0.7);
    font-size: .75rem;
    text-decoration: none;
    transition: all .2s;
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
    margin-bottom: .5rem;
}

.admin-sidebar__back-link:hover {
    color: #c4b5fd;
    background: rgba(139, 92, 246, 0.1);
}

/* Override dropdown toggle styling for admin */
.sidebar--admin .sidebar__dropdown-toggle {
    border-left: 3px solid transparent;
}

.sidebar--admin .sidebar__dropdown-toggle:hover {
    background: rgba(139, 92, 246, 0.1);
    border-left-color: rgba(139, 92, 246, 0.5);
}

.sidebar--admin .sidebar__nav-link:hover {
    background: rgba(139, 92, 246, 0.1);
}

.sidebar--admin .sidebar__nav-link.active {
    background: rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
    border-left: 3px solid #8b5cf6;
}

/* â•â•â•â•â•â•â•â•â•â•â• VENDOR PORTAL SIDEBAR THEME â•â•â•â•â•â•â•â•â•â•â• */
.sidebar--vendor {
    background: linear-gradient(180deg, #0f2922 0%, #0d3330 30%, #0a2820 100%);
}

.vendor-sidebar__header {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1rem;
    border-bottom: 1px solid rgba(16, 185, 129, .2);
}

.vendor-sidebar__badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    padding: .15rem .5rem;
    border-radius: 4px;
    letter-spacing: .08em;
}

.vendor-sidebar__title {
    color: #6ee7b7;
    font-size: .95rem;
    font-weight: 700;
}

.vendor-sidebar__back-link {
    display: block;
    padding: .5rem 1rem;
    font-size: .75rem;
    color: #6ee7b7;
    text-decoration: none;
    border-bottom: 1px solid rgba(16, 185, 129, .1);
}

.vendor-sidebar__back-link:hover {
    background: rgba(16, 185, 129, .1);
    color: #a7f3d0;
}

.sidebar--vendor .sidebar__nav-link:hover {
    background: rgba(16, 185, 129, 0.1);
}

.sidebar--vendor .sidebar__nav-link.active {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border-left: 3px solid #10b981;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   MOBILE RESPONSIVE SIDEBAR
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transition: left .3s ease;
        width: 260px;
    }
    .sidebar.sidebar--open {
        left: 0;
    }
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.6);
        z-index: 999;
    }
    .sidebar-overlay.active {
        display: block;
    }
    .main-content {
        margin-left: 0 !important;
    }
    /* Mobile hamburger button */
    .mobile-menu-btn {
        display: flex !important;
        position: fixed;
        bottom: 1.5rem;
        right: 1.5rem;
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background: var(--primary);
        color: #fff;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        border: none;
        cursor: pointer;
        z-index: 1001;
        box-shadow: 0 4px 15px rgba(59,130,246,.4);
    }
    .topbar {
        flex-wrap: wrap;
    }
}

.mobile-menu-btn {
    display: none;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   LOADING SPINNER & TABLE LOADING STATE
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .6s linear infinite;
}
.spinner--lg {
    width: 40px;
    height: 40px;
    border-width: 3px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.table-loading {
    position: relative;
    min-height: 120px;
}
.table-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15,23,42,.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    border-radius: 8px;
}
.table-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    margin: -18px 0 0 -18px;
    border: 3px solid rgba(255,255,255,.15);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin .6s linear infinite;
    z-index: 6;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   BREADCRUMB ENHANCEMENTS
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: .25rem;
    font-size: .8rem;
    color: var(--text-muted);
    margin-bottom: .75rem;
    flex-wrap: wrap;
}
.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    transition: color .2s;
}
.breadcrumb a:hover {
    color: #60a5fa;
    text-decoration: underline;
}
.breadcrumb__sep {
    color: #475569;
    margin: 0 .15rem;
}
.breadcrumb__current {
    color: #e2e8f0;
    font-weight: 500;
}

/* ============================================================================
   GLASSMORPHISM + NEUMORPHISM COMPONENT OVERRIDES
   Enterprise Dark Theme â€” 2025/2026
   ============================================================================ */

/* --- Glass Content Cards --- */
.content-card,
.section-card,
.filter-panel,
.search-panel,
.result-panel {
    background: var(--glass-bg) !important;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--neu-flat);
    transition: var(--transition);
}
.content-card:hover,
.section-card:hover {
    border-color: var(--border-accent) !important;
    box-shadow: var(--shadow-md), 0 0 12px rgba(var(--accent-rgb), 0.06);
}

/* --- Glass Form Controls --- */
.form-control,
.form-select,
select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="date"],
textarea {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-primary) !important;
    border-radius: var(--border-radius);
    padding: 0.5rem 0.75rem;
    transition: var(--transition);
    box-shadow: var(--neu-inset);
}
.form-control:focus,
.form-select:focus,
select:focus,
input:focus,
textarea:focus {
    border-color: var(--accent) !important;
    box-shadow: var(--neu-inset), 0 0 0 3px rgba(var(--accent-rgb), 0.15) !important;
    outline: none;
}
.form-control::placeholder,
input::placeholder {
    color: var(--text-muted) !important;
}

/* --- Neumorphic Buttons --- */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: var(--transition);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}
.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.08), transparent);
    opacity: 0;
    transition: var(--transition-fast);
}
.btn:hover::before { opacity: 1; }

.btn--primary,
.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover)) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(var(--accent-rgb), 0.3);
}
.btn--primary:hover,
.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.45), var(--shadow-glow);
    transform: translateY(-1px);
}

.btn--ghost,
.btn-outline-secondary {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-secondary) !important;
    box-shadow: var(--neu-flat);
}
.btn--ghost:hover,
.btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--border-accent) !important;
    color: var(--accent-light) !important;
}

.btn--success {
    background: linear-gradient(135deg, var(--success), #059669) !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}
.btn--danger {
    background: linear-gradient(135deg, var(--danger), #dc2626) !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

/* --- Glass Tables --- */
.table-responsive,
.data-table-container {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}
table th {
    background: rgba(255, 255, 255, 0.03) !important;
    color: var(--text-secondary) !important;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--glass-border) !important;
    padding: 0.75rem 1rem;
}
table td {
    border-bottom: 1px solid var(--border-light) !important;
    padding: 0.7rem 1rem;
    color: var(--text-primary);
    background: transparent !important;
}
table tbody tr {
    transition: var(--transition-fast);
}
table tbody tr:hover {
    background: var(--glass-bg-hover) !important;
}

/* --- Glass Sidebar Enhancement --- */
.sidebar {
    background: var(--bg-sidebar);
    border-right: 1px solid var(--glass-border);
    box-shadow: 4px 0 16px rgba(0, 0, 0, 0.2);
    transition: width 0.3s cubic-bezier(.4, 0, .2, 1);
}

.sidebar__section-title {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.sidebar__nav-link {
    border-radius: 6px;
    margin: 1px 6px;
    transition: var(--transition-fast);
    padding-left: 1.2rem;
    position: relative;
}
.sidebar__nav-link::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: var(--transition-fast);
}
.sidebar__nav-link:hover::before {
    background: var(--accent-light);
    width: 5px;
    height: 5px;
}
.sidebar__nav-link.active::before {
    background: var(--accent);
    width: 6px;
    height: 6px;
    box-shadow: 0 0 4px var(--accent-glow);
}
.sidebar__nav-link:hover {
    background: var(--glass-bg-hover) !important;
}
.sidebar__nav-link.active {
    background: var(--bg-active) !important;
    border-left: 3px solid var(--accent);
    color: var(--accent-light) !important;
}

/* --- Glass Page Header --- */
.page-header {
    margin-bottom: 1.5rem;
}
.page-header h1, .page-header h2 {
    color: var(--text-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}
.page-header p {
    color: var(--text-secondary);
}

/* --- Glass Badges --- */
.badge {
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.03em;
    padding: 0.2rem 0.6rem;
}
.badge--success, .status-badge-approved { background: var(--success-light); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.2); }
.badge--warning, .status-badge-review { background: var(--warning-light); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.2); }
.badge--danger, .status-badge-rejected { background: var(--danger-light); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.2); }
.badge--info { background: var(--info-light); color: var(--info); border: 1px solid rgba(6, 182, 212, 0.2); }

/* --- Glass Modal --- */
.modal-overlay {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.6) !important;
}
.modal-content,
.modal {
    background: var(--bg-surface) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--border-radius-xl) !important;
    box-shadow: var(--shadow-lg) !important;
}

/* --- Glass Breadcrumbs --- */
.breadcrumb {
    background: transparent;
}
.breadcrumb a {
    color: var(--text-secondary);
}
.breadcrumb a:hover {
    color: var(--accent-light);
}
.breadcrumb__sep {
    color: var(--text-muted);
}

/* --- Stat Card Icon Containers --- */
.stat-card__icon {
    width: 44px;
    height: 44px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--neu-flat);
}

/* --- Scrollbar (Dark Theme) --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* --- Selection Color --- */
::selection {
    background: rgba(var(--accent-rgb), 0.3);
    color: #fff;
}

/* --- Micro-Animations --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.2); }
    50% { box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.4); }
}
.content-loaded .main-content {
    animation: fadeInUp 0.4s ease-out;
}

/* --- Tooltip Dark --- */
[title]:hover::after {
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

/* --- Status Colors for Documents --- */
.status-draft { color: var(--text-muted); }
.status-review, .status-for-review { color: var(--warning); }
.status-approved { color: var(--success); }
.status-rejected { color: var(--danger); }
.status-for-approval { color: var(--info); }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   MOBILE RESPONSIVE â€” Phase 6
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€ TABLET (â‰¤1024px) â”€â”€ */
@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        z-index: 1050;
        transition: left 0.3s ease;
    }
    .sidebar.sidebar--open {
        left: 0;
        box-shadow: 8px 0 32px rgba(0,0,0,0.5);
    }
    .main-content {
        margin-left: 0 !important;
    }
    .topnav__hamburger {
        display: flex !important;
    }
    .sidebar-overlay.show {
        display: block;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1040;
    }
    /* Stat cards grid */
    .stat-cards {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    /* Table horizontal scroll */
    .table-responsive, .results-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    table {
        min-width: 800px;
    }
}

/* â”€â”€ PHONE (â‰¤768px) â”€â”€ */
@media (max-width: 768px) {
    .sidebar {
        width: 100% !important;
        left: -100%;
    }
    .sidebar.sidebar--open {
        left: 0;
    }
    .topnav {
        padding: 0.5rem 0.75rem;
    }
    .topnav__tabs {
        display: none !important;
    }
    .topnav__search-box {
        display: none;
    }
    .page-header h1 {
        font-size: 1.2rem;
    }
    .stat-cards {
        grid-template-columns: 1fr !important;
        gap: 0.5rem;
    }
    .stat-card {
        padding: 0.75rem !important;
    }
    .search-filter-panel {
        flex-direction: column;
    }
    .search-filter-panel .form-group {
        width: 100%;
    }
    .content-card, .section-card {
        padding: 0.75rem !important;
        border-radius: 10px !important;
    }
    table {
        font-size: 0.78rem;
    }
    .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
}

/* ============================================================================
   V1.0.0 SHELL AND DASHBOARD POLISH
   ============================================================================ */
.topnav__release-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 0.45rem;
    padding: 0.14rem 0.45rem;
    border-radius: 999px;
    border: 1px solid rgba(78, 205, 196, 0.2);
    background: rgba(78, 205, 196, 0.16);
    color: #c8fff7;
    font-size: 0.55rem;
    font-weight: 700;
    vertical-align: super;
}

.topnav__utility-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #f8fafc;
    font-size: 0.76rem;
    font-weight: 600;
}

.topnav__utility-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.topnav__project-dropdown {
    position: relative;
    margin-right: 0.5rem;
}

.topnav__project-toggle,
.topnav__icon-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 32px;
    padding: 0.36rem 0.72rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #f8fafc;
    cursor: pointer;
    font-size: 0.78rem;
    transition: var(--transition-fast);
}

.topnav__project-toggle:hover,
.topnav__icon-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.topnav__project-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    min-width: 30px;
    min-height: 30px;
    padding: 0;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.18);
    color: #dbeafe;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0;
}

.topnav__project-caret {
    opacity: 0.72;
    font-size: 0.68rem;
}

.topnav__project-menu {
    left: 0;
    right: auto;
    min-width: 220px;
    padding: 0.5rem;
    margin-top: 0.3rem;
}

.topnav__project-menu-heading {
    padding: 0.4rem 0.5rem;
    margin-bottom: 0.3rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
}

body.light-theme .topnav__release-badge {
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.14);
    color: #1d4ed8;
}

body.light-theme .topnav__utility-link,
body.light-theme .topnav__project-toggle,
body.light-theme .topnav__icon-btn {
    background: #f8fafc;
    border-color: #dbe4ee;
    color: #0f172a;
}

body.light-theme .topnav__utility-link:hover,
body.light-theme .topnav__project-toggle:hover,
body.light-theme .topnav__icon-btn:hover {
    background: #eef4ff;
    color: #0f172a;
}

body.light-theme .topnav__project-icon {
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
}

.sidebar-title {
    display: block;
}

.sidebar-subtitle {
    font-size: 0.68rem;
    color: rgba(226, 232, 240, 0.68);
    letter-spacing: 0.04em;
    margin-top: 0.15rem;
}

.sidebar-header__badge,
.admin-sidebar__version,
.vendor-sidebar__version {
    margin-left: auto;
    margin-inline-start: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    padding: 0.16rem 0.45rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    font-size: 0.64rem;
    font-weight: 700;
}

.sidebar-shell-card {
    margin: 0.9rem 0.85rem 1rem;
    padding: 0.95rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(15, 23, 42, 0.28));
    box-shadow: var(--shadow-sm);
}

.sidebar-shell-card--admin {
    border-color: rgba(139, 92, 246, 0.2);
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.12), rgba(15, 23, 42, 0.28));
}

.sidebar-shell-card--vendor {
    border-color: rgba(16, 185, 129, 0.2);
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.12), rgba(15, 23, 42, 0.28));
}

.sidebar-shell-card__eyebrow {
    color: var(--accent-light);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-shell-card__title {
    margin-top: 0.3rem;
    color: #f8fafc;
    font-size: 0.95rem;
    font-weight: 700;
}

.sidebar-shell-card__text {
    margin-top: 0.45rem;
    color: var(--text-secondary);
    font-size: 0.76rem;
    line-height: 1.55;
}

.sidebar-shell-card__links {
    display: grid;
    gap: 0.4rem;
    margin-top: 0.8rem;
}

.sidebar-shell-card__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.6rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #f8fafc;
    font-size: 0.76rem;
    font-weight: 600;
}

.sidebar-shell-card__link::after {
    content: '>';
    opacity: 0.7;
}

.sidebar-shell-card__link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dashboard-hero__content,
.dashboard-hero__aside {
    border-radius: 18px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.82), rgba(15, 23, 42, 0.68));
    box-shadow: var(--shadow-sm);
}

.dashboard-hero__content {
    padding: 1.4rem;
    position: relative;
    overflow: hidden;
}

.dashboard-hero__content::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 36%);
    pointer-events: none;
}

.dashboard-hero__eyebrow,
.dashboard-hero__actions,
.dashboard-hero__summary {
    position: relative;
    z-index: 1;
}

.dashboard-hero__eyebrow {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 0.85rem;
}

.dashboard-hero__eyebrow-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.24rem 0.7rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.16);
    border: 1px solid rgba(59, 130, 246, 0.24);
    color: #dbeafe;
    font-size: 0.72rem;
    font-weight: 700;
}

.dashboard-hero__eyebrow-text {
    color: var(--text-secondary);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
}

.page-header--hero {
    margin-bottom: 0;
}

.dashboard-hero__summary {
    max-width: 60ch;
    margin-top: 0.9rem;
    color: var(--text-secondary);
    font-size: 0.94rem;
    line-height: 1.7;
}

.dashboard-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.15rem;
}

.dashboard-hero__aside {
    display: grid;
    gap: 0.8rem;
    padding: 1rem;
}

.dashboard-mini-card {
    padding: 0.9rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.04);
}

.dashboard-mini-card__label {
    display: block;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-mini-card__value {
    display: block;
    margin-top: 0.28rem;
    color: #f8fafc;
    font-size: 1rem;
    font-weight: 700;
}

.dashboard-mini-card__text {
    margin-top: 0.32rem;
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.55;
}

.dashboard-section {
    margin-bottom: 1.4rem;
}

.dashboard-section__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.dashboard-section__title {
    color: var(--text-heading);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.dashboard-section__subtitle {
    margin-top: 0.18rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.dashboard-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

.dashboard-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-metric-card {
    text-decoration: none;
    color: inherit;
}

.dashboard-metric-card:hover {
    color: inherit;
}

.dashboard-metric-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.dashboard-metric-card__detail--alert {
    color: var(--danger);
    font-weight: 700;
}

.dashboard-card__eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.14);
    color: #bfdbfe;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-chart-body {
    display: flex;
    justify-content: center;
    padding: 1rem;
}

.card__body--flush {
    padding: 0;
}

.dashboard-task-list {
    display: flex;
    flex-direction: column;
}

.dashboard-task-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
}

.dashboard-task-item:last-child {
    border-bottom: 0;
}

.dashboard-task-item__flag {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--warning);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
    flex-shrink: 0;
}

.dashboard-task-item__flag--alert {
    background: var(--danger);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.14);
}

.dashboard-task-item__content {
    flex: 1;
    min-width: 0;
}

.dashboard-task-item__title {
    color: var(--text-primary);
    font-size: 0.84rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-task-item__meta {
    margin-top: 0.18rem;
    color: var(--text-muted);
    font-size: 0.74rem;
}

.dashboard-task-item__meta--alert {
    color: var(--danger);
    font-weight: 600;
}

.dashboard-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.dashboard-action-card {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-height: 138px;
    padding: 0.95rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(15, 23, 42, 0.2));
    color: #f8fafc;
    box-shadow: var(--shadow-sm);
}

.dashboard-action-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-accent);
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.1), rgba(15, 23, 42, 0.24));
    color: #ffffff;
}

.dashboard-action-card__kicker {
    color: var(--accent-light);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-action-card__title {
    color: inherit;
    font-size: 0.92rem;
    font-weight: 700;
}

.dashboard-action-card__text {
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.55;
}

.empty-state--compact {
    padding: 2rem 1.2rem;
}

.empty-state--compact .empty-state__icon {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    opacity: 0.44;
}

.dashboard-trend-card {
    margin-bottom: 1rem;
}

.app-footer {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    margin-top: 1.5rem;
    padding: 1rem 1.1rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(15, 23, 42, 0.26));
    box-shadow: var(--shadow-sm);
}

.app-footer__title-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.app-footer__title {
    color: var(--text-heading);
    font-size: 0.98rem;
    font-weight: 700;
}

.app-footer__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.16rem 0.52rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.16);
    border: 1px solid rgba(59, 130, 246, 0.22);
    color: #dbeafe;
    font-size: 0.68rem;
    font-weight: 700;
}

.app-footer__text {
    margin-top: 0.4rem;
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.55;
}

.app-footer__links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.app-footer__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0.45rem 0.75rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #f8fafc;
    font-size: 0.76rem;
    font-weight: 600;
}

.app-footer__link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.app-footer__meta {
    display: grid;
    gap: 0.32rem;
    justify-items: end;
    color: var(--text-muted);
    font-size: 0.74rem;
    text-align: right;
}

body.light-theme .app-footer {
    background: #ffffff;
    border-color: #e2e8f0;
}

body.light-theme .app-footer__title {
    color: #0f172a;
}

body.light-theme .app-footer__link {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #0f172a;
}

body.light-theme .app-footer__link:hover {
    background: #eef4ff;
    color: #0f172a;
}

/* Compact footer: single thin row, doc links only here site-wide */
.app-footer.app-footer--compact {
    display: flex;
    margin-top: auto;
    flex-shrink: 0;
    align-items: center;
    padding: 0.16rem 0.5rem;
    border-radius: 6px;
    gap: 0;
    grid-template-columns: unset;
    box-shadow: none;
}

.app-footer--compact .app-footer__row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    column-gap: 0.75rem;
    width: 100%;
    min-height: 0;
}

.app-footer--compact .app-footer__nav {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    flex: 0 1 auto;
    gap: 0.12rem 0.28rem;
    min-width: 0;
}

.app-footer__sep {
    color: var(--text-muted);
    opacity: 0.55;
    user-select: none;
    font-size: 0.58rem;
    line-height: 1;
}

.app-footer--compact .app-footer__link {
    min-height: unset;
    padding: 0.04rem 0.06rem;
    border: none;
    background: transparent;
    border-radius: 3px;
    font-size: 0.61rem;
    font-weight: 500;
    line-height: 1.25;
    justify-content: flex-start;
    white-space: nowrap;
}

body.light-theme .app-footer--compact .app-footer__link {
    background: transparent;
    border: none;
}

.app-footer--compact .app-footer__link:hover {
    background: rgba(255, 255, 255, 0.06);
}

body.light-theme .app-footer--compact .app-footer__link:hover {
    background: rgba(15, 23, 42, 0.06);
}

.app-footer--compact .app-footer__copy {
    font-size: 0.61rem;
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1.25;
    white-space: nowrap;
    flex: 0 0 auto;
    margin-inline-start: auto;
    text-align: end;
}

@media (max-width: 480px) {
    .app-footer.app-footer--compact {
        padding: 0.14rem 0.4rem;
    }

    .app-footer--compact .app-footer__link,
    .app-footer--compact .app-footer__copy {
        font-size: 0.56rem;
    }

    .app-footer--compact .app-footer__row {
        column-gap: 0.5rem;
    }
}

@media (max-width: 1200px) {
    .dashboard-hero {
        grid-template-columns: 1fr;
    }

    .app-footer {
        grid-template-columns: 1fr;
    }

    .app-footer__meta {
        justify-items: start;
        text-align: left;
    }
}

@media (max-width: 900px) {
    .dashboard-grid--two,
    .dashboard-action-grid,
    .app-footer__links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .topnav__utility-link {
        display: none;
    }

    .dashboard-hero__content,
    .dashboard-hero__aside {
        padding: 1rem;
    }

    .dashboard-hero__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-task-item {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .sidebar-shell-card {
        margin: 0.75rem;
    }
}

/* Navigation refresh: consistent shortcut chips, cleaner accordion spacing, and easier quick access */
.topnav__shortcut-chip,
.sidebar-shortcut-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    min-width: 1.85rem;
    height: 1.5rem;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
    flex-shrink: 0;
}

.topnav__shortcut-chip--ghost,
.sidebar-shortcut-chip--ghost,
.sidebar-shortcut-chip--muted {
    background: rgba(255, 255, 255, 0.04);
    color: rgba(226, 232, 240, 0.9);
}

.topnav__shortcut-chip,
.sidebar-shortcut-chip,
.tab-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.topnav__shortcut-chip::before,
.sidebar-shortcut-chip::before,
.tab-number::before {
    content: none;
}

.topnav__shortcut-chip--ghost::before,
.sidebar-shortcut-chip--ghost::before,
.sidebar-shortcut-chip--muted::before {
    opacity: 0.6;
}

.topnav__project-icon i,
.topnav__shortcut-chip i,
.sidebar-shortcut-chip i,
.tab-number i {
    font-size: 0.82rem;
    line-height: 1;
    pointer-events: none;
}

.topnav__menu-link,
.topnav__utility-link,
.topnav__notification {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.topnav__notification {
    min-height: 32px;
    padding: 0.25rem 0.45rem;
    border-radius: 10px;
}

.topnav__notification:hover {
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-quick-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 0.8rem 0.85rem 0.4rem;
}

.sidebar-quick-links--stacked {
    padding-top: 0.6rem;
    grid-template-columns: 1fr;
}

.sidebar-quick-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    padding: 0.55rem 0.65rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #e2e8f0;
    font-size: 0.74rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.sidebar-quick-link span:last-child,
.sidebar__dropdown-label span:last-child {
    min-width: 0;
}

.sidebar-quick-link:hover {
    background: rgba(59, 130, 246, 0.14);
    border-color: rgba(96, 165, 250, 0.32);
    color: #ffffff;
    transform: translateY(-1px);
}

.sidebar-quick-link.active {
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(96, 165, 250, 0.45);
    color: #ffffff;
}

.sidebar__dropdown-label,
.tab-label {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.tab-number {
    width: 1.85rem;
    min-width: 1.85rem;
    height: 1.5rem;
    padding: 0;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.16);
    color: #bfdbfe;
    border: 1px solid rgba(96, 165, 250, 0.3);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0;
}

.nav-level-1 {
    padding: 0.35rem 0.65rem 0.85rem;
    display: grid;
    gap: 0.55rem;
}

.nav-main-tab {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(15, 23, 42, 0.18);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

.nav-main-tab-btn {
    padding: 0.9rem 0.95rem;
    border-bottom: none;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.nav-main-tab-btn:hover {
    background: rgba(255, 255, 255, 0.06);
}

.nav-main-tab-btn[aria-expanded="true"] {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9), rgba(30, 64, 175, 0.88));
    color: #ffffff;
}

.nav-panel {
    background: transparent;
}

.nav-level-2,
.nav-level-3,
.nav-level-4 {
    display: grid;
    gap: 0.35rem;
}

.nav-level-2 {
    padding: 0.45rem;
    background: rgba(2, 6, 23, 0.22);
}

.nav-sub-tab-btn,
.nav-direct-link-a,
.nav-item-link,
.nav-item-exp-btn,
.nav-sub-item-link,
.sidebar__dropdown-toggle,
.sidebar__nav-link,
.admin-sidebar__back-link,
.vendor-sidebar__back-link {
    border-radius: 12px;
}

.nav-sub-tab-btn,
.nav-direct-link-a {
    margin: 0;
    padding: 0.72rem 0.85rem;
    border-top: none;
    background: rgba(255, 255, 255, 0.02);
}

.nav-sub-tab-btn[aria-expanded="true"],
.nav-direct-link-a.active {
    background: rgba(59, 130, 246, 0.14);
}

.nav-level-3 {
    padding: 0.15rem 0 0.1rem;
}

.nav-item-link,
.nav-item-exp-btn {
    margin: 0;
    padding: 0.62rem 0.85rem 0.62rem 1rem;
    border-top: none;
    background: rgba(255, 255, 255, 0.025);
}

.nav-item-link::before {
    width: 5px;
    height: 5px;
}

.nav-level-4 {
    padding: 0.15rem 0 0.1rem;
}

.nav-sub-item-link {
    margin: 0;
    padding: 0.55rem 0.85rem 0.55rem 1.1rem;
    border-top: none;
    background: rgba(255, 255, 255, 0.018);
}

.nav-sub-item-link::before {
    content: '>';
    font-size: 0.7rem;
    opacity: 0.45;
}

.nav-sub-item-link--hint {
    color: rgba(148, 163, 184, 0.82);
    font-style: italic;
    pointer-events: none;
}

.sidebar__dropdown-toggle {
    margin: 0.25rem 0.75rem 0;
    padding: 0.72rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.03);
}

.sidebar__dropdown-content {
    padding: 0.25rem 0.7rem 0.15rem;
}

.sidebar__nav {
    display: grid;
    gap: 0.35rem;
}

.sidebar__nav-link {
    min-height: 2.5rem;
    margin: 0;
    padding: 0.65rem 0.85rem 0.65rem 1.2rem;
    background: rgba(255, 255, 255, 0.025);
}

.admin-sidebar__back-link,
.vendor-sidebar__back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

body.light-theme .topnav__shortcut-chip,
body.light-theme .sidebar-shortcut-chip {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.16);
    color: #1d4ed8;
}

body.light-theme .topnav__shortcut-chip--ghost,
body.light-theme .sidebar-shortcut-chip--ghost,
body.light-theme .sidebar-shortcut-chip--muted {
    background: #eff6ff;
    color: #1e40af;
}

body.light-theme .topnav__notification:hover {
    background: #eef4ff;
}

body.light-theme .sidebar-quick-link {
    background: #ffffff;
    border-color: #dbe4ee;
    color: #0f172a;
}

body.light-theme .sidebar-quick-link:hover,
body.light-theme .sidebar-quick-link.active {
    background: #eef4ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

body.light-theme .tab-number {
    background: #dbeafe;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

body.light-theme .nav-main-tab {
    border-color: #dbe4ee;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

body.light-theme .nav-level-2 {
    background: #f8fafc;
}

body.light-theme .nav-sub-tab-btn,
body.light-theme .nav-direct-link-a,
body.light-theme .nav-item-link,
body.light-theme .nav-item-exp-btn,
body.light-theme .nav-sub-item-link,
body.light-theme .sidebar__dropdown-toggle,
body.light-theme .sidebar__nav-link {
    background: #ffffff;
    border-color: #e5edf6;
}

body.light-theme .nav-sub-tab-btn[aria-expanded="true"],
body.light-theme .nav-direct-link-a.active,
body.light-theme .nav-item-link.active,
body.light-theme .nav-item-exp-btn[aria-expanded="true"],
body.light-theme .sidebar__nav-link.active {
    background: #eef4ff;
}

@media (max-width: 1400px) {
    .sidebar-quick-links {
        grid-template-columns: 1fr;
    }
}

/* Tier-aware navigation polish: unified structure with role-specific accents */
.sidebar-nav--tier .sidebar-quick-links {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin: 0 0.85rem 0.55rem;
    padding-left: 0;
    padding-right: 0;
}

.sidebar-nav--tier .nav-level-1 {
    padding-top: 0.15rem;
}

.dot-indicator {
    width: 12px;
    height: 12px;
    border-radius: 6px;
    border-width: 1px;
    position: relative;
    background: rgba(148, 163, 184, 0.08);
}

.dot-indicator::after {
    content: '';
    position: absolute;
    inset: 2px;
    background-color: currentColor;
    opacity: 0.95;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M6 3.5 10.5 8 6 12.5 5 11.5 8.5 8 5 4.5 6 3.5Z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M6 3.5 10.5 8 6 12.5 5 11.5 8.5 8 5 4.5 6 3.5Z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.nav-item-link::before {
    content: '';
    width: 13px;
    height: 13px;
    border-radius: 0;
    background: currentColor;
    box-shadow: none;
    opacity: 0.9;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M4 1.5A1.5 1.5 0 0 0 2.5 3v10A1.5 1.5 0 0 0 4 14.5h8A1.5 1.5 0 0 0 13.5 13V5.207a1.5 1.5 0 0 0-.44-1.06L10.853 1.94a1.5 1.5 0 0 0-1.06-.44H4Zm5.5 1.707L11.793 5.5H10a.5.5 0 0 1-.5-.5V3.207Z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M4 1.5A1.5 1.5 0 0 0 2.5 3v10A1.5 1.5 0 0 0 4 14.5h8A1.5 1.5 0 0 0 13.5 13V5.207a1.5 1.5 0 0 0-.44-1.06L10.853 1.94a1.5 1.5 0 0 0-1.06-.44H4Zm5.5 1.707L11.793 5.5H10a.5.5 0 0 1-.5-.5V3.207Z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.nav-sub-item-link::before {
    content: '';
    width: 12px;
    height: 12px;
    background: currentColor;
    opacity: 0.72;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M11.5 4.5a.75.75 0 0 1 0 1.5H6.31l1.72 1.72-1.06 1.06-3-3 3-3 1.06 1.06L6.31 4.5h5.19Z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M11.5 4.5a.75.75 0 0 1 0 1.5H6.31l1.72 1.72-1.06 1.06-3-3 3-3 1.06 1.06L6.31 4.5h5.19Z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.nav-item-exp-btn .tab-label::before {
    content: '';
    display: inline-flex;
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    background: currentColor;
    opacity: 0.78;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M1.75 3A1.75 1.75 0 0 1 3.5 1.25h2.71c.46 0 .9.18 1.23.5l.5.5c.16.16.38.25.6.25h3.96A1.75 1.75 0 0 1 14.25 4.25v7A1.75 1.75 0 0 1 12.5 13H3.5A1.75 1.75 0 0 1 1.75 11.25V3Z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M1.75 3A1.75 1.75 0 0 1 3.5 1.25h2.71c.46 0 .9.18 1.23.5l.5.5c.16.16.38.25.6.25h3.96A1.75 1.75 0 0 1 14.25 4.25v7A1.75 1.75 0 0 1 12.5 13H3.5A1.75 1.75 0 0 1 1.75 11.25V3Z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.theme-admin .topnav {
    border-bottom-color: rgba(139, 92, 246, 0.25);
    box-shadow: inset 0 -1px 0 rgba(139, 92, 246, 0.12);
}

.theme-admin .topnav__release-badge,
.theme-admin .topnav__shortcut-chip,
.theme-admin .topnav__project-icon {
    background: rgba(139, 92, 246, 0.16);
    border-color: rgba(167, 139, 250, 0.24);
    color: #ddd6fe;
}

.theme-admin .topnav__menu-link.active,
.theme-admin .topnav__menu-link:hover {
    background: rgba(139, 92, 246, 0.14);
    color: #f5f3ff;
}

.theme-admin .topnav__utility-link:hover,
.theme-admin .topnav__icon-btn:hover,
.theme-admin .topnav__notification:hover,
.theme-admin .topnav__project-toggle:hover {
    background: rgba(139, 92, 246, 0.12);
}

.theme-vendor .topnav {
    border-bottom-color: rgba(16, 185, 129, 0.25);
    box-shadow: inset 0 -1px 0 rgba(16, 185, 129, 0.12);
}

.theme-vendor .topnav__release-badge,
.theme-vendor .topnav__shortcut-chip,
.theme-vendor .topnav__project-icon {
    background: rgba(16, 185, 129, 0.16);
    border-color: rgba(52, 211, 153, 0.22);
    color: #d1fae5;
}

.theme-vendor .topnav__menu-link.active,
.theme-vendor .topnav__menu-link:hover {
    background: rgba(16, 185, 129, 0.14);
    color: #ecfdf5;
}

.theme-vendor .topnav__utility-link:hover,
.theme-vendor .topnav__icon-btn:hover,
.theme-vendor .topnav__notification:hover,
.theme-vendor .topnav__project-toggle:hover {
    background: rgba(16, 185, 129, 0.12);
}

.sidebar--admin .nav-main-tab {
    border-color: rgba(139, 92, 246, 0.18);
    background: linear-gradient(180deg, rgba(49, 24, 93, 0.44), rgba(15, 23, 42, 0.5));
}

.sidebar--admin .nav-main-tab-btn:hover,
.sidebar--admin .nav-sub-tab-btn:hover,
.sidebar--admin .nav-direct-link-a:hover,
.sidebar--admin .nav-item-link:hover,
.sidebar--admin .nav-item-exp-btn:hover {
    background: rgba(139, 92, 246, 0.12);
    color: #f5f3ff;
}

.sidebar--admin .nav-main-tab-btn[aria-expanded="true"] {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.96), rgba(79, 70, 229, 0.94));
}

.sidebar--admin .nav-sub-tab-btn[aria-expanded="true"],
.sidebar--admin .nav-direct-link-a.active,
.sidebar--admin .nav-item-link.active,
.sidebar--admin .nav-item-exp-btn[aria-expanded="true"],
.sidebar--admin .sidebar-quick-link.active {
    background: rgba(139, 92, 246, 0.16);
    color: #e9d5ff;
}

.sidebar--admin [data-tab-id^="admin-"] .tab-number,
.sidebar--admin .sidebar-shortcut-chip,
.sidebar--admin .sidebar-quick-link .sidebar-shortcut-chip {
    background: rgba(139, 92, 246, 0.16);
    border-color: rgba(167, 139, 250, 0.22);
    color: #e9d5ff;
}

.sidebar--admin .dot-indicator {
    border-color: rgba(196, 181, 253, 0.35);
    color: #ddd6fe;
    background: rgba(139, 92, 246, 0.1);
}

.sidebar--admin .nav-item-link::before {
    background: linear-gradient(135deg, rgba(196, 181, 253, 0.76), rgba(139, 92, 246, 0.3));
    box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.18);
}

.sidebar--vendor .nav-main-tab {
    border-color: rgba(16, 185, 129, 0.16);
    background: linear-gradient(180deg, rgba(6, 78, 59, 0.42), rgba(10, 40, 32, 0.52));
}

.sidebar--vendor .nav-main-tab-btn:hover,
.sidebar--vendor .nav-sub-tab-btn:hover,
.sidebar--vendor .nav-direct-link-a:hover,
.sidebar--vendor .nav-item-link:hover,
.sidebar--vendor .nav-item-exp-btn:hover {
    background: rgba(16, 185, 129, 0.12);
    color: #ecfdf5;
}

.sidebar--vendor .nav-main-tab-btn[aria-expanded="true"] {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(5, 150, 105, 0.92));
}

.sidebar--vendor .nav-sub-tab-btn[aria-expanded="true"],
.sidebar--vendor .nav-direct-link-a.active,
.sidebar--vendor .nav-item-link.active,
.sidebar--vendor .nav-item-exp-btn[aria-expanded="true"],
.sidebar--vendor .sidebar-quick-link.active {
    background: rgba(16, 185, 129, 0.16);
    color: #d1fae5;
}

.sidebar--vendor [data-tab-id^="vendor-"] .tab-number,
.sidebar--vendor .sidebar-shortcut-chip,
.sidebar--vendor .sidebar-quick-link .sidebar-shortcut-chip {
    background: rgba(16, 185, 129, 0.16);
    border-color: rgba(52, 211, 153, 0.2);
    color: #d1fae5;
}

.sidebar--vendor .dot-indicator {
    border-color: rgba(110, 231, 183, 0.35);
    color: #d1fae5;
    background: rgba(16, 185, 129, 0.08);
}

.sidebar--vendor .nav-item-link::before {
    background: linear-gradient(135deg, rgba(110, 231, 183, 0.78), rgba(16, 185, 129, 0.28));
    box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.14);
}

/* Light mode: admin/vendor sidebar hovers & accents (readable on pale rails) */
body.light-theme .sidebar--admin .nav-main-tab-btn:hover,
body.light-theme .sidebar--admin .nav-sub-tab-btn:hover,
body.light-theme .sidebar--admin .nav-direct-link-a:hover,
body.light-theme .sidebar--admin .nav-item-link:hover,
body.light-theme .sidebar--admin .nav-item-exp-btn:hover {
    background: rgba(139, 92, 246, 0.08);
    color: #5b21b6;
}

body.light-theme .sidebar--admin .nav-main-tab-btn[aria-expanded="true"] {
    background: linear-gradient(135deg, #7c3aed, #6366f1);
    color: #ffffff;
}

body.light-theme .sidebar--admin .nav-sub-tab-btn[aria-expanded="true"],
body.light-theme .sidebar--admin .nav-direct-link-a.active,
body.light-theme .sidebar--admin .nav-item-link.active,
body.light-theme .sidebar--admin .nav-item-exp-btn[aria-expanded="true"],
body.light-theme .sidebar--admin .sidebar-quick-link.active {
    background: rgba(139, 92, 246, 0.12);
    color: #5b21b6;
}

body.light-theme .sidebar--admin [data-tab-id^="admin-"] .tab-number,
body.light-theme .sidebar--admin .sidebar-shortcut-chip,
body.light-theme .sidebar--admin .sidebar-quick-link .sidebar-shortcut-chip {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.22);
    color: #6d28d9;
}

body.light-theme .sidebar--admin .dot-indicator {
    border-color: rgba(139, 92, 246, 0.35);
    color: #6d28d9;
    background: rgba(139, 92, 246, 0.06);
}

body.light-theme .sidebar--vendor .nav-main-tab-btn:hover,
body.light-theme .sidebar--vendor .nav-sub-tab-btn:hover,
body.light-theme .sidebar--vendor .nav-direct-link-a:hover,
body.light-theme .sidebar--vendor .nav-item-link:hover,
body.light-theme .sidebar--vendor .nav-item-exp-btn:hover {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
}

body.light-theme .sidebar--vendor .nav-main-tab-btn[aria-expanded="true"] {
    background: linear-gradient(135deg, #059669, #0d9488);
    color: #ffffff;
}

body.light-theme .sidebar--vendor .nav-sub-tab-btn[aria-expanded="true"],
body.light-theme .sidebar--vendor .nav-direct-link-a.active,
body.light-theme .sidebar--vendor .nav-item-link.active,
body.light-theme .sidebar--vendor .nav-item-exp-btn[aria-expanded="true"],
body.light-theme .sidebar--vendor .sidebar-quick-link.active {
    background: rgba(16, 185, 129, 0.14);
    color: #047857;
}

body.light-theme .sidebar--vendor [data-tab-id^="vendor-"] .tab-number,
body.light-theme .sidebar--vendor .sidebar-shortcut-chip,
body.light-theme .sidebar--vendor .sidebar-quick-link .sidebar-shortcut-chip {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.22);
    color: #047857;
}

body.light-theme .sidebar--vendor .dot-indicator {
    border-color: rgba(16, 185, 129, 0.35);
    color: #059669;
    background: rgba(16, 185, 129, 0.06);
}

body.light-theme .theme-admin .topnav,
body.light-theme.theme-admin .topnav {
    border-bottom-color: rgba(139, 92, 246, 0.2);
}

body.light-theme .theme-vendor .topnav,
body.light-theme.theme-vendor .topnav {
    border-bottom-color: rgba(16, 185, 129, 0.2);
}

/* Keep tier accents subtle on white top bar (readable text, no “lavender slab”) */
body.light-theme .theme-admin .topnav__menu-link {
    color: var(--text-secondary);
}

body.light-theme .theme-admin .topnav__menu-link:hover,
body.light-theme .theme-admin .topnav__menu-link.active {
    background: rgba(124, 58, 237, 0.1);
    color: #5b21b6;
}

body.light-theme .theme-admin .topnav__release-badge,
body.light-theme .theme-admin .topnav__shortcut-chip,
body.light-theme .theme-admin .topnav__project-icon {
    background: rgba(124, 58, 237, 0.1);
    border-color: rgba(124, 58, 237, 0.22);
    color: #5b21b6;
}

body.light-theme .theme-admin .topnav__utility-link:hover,
body.light-theme .theme-admin .topnav__icon-btn:hover,
body.light-theme .theme-admin .topnav__notification:hover,
body.light-theme .theme-admin .topnav__project-toggle:hover {
    background: rgba(124, 58, 237, 0.08);
}

body.light-theme.theme-admin .topnav__menu-link {
    color: var(--text-secondary);
}

body.light-theme.theme-admin .topnav__menu-link:hover,
body.light-theme.theme-admin .topnav__menu-link.active {
    background: rgba(124, 58, 237, 0.1);
    color: #5b21b6;
}

body.light-theme.theme-admin .topnav__release-badge,
body.light-theme.theme-admin .topnav__shortcut-chip,
body.light-theme.theme-admin .topnav__project-icon {
    background: rgba(124, 58, 237, 0.1);
    border-color: rgba(124, 58, 237, 0.22);
    color: #5b21b6;
}

body.light-theme .theme-vendor .topnav__menu-link {
    color: var(--text-secondary);
}

body.light-theme .theme-vendor .topnav__menu-link:hover,
body.light-theme .theme-vendor .topnav__menu-link.active {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
}

body.light-theme .theme-vendor .topnav__release-badge,
body.light-theme .theme-vendor .topnav__shortcut-chip,
body.light-theme .theme-vendor .topnav__project-icon {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: #047857;
}

body.light-theme.theme-vendor .topnav__menu-link:hover,
body.light-theme.theme-vendor .topnav__menu-link.active {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
}

body.light-theme.theme-vendor .topnav__release-badge,
body.light-theme.theme-vendor .topnav__shortcut-chip,
body.light-theme.theme-vendor .topnav__project-icon {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: #047857;
}

body.light-theme .sidebar--admin .nav-main-tab,
body.light-theme .sidebar--vendor .nav-main-tab {
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

body.light-theme .sidebar--admin .nav-main-tab {
    border-color: rgba(139, 92, 246, 0.16);
}

body.light-theme .sidebar--vendor .nav-main-tab {
    border-color: rgba(16, 185, 129, 0.18);
}

.sidebar-nav--admin .nav-main-tab {
    border-color: rgba(139, 92, 246, 0.18);
    background: linear-gradient(180deg, rgba(49, 24, 93, 0.44), rgba(15, 23, 42, 0.5));
}

.sidebar-nav--admin .nav-main-tab-btn:hover,
.sidebar-nav--admin .nav-sub-tab-btn:hover,
.sidebar-nav--admin .nav-direct-link-a:hover,
.sidebar-nav--admin .nav-item-link:hover,
.sidebar-nav--admin .nav-item-exp-btn:hover {
    background: rgba(139, 92, 246, 0.12);
    color: #f5f3ff;
}

.sidebar-nav--admin .nav-main-tab-btn[aria-expanded="true"] {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.96), rgba(79, 70, 229, 0.94));
}

.sidebar-nav--admin .nav-sub-tab-btn[aria-expanded="true"],
.sidebar-nav--admin .nav-direct-link-a.active,
.sidebar-nav--admin .nav-item-link.active,
.sidebar-nav--admin .nav-item-exp-btn[aria-expanded="true"],
.sidebar-nav--admin .sidebar-quick-link.active {
    background: rgba(139, 92, 246, 0.16);
    color: #e9d5ff;
}

.sidebar-nav--admin [data-tab-id^="admin-"] .tab-number,
.sidebar-nav--admin .sidebar-shortcut-chip,
.sidebar-nav--admin .sidebar-quick-link .sidebar-shortcut-chip {
    background: rgba(139, 92, 246, 0.16);
    border-color: rgba(167, 139, 250, 0.22);
    color: #e9d5ff;
}

.sidebar-nav--admin .dot-indicator {
    border-color: rgba(196, 181, 253, 0.35);
    color: #ddd6fe;
    background: rgba(139, 92, 246, 0.1);
}

.sidebar-nav--admin .nav-item-link::before {
    background: linear-gradient(135deg, rgba(196, 181, 253, 0.76), rgba(139, 92, 246, 0.3));
    box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.18);
}

.sidebar-nav--vendor .nav-main-tab {
    border-color: rgba(16, 185, 129, 0.16);
    background: linear-gradient(180deg, rgba(6, 78, 59, 0.42), rgba(10, 40, 32, 0.52));
}

.sidebar-nav--vendor .nav-main-tab-btn:hover,
.sidebar-nav--vendor .nav-sub-tab-btn:hover,
.sidebar-nav--vendor .nav-direct-link-a:hover,
.sidebar-nav--vendor .nav-item-link:hover,
.sidebar-nav--vendor .nav-item-exp-btn:hover {
    background: rgba(16, 185, 129, 0.12);
    color: #ecfdf5;
}

.sidebar-nav--vendor .nav-main-tab-btn[aria-expanded="true"] {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(5, 150, 105, 0.92));
}

.sidebar-nav--vendor .nav-sub-tab-btn[aria-expanded="true"],
.sidebar-nav--vendor .nav-direct-link-a.active,
.sidebar-nav--vendor .nav-item-link.active,
.sidebar-nav--vendor .nav-item-exp-btn[aria-expanded="true"],
.sidebar-nav--vendor .sidebar-quick-link.active {
    background: rgba(16, 185, 129, 0.16);
    color: #d1fae5;
}

.sidebar-nav--vendor [data-tab-id^="vendor-"] .tab-number,
.sidebar-nav--vendor .sidebar-shortcut-chip,
.sidebar-nav--vendor .sidebar-quick-link .sidebar-shortcut-chip {
    background: rgba(16, 185, 129, 0.16);
    border-color: rgba(52, 211, 153, 0.2);
    color: #d1fae5;
}

.sidebar-nav--vendor .dot-indicator {
    border-color: rgba(110, 231, 183, 0.35);
    color: #d1fae5;
    background: rgba(16, 185, 129, 0.08);
}

.sidebar-nav--vendor .nav-item-link::before {
    background: linear-gradient(135deg, rgba(110, 231, 183, 0.78), rgba(16, 185, 129, 0.28));
    box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.14);
}

.sidebar-nav--web .sidebar-quick-link.active,
.sidebar-nav--web .nav-direct-link-a.active,
.sidebar-nav--web .nav-item-link.active,
.sidebar-nav--web .nav-sub-tab-btn[aria-expanded="true"],
.sidebar-nav--web .nav-item-exp-btn[aria-expanded="true"] {
    background: rgba(59, 130, 246, 0.16);
    color: #dbeafe;
}

.sidebar-nav--web .dot-indicator {
    border-color: rgba(147, 197, 253, 0.34);
    color: #dbeafe;
    background: rgba(59, 130, 246, 0.08);
}

.sidebar-tier-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
}

.sidebar-tier-pill__code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.7rem;
    height: 1.15rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.16);
    color: inherit;
    font-size: 0.58rem;
    letter-spacing: 0.08em;
}

.entity-shell {
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
}

.entity-header {
    gap: 1rem;
}

.entity-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.85rem;
}

.entity-meta__item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 600;
}

.entity-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-end;
}

.entity-actions form,
.entity-inline-form {
    margin: 0;
}

.entity-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.entity-stat-card {
    display: grid;
    gap: 0.3rem;
    padding: 1rem 1.05rem;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.62), rgba(30, 41, 59, 0.46));
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
}

.entity-stat-card__label {
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.entity-stat-card__value {
    color: var(--text-primary);
    font-size: 1.8rem;
    line-height: 1;
}

.entity-stat-card__detail {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.entity-grid {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.entity-sidebar,
.entity-main {
    display: grid;
    gap: 1rem;
}

.entity-info-card {
    padding: 1.05rem 1.1rem;
}

.entity-card__heading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.9rem;
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.entity-detail-grid {
    grid-template-columns: 1fr;
    gap: 0.9rem;
}

.entity-table-card {
    padding: 0;
    overflow: hidden;
}

.entity-table-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.05rem 1.1rem 0.95rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.entity-table-card__subtext {
    margin: 0.25rem 0 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.entity-empty {
    display: grid;
    justify-items: center;
    gap: 0.75rem;
    padding: 2.4rem 1.2rem;
    color: var(--text-secondary);
    text-align: center;
}

.entity-empty i {
    font-size: 1.6rem;
    color: var(--accent-light);
}

.entity-select {
    min-width: 148px;
}

.entity-upload-label {
    cursor: pointer;
}

.entity-shell--transmittal .table td,
.entity-shell--transmittal .table th {
    vertical-align: middle;
}

body.light-theme .entity-meta__item,
body.light-theme .entity-stat-card {
    background: #ffffff;
}

body.light-theme .entity-stat-card {
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.06);
}

@media (max-width: 1100px) {
    .entity-stat-grid {
        grid-template-columns: 1fr;
    }

    .entity-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .entity-shell {
        padding: 1rem;
    }

    .entity-actions {
        width: 100%;
    }

    .entity-actions .btn,
    .entity-actions form {
        width: 100%;
    }

    .entity-actions .btn {
        justify-content: center;
    }

    .entity-table-card__head {
        flex-direction: column;
    }

    .entity-select {
        min-width: 120px;
        width: 100%;
    }
}

/* Final sidebar icon normalization: force icon markers for all nested shortcut levels */
.sidebar-nav .dot-indicator {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 12px !important;
    height: 12px !important;
    border-radius: 6px !important;
    border: 1px solid rgba(148, 163, 184, 0.28) !important;
    background: rgba(148, 163, 184, 0.08) !important;
    color: currentColor !important;
    position: relative !important;
    flex-shrink: 0 !important;
}

.sidebar-nav .dot-indicator::after {
    content: '' !important;
    width: 8px !important;
    height: 8px !important;
    background-color: currentColor !important;
    opacity: 0.95 !important;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M6 3.5 10.5 8 6 12.5 5 11.5 8.5 8 5 4.5 6 3.5Z'/%3E%3C/svg%3E") center/contain no-repeat !important;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M6 3.5 10.5 8 6 12.5 5 11.5 8.5 8 5 4.5 6 3.5Z'/%3E%3C/svg%3E") center/contain no-repeat !important;
}

.sidebar-nav .nav-item-link::before {
    content: '' !important;
    width: 13px !important;
    height: 13px !important;
    flex-shrink: 0 !important;
    background: currentColor !important;
    opacity: 0.9 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M4 1.5A1.5 1.5 0 0 0 2.5 3v10A1.5 1.5 0 0 0 4 14.5h8A1.5 1.5 0 0 0 13.5 13V5.207a1.5 1.5 0 0 0-.44-1.06L10.853 1.94a1.5 1.5 0 0 0-1.06-.44H4Zm5.5 1.707L11.793 5.5H10a.5.5 0 0 1-.5-.5V3.207Z'/%3E%3C/svg%3E") center/contain no-repeat !important;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M4 1.5A1.5 1.5 0 0 0 2.5 3v10A1.5 1.5 0 0 0 4 14.5h8A1.5 1.5 0 0 0 13.5 13V5.207a1.5 1.5 0 0 0-.44-1.06L10.853 1.94a1.5 1.5 0 0 0-1.06-.44H4Zm5.5 1.707L11.793 5.5H10a.5.5 0 0 1-.5-.5V3.207Z'/%3E%3C/svg%3E") center/contain no-repeat !important;
}

.sidebar-nav .nav-sub-item-link::before {
    content: '' !important;
    width: 12px !important;
    height: 12px !important;
    margin-right: 2px !important;
    flex-shrink: 0 !important;
    background: currentColor !important;
    opacity: 0.72 !important;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M11.5 4.5a.75.75 0 0 1 0 1.5H6.31l1.72 1.72-1.06 1.06-3-3 3-3 1.06 1.06L6.31 4.5h5.19Z'/%3E%3C/svg%3E") center/contain no-repeat !important;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M11.5 4.5a.75.75 0 0 1 0 1.5H6.31l1.72 1.72-1.06 1.06-3-3 3-3 1.06 1.06L6.31 4.5h5.19Z'/%3E%3C/svg%3E") center/contain no-repeat !important;
}

.sidebar-nav .nav-item-exp-btn .tab-label::before {
    content: '' !important;
    display: inline-flex !important;
    width: 13px !important;
    height: 13px !important;
    flex-shrink: 0 !important;
    background: currentColor !important;
    opacity: 0.78 !important;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M1.75 3A1.75 1.75 0 0 1 3.5 1.25h2.71c.46 0 .9.18 1.23.5l.5.5c.16.16.38.25.6.25h3.96A1.75 1.75 0 0 1 14.25 4.25v7A1.75 1.75 0 0 1 12.5 13H3.5A1.75 1.75 0 0 1 1.75 11.25V3Z'/%3E%3C/svg%3E") center/contain no-repeat !important;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M1.75 3A1.75 1.75 0 0 1 3.5 1.25h2.71c.46 0 .9.18 1.23.5l.5.5c.16.16.38.25.6.25h3.96A1.75 1.75 0 0 1 14.25 4.25v7A1.75 1.75 0 0 1 12.5 13H3.5A1.75 1.75 0 0 1 1.75 11.25V3Z'/%3E%3C/svg%3E") center/contain no-repeat !important;
}

.sidebar-nav--admin .nav-sub-item-link::before,
.sidebar-nav--admin .nav-item-exp-btn .tab-label::before {
    color: #ddd6fe !important;
}

.sidebar-nav--vendor .nav-sub-item-link::before,
.sidebar-nav--vendor .nav-item-exp-btn .tab-label::before {
    color: #d1fae5 !important;
}

.sidebar-nav--web .nav-sub-item-link::before,
.sidebar-nav--web .nav-item-exp-btn .tab-label::before {
    color: #dbeafe !important;
}

/* ============================================================================
   Contrast guardrails for controls, menus and secondary actions
   Keeps text readable in both dark and light themes, including native select
   option lists and row action dropdowns.
   ============================================================================ */
:root {
    color-scheme: dark;
    --control-surface: rgba(15, 23, 42, 0.86);
    --control-surface-hover: rgba(30, 41, 59, 0.96);
    --control-text: #e2e8f0;
    --control-muted: #94a3b8;
    --control-border: rgba(148, 163, 184, 0.24);
    --menu-surface: #111827;
    --menu-surface-hover: rgba(var(--accent-rgb), 0.16);
    --menu-text: #e2e8f0;
    --menu-muted: #94a3b8;
    --menu-border: rgba(148, 163, 184, 0.22);
    --button-secondary-surface: rgba(226, 232, 240, 0.09);
    --button-secondary-surface-hover: rgba(var(--accent-rgb), 0.18);
    --button-secondary-text: #f8fafc;
    --button-secondary-border: rgba(148, 163, 184, 0.28);
    --native-option-surface: #ffffff;
    --native-option-text: #111827;
    --native-option-selected-surface: #2563eb;
    --native-option-selected-text: #ffffff;
}

html[data-theme="light"],
body.light-theme {
    color-scheme: light;
    --control-surface: #ffffff;
    --control-surface-hover: #f0f3f8;
    --control-text: #121826;
    --control-muted: #5c6570;
    --control-border: #c5ccd6;
    --menu-surface: #ffffff;
    --menu-surface-hover: #eef2f7;
    --menu-text: #121826;
    --menu-muted: #5c6570;
    --menu-border: #c5ccd6;
    --button-secondary-surface: #ffffff;
    --button-secondary-surface-hover: #eef2f7;
    --button-secondary-text: #0a0e14;
    --button-secondary-border: #c5ccd6;
    --native-option-surface: #ffffff;
    --native-option-text: #121826;
    --native-option-selected-surface: #2563eb;
    --native-option-selected-text: #ffffff;
}

.btn--secondary,
.btn-secondary {
    background: var(--button-secondary-surface) !important;
    border-color: var(--button-secondary-border) !important;
    color: var(--button-secondary-text) !important;
}

.btn--secondary:hover,
.btn-secondary:hover,
.btn--secondary:focus-visible,
.btn-secondary:focus-visible {
    background: var(--button-secondary-surface-hover) !important;
    border-color: var(--accent) !important;
    color: var(--accent-light) !important;
}

.btn--secondary *,
.btn-secondary * {
    color: inherit !important;
}

.form-control,
.form-select,
select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
input[type="url"],
input[type="tel"],
textarea,
.param-input,
.sidebar__project-select {
    background: var(--control-surface) !important;
    border-color: var(--control-border) !important;
    color: var(--control-text) !important;
}

.form-control:focus,
.form-select:focus,
select:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="time"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
textarea:focus,
.param-input:focus,
.sidebar__project-select:focus {
    background: var(--control-surface-hover) !important;
    border-color: var(--accent) !important;
    color: var(--control-text) !important;
}

.form-control::placeholder,
input::placeholder,
textarea::placeholder {
    color: var(--control-muted) !important;
    opacity: 1;
}

select option,
.form-control option,
.form-select option,
.param-input option,
.sidebar__project-select option {
    color-scheme: light;
    background: var(--native-option-surface) !important;
    background-color: var(--native-option-surface) !important;
    color: var(--native-option-text) !important;
}

select option:checked,
select option:hover,
select option:focus,
.form-control option:checked,
.form-control option:hover,
.form-control option:focus,
.form-select option:checked,
.form-select option:hover,
.form-select option:focus,
.param-input option:checked,
.param-input option:hover,
.param-input option:focus,
.sidebar__project-select option:checked,
.sidebar__project-select option:hover,
.sidebar__project-select option:focus {
    background: var(--native-option-selected-surface) !important;
    background-color: var(--native-option-selected-surface) !important;
    color: var(--native-option-selected-text) !important;
}

.dropdown__menu,
.action-menu__dropdown,
.ctx-menu {
    background: var(--menu-surface) !important;
    border-color: var(--menu-border) !important;
    color: var(--menu-text) !important;
}

.dropdown__header,
.dropdown__item,
.action-menu__item,
.ctx-menu__item {
    color: var(--menu-text) !important;
}

.dropdown__sub,
.dropdown__item-icon {
    color: var(--menu-muted) !important;
}

.dropdown__item-icon {
    background: rgba(var(--accent-rgb), 0.08) !important;
    border-color: var(--menu-border) !important;
}

.dropdown__item:hover,
.action-menu__item:hover,
.ctx-menu__item:hover {
    background: var(--menu-surface-hover) !important;
    color: var(--accent-light) !important;
}

.dropdown__item:hover .dropdown__item-icon {
    color: var(--accent-light) !important;
    border-color: rgba(var(--accent-rgb), 0.3) !important;
}

.dropdown__item--danger:hover,
.action-menu__item--danger:hover {
    background: var(--danger-light) !important;
    color: var(--danger) !important;
}
