/* ============================================
   B3G ENTERPRISE DASHBOARD DESIGN SYSTEM
   Version: 2.0 - Refined Command Center
   ============================================ */

/* Google Fonts Import - Premium Typography */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700&family=JetBrains+Mono:wght@400;500;600&family=Instrument+Sans:wght@400;500;600;700&display=swap');

/* ============================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================ */
:root {
    /* Typography */
    --font-display: 'Instrument Sans', system-ui, sans-serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Enterprise Color Palette - Dark Theme */
    --bg-base: #0a0d12;
    --bg-elevated: #111419;
    --bg-surface: #181c23;
    --bg-surface-hover: #1e232c;
    --bg-subtle: #242a35;
    --bg-muted: #2d3544;

    /* Accent Colors - Status Driven */
    --accent-primary: #60a5fa;
    --accent-primary-muted: rgba(96, 165, 250, 0.15);
    --accent-secondary: #a78bfa;
    --accent-secondary-muted: rgba(167, 139, 250, 0.15);

    /* Status Colors - Refined */
    --status-success: #34d399;
    --status-success-muted: rgba(52, 211, 153, 0.12);
    --status-success-glow: rgba(52, 211, 153, 0.25);
    --status-warning: #fbbf24;
    --status-warning-muted: rgba(251, 191, 36, 0.12);
    --status-warning-glow: rgba(251, 191, 36, 0.25);
    --status-error: #f87171;
    --status-error-muted: rgba(248, 113, 113, 0.12);
    --status-error-glow: rgba(248, 113, 113, 0.25);
    --status-info: #60a5fa;
    --status-info-muted: rgba(96, 165, 250, 0.12);

    /* Text Colors */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-disabled: #475569;

    /* Borders & Lines */
    --border-subtle: rgba(148, 163, 184, 0.08);
    --border-default: rgba(148, 163, 184, 0.12);
    --border-emphasis: rgba(148, 163, 184, 0.2);

    /* Shadows - Layered Depth */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
    --shadow-glow-primary: 0 0 20px rgba(96, 165, 250, 0.15);
    --shadow-glow-success: 0 0 20px rgba(52, 211, 153, 0.15);
    --shadow-glow-warning: 0 0 20px rgba(251, 191, 36, 0.15);
    --shadow-glow-error: 0 0 20px rgba(248, 113, 113, 0.15);

    /* Gradients */
    --gradient-surface: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
    --gradient-card: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);

    /* Animation Timings */
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
    --ease-in-out-quad: cubic-bezier(0.45, 0, 0.55, 1);
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 400ms;

    /* Spacing Scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;
}

/* ============================================
   BASE STYLES
   ============================================ */
html, body {
    font-family: var(--font-body);
    background: var(--bg-base);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   DASHBOARD PAGE CONTAINER
   ============================================ */
.dashboard-page {
    padding: var(--space-6);
    min-height: 100vh;
    background: var(--bg-base);
    position: relative;
}

.dashboard-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 400px;
    background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(96, 165, 250, 0.08) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   PAGE HEADER
   ============================================ */
.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-8);
    position: relative;
    z-index: 1;
}

.dashboard-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.025em;
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.dashboard-title-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-accent);
    border-radius: var(--radius-md);
    font-size: 1.25rem;
}

.dashboard-subtitle {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-top: var(--space-1);
}

.dashboard-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* Unified Action Buttons - used in all page headers */
.dash-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out-expo);
    white-space: nowrap;
    line-height: 1;
}

.dash-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Ghost / Outlined variant (Refresh, secondary actions) */
.dash-btn-ghost {
    background: transparent;
    border-color: var(--border-default);
    color: var(--text-secondary);
}

.dash-btn-ghost:hover:not(:disabled) {
    background: var(--bg-surface);
    border-color: var(--border-emphasis);
    color: var(--text-primary);
}

/* Primary variant (Add, Create, primary actions) */
.dash-btn-primary {
    background: rgba(96, 165, 250, 0.12);
    border-color: rgba(96, 165, 250, 0.25);
    color: #60a5fa;
}

.dash-btn-primary:hover:not(:disabled) {
    background: rgba(96, 165, 250, 0.2);
    border-color: rgba(96, 165, 250, 0.4);
}

/* Warning variant (Dismiss, Deactivate) */
.dash-btn-warning {
    background: transparent;
    border-color: var(--border-default);
    color: var(--text-secondary);
}

.dash-btn-warning:hover:not(:disabled) {
    background: rgba(251, 191, 36, 0.08);
    border-color: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

/* Danger variant */
.dash-btn-danger {
    background: transparent;
    border-color: var(--border-default);
    color: var(--text-secondary);
}

.dash-btn-danger:hover:not(:disabled) {
    background: rgba(248, 113, 113, 0.08);
    border-color: rgba(248, 113, 113, 0.3);
    color: #f87171;
}

/* Icon-only variant */
.dash-btn-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-color: var(--border-default);
    color: var(--text-secondary);
}

.dash-btn-icon:hover:not(:disabled) {
    background: var(--bg-surface);
    color: var(--text-primary);
}

.dash-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.dash-btn .spin {
    animation: btn-spin 1s linear infinite;
}

@keyframes btn-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Unified Pagination */
.dash-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-subtle);
}

