/* =============================================================================
   Ergonik Design System
   Single source of truth for the Ergonik Talent UI.
   ============================================================================= */

/* =============================================================================
   1. CSS Variables (Design Tokens)
   ============================================================================= */

:root {
    /* Brand — Ergonik violet */
    --brand-primary: #7c3aed;
    --brand-primary-dark: #6D28D9;
    --brand-primary-light: #A78BFA;
    --brand-primary-container: #f5f3ff;

    /* Chrome (header/sidebar) — deep violet */
    --chrome-bg: #1e1038;
    --chrome-bg-hover: #2a1650;
    --chrome-text: rgba(255,255,255,0.85);
    --chrome-text-muted: rgba(255,255,255,0.65);
    --chrome-border: rgba(255,255,255,0.08);

    /* Surface (content areas) */
    --surface-bg: #ffffff;
    --surface-secondary: #fafafa;
    --surface-border: #e2e8f0;
    --surface-text: #1e293b;
    --surface-text-muted: #64748b;

    /* Semantic */
    --color-success: #059669;
    --color-success-bg: #ecfdf5;
    --color-warning: #D97706;
    --color-warning-bg: #fef3c7;
    --color-danger: #DC2626;
    --color-danger-bg: #fee2e2;
    --color-info: #2563eb;
    --color-info-bg: #dbeafe;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --text-xs: 0.8125rem;
    --text-sm: 0.875rem;
    --text-base: 0.9375rem;
    --text-md: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;

    /* Spacing */
    --space-xs: 2px;
    --space-sm: 4px;
    --space-md: 8px;
    --space-lg: 12px;
    --space-xl: 16px;
    --space-2xl: 24px;
    --space-3xl: 32px;

    /* Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.1);
}


/* =============================================================================
   2. Reset & Base
   ============================================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    font-size: 14px;
    color: var(--surface-text);
    background: var(--surface-secondary);
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a,
.btn-link {
    color: var(--brand-primary);
    text-decoration: none;
}

a:hover,
.btn-link:hover {
    color: var(--brand-primary-dark);
    text-decoration: underline;
}

h1:focus {
    outline: none;
}


/* =============================================================================
   3. Chrome Shell (Header, Sidebar)
   ============================================================================= */

/* --- Header / AppBar --- */

.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: var(--chrome-bg);
    color: var(--chrome-text);
    border-bottom: 1px solid var(--chrome-border);
    display: flex;
    align-items: center;
    padding: 0 var(--space-xl);
    z-index: 1040;
}

/* --- Sidebar --- */

