/* static/style.css - Premium Minimalist Dashboard Design System v2.0.0 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #05050a;
    --card-bg: rgba(13, 13, 21, 0.55);
    --card-border: rgba(255, 255, 255, 0.07);
    --card-border-hover: rgba(var(--accent-rgb), 0.3);
    
    --accent: #ffffff;
    --accent-rgb: 255, 255, 255;
    --accent-gradient: linear-gradient(135deg, #ffffff 0%, #a8a8b2 100%);
    --accent-glow: rgba(255, 255, 255, 0.15);
    --accent-text: #000000;
    
    --success: #10b981;
    --danger: #ff3333;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    --text-main: #f3f4f6;
    --text-muted: #8e9297;
    --text-dark: #4f545c;
    
    --sidebar-bg: rgba(4, 4, 8, 0.75);
    --sidebar-w: 260px;
    --header-h: 70px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    /* Form input deep dark */
    --input-bg: #08080f;
    --input-border: rgba(255,255,255,0.08);
    --input-border-focus: var(--accent);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* =========================================
   TOP SCROLL PROGRESS BAR
   ========================================= */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--accent-gradient);
    z-index: 9999;
    width: 0%;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 12px var(--accent-glow);
    pointer-events: none;
}

/* =========================================
   ANIMATIONS DISABLED MODE
   ========================================= */
body.animations-disabled *,
body.animations-disabled *::before,
body.animations-disabled *::after {
    animation: none !important;
    transition: none !important;
}

body.animations-disabled #bg-canvas {
    display: none !important;
}

/* =========================================
   DYNAMIC WALLPAPER BACKGROUND & CANVAS
   ========================================= */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
    transition: opacity 0.6s ease;
}

.bg-wallpaper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), background-image 0.5s ease-in-out;
    pointer-events: none;
}

.bg-wallpaper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 30%, rgba(5, 5, 12, 0.35) 0%, rgba(5, 5, 12, 0.7) 100%);
    pointer-events: none;
}

body.bg-enabled .bg-wallpaper {
    opacity: 0.88;
}

/* =========================================
   BACKGROUND GLOWS (Reduced Subtle Mouse Glow)
   ========================================= */
.bg-glow {
    position: fixed;
    top: -20%;
    left: -10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.035) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}
.bg-glow-right {
    position: fixed;
    bottom: -10%;
    right: -10%;
    width: 45%;
    height: 45%;
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.025) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

/* =========================================
   SCROLLBAR
   ========================================= */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 4px; border: 1px solid rgba(255,255,255,0.05); }
::-webkit-scrollbar-thumb:hover { background: rgba(var(--accent-rgb), 0.5); box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.4); }

/* =========================================
   APP SHELL
   ========================================= */
.app-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 3;
}

/* =========================================
   SIDEBAR
   ========================================= */
.sidebar {
    width: var(--sidebar-w);
    background-color: var(--sidebar-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-right: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 10;
}

.sidebar-logo {
    height: var(--header-h);
    display: flex;
    align-items: center;
    padding: 0 24px;
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    border-bottom: 1px solid var(--card-border);
}

.sidebar-menu {
    flex: 1;
    padding: 20px 12px;
    list-style: none;
    overflow-y: auto;
}

.menu-item {
    margin-bottom: 4px;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 500;
    transition: var(--transition);
}

.menu-link i {
    margin-right: 12px;
    font-size: 16px;
    width: 18px;
    text-align: center;
}

.menu-link:hover {
    color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.04);
}

/* Active link — use dynamic CSS vars properly */
.menu-link.active {
    background: var(--accent-gradient) !important;
    box-shadow: 0 4px 18px var(--accent-glow) !important;
    color: var(--accent-text) !important;
}

.menu-link.active i {
    color: var(--accent-text) !important;
}

/* Section separator label in sidebar */
.menu-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-dark);
    padding: 12px 14px 6px 14px;
}