.dash-pag-btn {
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--duration-fast) ease;
    font-variant-numeric: tabular-nums;
}

.dash-pag-btn:hover:not(:disabled) {
    background: var(--bg-surface);
    border-color: var(--border-default);
    color: var(--text-primary);
}

.dash-pag-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.dash-pag-btn.current {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.dash-pag-btn svg {
    width: 14px;
    height: 14px;
}

/* ============================================
   KPI METRIC CARDS - Premium Design
   ============================================ */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.kpi-card {
    background: var(--gradient-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    position: relative;
    overflow: hidden;
    transition: all var(--duration-normal) var(--ease-out-expo);
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-card);
    opacity: 0.5;
}

.kpi-card:hover {
    border-color: var(--border-default);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.kpi-card-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.kpi-label {
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-2);
}

.kpi-value {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.kpi-value-sm {
    font-size: 1.75rem;
}

.kpi-trend {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: 0.8125rem;
    font-weight: 500;
    margin-top: var(--space-2);
}

.kpi-trend.positive {
    color: var(--status-success);
}

.kpi-trend.negative {
    color: var(--status-error);
}

.kpi-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.kpi-icon.primary {
    background: var(--accent-primary-muted);
    color: var(--accent-primary);
}

.kpi-icon.success {
    background: var(--status-success-muted);
    color: var(--status-success);
}

.kpi-icon.warning {
    background: var(--status-warning-muted);
    color: var(--status-warning);
}

.kpi-icon.error {
    background: var(--status-error-muted);
    color: var(--status-error);
}

.kpi-icon.info {
    background: var(--status-info-muted);
    color: var(--status-info);
}

/* KPI with Indicator Bar */
.kpi-card.has-indicator {
    padding-bottom: var(--space-4);
}

.kpi-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.kpi-indicator.success {
    background: linear-gradient(90deg, var(--status-success) 0%, transparent 100%);
}

.kpi-indicator.warning {
    background: linear-gradient(90deg, var(--status-warning) 0%, transparent 100%);
}

.kpi-indicator.error {
    background: linear-gradient(90deg, var(--status-error) 0%, transparent 100%);
}

/* ============================================
   SECTION PANELS - Glass Effect
   ============================================ */
.dashboard-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--space-6);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.01);
}

.panel-title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.panel-title-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.panel-title-badge.error {
    background: var(--status-error-muted);
    color: var(--status-error);
}

.panel-title-badge.warning {
    background: var(--status-warning-muted);
    color: var(--status-warning);
}

.panel-title-badge.success {
    background: var(--status-success-muted);
    color: var(--status-success);
}

.panel-actions {
    display: flex;
    gap: var(--space-2);
}

.panel-content {
    padding: var(--space-6);
}

/* ============================================
   DATA TABLES - Enterprise Style
   ============================================ */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table thead th {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: var(--space-3) var(--space-4);
    text-align: left;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-default);
}

.data-table tbody tr {
    transition: background var(--duration-fast) var(--ease-in-out-quad);
}

.data-table tbody tr:hover {
    background: var(--bg-surface-hover);
}

.data-table tbody td {
    padding: var(--space-4);
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Table Cell Typography */
.cell-primary {
    font-weight: 500;
    color: var(--text-primary);
}

.cell-secondary {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.cell-mono {
    font-family: var(--font-mono);
    font-size: 0.875rem;
}

/* ============================================
   STATUS CHIPS - Refined
   ============================================ */
.status-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-chip.success {
    background: var(--status-success-muted);
    color: var(--status-success);
}

.status-chip.warning {
    background: var(--status-warning-muted);
    color: var(--status-warning);
}

.status-chip.error {
    background: var(--status-error-muted);
    color: var(--status-error);
}

.status-chip.info {
    background: var(--status-info-muted);
    color: var(--status-info);
}

.status-chip.default {
    background: var(--bg-muted);
    color: var(--text-secondary);
}

/* Status Dot */
.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.success {
    background: var(--status-success);
    box-shadow: 0 0 8px var(--status-success-glow);
}

.status-dot.warning {
    background: var(--status-warning);
    box-shadow: 0 0 8px var(--status-warning-glow);
}

.status-dot.error {
    background: var(--status-error);
    box-shadow: 0 0 8px var(--status-error-glow);
}

/* ============================================
   PROGRESS BARS - Premium Style
   ============================================ */
.progress-bar {
    height: 6px;
    background: var(--bg-muted);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width var(--duration-slow) var(--ease-out-expo);
    position: relative;
}

.progress-bar-fill.primary {
    background: linear-gradient(90deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
}

.progress-bar-fill.success {
    background: var(--status-success);
}

.progress-bar-fill.warning {
    background: var(--status-warning);
}

.progress-bar-fill.error {
    background: var(--status-error);
}

/* Large Progress with Label */
.progress-labeled {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.progress-labeled .progress-bar {
    flex: 1;
    height: 8px;
}

.progress-labeled .progress-value {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 48px;
    text-align: right;
}

/* ============================================
   TEAM MEMBER CARDS - Grid Layout
   ============================================ */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-4);
}

.team-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    transition: all var(--duration-normal) var(--ease-out-expo);
}

.team-card:hover {
    border-color: var(--border-default);
    box-shadow: var(--shadow-md);
}

.team-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.team-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--gradient-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
}

.team-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-info {
    flex: 1;
    min-width: 0;
}

