/* ============================================
   BRAIN SUPPORT — NEON HIGH-CONTRAST THEME
   ============================================ */

:root {
    --neon-cyan: #00E5FF;
    --neon-magenta: #FF00E5;
    --neon-lime: #76FF03;
    --neon-amber: #FFD600;
    --neon-red: #FF1744;
    --neon-blue: #2979FF;
    --bg-deep: #0A0A0F;
    --bg-surface: #12121A;
    --bg-card: #1A1A2E;
    --bg-appbar: #0D0D14;
    --glow-sm: 0 0 8px;
    --glow-md: 0 0 16px;
    --glow-lg: 0 0 30px;
}

/* ---- Global ---- */

body {
    font-family: 'Inter', 'Roboto', sans-serif !important;
    background: var(--bg-deep) !important;
}

/* ---- AppBar ---- */

.mud-appbar {
    background: var(--bg-appbar) !important;
    border-bottom: 1px solid rgba(0, 229, 255, 0.3) !important;
    box-shadow: var(--glow-sm) rgba(0, 229, 255, 0.15) !important;
    backdrop-filter: blur(12px);
}

/* ---- Drawer / Sidebar ---- */

.mud-drawer {
    background: var(--bg-surface) !important;
    border-right: 1px solid rgba(0, 229, 255, 0.15) !important;
}

.mud-nav-link {
    border-radius: 8px !important;
    margin: 2px 8px !important;
    transition: all 0.2s ease !important;
}

.mud-nav-link:hover {
    background: rgba(0, 229, 255, 0.08) !important;
}

.mud-nav-link.active {
    background: rgba(0, 229, 255, 0.12) !important;
    color: var(--neon-cyan) !important;
    box-shadow: inset 3px 0 0 var(--neon-cyan);
}

.mud-nav-link.active .mud-icon-root {
    color: var(--neon-cyan) !important;
}

/* ---- Cards ---- */

.mud-card {
    background: var(--bg-card) !important;
    border: 1px solid rgba(0, 229, 255, 0.1) !important;
    border-radius: 12px !important;
    transition: all 0.3s ease !important;
}

.mud-card:hover {
    border-color: rgba(0, 229, 255, 0.3) !important;
    box-shadow: var(--glow-sm) rgba(0, 229, 255, 0.1) !important;
}

/* ---- Tables ---- */

.mud-table {
    background: var(--bg-card) !important;
    border: 1px solid rgba(0, 229, 255, 0.1) !important;
    border-radius: 12px !important;
    overflow: hidden;
}

.mud-table .mud-table-head .mud-table-row th {
    background: rgba(0, 229, 255, 0.05) !important;
    color: var(--neon-cyan) !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-size: 0.75rem !important;
    letter-spacing: 0.05em !important;
    border-bottom: 1px solid rgba(0, 229, 255, 0.15) !important;
}

.mud-table .mud-table-body .mud-table-row:hover {
    background: rgba(0, 229, 255, 0.04) !important;
}

.mud-table .mud-table-body .mud-table-row td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
}

.mud-table-toolbar {
    background: transparent !important;
}

.mud-table-pagination {
    border-top: 1px solid rgba(0, 229, 255, 0.1) !important;
}

/* ---- Buttons ---- */

.mud-button-filled.mud-button-primary {
    background: var(--neon-cyan) !important;
    color: #000 !important;
    font-weight: 600 !important;
    box-shadow: var(--glow-sm) rgba(0, 229, 255, 0.3) !important;
    transition: all 0.2s ease !important;
}

.mud-button-filled.mud-button-primary:hover {
    box-shadow: var(--glow-md) rgba(0, 229, 255, 0.5) !important;
    filter: brightness(1.1);
}

.mud-button-filled.mud-button-secondary {
    background: var(--neon-magenta) !important;
    color: #fff !important;
    box-shadow: var(--glow-sm) rgba(255, 0, 229, 0.3) !important;
}

.mud-button-filled.mud-button-secondary:hover {
    box-shadow: var(--glow-md) rgba(255, 0, 229, 0.5) !important;
}

.mud-button-filled.mud-button-warning {
    background: var(--neon-amber) !important;
    color: #000 !important;
    box-shadow: var(--glow-sm) rgba(255, 214, 0, 0.3) !important;
}

.mud-button-filled.mud-button-error {
    background: var(--neon-red) !important;
    box-shadow: var(--glow-sm) rgba(255, 23, 68, 0.3) !important;
}

/* ---- Chips ---- */

