/* Admin Design System - "Classy Elite" Edition */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
    --bg-color: #050505;
    --surface-dark: #0a0b1e;
    --text-primary: #ffffff;
    --text-secondary: #d0d0d0;
    --accent-blue: #00f2fe;
    /* Main site's cyan glow */
    --accent-purple: #40004d;
    /* Main project accent magenta */
    --accent-glow: rgba(0, 242, 254, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: 40px;
    --transition-premium: 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    --glow-blue: 0 0 30px rgba(0, 242, 254, 0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    max-width: 100%;
    overflow-wrap: break-word;
    -webkit-tap-highlight-color: transparent;
    /* Remove blue highlight site-wide */
}

body {
    background: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden !important;
    position: relative;
    -webkit-font-smoothing: antialiased;
    font-size: 1.1rem;
    /* 10% boost from 1rem base */
}

/* Texture Overlay */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.04;
    pointer-events: none;
    z-index: 9999;
}

/* Liquid Background */
.liquid-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at center, #10112a 0%, #000 100%);
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.5;
    mix-blend-mode: screen;
    animation: move-blob 30s infinite alternate ease-in-out;
}

.blob-1 {
    width: 800px;
    height: 800px;
    top: -10%;
    left: -10%;
    background: radial-gradient(circle, var(--accent-blue) 0%, transparent 70%);
}

.blob-2 {
    width: 700px;
    height: 700px;
    bottom: -15%;
    right: -10%;
    background: radial-gradient(circle, var(--accent-purple) 0%, transparent 70%);
    animation-delay: -5s;
}

.blob-3 {
    width: 500px;
    height: 500px;
    top: 40%;
    left: 50%;
    background: radial-gradient(circle, #ec4899 0%, transparent 70%);
    opacity: 0.2;
    animation-delay: -15s;
}

@keyframes move-blob {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(15%, 10%) scale(1.1);
    }

    66% {
        transform: translate(-10%, 20%) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* Auth Page Card */
.premium-login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 24px;
}

/* Global Section Header Centralization Rule */
.section-header.center-aligned {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
}

.premium-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    padding: 25px 40px;
    max-width: 440px;
    /* Restored to standard login card size */
    margin: 0 auto;
    width: 100%;
    /* Ensure full width usage */
    box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.8);
    position: relative;
    overflow: hidden;
    animation: card-entry 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    box-sizing: border-box;
    will-change: transform, opacity;
}

