/* ========================================
   PulseCloud — Medical Healthcare Design System
   Blue-first, warm neutrals, accessible
   ========================================
   Primary: Medical Blue (#2563EB)
   Secondary: Deep Navy (#1E3A5F)
   Accent: Indigo (#6366F1)
   ======================================== */

/* ════════════════════════════════════════
   DESIGN TOKENS
   ════════════════════════════════════════ */

:root {
    --pc-primary: #2563EB;
    --pc-primary-light: #3B82F6;
    --pc-primary-dark: #1D4ED8;
    --pc-primary-rgb: 37,99,235;
    --pc-secondary: #1E3A5F;
    --pc-secondary-light: #2D5F8A;
    --pc-secondary-rgb: 30,58,95;
    --pc-tertiary: #6366F1;
    --pc-tertiary-light: #818CF8;
    --pc-tertiary-dark: #4F46E5;
    --pc-tertiary-rgb: 99,102,241;
    --pc-success: #2A9D8F;
    --pc-success-dark: #1F7A6E;
    --pc-success-light: #52B69A;
    --pc-success-rgb: 42,157,143;
    --pc-warning: #E76F51;
    --pc-warning-dark: #C45A3C;
    --pc-warning-light: #F4A261;
    --pc-warning-rgb: 231,111,81;
    --pc-error: #D62828;
    --pc-error-light: #E74C3C;
    --pc-error-dark: #B71C1C;
    --pc-error-rgb: 214,40,40;
    --pc-info: #2196F3;
    --pc-info-dark: #1976D2;
    --pc-info-light: #64B5F6;
    --pc-info-rgb: 33,150,243;
    --pc-surface: #FFFFFF;
    --pc-surface-hover: #F9FAFB;
    --pc-background: #F5F5F4;
    --pc-background-mid: #EDEBE9;
    --pc-sidebar-bg: #FFFFFF;
    --pc-sidebar-border: #E7E5E4;
    --pc-sidebar-text: #292524;
    --pc-sidebar-text-muted: #A8A29E;
    --pc-text: #1C1917;
    --pc-text-secondary: #57534E;
    --pc-text-muted: #A8A29E;
    --pc-border: #E7E5E4;
    --pc-border-rgb: 231,229,228;
    --pc-brand-icon: #2563EB;
    --pc-card-bg: #FFFFFF;
    --pc-card-border: #E7E5E4;
    --pc-card-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 1px 1px rgba(0,0,0,0.02);
    --pc-card-shadow-hover: 0 4px 8px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.03);
}

.mud-theme-dark {
    --pc-primary: #60A5FA;
    --pc-primary-light: #93C5FD;
    --pc-primary-dark: #3B82F6;
    --pc-primary-rgb: 96,165,250;
    --pc-secondary: #7DAFDE;
    --pc-secondary-light: #A3C8E8;
    --pc-secondary-rgb: 125,175,222;
    --pc-tertiary: #A5B4FC;
    --pc-tertiary-light: #C7D2FE;
    --pc-tertiary-dark: #818CF8;
    --pc-tertiary-rgb: 165,180,252;
    --pc-success: #52B69A;
    --pc-success-dark: #2A9D8F;
    --pc-success-rgb: 82,182,154;
    --pc-warning: #F4A261;
    --pc-warning-dark: #E76F51;
    --pc-warning-rgb: 244,162,97;
    --pc-error: #EF5350;
    --pc-error-light: #EF9A9A;
    --pc-error-dark: #D62828;
    --pc-error-rgb: 239,83,80;
    --pc-info: #64B5F6;
    --pc-info-dark: #2196F3;
    --pc-info-light: #90CAF9;
    --pc-info-rgb: 100,181,246;
    --pc-surface: #1C1917;
    --pc-surface-hover: #292524;
    --pc-background: #0C0A09;
    --pc-background-mid: #1C1917;
    --pc-sidebar-bg: #1C1917;
    --pc-sidebar-border: #292524;
    --pc-sidebar-text: #E7E5E4;
    --pc-sidebar-text-muted: #78716C;
    --pc-text: #F5F5F4;
    --pc-text-secondary: #A8A29E;
    --pc-text-muted: #78716C;
    --pc-border: #292524;
    --pc-border-rgb: 41,37,36;
    --pc-brand-icon: #60A5FA;
    --pc-card-bg: #1C1917;
    --pc-card-border: #292524;
    --pc-card-shadow: 0 1px 2px rgba(0,0,0,0.3), 0 1px 1px rgba(0,0,0,0.15);
    --pc-card-shadow-hover: 0 4px 8px rgba(0,0,0,0.4), 0 2px 4px rgba(0,0,0,0.2);
}

/* ============================
   BLAZOR DEFAULTS
   ============================ */

h1:focus { outline: none; }

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}
.invalid {
    outline: 1px solid #e50000;
}
.validation-message {
    color: #e50000;
}

.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."
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}
.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}
.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ════════════════════════════════════════
   SUBTLE BACKGROUND
   ════════════════════════════════════════ */

.mesh-gradient-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 15% 50%, rgba(var(--pc-primary-rgb), 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 20%, rgba(var(--pc-secondary-rgb), 0.02) 0%, transparent 50%),
        linear-gradient(180deg, var(--pc-background) 0%, var(--pc-background-mid) 50%, var(--pc-background) 100%);
}

.auth-mesh-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(37,99,235,0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(30,58,95,0.10) 0%, transparent 50%),
        linear-gradient(135deg, #0C0A09 0%, #1C1917 40%, #1E3A5F 100%);
}

/* ════════════════════════════════════════
   CARD SYSTEM (clean, corporate)
   ════════════════════════════════════════ */

.glass-card {
    background: var(--pc-card-bg);
    border: 1px solid var(--pc-card-border);
    border-radius: 0.5rem;
    box-shadow: var(--pc-card-shadow);
    transition: box-shadow 0.2s ease;
}

.glass-card-hover {
    background: var(--pc-card-bg);
    border: 1px solid var(--pc-card-border);
    border-radius: 0.5rem;
    box-shadow: var(--pc-card-shadow);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.glass-card-hover:hover {
    box-shadow: var(--pc-card-shadow-hover);
    border-color: rgba(var(--pc-primary-rgb), 0.2);
}

.glass-card-gradient {
    background: var(--pc-card-bg);
    border-radius: 0.5rem;
    box-shadow: var(--pc-card-shadow);
    position: relative;
    border: 1px solid var(--pc-card-border);
}

/* ── Sidebar ── */
.pc-sidebar {
    background: #F8FAFC !important;
    border-right: 1px solid rgba(var(--pc-primary-rgb), 0.08) !important;
    border-left: none !important;
}
.mud-theme-dark .pc-sidebar {
    background: var(--pc-sidebar-bg) !important;
    border-right: 1px solid var(--pc-sidebar-border) !important;
    border-left: none !important;
}
[dir="rtl"] .pc-sidebar {
    border-right: none !important;
    border-left: 1px solid rgba(var(--pc-primary-rgb), 0.08) !important;
}
[dir="rtl"] .mud-theme-dark .pc-sidebar {
    border-right: none !important;
    border-left: 1px solid var(--pc-sidebar-border) !important;
}
.pc-sidebar .mud-drawer-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* ── Top Appbar ── */
.pc-appbar {
    background: linear-gradient(135deg, #1E3A5F 0%, #2563EB 100%) !important;
    border-bottom: none;
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.3);
    color: white !important;
}
.pc-appbar .mud-icon-button { color: rgba(255,255,255,0.85) !important; }
.pc-appbar .mud-icon-button:hover { color: white !important; background: rgba(255,255,255,0.1) !important; }
.mud-theme-dark .pc-appbar {
    background: linear-gradient(135deg, #0F1B2D 0%, #1D4ED8 100%) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.pc-appbar-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0.25rem;
}
.pc-appbar-avatar { font-weight: 600; font-size: 0.75rem; }
.pc-appbar-username {
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
}

/* ── Main Content ── */
.pc-main-content {
    padding: 88px 1.5rem 1.5rem !important;
    position: relative;
}

/* Dialog */
.glass-dialog {
    background: var(--pc-card-bg);
    border: 1px solid var(--pc-card-border);
    border-radius: 0.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

/* Input */
.glass-input {
    background: var(--pc-surface) !important;
    border: 1px solid var(--pc-border) !important;
    border-radius: 0.5rem !important;
}

/* ════════════════════════════════════════
   KPI CARDS (top accent bar)
   ════════════════════════════════════════ */

.kpi-card-blue,
.kpi-card-teal,
.kpi-card-amber,
.kpi-card-green,
.kpi-card-purple,
.kpi-glass {
    background: var(--pc-card-bg);
    border: 1px solid var(--pc-card-border);
    border-radius: 0.5rem;
    box-shadow: var(--pc-card-shadow);
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}
.kpi-card-blue:hover,
.kpi-card-teal:hover,
.kpi-card-amber:hover,
.kpi-card-green:hover,
.kpi-card-purple:hover,
.kpi-glass:hover {
    box-shadow: var(--pc-card-shadow-hover);
}

.kpi-card-blue::before,
.kpi-card-teal::before,
.kpi-card-amber::before,
.kpi-card-green::before,
.kpi-card-purple::before,
.kpi-glass::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: 0.5rem 0.5rem 0 0;
}
.kpi-card-blue::before,
.kpi-glass-primary::before { background: var(--pc-primary); }
.kpi-card-teal::before,
.kpi-card-green::before,
.kpi-glass-success::before { background: var(--pc-success); }
.kpi-card-amber::before,
.kpi-glass-warning::before { background: var(--pc-warning); }
.kpi-card-purple::before { background: var(--pc-tertiary); }
.kpi-glass-secondary::before { background: var(--pc-secondary); }
.kpi-glass-error::before { background: var(--pc-error); }

/* ════════════════════════════════════════
   KPI STAT CLASSES (replace inline styles)
   ════════════════════════════════════════ */

.kpi-label { font-weight: 600; font-size: 0.75rem; }
.kpi-value { font-weight: 700; }

.kpi-primary .kpi-label { color: var(--pc-primary); }
.kpi-primary .kpi-value { color: var(--pc-primary-dark); }
.kpi-primary .kpi-icon  { background: rgba(var(--pc-primary-rgb), 0.08); }

.kpi-success .kpi-label { color: var(--pc-success); }
.kpi-success .kpi-value { color: var(--pc-success-dark); }
.kpi-success .kpi-icon  { background: rgba(var(--pc-success-rgb), 0.08); }

.kpi-warning .kpi-label { color: var(--pc-warning); }
.kpi-warning .kpi-value { color: var(--pc-warning-dark); }
.kpi-warning .kpi-icon  { background: rgba(var(--pc-warning-rgb), 0.08); }

.kpi-info .kpi-label    { color: var(--pc-info); }
.kpi-info .kpi-value    { color: var(--pc-info-dark); }
.kpi-info .kpi-icon     { background: rgba(var(--pc-info-rgb), 0.08); }

.kpi-tertiary .kpi-label { color: var(--pc-tertiary); }
.kpi-tertiary .kpi-value { color: var(--pc-tertiary-dark); }
.kpi-tertiary .kpi-icon  { background: rgba(var(--pc-tertiary-rgb), 0.08); }

.kpi-error .kpi-label   { color: var(--pc-error); }
.kpi-error .kpi-value   { color: var(--pc-error-dark); }
.kpi-error .kpi-icon    { background: rgba(var(--pc-error-rgb), 0.08); }

/* ════════════════════════════════════════
   GRADIENT UTILITIES
   ════════════════════════════════════════ */

.gradient-primary { background: linear-gradient(135deg, var(--pc-primary), var(--pc-secondary)); }
.gradient-secondary { background: linear-gradient(135deg, var(--pc-secondary), var(--pc-info)); }
.gradient-success { background: linear-gradient(135deg, var(--pc-success), var(--pc-success-light)); }
.gradient-warning { background: linear-gradient(135deg, var(--pc-warning), var(--pc-warning-light)); }
.gradient-error { background: linear-gradient(135deg, var(--pc-error), var(--pc-error-light)); }

.gradient-text-primary {
    background: linear-gradient(135deg, var(--pc-primary), var(--pc-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.gradient-text-secondary {
    background: linear-gradient(135deg, var(--pc-secondary), var(--pc-tertiary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ════════════════════════════════════════
   COMPONENT CLASSES
   ════════════════════════════════════════ */

.card-hover {
    transition: box-shadow 0.2s ease;
}
.card-hover:hover {
    box-shadow: var(--pc-card-shadow-hover) !important;
}

.page-header { margin-bottom: 1.5rem; }
.page-header-subtitle { color: var(--pc-text-secondary); margin-top: 0.125rem; }

.status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    display: inline-block;
    margin-right: 0.375rem;
}
.status-dot-success { background-color: var(--pc-success); }
.status-dot-warning { background-color: var(--pc-warning); }
.status-dot-error { background-color: var(--pc-error); }
.status-dot-info { background-color: var(--pc-info); }
.status-dot-primary { background-color: var(--pc-primary); }

.pulse-animation { animation: pulse-fade 2s ease-in-out infinite; }
@keyframes pulse-fade {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Quick Action Cards */
.quick-action-card {
    cursor: pointer;
    background: var(--pc-card-bg);
    border: 1px solid var(--pc-card-border);
    border-radius: 0.625rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.quick-action-card:hover {
    border-color: rgba(var(--pc-primary-rgb), 0.3);
    background: rgba(var(--pc-primary-rgb), 0.03) !important;
    box-shadow: var(--pc-card-shadow-hover);
}

/* ── Navigation — Container ── */
.nav-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* ── Navigation — Brand Header ── */
.nav-brand-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.25rem 1.125rem;
    flex-shrink: 0;
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, var(--pc-primary), var(--pc-secondary), transparent) 1;
}
.nav-brand-logo {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, var(--pc-primary), var(--pc-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
}
.nav-brand-logo svg { width: 100%; height: 100%; display: block; }
.nav-brand-logo .mud-icon-root { font-size: 1.25rem; }
.nav-brand-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--pc-sidebar-text);
    line-height: 1.2;
}
.nav-brand-subtitle {
    font-size: 0.6875rem;
    color: var(--pc-text-muted);
    letter-spacing: 0.02em;
}

/* ── Navigation — Scrollable Area ── */
.nav-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0.75rem;
}
.nav-scroll-area::-webkit-scrollbar { width: 3px; }
.nav-scroll-area::-webkit-scrollbar-thumb {
    background: var(--pc-border);
    border-radius: 3px;
}

/* ── Navigation — Link Styling ── */
.mud-navmenu .mud-nav-link,
.mud-navmenu .mud-nav-group .mud-nav-group-text {
    transition: background 0.15s ease, color 0.15s ease;
    border-radius: 0.375rem;
    margin: 1px 0;
    font-size: 0.8125rem;
}
.mud-navmenu .mud-nav-link:hover {
    background: rgba(var(--pc-primary-rgb), 0.06) !important;
}
.mud-navmenu .mud-nav-link .mud-nav-link-icon {
    font-size: 1.25rem;
}

/* ── Navigation — Active Link ── */
.mud-nav-link.active {
    background: rgba(var(--pc-primary-rgb), 0.10) !important;
    color: var(--pc-primary) !important;
    font-weight: 600;
    position: relative;
}
.mud-nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.375rem;
    bottom: 0.375rem;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--pc-primary);
}

/* ── Navigation — Nested Child Links ── */
.mud-navmenu .mud-collapse-wrapper .mud-nav-link {
    font-size: 0.8125rem;
    padding-left: 2.5rem;
}

/* ── Navigation — Section Labels ── */
.nav-section-label {
    padding: 1.25rem 0.75rem 0.375rem;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--pc-primary);
    border-left: 2px solid rgba(var(--pc-primary-rgb), 0.3);
    margin-left: 0.5rem;
    padding-left: 0.5rem;
}

/* ── Navigation — Footer ── */
.nav-footer {
    padding: 0.75rem 1.25rem;
    flex-shrink: 0;
    border-top: 1px solid var(--pc-sidebar-border);
}
.nav-footer-badge {
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--pc-text-muted);
    background: rgba(var(--pc-primary-rgb), 0.06);
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
    display: inline-block;
    letter-spacing: 0.03em;
}
.nav-footer-powered {
    margin-top: 0.45rem;
    font-size: 0.6rem;
    color: var(--pc-text-muted);
    opacity: 0.6;
}
.nav-footer-powered a { color: inherit; text-decoration: none; }
.nav-footer-powered a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 2px; }

