/*
==================================================================
   UID CONTROL HUB  ·  Liquid Glass Edition
   Inspired by Apple's Liquid Glass design language
==================================================================
*/

:root {
    /* Base */
    --bg-0: #05060a;
    --bg-1: #0a0d16;

    /* Liquid Glass tints */
    --glass-tint:        rgba(255, 255, 255, 0.04);
    --glass-tint-strong: rgba(255, 255, 255, 0.07);
    --glass-edge-top:    rgba(255, 255, 255, 0.30);
    --glass-edge-bot:    rgba(255, 255, 255, 0.05);
    --glass-spec:        rgba(255, 255, 255, 0.55);

    /* Accent palette */
    --clr-cyan:    #5ac8fa;
    --clr-blue:    #0a84ff;
    --clr-purple:  #bf5af2;
    --clr-pink:    #ff375f;
    --clr-teal:    #64d2ff;
    --clr-mint:    #66d4cf;
    --clr-emerald: #30d158;
    --clr-crimson: #ff453a;
    --clr-amber:   #ffd60a;
    --clr-gray:    #98a0b3;

    /* Glow */
    --glow-cyan:   rgba(90, 200, 250, 0.45);
    --glow-purple: rgba(191, 90, 242, 0.40);
    --glow-pink:   rgba(255, 55, 95, 0.35);

    /* Typography */
    --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono:    'JetBrains Mono', 'SF Mono', Menlo, monospace;

    /* Glass shells */
    --blur-strong: 40px;
    --blur-medium: 28px;
    --blur-light:  18px;

    /* Motion */
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-soft:   cubic-bezier(0.4, 0, 0.2, 1);
}

/* =============================================================
   RESET
   ============================================================= */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html { color-scheme: dark; }

body {
    font-family: var(--font-primary);
    color: #e6e8ef;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background: #05060a;
    background-attachment: fixed;
}

/* Animated background video stage (dual <video> crossfade loop) */
.bg-stage {
    position: fixed;
    inset: 0;
    z-index: -3;
    overflow: hidden;
    pointer-events: none;
    background: #000;
}

.bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Promote to its own GPU layer for cheap opacity compositing */
    transform: translateZ(0);
    will-change: opacity;
    backface-visibility: hidden;
    /* Decoding/rendering hints for the browser */
    image-rendering: auto;
    pointer-events: none;
    /* Match the original brightness/contrast feel */
    filter: saturate(1.1);
}

/* Soft radial vignette so the contour density looks intentional
   in the center rather than uniform across the viewport.        */
.bg-vignette {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(ellipse 120% 80% at 50% 50%,
            transparent 0%,
            rgba(5, 6, 10, 0.55) 65%,
            rgba(5, 6, 10, 0.92) 100%);
}

/* Subtle film grain to avoid banding on the gradients */
body::before {
    content: "";
    position: fixed; inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.05;
    mix-blend-mode: overlay;
    background-image:
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.4 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

::selection {
    background: rgba(90, 200, 250, 0.35);
    color: #fff;
}

/* =============================================================
   AMBIENT BACKGROUND ORBS  (the glass refracts these)
   ============================================================= */
.stars-container {
    position: fixed; inset: 0;
    z-index: -2;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 12% 18%, rgba(255,255,255,0.45) 0.5px, transparent 1.5px),
        radial-gradient(circle at 78% 32%, rgba(255,255,255,0.30) 0.5px, transparent 1.5px),
        radial-gradient(circle at 42% 78%, rgba(255,255,255,0.40) 0.5px, transparent 1.5px),
        radial-gradient(circle at 88% 88%, rgba(255,255,255,0.25) 0.5px, transparent 1.5px),
        radial-gradient(circle at 28% 52%, rgba(255,255,255,0.20) 0.5px, transparent 1.5px);
    background-size: 600px 600px, 700px 700px, 500px 500px, 800px 800px, 650px 650px;
    opacity: 0.55;
}