.app-sidebar {
    position: fixed;
    top: 40px;
    left: 0;
    bottom: 0;
    width: 254px;
    background: var(--chrome-bg);
    color: var(--chrome-text);
    border-right: 1px solid var(--chrome-border);
    display: flex;
    flex-direction: column;
    z-index: 1030;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-header {
    padding: var(--space-xl);
    border-bottom: 1px solid var(--chrome-border);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.sidebar-header img {
    max-height: 28px;
    width: auto;
}

.client-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: var(--text-lg);
    flex-shrink: 0;
}

.client-info {
    flex: 1;
    min-width: 0;
}

.sidebar-header .client-name {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--chrome-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.change-client-link {
    background: none;
    border: none;
    color: var(--chrome-text-muted);
    font-size: var(--text-xs);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    transition: color 0.15s ease;
}

.change-client-link:hover {
    color: var(--brand-primary-light);
}

/* --- Sidebar Navigation --- */

.sidebar-nav {
    flex: 1;
    padding: var(--space-md) 0;
}

.nav-section-title {
    font-size: var(--text-xs);
    color: var(--chrome-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: var(--space-lg) var(--space-xl) var(--space-sm);
    font-weight: 600;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: var(--space-md) var(--space-xl);
    color: var(--chrome-text);
    font-size: var(--text-sm);
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
    border-left: 2px solid transparent;
    cursor: pointer;
}

.nav-link i,
.nav-link .bi {
    font-size: var(--text-md);
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.nav-link:hover {
    background: var(--chrome-bg-hover);
    color: #ffffff;
    text-decoration: none;
}

.nav-link.active,
.sidebar-nav .nav-link.active {
    border-left-color: var(--brand-primary-light);
    color: #ffffff;
    background: var(--chrome-bg-hover);
    background: var(--chrome-bg-hover);
    font-weight: 500;
}

/* --- Sidebar Footer --- */

.sidebar-footer {
    padding: var(--space-lg) var(--space-xl);
    border-top: 1px solid var(--chrome-border);
    font-size: var(--text-xs);
    color: var(--chrome-text-muted);
}

.sidebar-footer .version {
    opacity: 0.6;
}

/* --- Main Content --- */

.main-content {
    min-height: 100vh;
    padding-top: 48px;
    overflow-x: hidden;
    flex: 1;
    margin-left: 0 !important;
    min-width: 0;
}


/* =============================================================================
   4. Layout Primitives
   ============================================================================= */

/* --- Page Container --- */

.page-container {
    padding: var(--space-2xl);
    min-height: calc(100vh - 40px);
}

/* --- Page Title Bar --- */

.page-title-bar {
    min-height: 44px;
    background: var(--surface-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-lg);
    border-bottom: 1px solid var(--surface-border);
}

.page-title-bar .title-back,
.page-title-bar .title-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-title-bar .title-actions:only-child {
    margin-left: auto;
}

.page-title-bar .e-btn,
.page-title-bar .btn,
.page-title-bar .title-actions .e-btn,
.page-title-bar .title-actions .btn {
    color: var(--surface-text) !important;
    border: 1px solid var(--surface-border) !important;
    background: var(--surface-bg) !important;
    font-size: var(--text-xs);
    font-weight: 500;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
}

.page-title-bar .e-btn:hover,
.page-title-bar .btn:hover,
.page-title-bar .title-actions .e-btn:hover,
.page-title-bar .title-actions .btn:hover {
    background: var(--surface-secondary) !important;
    border-color: var(--brand-primary) !important;
    color: var(--brand-primary) !important;
}

.page-title-bar .e-btn .e-btn-icon,
.page-title-bar .e-btn .e-icons,
.page-title-bar .btn i {
    color: inherit !important;
}

.page-title-bar .title-actions .badge {
    font-size: var(--text-xs);
}

/* --- Bento Grid --- */

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--surface-border);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.bento-cell {
    background: var(--surface-bg);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
}

.bento-cell.span-2 { grid-column: span 2; }
.bento-cell.span-3 { grid-column: span 3; }
.bento-cell.span-4 { grid-column: span 4; }

.bento-label {
    font-size: var(--text-xs);
    color: var(--surface-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: var(--space-xs);
}

.bento-value {
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--surface-text);
    line-height: 1.2;
}

.bento-subtext {
    font-size: var(--text-sm);
    color: var(--surface-text-muted);
    margin-top: var(--space-xs);
}

/* --- Data Panel --- */

.data-panel {
    background: var(--surface-bg);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.data-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--surface-border);
    background: var(--surface-bg);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--surface-text);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.data-panel-body {
    padding: var(--space-lg);
}

/* --- Metric Strip --- */

.metric-strip {
    display: flex;
    align-items: stretch;
    background: var(--surface-bg);
    border-bottom: 1px solid var(--surface-border);
}

.metric-cell {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-sm) var(--space-xl);
    border-right: 1px solid var(--surface-border);
    min-width: 0;
}

.metric-cell:last-child {
    border-right: none;
}

.metric-label {
    font-size: var(--text-xs);
    color: var(--surface-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.metric-value {
    font-size: var(--text-md);
    font-weight: 600;
    color: var(--surface-text);
    line-height: 1.2;
}

.metric-trend {
    font-size: var(--text-xs);
    font-weight: 500;
    margin-left: var(--space-sm);
}

.metric-trend.up { color: var(--color-success); }
.metric-trend.down { color: var(--color-danger); }
.metric-trend.neutral { color: var(--surface-text-muted); }

/* --- Section Header --- */

.section-header {
    background: var(--surface-bg);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    border-bottom: 1px solid var(--surface-border);
}

/* --- Filter Strip --- */

.filter-strip {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-sm) var(--space-xl);
    background: var(--surface-bg);
    border-bottom: 1px solid var(--surface-border);
}

.filter-label {
    font-size: var(--text-xs);
    color: var(--surface-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.content {
    padding-top: var(--space-md);
    max-width: 100%;
    overflow-x: hidden;
}


/* =============================================================================
   5. Components
   ============================================================================= */

/* --- Buttons --- */

.btn-primary {
    color: #fff;
    background-color: var(--brand-primary);
    border: 1px solid var(--brand-primary-dark);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
}

.btn-primary:hover {
    background-color: var(--brand-primary-dark);
    border-color: var(--brand-primary-dark);
}

.btn-primary:focus,
.btn-primary:focus-visible {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(124, 58, 237, 0.35);
}

.btn-secondary {
    color: var(--surface-text);
    background-color: var(--surface-bg);
    border: 1px solid var(--surface-border);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
}

.btn-secondary:hover {
    background-color: var(--surface-secondary);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.btn-danger {
    color: #fff;
    background-color: var(--color-danger);
    border: 1px solid var(--color-danger);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
}

.btn-danger:hover {
    background-color: #b91c1c;
    border-color: #b91c1c;
}

.btn-sm {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-xs);
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(124, 58, 237, 0.35);
}

/* --- Bootstrap Utility Overrides — brand violet --- */

.text-primary { color: var(--brand-primary) !important; }
.bg-primary { background-color: var(--brand-primary) !important; }
.badge.bg-primary { background-color: var(--brand-primary) !important; }
.border-primary { border-color: var(--brand-primary) !important; }

.btn-outline-primary {
    color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.btn-outline-primary:hover,
.btn-outline-primary:active {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #fff;
}

.spinner-border.text-primary { color: var(--brand-primary) !important; }

/* --- Badges --- */

.badge-success {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: var(--color-success-bg);
    color: var(--color-success);
}

.badge-warning {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: var(--color-warning-bg);
    color: var(--color-warning);
}

.badge-danger {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: var(--color-danger-bg);
    color: var(--color-danger);
}

.badge-info {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: var(--color-info-bg);
    color: var(--color-info);
}

.badge-neutral {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: #f3f4f6;
    color: #374151;
}

/* --- Dropdown Panel --- */

.dropdown-panel {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--surface-bg);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1050;
    padding: var(--space-sm) 0;
    min-width: 200px;
}

.dropdown-panel .dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-xl);
    font-size: var(--text-sm);
    color: var(--surface-text);
    cursor: pointer;
    transition: background-color 0.1s ease;
}

.dropdown-panel .dropdown-item:hover {
    background: var(--surface-secondary);
}

.dropdown-panel .dropdown-item i {
    width: 16px;
    text-align: center;
    color: var(--surface-text-muted);
}

.dropdown-panel .dropdown-divider {
    height: 1px;
    background: var(--surface-border);
    margin: var(--space-sm) 0;
}

/* --- Login Display --- */

.login-display-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.header-profile-btn {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    color: var(--chrome-text);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.header-profile-btn:hover {
    background: var(--chrome-bg-hover);
    border-color: var(--chrome-border);
}

.avatar-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: #ffffff;
    font-size: var(--text-xs);
    font-weight: 600;
    flex-shrink: 0;
}

.avatar-circle.avatar-lg {
    width: 40px;
    height: 40px;
    font-size: var(--text-md);
}

.header-user-name {
    font-size: var(--text-sm);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-user-info {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-xl);
}

.dropdown-user-details {
    flex: 1;
    min-width: 0;
}

.dropdown-user-name {
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--surface-text);
}

.dropdown-user-email {
    font-size: var(--text-xs);
    color: var(--surface-text-muted);
    margin-top: var(--space-xs);
}

.text-danger-action {
    color: var(--color-danger) !important;
}

@media (max-width: 768px) {
    .header-user-name {
        display: none;
    }
}

/* --- Toast Notifications --- */

.toast {
    position: fixed;
    top: var(--space-xl);
    right: var(--space-xl);
    min-width: 350px;
    max-width: 480px;
    background: var(--surface-bg);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: var(--space-lg) var(--space-xl);
    z-index: 1100;
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.toast-success {
    border-left: 3px solid var(--color-success);
}

.toast.toast-danger {
    border-left: 3px solid var(--color-danger);
}

.toast.toast-warning {
    border-left: 3px solid var(--color-warning);
}

.toast.toast-info {
    border-left: 3px solid var(--color-info);
}

.toast .toast-icon {
    font-size: var(--text-lg);
    flex-shrink: 0;
}

.toast.toast-success .toast-icon { color: var(--color-success); }
.toast.toast-danger .toast-icon { color: var(--color-danger); }
.toast.toast-warning .toast-icon { color: var(--color-warning); }
.toast.toast-info .toast-icon { color: var(--color-info); }

.toast .toast-body {
    flex: 1;
    min-width: 0;
}

.toast .toast-title {
    font-weight: 600;
    font-size: var(--text-sm);
    margin-bottom: var(--space-xs);
}

.toast .toast-message {
    font-size: var(--text-sm);
    color: var(--surface-text-muted);
}

.toast .toast-close {
    background: none;
    border: none;
    color: var(--surface-text-muted);
    cursor: pointer;
    padding: 0;
    font-size: var(--text-lg);
    line-height: 1;
    flex-shrink: 0;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}


/* =============================================================================
   6. Glassmorphism (Login / Client Select)
   ============================================================================= */

.glass-page {
    min-height: 100vh;
    background: #1e1038;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.glass-card {
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px;
    max-width: 480px;
    width: 100%;
    padding: 40px 36px 28px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 1;
}

.glass-card h1,
.glass-card h2,
.glass-card h3 {
    color: #ffffff;
}

.glass-card p {
    color: rgba(255,255,255,0.7);
}

.glass-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: float 12s ease-in-out infinite;
    pointer-events: none;
}

.glass-orb-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
    background: #7c3aed;
    opacity: 0.15;
}