.sidebar-profile {
    padding: 14px 16px;
    border-top: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid rgba(var(--accent-rgb), 0.4);
    flex-shrink: 0;
}

.profile-info {
    flex: 1;
    overflow: hidden;
}

.profile-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-main);
}

.profile-role {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 1px;
}

.logout-btn {
    color: var(--text-muted);
    transition: var(--transition);
    padding: 7px;
    border-radius: 8px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-btn:hover {
    color: var(--danger);
    background-color: rgba(239, 68, 68, 0.1);
}

/* =========================================
   MAIN CONTENT & PAGE FADE IN
   ========================================= */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-w);
    padding: 40px;
    min-height: 100vh;
    opacity: 1;
    position: relative;
    z-index: 3;
    animation: pageFadeIn 0.35s ease-out forwards;
}

@keyframes pageFadeIn {
    from {
        opacity: 0.2;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Subtle non-blocking scroll reveal */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.page-title {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* =========================================
   CARDS & GRID
   ========================================= */
.grid {
    display: grid;
    gap: 24px;
}

.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
    background-color: var(--card-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 18px;
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.card::after {
    content: '';
    position: absolute;
    top: var(--mouse-y, -150px);
    left: var(--mouse-x, -150px);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.14) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.card:hover::after {
    opacity: 1;
}

.card:hover {
    border-color: rgba(var(--accent-rgb), 0.35);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 25px rgba(var(--accent-rgb), 0.12);
    transform: translateY(-2px);
}

/* =========================================
   STAT CARDS
   ========================================= */
.stat-card { display: flex; align-items: center; }

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background-color: rgba(var(--accent-rgb), 0.08);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 16px;
    flex-shrink: 0;
}

.stat-icon.green  { background-color: rgba(16, 185, 129, 0.1); color: var(--success); }
.stat-icon.red    { background-color: rgba(239, 68, 68, 0.1);  color: var(--danger); }
.stat-icon.yellow { background-color: rgba(245, 158, 11, 0.1); color: var(--warning); }
.stat-icon.blue   { background-color: rgba(59, 130, 246, 0.1); color: var(--info); }

.stat-info { flex: 1; }
.stat-label { font-size: 12px; color: var(--text-muted); }
.stat-value { font-family: 'Outfit', sans-serif; font-size: 22px; font-weight: 700; margin-top: 4px; }

/* =========================================
   ALERTS
   ========================================= */
.alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    border: 1px solid transparent;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.08);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.2);
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.08);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.2);
}

.alert i { margin-right: 10px; font-size: 16px; }

/* =========================================
   FORM CONTROLS
   ========================================= */
.form-group { margin-bottom: 20px; }

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-main);
    border-radius: 10px;
    padding: 11px 15px;
    font-size: 14px;
    transition: var(--transition);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: rgba(var(--accent-rgb), 0.5);
    background-color: rgba(8, 8, 16, 0.9);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}

/* Fix select dropdown: native options inherit page bg */
.form-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='%238e9297' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}

/* Critical: Force select dropdown options to dark background */
.form-select option {
    background-color: #0e0e18 !important;
    color: #f3f4f6 !important;
}

.form-textarea {
    resize: vertical;
    min-height: 110px;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    outline: none;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-gradient) !important;
    color: var(--accent-text) !important;
    box-shadow: 0 4px 14px var(--accent-glow) !important;
}

.btn-primary i { color: var(--accent-text) !important; }

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.4) !important;
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    border: 1px solid var(--card-border);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

.btn-danger {
    background-color: var(--danger);
    color: #fff;
    box-shadow: 0 4px 14px rgba(255, 51, 51, 0.25);
}

.btn-danger:hover {
    background-color: #dc2626;
    transform: translateY(-1px);
}

.btn-success {
    background-color: var(--success);
    color: #fff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
    background-color: #059669;
    transform: translateY(-1px);
}

.btn-warning {
    background-color: var(--warning);
    color: #000;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
}