.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.45;
    mix-blend-mode: screen;
    will-change: transform;
}

.orb-1 {
    width: 480px; height: 480px;
    background: radial-gradient(circle, rgba(10, 132, 255, 0.45) 0%, transparent 70%);
    top: -160px; left: -120px;
    animation: orbDrift 22s ease-in-out infinite alternate;
}

.orb-2 {
    width: 560px; height: 560px;
    background: radial-gradient(circle, rgba(191, 90, 242, 0.50) 0%, transparent 70%);
    bottom: -180px; right: -160px;
    animation: orbDrift 28s ease-in-out infinite alternate-reverse;
}

.orb-3 {
    width: 380px; height: 380px;
    background: radial-gradient(circle, rgba(255, 55, 95, 0.30) 0%, transparent 70%);
    top: 45%; left: 50%;
    transform: translate(-50%, -50%);
    animation: orbPulse 14s ease-in-out infinite;
}

@keyframes orbDrift {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(80px, 50px) scale(1.08); }
    100% { transform: translate(-50px, -70px) scale(0.96); }
}
@keyframes orbPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1);   opacity: 0.6; }
    50%      { transform: translate(-50%, -50%) scale(1.15); opacity: 1;   }
}

/* =============================================================
   APP SHELL
   ============================================================= */
.app-container {
    width: 100%;
    max-width: 1280px;
    padding: 2.25rem 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* =============================================================
   ★ LIQUID GLASS PRIMITIVE ★
   The single most important rule in this file.
   Every translucent panel inherits these layers:
     · backdrop blur + saturation boost   (frosting)
     · multi-stop translucent gradient    (depth)
     · 1px gradient border                (light catching the edge)
     · inset top highlight                (specular)
     · inset bottom shadow                (depth)
     · soft outer drop shadow             (lift off the page)
   ============================================================= */
.glass-card,
.app-header,
.login-card {
    position: relative;
    border-radius: 22px;
    background:
        linear-gradient(135deg,
            rgba(255, 255, 255, 0.09) 0%,
            rgba(255, 255, 255, 0.04) 40%,
            rgba(255, 255, 255, 0.02) 100%);
    backdrop-filter: blur(var(--blur-strong)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--blur-strong)) saturate(180%);
    border: 1px solid transparent;
    background-clip: padding-box;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.08) inset,
        0 -1px 0 rgba(0, 0, 0, 0.18) inset,
        0 24px 60px -20px rgba(0, 0, 0, 0.55),
        0 8px 22px -8px rgba(0, 0, 0, 0.45);
    transition: transform .5s var(--ease-smooth),
                box-shadow .5s var(--ease-smooth),
                border-color .4s var(--ease-soft);
    overflow: hidden;
    isolation: isolate;
}

/* Gradient border edge (light catches around the rim) */
.glass-card::before,
.app-header::before,
.login-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg,
        var(--glass-edge-top) 0%,
        rgba(255, 255, 255, 0.12) 30%,
        rgba(255, 255, 255, 0.04) 60%,
        var(--glass-edge-bot) 100%);
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
}

/* Specular sheen (the moving white highlight that defines liquid glass) */
.glass-card::after,
.app-header::after,
.login-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background:
        radial-gradient(ellipse 120% 40% at 50% -10%,
            rgba(255, 255, 255, 0.18) 0%,
            transparent 60%);
    opacity: 0.9;
    mix-blend-mode: screen;
    z-index: 0;
}

.glass-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.04);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.12) inset,
        0 -1px 0 rgba(0, 0, 0, 0.18) inset,
        0 32px 80px -20px rgba(0, 0, 0, 0.65),
        0 12px 30px -10px rgba(10, 132, 255, 0.2);
}

/* Make actual content sit above the ::after sheen */
.glass-card > *,
.app-header > *,
.login-card > * {
    position: relative;
    z-index: 2;
}