.team-name {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-card-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: var(--space-4) 0;
}

.team-stats {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.team-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.team-stat-label {
    color: var(--text-secondary);
}

.team-stat-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* ============================================
   ALERTS LIST - Clean Design
   ============================================ */
.alert-list {
    display: flex;
    flex-direction: column;
}

.alert-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--duration-fast) var(--ease-in-out-quad);
}

.alert-item:last-child {
    border-bottom: none;
}

.alert-item:hover {
    background: var(--bg-surface-hover);
}

.alert-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.alert-icon.critical {
    background: var(--status-error-muted);
    color: var(--status-error);
}

.alert-icon.warning {
    background: var(--status-warning-muted);
    color: var(--status-warning);
}

.alert-icon.info {
    background: var(--status-info-muted);
    color: var(--status-info);
}

.alert-content {
    flex: 1;
    min-width: 0;
}

.alert-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.alert-message {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.alert-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ============================================
   TOGGLE BUTTONS - Refined
   ============================================ */
.toggle-group {
    display: inline-flex;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 2px;
}

.toggle-btn {
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-in-out-quad);
}

.toggle-btn:hover {
    color: var(--text-primary);
}

.toggle-btn.active {
    background: var(--bg-surface);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-12) var(--space-6);
    text-align: center;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-muted);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-4);
    color: var(--text-muted);
    font-size: 1.5rem;
}

.empty-state-title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.empty-state-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    max-width: 320px;
}

/* ============================================
   LOADING STATES
   ============================================ */
.loading-skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-muted) 25%,
        var(--bg-subtle) 50%,
        var(--bg-muted) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ============================================
   ANIMATIONS - Staggered Reveals
   ============================================ */
.animate-in {
    animation: fadeSlideIn var(--duration-slow) var(--ease-out-expo) forwards;
    opacity: 0;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered delays for children */
.stagger-children > *:nth-child(1) { animation-delay: 0ms; }
.stagger-children > *:nth-child(2) { animation-delay: 50ms; }
.stagger-children > *:nth-child(3) { animation-delay: 100ms; }
.stagger-children > *:nth-child(4) { animation-delay: 150ms; }
.stagger-children > *:nth-child(5) { animation-delay: 200ms; }
.stagger-children > *:nth-child(6) { animation-delay: 250ms; }
.stagger-children > *:nth-child(7) { animation-delay: 300ms; }
.stagger-children > *:nth-child(8) { animation-delay: 350ms; }

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .dashboard-page {
        padding: var(--space-4);
    }

    .kpi-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-3);
    }

    .kpi-value {
        font-size: 1.75rem;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .panel-header {
        padding: var(--space-4);
    }

    .panel-content {
        padding: var(--space-4);
    }
}

@media (max-width: 480px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-4);
    }
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-muted);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bg-subtle);
}

/* ============================================
   MUDBLAZOR OVERRIDES - Enterprise Theme
   ============================================ */
.mud-theme-dark {
    --mud-palette-background: var(--bg-base) !important;
    --mud-palette-surface: var(--bg-surface) !important;
    --mud-palette-appbar-background: var(--bg-elevated) !important;
    --mud-palette-drawer-background: var(--bg-elevated) !important;
    --mud-palette-primary: var(--accent-primary) !important;
    --mud-palette-secondary: var(--accent-secondary) !important;
    --mud-palette-success: var(--status-success) !important;
    --mud-palette-warning: var(--status-warning) !important;
    --mud-palette-error: var(--status-error) !important;
    --mud-palette-info: var(--status-info) !important;
    --mud-palette-text-primary: var(--text-primary) !important;
    --mud-palette-text-secondary: var(--text-secondary) !important;
}

/* Override MudPaper */
.mud-paper {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-subtle) !important;
}

/* Override MudTable */
.mud-table-root {
    background: transparent !important;
}

.mud-table-head .mud-table-cell {
    background: var(--bg-elevated) !important;
    color: var(--text-muted) !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    border-bottom: 1px solid var(--border-default) !important;
}

.mud-table-body .mud-table-row:hover {
    background: var(--bg-surface-hover) !important;
}

.mud-table-cell {
    border-bottom: 1px solid var(--border-subtle) !important;
}

/* Override MudChip */
.mud-chip {
    font-family: var(--font-body) !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em !important;
}

/* Override MudProgressLinear */
.mud-progress-linear {
    background: var(--bg-muted) !important;
    border-radius: var(--radius-full) !important;
}

.mud-progress-linear-bar {
    border-radius: var(--radius-full) !important;
}

/* Override MudCard */
.mud-card {
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-lg) !important;
}

/* Override MudNavMenu */
.mud-nav-link {
    border-radius: var(--radius-md) !important;
    margin: 2px 8px !important;
}

.mud-nav-link:hover {
    background: var(--bg-surface-hover) !important;
}

.mud-nav-link.active {
    background: var(--accent-primary-muted) !important;
    color: var(--accent-primary) !important;
}

/* Override MudAvatar */
.mud-avatar {
    border-radius: var(--radius-md) !important;
}

/* ============================================
   APP BAR & DRAWER LOGO STYLES
   ============================================ */

/* App Bar Customization */
.app-bar-custom {
    background: var(--bg-elevated) !important;
    border-bottom: 1px solid var(--border-subtle) !important;
}