@keyframes card-entry {
    from {
        opacity: 0;
        transform: translateY(60px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.card-shine {
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: linear-gradient(45deg, transparent 45%, rgba(255, 255, 255, 0.03) 50%, transparent 55%);
    animation: shine-sweep 15s infinite linear;
    pointer-events: none;
}

@keyframes shine-sweep {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(30%, 30%);
    }
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

.shake-haptic {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

/* Dashboard Layout */
.dashboard-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    min-height: 100vh;
    max-width: 100%;
    width: 100%;
    position: relative;
    align-items: start;
    overflow-x: hidden;
}

@media (max-width: 1024px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
        display: block;
        /* Switch to block for easier layout management on mobile */
    }
}

/* Sidebar - Drop-Down to Right Style */
.sidebar {
    background: rgba(0, 0, 0, 0.98);
    border-left: 1px solid var(--glass-border);
    backdrop-filter: blur(50px) saturate(200%);
    -webkit-backdrop-filter: blur(50px) saturate(200%);
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    /* Full screen overlay on mobile */
    max-width: 290px;
    height: 100vh;
    overflow-y: hidden;
    /* Prevent scrolling as requested */
    padding-bottom: 80px;
    z-index: 5000;
    -ms-overflow-style: none;
}

@media (max-width: 1024px) {
    .sidebar {
        width: 85%;
        /* Slightly narrower for better UX */
        max-width: 320px;
        box-shadow: 10px 0 50px rgba(0, 0, 0, 0.8);
        /* Shadow on right */
        border-right: 1px solid var(--glass-border);
        border-left: none;
        left: -100%;
        /* Start off-screen left */
        right: auto;
        /* Reset right property */
        border-radius: 0 40px 40px 0;
        /* Rounded on right only */
    }

    .sidebar.active {
        left: 0;
        /* Slide in from left */
        right: auto;
    }
}

.sidebar::-webkit-scrollbar {
    display: none;
}

.sidebar.active {
    right: 0;
}

/* Staggered Navigation Entry */
.sidebar .nav-item {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.5s var(--transition-premium);
}

.sidebar.active .nav-item {
    opacity: 1;
    transform: translateX(0);
}

.sidebar.active .nav-item:nth-child(1) {
    transition-delay: 0.1s;
}

.sidebar.active .nav-item:nth-child(2) {
    transition-delay: 0.15s;
}

.sidebar.active .nav-item:nth-child(3) {
    transition-delay: 0.2s;
}

.sidebar.active .nav-item:nth-child(4) {
    transition-delay: 0.25s;
}

.sidebar.active .nav-item:nth-child(5) {
    transition-delay: 0.3s;
}

.mobile-nav-toggle {
    display: flex;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--accent-blue);
    width: 42px;
    /* reduced by 30% from 60px */
    height: 42px;
    border-radius: 50%;
    /* Pure Circle */
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    /* Remove blue highlight */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.2), inset 0 0 15px rgba(0, 242, 254, 0.1);
    animation: neon-pulse 3s infinite alternate;
}

@keyframes neon-pulse {
    from {
        box-shadow: 0 0 15px rgba(0, 242, 254, 0.2), inset 0 0 10px rgba(0, 242, 254, 0.1);
    }

    to {
        box-shadow: 0 0 30px rgba(0, 242, 254, 0.5), inset 0 0 20px rgba(0, 242, 254, 0.2);
        border-color: #fff;
    }
}

.mobile-nav-toggle:hover {
    transform: scale(1.1);
    /* Removed rotate(90deg) */
    background: var(--accent-blue);
}

.mobile-nav-toggle:hover .bar {
    background: #000;
}