/* =============================================================
   HEADER
   ============================================================= */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.1rem 1.5rem;
    gap: 1rem;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pulse-icon {
    width: 48px; height: 48px;
    border-radius: 14px;
    display: grid; place-items: center;
    font-size: 1.25rem;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.04) 100%),
        linear-gradient(135deg, rgba(10,132,255,0.45), rgba(191,90,242,0.45));
    box-shadow:
        0 1px 0 rgba(255,255,255,0.4) inset,
        0 -2px 4px rgba(0,0,0,0.25) inset,
        0 6px 18px -6px rgba(10,132,255,0.55);
    border: 1px solid rgba(255,255,255,0.12);
    position: relative;
    overflow: hidden;
}

.pulse-icon::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.5) 0%, transparent 60%);
    opacity: 0.7;
}

.brand-text h1 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(120deg, #ffffff 30%, #b8c5ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-text .subtitle {
    font-size: 0.72rem;
    color: var(--clr-gray);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 2px;
}

.server-status {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background:
        linear-gradient(135deg, rgba(48,209,88,0.18) 0%, rgba(48,209,88,0.06) 100%);
    padding: 0.4rem 0.85rem;
    border-radius: 100px;
    border: 1px solid rgba(48,209,88,0.25);
    box-shadow: 0 1px 0 rgba(255,255,255,0.1) inset;
}

.pulse-dot {
    width: 7px; height: 7px;
    background: var(--clr-emerald);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--clr-emerald);
    animation: dotPulse 1.8s ease-in-out infinite;
}
@keyframes dotPulse {
    0%, 100% { transform: scale(1);   opacity: 1;   }
    50%      { transform: scale(1.4); opacity: 0.55;}
}

.status-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--clr-emerald);
    letter-spacing: 0.02em;
}

.status-details {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: #c2c8d6;
    font-weight: 500;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.02) 100%);
    padding: 0.4rem 0.8rem;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.07);
    box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset;
    text-decoration: none;
    transition: all 0.3s var(--ease-smooth);
}

.detail-item i { color: rgba(255,255,255,0.45); }

/* =============================================================
   DASHBOARD GRID
   ============================================================= */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 1.5rem;
    align-items: start;
}

.dashboard-left {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.glass-card {
    padding: 1.6rem 1.65rem;
    display: flex;
    flex-direction: column;
    gap: 1.3rem;
}

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.card-title-group {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.card-icon-wrapper {
    width: 42px; height: 42px;
    border-radius: 12px;
    display: grid; place-items: center;
    font-size: 1.05rem;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.25) inset,
        0 -1px 2px rgba(0,0,0,0.2) inset;
    position: relative;
    overflow: hidden;
}

.card-icon-wrapper::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.45) 0%, transparent 65%);
}

.card-icon-wrapper.add-color {
    background:
        linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%),
        linear-gradient(135deg, rgba(90,200,250,0.6), rgba(10,132,255,0.6));
}
.card-icon-wrapper.log-color {
    background:
        linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%),
        linear-gradient(135deg, rgba(191,90,242,0.6), rgba(255,55,95,0.55));
}

.card-header h2 {
    font-family: var(--font-heading);
    font-size: 1.12rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.01em;
}

.card-desc {
    font-size: 0.76rem;
    color: var(--clr-gray);
    margin-top: 2px;
    letter-spacing: 0.005em;
}

/* =============================================================
   FORMS
   ============================================================= */
.card-form {
    display: flex;
    flex-direction: column;
    gap: 1.3rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.form-group label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #cdd2dd;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: rgba(255,255,255,0.35);
    font-size: 0.95rem;
    transition: all 0.3s var(--ease-smooth);
    z-index: 2;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 0.95rem 2.8rem;
    color: #fff;
    font-size: 0.94rem;
    font-family: inherit;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    background:
        linear-gradient(180deg, rgba(0,0,0,0.32) 0%, rgba(0,0,0,0.18) 100%);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.05) inset,
        0 2px 12px rgba(0,0,0,0.25) inset;
    transition: all 0.3s var(--ease-smooth);
    outline: none;
}