.mud-chip {
    font-weight: 600 !important;
    letter-spacing: 0.02em !important;
}

.mud-chip.mud-chip-color-success {
    background: rgba(118, 255, 3, 0.15) !important;
    color: var(--neon-lime) !important;
    border: 1px solid rgba(118, 255, 3, 0.3) !important;
}

.mud-chip.mud-chip-color-default {
    background: rgba(255, 255, 255, 0.06) !important;
    color: rgba(255, 255, 255, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.mud-chip.mud-chip-color-error {
    background: rgba(255, 23, 68, 0.15) !important;
    color: var(--neon-red) !important;
    border: 1px solid rgba(255, 23, 68, 0.3) !important;
}

.mud-chip.mud-chip-color-primary {
    background: rgba(0, 229, 255, 0.15) !important;
    color: var(--neon-cyan) !important;
    border: 1px solid rgba(0, 229, 255, 0.3) !important;
}

.mud-chip.mud-chip-color-secondary {
    background: rgba(255, 0, 229, 0.15) !important;
    color: var(--neon-magenta) !important;
    border: 1px solid rgba(255, 0, 229, 0.3) !important;
}

.mud-chip.mud-chip-color-tertiary {
    background: rgba(41, 121, 255, 0.15) !important;
    color: var(--neon-blue) !important;
    border: 1px solid rgba(41, 121, 255, 0.3) !important;
}

.mud-chip.mud-chip-color-warning {
    background: rgba(255, 214, 0, 0.15) !important;
    color: var(--neon-amber) !important;
    border: 1px solid rgba(255, 214, 0, 0.3) !important;
}

/* ---- Text Inputs ---- */

.mud-input-outlined .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.15) !important;
    transition: all 0.2s ease !important;
}

.mud-input-outlined:hover .mud-input-outlined-border {
    border-color: rgba(0, 229, 255, 0.4) !important;
}

.mud-input-outlined.mud-input-focused .mud-input-outlined-border {
    border-color: var(--neon-cyan) !important;
    box-shadow: var(--glow-sm) rgba(0, 229, 255, 0.2) !important;
}

.mud-input-label {
    color: rgba(255, 255, 255, 0.5) !important;
}

.mud-input-label-inputcontrol.mud-input-label-focused {
    color: var(--neon-cyan) !important;
}

/* ---- Dialogs ---- */

.mud-dialog {
    background: var(--bg-card) !important;
    border: 1px solid rgba(0, 229, 255, 0.2) !important;
    border-radius: 16px !important;
    box-shadow: var(--glow-lg) rgba(0, 229, 255, 0.1),
                0 25px 50px rgba(0, 0, 0, 0.5) !important;
}

.mud-dialog-title {
    color: var(--neon-cyan) !important;
    font-weight: 600 !important;
}

.mud-overlay {
    backdrop-filter: blur(4px) !important;
}

/* ---- Avatars (Dashboard) ---- */

.mud-avatar.mud-avatar-color-primary {
    background: rgba(0, 229, 255, 0.15) !important;
    color: var(--neon-cyan) !important;
    box-shadow: var(--glow-sm) rgba(0, 229, 255, 0.2) !important;
}

.mud-avatar.mud-avatar-color-secondary {
    background: rgba(255, 0, 229, 0.15) !important;
    color: var(--neon-magenta) !important;
    box-shadow: var(--glow-sm) rgba(255, 0, 229, 0.2) !important;
}

.mud-avatar.mud-avatar-color-tertiary {
    background: rgba(41, 121, 255, 0.15) !important;
    color: var(--neon-blue) !important;
    box-shadow: var(--glow-sm) rgba(41, 121, 255, 0.2) !important;
}

/* ---- Alerts ---- */

.mud-alert-filled-error {
    background: rgba(255, 23, 68, 0.15) !important;
    color: var(--neon-red) !important;
    border: 1px solid rgba(255, 23, 68, 0.3) !important;
}

.mud-alert-filled-success {
    background: rgba(118, 255, 3, 0.15) !important;
    color: var(--neon-lime) !important;
    border: 1px solid rgba(118, 255, 3, 0.3) !important;
}

/* ---- Snackbar ---- */

.mud-snackbar {
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(12px) !important;
}

/* ---- Progress indicators ---- */

.mud-progress-linear .mud-progress-linear-bar {
    background: var(--neon-cyan) !important;
    box-shadow: var(--glow-sm) rgba(0, 229, 255, 0.5) !important;
}

.mud-progress-circular svg circle:last-child {
    stroke: var(--neon-cyan) !important;
    filter: drop-shadow(var(--glow-sm) rgba(0, 229, 255, 0.5));
}