.app-logo-container {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.app-logo-icon {
    height: 32px;
    width: auto;
    padding: 4px 8px;
    object-fit: contain;
    background: #ffffff;
    border-radius: var(--radius-sm);
}

.app-logo-text {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* Drawer Customization */
.drawer-custom {
    background: var(--bg-elevated) !important;
    border-right: 1px solid var(--border-subtle) !important;
}

.drawer-header-custom {
    padding: var(--space-4) var(--space-4) var(--space-3) !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    min-height: 64px !important;
    display: flex !important;
    align-items: center !important;
}

.drawer-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.drawer-logo {
    height: 36px;
    width: auto;
    max-width: 100%;
    padding: 6px 12px;
    object-fit: contain;
    background: #ffffff;
    border-radius: var(--radius-md);
}

/* Loading screen with logo */
#app .loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
}

#app .loading-progress circle {
    fill: none;
    stroke: var(--bg-subtle);
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

#app .loading-progress circle:last-child {
    stroke: var(--accent-primary);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

/* ============================================
   APP SHELL - Premium Navigation System
   ============================================ */
.app-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    grid-template-rows: 64px 1fr auto;
    grid-template-areas:
        "sidebar header"
        "sidebar main"
        "sidebar footer";
    min-height: 100vh;
    background: var(--bg-base);
    transition: grid-template-columns 0.35s var(--ease-out-expo);
}

.app-shell.sidebar-collapsed {
    grid-template-columns: 72px 1fr;
}

/* ============================================
   SIDEBAR - Executive Command Panel
   ============================================ */
.sidebar {
    grid-area: sidebar;
    background: var(--bg-elevated);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
    transition: all 0.35s var(--ease-out-expo);
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: radial-gradient(ellipse 100% 100% at 50% -50%, rgba(96, 165, 250, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

/* Sidebar Header */
.sidebar-header {
    padding: var(--space-4) var(--space-4) var(--space-3);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    min-height: 64px;
    position: relative;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    overflow: hidden;
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.sidebar-logo img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.sidebar-brand-text {
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.25s ease;
}

.sidebar-toggle {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--bg-surface);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.sidebar-toggle:hover {
    background: var(--bg-surface-hover);
    color: var(--text-secondary);
}

.sidebar-toggle-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.35s var(--ease-out-expo);
}

/* Collapsed State */
.sidebar.collapsed {
    width: 72px;
}

.sidebar.collapsed .sidebar-brand-text,
.sidebar.collapsed .nav-section-label,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .sidebar-user-info {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-toggle-icon {
    transform: rotate(180deg);
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: var(--space-3);
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: var(--space-3);
}

.sidebar.collapsed .sidebar-toggle {
    position: absolute;
    right: -16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md);
}

.sidebar.collapsed .sidebar-user {
    justify-content: center;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--space-3) var(--space-2);
}

.nav-section {
    margin-bottom: var(--space-4);
}

.nav-section-label {
    display: block;
    padding: var(--space-2) var(--space-3);
    font-family: var(--font-body);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    white-space: nowrap;
    transition: opacity 0.25s ease;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    margin-bottom: 2px;
}

.nav-item:hover {
    background: var(--bg-surface);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-primary-muted);
    color: var(--accent-primary);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--accent-primary);
    border-radius: 0 2px 2px 0;
}

.nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-icon svg {
    width: 100%;
    height: 100%;
}

.nav-label {
    flex: 1;
    white-space: nowrap;
    transition: opacity 0.25s ease;
}

.nav-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--status-error);
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    transition: opacity 0.25s ease;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: var(--space-4);
    border-top: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    transition: all 0.2s ease;
}

.sidebar-user:hover {
    background: var(--bg-surface-hover);
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.sidebar-user-info {
    overflow: hidden;
    transition: opacity 0.25s ease, width 0.25s ease;
}

.sidebar-user-name {
    display: block;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.sidebar-user-role {
    display: block;
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================
   HEADER - Command Bar
   ============================================ */
.header {
    grid-area: header;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-6);
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 90;
    gap: var(--space-4);
}

.header::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.2), transparent);
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.header-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.header-menu-btn:hover {
    background: var(--bg-surface);
    color: var(--text-primary);
}

.header-menu-btn svg {
    width: 20px;
    height: 20px;
}

.header-breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.breadcrumb-item {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.header-center {
    flex: 1;
    max-width: 480px;
}

.header-search {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-4);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
}

.header-search:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-primary-muted);
}

.header-search-icon {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.header-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--text-primary);
    outline: none;
}

.header-search-input::placeholder {
    color: var(--text-muted);
}

.header-search-shortcut {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    background: var(--bg-muted);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    position: relative;
}

.header-action-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-md);
    position: relative;
    transition: all 0.2s ease;
}

.header-action-btn:hover {
    background: var(--bg-surface);
    color: var(--text-primary);
}

.header-action-btn svg {
    width: 20px;
    height: 20px;
}

.header-action-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    background: var(--status-error);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    border: 2px solid var(--bg-elevated);
}

/* Notification Bell + Panel */
.notif-bell-wrapper {
    position: relative;
}

.header-action-btn.active {
    background: var(--bg-surface);
    color: var(--text-primary);
}