.input-wrapper input::placeholder { color: rgba(255,255,255,0.32); }

.input-wrapper input:focus {
    border-color: rgba(90,200,250,0.55);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.08) inset,
        0 0 0 4px rgba(90,200,250,0.12),
        0 4px 20px -2px rgba(90,200,250,0.25);
    background:
        linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.22) 100%);
}

.input-wrapper input:focus ~ .input-icon,
.input-wrapper:focus-within .input-icon { color: var(--clr-cyan); }

.clear-input-btn {
    position: absolute;
    right: 0.85rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 50%;
    width: 22px; height: 22px;
    display: none;
    align-items: center; justify-content: center;
    color: rgba(255,255,255,0.55);
    cursor: pointer;
    font-size: 0.7rem;
    transition: all 0.25s var(--ease-soft);
    z-index: 2;
}

.clear-input-btn:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
    transform: scale(1.06);
}

/* Banner */
.warning-banner {
    display: flex;
    gap: 0.7rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    align-items: flex-start;
    background:
        linear-gradient(135deg, rgba(90,200,250,0.10) 0%, rgba(90,200,250,0.03) 100%);
    border: 1px solid rgba(90,200,250,0.18);
    box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset;
}

.warning-banner i {
    color: var(--clr-cyan);
    font-size: 1rem;
    margin-top: 1px;
}
.warning-banner p {
    font-size: 0.78rem;
    line-height: 1.5;
    color: #c5e8ff;
}

/* Submit Button (proper Liquid Glass capsule with light refraction) */
.submit-btn {
    position: relative;
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.35s var(--ease-spring);
    color: #001528;
    isolation: isolate;
}

.submit-btn.add-btn {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.35) 0%, transparent 50%),
        linear-gradient(135deg, #5ac8fa 0%, #0a84ff 100%);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.5) inset,
        0 -2px 4px rgba(0,0,0,0.2) inset,
        0 6px 20px -4px rgba(10,132,255,0.55),
        0 2px 8px -2px rgba(10,132,255,0.35);
}

.submit-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.5) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.7s var(--ease-soft);
    pointer-events: none;
    z-index: 1;
}

.submit-btn:hover:not(:disabled)::before { transform: translateX(100%); }

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.55) inset,
        0 -2px 4px rgba(0,0,0,0.2) inset,
        0 12px 30px -6px rgba(10,132,255,0.7),
        0 4px 12px -2px rgba(10,132,255,0.45);
}

.submit-btn:active:not(:disabled) { transform: translateY(0) scale(0.99); }

.submit-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.btn-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    transition: all 0.3s var(--ease-soft);
    position: relative;
    z-index: 2;
}

.btn-loader {
    position: absolute;
    inset: 0;
    display: grid; place-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease-soft);
}

.loading .btn-text  { opacity: 0; transform: scale(0.9); }
.loading .btn-loader { opacity: 1; }

.spinner {
    width: 22px; height: 22px;
    border: 2.5px solid rgba(0,21,40,0.25);
    border-top-color: #001528;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

/* =============================================================
   LICENSE INFO GRID
   ============================================================= */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

.info-item {
    padding: 0.85rem 1rem;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.05) inset,
        0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.35s var(--ease-smooth);
    position: relative;
    overflow: hidden;
}

.info-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 0% 0%, rgba(255,255,255,0.08) 0%, transparent 50%);
    opacity: 0.6;
    pointer-events: none;
}

.info-item:hover {
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.1);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.1) inset,
        0 8px 22px rgba(0,0,0,0.25);
}

.info-label {
    font-size: 0.66rem;
    color: var(--clr-gray);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
}

.info-label i {
    color: rgba(255,255,255,0.35);
    font-size: 0.72rem;
}