/* Queue Column Headers */
.queue-header-waiting { background: linear-gradient(135deg, var(--pc-primary), var(--pc-secondary)) !important; }
.queue-header-nurse { background: linear-gradient(135deg, var(--pc-warning), var(--pc-warning-light)) !important; }
.queue-header-doctor { background: linear-gradient(135deg, var(--pc-success), var(--pc-success-light)) !important; }

/* ════════════════════════════════════════
   AUTH LAYOUT — landing page aesthetic
   ════════════════════════════════════════ */

/* Root full-screen container */
.al-root {
    min-height: 100vh;
    background: #03080F;
    position: relative;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    color: #F5F5F4;
}

/* Mesh grid overlay */
.al-mesh {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image: radial-gradient(circle, rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 36px 36px;
}

/* Ambient orbs */
.al-orb {
    position: fixed; border-radius: 50%; filter: blur(80px); pointer-events: none; z-index: 0;
}
.al-orb1 {
    width: 500px; height: 500px; top: -120px; left: -100px;
    background: radial-gradient(circle, rgba(37,99,235,0.18) 0%, transparent 70%);
}
.al-orb2 {
    width: 420px; height: 420px; bottom: -80px; right: -80px;
    background: radial-gradient(circle, rgba(42,157,143,0.15) 0%, transparent 70%);
}

/* Top navigation bar */
.al-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    height: 60px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 2rem;
    background: rgba(3,8,15,0.6);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.al-brand {
    display: flex; align-items: center; gap: 0.75rem;
    text-decoration: none; color: #F5F5F4;
}
.al-brand-name {
    font-size: 1rem; font-weight: 700; letter-spacing: -0.02em;
    background: linear-gradient(120deg, #60A5FA, #2A9D8F);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.al-nav-controls {
    display: flex; align-items: center; gap: 0.5rem;
}
.al-theme-btn {
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; transition: background 0.2s;
}
.al-theme-btn:hover { background: rgba(255,255,255,0.1); }

/* Main content area */
.al-main {
    position: relative; z-index: 1;
    padding-top: 60px; /* nav height */
    min-height: 100vh;
}

/* ── SPLIT LAYOUT ── */
.auth-split {
    display: flex;
    min-height: calc(100vh - 60px);
}

/* Left branding panel — always dark navy like landing hero */
.auth-left {
    flex: 1;
    display: flex; align-items: flex-start; justify-content: center;
    padding: 5rem 3.5rem 3rem;
    border-right: 1px solid rgba(255,255,255,0.08);
    position: relative;
    background: linear-gradient(160deg, #0B2242 0%, #0F2E5A 55%, #163B6E 100%);
}
.auth-left-content {
    max-width: 480px;
}
.auth-left-pill {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: rgba(37,99,235,0.12);
    border: 1px solid rgba(37,99,235,0.3);
    border-radius: 100px;
    padding: 0.35rem 1rem;
    font-size: 0.78rem; font-weight: 600;
    color: #93C5FD;
    letter-spacing: 0.04em;
    margin-bottom: 1.75rem;
    text-transform: uppercase;
}
.auth-left-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #3B82F6;
    animation: al-dot-pulse 2s ease-in-out infinite;
}
@keyframes al-dot-pulse {
    0%,100% { opacity:1; transform:scale(1); }
    50% { opacity:0.4; transform:scale(0.7); }
}
.auth-left-h1 {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.05;
    color: #FFFFFF;
    margin-bottom: 1.25rem;
}
.auth-left-h1 em {
    font-style: italic; font-weight: 400;
    background: linear-gradient(125deg, #93C5FD 0%, #60A5FA 45%, #3B82F6 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    padding-inline: 0.06em; margin-inline: -0.06em;
}
.auth-left-sub {
    font-size: 1rem; color: rgba(255,255,255,0.7);
    line-height: 1.7; margin-bottom: 2rem;
}

/* Feature list */
.auth-feature-list {
    list-style: none; padding: 0; margin: 0 0 2.5rem;
    display: flex; flex-direction: column; gap: 0.75rem;
}
.auth-feature-list li {
    display: flex; align-items: center; gap: 0.75rem;
    font-size: 0.9rem; color: rgba(255,255,255,0.75);
}
.auth-feature-list .af-icon {
    font-size: 1.1rem; flex-shrink: 0;
}

/* ECG line */
.auth-ecg {
    width: 100%; height: 40px; opacity: 0.8; overflow: hidden;
}
.auth-ecg-line {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    animation: ecg-draw 3s linear infinite;
}
@keyframes ecg-draw {
    0% { stroke-dashoffset: 1200; opacity: 0; }
    10% { opacity: 1; }
    70% { stroke-dashoffset: 0; opacity: 1; }
    90% { opacity: 0.5; }
    100% { stroke-dashoffset: -1200; opacity: 0; }
}

/* Right form panel */
.auth-right {
    display: flex; align-items: center; justify-content: center;
    padding: 2rem 2.5rem;
    min-width: 400px; max-width: 520px; width: 100%;
}
.auth-right-scroll {
    align-items: flex-start;
    overflow-y: auto;
    padding-top: 2.5rem; padding-bottom: 2.5rem;
}

/* Glass form card */
.auth-form-card {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.10);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border-radius: 24px;
    padding: 2.5rem;
}
.auth-form-card-wide {
    max-width: 440px;
}
.auth-form-logo {
    display: flex;
    margin-bottom: 1.5rem;
}
.auth-form-title {
    font-size: 1.5rem; font-weight: 800;
    letter-spacing: -0.03em; color: #F5F5F4;
    margin: 0 0 0.35rem;
}
.auth-form-sub {
    font-size: 0.875rem; color: rgba(245,245,244,0.55);
    margin: 0 0 1.75rem; line-height: 1.5;
}
.auth-form {
    display: flex; flex-direction: column; gap: 0;
}
.auth-form-footer {
    margin-top: 1.25rem; text-align: center;
    font-size: 0.85rem; color: rgba(245,245,244,0.5);
}
.auth-secure {
    margin-top: 0.75rem; text-align: center;
    font-size: 0.75rem; color: rgba(245,245,244,0.3);
}
.auth-powered {
    margin-top: 0.5rem; text-align: center;
    font-size: 0.7rem; color: rgba(245,245,244,0.22);
}
.auth-powered a { color: rgba(245,245,244,0.4); text-decoration: none; }
.auth-powered a:hover { color: rgba(245,245,244,0.7); text-decoration: underline; text-underline-offset: 2px; }

/* ── FORM ELEMENTS ── */
.af-field {
    display: flex; flex-direction: column; gap: 0.35rem;
    margin-bottom: 1rem;
}
.af-label {
    font-size: 0.78rem; font-weight: 600;
    color: rgba(245,245,244,0.6);
    letter-spacing: 0.02em;
}
.af-input-wrap {
    position: relative;
}
.af-icon-left {
    position: absolute; inset-inline-start: 0.875rem; top: 50%;
    transform: translateY(-50%);
    color: rgba(245,245,244,0.35);
    display: flex; align-items: center;
    pointer-events: none; transition: color 0.2s;
}
.af-input-wrap:focus-within .af-icon-left { color: #3B82F6; }
.af-icon-right {
    position: absolute; inset-inline-end: 0.875rem; top: 50%;
    transform: translateY(-50%);
    background: none; border: none; cursor: pointer;
    color: rgba(245,245,244,0.35); display: flex; align-items: center;
    padding: 0; transition: color 0.2s;
}
.af-icon-right:hover { color: rgba(245,245,244,0.7); }
.af-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.05);
    border: 1.5px solid rgba(255,255,255,0.10);
    border-radius: 10px;
    color: #F5F5F4;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-sizing: border-box;
}
.af-input:focus {
    border-color: #2563EB;
    background: rgba(37,99,235,0.07);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}
.af-input::placeholder { color: rgba(245,245,244,0.25); }
.af-input-pl { padding-inline-start: 2.75rem; }
.af-input-pr { padding-inline-end: 2.75rem; }
.af-input-error { border-color: #EF4444 !important; }
.af-error-text { font-size: 0.75rem; color: #EF4444; margin: 0.25rem 0 0; }
.af-hint { font-size: 0.73rem; color: rgba(245,245,244,0.35); margin: -0.25rem 0 0.75rem; line-height: 1.5; }
.af-select {
    appearance: none; -webkit-appearance: none; cursor: pointer;
    padding-inline-end: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(245%2C245%2C244%2C0.4)' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
}
.af-select option { background: #1a2740; color: #F5F5F4; }
.al-light .af-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(11%2C34%2C66%2C0.5)' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); }
.al-light .af-select option { background: #ffffff; color: #0B2242; }

.af-row {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1.25rem;
}
.af-remember {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.83rem; color: rgba(245,245,244,0.55); cursor: pointer;
}
.af-checkbox {
    accent-color: #2563EB;
    width: 15px; height: 15px; cursor: pointer;
}
.af-link {
    color: #60A5FA; font-size: 0.83rem; font-weight: 500;
    text-decoration: none; transition: color 0.2s;
}
.af-link:hover { color: #93C5FD; }

.af-section-label {
    font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.1em;
    color: #3B82F6;
    margin-bottom: 0.75rem;
}
.af-divider {
    height: 1px;
    background: rgba(255,255,255,0.07);
    margin: 0.5rem 0 1rem;
}
.af-row-fields {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem;
    margin-bottom: 1rem;
}

/* Primary action button */
.af-btn-primary {
    width: 100%; padding: 0.85rem 1.5rem;
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    color: #fff; border: none; border-radius: 12px;
    font: 600 0.95rem 'Inter', sans-serif;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    box-shadow: 0 8px 28px rgba(37,99,235,0.35);
    transition: all 0.25s; letter-spacing: 0.02em;
    margin-top: 0.5rem;
    text-decoration: none;
}
.af-btn-primary:hover:not(:disabled) {
    box-shadow: 0 12px 36px rgba(37,99,235,0.5);
    transform: translateY(-1px);
}
.af-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

/* Ghost / secondary button */
.af-btn-ghost {
    width: 100%; padding: 0.75rem 1.5rem;
    background: transparent;
    color: rgba(245,245,244,0.6);
    border: 1.5px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    font: 500 0.9rem 'Inter', sans-serif;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    transition: all 0.2s; margin-top: 0.5rem;
    text-decoration: none;
}
.af-btn-ghost:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.2); }
.al-light .af-btn-ghost { color: rgba(11,34,66,0.6); border-color: #CBD5E1; }
.al-light .af-btn-ghost:hover { background: rgba(37,99,235,0.05); border-color: #93C5FD; color: #2563EB; }

/* Danger button */
.af-btn-danger {
    width: 100%; padding: 0.85rem 1.5rem;
    background: linear-gradient(135deg, #DC2626, #B91C1C);
    color: #fff; border: none; border-radius: 12px;
    font: 600 0.95rem 'Inter', sans-serif;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    box-shadow: 0 8px 28px rgba(220,38,38,0.35);
    transition: all 0.25s; margin-top: 0.5rem;
}
.af-btn-danger:hover:not(:disabled) { box-shadow: 0 12px 36px rgba(220,38,38,0.5); transform: translateY(-1px); }
.af-btn-danger:disabled { opacity: 0.6; cursor: not-allowed; }

/* Alert variants */
.auth-alert-warning {
    background: rgba(245,158,11,0.12);
    border: 1px solid rgba(245,158,11,0.3);
    color: #FBBF24;
}
.al-light .auth-alert-warning { color: #D97706; }
.auth-alert-success {
    background: rgba(52,211,153,0.12);
    border: 1px solid rgba(52,211,153,0.3);
    color: #34D399;
}
.al-light .auth-alert-success { color: #059669; }

/* Monospace code box (2FA backup codes) */
.af-mono-box {
    background: rgba(255,255,255,0.04);
    border: 1.5px solid rgba(255,255,255,0.10);
    border-radius: 10px; padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem;
}
.al-light .af-mono-box { background: #F0F6FF; border-color: #CBD5E1; }
.af-mono-box span {
    font-family: 'Courier New', monospace;
    font-size: 0.82rem; letter-spacing: 0.08em;
    color: rgba(245,245,244,0.8); padding: 0.15rem 0;
}
.al-light .af-mono-box span { color: #0B2242; }

/* QR code wrapper */
.af-qr-wrap {
    display: flex; justify-content: center;
    margin-bottom: 1.25rem;
}
.af-qr-wrap img {
    border: 4px solid rgba(255,255,255,0.12);
    border-radius: 12px; width: 180px; height: 180px;
}
.al-light .af-qr-wrap img { border-color: #CBD5E1; }

/* Manual key box */
.af-key-box {
    background: rgba(255,255,255,0.04);
    border: 1.5px solid rgba(255,255,255,0.10);
    border-radius: 10px; padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem; letter-spacing: 0.08em;
    word-break: break-all; color: rgba(245,245,244,0.8);
    line-height: 1.6;
}
.al-light .af-key-box { background: #F0F6FF; border-color: #CBD5E1; color: #0B2242; }

/* Divider */
.af-line-divider {
    height: 1px; background: rgba(255,255,255,0.08);
    margin: 1.25rem 0;
}
.al-light .af-line-divider { background: #E2E8F0; }

/* Alert */
.auth-alert {
    display: flex; align-items: flex-start; gap: 0.5rem;
    padding: 0.75rem 1rem; border-radius: 10px;
    font-size: 0.85rem; margin-bottom: 1rem;
}
.auth-alert-error {
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.3);
    color: #FCA5A5;
}

/* Spinner */
.af-spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: af-spin 0.7s linear infinite;
}
@keyframes af-spin { to { transform: rotate(360deg); } }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .auth-left { display: none; }
    .auth-right { max-width: 100%; min-width: unset; padding: 1.5rem; }
    .auth-split { justify-content: center; }
}
@media (max-width: 480px) {
    .auth-form-card { padding: 1.75rem 1.25rem; border-radius: 16px; }
    .af-row-fields { grid-template-columns: 1fr; }
}

/* ── AUTH LIGHT MODE — matches landing page gradient theme ── */
.al-light {
    background: linear-gradient(155deg, #C5D9EC 0%, #A8C4DC 30%, #D4E6F3 60%, #EEF5FB 85%, #F8FBFF 100%);
    background-attachment: fixed;
    color: #0B2242;
}
.al-light .al-mesh {
    background-image: radial-gradient(rgba(37,99,235,0.05) 1px, transparent 1px);
    background-size: 36px 36px;
}
.al-light .al-orb1 {
    background: radial-gradient(circle, rgba(37,99,235,0.14) 0%, transparent 70%);
}
.al-light .al-orb2 {
    background: radial-gradient(circle, rgba(168,196,220,0.4) 0%, transparent 70%);
}
.al-light .al-nav {
    background: rgba(255,255,255,0.96);
    border-bottom: 1px solid #E2E8F0;
    backdrop-filter: blur(20px);
}
.al-light .al-brand { color: #0B2242; }
.al-light .al-brand-name {
    background: linear-gradient(120deg, #1D4ED8, #2563EB);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.al-light .al-theme-btn {
    background: rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.10);
}
.al-light .al-theme-btn:hover { background: rgba(0,0,0,0.08); }
/* Left panel stays dark navy — only override border */
.al-light .auth-left {
    border-right: 1px solid rgba(255,255,255,0.12);
}
/* Right panel — transparent so landing gradient shows through */
.al-light .auth-right {
    background: transparent;
}
.al-light .auth-form-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    box-shadow: 0 8px 40px rgba(11,34,66,0.08), 0 1px 3px rgba(11,34,66,0.06);
}
.al-light .auth-form-title { color: #0B2242; }
.al-light .auth-form-sub { color: rgba(11,34,66,0.55); }
.al-light .auth-form-footer { color: rgba(11,34,66,0.5); }
.al-light .auth-form-footer a { color: #2563EB; }
.al-light .auth-secure { color: rgba(11,34,66,0.35); }
.al-light .auth-powered { color: rgba(11,34,66,0.28); }
.al-light .auth-powered a { color: rgba(11,34,66,0.45); }
.al-light .af-label { color: rgba(11,34,66,0.65); font-weight: 600; }
.al-light .af-section-label { color: #2563EB; }
.al-light .af-icon-left { color: rgba(11,34,66,0.3); }
.al-light .af-icon-right { color: rgba(11,34,66,0.3); }
.al-light .af-icon-right:hover { color: rgba(11,34,66,0.65); }
.al-light .af-input {
    background: #F8FAFC;
    border: 1.5px solid #CBD5E1;
    color: #0B2242;
}
.al-light .af-input:focus {
    border-color: #2563EB;
    background: #EFF6FF;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.al-light .af-input::placeholder { color: rgba(11,34,66,0.28); }
.al-light .af-input-wrap:focus-within .af-icon-left { color: #2563EB; }
.al-light .af-hint { color: rgba(11,34,66,0.4); }
.al-light .af-divider { background: #E2E8F0; }
.al-light .af-remember { color: rgba(11,34,66,0.6); }
.al-light .af-link { color: #2563EB; }
.al-light .af-link:hover { color: #1D4ED8; }
.al-light .auth-alert-error {
    background: rgba(239,68,68,0.06);
    border: 1px solid rgba(239,68,68,0.25);
    color: #DC2626;
}

/* Keep old auth-bg for any pages still using it */
.auth-bg {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    position: relative;
}

/* ════════════════════════════════════════
   SECTION & SETTINGS BORDERS
   ════════════════════════════════════════ */

.section-border-primary {
    border-left: 3px solid var(--pc-primary);
}
.section-border-secondary {
    border-left: 3px solid var(--pc-secondary);
}
.section-border-tertiary {
    border-left: 3px solid var(--pc-tertiary);
}
.section-border-warning {
    border-left: 3px solid var(--pc-warning);
}
.section-border-info {
    border-left: 3px solid var(--pc-info);
}

.settings-card-primary { border-left: 4px solid var(--pc-primary); }
.settings-card-secondary { border-left: 4px solid var(--pc-secondary); }
.settings-card-tertiary { border-left: 4px solid var(--pc-tertiary); }
.settings-card-warning { border-left: 4px solid var(--pc-warning); }
.settings-card-error { border-left: 4px solid var(--pc-error); }

.notification-card {
    border-left: 4px solid var(--pc-primary);
    padding: 0.75rem 1rem;
}

/* Vital Card */
.vital-card {
    text-align: center;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background: var(--pc-surface-hover);
    border: 1px solid var(--pc-border);
}

/* ════════════════════════════════════════
   MUDBLAZOR OVERRIDES
   ════════════════════════════════════════ */


.glass-card .mud-table,
.glass-card-hover .mud-table,
.glass-card .mud-table-root,
.glass-card-hover .mud-table-root {
    background: transparent !important;
}
.glass-card .mud-table-head th,
.glass-card-hover .mud-table-head th {
    background: var(--pc-surface-hover) !important;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--pc-text-secondary);
}

.mud-drawer.glass-sidebar .mud-drawer-content {
    background: transparent !important;
}

.mud-chip { font-weight: 500; }
.mud-button-root { font-weight: 600; letter-spacing: 0.02em; }

.gradient-avatar-active {
    background: linear-gradient(135deg, var(--pc-primary), var(--pc-secondary)) !important;
    box-shadow: 0 2px 8px rgba(var(--pc-primary-rgb), 0.25);
}

/* Custom Scrollbar */
.mud-drawer-content::-webkit-scrollbar { width: 4px; }
.mud-drawer-content::-webkit-scrollbar-track { background: transparent; }
.mud-drawer-content::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.25); border-radius: 2px; }
.mud-drawer-content::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.4); }

.mud-alert { border-radius: 0.5rem; }
.mud-input-outlined .mud-input-outlined-border { transition: border-color 0.15s ease; }

/* ════════════════════════════════════════
   UTILITY CLASSES
   ════════════════════════════════════════ */

.cursor-pointer { cursor: pointer; }
.rounded-xl { border-radius: 0.5rem; }
.rounded-2xl { border-radius: 0.75rem; }
.text-pc-drawer-text { color: var(--pc-sidebar-text); }
.text-pc-gray-200 { color: #E7E5E4; }
.text-pc-gray-300 { color: #D6D3D1; }
.text-pc-gray-400 { color: var(--pc-text-muted); }
.text-pc-gray-500 { color: var(--pc-text-secondary); }
.text-pc-gray-600 { color: #57534E; }
.text-pc-gray-700 { color: #292524; }
.border-pc-gray-700 { border-color: var(--pc-sidebar-border) !important; }

/* ════════════════════════════════════════
   ENHANCED UI — Depth, Animations, Polish
   ════════════════════════════════════════ */

/* Card gradient top accent */
.glass-card-accent {
    background: var(--pc-card-bg);
    border: 1px solid var(--pc-card-border);
    border-radius: 0.5rem;
    box-shadow: var(--pc-card-shadow);
    position: relative;
    overflow: hidden;
}
.glass-card-accent::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--pc-primary), var(--pc-secondary));
}

/* Hover lift animation for interactive cards */
.card-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
}


/* Status badge pills */
.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.status-pill-success {
    background: rgba(var(--pc-success-rgb), 0.1);
    color: var(--pc-success-dark);
}
.status-pill-warning {
    background: rgba(var(--pc-warning-rgb), 0.1);
    color: var(--pc-warning-dark);
}
.status-pill-error {
    background: rgba(var(--pc-error-rgb), 0.1);
    color: var(--pc-error);
}
.status-pill-info {
    background: rgba(var(--pc-info-rgb), 0.1);
    color: var(--pc-info-dark);
}
.status-pill-primary {
    background: rgba(var(--pc-primary-rgb), 0.1);
    color: var(--pc-primary);
}

/* Enhanced table styling */
.glass-card .mud-table-body tr:nth-child(even) {
    background: rgba(var(--pc-primary-rgb), 0.015);
}
.glass-card .mud-table-body tr {
    transition: background-color 0.15s ease;
}
.glass-card .mud-table-body tr:hover {
    background: rgba(var(--pc-primary-rgb), 0.04) !important;
}

/* Button gradient for primary actions */
.btn-gradient {
    background: linear-gradient(135deg, var(--pc-primary), var(--pc-secondary)) !important;
    color: white !important;
    border: none !important;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.btn-gradient:hover {
    box-shadow: 0 4px 16px rgba(var(--pc-primary-rgb), 0.3);
    transform: translateY(-1px);
}

/* ── Branded Page Loading Spinner ─────── */
.pc-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    gap: 1.25rem;
}
.pc-loading-spinner {
    position: relative;
    width: 56px;
    height: 56px;
}
.pc-loading-spinner::before,
.pc-loading-spinner::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
}
.pc-loading-spinner::before {
    border-top-color: var(--pc-primary);
    border-right-color: var(--pc-primary);
    animation: pc-spin 0.8s linear infinite;
}
.pc-loading-spinner::after {
    inset: 6px;
    border-bottom-color: var(--pc-tertiary, #6366F1);
    border-left-color: var(--pc-tertiary, #6366F1);
    animation: pc-spin 1.2s linear infinite reverse;
}
.pc-loading-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pc-primary);
    animation: pc-loading-pulse 1.5s ease-in-out infinite;
}
.pc-loading-icon .mud-icon-root {
    font-size: 1.25rem;
}
.pc-loading-text {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--pc-text-secondary);
    letter-spacing: 0.02em;
}
@keyframes pc-spin {
    to { transform: rotate(360deg); }
}
@keyframes pc-loading-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.9); }
}

/* Skeleton shimmer loading */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.skeleton-shimmer {
    background: linear-gradient(90deg,
        var(--pc-surface-hover) 25%,
        rgba(var(--pc-primary-rgb), 0.05) 50%,
        var(--pc-surface-hover) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.375rem;
}

/* Thin themed scrollbars (global) */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(var(--pc-primary-rgb), 0.15);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--pc-primary-rgb), 0.3);
}

/* Data card with left accent strip */
.data-card-accent {
    border-left: 4px solid var(--pc-primary);
    background: var(--pc-card-bg);
    border-radius: 0 0.5rem 0.5rem 0;
    padding: 1rem;
    box-shadow: var(--pc-card-shadow);
}



/* Queue header enhanced gradients */
.queue-header-lab { background: linear-gradient(135deg, var(--pc-success), var(--pc-success-light)) !important; }
.queue-header-pharmacy { background: linear-gradient(135deg, var(--pc-info), var(--pc-info-light)) !important; }

/* ════════════════════════════════════════
   QUEUE DISPLAY (fullscreen overlay)
   ════════════════════════════════════════ */

.queue-display-overlay {
    position: fixed;
    inset: 0;
    background: var(--pc-background);
    color: var(--pc-text);
    padding: 1.5rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 9999;
}

.queue-display-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.queue-display-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.queue-display-brand-icon { color: var(--pc-primary); }
.queue-display-brand-title { font-size: 1.5rem; font-weight: 700; color: var(--pc-primary); }
.queue-display-brand-subtitle { font-size: 0.875rem; color: var(--pc-text-secondary); margin-left: 0.5rem; }

.queue-display-clock { text-align: right; }
.queue-display-time { font-size: 1.25rem; font-weight: 600; }
.queue-display-date { font-size: 0.75rem; color: var(--pc-text-secondary); }

.queue-display-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    overflow: hidden;
}

.queue-display-column {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.queue-display-col-header {
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem 0.5rem 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.queue-display-col-header-waiting  { background: linear-gradient(135deg, var(--pc-warning), var(--pc-warning-light)); }
.queue-display-col-header-nurse    { background: linear-gradient(135deg, var(--pc-tertiary), var(--pc-tertiary-light)); }
.queue-display-col-header-doctor   { background: linear-gradient(135deg, var(--pc-primary), var(--pc-primary-light)); }
.queue-display-col-header-lab      { background: linear-gradient(135deg, var(--pc-success), var(--pc-success-light)); }
.queue-display-col-header-pharmacy { background: linear-gradient(135deg, var(--pc-info), var(--pc-info-light)); }

.queue-display-col-title { font-weight: 700; font-size: 1rem; }
.queue-display-col-badge {
    background: rgba(255,255,255,0.25);
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.875rem;
}

.queue-display-col-body {
    flex: 1;
    padding: 0.5rem;
    overflow-y: auto;
    border-radius: 0 0 0.5rem 0.5rem;
    border: 1px solid var(--pc-border);
    border-top: none;
}

.queue-display-col-body-waiting  { background: rgba(var(--pc-warning-rgb), 0.05); }
.queue-display-col-body-nurse    { background: rgba(var(--pc-tertiary-rgb), 0.05); }
.queue-display-col-body-doctor   { background: rgba(var(--pc-primary-rgb), 0.05); }
.queue-display-col-body-lab      { background: rgba(var(--pc-success-rgb), 0.05); }
.queue-display-col-body-pharmacy { background: rgba(var(--pc-info-rgb), 0.05); }

.queue-display-card {
    background: var(--pc-surface);
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.queue-display-card-waiting  { border-left: 3px solid var(--pc-warning); }
.queue-display-card-nurse    { border-left: 3px solid var(--pc-tertiary); }
.queue-display-card-doctor   { border-left: 3px solid var(--pc-primary); }
.queue-display-card-lab      { border-left: 3px solid var(--pc-success); }
.queue-display-card-pharmacy { border-left: 3px solid var(--pc-info); }

.queue-display-patient-name { font-size: 1rem; font-weight: 600; }
.queue-display-patient-name.queue-display-token { font-size: 1.75rem; font-weight: 800; letter-spacing: 0.05em; }
.queue-display-patient-detail { font-size: 0.75rem; color: var(--pc-text-secondary); }

/* Queue grid — 5 equal columns on large screens */
.queue-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 600px) {
    .queue-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
    .queue-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1280px) {
    .queue-grid { grid-template-columns: repeat(5, 1fr); }
}

/* MudDialog enhanced backdrop */
.mud-overlay-dialog { backdrop-filter: blur(4px); }

/* Focus ring for accessibility */
.mud-input-outlined:focus-within .mud-input-outlined-border {
    border-color: var(--pc-primary) !important;
    box-shadow: 0 0 0 2px rgba(var(--pc-primary-rgb), 0.1);
}


/* Enhanced MudChip */
.mud-chip {
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

/* Active Visits table row hover */
.glass-card .mud-table-body .mud-table-row:hover td {
    transition: background-color 0.15s ease;
}

/* ════════════════════════════════════════
   POS TERMINAL DESIGN SYSTEM
   ════════════════════════════════════════ */

/* POS App Bar — sleek branded header */
.pos-appbar {
    background: linear-gradient(135deg, var(--pc-secondary) 0%, var(--pc-primary-dark) 50%, var(--pc-primary) 100%) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.pos-appbar .mud-appbar-toolbar {
    padding: 0 12px;
}
.pos-appbar-title {
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #FFFFFF;
    font-size: 1rem;
}
.pos-appbar-clock {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    letter-spacing: 0.05em;
    background: rgba(255,255,255,0.1);
    padding: 4px 10px;
    border-radius: 6px;
}
.pos-appbar-logo {
    height: 28px;
    width: auto;
    border-radius: 4px;
    object-fit: contain;
}

/* POS Nav Tabs in app bar */
.pos-nav-tab {
    color: rgba(255,255,255,0.65) !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    text-transform: none !important;
    letter-spacing: 0.01em;
    border-radius: 6px !important;
    padding: 4px 12px !important;
    min-width: auto !important;
    transition: all 0.2s ease;
}
.pos-nav-tab:hover {
    color: #FFFFFF !important;
    background: rgba(255,255,255,0.1) !important;
}
.pos-nav-tab.active {
    color: #FFFFFF !important;
    background: rgba(255,255,255,0.18) !important;
}

/* POS Product Card */
.pos-product-card {
    background: var(--pc-card-bg);
    border: 1px solid var(--pc-card-border);
    border-radius: 10px;
    box-shadow: var(--pc-card-shadow);
    position: relative;
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    padding: 12px;
}
.pos-product-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--pc-primary), var(--pc-tertiary));
    opacity: 0;
    transition: opacity 0.2s ease;
}
.pos-product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--pc-card-shadow-hover);
    border-color: rgba(var(--pc-primary-rgb), 0.25);
}
.pos-product-card:hover::before {
    opacity: 1;
}
.pos-product-card:active {
    transform: translateY(0);
    box-shadow: var(--pc-card-shadow);
}

/* POS Cart Item */
.pos-cart-item {
    background: var(--pc-card-bg);
    border: 1px solid var(--pc-card-border);
    border-left: 3px solid var(--pc-primary);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    transition: all 0.15s ease;
}
.pos-cart-item:hover {
    border-left-color: var(--pc-tertiary);
    background: var(--pc-surface-hover);
}

/* POS Totals Section */
.pos-totals {
    background: linear-gradient(135deg, rgba(var(--pc-primary-rgb), 0.04) 0%, rgba(var(--pc-tertiary-rgb), 0.03) 100%);
    border-top: 2px solid rgba(var(--pc-primary-rgb), 0.15);
    border-radius: 0 0 8px 8px;
    padding: 14px 12px 12px;
    margin-top: 8px;
}

/* POS Action Button — prominent, pulsing */
.pos-action-btn {
    font-size: 1rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em !important;
    padding: 10px 32px !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 14px rgba(var(--pc-primary-rgb), 0.25);
    transition: all 0.2s ease !important;
}
.pos-action-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(var(--pc-primary-rgb), 0.35);
}
.pos-action-btn:active:not(:disabled) {
    transform: translateY(0);
}
.pos-action-btn-success {
    background: linear-gradient(135deg, var(--pc-success) 0%, var(--pc-success-dark) 100%) !important;
    box-shadow: 0 4px 14px rgba(var(--pc-success-rgb), 0.3);
}
.pos-action-btn-success:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(var(--pc-success-rgb), 0.4);
}

/* POS KPI Card */
.pos-kpi-card {
    background: var(--pc-card-bg);
    border: 1px solid var(--pc-card-border);
    border-radius: 12px;
    box-shadow: var(--pc-card-shadow);
    padding: 16px;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}
.pos-kpi-card::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 80px; height: 80px;
    border-radius: 50%;
    background: rgba(var(--pc-primary-rgb), 0.04);
    transform: translate(20px, -20px);
}
.pos-kpi-card:hover {
    box-shadow: var(--pc-card-shadow-hover);
}
.pos-kpi-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pos-kpi-icon-blue    { background: linear-gradient(135deg, rgba(var(--pc-primary-rgb),0.12), rgba(var(--pc-primary-rgb),0.05)); color: var(--pc-primary); }
.pos-kpi-icon-success { background: linear-gradient(135deg, rgba(var(--pc-success-rgb),0.12), rgba(var(--pc-success-rgb),0.05)); color: var(--pc-success); }
.pos-kpi-icon-warning { background: linear-gradient(135deg, rgba(var(--pc-warning-rgb),0.12), rgba(var(--pc-warning-rgb),0.05)); color: var(--pc-warning); }
.pos-kpi-icon-error   { background: linear-gradient(135deg, rgba(var(--pc-error-rgb),0.12),   rgba(var(--pc-error-rgb),0.05));   color: var(--pc-error); }
.pos-kpi-icon-info    { background: linear-gradient(135deg, rgba(var(--pc-info-rgb),0.12),    rgba(var(--pc-info-rgb),0.05));    color: var(--pc-info); }
.pos-kpi-icon-tertiary { background: linear-gradient(135deg, rgba(var(--pc-tertiary-rgb),0.12), rgba(var(--pc-tertiary-rgb),0.05)); color: var(--pc-tertiary); }

/* Quick Amount Buttons */
.pos-quick-amount {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid var(--pc-card-border);
    background: var(--pc-card-bg);
    color: var(--pc-text);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: 60px;
}
.pos-quick-amount:hover {
    background: rgba(var(--pc-primary-rgb), 0.08);
    border-color: var(--pc-primary);
    color: var(--pc-primary);
}
.pos-quick-amount:active {
    transform: scale(0.97);
}

/* Urgency Pulse Dot */
.pos-urgency-pulse {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--pc-warning);
    display: inline-block;
    animation: urgencyPulse 1.5s ease-in-out infinite;
}
@keyframes urgencyPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(var(--pc-warning-rgb), 0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(var(--pc-warning-rgb), 0); }
}

/* POS Category Chip */
.pos-category-chip {
    border-radius: 20px !important;
    font-weight: 600 !important;
    transition: all 0.15s ease !important;
}

/* POS Panel Headers */
.pos-panel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--pc-border);
    margin-bottom: 10px;
}