.btn-warning:hover {
    background-color: #d97706;
    transform: translateY(-1px);
}

/* =========================================
   TABLES
   ========================================= */
.table-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 12px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table th {
    padding: 14px 16px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 1px solid var(--card-border);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    background-color: rgba(0,0,0,0.2);
}

.table td {
    padding: 14px 16px;
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

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

.table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

/* =========================================
   BADGES
   ========================================= */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.badge-success { background-color: rgba(16, 185, 129, 0.12); color: var(--success); }
.badge-danger  { background-color: rgba(239, 68, 68, 0.12);  color: var(--danger); }
.badge-warning { background-color: rgba(245, 158, 11, 0.12); color: var(--warning); }
.badge-info    { background-color: rgba(var(--accent-rgb), 0.1); color: var(--accent); }
.badge-neutral { background-color: rgba(255,255,255,0.05); color: var(--text-muted); }

/* =========================================
   MICRO ANIMATIONS / STATUS
   ========================================= */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    flex-shrink: 0;
}

.status-indicator.online {
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: pulse 2.5s infinite;
}

@keyframes pulse {
    0%   { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70%  { transform: scale(1);    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.fade-in {
    animation: fadeIn 0.35s ease-out forwards;
}

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

/* =========================================
   LOGIN PAGE
   ========================================= */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 440px;
    padding: 44px;
    text-align: center;
}

.login-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 12px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 32px;
    line-height: 1.6;
}

.discord-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    background-color: #5865f2;
    color: #fff;
    font-weight: 600;
    padding: 14px;
    border-radius: 12px;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(88, 101, 242, 0.3);
    margin-bottom: 20px;
    font-size: 15px;
}

.discord-login-btn:hover {
    background-color: #4752c4;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(88, 101, 242, 0.5);
}

.discord-login-btn i { font-size: 20px; }

.divider {
    display: flex;
    align-items: center;
    color: var(--text-dark);
    font-size: 11px;
    margin-bottom: 20px;
}

.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background-color: var(--card-border); }
.divider span { padding: 0 12px; }

/* =========================================
   ===========================================
   TELEMETRY / OVERVIEW — FUTURISTIC HUD
   ===========================================
   ========================================= */

.telemetry-dials {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

@media (max-width: 1200px) {
    .telemetry-dials { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .telemetry-dials { grid-template-columns: 1fr; }
}

.dial-card {
    background-color: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 24px 16px;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    overflow: hidden;
}

.dial-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--accent-gradient);
    opacity: 0.6;
}

.dial-card:hover {
    border-color: rgba(var(--accent-rgb), 0.2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(var(--accent-rgb), 0.06);
    transform: translateY(-2px);
}

/* SVG ring wrapper — ensures overlay centers correctly */
.svg-progress-ring {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 8px auto;
}

/* Rotate SVG so arc starts at top */
.svg-progress-ring svg {
    transform: rotate(-90deg);
    overflow: visible;
}

/* ALL circles must have no fill to prevent solid black */
.svg-progress-ring circle,
.svg-progress-ring svg circle {
    fill: none !important;
}

.ring-circle-bg {
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 7;
    fill: none !important;
}

.ring-circle-fill {
    stroke: var(--accent);
    stroke-width: 7;
    stroke-linecap: round;
    fill: none !important;
    transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 0 5px rgba(var(--accent-rgb), 0.5));
}

.ring-circle-fill.success {
    stroke: var(--success);
    filter: drop-shadow(0 0 5px rgba(16, 185, 129, 0.6));
}

.ring-circle-fill.warning {
    stroke: var(--warning);
    filter: drop-shadow(0 0 5px rgba(245, 158, 11, 0.6));
}

.ring-circle-fill.info {
    stroke: var(--info);
    filter: drop-shadow(0 0 5px rgba(59, 130, 246, 0.6));
}

/* Text overlay centered inside the SVG */
.dial-info-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.dial-value {
    font-family: 'Outfit', sans-serif;
    font-size: 19px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
}