.header-action-badge.urgent {
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.notif-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: -8px;
    width: 380px;
    max-width: calc(100vw - 24px);
    max-height: 520px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: notif-slide-in 0.2s var(--ease-out-expo);
}

@keyframes notif-slide-in {
    from { opacity: 0; transform: translateY(-8px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.notif-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.notif-panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
}

.notif-panel-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--status-error);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: var(--radius-full);
}

.notif-panel-action {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-primary);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: background var(--duration-fast) ease;
}

.notif-panel-action:hover {
    background: rgba(96, 165, 250, 0.1);
}

.notif-panel-body {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--bg-surface) transparent;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background var(--duration-fast) ease;
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-item:hover {
    background: var(--bg-surface);
}

.notif-item.unread {
    background: rgba(96, 165, 250, 0.03);
}

.notif-item.unread:hover {
    background: rgba(96, 165, 250, 0.06);
}

.notif-severity-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.notif-severity-dot.critical { background: #f87171; }
.notif-severity-dot.warning { background: #fbbf24; }
.notif-severity-dot.info { background: #60a5fa; }

.notif-item-content {
    flex: 1;
    min-width: 0;
}

.notif-item-top {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
}

.notif-item-code {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--bg-surface);
    padding: 1px 5px;
    border-radius: 3px;
    flex-shrink: 0;
}

.notif-item-title {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-item.unread .notif-item-title {
    font-weight: 600;
}

.notif-item-bottom {
    display: flex;
    align-items: center;
    gap: 6px;
}

.notif-item-project {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.notif-item-time {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-left: auto;
}

.notif-unread-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-primary);
    flex-shrink: 0;
    margin-top: 6px;
}

.notif-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    color: var(--text-muted);
    gap: 8px;
}

.notif-empty span {
    font-size: 0.8125rem;
}

.notif-panel-footer {
    border-top: 1px solid var(--border-subtle);
    padding: 10px 16px;
}

.notif-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--accent-primary);
    text-decoration: none;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: background var(--duration-fast) ease;
}

.notif-view-all:hover {
    background: rgba(96, 165, 250, 0.08);
}

.notif-panel-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
}

.header-divider {
    width: 1px;
    height: 24px;
    background: var(--border-default);
}

.header-user {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.header-user:hover {
    background: var(--bg-surface);
}

.header-user-avatar {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: 0.8125rem;
    font-weight: 700;
    color: white;
}

.header-user-name {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-user-chevron {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.header-user-chevron.open {
    transform: rotate(180deg);
}

/* User Dropdown Menu */
.header-user-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 260px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 200;
    animation: dropdownSlideIn 0.2s var(--ease-out-expo);
    overflow: hidden;
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-user-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 199;
}

.user-menu-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--bg-elevated);
}

.user-menu-avatar {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: white;
}

.user-menu-info {
    overflow: hidden;
}

.user-menu-name {
    display: block;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-menu-role {
    display: block;
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.user-menu-divider {
    height: 1px;
    background: var(--border-subtle);
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    border: none;
    background: transparent;
    width: 100%;
    cursor: pointer;
    transition: all 0.15s ease;
}

.user-menu-item:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

.user-menu-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.user-menu-item.logout {
    color: var(--status-error);
}

.user-menu-item.logout:hover {
    background: var(--status-error-muted);
}

.user-menu-badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    background: var(--status-error);
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: var(--radius-full);
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
.main-content {
    grid-area: main;
    overflow-y: auto;
    background: var(--bg-base);
}

.main-content-unauthorized {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-base);
}

/* ============================================
   FOOTER - Status Bar
   ============================================ */
.footer {
    grid-area: footer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-6);
    background: var(--bg-elevated);
    border-top: 1px solid var(--border-subtle);
    min-height: 44px;
}

.footer-left,
.footer-right {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.footer-center {
    display: flex;
    align-items: center;
}

.footer-copyright {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer-divider {
    color: var(--text-disabled);
}

.footer-version {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--text-muted);
    padding: 2px 6px;
    background: var(--bg-surface);
    border-radius: var(--radius-sm);
}

.footer-status {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.footer-status-indicator {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    animation: pulse 2s ease-in-out infinite;
}

.footer-status-indicator.online {
    background: var(--status-success);
    box-shadow: 0 0 8px var(--status-success-glow);
}

.footer-status-indicator.syncing {
    background: var(--status-warning);
    box-shadow: 0 0 8px var(--status-warning-glow);
    animation: pulse 0.8s ease-in-out infinite;
}

.footer-status-indicator.offline {
    background: var(--status-error);
    box-shadow: 0 0 8px var(--status-error-glow);
    animation: none;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.footer-status-text {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer-link {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.footer-link:hover {
    background: var(--bg-surface);
    color: var(--text-secondary);
}

.footer-link svg {
    width: 14px;
    height: 14px;
}

/* ============================================
   APP LOADING STATE
   ============================================ */
.app-loading {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-base);
    z-index: 1000;
}

.app-loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-6);
}

.app-loading-logo {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.app-loading-logo img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.app-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--bg-muted);
    border-top-color: var(--accent-primary);
    border-radius: var(--radius-full);
    animation: spin 0.8s linear infinite;
}

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

.app-loading-text {
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ============================================
   RESPONSIVE NAVIGATION
   ============================================ */
@media (max-width: 1024px) {
    .app-shell {
        grid-template-columns: 1fr;
        grid-template-areas:
            "header"
            "main"
            "footer";
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
        z-index: 200;
        box-shadow: var(--shadow-xl);
    }

    .sidebar:not(.collapsed) {
        transform: translateX(0);
    }

    .app-shell.sidebar-collapsed .sidebar {
        transform: translateX(-100%);
    }

    .header-menu-btn {
        display: flex;
    }

    .header-center {
        display: none;
    }

    .header-user-name {
        display: none;
    }

    .footer-center {
        display: none;
    }
}

@media (max-width: 640px) {
    .header {
        padding: 0 var(--space-4);
    }

    .footer {
        padding: var(--space-2) var(--space-4);
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-2);
    }

    .footer-left,
    .footer-right {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   BACKEND OFFLINE OVERLAY
   ============================================ */
.backend-offline-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 13, 18, 0.95);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.backend-offline-modal {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.backend-offline-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-4);
    background: rgba(248, 113, 113, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--status-error);
    animation: pulse 2s ease-in-out infinite;
}

.backend-offline-icon svg {
    width: 40px;
    height: 40px;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.95);
    }
}