.glass-orb-2 {
    width: 350px;
    height: 350px;
    bottom: -80px;
    left: -80px;
    background: #A78BFA;
    opacity: 0.12;
    animation-delay: -4s;
}

.glass-orb-3 {
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #c4b5fd;
    opacity: 0.10;
    animation-delay: -8s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.glass-orb-3 {
    animation-name: floatCenter;
}

@keyframes floatCenter {
    0%, 100% {
        transform: translate(-50%, -50%) translateY(0);
    }
    50% {
        transform: translate(-50%, -50%) translateY(-20px);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}


/* =============================================================================
   7. Skeleton Loaders
   ============================================================================= */

.skeleton {
    background: #e2e8f0;
    border-radius: var(--radius-sm);
    animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-text {
    height: 14px;
    width: 100%;
    margin-bottom: 8px;
}

.skeleton-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-card {
    height: 120px;
    width: 100%;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 1;
    }
}


/* =============================================================================
   8. Syncfusion Overrides
   ============================================================================= */

/* AppBar — chrome violet */
.e-appbar,
.e-appbar.e-light,
.e-appbar.e-dark {
    background-color: var(--chrome-bg) !important;
    color: var(--chrome-text) !important;
    height: 48px;
    border-bottom: 1px solid var(--chrome-border);
    box-shadow: none !important;
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1040;
}

.e-appbar .e-btn.e-inherit,
.e-appbar.e-light .e-btn.e-inherit,
.e-appbar .e-btn.e-inherit .e-icons,
.e-appbar .e-btn.e-inherit .e-btn-icon,
.e-appbar .e-icons {
    color: var(--chrome-text) !important;
}

/* Sidebar — chrome violet */
.e-sidebar,
.e-sidebar.sidebar-myclass {
    background-color: var(--chrome-bg) !important;
    border-right: 1px solid var(--chrome-border) !important;
    padding-top: 48px !important;
}

/* Grid — compact rows */
.e-grid .e-rowcell {
    padding: 4px 8px;
    font-size: var(--text-base);
}

/* Grid — uppercase headers */
.e-grid .e-headercelldiv {
    text-transform: uppercase;
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.04em;
}

/* Grid — zebra striping */
.e-grid .e-altrow {
    background-color: var(--surface-secondary);
}

/* Grid — selection */
.e-grid .e-rowcell.e-selectionbackground,
.e-grid .e-active {
    background-color: var(--brand-primary-container) !important;
}

/* Buttons — brand primary */
.e-btn {
    border-radius: var(--radius-sm);
}

.e-btn.e-primary,
.e-css.e-btn.e-primary {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: #fff !important;
}

.e-btn.e-primary:hover,
.e-css.e-btn.e-primary:hover {
    background-color: var(--brand-primary-dark) !important;
    border-color: var(--brand-primary-dark) !important;
    color: #fff !important;
}

.e-btn.e-outline.e-primary,
.e-css.e-btn.e-outline.e-primary {
    color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    background-color: transparent !important;
}

.e-btn.e-outline.e-primary:hover,
.e-css.e-btn.e-outline.e-primary:hover {
    color: #fff !important;
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
}

/* Tabs — brand indicator */
.e-tab .e-tab-header .e-toolbar-item .e-tab-text {
    font-size: var(--text-sm);
    padding: var(--space-sm) var(--space-md);
}

.e-tab .e-tab-header .e-toolbar-item.e-active .e-tab-text {
    color: var(--brand-primary) !important;
}

.e-tab .e-tab-header .e-indicator {
    background-color: var(--brand-primary) !important;
}

/* Dialog — chrome header */
.e-dialog .e-dlg-header-content {
    background: var(--chrome-bg) !important;
    color: var(--chrome-text) !important;
}

.e-dialog .e-dlg-header-content .e-dlg-header,
.e-dialog .e-dlg-header-content .e-dlg-header *,
.e-dialog .e-dlg-header-content .e-dlg-header span,
.e-dialog .e-dlg-header-content .e-dlg-header i,
.e-dialog .e-dlg-header-content .e-dlg-header div {
    color: var(--chrome-text) !important;
    font-weight: 600;
}

.e-dialog .e-dlg-header-content .e-btn.e-dlg-closeicon-btn,
.e-dialog .e-dlg-header-content .e-btn.e-dlg-closeicon-btn .e-btn-icon,
.e-dialog .e-dlg-header-content .e-btn.e-dlg-closeicon-btn .e-icons {
    color: var(--chrome-text) !important;
}

/* Card — minimal */
.e-card {
    border-radius: var(--radius-sm);
    border: 1px solid var(--surface-border);
    box-shadow: var(--shadow-sm);
}

/* Toolbar icons */
.e-toolbar .e-icons {
    color: var(--chrome-text);
}

/* Dropdown popups */
.e-ddl.e-popup {
    border-radius: var(--radius-sm) !important;
    box-shadow: var(--shadow-lg) !important;
    border: 1px solid var(--surface-border) !important;
    overflow: hidden !important;
}

.e-ddl.e-popup .e-list-item {
    padding: 10px 16px !important;
    font-size: var(--text-md) !important;
    border-radius: 0 !important;
}

.e-ddl.e-popup .e-list-item:hover {
    background: var(--surface-secondary) !important;
}

.e-ddl.e-popup .e-list-item.e-active {
    background: var(--brand-primary) !important;
    color: white !important;
}

/* MultiSelect — clean selection state */
.e-popup .e-list-item.e-active,
.e-popup .e-list-item.e-item-focus,
.e-popup .e-list-item.e-active.e-item-focus,
.e-dropdownbase .e-list-item.e-active,
.e-multiselect .e-list-item.e-active,
li.e-list-item.e-active {
    background: var(--surface-bg) !important;
    color: var(--surface-text) !important;
}

.e-popup .e-list-item:hover {
    background-color: var(--surface-secondary) !important;
}


/* =============================================================================
   9. Responsive
   ============================================================================= */

@media (max-width: 768px) {
    .app-sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        z-index: 1050;
    }

    .app-sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .page-container {
        padding: var(--space-xl);
    }
}

@media (max-width: 576px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .glass-card {
        max-width: 100%;
        margin: var(--space-xl);
        padding: var(--space-2xl) var(--space-xl) var(--space-xl);
        border-radius: var(--radius-lg);
    }

    .toast {
        left: var(--space-md);
        right: var(--space-md);
        min-width: 0;
        max-width: none;
    }

    .page-container {
        padding: var(--space-lg);
    }
}


/* =============================================================================
   10. Utilities
   ============================================================================= */

.text-muted { color: var(--surface-text-muted); }
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }

.fw-semibold { font-weight: 600; }
.fw-medium { font-weight: 500; }
.fw-bold { font-weight: 700; }

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* --- Spacing utilities (design system) --- */
.mb-space-2xl { margin-bottom: var(--space-2xl); }
.mt-space-md { margin-top: var(--space-md); }
.mt-space-lg { margin-top: var(--space-lg); }

/* --- Color utilities (design tokens) --- */
.text-brand { color: var(--brand-primary); }
.text-success { color: var(--color-success) !important; }
.text-warning { color: var(--color-warning) !important; }
.text-info-ds { color: var(--color-info); }

/* --- Candidate Card --- */
.candidate-card {
    background: var(--surface-bg);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    transition: box-shadow 0.15s ease;
    cursor: pointer;
    margin-bottom: var(--space-lg);
}

.candidate-card:hover {
    box-shadow: var(--shadow-md);
}

/* --- Avatar Initials --- */
.candidate-avatar,
.avatar-initials {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--brand-primary-container);
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: var(--text-sm);
    flex-shrink: 0;
}

.candidate-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-primary-container);
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: var(--text-xs);
    flex-shrink: 0;
}

/* --- Skill Tags --- */
.skill-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: var(--text-xs);
    font-weight: 500;
    background: var(--surface-secondary);
    color: var(--surface-text-muted);
    border: 1px solid var(--surface-border);
    margin: 0 4px 4px 0;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- Score Badge --- */