.dial-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    margin-top: 10px;
    font-weight: 600;
}

/* Live Chart Card */
.chart-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 28px;
    transition: var(--transition);
}

.chart-card:hover { border-color: rgba(var(--accent-rgb), 0.12); }

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-title {
    font-family: 'Outfit', sans-serif;
    font-size: 17px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-container-wrapper {
    position: relative;
    height: 240px;
    width: 100%;
}

/* Server Stats Grid */
.server-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.server-stat-item {
    background-color: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 14px;
    text-align: center;
    transition: var(--transition);
}

.server-stat-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: rgba(var(--accent-rgb), 0.1);
    transform: scale(1.02);
}

.server-stat-num {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 4px;
}

.server-stat-name {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =========================================
   PRIVACY MODE
   ========================================= */
.privacy-toggle-btn {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    border-radius: 10px;
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.privacy-toggle-btn:hover {
    color: var(--warning);
    background-color: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.2);
}

.privacy-toggle-btn.active {
    color: var(--success);
    background-color: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.25);
}

/* Redaction effect */
body.privacy-active .privacy-sensitive {
    position: relative;
    color: transparent !important;
    text-shadow: none !important;
    user-select: none;
    pointer-events: none;
}

body.privacy-active .privacy-sensitive::after {
    content: "REDACTED";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 51, 51, 0.85);
    color: #fff !important;
    font-family: 'Inter', monospace;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 2px 5px;
    border-radius: 4px;
    text-shadow: none !important;
    line-height: 1;
    white-space: nowrap;
}

body.privacy-active .privacy-sensitive-blur {
    filter: blur(8px) grayscale(100%);
    pointer-events: none;
    user-select: none;
}

/* =========================================
   SECURITY / ANTINUKE / AUTOMOD
   ========================================= */
.security-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 0;
}

.security-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px 10px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.security-tab:hover { color: var(--text-main); }

.security-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background-color: rgba(var(--accent-rgb), 0.04);
}

.security-section {
    display: none;
}
.security-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Toggle switch component */
.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.toggle-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.toggle-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 3px;
}

.toggle-info p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
    flex-shrink: 0;
    margin-left: 20px;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px;
    transition: .35s;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-muted);
    border-radius: 50%;
    transition: .35s;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: rgba(var(--accent-rgb), 0.2);
    border-color: rgba(var(--accent-rgb), 0.4);
}

.toggle-switch input:checked + .toggle-slider.green {
    background-color: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
}

.toggle-switch input:checked + .toggle-slider.green::before {
    background-color: var(--success);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(22px);
    background-color: var(--accent);
}

/* Whitelist / Role chips */
.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(var(--accent-rgb), 0.08);
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    color: var(--text-main);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
}

.chip-remove {
    cursor: pointer;
    color: var(--text-muted);
    background: none;
    border: none;
    padding: 0;
    font-size: 12px;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.chip-remove:hover { color: var(--danger); }

/* Settings section card title */
.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--card-border);
}

/* Threshold input group */
.threshold-group {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
}

.threshold-label {
    font-size: 13px;
    color: var(--text-main);
    font-weight: 500;
}

/* Number input small */
.input-sm {
    width: 80px;
    text-align: center;
    padding: 8px 10px;
    font-size: 13px;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-main);
    border-radius: 8px;
    outline: none;
    transition: var(--transition);
}

.input-sm:focus {
    border-color: rgba(var(--accent-rgb), 0.4);
    box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.1);
}