.backend-offline-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--space-3);
}

.backend-offline-message {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin: 0 0 var(--space-6);
    line-height: 1.6;
}

.backend-offline-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: var(--space-4);
}

.backend-offline-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-subtle);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.backend-offline-hint {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0 0 var(--space-4);
    font-style: italic;
}

.backend-offline-retry {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    background: var(--accent-primary);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.backend-offline-retry:hover {
    background: var(--accent-primary-hover, #3b82f6);
    transform: translateY(-1px);
}

.backend-offline-retry:active {
    transform: translateY(0);
}

/* ============================================
   PROJECT ITEMS - Dashboard Section
   ============================================ */
.dashboard-section {
    margin-top: var(--space-8);
}

.section-title {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--border-subtle);
}

.project-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding: var(--space-4);
    border-bottom: 1px solid var(--border-subtle);
    text-decoration: none;
    color: inherit;
    transition: all var(--duration-fast) var(--ease-out-expo);
}

.project-item:last-child {
    border-bottom: none;
}

.project-item:hover {
    background: var(--bg-surface-hover);
}

.project-item-main {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.project-abbr {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 28px;
    padding: 0 var(--space-2);
    background: var(--accent-primary-muted);
    color: var(--accent-primary);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    letter-spacing: 0.025em;
}

.project-name {
    flex: 1;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-item-stats {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-left: 0;
}

.project-item-stats .stat {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.project-item-stats .stat .mud-icon-root {
    font-size: 0.875rem !important;
}

.project-item-stats .stat.highlight {
    color: var(--accent-primary);
    font-weight: 500;
}

/* Projects Stack Layout */
.projects-stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.view-all-link {
    font-size: 0.8125rem;
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--space-1);
    transition: color var(--duration-fast) ease;
}

.view-all-link:hover {
    color: var(--accent-primary-hover, #93c5fd);
    text-decoration: underline;
}

/* Panel Title Badges for Project Sections */
.panel-title-badge.error {
    background: var(--status-error-muted);
    color: var(--status-error);
}

/* Project link styles */
.project-link {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
    color: inherit;
    flex: 1;
    min-width: 0;
}

.project-link:hover .project-name {
    color: var(--accent-primary);
}

/* Azure DevOps link styles */
.azure-links {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    margin-left: auto;
}

.azure-devops-btn {
    color: var(--text-muted) !important;
    transition: color var(--duration-fast) ease, background var(--duration-fast) ease !important;
}

.azure-devops-btn:hover {
    color: var(--accent-primary) !important;
    background: var(--accent-primary-muted) !important;
}

.azure-link {
    text-decoration: none;
    color: var(--text-muted);
    transition: color var(--duration-fast) ease;
}

.azure-link:hover {
    color: var(--accent-primary);
}

.azure-link:hover .cell-mono {
    color: var(--accent-primary);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .project-item-main {
        flex-direction: column;
        align-items: flex-start;
    }

    .project-item-stats {
        margin-top: var(--space-2);
    }

    .azure-links {
        margin-left: 0;
        margin-top: var(--space-2);
    }
}

/* ============================================
   COMPREHENSIVE RESPONSIVE OVERRIDES
   Covers global patterns, MudBlazor tables,
   dashboard grids, and page-level fixes
   ============================================ */

/* ---- Mobile sidebar backdrop ---- */
.sidebar-backdrop {
    display: none;
}

@media (max-width: 1024px) {
    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(2px);
        z-index: 199;
        animation: fadeIn 0.2s ease;
    }

    /* Sidebar open state on mobile — non-collapsed means open */
    .sidebar:not(.collapsed) {
        width: 280px;
    }

    /* Fix user menu position for mobile */
    .header-user-menu {
        right: -8px;
        width: 240px;
        max-width: calc(100vw - 24px);
    }

    /* Notification panel — ensure it doesn't overflow */
    .notif-panel {
        right: -60px;
        width: 340px;
    }

    /* Make MudBlazor tables horizontally scrollable */
    .mud-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Global page content — reduce padding */
    .main-content {
        padding: 0;
    }

    /* KPI grids — 2 columns */
    .kpi-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: var(--space-3);
    }

    /* All MudGrid items — force full width on critical columns */
    .mud-grid-item.mud-grid-item-xs-12 {
        max-width: 100%;
        flex-basis: 100%;
    }
}

@media (max-width: 768px) {
    /* Notification panel — full width on small tablets */
    .notif-panel {
        position: fixed;
        top: 64px;
        left: 8px;
        right: 8px;
        width: auto;
        max-width: none;
        max-height: calc(100vh - 80px);
        border-radius: var(--radius-lg);
    }

    /* Header — tighter layout */
    .header {
        gap: var(--space-2);
    }

    .header-left {
        min-width: 0;
        flex: 1;
    }

    .breadcrumb-item {
        font-size: 0.9375rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 160px;
    }

    .header-right {
        gap: var(--space-2);
    }

    .header-divider {
        display: none;
    }

    .header-user-chevron {
        display: none;
    }

    /* KPI grids — still 2 columns but tighter */
    .kpi-grid {
        gap: var(--space-2) !important;
    }

    .kpi-value {
        font-size: 1.5rem !important;
    }

    .kpi-label {
        font-size: 0.6875rem !important;
    }

    /* Panel cards — reduce padding */
    .panel,
    .panel-header,
    .panel-content,
    [class*="stat-block"],
    [class*="card-body"] {
        padding: var(--space-3) !important;
    }

    /* MudBlazor table cells — tighter */
    .mud-table-cell {
        padding: 8px 10px !important;
        font-size: 0.8125rem !important;
    }

    .mud-table-head .mud-table-cell {
        padding: 8px 10px !important;
        font-size: 0.6875rem !important;
    }

    /* MudBlazor dialog — full-width on mobile */
    .mud-dialog {
        margin: 8px !important;
        max-height: calc(100vh - 16px) !important;
    }

    .mud-dialog .mud-dialog-content {
        padding: var(--space-4) !important;
    }

    /* Global page containers */
    .dashboard-page,
    [class*="-page"],
    [class*="-command-center"] {
        padding: var(--space-3) !important;
    }

    /* Grid-based page layouts — collapse to single column */
    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }

    /* MudBlazor select — ensure dropdowns don't overflow */
    .mud-popover {
        max-width: calc(100vw - 16px) !important;
    }
}