.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-weight: 700;
    font-size: var(--text-sm);
    flex-shrink: 0;
}

.score-badge.score-high {
    background: var(--color-success-bg);
    color: var(--color-success);
}

.score-badge.score-medium {
    background: var(--color-warning-bg);
    color: var(--color-warning);
}

.score-badge.score-low {
    background: var(--color-danger-bg);
    color: var(--color-danger);
}

/* --- Status Badge (Candidates) --- */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-badge.status-new,
.status-badge.status-incomplete { background: #f3f4f6; color: #374151; }
.status-badge.status-reviewed,
.status-badge.status-interviewscheduled,
.status-badge.status-interviewed { background: var(--color-info-bg); color: var(--color-info); }
.status-badge.status-shortlisted,
.status-badge.status-selected { background: var(--color-success-bg); color: var(--color-success); }
.status-badge.status-onhold,
.status-badge.status-nurturepool { background: var(--color-warning-bg); color: var(--color-warning); }
.status-badge.status-rejected,
.status-badge.status-withdrawn { background: var(--color-danger-bg); color: var(--color-danger); }

/* --- Interview Info (Candidate Card) --- */
.interview-info {
    padding: var(--space-md);
    background: var(--surface-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--surface-border);
}

/* --- Candidate Action Buttons --- */
.candidate-card .action-buttons {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

/* --- Candidates Table View --- */
.table-container {
    background: var(--surface-bg);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.candidates-table {
    width: 100%;
    border-collapse: collapse;
}

.candidates-table thead th {
    padding: var(--space-md) var(--space-lg);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--surface-text-muted);
    background: var(--surface-secondary);
    border-bottom: 1px solid var(--surface-border);
}

.candidates-table tbody tr {
    cursor: pointer;
    transition: background-color 0.1s ease;
}

.candidates-table tbody tr:hover {
    background: var(--surface-secondary);
}

.candidates-table tbody td {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--surface-border);
    vertical-align: middle;
}

.candidate-cell {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.candidate-name {
    font-weight: 600;
    font-size: var(--text-sm);
}

.candidate-email {
    font-size: var(--text-xs);
    color: var(--surface-text-muted);
}

.interview-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.interview-status {
    font-size: var(--text-xs);
    font-weight: 600;
}

.interview-date {
    font-size: var(--text-xs);
    color: var(--surface-text-muted);
}

/* --- Table Action Buttons --- */
.btn-action {
    background: none;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    cursor: pointer;
    color: var(--surface-text-muted);
    transition: all 0.15s ease;
    margin: 0 2px;
}

.btn-action:hover {
    background: var(--surface-secondary);
    color: var(--surface-text);
}

.btn-action.btn-action-primary {
    color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.btn-action.btn-action-primary:hover {
    background: var(--brand-primary-container);
}

.btn-action.btn-action-success {
    color: var(--color-success);
    border-color: var(--color-success);
}

.btn-action.btn-action-success:hover {
    background: var(--color-success-bg);
}

.actions-cell {
    text-align: right;
}

/* --- View Toggle --- */
.view-toggle {
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.view-toggle .btn {
    border: none;
    border-radius: 0;
    padding: 4px 10px;
    background: var(--surface-bg);
    color: var(--surface-text-muted);
}

.view-toggle .btn.active {
    background: var(--brand-primary);
    color: #fff;
}

/* --- Candidate Tabs --- */
.candidate-tabs {
    border-bottom: 2px solid var(--surface-border);
}

.candidate-tab {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: var(--space-md) var(--space-xl);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--surface-text-muted);
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.candidate-tab:hover {
    color: var(--surface-text);
}

.candidate-tab.active.tab-success {
    border-bottom-color: var(--color-success);
    color: var(--color-success);
    font-weight: 600;
}

.candidate-tab.active.tab-warning {
    border-bottom-color: var(--color-warning);
    color: var(--color-warning);
    font-weight: 600;
}

.candidate-tab.active.tab-neutral {
    border-bottom-color: var(--surface-text-muted);
    color: var(--surface-text-muted);
    font-weight: 600;
}

/* --- Filter Section --- */
.filter-section {
    background: var(--surface-bg);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
}

/* --- Stat card (Candidates page) --- */
.stat-card {
    background: var(--surface-bg);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--surface-border);
}

.stat-card .stat-label {
    font-size: var(--text-xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .stat-count {
    font-size: var(--text-3xl);
    font-weight: 700;
    margin-top: var(--space-xs);
}

/* --- Dashboard layout helpers --- */
.d-flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.d-flex-between-start {
    display: flex;
    justify-content: space-between;
    align-items: start;
}

/* --- Notification card --- */
.notification-card {
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    border: 1px solid var(--surface-border);
}

/* --- Notification grid --- */
.notification-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

/* --- Pipeline conversion row --- */
.pipeline-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-sm);
    border-radius: var(--radius-sm);
}

/* --- Quality score row --- */
.quality-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
    font-size: var(--text-xs);
}

/* --- Icon sizes --- */
.icon-lg { font-size: 1.5rem; }
.icon-xl { font-size: 48px; }
.icon-sm { font-size: 0.75rem; }

/* --- Bar chart background (BiasReport, etc.) --- */
.bar-bg {
    height: 18px;
    background: #f0f0f0;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

/* --- Progress bar height override --- */
.progress-thin { height: 8px; }
.progress-md { height: 20px; }

/* --- Dropdown item template styles --- */
.dd-item-title { font-weight: 600; }
.dd-item-subtitle { font-size: 0.85em; color: var(--surface-text-muted); }
.dd-item-company { font-size: 0.85em; color: var(--color-info); }

/* --- Match score ring component --- */
.match-ring {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.match-ring .match-score-label {
    font-weight: 600;
    font-size: 13px;
}

/* --- Meta item success color --- */
.meta-item-success { color: var(--color-success); }

/* --- Client select center --- */
.text-center-block {
    text-align: center;
    margin-bottom: 24px;
}

/* --- Blazor Framework --- */

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.1);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--brand-primary);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

code {
    color: #c02d76;
}

/* Coming Soon Overlay — used in dashboard for sections without real data */
.coming-soon-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    color: var(--surface-text-muted);
    gap: var(--space-md);
}
.coming-soon-overlay i {
    font-size: var(--text-2xl);
    opacity: 0.4;
}