/* POS Empty Cart State */
.pos-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    opacity: 0.6;
}

/* Quantity Stepper */
.pos-qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--pc-border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--pc-card-bg);
}
.pos-qty-stepper .mud-icon-button {
    border-radius: 0 !important;
    min-width: 32px;
}
.pos-qty-value {
    min-width: 36px;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0 4px;
}

/* POS Container — full height optimization */
.pos-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 48px);
    overflow: hidden;
    padding: 10px;
    gap: 8px;
}

/* ════════════════════════════════════════
   DARK MODE OVERRIDES
   ════════════════════════════════════════ */

/* Table: deeper contrast for header & alternating rows */
.mud-theme-dark .glass-card .mud-table-head th,
.mud-theme-dark .glass-card-hover .mud-table-head th {
    background: #111110 !important;
    border-bottom-color: #2C2A28 !important;
    color: #A8A29E !important;
}
.mud-theme-dark .glass-card .mud-table-body tr:nth-child(even) {
    background: rgba(255,255,255,0.025) !important;
}
.mud-theme-dark .glass-card .mud-table-body tr:hover {
    background: rgba(96,165,250,0.07) !important;
}

/* KPI value colors — use lighter (primary/success/etc.) in dark mode */
.mud-theme-dark .kpi-primary .kpi-value  { color: #93C5FD; }
.mud-theme-dark .kpi-success .kpi-value  { color: #6EE7B7; }
.mud-theme-dark .kpi-warning .kpi-value  { color: #FCD34D; }
.mud-theme-dark .kpi-info .kpi-value     { color: #7DD3FC; }
.mud-theme-dark .kpi-tertiary .kpi-value { color: #C7D2FE; }
.mud-theme-dark .kpi-error .kpi-value    { color: #FCA5A5; }

/* KPI icon backgrounds — slightly more visible in dark */
.mud-theme-dark .kpi-primary .kpi-icon   { background: rgba(96,165,250,0.14); }
.mud-theme-dark .kpi-success .kpi-icon   { background: rgba(82,182,154,0.14); }
.mud-theme-dark .kpi-warning .kpi-icon   { background: rgba(244,162,97,0.14); }
.mud-theme-dark .kpi-info .kpi-icon      { background: rgba(100,181,246,0.14); }
.mud-theme-dark .kpi-tertiary .kpi-icon  { background: rgba(165,180,252,0.14); }
.mud-theme-dark .kpi-error .kpi-icon     { background: rgba(239,83,80,0.14); }

/* Vital card dark background */
.mud-theme-dark .vital-card {
    background: #111110;
    border-color: #2C2A28;
}

/* Quick action card hover in dark — visible glow */
.mud-theme-dark .quick-action-card:hover {
    background: rgba(96,165,250,0.08) !important;
    border-color: rgba(96,165,250,0.25) !important;
}

/* Active nav link in dark */
.mud-theme-dark .mud-nav-link.active {
    background: rgba(96,165,250,0.12) !important;
}
.mud-theme-dark .mud-navmenu .mud-nav-link:hover {
    background: rgba(96,165,250,0.08) !important;
}

/* Form input borders in dark */
.mud-theme-dark .mud-input-outlined .mud-input-outlined-border {
    border-color: #3C3A38 !important;
}
.mud-theme-dark .mud-input-outlined:hover .mud-input-outlined-border {
    border-color: #57534E !important;
}
.mud-theme-dark .mud-input-outlined.mud-focused .mud-input-outlined-border {
    border-color: #60A5FA !important;
}

/* Glass card in dark mode */
.mud-theme-dark .glass-card,
.mud-theme-dark .glass-card-hover,
.mud-theme-dark .glass-card-gradient,
.mud-theme-dark .glass-card-accent {
    background: rgba(28,25,23,0.9);
    border-color: #2C2A28;
}

/* POS product card in dark */
.mud-theme-dark .pos-product-card {
    background: #1C1917;
    border-color: #2C2A28;
}
.mud-theme-dark .pos-product-card:hover {
    border-color: rgba(96,165,250,0.3);
}

/* POS cart item in dark */
.mud-theme-dark .pos-cart-item {
    background: #1C1917;
    border-color: #2C2A28;
}

/* Status pills in dark mode — lighter text */
.mud-theme-dark .status-pill-success { color: #6EE7B7; background: rgba(82,182,154,0.15); }
.mud-theme-dark .status-pill-warning { color: #FCD34D; background: rgba(244,162,97,0.15); }
.mud-theme-dark .status-pill-error   { color: #FCA5A5; background: rgba(239,83,80,0.15); }
.mud-theme-dark .status-pill-info    { color: #7DD3FC; background: rgba(100,181,246,0.15); }
.mud-theme-dark .status-pill-primary { color: #93C5FD; background: rgba(96,165,250,0.15); }

/* ════════════════════════════════════════
   POLISHED UI ENHANCEMENTS (Feb 2026)
   ════════════════════════════════════════ */

/* ── Page fade-in ─────────────────────── */
@keyframes pc-fadein {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.mud-main-content > * { animation: pc-fadein 0.25s ease both; }

/* ── Elevated KPI cards ───────────────── */
.kpi-card-blue,
.kpi-card-teal,
.kpi-card-amber,
.kpi-card-green,
.kpi-card-purple {
    transition: box-shadow 0.22s ease, transform 0.22s ease;
}
.kpi-card-blue:hover,
.kpi-card-teal:hover,
.kpi-card-amber:hover,
.kpi-card-green:hover,
.kpi-card-purple:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.09), 0 2px 6px rgba(0,0,0,0.04) !important;
}

/* Gradient icon container for KPI cards */
.kpi-icon-gradient {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.625rem;
    background: linear-gradient(135deg, var(--pc-primary), var(--pc-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
    box-shadow: 0 3px 8px rgba(var(--pc-primary-rgb), 0.25);
}
.kpi-icon-gradient-success { background: linear-gradient(135deg, var(--pc-success), var(--pc-success-dark)); box-shadow: 0 3px 8px rgba(var(--pc-success-rgb), 0.25); }
.kpi-icon-gradient-warning { background: linear-gradient(135deg, var(--pc-warning), var(--pc-warning-dark)); box-shadow: 0 3px 8px rgba(var(--pc-warning-rgb), 0.25); }
.kpi-icon-gradient-error   { background: linear-gradient(135deg, var(--pc-error), var(--pc-error-dark)); box-shadow: 0 3px 8px rgba(var(--pc-error-rgb), 0.25); }
.kpi-icon-gradient-info    { background: linear-gradient(135deg, var(--pc-info), var(--pc-info-dark)); box-shadow: 0 3px 8px rgba(var(--pc-info-rgb), 0.25); }
.kpi-icon-gradient-tertiary { background: linear-gradient(135deg, var(--pc-tertiary), var(--pc-tertiary-dark)); box-shadow: 0 3px 8px rgba(var(--pc-tertiary-rgb), 0.25); }

/* ── Section titles (h6 headers inside cards) ── */
.section-title {
    font-weight: 700 !important;
    font-size: 0.9375rem !important;
    color: var(--pc-text) !important;
    letter-spacing: -0.01em;
    position: relative;
    padding-left: 0.875rem;
}
.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12%;
    height: 76%;
    width: 3px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--pc-primary), var(--pc-tertiary));
}

.glass-card:hover {
    box-shadow: var(--pc-card-shadow-hover);
}



/* ── Page header gradient accent ─────── */
.page-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, var(--pc-primary) 0%, var(--pc-tertiary) 50%, transparent 100%) 1;
}
.page-header-title {
    font-weight: 700 !important;
    background: linear-gradient(135deg, var(--pc-secondary), var(--pc-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Table row polish ────────────────── */
.mud-table-row:hover .mud-table-cell { background: rgba(var(--pc-primary-rgb), 0.035) !important; }
.mud-table .mud-table-head .mud-table-cell {
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
    color: var(--pc-text-secondary) !important;
    background: rgba(var(--pc-primary-rgb), 0.04) !important;
    border-bottom: 2px solid var(--pc-border) !important;
}

/* ── Chip / badge polish ─────────────── */
.mud-chip { font-weight: 600 !important; letter-spacing: 0.01em; }


/* ── Chart container skeleton (while loading) ── */
.chart-placeholder {
    background: linear-gradient(90deg,
        rgba(var(--pc-primary-rgb),0.04) 25%,
        rgba(var(--pc-primary-rgb),0.08) 50%,
        rgba(var(--pc-primary-rgb),0.04) 75%);
    background-size: 200% 100%;
    animation: pc-shimmer 1.6s infinite;
    border-radius: 0.5rem;
}
@keyframes pc-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Dark mode enhancements ──────────── */
.mud-theme-dark .section-title { color: var(--pc-text) !important; }
.mud-theme-dark .page-header-title {
    background: linear-gradient(135deg, #7DAFDE, #60A5FA);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.mud-theme-dark .mud-table .mud-table-head .mud-table-cell {
    background: rgba(96,165,250,0.06) !important;
    color: var(--pc-text-secondary) !important;
    border-bottom-color: var(--pc-border) !important;
}
.mud-theme-dark .mud-table-row:hover .mud-table-cell { background: rgba(96,165,250,0.05) !important; }
.mud-theme-dark .kpi-icon-gradient { box-shadow: 0 3px 8px rgba(0,0,0,0.4); }
.mud-theme-dark .quick-action-card:hover {
    border-color: rgba(96,165,250,0.35) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
}

/* ── Extended Dark Mode Polish ─────── */

/* Dialog / Popover backgrounds */
.mud-theme-dark .mud-dialog {
    background: #1C1917 !important;
    border: 1px solid #2C2A28;
}
.mud-theme-dark .mud-popover {
    background: #1C1917 !important;
    border: 1px solid #2C2A28 !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5) !important;
}

/* Select / Menu dropdowns */
.mud-theme-dark .mud-list {
    background: #1C1917 !important;
}
.mud-theme-dark .mud-list-item:hover {
    background: rgba(96,165,250,0.08) !important;
}
.mud-theme-dark .mud-menu .mud-list {
    border: 1px solid #2C2A28;
}

/* Date picker */
.mud-theme-dark .mud-picker {
    background: #1C1917 !important;
    border-color: #2C2A28 !important;
}
.mud-theme-dark .mud-picker-calendar-header {
    background: rgba(96,165,250,0.08) !important;
}
.mud-theme-dark .mud-picker .mud-button-month,
.mud-theme-dark .mud-picker .mud-button-year {
    color: #E7E5E4 !important;
}
.mud-theme-dark .mud-picker .mud-picker-calendar-day:hover {
    background: rgba(96,165,250,0.12) !important;
}

/* Expansion panels */
.mud-theme-dark .mud-expand-panel {
    background: #1C1917 !important;
    border-color: #2C2A28 !important;
}
.mud-theme-dark .mud-expand-panel-header:hover {
    background: rgba(96,165,250,0.05) !important;
}

/* Tabs */
.mud-theme-dark .mud-tabs-header {
    border-bottom-color: #2C2A28 !important;
}

/* Snackbar in dark */
.mud-theme-dark .mud-snackbar {
    box-shadow: 0 4px 16px rgba(0,0,0,0.5) !important;
}

/* Alert subtle background */
.mud-theme-dark .mud-alert-outlined {
    border-color: #3C3A38 !important;
}

/* Scrollbar styling for dark mode */
.mud-theme-dark ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.mud-theme-dark ::-webkit-scrollbar-track {
    background: #0C0A09;
}
.mud-theme-dark ::-webkit-scrollbar-thumb {
    background: #44403C;
    border-radius: 4px;
}
.mud-theme-dark ::-webkit-scrollbar-thumb:hover {
    background: #57534E;
}

/* Chip outline in dark */
.mud-theme-dark .mud-chip.mud-chip-outlined {
    border-color: #3C3A38 !important;
}

/* Progress bar track */
.mud-theme-dark .mud-progress-linear {
    background: #292524 !important;
}

/* Tooltip */
.mud-theme-dark .mud-tooltip {
    background: #292524 !important;
    color: #F5F5F4 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5) !important;
}

/* File upload area */
.mud-theme-dark .mud-file-upload {
    border-color: #3C3A38 !important;
}

/* Numeric / text field adornment icon */
.mud-theme-dark .mud-input-adornment .mud-icon-root {
    color: #78716C !important;
}

/* Dividers */
.mud-theme-dark .mud-divider {
    border-color: #292524 !important;
}

/* Avatar in dark mode */
.mud-theme-dark .mud-avatar {
    border-color: #2C2A28;
}

/* Card shadows in dark */
.mud-theme-dark .glass-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.35) !important;
}

/* KPI cards in dark — subtle elevation */
.mud-theme-dark .kpi-card-blue,
.mud-theme-dark .kpi-card-teal,
.mud-theme-dark .kpi-card-amber,
.mud-theme-dark .kpi-card-green,
.mud-theme-dark .kpi-card-purple {
    background: rgba(28,25,23,0.95) !important;
    border: 1px solid #2C2A28;
}
.mud-theme-dark .kpi-card-blue:hover,
.mud-theme-dark .kpi-card-teal:hover,
.mud-theme-dark .kpi-card-amber:hover,
.mud-theme-dark .kpi-card-green:hover,
.mud-theme-dark .kpi-card-purple:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.4) !important;
}

/* Switch toggle */
.mud-theme-dark .mud-switch .mud-switch-track {
    background: #44403C !important;
}

/* Breadcrumb */
.mud-theme-dark .mud-breadcrumb-separator {
    color: #57534E !important;
}

/* Skeleton / loading */
.mud-theme-dark .mud-skeleton {
    background: #292524 !important;
}

/* Pagination */
.mud-theme-dark .mud-pagination .mud-pagination-item {
    border-color: #2C2A28 !important;
}
.mud-theme-dark .mud-pagination .mud-pagination-item:hover {
    background: rgba(96,165,250,0.08) !important;
}

/* ════════════════════════════════════════
   UI/UX POLISH (Mar 2026)
   ════════════════════════════════════════ */

/* ── Smooth transitions for interactive cards ─────── */
.glass-card-hover,
.card-lift,
.card-hover {
    transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.mud-button-root {
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}
.mud-button-root:not(.mud-icon-button):active {
    transform: scale(0.97);
}

/* ── Enhanced MudButton styling ─────── */
.mud-button-root.mud-button-filled {
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
}
.mud-button-root.mud-button-filled:hover {
    box-shadow: 0 4px 12px rgba(var(--pc-primary-rgb), 0.25);
    transform: translateY(-1px);
}
.mud-button-root.mud-button-outlined:hover {
    background: rgba(var(--pc-primary-rgb), 0.04) !important;
}
.mud-fab:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(var(--pc-primary-rgb), 0.3) !important;
}

/* ── MudDialog polish ─────────────── */
.mud-dialog {
    border-radius: 0.75rem !important;
    overflow: hidden;
}
.mud-dialog .mud-dialog-title {
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    padding: 1.25rem 1.5rem 0.75rem !important;
}
.mud-dialog .mud-dialog-content {
    padding: 0.75rem 1.5rem !important;
}
.mud-dialog .mud-dialog-actions {
    padding: 0.75rem 1.5rem 1.25rem !important;
}

/* ── Empty state styling ──────────── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--pc-text-muted);
}
.empty-state .mud-icon-root {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}
.empty-state-text {
    font-size: 0.9375rem;
    color: var(--pc-text-secondary);
    max-width: 320px;
}

/* ── Form section cards ──────────── */
.form-section {
    background: var(--pc-card-bg);
    border: 1px solid var(--pc-card-border);
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
}
.form-section-title {
    font-weight: 700;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pc-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--pc-border);
}
.mud-theme-dark .form-section {
    background: rgba(28,25,23,0.6);
    border-color: #2C2A28;
}

/* ── MudSelect / MudTextField polish ── */
.mud-input-control .mud-input-label {
    font-weight: 500 !important;
}
.mud-input-outlined .mud-input-outlined-border {
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

/* ── MudTabs polish ──────────────── */
.mud-tabs .mud-tab {
    font-weight: 600 !important;
    letter-spacing: 0.01em;
    text-transform: none !important;
    min-width: 0 !important;
    transition: color 0.15s ease, background 0.15s ease;
}
.mud-tabs .mud-tab:hover {
    background: rgba(var(--pc-primary-rgb), 0.04);
}
.mud-tabs .mud-tab.mud-tab-active {
    color: var(--pc-primary) !important;
}
.mud-tabs .mud-tab-slider {
    background: var(--pc-primary) !important;
    height: 3px !important;
    border-radius: 3px 3px 0 0 !important;
}

/* ── MudBreadcrumbs polish ───────── */
.mud-breadcrumbs {
    padding: 0 !important;
    margin-bottom: 0.5rem;
}
.mud-breadcrumbs li {
    font-size: 0.8125rem;
}
.mud-breadcrumbs .mud-breadcrumb-item a {
    color: var(--pc-primary) !important;
    text-decoration: none;
    font-weight: 500;
}
.mud-breadcrumbs .mud-breadcrumb-item:last-child {
    color: var(--pc-text-secondary);
    font-weight: 600;
}

/* ── MudDataGrid polish ──────────── */
.mud-data-grid .mud-table-head .mud-table-cell {
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    color: var(--pc-text-secondary) !important;
    background: rgba(var(--pc-primary-rgb), 0.03) !important;
}

/* ── MudAlert polish ─────────────── */
.mud-alert {
    border-radius: 0.5rem !important;
}
.mud-alert.mud-alert-filled {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ── Staggered card entrance animation ── */
@keyframes pc-stagger-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.stagger-in > * {
    animation: pc-stagger-in 0.3s ease both;
    will-change: transform, opacity;
}
.stagger-in > *:nth-child(1) { animation-delay: 0s; }
.stagger-in > *:nth-child(2) { animation-delay: 0.05s; }
.stagger-in > *:nth-child(3) { animation-delay: 0.1s; }
.stagger-in > *:nth-child(4) { animation-delay: 0.15s; }
.stagger-in > *:nth-child(5) { animation-delay: 0.2s; }
.stagger-in > *:nth-child(6) { animation-delay: 0.25s; }
.stagger-in > *:nth-child(7) { animation-delay: 0.3s; }
.stagger-in > *:nth-child(8) { animation-delay: 0.35s; }

/* ── Numeric values alignment ────── */
.text-right { text-align: right !important; }
.text-center { text-align: center !important; }
.font-mono {
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-variant-numeric: tabular-nums;
}

/* ── Badge dot / indicator ───────── */
.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    animation: pulse-fade 2s ease-in-out infinite;
}
.badge-dot-success { background: var(--pc-success); }
.badge-dot-warning { background: var(--pc-warning); }
.badge-dot-error { background: var(--pc-error); }
.badge-dot-info { background: var(--pc-info); }

/* ── Stat card (compact KPI for portal/finance pages) ── */
.stat-card {
    background: var(--pc-card-bg);
    border: 1px solid var(--pc-card-border);
    border-radius: 0.625rem;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    box-shadow: var(--pc-card-shadow);
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--pc-card-shadow-hover);
}
.stat-card-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
}
.stat-card-icon-primary { background: linear-gradient(135deg, var(--pc-primary), var(--pc-primary-dark)); }
.stat-card-icon-success { background: linear-gradient(135deg, var(--pc-success), var(--pc-success-dark)); }
.stat-card-icon-warning { background: linear-gradient(135deg, var(--pc-warning), var(--pc-warning-dark)); }
.stat-card-icon-error { background: linear-gradient(135deg, var(--pc-error), var(--pc-error-dark)); }
.stat-card-icon-info { background: linear-gradient(135deg, var(--pc-info), var(--pc-info-dark)); }
.stat-card-icon-tertiary { background: linear-gradient(135deg, var(--pc-tertiary), var(--pc-tertiary-dark)); }
.stat-card-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--pc-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.stat-card-value {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--pc-text);
    line-height: 1.2;
}
.mud-theme-dark .stat-card {
    background: rgba(28,25,23,0.9);
    border-color: #2C2A28;
}
.mud-theme-dark .stat-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

/* ── Login dark mode ─────────────── */
.mud-theme-dark .login-card {
    background: rgba(28,25,23,0.95);
    border-color: #2C2A28;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.mud-theme-dark .login-input {
    background: #0C0A09;
    border-color: #2C2A28;
    color: #F5F5F4;
}
.mud-theme-dark .login-input:focus {
    border-color: #60A5FA;
    box-shadow: 0 0 0 3px rgba(96,165,250,0.15);
    background: #1C1917;
}
.mud-theme-dark .login-label {
    color: #A8A29E;
}
.mud-theme-dark .login-remember {
    color: #A8A29E;
}

/* ── Responsive table on mobile ──── */
@media (max-width: 599px) {
    .pc-main-content {
        padding: 76px 0.75rem 1rem !important;
    }
    .page-header {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }
    .mud-table-cell {
        padding: 8px 12px !important;
        font-size: 0.8125rem;
    }
    .stat-card {
        padding: 1rem;
    }
    .stat-card-value {
        font-size: 1.125rem;
    }
}

/* ── MudSelect / Autocomplete dropdown ── */
.mud-popover .mud-list-item {
    font-size: 0.875rem;
    transition: background 0.1s ease;
}
.mud-popover .mud-list-item:hover {
    background: rgba(var(--pc-primary-rgb), 0.06) !important;
}
.mud-popover .mud-list-item.mud-selected-item {
    background: rgba(var(--pc-primary-rgb), 0.1) !important;
    font-weight: 600;
}

/* ── MudNumericField arrows ────────── */
.mud-numeric-field .mud-input-adornment button {
    color: var(--pc-primary) !important;
}

/* ── Row click cursor ────────────── */
.mud-table-row.cursor-pointer {
    cursor: pointer;
}

/* ════════════════════════════════════════
   LOGICAL PROPERTY UTILITY CLASSES
   (RTL-aware — work in both LTR and RTL
    without any [dir="rtl"] override)
   ════════════════════════════════════════ */

.pc-border-start-primary   { border-inline-start: 4px solid var(--pc-primary); }
.pc-border-start-secondary { border-inline-start: 4px solid var(--pc-secondary); }
.pc-border-start-tertiary  { border-inline-start: 4px solid var(--pc-tertiary); }
.pc-border-start-success   { border-inline-start: 4px solid var(--pc-success); }
.pc-border-start-warning   { border-inline-start: 4px solid var(--pc-warning); }
.pc-border-start-error     { border-inline-start: 4px solid var(--pc-error); }
.pc-border-start-info      { border-inline-start: 4px solid var(--pc-info); }

.ms-start-auto { margin-inline-start: auto !important; }
.me-start-auto { margin-inline-end: auto !important; }
.ps-start-1    { padding-inline-start: 0.25rem !important; }
.ps-start-2    { padding-inline-start: 0.5rem !important; }
.ps-start-3    { padding-inline-start: 0.75rem !important; }
.ps-start-4    { padding-inline-start: 1rem !important; }

/* ── Back to top floating button ── */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    inset-inline-end: 2rem;
    z-index: 1000;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--pc-primary, #2563EB);
    color: #fff;
    box-shadow: 0 4px 14px rgba(37,99,235,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
    animation: fadeInUp 0.25s ease;
}
.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(37,99,235,0.5);
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Auth layout language switcher */
.auth-lang-switcher {
    position: absolute;
    top: 1rem;
    inset-inline-end: 1rem;
    z-index: 10;
    display: flex;
    gap: 0.25rem;
}

/* ════════════════════════════════════════
   RTL / BIDI OVERRIDES
   Applied to all RTL scripts:
   Arabic (ar), Hebrew (he), Persian (fa),
   Urdu (ur)
   ════════════════════════════════════════ */

/* ── Font stacks ── */
[dir="rtl"] {
    font-family: 'Noto Sans Arabic', 'Noto Nastaliq Urdu', 'Noto Sans Hebrew', 'Inter', 'Roboto', sans-serif;
}
:lang(he), :lang(he) * {
    font-family: 'Noto Sans Hebrew', 'Inter', 'Roboto', sans-serif !important;
}
:lang(ur), :lang(ur) * {
    font-family: 'Noto Nastaliq Urdu', 'Noto Sans Arabic', sans-serif !important;
    line-height: 2 !important;
}

/* ── Sidebar border ── */
[dir="rtl"] .pc-sidebar {
    border-right: none !important;
    border-left: 1px solid rgba(var(--pc-primary-rgb), 0.08) !important;
}
[dir="rtl"] .mud-theme-dark .pc-sidebar {
    border-right: none !important;
    border-left: 1px solid var(--pc-sidebar-border) !important;
}

/* ── Nav brand ── */
[dir="rtl"] .nav-brand-area {
    border-image: linear-gradient(270deg, var(--pc-primary), var(--pc-secondary), transparent) 1;
}

/* ── Nav active indicator bar (left edge → right edge) ── */
[dir="rtl"] .mud-nav-link.active::before {
    left: auto;
    right: 0;
    border-radius: 3px 0 0 3px;
}

/* ── Nav nested child links (padding-left → padding-right) ── */
[dir="rtl"] .mud-navmenu .mud-collapse-wrapper .mud-nav-link {
    padding-left: 0.5rem;
    padding-right: 2.5rem;
}

/* ── Nav section labels ── */
[dir="rtl"] .nav-section-label {
    border-left: none;
    border-right: 2px solid rgba(var(--pc-primary-rgb), 0.3);
    margin-left: 0;
    margin-right: 0.5rem;
    padding-left: 0.75rem;
    padding-right: 0.5rem;
    text-align: right;
}

/* ── Status dot spacing ── */
[dir="rtl"] .status-dot {
    margin-right: 0;
    margin-left: 0.375rem;
}

/* ── Section accent borders ── */
[dir="rtl"] .section-border-primary   { border-left: none; border-right: 3px solid var(--pc-primary); }
[dir="rtl"] .section-border-secondary { border-left: none; border-right: 3px solid var(--pc-secondary); }
[dir="rtl"] .section-border-tertiary  { border-left: none; border-right: 3px solid var(--pc-tertiary); }
[dir="rtl"] .section-border-warning   { border-left: none; border-right: 3px solid var(--pc-warning); }
[dir="rtl"] .section-border-info      { border-left: none; border-right: 3px solid var(--pc-info); }

/* ── Settings card accent borders ── */
[dir="rtl"] .settings-card-primary   { border-left: none; border-right: 4px solid var(--pc-primary); }
[dir="rtl"] .settings-card-secondary { border-left: none; border-right: 4px solid var(--pc-secondary); }
[dir="rtl"] .settings-card-tertiary  { border-left: none; border-right: 4px solid var(--pc-tertiary); }
[dir="rtl"] .settings-card-warning   { border-left: none; border-right: 4px solid var(--pc-warning); }
[dir="rtl"] .settings-card-error     { border-left: none; border-right: 4px solid var(--pc-error); }

/* ── Notification card ── */
[dir="rtl"] .notification-card {
    border-left: none;
    border-right: 4px solid var(--pc-primary);
}

/* ── Inline border-left accent pattern used on MudPaper/glass-card ── */
/* Flip any element inside [dir=rtl] that uses border-left as a start-accent */
[dir="rtl"] .mud-paper[style*="border-left"] {
    border-inline-start: inherit;
    border-inline-end: none;
}

/* ── Login page ── */
[dir="rtl"] .login-input-icon {
    left: auto;
    right: 0.875rem;
}
[dir="rtl"] .login-input-icon-pad {
    padding-left: 0.875rem;
    padding-right: 2.75rem;
}
[dir="rtl"] .login-btn svg {
    transform: scaleX(-1);
}

/* ── Page header accent bar ── */
[dir="rtl"] .page-header-title::before,
[dir="rtl"] [style*="border-left: 4px solid var(--pc-primary)"],
[dir="rtl"] [style*="border-left: 3px solid var(--pc-primary)"] {
    border-left: none !important;
    border-right: inherit;
}

/* ── MudBlazor icon direction flip (arrows, chevrons) ── */
[dir="rtl"] .mud-icon-button .mud-icon-root[data-icon="arrow_forward"],
[dir="rtl"] .mud-icon-root[data-icon="chevron_right"],
[dir="rtl"] .mud-icon-root[data-icon="keyboard_arrow_right"],
[dir="rtl"] .mud-icon-root[data-icon="navigate_next"],
[dir="rtl"] .mud-icon-root[data-icon="arrow_back"],
[dir="rtl"] .mud-icon-root[data-icon="chevron_left"],
[dir="rtl"] .mud-icon-root[data-icon="navigate_before"] {
    transform: scaleX(-1);
}

/* ── MudExpansionPanel expand icon ── */
[dir="rtl"] .mud-expand-panel .mud-expand-panel-header .mud-icon-root {
    transform: scaleX(-1);
}

/* ════════════════════════════════════════
   DESIGN REFRESH — Hero Layout v2
   Outfit font · Dark sidebar · ECG hero
   ════════════════════════════════════════ */

/* ── Global font upgrade ── */
body,
.mud-typography,
.mud-button-root,
.mud-input-control,
.mud-table-cell,
.mud-nav-link,
.mud-chip,
.mud-tab {
    font-family: 'Outfit', 'Inter', sans-serif !important;
}

/* ── Dark Sidebar Redesign ── */
.pc-sidebar {
    background: #0B1929 !important;
    border-right: 1px solid rgba(255,255,255,0.05) !important;
}
.mud-theme-dark .pc-sidebar {
    background: #060E18 !important;
    border-right: 1px solid rgba(255,255,255,0.04) !important;
}
[dir="rtl"] .pc-sidebar {
    border-right: none !important;
    border-left: 1px solid rgba(255,255,255,0.05) !important;
}

/* Brand area on dark sidebar */
.nav-brand-area {
    padding: 1.375rem 1.25rem 1.25rem !important;
    border-image: linear-gradient(90deg, rgba(0,196,167,0.6), rgba(37,99,235,0.25), transparent) 1 !important;
}
.nav-brand-title {
    color: #FFFFFF !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
    font-size: 1.0625rem !important;
}
.nav-brand-subtitle {
    color: rgba(255,255,255,0.38) !important;
    font-size: 0.6875rem !important;
}

/* Section labels on dark sidebar */
.nav-section-label {
    color: rgba(94,234,212,0.6) !important;
    border-left-color: rgba(0,196,167,0.35) !important;
    font-size: 0.6rem !important;
    letter-spacing: 0.12em !important;
}
[dir="rtl"] .nav-section-label {
    border-right-color: rgba(0,196,167,0.35) !important;
}

/* Nav links on dark sidebar */
.mud-navmenu .mud-nav-link,
.mud-navmenu .mud-nav-group .mud-nav-group-text {
    color: rgba(255,255,255,0.62) !important;
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
}
.mud-navmenu .mud-nav-link .mud-icon-root,
.mud-navmenu .mud-nav-group .mud-nav-group-text .mud-icon-root {
    color: rgba(255,255,255,0.42) !important;
    transition: color 0.15s ease !important;
}
.mud-navmenu .mud-nav-link:hover {
    background: rgba(255,255,255,0.05) !important;
    color: rgba(255,255,255,0.9) !important;
}
.mud-navmenu .mud-nav-link:hover .mud-icon-root {
    color: rgba(255,255,255,0.8) !important;
}
.mud-navmenu .mud-collapse-wrapper .mud-nav-link {
    color: rgba(255,255,255,0.55) !important;
}
.mud-navmenu .mud-collapse-wrapper .mud-nav-link:hover {
    color: rgba(255,255,255,0.88) !important;
}
.mud-nav-group-expand-icon {
    color: rgba(255,255,255,0.28) !important;
}

/* Active link on dark sidebar */
.mud-nav-link.active {
    background: rgba(37,99,235,0.2) !important;
    color: #93C5FD !important;
}
.mud-nav-link.active .mud-icon-root {
    color: #60A5FA !important;
}
.mud-nav-link.active::before {
    background: #00C4A7 !important;
    width: 3px !important;
}

/* Scrollbar on dark sidebar */
.nav-scroll-area::-webkit-scrollbar { width: 3px; }
.nav-scroll-area::-webkit-scrollbar-track { background: rgba(255,255,255,0.02); }
.nav-scroll-area::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
.nav-scroll-area::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.18); }

/* Footer on dark sidebar */
.nav-footer {
    border-top-color: rgba(255,255,255,0.06) !important;
    padding: 0.875rem 1.25rem !important;
}
.nav-footer-badge {
    color: rgba(255,255,255,0.28) !important;
    background: rgba(255,255,255,0.04) !important;
}

/* ── Enhanced App Bar ── */
.pc-appbar {
    background: linear-gradient(90deg, #0B1929 0%, #163355 35%, #1e3a6e 65%, #2563EB 100%) !important;
    box-shadow: 0 1px 0 rgba(255,255,255,0.06), 0 2px 12px rgba(0,0,0,0.25) !important;
}

/* App bar brand name next to hamburger */
.pc-appbar-brand {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    color: rgba(255,255,255,0.92);
    letter-spacing: -0.025em;
    margin-left: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.pc-appbar-brand-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #00C4A7;
    display: inline-block;
    box-shadow: 0 0 8px rgba(0,196,167,0.7);
}

/* ── DASHBOARD HERO SECTION ── */
.dash-hero {
    position: relative;
    background: linear-gradient(135deg, #0B1929 0%, #1E3A5F 55%, #1b4f72 100%);
    border-radius: 1.125rem;
    overflow: hidden;
    margin-bottom: 1.75rem;
    padding: 2rem 2.5rem 1.75rem;
    min-height: 148px;
}

/* Grid overlay */
.dash-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}

/* Ambient glow orbs */
.dash-hero-glow {
    position: absolute;
    top: -80px;
    right: 6%;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,196,167,0.22) 0%, transparent 70%);
    pointer-events: none;
    animation: hero-glow-breathe 5s ease-in-out infinite;
}
.dash-hero-glow-2 {
    position: absolute;
    bottom: -100px;
    left: 12%;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37,99,235,0.2) 0%, transparent 70%);
    pointer-events: none;
}
@keyframes hero-glow-breathe {
    0%, 100% { opacity: 0.85; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(1.12); }
}