@media (max-width: 480px) {
    /* KPI grids — single column */
    .kpi-grid {
        grid-template-columns: 1fr !important;
    }

    /* Header — minimal */
    .header {
        padding: 0 var(--space-3) !important;
        height: 56px;
    }

    .breadcrumb-item {
        font-size: 0.875rem;
        max-width: 120px;
    }

    /* Page headers — stack vertically */
    .dashboard-header,
    [class*="-header"]:not(.header):not(.sidebar-header):not(.panel-header):not(.notif-panel-header) {
        flex-direction: column;
        align-items: flex-start !important;
        gap: var(--space-2);
    }

    /* Tables — make scrollable with shadow hint */
    .mud-table-container {
        position: relative;
    }

    .mud-table-container::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 24px;
        background: linear-gradient(to right, transparent, rgba(10, 13, 18, 0.5));
        pointer-events: none;
        z-index: 1;
        opacity: 0;
        transition: opacity 0.2s;
    }

    .mud-table-container:not(:has(::-webkit-scrollbar-thumb:active))::after {
        opacity: 1;
    }

    /* MudBlazor pagination — compact */
    .mud-table-pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
        padding: var(--space-2) !important;
    }

    .mud-table-pagination .mud-table-pagination-actions {
        margin-left: 0 !important;
    }

    /* Footer — very compact */
    .footer {
        padding: var(--space-2) var(--space-3) !important;
        font-size: 0.6875rem;
    }

    .footer-divider,
    .footer-version {
        display: none;
    }

    /* Backend offline modal — smaller */
    .backend-offline-modal {
        padding: var(--space-6) !important;
    }
}

/* ---- Landscape phones ---- */
@media (max-height: 500px) and (orientation: landscape) {
    .header {
        height: 48px;
    }

    .app-shell {
        grid-template-rows: 48px 1fr auto;
    }

    .sidebar-header {
        min-height: 48px;
    }

    .notif-panel {
        max-height: 280px;
    }

    .backend-offline-overlay {
        align-items: flex-start;
        padding-top: var(--space-4);
    }
}

/* ============================================
   PER-PAGE RESPONSIVE FIXES
   Dashboard pages, tables, drawers, forms
   ============================================ */

@media (max-width: 1024px) {
    /* Dashboard actions — allow wrapping */
    .dashboard-actions {
        flex-wrap: wrap;
        gap: 8px;
    }

    /* MudBlazor drawer — limit width on tablet */
    .mud-drawer--right.mud-drawer--open {
        max-width: 100vw;
    }

    /* Workload drawer — constrain to viewport */
    .workload-drawer .mud-drawer-content {
        max-width: 100vw !important;
    }

    /* Table containers — ensure horizontal scroll */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Data tables — set minimum width so columns don't crush */
    .data-table {
        min-width: 600px;
    }

    /* Search inputs — fluid width */
    .search-input {
        width: 100% !important;
        max-width: 260px;
    }

    /* MudSelect in panel headers — fluid */
    .panel-header .mud-input-control {
        max-width: 200px;
    }
}