/* Inline save button for sections */
.section-save-btn {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

/* Color-coded event badges for automod rules */
.rule-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rule-badge.active  { background: rgba(16, 185, 129, 0.12); color: var(--success); }
.rule-badge.warning { background: rgba(245, 158, 11, 0.12);  color: var(--warning); }
.rule-badge.danger  { background: rgba(255, 51, 51, 0.12);   color: var(--danger); }
.rule-badge.info    { background: rgba(59, 130, 246, 0.12);  color: var(--info); }

/* =========================================
   SETTINGS PAGE SPECIFIC
   ========================================= */
.theme-select-btn {
    background-color: rgba(13, 13, 21, 0.8);
    border: 2px solid var(--card-border);
    border-radius: 12px;
    padding: 14px 8px;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
}

.theme-select-btn:hover {
    border-color: rgba(var(--accent-rgb), 0.3);
    background-color: rgba(var(--accent-rgb), 0.04);
}

/* =========================================
   MODAL (shared across pages)
   ========================================= */
.modal-backdrop {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.85);
    z-index: 200;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
}

.modal-card {
    width: 100%;
    max-width: 520px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.7), 0 0 40px rgba(var(--accent-rgb), 0.06);
    animation: modalIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(-10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* =========================================
   LIQUID GLASS / GLASSMORPHISM MODE
   ========================================= */
body.glass-mode .card,
body.glass-mode .sidebar,
body.glass-mode .mobile-header {
    background: rgba(10, 11, 20, 0.38) !important;
    backdrop-filter: blur(28px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(190%) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.45), inset 0 1px 0 0 rgba(255, 255, 255, 0.25) !important;
}

body.glass-mode .sidebar {
    border-right: 1px solid rgba(255, 255, 255, 0.14) !important;
}

body.glass-mode .card:hover {
    border-color: rgba(var(--accent-rgb), 0.5) !important;
    box-shadow: 0 14px 45px 0 rgba(0, 0, 0, 0.55), inset 0 1px 1px 0 rgba(255, 255, 255, 0.3) !important;
}

body.glass-mode .form-input,
body.glass-mode .form-select,
body.glass-mode .form-textarea {
    background: rgba(0, 0, 0, 0.35) !important;
    backdrop-filter: blur(12px) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
}

/* =========================================
   MATERIAL DESIGN THEME MODE (when Liquid Glass disabled)
   ========================================= */
body:not(.glass-mode) .card {
    background: #121320 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 1px 3px rgba(0, 0, 0, 0.4) !important;
}

body:not(.glass-mode) .card:hover {
    border-color: rgba(var(--accent-rgb), 0.35) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7) !important;
}

body:not(.glass-mode) .sidebar {
    background: #090912 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-right: 1px solid rgba(255, 255, 255, 0.07) !important;
}