/* ECG line at bottom */
.dash-hero-ecg {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 68px;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.28;
}
.ecg-svg {
    width: 100%;
    height: 100%;
    display: block;
}
.ecg-path {
    fill: none;
    stroke: #00C4A7;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 2200;
    stroke-dashoffset: 2200;
    animation: ecg-trace 2.8s ease-out forwards;
}
@keyframes ecg-trace {
    0% { stroke-dashoffset: 2200; opacity: 0; }
    8% { opacity: 1; }
    100% { stroke-dashoffset: 0; opacity: 1; }
}

/* Hero inner layout */
.dash-hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Badge pill */
.dash-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0,196,167,0.1);
    border: 1px solid rgba(0,196,167,0.22);
    border-radius: 100px;
    padding: 0.3rem 0.875rem;
    font-size: 0.675rem;
    font-weight: 700;
    color: #5EEAD4;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    width: fit-content;
}
.dash-hero-badge-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #2DD4BF;
    flex-shrink: 0;
    animation: badge-live 1.8s ease-in-out infinite;
}
@keyframes badge-live {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(45,212,191,0.5); }
    50% { opacity: 0.6; box-shadow: 0 0 0 5px rgba(45,212,191,0); }
}

/* Greeting headline */
.dash-hero-greeting {
    font-family: 'Outfit', sans-serif !important;
    font-size: clamp(1.625rem, 3vw, 2.25rem) !important;
    font-weight: 800 !important;
    color: #FFFFFF !important;
    letter-spacing: -0.04em !important;
    line-height: 1.1 !important;
    margin: 0 0 0.375rem !important;
}