.info-value {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    font-family: var(--font-heading);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: -0.01em;
    position: relative;
    z-index: 1;
}

.info-value.highlight-cyan {
    background: linear-gradient(120deg, var(--clr-cyan) 0%, var(--clr-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: var(--font-mono);
    font-size: 0.92rem;
}

.uid-tag {
    background:
        linear-gradient(135deg, rgba(48,209,88,0.18) 0%, rgba(48,209,88,0.06) 100%);
    border: 1px solid rgba(48,209,88,0.3);
    color: #6dffa1;
    padding: 0.3rem 0.7rem;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    box-shadow:
        0 1px 0 rgba(255,255,255,0.12) inset,
        0 2px 8px rgba(48,209,88,0.15);
}

/* =============================================================
   AUDIT LOGS
   ============================================================= */
.logs-card {
    height: 100%;
    max-height: 600px;
}

.utility-btn {
    background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--clr-gray);
    padding: 0.45rem 0.85rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.76rem;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.3s var(--ease-smooth);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset;
}

.utility-btn:hover {
    background: linear-gradient(135deg, rgba(255,69,58,0.12) 0%, rgba(255,69,58,0.04) 100%);
    border-color: rgba(255,69,58,0.3);
    color: #ff8a84;
    transform: translateY(-1px);
}

.logs-container {
    overflow-y: auto;
    flex: 1;
    max-height: 460px;
    padding-right: 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.logs-container::-webkit-scrollbar { width: 4px; }
.logs-container::-webkit-scrollbar-track { background: transparent; }
.logs-container::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.12);
    border-radius: 100px;
}
.logs-container::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }

.empty-state {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem 1rem;
    text-align: center;
    color: var(--clr-gray);
    gap: 0.5rem;
    height: 100%;
}

.empty-state i {
    font-size: 2.4rem;
    margin-bottom: 0.6rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.04));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.empty-state p {
    font-size: 0.9rem;
    font-weight: 600;
    color: #c5cad7;
}
.empty-state span {
    font-size: 0.76rem;
    color: #6e7689;
}

.log-entry {
    background:
        linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 0.85rem 1rem;
    border-radius: 14px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.95rem;
    transition: all 0.3s var(--ease-smooth);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.05) inset,
        0 2px 8px rgba(0,0,0,0.15);
    animation: slideIn 0.3s var(--ease-spring);
}

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

.log-entry:hover {
    border-color: rgba(255,255,255,0.1);
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
}

.log-action-tag {
    padding: 0.32rem 0.65rem;
    border-radius: 7px;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: 1px solid;
    box-shadow: 0 1px 0 rgba(255,255,255,0.1) inset;
}

.log-action-tag.add {
    background: linear-gradient(135deg, rgba(48,209,88,0.18) 0%, rgba(48,209,88,0.06) 100%);
    border-color: rgba(48,209,88,0.3);
    color: #6dffa1;
}
.log-action-tag.remove {
    background: linear-gradient(135deg, rgba(255,69,58,0.18) 0%, rgba(255,69,58,0.06) 100%);
    border-color: rgba(255,69,58,0.3);
    color: #ff8a84;
}