body:not(.glass-mode) .mobile-header {
    background: #090912 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body:not(.glass-mode) .form-input,
body:not(.glass-mode) .form-select,
body:not(.glass-mode) .form-textarea {
    background: #070810 !important;
    backdrop-filter: none !important;
    border-color: rgba(255, 255, 255, 0.09) !important;
}

/* =========================================
   MINIMAL FLOATING UNSAVED CHANGES BAR (TOP FLOATING DOCK)
   ========================================= */
.unsaved-floating-bar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    background: rgba(12, 13, 24, 0.94);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7), 0 0 25px rgba(var(--accent-rgb), 0.22);
    border-radius: 50px;
    padding: 10px 22px;
    display: flex;
    align-items: center;
    gap: 20px;
    animation: slideDownFloating 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideDownFloating {
    from { opacity: 0; transform: translate(-50%, -30px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}

/* =========================================
   PERSISTENT SYSTEM BANNERS
   ========================================= */
#global-persistent-banners {
    position: sticky;
    top: 0;
    z-index: 900;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.persistent-banner {
    width: 100%;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12.5px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    animation: bannerFade 0.3s ease;
}

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

.persistent-banner.banner-warning {
    background: linear-gradient(90deg, #d97706 0%, #b45309 100%);
    color: #ffffff;
}

.persistent-banner.banner-danger {
    background: linear-gradient(90deg, #dc2626 0%, #991b1b 100%);
    color: #ffffff;
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.banner-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.banner-link {
    color: #ffffff;
    text-decoration: underline;
    font-size: 12px;
    font-weight: 700;
    transition: opacity 0.2s;
}
.banner-link:hover { opacity: 0.85; }

.banner-close {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    font-size: 14px;
    padding: 2px;
    transition: opacity 0.2s;
}
.banner-close:hover { opacity: 0.7; }

/* =========================================
   CENTRALIZED TOAST NOTIFICATIONS STACK
   ========================================= */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
    width: calc(100vw - 48px);
    pointer-events: none;
}

.toast-item {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 13px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: toastSlideIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(40px) scale(0.95); }
    to   { opacity: 1; transform: translateX(0) scale(1); }
}

body.glass-mode .toast-item {
    background: rgba(12, 14, 25, 0.88) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
}

body:not(.glass-mode) .toast-item {
    background: #141525 !important;
    backdrop-filter: none !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
}

.toast-item.toast-success { border-left: 4px solid var(--success) !important; }
.toast-item.toast-error   { border-left: 4px solid var(--danger) !important; }
.toast-item.toast-warning { border-left: 4px solid var(--warning) !important; }
.toast-item.toast-info    { border-left: 4px solid var(--info) !important; }

.toast-icon {
    font-size: 16px;
    margin-top: 1px;
}
.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon   { color: var(--danger); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info .toast-icon    { color: var(--info); }

.toast-body { flex: 1; }
.toast-title { font-weight: 700; color: #ffffff; margin-bottom: 2px; font-size: 13px; }
.toast-msg { color: var(--text-muted); font-size: 12px; line-height: 1.4; }

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    padding: 2px;
    margin-left: 4px;
    transition: color 0.2s;
}
.toast-close:hover { color: #ffffff; }

/* Ghost button styling */
.btn-ghost {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.btn-ghost:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

/* Modals & Dropdowns respect theme */
body.glass-mode .modal-card,
body.glass-mode .dropdown-menu {
    background: rgba(12, 14, 25, 0.85) !important;
    backdrop-filter: blur(25px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
}

body:not(.glass-mode) .modal-card,
body:not(.glass-mode) .dropdown-menu {
    background: #141525 !important;
    backdrop-filter: none !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
}

/* =========================================
   GLOBAL SYSTEM MAINTENANCE BANNER
   ========================================= */
.global-maintenance-banner {
    position: sticky;
    top: 0;
    z-index: 900;
    width: 100%;
}

/* =========================================
   MOBILE HEADER & DRAWER OVERLAY
   ========================================= */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #080810 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1001;
    padding: 0 16px;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.mobile-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-menu-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
}

.mobile-menu-btn:hover, .mobile-menu-btn:active {
    background: rgba(var(--accent-rgb), 0.2);
    border-color: rgba(var(--accent-rgb), 0.4);
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Table Responsive wrapper */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

/* =========================================
   RESPONSIVE ADJUSTMENTS
   ========================================= */
@media (max-width: 1024px) {
    .grid-cols-2 { grid-template-columns: 1fr; }
    .grid-cols-3 { grid-template-columns: 1fr 1fr; }
    .main-content { padding: 28px; }
}

@media (max-width: 992px) {
    .mobile-header { display: flex !important; }
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 280px !important;
        max-width: 85vw !important;
        height: 100vh !important;
        background: #0b0c14 !important;
        transform: translateX(-100%) !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        z-index: 1002 !important;
        box-shadow: 10px 0 30px rgba(0,0,0,0.8) !important;
        overflow-y: auto !important;
    }
    .sidebar.mobile-open {
        transform: translateX(0) !important;
    }
    .main-content {
        margin-left: 0 !important;
        padding: 76px 14px 24px 14px !important;
        width: 100% !important;
    }
    .grid-cols-2, .grid-cols-3, .grid-cols-4 {
        grid-template-columns: 1fr !important;
    }
    .card {
        padding: 16px !important;
        border-radius: 12px !important;
    }
    .page-title {
        font-size: 20px !important;
    }
    .page-subtitle {
        font-size: 12px !important;
    }
}