.mobile-nav-toggle .bar {
    display: block;
    width: 20px;
    /* reduced from 28px */
    height: 2.5px;
    /* reduced from 3.5px */
    background: #fff;
    border-radius: 4px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-nav-toggle.active .bar:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.mobile-nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-nav-toggle.active .bar:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

@media (max-width: 1024px) {
    .mobile-nav-toggle {
        display: flex !important;
        /* Force visibility on mobile */
    }

    .content-area {
        padding: 100px 20px 40px;
        /* Space for the floating toggle */
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
}

@media (min-width: 1025px) {
    .sidebar {
        position: sticky !important;
        top: 20px !important;
        margin: 20px;
        height: calc(100vh - 40px) !important;
        overflow-y: hidden !important;
        /* Force no scroll on desktop */
        padding-bottom: 20px;
        width: 290px;
        background: rgba(0, 0, 0, 0.6);
        border: 1px solid var(--glass-border);
        border-radius: 40px;
        box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
        z-index: 100;
        /* Hide scrollbar */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .sidebar::-webkit-scrollbar {
        display: none;
    }

    .sidebar .nav-item {
        opacity: 1 !important;
        transform: none !important;
    }

    .mobile-nav-toggle {
        display: none !important;
    }

    /* Command Radar Base Grid */
    .command-radar-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 25px;
    }

    /* Command Radar Responsive Grid */
    .command-radar-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .command-radar-grid {
        display: grid;
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}

/* Missing Keyframe Animations */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sidebar-logo {
    display: flex;
    flex-direction: column;
    /* Vertical protocol */
    align-items: center;
    text-align: center;
    gap: 10px;
    margin-bottom: 25px;
    /* Tightened */
}

.sidebar-logo img {
    height: 42px;
    /* Further reduced */
    margin-bottom: 5px;
    filter: brightness(0) invert(1) drop-shadow(0 0 20px rgba(255, 255, 255, 0.4));
}

.sidebar-logo span {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.235rem;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff, var(--accent-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    list-style: none;
    flex: 1;
}

.nav-item {
    margin-bottom: 15px;
    /* Tightened */
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    /* More compact padding */
    border-radius: 18px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-premium);
    font-weight: 600;
    font-size: 0.975rem;
    border: 1px solid transparent;
}

.nav-link i {
    width: 20px;
    height: 20px;
    stroke-width: 2.25px;
    transition: transform 0.4s ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    transform: translateX(12px);
}

.nav-link.active {
    background: rgba(0, 242, 254, 0.1);
    color: var(--accent-blue);
    border-color: rgba(0, 242, 254, 0.2);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.nav-link.active i {
    transform: scale(1.1);
}

.content-area {
    padding: clamp(15px, 4vw, 50px);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.section-header {
    margin-bottom: 70px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
}

.hero-header-content {
    text-align: center;
    width: 100%;
    transform: translateX(-20px);
    /* Surgical leftward offset */
}

.hero-header-content h1 {
    font-size: clamp(1.8rem, 4.5vw, 2.6rem) !important;
    line-height: 1.1;
}

.hero-header-content p {
    font-size: 0.62rem !important;
    letter-spacing: 0.28em !important;
    opacity: 0.5;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* Stack vertically on mobile by default */
    /* 2 columns on mobile by default */
    gap: 15px;
    margin-bottom: 30px;
    width: 100%;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    border-radius: 25px;
    padding: 24px;
    transition: all var(--transition-premium);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.glass-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent);
    pointer-events: none;
}

.glass-card:hover {
    transform: translateY(-8px) scale(1.02);
    /* Reduced for mobile stability */
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 45px 90px rgba(0, 0, 0, 0.7);
}

@media (max-width: 480px) {
    .stat-val {
        font-size: 1.8rem !important;
        /* Scale down for narrow screens */
    }

    .glass-card {
        padding: 15px !important;
    }
}

.stat-val {
    font-size: 2.6rem;
    /* +30% boost for numerical data */
    font-weight: 800;
    margin-top: 8px;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #fff, var(--accent-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.protocol-status {
    font-size: 0.95rem;
    /* Scaled down for better fit */
    font-weight: 800;
    letter-spacing: 0.1em;
}

@media (max-width: 768px) {
    .protocol-status {
        font-size: 0.8rem;
    }
}

/* Media Gallery alignment - ULTRA DENSITY */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    /* -35% from 200px */
    gap: 15px;
    /* Tighter gap */
    will-change: transform;
}

@media (max-width: 480px) {
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

.media-item {
    position: relative;
    border-radius: 35px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: var(--surface-dark);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all var(--transition-premium);
}

.media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.5s var(--transition-premium);
}

.media-item:hover {
    transform: translateY(-10px);
    border-color: var(--accent-blue);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}

.media-item:hover img {
    transform: scale(1.15);
}

.media-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 11, 30, 0.98), transparent 80%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 15px;
    /* Tighter padding */
    opacity: 0;
    transition: all 0.5s ease;
    transform: translateY(20px);
}

.media-item:hover .media-overlay {
    opacity: 1;
    transform: translateY(0);
}

/* Page Manager alignment */
.page-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.page-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    padding: clamp(20px, 3vh, 35px) clamp(20px, 4vw, 50px);
    /* Fluid internal padding */
    border-radius: 35px;
    border: 1px solid var(--glass-border);
    transition: all var(--transition-premium);
    width: 100%;
    gap: 20px;
}

.page-row:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateX(20px);
    border-color: rgba(0, 242, 254, 0.4);
    box-shadow: -15px 0 45px rgba(0, 242, 254, 0.1);
}