@media (max-width: 768px) {
    /* Dashboard header — stack title and actions */
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: var(--space-3);
    }

    .dashboard-actions {
        width: 100%;
    }

    /* Dashboard title — smaller */
    .dashboard-title {
        font-size: 1.25rem !important;
    }

    .dashboard-subtitle {
        font-size: 0.75rem;
    }

    /* Dashboard grid — single column */
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: var(--space-3) !important;
    }

    /* Panel headers — allow wrapping */
    .panel-header {
        flex-wrap: wrap;
        gap: var(--space-2);
    }

    /* MudDrawer — full width on mobile */
    .mud-drawer--right.mud-drawer--open .mud-drawer-content {
        width: 100vw !important;
        max-width: 100vw !important;
    }

    /* Drawer stats grid — single column on small screens */
    .drawer-stats {
        grid-template-columns: 1fr 1fr;
    }

    /* Toggle group buttons — compact */
    .toggle-group {
        gap: 2px;
    }

    /* Alert items in dashboards — stack on mobile */
    .alert-item {
        flex-wrap: wrap;
    }

    .alert-time {
        margin-left: auto;
        font-size: 0.6875rem;
    }

    /* Quick actions grid — 2 per row on tablet */
    .quick-actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: var(--space-2) !important;
    }

    /* Azure DevOps links row — wrap */
    .azure-links {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        margin-right: 0 !important;
    }

    /* Team grid — 2 columns */
    .team-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
        gap: var(--space-3) !important;
    }

    /* Budget progress header — stack */
    .budget-progress-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    /* Metric rows — tighter */
    .metric-row {
        padding: var(--space-2) var(--space-3);
        font-size: 0.8125rem;
    }

    /* Employee cells — compact */
    .employee-cell {
        gap: var(--space-2);
    }

    .employee-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.6875rem;
    }

    /* Project detail header items */
    .project-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        border-radius: 10px;
    }

    /* Member cells — compact */
    .member-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.625rem;
    }

    /* Progress labeled — stack */
    .progress-labeled {
        flex-direction: column;
        gap: var(--space-2);
    }

    /* Search input wrapper — full width */
    .search-input-wrapper {
        width: 100%;
    }

    .search-input {
        max-width: none !important;
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    /* Dashboard title even smaller */
    .dashboard-title {
        font-size: 1.125rem !important;
    }

    .dashboard-title-icon {
        width: 36px;
        height: 36px;
    }

    /* Quick actions — single column */
    .quick-actions {
        grid-template-columns: 1fr !important;
    }

    /* Team grid — single column */
    .team-grid {
        grid-template-columns: 1fr !important;
    }

    /* Team avatar — smaller */
    .team-avatar-large {
        width: 44px;
        height: 44px;
        border-radius: 10px;
        font-size: 1rem;
    }

    /* Drawer — compact spacing */
    .drawer-header {
        padding: var(--space-4);
    }

    .drawer-section {
        padding: var(--space-3) var(--space-4);
    }

    .drawer-avatar {
        width: 48px;
        height: 48px;
        font-size: 1.125rem;
    }

    .drawer-stat-value {
        font-size: 1.25rem;
    }

    .drawer-actions {
        padding: var(--space-4);
    }

    /* Data tables — tighter */
    .data-table th,
    .data-table td {
        padding: 8px 6px !important;
        font-size: 0.75rem;
    }

    .data-table {
        min-width: 500px;
    }

    /* MudBlazor tables — fixed widths become min-widths */
    .mud-table .mud-table-head .mud-table-cell[style*="width:"] {
        min-width: unset !important;
    }

    /* Inline flex items in tables — tighter */
    .progress-bar {
        min-width: 40px;
    }

    /* Status chip — smaller */
    .status-chip {
        font-size: 0.6875rem !important;
        padding: 2px 6px !important;
    }

    /* Currency/date cells — hide on very small screens */
    .date-end {
        display: none;
    }

    /* Employee email in table — truncate */
    .employee-email,
    .member-email {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* KPI trend text — smaller */
    .kpi-trend {
        font-size: 0.625rem !important;
    }

    /* Distribution items */
    .distribution-header {
        font-size: 0.8125rem;
    }

    /* Project description */
    .project-description {
        font-size: 0.8125rem;
        padding: var(--space-3);
    }

    /* Alert cards — tighter */
    .alert-item {
        padding: var(--space-2);
        gap: var(--space-2);
    }

    .alert-icon {
        width: 28px;
        height: 28px;
    }

    .alert-title {
        font-size: 0.8125rem;
    }

    .alert-message {
        font-size: 0.75rem;
    }
}

/* ---- Touch device optimizations ---- */
@media (hover: none) and (pointer: coarse) {
    /* Ensure touch targets are at least 44px */
    .nav-item {
        min-height: 44px;
    }

    .header-action-btn {
        min-width: 44px;
        min-height: 44px;
    }

    .sidebar-toggle {
        min-width: 44px;
        min-height: 44px;
    }

    /* Remove hover-dependent interactions */
    .nav-item:hover,
    .header-action-btn:hover {
        background: transparent;
    }

    .nav-item:active {
        background: var(--bg-surface);
    }

    .header-action-btn:active {
        background: var(--bg-surface);
    }

    /* Scroll momentum */
    .sidebar-nav,
    .notif-panel-body,
    .mud-table-container {
        -webkit-overflow-scrolling: touch;
    }
}