/* ---- Scrollbar ---- */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(0, 229, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 229, 255, 0.4);
}

/* ---- Selection ---- */

::selection {
    background: rgba(0, 229, 255, 0.3);
    color: #fff;
}

/* ---- Switch ---- */

.mud-switch-track {
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* ---- Tooltip ---- */

.mud-tooltip {
    background: var(--bg-card) !important;
    border: 1px solid rgba(0, 229, 255, 0.2) !important;
    color: #fff !important;
    border-radius: 8px !important;
}

/* ---- Login page neon glow card ---- */

.neon-login-card {
    background: var(--bg-card) !important;
    border: 1px solid rgba(0, 229, 255, 0.3) !important;
    border-radius: 20px !important;
    box-shadow: var(--glow-lg) rgba(0, 229, 255, 0.08),
                0 0 60px rgba(255, 0, 229, 0.05),
                0 25px 50px rgba(0, 0, 0, 0.5) !important;
}

.neon-title {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-magenta));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700 !important;
}

.neon-subtitle {
    color: rgba(255, 255, 255, 0.4) !important;
}

.neon-icon {
    color: var(--neon-cyan) !important;
    filter: drop-shadow(var(--glow-sm) rgba(0, 229, 255, 0.5));
}

/* ---- Page title glow ---- */

.mud-typography-h4 {
    color: #fff !important;
    text-shadow: 0 0 20px rgba(0, 229, 255, 0.15);
}

/* ---- Icon buttons in AppBar ---- */

.mud-appbar .mud-icon-button {
    transition: all 0.2s ease !important;
}

.mud-appbar .mud-icon-button:hover {
    background: rgba(0, 229, 255, 0.1) !important;
}

/* ---- Select / Dropdown ---- */

.mud-popover {
    background: var(--bg-card) !important;
    border: 1px solid rgba(0, 229, 255, 0.15) !important;
    border-radius: 12px !important;
    box-shadow: var(--glow-md) rgba(0, 229, 255, 0.08),
                0 15px 35px rgba(0, 0, 0, 0.5) !important;
}

.mud-list-item:hover {
    background: rgba(0, 229, 255, 0.06) !important;
}

/* ---- Welcome Banner (Dashboard) ---- */

.welcome-banner {
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.06) 0%, rgba(255, 0, 229, 0.04) 100%) !important;
    border: 1px solid rgba(0, 229, 255, 0.15) !important;
    border-radius: 16px !important;
}

/* ---- Stat Cards (Dashboard) ---- */

.stat-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease !important;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-cyan), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 229, 255, 0.25) !important;
}

/* ---- Quick Action Cards ---- */

.quick-action-card {
    transition: all 0.2s ease !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.quick-action-card:hover {
    border-color: rgba(0, 229, 255, 0.2) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}

/* ---- Escalation Panel (Dashboard) ---- */

.escalation-panel {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
}

.escalation-panel-glow {
    position: absolute;
    inset: -4px;
    border-radius: 20px;
    background: radial-gradient(ellipse at 50% 50%, rgba(255, 23, 68, 0.45) 0%, rgba(255, 80, 100, 0.2) 40%, transparent 75%);
    animation: escalation-pulse 2s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
    filter: blur(12px);
}

.escalation-panel-content {
    position: relative;
    z-index: 1;
    padding: 20px 24px;
    background: rgba(255, 23, 68, 0.04);
    border: 1px solid rgba(255, 23, 68, 0.25);
    border-radius: 16px;
    backdrop-filter: blur(8px);
}

@keyframes escalation-pulse {
    0%, 100% {
        opacity: 0.35;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.01);
    }
}

.escalation-card {
    background: rgba(255, 23, 68, 0.06) !important;
    border: 1px solid rgba(255, 23, 68, 0.15) !important;
    border-radius: 12px !important;
    transition: all 0.2s ease !important;
}

.escalation-card:hover {
    border-color: rgba(255, 23, 68, 0.4) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 23, 68, 0.15) !important;
    background: rgba(255, 23, 68, 0.1) !important;
}

/* ---- Empty States ---- */

.mud-table .mud-table-body td[colspan] {
    border-bottom: none !important;
}

/* ---- Page Dividers ---- */

.mud-divider {
    border-color: rgba(0, 229, 255, 0.08) !important;
}

/* ---- MessageBox (Confirm dialogs) ---- */

.mud-message-box .mud-dialog-title {
    color: var(--neon-amber) !important;
}