/* Premium Input System - "20 Billion Dollar" Standard */
.premium-input-group {
    margin-bottom: 35px;
}

.premium-input-wrapper {
    position: relative;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.premium-input-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.1), rgba(236, 72, 153, 0.1));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.premium-input-inner {
    position: relative;
    display: flex;
    align-items: center;
    padding: 5px 24px;
    z-index: 1;
    width: 100%;
}

.peek-btn {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    color: var(--accent-blue);
    opacity: 0.5;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* Standardized Admin Footer */
.admin-footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.65rem;
    opacity: 0.4;
    letter-spacing: 0.2em;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 50px;
    margin-bottom: 20px;
    width: 100%;
}

.peek-btn:hover {
    opacity: 1;
    filter: drop-shadow(0 0 8px var(--accent-blue));
    transform: scale(1.1);
}

.peek-btn i {
    width: 18px;
    height: 18px;
}

.premium-icon {
    width: 20px;
    height: 20px;
    color: var(--accent-blue);
    opacity: 0.6;
    margin-right: 18px;
    transition: all 0.4s ease;
}

.premium-input-field {
    width: 100%;
    background: transparent;
    border: none;
    padding: 24px 0 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    outline: none;
    font-family: 'Poppins', sans-serif;
    caret-color: var(--accent-blue);
}

.premium-input-field:focus {
    color: var(--accent-blue);
    text-shadow: 0 0 12px rgba(0, 242, 254, 0.8);
    /* Electric Highlight */
}

.premium-label {
    position: absolute;
    left: 62px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0.6;
}

/* Floating Label Logic */
.premium-input-field:focus~.premium-label,
.premium-input-field:not(:placeholder-shown)~.premium-label {
    top: 18px;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-blue);
    opacity: 1;
}

/* Focus States */
.premium-input-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 242, 254, 0.4);
    box-shadow: 0 15px 40px -10px rgba(0, 242, 254, 0.25);
    transform: translateY(-3px);
}

.premium-input-wrapper:focus-within::before {
    opacity: 1;
}

.premium-input-wrapper:focus-within .premium-icon {
    opacity: 1;
    transform: scale(1.1);
    filter: drop-shadow(0 0 10px var(--accent-blue));
}

/* Elite "20 Billion Dollar" Buttons - Fluid Scaling */
.btn-premium,
.btn-billion {
    position: relative;
    width: 100%;
    padding: clamp(18px, 2.5vw, 24px) clamp(30px, 5vw, 50px);
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    border: none;
    border-radius: 24px;
    font-weight: 800;
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.6s var(--transition-premium);
    box-shadow: 0 15px 40px rgba(0, 242, 254, 0.3);
    z-index: 1;
    display: block;
    text-align: center;
}

.btn-premium::before,
.btn-billion::before {
    content: '';
    position: absolute;
    inset: 1.5px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent);
    border-radius: 23px;
    pointer-events: none;
    z-index: 2;
}

.btn-premium::after,
.btn-billion::after {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: linear-gradient(45deg, transparent 45%, rgba(255, 255, 255, 0.5) 50%, transparent 55%);
    transition: transform 0.8s ease;
    pointer-events: none;
    z-index: 3;
}

.btn-premium:hover,
.btn-billion:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 242, 254, 0.5);
    /* Tension Shadow */
    filter: brightness(1.25);
}

.btn-premium:hover::after,
.btn-billion:hover::after {
    transform: translate(30%, 30%);
}