.log-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.log-uid {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.log-meta {
    font-size: 0.72rem;
    color: var(--clr-gray);
    display: flex;
    gap: 0.55rem;
    align-items: center;
    flex-wrap: wrap;
}

.log-duration-badge {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 0.1rem 0.45rem;
    border-radius: 5px;
    font-size: 0.66rem;
    font-weight: 600;
    color: #c5cad7;
}

.log-status {
    font-size: 0.72rem;
    font-weight: 600;
}
.log-status.success { color: #6dffa1; }
.log-status.error   { color: #ff8a84; }

.log-response-msg {
    color: #98a0b3;
    font-size: 0.7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

.log-time {
    font-size: 0.7rem;
    color: #6e7689;
    font-family: var(--font-mono);
    flex-shrink: 0;
}

/* =============================================================
   FOOTER
   ============================================================= */
.app-footer {
    text-align: center;
    padding: 1.25rem 0;
    border-top: 1px solid rgba(255,255,255,0.04);
    margin-top: auto;
}

.app-footer p {
    font-size: 0.75rem;
    color: #6e7689;
    letter-spacing: 0.02em;
}

/* =============================================================
   TOAST NOTIFICATIONS  (Liquid Glass capsules)
   ============================================================= */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    z-index: 10000;
    max-width: 380px;
    width: calc(100% - 3rem);
}

.toast {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.95rem 1.1rem;
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.04) 100%);
    backdrop-filter: blur(var(--blur-strong)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--blur-strong)) saturate(180%);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.18) inset,
        0 -1px 0 rgba(0,0,0,0.18) inset,
        0 18px 40px -10px rgba(0,0,0,0.5);
    animation: toastSlide 0.5s var(--ease-spring);
    overflow: hidden;
    isolation: isolate;
}

.toast::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 0% 0%, rgba(255,255,255,0.18) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.toast > * { position: relative; z-index: 1; }

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

.toast.removing {
    opacity: 0;
    transform: translateX(40px) scale(0.92);
    transition: all 0.35s var(--ease-soft);
}

.toast-icon {
    font-size: 1.15rem;
    margin-top: 1px;
    width: 30px; height: 30px;
    border-radius: 9px;
    display: grid; place-items: center;
    flex-shrink: 0;
    border: 1px solid;
    box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset;
}

.toast.success .toast-icon {
    color: #6dffa1;
    background: linear-gradient(135deg, rgba(48,209,88,0.2) 0%, rgba(48,209,88,0.05) 100%);
    border-color: rgba(48,209,88,0.3);
}

.toast.error .toast-icon {
    color: #ff8a84;
    background: linear-gradient(135deg, rgba(255,69,58,0.2) 0%, rgba(255,69,58,0.05) 100%);
    border-color: rgba(255,69,58,0.3);
}

.toast.success { border-left: none; box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 -1px 0 rgba(0,0,0,0.18) inset, 0 18px 40px -10px rgba(0,0,0,0.5), -3px 0 0 0 rgba(48,209,88,0.5) inset; }
.toast.error   { border-left: none; box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 -1px 0 rgba(0,0,0,0.18) inset, 0 18px 40px -10px rgba(0,0,0,0.5), -3px 0 0 0 rgba(255,69,58,0.5) inset; }

.toast-content { flex: 1; min-width: 0; }
.toast-content h4 {
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.15rem;
    letter-spacing: -0.005em;
}
.toast-content p {
    font-size: 0.78rem;
    color: #c5cad7;
    line-height: 1.45;
    word-wrap: break-word;
}

.toast-close {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 7px;
    width: 24px; height: 24px;
    display: grid; place-items: center;
    color: rgba(255,255,255,0.45);
    cursor: pointer;
    font-size: 0.7rem;
    transition: all 0.25s var(--ease-soft);
    flex-shrink: 0;
}

.toast-close:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    transform: scale(1.05);
}

/* =============================================================
   LOGOUT FORM (POST + CSRF)
   ============================================================= */
.logout-form {
    display: inline-flex;
    margin: 0;
    padding: 0;
}

.logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background:
        linear-gradient(135deg, rgba(255,69,58,0.12) 0%, rgba(255,69,58,0.04) 100%);
    border: 1px solid rgba(255,69,58,0.22);
    color: #ff8a84;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.4rem 0.85rem;
    border-radius: 10px;
    transition: all 0.3s var(--ease-smooth);
    box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset;
}

.logout-btn:hover {
    background: linear-gradient(135deg, rgba(255,69,58,0.22) 0%, rgba(255,69,58,0.08) 100%);
    border-color: rgba(255,69,58,0.4);
    color: #ffafa9;
    transform: translateY(-1px);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.08) inset,
        0 4px 12px -2px rgba(255,69,58,0.25);
}