/* Date subtitle */
.dash-hero-date {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.48);
    margin: 0;
    font-weight: 400;
    letter-spacing: 0.01em;
}

/* Right side chip */
.dash-hero-right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; }
.dash-hero-live-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(255,255,255,0.58);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}
.dash-hero-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22C55E;
    flex-shrink: 0;
    box-shadow: 0 0 6px rgba(34,197,94,0.65);
    animation: badge-live 2s ease-in-out infinite;
}

/* ── GRADIENT KPI HERO CARDS ── */
.kpi-hero-card {
    position: relative;
    overflow: hidden;
    border-radius: 0.875rem !important;
    border: none !important;
    transition: transform 0.22s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.22s ease !important;
}
.kpi-hero-card:hover {
    transform: translateY(-4px) scale(1.01) !important;
}
/* Sheen overlay on gradient cards */
.kpi-hero-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 55%);
    pointer-events: none;
    border-radius: inherit;
}
/* Large decorative circle */
.kpi-hero-card::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    pointer-events: none;
}

/* Icon wrap inside gradient cards */
.kpi-hero-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255,255,255,0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.875rem;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(4px);
}
.kpi-hero-icon .mud-icon-root {
    color: white !important;
    font-size: 1.375rem !important;
}

/* Value — JetBrains Mono for crisp numbers */
.kpi-hero-value {
    font-family: 'JetBrains Mono', 'Fira Code', monospace !important;
    font-size: 2rem !important;
    font-weight: 700 !important;
    color: white !important;
    line-height: 1 !important;
    letter-spacing: -0.03em !important;
    position: relative;
    z-index: 1;
}
.kpi-hero-label {
    font-family: 'Outfit', sans-serif !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    color: rgba(255,255,255,0.68) !important;
    margin-top: 0.3rem !important;
    letter-spacing: 0.005em !important;
    position: relative;
    z-index: 1;
}