/* Denatured Error States */
.btn-billion.denied {
    background: linear-gradient(135deg, #ef4444, #991b1b) !important;
    box-shadow: 0 15px 40px rgba(239, 68, 68, 0.4) !important;
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

.error-message-elite {
    background: rgba(239, 68, 68, 0.1) !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    backdrop-filter: blur(25px) saturate(200%) !important;
    color: #fca5a5 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(239, 68, 68, 0.1);
}

.btn-edit {
    padding: clamp(10px, 1.5vw, 16px) clamp(20px, 3vw, 36px);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    font-weight: 700;
    font-size: clamp(0.75rem, 1vw, 0.9rem);
    cursor: pointer;
    backdrop-filter: blur(15px);
    transition: all 0.4s var(--transition-premium);
}

.btn-edit:hover {
    background: var(--accent-blue);
    color: var(--bg-color);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 242, 254, 0.4);
}

/* Compact Surgical Button (-50%) */
.btn-compact {
    width: fit-content !important;
    padding: 10px 20px !important;
    font-size: 0.72rem !important;
    border-radius: 15px !important;
    min-height: unset !important;
    margin: 15px auto 0 !important;
}

.directives-title {
    font-size: clamp(1rem, 1.8vw, 1.3rem) !important;
    /* Secondary 30% reduction */
    opacity: 0.8;
}

.directives-wrapper {
    display: flex;
    gap: clamp(15px, 2vw, 25px);
    width: 100%;
}

.directives-wrapper button {
    flex: 1;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tab Management */
.tab-content {
    display: none;
    animation: classyEntry 0.8s var(--transition-premium);
}

.tab-content.active {
    display: block;
}

@keyframes classyEntry {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Elite Sidebar Optimization */
.sidebar {
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s ease;
}

/* Page Editor Component */
.elite-editor-area {
    width: 100%;
    height: 400px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 25px;
    color: #e2e8f0;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    outline: none;
    resize: none;
    transition: all 0.4s ease;
}

.elite-editor-area:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.15);
    background: rgba(0, 0, 0, 0.5);
}

#edit-modal .glass-card {
    background: rgba(5, 5, 5, 0.98);
    backdrop-filter: blur(60px) saturate(200%);
    box-shadow: 0 80px 160px rgba(0, 0, 0, 0.95);
    max-width: 1000px;
    /* Increased for better editing */
    width: 95%;
    padding: clamp(30px, 5vw, 60px);
    border-radius: 45px;
}

.footer-bottom:hover {
    opacity: 0.8;
    color: var(--accent-blue);
}

/* Responsiveness - ELITE COMMAND */
@media (max-width: 768px) {
    .premium-card {
        padding: 40px 25px;
        width: 95%;
        margin: 15px auto;
        border-radius: 35px;
        box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
    }

    .content-area {
        padding: 100px 15px 40px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .hero-header-content {
        text-align: center;
        /* Symmetry Reset */
    }

    .section-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        width: 100%;
        max-width: 400px;
        /* Constraints for better centering */
    }

    .image-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        width: 100%;
        max-width: 400px;
    }

    .page-list {
        width: 100%;
        max-width: 500px;
    }

    .page-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 30px 20px;
        width: 100%;
    }

    .page-row>div:first-child {
        margin-bottom: 15px;
    }

    .page-row>div:last-child {
        margin-top: 10px;
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }

    .page-row .btn-edit,
    .page-row .btn-premium {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    /* 30% Mobile Scale Reduction */
    .btn-premium,
    .btn-billion,
    .btn-edit {
        padding: clamp(12px, 2vw, 16px) clamp(20px, 4vw, 35px) !important;
        font-size: clamp(0.7rem, 2.5vw, 0.85rem) !important;
    }

    .protocol-status {
        font-size: 1.3rem !important;
        /* Calibrated 30% reduction for mobile */
    }

    .directives-title {
        font-size: 1.2rem !important;
        /* Dedicated 30% reduction for mobile */
    }

    .text-gradient {
        font-size: clamp(2rem, 8vw, 2.5rem) !important;
        letter-spacing: -0.04em;
        line-height: 1.1;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 100%;
    }
}

/* Logout Modal Styles */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(30px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    animation: modalFadeId 0.4s ease;
}