/* =============================================================
   LOGIN PAGE
   ============================================================= */
.login-page-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}

.login-container {
    width: 100%;
    max-width: 440px;
    animation: loginRise 0.6s var(--ease-spring);
}

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

.login-card {
    border-radius: 26px;
    padding: 2.4rem 2.2rem;
}

.login-badge {
    width: 64px; height: 64px;
    border-radius: 18px;
    display: grid; place-items: center;
    margin: 0 auto 1.4rem;
    font-size: 1.7rem;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.25) 0%, transparent 50%),
        linear-gradient(135deg, rgba(90,200,250,0.6), rgba(10,132,255,0.6));
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.4) inset,
        0 -2px 6px rgba(0,0,0,0.2) inset,
        0 12px 30px -6px rgba(10,132,255,0.55);
    position: relative;
    overflow: hidden;
    animation: badgeBreathe 3.5s ease-in-out infinite;
}

.login-badge::after {
    content: "";
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.55) 0%, transparent 60%);
    pointer-events: none;
}

@keyframes badgeBreathe {
    0%, 100% { box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, 0 -2px 6px rgba(0,0,0,0.2) inset, 0 12px 30px -6px rgba(10,132,255,0.55); }
    50%      { box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, 0 -2px 6px rgba(0,0,0,0.2) inset, 0 18px 50px -6px rgba(10,132,255,0.85); }
}

.login-header {
    text-align: center;
    margin-bottom: 1.8rem;
}

.login-header h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem;
    background: linear-gradient(120deg, #ffffff 30%, #c0cdff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p {
    font-size: 0.84rem;
    color: var(--clr-gray);
}

.login-error-banner {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    background:
        linear-gradient(135deg, rgba(255,69,58,0.1) 0%, rgba(255,69,58,0.03) 100%);
    border: 1px solid rgba(255,69,58,0.25);
    padding: 0.85rem 1rem;
    border-radius: 12px;
    margin-bottom: 1.4rem;
    color: #ffafa9;
    font-size: 0.82rem;
    box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset;
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100%   { transform: translateX(0); }
    20%, 60%   { transform: translateX(-5px); }
    40%, 80%   { transform: translateX(5px); }
}

.login-error-banner i {
    color: var(--clr-crimson);
    font-size: 1rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.4rem;
    font-size: 0.7rem;
    color: #6e7689;
    letter-spacing: 0.02em;
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 968px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .logs-card      { max-height: 500px; }
}

@media (max-width: 640px) {
    .app-container { padding: 1.25rem 1rem; gap: 1.25rem; }

    .app-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
    }
    .server-status {
        width: 100%;
        justify-content: space-between;
        padding-top: 0.85rem;
        border-top: 1px solid rgba(255,255,255,0.05);
    }
    .status-details { flex: 1; justify-content: flex-end; gap: 0.4rem; }

    .glass-card { padding: 1.3rem 1.25rem; }
    .info-grid  { grid-template-columns: 1fr; }

    .log-entry {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
    }
    .log-time {
        grid-column: 1 / -1;
        justify-self: flex-start;
        opacity: 0.7;
    }

    .toast-container {
        bottom: 1rem; right: 1rem; left: 1rem;
        width: auto;
        max-width: none;
    }

    .login-card { padding: 2rem 1.5rem; border-radius: 22px; }
    .brand-text h1 { font-size: 1.2rem; }
}

/* =============================================================
   REDUCED MOTION
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    /* Pause the looping background video for reduced-motion users */
    .bg-video { display: none; }
    .bg-stage { background:
        radial-gradient(ellipse 80% 60% at 20% 0%, rgba(10,132,255,0.25) 0%, transparent 60%),
        radial-gradient(ellipse 70% 60% at 80% 100%, rgba(191,90,242,0.25) 0%, transparent 55%),
        #05060a; }
}