/* Gradient colour variants */
.kpi-grad-blue   { background: linear-gradient(140deg, #1e4fd8, #3b82f6) !important; box-shadow: 0 6px 28px rgba(37,99,235,0.42) !important; }
.kpi-grad-teal   { background: linear-gradient(140deg, #0d766d, #14b8a6) !important; box-shadow: 0 6px 28px rgba(20,184,166,0.42) !important; }
.kpi-grad-green  { background: linear-gradient(140deg, #166534, #22c55e) !important; box-shadow: 0 6px 28px rgba(34,197,94,0.38) !important; }
.kpi-grad-purple { background: linear-gradient(140deg, #4338ca, #818cf8) !important; box-shadow: 0 6px 28px rgba(99,102,241,0.42) !important; }
.kpi-grad-amber  { background: linear-gradient(140deg, #92400e, #f59e0b) !important; box-shadow: 0 6px 28px rgba(245,158,11,0.42) !important; }
.kpi-grad-red    { background: linear-gradient(140deg, #991b1b, #ef4444) !important; box-shadow: 0 6px 28px rgba(239,68,68,0.38) !important; }

/* Dark mode: gradient cards look the same (they're self-contained) */
.mud-theme-dark .kpi-hero-card { border: none !important; }
.mud-theme-dark .kpi-hero-card:hover { box-shadow: inherit !important; }

/* ── Section title refresh ── */
.section-title {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: -0.025em !important;
}

/* ── Responsive hero ── */
@media (max-width: 599px) {
    .dash-hero {
        padding: 1.5rem 1.25rem 1.25rem;
        min-height: 130px;
    }
    .dash-hero-greeting {
        font-size: 1.5rem !important;
    }
    .dash-hero-right { display: none; }
    .kpi-hero-value { font-size: 1.625rem !important; }
    .dash-hero-ecg { height: 50px; }
}

/* ── MudDrawer — handled via Anchor property in MainLayout.razor ── */

/* ── MudList item icon spacing ── */
[dir="rtl"] .mud-list-item-icon {
    margin-right: 0;
    margin-left: 1rem;
}

/* ── Chip / Badge end adornment ── */
[dir="rtl"] .mud-chip .mud-chip-close-button {
    margin-right: 0.25rem;
    margin-left: -0.25rem;
}

/* ── Table cell text alignment ── */
[dir="rtl"] .mud-table-cell {
    text-align: right;
}
[dir="rtl"] .mud-table-cell[style*="text-align:right"],
[dir="rtl"] .mud-table-cell[style*="text-align: right"] {
    text-align: left !important;
}

/* ── Input adornment positions ── */
[dir="rtl"] .mud-input-adornment-start {
    margin-right: 0;
    margin-left: 0.5rem;
}
[dir="rtl"] .mud-input-adornment-end {
    margin-left: 0;
    margin-right: 0.5rem;
}

/* ── Timeline / Steps (How-it-works style) ── */
[dir="rtl"] .step-connector {
    left: auto;
    right: 0;
    transform: scaleX(-1);
}

/* ── KPI card accent top bar — no change needed (already uses left:0;right:0) ── */

/* ── AI Assistant floating button ── */
[dir="rtl"] .ai-assistant-fab {
    right: auto;
    left: 1.5rem;
}
[dir="rtl"] .ai-panel {
    right: auto;
    left: 1.5rem;
}

/* ── Breadcrumb separator ── */
[dir="rtl"] .mud-breadcrumb-separator {
    transform: scaleX(-1);
}

/* ── Pagination ── */
[dir="rtl"] .mud-pagination .mud-icon-button:first-child svg,
[dir="rtl"] .mud-pagination .mud-icon-button:last-child svg {
    transform: scaleX(-1);
}

/* ── Progress linear (fill direction) ── */
[dir="rtl"] .mud-progress-linear-bar {
    transform-origin: right center;
}

/* ── Tooltip / Popover offset correction ── */
[dir="rtl"] .mud-tooltip {
    direction: rtl;
}

/* ── Form helper text ── */
[dir="rtl"] .mud-input-helper-text {
    text-align: right;
}

/* ── Select dropdown item ── */
[dir="rtl"] .mud-list-item {
    text-align: right;
}

/* ── Snackbar position (bottom-right → bottom-left) ── */
[dir="rtl"] .mud-snackbar-location-bottom-right {
    left: 1rem;
    right: auto;
}

/* ── Responsive text for RTL scripts ── */
[dir="rtl"] .mud-typography {
    text-align: start;
}
[dir="rtl"] .page-header-subtitle,
[dir="rtl"] .nav-brand-subtitle {
    text-align: start;
}

/* ════════════════════════════════════════
   TELEMEDICINE / VIDEO CONSULTATION
   ════════════════════════════════════════ */
.video-consult-root {
    border: 1px solid var(--mud-palette-divider);
    border-radius: 12px;
    overflow: hidden;
    background: var(--mud-palette-surface);
}
.video-consult-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2.5rem 1.5rem;
    text-align: center;
    gap: .75rem;
}
.video-consult-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(37,99,235,.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pc-primary);
}
.video-consult-title { font-size: 1.2rem; font-weight: 700; margin: 0; }
.video-consult-sub { color: var(--mud-palette-text-secondary); margin: 0; font-size: .875rem; }
.video-consult-room-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--mud-palette-action-hover);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: .8rem;
    color: var(--mud-palette-text-secondary);
}
.video-consult-btn { gap: 8px; }
.video-consult-note { font-size: .75rem; color: var(--mud-palette-text-disabled); margin: 0; }
.video-consult-frame-wrap { display: flex; flex-direction: column; }
.video-consult-iframe {
    width: 100%;
    height: 560px;
    border: none;
    display: block;
}
.video-consult-end-btn {
    background: var(--mud-palette-error);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 4px 14px;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
}
.video-consult-end-btn:hover { opacity: .88; }

/* ════════════════════════════════════════
   ANALYTICS / REPORTS
   ════════════════════════════════════════ */
.analytics-empty {
    padding: 2rem;
    text-align: center;
    color: var(--mud-palette-text-secondary);
    font-size: .875rem;
}
.analytics-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: .825rem;
}
.analytics-bar-label {
    min-width: 110px;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--mud-palette-text-secondary);
}
.analytics-bar-track {
    flex: 1;
    height: 10px;
    background: var(--mud-palette-action-hover);
    border-radius: 5px;
    overflow: hidden;
}
.analytics-bar-fill {
    height: 100%;
    background: var(--pc-primary);
    border-radius: 5px;
    transition: width .4s ease;
}
.analytics-bar-fill.analytics-bar-pink { background: #E91E63; }
.analytics-bar-fill.analytics-bar-teal { background: var(--pc-success); }
.analytics-bar-fill.analytics-bar-indigo { background: var(--pc-tertiary); }
.analytics-bar-value {
    min-width: 80px;
    text-align: right;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* ════════════════════════════════════════
   PATIENT PORTAL
   ════════════════════════════════════════ */
.portal-root {
    min-height: 100vh;
    background: var(--mud-palette-background);
    padding: 2rem 1rem;
    max-width: 900px;
    margin: 0 auto;
}
.portal-header {
    text-align: center;
    margin-bottom: 2rem;
}
.portal-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    margin-bottom: 1rem;
}
.portal-logo-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
}
.portal-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 .5rem;
}
.portal-subtitle {
    color: var(--mud-palette-text-secondary);
    margin: 0;
}
.portal-card {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-divider);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.portal-card-title { font-size: 1.3rem; font-weight: 600; margin: 0 0 .4rem; }
.portal-card-sub { color: var(--mud-palette-text-secondary); margin: 0; }
.portal-welcome {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--mud-palette-surface);
    border-radius: 12px;
    border: 1px solid var(--mud-palette-divider);
    margin-bottom: 1.5rem;
}
.portal-patient-name { font-size: 1.2rem; font-weight: 700; margin: 0; }
.portal-reg-no { font-size: .8rem; color: var(--mud-palette-text-secondary); }
.portal-welcome .mud-button { margin-left: auto; }
.portal-tabs { margin-top: 0; }
.portal-tab-panel { padding: 1.5rem 0; }
.portal-section { min-height: 200px; }
.portal-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: 3rem 1rem;
    color: var(--mud-palette-text-secondary);
}
.portal-table { border-radius: 8px; overflow: hidden; }
.portal-rx-card { border-radius: 12px !important; }

/* ════════════════════════════════════════
   NOTIFICATION BELL
   ════════════════════════════════════════ */
.notif-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    background: var(--mud-palette-error);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    pointer-events: none;
    line-height: 1;
}

.notif-item {
    transition: background .15s;
    border-bottom: 1px solid var(--mud-palette-divider);
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--mud-palette-action-hover); }
.notif-unread { background: rgba(37,99,235,.06); }

/* appbar bell wrapper needs position:relative for badge */
.pc-appbar .mud-menu { position: relative; }

/* ═══════════════════════════════════════════════════════
   ProHealth-Style Dashboard — Hospital.jpg Redesign
   ═══════════════════════════════════════════════════════ */

/* ── Hero ── */
.ph-hero {
    position: relative;
    background: linear-gradient(135deg, #061525 0%, #0B2545 50%, #1a3d6b 100%);
    border-radius: 1.25rem;
    overflow: hidden;
    margin-bottom: 2.5rem;
    min-height: 270px;
    display: flex;
    flex-direction: column;
}
.ph-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.016) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.016) 1px, transparent 1px);
    background-size: 52px 52px;
    pointer-events: none;
}
.ph-hero-glow {
    position: absolute;
    top: -70px; right: 6%;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37,99,235,0.2) 0%, transparent 65%);
    pointer-events: none;
    animation: hero-glow-breathe 6s ease-in-out infinite;
}
.ph-hero-glow-2 {
    position: absolute;
    bottom: -90px; left: 4%;
    width: 300px; height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,196,167,0.13) 0%, transparent 70%);
    pointer-events: none;
}
.ph-hero-ecg {
    position: absolute;
    bottom: 62px; left: 0; right: 0;
    height: 68px;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.18;
}
.ph-hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    padding: 2.5rem 2.75rem 1.75rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}
.ph-hero-left { display: flex; flex-direction: column; }
.ph-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0,196,167,0.1);
    border: 1px solid rgba(0,196,167,0.22);
    border-radius: 100px;
    padding: 0.3rem 0.9rem;
    font-size: 0.63rem;
    font-weight: 700;
    color: #5EEAD4;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    width: fit-content;
}
.ph-hero-badge-dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: #2DD4BF;
    flex-shrink: 0;
    animation: badge-live 1.8s ease-in-out infinite;
}
.ph-hero-heading {
    font-family: 'Outfit', sans-serif !important;
    font-size: clamp(1.875rem, 3.5vw, 2.875rem) !important;
    font-weight: 800 !important;
    color: #FFFFFF !important;
    letter-spacing: -0.04em !important;
    line-height: 1.08 !important;
    margin: 0 0 0.625rem !important;
}
.ph-hero-name { color: #7DD3FC; }
.ph-hero-date {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.4);
    margin: 0 0 1.125rem;
    font-weight: 400;
    letter-spacing: 0.01em;
}
.ph-hero-live-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 0.45rem 0.9rem;
    font-size: 0.67rem;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    width: fit-content;
}
.ph-hero-live-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #22C55E;
    flex-shrink: 0;
    box-shadow: 0 0 6px rgba(34,197,94,0.65);
    animation: badge-live 2s ease-in-out infinite;
}
.ph-hero-right-deco {
    position: relative;
    width: 180px; height: 180px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ph-hero-deco-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.07);
}
.ph-hero-deco-ring-1 { width: 165px; height: 165px; animation: deco-spin 22s linear infinite; }
.ph-hero-deco-ring-2 {
    width: 120px; height: 120px;
    border-color: rgba(37,99,235,0.22);
    border-style: dashed;
    animation: deco-spin 16s linear infinite reverse;
}
@keyframes deco-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.ph-hero-deco-icon {
    position: relative; z-index: 1;
    width: 78px; height: 78px;
    border-radius: 50%;
    background: rgba(37,99,235,0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

/* ── Stats Strip (inside hero, bottom) ── */
.ph-stats-strip {
    position: relative;
    z-index: 2;
    display: flex;
    padding: 1.125rem 2.75rem;
    border-top: 1px solid rgba(255,255,255,0.09);
    background: rgba(0,0,0,0.18);
    backdrop-filter: blur(8px);
}
.ph-stat-item {
    flex: 1;
    text-align: center;
    padding: 0 0.5rem;
    position: relative;
}
.ph-stat-item + .ph-stat-item::before {
    content: '';
    position: absolute;
    left: 0; top: 8%; bottom: 8%;
    width: 1px;
    background: rgba(255,255,255,0.1);
}
.ph-stat-icon {
    width: 30px; height: 30px;
    border-radius: 7px;
    background: rgba(255,255,255,0.07);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.375rem;
}
.ph-stat-icon .mud-icon-root { color: rgba(255,255,255,0.6) !important; font-size: 0.95rem !important; }
.ph-stat-icon-green { background: rgba(34,197,94,0.14) !important; }
.ph-stat-icon-green .mud-icon-root { color: #4ADE80 !important; }
.ph-stat-icon-amber { background: rgba(245,158,11,0.14) !important; }
.ph-stat-icon-amber .mud-icon-root { color: #FCD34D !important; }
.ph-stat-icon-teal { background: rgba(20,184,166,0.14) !important; }
.ph-stat-icon-teal .mud-icon-root { color: #2DD4BF !important; }
.ph-stat-value {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    line-height: 1;
    letter-spacing: -0.025em;
}
.ph-stat-label {
    font-size: 0.63rem;
    color: rgba(255,255,255,0.42);
    font-weight: 500;
    margin-top: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

/* ── Section Headers (Hospital.jpg "ABOUT US" style) ── */
.ph-section-header { margin-bottom: 1.375rem; }
.ph-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #2563EB;
    margin-bottom: 0.35rem;
}
.ph-eyebrow::before {
    content: '';
    display: inline-block;
    width: 0.875rem;
    height: 2px;
    background: #2563EB;
    border-radius: 1px;
    flex-shrink: 0;
}
.ph-section-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 800;
    color: #0B2242;
    letter-spacing: -0.035em;
    line-height: 1.15;
    margin: 0;
}

/* ── KPI Cards: clean white + colored top accent ── */
.ph-kpi-card {
    border-radius: 0.9rem;
    background: #fff;
    border: 1px solid #E8EDF5;
    border-top-width: 3px;
    box-shadow: 0 2px 14px rgba(11,34,66,0.06);
    transition: transform 0.22s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.22s ease;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.ph-kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 32px rgba(11,34,66,0.11);
}
.ph-kpi-card::after {
    content: '';
    position: absolute;
    bottom: -24px; right: -24px;
    width: 90px; height: 90px;
    border-radius: 50%;
    opacity: 0.05;
    pointer-events: none;
    background: currentColor;
}
.ph-kpi-blue   { border-top-color: #2563EB; }
.ph-kpi-teal   { border-top-color: #0D9488; }
.ph-kpi-green  { border-top-color: #16A34A; }
.ph-kpi-purple { border-top-color: #6366F1; }
.ph-kpi-amber  { border-top-color: #D97706; }
.ph-kpi-red    { border-top-color: #DC2626; }

.ph-kpi-icon-wrap {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    flex-shrink: 0;
}
.ph-kpi-icon-wrap .mud-icon-root { font-size: 1.2rem !important; }

.ph-kpi-icon-blue   { background: #EFF6FF; }
.ph-kpi-icon-blue   .mud-icon-root { color: #2563EB !important; }
.ph-kpi-icon-teal   { background: #F0FDFA; }
.ph-kpi-icon-teal   .mud-icon-root { color: #0D9488 !important; }
.ph-kpi-icon-green  { background: #F0FDF4; }
.ph-kpi-icon-green  .mud-icon-root { color: #16A34A !important; }
.ph-kpi-icon-purple { background: #EEF2FF; }
.ph-kpi-icon-purple .mud-icon-root { color: #6366F1 !important; }
.ph-kpi-icon-amber  { background: #FFFBEB; }
.ph-kpi-icon-amber  .mud-icon-root { color: #D97706 !important; }
.ph-kpi-icon-red    { background: #FEF2F2; }
.ph-kpi-icon-red    .mud-icon-root { color: #DC2626 !important; }

.ph-kpi-value {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 1.875rem;
    font-weight: 700;
    color: #0B2242;
    line-height: 1;
    letter-spacing: -0.03em;
    margin-bottom: 0.3rem;
}
.ph-kpi-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: #64748B;
    letter-spacing: 0.005em;
    margin-top: auto;
}

/* ── Department-style Quick Access Cards ── */
.ph-dept-section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0B2242;
    letter-spacing: -0.02em;
    margin: 0;
}
.ph-dept-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.625rem;
}
.ph-dept-card {
    border: 1.5px solid #E2E8F0;
    border-radius: 0.875rem;
    background: white;
    padding: 0.875rem 0.625rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34,1.56,0.64,1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    min-height: 84px;
    justify-content: center;
}
.ph-dept-card:hover {
    border-color: #2563EB;
    box-shadow: 0 4px 18px rgba(37,99,235,0.13);
    transform: translateY(-2px);
}
.ph-dept-card-active {
    background: linear-gradient(140deg, #1e4fd8 0%, #2563EB 100%);
    border-color: #1e4fd8;
    box-shadow: 0 6px 22px rgba(37,99,235,0.38);
}
.ph-dept-card-active:hover { border-color: #1e4fd8; }
.ph-dept-card-active .ph-dept-icon {
    background: rgba(255,255,255,0.18) !important;
}
.ph-dept-card-active .ph-dept-icon .mud-icon-root { color: white !important; }
.ph-dept-card-active .ph-dept-label { color: white !important; }
.ph-dept-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: #EFF6FF;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ph-dept-icon .mud-icon-root { font-size: 1.125rem !important; color: #2563EB !important; }
.ph-dept-label {
    font-weight: 600;
    font-size: 0.74rem;
    color: #1E293B;
    line-height: 1.3;
}

/* ── Dark mode overrides ── */
.mud-theme-dark .ph-section-title { color: rgba(255,255,255,0.92) !important; }
.mud-theme-dark .ph-eyebrow { color: #60A5FA !important; }
.mud-theme-dark .ph-eyebrow::before { background: #60A5FA !important; }
.mud-theme-dark .ph-kpi-card {
    background: rgba(255,255,255,0.04) !important;
    border-color: rgba(255,255,255,0.08) !important;
}
.mud-theme-dark .ph-kpi-card:hover { box-shadow: 0 10px 32px rgba(0,0,0,0.4) !important; }
.mud-theme-dark .ph-kpi-value { color: rgba(255,255,255,0.94) !important; }
.mud-theme-dark .ph-kpi-label { color: rgba(255,255,255,0.48) !important; }
.mud-theme-dark .ph-kpi-icon-blue   { background: rgba(37,99,235,0.15) !important; }
.mud-theme-dark .ph-kpi-icon-teal   { background: rgba(13,148,136,0.15) !important; }
.mud-theme-dark .ph-kpi-icon-green  { background: rgba(22,163,74,0.15) !important; }
.mud-theme-dark .ph-kpi-icon-purple { background: rgba(99,102,241,0.15) !important; }
.mud-theme-dark .ph-kpi-icon-amber  { background: rgba(217,119,6,0.15) !important; }
.mud-theme-dark .ph-kpi-icon-red    { background: rgba(220,38,38,0.15) !important; }
.mud-theme-dark .ph-dept-card {
    background: rgba(255,255,255,0.04) !important;
    border-color: rgba(255,255,255,0.08) !important;
}
.mud-theme-dark .ph-dept-card:hover {
    border-color: #3B82F6 !important;
    box-shadow: 0 4px 18px rgba(37,99,235,0.22) !important;
}
.mud-theme-dark .ph-dept-card-active {
    background: linear-gradient(140deg, #1e4fd8 0%, #2563EB 100%) !important;
    border-color: #2563EB !important;
}
.mud-theme-dark .ph-dept-icon { background: rgba(37,99,235,0.15) !important; }
.mud-theme-dark .ph-dept-label { color: rgba(255,255,255,0.78) !important; }
.mud-theme-dark .ph-dept-section-title { color: rgba(255,255,255,0.9) !important; }

/* ── Responsive ── */
@media (max-width: 599px) {
    .ph-hero-content { padding: 1.5rem 1.25rem 1rem; }
    .ph-hero-heading { font-size: 1.75rem !important; }
    .ph-hero-right-deco { display: none; }
    .ph-stats-strip { padding: 1rem 1.25rem; flex-wrap: wrap; gap: 0.75rem; }
    .ph-stat-item { flex: 1 1 40%; }
    .ph-stat-item + .ph-stat-item::before { display: none; }
    .ph-stat-value { font-size: 1.15rem; }
    .ph-section-title { font-size: 1.25rem !important; }
    .ph-kpi-value { font-size: 1.5rem; }
    .ph-dept-grid { grid-template-columns: 1fr 1fr; }
}