.logout-card {
    max-width: 400px;
    width: 90%;
    padding: 45px;
    border-radius: 45px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 50px 100px rgba(0, 0, 0, 1);
    animation: modalSlide 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeId {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modalSlide {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.modal-content {
    will-change: transform, opacity;
}

@media (max-width: 600px) {
    .placement-options {
        grid-template-columns: 1fr !important;
    }

    .modal-content {
        padding: 20px !important;
        width: 95% !important;
    }
}

/* Section-Based Editor Styles for Page Manager */
.section-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.section-card:hover {
    border-color: var(--accent-blue);
    box-shadow: 0 10px 40px rgba(0, 242, 254, 0.15);
}

@media (max-width: 600px) {
    .page-row {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px !important;
    }

    .page-row>div:last-child {
        width: 100%;
        justify-content: space-between;
    }

    .page-row .btn-premium,
    .page-row .btn-edit {
        flex: 1;
        text-align: center;
        justify-content: center;
    }
}

.section-card h3 {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-field {
    margin-bottom: 20px;
}

.section-field label {
    color: #f0f0f0;
    font-weight: 600;
    font-size: 0.95rem;
    display: block;
    margin-bottom: 8px;
}

.section-field input,
.section-field textarea {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 14px 18px;
    border-radius: 12px;
    width: 100%;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.section-field input:focus,
.section-field textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.1);
}

.section-field textarea {
    min-height: 120px;
    resize: vertical;
}

@keyframes image-fade {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.image-fade-in {
    animation: image-fade 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    will-change: transform, opacity;
}

/* Placement Modal Styles */
.placement-options::-webkit-scrollbar {
    width: 4px;
}

.placement-options::-webkit-scrollbar-thumb {
    background: var(--accent-blue);
    border-radius: 10px;
}

.placement-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 25px;
}

.placement-option {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.placement-option:hover {
    background: rgba(0, 242, 254, 0.1);
    border-color: var(--accent-blue);
    transform: translateY(-3px);
}

.placement-option h4 {
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: var(--accent-blue);
}

.placement-option p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.btn-save-section {
    background: linear-gradient(135deg, var(--accent-blue), #00c4d4);
    color: #000;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-save-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 242, 254, 0.3);
}

/* --- Admin Mobile Responsiveness Overhaul --- */
@media (max-width: 768px) {
    .content-area {
        padding: 90px 15px 30px !important;
    }

    .section-header {
        margin-bottom: 40px !important;
        text-align: center;
        align-items: center !important;
        gap: 15px !important;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .glass-card {
        padding: 20px !important;
        border-radius: 30px !important;
    }

    .stat-val {
        font-size: 2.2rem !important;
    }

    .protocol-status {
        font-size: 0.75rem !important;
    }

    .page-row {
        flex-direction: column;
        align-items: flex-start !important;
        padding: 25px !important;
        gap: 15px !important;
        border-radius: 30px !important;
    }

    .page-info {
        width: 100%;
    }

    .page-actions {
        width: 100%;
        display: flex;
        gap: 10px;
    }

    .page-actions .btn {
        flex: 1;
        padding: 12px !important;
        font-size: 0.9rem !important;
        justify-content: center;
        display: flex;
        align-items: center;
        gap: 5px;
    }

    /* Fixed Sidebar for Mobile */
    .sidebar {
        max-width: 100% !important;
        border-radius: 0 !important;
        padding: 80px 20px 40px !important;
        transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    .sidebar-logo img {
        height: 50px !important;
    }

    .nav-link {
        padding: 15px 20px !important;
        border-radius: 20px !important;
        font-size: 0.75rem !important;
    }
}

/* Tab/Small Laptop Refinement */
@media (min-width: 769px) and (max-width: 1100px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* --- Universal Modal Overlay --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 2000;
    display: flex;
    /* overridden by inline style when hidden */
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-overlay .glass-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    transform: translateY(0);
    animation: slideInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}