* { box-sizing: border-box; margin: 0; padding: 0; font-family: Arial, sans-serif; }

html { overflow-x: hidden; }

body {
    background: #f1f5f9;
    background-image:
        radial-gradient(circle at 10% 10%, rgba(99, 102, 241, 0.16) 0%, transparent 45%),
        radial-gradient(circle at 90% 90%, rgba(20, 184, 166, 0.14) 0%, transparent 45%),
        linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
    background-attachment: fixed;
    color: #1e293b;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-size: clamp(14px, 1.5vw, 16px);
}

nav {
    background: linear-gradient(90deg, #4f46e5 0%, #06b6d4 100%);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    width: 100%;
    flex-wrap: wrap;
    gap: 10px;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
    position: relative;
    z-index: 10;
}

/* Only the site header - the single <nav> that sits directly inside <body> -
   stays pinned to the top while the page scrolls. Other <nav> elements (the
   footer menu, the header's inner site menu) keep scrolling normally. */
body > nav {
    position: sticky;
    top: 0;
}
nav .nav-links {
    display: flex;
    align-items: center;
    gap: 10px;
}
nav .welcome-text {
    color: white;
    font-size: 14px;
    margin-right: 10px;
}
nav a { color: white; text-decoration: none; margin-left: 15px; font-weight: bold; transition: color 0.2s ease; }
nav a:hover { color: #e0f2fe; }
nav .btn-logout { background: linear-gradient(135deg, #ef4444, #b91c1c); padding: 6px 12px; border-radius: 6px; }
nav .btn-logout:hover { color: #fff; }
nav .logo { font-size: clamp(16px, 2.5vw, 22px); font-weight: bold; color: #fff; line-height: 1.15; }
nav .logo .logo-tagline {
    display: block;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.3px;
    opacity: 0.88;
    margin-top: 1px;
}
nav.brand-nav {
    /* Duotone animated surface: deep navy <-> electric blue, with a 3D bevel. */
    background: linear-gradient(102deg, #04101f 0%, #0a2342 26%, #10498a 50%, #0a2342 74%, #04101f 100%);
    background-size: 240% 100%;
    border-bottom: 2px solid rgba(243, 174, 24, 0.9);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        inset 0 -20px 34px -22px rgba(0, 0, 0, 0.85),
        0 12px 28px -16px rgba(2, 10, 24, 0.9);
    animation: brandNavDuotone 16s ease-in-out infinite;
}
/* Animated neon highlight on the gold line below the header. */
nav.brand-nav::after,
footer::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #f29a00 0%, #ffd34f 24%, #fff7c2 50%, #ffd34f 76%, #f29a00 100%);
    background-size: 240% 100%;
    box-shadow: 0 0 6px 1px rgba(255, 198, 36, 0.72), 0 0 15px rgba(255, 166, 0, 0.42);
    animation: brandGoldSweep 4s linear infinite, brandGoldPulse 2.4s ease-in-out infinite;
    pointer-events: none;
}
nav.brand-nav::after { bottom: 0; }
footer::after { top: 0; }
@keyframes brandGoldSweep {
    0% { background-position: 100% 0; }
    100% { background-position: -140% 0; }
}
@keyframes brandGoldPulse {
    0%, 100% {
        opacity: 0.78;
        box-shadow: 0 0 5px 1px rgba(255, 198, 36, 0.62), 0 0 12px rgba(255, 166, 0, 0.34);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 9px 2px rgba(255, 230, 112, 0.95), 0 0 22px rgba(255, 166, 0, 0.72);
    }
}
/* 3D light sweep travelling across the header */
nav.brand-nav::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(100deg, transparent 34%, rgba(40, 199, 255, 0.18) 48%, rgba(255, 255, 255, 0.15) 52%, transparent 66%);
    background-size: 260% 100%;
    animation: brandNavSweep 9s linear infinite;
    pointer-events: none;
}
@keyframes brandNavDuotone {
    0%, 100% { background-position: 0% 0; }
    50% { background-position: 100% 0; }
}
@keyframes brandNavSweep {
    0% { background-position: 190% 0; }
    100% { background-position: -60% 0; }
}
nav .brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    margin: 0;
    color: #fff;
    text-decoration: none;
}
nav .brand-lockup:hover { color: #fff; }
nav .brand-lockup > img {
    display: block;
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
}
nav .brand-copy { display: flex; flex-direction: column; gap: 3px; }
nav .brand-copy strong {
    color: #fff;
    font-size: clamp(17px, 2.2vw, 23px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
nav .brand-copy small {
    color: #f7b62a;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}
nav.brand-nav .nav-links a:not(.btn-logout) {
    padding: 9px 13px;
    margin-left: 0;
    border: 1px solid rgba(116, 196, 255, 0.22);
    border-radius: 10px;
    color: #f7fbff;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
nav.brand-nav .nav-links a:not(.btn-logout):hover {
    color: #ffd15b;
    border-color: rgba(255, 190, 45, 0.55);
    background: rgba(255, 255, 255, 0.06);
}

/* Navbar Notification Bell */
/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
    z-index: 1001;
    position: relative;
    min-width: 44px;
    min-height: 44px;
}
.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}
.mobile-menu-btn:active {
    background: rgba(255, 255, 255, 0.4);
}

/* Mobile Menu Dropdown */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    z-index: 1000;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
    transition: right 0.3s ease;
    overflow-y: auto;
}
.mobile-menu.active {
    right: 0;
}
.mobile-menu-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}
.mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.2);
}
.mobile-menu-content {
    padding: 60px 20px 20px;
}
.mobile-user-info {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-decoration: none;
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 8px;
    font-weight: 500;
    transition: background 0.3s ease, transform 0.2s ease;
}
.mobile-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-5px);
}
.mobile-menu-item svg {
    flex-shrink: 0;
}
.mobile-menu-logout {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(185, 28, 28, 0.2));
    margin-top: 20px;
}
.mobile-menu-logout:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(185, 28, 28, 0.3));
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: pointer;
}
.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Responsive: Show mobile menu button on small screens */
@media (max-width: 768px) {
    nav .nav-links {
        display: none !important;
    }
    .mobile-menu-btn {
        display: block !important;
    }
    .mobile-menu {
        display: block !important;
    }
    .mobile-menu-overlay {
        display: block !important;
    }
}

/* The admin panel uses the plain header bar (not .brand-nav), so show its
   hamburger up to the same tablet breakpoint where the dashboard sidebar
   becomes an off-canvas drawer - otherwise the menu would be unreachable. */
@media (max-width: 1024px) {
    nav:not(.brand-nav) .mobile-menu-btn {
        display: inline-flex !important;
    }
}

/* The brand header swaps to the hamburger up to 1100px, so the slide-out menu
   must be available across the same range, not only on phones. */
@media (max-width: 1100px) {
    .mobile-menu,
    .mobile-menu-overlay {
        display: block !important;
    }
}

/* Container: full-width on every page (auto-adjusts to device) */
.container {
    width: 100%;
    max-width: none;
    margin: 0;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 8px;
    border-radius: 0;
    border: none;
    box-shadow: none;
    flex: 1;
}

/* Full-width layout kept for dashboards (transparent container so it blends) */
.container.dashboard-full {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.container.dashboard-full .dashboard-wrapper {
    margin: 0;
    gap: 16px;
    width: 100%;
}

/* Withdrawal Layout & Payment Methods */
.pay-layout {
    display: grid;
    gap: 24px;
    align-items: start;
    margin-top: 20px;
}

.pay-panel {
    min-width: 0;
}

.pay-summary {
    position: sticky;
    top: 24px;
}

.info-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.15),
                0 6px 0 -1px rgba(99, 102, 241, 0.15);
    padding: 24px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #6366f1, #06b6d4);
    opacity: 0.9;
}

.pay-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 20px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 24px;
    letter-spacing: -0.8px;
    text-transform: capitalize;
}

.pay-heading svg {
    width: 22px;
    height: 22px;
    color: #6366f1;
    filter: drop-shadow(0 2px 5px rgba(99, 102, 241, 0.4));
}

.password-field {
    position: relative;
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    z-index: 2;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.password-toggle:hover {
    color: #6366f1;
}

.password-toggle.is-active {
    color: #06b6d4;
}

@media (max-width: 1024px) {
    .pay-layout {
        grid-template-columns: 1fr !important;
    }
    .pay-summary {
        position: static;
    }
}

/* Centered layout for pages without sidebar (activation page) */
.dashboard-wrapper.centered {
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 60px);
}
.dashboard-wrapper.centered .main-content {
    max-width: 600px;
    width: 100%;
}

/* Keep auth forms (login/register) centered and readable inside full-width container */
.auth-form {
    max-width: 460px;
    margin: 0 auto;
}
.auth-intro {
    max-width: 460px;
    margin: 8px auto 18px;
    text-align: center;
}
.auth-kicker {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    background: linear-gradient(90deg, #d946ef, #0d9488);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.auth-intro h2 {
    color: #0f766e;
    margin-bottom: 8px;
}
.auth-lead {
    max-width: 460px;
    margin: 0 auto 16px;
    color: #7c3aed;
    line-height: 1.5;
    font-weight: 500;
}
.auth-switch {
    max-width: 460px;
    margin: 16px auto 0;
    text-align: center;
    color: #64748b;
}
.auth-switch a,
.auth-recovery a {
    color: #4f46e5;
    font-weight: 700;
    text-decoration: none;
}
.auth-switch a:hover,
.auth-recovery a:hover {
    text-decoration: underline;
}
.auth-recovery {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
    font-size: 14px;
}
.field-hint {
    margin: -12px 0 16px;
    font-size: 12px;
    color: #64748b;
}
.optional-tag {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
}
.field-error {
    margin: -12px 0 16px;
    font-size: 13px;
    font-weight: 700;
    color: #721c24;
}
form input.input-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.18);
}

h2 { font-size: clamp(20px, 3vw, 28px); margin-bottom: 15px; color: #0f172a; }
h3 { font-size: clamp(16px, 2.2vw, 20px); margin-bottom: 10px; color: #0f172a; }

form input,
form select {
    width: 100%;
    padding: clamp(8px, 1.5vw, 12px);
    margin: 10px 0 20px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.8);
    color: #0f172a;
    border-radius: 8px;
    font-size: clamp(14px, 1.5vw, 16px);
}
form input::placeholder { color: #94a3b8; }
form input:focus,
form select:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.18); }
form button {
    width: 100%;
    padding: clamp(10px, 2vw, 14px);
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: clamp(14px, 1.8vw, 16px);
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}
form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(99, 102, 241, 0.45);
}

.password-field {
    position: relative;
    margin: 10px 0 20px;
}
.password-field input {
    margin: 0;
    padding-right: 48px;
}
.password-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: auto !important;
    min-width: 36px;
    height: 36px;
    padding: 4px !important;
    margin: 0;
    background: transparent !important;
    box-shadow: none !important;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
}
.password-toggle:hover {
    transform: translateY(-50%) !important;
    box-shadow: none !important;
    color: #4f46e5;
}
.password-toggle.is-active {
    color: #4f46e5;
}
.password-toggle svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.alert { padding: 10px; margin-bottom: 15px; border-radius: 4px; text-align: center; }
.alert-error { background: #f8d7da; color: #721c24; }
.alert-success { background: #d4edda; color: #155724; }

/* ============ Modern Two-Tone Dashboard (Indigo + Teal) ============ */
:root {
    --indigo-600: #eeeef0;
    --indigo-500: #e92e16;
    --indigo-400: #818cf8;
    --teal-500:   #14b8a6;
    --teal-400:   #2dd4bf;
    --violet-500: #8b5cf6;
    --dark-900:   #ffffff;
    --dark-800:   #1e293b;
    --surface:    #ffffff;
    --bg-soft:    #f1f5f9;
    /* Shared horizontal size for every "Save" button so they all line up */
    --save-btn-width: 260px;
}

.dashboard-wrapper {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    animation: fadeIn 0.5s ease both;
}

/* ---- Sidebar (Light Two-Tone Glass) ---- */
.sidebar {
    width: 280px;
    background: #ffffff;
    color: #0f172a;
    padding: 24px 18px;
    border-radius: 22px;
    min-height: 400px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 18px 40px -14px rgba(15, 23, 42, 0.18),
        0 0 0 1px rgba(15, 23, 42, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    animation: slideInLeft 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
    transition: transform 0.3s ease, visibility 0.3s ease;
    z-index: 1001;
}

.dashboard-mobile-profile {
    display: none;
}

/* Sidebar Toggle for Mobile */
@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        border-radius: 0 22px 22px 0;
        transform: translateX(-100%);
        visibility: hidden;
        overflow-y: auto;
        /* Kill the entrance animation so its final keyframe cannot override the
           off-canvas transform and force the drawer open. */
        animation: none;
    }
    .sidebar.active {
        transform: translateX(0);
        visibility: visible;
        box-shadow: 20px 0 60px rgba(0,0,0,0.15);
    }
    .dashboard-wrapper {
        flex-direction: column;
        margin-top: 0;
        /* Kill the fadeIn animation: with fill-mode:both it keeps a stacking
           context that traps the slide-out sidebar under the page overlay,
           making the open drawer un-clickable and un-scrollable. */
        animation: none;
    }
    .main-content {
        width: 100% !important;
        padding: 20px 14px !important;
    }
    .dashboard-mobile-profile {
        display: block;
        margin-top: 10px;
        margin-bottom: 20px;
        background: #ffffff;
        padding: 24px 20px;
        border-radius: 22px;
        box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
        border: 1px solid rgba(15, 23, 42, 0.05);
    }
    .dashboard-mobile-profile .sidebar-profile {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }
}

/* Diagonal two-tone split - soft Indigo top-left, soft Teal bottom-right */
.sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg,
            rgba(99, 102, 241, 0.10) 0%,
            rgba(139, 92, 246, 0.06) 38%,
            rgba(255, 255, 255, 0.85) 50%,
            rgba(20, 184, 166, 0.08) 62%,
            rgba(6, 182, 212, 0.10) 100%);
    background-size: 220% 220%;
    animation: twoToneFlow 14s ease-in-out infinite alternate;
    pointer-events: none;
}

/* glossy sheen sweep */
.sidebar::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(160deg,
            rgba(255, 255, 255, 0.55) 0%,
            rgba(255, 255, 255, 0.18) 18%,
            transparent 40%,
            transparent 70%,
            rgba(255, 255, 255, 0.25) 100%);
    pointer-events: none;
}

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

.sidebar-profile {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
.avatar-wrapper {
    position: relative;
    width: 72px;
    margin: 0 auto 12px;
}
.avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: bold;
    color: white;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.9), 0 8px 22px rgba(99, 102, 241, 0.4);
    animation: pulseRing 2.5s ease-in-out infinite, gradientShift 6s ease infinite;
    overflow: hidden;
}

/* ---- Ranked avatar frames (Neon Energy Edition) -----------------------------
   High-intensity neon/energy ring with a vibrant animated aura. The color 
   scheme dynamically adapts to the membership package. */

.avatar-wrapper {
    position: relative;
    width: 72px;
    height: 72px;
    margin: 0 auto 32px; /* Balanced space for the badge */
}

/* The Glowing Energy Aura */
.avatar-wrapper[class*="frame-"]::before {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--ring-a), var(--ring-b), var(--ring-spark), var(--ring-a));
    animation: avatarRingSpin var(--ring-speed, 3s) linear infinite;
    z-index: 0;
    /* Intense Neon Glow */
    box-shadow: 0 0 20px var(--ring-glow), 0 0 40px var(--ring-glow-outer, transparent);
    filter: blur(1px);
}

/* Inner Refinement Ring */
.avatar-wrapper[class*="frame-"]::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    pointer-events: none;
    z-index: 2;
    mix-blend-mode: overlay;
    animation: neonPulse 2s ease-in-out infinite;
}

/* Rank Badge (Neon Label) */
.rank-badge {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: #000; /* Pure black box */
    color: #fff !important; /* Force white text */
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 8.5px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px var(--ring-glow);
    text-shadow: none; /* Clean white text, no glow */
    animation: badgeFloat 3s ease-in-out infinite;
}

/* Legendary Supervisor Neon Frame */
.frame-supervisor { 
    --ring-a: #fbbf24; --ring-b: #f59e0b; --ring-spark: #fff; 
    --ring-glow: rgba(251, 191, 36, 0.6); --ring-glow-outer: rgba(251, 191, 36, 0.3);
    --ring-speed: 1.8s; 
}
.frame-supervisor::before {
    background: conic-gradient(from 0deg, #fbbf24, #ef4444, #d946ef, #fbbf24);
}
.frame-supervisor .rank-badge {
    border-color: #fbbf24;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.5);
}

/* Fallback for new packages added by admin (Dynamic Hue) */
.avatar-wrapper.frame-custom {
    --ring-a: hsl(var(--frame-hue), 100%, 65%);
    --ring-b: hsl(var(--frame-hue), 100%, 45%);
    --ring-spark: #fff;
    --ring-glow: hsla(var(--frame-hue), 100%, 60%, 0.6);
    --ring-glow-outer: hsla(var(--frame-hue), 100%, 60%, 0.3);
    --ring-speed: 2.8s;
}

/* Vibrant Neon Palettes for Known Tiers */
.frame-basic    { --ring-a:#6366f1; --ring-b:#4f46e5; --ring-spark:#fff; --ring-glow:rgba(99,102,241,0.6); --ring-speed:4s; }
.frame-bronze   { --ring-a:#fb923c; --ring-b:#ea580c; --ring-spark:#fff; --ring-glow:rgba(251,146,60,0.6); --ring-speed:3.5s; }
.frame-silver   { --ring-a:#cbd5e1; --ring-b:#64748b; --ring-spark:#fff; --ring-glow:rgba(203,213,225,0.5); --ring-speed:3.2s; }
.frame-gold     { --ring-a:#facc15; --ring-b:#a16207; --ring-spark:#fff; --ring-glow:rgba(250,204,21,0.7); --ring-speed:2.8s; }
.frame-platinum { --ring-a:#38bdf8; --ring-b:#0369a1; --ring-spark:#fff; --ring-glow:rgba(56,189,248,0.6); --ring-speed:2.5s; }
.frame-diamond  { --ring-a:#22d3ee; --ring-b:#0e7490; --ring-spark:#fff; --ring-glow:rgba(34,211,238,0.7); --ring-speed:2.2s; }
.frame-ruby     { --ring-a:#f87171; --ring-b:#991b1b; --ring-spark:#fff; --ring-glow:rgba(248,113,113,0.7); --ring-speed:2.4s; }
.frame-titanium { --ring-a:#94a3b8; --ring-b:#1e293b; --ring-spark:#fff; --ring-glow:rgba(148,163,184,0.5); --ring-speed:3s; }
.frame-obsidian { --ring-a:#a78bfa; --ring-b:#581c87; --ring-spark:#fff; --ring-glow:rgba(167,139,250,0.7); --ring-speed:2.6s; }

@keyframes avatarRingSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes neonPulse { 0%, 100% { opacity: 0.4; transform: scale(1); } 50% { opacity: 1; transform: scale(1.02); } }
@keyframes badgeFloat { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-2px); } }

.avatar-wrapper[class*="frame-"] .avatar {
    position: relative;
    z-index: 1;
    border: 3px solid #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}
.avatar-wrapper[class*="frame-"] .avatar-camera { z-index: 15; }

.avatar-camera {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid rgba(255,255,255,0.85);
    box-shadow: 0 3px 12px rgba(15,23,42,0.3);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.avatar-wrapper:hover .avatar-camera {
    opacity: 1;
}
.avatar-camera:hover {
    transform: translate(-50%, -50%) scale(1.12);
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.5);
}
.sidebar-user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-top: 12px;
}

.sidebar-username {
    font-size: 18px;
    margin: 0;
    color: #0f172a;
    letter-spacing: 0.3px;
    font-weight: 800;
}

.sidebar-user-id {
    font-size: 11px;
    font-weight: 700;
    color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
    padding: 2px 10px;
    border-radius: 999px;
    margin-bottom: 2px;
}

.sidebar-join-date {
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    background: rgba(15, 23, 42, 0.05);
    padding: 2px 8px;
    border-radius: 999px;
}
/* ---- Modern Glassmorphic Menu Buttons (icon + label) ---- */
/* Category wrapper: lets a long menu be split into labelled sections. */
.sidebar-nav {
    display: flex;
    flex-direction: column;
}
.sidebar-group {
    margin-bottom: 4px;
}
/* Category chip: each section gets its own colour identity through --gc/--gc2
   (base + accent as raw RGB triplets) so the header reads as a raised pill. */
.sidebar-group-title {
    --gc: 99, 102, 241;
    --gc2: 6, 182, 212;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    margin: 18px 0 10px;
    padding: 5px 13px 5px 10px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: rgb(var(--gc));
    border-radius: 999px;
    background:
        linear-gradient(120deg, rgba(var(--gc), 0.20), rgba(var(--gc2), 0.10) 70%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.35));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.85),
        inset 0 0 0 1px rgba(var(--gc), 0.22),
        0 8px 16px -12px rgba(var(--gc), 0.9);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}
/* Glowing diamond marker */
.sidebar-group-title::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 2px;
    transform: rotate(45deg);
    background: linear-gradient(135deg, rgb(var(--gc)), rgb(var(--gc2)));
    box-shadow: 0 0 9px rgba(var(--gc), 0.85);
}
.sidebar-group:first-child .sidebar-group-title {
    margin-top: 2px;
}
/* Colour identity per section */
.sidebar-group-title.g-dashboard { --gc: 99, 102, 241;  --gc2: 139, 92, 246; }
.sidebar-group-title.g-members   { --gc: 37, 99, 235;   --gc2: 6, 182, 212; }
.sidebar-group-title.g-support   { --gc: 14, 165, 233;  --gc2: 6, 182, 212; }
.sidebar-group-title.g-finance   { --gc: 5, 150, 105;   --gc2: 20, 184, 166; }
.sidebar-group-title.g-earning   { --gc: 217, 119, 6;   --gc2: 234, 88, 12; }
.sidebar-group-title.g-content   { --gc: 124, 58, 237;  --gc2: 162, 28, 175; }
.sidebar-group-title.g-home-settings { --gc: 8, 118, 232; --gc2: 6, 182, 212; }
.sidebar-group-title.g-seo       { --gc: 5, 150, 105;   --gc2: 13, 148, 136; }
.sidebar-group-title.g-shopping  { --gc: 79, 70, 229;   --gc2: 37, 99, 235; }
.sidebar-group-title.g-system    { --gc: 71, 85, 105;   --gc2: 15, 23, 42; }
.sidebar-group-title.g-cache     { --gc: 8, 145, 178;   --gc2: 14, 116, 144; }
.sidebar-group-title.g-security  { --gc: 225, 29, 72;  --gc2: 190, 18, 60; }

/* Admin sidebar categories expand and collapse on click. */
.admin-sidebar-toggle {
    width: 100%;
    min-height: 44px;
    margin-top: 14px;
    margin-bottom: 8px;
    padding: 9px 15px 9px 13px;
    justify-content: flex-start;
    gap: 11px;
    text-align: left;
    font-family: inherit;
    font-size: 12px;
    letter-spacing: 1.35px;
    cursor: pointer;
    border: 0;
    border-radius: 14px;
    transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.24s ease, filter 0.24s ease;
}
.admin-sidebar-toggle::after {
    content: "";
    flex: 0 0 7px;
    width: 7px;
    height: 7px;
    margin-left: auto;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.22s ease;
}
.admin-sidebar-group.is-open > .admin-sidebar-toggle::after {
    transform: rotate(225deg) translateY(-2px);
    filter: drop-shadow(0 0 3px currentColor);
}
.admin-sidebar-toggle:hover {
    transform: translateY(-2px);
    filter: brightness(1.03);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 0 0 1px rgba(var(--gc), 0.3),
        0 9px 18px -12px rgba(var(--gc), 0.85);
}
.admin-sidebar-toggle:hover::before {
    animation: adminSidebarMarkerPulse 0.9s ease-in-out infinite alternate;
}
.admin-sidebar-group.is-open > .admin-sidebar-toggle {
    filter: saturate(1.2);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 0 0 1px rgba(var(--gc), 0.32),
        0 0 0 3px rgba(var(--gc), 0.07),
        0 10px 20px -12px rgba(var(--gc), 0.9);
    animation: adminSidebarOpenGlow 2.8s ease-in-out infinite;
}
.admin-sidebar-group.is-open > .admin-sidebar-toggle::before {
    animation: adminSidebarMarkerPulse 1.7s ease-in-out infinite;
}
.admin-sidebar-toggle:focus-visible {
    outline: 2px solid rgba(8, 118, 232, 0.45);
    outline-offset: 2px;
}
@keyframes adminSidebarMarkerPulse {
    from { transform: rotate(45deg) scale(0.9); }
    to { transform: rotate(45deg) scale(1.2); }
}
@keyframes adminSidebarOpenGlow {
    0%, 100% {
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.95),
            inset 0 0 0 1px rgba(var(--gc), 0.3),
            0 0 0 3px rgba(var(--gc), 0.06),
            0 10px 20px -12px rgba(var(--gc), 0.8);
    }
    50% {
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.95),
            inset 0 0 0 1px rgba(var(--gc), 0.4),
            0 0 0 4px rgba(var(--gc), 0.1),
            0 12px 24px -12px rgba(var(--gc), 0.95);
    }
}
.admin-sidebar-group > .btn-3d-grid,
.admin-sidebar-group > .home-settings-nav {
    max-height: 0;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: max-height 0.3s ease, opacity 0.2s ease, padding 0.25s ease, visibility 0.3s;
}
.admin-sidebar-group.is-open > .btn-3d-grid,
.admin-sidebar-group.is-open > .home-settings-nav {
    max-height: 1400px;
    padding-top: 8px;
    padding-bottom: 8px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
@media (prefers-reduced-motion: reduce) {
    .admin-sidebar-toggle,
    .admin-sidebar-toggle::after,
    .admin-sidebar-group > .btn-3d-grid,
    .admin-sidebar-group > .home-settings-nav {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}

.home-settings-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 4px 2px 10px 8px;
}
.home-settings-nav-link {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 40px;
    padding: 7px 10px;
    border: 1px solid rgba(15, 23, 42, 0.07);
    border-radius: 11px;
    background: rgba(241, 245, 249, 0.62);
    color: #334155;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.3;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}
.home-settings-nav-link:hover {
    transform: translateX(2px);
    border-color: rgba(8, 118, 232, 0.25);
    background: rgba(219, 239, 255, 0.8);
    color: #075eb8;
}
.home-settings-nav-link.active {
    border-color: rgba(8, 118, 232, 0.24);
    background: linear-gradient(110deg, rgba(8, 118, 232, 0.14), rgba(6, 182, 212, 0.08));
    color: #075eb8;
    box-shadow: inset 3px 0 #0876e8, 0 4px 12px rgba(8, 118, 232, 0.08);
}
.home-settings-nav-icon {
    display: inline-flex;
    flex: 0 0 24px;
    align-items: center;
    justify-content: center;
    height: 24px;
    width: 24px;
    border-radius: 7px;
    background: rgba(8, 118, 232, 0.09);
    color: #0876e8;
}
.home-settings-nav-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.home-section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 14px;
}
.home-section-action {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 13px;
    border: 1px solid rgba(8, 118, 232, 0.18);
    border-radius: 10px;
    background: rgba(8, 118, 232, 0.07);
    color: #075eb8;
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
}
.home-section-action:hover {
    background: rgba(8, 118, 232, 0.13);
}

.btn-3d-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 8px 2px;
}

.btn-3d {
    display: flex;
    align-items: center;
    gap: 13px;
    width: 100%;
    height: 54px;
    padding: 0 14px 0 10px;
    border-radius: 16px;
    color: #334155;
    text-decoration: none;
    background: rgba(241, 245, 249, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease,
                background 0.3s ease,
                border-color 0.3s ease,
                color 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* glossy light sweep on hover */
.btn-3d::before {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
}
.btn-3d:hover::before {
    left: 130%;
}

.btn-3d svg {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 7px;
    border-radius: 11px;
    background: rgba(99, 102, 241, 0.12);
    stroke: #4f46e5;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.btn-3d .btn-label {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.btn-3d:hover {
    transform: translateX(7px) translateY(-2px);
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(99, 102, 241, 0.25);
    color: #0f172a;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.15);
}

.btn-3d:hover svg {
    transform: scale(1.12) rotate(-6deg);
}

.btn-3d:active {
    transform: translateX(3px) translateY(0);
}

/* active state — indigo gradient glow (Overview) */
.btn-3d.active {
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
    box-shadow: 0 8px 22px rgba(99, 102, 241, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    text-shadow: 0 1px 3px rgba(15, 23, 42, 0.58);
}
.btn-3d.active .btn-label { font-weight: 750; }
.btn-3d.active svg {
    background: rgba(255, 255, 255, 0.25);
    stroke: #fff;
}
.btn-3d.active:hover {
    color: #ffffff;
}

/* ---- Main Content (light two-tone glassmorphic, matches sidebar) ---- */
.main-content {
    flex: 1;
    padding: 28px;
    border-radius: 22px;
    min-width: 0;
    color: #0f172a;
    background: #ffffff;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 18px 40px -14px rgba(15, 23, 42, 0.18),
        0 0 0 1px rgba(15, 23, 42, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    animation: slideInRight 0.6s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

/* Two-tone diagonal gradient backdrop (indigo -> teal), matches sidebar */
.main-content::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg,
            rgba(99, 102, 241, 0.08) 0%,
            rgba(139, 92, 246, 0.05) 30%,
            rgba(255, 255, 255, 0.9) 52%,
            rgba(20, 184, 166, 0.07) 72%,
            rgba(6, 182, 212, 0.09) 100%);
    background-size: 220% 220%;
    animation: twoToneFlow 14s ease-in-out infinite alternate;
    pointer-events: none;
}
.main-content::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(160deg,
            rgba(255, 255, 255, 0.5) 0%,
            rgba(255, 255, 255, 0.12) 18%,
            transparent 40%,
            transparent 70%,
            rgba(255, 255, 255, 0.2) 100%);
    pointer-events: none;
}
.main-content > * { position: relative; z-index: 1; }

.content-header {
    margin-bottom: 22px;
}

.content-header h2 {
    margin-bottom: 6px;
    background: linear-gradient(90deg, #4f46e5, #06b6d4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-left h2 {
    margin-bottom: 6px;
    background: linear-gradient(90deg, #4f46e5, #06b6d4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.greeting {
    font-size: 15px;
    color: #475569;
}
.greeting strong {
    background: linear-gradient(90deg, #6366f1, #06b6d4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ---- Stat Cards v8 (Aurora Gradient Glass) ---- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 24px;
    margin-bottom: 35px;
}

.stat-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 24px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 
        0 8px 32px rgba(31, 38, 135, 0.07),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    overflow: hidden;
    min-height: 160px;
    justify-content: space-between;
}

/* Aurora animated background blobs */
.stat-card::before {
    content: "";
    position: absolute;
    top: -20%;
    right: -20%;
    width: 140px;
    height: 140px;
    background: var(--card-accent, linear-gradient(135deg, #6366f1, #06b6d4));
    filter: blur(50px);
    border-radius: 50%;
    opacity: 0.15;
    z-index: 0;
    transition: all 0.6s ease;
}

.stat-card::after {
    content: "";
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: 100px;
    height: 100px;
    background: var(--card-accent, linear-gradient(135deg, #06b6d4, #6366f1));
    filter: blur(40px);
    border-radius: 50%;
    opacity: 0.1;
    z-index: 0;
    transition: all 0.6s ease;
}

.stat-card:hover {
    transform: translateY(-10px) scale(1.02);
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--icon-color, rgba(99, 102, 241, 0.5));
    box-shadow: 
        0 20px 40px rgba(31, 38, 135, 0.15),
        0 0 20px var(--card-glow, rgba(99, 102, 241, 0.2));
}

.stat-card:hover::before {
    transform: scale(1.4) translate(-10%, 10%);
    opacity: 0.25;
}

.stat-icon {
    position: relative;
    z-index: 1;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: var(--icon-bg, linear-gradient(135deg, #6366f1, #06b6d4));
    color: #fff;
    margin-bottom: 15px;
    box-shadow: 
        0 10px 20px -5px var(--card-glow, rgba(99, 102, 241, 0.5)),
        inset 0 -3px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.stat-icon svg {
    width: 26px;
    height: 26px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.stat-card:hover .stat-icon {
    transform: scale(1.15) rotate(8deg);
    box-shadow: 0 15px 25px -5px var(--card-glow, rgba(99, 102, 241, 0.6));
}

.stat-info {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: clamp(20px, 2.5vw, 24px);
    font-weight: 900;
    line-height: 1.1;
    background: var(--value-grad, linear-gradient(90deg, #1e293b, #334155));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
    transition: all 0.3s ease;
}

.stat-value-sm {
    font-size: 18px;
}

.stat-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    opacity: 0.8;
}

/* Colorful Themes for v8 */
.stat-income        { --card-glow: rgba(245, 158, 11, 0.5); --card-accent: linear-gradient(135deg, #f59e0b, #fbbf24); --icon-bg: linear-gradient(135deg, #f59e0b, #fbbf24); --icon-color: #f59e0b; --value-grad: linear-gradient(90deg, #d97706, #f59e0b); }
.stat-package       { --card-glow: rgba(168, 85, 247, 0.5); --card-accent: linear-gradient(135deg, #a855f7, #c084fc); --icon-bg: linear-gradient(135deg, #a855f7, #c084fc); --icon-color: #9333ea; --value-grad: linear-gradient(90deg, #7c3aed, #a855f7); }
.stat-diamonds      { --card-glow: rgba(6, 182, 212, 0.5);  --card-accent: linear-gradient(135deg, #0891b2, #22d3ee); --icon-bg: linear-gradient(135deg, #0891b2, #22d3ee); --icon-color: #0891b2; --value-grad: linear-gradient(90deg, #0891b2, #06b6d4); }
.stat-balance       { --card-glow: rgba(16, 185, 129, 0.5); --card-accent: linear-gradient(135deg, #16a34a, #34d399); --icon-bg: linear-gradient(135deg, #16a34a, #34d399); --icon-color: #16a34a; --value-grad: linear-gradient(90deg, #059669, #10b981); }
.stat-investment    { --card-glow: rgba(99, 102, 241, 0.5); --card-accent: linear-gradient(135deg, #4f46e5, #818cf8); --icon-bg: linear-gradient(135deg, #4f46e5, #818cf8); --icon-color: #4f46e5; --value-grad: linear-gradient(90deg, #4f46e5, #6366f1); }
.stat-today         { --card-glow: rgba(236, 72, 153, 0.5); --card-accent: linear-gradient(135deg, #db2777, #f472b6); --icon-bg: linear-gradient(135deg, #db2777, #f472b6); --icon-color: #db2777; --value-grad: linear-gradient(90deg, #db2777, #ec4899); }
.stat-direct        { --card-glow: rgba(34, 197, 94, 0.5);  --card-accent: linear-gradient(135deg, #15803d, #22c55e); --icon-bg: linear-gradient(135deg, #15803d, #22c55e); --icon-color: #15803d; --value-grad: linear-gradient(90deg, #16a34a, #22c55e); }
.stat-indirect      { --card-glow: rgba(14, 165, 233, 0.5); --card-accent: linear-gradient(135deg, #0284c7, #0ea5e9); --icon-bg: linear-gradient(135deg, #0284c7, #0ea5e9); --icon-color: #0284c7; --value-grad: linear-gradient(90deg, #0284c7, #0ea5e9); }
.stat-level         { --card-glow: rgba(234, 179, 8, 0.5);  --card-accent: linear-gradient(135deg, #a16207, #eab308); --icon-bg: linear-gradient(135deg, #a16207, #eab308); --icon-color: #a16207; --value-grad: linear-gradient(90deg, #b45309, #eab308); }
.stat-users         { --card-glow: rgba(139, 92, 246, 0.5); --card-accent: linear-gradient(135deg, #7c3aed, #8b5cf6); --icon-bg: linear-gradient(135deg, #7c3aed, #8b5cf6); --icon-color: #7c3aed; --value-grad: linear-gradient(90deg, #6d28d9, #8b5cf6); }
.stat-revenue       { --card-glow: rgba(16, 185, 129, 0.5); --card-accent: linear-gradient(135deg, #059669, #10b981); --icon-bg: linear-gradient(135deg, #059669, #10b981); --icon-color: #059669; --value-grad: linear-gradient(90deg, #047857, #10b981); }
.stat-balance-total { --card-glow: rgba(245, 158, 11, 0.5); --card-accent: linear-gradient(135deg, #d97706, #f59e0b); --icon-bg: linear-gradient(135deg, #d97706, #f59e0b); --icon-color: #d97706; --value-grad: linear-gradient(90deg, #b45309, #f59e0b); }
.stat-diamonds         { --card-glow: rgba(249, 115, 22, 0.5); --card-accent: linear-gradient(135deg, #c2410c, #f97316); --icon-bg: linear-gradient(135deg, #c2410c, #f97316); --icon-color: #c2410c; --value-grad: linear-gradient(90deg, #c2410c, #f97316); }
.stat-pending       { --card-glow: rgba(236, 72, 153, 0.5); --card-accent: linear-gradient(135deg, #be185d, #ec4899); --icon-bg: linear-gradient(135deg, #be185d, #ec4899); --icon-color: #be185d; --value-grad: linear-gradient(90deg, #be185d, #ec4899); }
.stat-txcount       { --card-glow: rgba(139, 92, 246, 0.5); --card-accent: linear-gradient(135deg, #7c3aed, #8b5cf6); --icon-bg: linear-gradient(135deg, #7c3aed, #8b5cf6); --icon-color: #7c3aed; --value-grad: linear-gradient(90deg, #6d28d9, #8b5cf6); }






/* Restore instructions: The previous v2 and v1 styles are removed to keep the file clean. 
   If you need them back, let me know. */


/* ---- Unique identity per stat card ---- */
.stat-income {
    --card-accent: linear-gradient(180deg, #fbbf24, #f59e0b);
    --card-glow: rgba(251, 191, 36, 0.4);
    --icon-bg: linear-gradient(135deg, #fbbf24, #f59e0b);
    --icon-shadow: 0 4px 14px rgba(245, 158, 11, 0.5);
}
.stat-package {
    --card-accent: linear-gradient(180deg, #a855f7, #7c3aed);
    --card-glow: rgba(168, 85, 247, 0.4);
    --icon-bg: linear-gradient(135deg, #a855f7, #7c3aed);
    --icon-shadow: 0 4px 14px rgba(168, 85, 247, 0.5);
}
.stat-diamonds {
    --card-accent: linear-gradient(180deg, #22d3ee, #0891b2);
    --card-glow: rgba(34, 211, 238, 0.4);
    --icon-bg: linear-gradient(135deg, #22d3ee, #0891b2);
    --icon-shadow: 0 4px 14px rgba(34, 211, 238, 0.5);
}
.stat-balance {
    --card-accent: linear-gradient(180deg, #34d399, #059669);
    --card-glow: rgba(52, 211, 153, 0.4);
    --icon-bg: linear-gradient(135deg, #34d399, #059669);
    --icon-shadow: 0 4px 14px rgba(52, 211, 153, 0.5);
}
.stat-investment {
    --card-accent: linear-gradient(180deg, #8b5cf6, #7c3aed);
    --card-glow: rgba(139, 92, 246, 0.4);
    --icon-bg: linear-gradient(135deg, #8b5cf6, #7c3aed);
    --icon-shadow: 0 4px 14px rgba(139, 92, 246, 0.5);
}
.stat-today {
    --card-accent: linear-gradient(180deg, #f472b6, #db2777);
    --card-glow: rgba(244, 114, 182, 0.4);
    --icon-bg: linear-gradient(135deg, #f472b6, #db2777);
    --icon-shadow: 0 4px 14px rgba(244, 114, 182, 0.5);
}
.stat-direct {
    --card-accent: linear-gradient(180deg, #22c55e, #16a34a);
    --card-glow: rgba(34, 197, 94, 0.4);
    --icon-bg: linear-gradient(135deg, #22c55e, #16a34a);
    --icon-shadow: 0 4px 14px rgba(34, 197, 94, 0.5);
}
.stat-indirect {
    --card-accent: linear-gradient(180deg, #06b6d4, #0891b2);
    --card-glow: rgba(6, 182, 212, 0.4);
    --icon-bg: linear-gradient(135deg, #06b6d4, #0891b2);
    --icon-shadow: 0 4px 14px rgba(6, 182, 212, 0.5);
}
.stat-level {
    --card-accent: linear-gradient(180deg, #fde047, #eab308);
    --card-glow: rgba(253, 224, 71, 0.45);
    --icon-bg: linear-gradient(135deg, #fde047, #eab308);
    --icon-shadow: 0 4px 14px rgba(234, 179, 8, 0.55);
}
.stat-totalinv {
    --card-accent: linear-gradient(180deg, #5eead4, #0d9488);
    --card-glow: rgba(13, 148, 136, 0.45);
    --icon-bg: linear-gradient(135deg, #2dd4bf, #0d9488);
    --icon-color: #0d9488;
    --value-grad: linear-gradient(90deg, #0f766e, #14b8a6);
    --icon-shadow: 0 4px 14px rgba(13, 148, 136, 0.5);
}

/* ---- Info Cards (glassmorphic light) ---- */
.info-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 22px;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    margin-bottom: 18px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(6, 182, 212, 0.12);
    border-color: rgba(6, 182, 212, 0.3);
}
.info-card h3 {
    margin-bottom: 14px;
    color: #0f172a;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(15, 23, 42, 0.08);
}
.info-card.accent {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(20, 184, 166, 0.08));
    border-color: rgba(99, 102, 241, 0.15);
}

/* ---- Referral Link Card ---- */
.referral-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(6, 182, 212, 0.08));
    border-color: rgba(99, 102, 241, 0.15);
}
.referral-hint {
    font-size: 13px;
    color: #475569;
    margin-bottom: 14px;
    line-height: 1.5;
}
.referral-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.referral-input {
    flex: 1;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    color: #0f172a;
    font-size: 13px;
    font-family: monospace;
    outline: none;
}
.referral-copy-btn {
    padding: 0 20px;
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    white-space: nowrap;
}
.referral-copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(99, 102, 241, 0.45);
}
.referral-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.ref-stat {
    text-align: center;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    padding: 14px 8px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.ref-stat:hover {
    transform: translateY(-3px);
    border-color: rgba(6, 182, 212, 0.4);
}
.ref-stat-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(90deg, #4f46e5, #06b6d4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}
.ref-stat-label {
    display: block;
    font-size: 11px;
    color: #64748b;
    margin-top: 6px;
    font-weight: 500;
}

@media (max-width: 480px) {
    .referral-box { flex-direction: column; }
    .referral-stats { grid-template-columns: 1fr; }
}

/* ============ Packages Page ============ */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 22px;
}
.package-card {
    background: linear-gradient(145deg, var(--pkg-surface, rgba(255, 255, 255, 0.85)), rgba(255, 255, 255, 0.94));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 36px 28px 28px;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    text-align: center;
    border: 1px solid var(--pkg-border, rgba(15, 23, 42, 0.08));
    box-shadow:
        0 8px 0 -1px rgba(15, 23, 42, 0.08),
        0 24px 40px -20px rgba(15, 23, 42, 0.12);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.35s ease,
                border-color 0.35s ease;
    position: relative;
    overflow: hidden;
}
.package-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 5px;
    background: var(--pkg-accent, linear-gradient(90deg, #6366f1, #06b6d4));
}
.package-card::after {
    content: "";
    position: absolute;
    top: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--pkg-glow, rgba(99, 102, 241, 0.25));
    filter: blur(24px);
    opacity: 0.7;
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.package-card:hover {
    transform: translateY(-10px) rotateX(3deg) rotateY(-1.5deg);
    border-color: var(--pkg-glow, rgba(99, 102, 241, 0.4));
    box-shadow:
        0 12px 0 -1px rgba(15, 23, 42, 0.1),
        0 34px 54px -20px rgba(15, 23, 42, 0.18);
}
.package-card:hover::after {
    opacity: 1;
    transform: scale(1.15);
}
.package-popular {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    padding: 5px 10px;
    border-radius: 999px;
    box-shadow: 0 4px 10px rgba(217, 119, 6, 0.4);
    line-height: 1;
}
.package-icon {
    width: 72px;
    height: 72px;
    margin: 6px auto 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pkg-accent, linear-gradient(135deg, #6366f1, #06b6d4));
    box-shadow: var(--pkg-shadow, 0 6px 18px rgba(99, 102, 241, 0.4));
    position: relative;
    z-index: 1;
}
.package-icon svg {
    width: 34px;
    height: 34px;
    stroke: #fff;
    fill: none;
}
.package-name {
    font-size: 18px;
    font-weight: 800;
    color: var(--pkg-title, #7c3aed);
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
}
.package-price {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--pkg-price, #06b6d4);
    margin: 0 0 16px;
    position: relative;
    z-index: 1;
}
.package-price-original {
    color: #64748b;
    font-size: 0.56em;
    font-weight: 600;
    text-decoration: line-through;
    vertical-align: middle;
    margin-right: 7px;
}
.package-discount-badge {
    display: inline-block;
    padding: 3px 7px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.38em;
    font-weight: 800;
    letter-spacing: 0;
    vertical-align: middle;
}
.package-card-discount-badge {
    position: absolute;
    top: 48px;
    right: -25px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 190px;
    height: 34px;
    padding: 0;
    border-radius: 3px;
    font-size: 16px;
    letter-spacing: 0.3px;
    text-align: center;
    transform: rotate(43deg);
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.28);
}
.package-price-offer {
    display: block;
    margin-top: 3px;
    color: inherit;
    font-size: inherit;
    font-weight: 800;
}
.package-details {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    text-align: left;
    position: relative;
    z-index: 1;
    flex: 1;
}
.package-details li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(15, 23, 42, 0.08);
    font-size: 13px;
    font-weight: 700;
    color: var(--pkg-title, #7c3aed);
}
.package-details li:last-child {
    border-bottom: none;
}
.package-details strong {
    color: var(--pkg-price, #06b6d4);
    font-weight: 800;
    text-align: right;
}
.package-btn {
    display: inline-block;
    margin-top: auto;
    padding: 10px 22px;
    border-radius: 12px;
    background: var(--pkg-accent, linear-gradient(135deg, #6366f1, #06b6d4));
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    box-shadow: var(--pkg-shadow, 0 4px 12px rgba(99, 102, 241, 0.3));
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    z-index: 1;
}
.package-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.2);
}

/* Package identity colors */
.pkg-bronze {
    --pkg-accent: linear-gradient(135deg, #cd7f32, #b87333);
    --pkg-glow: rgba(205, 127, 50, 0.35);
    --pkg-shadow: 0 6px 18px rgba(205, 127, 50, 0.45);
    --pkg-title: #c2410c;
    --pkg-price: #ea580c;
}
.pkg-silver {
    --pkg-accent: linear-gradient(135deg, #cbd5e1, #94a3b8);
    --pkg-glow: rgba(148, 163, 184, 0.35);
    --pkg-shadow: 0 6px 18px rgba(148, 163, 184, 0.45);
    --pkg-title: #0284c7;
    --pkg-price: #0ea5e9;
}
.pkg-gold {
    --pkg-accent: linear-gradient(135deg, #fbbf24, #d97706);
    --pkg-glow: rgba(251, 191, 36, 0.4);
    --pkg-shadow: 0 6px 18px rgba(217, 119, 6, 0.45);
    --pkg-title: #ca8a04;
    --pkg-price: #eab308;
}
.pkg-platinum {
    --pkg-accent: linear-gradient(135deg, #a5b4fc, #6366f1);
    --pkg-glow: rgba(99, 102, 241, 0.35);
    --pkg-shadow: 0 6px 18px rgba(99, 102, 241, 0.45);
    --pkg-title: #4f46e5;
    --pkg-price: #8b5cf6;
}
.pkg-diamond {
    --pkg-accent: linear-gradient(135deg, #22d3ee, #0891b2);
    --pkg-glow: rgba(34, 211, 238, 0.4);
    --pkg-shadow: 0 6px 18px rgba(34, 211, 238, 0.45);
    --pkg-title: #0e7490;
    --pkg-price: #06b6d4;
}
.pkg-ruby {
    --pkg-accent: linear-gradient(135deg, #f43f5e, #be123c);
    --pkg-glow: rgba(244, 63, 94, 0.4);
    --pkg-shadow: 0 6px 18px rgba(244, 63, 94, 0.45);
    --pkg-title: #be123c;
    --pkg-price: #f43f5e;
}
.pkg-titanium {
    --pkg-accent: linear-gradient(135deg, #64748b, #1e293b);
    --pkg-glow: rgba(100, 116, 139, 0.4);
    --pkg-shadow: 0 6px 18px rgba(30, 41, 59, 0.45);
    --pkg-title: #0f766e;
    --pkg-price: #14b8a6;
}
.pkg-obsidian {
    --pkg-accent: linear-gradient(135deg, #1e293b, #0f172a);
    --pkg-glow: rgba(15, 23, 42, 0.5);
    --pkg-shadow: 0 6px 18px rgba(15, 23, 42, 0.55);
    --pkg-title: #7c3aed;
    --pkg-price: #d946ef;
}
.pkg-topup {
    --pkg-accent: linear-gradient(90deg, #6366f1, #14b8a6);
    --pkg-glow: rgba(99, 102, 241, 0.2);
    --pkg-title: #4338ca;
    --pkg-price: #0891b2;
}

/* ============ Payment Page ============ */
.pay-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    align-items: stretch;
}
.pay-summary {
    margin: 0;
}
.pay-back {
    display: inline-block;
    margin-top: auto;
    font-size: 13px;
    font-weight: 700;
    color: var(--pkg-title, #4f46e5);
    text-decoration: none;
}
.pay-back:hover { text-decoration: underline; }
.pay-panel {
    background: linear-gradient(145deg, var(--pkg-surface, rgba(255, 255, 255, 0.85)), rgba(255, 255, 255, 0.94));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 22px;
    padding: 36px 28px 28px;
    min-height: 280px;
    border: 1px solid var(--pkg-border, rgba(15, 23, 42, 0.08));
    box-shadow: 
        0 8px 0 -1px rgba(15, 23, 42, 0.08),
        0 24px 40px -20px rgba(15, 23, 42, 0.12);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.35s ease;
    position: relative;
    overflow: hidden;
}
.pay-panel::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 5px;
    background: var(--pkg-accent, linear-gradient(90deg, #6366f1, #06b6d4));
}
.pay-panel::after {
    content: "";
    position: absolute;
    top: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--pkg-glow, rgba(99, 102, 241, 0.25));
    filter: blur(24px);
    opacity: 0.7;
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.pay-panel:hover::after {
    opacity: 1;
    transform: scale(1.15);
}
.pay-panel:hover {
    transform: translateY(-10px) rotateX(3deg) rotateY(-1.5deg);
    box-shadow:
        0 12px 0 -1px rgba(15, 23, 42, 0.1),
        0 34px 54px -20px rgba(15, 23, 42, 0.18);
}
.pay-summary-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.pay-summary-card .package-details {
    width: 100%;
    flex: 1;
}
.pay-summary-card .package-icon {
    margin-bottom: 20px;
}
.pay-summary-card .package-name {
    margin-bottom: 10px;
}
.pay-heading {
    font-size: 15px;
    font-weight: 800;
    color: var(--pkg-title, #4f46e5);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(120deg, var(--pkg-title, #4f46e5) 0%, var(--pkg-price, #0ea5e9) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
/* Compact gateway tiles: a soft tint of the gateway colour sits on a white
   card, so the grid stays light and readable instead of a wall of bright
   blocks. auto-fit keeps the tiles small rather than stretching a couple of
   oversized cards across the row. */
.pay-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
/* Gateway colours (--pm, --pm-soft, --pm-glow) are set inline per method from
   payment_brand_style(), so every gateway gets its own light tint. */
.pay-method {
    --pm: #6366f1;
    --pm-soft: rgba(99, 102, 241, 0.13);
    --pm-glow: rgba(99, 102, 241, 0.30);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 14px 10px 15px;
    border-radius: 15px;
    border: 1.5px solid var(--pm-soft);
    background-color: #ffffff;
    /* Faint tint of the gateway colour fading into white: light enough to keep
       the label dark and easy to read. */
    background-image: linear-gradient(165deg, var(--pm-soft) 0%, rgba(255, 255, 255, 0) 78%);
    cursor: pointer;
    overflow: hidden;
    text-align: center;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 4px 0 -1px rgba(15, 23, 42, 0.06),
        0 10px 16px -14px var(--pm-glow);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease, border-color 0.3s ease;
}
/* Gloss sweep that runs across the tile on hover. */
.pay-method::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 34%, rgba(255, 255, 255, 0.75) 50%, transparent 66%);
    transform: translateX(-130%);
    transition: transform 0.65s ease;
    pointer-events: none;
}
.pay-method:hover::after {
    transform: translateX(130%);
}
.pay-method input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.pay-method:hover {
    transform: translateY(-3px);
    border-color: var(--pm-glow);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 7px 0 -1px rgba(15, 23, 42, 0.06),
        0 16px 24px -16px var(--pm-glow);
}
.pay-method.selected {
    border-color: var(--pm);
    transform: translateY(-2px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 0 0 3px var(--pm-soft),
        0 6px 0 -1px rgba(15, 23, 42, 0.06),
        0 12px 20px -14px var(--pm-glow);
}
/* Tick shown on the chosen gateway. */
.pay-method.selected::before {
    content: "";
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--pm);
    box-shadow: 0 0 0 3px var(--pm-soft);
}
/* Uniform square tile: any uploaded logo (square, wide or tall) renders the
   same size, so every gateway card stays visually consistent. A white plate
   behind the logo keeps dark and light logos equally readable. */
.pay-method-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 13px;
    object-fit: contain;
    background-color: #ffffff;
    /* Faint gateway tint at the top of the plate ties the logo to its card. */
    background-image: linear-gradient(165deg, var(--pm-soft) 0%, rgba(255, 255, 255, 0) 70%);
    padding: 5px;
    border: 1px solid var(--pm-soft);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 3px 8px -3px var(--pm-glow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.pay-method:hover .pay-method-icon {
    transform: scale(1.06) rotate(-3deg);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 6px 12px -4px var(--pm-glow);
}
.pay-method-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 100%;
    min-width: 0;
}
.pay-method-name {
    display: block;
    font-size: 13px;
    font-weight: 800;
    color: var(--pm);
    line-height: 1.25;
    letter-spacing: -0.2px;
}
.pay-method-desc {
    display: block;
    font-size: 9px;
    font-weight: 700;
    color: #64748b;
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
/* Add Payment Method: gateway-specific inputs. Only the group matching the
   picked gateway is shown, so a wallet never asks for an IBAN and vice versa. */
.pm-fields[hidden] {
    display: none;
}
.pm-bank-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.18);
}
.pm-bank-tabs button {
    border: none;
    background: transparent;
    color: #4a5070;
    font-size: 12px;
    font-weight: 700;
    padding: 7px 14px;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.pm-bank-tabs button.active {
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    color: #ffffff;
    box-shadow: 0 3px 8px -3px rgba(99, 102, 241, 0.6);
}
.pay-details {
    border-top: 2px dashed rgba(15, 23, 42, 0.06);
    padding-top: 24px;
    margin-top: 8px;
}
.pay-amount-line {
    font-weight: 800;
    color: #64748b;
    margin-bottom: 16px;
    font-size: 13px;
    text-transform: uppercase;
}
.pay-amount-line strong {
    font-size: 24px;
    color: #4f46e5;
    margin-left: 8px;
}
.pay-account-box {
    background: #f1f5f9;
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    border: 1px solid rgba(15, 23, 42, 0.05);
}
.pay-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #6b7394;
    margin-bottom: 2px;
}
.pay-account-box strong {
    font-weight: 800;
    color: #0f172a;
    word-break: break-all;
    font-size: 15px;
}
.pay-account-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 10px;
    background: #fff;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.05);
}
.pay-copy {
    width: auto;
    padding: 8px 14px;
    margin: 0;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    color: #fff;
    font-weight: 800;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 4px 0 -1px #3730a3;
    transition: all 0.2s ease;
}
.pay-copy:hover { transform: translateY(-2px); box-shadow: 0 6px 0 -1px #3730a3; }
.pay-copy:active { transform: translateY(2px); box-shadow: 0 2px 0 -1px #3730a3; }
.pay-note {
    font-size: 13px;
    font-weight: 700;
    color: #ef4444;
}
.pay-trx-label {
    display: block;
    font-size: 12px;
    font-weight: 800;
    color: #4338ca;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.required-label {
    margin-left: 5px;
    color: #dc2626;
}
.pay-proof-hint {
    display: block;
    margin: -12px 0 18px;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
}
.pay-details input[type="file"] {
    display: block;
    width: 100%;
    margin: 0 0 18px;
    padding: 9px 11px;
    border: 1px dashed #a5b4fc;
    border-radius: 11px;
    background: #f8faff;
    color: #334155;
    font-size: 12px;
}
.pay-details input[type="file"]::file-selector-button {
    margin-right: 10px;
    padding: 7px 11px;
    border: 0;
    border-radius: 8px;
    background: #e0e7ff;
    color: #3730a3;
    font-weight: 800;
    cursor: pointer;
}
#topup_amount, #trx_id {
    width: 100%;
    padding: 10px 14px;
    border-radius: 12px;
    border: 2px solid rgba(15, 23, 42, 0.08);
    background: #fff;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 20px;
    transition: all 0.2s ease;
}
#topup_amount:focus, #trx_id:focus {
    border-color: #4f46e5;
    outline: none;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}
.pay-panel button[type="submit"] {
    width: 100%;
    padding: 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    border: none;
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 6px 0 -1px #3730a3;
    transition: all 0.2s ease;
    margin-top: 10px;
}
.pay-panel button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 -1px #3730a3;
}
.pay-panel button[type="submit"]:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 -1px #3730a3;
}
@media (max-width: 900px) {
    .pay-layout { grid-template-columns: 1fr; }
}

/* ============ Keyframe Animations ============ */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: var(--delay, 0s);
}

@keyframes floatGlow {
    0%   { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(20px, -20px) rotate(8deg); }
}

@keyframes auroraShift {
    0%   { transform: translate(0, 0) rotate(0deg) scale(1); }
    33%  { transform: translate(-4%, 3%) rotate(3deg) scale(1.05); }
    66%  { transform: translate(3%, -4%) rotate(-3deg) scale(0.98); }
    100% { transform: translate(-2%, 2%) rotate(5deg) scale(1.03); }
}

@keyframes twoToneFlow {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pulseRing {
    0%, 100% { box-shadow: 0 0 0 3px rgba(255,255,255,0.9), 0 8px 22px rgba(99, 102, 241, 0.4); }
    50%      { box-shadow: 0 0 0 12px rgba(255,255,255,0), 0 8px 22px rgba(6, 182, 212, 0.4); }
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-5px); }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

footer {
    text-align: center;
    padding: 20px;
    color: #64748b;
    margin-top: auto;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    width: 100%;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    font-size: clamp(12px, 1.3vw, 14px);
}
.footer-contact {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 18px;
    margin-top: 10px;
}
.footer-contact a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}
.footer-contact a:hover { color: #06b6d4; text-decoration: underline; }

/* Maintenance notice page */
.maintenance-card {
    max-width: 560px;
    margin: 60px auto;
    padding: 40px 30px;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: 0 18px 50px -22px rgba(79, 70, 229, 0.55);
}
.maintenance-card .maintenance-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    margin-bottom: 18px;
    border-radius: 24px;
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    box-shadow: 0 14px 30px -12px rgba(99, 102, 241, 0.8);
}
.maintenance-card h2 { font-size: 24px; color: #1e293b; margin-bottom: 10px; }
.maintenance-card p { color: #64748b; line-height: 1.6; }

/* ---------- Tablet (769px - 1024px) ---------- */
@media (max-width: 1024px) {
    .container { width: 100%; padding: 8px; }
    .sidebar { width: 240px; }
}

/* ---------- Mobile (<= 768px) ---------- */
@media (max-width: 768px) {
    nav {
        padding: 12px 15px;
    }

    .container {
        width: 100%;
        margin: 0;
        border-radius: 0;
        padding: 10px;
        box-shadow: none;
    }

    .main-content {
        padding: 15px;
    }

    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 15px;
        min-height: 120px;
        border-radius: 18px;
    }

    .stat-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        margin-bottom: 8px;
    }

    .stat-icon svg {
        width: 16px;
        height: 16px;
    }

    .stat-value {
        font-size: 17px;
    }

    .stat-value-sm {
        font-size: 14px;
    }

    .stat-label {
        font-size: 8px;
        letter-spacing: 0.3px;
    }
}

/* ---------- Small Mobile (<= 480px) ---------- */
@media (max-width: 480px) {
    nav { padding: 10px; }
    nav .logo { font-size: 18px; }
    .container { padding: 8px; }
    form input, form button { font-size: 16px; } /* Prevents iOS zoom on focus */
}

/* ============ Admin Dashboard ============ */

/* On phones the dashboard sidebar stays a slide-out drawer (toggled from the
   header hamburger) instead of being hidden, so every menu option remains
   reachable on the admin and user dashboards. */
@media (max-width: 768px) {
    .dashboard-wrapper {
        flex-direction: column;
    }
    .dashboard-wrapper .main-content {
        width: 100%;
    }
}

/* Admin role badge in sidebar */
.sidebar-role-badge {
    display: block;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #4f46e5;
    background: linear-gradient(135deg, #c7d2fe, #a78bfa);
    padding: 4px 10px;
    border-radius: 8px;
    margin: 0 auto;
}

/* Admin stat card identities */
.stat-users    { --card-accent: linear-gradient(180deg, #a78bfa, #8b5cf6); --card-glow: rgba(168, 85, 247, 0.4); --icon-bg: linear-gradient(135deg, #a78bfa, #8b5cf6); --icon-shadow: 0 4px 14px rgba(168, 85, 247, 0.5); }
.stat-revenue  { --card-accent: linear-gradient(180deg, #34d399, #059669); --card-glow: rgba(52, 211, 153, 0.4); --icon-bg: linear-gradient(135deg, #34d399, #059669); --icon-shadow: 0 4px 14px rgba(52, 211, 153, 0.5); }
.stat-balance-total { --card-accent: linear-gradient(180deg, #fbbf24, #f59e0b); --card-glow: rgba(251, 191, 36, 0.4); --icon-bg: linear-gradient(135deg, #fbbf24, #f59e0b); --icon-shadow: 0 4px 14px rgba(251, 191, 36, 0.5); }
.stat-diamonds   { --card-accent: linear-gradient(180deg, #f59e0b, #d97706); --card-glow: rgba(245, 158, 11, 0.4); --icon-bg: linear-gradient(135deg, #f59e0b, #d97706); --icon-shadow: 0 4px 14px rgba(245, 158, 11, 0.5); }
.stat-pending { --card-accent: linear-gradient(180deg, #f472b6, #db2777); --card-glow: rgba(244, 114, 182, 0.4); --icon-bg: linear-gradient(135deg, #f472b6, #db2777); --icon-shadow: 0 4px 14px rgba(244, 114, 182, 0.5); }

/* Admin badges */
.badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    line-height: 1.4;
    white-space: nowrap;
}
.badge-admin { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #78350f; }
.badge-supervisor { background: linear-gradient(135deg, #5eead4, #0f766e); color: #042f2e; }
.badge-user   { background: linear-gradient(135deg, #818cf8, #6366f1); color: #312e81; }
.badge-other  { background: linear-gradient(135deg, #94a3b8, #64748b); color: #0f172a; }

/* Admin table */
.admin-table-wrap {
    overflow-x: auto;
    margin-bottom: 22px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 960px;
}
.admin-table th {
    background: linear-gradient(90deg, #4f46e5, #06b6d8);
    color: #fff;
    font-weight: 700;
    text-align: left;
    padding: 10px 12px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}
.admin-table th:first-child { border-radius: 6px 0 0 0; }
.admin-table th:last-child  { border-radius: 0 6px 0 0; }
.admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    color: #0f172a;
    vertical-align: middle;
}
.admin-table tr:hover td {
    background: rgba(99, 102, 241, 0.04);
}
.admin-table tbody tr:last-child td { border-bottom: none; }
.tbl-id  { color: #64748b; font-weight: 600; text-align: center; }
.tbl-muted { color: #94a3b8; font-style: italic; }
.tbl-action  { color: #06b6d8; font-weight: 600; text-decoration: none; font-size: 12px; }
.tbl-action:hover { text-decoration: underline; }
.tbl-delete  { color: #ef4444; }
.tbl-loading { color: #6366f1; font-style: italic; }

/* Editable cells */
.editable-cell {
    cursor: pointer;
    user-select: none;
    position: relative;
}
.editable-cell:hover {
    background: rgba(99, 102, 241, 0.06);
}
.editable-cell::after {
    content: '✎';
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    opacity: 0;
    transition: opacity 0.2s ease;
    color: #64748b;
    pointer-events: none;
}
.editable-cell:hover::after { opacity: 0.4; }
.cell-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    outline: none;
    box-sizing: border-box;
}

/* Role & status selects */
.role-select, .status-select {
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    min-width: 80px;
}
.role-select:focus, .status-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}
.role-select option[value="admin"]      { color: #78350f; }
.role-select option[value="supervisor"] { color: #0f766e; }
.role-select option[value="user"]       { color: #312e81; }

/* Search bar */
.admin-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.search-input {
    flex: 1 1 320px;
    min-width: 0;
    padding: 9px 14px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.9);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}
.search-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto;
    flex: 0 0 auto;
    padding: 8px 16px;
    background: linear-gradient(135deg, #6366f1, #06b6d8);
    color: #fff;
    border: none;
    border-radius: 9px;
    font-weight: 600;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow: 0 3px 10px rgba(99, 102, 241, 0.28);
    text-decoration: none;
}
.search-btn svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(99, 102, 241, 0.38);
    filter: brightness(1.05);
}
.search-btn:active {
    transform: translateY(0);
}

/* Settings form */
.settings-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 10px;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-group label {
    font-weight: 600;
    color: #334155;
    font-size: 13px;
}
.form-group label input[type="checkbox"] {
    margin-right: 8px;
    width: auto;
}
.form-group input[type="text"],
.form-group input[type="email"] {
    padding: 10px 14px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.9);
    outline: none;
}
.form-group input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}
.save-btn {
    align-self: flex-start;
    padding: 10px 28px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(16, 185, 135, 0.35);
}

/* Responsive */
@media (max-width: 768px) {
    .admin-table { font-size: 12px; min-width: 900px; }
    .admin-table th, .admin-table td { padding: 8px 8px; }
    .admin-search-bar { flex-direction: column; }
}

/* ============ Admin tab buttons (Content page selector) ============ */
.admin-tab-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}
.admin-tab-btn {
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.8);
    color: #334155;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    cursor: pointer;
}
.admin-tab-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}
.admin-tab-btn.active {
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

/* Settings form inputs (number, textarea) */
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.9);
    outline: none;
    color: #0f172a;
    box-sizing: border-box;
    font-family: inherit;
}
.form-group textarea { resize: vertical; }
.form-group input:focus,
.form-group textarea:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}
.form-group small { display: block; margin-top: 4px; font-size: 12px; }

/* Save button (gradient pill with glow) */
.save-btn {
    padding: 12px 28px;
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
    width: var(--save-btn-width);
}
.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(99, 102, 241, 0.45);
}

/* Two-column settings grid (admin profile / contact & social).
   Flex keeps two fields per row while letting any row that ends up with a
   single field (the last row, or a field placed just before a full-width one)
   stretch to fill the whole row instead of leaving an empty half. */
.form-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.form-grid > * {
    flex: 1 1 45%;
    min-width: 0;
}
.form-grid > .form-group-full {
    flex: 1 1 100%;
}
.form-group-full { grid-column: 1 / -1; }
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group input[type="url"] {
    width: 100%;
    box-sizing: border-box;
}
.form-group input[type="password"],
.form-group input[type="date"],
.form-group input[type="url"] {
    padding: 10px 14px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.9);
    outline: none;
    color: #0f172a;
    font-family: inherit;
}
.form-group input[type="password"]:focus,
.form-group input[type="date"]:focus,
.form-group input[type="url"]:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

/* Danger variant of the save button (password reset, destructive actions) */
.save-btn-danger {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}
.save-btn-danger:hover {
    box-shadow: 0 8px 22px rgba(239, 68, 68, 0.45);
}

/* Form row grid for packages/payment methods */
.form-row { display: grid; gap: 12px; }

/* Home Page Settings tab: image upload cards + text groups */
.home-img-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
}
.home-img-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
}
.home-img-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 130px;
    border-radius: 10px;
    overflow: hidden;
    background: #f1f5f9;
}
.home-img-thumb img { max-width: 100%; max-height: 100%; object-fit: cover; display: block; }
.home-img-card strong { font-size: 13px; color: #0f172a; }
.home-img-card input[type="file"] { width: 100%; font-size: 12px; }
.home-img-card input[type="text"] {
    width: 100%;
    padding: 7px 10px;
    font-size: 13px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    box-sizing: border-box;
}
.home-img-reset {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
    cursor: pointer;
}
/* Section-wise wrapper: one bordered box per home page section */
.home-sec {
    margin-top: 22px;
    padding: 16px 16px 18px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-left: 4px solid #4f46e5;
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.6);
}
.home-sec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.home-sec-head > h4 {
    margin: 0;
    font-size: 16px;
    color: #0f172a;
}
.home-activity-entry-list {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}
.home-activity-entry {
    display: grid;
    grid-template-columns: minmax(120px, 0.8fr) minmax(220px, 1.2fr) auto;
    align-items: center;
    gap: 10px;
}
.home-activity-entry input,
.home-activity-entry select {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 9px;
    background: #fff;
    color: #0f172a;
    font-size: 14px;
}
.home-activity-add,
.home-activity-remove {
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: 9px;
    background: rgba(79, 70, 229, 0.08);
    color: #3730a3;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.home-activity-add:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.home-sec-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
}
.home-sec-toggle input[type="checkbox"] {
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    margin: 0;
}
.home-sec-always {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #0f766e;
    background: rgba(13, 148, 136, 0.12);
    padding: 4px 10px;
    border-radius: 999px;
}
.home-sec-sub {
    margin: 16px 0 10px;
    color: #4f46e5;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.home-card-label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-top: 2px;
}

.home-activity-options {
    margin: 12px 0 !important;
    padding: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    background: #fff;
}
.home-activity-options > strong {
    display: block;
    color: #1e293b;
    font-size: 13px;
}
.home-activity-options-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 11px;
}
.home-activity-options-list label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 9px;
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
    cursor: pointer;
}
.home-activity-options-list input { margin: 0; accent-color: #0876e8; }

.home-activity-manager {
    margin-top: 20px;
    padding: 18px;
    border: 1px solid rgba(8, 118, 232, 0.16);
    border-radius: 16px;
    background: linear-gradient(145deg, #f8fbff, #ffffff 65%);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    scroll-margin-top: 24px;
}
.home-activity-manager-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.home-activity-manager-head h4 {
    margin: 0;
    color: #0f172a;
    font-size: 17px;
}
.home-activity-manager-head p {
    margin: 5px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}
.home-activity-count {
    flex: 0 0 auto;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(8, 118, 232, 0.09);
    color: #075eb8;
    font-size: 12px;
    font-weight: 750;
}
.home-activity-types {
    margin: 0 0 14px;
    padding: 13px;
    border: 1px solid rgba(8, 118, 232, 0.12);
    border-radius: 12px;
    background: rgba(248, 251, 255, 0.9);
}
.home-activity-types-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}
.home-activity-types-head h5 {
    margin: 0;
    color: #1e293b;
    font-size: 13px;
}
.home-activity-types-head p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
}
.home-activity-types-head > span {
    flex: 0 0 auto;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(8, 118, 232, 0.09);
    color: #075eb8;
    font-size: 11px;
    font-weight: 750;
}
.home-activity-type-form {
    display: flex;
    align-items: stretch;
    gap: 8px;
}
.home-activity-type-form input[type="text"] {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 40px;
    height: 40px;
    width: auto;
    box-sizing: border-box;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font: inherit;
    font-size: 13px;
}
.home-activity-type-form .home-activity-add {
    flex: 0 0 180px;
    width: auto;
    min-height: 40px;
    box-sizing: border-box;
    margin: 0;
    padding: 9px 15px;
}
.home-activity-type-form input:focus {
    outline: none;
    border-color: #0876e8;
    box-shadow: 0 0 0 3px rgba(8, 118, 232, 0.1);
}
.home-activity-type-list {
    display: grid;
    gap: 6px;
    margin-top: 10px;
}
.home-activity-type-row {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 7px 9px;
    border: 1px solid rgba(15, 23, 42, 0.07);
    border-radius: 8px;
    background: #fff;
}
.home-activity-type-row > span {
    min-width: 0;
    flex: 1 1 auto;
    overflow-wrap: anywhere;
    color: #334155;
    font-size: 12px;
    font-weight: 650;
}
.home-activity-type-row small {
    flex: 0 0 auto;
    color: #64748b;
    font-size: 11px;
}
.home-activity-type-row form { margin: 0; }
.home-activity-type-row .home-activity-delete {
    min-height: 29px;
    padding: 5px 8px;
    font-size: 11px;
}
.home-activity-type-row .home-activity-delete:disabled {
    opacity: 0.48;
    cursor: not-allowed;
}
.home-activity-editor {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    background: #fff;
}
.home-activity-editor .form-group { min-width: 0; margin: 0; }
.home-activity-editor .form-group label {
    display: block;
    margin-bottom: 6px;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}
.home-activity-editor input[type="text"],
.home-activity-editor select {
    width: 100%;
    min-height: 43px;
    box-sizing: border-box;
    padding: 9px 11px;
    border: 1px solid rgba(15, 23, 42, 0.15);
    border-radius: 9px;
    background: #fff;
    color: #0f172a;
    font: inherit;
}
.home-activity-editor input:focus,
.home-activity-editor select:focus {
    outline: none;
    border-color: #0876e8;
    box-shadow: 0 0 0 3px rgba(8, 118, 232, 0.12);
}
.home-activity-editor-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    grid-column: 1 / -1;
}
.home-activity-add {
    min-height: 40px;
    padding: 9px 15px;
    border: 0;
    border-radius: 9px;
    background: linear-gradient(120deg, #0876e8, #06a6c8);
    color: #fff;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 5px 12px rgba(8, 118, 232, 0.18);
}
.home-activity-add:hover { filter: brightness(1.05); }
.home-activity-add:disabled { opacity: 0.5; cursor: not-allowed; }
.home-activity-cancel {
    padding: 9px 12px;
    color: #475569;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
}
.home-activity-list-title {
    margin: 20px 0 9px;
    color: #1e293b;
    font-size: 14px;
}
.home-activity-empty {
    margin: 0;
    padding: 14px;
    border: 1px dashed rgba(100, 116, 139, 0.35);
    border-radius: 10px;
    color: #64748b;
    font-size: 13px;
}
.home-activity-saved-list { display: grid; gap: 8px; }
.home-activity-saved-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 10px;
    background: #fff;
}
.home-activity-saved-copy { display: grid; gap: 3px; min-width: 0; }
.home-activity-saved-copy strong {
    overflow-wrap: anywhere;
    color: #0f172a;
    font-size: 13px;
}
.home-activity-saved-copy span {
    color: #64748b;
    font-size: 12px;
}
.home-activity-row-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
}
.home-activity-row-actions form { margin: 0; }
.home-activity-edit,
.home-activity-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid rgba(8, 118, 232, 0.18);
    border-radius: 8px;
    background: rgba(8, 118, 232, 0.07);
    color: #075eb8;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}
.home-activity-delete {
    border-color: #b91c1c;
    background: #dc2626;
    color: #fff;
}
.home-activity-delete:hover {
    border-color: #991b1b;
    background: #b91c1c;
    color: #fff;
}

.home-partner-manager {
    margin-top: 20px;
    padding: 18px;
    border: 1px solid rgba(8, 118, 232, 0.16);
    border-radius: 16px;
    background: linear-gradient(145deg, #f8fbff, #ffffff 65%);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    scroll-margin-top: 24px;
}
.home-partner-manager-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.home-partner-manager-head h4 {
    margin: 0;
    color: #0f172a;
    font-size: 17px;
}
.home-partner-manager-head p {
    margin: 5px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}
.home-partner-count {
    flex: 0 0 auto;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(8, 118, 232, 0.09);
    color: #075eb8;
    font-size: 12px;
    font-weight: 750;
}
.home-partner-editor {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    background: #fff;
}
.home-partner-editor .form-group { min-width: 0; margin: 0; }
.home-partner-editor .form-group label {
    display: block;
    margin-bottom: 6px;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}
.home-partner-editor input[type="text"] {
    width: 100%;
    min-height: 43px;
    box-sizing: border-box;
    padding: 9px 11px;
    border: 1px solid rgba(15, 23, 42, 0.15);
    border-radius: 9px;
    background: #fff;
    color: #0f172a;
    font: inherit;
}
.home-partner-editor input:focus {
    outline: none;
    border-color: #0876e8;
    box-shadow: 0 0 0 3px rgba(8, 118, 232, 0.12);
}
.home-partner-editor .form-group-full { grid-column: 1 / -1; }
.home-partner-editor textarea {
    width: 100%;
    min-height: 96px;
    box-sizing: border-box;
    padding: 9px 11px;
    border: 1px solid rgba(15, 23, 42, 0.15);
    border-radius: 9px;
    background: #fff;
    color: #0f172a;
    font: inherit;
    resize: vertical;
}
.home-partner-editor textarea:focus {
    outline: none;
    border-color: #0876e8;
    box-shadow: 0 0 0 3px rgba(8, 118, 232, 0.12);
}
.home-partner-editor-preview {
    display: flex;
    align-items: center;
    gap: 9px;
    grid-column: 1 / -1;
    color: #64748b;
    font-size: 12px;
}
.home-partner-editor-preview img,
.home-partner-row-logo {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    object-fit: contain;
    border-radius: 9px;
    background: #fff;
}
.home-partner-editor-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    grid-column: 1 / -1;
}
.home-partner-save,
.home-partner-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 7px 12px;
    border: 1px solid rgba(8, 118, 232, 0.18);
    border-radius: 8px;
    background: rgba(8, 118, 232, 0.08);
    color: #075eb8;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
}
.home-partner-save {
    min-height: 40px;
    padding: 9px 15px;
    border: 0;
    background: linear-gradient(120deg, #0876e8, #06a6c8);
    color: #fff;
    box-shadow: 0 5px 12px rgba(8, 118, 232, 0.18);
}
.home-partner-toggle {
    color: #fff;
}
.home-partner-save:disabled { opacity: 0.5; cursor: not-allowed; }
.home-partner-cancel {
    color: #475569;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
}
.home-partner-list-title {
    margin: 20px 0 9px;
    color: #1e293b;
    font-size: 14px;
}
.home-partner-empty {
    margin: 0;
    padding: 14px;
    border: 1px dashed rgba(100, 116, 139, 0.35);
    border-radius: 10px;
    color: #64748b;
    font-size: 13px;
}
.home-partner-saved-list { display: grid; gap: 8px; }
.home-partner-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 10px;
    background: #fff;
}
.home-partner-row.is-hidden { background: #f8fafc; opacity: 0.72; }
.home-partner-row-copy { display: grid; gap: 3px; min-width: 0; flex: 1 1 auto; }
.home-partner-row-copy strong {
    overflow-wrap: anywhere;
    color: #0f172a;
    font-size: 13px;
}
.home-partner-row-copy span { color: #64748b; font-size: 12px; }
.home-partner-status {
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(5, 150, 105, 0.1);
    color: #047857;
    font-size: 11px;
    font-weight: 750;
}
.home-partner-row.is-hidden .home-partner-status {
    background: rgba(100, 116, 139, 0.12);
    color: #475569;
}
.home-partner-row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}
.home-partner-row-actions form { margin: 0; }

@media (max-width: 600px) {
    .home-activity-entry {
        grid-template-columns: minmax(0, 1fr) auto;
    }
    .home-activity-entry input {
        grid-column: 1 / -1;
    }
    .home-activity-manager { padding: 14px; }
    .home-activity-editor { grid-template-columns: minmax(0, 1fr); }
    .home-activity-type-form { align-items: stretch; flex-direction: column; }
    .home-activity-type-form .home-activity-add { flex: 0 0 auto; width: 100%; }
    .home-activity-type-row { flex-wrap: wrap; }
    .home-activity-type-row small { margin-left: auto; }
    .home-activity-saved-row { align-items: flex-start; flex-direction: column; }
    .home-activity-row-actions { align-self: flex-end; }
    .home-partner-manager { padding: 14px; }
    .home-partner-editor { grid-template-columns: minmax(0, 1fr); }
    .home-partner-row { flex-wrap: wrap; }
    .home-partner-row-actions { width: 100%; justify-content: flex-end; }
}

/* ============ Site Updates tab ============ */
.code-area {
    width: 100%;
    min-height: 240px;
    padding: 14px 16px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 12px;
    background: #0f172a;
    color: #e2e8f0;
    font-family: "Consolas", "Courier New", monospace;
    font-size: 13px;
    line-height: 1.55;
    resize: vertical;
    tab-size: 4;
}
.code-area:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}
.update-result {
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.75);
}
.update-result h5 {
    margin: 0 0 8px;
    font-size: 14px;
    color: #0f172a;
}
.update-status {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
}
.update-status.ok { color: #047857; }
.update-status.err { color: #b91c1c; }
.update-output {
    margin: 0;
    padding: 12px 14px;
    border-radius: 10px;
    background: #0f172a;
    color: #cbd5e1;
    font-family: "Consolas", "Courier New", monospace;
    font-size: 12.5px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 320px;
    overflow: auto;
}
.update-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.update-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 14px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 12px;
    background: #fff;
}
.update-row-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 200px;
}
.update-row-info strong {
    font-size: 13px;
    color: #0f172a;
    word-break: break-all;
}
.update-row-info span {
    font-size: 12px;
    color: #64748b;
}
.update-row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.update-row-actions form { margin: 0; }
.mini-btn {
    display: inline-block;
    padding: 7px 13px;
    border: 1px solid rgba(79, 70, 229, 0.35);
    border-radius: 8px;
    background: rgba(79, 70, 229, 0.08);
    color: #4338ca;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.mini-btn:hover {
    background: rgba(79, 70, 229, 0.16);
    border-color: #4f46e5;
    color: #312e81;
}
.mini-btn.danger {
    border-color: rgba(220, 38, 38, 0.35);
    background: rgba(220, 38, 38, 0.08);
    color: #b91c1c;
}
.mini-btn.danger:hover {
    background: rgba(220, 38, 38, 0.16);
    border-color: #dc2626;
    color: #7f1d1d;
}
.update-row-details {
    padding: 12px 14px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 12px;
    background: #fff;
}
.update-row-details > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
}
.update-row-details > summary span {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
}
.update-row-details > .update-output {
    margin-top: 10px;
}
.update-row-details > form { margin-top: 10px; }

/* ============ Database tab: option cards ============ */
.db-option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 18px;
}
.db-option-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 16px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.db-option-card:hover {
    transform: translateY(-3px);
    border-color: rgba(79, 70, 229, 0.45);
    box-shadow: 0 16px 30px -18px rgba(15, 23, 42, 0.5);
}
.db-option-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    border-radius: 14px;
    color: #fff;
}
.db-option-icon-files { background: linear-gradient(145deg, #7dd3fc, #0369a1); }
.db-option-icon-mysql { background: linear-gradient(145deg, #86efac, #0f766e); }
.db-option-body {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1 1 auto;
}
.db-option-body strong { font-size: 16px; color: #0f172a; }
.db-option-body small { font-size: 13px; color: #64748b; line-height: 1.45; }
.db-option-go {
    align-self: center;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 700;
    color: #4f46e5;
}

/* ============ File Manager page ============ */
.fm-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 13px 22px;
    background: linear-gradient(105deg, #061126 0%, #0a1b35 62%, #0a2e50 100%);
    border-bottom: 2px solid #f3ae18;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 30;
}
.fm-topbar-left { display: flex; align-items: center; gap: 12px; }
.fm-brand {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 12px;
    background: linear-gradient(145deg, #7dd3fc, #0369a1);
    color: #fff;
    box-shadow: 0 6px 16px -6px rgba(3, 105, 161, 0.9);
}
.fm-brand svg { width: 22px; height: 22px; }
.fm-topbar-text { display: flex; flex-direction: column; gap: 2px; }
.fm-topbar-title { font-size: 17px; font-weight: 800; letter-spacing: 0.4px; line-height: 1.15; }
.fm-topbar-root { font-size: 11px; color: #f7b62a; font-weight: 600; letter-spacing: 0.3px; }
.fm-topbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fm-topbar .mini-btn,
.fm-topbar .mini-btn:hover {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-color: rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.fm-topbar .mini-btn:hover { background: rgba(255, 255, 255, 0.22); border-color: #fff; }

.mini-btn svg { vertical-align: -2px; }

.fm-wrap { padding: 16px 18px 28px; width: 100%; }

.fm-msg {
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #047857;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.fm-msg.err { color: #b91c1c; background: rgba(220, 38, 38, 0.1); border-color: rgba(220, 38, 38, 0.3); }

/* ---- inline editor / preview ---- */
.fm-editor {
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 40px -34px rgba(15, 23, 42, 0.8);
}
.fm-editor-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.fm-editor-head h3 { font-size: 15px; color: #0f172a; word-break: break-all; }
.fm-editor-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.fm-editor-actions .mini-btn,
.fm-editor .save-btn { display: inline-flex; align-items: center; gap: 6px; }
.fm-editor-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed rgba(15, 23, 42, 0.14);
}
.fm-meta-item { font-size: 12px; color: #475569; }
.fm-meta-item b { color: #0f172a; font-weight: 700; margin-right: 5px; }
.fm-editor .save-btn { margin-top: 12px; }
.fm-preview {
    display: grid;
    place-items: center;
    padding: 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
}
.fm-preview img {
    max-width: 100%;
    max-height: 440px;
    border-radius: 10px;
    box-shadow: 0 16px 34px -20px rgba(15, 23, 42, 0.7);
}

/* ---- overview stats ---- */
.fm-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.fm-stat {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 11px;
    align-items: center;
    padding: 13px 16px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.09);
    box-shadow: 0 12px 26px -24px rgba(15, 23, 42, 0.75);
}
.fm-stat-icon {
    grid-row: 1 / span 2;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: #fff;
}
.fm-stat-icon svg { width: 17px; height: 17px; }
.fm-stat-loc  { background: linear-gradient(145deg, #818cf8, #4f46e5); }
.fm-stat-dir  { background: linear-gradient(145deg, #38bdf8, #0369a1); }
.fm-stat-file { background: linear-gradient(145deg, #34d399, #047857); }
.fm-stat-size { background: linear-gradient(145deg, #fbbf24, #b45309); }
.fm-stat-disk { background: linear-gradient(145deg, #c084fc, #7e22ce); }
.fm-stat-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #64748b;
}
.fm-stat-value {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- panel ---- */
.fm-panel {
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 18px 40px -34px rgba(15, 23, 42, 0.8);
}
.fm-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    background: linear-gradient(180deg, #f8fafc, #fff);
}
.fm-breadcrumb { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.fm-breadcrumb .fm-crumb-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #94a3b8;
    margin-right: 4px;
}
.fm-breadcrumb a { color: #4338ca; text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.fm-breadcrumb a:hover { text-decoration: underline; }
.fm-breadcrumb .fm-sep { color: #cbd5e1; }
.fm-search {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 10px;
    background: #fff;
    color: #64748b;
    min-width: 240px;
}
.fm-search:focus-within { border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.14); }
.fm-search input { border: none; outline: none; background: transparent; font-size: 13px; width: 100%; color: #0f172a; }

.fm-tools {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.fm-tool-group {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    padding: 7px 12px;
    border: 1px dashed rgba(15, 23, 42, 0.16);
    border-radius: 11px;
    background: #f8fafc;
}
.fm-tool-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #64748b;
    white-space: nowrap;
}
.fm-tool-upload { margin-left: auto; }
.fm-create-form,
.fm-upload-form { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.fm-create-form .mini-btn,
.fm-upload-form .mini-btn { display: inline-flex; align-items: center; gap: 5px; }
.fm-create-form input[type="text"] {
    padding: 8px 11px;
    border: 1px solid rgba(15, 23, 42, 0.16);
    border-radius: 9px;
    font-size: 13px;
    min-width: 170px;
    background: #fff;
}
.fm-upload-form input[type="file"] { font-size: 12px; max-width: 230px; }

.fm-bulkbar {
    display: none;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 16px;
    background: rgba(79, 70, 229, 0.07);
    border-bottom: 1px solid rgba(79, 70, 229, 0.18);
}
.fm-bulkbar.active { display: flex; }
.fm-bulk-count { font-size: 13px; color: #3730a3; font-weight: 600; }
.fm-bulk-count b { font-weight: 800; }
.fm-bulkbar .mini-btn { display: inline-flex; align-items: center; gap: 5px; }

.fm-scroll { overflow-x: auto; }
.fm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.fm-table th {
    text-align: left;
    padding: 11px 14px;
    background: #f1f5f9;
    color: #0f172a;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    border-bottom: 1px solid rgba(15, 23, 42, 0.12);
}
.fm-sort { color: #334155; text-decoration: none; }
.fm-sort:hover { color: #4338ca; }
.fm-sort.on { color: #4338ca; }
.fm-table td { padding: 9px 14px; border-bottom: 1px solid rgba(15, 23, 42, 0.06); color: #334155; white-space: nowrap; vertical-align: middle; }
.fm-table tbody tr:last-child td { border-bottom: none; }
.fm-table tbody tr:hover td { background: rgba(79, 70, 229, 0.05); }
.fm-col-check { width: 42px; text-align: center; }
.fm-col-check input { width: 15px; height: 15px; accent-color: #4f46e5; cursor: pointer; }
.fm-col-name { width: 100%; }
.fm-perm { font-family: Consolas, "Courier New", monospace; color: #475569; }
.fm-type { font-size: 12px; color: #64748b; }

.fm-cell-name { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.fm-tile {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 26px;
    flex: 0 0 34px;
    border-radius: 7px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.3px;
    color: #fff;
    background: linear-gradient(145deg, #cbd5e1, #64748b);
}
.fm-tile-dir  { background: linear-gradient(145deg, #38bdf8, #0369a1); }
.fm-tile-php  { background: linear-gradient(145deg, #a78bfa, #6d28d9); }
.fm-tile-html { background: linear-gradient(145deg, #fb923c, #c2410c); }
.fm-tile-css  { background: linear-gradient(145deg, #38bdf8, #1d4ed8); }
.fm-tile-js   { background: linear-gradient(145deg, #fde047, #ca8a04); }
.fm-tile-img  { background: linear-gradient(145deg, #34d399, #047857); }
.fm-tile-vid  { background: linear-gradient(145deg, #f472b6, #be185d); }
.fm-tile-aud  { background: linear-gradient(145deg, #c084fc, #7e22ce); }
.fm-tile-zip  { background: linear-gradient(145deg, #fbbf24, #b45309); }
.fm-tile-db   { background: linear-gradient(145deg, #22d3ee, #0e7490); }
.fm-tile-pdf  { background: linear-gradient(145deg, #f87171, #b91c1c); }
.fm-tile-doc  { background: linear-gradient(145deg, #94a3b8, #475569); }
.fm-tile-file { background: linear-gradient(145deg, #cbd5e1, #64748b); }

.fm-name { color: #1e293b; text-decoration: none; font-weight: 600; }
a.fm-name:hover { color: #4338ca; text-decoration: underline; }
.fm-name-dir { color: #0369a1; }

.fm-row-actions { text-align: right; white-space: nowrap; }
.fm-act {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 5px;
    padding: 6px 10px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 8px;
    background: #fff;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    vertical-align: middle;
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.fm-act:hover { background: rgba(79, 70, 229, 0.1); border-color: rgba(79, 70, 229, 0.45); color: #4338ca; }
.fm-act.danger { color: #b91c1c; border-color: rgba(220, 38, 38, 0.28); }
.fm-act.danger:hover { background: rgba(220, 38, 38, 0.1); border-color: rgba(220, 38, 38, 0.5); color: #b91c1c; }
.fm-act svg { width: 14px; height: 14px; flex: 0 0 14px; }
.fm-empty-row td { text-align: center; padding: 28px; color: #94a3b8; }

@media (max-width: 1100px) {
    .fm-act span { display: none; }
    .fm-act { padding: 7px; }
    .fm-tools .fm-tool-upload { margin-left: 0; }
}

/* Keep the file manager independent from the site's generic nav/form styles. */
body.fm-page {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
}
.fm-page .fm-topbar { width: 100%; }
.fm-page main.fm-wrap {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding: 28px clamp(24px, 2.4vw, 46px) 44px;
    flex: 1 0 auto;
}
.fm-page .fm-stats,
.fm-page .fm-panel { width: 100%; max-width: none; }
.fm-page .fm-panel-head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    background: linear-gradient(180deg, #f8fafc, #fff);
}
.fm-page .fm-panel-head .fm-breadcrumb {
    display: flex;
    align-items: center;
    width: auto;
    min-width: 0;
    padding: 0;
    margin: 0;
    gap: 6px;
    background: transparent;
    border: 0;
    box-shadow: none;
    flex: 1 1 auto;
}
.fm-page .fm-panel-head .fm-search { flex: 0 1 360px; }
.fm-page .fm-tools {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 20px;
}
.fm-page .fm-tool-group {
    min-width: 0;
    flex: 0 1 auto;
}
.fm-page .fm-tool-upload { margin-left: auto; }
.fm-page .fm-create-form,
.fm-page .fm-upload-form {
    display: flex;
    align-items: center;
    width: auto;
    gap: 8px;
    margin: 0;
}
.fm-page form input:not([type="hidden"]),
.fm-page form select {
    width: auto;
    min-width: 0;
    padding: 9px 12px;
    margin: 0;
    font-size: 13px;
}
.fm-page .fm-create-form input[type="text"] {
    width: clamp(180px, 20vw, 310px);
    flex: 0 1 310px;
}
.fm-page .fm-upload-form input[type="file"] {
    width: auto;
    max-width: min(320px, 32vw);
}
.fm-page form button {
    width: auto;
    min-height: 36px;
    padding: 8px 13px;
    margin: 0;
    border: 1px solid rgba(79, 70, 229, 0.35);
    border-radius: 8px;
    background: rgba(79, 70, 229, 0.08);
    box-shadow: none;
    color: #4338ca;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
}
.fm-page form button:hover {
    transform: translateY(-1px);
    background: rgba(79, 70, 229, 0.16);
    box-shadow: none;
}
.fm-page .fm-act {
    width: auto;
    min-height: 32px;
    padding: 7px 9px;
    margin: 0 0 0 4px;
    background: #fff;
    box-shadow: none;
}
.fm-page .fm-act.danger { color: #b91c1c; }
.fm-page .fm-act.danger:hover { background: rgba(220, 38, 38, 0.1); }
.fm-page .fm-scroll { width: 100%; }
.fm-page .fm-table { width: 100%; min-width: 1100px; }

@media (max-width: 900px) {
    .fm-page main.fm-wrap { padding: 18px 16px 28px; }
    .fm-page .fm-panel-head,
    .fm-page .fm-tools { align-items: stretch; }
    .fm-page .fm-panel-head { flex-direction: column; }
    .fm-page .fm-panel-head .fm-search { flex-basis: auto; width: 100%; }
    .fm-page .fm-tools { flex-direction: column; }
    .fm-page .fm-tool-group { width: 100%; }
    .fm-page .fm-tool-upload { margin-left: 0; }
}

/* Custom page content (public) */
.custom-page-content {
    line-height: 1.7;
    color: #1e293b;
}
.custom-page-content h3 {
    margin: 20px 0 10px;
    color: #0f172a;
}
.custom-page-content p { margin-bottom: 14px; }
.custom-page-content ul, .custom-page-content ol {
    margin: 10px 0 14px 22px;
}

/* ============ New Stat Card Identities ============ */
.stat-investment {
    --card-accent: linear-gradient(180deg, #818cf8, #6366f1);
    --card-glow: rgba(129, 140, 248, 0.4);
    --icon-bg: linear-gradient(135deg, #818cf8, #6366f1);
    --icon-shadow: 0 4px 14px rgba(99, 102, 241, 0.5);
}
.stat-txcount {
    --card-accent: linear-gradient(180deg, #a78bfa, #8b5cf6);
    --card-glow: rgba(167, 139, 250, 0.4);
    --icon-bg: linear-gradient(135deg, #a78bfa, #8b5cf6);
    --icon-shadow: 0 4px 14px rgba(139, 92, 246, 0.5);
}

/* Payment status badges */
.badge-pending { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #78350f; }
.badge-completed { background: linear-gradient(135deg, #34d399, #059669); color: #064e3b; }
.badge-failed { background: linear-gradient(135deg, #f87171, #ef4444); color: #7f1d1d; }
/* Investment status badge */
.badge-active { background: linear-gradient(135deg, #38bdf8, #0284c7); color: #082f49; }

.empty-state {
    text-align: center;
    padding: 30px 20px;
    color: #64748b;
    font-size: 14px;
}

/* ============ Analytics: Date Filter Bar ============ */
.analytics-filter-bar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 22px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}
/* Filter caption — shows the active range note inside .analytics-filter-bar (used) */
.analytics-filter-caption {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin: 0 0 10px;
    color: #334155;
    font-size: 13px;
}
.analytics-filter-caption strong {
    color: #0f172a;
    font-weight: 800;
}
.analytics-filter-caption span {
    color: #64748b;
    font-size: 12px;
}
.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.filter-tab {
    padding: 8px 18px;
    background: rgba(241, 245, 249, 0.8);
    color: #475569;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.25s ease;
    cursor: pointer;
}
.filter-tab:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 1);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}
.filter-tab.active {
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}
.custom-range-title {
    align-self: center;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #4f46e5;
}
.custom-range-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    padding: 14px;
    background: rgba(241, 245, 249, 0.5);
    border-radius: 12px;
    border: 1px dashed rgba(99, 102, 241, 0.25);
}
.custom-range-form label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 4px;
    display: block;
}
.custom-range-form input[type="date"] {
    width: 160px;
    padding: 9px 12px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    font-size: 14px;
    background: #fff;
    color: #0f172a;
}
.custom-range-form button {
    padding: 10px 24px;
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}
.custom-range-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(99, 102, 241, 0.45);
}
.filter-current {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
    padding-top: 10px;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}
.filter-current-label { font-weight: 600; }
.filter-current-value {
    font-weight: 700;
    color: #4f46e5;
    background: rgba(99, 102, 241, 0.1);
    padding: 3px 12px;
    border-radius: 999px;
}
.filter-current-dates { color: #0f172a; font-weight: 500; }

/* ---- Section toolbar + table-card hook (used: wraps every analytics section heading
   + investment panel header; .analytics-table-card h3 styles those headings) ---- */
.analytics-table-card h3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.analytics-section-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 6px 16px;
    margin-bottom: 14px;
}
.analytics-section-toolbar > div:first-child {
    min-width: 190px;
}
.analytics-section-toolbar p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 12px;
}
.analytics-eyebrow {
    color: #0f766e;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.8px;
}
.analytics-section-toolbar .history-filter {
    flex: 1 1 100%;
}
.analytics-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 165px), 1fr));
    gap: 10px;
    margin: 12px 0;
}
.analytics-kpi {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 82px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 12px 14px;
    border: 1px solid var(--ak-border, rgba(15, 23, 42, 0.08));
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(145deg, var(--ak-bg, #f8fafc), #fff);
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.045);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.analytics-kpi::after {
    position: absolute;
    top: -27px;
    right: -22px;
    width: 75px;
    height: 75px;
    border-radius: 50%;
    background: var(--ak-glow, rgba(99, 102, 241, 0.09));
    content: "";
    pointer-events: none;
}
.analytics-kpi:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(30, 41, 59, 0.1);
}
.analytics-kpi > * {
    position: relative;
    z-index: 1;
}
.analytics-kpi span {
    color: var(--ak-label, #64748b);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.35;
}
.analytics-kpi strong {
    overflow-wrap: anywhere;
    color: var(--ak-value, #0f172a);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.2;
}
.analytics-kpi small {
    color: var(--ak-label, #64748b);
    font-size: 11px;
    font-weight: 700;
}
.analytics-kpi.tone-blue   { --ak-bg:#eff6ff; --ak-border:#dbeafe; --ak-label:#1d4ed8; --ak-value:#1e3a8a; --ak-glow:rgba(59,130,246,.13); }
.analytics-kpi.tone-violet { --ak-bg:#f5f3ff; --ak-border:#ede9fe; --ak-label:#7c3aed; --ak-value:#4c1d95; --ak-glow:rgba(139,92,246,.13); }
.analytics-kpi.tone-teal   { --ak-bg:#f0fdfa; --ak-border:#ccfbf1; --ak-label:#0f766e; --ak-value:#134e4a; --ak-glow:rgba(20,184,166,.13); }
.analytics-kpi.tone-amber  { --ak-bg:#fffbeb; --ak-border:#fef3c7; --ak-label:#b45309; --ak-value:#78350f; --ak-glow:rgba(245,158,11,.14); }
.analytics-kpi.tone-rose   { --ak-bg:#fff1f2; --ak-border:#ffe4e6; --ak-label:#be123c; --ak-value:#881337; --ak-glow:rgba(244,63,94,.12); }
.analytics-kpi.tone-slate  { --ak-bg:#f8fafc; --ak-border:#e2e8f0; --ak-label:#475569; --ak-value:#0f172a; --ak-glow:rgba(100,116,139,.1); }
.analytics-data-note {
    margin: 8px 0 12px;
    color: #64748b;
    font-size: 11.5px;
    line-height: 1.55;
}
.analytics-positive { color: #059669; }
.analytics-negative { color: #e11d48; }
.analytics-page .section-heading {
    position: relative;
    margin-top: 30px;
    padding: 0 0 9px 13px;
    color: #172554;
    font-size: 17px;
    font-weight: 900;
    letter-spacing: -0.25px;
}
.analytics-page .section-heading::before {
    top: 1px;
    bottom: 10px;
    width: 4px;
    border-radius: 99px;
    background: linear-gradient(180deg, #6366f1, #06b6d4);
}
/* Two-column graph grid (used: tasks + store chart pairs) */
.analytics-graph-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 12px 0 18px;
}
.analytics-graph-card {
    min-width: 0;
    margin: 12px 0 18px;
    padding: 17px 18px 13px;
    overflow: hidden;
    border: 1px solid rgba(129, 140, 248, 0.18);
    border-radius: 18px;
    background:
        radial-gradient(circle at 100% 0, rgba(34, 211, 238, 0.11), transparent 34%),
        linear-gradient(145deg, #ffffff 0%, #f8faff 58%, #f4f8ff 100%);
    box-shadow: 0 10px 28px rgba(30, 41, 59, 0.065);
}
.analytics-graph-grid .analytics-graph-card {
    margin: 0 0 18px;
}
.analytics-graph-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
}
.analytics-graph-head h4 {
    margin: 3px 0 0;
    color: #172554;
    font-size: 15px;
    font-weight: 850;
    letter-spacing: -0.2px;
}
.analytics-graph-range {
    flex: 0 0 auto;
    padding: 5px 9px;
    border: 1px solid #e0e7ff;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
}
.analytics-graph-scroll {
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #a5b4fc transparent;
}
.analytics-graph-plot {
    display: flex;
    align-items: stretch;
    gap: 8px;
    min-width: max(100%, 480px);
    height: 206px;
    padding: 10px 8px 0;
    border-bottom: 1px solid #dbe4f0;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 42px,
        rgba(148, 163, 184, 0.14) 43px,
        transparent 44px
    );
}
.analytics-graph-column {
    display: flex;
    min-width: 0;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}
.analytics-graph-bars {
    display: flex;
    width: 100%;
    height: 174px;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
}
.analytics-graph-bar-wrap {
    display: flex;
    width: min(30px, 44%);
    height: 100%;
    min-width: 5px;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}
.analytics-graph-value {
    width: 100%;
    overflow: hidden;
    margin-bottom: 3px;
    color: #64748b;
    font-size: 8px;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.18s ease;
}
.analytics-graph-column:hover .analytics-graph-value {
    opacity: 1;
}
.analytics-graph-bar {
    width: 100%;
    min-height: 0;
    max-height: calc(100% - 17px);
    border-radius: 7px 7px 2px 2px;
    background: linear-gradient(180deg, var(--graph-color), var(--graph-color));
    background: linear-gradient(180deg, color-mix(in srgb, var(--graph-color), white 20%), var(--graph-color));
    box-shadow: 0 5px 12px rgba(99, 102, 241, 0.14);
    transform-origin: center bottom;
    animation: analytics-bar-rise 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    transition: filter 0.18s ease, transform 0.18s ease;
}
.analytics-graph-column:hover .analytics-graph-bar {
    filter: saturate(1.25);
    transform: scaleX(1.12);
}
.analytics-graph-label {
    width: 100%;
    overflow: hidden;
    padding: 7px 1px 8px;
    color: #64748b;
    font-size: 9px;
    font-weight: 750;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.analytics-graph-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 15px;
    padding: 10px 2px 0;
}
.analytics-graph-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #475569;
    font-size: 10.5px;
    font-weight: 750;
}
.analytics-graph-legend i {
    width: 9px;
    height: 9px;
    border-radius: 3px;
    background: var(--legend-color);
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.18);
}
.analytics-graph-empty {
    display: grid;
    min-height: 132px;
    place-items: center;
    border: 1px dashed #cbd5e1;
    border-radius: 13px;
    color: #64748b;
    font-size: 12px;
    font-weight: 650;
}
.analytics-line-scroll {
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #a5b4fc transparent;
}
.analytics-line-svg {
    display: block;
    width: 100%;
    min-width: 480px;
    height: auto;
    overflow: visible;
}
.analytics-line-grid {
    stroke: rgba(148, 163, 184, 0.2);
    stroke-dasharray: 4 6;
    stroke-width: 1;
}
.analytics-line-area {
    fill: rgba(99, 102, 241, 0.13);
}
.analytics-line-stroke {
    fill: none;
    stroke: #6366f1;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3.5;
    filter: drop-shadow(0 4px 5px rgba(99, 102, 241, 0.18));
}
.analytics-line-point {
    fill: #fff;
    stroke: #4f46e5;
    stroke-width: 2.5;
    transition: r 0.15s ease, fill 0.15s ease;
}
.analytics-line-point:hover {
    r: 6;
    fill: #c7d2fe;
}
.analytics-line-label {
    fill: #64748b;
    font-size: 10px;
    font-weight: 750;
}
@keyframes analytics-bar-rise {
    from { transform: scaleY(0.05); opacity: 0.45; }
    to { transform: scaleY(1); opacity: 1; }
}
@media (max-width: 720px) {
    .analytics-graph-grid {
        grid-template-columns: 1fr;
    }
    .analytics-graph-card {
        padding: 14px 12px 11px;
        border-radius: 15px;
    }
    .analytics-graph-plot {
        min-width: 440px;
        height: 188px;
        padding-right: 3px;
        padding-left: 3px;
    }
    .analytics-graph-bars {
        height: 157px;
    }
    .analytics-line-svg {
        min-width: 440px;
    }
    .analytics-page .section-heading {
        margin-top: 24px;
        font-size: 16px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .analytics-graph-bar {
        animation: none;
    }
}

/* ============ Analytics: Section Heading ============ */
.section-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 26px 0 12px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #475569;
}
.section-heading::before {
    content: "";
    width: 4px;
    height: 18px;
    border-radius: 4px;
    background: linear-gradient(180deg, #6366f1, #06b6d4);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

/* ============ Analytics: Account Snapshot ============ */
.account-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(238, 242, 255, 0.92), rgba(236, 254, 255, 0.92));
}
.account-hero::before {
    content: "";
    position: absolute;
    top: -90px;
    right: -60px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.32), transparent 70%);
    pointer-events: none;
}
.account-hero::after {
    content: "";
    position: absolute;
    bottom: -100px;
    left: -50px;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.28), transparent 70%);
    pointer-events: none;
}
.account-hero-main {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.account-avatar-wrap { position: relative; flex-shrink: 0; margin-bottom: 6px; }
.account-avatar {
    width: 84px;
    height: 84px;
    border-radius: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    box-shadow: 0 16px 32px rgba(79, 70, 229, 0.45), inset 0 0 0 3px rgba(255, 255, 255, 0.35);
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}
.account-hero-main:hover .account-avatar { transform: translateY(-4px) scale(1.05); }
.account-status {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 999px;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.9);
    white-space: nowrap;
}
.account-status.is-active { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 6px 14px rgba(16, 185, 129, 0.45); }
.account-status.is-inactive { background: linear-gradient(135deg, #f87171, #dc2626); box-shadow: 0 6px 14px rgba(220, 38, 38, 0.45); }
.account-identity { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.account-eyebrow {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: #4f46e5;
}
.account-name {
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 800;
    line-height: 1.1;
    background: linear-gradient(135deg, #4f46e5, #06b6d4 60%, #10b981);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.account-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.account-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    font-size: 12.5px;
    font-weight: 600;
    color: #475569;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(15, 23, 42, 0.07);
    padding: 5px 12px;
    border-radius: 999px;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
    word-break: break-word;
}
.account-tag svg { width: 14px; height: 14px; flex-shrink: 0; color: #6366f1; }
.account-facts {
    position: relative;
    z-index: 1;
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}
.account-fact {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 16px;
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}
.account-fact:hover {
    transform: translateY(-3px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 12px 24px rgba(31, 38, 135, 0.1);
}
.account-fact-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #94a3b8;
}
.account-fact-value { font-size: 14px; font-weight: 700; color: #0f172a; word-break: break-word; }
.account-fact-value small { font-weight: 600; color: #64748b; }
/* The info-card h3 rule would add a border/padding to these headings — reset it */
.account-hero h3.account-name { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }

/* ============ Analytics: Level Progress ============ */
.level-progress-card { margin-bottom: 18px; }
.level-progress-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.level-badge {
    width: 62px;
    height: 62px;
    flex-shrink: 0;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    background: var(--lvl-grad, linear-gradient(135deg, #6366f1, #4f46e5));
    box-shadow: 0 12px 24px var(--lvl-glow, rgba(79, 70, 229, 0.45)), inset 0 0 0 3px rgba(255, 255, 255, 0.3);
}
.level-progress-title { flex: 1; min-width: 140px; }
.level-progress-title h3 { font-size: 17px; font-weight: 800; color: #0f172a; margin: 0 0 4px; padding-bottom: 0; border-bottom: none; }
.level-progress-title p { font-size: 13px; color: #64748b; margin: 0; }
.level-progress-title p strong { color: #4f46e5; }
.level-progress-pct {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.level-progress-track {
    margin-top: 18px;
    height: 12px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.12);
    overflow: hidden;
}
.level-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #6366f1, #06b6d4);
    box-shadow: 0 0 14px rgba(99, 102, 241, 0.5);
}
.level-next-meta {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    font-size: 12.5px;
    color: #64748b;
}
.level-next-meta strong { color: #0f172a; }

/* ============ Analytics: Extra Stat Card Variants ============ */
.stat-withdraw {
    --card-accent: linear-gradient(180deg, #60a5fa, #2563eb);
    --card-glow: rgba(96, 165, 250, 0.4);
    --icon-bg: linear-gradient(135deg, #60a5fa, #2563eb);
    --icon-shadow: 0 4px 14px rgba(37, 99, 235, 0.5);
    --value-grad: linear-gradient(90deg, #2563eb, #3b82f6);
}
.stat-processing {
    --card-accent: linear-gradient(180deg, #fbbf24, #d97706);
    --card-glow: rgba(251, 191, 36, 0.4);
    --icon-bg: linear-gradient(135deg, #fbbf24, #d97706);
    --icon-color: #d97706;
    --icon-shadow: 0 4px 14px rgba(217, 119, 6, 0.5);
    --value-grad: linear-gradient(90deg, #d97706, #f59e0b);
}
.stat-pendingpay {
    --card-accent: linear-gradient(180deg, #f472b6, #db2777);
    --card-glow: rgba(244, 114, 182, 0.4);
    --icon-bg: linear-gradient(135deg, #f472b6, #db2777);
    --icon-shadow: 0 4px 14px rgba(219, 39, 119, 0.5);
    --value-grad: linear-gradient(90deg, #db2777, #ec4899);
}

.table-head-note {
    margin-left: 8px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    color: #4f46e5;
    background: rgba(99, 102, 241, 0.1);
    vertical-align: middle;
}

/* ============ Analytics Charts ============ */
/* Charts card chrome (used: payment-status donut card) */
.analytics-charts-card h3 { color: #0f766e; }
.analytics-page .analytics-charts-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(129, 140, 248, 0.18);
    background:
        radial-gradient(circle at 98% 0, rgba(99, 102, 241, 0.08), transparent 30%),
        linear-gradient(145deg, #ffffff, #fbfdff 62%, #f5f8ff);
    box-shadow: 0 16px 42px rgba(30, 41, 59, 0.08);
}
.charts-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 24px;
    margin-top: 8px;
}
.chart-panel {
    position: relative;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 22px;
    padding: 20px 20px 16px;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease;
}
.chart-panel:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 36px rgba(31, 38, 135, 0.1);
}
.chart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}
.chart-head h4 { font-size: 15px; font-weight: 700; color: #0f172a; margin: 0; }
.chart-head-note {
    font-size: 11.5px;
    font-weight: 600;
    color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
}
.chart-summary { display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px; }
.chart-summary-value {
    font-size: clamp(20px, 2.5vw, 26px);
    font-weight: 800;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.chart-summary-label { font-size: 12.5px; color: #64748b; font-weight: 500; }

/* Bar chart */
.bar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    height: 190px;
    padding-top: 22px;
}
.bar-col {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
}
.bar-value {
    font-size: 10.5px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 4px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.bar-track {
    width: 100%;
    max-width: 46px;
    flex: 1;
    display: flex;
    align-items: flex-end;
    background: rgba(99, 102, 241, 0.07);
    border-radius: 12px 12px 6px 6px;
    overflow: hidden;
}
.bar-fill {
    width: 100%;
    background: linear-gradient(180deg, #6366f1, #06b6d4);
    border-radius: 12px 12px 6px 6px;
    box-shadow: 0 6px 14px rgba(99, 102, 241, 0.35);
    transform-origin: bottom;
    animation: barGrow 0.8s cubic-bezier(0.25, 1, 0.5, 1) backwards;
    transition: filter 0.3s ease;
}
.bar-col:hover .bar-fill { filter: brightness(1.12) saturate(1.2); }
.bar-col:hover .bar-value { opacity: 1; }
.bar-label {
    font-size: 10.5px;
    font-weight: 600;
    color: #64748b;
    margin-top: 8px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}
@keyframes barGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* Donut chart */
.donut-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding-top: 6px;
}
.donut { width: 170px; height: 170px; }
.donut-ring { stroke: rgba(99, 102, 241, 0.12); }
.donut-seg {
    transition: stroke-width 0.3s ease, opacity 0.3s ease;
    animation: donutIn 1s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}
.donut-seg:hover { stroke-width: 6.5; }
.donut-center-value { font-size: 7px; font-weight: 800; fill: #0f172a; }
.donut-center-label { font-size: 3px; font-weight: 600; fill: #94a3b8; letter-spacing: 0.3px; }
@keyframes donutIn { from { opacity: 0; } to { opacity: 1; } }
.donut-legend {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    justify-content: center;
    width: 100%;
}
.donut-legend-item { display: flex; align-items: center; gap: 7px; font-size: 12.5px; }
.donut-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.04);
}
.donut-legend-label { color: #475569; font-weight: 500; }
.donut-legend-value { font-weight: 800; color: #0f172a; }

/* ============ Family Tree ============ */
.sponsor-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 251, 235, 0.92), rgba(238, 242, 255, 0.92));
}
.sponsor-card::before {
    content: "";
    position: absolute;
    top: -70px;
    right: -50px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.4), transparent 70%);
    pointer-events: none;
}
.sponsor-card::after {
    content: "";
    position: absolute;
    bottom: -80px;
    left: -40px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.28), transparent 70%);
    pointer-events: none;
}
.sponsor-card h3 { color: #b45309; }

.sponsor-hero {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}
.sponsor-avatar-wrap {
    position: relative;
    flex-shrink: 0;
    width: 76px;
    height: 76px;
}
.sponsor-avatar-wrap::after {
    content: "";
    position: absolute;
    inset: -7px;
    border-radius: 30px;
    border: 2px dashed rgba(245, 158, 11, 0.5);
    animation: sponsorSpin 14s linear infinite;
}
@keyframes sponsorSpin { to { transform: rotate(360deg); } }
.sponsor-avatar {
    position: relative;
    z-index: 1;
    width: 76px;
    height: 76px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    box-shadow: 0 14px 28px rgba(245, 158, 11, 0.45), inset 0 0 0 3px rgba(255, 255, 255, 0.35);
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}
.sponsor-hero:hover .sponsor-avatar { transform: rotate(-6deg) scale(1.06); }
.sponsor-crown {
    position: absolute;
    bottom: -6px;
    right: -6px;
    z-index: 2;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    box-shadow: 0 6px 14px rgba(99, 102, 241, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.9);
}
.sponsor-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}
.sponsor-eyebrow {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: #b45309;
}
.sponsor-name {
    font-size: clamp(20px, 3vw, 26px);
    font-weight: 800;
    line-height: 1.1;
    background: linear-gradient(135deg, #b45309, #ef4444 55%, #6366f1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.sponsor-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}
.sponsor-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: #475569;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(15, 23, 42, 0.07);
    padding: 5px 12px;
    border-radius: 999px;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
}
.sponsor-chip svg { width: 14px; height: 14px; }
.sponsor-chip-package {
    color: #6d28d9;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(99, 102, 241, 0.15));
    border-color: rgba(139, 92, 246, 0.28);
}
.sponsor-contact {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 100%;
}
.sponsor-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #fff;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 14px;
    max-width: 260px;
    transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}
.sponsor-contact-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.sponsor-contact-link span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sponsor-link-mail {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    box-shadow: 0 8px 18px rgba(99, 102, 241, 0.38);
}
.sponsor-link-mail:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 26px rgba(99, 102, 241, 0.5);
}
.sponsor-link-call {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 8px 18px rgba(16, 185, 129, 0.38);
}
.sponsor-link-call:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 26px rgba(16, 185, 129, 0.5);
}

/* Tree container */
.tree-container {
    margin-top: 8px;
    overflow-x: auto;
    padding: 20px 0 40px;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}
.tree-root {
    display: flex;
    justify-content: center;
    margin-bottom: 0;
    position: relative;
    padding-bottom: 20px;
}
.tree-root::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 2px;
    height: 20px;
    background: rgba(99, 102, 241, 0.3);
    transform: translateX(-50%);
}
.tree-member:has(~ .tree-children):not(.collapsed ~ .tree-children)::after {
    content: "";
    position: absolute;
    bottom: -20px;
    left: 50%;
    width: 2px;
    height: 20px;
    background: rgba(99, 102, 241, 0.2);
    transform: translateX(-50%);
}
.tree-node.collapsed .tree-member::after {
    display: none;
}
.you-member {
    position: relative;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(6, 182, 212, 0.08));
    border: 2px solid rgba(79, 70, 229, 0.35);
}
.you-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    color: #fff;
    padding: 2px 8px;
    border-radius: 999px;
    margin-left: 6px;
    vertical-align: middle;
}

/* Tree list */
.tree-root-children,
.tree-children {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 15px;
    position: relative;
    padding-top: 20px;
}
/* Horizontal line connecting siblings */
.tree-root-children::after,
.tree-children::after {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: calc(100% - 100px); /* Adjust based on card width */
    height: 2px;
    background: rgba(99, 102, 241, 0.2);
    transform: translateX(-50%);
    display: none; /* Only show if more than 1 child */
}
.tree-root-children:has(> li:nth-child(2))::after,
.tree-children:has(> li:nth-child(2))::after {
    display: block;
}

.tree-node {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 10px;
}
/* Vertical line to child */
.tree-node::before {
    content: "";
    position: absolute;
    top: -20px;
    left: 50%;
    width: 2px;
    height: 20px;
    background: rgba(99, 102, 241, 0.25);
    transform: translateX(-50%);
}
/* Hide top line for root node children top connector */
.tree-root + .tree-root-children > .tree-node::before {
    background: rgba(99, 102, 241, 0.4);
}
.tree-node.collapsed > .tree-children {
    display: none;
}

.tree-member {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    padding: 12px 10px;
    min-width: 100px;
    width: 100px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
    text-align: center;
    flex-shrink: 0;
}
.tree-member:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.2);
}
.direct-member {
    border: 1px solid rgba(34, 197, 94, 0.25);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.03), rgba(255, 255, 255, 0.98));
}
.member-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(99, 102, 241, 0.2);
    background-size: cover;
    background-position: center;
}
.default-avatar-icon {
    opacity: 0.85;
}
.member-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    min-width: 0;
    width: 100%;
}
.member-name { 
    font-size: 11px; 
    font-weight: 800; 
    color: #0f172a; 
    width: 100%;
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}
.member-pkg-name {
    font-size: 9px;
    color: #6366f1;
    font-weight: 700;
    letter-spacing: 0px;
}
.member-status-box {
    margin-top: 2px;
    width: 100%;
}
.status-badge {
    display: inline-block;
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    padding: 1px 5px;
    border-radius: 4px;
}
.status-badge.active {
    background: rgba(34, 197, 94, 0.12);
    color: #059669;
}
.status-badge.inactive {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}
.status-badge.pending {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}
.status-badge.approved {
    background: rgba(34, 197, 94, 0.12);
    color: #059669;
}
.status-badge.rejected {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}
.contact-btn-vertical {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    margin-top: 4px;
    padding: 4px 0;
    background: linear-gradient(135deg, #14b8a6, #06b6d4);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 6px rgba(20, 184, 166, 0.25);
}
.contact-btn-vertical span { display: none; }
.contact-btn-vertical:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(20, 184, 166, 0.4);
}
.toggle-btn-tree {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #fff;
    color: #4f46e5;
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, background 0.2s ease;
}
.toggle-btn-tree:hover { 
    background: #f8fafc;
    transform: translateX(-50%) scale(1.1);
}
.tree-node.collapsed .toggle-btn-tree svg { transform: rotate(-90deg); }
.toggle-btn-tree svg { transition: transform 0.25s ease; }
.member-level-badge {
    position: absolute;
    top: -8px;
    right: 12px;
    font-size: 10px;
    font-weight: 700;
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    color: #fff;
    padding: 2px 10px;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}
.tree-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px 20px;
}
.tree-empty svg { color: #cbd5e1; }

/* ============ Contact Modal ============ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    padding: 20px;
}
.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}
.modal-card {
    background: #fff;
    border-radius: 22px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.35);
    overflow: hidden;
    transform: translateY(20px) scale(0.96);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}
.modal-overlay.show .modal-card {
    transform: translateY(0) scale(1);
}
.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: none;
    background: rgba(15, 23, 42, 0.06);
    color: #64748b;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 2;
}
.modal-close:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    transform: rotate(90deg);
}
.modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 24px 24px 18px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(6, 182, 212, 0.08));
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.modal-avatar {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}
.modal-header h3 { margin: 0; font-size: 20px; color: #0f172a; }
.modal-subtitle { margin: 0; font-size: 12px; color: #6366f1; font-weight: 600; }
.modal-body {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.contact-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: rgba(241, 245, 249, 0.6);
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.06);
}
.contact-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.contact-detail { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.contact-label { font-size: 11px; font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.5px; }
.contact-value {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    text-decoration: none;
    word-break: break-all;
}
.contact-value:hover { color: #4f46e5; }
.modal-footer {
    display: flex;
    gap: 10px;
    padding: 0 24px 24px;
}
.modal-action {
    flex: 1;
    padding: 11px 16px;
    background: rgba(241, 245, 249, 0.9);
    color: #334155;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.modal-action:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}
.modal-action.primary {
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}
.modal-action.primary:hover {
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.45);
}

/* Copy toast */
.copy-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    padding: 10px 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 8px 22px rgba(16, 185, 129, 0.4);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 1100;
    pointer-events: none;
}
.copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============ Responsive for Analytics & Family Tree ============ */
@media (max-width: 768px) {
    .filter-tabs { gap: 6px; }
    .filter-tab { padding: 7px 14px; font-size: 13px; }
    .custom-range-form input[type="date"] { width: 100%; }
    .custom-range-form { flex-direction: column; align-items: stretch; }
    .custom-range-form button { width: 100%; }
    .filter-current { flex-wrap: wrap; }
    .charts-grid { grid-template-columns: 1fr; gap: 18px; }
    .bar-chart { height: 160px; gap: 6px; }
    .bar-value { display: none; }
    .bar-label { font-size: 9.5px; }
    .donut { width: 150px; height: 150px; }
    .sponsor-hero { flex-direction: column; align-items: flex-start; gap: 16px; }
    .sponsor-contact { margin-left: 0; width: 100%; }
    .sponsor-contact-link { max-width: 100%; width: 100%; }
    .tree-member { min-width: 200px; }
    .modal-card { max-width: 100%; }
}
@media (max-width: 480px) {
    .tree-member { min-width: 180px; padding: 10px; gap: 8px; }
    .member-avatar { width: 38px; height: 38px; font-size: 16px; }
    .member-name { font-size: 13px; }
}
.custom-page-content img { max-width: 100%; border-radius: 8px; }
.custom-page-content a { color: #6366f1; text-decoration: none; }
.custom-page-content a:hover { text-decoration: underline; }
.custom-page-content blockquote {
    border-left: 4px solid #6366f1;
    padding: 8px 16px;
    margin: 14px 0;
    background: rgba(99, 102, 241, 0.06);
    color: #475569;
    border-radius: 0 8px 8px 0;
}

/* Code tags in admin */
code {
    background: rgba(15, 23, 42, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    color: #334155;
}

/* Responsive for new admin forms */
@media (max-width: 480px) {
    .admin-tab-btn { padding: 7px 14px; font-size: 13px; }
    .save-btn { width: 100%; }
    .form-row { grid-template-columns: 1fr !important; }
    .form-grid > * { flex: 1 1 100%; }
}

/* Ad "Show On Pages" checkbox grid */
.ad-pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 6px;
    max-height: 260px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.6);
}

.ad-page-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
    transition: background 0.15s ease;
}

.ad-page-option:hover {
    background: rgba(99, 102, 241, 0.08);
}

.ad-page-option input[type="checkbox"] {
    flex: 0 0 auto;
    width: 15px;
    height: 15px;
    accent-color: #6366f1;
    cursor: pointer;
}

.ad-page-option span {
    line-height: 1.3;
}

/* Ads Styling */
.ad-container {
    margin: 20px 0;
    text-align: center;
}

.ad-container .ad-slot {
    margin: 10px 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.ad-container .ad-text {
    font-size: 13px;
    color: #64748b;
    padding: 15px;
}

/* Referral / affiliate link ad */
.ad-container .ad-link {
    padding: 0;
    border: none;
    background: none;
}

.ad-link-anchor {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.28);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.ad-link-anchor:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(99, 102, 241, 0.38);
    color: #fff;
}

.ad-link-label {
    flex: 1;
    font-size: 14px;
}

.ad-link-badge {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

/* Header Ad */
.ad-header {
    max-width: 728px;
    margin: 0 auto 20px;
}

/* Footer Ad */
.ad-footer {
    max-width: 728px;
    margin: 20px auto 0;
}

/* Responsive Ads */
@media (max-width: 768px) {
    .ad-header,
    .ad-footer {
        max-width: 100%;
    }
}

/* ============ Levels Page ============ */

/* Current level hero */
.level-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(250px, 1fr) minmax(260px, 1.1fr);
    gap: 26px;
    align-items: center;
    padding: 26px;
    margin-bottom: 30px;
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.16), rgba(99, 102, 241, 0.12));
    border: 1px solid rgba(251, 191, 36, 0.35);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    box-shadow: 0 14px 34px rgba(245, 158, 11, 0.16);
    overflow: hidden;
}
.level-hero::before {
    content: "";
    position: absolute;
    top: -45%;
    right: -8%;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.45), transparent 70%);
    filter: blur(26px);
    pointer-events: none;
}
.level-hero-left {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 18px;
}
.level-hero-badge {
    flex: 0 0 88px;
    width: 88px;
    height: 88px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #fff;
    box-shadow: 0 12px 26px -6px rgba(245, 158, 11, 0.75), inset 0 -4px 8px rgba(0, 0, 0, 0.12);
    animation: levelPulse 3.4s ease-in-out infinite;
}
.level-hero-badge-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    opacity: 0.9;
}
.level-hero-badge-value {
    font-size: 38px;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}
@keyframes levelPulse {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}
.level-hero-kicker {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: #b45309;
}
.level-hero-name {
    margin: 4px 0 6px;
    font-size: clamp(19px, 2.4vw, 24px);
    color: #0f172a;
}
.level-hero-of {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    color: #64748b;
}
.level-hero-sub {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}
.level-hero-right {
    position: relative;
    z-index: 1;
}
.level-progress-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #334155;
}
.level-progress {
    height: 14px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}
.level-progress span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
    transition: width 0.9s cubic-bezier(0.25, 1, 0.5, 1);
}
.level-progress-note {
    margin: 10px 0 0;
    font-size: 13px;
    color: #475569;
}
.level-progress-note strong {
    color: #b45309;
}

/* How levels work */
.level-rules {
    margin: 0;
    padding-left: 20px;
    display: grid;
    gap: 8px;
    font-size: 14px;
    line-height: 1.6;
    color: #475569;
}
.level-rules strong {
    color: #0f172a;
}

/* Level plan cards */
.level-plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: 18px;
}
.level-card {
    position: relative;
    padding: 20px 16px 16px;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.82);
    background-image: linear-gradient(155deg, var(--lvl-soft, rgba(99, 102, 241, 0.1)), transparent 68%);
    backdrop-filter: blur(16px) saturate(170%);
    -webkit-backdrop-filter: blur(16px) saturate(170%);
    border: 1px solid var(--lvl-border, rgba(15, 23, 42, 0.1));
    box-shadow: 0 10px 22px -12px var(--lvl-glow, rgba(15, 23, 42, 0.35)), inset 0 1px 0 rgba(255, 255, 255, 0.7);
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}
/* top colour ribbon, unique per level */
.level-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--lvl-grad, linear-gradient(90deg, #a5b4fc, #6366f1));
}
/* soft coloured glow in the corner, unique per level */
.level-card::after {
    content: "";
    position: absolute;
    top: -40px;
    right: -30px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--lvl-glow, rgba(99, 102, 241, 0.35)), transparent 70%);
    filter: blur(10px);
    opacity: 0.7;
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.level-card:hover {
    transform: translateY(-6px) scale(1.015);
    border-color: var(--lvl-a, rgba(99, 102, 241, 0.5));
    box-shadow: 0 22px 38px -16px var(--lvl-glow, rgba(15, 23, 42, 0.4)), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.level-card:hover::after {
    opacity: 1;
    transform: scale(1.15);
}
.level-card.is-current {
    border-color: var(--lvl-a, rgba(245, 158, 11, 0.6));
    box-shadow: 0 0 0 2px var(--lvl-a, rgba(245, 158, 11, 0.5)),
                0 20px 36px -14px var(--lvl-glow, rgba(245, 158, 11, 0.6)),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
    animation: levelCardPulse 3.6s ease-in-out infinite;
}
@keyframes levelCardPulse {
    0%, 100% { box-shadow: 0 0 0 2px var(--lvl-a, rgba(245, 158, 11, 0.5)), 0 20px 36px -14px var(--lvl-glow, rgba(245, 158, 11, 0.55)), inset 0 1px 0 rgba(255, 255, 255, 0.8); }
    50%      { box-shadow: 0 0 0 5px var(--lvl-soft, rgba(245, 158, 11, 0.18)), 0 24px 42px -14px var(--lvl-glow, rgba(245, 158, 11, 0.75)), inset 0 1px 0 rgba(255, 255, 255, 0.8); }
}
.level-card.is-locked {
    opacity: 0.75;
}
.level-card.is-locked::before {
    background: linear-gradient(90deg, #cbd5e1, #94a3b8);
}
.level-card.is-locked::after {
    opacity: 0.35;
}
.level-card-top {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
/* level number becomes a colourful badge, unique per level */
.level-card-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 32px;
    padding: 0 10px;
    border-radius: 12px;
    background: var(--lvl-grad, linear-gradient(135deg, #a5b4fc, #6366f1));
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    text-shadow: 0 1px 3px rgba(15, 23, 42, 0.35);
    box-shadow: 0 8px 16px -6px var(--lvl-glow, rgba(99, 102, 241, 0.6));
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}
.level-card:hover .level-card-no {
    transform: rotate(-5deg) scale(1.08);
}
.level-card.is-locked .level-card-no {
    background: linear-gradient(135deg, #cbd5e1, #94a3b8);
    box-shadow: none;
    text-shadow: none;
}
.level-card-state {
    position: relative;
    z-index: 1;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #fff;
    background: var(--lvl-grad, linear-gradient(135deg, #6366f1, #4f46e5));
    box-shadow: 0 6px 14px -6px var(--lvl-glow, rgba(99, 102, 241, 0.6));
    text-shadow: 0 1px 3px rgba(15, 23, 42, 0.3);
}
.level-card.is-locked .level-card-state {
    color: #64748b;
    background: rgba(100, 116, 139, 0.16);
    box-shadow: none;
    text-shadow: none;
}
.level-card-name {
    position: relative;
    z-index: 1;
    margin: 0 0 10px;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 0.2px;
    background: var(--lvl-grad, linear-gradient(135deg, #4f46e5, #06b6d4));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--lvl-b, #4f46e5);
}
.level-card.is-locked .level-card-name {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.level-section-note {
    margin: 0 0 16px;
    font-size: 13px;
    color: #64748b;
}
.level-card-line {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0 0 8px;
}
.level-card-line-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    color: var(--lvl-b, #94a3b8);
    opacity: 0.85;
}
.level-card-line-value {
    font-size: 12.5px;
    line-height: 1.5;
    color: #475569;
}
.level-card-line-value strong {
    color: #0f172a;
}
.level-card-bonus-state {
    position: relative;
    z-index: 1;
    margin: 0 0 10px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}
.level-card-bonus-state.is-on {
    color: #047857;
    background: rgba(16, 185, 129, 0.16);
}
.level-card-bonus-state.is-off {
    color: #b45309;
    background: rgba(245, 158, 11, 0.16);
}
.level-card.is-locked .level-card-bonus-state.is-off {
    color: #64748b;
    background: rgba(100, 116, 139, 0.14);
}
.level-hero-diamond-note {
    display: block;
    margin-top: 4px;
    color: #475569;
}
.level-hero-diamond-note strong {
    color: #0891b2;
}
.stat-diamond {
    --card-accent: linear-gradient(180deg, #67e8f9, #0891b2);
    --card-glow: rgba(6, 182, 212, 0.4);
    --icon-bg: linear-gradient(135deg, #67e8f9, #0891b2);
    --icon-color: #0891b2;
    --icon-shadow: 0 4px 14px rgba(8, 145, 178, 0.5);
    --value-grad: linear-gradient(90deg, #0e7f9c, #0aa5c4);
}
.stat-team {
    --card-accent: linear-gradient(180deg, #6ee7b7, #059669);
    --card-glow: rgba(16, 185, 129, 0.4);
    --icon-bg: linear-gradient(135deg, #6ee7b7, #059669);
    --icon-color: #059669;
    --icon-shadow: 0 4px 14px rgba(5, 150, 105, 0.5);
    --value-grad: linear-gradient(90deg, #0f766e, #10b981);
}
.level-card-progress {
    height: 7px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    overflow: hidden;
}
.level-card-progress span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--lvl-grad, linear-gradient(90deg, #6366f1, #06b6d4));
}

/* Per-level identity colours: gradient, tint, border and glow */
.lvl-starter  { --lvl-a: #a8b3c4; --lvl-b: #5b6779; --lvl-grad: linear-gradient(135deg, #a8b3c4, #5b6779); --lvl-soft: rgba(148, 163, 184, 0.14); --lvl-glow: rgba(100, 116, 139, 0.45); --lvl-border: rgba(100, 116, 139, 0.28); }
.lvl-bronze   { --lvl-a: #fb923c; --lvl-b: #9a3412; --lvl-grad: linear-gradient(135deg, #fb923c, #9a3412); --lvl-soft: rgba(251, 146, 60, 0.16);  --lvl-glow: rgba(194, 65, 12, 0.45);  --lvl-border: rgba(194, 65, 12, 0.3); }
.lvl-silver   { --lvl-a: #b8c4d4; --lvl-b: #55637a; --lvl-grad: linear-gradient(135deg, #b8c4d4, #55637a); --lvl-soft: rgba(148, 163, 184, 0.16); --lvl-glow: rgba(100, 116, 139, 0.42); --lvl-border: rgba(100, 116, 139, 0.3); }
.lvl-gold     { --lvl-a: #fbbf24; --lvl-b: #b45309; --lvl-grad: linear-gradient(135deg, #fbbf24, #b45309); --lvl-soft: rgba(251, 191, 36, 0.18);  --lvl-glow: rgba(217, 119, 6, 0.5);   --lvl-border: rgba(217, 119, 6, 0.32); }
.lvl-platinum { --lvl-a: #22d3ee; --lvl-b: #0e7490; --lvl-grad: linear-gradient(135deg, #22d3ee, #0e7490); --lvl-soft: rgba(34, 211, 238, 0.16);  --lvl-glow: rgba(8, 145, 178, 0.45);  --lvl-border: rgba(8, 145, 178, 0.3); }
.lvl-diamond  { --lvl-a: #818cf8; --lvl-b: #4338ca; --lvl-grad: linear-gradient(135deg, #818cf8, #4338ca); --lvl-soft: rgba(129, 140, 248, 0.17); --lvl-glow: rgba(79, 70, 229, 0.48);  --lvl-border: rgba(79, 70, 229, 0.32); }
.lvl-ruby     { --lvl-a: #fb7185; --lvl-b: #be123c; --lvl-grad: linear-gradient(135deg, #fb7185, #be123c); --lvl-soft: rgba(251, 113, 133, 0.16); --lvl-glow: rgba(225, 29, 72, 0.45);  --lvl-border: rgba(225, 29, 72, 0.3); }
.lvl-titanium { --lvl-a: #94a3b8; --lvl-b: #334155; --lvl-grad: linear-gradient(135deg, #94a3b8, #334155); --lvl-soft: rgba(71, 85, 105, 0.15);   --lvl-glow: rgba(51, 65, 85, 0.45);   --lvl-border: rgba(51, 65, 85, 0.3); }
.lvl-obsidian { --lvl-a: #64748b; --lvl-b: #0b1220; --lvl-grad: linear-gradient(135deg, #64748b, #0b1220); --lvl-soft: rgba(15, 23, 42, 0.14);    --lvl-glow: rgba(15, 23, 42, 0.5);    --lvl-border: rgba(15, 23, 42, 0.34); }
.lvl-legend   { --lvl-a: #e879f9; --lvl-b: #7e22ce; --lvl-grad: linear-gradient(135deg, #e879f9, #7e22ce); --lvl-soft: rgba(232, 121, 249, 0.18); --lvl-glow: rgba(168, 85, 247, 0.5);  --lvl-border: rgba(168, 85, 247, 0.34); }

/* Responsive levels */
@media (max-width: 900px) {
    .level-hero { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .level-hero { padding: 20px; gap: 20px; }
    .level-hero-left { gap: 14px; }
    .level-hero-badge { flex: 0 0 74px; width: 74px; height: 74px; border-radius: 20px; }
    .level-hero-badge-value { font-size: 32px; }
    .level-plan-grid { grid-template-columns: 1fr; }
}

/* ============ Colorful 3D sidebar icons (unique per menu item) ============
   Every sidebar button carries a raised, glossy icon chip. The gradient and
   glow are driven by --i-grad / --i-glow so each menu keeps its own identity. */
.btn-3d-grid .btn-3d svg {
    width: 40px;
    height: 40px;
    padding: 8px;
    border-radius: 13px;
    stroke: #ffffff;
    stroke-width: 1.9;
    background:
        linear-gradient(150deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0) 46%),
        var(--i-grad, linear-gradient(145deg, #818cf8, #4f46e5));
    box-shadow:
        0 8px 16px -6px var(--i-glow, rgba(79, 70, 229, 0.7)),
        0 2px 3px rgba(15, 23, 42, 0.16),
        inset 0 1.5px 1px rgba(255, 255, 255, 0.8),
        inset 0 -3.5px 6px rgba(15, 23, 42, 0.34);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.35s ease;
    will-change: transform;
}

.btn-3d-grid .btn-3d:hover svg {
    transform: scale(1.16) rotate(-8deg);
    box-shadow:
        0 14px 24px -6px var(--i-glow, rgba(79, 70, 229, 0.75)),
        0 3px 5px rgba(15, 23, 42, 0.18),
        inset 0 1.5px 1px rgba(255, 255, 255, 0.9),
        inset 0 -3.5px 6px rgba(15, 23, 42, 0.34);
}

/* Active item: a frosted chip that reads clearly on the gradient bar */
.btn-3d-grid .btn-3d.active svg {
    background: rgba(255, 255, 255, 0.28);
    stroke: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6),
                inset 0 -2px 4px rgba(15, 23, 42, 0.18);
}

/* ---- Per-item colour identity (shared by sidebar buttons and quick menu) ---- */
.nav-overview  { --i-grad: linear-gradient(145deg, #a5b4fc, #4f46e5); --i-glow: rgba(79, 70, 229, 0.6); }
.nav-tasks     { --i-grad: linear-gradient(145deg, #6ee7b7, #059669); --i-glow: rgba(5, 150, 105, 0.6); }
.nav-analytics { --i-grad: linear-gradient(145deg, #67e8f9, #0891b2); --i-glow: rgba(8, 145, 178, 0.6); }
.nav-tree      { --i-grad: linear-gradient(145deg, #fcd34d, #ea580c); --i-glow: rgba(234, 88, 12, 0.6); }
.nav-packages  { --i-grad: linear-gradient(145deg, #93c5fd, #2563eb); --i-glow: rgba(37, 99, 235, 0.6); }
.nav-investment{ --i-grad: linear-gradient(145deg, #86efac, #047857); --i-glow: rgba(4, 120, 87, 0.6); }
.nav-topup     { --i-grad: linear-gradient(145deg, #7dd3fc, #0284c7); --i-glow: rgba(2, 132, 199, 0.6); }
.nav-exchange  { --i-grad: linear-gradient(145deg, #f0abfc, #a21caf); --i-glow: rgba(162, 28, 175, 0.6); }
.nav-withdraw  { --i-grad: linear-gradient(145deg, #fda4af, #e11d48); --i-glow: rgba(225, 29, 72, 0.6); }
.nav-courses   { --i-grad: linear-gradient(145deg, #c4b5fd, #7c3aed); --i-glow: rgba(124, 58, 237, 0.6); }
.nav-freecourses { --i-grad: linear-gradient(145deg, #6ee7b7, #059669); --i-glow: rgba(5, 150, 105, 0.6); }
.nav-levels    { --i-grad: linear-gradient(145deg, #fde047, #d97706); --i-glow: rgba(217, 119, 6, 0.6); }
.nav-settings  { --i-grad: linear-gradient(145deg, #cbd5e1, #475569); --i-glow: rgba(71, 85, 105, 0.6); }
.nav-supervisor { --i-grad: linear-gradient(145deg, #5eead4, #0f766e); --i-glow: rgba(15, 118, 110, 0.6); }
.nav-support    { --i-grad: linear-gradient(145deg, #f9a8d4, #be185d); --i-glow: rgba(190, 24, 93, 0.6); }
.nav-store      { --i-grad: linear-gradient(145deg, #fdba74, #c2410c); --i-glow: rgba(194, 65, 12, 0.6); }
/* Admin-only sections */
.nav-users      { --i-grad: linear-gradient(145deg, #93c5fd, #1d4ed8); --i-glow: rgba(29, 78, 216, 0.6); }
.nav-emailreq   { --i-grad: linear-gradient(145deg, #fca5a5, #dc2626); --i-glow: rgba(220, 38, 38, 0.6); }
.nav-payments   { --i-grad: linear-gradient(145deg, #86efac, #16a34a); --i-glow: rgba(22, 163, 74, 0.6); }
.nav-paymethods { --i-grad: linear-gradient(145deg, #a5b4fc, #4338ca); --i-glow: rgba(67, 56, 202, 0.6); }
.nav-content    { --i-grad: linear-gradient(145deg, #c4b5fd, #6d28d9); --i-glow: rgba(109, 40, 217, 0.6); }
.nav-home       { --i-grad: linear-gradient(145deg, #7dd3fc, #1d4ed8); --i-glow: rgba(29, 78, 216, 0.6); }
.nav-pages      { --i-grad: linear-gradient(145deg, #67e8f9, #0e7490); --i-glow: rgba(14, 116, 144, 0.6); }
.nav-ads        { --i-grad: linear-gradient(145deg, #fdba74, #ea580c); --i-glow: rgba(234, 88, 12, 0.6); }
.nav-stories    { --i-grad: linear-gradient(145deg, #f0abfc, #c026d3); --i-glow: rgba(192, 38, 211, 0.6); }
.nav-system     { --i-grad: linear-gradient(145deg, #94a3b8, #334155); --i-glow: rgba(51, 65, 85, 0.6); }
.nav-ai         { --i-grad: linear-gradient(145deg, #a5b4fc, #7c3aed); --i-glow: rgba(124, 58, 237, 0.6); }
.nav-updates    { --i-grad: linear-gradient(145deg, #86efac, #0f766e); --i-glow: rgba(15, 118, 110, 0.6); }
.nav-database   { --i-grad: linear-gradient(145deg, #7dd3fc, #0369a1); --i-glow: rgba(3, 105, 161, 0.6); }
/* SEO & Traffic */
.nav-permalinks { --i-grad: linear-gradient(145deg, #5eead4, #0d9488); --i-glow: rgba(13, 148, 136, 0.6); }
.nav-seo        { --i-grad: linear-gradient(145deg, #86efac, #16a34a); --i-glow: rgba(22, 163, 74, 0.6); }

/* ============ Overview quick-access launcher ============
   A modern app-launcher grid: every entry is a light card with a colorful
   raised 3D icon chip on top and its label underneath. Each section keeps
   its own colour identity through --i-grad / --i-glow. */
.qmenu-section {
    position: relative;
    margin: 22px 0 18px;
    padding: 20px 20px 22px;
    border-radius: 22px;
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.92), rgba(241, 245, 249, 0.85));
    border: 1px solid rgba(15, 23, 42, 0.07);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 22px 44px -34px rgba(15, 23, 42, 0.55);
}
.qmenu-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 22px 22px 0 0;
    background: linear-gradient(90deg, #6366f1, #06b6d4, #14b8a6);
    opacity: 0.85;
}

.qmenu-header {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 18px;
}
.qmenu-header-badge {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(145deg, #818cf8, #06b6d4);
    box-shadow: 0 12px 20px -10px rgba(6, 182, 212, 0.75),
                inset 0 2px 2px rgba(255, 255, 255, 0.55),
                inset 0 -4px 8px rgba(15, 23, 42, 0.3);
}
.qmenu-header h3 {
    margin: 0;
    padding: 0;
    border: none;
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.2px;
}
.qmenu-header p {
    margin: 3px 0 0;
    font-size: 12.5px;
    color: #64748b;
}

.qmenu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 13px;
}

.qmenu-tile {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 11px;
    padding: 18px 8px 14px;
    border-radius: 18px;
    text-decoration: none;
    background: linear-gradient(160deg, #ffffff, #f8fafc);
    border: 1px solid rgba(15, 23, 42, 0.07);
    box-shadow: 0 6px 16px -14px rgba(15, 23, 42, 0.9);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease,
                border-color 0.3s ease;
}

/* per-item tint wash */
.qmenu-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 80% at 50% 0%, var(--i-glow, rgba(99, 102, 241, 0.5)), transparent 65%);
    opacity: 0.1;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* glossy light sweep */
.qmenu-tile::before {
    content: "";
    position: absolute;
    top: 0;
    left: -130%;
    width: 55%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    transform: skewX(-18deg);
    transition: left 0.55s ease;
    pointer-events: none;
    z-index: 3;
}

.qmenu-tile:hover {
    transform: translateY(-6px);
    border-color: transparent;
    box-shadow: 0 20px 32px -20px var(--i-glow, rgba(99, 102, 241, 0.7));
}
.qmenu-tile:hover::before { left: 140%; }
.qmenu-tile:hover::after { opacity: 0.2; }

/* colorful raised 3D icon chip */
.qmenu-icon {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 17px;
    background: var(--i-grad, linear-gradient(145deg, #818cf8, #4f46e5));
    box-shadow: 0 12px 20px -9px var(--i-glow, rgba(79, 70, 229, 0.85)),
                inset 0 2px 2px rgba(255, 255, 255, 0.6),
                inset 0 -6px 10px rgba(15, 23, 42, 0.35);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.35s ease;
    will-change: transform;
}
/* top gloss highlight that sells the 3D depth */
.qmenu-icon::after {
    content: "";
    position: absolute;
    top: 5px;
    left: 7px;
    right: 7px;
    height: 34%;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0));
    pointer-events: none;
}
.qmenu-icon svg {
    position: relative;
    z-index: 1;
    width: 24px;
    height: 24px;
    stroke: #ffffff;
}
.qmenu-tile:hover .qmenu-icon {
    transform: translateY(-2px) scale(1.1) rotate(-7deg);
    box-shadow: 0 20px 28px -10px var(--i-glow, rgba(79, 70, 229, 0.9)),
                inset 0 2px 2px rgba(255, 255, 255, 0.7),
                inset 0 -6px 10px rgba(15, 23, 42, 0.35);
}

.qmenu-label {
    position: relative;
    z-index: 1;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
    line-height: 1.2;
    text-align: center;
    color: #334155;
}

@media (max-width: 600px) {
    .qmenu-section { padding: 16px 14px 18px; border-radius: 18px; }
    .qmenu-section::before { border-radius: 18px 18px 0 0; }
    .qmenu-header-badge { width: 40px; height: 40px; border-radius: 13px; }
    .qmenu-grid {
        grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
        gap: 10px;
    }
    .qmenu-tile { padding: 14px 6px 12px; border-radius: 16px; gap: 9px; }
    .qmenu-icon { width: 46px; height: 46px; border-radius: 15px; }
    .qmenu-icon svg { width: 21px; height: 21px; }
    .qmenu-label { font-size: 11px; }
}

/* ============================================================
   Investment Plans page
   ============================================================ */
/* ---- available plans ---- */
.inv-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(275px, 1fr));
    gap: 22px;
    align-items: stretch;
}
.inv-plan-card {
    --inv-a: #34d399;
    --inv-b: #047857;
    --inv-glow: rgba(4, 120, 87, 0.45);
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 18px 36px -24px rgba(15, 23, 42, 0.55);
    min-height: 100%;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s ease;
}
.inv-plan-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 28px 48px -24px var(--inv-glow);
}
.inv-plan-head {
    position: relative;
    padding: 18px 20px;
    background: linear-gradient(135deg, var(--inv-a), var(--inv-b));
    overflow: hidden;
}
.inv-plan-head::after {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 45%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transform: skewX(-18deg);
    animation: invSheen 4.2s ease-in-out infinite;
}
@keyframes invSheen {
    0%, 55% { left: -60%; }
    100%    { left: 130%; }
}
.inv-plan-icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.24);
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 8px 16px -10px rgba(0, 0, 0, 0.6);
    margin-bottom: 12px;
}
.inv-plan-name {
    position: relative;
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
}
.inv-roi-badge {
    display: inline-block;
    position: relative;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.35);
}
/* Admin-uploaded plan image shown as a clean banner inside the card head. */
.inv-plan-head.has-image {
    min-height: 140px;
    padding: 0;
}
.inv-plan-image {
    display: block;
    width: 100%;
    height: 140px;
    object-fit: cover;
}
.inv-plan-head.has-image::after {
    display: none;
}
/* Plan name + daily % moved into the card body */
.inv-plan-title {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}
.inv-plan-name-body {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
}
.inv-plan-body .inv-roi-badge {
    color: var(--inv-b);
    background: color-mix(in srgb, var(--inv-a) 28%, transparent);
    border-color: color-mix(in srgb, var(--inv-b) 30%, transparent);
}
.inv-plan-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 18px 20px 20px;
    gap: 14px;
}
.inv-plan-desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #475569;
    min-height: 38px;
}
.inv-plan-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.inv-meta-item {
    padding: 9px 10px;
    border-radius: 10px;
    background: #f1f5f9;
    border: 1px solid rgba(226, 232, 240, 0.9);
    text-align: center;
}
.inv-meta-item span {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 3px;
}
.inv-meta-item strong {
    font-size: 12.5px;
    color: #1e293b;
}
.dashboard-wrapper .inv-plan-meta {
    gap: 6px;
}
.dashboard-wrapper .inv-plan-meta .inv-meta-item {
    min-width: 0;
    padding-right: 4px;
    padding-left: 4px;
}
.dashboard-wrapper .inv-plan-meta .inv-meta-item strong {
    display: block;
    font-size: 10px;
    letter-spacing: -0.02em;
    white-space: nowrap;
}
.inv-plan-form {
    display: flex;
    gap: 8px;
    margin-top: auto;
}
.inv-amount-input {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 0 15px;
    border-radius: 12px;
    border: 2px solid rgba(148, 163, 184, 0.3);
    background: #ffffff;
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.inv-amount-input:focus {
    outline: none;
    border-color: var(--inv-b);
    background: #fff;
    box-shadow: 0 0 0 4px var(--inv-glow), inset 0 2px 4px rgba(0, 0, 0, 0.05);
}
.inv-amount-input::placeholder {
    color: #94a3b8;
    font-weight: 500;
    font-size: 13px;
}
.inv-btn {
    height: 44px;
    padding: 0 22px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: #ffffff;
    background: linear-gradient(135deg, var(--inv-a), var(--inv-b));
    box-shadow: 0 4px 0 var(--inv-b), 0 10px 20px -10px var(--inv-glow);
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}
.dash-inv-actions {
    display: flex;
    gap: 8px;
}
.dash-inv-actions .inv-btn {
    flex: 1;
}
.inv-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 0 var(--inv-b), 0 14px 22px -10px var(--inv-glow);
}
.inv-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--inv-b), 0 6px 12px -8px var(--inv-glow);
}
.inv-btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ---- my investments ---- */
.inv-positions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    margin-top: 18px;
}
.inv-pos-card {
    padding: 16px 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 12px 28px -22px rgba(15, 23, 42, 0.55);
}
.inv-pos-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}
.inv-pos-name {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
}
.inv-pos-status {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.inv-pos-status.active {
    color: #047857;
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(16, 185, 129, 0.35);
}
.inv-pos-status.completed {
    color: #475569;
    background: rgba(148, 163, 184, 0.18);
    border: 1px solid rgba(148, 163, 184, 0.4);
}
.inv-pos-amount {
    font-size: 20px;
    font-weight: 800;
    color: #047857;
    margin-bottom: 10px;
}
.inv-pos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}
.inv-pos-grid div {
    text-align: center;
    padding: 8px 6px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid rgba(226, 232, 240, 0.85);
}
.inv-pos-grid span {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
    font-weight: 700;
    margin-bottom: 3px;
}
.inv-pos-grid strong {
    font-size: 12.5px;
    color: #1e293b;
}
.inv-progress {
    height: 8px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}
.inv-progress-bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #34d399, #047857);
    transition: width 0.6s ease;
}
.inv-progress-text {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-align: right;
}
.inv-empty {
    margin-top: 16px;
    padding: 22px;
    text-align: center;
    border-radius: 14px;
    border: 1.5px dashed rgba(148, 163, 184, 0.55);
    background: rgba(248, 250, 252, 0.6);
    color: #64748b;
    font-size: 13.5px;
}
.inv-note {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #065f46;
    font-size: 12.5px;
    line-height: 1.5;
}

@media (max-width: 560px) {
    .inv-plan-meta,
    .inv-pos-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ---- Double submit guard: a form locks itself while it is being sent ---- */
button.is-submitting,
input.is-submitting {
    opacity: 0.6;
    cursor: progress;
}

/* ============================================================
   Transaction history cards (top up / withdraw / payment / diamond)
   ============================================================ */
.history-card {
    --h-a: #6366f1;
    --h-b: #0ea5e9;
    --h-deep: #4338ca;
    --h-glow: rgba(99, 102, 241, 0.32);
    --h-soft: rgba(99, 102, 241, 0.08);
    position: relative;
    margin-bottom: 20px;
    padding: 20px 22px 10px;
    border-radius: 20px;
    background: linear-gradient(165deg, #ffffff 0%, #f8fafc 68%, var(--h-soft) 100%);
    border: 1px solid rgba(15, 23, 42, 0.07);
    box-shadow:
        0 6px 0 -1px rgba(15, 23, 42, 0.05),
        0 20px 36px -20px var(--h-glow);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}

.history-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 9px 0 -1px rgba(15, 23, 42, 0.06),
        0 28px 46px -20px var(--h-glow);
}

/* Each history block keeps the colour identity of its sidebar item */
.history-card.sky    { --h-a: #38bdf8; --h-b: #0284c7; --h-deep: #075985; --h-glow: rgba(2, 132, 199, 0.34); --h-soft: rgba(2, 132, 199, 0.09); }
.history-card.rose   { --h-a: #fb7185; --h-b: #e11d48; --h-deep: #9f1239; --h-glow: rgba(225, 29, 72, 0.32); --h-soft: rgba(225, 29, 72, 0.08); }
.history-card.blue   { --h-a: #60a5fa; --h-b: #2563eb; --h-deep: #1e40af; --h-glow: rgba(37, 99, 235, 0.32); --h-soft: rgba(37, 99, 235, 0.08); }
.history-card.violet { --h-a: #c084fc; --h-b: #7c3aed; --h-deep: #5b21b6; --h-glow: rgba(124, 58, 237, 0.32); --h-soft: rgba(124, 58, 237, 0.08); }
.history-card.teal   { --h-a: #2dd4bf; --h-b: #0d9488; --h-deep: #115e59; --h-glow: rgba(13, 148, 136, 0.32); --h-soft: rgba(13, 148, 136, 0.08); }

.history-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding-bottom: 16px;
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.07);
}

.history-icon {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(145deg, var(--h-a), var(--h-b));
    box-shadow:
        0 10px 18px -9px var(--h-glow),
        inset 0 2px 3px rgba(255, 255, 255, 0.5),
        inset 0 -4px 7px rgba(15, 23, 42, 0.2);
}

.history-icon svg {
    width: 22px;
    height: 22px;
}

.history-title h3 {
    margin: 0;
    padding: 0;
    border: none;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.3px;
    color: #0f172a;
}

.history-title p {
    margin: 3px 0 0;
    font-size: 12.5px;
    font-weight: 600;
    color: #94a3b8;
}

/* Compact quick-filter row shown in the card header */
.history-filter {
    flex: 1 1 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-width: 0;
    gap: 8px 12px;
}

.history-filter-presets {
    display: flex;
    flex-wrap: wrap;
    min-width: 0;
    gap: 4px;
}

.history-chip {
    padding: 4px 10px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    background: rgba(241, 245, 249, 0.9);
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 700;
    color: #64748b;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.history-chip:hover {
    color: #0f172a;
    border-color: rgba(99, 102, 241, 0.35);
}

.history-chip.active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(145deg, var(--h-a, #38bdf8), var(--h-b, #0284c7));
    box-shadow: 0 6px 12px -6px var(--h-glow, rgba(2, 132, 199, 0.34));
}

.history-filter-custom {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    flex: 0 1 auto;
    min-width: 0;
    gap: 6px;
    width: auto;
    margin: 0;
}

.history-filter-custom input[type="date"] {
    width: clamp(100px, 12vw, 132px);
    min-width: 0;
    min-height: 30px;
    padding: 5px 8px;
    margin: 0;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 8px;
    font-size: 12px;
    color: #0f172a;
    background: #fff;
    box-sizing: border-box;
}

.history-filter-sep {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 700;
}

.history-filter-apply {
    flex: 0 0 auto;
    align-self: center;
    width: auto !important;
    min-height: 30px;
    padding: 6px 13px;
    margin: 0;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    cursor: pointer;
    background: linear-gradient(145deg, var(--h-a, #38bdf8), var(--h-b, #0284c7));
    box-shadow: 0 6px 12px -6px var(--h-glow, rgba(2, 132, 199, 0.34));
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.history-filter-apply:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px -8px var(--h-glow);
}

.history-filter-reset {
    flex: 0 0 auto;
    align-self: center;
    padding: 5px 8px;
    border-radius: 7px;
    font-size: 11.5px;
    font-weight: 700;
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease;
}

.history-filter-reset:hover {
    color: #0f172a;
    background: rgba(15, 23, 42, 0.06);
}

@media (max-width: 900px) {
    .history-filter {
        grid-template-columns: minmax(0, 1fr);
    }

    .history-filter-custom {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .history-filter {
        gap: 8px;
    }

    .history-filter-custom {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto;
        grid-template-areas: "from to apply reset";
        gap: 7px;
    }

    .history-filter-custom input[name$="_from"] {
        grid-area: from;
    }

    .history-filter-custom input[name$="_to"] {
        grid-area: to;
    }

    .history-filter-custom .history-filter-sep {
        display: none;
    }

    .history-filter-custom input[type="date"] {
        width: 100%;
        min-width: 0;
    }

    .history-filter-custom .history-filter-apply {
        grid-area: apply;
    }

    .history-filter-custom .history-filter-reset {
        grid-area: reset;
        justify-self: center;
    }
}

@media (max-width: 420px) {
    .history-filter-custom {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        grid-template-areas:
            "from to"
            "apply reset";
    }

    .history-filter-custom .history-filter-apply {
        width: 100% !important;
    }
}

.history-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.history-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    font-size: 13.5px;
}

.history-table th {
    padding: 13px 14px;
    text-align: left;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: var(--h-deep);
    white-space: nowrap;
    background: linear-gradient(180deg, var(--h-soft), rgba(255, 255, 255, 0));
    border-bottom: 1.5px solid var(--h-soft);
}

.history-table td {
    padding: 14px;
    white-space: nowrap;
    vertical-align: middle;
    color: #475569;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

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

.history-table tbody tr:hover td {
    background: var(--h-soft);
}

.hist-amount {
    font-weight: 800;
    color: #0f172a;
}

.hist-strong {
    font-weight: 700;
    color: #0f172a;
}

.hist-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    letter-spacing: -0.2px;
    color: #334155;
}

.hist-sub {
    display: block;
    margin-top: 3px;
    font-size: 11.5px;
    font-weight: 600;
    color: #94a3b8;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Date + time printed under the request number in the withdrawal history */
.hist-datetime {
    display: block;
    margin-top: 3px;
    font-size: 11.5px;
    font-weight: 700;
    color: #6366f1;
    white-space: nowrap;
}

/* Keeps a multi-line cell (value + sub line) together as one block so the
   stacked mobile layout does not spread its lines across the row. */
.hist-cell {
    display: block;
}

.hist-note {
    display: block;
    margin-top: 4px;
    font-size: 11.5px;
    font-weight: 600;
    color: #b45309;
    max-width: 240px;
    white-space: normal;
}

.history-empty {
    padding: 34px 16px 30px;
    text-align: center;
    font-size: 13.5px;
    font-weight: 600;
    color: #94a3b8;
}

/* Status pills — the table variants sit alongside the compact tree badges */
.status-badge.status-pending {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.status-badge.status-completed,
.status-badge.status-approved {
    background: rgba(16, 185, 129, 0.14);
    color: #047857;
}

.status-badge.status-failed,
.status-badge.status-rejected {
    background: rgba(239, 68, 68, 0.13);
    color: #b91c1c;
}

.history-table .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.5px;
    border-radius: 999px;
}

.history-table .status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* Phones: turn every row into its own labelled card */
@media (max-width: 720px) {
    .history-card {
        padding: 18px 16px 8px;
    }

    .history-head {
        flex-wrap: wrap;
    }

    .history-filter-custom {
        width: 100%;
    }

    .history-filter-custom input[type="date"] {
        flex: 1;
        min-width: 0;
    }

    .history-table {
        min-width: 0;
    }

    .history-table thead {
        display: none;
    }

    .history-table,
    .history-table tbody,
    .history-table tr,
    .history-table td {
        display: block;
        width: 100%;
    }

    .history-table tr {
        padding: 12px 12px 8px;
        margin-bottom: 10px;
        border-radius: 14px;
        background: rgba(248, 250, 252, 0.9);
        border: 1px solid rgba(15, 23, 42, 0.06);
    }

    .history-table tbody tr:last-child {
        margin-bottom: 4px;
    }

    .history-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 4px 16px;
        padding: 7px 0;
        text-align: right;
        white-space: normal;
        border-bottom: 1px dashed rgba(15, 23, 42, 0.07);
    }

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

    .history-table td::before {
        content: attr(data-label);
        flex-shrink: 0;
        font-size: 10.5px;
        font-weight: 800;
        letter-spacing: 0.6px;
        text-transform: uppercase;
        text-align: left;
        color: var(--h-deep);
    }

    .history-table tbody tr:hover td {
        background: transparent;
    }

    .hist-sub,
    .hist-note,
    .hist-cell {
        max-width: 100%;
        text-align: right;
    }
}

/* ============================================================
   Withdrawal page: device-adaptive layout
   ============================================================ */
/* Both withdrawal cards share one padding token so the spacing shrinks
   on smaller screens instead of squeezing the form. */
.wd-card {
    padding: 24px;
}

/* Saved payment methods: long account numbers wrap instead of
   stretching the row beyond the card. */
.pm-saved-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.pm-saved-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.pm-saved-ref {
    color: #6b7394;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.pm-saved-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* Tablets: both columns already stack (see the .pay-layout rule above),
   make sure neither side keeps a fixed width. */
@media (max-width: 1024px) {
    .pay-layout > .pay-panel,
    .pay-layout > .pay-summary {
        width: 100%;
    }
}

/* Phones and small tablets */
@media (max-width: 768px) {
    .wd-card {
        padding: 16px;
        border-radius: 18px;
    }

    /* 16px stops iOS from zooming the page when a field is focused. The
       forms carry inline font sizes, so !important is needed here. */
    .pay-layout input,
    .pay-layout select,
    .pay-layout textarea {
        font-size: 16px !important;
    }

    .pay-methods {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }

    .pm-saved-row {
        flex-wrap: wrap;
    }

    .pm-saved-actions {
        margin-left: auto;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .wd-card {
        padding: 14px;
    }

    .pm-saved-info {
        width: 100%;
    }

    .history-card .history-head {
        gap: 12px;
    }

    .history-icon {
        width: 40px;
        height: 40px;
        border-radius: 13px;
    }
}

/* ===================== AI Assistant Widget =====================
   Small floating avatar button shown bottom-right on every front-end page.
   The accent colour comes from the admin setting through --ai-accent. */
.ai-widget {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 9998;
    --ai-accent: #6366f1;
}

/* Floating avatar button */
.ai-fab {
    position: relative;
    width: 58px;
    height: 58px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background: transparent;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    line-height: 1;
    box-shadow: none;
    transition: transform 0.22s ease;
}
.ai-fab:hover { transform: translateY(-3px) scale(1.05); }
.ai-fab:active { transform: scale(0.96); }
.ai-fab-icon,
.ai-fab-icon svg { width: 44px; height: 44px; }
.ai-fab-icon { display: flex; align-items: center; justify-content: center; border-radius: 50%; overflow: hidden; }
.ai-fab-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Chat panel */
.ai-panel {
    position: absolute;
    right: 0;
    bottom: 74px;
    width: 340px;
    max-width: calc(100vw - 28px);
    height: 460px;
    max-height: calc(100vh - 130px);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: aiRise 0.24s ease;
}
.ai-panel[hidden] { display: none; }
@keyframes aiRise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ai-panel-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: linear-gradient(135deg, var(--ai-accent), #1e1b4b);
    color: #fff;
}
.ai-panel-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}
.ai-panel-avatar svg { width: 22px; height: 22px; }
.ai-panel-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.ai-panel-title { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ai-panel-title strong { font-size: 14px; }
.ai-panel-title small { font-size: 11px; opacity: 0.82; }
.ai-panel-close {
    background: rgba(255, 255, 255, 0.16);
    border: none;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}
.ai-panel-close:hover { background: rgba(255, 255, 255, 0.3); }

.ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f8fafc;
}
.ai-msg {
    max-width: 84%;
    padding: 9px 12px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.ai-msg p { margin: 0 0 6px; }
.ai-msg p:last-child { margin-bottom: 0; }
.ai-msg ul { margin: 4px 0 0; padding-left: 18px; }
.ai-msg li { margin-bottom: 3px; }
.ai-msg-bot {
    align-self: flex-start;
    background: #fff;
    color: #1e293b;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-bottom-left-radius: 5px;
}
.ai-msg-user {
    align-self: flex-end;
    background: var(--ai-accent);
    color: #fff;
    border-bottom-right-radius: 5px;
}
.ai-msg-failed { opacity: 0.9; }
.ai-msg-retry {
    margin-top: 7px;
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 3px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.22);
    font-size: 11.5px;
    color: #fff;
}
.ai-msg-retry a { color: #fff; font-weight: 700; text-decoration: underline; }
.ai-typing { display: flex; gap: 4px; align-items: center; padding: 12px 14px; }
.ai-typing i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #94a3b8;
    display: block;
    animation: aiDot 1.2s infinite ease-in-out;
}
.ai-typing i:nth-child(2) { animation-delay: 0.18s; }
.ai-typing i:nth-child(3) { animation-delay: 0.36s; }
@keyframes aiDot {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-4px); opacity: 1; }
}

.ai-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 14px 0;
    background: #f8fafc;
}
.ai-quick:empty { display: none; }
.ai-chip {
    border: 1px solid var(--ai-accent);
    color: var(--ai-accent);
    background: #fff;
    border-radius: 20px;
    padding: 5px 11px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}
.ai-chip:hover { background: var(--ai-accent); color: #fff; }

/* "Talk to a live agent" shortcut — styled like the quick-reply chips */
.ai-agent-chip-wrap {
    padding: 8px 14px 0;
    background: #f8fafc;
}
.ai-agent-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--ai-accent);
    color: var(--ai-accent);
    background: #fff;
    border-radius: 20px;
    padding: 7px 14px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.ai-agent-chip svg { width: 15px; height: 15px; flex-shrink: 0; }
.ai-agent-chip:hover {
    background: var(--ai-accent);
    color: #fff;
    transform: translateY(-1px);
}

.ai-form {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
}
.ai-form input {
    flex: 1;
    height: 40px;
    min-height: 40px;
    box-sizing: border-box;
    margin: 0;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 14px;
    outline: none;
}
.ai-form input:focus { border-color: var(--ai-accent); }
.ai-send {
    flex: 0 0 40px;
    border: none;
    background: linear-gradient(135deg, var(--ai-accent), #1e1b4b);
    color: #fff;
    width: 40px;
    height: 40px;
    min-height: 40px;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.18s ease;
}
.ai-send:hover { transform: translateY(-1px); }

@media (max-width: 480px) {
    .ai-widget { right: 14px; bottom: 14px; }
    .ai-fab { width: 52px; height: 52px; font-size: 22px; }
    .ai-fab-icon,
    .ai-fab-icon svg { width: 44px; height: 44px; }
    .ai-panel {
        position: fixed;
        top: 12px;
        left: 10px;
        right: 10px;
        bottom: 78px;
        width: auto;
        height: auto;
        max-height: none;
        max-width: none;
    }
}

/* Admin panel: live preview chip inside the AI assistant tab */
.ai-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
    padding: 16px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.06);
}
.ai-preview-fab {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
    color: #fff;
    flex-shrink: 0;
    background: transparent;
    box-shadow: none;
}
.ai-preview-fab svg { width: 28px; height: 28px; }
.ai-preview-fab img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.ai-preview-text { font-size: 13px; color: #64748b; }

/* Future Skill Hub site-wide palette: midnight, electric blue and gold. */
:root {
    --brand-navy: #061126;
    --brand-blue: #0876e8;
    --brand-cyan: #28c7ff;
    --brand-gold: #f3ae18;
    --brand-gold-light: #ffd86a;
}
body {
    background-color: #f5f8fc;
    background-image:
        radial-gradient(circle at 8% 8%, rgba(8, 118, 232, 0.11) 0%, transparent 38%),
        radial-gradient(circle at 92% 88%, rgba(243, 174, 24, 0.1) 0%, transparent 34%),
        linear-gradient(135deg, #f8fbff 0%, #edf3fa 100%);
}
nav {
    background: linear-gradient(105deg, #061126 0%, #0a1b35 58%, #0a2e50 100%);
    border-bottom: 2px solid var(--brand-gold);
    box-shadow: 0 8px 28px rgba(4, 17, 38, 0.24);
}
nav .nav-links a:not(.btn-logout):hover { color: var(--brand-gold-light); }
.mobile-menu {
    background: linear-gradient(155deg, #061126 0%, #0a1b35 65%, #0a2e50 100%);
    border-right: 1px solid rgba(243, 174, 24, 0.36);
}
.mobile-menu-item:hover { background: rgba(8, 118, 232, 0.22); color: var(--brand-gold-light); }
form button:not(.btn-danger):not(.danger) {
    background: linear-gradient(120deg, #0876e8, #159cf0 58%, #075eb8);
    box-shadow: 0 4px 0 rgba(5, 75, 145, 0.3), 0 12px 24px -14px rgba(8, 118, 232, 0.75);
}
.btn-3d.active,
.modal-action.primary {
    background: linear-gradient(120deg, #0876e8, #159cf0 58%, #075eb8);
    box-shadow: 0 5px 0 -1px rgba(5, 75, 145, 0.38), 0 14px 28px -15px rgba(8, 118, 232, 0.72);
}
input:focus, select:focus, textarea:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(8, 118, 232, 0.12);
}
footer {
    position: relative;
    isolation: isolate;
    color: #dbe7f5;
    /* Duotone animated surface, same visual language as the header. */
    background: linear-gradient(102deg, #04101f 0%, #0a2342 26%, #10498a 50%, #0a2342 74%, #04101f 100%);
    background-size: 240% 100%;
    border-top: 2px solid var(--brand-gold);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        inset 0 22px 34px -26px rgba(0, 0, 0, 0.75),
        0 -10px 26px -18px rgba(2, 10, 24, 0.9);
    animation: brandNavDuotone 18s ease-in-out infinite;
}
footer::after { z-index: 1; }
/* 3D light sweep travelling across the footer */
footer::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(100deg, transparent 34%, rgba(40, 199, 255, 0.16) 48%, rgba(255, 255, 255, 0.12) 52%, transparent 66%);
    background-size: 260% 100%;
    animation: brandNavSweep 11s linear infinite;
    pointer-events: none;
}
.footer-contact a { color: var(--brand-gold-light); }
.footer-contact a:hover { color: var(--brand-cyan); }
.maintenance-card {
    box-shadow: 0 18px 50px -22px rgba(8, 118, 232, 0.38), 0 5px 0 -2px rgba(243, 174, 24, 0.3);
}
.ai-fab,
.ai-panel-header,
.ai-send {
    background: linear-gradient(140deg, #0876e8 0%, #07549f 72%, #061126 100%);
}

/* File Manager buttons use distinct pastel fills with matching readable text. */
.fm-page .fm-tools button.mini-btn,
.fm-page #fmBulkBar button.mini-btn,
.fm-page .fm-row-actions .fm-act,
.fm-page .fm-editor-actions a.mini-btn,
.fm-page .fm-topbar a.mini-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    font-weight: 700;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.fm-page .fm-tools button.fm-btn-file {
    color: #1e3a8a !important;
    background: #dbeafe !important;
    border-color: #93c5fd !important;
}
.fm-page .fm-tools button.fm-btn-file:hover {
    color: #172554 !important;
    background: #bfdbfe !important;
}
.fm-page .fm-tools button.fm-btn-folder {
    color: #5b21b6 !important;
    background: #ede9fe !important;
    border-color: #c4b5fd !important;
}
.fm-page .fm-tools button.fm-btn-folder:hover {
    color: #4c1d95 !important;
    background: #ddd6fe !important;
}
.fm-page .fm-tools button.fm-btn-upload {
    color: #166534 !important;
    background: #dcfce7 !important;
    border-color: #86efac !important;
}
.fm-page .fm-tools button.fm-btn-upload:hover {
    color: #14532d !important;
    background: #bbf7d0 !important;
}
.fm-page #fmBulkBar button.fm-btn-clear {
    color: #334155 !important;
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
}
.fm-page #fmBulkBar button.fm-btn-clear:hover {
    color: #1e293b !important;
    background: #cbd5e1 !important;
}
.fm-page button.fm-btn-delete,
.fm-page .fm-row-actions .fm-act-danger {
    color: #991b1b !important;
    background: #fee2e2 !important;
    border-color: #fca5a5 !important;
}
.fm-page button.fm-btn-delete:hover,
.fm-page .fm-row-actions .fm-act-danger:hover {
    color: #7f1d1d !important;
    background: #fecaca !important;
    border-color: #f87171 !important;
}
.fm-page .fm-row-actions .fm-act-view {
    color: #1e40af !important;
    background: #dbeafe !important;
    border-color: #93c5fd !important;
}
.fm-page .fm-row-actions .fm-act-download,
.fm-page .fm-editor-actions .fm-btn-download {
    color: #155e75 !important;
    background: #cffafe !important;
    border-color: #67e8f9 !important;
}
.fm-page .fm-row-actions .fm-act-rename,
.fm-page .fm-editor-actions .fm-btn-close {
    color: #6b21a8 !important;
    background: #f3e8ff !important;
    border-color: #d8b4fe !important;
}
.fm-page .fm-row-actions .fm-act-copy {
    color: #92400e !important;
    background: #fef3c7 !important;
    border-color: #fcd34d !important;
}
.fm-page .fm-row-actions .fm-act-move {
    color: #115e59 !important;
    background: #ccfbf1 !important;
    border-color: #5eead4 !important;
}
.fm-page .fm-row-actions .fm-act-permission {
    color: #334155 !important;
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
}
.fm-page .fm-topbar a.fm-btn-up,
.fm-page .fm-topbar a.fm-btn-refresh {
    color: #1e3a8a !important;
    background: #dbeafe !important;
    border-color: #93c5fd !important;
}
.fm-page .fm-topbar a.fm-btn-admin {
    color: #78350f !important;
    background: #fef3c7 !important;
    border-color: #fcd34d !important;
}
.fm-page .fm-editor button.save-btn {
    color: #1e3a8a !important;
    background: #dbeafe !important;
    border: 1px solid #93c5fd !important;
    box-shadow: none !important;
}
.fm-page .fm-editor button.save-btn:hover {
    color: #172554 !important;
    background: #bfdbfe !important;
}
.fm-page .fm-topbar a.fm-btn-project {
    color: #5b21b6 !important;
    background: #f3e8ff !important;
    border-color: #d8b4fe !important;
}
.fm-page #fmBulkBar button.fm-btn-zip {
    color: #5b21b6 !important;
    background: #f3e8ff !important;
    border-color: #d8b4fe !important;
}
.fm-source-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    color: #166534;
    background: #dcfce7;
    border: 1px solid #86efac;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}
.fm-page .fm-editor textarea.fm-source-code {
    min-height: 65vh;
    padding: 18px;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px;
    background: #fff !important;
    color: #111827 !important;
    -webkit-text-fill-color: #111827;
    caret-color: #111827;
    color-scheme: light;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.6;
    tab-size: 4;
}
.fm-permission-modal[hidden] { display: none !important; }
.fm-permission-modal {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: grid;
    place-items: center;
    padding: 20px;
}
.fm-permission-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.52);
    backdrop-filter: blur(3px);
}
.fm-permission-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 590px);
    padding: 24px;
    border: 1px solid #dbe4ef;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.3);
}
.fm-permission-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.fm-permission-head h2 { margin: 0 0 5px; font-size: 21px; }
.fm-permission-head p { color: #64748b; font: 12px Consolas, "Courier New", monospace; overflow-wrap: anywhere; }
.fm-modal-close {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    color: #334155;
    background: #f1f5f9;
    font-size: 22px;
    cursor: pointer;
}
.fm-permission-help { margin: 16px 0 10px; color: #475569; font-size: 13px; }
.fm-permission-grid {
    display: grid;
    grid-template-columns: minmax(100px, 1fr) repeat(3, minmax(92px, 1fr));
    overflow: hidden;
    border: 1px solid #dbe4ef;
    border-radius: 12px;
}
.fm-permission-grid > * {
    display: flex;
    align-items: center;
    min-height: 45px;
    padding: 8px 10px;
    border-bottom: 1px solid #e8eef5;
    background: #fff;
}
.fm-permission-grid > :nth-child(-n+4) {
    min-height: 38px;
    background: #f1f5f9;
    color: #475569;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}
.fm-permission-grid > strong {
    color: #0f172a;
    font-size: 13px;
}
.fm-permission-cell { justify-content: center; gap: 6px; cursor: pointer; }
.fm-permission-cell input {
    width: 16px !important;
    height: 16px;
    padding: 0 !important;
    margin: 0 !important;
    accent-color: #2563eb;
}
.fm-permission-cell span { color: #64748b; font-size: 11px; }
.fm-permission-cell span.enabled { color: #166534; font-weight: 800; }
.fm-permission-current {
    margin-top: 12px;
    color: #475569;
    font-size: 13px;
}
.fm-permission-current strong {
    color: #0f172a;
    font-family: Consolas, "Courier New", monospace;
}
.fm-permission-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 20px;
}
.fm-page .fm-permission-actions button {
    width: auto !important;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.fm-page .fm-permission-actions .fm-modal-cancel {
    color: #334155;
    background: #e2e8f0;
    border-color: #cbd5e1;
}
.fm-page .fm-permission-actions .fm-modal-save {
    color: #1e3a8a;
    background: #dbeafe;
    border-color: #93c5fd;
    box-shadow: none;
}
@media (max-width: 540px) {
    .fm-permission-dialog { padding: 18px 14px; }
    .fm-permission-grid { grid-template-columns: minmax(78px, 1fr) repeat(3, minmax(68px, 1fr)); }
    .fm-permission-grid > * { padding: 7px 5px; }
    .fm-permission-cell { flex-direction: column; gap: 3px; }
}

.admin-nav-hidden { display: none !important; }
.admin-access-page {
    display: grid;
    gap: 22px;
    width: 100%;
    perspective: 1400px;
    isolation: isolate;
}
.admin-access-heading {
    position: relative;
    display: flex;
    min-height: 190px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    overflow: hidden;
    padding: 30px 34px;
    border: 1px solid rgba(191, 219, 254, 0.85);
    border-radius: 24px;
    background:
        radial-gradient(circle at 80% 20%, rgba(96, 165, 250, 0.38), transparent 28%),
        radial-gradient(circle at 100% 100%, rgba(167, 139, 250, 0.34), transparent 35%),
        linear-gradient(125deg, #101d46 0%, #1e3a72 55%, #263b75 100%);
    box-shadow: 0 24px 55px rgba(30, 58, 138, 0.22), inset 0 1px rgba(255,255,255,.24);
    transform-style: preserve-3d;
    animation: adminAccessArrive .65s cubic-bezier(.2,.8,.2,1) both;
}
.admin-access-heading::after {
    position: absolute;
    right: 14%;
    bottom: -150px;
    width: 310px;
    height: 310px;
    border: 1px solid rgba(191, 219, 254, .18);
    border-radius: 50%;
    box-shadow: 0 0 0 24px rgba(191,219,254,.035), 0 0 0 52px rgba(191,219,254,.025);
    content: "";
    pointer-events: none;
}
.admin-access-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #bfdbfe;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.3px;
    text-transform: uppercase;
}
.admin-access-kicker i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #86efac;
    box-shadow: 0 0 0 5px rgba(134,239,172,.13), 0 0 14px #86efac;
}
.admin-access-heading h2 {
    margin: 9px 0 7px;
    color: #fff;
    font-size: clamp(27px, 4vw, 38px);
    letter-spacing: -.04em;
}
 .admin-access-heading p {
    margin: 0;
    max-width: 720px;
    color: #dbeafe;
    line-height: 1.55;
}
.admin-access-orbit {
    position: relative;
    display: grid;
    width: 130px;
    height: 130px;
    flex: 0 0 130px;
    place-items: center;
    transform: translateZ(24px);
    animation: adminAccessFloat 5s ease-in-out infinite;
}
.admin-access-orbit-ring {
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(219,234,254,.48);
    border-radius: 50%;
    box-shadow: 0 0 35px rgba(147,197,253,.28), inset 0 0 22px rgba(147,197,253,.12);
}
.admin-access-orbit-core {
    display: grid;
    width: 76px;
    height: 76px;
    place-items: center;
    border: 1px solid rgba(255,255,255,.44);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(191,219,254,.42), rgba(99,102,241,.38));
    box-shadow: 8px 12px 26px rgba(3,7,18,.3), inset 1px 1px rgba(255,255,255,.55), inset -5px -6px 14px rgba(30,41,99,.3);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1px;
    transform: rotate(-8deg);
}
.admin-access-orbit-dot {
    position: absolute;
    top: 11px;
    right: 19px;
    width: 14px;
    height: 14px;
    border: 3px solid #c7d2fe;
    border-radius: 50%;
    background: #818cf8;
    box-shadow: 0 0 18px #a5b4fc;
}
.admin-access-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.admin-access-stat {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 19px;
    border: 1px solid rgba(199,210,254,.8);
    border-radius: 17px;
    background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(238,242,255,.95));
    box-shadow: 0 9px 22px rgba(49,46,129,.08), inset 0 1px #fff;
    transition: transform .25s ease, box-shadow .25s ease;
}
.admin-access-stat:hover { transform: translateY(-4px) rotateX(3deg); box-shadow: 0 16px 28px rgba(49,46,129,.13); }
.admin-access-stat span { color: #475569; font-size: 13px; font-weight: 700; }
.admin-access-stat strong {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 13px;
    background: linear-gradient(145deg, #818cf8, #4f46e5);
    box-shadow: 0 5px 0 #3730a3, 0 9px 15px rgba(79,70,229,.25), inset 0 1px rgba(255,255,255,.55);
    color: #fff;
    font-size: 17px;
}
.admin-access-card {
    position: relative;
    padding: 25px;
    overflow: hidden;
    border: 1px solid #dbe4f5;
    border-radius: 21px;
    background: linear-gradient(150deg, #fff 0%, #fbfcff 65%, #f4f7ff 100%);
    box-shadow: 0 16px 38px rgba(30,41,99,.075), inset 0 1px #fff;
    transform-style: preserve-3d;
    transition: transform .28s ease, box-shadow .28s ease;
    animation: adminAccessArrive .65s cubic-bezier(.2,.8,.2,1) both;
}
.admin-access-card:hover {
    transform: translateY(-2px) rotateX(.35deg);
    box-shadow: 0 22px 44px rgba(30,41,99,.11), inset 0 1px #fff;
}
.admin-access-card-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}
.admin-access-card-heading > div { min-width: 0; }
.admin-access-card-heading h3 {
    margin: 0 0 5px;
    color: #172554;
    font-size: 19px;
    letter-spacing: -.02em;
}
.admin-access-card-heading p { margin: 0; color: #64748b; font-size: 13px; line-height: 1.55; }
.admin-access-step {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border: 1px solid #c7d2fe;
    border-radius: 14px;
    background: linear-gradient(145deg, #eef2ff, #c7d2fe);
    box-shadow: 0 4px 0 #a5b4fc, 0 7px 13px rgba(79,70,229,.14), inset 0 1px #fff;
    color: #3730a3;
    font-size: 12px;
    font-weight: 900;
}
.admin-access-form { display: grid; gap: 20px; margin-top: 22px; }
.admin-access-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 91px;
    gap: 15px;
}
.admin-access-field {
    display: grid;
    height: 91px;
    min-width: 0;
    grid-template-rows: 18px 45px 14px;
    align-content: start;
    gap: 7px;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
}
.admin-access-field input,
.admin-access-field select {
    width: 100%;
    height: 45px;
    min-height: 45px;
    box-sizing: border-box;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #d4ddef;
    border-radius: 12px;
    outline: none;
    background: linear-gradient(180deg, #fff, #f8faff);
    box-shadow: inset 0 1px 2px rgba(30,41,59,.04), 0 3px 0 rgba(226,232,240,.65);
    color: #0f172a;
    font: inherit;
    font-weight: 500;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.admin-access-field .password-field {
    width: 100%;
    min-width: 0;
    height: 45px;
    margin: 0;
}
.admin-access-field .password-field input { width: 100%; height: 45px; min-height: 45px; margin: 0; }
.admin-access-field input:focus,
.admin-access-field select:focus { border-color: #818cf8; box-shadow: 0 0 0 4px rgba(129,140,248,.15), 0 4px 0 rgba(199,210,254,.7); }
.admin-access-field small {
    display: block;
    height: 14px;
    min-height: 14px;
    align-self: start;
    margin: 0;
    color: #64748b;
    font-size: 11px;
    font-weight: 500;
    line-height: 14px;
}
.admin-access-permission-panel {
    padding: 17px;
    border: 1px solid #dbe4f5;
    border-radius: 17px;
    background: linear-gradient(145deg, #f8faff, #eef2ff);
    box-shadow: inset 0 1px #fff;
}
.admin-access-permission-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.admin-access-permission-title > div { display: flex; align-items: center; gap: 10px; }
.admin-access-permission-title .admin-access-step { width: 31px; height: 31px; flex-basis: 31px; border-radius: 10px; }
.admin-access-permission-title strong { color: #1e293b; font-size: 13px; }
.admin-access-permission-title > span { color: #64748b; font-size: 11px; text-align: right; }
.admin-access-permissions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
}
.admin-access-permission {
    position: relative;
    display: flex;
    height: 50px;
    min-height: 50px;
    box-sizing: border-box;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    overflow: hidden;
    border: 1px solid #dce4f2;
    border-radius: 13px;
    background: linear-gradient(145deg, #fff, #f6f8ff);
    box-shadow: 0 3px 0 rgba(226,232,240,.75), inset 0 1px #fff;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transform: translateZ(0);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.admin-access-permission-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-access-permission:hover {
    transform: translateY(-2px) rotateX(2deg);
    border-color: #a5b4fc;
    box-shadow: 0 6px 0 #dbeafe, 0 11px 17px rgba(79,70,229,.1), inset 0 1px #fff;
}
.admin-access-permission input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.admin-access-permission-check {
    display: grid;
    width: 21px;
    height: 21px;
    flex: 0 0 21px;
    place-items: center;
    border: 1.5px solid #bac7dd;
    border-radius: 7px;
    background: linear-gradient(145deg, #fff, #edf2fb);
    box-shadow: inset 0 1px 2px rgba(15,23,42,.08), 0 2px 0 #dbe3f0;
    color: #fff;
    font-size: 13px;
    transition: all .2s ease;
}
.admin-access-permission:has(input:checked) {
    border-color: #818cf8;
    background: linear-gradient(145deg, #eef2ff, #dbeafe);
    box-shadow: 0 4px 0 #c7d2fe, 0 8px 16px rgba(79,70,229,.11), inset 0 1px #fff;
    color: #312e81;
}
.admin-access-permission:has(input:checked) .admin-access-permission-check {
    border-color: #4f46e5;
    background: linear-gradient(145deg, #818cf8, #4f46e5);
    box-shadow: 0 2px 0 #3730a3, inset 0 1px rgba(255,255,255,.45);
}
.admin-access-permission:has(input:checked) .admin-access-permission-check::after { content: "✓"; }
.admin-access-permission:focus-within { outline: 3px solid rgba(129,140,248,.25); outline-offset: 2px; }
.admin-access-owner-note {
    margin-top: 13px;
    padding: 10px 12px;
    border-left: 3px solid #f59e0b;
    border-radius: 8px;
    background: #fffbeb;
    color: #854d0e;
    font-size: 11px;
    line-height: 1.5;
}
.admin-access-primary,
.admin-access-revoke {
    width: fit-content;
    min-height: 43px;
    padding: 10px 17px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.admin-access-primary {
    width: var(--save-btn-width);
    color: #fff;
    background: linear-gradient(145deg, #6366f1, #4338ca);
    box-shadow: 0 5px 0 #312e81, 0 10px 20px rgba(67,56,202,.22), inset 0 1px rgba(255,255,255,.45);
}
.admin-access-primary:hover,
.admin-access-revoke:hover { transform: translateY(-2px); filter: brightness(1.04); }
.admin-access-current-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 16px; }
.admin-access-subadmin {
    display: grid;
    align-content: start;
    gap: 15px;
    min-width: 0;
    padding: 19px;
    border: 1px solid #dbe4f5;
    border-radius: 18px;
    background: linear-gradient(150deg, #fff, #f7f8ff);
    box-shadow: 0 8px 0 #edf0fa, 0 14px 23px rgba(49,46,129,.08), inset 0 1px #fff;
    transform-style: preserve-3d;
    transition: transform .25s ease, box-shadow .25s ease;
}
.admin-access-subadmin:hover {
    transform: translateY(-4px) rotateX(1deg);
    box-shadow: 0 10px 0 #e6e9fa, 0 20px 30px rgba(49,46,129,.13), inset 0 1px #fff;
}
.admin-access-subadmin-heading {
    display: flex;
    align-items: center;
    gap: 12px;
}
.admin-access-avatar {
    display: grid;
    width: 47px;
    height: 47px;
    flex: 0 0 47px;
    place-items: center;
    border: 1px solid #c7d2fe;
    border-radius: 15px;
    background: linear-gradient(145deg, #a5b4fc, #4f46e5);
    box-shadow: 0 5px 0 #3730a3, 0 9px 14px rgba(79,70,229,.19), inset 0 1px rgba(255,255,255,.55);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
}
.admin-access-subadmin-name > span { color: #64748b; font-size: 11px; }
.admin-access-subadmin-name { display: grid; min-width: 0; gap: 4px; }
.admin-access-subadmin-name strong { overflow-wrap: anywhere; color: #0f172a; font-size: 14px; }
.admin-access-subadmin-heading > small { margin-left: auto; color: #64748b; font-size: 10px; text-align: right; }
.admin-access-profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.admin-access-profile-grid > div {
    display: grid;
    min-width: 0;
    gap: 4px;
    padding: 9px 10px;
    border: 1px solid #e7ebf4;
    border-radius: 10px;
    background: rgba(248,250,252,.85);
}
.admin-access-profile-grid span { color: #64748b; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.admin-access-profile-grid strong { overflow-wrap: anywhere; color: #334155; font-size: 11px; font-weight: 650; line-height: 1.4; }
.admin-access-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.admin-access-revoke {
    border-color: #fecaca;
    background: linear-gradient(145deg, #fff1f2, #ffe4e6);
    box-shadow: 0 4px 0 #fecaca;
    color: #991b1b;
}
.admin-access-empty {
    display: grid;
    gap: 5px;
    padding: 22px;
    border: 1px dashed #c7d2fe;
    border-radius: 15px;
    background: linear-gradient(145deg, #f8faff, #eef2ff);
    color: #475569;
    text-align: center;
}
.admin-access-empty strong { color: #334155; font-size: 13px; }
.admin-access-empty span { color: #64748b; font-size: 12px; }
@keyframes adminAccessArrive {
    from { opacity: 0; transform: translateY(14px) rotateX(2deg); }
    to { opacity: 1; transform: translateY(0) rotateX(0); }
}
@keyframes adminAccessFloat {
    0%, 100% { transform: translateY(0) translateZ(24px); }
    50% { transform: translateY(-7px) translateZ(24px); }
}
@media (max-width: 640px) {
    .admin-access-heading { min-height: 0; padding: 24px 20px; }
    .admin-access-orbit { width: 82px; height: 82px; flex-basis: 82px; }
    .admin-access-orbit-ring { inset: 4px; }
    .admin-access-orbit-core { width: 54px; height: 54px; border-radius: 17px; font-size: 9px; }
    .admin-access-orbit-dot { top: 4px; right: 8px; width: 11px; height: 11px; }
    .admin-access-card { padding: 18px; }
    .admin-access-stats { gap: 8px; }
    .admin-access-stat { min-height: 66px; padding: 11px; }
    .admin-access-stat span { font-size: 10px; }
    .admin-access-stat strong { width: 32px; height: 32px; border-radius: 10px; font-size: 14px; }
    .admin-access-form-grid { grid-template-columns: 1fr; }
    .admin-access-profile-grid { grid-template-columns: 1fr 1fr; }
    .admin-access-subadmin-heading { flex-wrap: wrap; }
    .admin-access-subadmin-heading > small { margin-left: 59px; text-align: left; }
    .admin-access-permission-title { align-items: flex-start; flex-direction: column; }
    .admin-access-permission-title > span { text-align: left; }
}
@media (max-width: 390px) {
    .admin-access-stats { grid-template-columns: 1fr; }
    .admin-access-profile-grid { grid-template-columns: 1fr; }
    .admin-access-current-grid { grid-template-columns: 1fr; }
    .admin-access-subadmin { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    .admin-access-heading,
    .admin-access-card,
    .admin-access-orbit { animation: none; }
    .admin-access-stat,
    .admin-access-card,
    .admin-access-subadmin,
    .admin-access-permission { transition: none; }
}

/* ==========================================================================
   Branded wallpaper (body.brand-bg) - the site-name background + dark base
   shared by the auth pages and every other public page, so the whole site
   matches. Auth-only shell tweaks stay scoped to body.auth-page below.
   ========================================================================== */
body.brand-bg {
    background: #050d1e;
    background-image:
        radial-gradient(circle at 14% 10%, rgba(99, 102, 241, 0.40) 0%, transparent 44%),
        radial-gradient(circle at 86% 90%, rgba(6, 182, 212, 0.34) 0%, transparent 46%),
        linear-gradient(140deg, #050d1e 0%, #0a1b35 52%, #0a2e50 100%);
    background-attachment: fixed;
    color: #e2e8f5;
}
body.auth-page nav.brand-nav {
    /* Same duotone surface, kept translucent so the glassy auth look stays. */
    background: linear-gradient(102deg, rgba(4, 16, 31, 0.74) 0%, rgba(10, 35, 66, 0.68) 26%, rgba(16, 73, 138, 0.62) 50%, rgba(10, 35, 66, 0.68) 74%, rgba(4, 16, 31, 0.74) 100%);
    background-size: 240% 100%;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom-color: rgba(243, 174, 24, 0.55);
    box-shadow: 0 8px 26px rgba(2, 8, 22, 0.45);
}
body.auth-page .container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
body.auth-page footer {
    position: relative;
    z-index: 1;
    /* Same duotone surface as the header, kept translucent for the auth look. */
    background: linear-gradient(102deg, rgba(4, 16, 31, 0.82) 0%, rgba(10, 35, 66, 0.76) 26%, rgba(16, 73, 138, 0.68) 50%, rgba(10, 35, 66, 0.76) 74%, rgba(4, 16, 31, 0.82) 100%);
    background-size: 240% 100%;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* --- Public pages that share the wallpaper ---
   The dark base + wallpaper come from body.brand-bg; here the content
   container is made transparent so the site-name background shows through,
   exactly like on the auth pages. */
body.brand-bg:not(.auth-page) .container {
    position: relative;
    z-index: 1;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
body.brand-bg:not(.auth-page) footer {
    position: relative;
    z-index: 1;
}
/* Legal / info pages: the hero sits directly on the wallpaper, so its text is
   lightened to stay readable on the dark brand background. */
body.brand-bg:not(.auth-page) .legal-hero h1 {
    background: linear-gradient(100deg, #ffffff 0%, #bcd7ff 46%, #f7b62a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
body.brand-bg:not(.auth-page) .legal-hero p { color: #b9cbe0; }
body.brand-bg:not(.auth-page) .legal-updated {
    color: #cbd8ea;
    background: rgba(148, 163, 184, 0.18);
}
/* Account-recovery page: bare auth text with no card behind it. */
body.brand-bg:not(.auth-page) .auth-switch { color: #b9cbe0; }
body.brand-bg:not(.auth-page) .auth-switch a { color: #7cc7ff; }

/* --- Wallpaper layers: brand name text + site logo mark --- */
body.brand-bg .auth-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
body.brand-bg .auth-bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
}
body.brand-bg .auth-bg-glow-a {
    top: -14%;
    left: -8%;
    width: 46vw;
    height: 46vw;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.55), transparent 68%);
}
body.brand-bg .auth-bg-glow-b {
    right: -12%;
    bottom: -18%;
    width: 52vw;
    height: 52vw;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.42), transparent 68%);
}
body.brand-bg .auth-bg-words {
    position: absolute;
    inset: -6% -6%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(10px, 3vw, 44px);
    transform: rotate(-9deg);
}
body.brand-bg .auth-bg-words span {
    display: block;
    white-space: nowrap;
    text-align: center;
    text-transform: uppercase;
    font-size: clamp(54px, 12vw, 190px);
    font-weight: 900;
    line-height: 0.92;
    letter-spacing: clamp(1px, 0.6vw, 10px);
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(148, 197, 255, 0.20);
}
body.brand-bg .auth-bg-words span:nth-child(2) {
    -webkit-text-stroke: 0;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.30), rgba(6, 182, 212, 0.28), rgba(243, 174, 24, 0.26));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
body.brand-bg .auth-bg-words span:nth-child(3) { opacity: 0.55; }
body.brand-bg .auth-bg-tagline {
    position: absolute;
    left: 50%;
    bottom: clamp(10px, 4vh, 44px);
    transform: translateX(-50%);
    white-space: nowrap;
    text-transform: uppercase;
    font-size: clamp(10px, 1.4vw, 18px);
    font-weight: 800;
    letter-spacing: clamp(2px, 1.1vw, 14px);
    color: rgba(243, 174, 24, 0.36);
}
body.brand-bg .auth-bg-mark {
    position: absolute;
    top: 50%;
    right: -16%;
    width: clamp(280px, 40vw, 560px);
    height: clamp(280px, 40vw, 560px);
    transform: translateY(-50%);
    opacity: 0.14;
    filter: drop-shadow(0 0 70px rgba(8, 118, 232, 0.55));
    animation: authBgFloat 12s ease-in-out infinite;
}
body.brand-bg .auth-bg-mark img {
    display: block;
    width: 100%;
    height: 100%;
}

/* --- Split auth card: brand showcase on the left, form on the right --- */
.auth-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr);
    align-items: stretch;
    width: min(1040px, 100%);
    margin: clamp(18px, 3.5vh, 34px) auto;
    padding: clamp(20px, 3vh, 40px) clamp(14px, 2.4vw, 30px);
    border-radius: 34px;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid rgba(255, 255, 255, 0.65);
    background: #ffffff;
    box-shadow: 0 44px 96px rgba(2, 8, 22, 0.55), 0 1px 0 rgba(255, 255, 255, 0.6) inset;
    animation: authRise 0.85s ease both;
}
.auth-shell::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    z-index: 3;
    background: linear-gradient(90deg, #ffd86a 0%, #f3ae18 52%, #c78400 100%);
}
.auth-shell-solo { grid-template-columns: minmax(0, 1fr); }
.auth-shell-solo .auth-panel { padding: clamp(30px, 4vw, 56px); }
/* Register page holds more fields, so the card gets extra room for a 2-column grid */
.auth-shell-wide {
    width: min(1160px, 100%);
    grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
    margin: clamp(12px, 1.7vh, 18px) auto;
    padding: clamp(18px, 2.2vh, 26px) clamp(14px, 2.4vw, 30px);
}
.auth-shell-wide .auth-panel {
    padding: clamp(22px, 2.5vh, 34px) clamp(26px, 3vw, 42px);
}
.auth-brand {
    position: relative;
    display: grid;
    align-content: center;
    justify-items: start;
    gap: 13px;
    min-width: 0;
    padding: clamp(28px, 3.4vw, 50px);
    overflow: hidden;
    color: #e8eefc;
    border-radius: 24px;
    background:
        radial-gradient(circle at 16% 10%, rgba(99, 102, 241, 0.55), transparent 58%),
        radial-gradient(circle at 90% 92%, rgba(6, 182, 212, 0.42), transparent 60%),
        linear-gradient(150deg, #071428 0%, #0b2344 58%, #0d3b63 100%);
}
.auth-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.5;
    background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px);
    background-size: 22px 22px;
}
.auth-brand::after {
    content: '';
    position: absolute;
    right: -76px;
    bottom: -88px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    pointer-events: none;
    border: 1px solid rgba(148, 197, 255, 0.22);
    box-shadow: 0 0 0 26px rgba(148, 197, 255, 0.06), 0 0 0 54px rgba(148, 197, 255, 0.04);
}
.auth-brand > * { position: relative; z-index: 1; }
.auth-brand-badge {
    display: grid;
    place-items: center;
    width: clamp(62px, 6.4vw, 82px);
    height: clamp(62px, 6.4vw, 82px);
    margin-bottom: 4px;
    padding: 12px;
    border-radius: 22px;
    border: 1px solid rgba(148, 197, 255, 0.30);
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.05));
    box-shadow: 0 18px 38px rgba(2, 8, 22, 0.55), inset 0 1px rgba(255, 255, 255, 0.30);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: authBadgeFloat 7s ease-in-out infinite;
}
.auth-brand-badge img { display: block; width: 100%; height: 100%; }
.auth-brand-kicker {
    color: #f7b62a;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2.4px;
    text-transform: uppercase;
}
.auth-brand-name {
    margin: 0;
    text-transform: uppercase;
    font-size: clamp(26px, 2.9vw, 40px);
    font-weight: 900;
    line-height: 1.04;
    letter-spacing: 1px;
    color: #ffffff;
    background: linear-gradient(100deg, #ffffff 0%, #bcd7ff 46%, #f7b62a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.auth-brand-tagline {
    color: #8fd6ff;
    font-size: clamp(12px, 1.5vw, 15px);
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}
.auth-brand-note {
    max-width: 46ch;
    color: rgba(226, 232, 245, 0.78);
    font-size: 14px;
    line-height: 1.6;
}
.auth-brand-points {
    display: grid;
    gap: 10px;
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
}
.auth-brand-points li {
    position: relative;
    padding-left: 26px;
    color: rgba(226, 232, 245, 0.92);
    font-size: 13.5px;
    font-weight: 600;
}
.auth-brand-points li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: linear-gradient(145deg, #f7d34f, #f29a00);
    box-shadow: 0 0 0 4px rgba(243, 174, 24, 0.14);
}

/* --- Form panel (right half of the card) --- */
.auth-panel {
    position: relative;
    display: grid;
    align-content: center;
    padding: clamp(26px, 3.2vw, 46px);
    background: linear-gradient(165deg, #ffffff 0%, #f4f8fd 100%);
    animation: authRise 1s ease both;
}
.auth-panel .auth-intro,
.auth-panel .auth-form,
.auth-panel .auth-switch,
.auth-panel .auth-lead { max-width: 100%; }
.auth-panel .auth-intro { margin: 0 0 16px; }
.auth-panel .auth-intro h2 {
    font-size: clamp(24px, 3.4vw, 32px);
    font-weight: 900;
    letter-spacing: -0.3px;
    color: var(--brand-navy);
    background: linear-gradient(180deg, #159cf0 0%, #0876e8 46%, #061126 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 1px 0 #ffffff) drop-shadow(0 2px 0 rgba(8, 118, 232, 0.38)) drop-shadow(0 8px 12px rgba(4, 17, 38, 0.22));
}
.auth-panel .auth-lead { margin-bottom: 14px; color: #5c6f88; }
.auth-panel .auth-form label {
    display: block;
    margin-top: 13px;
    color: #0a1b35;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.2px;
    text-transform: capitalize;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.95), 0 1px 1px rgba(4, 17, 38, 0.20);
}
.auth-panel .auth-form input[type="text"],
.auth-panel .auth-form input[type="email"],
.auth-panel .auth-form input[type="password"],
.auth-panel .auth-form input[type="tel"],
.auth-panel .auth-form input[type="number"],
.auth-panel .auth-form select {
    width: 100%;
    min-height: 52px;
    margin: 8px 0 0;
    padding: 15px 16px;
    border: 1.5px solid #d6e3f2;
    border-radius: 15px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    color: #0a1b35;
    font-size: 15.5px;
    font-weight: 500;
    line-height: 1.3;
    box-sizing: border-box;
    box-shadow: inset 0 1px 2px rgba(4, 17, 38, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.auth-panel .auth-form input::placeholder,
.auth-panel .auth-form select::placeholder {
    color: #8fa3bd;
    font-weight: 500;
}
/* The country dropdown shows a placeholder until a real option is picked */
.auth-panel .auth-form select.is-placeholder { color: #8fa3bd; }
.auth-panel .auth-form select option { color: #0a1b35; }
.auth-panel .auth-form input:focus,
.auth-panel .auth-form select:focus {
    outline: none;
    border-color: var(--brand-blue);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(8, 118, 232, 0.15);
}
.auth-panel .auth-form input.input-error {
    border-color: #dc2626;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}
/* Two-column field grid (register form): keeps rows even and roomy */
.auth-panel .auth-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 22px;
    align-items: start;
}
.auth-panel .auth-field { min-width: 0; }
.auth-panel .auth-field-full { grid-column: 1 / -1; }
/* Every field keeps the same box so all rows line up perfectly */
.auth-panel .auth-grid > .auth-field:not(.auth-field-full) { min-height: 104px; }
.auth-panel .auth-grid label { margin-top: 0; }
.auth-panel .auth-grid .field-hint {
    margin: 7px 0 0;
    font-size: 12px;
    line-height: 1.45;
    color: #7b8aa3;
}
.auth-panel .auth-grid .field-error {
    margin: 4px 0 0;
    font-size: 12.5px;
    font-weight: 700;
    color: #dc2626;
}
.auth-panel .auth-field-full button[type="submit"] { margin-top: 4px; }
.auth-panel .auth-form button[type="submit"] {
    width: 100%;
    min-height: 50px;
    margin-top: 20px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(120deg, #0876e8, #159cf0 58%, #075eb8);
    color: #ffffff;
    font-size: 15.5px;
    font-weight: 800;
    letter-spacing: 0.4px;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(8, 118, 232, 0.30), 0 4px 0 #054b91;
    transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}
.auth-panel .auth-form button[type="submit"]:hover { transform: translateY(-2px); filter: brightness(1.06); }
.auth-panel .auth-form button[type="submit"]:active {
    transform: translateY(1px);
    box-shadow: 0 6px 14px rgba(8, 118, 232, 0.28), 0 2px 0 #054b91;
}
.auth-panel .auth-switch { margin-top: 16px; font-size: 14px; color: #5c6f88; }
.auth-panel .auth-switch a,
.auth-panel .auth-recovery a { color: var(--brand-blue); font-weight: 800; }
.auth-panel-center {
    display: grid;
    justify-items: center;
    gap: 12px;
    text-align: center;
}
.auth-signed-out-title {
    margin: 0;
    color: #0f766e;
    font-size: clamp(20px, 3vw, 26px);
}
.auth-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 26px;
    margin: 6px 0 2px;
    border-radius: 14px;
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 6px 0 #312e81, 0 14px 26px rgba(49, 46, 129, 0.28);
    transition: transform 0.2s ease, filter 0.2s ease;
}
.auth-cta:hover { transform: translateY(-2px); filter: brightness(1.05); color: #fff; }

@keyframes authRise {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes authBadgeFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
@keyframes authBgFloat {
    0%, 100% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(calc(-50% - 16px)) scale(1.03); }
}

@media (max-width: 900px) {
    .auth-shell {
        grid-template-columns: minmax(0, 1fr);
        border-radius: 26px;
        padding: 0;
    }
    .auth-brand {
        justify-items: center;
        gap: 10px;
        padding: 30px 24px;
        border-radius: 25px 25px 0 0;
        text-align: center;
    }
    .auth-brand-points {
        justify-items: start;
        margin-inline: auto;
        text-align: left;
    }
    .auth-panel { padding: 28px 22px 32px; }
    body.brand-bg .auth-bg-mark { right: -26%; opacity: 0.10; }
}
@media (max-width: 700px) {
    .auth-panel .auth-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }
    .auth-panel .auth-grid > .auth-field:not(.auth-field-full) { min-height: 0; }
}
@media (max-width: 560px) {
    .auth-shell { padding: 0; }
    .auth-brand { padding: 24px 18px; border-radius: 21px 21px 0 0; }
    .auth-panel { padding: 22px 16px 26px; }
    body.brand-bg .auth-bg-words span { font-size: clamp(38px, 16vw, 84px); }
    body.brand-bg .auth-bg-mark { display: none; }
    body.brand-bg .auth-bg-tagline { letter-spacing: 2px; }
}
@media (prefers-reduced-motion: reduce) {
    .auth-brand,
    .auth-panel,
    .auth-brand-badge,
    body.brand-bg .auth-bg-mark { animation: none; }
}

/* ==========================================================================
   SEO & TRAFFIC — Permalinks & Sitemap  +  Full SEO workbench
   A self-contained light "glass" skin for the two new admin tabs. Each metric
   carries its own friendly colour through the --tone* helpers below, so the
   same building blocks (stat cards, badges, chips, KD bars) work for both
   screens without repeating rules.
   ========================================================================== */

/* Colour tones shared by stat cards, badges, chips and KD meters.
   Only the CSS variables are set here; the components read them through
   var(--tone, <fallback>) so a component without a tone class stays neutral. */
.tone-ok    { --tone: 5, 150, 105;   --tone-solid: #059669; --tone-soft: rgba(5, 150, 105, 0.12);  --tone-ring: rgba(5, 150, 105, 0.28); }
.tone-info  { --tone: 37, 99, 235;   --tone-solid: #2563eb; --tone-soft: rgba(37, 99, 235, 0.12);  --tone-ring: rgba(37, 99, 235, 0.28); }
.tone-warn  { --tone: 217, 119, 6;   --tone-solid: #d97706; --tone-soft: rgba(217, 119, 6, 0.13);  --tone-ring: rgba(217, 119, 6, 0.32); }
.tone-muted { --tone: 100, 116, 139; --tone-solid: #64748b; --tone-soft: rgba(100, 116, 139, 0.12); --tone-ring: rgba(100, 116, 139, 0.26); }
.tone-bad   { --tone: 225, 29, 72;   --tone-solid: #e11d48; --tone-soft: rgba(225, 29, 72, 0.12);  --tone-ring: rgba(225, 29, 72, 0.28); }
/* Keyword difficulty bands (seo_kd_meta) — same scale, friendlier names */
.tone-easy     { --tone: 5, 150, 105;   --tone-solid: #059669; --tone-soft: rgba(5, 150, 105, 0.12);  --tone-ring: rgba(5, 150, 105, 0.28); }
.tone-moderate { --tone: 37, 99, 235;   --tone-solid: #2563eb; --tone-soft: rgba(37, 99, 235, 0.12);  --tone-ring: rgba(37, 99, 235, 0.28); }
.tone-hard     { --tone: 217, 119, 6;   --tone-solid: #d97706; --tone-soft: rgba(217, 119, 6, 0.13);  --tone-ring: rgba(217, 119, 6, 0.32); }
.tone-veryhard { --tone: 225, 29, 72;   --tone-solid: #e11d48; --tone-soft: rgba(225, 29, 72, 0.12);  --tone-ring: rgba(225, 29, 72, 0.28); }

/* ---- Hero banner ---- */
.seo-hero {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px 26px;
    margin-bottom: 18px;
    padding: 24px 26px;
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background:
        radial-gradient(120% 160% at 0% 0%, rgba(99, 102, 241, 0.14), transparent 55%),
        radial-gradient(120% 160% at 100% 0%, rgba(6, 182, 212, 0.14), transparent 55%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(241, 245, 249, 0.86));
    box-shadow: 0 14px 32px -22px rgba(15, 23, 42, 0.6);
    overflow: hidden;
}
.seo-hero::after {
    content: "";
    position: absolute;
    right: -70px;
    top: -80px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.22), transparent 70%);
    pointer-events: none;
}
.seo-hero-links {
    background:
        radial-gradient(120% 160% at 0% 0%, rgba(13, 148, 136, 0.18), transparent 55%),
        radial-gradient(120% 160% at 100% 0%, rgba(59, 130, 246, 0.14), transparent 55%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 253, 250, 0.9));
}
.seo-hero-text { position: relative; flex: 1 1 320px; min-width: 0; }
.seo-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(13, 148, 136, 0.22);
    color: #0f766e;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.seo-hero-text h3 { margin: 0 0 8px; font-size: 22px; line-height: 1.25; color: #0f172a; }
.seo-hero-text p { margin: 0; max-width: 640px; color: #475569; font-size: 14px; line-height: 1.6; }

/* Hero meta column (links tab) */
.seo-hero-meta {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 0 1 auto;
    max-width: 100%;
}
.seo-url-pill {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.04);
    border: 1px dashed rgba(15, 23, 42, 0.16);
}
.seo-pill-label { font-size: 10px; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; color: #64748b; }
.seo-url-pill code { font-size: 13px; color: #0f172a; word-break: break-all; }
.seo-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Ghost (outline) button */
.seo-ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.9);
    color: #0f172a;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.seo-ghost-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(13, 148, 136, 0.4);
    box-shadow: 0 10px 20px -12px rgba(13, 148, 136, 0.8);
}

/* Hero score ring (SEO tab) */
.seo-hero-score { position: relative; display: flex; align-items: center; gap: 14px; flex: 0 0 auto; }
.seo-score-ring {
    --score: 0;
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: conic-gradient(#10b981 calc(var(--score) * 1%), rgba(15, 23, 42, 0.08) 0);
    box-shadow: 0 12px 26px -14px rgba(16, 185, 129, 0.9);
}
.seo-score-ring::before {
    content: "";
    position: absolute;
    inset: 9px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: inset 0 1px 4px rgba(15, 23, 42, 0.12);
}
.seo-score-ring > span { position: relative; font-size: 21px; font-weight: 800; color: #047857; }
.seo-score-caption { font-size: 13px; font-weight: 700; color: #0f172a; line-height: 1.45; }
.seo-score-caption small { display: block; font-weight: 500; color: #64748b; }

/* ---- Stat cards ---- */
.seo-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.seo-stat {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 16px 18px 15px 22px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 8px 20px -18px rgba(15, 23, 42, 0.8);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.seo-stat::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, rgb(var(--tone, 71, 85, 105)), rgba(var(--tone, 71, 85, 105), 0.3));
}
.seo-stat:hover { transform: translateY(-3px); box-shadow: 0 16px 28px -18px rgba(15, 23, 42, 0.85); }
.seo-stat-label { font-size: 11px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: #64748b; }
.seo-stat-value { font-size: 30px; font-weight: 800; line-height: 1.1; color: rgb(var(--tone, 15, 23, 42)); }
.seo-stat-foot { font-size: 11.5px; color: #64748b; line-height: 1.4; }
.seo-colorful-stat-grid .seo-stat {
    isolation: isolate;
    border: 1px solid rgba(255, 255, 255, .4);
    box-shadow: 0 15px 28px -19px rgba(15, 23, 42, .62), inset 0 1px 0 rgba(255, 255, 255, .28);
    transform-style: preserve-3d;
    animation: seo-color-stat-enter .52s cubic-bezier(.2,.75,.25,1) both;
}
.seo-colorful-stat-grid .seo-stat:nth-child(1) { background: linear-gradient(135deg, #0f766e, #0891b2); }
.seo-colorful-stat-grid .seo-stat:nth-child(2) { background: linear-gradient(135deg, #4338ca, #2563eb); }
.seo-colorful-stat-grid .seo-stat:nth-child(3) { background: linear-gradient(135deg, #047857, #16a34a); }
.seo-colorful-stat-grid .seo-stat:nth-child(4) { background: linear-gradient(135deg, #c2410c, #ea580c); }
.seo-colorful-stat-grid .seo-stat:nth-child(5) { background: linear-gradient(135deg, #7e22ce, #c026d3); }
.seo-colorful-stat-grid .seo-stat::before {
    z-index: 2;
    top: 0;
    right: 0;
    bottom: auto;
    left: 0;
    width: auto;
    height: 4px;
    background: linear-gradient(90deg, rgba(255,255,255,.9), rgba(255,255,255,.16));
}
.seo-colorful-stat-grid .seo-stat::after {
    content: "";
    position: absolute;
    z-index: 0;
    top: -70%;
    bottom: -70%;
    left: -70%;
    width: 34%;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
    transform: rotate(18deg);
    animation: seo-color-stat-sheen 6s ease-in-out infinite;
}
.seo-colorful-stat-grid .seo-stat > * { position: relative; z-index: 1; }
.seo-colorful-stat-grid .seo-stat-label,
.seo-colorful-stat-grid .seo-stat-value,
.seo-colorful-stat-grid .seo-stat-foot {
    color: #fff;
    text-shadow: 0 1px 2px rgba(15, 23, 42, .24);
}
.seo-colorful-stat-grid .seo-stat-label { font-size: 11.5px; font-weight: 850; }
.seo-colorful-stat-grid .seo-stat-value { font-size: 30px; font-weight: 900; }
.seo-colorful-stat-grid .seo-stat-foot { font-size: 11.5px; font-weight: 600; opacity: .96; }
.seo-colorful-stat-grid .seo-stat:nth-child(2)::after { animation-delay: 300ms; }
.seo-colorful-stat-grid .seo-stat:nth-child(3)::after { animation-delay: 600ms; }
.seo-colorful-stat-grid .seo-stat:nth-child(4)::after { animation-delay: 900ms; }
.seo-colorful-stat-grid .seo-stat:nth-child(5)::after { animation-delay: 1200ms; }
.seo-colorful-stat-grid .seo-stat:nth-child(2) { animation-delay: 60ms; }
.seo-colorful-stat-grid .seo-stat:nth-child(3) { animation-delay: 120ms; }
.seo-colorful-stat-grid .seo-stat:nth-child(4) { animation-delay: 180ms; }
.seo-colorful-stat-grid .seo-stat:nth-child(5) { animation-delay: 240ms; }
.seo-colorful-stat-grid .seo-stat:hover {
    z-index: 3;
    transform: translateY(-5px) rotateX(2deg);
    box-shadow: 0 22px 34px -20px rgba(15, 23, 42, .72), inset 0 1px 0 rgba(255,255,255,.38);
    filter: saturate(1.08) brightness(1.04);
}
@keyframes seo-color-stat-enter { from { opacity: 0; transform: translateY(14px) rotateX(-4deg) scale(.98); } to { opacity: 1; transform: translateY(0) rotateX(0) scale(1); } }
@keyframes seo-color-stat-sheen { 0%, 72%, 100% { left: -70%; } 86% { left: 140%; } }

/* ---- Progress bar ---- */
.seo-progress {
    position: relative;
    height: 14px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.14);
}
.seo-progress-bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #34d399, #10b981 45%, #06b6d4);
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.6);
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.seo-muted { color: #64748b; font-size: 13px; line-height: 1.55; }

/* ---- Permalink style picker (radio cards) ---- */
.seo-radio-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.seo-radio-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1.5px solid rgba(15, 23, 42, 0.1);
    background: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.seo-radio-card:hover { transform: translateY(-2px); border-color: rgba(13, 148, 136, 0.4); }
.seo-radio-card:has(input[type="radio"]:checked) {
    border-color: rgba(13, 148, 136, 0.75);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(6, 182, 212, 0.08));
    box-shadow: 0 12px 26px -18px rgba(13, 148, 136, 1);
}
.seo-radio-card:has(input[type="radio"]:focus-visible) {
    outline: 3px solid rgba(13, 148, 136, 0.3);
    outline-offset: 2px;
}
.seo-radio-card input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.seo-radio-dot {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    border-radius: 50%;
    border: 2px solid rgba(15, 23, 42, 0.22);
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.seo-radio-card:has(input[type="radio"]:checked) .seo-radio-dot {
    border-color: #0d9488;
    box-shadow: inset 0 0 0 4px #0d9488;
}
.seo-permalink-base[hidden] { display: none !important; }
.seo-radio-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.seo-radio-body strong { color: #0f172a; font-size: 14px; }
.seo-radio-body code {
    align-self: flex-start;
    padding: 3px 8px;
    border-radius: 7px;
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
    font-size: 12px;
    word-break: break-all;
}
.seo-radio-body small { color: #64748b; font-size: 12px; line-height: 1.5; }

/* ---- Inline checkbox + switches ---- */
.seo-inline-check {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
}
.seo-inline-check input[type="checkbox"] { width: 17px; height: 17px; accent-color: #0d9488; flex: 0 0 auto; }

/* ---- First-party SEO traffic monitor ---- */
.traffic-dashboard { display: flex; flex-direction: column; gap: 16px; margin: 18px 0 24px; min-width: 0; }
.traffic-live-heading,
.traffic-history-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 18px;
}
.traffic-history-range,
.traffic-live-refresh {
    padding: 7px 11px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: #475569;
    font-size: 11px;
    font-weight: 700;
}
.traffic-live-overview { padding: 15px 18px; border: 1px solid rgba(13, 148, 136, .16); border-radius: 16px; background: linear-gradient(115deg, #ecfdf5, #fff 58%, #eef2ff); box-shadow: 0 14px 28px -25px rgba(15, 23, 42, .55); }
.traffic-live-heading { margin-bottom: 0; }
.traffic-live-heading h4,
.traffic-live-card-heading h4,
.traffic-report-card h4,
.traffic-history-heading h4 { margin: 5px 0; color: #0f172a; font-size: 16px; }
.traffic-live-heading p,
.traffic-live-card-heading p,
.traffic-report-card > p,
.traffic-history-heading p { margin: 0; }
.traffic-live-label { display: inline-flex; align-items: center; gap: 7px; color: #047857; font-size: 10px; font-weight: 850; letter-spacing: .1em; }
.traffic-live-label i { width: 9px; height: 9px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 4px rgba(16, 185, 129, .13); animation: traffic-live-pulse 1.6s ease-in-out infinite; }
@keyframes traffic-live-pulse { 50% { box-shadow: 0 0 0 7px rgba(16, 185, 129, .04); } }
.traffic-live-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: start; gap: 14px; min-width: 0; }
.traffic-live-panel { position: relative; min-width: 0; padding: 17px; overflow: hidden; transform-style: preserve-3d; transition: transform .3s cubic-bezier(.2,.75,.25,1), box-shadow .3s ease, filter .3s ease; }
.traffic-live-panel.traffic-live-country-panel {
    border: 1px solid rgba(13, 148, 136, .25);
    border-top: 4px solid #0d9488;
    background: linear-gradient(125deg, #ccfbf1, #f0fdfa 42%, #fff 72%, #d1fae5);
    background-size: 180% 180%;
    box-shadow: 0 18px 35px -25px rgba(13, 148, 136, .75), inset 0 1px 0 #fff;
    animation: traffic-live-panel-enter .55s cubic-bezier(.2,.75,.25,1) both, traffic-live-gradient 9s ease-in-out infinite alternate;
}
.traffic-live-panel.traffic-live-source-panel {
    border: 1px solid rgba(99, 102, 241, .25);
    border-top: 4px solid #6366f1;
    background: linear-gradient(125deg, #e0e7ff, #eef2ff 42%, #fff 72%, #cffafe);
    background-size: 180% 180%;
    box-shadow: 0 18px 35px -25px rgba(79, 70, 229, .72), inset 0 1px 0 #fff;
    animation: traffic-live-panel-enter .55s cubic-bezier(.2,.75,.25,1) both, traffic-live-gradient 10s ease-in-out infinite alternate;
    animation-delay: 90ms, 90ms;
}
.traffic-live-panel.traffic-live-country-panel:hover,
.traffic-live-panel.traffic-live-source-panel:hover { transform: perspective(1000px) translateY(-4px) rotateX(1deg); filter: saturate(1.08); }
@keyframes traffic-live-panel-enter { from { opacity: 0; transform: perspective(1000px) translateY(14px) rotateX(-3deg); } to { opacity: 1; transform: perspective(1000px) translateY(0) rotateX(0); } }
@keyframes traffic-live-gradient { from { background-position: 0% 35%; } to { background-position: 100% 65%; } }
.traffic-live-card-heading { margin-bottom: 13px; }
.traffic-live-card-heading h4 { color: #0f172a; font-size: 17px; font-weight: 900; }
.traffic-live-card-heading p { color: #334155; font-size: 12px; font-weight: 600; line-height: 1.5; }
.traffic-live-list { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.traffic-live-record { display: grid; align-items: center; gap: 11px; min-width: 0; padding: 12px; border: 1px solid rgba(255, 255, 255, .96); border-radius: 12px; background: rgba(255, 255, 255, .94); box-shadow: 0 9px 16px -13px rgba(30, 41, 59, .72), inset 0 1px 0 #fff; transform-style: preserve-3d; animation: traffic-live-record-enter .4s cubic-bezier(.2,.75,.25,1) both; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.traffic-live-record:hover { transform: translateY(-2px) translateZ(4px); border-color: rgba(255, 255, 255, 1); box-shadow: 0 13px 21px -15px rgba(30, 41, 59, .68), inset 0 1px 0 #fff; }
.traffic-live-country-record { grid-template-columns: minmax(0, 1fr) minmax(85px, .9fr); }
.traffic-live-source-record { grid-template-columns: minmax(82px, .9fr) minmax(62px, .62fr) minmax(0, 1.15fr) minmax(0, .92fr); }
.traffic-live-record-visitor { display: flex; align-items: center; gap: 5px; min-width: 0; }
.traffic-live-record-visitor > strong { min-width: 0; overflow: hidden; color: #0f172a; font-size: 12px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.traffic-live-record-visitor time { flex: 0 0 auto; color: #475569; font-size: 10px; font-weight: 600; line-height: 1.3; }
.traffic-live-country-inline { display: flex; align-items: center; gap: 7px; min-width: 0; color: #064e3b; }
.traffic-live-flag { display: inline-grid; flex: 0 0 28px; width: 28px; height: 24px; place-items: center; font-size: 22px; line-height: 1; filter: drop-shadow(0 2px 2px rgba(15, 23, 42, .18)); }
.traffic-live-country-inline > strong { min-width: 0; overflow: hidden; color: #064e3b; font-size: 13px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.traffic-live-inline-fact { display: flex; align-items: baseline; gap: 4px; min-width: 0; overflow: hidden; }
.traffic-live-inline-fact small { flex: 0 0 auto; color: #334155; font-size: 10px; font-weight: 900; letter-spacing: .035em; text-transform: uppercase; }
.traffic-live-inline-fact strong { min-width: 0; overflow: hidden; color: #111827; font-size: 11px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
@keyframes traffic-live-record-enter { from { opacity: 0; transform: translateY(8px) rotateX(-2deg); } to { opacity: 1; transform: translateY(0) rotateX(0); } }
.traffic-live-empty { padding: 14px; border-radius: 12px; background: #f8fafc; color: #64748b; font-size: 12px; text-align: center; }
.traffic-filter-form {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 15px;
    background: rgba(255, 255, 255, .8);
}
.traffic-filter-form label { display: flex; flex: 1 1 145px; flex-direction: column; gap: 5px; color: #334155; font-size: 11px; font-weight: 750; }
.traffic-filter-form input,
.traffic-filter-form select { box-sizing: border-box; width: 100%; min-height: 38px; margin: 0; padding: 7px 9px; border: 1px solid rgba(15, 23, 42, .14); border-radius: 9px; background: #fff; color: #0f172a; font-size: 12px; }
.traffic-filter-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; white-space: nowrap; }
.traffic-filter-form .traffic-filter-actions .seo-action-btn,
.traffic-filter-form .traffic-filter-actions .seo-ghost-btn { width: auto; min-height: 38px; margin: 0; padding: 9px 14px; white-space: nowrap; }
.traffic-filter-form .traffic-filter-actions .seo-action-btn { align-self: center; }
.traffic-stat-grid { grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); }
.traffic-stat-grid .seo-stat { padding: 14px 14px 13px 18px; }
.traffic-stat-grid .seo-stat-value { font-size: 25px; }
.traffic-stat-grid .seo-stat-label { font-size: 10px; }
.traffic-report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; min-width: 0; }
.traffic-report-card { min-width: 0; padding: 17px 18px; }
.traffic-report-card > p { margin-bottom: 13px; }
.traffic-chart-wrap { width: 100%; min-width: 0; }
.traffic-chart { display: block; width: 100%; height: auto; overflow: visible; }
.traffic-chart-grid { stroke: rgba(100, 116, 139, .17); stroke-dasharray: 4 5; }
.traffic-chart-axis { fill: #64748b; font-size: 10px; font-family: inherit; }
.traffic-chart-line { fill: none; stroke: #0d9488; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.traffic-chart-point { fill: #0d9488; stroke: #fff; stroke-width: 3; vector-effect: non-scaling-stroke; }
.traffic-breakdown-list,
.traffic-compact-list { display: flex; flex-direction: column; gap: 10px; }
.traffic-breakdown-row > div:first-child,
.traffic-compact-list > div {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}
.traffic-breakdown-row > div:first-child { align-items: baseline; }
.traffic-breakdown-row strong,
.traffic-compact-list strong { color: #1e293b; font-size: 12px; }
.traffic-breakdown-row span,
.traffic-compact-list small { color: #64748b; font-size: 10px; }
.traffic-breakdown-track { height: 6px; margin-top: 5px; overflow: hidden; border-radius: 999px; background: #e8eef4; }
.traffic-breakdown-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #14b8a6, #3b82f6); }
.traffic-compact-list > div { padding-bottom: 8px; border-bottom: 1px solid rgba(15, 23, 42, .07); }
.traffic-compact-list > div:last-child { padding-bottom: 0; border-bottom: 0; }
.traffic-compact-list > div > span { display: flex; flex-direction: column; min-width: 0; gap: 3px; overflow-wrap: anywhere; color: #334155; font-size: 12px; }
.traffic-compact-list > div > strong { flex: 0 0 auto; white-space: nowrap; }
.traffic-page-row > span { max-width: 75%; }
.traffic-rank-row > strong { color: #047857; }
.traffic-keyword-link { margin-top: 12px; }
.traffic-history-card { padding: 18px; min-width: 0; }
.traffic-history-heading { margin-bottom: 14px; }
.traffic-history-wrap { max-width: 100%; }
.traffic-history-table { min-width: 1050px; }
.traffic-history-table td { vertical-align: top; }
.traffic-history-table td small { display: block; max-width: 260px; margin-top: 4px; color: #64748b; font-size: 10px; line-height: 1.4; overflow-wrap: anywhere; }
.traffic-history-table code { color: #0f172a; font-size: 11px; white-space: nowrap; }
.traffic-data-note { margin: -2px 2px 0; color: #64748b; font-size: 11px; line-height: 1.55; }
.traffic-dashboard { animation: traffic-dashboard-in .55s cubic-bezier(.2,.75,.25,1) both; }
@keyframes traffic-dashboard-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.traffic-live-panel {
    border: 1px solid rgba(13, 148, 136, .18);
    background: linear-gradient(135deg, rgba(240, 253, 250, .96), rgba(248, 250, 252, .96));
    box-shadow: 0 16px 34px -28px rgba(13, 148, 136, .72), inset 0 1px 0 #fff;
}
.traffic-stat-grid { perspective: 1100px; }
.traffic-stat-grid .seo-stat {
    isolation: isolate;
    border: 1px solid rgba(255, 255, 255, .34);
    background: linear-gradient(135deg, #0f766e, #0891b2);
    box-shadow: 0 15px 28px -20px rgba(15, 23, 42, .72), inset 0 1px 0 rgba(255, 255, 255, .24);
    transform-style: preserve-3d;
    animation: traffic-stat-enter .62s cubic-bezier(.18,.72,.24,1) both;
    transition: transform .28s cubic-bezier(.2,.75,.25,1), box-shadow .28s ease, filter .28s ease;
}
.traffic-stat-grid .seo-stat:nth-child(1) { background: linear-gradient(135deg, #0f766e, #0891b2); }
.traffic-stat-grid .seo-stat:nth-child(2) { background: linear-gradient(135deg, #6d28d9, #9333ea); }
.traffic-stat-grid .seo-stat:nth-child(3) { background: linear-gradient(135deg, #1d4ed8, #0369a1); }
.traffic-stat-grid .seo-stat:nth-child(4) { background: linear-gradient(135deg, #047857, #059669); }
.traffic-stat-grid .seo-stat:nth-child(5) { background: linear-gradient(135deg, #4338ca, #2563eb); }
.traffic-stat-grid .seo-stat:nth-child(6) { background: linear-gradient(135deg, #c2410c, #ea580c); }
.traffic-stat-grid .seo-stat:nth-child(7) { background: linear-gradient(135deg, #be123c, #db2777); }
.traffic-stat-grid .seo-stat:nth-child(8) { background: linear-gradient(135deg, #334155, #475569); }
.traffic-stat-grid .seo-stat:nth-child(9) { background: linear-gradient(135deg, #7e22ce, #c026d3); }
.traffic-stat-grid .seo-stat::before {
    left: 0;
    right: 0;
    top: 0;
    bottom: auto;
    z-index: 1;
    width: auto;
    height: 3px;
    background: linear-gradient(90deg, rgba(255,255,255,.1), rgba(255,255,255,.9), rgba(255,255,255,.12));
}
.traffic-stat-grid .seo-stat::after {
    content: "";
    position: absolute;
    z-index: -1;
    top: -80%;
    bottom: -80%;
    left: -65%;
    width: 42%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
    transform: rotate(22deg);
    animation: traffic-card-sheen 6.5s ease-in-out infinite;
    pointer-events: none;
}
.traffic-stat-grid .seo-stat > * { position: relative; z-index: 2; }
.traffic-stat-grid .seo-stat-label,
.traffic-stat-grid .seo-stat-value,
.traffic-stat-grid .seo-stat-foot {
    color: #fff !important;
    text-shadow: none !important;
}
.traffic-stat-grid .seo-stat-label { font-size: 10px; font-weight: 850; letter-spacing: .075em; }
.traffic-stat-grid .seo-stat-value { font-size: 26px; font-weight: 900; line-height: 1.08; }
.traffic-stat-grid .seo-stat-foot { font-size: 11px; font-weight: 600; line-height: 1.4; opacity: .94; }
.traffic-stat-grid .seo-stat:nth-child(2) { animation-delay: 60ms; }
.traffic-stat-grid .seo-stat:nth-child(3) { animation-delay: 120ms; }
.traffic-stat-grid .seo-stat:nth-child(4) { animation-delay: 180ms; }
.traffic-stat-grid .seo-stat:nth-child(5) { animation-delay: 240ms; }
.traffic-stat-grid .seo-stat:nth-child(6) { animation-delay: 300ms; }
.traffic-stat-grid .seo-stat:nth-child(7) { animation-delay: 360ms; }
.traffic-stat-grid .seo-stat:nth-child(8) { animation-delay: 420ms; }
.traffic-stat-grid .seo-stat:nth-child(9) { animation-delay: 480ms; }
@keyframes traffic-stat-enter { from { opacity: 0; transform: translateY(16px) rotateX(-5deg) scale(.975); } to { opacity: 1; transform: translateY(0) rotateX(0) scale(1); } }
@keyframes traffic-card-sheen { 0%, 68%, 100% { left: -65%; } 82% { left: 125%; } }
.traffic-stat-grid .seo-stat:hover {
    z-index: 2;
    transform: translateY(-6px) rotateX(3deg) scale(1.015);
    box-shadow: 0 23px 34px -20px rgba(15, 23, 42, .78), inset 0 1px 0 rgba(255,255,255,.35);
    filter: saturate(1.08) brightness(1.04);
}
.traffic-report-card {
    border: 1px solid rgba(255,255,255,.9);
    border-left: 4px solid #4f46e5;
    background: linear-gradient(145deg, #eef2ff, #fff 76%);
    box-shadow: 0 12px 25px -23px rgba(30,41,59,.72), inset 0 1px 0 #fff;
    animation: traffic-report-enter .56s cubic-bezier(.2,.75,.25,1) both;
    transition: transform .26s ease, box-shadow .26s ease;
}
.traffic-report-card:nth-child(2) { border-left-color: #0891b2; background: linear-gradient(145deg, #ecfeff, #fff 76%); animation-delay: 60ms; }
.traffic-report-card:nth-child(3) { border-left-color: #2563eb; background: linear-gradient(145deg, #eff6ff, #fff 76%); animation-delay: 120ms; }
.traffic-report-card:nth-child(4) { border-left-color: #16a34a; background: linear-gradient(145deg, #f0fdf4, #fff 76%); animation-delay: 180ms; }
.traffic-report-card:nth-child(5) { border-left-color: #ea580c; background: linear-gradient(145deg, #fff7ed, #fff 76%); animation-delay: 240ms; }
.traffic-report-card:nth-child(6) { border-left-color: #db2777; background: linear-gradient(145deg, #fdf2f8, #fff 76%); animation-delay: 300ms; }
.traffic-report-card:nth-child(7) { border-left-color: #7c3aed; background: linear-gradient(145deg, #f5f3ff, #fff 76%); animation-delay: 360ms; }
@keyframes traffic-report-enter { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.traffic-report-card:hover { transform: translateY(-4px); box-shadow: 0 20px 32px -24px rgba(30,41,59,.68), inset 0 1px 0 #fff; }
.traffic-report-card h4 { color: #111827; font-size: 16px; font-weight: 850; }
.traffic-report-card .seo-muted,
.traffic-report-card .seo-empty { color: #475569; font-size: 11.5px; font-weight: 550; }
.traffic-filter-form { border-color: rgba(79,70,229,.14); background: linear-gradient(120deg,#f5f3ff,#fff 65%,#ecfeff); box-shadow: 0 12px 25px -24px rgba(49,46,129,.7); }
.traffic-filter-form .seo-action-btn { width: auto; }
.traffic-history-card { border: 1px solid rgba(79,70,229,.13); background: linear-gradient(145deg,#f5f3ff,#fff 42%); box-shadow: 0 15px 30px -26px rgba(49,46,129,.6); }
.traffic-history-table thead th { color: #fff; background: linear-gradient(110deg,#312e81,#5b21b6); }
.traffic-history-table tbody tr:nth-child(even) { background: rgba(238,242,255,.62); }
.traffic-history-table tbody tr:hover { background: rgba(224,231,255,.8); }
.traffic-data-note { color: #334155; font-weight: 550; }

@media (max-width: 760px) {
    .traffic-live-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
    .traffic-live-panel,
    .traffic-report-card,
    .traffic-history-card { padding: 14px; }
    .traffic-live-overview { padding: 14px; }
    .traffic-live-source-record { grid-template-columns: minmax(68px, .82fr) minmax(46px, .55fr) minmax(0, 1.12fr) minmax(0, .9fr); gap: 5px; padding: 9px 7px; }
    .traffic-live-country-record { grid-template-columns: minmax(0, 1fr) minmax(88px, .9fr); gap: 6px; padding: 9px; }
    .traffic-live-record-visitor { gap: 3px; }
    .traffic-live-record-visitor > strong { font-size: 10px; }
    .traffic-live-record-visitor time { display: none; }
    .traffic-live-inline-fact { gap: 2px; }
    .traffic-live-inline-fact small { font-size: 8px; }
    .traffic-live-inline-fact strong,
    .traffic-live-country-inline > strong { font-size: 10px; }
    .traffic-live-flag { flex-basis: 23px; width: 23px; font-size: 19px; }
    .traffic-report-grid { grid-template-columns: minmax(0, 1fr); }
    .traffic-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .traffic-stat-grid .seo-stat { padding: 12px 10px 11px 14px; }
    .traffic-stat-grid .seo-stat-value { font-size: 22px; }
    .traffic-filter-form label { flex-basis: calc(50% - 6px); }
    .traffic-filter-actions { flex: 1 1 100%; justify-content: flex-start; }
    .traffic-history-heading { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
    .traffic-dashboard,
    .traffic-live-panel,
    .traffic-live-record,
    .seo-colorful-stat-grid .seo-stat,
    .seo-colorful-stat-grid .seo-stat::after,
    .traffic-stat-grid .seo-stat,
    .traffic-stat-grid .seo-stat::after,
    .traffic-report-card,
    .traffic-live-label i { animation: none !important; }
    .seo-colorful-stat-grid .seo-stat,
    .traffic-stat-grid .seo-stat,
    .traffic-report-card,
    .traffic-live-panel,
    .traffic-live-record { transition: none !important; }
    .seo-colorful-stat-grid .seo-stat:hover,
    .traffic-stat-grid .seo-stat:hover,
    .traffic-report-card:hover,
    .traffic-live-panel:hover,
    .traffic-live-record:hover { transform: none; filter: none; }
}
.seo-hr { margin: 20px 0; border: none; border-top: 1px dashed rgba(15, 23, 42, 0.14); }
.seo-subhead { margin: 6px 0 12px; font-size: 14px; font-weight: 800; color: #0f172a; letter-spacing: 0.01em; }
.seo-toggle-row { display: flex; flex-wrap: wrap; gap: 10px 12px; margin: 4px 0 18px; }
.seo-switch {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 14px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: rgba(241, 245, 249, 0.7);
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.seo-switch:hover { transform: translateY(-2px); border-color: rgba(13, 148, 136, 0.4); background: #fff; }
.seo-switch input[type="checkbox"] { width: 16px; height: 16px; accent-color: #0d9488; flex: 0 0 auto; }
.seo-switch:has(input:checked) {
    border-color: rgba(13, 148, 136, 0.55);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(6, 182, 212, 0.1));
    color: #0f766e;
}

/* ---- "Submit to Google" step cards ---- */
.seo-submit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin: 4px 0 22px;
}
.seo-submit-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(241, 245, 249, 0.8));
    box-shadow: 0 10px 22px -20px rgba(15, 23, 42, 0.9);
}
.seo-submit-card h4 { margin: 0; font-size: 14px; color: #0f172a; }
.seo-submit-card p { margin: 0; font-size: 13px; color: #475569; line-height: 1.55; }
.seo-submit-card form { margin: 0; }
.seo-submit-step {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #0d9488, #0891b2);
    box-shadow: 0 8px 16px -8px rgba(13, 148, 136, 1);
}
.seo-action-btn {
    align-self: flex-start;
    padding: 10px 16px;
    border: none;
    border-radius: 11px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #14b8a6, #0891b2);
    box-shadow: 0 10px 20px -12px rgba(8, 145, 178, 1);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.seo-action-btn:hover { transform: translateY(-2px); filter: brightness(1.05); box-shadow: 0 14px 24px -14px rgba(8, 145, 178, 1); }
.seo-link-btn {
    align-self: flex-start;
    font-size: 13px;
    font-weight: 700;
    color: #0d9488;
    text-decoration: none;
    border-bottom: 1.5px dashed rgba(13, 148, 136, 0.5);
}
.seo-link-btn:hover { color: #0f766e; border-bottom-style: solid; }
.seo-copy-row { display: flex; gap: 8px; align-items: stretch; }
.seo-copy-row input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 11px;
    background: rgba(248, 250, 252, 0.95);
    color: #0f172a;
    font-size: 12.5px;
}

/* ---- Data tables (link tracker + keyword board) ---- */
.seo-tracker-form { margin: 0; }
.seo-table-wrap {
    overflow-x: auto;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.7);
}
.seo-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.seo-table thead th {
    padding: 12px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #475569;
    background: linear-gradient(180deg, #f8fafc, #eef2f7);
    border-bottom: 1px solid rgba(15, 23, 42, 0.1);
    white-space: nowrap;
}
.seo-table tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    font-size: 13px;
    color: #1e293b;
    vertical-align: middle;
}
.seo-table tbody tr:last-child td { border-bottom: none; }
.seo-table tbody tr { transition: background 0.15s ease; }
.seo-table tbody tr:hover { background: rgba(13, 148, 136, 0.05); }
.seo-col-check { width: 42px; text-align: center; }
.seo-col-check input[type="checkbox"] { width: 16px; height: 16px; accent-color: #0d9488; cursor: pointer; }
.seo-url-cell { display: block; font-weight: 650; color: #0f172a; word-break: break-all; }
.seo-url-sub { display: block; margin-top: 2px; font-size: 11.5px; color: #64748b; }
.seo-type-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    text-transform: capitalize;
}
.seo-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 800;
    white-space: nowrap;
    color: var(--tone-solid, #475569);
    background: var(--tone-soft, rgba(71, 85, 105, 0.12));
    box-shadow: inset 0 0 0 1px var(--tone-ring, rgba(71, 85, 105, 0.26));
    border: none;
    cursor: default;
}
button.seo-badge {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
button.seo-badge:hover { transform: translateY(-1px); }
button.seo-badge.is-active {
    background: var(--tone-solid, #475569);
    color: #fff;
    box-shadow: 0 4px 12px -3px var(--tone-ring, rgba(71, 85, 105, 0.5));
}
.seo-date { color: #64748b; font-size: 12.5px; white-space: nowrap; }

/* ---- Bulk action bar under a table ---- */
.seo-bulk-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(241, 245, 249, 0.8);
    border: 1px dashed rgba(15, 23, 42, 0.14);
}
.seo-bulk-label { margin-right: 2px; font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: #64748b; }
.seo-chip-btn {
    width: auto;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid var(--tone-ring, rgba(71, 85, 105, 0.28));
    background-color: #fff !important;
    background-image: none !important;
    color: var(--tone-solid, #334155);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: none !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.seo-chip-btn:hover {
    transform: translateY(-2px);
    background: var(--tone-soft, rgba(71, 85, 105, 0.12)) !important;
    box-shadow: 0 10px 18px -14px var(--tone-solid, #334155) !important;
}
.seo-chip-btn.tone-bad {
    background-color: #e11d48 !important;
    border-color: #e11d48;
    color: #fff;
}
.seo-chip-btn.tone-bad:hover {
    background: #be123c !important;
    border-color: #be123c;
    color: #fff;
}

/* ---- SEO health checklist ---- */
.seo-checklist { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.seo-check-item {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 12px 14px;
    border-radius: 13px;
    border: 1px solid rgba(225, 29, 72, 0.22);
    background: rgba(225, 29, 72, 0.05);
}
.seo-check-item.ok { border-color: rgba(5, 150, 105, 0.24); background: rgba(5, 150, 105, 0.06); }
.seo-check-icon {
    flex: 0 0 22px;
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #fb7185, #e11d48);
    box-shadow: 0 6px 11px -6px rgba(225, 29, 72, 1);
}
.seo-check-item.ok .seo-check-icon { background: linear-gradient(135deg, #34d399, #059669); box-shadow: 0 6px 11px -6px rgba(5, 150, 105, 1); }
.seo-check-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.seo-check-body strong { font-size: 13.5px; color: #0f172a; }
.seo-check-body small { font-size: 12px; color: #64748b; line-height: 1.5; }

/* ---- Two-column layout (form + checklist) ---- */
.seo-two-col {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    margin-bottom: 18px;
}
.seo-two-col > .info-card { margin-bottom: 0; }
.seo-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 6px; }

/* ---- Keyword difficulty (KD) meter ---- */
.seo-kd { display: flex; align-items: center; gap: 9px; min-width: 160px; }
.seo-kd-bar {
    flex: 1 1 auto;
    min-width: 60px;
    height: 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.09);
    overflow: hidden;
}
.seo-kd-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(var(--tone, 71, 85, 105), 0.6), var(--tone-solid, #475569));
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.seo-kd-value { font-size: 11.5px; font-weight: 800; white-space: nowrap; color: var(--tone-solid, #475569); }

/* ---- Row actions ---- */
.seo-row-actions { display: flex; gap: 6px; white-space: nowrap; }
.seo-mini-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 9px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    background: #fff;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.seo-mini-btn:hover { transform: translateY(-1px); border-color: rgba(13, 148, 136, 0.5); color: #0f766e; }
.seo-mini-btn.tone-bad { color: #e11d48; border-color: rgba(225, 29, 72, 0.3); }
.seo-mini-btn.tone-bad:hover { background: #e11d48; border-color: #e11d48; color: #fff; }

/* ---- Empty state ---- */
.seo-empty {
    padding: 22px;
    border-radius: 14px;
    border: 1px dashed rgba(15, 23, 42, 0.16);
    background: rgba(248, 250, 252, 0.8);
    color: #64748b;
    font-size: 13.5px;
    text-align: center;
}

@media (max-width: 1000px) {
    .seo-two-col { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
    .seo-hero { padding: 20px; }
    .seo-hero-text h3 { font-size: 19px; }
    .seo-hero-meta { width: 100%; }
    .seo-stat-value { font-size: 25px; }
    .seo-kd { min-width: 120px; }
}

/* ==========================================================================
   SEO — Keyword ideas, board tools & extra polish
   ========================================================================== */

/* ---- Keyword ideas panel ---- */
.seo-ideas {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(120% 200% at 100% 0%, rgba(56, 189, 248, 0.1), transparent 55%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(240, 253, 250, 0.9));
}
.seo-ideas::before {
    content: "";
    position: absolute;
    left: -60px;
    bottom: -70px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.16), transparent 70%);
    pointer-events: none;
}
.seo-ideas-head {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px 22px;
    margin-bottom: 14px;
}
.seo-ideas-intro { flex: 1 1 380px; min-width: 0; }
.seo-ideas-intro h3 { margin: 0 0 6px; }
.seo-ideas-intro .greeting { margin: 0; }
.seo-seed-form {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 0 0 auto;
    width: 220px;
}
.seo-seed-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 1px 4px 1px 8px;
    border-radius: 7px;
    border: 1px solid rgba(15, 23, 42, 0.18);
    background: #ffffff;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.seo-seed-bar:focus-within {
    border-color: rgba(13, 148, 136, 0.6);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.14);
}
.seo-seed-icon { display: inline-flex; align-items: center; color: #94a3b8; flex: 0 0 auto; }
.seo-seed-bar input {
    flex: 1 1 0;
    width: 0;
    min-width: 0;
    margin: 0;
    padding: 3px 2px;
    border: none;
    background: transparent;
    color: #0f172a;
    font-size: 12px;
    line-height: 1.4;
    outline: none;
    box-shadow: none;
}
.seo-seed-bar input::placeholder { color: #94a3b8; }
.seo-seed-clear {
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    color: #64748b;
    background: rgba(15, 23, 42, 0.06);
    font-size: 14px;
    line-height: 1;
    text-decoration: none;
}
.seo-seed-clear:hover { background: rgba(225, 29, 72, 0.14); color: #e11d48; }
.seo-find-btn {
    width: auto !important;
    align-self: flex-start;
    padding: 5px 16px !important;
    font-size: 12px !important;
    border-radius: 7px !important;
    line-height: 1.5 !important;
    box-shadow: 0 3px 8px -3px rgba(99, 102, 241, 0.4) !important;
}
.seo-find-btn:hover { transform: translateY(-1px) !important; }
.seo-seed-hint { font-size: 11.5px; color: #64748b; }
.seo-legend {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px dashed rgba(15, 23, 42, 0.12);
}
.seo-legend-title {
    margin-right: 4px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}
.seo-seed-chips {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}
.seo-ideas-note { position: relative; margin: 14px 0 16px; }
.seo-idea-stats { margin: 0 0 12px; }
.seo-idea-stats .seo-stat { padding: 13px 15px 12px 19px; }
.seo-idea-stats .seo-stat-value { font-size: 23px; }
.seo-idea-bands {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px dashed rgba(15, 23, 42, 0.12);
}
.seo-legend-gap { margin-left: 10px; }
.seo-kw-link {
    display: inline-block;
    color: #0f172a;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px dashed transparent;
    transition: color 0.18s ease, border-color 0.18s ease;
}
.seo-kw-link:hover { color: #0d9488; border-bottom-color: #0d9488; }

/* ---- Keyword ideas list ---- */
.seo-kw-list { min-width: 720px; }
.seo-kw-list tbody tr { transition: background-color 0.18s ease; }
.seo-kw-list tbody tr:hover { background: rgba(var(--tone, 71, 85, 105), 0.05); }
.seo-kw-list .seo-col-rank {
    width: 44px;
    text-align: center;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--tone-solid, #475569);
}
.seo-idea-opp {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
    color: var(--tone-solid, #334155);
    background: var(--tone-soft, rgba(71, 85, 105, 0.12));
    box-shadow: inset 0 0 0 1px var(--tone-ring, rgba(71, 85, 105, 0.26));
}
.seo-idea-add { margin: 0; }
.seo-idea-add .seo-mini-btn { width: 100%; justify-content: center; }
.seo-idea-add .seo-mini-btn:hover { background: #0d9488; border-color: #0d9488; color: #fff; }
.seo-bulk-add {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed rgba(15, 23, 42, 0.12);
}
.seo-bulk-add .seo-action-btn {
    box-sizing: border-box;
    flex: 0 1 234px;
    width: 234px;
    max-width: 100%;
    min-height: 38px;
    margin: 0;
    padding: 10px 16px;
    font-size: 13px;
}

/* ---- Keyword board header + tools ---- */
.seo-board-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px 20px;
    margin-bottom: 14px;
}
.seo-board-head h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; }
.seo-board-head .greeting { margin: 0; }
.seo-count-pill {
    display: inline-grid;
    place-items: center;
    min-width: 26px;
    height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 800;
    color: #0f766e;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(6, 182, 212, 0.14));
    box-shadow: inset 0 0 0 1px rgba(13, 148, 136, 0.3);
}
.seo-board-tools { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.seo-filter-field {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 220px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    background: rgba(255, 255, 255, 0.95);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.seo-filter-field:focus-within {
    border-color: rgba(13, 148, 136, 0.65);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.16);
}
.seo-filter-icon { padding: 0 4px 0 12px; color: #94a3b8; font-size: 13px; }
.seo-filter-field input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px 12px 10px 6px;
    border: none;
    background: transparent;
    color: #0f172a;
    font-size: 13px;
    outline: none;
}
.seo-quick-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.seo-quick-chips .seo-chip-btn { padding: 6px 12px; font-size: 12px; }
.seo-board-count { margin-left: auto; font-size: 12px; font-weight: 700; color: #64748b; }

@media (max-width: 1000px) {
    .seo-board-tools { align-items: flex-start; width: 100%; }
    .seo-quick-chips { justify-content: flex-start; }
}
@media (max-width: 640px) {
    .seo-seed-form { width: 100%; }
    .seo-board-count { margin-left: 0; width: 100%; }
    /* Compact bulk-action bar on mobile: label on its own row, then a
       clean 2-column grid of equal-width buttons so they don't stack oddly. */
    .seo-bulk-bar { gap: 8px; padding: 12px; }
    .seo-bulk-label { width: 100%; margin: 0 0 4px; }
    .seo-bulk-bar .seo-chip-btn {
        flex: 1 1 calc(50% - 4px);
        width: auto;
        min-width: 0;
        padding: 10px 8px;
        font-size: 12px;
        text-align: center;
        white-space: nowrap;
    }
}

/* ==========================================================================
   Public legal & information pages
   Privacy Policy · Terms & Conditions · Disclaimer · Refund Policy · About · Contact
   The frame is rendered by includes/legal_helpers.php so every page matches the
   site theme (midnight navy, electric blue, cyan and gold).
   ========================================================================== */
.legal-wrap {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 36px 16px 12px;
}
.legal-hero {
    text-align: center;
    margin-bottom: 26px;
}
.legal-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: #0a2342;
    background:
        linear-gradient(120deg, rgba(8, 118, 232, 0.16), rgba(40, 199, 255, 0.12) 70%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.4));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 0 0 1px rgba(8, 118, 232, 0.24),
        0 10px 22px -14px rgba(8, 118, 232, 0.9);
}
.legal-hero-badge svg {
    width: 15px;
    height: 15px;
    color: #0876e8;
}
.legal-hero h1 {
    font-size: clamp(26px, 4.2vw, 42px);
    line-height: 1.12;
    letter-spacing: -0.01em;
    margin-bottom: 12px;
    background: linear-gradient(96deg, #061126 0%, #0876e8 58%, #28c7ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.legal-hero p {
    max-width: 660px;
    margin: 0 auto;
    color: #64748b;
    line-height: 1.65;
}
.legal-updated {
    display: inline-block;
    margin-top: 14px;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    color: #475569;
    background: rgba(148, 163, 184, 0.14);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}
.legal-card {
    position: relative;
    overflow: hidden;
    padding: clamp(22px, 3.2vw, 42px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        0 24px 55px -26px rgba(15, 23, 42, 0.3),
        0 6px 0 -1px rgba(8, 118, 232, 0.16);
    line-height: 1.75;
    color: #334155;
}
.legal-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: linear-gradient(90deg, #061126, #0876e8 45%, #28c7ff 75%, #f3ae18);
}
.legal-card h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 32px 0 12px;
    font-size: clamp(18px, 2.4vw, 22px);
    color: #0f172a;
    line-height: 1.3;
}
.legal-card h2:first-of-type { margin-top: 4px; }
.legal-card h2::before {
    content: "";
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    transform: rotate(45deg);
    background: linear-gradient(135deg, #0876e8, #28c7ff);
    box-shadow: 0 0 10px rgba(8, 118, 232, 0.7);
}
.legal-card h3 {
    margin: 22px 0 8px;
    font-size: 15.5px;
    color: #1e293b;
}
.legal-card p { margin-bottom: 14px; }
.legal-card ul, .legal-card ol { margin: 0 0 16px 22px; }
.legal-card li { margin-bottom: 8px; }
.legal-card strong { color: #0f172a; }
.legal-card a {
    color: #0876e8;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dashed rgba(8, 118, 232, 0.4);
    transition: color 0.18s ease, border-color 0.18s ease;
}
.legal-card a:hover { color: #0a2342; border-bottom-color: #0a2342; }

/* Contact detail tiles */
.legal-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    margin: 6px 0 20px;
}
.legal-contact-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px;
    border-radius: 16px;
    text-decoration: none;
    background: linear-gradient(160deg, #ffffff, #f1f6fd);
    border: 1px solid rgba(8, 118, 232, 0.14);
    box-shadow: 0 12px 26px -20px rgba(8, 118, 232, 0.9);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.legal-contact-card:hover {
    transform: translateY(-4px);
    border-color: rgba(8, 118, 232, 0.4);
    box-shadow: 0 18px 34px -20px rgba(8, 118, 232, 1);
}
.legal-contact-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(140deg, #0876e8, #0a2342);
    box-shadow: 0 10px 20px -12px rgba(8, 118, 232, 1), inset 0 1px 2px rgba(255, 255, 255, 0.35);
}
.legal-contact-ico svg { width: 22px; height: 22px; }
.legal-contact-card strong { color: #0f172a; font-size: 14.5px; }
.legal-contact-card span { color: #64748b; font-size: 13px; word-break: break-word; }

/* Contact page: brand-matched split layout with a clear message form. */
.contact-page-wrap {
    max-width: 1240px;
    padding: clamp(24px, 4vw, 46px) 18px 42px;
    box-sizing: border-box;
}
.contact-page-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(390px, 0.92fr);
    align-items: stretch;
    gap: clamp(28px, 5vw, 72px);
}
.contact-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 12px 0;
}
.contact-eyebrow {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 8px;
    margin-bottom: 18px;
    color: #ffd86a;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.7px;
    text-transform: uppercase;
}
.contact-eyebrow svg { width: 17px; height: 17px; color: #28c7ff; }
.contact-copy h1 {
    max-width: 620px;
    margin: 0 0 18px;
    font-size: clamp(36px, 4.5vw, 58px);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.035em;
    background: linear-gradient(100deg, #ffffff 0%, #bcd7ff 48%, #f7b62a 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.contact-copy-lead {
    max-width: 590px;
    margin: 0;
    color: #e0eaf7;
    font-size: 16px;
    line-height: 1.75;
}
.contact-direct { margin-top: 28px; }
.contact-direct h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.01em;
}
.contact-channel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.contact-channel {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(191, 219, 254, 0.2);
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.055));
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.contact-channel:hover,
.contact-channel:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(40, 199, 255, 0.65);
    background: rgba(8, 118, 232, 0.22);
    box-shadow: 0 12px 25px -18px rgba(40, 199, 255, 0.85);
}
.contact-channel-icon {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(145deg, #0876e8, #0b3c75);
}
.contact-channel-icon svg { width: 19px; height: 19px; }
.contact-channel-copy { display: grid; min-width: 0; gap: 3px; }
.contact-channel-copy strong { color: #ffffff; font-size: 13px; }
.contact-channel-copy small {
    overflow-wrap: anywhere;
    color: #d3e1f3;
    font-size: 11.5px;
    line-height: 1.4;
}
.contact-channel-arrow {
    flex: 0 0 15px;
    width: 15px;
    height: 15px;
    margin-left: auto;
    color: #7dd3fc;
}
.contact-no-channels { color: #d3e1f3; font-size: 14px; }
.contact-response-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 20px;
    padding: 14px 16px;
    border: 1px solid rgba(243, 174, 24, 0.22);
    border-radius: 14px;
    background: rgba(243, 174, 24, 0.08);
}
.contact-response-icon {
    display: grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 11px;
    color: #ffd86a;
    background: rgba(243, 174, 24, 0.14);
}
.contact-response-icon svg { width: 18px; height: 18px; }
.contact-response-note p {
    margin: 0;
    color: #dce8f7;
    font-size: 12.5px;
    line-height: 1.6;
}
.contact-response-note strong { color: #ffffff; }
.contact-response-note a { color: #7dd3fc; font-weight: 700; text-underline-offset: 3px; }

.contact-form-panel {
    position: relative;
    min-width: 0;
    padding: clamp(24px, 3.5vw, 42px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.88);
    border-radius: 26px;
    background: linear-gradient(160deg, #ffffff 0%, #f2f7fd 100%);
    box-shadow: 0 28px 65px -34px rgba(0, 0, 0, 0.72), inset 0 1px 0 #ffffff;
}
.contact-form-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, #0876e8, #28c7ff 60%, #f3ae18);
}
.contact-form-heading { display: flex; align-items: center; gap: 14px; }
.contact-form-mark {
    display: grid;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 15px;
    color: #ffffff;
    background: linear-gradient(145deg, #159cf0, #0876e8 55%, #0a2342);
    box-shadow: 0 12px 22px -14px rgba(8, 118, 232, 0.9);
}
.contact-form-mark svg { width: 23px; height: 23px; }
.contact-form-heading p {
    margin: 0 0 3px;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.3px;
    text-transform: uppercase;
}
.contact-form-heading h2 {
    margin: 0;
    color: #061126;
    font-size: clamp(23px, 2.6vw, 30px);
    font-weight: 900;
    background: linear-gradient(180deg, #159cf0 0%, #0876e8 46%, #061126 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.contact-form-intro {
    margin: 15px 0 22px;
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
}
.contact-form { display: grid; gap: 14px; }
.contact-honeypot {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.contact-field { display: grid; gap: 7px; color: #24364b; }
.contact-field > span { font-size: 13px; font-weight: 750; }
.contact-field b { color: #d97706; }
.contact-field small { margin-left: 5px; color: #64748b; font-size: 11px; font-weight: 500; }
.contact-field input,
.contact-field textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    outline: none;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.94);
    font: inherit;
    font-size: 14px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.contact-field input { min-height: 48px; padding: 0 14px; }
.contact-field textarea { min-height: 132px; padding: 12px 14px; resize: vertical; }
.contact-field input::placeholder,
.contact-field textarea::placeholder { color: #8492a6; opacity: 1; }
.contact-field input:focus,
.contact-field textarea:focus {
    border-color: #0876e8;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(8, 118, 232, 0.13);
}
.contact-form-hint { margin: -2px 0 0; color: #64748b; font-size: 11.5px; line-height: 1.5; }
.contact-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    justify-self: start;
    min-height: 50px;
    padding: 0 22px;
    border: 0;
    border-radius: 13px;
    color: #ffffff;
    background: linear-gradient(135deg, #159cf0, #0876e8 55%, #0a5bd0);
    box-shadow: 0 12px 24px -12px rgba(8, 118, 232, 0.8);
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.contact-submit svg { width: 17px; height: 17px; transition: transform 0.2s ease; }
.contact-submit:hover { transform: translateY(-2px); box-shadow: 0 16px 28px -12px rgba(8, 118, 232, 0.9); }
.contact-submit:hover svg { transform: translate(2px, -2px); }
.contact-submit:focus-visible { outline: 3px solid rgba(40, 199, 255, 0.65); outline-offset: 3px; }
.contact-submit:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.contact-submit:disabled:hover { transform: none; }
.contact-form-alert {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
}
.contact-form-alert.is-success { color: #065f46; background: #d1fae5; border: 1px solid #6ee7b7; }
.contact-form-alert.is-error { color: #9f1239; background: #ffe4e6; border: 1px solid #fda4af; }
.contact-policy-links { margin: 16px 0 0; color: #64748b; font-size: 11.5px; line-height: 1.6; }
.contact-policy-links a { color: #075eaa; font-weight: 700; text-underline-offset: 2px; }
@media (max-width: 900px) {
    .contact-page-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .contact-copy { padding: 8px 0; }
    .contact-copy h1 { max-width: 18ch; }
}
@media (max-width: 540px) {
    .contact-page-wrap { padding: 24px 12px 30px; }
    .contact-page-layout { gap: 20px; }
    .contact-copy h1 { font-size: clamp(34px, 10vw, 46px); }
    .contact-channel-grid { grid-template-columns: minmax(0, 1fr); }
    .contact-form-panel { padding: 24px 18px; border-radius: 21px; }
    .contact-submit { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .contact-channel,
    .contact-submit,
    .contact-submit svg { transition: none; }
}

/* Highlighted note inside legal content */
.legal-note {
    margin: 0 0 18px;
    padding: 14px 18px;
    border-radius: 14px;
    border-left: 4px solid #f3ae18;
    background: linear-gradient(100deg, rgba(243, 174, 24, 0.12), rgba(255, 216, 106, 0.06));
    color: #334155;
    font-size: 13.5px;
}

/* Clear, consistent typography for public information subpages. */
.custom-page-content {
    color: #25364a;
    font-size: 16px;
    line-height: 1.8;
}
.custom-page-content p,
.custom-page-content li,
.custom-page-content blockquote {
    color: #334155;
}
.custom-page-content h2,
.custom-page-content h3,
.custom-page-content h4 {
    color: #103e67;
    font-weight: 800;
    letter-spacing: -0.015em;
    background: linear-gradient(180deg, #159cf0 0%, #0876e8 46%, #061126 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: subpage-heading-enter 0.55s cubic-bezier(.2, .75, .25, 1) both;
}
.custom-page-content h2 {
    position: relative;
    padding-bottom: 11px;
    border-bottom: 1px solid rgba(8, 118, 232, 0.18);
}
.custom-page-content h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 72px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #0876e8, #28c7ff, #f3ae18);
    transform: scaleX(0);
    transform-origin: left center;
    animation: subpage-heading-underline 0.65s 0.12s ease-out both;
}
.custom-page-content h3,
.custom-page-content h4 {
    padding-left: 11px;
    padding-bottom: 0;
    border-left: 3px solid #28c7ff;
    border-bottom: 0;
    color: #0b4a73;
}
.custom-page-content h3 { font-size: clamp(16px, 2vw, 18px); }
.custom-page-content h4 { font-size: 16px; }
.custom-page-content a {
    color: #075eaa;
    font-weight: 650;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
@keyframes subpage-heading-enter {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes subpage-heading-underline {
    to { transform: scaleX(1); }
}
@media (prefers-reduced-motion: reduce) {
    .custom-page-content h2,
    .custom-page-content h3,
    .custom-page-content h4,
    .custom-page-content h2::after {
        animation: none;
        transform: none;
    }
}

/* Supplementary typography for pasted/HTML page content */
.custom-page-content h1,
.custom-page-content h5,
.custom-page-content h6 {
    color: #103e67;
    font-weight: 800;
    letter-spacing: -0.015em;
    background: linear-gradient(180deg, #159cf0 0%, #0876e8 46%, #061126 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 22px 0 12px;
    line-height: 1.3;
}
.custom-page-content h1 { font-size: clamp(22px, 3vw, 28px); }
.custom-page-content h5 { font-size: 15px; padding-left: 11px; border-left: 3px solid #28c7ff; }
.custom-page-content h6 { font-size: 14px; padding-left: 11px; border-left: 3px solid #28c7ff; }
.custom-page-content hr {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(8, 118, 232, 0.25), transparent);
    margin: 22px 0;
}
.custom-page-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 15px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}
.custom-page-content th,
.custom-page-content td {
    border: 1px solid rgba(15, 23, 42, 0.08);
    padding: 10px 14px;
    text-align: left;
    vertical-align: top;
}
.custom-page-content th {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.10), rgba(6, 182, 212, 0.10));
    color: #0f172a;
    font-weight: 700;
}
.custom-page-content tr:nth-child(even) td { background: rgba(15, 23, 42, 0.025); }
.custom-page-content code {
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.92em;
}
.custom-page-content pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 16px;
    border-radius: 12px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.6;
    margin: 14px 0;
}
.custom-page-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}
.custom-page-content mark {
    background: linear-gradient(120deg, rgba(251, 191, 36, 0.35), rgba(245, 158, 11, 0.25));
    color: #1e293b;
    padding: 0 4px;
    border-radius: 4px;
}
.custom-page-content blockquote {
    margin: 16px 0;
    padding: 14px 18px;
    border-left: 4px solid #28c7ff;
    background: rgba(40, 199, 255, 0.06);
    border-radius: 0 10px 10px 0;
    color: #334155;
    font-style: italic;
}
.custom-page-content details {
    margin: 12px 0;
    padding: 10px 14px;
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 10px;
}
.custom-page-content summary {
    cursor: pointer;
    font-weight: 650;
    color: #0f172a;
}
.custom-page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 10px 0;
}
.custom-page-content ul,
.custom-page-content ol {
    margin: 10px 0 14px 24px;
}
.custom-page-content li { margin-bottom: 6px; }

/* The offers page holds two wide comparison tables, so it is given a little
   more horizontal room than the standard legal pages. */
body.page-offers .legal-wrap {
    max-width: 1220px;
}

/* Live package and member-level comparison on the public offers page. */
.offer-comparison {
    margin: 28px 0 34px;
}
.offer-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}
.offer-section-heading h2 {
    display: block;
    margin: 0 0 5px;
    font-size: clamp(19px, 2.2vw, 24px);
}
.offer-section-heading h2::before { display: none; }
.offer-section-heading p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}
.offer-live-badge {
    flex: 0 0 auto;
    padding: 6px 10px;
    border: 1px solid rgba(8, 118, 232, 0.15);
    border-radius: 999px;
    background: rgba(8, 118, 232, 0.07);
    color: #0876e8;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.offer-level-badge {
    border-color: rgba(14, 165, 153, 0.18);
    background: rgba(14, 165, 153, 0.08);
    color: #0f8b83;
}
.offer-table-frame {
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 28px -22px rgba(15, 23, 42, 0.45);
}
.custom-page-content .offer-table {
    margin: 0;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
}
.offer-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    table-layout: fixed;
    color: #243247;
    font-size: 12px;
    line-height: 1.4;
}
.offer-table th,
.offer-table td {
    padding: 12px 10px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    text-align: left;
    vertical-align: middle;
    overflow-wrap: anywhere;
}
.offer-table thead th {
    border-color: rgba(15, 23, 42, 0.10);
    background: #eef3fb;
    color: #334155;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.035em;
    line-height: 1.35;
    text-transform: uppercase;
}
.offer-table tbody tr:nth-child(even) td { background: #f7f9fc; }
.offer-table tbody tr:hover td { background: #f0f7ff; }
.offer-package-table th:nth-child(1) { width: 17%; }
.offer-package-table th:nth-child(2) { width: 13%; }
.offer-package-table th:nth-child(3),
.offer-package-table th:nth-child(4) { width: 10%; }
.offer-package-table th:nth-child(5) { width: 12%; }
.offer-package-table th:nth-child(6) { width: 12%; }
.offer-package-table th:nth-child(7) { width: 13%; }
.offer-package-table th:nth-child(8) { width: 13%; }
.offer-level-table th:nth-child(1) { width: 17%; }
.offer-level-table th:nth-child(2) { width: 18%; }
.offer-level-table th:nth-child(3) { width: 13%; }
.offer-level-table th:nth-child(4) { width: 25%; }
.offer-level-table th:nth-child(5) { width: 14%; }
.offer-level-table th:nth-child(6) { width: 13%; }
.offer-package-name,
.offer-level-name {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #142033;
    font-weight: 800;
}
.offer-package-marker {
    display: inline-block;
    flex: 0 0 9px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--pkg-accent, linear-gradient(135deg, #0876e8, #28c7ff));
    box-shadow: 0 0 0 3px rgba(8, 118, 232, 0.08);
}
.offer-level-number {
    display: inline-grid;
    place-items: center;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: linear-gradient(135deg, #0876e8, #28c7ff);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
}
.offer-popular-badge,
.offer-discount {
    display: inline-block;
    margin: 4px 0 0 16px;
    padding: 2px 6px;
    border-radius: 5px;
    background: rgba(14, 165, 153, 0.10);
    color: #087f78;
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap;
}
.offer-price-old,
.offer-price-current,
.offer-cell-note,
.offer-target {
    display: block;
}
.offer-price-old {
    color: #94a3b8;
    font-size: 10px;
    text-decoration: line-through;
}
.offer-price-current { color: #10233e; font-size: 12px; }
.offer-rate { color: #0f9e9a; font-size: 14px; font-weight: 850; }
.offer-rate-secondary { color: #2874d0; }
.offer-cell-note {
    margin-top: 3px;
    color: #64748b;
    font-size: 10px;
    line-height: 1.4;
}
.offer-target { color: #26364d; font-weight: 700; }
.offer-muted { color: #8290a3; }
.offer-table-note {
    margin: 9px 2px 0;
    color: #64748b;
    font-size: 11px;
    line-height: 1.55;
}
.offer-empty {
    padding: 16px;
    border: 1px dashed rgba(15, 23, 42, 0.18);
    border-radius: 12px;
    color: #64748b;
    text-align: center;
}
@media (max-width: 900px) {
    .offer-table { font-size: 11px; }
    .offer-table th,
    .offer-table td { padding: 9px 7px; }
}
@media (max-width: 640px) {
    .offer-section-heading {
        align-items: flex-start;
    }
    .offer-live-badge {
        margin-top: 3px;
        padding: 5px 7px;
        font-size: 9px;
    }
    .offer-table-frame {
        overflow: visible;
        border: 0;
        background: transparent;
        box-shadow: none;
    }
    .offer-table,
    .offer-table tbody {
        display: block;
        width: 100%;
    }
    .offer-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
    .offer-table tbody tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
        margin-bottom: 10px;
        padding: 9px;
        border: 1px solid rgba(15, 23, 42, 0.10);
        border-radius: 13px;
        background: #fff;
        box-shadow: 0 8px 20px -17px rgba(15, 23, 42, 0.55);
    }
    .offer-table tbody tr:nth-child(even) td,
    .offer-table tbody tr:hover td { background: #f5f8fc; }
    .offer-table td {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        min-width: 0;
        min-height: 52px;
        padding: 7px 8px;
        border: 0;
        border-radius: 8px;
        background: #f5f8fc;
        font-size: 11px;
    }
    .offer-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        color: #718096;
        font-size: 9px;
        font-weight: 800;
        letter-spacing: 0.04em;
        line-height: 1.2;
        text-transform: uppercase;
    }
    .offer-table td:first-child {
        grid-column: 1 / -1;
        min-height: 42px;
        background: linear-gradient(120deg, rgba(8, 118, 232, 0.08), rgba(40, 199, 255, 0.06));
    }
    .offer-package-name,
    .offer-level-name { font-size: 12px; }
    .offer-package-table td:nth-child(7),
    .offer-level-table td:nth-child(4) { grid-column: 1 / -1; }
    .offer-table-note { margin: 4px 2px 16px; }
}

/* Tier-specific colour, icon and motion treatment for package/level tables. */
.custom-page-content .offer-package-table thead th {
    border-color: rgba(37, 99, 235, 0.16);
    background: linear-gradient(115deg, #eef4ff 0%, #e7f0ff 50%, #e8f7f5 100%);
    color: #1e3a63;
}
.custom-page-content .offer-level-table thead th {
    border-color: rgba(139, 92, 246, 0.18);
    background: linear-gradient(115deg, #f3efff 0%, #f6effc 50%, #fdeef5 100%);
    color: #4a2d78;
}
.offer-package-table tbody tr,
.offer-level-table tbody tr {
    animation: offer-row-arrive 520ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
    animation-delay: var(--offer-delay, 0ms);
    transition: transform 180ms ease, filter 180ms ease;
}
.offer-package-table tbody tr:hover,
.offer-level-table tbody tr:hover {
    position: relative;
    z-index: 1;
    transform: translateY(-2px);
    filter: drop-shadow(0 7px 10px rgba(15, 23, 42, 0.12));
}
.custom-page-content .offer-package-table tbody tr td {
    background: #fff;
    background: linear-gradient(100deg, color-mix(in srgb, var(--pkg-title, #0876e8) 7%, white), white 76%);
    border-color: color-mix(in srgb, var(--pkg-title, #0876e8) 17%, white);
    transition: background 180ms ease, border-color 180ms ease;
}
.custom-page-content .offer-package-table tbody tr:nth-child(even) td {
    background: #f7f9fc;
    background: linear-gradient(100deg, color-mix(in srgb, var(--pkg-title, #0876e8) 10%, white), #fbfcff 76%);
}
.custom-page-content .offer-package-table tbody tr:hover td {
    background: #eef6ff;
    background: linear-gradient(100deg, color-mix(in srgb, var(--pkg-title, #0876e8) 16%, white), white 78%);
    border-color: color-mix(in srgb, var(--pkg-title, #0876e8) 31%, white);
}
.custom-page-content .offer-level-table tbody tr td {
    background: #fff;
    background: linear-gradient(100deg, color-mix(in srgb, var(--offer-accent, #0876e8) 7%, white), white 78%);
    border-color: color-mix(in srgb, var(--offer-accent, #0876e8) 18%, white);
    transition: background 180ms ease, border-color 180ms ease;
}
.custom-page-content .offer-level-table tbody tr:nth-child(even) td {
    background: #f7f9fc;
    background: linear-gradient(100deg, color-mix(in srgb, var(--offer-accent, #0876e8) 10%, white), #fbfcff 78%);
}
.custom-page-content .offer-level-table tbody tr:hover td {
    background: #f5f0ff;
    background: linear-gradient(100deg, color-mix(in srgb, var(--offer-accent, #0876e8) 16%, white), white 78%);
    border-color: color-mix(in srgb, var(--offer-accent, #0876e8) 32%, white);
}
.offer-package-title {
    display: flex;
    align-items: center;
    gap: 9px;
}
.offer-package-icon,
.offer-level-icon {
    position: relative;
    display: inline-grid;
    place-items: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--pkg-title, #0876e8) 22%, #ffffff);
    border-radius: 11px;
    color: var(--pkg-title, #0876e8);
    box-shadow: 0 4px 10px color-mix(in srgb, var(--pkg-title, #0876e8) 14%, transparent);
    animation: offer-icon-pulse 3.2s ease-in-out infinite;
}
.offer-package-icon {
    background: linear-gradient(140deg, color-mix(in srgb, var(--pkg-title, #0876e8) 14%, #ffffff), color-mix(in srgb, var(--pkg-price, #0876e8) 8%, #ffffff));
}
.offer-level-icon {
    background: linear-gradient(140deg, color-mix(in srgb, var(--offer-accent, #0876e8) 14%, #ffffff), color-mix(in srgb, var(--offer-accent, #0876e8) 7%, #ffffff));
    border-color: color-mix(in srgb, var(--offer-accent, #0876e8) 24%, #ffffff);
    color: var(--offer-accent, #0876e8);
    box-shadow: 0 4px 10px color-mix(in srgb, var(--offer-accent, #0876e8) 16%, transparent);
    animation-name: offer-level-icon-pulse;
}
.offer-package-icon::after,
.offer-level-icon::after {
    content: "";
    position: absolute;
    inset: -45% auto -45% -75%;
    width: 42%;
    transform: rotate(24deg);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.52), transparent);
    animation: offer-icon-sheen 4.8s ease-in-out infinite;
    pointer-events: none;
}
.offer-package-icon svg,
.offer-level-icon svg {
    position: relative;
    z-index: 1;
    display: block;
    width: 17px;
    height: 17px;
}
.offer-package-labels,
.offer-level-labels {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}
.custom-page-content .offer-package-name {
    color: var(--pkg-title, #17385e);
    font-size: 12px;
    line-height: 1.25;
}
.offer-level-name { color: #18243a; }
.custom-page-content .offer-level-title {
    color: var(--offer-accent, #17385e);
    font-size: 12px;
    line-height: 1.2;
}
.offer-level-labels small {
    color: #738198;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.offer-popular-badge {
    margin: 0;
    background: linear-gradient(110deg, #fef3c7, #ffedd5);
    color: #a34b06;
}
.offer-discount {
    margin-left: 0;
    background: linear-gradient(110deg, #ffe4e6, #fce7f3);
    color: #be185d;
}
.custom-page-content .offer-price-current { color: #142b4d; }
.custom-page-content .offer-rate-direct { color: #078f83; }
.custom-page-content .offer-rate-indirect { color: #7042bd; }
.custom-page-content .offer-task-count { color: #c46a10; }
.custom-page-content .offer-diamond-count { color: #c23878; }
.offer-gift {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 4px 9px;
    border: 1px solid rgba(217, 119, 6, 0.22);
    border-radius: 8px;
    background: linear-gradient(120deg, #fff7ed, #ffedd5);
    color: #b45309;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.3;
}
.offer-gift svg {
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    color: #ea8a17;
}
.offer-gift-name { min-width: 0; overflow-wrap: anywhere; }
.offer-duration { color: #52637a; font-weight: 700; }
.custom-page-content .offer-required-count { color: #2370c8; font-size: 15px; }
.custom-page-content .offer-level-bonus {
    display: inline-block;
    padding: 4px 8px;
    border: 1px solid color-mix(in srgb, var(--offer-accent, #0876e8) 24%, white);
    border-radius: 8px;
    background: color-mix(in srgb, var(--offer-accent, #0876e8) 10%, white);
    color: var(--offer-accent, #0876e8);
    font-size: 12px;
}
.offer-target { color: #7941b0; }
.offer-target strong { color: #652e9d; }
.custom-page-content .offer-level-diamonds { color: #c23d76; font-size: 14px; }
.custom-page-content .offer-level-tasks { color: #07876f; font-size: 14px; }
.offer-package-table td:first-child,
.offer-level-table td:first-child { box-shadow: inset 3px 0 0 var(--pkg-title, #0876e8); }
.offer-level-table td:first-child { box-shadow: inset 3px 0 0 var(--offer-accent, #0876e8); }
@keyframes offer-row-arrive {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes offer-icon-pulse {
    0%, 100% { box-shadow: 0 5px 12px color-mix(in srgb, var(--pkg-title, #0876e8) 24%, transparent); }
    50% { box-shadow: 0 7px 17px color-mix(in srgb, var(--pkg-title, #0876e8) 42%, transparent); }
}
@keyframes offer-level-icon-pulse {
    0%, 100% { box-shadow: 0 5px 12px color-mix(in srgb, var(--offer-accent, #0876e8) 24%, transparent); }
    50% { box-shadow: 0 7px 17px color-mix(in srgb, var(--offer-accent, #0876e8) 42%, transparent); }
}
@keyframes offer-icon-sheen {
    0%, 68%, 100% { left: -75%; }
    86% { left: 145%; }
}
@media (prefers-reduced-motion: reduce) {
    .offer-package-table tbody tr,
    .offer-level-table tbody tr,
    .offer-package-icon,
    .offer-level-icon,
    .offer-package-icon::after,
    .offer-level-icon::after {
        animation: none;
        transition: none;
    }
}

/* Footer legal link row - the footer menu is a plain inline row inside the
   footer. The global "nav" rule is reset here so it never renders as a card. */
.footer-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px 16px;
    margin-top: 10px;
    padding: 0;
    background: none;
    background-image: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    z-index: auto;
}
.footer-legal a {
    margin-left: 0;
    color: #cfe0f4;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-legal a:hover,
.footer-legal a.current { color: var(--brand-gold-light, #ffd86a); }

/* Footer social menu - one clickable icon per platform the admin has filled in
   (Admin > Settings > Contact & Social). Rendered by includes/social.php, which
   passes each brand's colour through the --social-brand custom property. */
.footer-social {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 0;
    background: none;
    background-image: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    z-index: auto;
}
.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #eaf3ff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.footer-social-link svg {
    display: block;
    width: 19px;
    height: 19px;
}
.footer-social-link:hover,
.footer-social-link:focus-visible {
    color: #fff;
    background: var(--social-brand, #06b6d4);
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.75);
}
@media (max-width: 640px) {
    .footer-social { gap: 8px; }
    .footer-social-link { width: 34px; height: 34px; }
    .footer-social-link svg { width: 17px; height: 17px; }
}

@media (max-width: 640px) {
    .legal-wrap { padding: 24px 12px 8px; }
    .legal-card { border-radius: 20px; }
    .footer-legal { gap: 6px 12px; }
}

/* ============================================================
   Public site menu — one single 3D animated bar in the header,
   plus the footer columns and the mobile panel. Rendered by
   includes/menus.php and managed from Admin > Menus.
   ============================================================ */
.site-menu {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    min-width: 0;
    perspective: 900px;
}
.site-menu-list {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 6px;
    border-radius: 15px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02) 45%, rgba(0, 0, 0, 0.28)),
        linear-gradient(150deg, #0a2e50 0%, #08203c 55%, #061126 100%);
    border: 1px solid rgba(243, 174, 24, 0.4);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        inset 0 -2px 7px rgba(0, 0, 0, 0.5),
        0 12px 26px -14px rgba(4, 17, 38, 0.95);
    animation: siteMenuGlow 5s ease-in-out infinite;
}
/* slow sheen that sweeps across the whole bar */
.site-menu-list::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(100deg, transparent 36%, rgba(255, 255, 255, 0.12) 50%, transparent 64%);
    background-size: 240% 100%;
    animation: siteMenuSweep 6s linear infinite;
    pointer-events: none;
}
@keyframes siteMenuGlow {
    0%, 100% {
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.18),
            inset 0 -2px 7px rgba(0, 0, 0, 0.5),
            0 12px 26px -14px rgba(4, 17, 38, 0.95),
            0 0 0 1px rgba(40, 199, 255, 0.16);
    }
    50% {
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.18),
            inset 0 -2px 7px rgba(0, 0, 0, 0.5),
            0 14px 30px -14px rgba(4, 17, 38, 0.95),
            0 0 0 1px rgba(243, 174, 24, 0.6),
            0 0 20px -2px rgba(243, 174, 24, 0.4);
    }
}
@keyframes siteMenuSweep {
    0% { background-position: 170% 0; }
    100% { background-position: -70% 0; }
}

.site-menu-item {
    position: relative;
    perspective: 700px;
}
/* Invisible hover bridge: covers the gap between the link and the dropdown
   panel so the sub-menu stays open while the pointer travels down to it.
   Without this the hover would break and a click would be needed. */
.site-menu-item.has-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 20px;
    display: block;
}
.site-menu-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 9px 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 11px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.01) 60%, rgba(0, 0, 0, 0.16));
    color: #dbe9fb;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    transform: translateY(0) rotateX(0deg);
    transform-origin: top center;
    transition:
        transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.25s ease,
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease;
    will-change: transform;
}
/* moving gloss inside each key */
.site-menu-link::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(118deg, transparent 32%, rgba(255, 255, 255, 0.5) 48%, transparent 64%);
    transform: translateX(-130%);
    opacity: 0;
    pointer-events: none;
}
.site-menu-item:hover > .site-menu-link,
.site-menu-item.has-dropdown.open > .site-menu-link {
    transform: translateY(-3px) rotateX(9deg);
    color: #fff;
    border-color: rgba(40, 199, 255, 0.55);
    background: linear-gradient(180deg, rgba(40, 199, 255, 0.3), rgba(8, 118, 232, 0.38));
    box-shadow:
        0 12px 20px -12px rgba(8, 118, 232, 0.95),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.site-menu-item:hover > .site-menu-link::after,
.site-menu-item.has-dropdown.open > .site-menu-link::after {
    opacity: 1;
    animation: siteMenuShine 0.8s ease;
}
@keyframes siteMenuShine {
    from { transform: translateX(-130%); }
    to { transform: translateX(130%); }
}
/* current page: a pressed 3D gold key */
.site-menu-item.active > .site-menu-link {
    color: #08182d;
    border-color: rgba(255, 216, 106, 0.95);
    background: linear-gradient(180deg, #ffe08a, #f3ae18 58%, #d8910c);
    box-shadow:
        inset 0 2px 5px rgba(120, 72, 0, 0.45),
        inset 0 -2px 0 rgba(255, 255, 255, 0.4),
        0 8px 16px -10px rgba(243, 174, 24, 0.95);
    transform: translateY(1px);
}
.site-menu-link .menu-caret {
    width: 14px;
    height: 14px;
    transition: transform 0.25s ease;
}
.site-menu-item.has-dropdown:hover .menu-caret,
.site-menu-item.has-dropdown.open .menu-caret { transform: rotate(180deg); }

/* 3D flip-down dropdown - same duotone surface as the header */
.site-menu-drop {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    background: linear-gradient(102deg, #04101f 0%, #0a2342 26%, #10498a 50%, #0a2342 74%, #04101f 100%);
    background-size: 240% 100%;
    animation: brandNavDuotone 14s ease-in-out infinite;
    border: 1px solid rgba(40, 199, 255, 0.34);
    border-radius: 14px;
    box-shadow:
        0 24px 48px -20px rgba(4, 17, 38, 0.9),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transform-origin: top center;
    transform: translateX(-50%) rotateX(-22deg) translateY(-10px) scale(0.96);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.18s ease 0.15s,
        transform 0.3s cubic-bezier(0.22, 1.2, 0.36, 1),
        visibility 0.18s 0.15s;
    z-index: 60;
}
/* Light sweep travelling across the panel (same feel as the header) */
.site-menu-drop::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(100deg, transparent 34%, rgba(40, 199, 255, 0.2) 48%, rgba(255, 255, 255, 0.16) 52%, transparent 66%);
    background-size: 260% 100%;
    animation: brandNavSweep 8s linear infinite;
    pointer-events: none;
}
.site-menu-drop::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    width: 12px;
    height: 12px;
    transform: translateX(-50%) rotate(45deg);
    background: #0d3a70;
    border-top: 1px solid rgba(40, 199, 255, 0.34);
    border-left: 1px solid rgba(40, 199, 255, 0.34);
}
.site-menu-item.has-dropdown:hover > .site-menu-drop,
.site-menu-item.has-dropdown.open > .site-menu-drop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) rotateX(0deg) translateY(0) scale(1);
    /* Open instantly; the delay only applies while closing (grace period). */
    transition-delay: 0s, 0s, 0s;
}
.site-menu-drop-link {
    position: relative;
    display: block;
    margin: 0;
    padding: 9px 13px;
    border-radius: 9px;
    color: #d7e7fa;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    overflow: hidden;
    transition:
        transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
        background 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
}
/* moving gloss - same shine as the header menu keys */
.site-menu-drop-link::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(118deg, transparent 32%, rgba(255, 255, 255, 0.42) 48%, transparent 64%);
    transform: translateX(-130%);
    opacity: 0;
    pointer-events: none;
}
.site-menu-drop-link:hover {
    color: #fff;
    background: linear-gradient(180deg, rgba(40, 199, 255, 0.26), rgba(8, 118, 232, 0.36));
    box-shadow:
        0 8px 16px -12px rgba(8, 118, 232, 0.95),
        inset 0 1px 0 rgba(255, 255, 255, 0.24);
    transform: translateX(3px);
}
.site-menu-drop-link:hover::after {
    opacity: 1;
    animation: siteMenuShine 0.7s ease;
}

/* Account links (Login / Register / Dashboard / Logout) sit inside the very
   same 3D bar so they always stay on one row with the site menu. */
.site-menu-item.nav-auth-divider::before {
    content: '';
    position: absolute;
    left: -3px;
    top: 50%;
    width: 1px;
    height: 24px;
    transform: translateY(-50%);
    background: linear-gradient(180deg, transparent, rgba(40, 199, 255, 0.72), transparent);
}
.site-menu-user {
    display: inline-flex;
    align-items: center;
    padding: 9px 4px;
    color: #9fb8d4;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.2px;
    white-space: nowrap;
}
.site-menu-link.nav-auth-login { color: #dbe9fb; }
.site-menu-link.nav-auth-register {
    color: #08182d;
    border-color: rgba(255, 216, 106, 0.9);
    background: linear-gradient(180deg, #ffe08a, #f3ae18 58%, #d8910c);
    box-shadow:
        inset 0 2px 5px rgba(120, 72, 0, 0.4),
        inset 0 -2px 0 rgba(255, 255, 255, 0.35),
        0 8px 16px -10px rgba(243, 174, 24, 0.95);
}
.site-menu-link.nav-auth-logout {
    color: #ffd9d9;
    border-color: rgba(239, 68, 68, 0.45);
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.3), rgba(185, 28, 28, 0.46));
}
/* keep the account buttons' own colours while hovered */
.site-menu-item.nav-auth:hover > .site-menu-link.nav-auth-login {
    color: #ffd15b;
    border-color: rgba(255, 190, 45, 0.55);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.03));
    box-shadow: 0 12px 20px -12px rgba(4, 17, 38, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.site-menu-item.nav-auth:hover > .site-menu-link.nav-auth-register {
    color: #08182d;
    border-color: rgba(255, 232, 150, 1);
    background: linear-gradient(180deg, #fff0b8, #ffc63d 58%, #e0a013);
    box-shadow: 0 14px 22px -12px rgba(243, 174, 24, 1), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.site-menu-item.nav-auth:hover > .site-menu-link.nav-auth-logout {
    color: #fff;
    border-color: rgba(248, 113, 113, 0.8);
    background: linear-gradient(180deg, rgba(248, 113, 113, 0.45), rgba(185, 28, 28, 0.62));
    box-shadow: 0 14px 22px -12px rgba(239, 68, 68, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Keep the public header in one compact row and let the account actions sit right. */
nav.brand-nav {
    flex-wrap: nowrap;
    min-height: 84px;
    padding: 12px 30px;
    gap: clamp(16px, 2vw, 34px);
}
nav.brand-nav .brand-lockup {
    flex: 0 0 auto;
}
nav.brand-nav .site-menu {
    width: auto;
    flex: 0 1 auto;
    min-width: 0;
    margin: 0 0 0 auto;
    padding: 0;
    justify-content: flex-end;
    background: transparent;
    border: 0;
    box-shadow: none;
}
/* No separate card: the menu sits directly in the header bar. */
nav.brand-nav .site-menu-list {
    width: auto;
    justify-content: flex-end;
    gap: clamp(2px, 0.5vw, 8px);
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    animation: none;
}
nav.brand-nav .site-menu-list::before,
nav.brand-nav .site-menu-link::after {
    display: none;
}
nav.brand-nav .site-menu-item.nav-auth-divider {
    margin-left: auto;
}
nav.brand-nav .site-menu-link {
    z-index: 1;
    padding: 10px 14px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    box-shadow: none;
    color: #cfe2f7;
    font-size: 13.5px;
    transform: translateY(0) rotateX(0deg);
    transform-origin: top center;
    transition:
        transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
        color 0.22s ease,
        background 0.22s ease,
        border-color 0.22s ease,
        box-shadow 0.22s ease;
}
nav.brand-nav .site-menu-item:hover > .site-menu-link,
nav.brand-nav .site-menu-item.has-dropdown.open > .site-menu-link {
    transform: translateY(-2px) rotateX(6deg);
    border-color: rgba(40, 199, 255, 0.42);
    background: linear-gradient(180deg, rgba(40, 199, 255, 0.2), rgba(8, 118, 232, 0.12));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 10px 18px -12px rgba(40, 199, 255, 0.9);
    color: #fff;
}
nav.brand-nav .site-menu-item.active > .site-menu-link {
    transform: translateY(0);
    border-color: rgba(40, 199, 255, 0.38);
    background: linear-gradient(180deg, rgba(40, 199, 255, 0.16), rgba(8, 118, 232, 0.08));
    box-shadow: inset 0 -2px 0 rgba(40, 199, 255, 0.85), 0 0 12px -7px rgba(40, 199, 255, 0.8);
    color: #eaf9ff;
}
nav.brand-nav .site-menu-item.nav-auth-divider::before {
    left: -7px;
    height: 22px;
    background: rgba(219, 232, 248, 0.18);
}
nav.brand-nav .site-menu-link.nav-auth-login {
    padding-left: 14px;
    padding-right: 14px;
    border-color: transparent;
    background: transparent;
}
nav.brand-nav .site-menu-item.nav-auth:hover > .site-menu-link.nav-auth-login {
    border-color: rgba(40, 199, 255, 0.42);
    background: linear-gradient(180deg, rgba(40, 199, 255, 0.2), rgba(8, 118, 232, 0.12));
    color: #fff;
}
nav.brand-nav .site-menu-link.nav-auth-register {
    padding-left: 17px;
    padding-right: 17px;
    border: 1px solid rgba(40, 199, 255, 0.54);
    border-radius: 9px;
    background: linear-gradient(180deg, rgba(40, 199, 255, 0.3), rgba(8, 118, 232, 0.42));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 4px 0 rgba(3, 29, 57, 0.72), 0 7px 14px -10px rgba(40, 199, 255, 0.8);
    color: #f3fbff;
}
nav.brand-nav .site-menu-item.nav-auth:hover > .site-menu-link.nav-auth-register {
    border-color: rgba(130, 229, 255, 0.9);
    background: linear-gradient(180deg, rgba(40, 199, 255, 0.42), rgba(8, 118, 232, 0.54));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 5px 0 rgba(3, 29, 57, 0.72), 0 12px 20px -10px rgba(40, 199, 255, 0.9);
}
nav.brand-nav .site-menu-link.nav-auth-dashboard,
nav.brand-nav .site-menu-link.nav-auth-logout {
    border-color: transparent;
    background: transparent;
}
nav.brand-nav .site-menu-user {
    padding-left: 10px;
    padding-right: 8px;
    font-size: 12px;
}
nav.brand-nav .dashboard-account-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}
nav.brand-nav .dashboard-account-actions .welcome-text {
    margin: 0 4px 0 0;
    color: #b9cbe0;
    white-space: nowrap;
}
nav.brand-nav .dashboard-account-actions a {
    margin-left: 0;
}
nav.brand-nav .dashboard-account-actions a:not(.btn-logout) {
    padding: 9px 13px;
    border: 1px solid rgba(116, 196, 255, 0.24);
    border-radius: 9px;
    color: #f7fbff;
    font-size: 13px;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
nav.brand-nav .dashboard-account-actions a:not(.btn-logout):hover {
    border-color: rgba(40, 199, 255, 0.65);
    background: rgba(40, 199, 255, 0.1);
    transform: translateY(-1px);
}
nav.brand-nav .mobile-menu-btn {
    flex: 0 0 44px;
}

/* Switch to the existing slide-out navigation before the desktop row gets tight. */
@media (max-width: 1100px) {
    nav.brand-nav .site-menu { display: none !important; }
    nav.brand-nav .mobile-menu-btn { display: inline-flex !important; }
}

@media (max-width: 1200px) {
    nav.brand-nav { padding-left: 22px; padding-right: 22px; }
    nav.brand-nav .brand-lockup > img { width: 48px; height: 48px; flex-basis: 48px; }
}

/* Keep the full desktop menu on compact laptops without covering the brand. */
@media (min-width: 1101px) and (max-width: 1280px) {
    nav.brand-nav { padding-left: 16px; padding-right: 16px; gap: 12px; }
    nav.brand-nav .brand-lockup { gap: 8px; }
    nav.brand-nav .brand-lockup > img { width: 42px; height: 42px; flex-basis: 42px; }
    nav.brand-nav .brand-copy strong { font-size: clamp(16px, 1.5vw, 19px); letter-spacing: 0.8px; }
    nav.brand-nav .brand-copy small { font-size: 9px; letter-spacing: 0.8px; }
    nav.brand-nav .site-menu-list { gap: 0; }
    nav.brand-nav .site-menu-link { padding: 8px 7px; font-size: 12px; white-space: nowrap; }
    nav.brand-nav .site-menu-link.nav-auth-login { padding-left: 7px; padding-right: 7px; }
    nav.brand-nav .site-menu-link.nav-auth-register { padding-left: 10px; padding-right: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    nav.brand-nav,
    nav.brand-nav::before,
    nav.brand-nav::after,
    footer,
    footer::before,
    footer::after,
    nav.brand-nav .site-menu-list,
    nav.brand-nav .site-menu-list::before,
    .site-menu-drop,
    .site-menu-drop::after {
        animation: none !important;
    }
    nav.brand-nav .site-menu-link,
    .site-menu-drop,
    .site-menu-drop-link {
        transition-duration: 0.01ms !important;
    }
}

/* Footer columns: each category becomes a column. No separate card - the menu
   sits directly in the footer flow. */
.footer-menu-columns {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px 48px;
    margin-top: 14px;
}
.footer-menu-col {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
    text-align: left;
}
.footer-menu-col h4 {
    margin: 0 0 3px;
    color: #ffd86a;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.9px;
    text-transform: uppercase;
}
.footer-menu-col a {
    color: #cfe0f4;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-menu-col a:hover { color: var(--brand-gold-light, #ffd86a); }

/* Mobile slide-out menu: the public pages sit below the account links so the
   Login / Register / dashboard items keep their original positions. */
.mobile-site-menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(243, 174, 24, 0.24);
}
.mobile-menu .mobile-site-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 10px 0 2px;
    padding: 0 16px;
    color: #ffd86a;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: left;
    cursor: pointer;
}
.mobile-site-caret {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    transition: transform 0.2s ease;
}
.mobile-site-group.open .mobile-site-caret {
    transform: rotate(180deg);
}
.mobile-site-submenu[hidden] {
    display: none;
}
.mobile-menu-item.mobile-site-sub {
    padding: 10px 16px 10px 30px;
    font-size: 13.5px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .site-menu { display: none !important; }
}

.managed-page-editor {
    margin-top: 18px;
    padding: 22px;
    border: 1px solid rgba(8, 118, 232, 0.18);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(239, 247, 255, 0.94), rgba(255, 255, 255, 0.88));
    box-shadow: 0 14px 32px -24px rgba(4, 17, 38, 0.42);
}
.managed-page-editor-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
}
.managed-page-editor-head h4,
.managed-pages-table > h4 {
    color: #0a2342;
    font-size: 18px;
    font-weight: 800;
}
.managed-page-kicker {
    display: block;
    margin-bottom: 4px;
    color: #0876e8;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}
.managed-page-back {
    padding: 8px 12px;
    border: 1px solid rgba(10, 35, 66, 0.16);
    border-radius: 9px;
    color: #0a2342;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}
.managed-page-help {
    margin: 8px 0 14px;
    color: #60728a;
    font-size: 13px;
    line-height: 1.6;
}
.managed-page-editor .form-group textarea {
    width: 100%;
    min-height: 190px;
    padding: 12px;
    border: 1px solid rgba(10, 35, 66, 0.18);
    border-radius: 10px;
    color: #17263b;
    font: inherit;
    line-height: 1.55;
    resize: vertical;
}
.managed-page-publish {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0 16px;
    color: #334b68;
    font-size: 13px;
    font-weight: 700;
}
.managed-pages-table {
    padding: 18px;
    border: 1px solid rgba(10, 35, 66, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
}
.managed-pages-table > h4 { margin: 0 0 12px; }
.managed-page-url {
    display: block;
    margin-top: 4px;
    color: #718198;
    font-size: 11px;
}
.managed-page-actions {
    min-width: 245px;
    white-space: nowrap;
}
.managed-pages-table .managed-page-actions > a {
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
}
.managed-pages-table .managed-page-actions form {
    display: inline-flex;
    width: auto;
    margin: 0 8px 0 0;
    vertical-align: middle;
}
.managed-pages-table .managed-page-actions form button.tbl-action {
    display: inline-block;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 2px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #06b6d8;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    transform: none;
}
.managed-pages-table .managed-page-actions form button.tbl-action:hover {
    background: transparent;
    box-shadow: none;
    color: #0876e8;
    text-decoration: underline;
    transform: none;
}
.managed-pages-table .managed-page-actions form button.tbl-action.tbl-delete {
    color: #ef4444;
}
.managed-pages-table .managed-page-actions form button.tbl-action.tbl-delete:hover {
    color: #dc2626;
}

@media (max-width: 700px) {
    nav.brand-nav { min-height: 72px; padding: 9px 14px; gap: 10px; }
    nav.brand-nav .brand-lockup { min-width: 0; gap: 8px; }
    nav.brand-nav .brand-lockup > img { width: 42px; height: 42px; flex-basis: 42px; }
    nav.brand-nav .brand-copy strong { font-size: clamp(13px, 4vw, 17px); letter-spacing: 0.6px; }
    nav.brand-nav .brand-copy small { font-size: 8px; letter-spacing: 0.6px; }
    nav.brand-nav .dashboard-account-actions { gap: 6px; }
    nav.brand-nav .dashboard-account-actions .welcome-text { display: none; }
    nav.brand-nav .dashboard-account-actions a:not(.btn-logout) { display: none; }
    nav.brand-nav .dashboard-account-actions .btn-logout { padding: 6px 9px; font-size: 11px; }
    .managed-page-editor { padding: 16px; }
    .managed-page-editor-head { align-items: flex-start; flex-direction: column; }
}

/* ---- Admin: User Modules (Show / Hide / Maintenance) --------------------- */
.module-control-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 12px 0 18px;
}
.module-control-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 12px 14px;
    border: 1px solid rgba(8, 118, 232, 0.16);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.66);
}
.module-control-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 150px;
}
.module-control-info strong { color: #0a2342; font-size: 14px; }
.module-control-group {
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.module-control-options {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}
.module-opt { position: relative; cursor: pointer; }
.module-opt input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}
.module-opt span {
    display: inline-flex;
    align-items: center;
    padding: 7px 15px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 999px;
    background: #eef2f7;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
    user-select: none;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.module-opt:hover span { border-color: #94a3b8; }
.module-opt input:focus-visible + span { box-shadow: 0 0 0 3px rgba(8, 118, 232, 0.32); }
.module-opt.is-show input:checked + span {
    border-color: transparent;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
}
.module-opt.is-maintenance input:checked + span {
    border-color: transparent;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
}
.module-opt.is-hide input:checked + span {
    border-color: transparent;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #fff;
}

/* Small "Maintenance" flag next to a menu entry that is under maintenance. */
.nav-maint-badge {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.9);
    color: #fff;
    font-size: 8.5px;
    font-style: normal;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: middle;
}
.btn-3d.is-maintenance { opacity: 0.82; }

/* Notice page ("Under Maintenance" / "Section Unavailable") back link. */
.maintenance-back {
    display: inline-block;
    margin-top: 18px;
    padding: 10px 20px;
    border-radius: 10px;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.maintenance-back:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 22px -12px rgba(6, 182, 212, 0.9);
}

/* ---- Admin: Support tickets inbox --------------------------------------- */
.sup-admin-layout {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.sup-admin-ticket {
    padding: 22px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 18px 40px -32px rgba(15, 23, 42, 0.6);
}
.sup-admin-ticket-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.sup-admin-subject {
    margin: 0;
    color: #1e293b;
    font-size: 16.5px;
    font-weight: 800;
}
.sup-admin-meta {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 12.5px;
}
/* Keep all admin ticket reply controls centered and aligned on one row. */
.sup-admin-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}
/* Force every control in this bar to the exact same height & box model so the
   whole row sits on one baseline (no up/down drift from inherited button styles). */
.sup-admin-actions > * {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    height: 36px;
    margin: 0;
    line-height: 1;
}
.sup-admin-actions button:hover,
.sup-admin-actions button:active {
    transform: none !important;
}
.sup-admin-actions .sup-auto-select {
    width: 180px;
    max-width: 100%;
    padding: 0 10px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    border-radius: 8px;
    background: #fff;
    color: #334155;
    font: inherit;
    font-size: 12.5px;
}
.sup-admin-actions .sup-auto-select { display: block; }
.sup-insert-reply {
    width: 140px !important;
    padding: 0 14px !important;
    font-size: 12px !important;
    border-radius: 8px !important;
}
.sup-ticket-status-group {
    width: 180px;
    min-width: 0;
}
.sup-ticket-status-group select {
    box-sizing: border-box;
    width: 100%;
    height: 36px;
    margin: 0 !important;
    padding: 0 10px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    border-radius: 8px;
    background: #fff;
    color: #334155;
    font: inherit;
    font-size: 12.5px;
    min-width: 0;
}
.sup-send-reply-btn {
    width: 140px;
    padding: 0 18px !important;
    font-size: 12.5px !important;
    border-radius: 9px !important;
}
.sup-admin-danger {
    padding: 0 16px !important;
    font-size: 12px !important;
    border-radius: 9px !important;
}
.sup-admin-actions .sup-admin-danger { width: 140px !important; }
@media (max-width: 720px) {
    .sup-admin-actions { align-items: stretch; }
    .sup-admin-actions > * { width: 100%; }
    .sup-admin-actions .sup-auto-select,
    .sup-ticket-status-group,
    .sup-ticket-status-group select,
    .sup-insert-reply,
    .sup-send-reply-btn,
    .sup-admin-actions .sup-admin-danger {
        box-sizing: border-box;
        width: 100% !important;
        max-width: none;
        height: 42px;
    }
    .sup-admin-danger { margin-left: 0; }
}
.sup-admin-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.sup-admin-filter {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 999px;
    background: #eef2f7;
    color: #475569;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease;
}
.sup-admin-filter:hover { background: #e2e8f0; }
.sup-admin-filter.active {
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    color: #fff;
}
.sup-admin-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 800;
}
.sup-admin-badge.is-open     { background: rgba(245, 158, 11, 0.16); color: #b45309; }
.sup-admin-badge.is-pending  { background: rgba(59, 130, 246, 0.16); color: #1d4ed8; }
.sup-admin-badge.is-resolved { background: rgba(16, 185, 129, 0.16); color: #047857; }
.sup-admin-cat-chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.12);
    color: #4f46e5;
    font-size: 11.5px;
    font-weight: 700;
}
.sup-admin-danger {
    background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
    box-shadow: 0 10px 20px -12px rgba(185, 28, 28, 0.9) !important;
}

@media (max-width: 700px) {
    .sup-admin-ticket { padding: 16px; }
    .sup-admin-actions .sup-auto-select { flex: 0 1 100%; }
}

/* ---- Support conversation thread (shared by member + admin views) -------- */
.sup-thread {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}
.sup-bubble {
    max-width: 90%;
    padding: 11px 14px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.6;
}
.sup-bubble-who {
    display: block;
    margin-bottom: 4px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.sup-bubble-body { color: #334155; overflow-wrap: anywhere; }
.sup-bubble-time { display: block; margin-top: 5px; font-size: 11px; color: #94a3b8; }
.sup-bubble-user {
    align-self: flex-end;
    background: #eef2ff;
    border: 1px solid rgba(99, 102, 241, 0.2);
}
.sup-bubble-user .sup-bubble-who { color: #4f46e5; }
.sup-bubble-admin {
    align-self: flex-start;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.22);
}
.sup-bubble-admin .sup-bubble-who { color: #047857; }
.sup-bubble-attachment { margin-top: 10px; }
.sup-bubble-attachment img,
.sup-bubble-attachment video {
    display: block;
    max-width: 100%;
    max-height: 320px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.1);
}
.sup-reply-form {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-top: 14px;
}
.sup-reply-form textarea {
    box-sizing: border-box;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    min-height: 82px;
    margin: 0;
    padding: 10px 12px;
    font: inherit;
    font-size: 13.5px;
    color: #0f172a;
    background: #fff;
    border: 2px solid rgba(99, 102, 241, 0.15);
    border-radius: 12px;
    resize: vertical;
}
.sup-reply-form .sup-btn {
    box-sizing: border-box;
    flex: 0 0 140px;
    width: 140px;
    min-height: 42px;
    padding: 10px 14px;
    line-height: 1.2;
}
.sup-reply-form textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}
@media (max-width: 640px) {
    .sup-bubble { max-width: 100%; }
    .sup-reply-form { flex-direction: column; align-items: stretch; }
    .sup-reply-form textarea { width: 100%; min-height: 82px; }
    .sup-reply-form .sup-btn {
        align-self: flex-end;
        flex: 0 0 auto;
        width: auto;
        min-width: 124px;
        min-height: 40px;
    }
}

/* ---- Admin: Support page sequence and search alignment ------------------ */
.sup-admin-page {
    display: grid;
    gap: 18px;
}
.sup-admin-page > .info-card,
.sup-admin-page > .stat-grid {
    margin: 0 !important;
}
.sup-admin-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.sup-admin-stats .stat-card {
    min-width: 0;
    min-height: 128px;
    padding: 20px;
}
.sup-ticket-search-form {
    display: grid;
    gap: 7px;
}
.sup-ticket-search-form > label {
    color: #334155;
    font-size: 13px;
    font-weight: 600;
}
.sup-ticket-search-controls {
    display: flex;
    align-items: stretch;
    gap: 10px;
}
.sup-ticket-search-controls input[type="search"] {
    flex: 0 1 720px;
    width: auto;
    max-width: 720px;
    min-width: 0;
    height: 46px;
    box-sizing: border-box;
    margin: 0 !important;
    padding: 10px 14px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    background: #fff;
    color: #334155;
    font: inherit;
    outline: none;
}
.sup-ticket-search-controls input[type="search"]:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}
.sup-ticket-search-controls .search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    flex: 0 0 auto;
    box-sizing: border-box;
    height: 46px;
    min-height: 46px;
    width: auto;
    margin: 0;
    padding: 0 16px;
    line-height: 1;
}
.sup-ticket-search-controls .search-btn:hover {
    transform: none;
}
.sup-ticket-clear-search {
    background: linear-gradient(135deg, #64748b, #334155);
}
@media (max-width: 800px) {
    .sup-admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
    .sup-admin-page { gap: 14px; }
    .sup-admin-stats { gap: 10px; }
    .sup-admin-stats .stat-card {
        min-height: 105px;
        padding: 16px;
        border-radius: 20px;
    }
    .sup-ticket-search-controls {
        flex-wrap: wrap;
    }
    .sup-ticket-search-controls input[type="search"] {
        flex: 1 1 100%;
    }
    .sup-ticket-clear-search {
        margin-right: auto !important;
    }
}

/* ---- Admin: Support categories (list view) ------------------------------ */
.sup-cat-list {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}
.sup-cat-row {
    display: grid;
    grid-template-columns: minmax(200px, 1.3fr) 90px minmax(220px, 2fr) auto;
    gap: 14px;
    align-items: start;
    padding: 14px 16px;
    margin: 0;
    border-bottom: 1px solid #eef2f7;
}
.sup-cat-row:last-child { border-bottom: 0; }
.sup-cat-row:not(.sup-cat-head):hover { background: #f8fafc; }
.sup-cat-head {
    align-items: center;
    background: #f1f5f9;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #475569;
}
.sup-cat-cell {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}
.sup-cat-label {
    display: none;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #64748b;
}
.sup-cat-cell input[type="text"],
.sup-cat-cell input[type="number"],
.sup-cat-cell textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.9);
    outline: none;
}
.sup-cat-cell input:focus,
.sup-cat-cell textarea:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}
.sup-cat-cell textarea {
    resize: vertical;
    min-height: 44px;
}
.sup-cat-cell-actions {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
}
.sup-cat-cell-actions .save-btn,
.sup-cat-cell-actions .search-btn {
    margin: 0;
    align-self: center;
    width: auto;
    padding: 8px 16px;
    font-size: 13px;
    line-height: 1;
    border-radius: 8px;
    white-space: nowrap;
}
@media (max-width: 760px) {
    .sup-cat-head { display: none; }
    .sup-cat-row { grid-template-columns: 1fr; gap: 10px; }
    .sup-cat-label { display: block; }
    .sup-cat-cell-actions { justify-content: flex-start; margin-top: 4px; }
}

/* ---- Admin overview: payment method usage ------------------------------- */
.pm-usage-panel {
    padding: 20px;
    border: 1px solid rgba(14, 165, 233, 0.16);
    border-radius: 18px;
    background: linear-gradient(145deg, #f4fbff 0%, #f8fcff 52%, #f2fbfa 100%);
    box-shadow: 0 12px 28px -24px rgba(14, 116, 144, 0.38);
}
.pm-usage-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.pm-usage-heading h4 {
    margin: 0;
    color: #172554;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.2px;
}
.pm-usage-heading p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 12px;
}
.pm-usage-total {
    flex: 0 0 auto;
    padding: 6px 10px;
    border: 1px solid rgba(14, 165, 233, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    color: #0369a1;
    font-size: 11px;
    font-weight: 800;
}
.pm-usage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
}
.pm-usage-card {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 12px;
    min-width: 0;
    min-height: 112px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 15px;
    background: linear-gradient(155deg, #fff 0%, #fff 68%, rgba(240, 249, 255, 0.9) 100%);
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.045);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.pm-usage-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--pm-accent) 40%, white);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.09);
}
.pm-usage-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.pm-usage-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 8px;
    border-radius: 12px;
    background: var(--pm-accent, #0ea5e9);
    box-shadow: 0 5px 12px rgba(14, 165, 233, 0.2);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
}
.pm-usage-percent {
    padding: 5px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 11px;
    font-weight: 800;
}
.pm-usage-method {
    align-self: center;
    color: #1e293b;
    font-size: 12.5px;
    font-weight: 750;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.pm-usage-track {
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8eef5;
}
.pm-usage-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--pm-accent, #0ea5e9);
}
.pm-usage-empty {
    margin: 0;
    padding: 16px;
    border: 1px dashed rgba(100, 116, 139, 0.28);
    border-radius: 12px;
    color: #64748b;
    font-size: 13px;
    text-align: center;
}
@media (max-width: 480px) {
    .pm-usage-panel { padding: 15px; }
    .pm-usage-grid { grid-template-columns: repeat(auto-fit, minmax(115px, 1fr)); gap: 9px; }
    .pm-usage-card { min-height: 104px; padding: 12px; }
}

/* ---- Admin overview: compact revenue trend chart ------------------------ */
.rev-trend-panel {
    align-self: start;
    width: 100%;
    padding: 20px;
    border: 1px solid rgba(99, 102, 241, 0.16);
    border-radius: 18px;
    background: linear-gradient(145deg, #f7f6ff 0%, #fbfaff 58%, #f7f5ff 100%);
    box-shadow: 0 12px 28px -24px rgba(79, 70, 229, 0.45);
}
.rev-trend-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.rev-trend-heading h4 {
    margin: 0;
    color: #172554;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.2px;
}
.rev-trend-heading p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 12px;
}
.rev-trend-range {
    flex: 0 0 auto;
    padding: 6px 10px;
    border: 1px solid rgba(99, 102, 241, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: #5b5bd6;
    font-size: 11px;
    font-weight: 800;
}
.rev-trend-chart {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    align-items: end;
    gap: 8px;
    padding-top: 2px;
}
.rev-trend-day {
    display: grid;
    grid-template-rows: 112px auto auto;
    gap: 6px;
    min-width: 0;
    text-align: center;
}
.rev-trend-bar-area {
    display: flex;
    align-items: flex-end;
    height: 112px;
    padding: 0 2px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.16);
    background: repeating-linear-gradient(
        to top,
        transparent 0,
        transparent 27px,
        rgba(99, 102, 241, 0.045) 28px
    );
}
.rev-trend-bar {
    display: block;
    width: 100%;
    min-height: 6px;
    border-radius: 7px 7px 3px 3px;
    background: linear-gradient(180deg, #8b7bff 0%, #6555e8 100%);
    box-shadow: 0 5px 12px rgba(99, 102, 241, 0.22);
    transition: filter 0.2s ease, transform 0.2s ease;
    transform-origin: center bottom;
}
.rev-trend-bar:hover {
    filter: brightness(1.08);
    transform: scaleX(1.04);
}
.rev-trend-date {
    color: #64748b;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}
.rev-trend-value {
    color: #5145cd;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
}
.rev-trend-empty {
    margin: 0;
    padding: 20px 14px;
    border: 1px dashed rgba(99, 102, 241, 0.24);
    border-radius: 12px;
    color: #64748b;
    font-size: 13px;
    text-align: center;
}
@media (max-width: 480px) {
    .rev-trend-panel { padding: 15px; }
    .rev-trend-chart { gap: 5px; }
    .rev-trend-day { grid-template-rows: 92px auto auto; gap: 5px; }
    .rev-trend-bar-area { height: 92px; padding: 0 1px; }
    .rev-trend-date,
    .rev-trend-value { font-size: 9px; }
}

/* ---- Advanced analytics: consistent panel sizing ----------------------- */
.advanced-analytics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 18px;
    margin-top: 20px;
}
.advanced-analytics-grid > .analytics-panel {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    width: 100%;
    min-width: 0;
    min-height: 360px;
    height: 100%;
    box-sizing: border-box;
    padding: 20px;
    border-radius: 18px;
    box-shadow: 0 12px 28px -24px rgba(15, 23, 42, 0.3);
}
.rev-trend-panel {
    align-self: stretch;
    background: linear-gradient(145deg, #f7f6ff 0%, #fbfaff 58%, #f7f5ff 100%);
}
.rev-trend-chart {
    flex: 1;
    align-items: stretch;
}
.rev-trend-day {
    grid-template-rows: minmax(112px, 1fr) auto auto;
}
.rev-trend-bar-area {
    height: auto;
    min-height: 112px;
}
.analytics-breakdown-panel {
    border: 1px solid rgba(148, 163, 184, 0.18);
}
.analytics-diamond-panel {
    background: linear-gradient(145deg, #fff7fb 0%, #fffafd 58%, #fcf6ff 100%);
}
.analytics-level-panel {
    background: linear-gradient(145deg, #faf5ff 0%, #fdfaff 58%, #f5f3ff 100%);
}
.analytics-panel-title {
    margin: 0;
    color: #1e293b;
    font-size: 16px;
    font-weight: 800;
}
.analytics-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
}
.analytics-panel-subtitle {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 11px;
}
.analytics-total-badge {
    flex: 0 0 auto;
    padding: 6px 9px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: #475569;
    font-size: 10px;
    font-weight: 800;
}
.analytics-breakdown-list {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    justify-content: flex-start;
    gap: 14px;
}
.analytics-breakdown-row {
    display: grid;
    grid-template-columns: minmax(70px, 0.85fr) minmax(0, 1.5fr) 32px;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.analytics-breakdown-label {
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    overflow-wrap: anywhere;
}
.analytics-breakdown-track {
    height: 10px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.72);
}
.analytics-breakdown-fill {
    height: 100%;
    min-width: 4px;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--bar-color), color-mix(in srgb, var(--bar-color) 58%, white));
    transition: width 0.35s ease;
}
.analytics-breakdown-count {
    color: #475569;
    font-size: 12px;
    font-weight: 800;
    text-align: right;
}
.analytics-breakdown-count.is-diamond { color: #db2777; }
.analytics-breakdown-count.is-level { color: #7c3aed; }
.pm-usage-panel {
    display: flex;
    flex-direction: column;
    background: linear-gradient(145deg, #f3fbff 0%, #fbfeff 58%, #f1fbfa 100%);
}
.pm-usage-grid {
    flex: 1;
    grid-auto-rows: 1fr;
}
.pm-usage-card {
    height: 100%;
    min-height: 86px;
    padding: 10px;
    gap: 7px;
}
.pm-usage-count {
    min-width: 32px;
    height: 32px;
}
@media (max-width: 1200px) {
    .advanced-analytics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .advanced-analytics-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .advanced-analytics-grid > .analytics-panel {
        min-height: 360px;
        padding: 16px;
    }
    .pm-usage-grid {
        grid-auto-rows: minmax(86px, 1fr);
        gap: 9px;
    }
    .pm-usage-card { min-height: 86px; padding: 10px; }
}
@media (max-width: 480px) {
    .rev-trend-day { grid-template-rows: minmax(92px, 1fr) auto auto; }
    .rev-trend-bar-area { min-height: 92px; }
    .analytics-breakdown-row {
        grid-template-columns: minmax(65px, 0.85fr) minmax(0, 1.5fr) 28px;
        gap: 7px;
    }
}

/* ---- Advanced analytics: unified graph presentation -------------------- */
.advanced-analytics-grid > .analytics-panel {
    position: relative;
    height: 360px;
    min-height: 360px;
    overflow: hidden;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 18px;
    box-shadow: 0 12px 28px -22px rgba(15, 23, 42, 0.32);
}
.advanced-analytics-grid > .analytics-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 18px;
    right: 18px;
    height: 3px;
    border-radius: 0 0 99px 99px;
    background: var(--analytics-accent, linear-gradient(90deg, #6366f1, #06b6d4));
}
.advanced-analytics-grid > .analytics-panel > * {
    position: relative;
    z-index: 1;
}
.rev-trend-panel { --analytics-accent: linear-gradient(90deg, #6366f1, #a78bfa); }
.analytics-diamond-panel { --analytics-accent: linear-gradient(90deg, #ec4899, #f9a8d4); }
.pm-usage-panel { --analytics-accent: linear-gradient(90deg, #0ea5e9, #2dd4bf); }
.analytics-level-panel { --analytics-accent: linear-gradient(90deg, #8b5cf6, #c4b5fd); }
.analytics-panel-heading,
.rev-trend-heading,
.pm-usage-heading {
    flex: 0 0 auto;
    margin-bottom: 14px;
}
.analytics-panel-title,
.rev-trend-heading h4,
.pm-usage-heading h4 {
    color: #172554;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.3;
}
.analytics-panel-subtitle,
.rev-trend-heading p,
.pm-usage-heading p {
    color: #64748b;
    font-size: 11px;
}
.analytics-breakdown-list,
.analytics-graph-list {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 13px;
    min-height: 0;
}
.analytics-breakdown-row {
    grid-template-columns: minmax(72px, 0.9fr) minmax(0, 1.5fr) 44px;
    gap: 8px;
}
.analytics-breakdown-label,
.analytics-graph-label {
    color: #334155;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
}
.analytics-breakdown-track,
.analytics-graph-track {
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: #e9eef5;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
}
.analytics-breakdown-fill,
.analytics-graph-track span {
    display: block;
    height: 100%;
    min-width: 4px;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--bar-color), color-mix(in srgb, var(--bar-color) 55%, white));
    box-shadow: 0 2px 7px color-mix(in srgb, var(--bar-color) 24%, transparent);
}
.analytics-breakdown-count {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    line-height: 1.05;
}
.analytics-breakdown-count strong,
.analytics-graph-stat strong {
    color: inherit;
    font-size: 12px;
    font-weight: 800;
}
.analytics-breakdown-count small,
.analytics-graph-stat small {
    color: #64748b;
    font-size: 9px;
    font-weight: 700;
}
.pm-usage-panel {
    border-color: rgba(14, 165, 233, 0.18);
}
.pm-usage-graph {
    justify-content: center;
    gap: 11px;
}
.analytics-graph-item {
    display: grid;
    gap: 6px;
    min-width: 0;
}
.analytics-graph-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}
.analytics-graph-label {
    min-width: 0;
    overflow-wrap: anywhere;
}
.analytics-graph-stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    color: #0284c7;
}
.analytics-graph-stat small {
    padding: 3px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
}
.analytics-graph-track span {
    background: linear-gradient(90deg, var(--bar-color), color-mix(in srgb, var(--bar-color) 52%, white));
}
.rev-trend-chart {
    flex: 1 1 auto;
    min-height: 0;
    align-items: stretch;
}
.rev-trend-day {
    grid-template-rows: minmax(100px, 1fr) auto auto;
}
.rev-trend-bar-area {
    min-height: 100px;
    border-bottom-color: rgba(99, 102, 241, 0.18);
}
.rev-trend-bar {
    background: linear-gradient(180deg, #a78bfa 0%, #6555e8 100%);
}
@media (max-width: 700px) {
    .advanced-analytics-grid > .analytics-panel {
        height: 360px;
        min-height: 360px;
        padding: 16px;
    }
}
@media (max-width: 480px) {
    .analytics-breakdown-row {
        grid-template-columns: minmax(64px, 0.9fr) minmax(0, 1.5fr) 40px;
        gap: 7px;
    }
    .rev-trend-day { grid-template-rows: minmax(88px, 1fr) auto auto; }
    .rev-trend-bar-area { min-height: 88px; }
}

/* ---- Admin Overview: cohesive dashboard layout ------------------------ */
.admin-overview {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}
.overview-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 138px;
    padding: 24px 28px;
    overflow: hidden;
    border: 1px solid rgba(99, 102, 241, 0.16);
    border-radius: 22px;
    background:
        radial-gradient(circle at 88% 18%, rgba(129, 140, 248, 0.2), transparent 28%),
        linear-gradient(120deg, #111c43 0%, #243b78 56%, #17566a 100%);
    box-shadow: 0 18px 38px -24px rgba(30, 41, 94, 0.55);
    color: #fff;
}
.overview-kicker {
    display: inline-block;
    margin-bottom: 9px;
    color: #e3e9ff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.7px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.overview-intro h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(22px, 2.1vw, 30px);
    font-weight: 800;
    letter-spacing: -0.7px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.32);
}
.overview-intro p {
    margin: 7px 0 0;
    color: rgba(255, 255, 255, 0.95);
    font-size: 13px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.overview-intro-date {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 5px;
    min-width: 142px;
    padding: 13px 16px;
    border: 1px solid rgba(255, 255, 255, 0.17);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
}
.overview-intro-date span {
    color: #e3e9ff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.overview-intro-date strong {
    color: #fff;
    font-size: 13px;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.32);
}
.admin-overview .overview-stat-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
}
.admin-overview .overview-stat-grid .stat-card {
    min-width: 0;
    min-height: 122px;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 13px;
    padding: 17px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    background: linear-gradient(145deg, #fff 0%, #fbfcff 100%);
    box-shadow: 0 10px 24px -20px rgba(15, 23, 42, 0.4);
}
.admin-overview .overview-stat-grid .stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 28px -20px var(--card-glow, rgba(99, 102, 241, 0.35));
}
.admin-overview .overview-stat-grid .stat-icon {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    margin: 0;
    border-radius: 14px;
    box-shadow: 0 7px 14px -8px var(--card-glow, rgba(99, 102, 241, 0.6));
}
.admin-overview .overview-stat-grid .stat-icon svg {
    width: 21px;
    height: 21px;
}
.admin-overview .overview-stat-grid .stat-info {
    flex: 1;
    min-width: 0;
}
.admin-overview .overview-stat-grid .stat-value {
    overflow-wrap: anywhere;
    font-size: clamp(18px, 1.5vw, 23px);
}
.admin-overview .overview-stat-grid .stat-value.overview-currency-value {
    overflow-wrap: normal;
    word-break: normal;
    white-space: nowrap;
    font-size: clamp(12px, 1.25vw, 18px);
    letter-spacing: -0.04em;
}
.admin-overview .overview-stat-grid .stat-label {
    font-size: 9px;
    letter-spacing: 0.75px;
    line-height: 1.35;
}
/* 3D animated hero + colorful stat cards (reusable across admin sections) */
.hero3d {
    perspective: 1400px;
    perspective-origin: center;
    margin-bottom: 20px;
}
.tasks-tab-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.tasks-tab-layout > .hero3d { margin-bottom: 0; }
.tasks-tab-layout > .task-form-section { order: 1; }
.tasks-tab-layout > .task-list-section { order: 2; }
.tasks-tab-layout > .task-proofs-section { order: 3; }
.tasks-tab-layout > .task-decisions-section { order: 4; }
.hero3d .overview-intro {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.5s cubic-bezier(0.2, 0.75, 0.25, 1), box-shadow 0.5s ease;
    animation: hero3dHeroEnter 0.7s cubic-bezier(0.2, 0.75, 0.25, 1) both;
}
.hero3d .overview-intro::before {
    content: "";
    position: absolute;
    inset: -120% auto -120% -40%;
    width: 30%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
    transform: translateX(-160%) rotate(22deg);
    transition: transform 0.9s cubic-bezier(0.2, 0.75, 0.25, 1);
    pointer-events: none;
}
.hero3d .overview-intro > * {
    position: relative;
    z-index: 1;
    transform: translateZ(26px);
}
.hero3d .overview-intro h2,
.hero3d .overview-intro p,
.hero3d .overview-intro-date strong {
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5), 0 0 1px rgba(0, 0, 0, 0.4);
}
.hero3d .overview-kicker,
.hero3d .overview-intro-date span {
    color: #f2f5ff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}
@keyframes hero3dHeroEnter {
    from { opacity: 0; transform: perspective(1000px) translateY(20px) rotateX(-9deg) scale(0.97); }
    to { opacity: 1; transform: perspective(1000px) translateY(0) rotateX(0) scale(1); }
}
.hero3d-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
    perspective: 1200px;
}
.hero3d-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    padding: 20px 22px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 20px;
    color: #fff;
    overflow: hidden;
    transform-style: preserve-3d;
    box-shadow: 0 16px 30px -22px rgba(15, 23, 42, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.34);
    animation: hero3dCardEnter 0.62s cubic-bezier(0.2, 0.75, 0.25, 1) both;
    transition: transform 0.34s cubic-bezier(0.2, 0.75, 0.25, 1), box-shadow 0.34s ease, filter 0.34s ease;
}
.hero3d-card::before {
    content: "";
    position: absolute;
    inset: -120% auto -120% -55%;
    z-index: 0;
    width: 34%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34), transparent);
    transform: translateX(-160%) rotate(25deg);
    transition: transform 0.8s cubic-bezier(0.2, 0.75, 0.25, 1);
    pointer-events: none;
}
.hero3d-card::after {
    content: "";
    position: absolute;
    top: -40%;
    right: -18%;
    width: 70%;
    height: 180%;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 62%);
    transform: rotate(18deg);
    pointer-events: none;
}
.hero3d-card > * {
    position: relative;
    z-index: 1;
    transform: translateZ(20px);
}
.hero3d-card:nth-child(2) { animation-delay: 0.08s; }
.hero3d-card:nth-child(3) { animation-delay: 0.16s; }
.hero3d-card:nth-child(4) { animation-delay: 0.24s; }
.hero3d-card:nth-child(5) { animation-delay: 0.32s; }
.hero3d-card:nth-child(6) { animation-delay: 0.4s; }
@keyframes hero3dCardEnter {
    from { opacity: 0; transform: perspective(900px) translateY(16px) rotateX(-8deg) scale(0.97); }
    to { opacity: 1; transform: perspective(900px) translateY(0) rotateX(0) scale(1); }
}
.hero3d-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 4px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.22);
}
.hero3d-icon svg {
    width: 20px;
    height: 20px;
}
.hero3d-value {
    font-size: clamp(24px, 2.4vw, 32px);
    font-weight: 850;
    line-height: 1.1;
    overflow-wrap: anywhere;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5), 0 0 1px rgba(0, 0, 0, 0.45);
}
.hero3d-card.is-text .hero3d-value {
    font-size: clamp(16px, 1.7vw, 22px);
}
.hero3d-label {
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}
.hero3d-sub {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.hero3d-card .hero3d-value,
.hero3d-card .hero3d-label,
.hero3d-card .hero3d-sub,
.hero3d-card .task-detail-title,
.hero3d-card .task-detail-meta,
.hero3d-card .task-detail-steps,
.hero3d-card .task-detail-stats span {
    color: #fff;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.72), 0 0 2px rgba(0, 0, 0, 0.78);
}
/* color variants */
.hero3d-green  { background: linear-gradient(135deg, #059669 0%, #34d399 100%); }
.hero3d-amber  { background: linear-gradient(135deg, #d97706 0%, #fbbf24 100%); }
.hero3d-indigo { background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%); }
.hero3d-blue   { background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%); }
.hero3d-pink   { background: linear-gradient(135deg, #be185d 0%, #ec4899 100%); }
.hero3d-teal   { background: linear-gradient(135deg, #0e7490 0%, #14b8a6 100%); }
.hero3d-red    { background: linear-gradient(135deg, #b91c1c 0%, #ef4444 100%); }
.task-visibility-btn {
    width: 100%;
    color: #fff;
    background: linear-gradient(135deg, #34d399, #059669);
    box-shadow: 0 4px 0 #047857, 0 10px 18px -10px rgba(5, 150, 105, 0.6);
}
.task-visibility-btn.is-active {
    background: linear-gradient(135deg, #fbbf24, #d97706);
    box-shadow: 0 4px 0 #b45309, 0 10px 18px -10px rgba(217, 119, 6, 0.55);
}
/* per-task detail cards */
.task-detail-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.task-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.task-detail-title {
    margin: 2px 0 0;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.25;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}
.task-detail-reward {
    flex: 0 0 auto;
    padding: 5px 10px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    font-size: 12px;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.task-detail-meta {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.task-detail-steps {
    margin: 6px 0 0;
    padding: 10px 12px 10px 26px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.16);
    font-size: 12px;
    line-height: 1.5;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.task-detail-steps li { margin: 2px 0; }
.task-detail-empty {
    margin: 6px 0 0;
    font-size: 12px;
    font-style: italic;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.task-detail-stats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }
.task-detail-stats span {
    padding: 4px 9px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 11px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
@media (hover: hover) and (pointer: fine) {
    .hero3d .overview-intro:hover {
        transform: perspective(1200px) translateY(-6px) rotateX(3deg) rotateY(-1deg);
        box-shadow: 0 30px 55px -28px rgba(15, 23, 42, 0.7);
    }
    .hero3d .overview-intro:hover::before { transform: translateX(520%) rotate(22deg); }
    .hero3d-card:hover {
        transform: perspective(900px) translateY(-8px) rotateX(5deg) rotateY(-1deg) scale(1.02);
        box-shadow: 0 26px 40px -22px rgba(15, 23, 42, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.5);
        filter: saturate(1.08) brightness(1.04);
    }
    .hero3d-card:hover::before { transform: translateX(480%) rotate(25deg); }
}
@media (prefers-reduced-motion: reduce) {
    .hero3d .overview-intro,
    .hero3d-card { animation: none !important; }
    .hero3d .overview-intro::before,
    .hero3d-card::before { display: none; }
    .hero3d .overview-intro:hover,
    .hero3d-card:hover { transform: none; }
}
.users-summary-cards,
.ud-summary-cards,
.ad-data-cards {
    perspective: 1200px;
    perspective-origin: center;
}
.users-summary-cards > div,
.ud-summary-cards > div,
.ad-data-cards > div {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid rgba(255, 255, 255, 0.42);
    transform-style: preserve-3d;
    backface-visibility: hidden;
    box-shadow: 0 12px 22px -12px rgba(15, 23, 42, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.34) !important;
    transition: transform 0.38s cubic-bezier(0.2, 0.75, 0.25, 1), box-shadow 0.38s ease, filter 0.38s ease !important;
    animation: userSummaryCardEnter 0.62s cubic-bezier(0.2, 0.75, 0.25, 1) both;
}
.users-summary-cards > div::before,
.ud-summary-cards > div::before,
.ad-data-cards > div::before {
    content: "";
    position: absolute;
    inset: -120% auto -120% -65%;
    z-index: 0;
    width: 38%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
    transform: translateX(-150%) rotate(25deg);
    transition: transform 0.78s cubic-bezier(0.2, 0.75, 0.25, 1);
    pointer-events: none;
}
.users-summary-cards > div > div,
.ud-summary-cards > div > div,
.ad-data-cards > div > div {
    position: relative;
    z-index: 1;
    transform: translateZ(18px);
}
.users-summary-cards > div:nth-child(2),
.ud-summary-cards > div:nth-child(2),
.ad-data-cards > div:nth-child(2) { animation-delay: 0.06s; }
.users-summary-cards > div:nth-child(3),
.ud-summary-cards > div:nth-child(3),
.ad-data-cards > div:nth-child(3) { animation-delay: 0.12s; }
.users-summary-cards > div:nth-child(4),
.ud-summary-cards > div:nth-child(4),
.ad-data-cards > div:nth-child(4) { animation-delay: 0.18s; }
.users-summary-cards > div:nth-child(5),
.ud-summary-cards > div:nth-child(5),
.ad-data-cards > div:nth-child(5) { animation-delay: 0.24s; }
.users-summary-cards > div:nth-child(6),
.ud-summary-cards > div:nth-child(6),
.ad-data-cards > div:nth-child(6) { animation-delay: 0.30s; }
.users-summary-cards > div:nth-child(7),
.ud-summary-cards > div:nth-child(7),
.ad-data-cards > div:nth-child(7) { animation-delay: 0.36s; }
.ad-data-cards > div:nth-child(8) { animation-delay: 0.42s; }
.ad-data-cards > div:nth-child(9) { animation-delay: 0.48s; }
.ad-data-cards > div:nth-child(10) { animation-delay: 0.54s; }
@keyframes userSummaryCardEnter {
    from { opacity: 0; transform: perspective(900px) translateY(16px) rotateX(-7deg) scale(0.97); }
    to { opacity: 1; transform: perspective(900px) translateY(0) rotateX(0) scale(1); }
}
@media (hover: hover) and (pointer: fine) {
    .users-summary-cards > div:hover,
    .ud-summary-cards > div:hover,
    .ad-data-cards > div:hover {
        z-index: 2;
        transform: perspective(900px) translateY(-7px) rotateX(4deg) rotateY(-1deg) scale(1.025);
        box-shadow: 0 22px 32px -16px rgba(15, 23, 42, 0.78), inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
        filter: saturate(1.08) brightness(1.03);
    }
    .users-summary-cards > div:hover::before,
    .ud-summary-cards > div:hover::before,
    .ad-data-cards > div:hover::before {
        transform: translateX(500%) rotate(25deg);
    }
}
@media (prefers-reduced-motion: reduce) {
    .users-summary-cards > div,
    .ud-summary-cards > div,
    .ad-data-cards > div {
        animation: none !important;
        transition: none !important;
    }
    .users-summary-cards > div:hover,
    .ud-summary-cards > div:hover,
    .ad-data-cards > div:hover {
        transform: none;
        filter: none;
    }
    .users-summary-cards > div::before,
    .ud-summary-cards > div::before,
    .ad-data-cards > div::before { display: none; }
}
.admin-withdrawals {
    display: grid;
    gap: 18px;
}
.withdrawals-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.55fr);
    align-items: center;
    gap: 24px;
    overflow: hidden;
    padding: clamp(22px, 3vw, 34px);
    border: 1px solid rgba(110, 231, 183, 0.34);
    border-radius: 22px;
    background:
        radial-gradient(circle at 82% 8%, rgba(74, 222, 128, 0.34), transparent 32%),
        linear-gradient(125deg, #052e16 0%, #047857 52%, #059669 100%);
    color: #fff;
    box-shadow: 0 18px 36px -24px rgba(4, 120, 87, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.admin-payments .withdrawals-hero {
    border-color: rgba(253, 186, 116, 0.4);
    background:
        radial-gradient(circle at 82% 8%, rgba(253, 224, 71, 0.34), transparent 32%),
        linear-gradient(125deg, #431407 0%, #c2410c 52%, #ea580c 100%);
    box-shadow: 0 18px 36px -24px rgba(154, 52, 18, 0.82), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.admin-withdrawals:not(.admin-payments) .withdrawals-eyebrow,
.admin-withdrawals:not(.admin-payments) .withdrawals-total > span {
    color: #bbf7d0;
}
.admin-payments .withdrawals-eyebrow,
.admin-payments .withdrawals-total > span {
    color: #ffedd5;
}
.withdrawals-hero::after {
    content: "";
    position: absolute;
    right: 20%;
    bottom: -110px;
    width: 240px;
    height: 240px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    box-shadow: 0 0 0 24px rgba(255, 255, 255, 0.035), 0 0 0 50px rgba(255, 255, 255, 0.025);
    pointer-events: none;
}
.withdrawals-hero-copy,
.withdrawals-total {
    position: relative;
    z-index: 1;
}
.withdrawals-eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #c7d2fe;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
}
.withdrawals-hero h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 800;
    letter-spacing: -0.035em;
}
.withdrawals-hero p {
    max-width: 620px;
    margin: 9px 0 0;
    color: rgba(238, 242, 255, 0.82);
    font-size: 14px;
    line-height: 1.6;
}
.withdrawals-total {
    display: grid;
    gap: 6px;
    justify-items: end;
    padding: 18px 20px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.11);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}
.withdrawals-total > span {
    color: #c7d2fe;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.withdrawals-total > strong {
    max-width: 100%;
    color: #fff;
    font-size: clamp(21px, 2.4vw, 30px);
    font-weight: 850;
    letter-spacing: -0.035em;
    line-height: 1.1;
    white-space: nowrap;
}
.withdrawals-total > small {
    color: rgba(238, 242, 255, 0.76);
    font-size: 12px;
}
.withdrawal-action-message {
    padding: 13px 16px;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #1e40af;
    font-size: 13px;
    font-weight: 700;
}
.withdrawal-count-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.withdrawal-count-card {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 16px 18px;
    border: 1px solid var(--withdraw-border, #e2e8f0);
    border-radius: 15px;
    background: linear-gradient(145deg, #fff, var(--withdraw-tint, #f8fafc));
    box-shadow: 0 8px 18px -16px rgba(15, 23, 42, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.withdrawal-count-card > span {
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}
.withdrawal-count-card > strong {
    color: var(--withdraw-accent, #334155);
    font-size: 27px;
    font-weight: 850;
    line-height: 1.1;
}
.withdrawal-count-card > small {
    color: #64748b;
    font-size: 11px;
}
.withdrawal-count-card.is-pending { --withdraw-accent: #b45309; --withdraw-border: #fed7aa; --withdraw-tint: #fff7ed; }
.withdrawal-count-card.is-approved { --withdraw-accent: #1d4ed8; --withdraw-border: #bfdbfe; --withdraw-tint: #eff6ff; }
.withdrawal-count-card.is-completed { --withdraw-accent: #047857; --withdraw-border: #a7f3d0; --withdraw-tint: #ecfdf5; }
.withdrawal-count-card.is-rejected { --withdraw-accent: #b91c1c; --withdraw-border: #fecaca; --withdraw-tint: #fef2f2; }
.withdrawal-request-list {
    display: grid;
    gap: 16px;
}
.withdrawal-request-card {
    --withdraw-accent: #64748b;
    position: relative;
    overflow: hidden;
    padding: clamp(16px, 2vw, 23px);
    border: 1px solid #e2e8f0;
    border-left: 5px solid var(--withdraw-accent);
    border-radius: 18px;
    background: linear-gradient(145deg, #fff 0%, #fbfcff 100%);
    box-shadow: 0 12px 26px -22px rgba(15, 23, 42, 0.62), inset 0 1px 0 #fff;
    transform-style: preserve-3d;
    animation: withdrawalRequestEnter 0.5s cubic-bezier(0.2, 0.75, 0.25, 1) both;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.withdrawal-request-card.is-pending { --withdraw-accent: #f59e0b; }
.withdrawal-request-card.is-approved,
.withdrawal-request-card.is-processing { --withdraw-accent: #3b82f6; }
.withdrawal-request-card.is-completed { --withdraw-accent: #10b981; }
.withdrawal-request-card.is-rejected,
.withdrawal-request-card.is-cancelled { --withdraw-accent: #ef4444; }
.withdrawal-request-card:nth-child(2) { animation-delay: 0.05s; }
.withdrawal-request-card:nth-child(3) { animation-delay: 0.1s; }
.withdrawal-request-card:nth-child(4) { animation-delay: 0.15s; }
.withdrawal-request-card:nth-child(5) { animation-delay: 0.2s; }
.withdrawal-request-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}
.withdrawal-member {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.withdrawal-avatar {
    display: grid;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    background: linear-gradient(145deg, var(--withdraw-accent), #4f46e5);
    box-shadow: 0 8px 14px -9px var(--withdraw-accent), inset 0 1px 0 rgba(255, 255, 255, 0.45);
    color: #fff;
    font-size: 20px;
    font-weight: 850;
}
.withdrawal-member-copy { min-width: 0; }
.withdrawal-member-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}
.withdrawal-member-title h3 {
    margin: 0;
    color: #172554;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.withdrawal-status {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border: 1px solid color-mix(in srgb, var(--withdraw-accent) 26%, white);
    border-radius: 999px;
    background: color-mix(in srgb, var(--withdraw-accent) 10%, white);
    color: color-mix(in srgb, var(--withdraw-accent) 78%, #0f172a);
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.withdrawal-member-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 13px;
    margin-top: 7px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
}
.withdrawal-member-meta span { overflow-wrap: anywhere; }
.withdrawal-amount-block {
    display: grid;
    flex: 0 0 auto;
    justify-items: end;
    gap: 5px;
    min-width: 178px;
    padding: 12px 15px;
    border: 1px solid #bbf7d0;
    border-radius: 14px;
    background: linear-gradient(145deg, #f0fdf4, #dcfce7);
    text-align: right;
}
.withdrawal-request-id {
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.withdrawal-amount-block > strong {
    color: #047857;
    font-size: clamp(19px, 2vw, 25px);
    font-weight: 850;
    letter-spacing: -0.035em;
    line-height: 1.15;
    white-space: nowrap;
}
.withdrawal-amount-block > time {
    color: #64748b;
    font-size: 11px;
}
.withdrawal-payment-details {
    display: grid;
    grid-template-columns: minmax(170px, 0.65fr) minmax(0, 1.35fr);
    gap: 12px;
    padding: 13px;
    border: 1px solid #e8edf5;
    border-radius: 14px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}
.withdrawal-detail-method,
.withdrawal-detail-account {
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.88);
}
.withdrawal-detail-label {
    display: block;
    margin-bottom: 6px;
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.075em;
    text-transform: uppercase;
}
.withdrawal-detail-method strong,
.withdrawal-detail-account > div {
    color: #1e293b;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.6;
    overflow-wrap: anywhere;
}
.withdrawal-action-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 14px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #edf1f7;
}
.withdrawal-note-field {
    display: grid;
    gap: 7px;
    min-width: 0;
}
.withdrawal-note-field > span {
    color: #334155;
    font-size: 12px;
    font-weight: 750;
}
.withdrawal-note-field small {
    margin-left: 5px;
    color: #b45309;
    font-size: 10px;
    font-weight: 600;
}
.withdrawal-note-field input {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    outline: none;
    background: #fff;
    color: #0f172a;
    font: inherit;
    font-size: 13px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.withdrawal-note-field input:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.13);
}
.withdrawal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}
.withdrawal-action-button {
    min-height: 42px;
    padding: 10px 15px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 5px 0 rgba(15, 23, 42, 0.12), 0 9px 16px -12px rgba(15, 23, 42, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.withdrawal-action-button.is-approve {
    background: linear-gradient(145deg, #10b981, #047857);
}
.withdrawal-action-button.is-reject {
    background: linear-gradient(145deg, #f87171, #dc2626);
}
.withdrawal-action-button:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 7px 0 rgba(15, 23, 42, 0.11), 0 13px 20px -12px rgba(15, 23, 42, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}
.withdrawal-resolution {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-top: 15px;
    padding: 13px 15px;
    border: 1px solid #e8edf5;
    border-radius: 12px;
    background: #f8fafc;
}
.withdrawal-resolution p {
    margin: 0;
    color: #334155;
    font-size: 13px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}
.withdrawal-resolution time {
    flex: 0 0 auto;
    color: #64748b;
    font-size: 11px;
}
.withdrawal-empty-state {
    display: grid;
    justify-items: center;
    padding: 54px 22px;
    border: 1px dashed #cbd5e1;
    border-radius: 20px;
    background: linear-gradient(145deg, #fff, #f8fafc);
    text-align: center;
}
.withdrawal-empty-icon {
    display: grid;
    width: 54px;
    height: 54px;
    margin-bottom: 12px;
    place-items: center;
    border: 1px solid #c7d2fe;
    border-radius: 17px;
    background: linear-gradient(145deg, #eef2ff, #e0e7ff);
    color: #4f46e5;
    font-size: 20px;
    font-weight: 850;
}
.withdrawal-empty-icon svg { width: 25px; height: 25px; }
.withdrawal-empty-state h3 {
    margin: 0;
    color: #1e293b;
    font-size: 17px;
}
.withdrawal-empty-state p {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 13px;
}
@keyframes withdrawalRequestEnter {
    from { opacity: 0; transform: perspective(900px) translateY(12px) rotateX(-2deg); }
    to { opacity: 1; transform: perspective(900px) translateY(0) rotateX(0); }
}
@media (hover: hover) and (pointer: fine) {
    .withdrawal-request-card:hover {
        z-index: 2;
        transform: perspective(1100px) translateY(-4px) rotateX(1.2deg);
        box-shadow: 0 22px 36px -25px rgba(15, 23, 42, 0.72), inset 0 1px 0 #fff;
    }
}
@media (max-width: 760px) {
    .withdrawals-hero { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .withdrawals-total { justify-items: start; }
    .withdrawal-count-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .withdrawal-request-header { flex-direction: column; }
    .withdrawal-amount-block { justify-items: start; min-width: 0; text-align: left; }
    .withdrawal-payment-details { grid-template-columns: minmax(0, 1fr); }
    .withdrawal-action-form { grid-template-columns: minmax(0, 1fr); }
    .withdrawal-actions { width: 100%; }
    .withdrawal-action-button { flex: 1 1 145px; }
}
@media (max-width: 480px) {
    .withdrawals-hero { padding: 20px; border-radius: 18px; }
    .withdrawal-count-grid { gap: 8px; }
    .withdrawal-count-card { padding: 13px; }
    .withdrawal-count-card > strong { font-size: 23px; }
    .withdrawal-member { align-items: flex-start; gap: 10px; }
    .withdrawal-avatar { flex-basis: 40px; width: 40px; height: 40px; border-radius: 13px; font-size: 17px; }
    .withdrawal-member-title h3 { font-size: 15px; }
    .withdrawal-member-meta { font-size: 11px; }
    .withdrawal-resolution { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
    .withdrawal-request-card,
    .withdrawal-action-button { animation: none !important; transition: none !important; }
    .withdrawal-request-card:hover,
    .withdrawal-action-button:hover { transform: none; }
}
.withdrawal-count-grid {
    perspective: 1200px;
}
.withdrawal-count-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.46);
    background: linear-gradient(145deg, var(--withdraw-start), var(--withdraw-end));
    box-shadow: 0 14px 24px -16px var(--withdraw-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transform-style: preserve-3d;
    animation: withdrawalSummaryCardEnter 0.62s cubic-bezier(0.2, 0.75, 0.25, 1) both;
    transition: transform 0.34s cubic-bezier(0.2, 0.75, 0.25, 1), box-shadow 0.34s ease, filter 0.34s ease;
}
.withdrawal-count-card::before {
    content: "";
    position: absolute;
    inset: -120% auto -120% -55%;
    z-index: 0;
    width: 34%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: translateX(-160%) rotate(25deg);
    transition: transform 0.8s cubic-bezier(0.2, 0.75, 0.25, 1);
    pointer-events: none;
}
.withdrawal-count-card > * {
    position: relative;
    z-index: 1;
    transform: translateZ(18px);
}
.withdrawal-count-card > span,
.withdrawal-count-card > small { color: rgba(255, 255, 255, 0.86); }
.withdrawal-count-card > strong {
    color: #fff;
    font-size: 30px;
    text-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
}
.withdrawal-count-card.is-pending { --withdraw-start: #fb923c; --withdraw-end: #ea580c; --withdraw-shadow: rgba(194, 65, 12, 0.8); }
.withdrawal-count-card.is-approved { --withdraw-start: #60a5fa; --withdraw-end: #4f46e5; --withdraw-shadow: rgba(67, 56, 202, 0.8); }
.withdrawal-count-card.is-completed { --withdraw-start: #34d399; --withdraw-end: #059669; --withdraw-shadow: rgba(4, 120, 87, 0.8); }
.withdrawal-count-card.is-rejected { --withdraw-start: #fb7185; --withdraw-end: #be123c; --withdraw-shadow: rgba(159, 18, 57, 0.8); }
.admin-withdrawals:not(.admin-payments) .withdrawal-count-card > span,
.admin-withdrawals:not(.admin-payments) .withdrawal-count-card > small {
    color: #fff;
    font-weight: 700;
    text-shadow: 0 1px 4px rgba(2, 6, 23, 0.68), 0 1px 1px rgba(2, 6, 23, 0.5);
}
.admin-withdrawals:not(.admin-payments) .withdrawal-count-card > span {
    font-size: 13px;
}
.admin-withdrawals:not(.admin-payments) .withdrawal-count-card > small {
    font-size: 12px;
    font-weight: 600;
}
.admin-withdrawals:not(.admin-payments) .withdrawal-count-card > strong {
    color: #fff;
    text-shadow: 0 2px 8px rgba(2, 6, 23, 0.62), 0 1px 2px rgba(2, 6, 23, 0.5);
}
.admin-payments .withdrawal-count-card > span,
.admin-payments .withdrawal-count-card > small {
    color: #fff;
    font-weight: 700;
    text-shadow: 0 1px 4px rgba(2, 6, 23, 0.68), 0 1px 1px rgba(2, 6, 23, 0.5);
}
.admin-payments .withdrawal-count-card > span {
    font-size: 13px;
}
.admin-payments .withdrawal-count-card > small {
    font-size: 12px;
    font-weight: 600;
}
.admin-payments .withdrawal-count-card > strong {
    color: #fff;
    text-shadow: 0 2px 8px rgba(2, 6, 23, 0.62), 0 1px 2px rgba(2, 6, 23, 0.5);
}
.withdrawal-count-card:nth-child(2) { animation-delay: 0.07s; }
.withdrawal-count-card:nth-child(3) { animation-delay: 0.14s; }
.withdrawal-count-card:nth-child(4) { animation-delay: 0.21s; }
@keyframes withdrawalSummaryCardEnter {
    from { opacity: 0; transform: perspective(900px) translateY(15px) rotateX(-8deg) scale(0.97); }
    to { opacity: 1; transform: perspective(900px) translateY(0) rotateX(0) scale(1); }
}
@media (hover: hover) and (pointer: fine) {
    .withdrawal-count-card:hover {
        z-index: 2;
        transform: perspective(900px) translateY(-7px) rotateX(5deg) rotateY(-1deg) scale(1.025);
        box-shadow: 0 23px 34px -18px var(--withdraw-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.52);
        filter: saturate(1.08) brightness(1.04);
    }
    .withdrawal-count-card:hover::before { transform: translateX(480%) rotate(25deg); }
}
.withdrawal-overview-filter {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 16px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 15px;
    background: linear-gradient(145deg, #fff, #f8fafc);
    box-shadow: 0 8px 18px -18px rgba(15, 23, 42, 0.58);
}
.withdrawal-filter-controls { display: grid; flex: 1; gap: 12px; min-width: 0; }
.withdrawal-filter-copy > span {
    color: #6366f1;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.12em;
}
.withdrawal-filter-copy h3 {
    margin: 3px 0 0;
    color: #172554;
    font-size: 16px;
    font-weight: 800;
}
.withdrawal-filter-copy p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 11px;
}
.withdrawal-filter-copy p strong { color: #334155; }
.withdrawal-search-fields {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(145px, 0.7fr) minmax(150px, 0.7fr);
    gap: 10px;
}
.withdrawal-filter-field { display: grid; gap: 5px; min-width: 0; }
.withdrawal-filter-field > span {
    color: #475569;
    font-size: 11px;
    font-weight: 750;
}
.withdrawal-filter-field input,
.withdrawal-filter-field select {
    width: 100%;
    min-width: 0;
    height: 37px;
    padding: 7px 10px;
    border: 1px solid #dbe3ee;
    border-radius: 9px;
    outline: none;
    background: #fff;
    color: #1e293b;
    font: inherit;
    font-size: 12px;
}
.withdrawal-filter-field input:focus,
.withdrawal-filter-field select:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.11);
}
.withdrawal-custom-dates {
    display: grid;
    grid-template-columns: repeat(2, minmax(145px, 210px));
    gap: 9px;
}
.withdrawal-custom-dates[hidden] { display: none !important; }
.withdrawal-filter-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.withdrawal-filter-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}
.withdrawal-clear-filters {
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 750;
}
.withdrawal-clear-filters:hover { border-color: #a5b4fc; color: #4338ca; }
.withdrawal-filter-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 7px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.withdrawal-filter-button > span {
    display: grid;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    place-items: center;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 10px;
}
.withdrawal-filter-button:hover { transform: translateY(-1px); border-color: #a5b4fc; }
.withdrawal-filter-button.is-active {
    border-color: #4f46e5;
    background: linear-gradient(135deg, #4f46e5, #3730a3);
    color: #fff;
    box-shadow: 0 5px 12px -8px rgba(55, 48, 163, 0.9);
    font-weight: 750;
    text-shadow: 0 1px 3px rgba(15, 23, 42, 0.58);
}
.withdrawal-filter-button.is-active > span { background: rgba(255, 255, 255, 0.18); color: #fff; }
.withdrawal-request-list {
    display: block;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 28px -26px rgba(15, 23, 42, 0.72);
}
.withdrawal-list-heading,
.withdrawal-request-row {
    display: grid;
    grid-template-columns: minmax(175px, 0.95fr) minmax(135px, 0.72fr) minmax(220px, 1.25fr) minmax(230px, 1.2fr);
    align-items: start;
    gap: 13px;
}
.withdrawal-list-heading {
    padding: 10px 15px;
    background: linear-gradient(110deg, #f8fafc, #eef2ff);
    color: #64748b;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.withdrawal-request-row {
    --withdraw-accent: #64748b;
    padding: 13px 15px;
    border-bottom: 1px solid #e9edf4;
    transition: background 0.18s ease;
}
.withdrawal-request-row:last-of-type { border-bottom: 0; }
.withdrawal-request-row:hover { background: #fbfcff; }
.withdrawal-request-row.is-pending { --withdraw-accent: #f59e0b; }
.withdrawal-request-row.is-approved { --withdraw-accent: #3b82f6; }
.withdrawal-request-row.is-completed { --withdraw-accent: #10b981; }
.withdrawal-request-row.is-rejected,
.withdrawal-request-row.is-cancelled { --withdraw-accent: #ef4444; }
.withdrawal-request-row[hidden] { display: none !important; }
.withdrawal-member-copy > h3 {
    margin: 0 0 2px;
    color: #172554;
    font-size: 12px;
    font-weight: 800;
}
.withdrawal-member-copy > strong {
    color: #6366f1;
    font-size: 10px;
    font-weight: 700;
}
.withdrawal-member-email { display: block; margin-top: 2px; color: #64748b; font-size: 10px; overflow-wrap: anywhere; }
.withdrawal-extra-details { margin-top: 4px; color: #64748b; font-size: 10px; }
.withdrawal-extra-details summary { width: fit-content; color: #4f46e5; cursor: pointer; font-weight: 700; }
.withdrawal-extra-details > div,
.withdrawal-extra-details > p { margin: 4px 0 0; color: #475569; font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
.withdrawal-account-details summary { color: #334155; }
.withdrawal-row-member .withdrawal-member { gap: 9px; }
.withdrawal-row-member .withdrawal-avatar { flex-basis: 34px; width: 34px; height: 34px; border-radius: 10px; font-size: 14px; }
.withdrawal-row-amount {
    display: grid;
    justify-items: start;
    gap: 4px;
    min-width: 0;
}
.withdrawal-row-amount > strong {
    color: #047857;
    font-size: clamp(13px, 1.25vw, 18px);
    font-weight: 850;
    letter-spacing: -0.03em;
    line-height: 1.15;
    white-space: nowrap;
}
.withdrawal-row-amount > time {
    color: #64748b;
    font-size: 9px;
    line-height: 1.4;
}
.withdrawal-row-payout {
    display: grid;
    gap: 5px;
    min-width: 0;
}
.withdrawal-row-payout > div {
    min-width: 0;
}
.withdrawal-row-payout > div > strong {
    color: #1e293b;
    font-size: 10px;
    font-weight: 750;
}
.withdrawal-payout-method { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 7px; }
.withdrawal-payout-method .withdrawal-detail-label { display: inline; margin: 0; font-size: 8px; }
.withdrawal-row-payout p {
    margin: 0;
    color: #334155;
    font-size: 10px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.withdrawal-row-status {
    display: grid;
    justify-items: start;
    gap: 9px;
    min-width: 0;
}
.withdrawal-status {
    border-color: #cbd5e1;
    background: #f1f5f9;
    color: #475569;
}
.withdrawal-status.is-pending { border-color: #fed7aa; background: #fff7ed; color: #b45309; }
.withdrawal-status.is-approved { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
.withdrawal-status.is-completed { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
.withdrawal-status.is-rejected,
.withdrawal-status.is-cancelled { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.withdrawal-action-form {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    margin: 0;
    padding: 0;
    border: 0;
}
.withdrawal-note-field { gap: 3px; }
.withdrawal-note-field > span { font-size: 10px; }
.withdrawal-note-field small { display: block; margin: 2px 0 0; }
.withdrawal-note-field input { min-height: 32px; padding: 6px 8px; font-size: 10px; }
.withdrawal-actions { width: 100%; gap: 6px; }
.withdrawal-action-button { flex: 1 1 0; min-width: 0; min-height: 31px; padding: 6px 7px; font-size: 9px; }
.withdrawal-resolution {
    display: grid;
    justify-content: stretch;
    width: 100%;
    gap: 5px;
    margin: 0;
    padding: 9px 10px;
    background: #f8fafc;
}
.withdrawal-resolution .withdrawal-detail-label { margin-bottom: 0; }
.withdrawal-resolution p { font-size: 11px; }
.withdrawal-resolution time { font-size: 10px; }
.withdrawal-filter-empty {
    margin: 0;
    padding: 24px;
    color: #64748b;
    font-size: 13px;
    text-align: center;
}
.withdrawal-filter-empty[hidden] { display: none !important; }
@media (max-width: 1100px) {
    .withdrawal-list-heading { display: none; }
    .withdrawal-search-fields { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
    .withdrawal-search-fields .withdrawal-date-preset { grid-column: 1 / -1; }
    .withdrawal-request-row { grid-template-columns: minmax(0, 1fr) minmax(140px, 0.55fr); }
    .withdrawal-row-payout,
    .withdrawal-row-status { grid-column: 1 / -1; }
    .withdrawal-row-payout { grid-template-columns: minmax(150px, 0.65fr) minmax(0, 1.35fr); gap: 16px; }
    .withdrawal-row-status { grid-template-columns: minmax(90px, auto) minmax(0, 1fr); align-items: start; }
    .withdrawal-action-form { grid-template-columns: minmax(0, 1fr) auto; }
    .withdrawal-actions { width: auto; }
    .withdrawal-action-button { flex: 0 1 auto; min-width: 88px; }
}
@media (max-width: 760px) {
    .withdrawal-count-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .withdrawal-count-card { min-height: 112px; }
    .withdrawal-overview-filter { align-items: flex-start; flex-direction: column; }
    .withdrawal-filter-options { justify-content: flex-start; }
    .withdrawal-filter-controls { width: 100%; }
    .withdrawal-search-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .withdrawal-custom-dates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .withdrawal-request-row { grid-template-columns: minmax(0, 1fr) minmax(120px, 0.55fr); gap: 14px; }
    .withdrawal-row-payout { grid-template-columns: minmax(0, 1fr); }
    .withdrawal-row-status { grid-template-columns: minmax(0, 1fr); }
    .withdrawal-action-form { grid-template-columns: minmax(0, 1fr); }
    .withdrawal-actions { width: 100%; }
    .withdrawal-action-button { flex: 1 1 0; }
}
@media (max-width: 480px) {
    .withdrawal-count-grid { gap: 9px; }
    .withdrawal-count-card { min-height: 104px; padding: 14px; }
    .withdrawal-count-card > strong { font-size: 25px; }
    .withdrawal-request-row { grid-template-columns: minmax(0, 1fr); padding: 16px; }
    .withdrawal-row-payout,
    .withdrawal-row-status { grid-column: auto; }
    .withdrawal-filter-options { gap: 6px; }
    .withdrawal-filter-button { min-height: 34px; padding: 6px 8px; font-size: 10px; }
    .withdrawal-search-fields { grid-template-columns: minmax(0, 1fr); }
    .withdrawal-search-fields .withdrawal-date-preset { grid-column: auto; }
    .withdrawal-custom-dates { grid-template-columns: minmax(0, 1fr); }
    .withdrawal-filter-footer { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
    .withdrawal-count-card { animation: none !important; transition: none !important; }
    .withdrawal-count-card:hover,
    .withdrawal-filter-button:hover { transform: none; }
    .withdrawal-count-card::before { display: none; }
}
.withdrawal-table-wrap {
    max-width: 100%;
    margin: 0;
    border-radius: 12px;
    box-shadow: 0 8px 20px -18px rgba(15, 23, 42, 0.72);
}
.withdrawal-table {
    width: 100%;
    min-width: 1180px;
    table-layout: fixed;
    font-size: 12px;
}
.withdrawal-table th {
    padding: 10px 11px;
    font-size: 10px;
    letter-spacing: 0.06em;
}
.withdrawal-table th:nth-child(1) { width: 22%; }
.withdrawal-table th:nth-child(2) { width: 14%; }
.withdrawal-table th:nth-child(3) { width: 20%; }
.withdrawal-table th:nth-child(4) { width: 13%; }
.withdrawal-table th:nth-child(5) { width: 11%; }
.withdrawal-table th:nth-child(6) { width: 20%; }
.withdrawal-table td {
    padding: 10px 11px;
    font-size: 12px;
    line-height: 1.4;
    vertical-align: middle;
}
.withdrawal-table tbody tr[data-withdrawal-status]:hover td { background: #f8faff; }
.withdrawal-table tbody tr[hidden] { display: none !important; }
.withdrawal-table-member {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}
.withdrawal-table-avatar {
    display: grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 9px;
    background: linear-gradient(145deg, #6366f1, #0891b2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38);
    color: #fff;
    font-size: 14px;
    font-weight: 850;
}
.withdrawal-table-member-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.withdrawal-table-member-copy > strong {
    overflow: hidden;
    color: #172554;
    font-size: 13px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.withdrawal-table-member-copy > small {
    color: #64748b;
    font-size: 11px;
    overflow-wrap: anywhere;
}
.withdrawal-table-member-copy > small:first-of-type { color: #4f46e5; font-weight: 700; }
.withdrawal-table-email { max-width: 200px; }
.withdrawal-table-amount {
    display: block;
    color: #047857;
    font-size: 14px;
    font-weight: 850;
    white-space: nowrap;
}
.withdrawal-table-id,
.withdrawal-table-time {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 10px;
}
.withdrawal-table-method {
    display: block;
    margin-bottom: 4px;
    color: #1e293b;
    font-size: 12px;
    font-weight: 750;
    overflow-wrap: anywhere;
}
.withdrawal-table-details {
    color: #64748b;
    font-size: 11px;
}
.withdrawal-table-details summary {
    width: fit-content;
    color: #4f46e5;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
}
.withdrawal-table-details > span {
    display: block;
    max-width: 260px;
    margin-top: 4px;
    color: #475569;
    font-size: 11px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.withdrawal-table-date { color: #334155; font-size: 11px; white-space: nowrap; }
.withdrawal-table .withdrawal-status { padding: 5px 8px; font-size: 11px; }
.withdrawal-action-result {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}
.withdrawal-action-result::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.withdrawal-action-result.is-approved,
.withdrawal-action-result.is-completed {
    background: #ecfdf5;
    color: #047857;
}
.withdrawal-action-result.is-rejected,
.withdrawal-action-result.is-cancelled {
    background: #fef2f2;
    color: #b91c1c;
}
.withdrawal-action-result:not(.is-approved):not(.is-completed):not(.is-rejected):not(.is-cancelled) {
    background: #f1f5f9;
    color: #475569;
}
.withdrawal-status.is-pending { border-color: #fed7aa; background: #fff7ed; color: #b45309; }
.withdrawal-status.is-approved { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
.withdrawal-status.is-completed { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
.withdrawal-status.is-rejected,
.withdrawal-status.is-cancelled { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.withdrawal-table-action-form {
    display: grid;
    gap: 5px;
    min-width: 0;
}
.withdrawal-table-action-form > input[type="text"] {
    width: 100%;
    min-width: 0;
    height: 33px;
    padding: 6px 8px;
    border: 1px solid #dbe3ee;
    border-radius: 7px;
    background: #fff;
    color: #1e293b;
    font: inherit;
    font-size: 11px;
}
.withdrawal-table-action-form > span { display: flex; gap: 5px; }
.withdrawal-table-button {
    flex: 1 1 0;
    min-width: 0;
    min-height: 31px;
    padding: 6px 8px;
    border: 0;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}
.withdrawal-table-button.is-approve { background: linear-gradient(135deg, #10b981, #047857); }
.withdrawal-table-button.is-reject { background: linear-gradient(135deg, #f87171, #dc2626); }
.withdrawal-table-details + .withdrawal-table-details { margin-top: 5px; }
.payment-count-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.payment-table {
    min-width: 1240px;
}
.payment-table th:nth-child(1) { width: 19%; }
.payment-table th:nth-child(2) { width: 16%; }
.payment-table th:nth-child(3) { width: 13%; }
.payment-table th:nth-child(4) { width: 17%; }
.payment-table th:nth-child(5) { width: 8%; }
.payment-table th:nth-child(6) { width: 9%; }
.payment-table th:nth-child(7) { width: 10%; }
.payment-table th:nth-child(8) { width: 8%; }
.payment-table tbody tr[data-payment-status]:hover td { background: #f8faff; }
.payment-table tbody tr[hidden] { display: none !important; }
.payment-table-username,
.payment-table-package {
    display: block;
    color: #172554;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.payment-table-email,
.payment-table-slug,
.payment-table-method,
.payment-table-trx > small {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 10px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.payment-table-slug { color: #6366f1; }
.payment-table-amount {
    display: block;
    color: #047857;
    font-size: 13px;
    font-weight: 850;
    white-space: nowrap;
}
.payment-table-method { color: #475569; }
.payment-table-trx {
    font-size: 11px !important;
    overflow-wrap: anywhere;
}
.payment-table-trx::after { display: none; }
.payment-receipt-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #4f46e5;
    font-size: 10px;
    font-weight: 750;
    text-decoration: none;
}
.payment-receipt-link img {
    display: block;
    width: 58px;
    height: 58px;
    object-fit: contain;
    background: #f8fafc;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
}
.payment-table-actions { display: grid; gap: 5px; }
.payment-table-actions .withdrawal-table-button {
    width: 100%;
    max-width: 112px;
    min-height: 27px;
    justify-self: start;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: .1px;
}
.payment-rejection-reason {
    display: block;
    max-width: 220px;
    margin-top: 6px;
    color: #991b1b;
    font-size: 11px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.payment-reject-modal {
    position: fixed;
    z-index: 12000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
}
.payment-reject-modal[hidden] { display: none !important; }
.payment-reject-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.66);
    backdrop-filter: blur(5px);
}
.payment-reject-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 480px);
    padding: 26px;
    border: 1px solid rgba(254, 202, 202, 0.9);
    border-radius: 20px;
    background: linear-gradient(145deg, #fff 0%, #fff7f7 100%);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.3);
}
.payment-reject-kicker {
    color: #dc2626;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.14em;
}
.payment-reject-dialog h3 {
    margin: 8px 0;
    color: #7f1d1d;
    font-size: 21px;
}
.payment-reject-dialog h3 span { color: #dc2626; }
.payment-reject-dialog > p {
    margin: 0 0 18px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.55;
}
.payment-reject-dialog label {
    display: block;
    margin-bottom: 7px;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
}
.payment-reject-dialog textarea {
    display: block;
    width: 100%;
    min-height: 112px;
    padding: 12px 14px;
    resize: vertical;
    border: 1px solid #fecaca;
    border-radius: 12px;
    background: #fff;
    color: #1e293b;
    font: inherit;
    font-size: 13px;
    line-height: 1.5;
    outline: none;
}
.payment-reject-dialog textarea:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}
.payment-reject-error {
    margin: 8px 0 0 !important;
    color: #b91c1c !important;
    font-size: 12px !important;
    font-weight: 700;
}
.payment-reject-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 20px;
}
.payment-reject-actions button {
    min-height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 10px;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}
.payment-reject-cancel { background: #f1f5f9; color: #475569; }
.payment-reject-confirm {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #fff;
    box-shadow: 0 5px 14px rgba(185, 28, 28, 0.25);
}
.payment-reject-actions button:disabled { opacity: 0.65; cursor: wait; }
body.payment-reject-open { overflow: hidden; }
@media (max-width: 760px) {
    .payment-count-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
    .payment-count-grid { grid-template-columns: minmax(0, 1fr); }
    .payment-reject-dialog { padding: 21px; }
    .payment-reject-actions { flex-direction: column-reverse; }
    .payment-reject-actions button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .withdrawal-table-button { transition: none !important; }
}
.admin-overview .overview-section,
.overview-extra-summary {
    position: relative;
    margin: 0;
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 30px -25px rgba(15, 23, 42, 0.34);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.admin-overview .overview-section:hover,
.overview-extra-summary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 32px -25px rgba(30, 64, 175, 0.38);
}
.admin-overview .overview-section h3,
.overview-extra-summary h3 {
    margin: 0;
    padding: 0 0 13px;
    border-bottom: 1px solid #e9edf5;
    color: #172554;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.25px;
}
.overview-package-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 16px;
    margin-top: 16px;
}
.overview-insights-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}
.overview-chart-panel {
    min-width: 0;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    background: linear-gradient(155deg, #fbfcff 0%, #f7f9fd 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.overview-chart-panel h4 {
    margin: 0 0 15px !important;
    color: #26345b !important;
    font-size: 14px !important;
    font-weight: 800 !important;
}
.overview-package-bars,
.overview-income-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.overview-bar-row {
    display: grid;
    grid-template-columns: minmax(88px, 0.85fr) minmax(0, 1.5fr) minmax(42px, auto);
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.overview-bar-label {
    overflow-wrap: anywhere;
    color: #526078;
    font-size: 11px;
    font-weight: 700;
}
.overview-bar-track {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8edf5;
}
.overview-bar-fill {
    height: 100%;
    min-width: 3px;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--bar-color), color-mix(in srgb, var(--bar-color) 52%, white));
    transition: width 0.35s ease;
}
.overview-bar-count {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    color: #34415d;
    font-size: 11px;
    line-height: 1.1;
    text-align: right;
}
.overview-bar-count strong {
    font-size: 11px;
    font-weight: 800;
}
.overview-bar-count small {
    color: #7b879b;
    font-size: 9px;
    font-weight: 700;
}
.overview-package-breakdown .pie-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px !important;
}
.overview-legend-item {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 10px;
    border: 1px solid #edf0f6;
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 5px 12px -10px rgba(15, 23, 42, 0.35);
}
.overview-package-dot {
    flex: 0 0 10px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bar-color);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--bar-color) 12%, white);
}
.overview-package-breakdown .overview-legend-item > div:last-child {
    min-width: 0;
}
.overview-package-breakdown .overview-legend-item > div:last-child > div:first-child {
    overflow-wrap: anywhere;
    color: #334155 !important;
    font-size: 11px !important;
    font-weight: 750 !important;
}
.overview-package-breakdown .overview-legend-item > div:last-child > div:last-child {
    margin-top: 3px;
    color: #7b879b !important;
    font-size: 10px !important;
}
.overview-income-row {
    grid-template-columns: minmax(82px, 0.9fr) minmax(0, 1.4fr) minmax(62px, auto);
}
.overview-income-amount {
    color: #07866f;
}
.overview-activation-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.overview-activation-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 142px;
    padding: 14px;
    border: 1px solid #e9edf5;
    border-radius: 14px;
    background: #fff;
    text-align: center;
}
.overview-activation-count {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
    border-radius: 15px;
    background: color-mix(in srgb, var(--status-color) 13%, white);
    color: var(--status-color);
    font-size: 17px;
    font-weight: 850;
}
.overview-activation-card > div:nth-child(2) {
    color: #334155 !important;
    font-size: 12px !important;
    font-weight: 750 !important;
}
.overview-activation-card > div:nth-child(3) {
    margin-top: 3px;
    color: #7b879b !important;
    font-size: 10px !important;
}
.overview-registration-bars {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    align-items: end;
    gap: 9px;
    height: 190px;
    padding-top: 10px;
}
.overview-registration-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    height: 100%;
    min-width: 0;
}
.overview-registration-bar {
    width: min(100%, 28px);
    height: var(--bar-height);
    min-height: 7px;
    border-radius: 8px 8px 3px 3px;
    background: linear-gradient(180deg, #fbbf24, #f97316);
    box-shadow: 0 5px 12px -7px rgba(234, 88, 12, 0.65);
}
.overview-registration-item span {
    color: #748198 !important;
    font-size: 9px !important;
    white-space: nowrap;
}
.overview-registration-item span:last-child {
    color: #34415d !important;
    font-weight: 800 !important;
}
.overview-table-wrap {
    border: 1px solid #e8edf4;
    border-radius: 14px;
    background: #fff;
}
.overview-table {
    min-width: 780px;
}
.overview-table th {
    border: 0 !important;
    background: #f2f5fa !important;
    color: #526078 !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}
.overview-table th:first-child { border-radius: 12px 0 0 0; }
.overview-table th:last-child { border-radius: 0 12px 0 0; }
.overview-table td {
    border-bottom: 1px solid #edf0f5 !important;
    color: #475569;
    font-size: 12px;
}
.overview-table tbody tr:hover td {
    background: #f8faff !important;
}
.overview-extra-summary {
    margin-top: 20px;
}
@media (max-width: 1380px) {
    .admin-overview .overview-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .overview-insights-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .overview-package-grid { grid-template-columns: minmax(0, 1fr); }
    .overview-insights-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .admin-overview { gap: 15px; }
    .overview-intro {
        align-items: flex-start;
        flex-direction: column;
        min-height: 0;
        padding: 21px;
    }
    .overview-intro-date { min-width: 0; }
    .admin-overview .overview-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .admin-overview .overview-stat-grid .stat-card { min-height: 100px; padding: 13px; gap: 10px; }
    .admin-overview .overview-stat-grid .stat-icon { flex-basis: 38px; width: 38px; height: 38px; }
    .admin-overview .overview-stat-grid .stat-icon svg { width: 18px; height: 18px; }
    .admin-overview .overview-section,
    .overview-extra-summary { padding: 17px; border-radius: 17px; }
    .overview-insights-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
    .admin-overview .overview-stat-grid .stat-card { min-height: 88px; padding: 11px; gap: 8px; }
    .admin-overview .overview-stat-grid .stat-icon { flex-basis: 34px; width: 34px; height: 34px; border-radius: 11px; }
    .admin-overview .overview-stat-grid .stat-icon svg { width: 16px; height: 16px; }
    .admin-overview .overview-stat-grid .stat-value { font-size: 17px; }
    .admin-overview .overview-stat-grid .stat-label { font-size: 8px; letter-spacing: 0.45px; }
    .overview-chart-panel { padding: 14px; }
    .overview-package-breakdown .pie-legend { grid-template-columns: minmax(0, 1fr) !important; }
    .overview-bar-row { grid-template-columns: minmax(72px, 0.8fr) minmax(0, 1.2fr) 38px; gap: 7px; }
    .overview-income-row { grid-template-columns: minmax(68px, 0.8fr) minmax(0, 1.2fr) 55px; }
}

/* ---- Owner-only financial snapshot ------------------------------------- */
.owner-finance-panel {
    position: relative;
    overflow: hidden;
    padding: 23px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 21px;
    background:
        radial-gradient(circle at 96% 0%, rgba(129, 140, 248, 0.13), transparent 30%),
        linear-gradient(145deg, #f8faff 0%, #fff 52%, #f7fbff 100%);
    box-shadow: 0 16px 34px -27px rgba(49, 46, 129, 0.42);
}
.owner-finance-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 22px;
    right: 22px;
    height: 4px;
    border-radius: 0 0 99px 99px;
    background: linear-gradient(90deg, #4f46e5, #0ea5e9, #14b8a6);
}
.owner-finance-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}
.owner-finance-eyebrow {
    color: #6366f1;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 1.4px;
}
.owner-finance-heading h3 {
    margin: 5px 0 4px;
    color: #172554;
    font-size: 19px;
    font-weight: 850;
}
.owner-finance-heading p {
    margin: 0;
    color: #64748b;
    font-size: 12px;
}
.owner-only-badge {
    flex: 0 0 auto;
    padding: 7px 10px;
    border: 1px solid rgba(99, 102, 241, 0.16);
    border-radius: 999px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 10px;
    font-weight: 800;
}
.owner-finance-result {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-bottom: 15px;
    padding: 16px 18px;
    border: 1px solid rgba(16, 185, 129, 0.17);
    border-radius: 16px;
    background: linear-gradient(110deg, #ecfdf5, #f0fdfa);
}
.owner-finance-result.is-negative {
    border-color: rgba(239, 68, 68, 0.18);
    background: linear-gradient(110deg, #fff1f2, #fff7ed);
}
.owner-finance-result > span {
    color: #047857;
    font-size: 12px;
    font-weight: 800;
}
.owner-finance-result.is-negative > span { color: #b91c1c; }
.owner-finance-result > strong {
    color: #047857;
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 900;
    letter-spacing: -0.7px;
}
.owner-finance-result.is-negative > strong { color: #b91c1c; }
.owner-finance-result > small {
    flex: 1 1 100%;
    color: #64748b;
    font-size: 10px;
}
.owner-finance-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.owner-finance-summary-item {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid #e6eaf3;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.92);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}
.owner-finance-summary-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
}
.owner-finance-summary-item:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -12px rgba(15,23,42,.35); }
/* Cash received - green */
.owner-finance-summary-item:nth-child(1) {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border-color: #a7f3d0;
}
.owner-finance-summary-item:nth-child(1)::before { background: linear-gradient(90deg, #10b981, #34d399); }
.owner-finance-summary-item:nth-child(1) > span { color: #047857; }
.owner-finance-summary-item:nth-child(1) > strong { color: #065f46; }
.owner-finance-summary-item:nth-child(1) > small { color: #047857; }
/* Paid to users - red */
.owner-finance-summary-item:nth-child(2) {
    background: linear-gradient(135deg, #fff1f2, #ffe4e6);
    border-color: #fecdd3;
}
.owner-finance-summary-item:nth-child(2)::before { background: linear-gradient(90deg, #ef4444, #f87171); }
.owner-finance-summary-item:nth-child(2) > span { color: #be123c; }
.owner-finance-summary-item:nth-child(2) > strong { color: #9f1239; }
.owner-finance-summary-item:nth-child(2) > small { color: #be123c; }
/* Still owed to users - amber/orange */
.owner-finance-summary-item:nth-child(3) {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border-color: #fcd34d;
}
.owner-finance-summary-item:nth-child(3)::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.owner-finance-summary-item:nth-child(3) > span { color: #b45309; }
.owner-finance-summary-item:nth-child(3) > strong { color: #92400e; }
.owner-finance-summary-item:nth-child(3) > small { color: #b45309; }
.owner-finance-summary-item > span {
    color: #64748b;
    font-size: 10px;
    font-weight: 750;
}
.owner-finance-summary-item > strong {
    color: #26345b;
    font-size: clamp(15px, 1.5vw, 19px);
    font-weight: 850;
    overflow-wrap: anywhere;
}
.owner-finance-summary-item > small {
    color: #8792a5;
    font-size: 9px;
    line-height: 1.4;
}
.owner-finance-formula {
    margin: 11px 0 0;
    padding: 10px 13px;
    border-radius: 10px;
    background: #eef2ff;
    color: #4b5680;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}
.owner-finance-formula b {
    padding: 0 4px;
    color: #4f46e5;
    font-size: 13px;
}
.owner-finance-details {
    margin-top: 11px;
    border: 1px solid #e6eaf3;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
}
.owner-finance-details > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 13px;
    color: #4f46e5;
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
    list-style: none;
}
.owner-finance-details > summary::-webkit-details-marker { display: none; }
.owner-finance-details > summary::after {
    content: "+";
    font-size: 16px;
    line-height: 1;
}
.owner-finance-details[open] > summary::after { content: "-"; }
.owner-finance-details[open] > summary { border-bottom: 1px solid #e9edf5; }
.owner-finance-breakdown {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    padding: 12px;
}
.owner-finance-line {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    padding: 11px 13px 11px 30px;
    border: 1px solid #e9edf5;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.88);
    transition: transform .2s ease, box-shadow .2s ease;
}
.owner-finance-line::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(255,255,255,.6);
}
.owner-finance-line:hover { transform: translateY(-1px); box-shadow: 0 6px 14px -8px rgba(15,23,42,.35); }
.owner-finance-line > span {
    min-width: 0;
    color: #526078;
    font-size: 11px;
    line-height: 1.35;
}
.owner-finance-line > strong {
    flex: 0 0 auto;
    color: #26345b;
    font-size: 11px;
    font-weight: 850;
    text-align: right;
}
.owner-finance-line.is-positive {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border-color: #a7f3d0;
}
.owner-finance-line.is-positive::before { background: #10b981; }
.owner-finance-line.is-positive > strong { color: #047857; }
.owner-finance-line.is-positive > span { color: #065f46; }
.owner-finance-line.is-negative {
    background: linear-gradient(135deg, #fff1f2, #ffe4e6);
    border-color: #fecdd3;
}
.owner-finance-line.is-negative::before { background: #ef4444; }
.owner-finance-line.is-negative > strong { color: #be123c; }
.owner-finance-line.is-negative > span { color: #9f1239; }
.owner-finance-line.is-neutral {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-color: #bfdbfe;
}
.owner-finance-line.is-neutral::before { background: #3b82f6; }
.owner-finance-line.is-neutral > strong { color: #1d4ed8; }
.owner-finance-line.is-neutral > span { color: #1e40af; }
.owner-finance-line.is-untracked {
    border-style: dashed;
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border-color: #fcd34d;
}
.owner-finance-line.is-untracked::before { background: #f59e0b; }
.owner-finance-line.is-untracked > strong {
    color: #b45309;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.15);
}
.owner-finance-line.is-untracked > span { color: #92400e; }
.owner-finance-note {
    margin: 13px 0 0;
    padding: 10px 12px;
    border-left: 3px solid #818cf8;
    border-radius: 0 9px 9px 0;
    background: rgba(238, 242, 255, 0.72);
    color: #58657d;
    font-size: 10px;
    line-height: 1.55;
}
.owner-finance-error {
    margin: 0;
    padding: 14px;
    border-radius: 12px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 12px;
}
@media (max-width: 700px) {
    .owner-finance-panel { padding: 18px; border-radius: 18px; }
    .owner-finance-heading { flex-direction: column; }
}
@media (max-width: 520px) {
    .owner-finance-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .owner-finance-summary-item:last-child { grid-column: 1 / -1; }
    .owner-finance-breakdown { grid-template-columns: minmax(0, 1fr); }
    .owner-finance-result { align-items: flex-start; flex-direction: column; gap: 5px; }
}
.pm-visibility-badge {
    display: inline-flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
}
.pm-visibility-badge.is-visible {
    background: #dcfce7;
    color: #166534;
}
.pm-visibility-badge.is-hidden {
    background: #fee2e2;
    color: #991b1b;
}
.pm-visibility-form { margin-top: 8px; }
.pm-visibility-toggle {
    width: 100%;
    min-height: 38px;
    padding: 7px 10px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 850;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.pm-visibility-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(15, 23, 42, 0.16);
}
.pm-visibility-toggle:focus-visible {
    outline: 3px solid rgba(30, 41, 59, 0.5);
    outline-offset: 3px;
}
.pm-visibility-toggle.is-hide { background: linear-gradient(135deg, #a16207, #78350f); }
.pm-visibility-toggle.is-show { background: linear-gradient(135deg, #10b981, #047857); }
.pm-logo-upload-row {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: start;
    gap: 16px;
}
.pm-logo-preview { margin: 0; }
.pm-logo-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    justify-items: start;
    gap: 8px;
    min-width: 0;
}
.pm-logo-controls input[type="file"] {
    display: block;
    min-height: 42px;
    margin: 0;
}
.pm-logo-remove {
    display: flex !important;
    align-items: center;
    gap: 7px;
    margin: 0 !important;
    color: #64748b;
    font-size: 12px;
    line-height: 1.3;
    cursor: pointer;
}
.pm-logo-remove input { flex: 0 0 auto; margin: 0; }
.pm-logo-hint {
    display: block;
    margin: 0 !important;
    color: #64748b;
    font-size: 11px;
    line-height: 1.4;
}
@media (max-width: 520px) {
    .pm-logo-upload-row {
        grid-template-columns: 56px minmax(0, 1fr);
        gap: 12px;
    }
    .pm-logo-preview { width: 56px !important; height: 56px !important; }
}
.investment-active-field {
    display: flex;
    align-items: center;
    transform: translateY(4px);
}
.investment-active-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    width: max-content;
    min-height: 42px;
    margin: 0 !important;
    padding: 0 12px;
    border: 1px solid #c7d2fe;
    border-radius: 10px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    cursor: pointer;
}
.investment-active-label input[type="checkbox"] {
    flex: 0 0 18px;
    margin: 0;
}
.investment-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
    padding: 25px 28px;
    border: 1px solid rgba(199, 210, 254, 0.42);
    border-radius: 20px;
    background:
        radial-gradient(circle at 88% 10%, rgba(129, 140, 248, 0.38), transparent 32%),
        linear-gradient(125deg, #111827, #312e81 58%, #4338ca);
    box-shadow: 0 18px 32px -24px rgba(67, 56, 202, 0.82), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.investment-hero-kicker {
    color: #c7d2fe;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.16em;
}
.investment-hero h2 {
    margin: 7px 0 5px;
    color: #fff;
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 850;
    line-height: 1.15;
}
.investment-hero p {
    margin: 0;
    color: rgba(238, 242, 255, 0.86);
    font-size: 13px;
}
.investment-hero-aside {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 14px;
}
.investment-hero-invested {
    display: grid;
    gap: 4px;
    min-width: 170px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
}
.investment-hero-invested span {
    color: rgba(238, 242, 255, 0.78);
    font-size: 10px;
    font-weight: 700;
}
.investment-hero-invested strong {
    color: #fff;
    font-size: 18px;
    font-weight: 850;
    overflow-wrap: anywhere;
}
.investment-hero-invested small {
    color: rgba(238, 242, 255, 0.72);
    font-size: 10px;
}
.investment-hero-action {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 8px 14px 8px 17px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 6px 0 rgba(2, 44, 34, 0.45), 0 12px 24px -16px rgba(0, 0, 0, 0.7);
    color: #3730a3;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.investment-hero-action span {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 7px;
    background: #e0e7ff;
    font-size: 18px;
    line-height: 1;
}
.investment-hero-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 rgba(2, 44, 34, 0.45), 0 16px 26px -16px rgba(0, 0, 0, 0.7);
}
.investment-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 18px;
}
.investment-summary-card { min-height: 116px; }
.investment-summary-card > span,
.investment-summary-card > small {
    color: #fff;
    text-shadow: 0 1px 3px rgba(15, 23, 42, 0.3);
}
.investment-summary-card > strong {
    font-size: clamp(18px, 2.2vw, 27px);
    overflow-wrap: anywhere;
}
.investment-summary-grid .is-approved {
    --withdraw-start: #38bdf8;
    --withdraw-end: #2563eb;
    --withdraw-shadow: rgba(29, 78, 216, 0.78);
}
.investment-summary-grid .is-completed {
    --withdraw-start: #60a5fa;
    --withdraw-end: #2563eb;
    --withdraw-shadow: rgba(29, 78, 216, 0.78);
}
.investment-summary-grid .is-rejected {
    --withdraw-start: #fb7185;
    --withdraw-end: #be123c;
    --withdraw-shadow: rgba(159, 18, 57, 0.78);
}
.investment-summary-grid .is-pending {
    --withdraw-start: #fbbf24;
    --withdraw-end: #d97706;
    --withdraw-shadow: rgba(180, 83, 9, 0.78);
}
.investment-summary-invested {
    --withdraw-start: #a78bfa;
    --withdraw-end: #6d28d9;
    --withdraw-shadow: rgba(109, 40, 217, 0.78);
}
.investment-summary-daily {
    --withdraw-start: #22d3ee;
    --withdraw-end: #0e7490;
    --withdraw-shadow: rgba(14, 116, 144, 0.78);
}
.investment-overview-filter { margin-bottom: 22px; }
.investment-overview-filter .withdrawal-filter-copy > span { color: #4f46e5; }
.investment-overview-filter .withdrawal-filter-field input:focus,
.investment-overview-filter .withdrawal-filter-field select:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}
.investment-overview-filter .withdrawal-filter-button.is-active {
    border-color: #4f46e5;
    background: linear-gradient(135deg, #6366f1, #4338ca);
    box-shadow: 0 5px 12px -8px rgba(67, 56, 202, 0.9);
}
.investment-overview-filter .withdrawal-filter-button:hover { border-color: #a5b4fc; }
.investment-filter-empty {
    margin-top: 16px;
    border-color: #c7d2fe;
    background: #eef2ff;
    color: #3730a3;
}
.inv-plan-card[hidden] { display: none !important; }
.investment-plan-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: auto;
}
.investment-plan-actions form { min-width: 0; margin: 0; }
.investment-amount-fit {
    display: block;
    width: 100%;
    max-width: 100%;
    white-space: nowrap;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}
.investment-plan-visibility-toggle.is-hide {
    color: #fff;
    font-weight: 750;
    text-shadow: 0 1px 3px rgba(2, 6, 23, 0.62);
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: 0 4px 0 #92400e, 0 10px 18px -10px rgba(180, 83, 9, 0.5);
}
.investment-plan-visibility-toggle.is-show {
    color: #fff;
    font-weight: 750;
    text-shadow: 0 1px 3px rgba(2, 6, 23, 0.62);
    background: linear-gradient(135deg, #818cf8, #4338ca);
    box-shadow: 0 4px 0 #3730a3, 0 10px 18px -10px rgba(67, 56, 202, 0.5);
}
@media (max-width: 760px) {
    .investment-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .investment-overview-filter .withdrawal-search-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .investment-hero-aside { width: 100%; justify-content: space-between; flex-wrap: wrap; }
}
@media (max-width: 520px) {
    .investment-hero { align-items: flex-start; flex-direction: column; padding: 21px; }
    .investment-hero-aside { align-items: stretch; flex-direction: column; }
    .investment-hero-invested { width: 100%; }
    .investment-summary-grid { gap: 9px; }
    .investment-summary-card { min-height: 104px; }
    .investment-overview-filter .withdrawal-search-fields { grid-template-columns: minmax(0, 1fr); }
    .investment-active-field { transform: none; }
}

/* Keep the admin stat cards consistent with the withdrawal summary cards. */
.withdrawal-summary-style { gap: 12px; }
.withdrawal-summary-style .hero3d-card.withdrawal-count-card {
    min-height: 116px;
    padding: 16px 18px;
    border-radius: 15px;
}
.withdrawal-summary-style .hero3d-card::after,
.withdrawal-summary-style .hero3d-icon {
    display: none;
}
.withdrawal-summary-style .hero3d-value {
    color: #fff;
    font-size: 30px;
    line-height: 1.1;
    font-weight: 850;
    text-shadow: 0 2px 8px rgba(2, 6, 23, 0.62), 0 1px 2px rgba(2, 6, 23, 0.55);
}
.withdrawal-summary-style .hero3d-label {
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
    text-shadow: 0 1px 4px rgba(2, 6, 23, 0.68), 0 1px 1px rgba(2, 6, 23, 0.55);
}
.withdrawal-summary-style .hero3d-sub {
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-shadow: 0 1px 4px rgba(2, 6, 23, 0.7), 0 1px 1px rgba(2, 6, 23, 0.55);
}
.withdrawal-summary-style .hero3d-card.is-text .hero3d-value {
    font-size: clamp(16px, 1.7vw, 22px);
    overflow-wrap: anywhere;
}
.withdrawal-count-card.is-stat-indigo {
    --withdraw-start: #6366f1;
    --withdraw-end: #06b6d4;
    --withdraw-shadow: rgba(67, 56, 202, 0.78);
}
.withdrawal-count-card.is-stat-green {
    --withdraw-start: #059669;
    --withdraw-end: #34d399;
    --withdraw-shadow: rgba(4, 120, 87, 0.78);
}
.withdrawal-count-card.is-stat-amber {
    --withdraw-start: #d97706;
    --withdraw-end: #fbbf24;
    --withdraw-shadow: rgba(180, 83, 9, 0.78);
}
.withdrawal-count-card.is-stat-blue {
    --withdraw-start: #1e3a8a;
    --withdraw-end: #2563eb;
    --withdraw-shadow: rgba(29, 78, 216, 0.78);
}
.withdrawal-count-card.is-stat-pink {
    --withdraw-start: #be185d;
    --withdraw-end: #ec4899;
    --withdraw-shadow: rgba(190, 24, 93, 0.78);
}
.withdrawal-count-card.is-stat-teal {
    --withdraw-start: #0e7490;
    --withdraw-end: #14b8a6;
    --withdraw-shadow: rgba(14, 116, 144, 0.78);
}

/* Reuse the same lifted, reflective 3D surface on admin detail cards. */
.withdrawal-detail-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.46);
    border-radius: 15px;
    box-shadow: 0 14px 24px -16px var(--inv-glow, rgba(15, 23, 42, 0.62)), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transform-style: preserve-3d;
    animation: withdrawalSummaryCardEnter 0.62s cubic-bezier(0.2, 0.75, 0.25, 1) both;
    transition: transform 0.34s cubic-bezier(0.2, 0.75, 0.25, 1), box-shadow 0.34s ease, filter 0.34s ease;
}
.withdrawal-detail-card::before {
    content: "";
    position: absolute;
    inset: -120% auto -120% -55%;
    z-index: 0;
    width: 34%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: translateX(-160%) rotate(25deg);
    transition: transform 0.8s cubic-bezier(0.2, 0.75, 0.25, 1);
    pointer-events: none;
}
.withdrawal-detail-card > * {
    position: relative;
    z-index: 1;
    transform: translateZ(14px);
}
.withdrawal-detail-card:nth-child(2) { animation-delay: 0.06s; }
.withdrawal-detail-card:nth-child(3) { animation-delay: 0.12s; }
.withdrawal-detail-card:nth-child(4) { animation-delay: 0.18s; }
.withdrawal-detail-card:nth-child(5) { animation-delay: 0.24s; }
.withdrawal-detail-card:nth-child(6) { animation-delay: 0.30s; }
@media (hover: hover) and (pointer: fine) {
    .withdrawal-detail-card:hover {
        z-index: 2;
        transform: perspective(900px) translateY(-7px) rotateX(5deg) rotateY(-1deg) scale(1.025);
        box-shadow: 0 23px 34px -18px var(--inv-glow, rgba(15, 23, 42, 0.72)), inset 0 1px 0 rgba(255, 255, 255, 0.52);
        filter: saturate(1.08) brightness(1.04);
    }
    .withdrawal-detail-card:hover::before { transform: translateX(480%) rotate(25deg); }
}
@media (max-width: 480px) {
    .withdrawal-summary-style .hero3d-card.withdrawal-count-card {
        min-height: 104px;
        padding: 14px;
    }
    .withdrawal-summary-style .hero3d-value { font-size: 25px; }
    .withdrawal-summary-style .hero3d-card.is-text .hero3d-value { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .withdrawal-detail-card { animation: none !important; transition: none !important; }
    .withdrawal-detail-card:hover { transform: none; filter: none; }
    .withdrawal-detail-card::before { display: none; }
    .admin-hero-live_monitor::after,
    .admin-section-summary-grid-live_monitor .withdrawal-count-card { animation: none !important; }
    .admin-section-summary-grid-live_monitor .withdrawal-count-card:hover { transform: none; filter: none; }
}

/* One shared 3D hero surface; each admin section supplies its own palette. */
.admin-panel-hero.admin-hero {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 138px;
    margin-bottom: 18px !important;
    padding: 24px 28px;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 22px;
    background:
        radial-gradient(circle at 88% 12%, var(--admin-hero-glow), transparent 32%),
        linear-gradient(125deg, var(--admin-hero-start), var(--admin-hero-end));
    box-shadow: 0 18px 38px -24px var(--admin-hero-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    color: #fff;
    transform-style: preserve-3d;
    animation: withdrawalSummaryCardEnter 0.62s cubic-bezier(0.2, 0.75, 0.25, 1) both;
    transition: transform 0.34s cubic-bezier(0.2, 0.75, 0.25, 1), box-shadow 0.34s ease, filter 0.34s ease;
}
.admin-panel-hero.admin-hero::before {
    content: "";
    position: absolute;
    inset: -120% auto -120% -55%;
    z-index: 0;
    width: 34%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: translateX(-160%) rotate(25deg);
    transition: transform 0.8s cubic-bezier(0.2, 0.75, 0.25, 1);
    pointer-events: none;
}
.admin-panel-hero.admin-hero::after {
    content: "";
    position: absolute;
    z-index: 0;
    top: -86px;
    right: 17%;
    width: 205px;
    height: 205px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    box-shadow: 0 0 0 22px rgba(255, 255, 255, 0.035), 0 0 0 46px rgba(255, 255, 255, 0.025);
    pointer-events: none;
}
.admin-panel-hero.admin-hero > * {
    position: relative;
    z-index: 1;
    transform: translateZ(18px);
}
.admin-panel-hero.admin-hero h2,
.admin-panel-hero.admin-hero h3 {
    margin-top: 0;
    color: #fff;
    font-size: clamp(22px, 2.4vw, 30px);
    font-weight: 850;
    letter-spacing: -0.035em;
    line-height: 1.15;
    text-shadow: 0 2px 7px rgba(2, 6, 23, 0.62), 0 1px 2px rgba(2, 6, 23, 0.5);
}
.admin-panel-hero.admin-hero p {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
    text-shadow: 0 1px 4px rgba(2, 6, 23, 0.66), 0 1px 1px rgba(2, 6, 23, 0.52);
}
.admin-panel-hero.admin-hero .overview-kicker,
.admin-panel-hero.admin-hero .investment-hero-kicker,
.admin-panel-hero.admin-hero .withdrawals-eyebrow {
    color: #fff;
    font-weight: 750;
    text-shadow: 0 1px 4px rgba(2, 6, 23, 0.68);
}
.admin-panel-hero.admin-hero .overview-intro-date,
.admin-panel-hero.admin-hero .withdrawals-total,
.admin-panel-hero.admin-hero .investment-hero-invested,
.admin-panel-hero.admin-hero .seo-url-pill {
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}
.admin-panel-hero.admin-hero .overview-intro-date span,
.admin-panel-hero.admin-hero .overview-intro-date strong,
.admin-panel-hero.admin-hero .withdrawals-total > span,
.admin-panel-hero.admin-hero .withdrawals-total > strong,
.admin-panel-hero.admin-hero .withdrawals-total > small,
.admin-panel-hero.admin-hero .investment-hero-invested span,
.admin-panel-hero.admin-hero .investment-hero-invested strong,
.admin-panel-hero.admin-hero .investment-hero-invested small,
.admin-panel-hero.admin-hero .seo-pill-label,
.admin-panel-hero.admin-hero .seo-url-pill code,
.admin-panel-hero.admin-hero .seo-hero-score-caption {
    color: #fff;
    text-shadow: 0 1px 4px rgba(2, 6, 23, 0.68), 0 1px 1px rgba(2, 6, 23, 0.52);
}
.admin-panel-hero.admin-hero .overview-intro-date strong,
.admin-panel-hero.admin-hero .investment-hero-invested strong {
    font-weight: 850;
}
.admin-panel-hero.admin-hero .seo-hero-score-caption small { color: rgba(255, 255, 255, 0.9); }

.admin-hero-overview {
    --admin-hero-start: #111c43;
    --admin-hero-end: #2f5597;
    --admin-hero-glow: rgba(129, 140, 248, 0.38);
    --admin-hero-shadow: rgba(30, 41, 94, 0.8);
}
.admin-hero-packages {
    --admin-hero-start: #4c1d95;
    --admin-hero-end: #a21caf;
    --admin-hero-glow: rgba(232, 121, 249, 0.38);
    --admin-hero-shadow: rgba(107, 33, 168, 0.8);
}
.admin-hero-methods {
    --admin-hero-start: #064e3b;
    --admin-hero-end: #0f766e;
    --admin-hero-glow: rgba(45, 212, 191, 0.38);
    --admin-hero-shadow: rgba(4, 120, 87, 0.8);
}
.admin-hero-tasks {
    --admin-hero-start: #831843;
    --admin-hero-end: #6d28d9;
    --admin-hero-glow: rgba(244, 114, 182, 0.38);
    --admin-hero-shadow: rgba(131, 24, 67, 0.8);
}
.admin-hero-investments {
    --admin-hero-start: #78350f;
    --admin-hero-end: #d97706;
    --admin-hero-glow: rgba(253, 224, 71, 0.38);
    --admin-hero-shadow: rgba(146, 64, 14, 0.8);
    margin-bottom: 18px !important;
}
.admin-hero-withdrawals {
    --admin-hero-start: #0c4a6e;
    --admin-hero-end: #0284c7;
    --admin-hero-glow: rgba(56, 189, 248, 0.4);
    --admin-hero-shadow: rgba(3, 105, 161, 0.8);
}
.admin-hero-payments {
    --admin-hero-start: #7f1d1d;
    --admin-hero-end: #c2410c;
    --admin-hero-glow: rgba(251, 146, 60, 0.4);
    --admin-hero-shadow: rgba(153, 27, 27, 0.8);
}
.admin-hero-sitemap {
    --admin-hero-start: #1e3a8a;
    --admin-hero-end: #0369a1;
    --admin-hero-glow: rgba(125, 211, 252, 0.4);
    --admin-hero-shadow: rgba(30, 64, 175, 0.8);
    margin-bottom: 18px !important;
}
.admin-hero-seo-workbench {
    --admin-hero-start: #14532d;
    --admin-hero-end: #047857;
    --admin-hero-glow: rgba(74, 222, 128, 0.4);
    --admin-hero-shadow: rgba(20, 83, 45, 0.8);
    margin-bottom: 18px !important;
}
.admin-hero-live_monitor {
    --admin-hero-start: #1e1b4b;
    --admin-hero-end: #6d28d9;
    --admin-hero-glow: rgba(45, 212, 191, 0.42);
    --admin-hero-shadow: rgba(76, 29, 149, 0.82);
    margin-bottom: 13px !important;
}
.admin-hero-live_monitor::after {
    border: 2px dashed rgba(255,255,255,.22);
    animation: traffic-hero-ring 22s linear infinite;
}
@keyframes traffic-hero-ring { to { transform: rotate(360deg) scale(1.05); } }
.admin-section-summary-grid-live_monitor .withdrawal-count-card {
    color: #fff;
    border: 1px solid rgba(255,255,255,.42);
    background: linear-gradient(135deg,#0f766e,#0891b2);
    box-shadow: 0 15px 27px -20px rgba(15,23,42,.78), inset 0 1px 0 rgba(255,255,255,.28);
    animation: traffic-stat-enter .62s cubic-bezier(.18,.72,.24,1) both;
    transition: transform .26s ease, box-shadow .26s ease, filter .26s ease;
}
.admin-section-summary-grid-live_monitor .withdrawal-count-card:nth-child(2) { background: linear-gradient(135deg,#6d28d9,#9333ea); animation-delay: 80ms; }
.admin-section-summary-grid-live_monitor .withdrawal-count-card:nth-child(3) { background: linear-gradient(135deg,#1d4ed8,#0369a1); animation-delay: 160ms; }
.admin-section-summary-grid-live_monitor .withdrawal-count-card:nth-child(4) { background: linear-gradient(135deg,#c2410c,#ea580c); animation-delay: 240ms; }
.admin-section-summary-grid-live_monitor .withdrawal-count-card strong,
.admin-section-summary-grid-live_monitor .withdrawal-count-card span,
.admin-section-summary-grid-live_monitor .withdrawal-count-card small { color: #fff !important; text-shadow: none !important; }
.admin-section-summary-grid-live_monitor .withdrawal-count-card strong { font-size: 25px; font-weight: 900; }
.admin-section-summary-grid-live_monitor .withdrawal-count-card span { font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .05em; }
.admin-section-summary-grid-live_monitor .withdrawal-count-card small { font-size: 11px; font-weight: 600; opacity: .94; }
.admin-section-summary-grid-live_monitor .withdrawal-count-card:hover {
    transform: translateY(-5px) rotateX(2deg);
    box-shadow: 0 23px 35px -21px rgba(15,23,42,.84), inset 0 1px 0 rgba(255,255,255,.4);
    filter: saturate(1.08) brightness(1.04);
}
@media (hover: hover) and (pointer: fine) {
    .admin-panel-hero.admin-hero:hover {
        z-index: 2;
        transform: perspective(1200px) translateY(-6px) rotateX(3deg) rotateY(-1deg);
        box-shadow: 0 24px 42px -24px var(--admin-hero-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.45);
        filter: saturate(1.06) brightness(1.03);
    }
    .admin-panel-hero.admin-hero:hover::before { transform: translateX(480%) rotate(25deg); }
}
@media (max-width: 760px) {
    .admin-panel-hero.admin-hero { min-height: 0; padding: 22px; }
}
@media (max-width: 520px) {
    .admin-panel-hero.admin-hero { align-items: flex-start; flex-direction: column; padding: 20px; }
    .admin-panel-hero.admin-hero .overview-intro-date,
    .admin-panel-hero.admin-hero .withdrawals-total,
    .admin-panel-hero.admin-hero .investment-hero-invested { width: 100%; min-width: 0; }
    .admin-panel-hero.admin-hero .withdrawals-total { justify-items: start; }
}
@media (prefers-reduced-motion: reduce) {
    .admin-panel-hero.admin-hero { animation: none !important; transition: none !important; }
    .admin-panel-hero.admin-hero:hover { transform: none; filter: none; }
    .admin-panel-hero.admin-hero::before { display: none; }
}

.admin-section-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    margin: 14px 0 20px;
}
.admin-section-summary-grid .withdrawal-count-card { min-height: 116px; }
.withdrawal-count-grid.admin-section-summary-grid-manage_admins {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.withdrawal-count-grid.admin-section-summary-grid-manage_admins .withdrawal-count-card {
    min-height: 92px;
    padding: 12px 14px;
}
.withdrawal-count-grid.admin-section-summary-grid-manage_admins .withdrawal-count-card > strong { font-size: 22px; }
.withdrawal-count-grid.admin-section-summary-grid-manage_admins .withdrawal-count-card > span { font-size: 11px; }
.withdrawal-count-grid.admin-section-summary-grid-manage_admins .withdrawal-count-card > small { font-size: 10px; }
.withdrawal-count-card.is-stat-violet {
    --withdraw-start: #7e22ce;
    --withdraw-end: #c026d3;
    --withdraw-shadow: rgba(126, 34, 206, 0.78);
}
.admin-section-summary-grid .hero3d-value,
.admin-section-summary-grid .hero3d-label,
.admin-section-summary-grid .hero3d-sub {
    color: #fff;
    text-shadow: 0 1px 4px rgba(2, 6, 23, 0.68), 0 1px 2px rgba(2, 6, 23, 0.52);
}
.admin-section-summary-grid .hero3d-value {
    font-weight: 850;
    text-shadow: 0 2px 8px rgba(2, 6, 23, 0.64), 0 1px 2px rgba(2, 6, 23, 0.52);
}
.admin-section-summary-grid .hero3d-label { font-weight: 800; }
.admin-section-summary-grid .hero3d-sub { font-weight: 700; }

.admin-hero-support_tickets {
    --admin-hero-start: #7f1d1d;
    --admin-hero-end: #e11d48;
    --admin-hero-glow: rgba(251, 113, 133, 0.4);
    --admin-hero-shadow: rgba(153, 27, 27, 0.8);
}
.admin-hero-support_categories {
    --admin-hero-start: #115e59;
    --admin-hero-end: #22c55e;
    --admin-hero-glow: rgba(110, 231, 183, 0.4);
    --admin-hero-shadow: rgba(15, 118, 110, 0.8);
}
.admin-section-summary-grid-support_tickets .withdrawal-count-card,
.admin-section-summary-grid-support_categories .withdrawal-count-card,
.admin-section-summary-grid-contact_messages .withdrawal-count-card,
.admin-section-summary-grid-contact_settings .withdrawal-count-card {
    min-height: 122px;
    border-color: rgba(255, 255, 255, 0.48);
    box-shadow: 0 14px 25px -17px rgba(15, 23, 42, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.admin-section-summary-grid-support_tickets .withdrawal-count-card:nth-child(1) { background: linear-gradient(135deg, #4338ca, #7c3aed); }
.admin-section-summary-grid-support_tickets .withdrawal-count-card:nth-child(2) { background: linear-gradient(135deg, #b45309, #f59e0b); }
.admin-section-summary-grid-support_tickets .withdrawal-count-card:nth-child(3) { background: linear-gradient(135deg, #1d4ed8, #0284c7); }
.admin-section-summary-grid-support_tickets .withdrawal-count-card:nth-child(4) { background: linear-gradient(135deg, #047857, #10b981); }
.admin-section-summary-grid-support_categories .withdrawal-count-card:nth-child(1) { background: linear-gradient(135deg, #0f766e, #14b8a6); }
.admin-section-summary-grid-support_categories .withdrawal-count-card:nth-child(2) { background: linear-gradient(135deg, #7e22ce, #c026d3); }
.admin-section-summary-grid-contact_messages .withdrawal-count-card:nth-child(1) { background: linear-gradient(135deg, #0e7490, #0891b2); }
.admin-section-summary-grid-contact_messages .withdrawal-count-card:nth-child(2) { background: linear-gradient(135deg, #b45309, #f97316); }
.admin-section-summary-grid-contact_messages .withdrawal-count-card:nth-child(3) { background: linear-gradient(135deg, #1d4ed8, #4f46e5); }
.admin-section-summary-grid-contact_messages .withdrawal-count-card:nth-child(4) { background: linear-gradient(135deg, #047857, #22c55e); }
.admin-section-summary-grid-contact_settings .withdrawal-count-card:nth-child(1) { background: linear-gradient(135deg, #0f766e, #10b981); }
.admin-section-summary-grid-contact_settings .withdrawal-count-card:nth-child(2) { background: linear-gradient(135deg, #1d4ed8, #7c3aed); }
.admin-section-summary-grid-support_tickets .withdrawal-count-card > strong,
.admin-section-summary-grid-support_tickets .withdrawal-count-card > span,
.admin-section-summary-grid-support_tickets .withdrawal-count-card > small,
.admin-section-summary-grid-support_categories .withdrawal-count-card > strong,
.admin-section-summary-grid-support_categories .withdrawal-count-card > span,
.admin-section-summary-grid-support_categories .withdrawal-count-card > small,
.admin-section-summary-grid-contact_messages .withdrawal-count-card > strong,
.admin-section-summary-grid-contact_messages .withdrawal-count-card > span,
.admin-section-summary-grid-contact_messages .withdrawal-count-card > small,
.admin-section-summary-grid-contact_settings .withdrawal-count-card > strong,
.admin-section-summary-grid-contact_settings .withdrawal-count-card > span,
.admin-section-summary-grid-contact_settings .withdrawal-count-card > small {
    color: #fff !important;
    text-shadow: 0 1px 4px rgba(2, 6, 23, 0.68), 0 1px 2px rgba(2, 6, 23, 0.52);
}
.admin-section-summary-grid-support_tickets .withdrawal-count-card > strong,
.admin-section-summary-grid-support_categories .withdrawal-count-card > strong,
.admin-section-summary-grid-contact_messages .withdrawal-count-card > strong,
.admin-section-summary-grid-contact_settings .withdrawal-count-card > strong {
    font-size: 28px;
    font-weight: 900;
}
.admin-section-summary-grid-support_tickets .withdrawal-count-card > span,
.admin-section-summary-grid-support_categories .withdrawal-count-card > span,
.admin-section-summary-grid-contact_messages .withdrawal-count-card > span,
.admin-section-summary-grid-contact_settings .withdrawal-count-card > span {
    font-size: 12px;
    font-weight: 850;
}
.admin-section-summary-grid-support_tickets .withdrawal-count-card > small,
.admin-section-summary-grid-support_categories .withdrawal-count-card > small,
.admin-section-summary-grid-contact_messages .withdrawal-count-card > small,
.admin-section-summary-grid-contact_settings .withdrawal-count-card > small {
    font-size: 12px;
    font-weight: 650;
    line-height: 1.45;
    opacity: 1;
}
.admin-section-summary-grid-support_tickets .withdrawal-count-card:hover,
.admin-section-summary-grid-support_categories .withdrawal-count-card:hover,
.admin-section-summary-grid-contact_messages .withdrawal-count-card:hover,
.admin-section-summary-grid-contact_settings .withdrawal-count-card:hover {
    transform: translateY(-5px) rotateX(2deg);
    box-shadow: 0 23px 35px -21px rgba(15, 23, 42, 0.82), inset 0 1px 0 rgba(255, 255, 255, 0.42);
    filter: saturate(1.08) brightness(1.04);
}
.admin-hero-users {
    --admin-hero-start: #166534;
    --admin-hero-end: #0891b2;
    --admin-hero-glow: rgba(103, 232, 249, 0.4);
    --admin-hero-shadow: rgba(22, 101, 52, 0.8);
}
.admin-hero-users_data {
    --admin-hero-start: #312e81;
    --admin-hero-end: #7c3aed;
    --admin-hero-glow: rgba(196, 181, 253, 0.4);
    --admin-hero-shadow: rgba(67, 56, 202, 0.8);
}
.admin-hero-email_requests {
    --admin-hero-start: #9a3412;
    --admin-hero-end: #ea580c;
    --admin-hero-glow: rgba(253, 186, 116, 0.4);
    --admin-hero-shadow: rgba(154, 52, 18, 0.8);
}
.admin-hero-content {
    --admin-hero-start: #581c87;
    --admin-hero-end: #a855f7;
    --admin-hero-glow: rgba(216, 180, 254, 0.4);
    --admin-hero-shadow: rgba(88, 28, 135, 0.8);
}
.admin-hero-home {
    --admin-hero-start: #164e63;
    --admin-hero-end: #06b6d4;
    --admin-hero-glow: rgba(165, 243, 252, 0.4);
    --admin-hero-shadow: rgba(8, 145, 178, 0.8);
}
.admin-hero-pages {
    --admin-hero-start: #1e40af;
    --admin-hero-end: #60a5fa;
    --admin-hero-glow: rgba(191, 219, 254, 0.4);
    --admin-hero-shadow: rgba(37, 99, 235, 0.8);
}
.admin-hero-menus {
    --admin-hero-start: #334155;
    --admin-hero-end: #0f766e;
    --admin-hero-glow: rgba(153, 246, 228, 0.4);
    --admin-hero-shadow: rgba(51, 65, 85, 0.8);
}
.admin-hero-free_courses {
    --admin-hero-start: #365314;
    --admin-hero-end: #65a30d;
    --admin-hero-glow: rgba(217, 249, 157, 0.4);
    --admin-hero-shadow: rgba(54, 83, 20, 0.8);
}
.admin-hero-paid_courses {
    --admin-hero-start: #4a044e;
    --admin-hero-end: #c026d3;
    --admin-hero-glow: rgba(240, 171, 252, 0.4);
    --admin-hero-shadow: rgba(112, 26, 117, 0.8);
}
.admin-hero-ads {
    --admin-hero-start: #701a75;
    --admin-hero-end: #d946ef;
    --admin-hero-glow: rgba(245, 208, 254, 0.4);
    --admin-hero-shadow: rgba(112, 26, 117, 0.8);
}
.admin-hero-success_stories {
    --admin-hero-start: #881337;
    --admin-hero-end: #fb7185;
    --admin-hero-glow: rgba(254, 205, 211, 0.4);
    --admin-hero-shadow: rgba(136, 19, 55, 0.8);
}
.admin-hero-certificates {
    --admin-hero-start: #713f12;
    --admin-hero-end: #eab308;
    --admin-hero-glow: rgba(254, 240, 138, 0.4);
    --admin-hero-shadow: rgba(113, 63, 18, 0.8);
}
.admin-hero-levels {
    --admin-hero-start: #7c2d12;
    --admin-hero-end: #f97316;
    --admin-hero-glow: rgba(254, 215, 170, 0.4);
    --admin-hero-shadow: rgba(124, 45, 18, 0.8);
}
.admin-hero-settings {
    --admin-hero-start: #1f2937;
    --admin-hero-end: #64748b;
    --admin-hero-glow: rgba(203, 213, 225, 0.4);
    --admin-hero-shadow: rgba(30, 41, 59, 0.8);
}
.admin-hero-ai_assistant {
    --admin-hero-start: #1d4ed8;
    --admin-hero-end: #38bdf8;
    --admin-hero-glow: rgba(186, 230, 253, 0.4);
    --admin-hero-shadow: rgba(29, 78, 216, 0.8);
}
.admin-hero-notifications {
    --admin-hero-start: #86198f;
    --admin-hero-end: #db2777;
    --admin-hero-glow: rgba(251, 207, 232, 0.4);
    --admin-hero-shadow: rgba(134, 25, 143, 0.8);
}
.admin-hero-analytics {
    --admin-hero-start: #0f172a;
    --admin-hero-end: #475569;
    --admin-hero-glow: rgba(203, 213, 225, 0.4);
    --admin-hero-shadow: rgba(15, 23, 42, 0.8);
}
.admin-hero-updates {
    --admin-hero-start: #064e3b;
    --admin-hero-end: #14b8a6;
    --admin-hero-glow: rgba(153, 246, 228, 0.4);
    --admin-hero-shadow: rgba(6, 78, 59, 0.8);
}
.admin-hero-database {
    --admin-hero-start: #3f3f46;
    --admin-hero-end: #71717a;
    --admin-hero-glow: rgba(228, 228, 231, 0.4);
    --admin-hero-shadow: rgba(39, 39, 42, 0.8);
}
.admin-hero-system {
    --admin-hero-start: #18181b;
    --admin-hero-end: #52525b;
    --admin-hero-glow: rgba(212, 212, 216, 0.4);
    --admin-hero-shadow: rgba(24, 24, 27, 0.8);
}
.admin-hero-cache {
    --admin-hero-start: #134e4a;
    --admin-hero-end: #0e7490;
    --admin-hero-glow: rgba(94, 234, 212, 0.42);
    --admin-hero-shadow: rgba(19, 78, 74, 0.82);
}
.admin-hero-security {
    --admin-hero-start: #312e81;
    --admin-hero-end: #c026d3;
    --admin-hero-glow: rgba(216, 180, 254, 0.42);
    --admin-hero-shadow: rgba(49, 46, 129, 0.82);
}
.admin-hero-manage_admins {
    --admin-hero-start: #3b0764;
    --admin-hero-end: #9333ea;
    --admin-hero-glow: rgba(233, 213, 255, 0.4);
    --admin-hero-shadow: rgba(59, 7, 100, 0.8);
}
.admin-hero-diamond_exchange {
    --admin-hero-start: #0c4a6e;
    --admin-hero-end: #14b8a6;
    --admin-hero-glow: rgba(153, 246, 228, 0.42);
    --admin-hero-shadow: rgba(12, 74, 110, 0.82);
}

.diamond-ledger-panel {
    margin: 18px 0 26px;
    padding: 24px;
    border: 1px solid rgba(14, 116, 144, 0.14);
    border-radius: 22px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 68%, #ecfeff 100%);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.09), inset 0 1px 0 #ffffff;
}
.diamond-ledger-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}
.diamond-ledger-eyebrow {
    color: #0e7490;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
}
.diamond-ledger-heading h2 {
    margin: 5px 0;
    color: #0f172a;
    font-size: clamp(20px, 2.2vw, 27px);
}
.diamond-ledger-heading p {
    margin: 0;
    color: #475569;
    font-size: 13px;
}
.diamond-ledger-total {
    flex: 0 0 auto;
    padding: 9px 14px;
    border: 1px solid rgba(13, 148, 136, 0.2);
    border-radius: 999px;
    background: #ccfbf1;
    color: #115e59;
    font-size: 12px;
    font-weight: 800;
}
.diamond-ledger-overview-filter { margin: 0 0 18px; }
.diamond-ledger-overview-filter .withdrawal-clear-filters {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    white-space: nowrap;
}
.diamond-ledger-table-wrap { margin-bottom: 0; }
.diamond-ledger-table { min-width: 1120px; }
.diamond-ledger-table td strong { display: block; color: #0f172a; }
.diamond-ledger-subline {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 11px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}
.diamond-ledger-type,
.diamond-ledger-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}
.diamond-ledger-type.is-purchase {
    background: #dbeafe;
    color: #1e40af;
}
.diamond-ledger-type.is-exchange {
    background: #fce7f3;
    color: #9d174d;
}
.diamond-ledger-status.is-pending {
    background: #fef3c7;
    color: #92400e;
}
.diamond-ledger-status.is-completed {
    background: #dcfce7;
    color: #166534;
}
.diamond-ledger-status.is-failed {
    background: #fee2e2;
    color: #991b1b;
}
.diamond-ledger-amount {
    font-weight: 800;
    white-space: nowrap;
}
.diamond-ledger-amount.is-in { color: #047857 !important; }
.diamond-ledger-amount.is-out { color: #be185d !important; }
.diamond-ledger-amount.is-requested { color: #a16207 !important; }
.diamond-ledger-description {
    display: block;
    max-width: 300px;
    color: #334155;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.diamond-ledger-empty {
    padding: 34px 18px !important;
    color: #64748b !important;
    text-align: center;
}
.diamond-ledger-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 16px;
    color: #64748b;
    font-size: 12px;
}
.diamond-ledger-pagination > div {
    display: flex;
    align-items: center;
    gap: 12px;
}
.diamond-ledger-pagination a {
    padding: 7px 11px;
    border: 1px solid rgba(13, 148, 136, 0.2);
    border-radius: 9px;
    background: #ffffff;
    color: #0e7490;
    font-weight: 800;
    text-decoration: none;
}
.diamond-ledger-pagination a:hover {
    background: #ccfbf1;
}
.diamond-ledger-pagination strong { color: #334155; }
@media (max-width: 900px) {
    .diamond-ledger-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .diamond-ledger-panel { padding: 17px; border-radius: 17px; }
    .diamond-ledger-heading { align-items: flex-start; flex-direction: column; }
    .diamond-ledger-filters { grid-template-columns: minmax(0, 1fr); padding: 13px; }
    .diamond-ledger-filter-actions { justify-content: space-between; }
    .diamond-ledger-pagination { align-items: flex-start; flex-direction: column; }
}

/* Public Contact Us admin tools */
.admin-hero-contact_messages {
    --admin-hero-start: #064e5b;
    --admin-hero-end: #0891b2;
    --admin-hero-glow: rgba(103, 232, 249, 0.42);
    --admin-hero-shadow: rgba(8, 145, 178, 0.82);
}
.admin-hero-contact_settings {
    --admin-hero-start: #164e63;
    --admin-hero-end: #2563eb;
    --admin-hero-glow: rgba(125, 211, 252, 0.42);
    --admin-hero-shadow: rgba(29, 78, 216, 0.82);
}
.contact-admin-page {
    display: grid;
    gap: 16px;
}
.contact-admin-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid #bae6fd;
    background: linear-gradient(135deg, #f0f9ff 0%, #ecfeff 54%, #f8fafc 100%);
}
.contact-admin-intro h2,
.contact-admin-empty h3 {
    margin: 0 0 6px;
    color: #0c4a6e;
    font-size: 19px;
    font-weight: 850;
}
.contact-admin-intro .greeting {
    margin: 0;
    max-width: 760px;
    color: #334155;
}
.contact-admin-toolbar {
    display: grid;
    gap: 16px;
    border: 1px solid #a5f3fc;
    background: linear-gradient(145deg, #ecfeff, #eff6ff);
}
.contact-admin-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    border: 1px solid #bae6fd;
    border-radius: 14px;
    background: linear-gradient(120deg, #cffafe, #dbeafe);
}
.contact-admin-filter {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid #bae6fd;
    border-radius: 999px;
    background: #fff;
    color: #155e75;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 3px 8px rgba(14, 116, 144, .08);
    transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.contact-admin-filter:hover,
.contact-admin-filter.active {
    border-color: #0891b2;
    background: linear-gradient(135deg, #0e7490, #2563eb);
    color: #fff;
    transform: translateY(-1px);
}
.contact-admin-search {
    display: grid;
    gap: 7px;
}
.contact-admin-search > label {
    color: #334155;
    font-size: 12px;
    font-weight: 800;
}
.contact-admin-search-controls {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 8px;
}
.contact-admin-search-controls input {
    flex: 1 1 260px;
    min-width: 0;
    height: 42px;
    min-height: 42px;
    padding: 9px 12px;
    margin: 0;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
}
.contact-admin-search-controls .search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    min-height: 42px;
    margin: 0;
    box-sizing: border-box;
}
.contact-admin-bulkbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px 10px;
    min-height: 0;
    padding: 6px 8px;
    border: 1px solid #bae6fd;
    border-radius: 10px;
    background: linear-gradient(120deg, #f0fdfa, #eff6ff);
}
.contact-admin-select-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    border: 1px solid rgba(8, 145, 178, .16);
    border-radius: 7px;
    background: rgba(255, 255, 255, .72);
    color: #164e63;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}
.contact-admin-select-all input,
.contact-admin-select-message input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: #0891b2;
    cursor: pointer;
}
.contact-admin-selection-count {
    color: #475569;
    font-size: 11px;
    font-weight: 700;
}
.contact-admin-bulk-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-left: auto;
}
.contact-admin-bulk-actions[hidden] {
    display: none;
}
.contact-admin-bulkbar .contact-admin-bulk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: 100%;
    min-height: 30px;
    padding: 6px 10px;
    border: 1px solid #2563eb;
    border-radius: 8px;
    background: linear-gradient(135deg, #4f46e5, #0891b2);
    color: #fff;
    font-size: 11px;
    font-weight: 750;
    line-height: 1;
    white-space: nowrap;
    user-select: none;
    appearance: none;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
    box-shadow: 0 3px 8px rgba(37, 99, 235, .24);
}
.contact-admin-bulkbar .contact-admin-bulk-btn:hover {
    background: linear-gradient(135deg, #4338ca, #0e7490);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 5px 11px rgba(37, 99, 235, .32);
}
.contact-admin-bulkbar .contact-admin-bulk-btn:focus-visible {
    outline: 2px solid #38bdf8;
    outline-offset: 2px;
}
.contact-admin-bulkbar .contact-admin-bulk-btn.is-danger {
    border: 1px solid #b91c1c;
    background: linear-gradient(135deg, #ef4444, #be123c);
    color: #fff;
    box-shadow: 0 3px 8px rgba(185, 28, 28, .24);
}
.contact-admin-bulkbar .contact-admin-bulk-btn.is-danger:hover {
    border-color: #991b1b;
    background: linear-gradient(135deg, #dc2626, #9f1239);
    color: #fff;
    box-shadow: 0 5px 11px rgba(185, 28, 28, .32);
}
.contact-admin-list {
    display: grid;
    gap: 0;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 12px 28px -23px rgba(15, 23, 42, .68);
}
.contact-admin-message {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: stretch;
    min-width: 0;
    border: 0;
    border-bottom: 1px solid #e2e8f0;
    border-left: 4px solid transparent;
    background: #fff;
}
.contact-admin-message:last-child {
    border-bottom: 0;
}
.contact-admin-message.is-new {
    border-left-color: #ea580c;
    background: #fff7ed;
}
.contact-admin-message.is-read {
    border-left-color: #16a34a;
    background: #f0fdf4;
}
.contact-admin-message.is-trash {
    border-left-color: #94a3b8;
    background: #f8fafc;
}
.contact-admin-select-message {
    display: grid;
    place-items: center;
    cursor: pointer;
}
.contact-admin-open-message {
    display: grid;
    grid-template-columns: minmax(170px, .8fr) minmax(240px, 2fr) minmax(125px, max-content) 14px;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 66px;
    padding: 11px 16px;
    border: 0;
    min-width: 0;
    cursor: pointer;
    appearance: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: inherit;
    text-align: left;
    transform: none;
}
.contact-admin-open-message:hover,
.contact-admin-open-message[aria-expanded="true"] {
    background: #f0f9ff;
}
.contact-admin-message.is-new .contact-admin-open-message:hover,
.contact-admin-message.is-new .contact-admin-open-message[aria-expanded="true"] {
    background: #ffedd5;
}
.contact-admin-message.is-read .contact-admin-open-message:hover,
.contact-admin-message.is-read .contact-admin-open-message[aria-expanded="true"] {
    background: #dcfce7;
}
.contact-admin-open-message:focus-visible {
    outline: 2px solid #0284c7;
    outline-offset: -3px;
}
.contact-admin-summary-sender,
.contact-admin-summary-copy,
.contact-admin-summary-state {
    display: flex;
    min-width: 0;
}
.contact-admin-summary-sender {
    flex-direction: column;
    gap: 3px;
}
.contact-admin-summary-sender strong,
.contact-admin-summary-copy strong {
    overflow: hidden;
    color: #0f172a;
    font-size: 12px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.contact-admin-message.is-new .contact-admin-summary-sender strong,
.contact-admin-message.is-new .contact-admin-summary-copy strong {
    font-weight: 900;
}
.contact-admin-summary-sender small {
    overflow: hidden;
    color: #64748b;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.contact-admin-summary-copy {
    display: block;
    overflow: hidden;
    color: #64748b;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.contact-admin-summary-copy strong {
    display: inline;
    margin-right: 7px;
}
.contact-admin-summary-copy > span {
    color: #64748b;
}
.contact-admin-summary-state {
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}
.contact-admin-summary-state time {
    color: #64748b;
    font-size: 10px;
    white-space: nowrap;
}
.contact-admin-open-message::after {
    width: 8px;
    height: 8px;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    content: "";
    transform: rotate(45deg);
    transition: transform .18s ease;
}
.contact-admin-open-message[aria-expanded="true"]::after {
    transform: rotate(225deg);
}
.contact-admin-dialog {
    width: min(760px, calc(100% - 28px));
    max-width: none;
    max-height: min(88vh, 820px);
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid #bae6fd;
    border-radius: 18px;
    background: #fff;
    color: #1e293b;
    box-shadow: 0 28px 90px rgba(15, 23, 42, .34);
}
.contact-admin-dialog::backdrop {
    background: rgba(15, 23, 42, .58);
    backdrop-filter: blur(3px);
}
.contact-admin-dialog-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    max-height: min(88vh, 820px);
    overflow: hidden;
}
.contact-admin-dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px 16px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #f0f9ff, #ecfeff);
}
.contact-admin-dialog-header h2 {
    margin: 0 0 7px;
    color: #0c4a6e;
    font-size: 20px;
    font-weight: 850;
    overflow-wrap: anywhere;
}
.contact-admin-dialog-header p {
    margin: 0;
    color: #475569;
    font-size: 12px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}
.contact-admin-dialog-header p a {
    color: #0369a1;
    font-weight: 750;
}
.contact-admin-dialog-close {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    padding: 0 0 3px;
    border: 1px solid #bae6fd;
    border-radius: 50%;
    background: #fff;
    color: #0c4a6e;
    box-shadow: none;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}
.contact-admin-dialog-content {
    min-height: 120px;
    padding: 20px 22px;
    overflow: auto;
}
.contact-admin-dialog .contact-admin-message-body {
    padding: 16px 18px;
    border-color: #dbeafe;
    background: #f8fafc;
    font-size: 14px;
    line-height: 1.8;
}
.contact-admin-message-actions {
    padding: 0 22px 20px;
}
.contact-admin-detail-meta {
    margin-bottom: 10px;
    color: #64748b;
    font-size: 11px;
}
.contact-admin-detail-meta a {
    color: #0369a1;
    font-weight: 750;
}
.contact-admin-status {
    flex: 0 0 auto;
    padding: 5px 8px;
    border: 1px solid #bae6fd;
    border-radius: 999px;
    background: #e0f2fe;
    color: #075985;
    font-size: 10px;
    font-weight: 850;
}
.contact-admin-status.is-new { border-color: #fdba74; background: #ffedd5; color: #9a3412; }
.contact-admin-status.is-read { border-color: #86efac; background: #dcfce7; color: #166534; }
.contact-admin-status.is-replied { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
.contact-admin-status.is-archived { border-color: #cbd5e1; background: #f1f5f9; color: #475569; }
.contact-admin-status.is-trash { border-color: #cbd5e1; background: #e2e8f0; color: #334155; }
.contact-admin-restore {
    border-color: #99f6e4 !important;
    background: linear-gradient(135deg, #ccfbf1, #dbeafe) !important;
    color: #0f766e !important;
}
.contact-admin-message-body {
    padding: 13px 15px;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: #f8fafc;
    color: #1e293b;
    font-size: 13px;
    line-height: 1.75;
    overflow-wrap: anywhere;
    white-space: normal;
}
.contact-admin-full-message {
    white-space: normal;
}
.contact-admin-message-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: center;
    gap: 7px;
    min-width: 0;
}
.contact-admin-message-actions form {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    min-width: 0;
    margin: 0;
}
.contact-admin-message-actions .search-btn {
    width: auto;
    min-width: 0;
    min-height: 38px;
    margin: 0;
    padding: 8px 10px;
    font-size: 11px;
    line-height: 1;
}
.contact-admin-message-actions .contact-admin-reply {
    justify-self: start;
}
.contact-admin-message-actions .contact-admin-delete-form {
    justify-self: end;
}
.contact-admin-delete {
    border-color: #b91c1c !important;
    background: linear-gradient(135deg, #ef4444, #be123c) !important;
    color: #fff !important;
    box-shadow: 0 3px 8px rgba(185, 28, 28, .24) !important;
}
.contact-admin-delete:hover {
    border-color: #991b1b !important;
    background: linear-gradient(135deg, #dc2626, #9f1239) !important;
    color: #fff !important;
    box-shadow: 0 5px 11px rgba(185, 28, 28, .32) !important;
}
.contact-admin-empty {
    border: 1px dashed #7dd3fc;
    background: linear-gradient(135deg, #f0f9ff, #ecfeff);
}
.contact-admin-empty h3 { color: #075985; }
.contact-admin-empty p,
.contact-admin-limit-note {
    margin: 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.6;
}
.contact-settings-card {
    border: 1px solid #bae6fd;
    background: linear-gradient(145deg, #fff 0%, #f8fafc 56%, #ecfeff 100%);
}
.contact-settings-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
    padding: 16px 18px;
    border: 1px solid #a5f3fc;
    border-radius: 14px;
    background: linear-gradient(125deg, #ecfeff, #eff6ff);
}
.contact-settings-toggle strong {
    color: #0c4a6e;
    font-size: 15px;
    font-weight: 850;
}
.contact-settings-toggle p {
    margin: 4px 0 0;
    color: #475569;
    font-size: 12px;
    line-height: 1.55;
}
.contact-settings-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0e7490;
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}
.contact-settings-switch input { width: 18px; height: 18px; accent-color: #0891b2; }
.contact-settings-grid { margin-bottom: 18px; }
.contact-settings-grid .field-hint {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 11px;
    line-height: 1.5;
}
.contact-admin-page .alert { margin: 0; }
.contact-admin-page .contact-settings-card .save-btn {
    background: linear-gradient(135deg, #0e7490, #2563eb);
}
.contact-admin-page .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
@media (max-width: 680px) {
    .contact-admin-intro,
    .contact-settings-toggle {
        align-items: flex-start;
        flex-direction: column;
    }
    .contact-admin-intro > .search-btn { width: 100%; text-align: center; }
    .contact-admin-bulkbar {
        align-items: flex-start;
        gap: 6px;
    }
    .contact-admin-bulk-actions {
        width: 100%;
        margin-left: 0;
    }
    .contact-admin-bulk-btn {
        flex: 0 0 auto;
    }
    .contact-admin-message {
        grid-template-columns: 36px minmax(0, 1fr);
    }
    .contact-admin-open-message {
        grid-template-columns: minmax(0, 1fr) max-content 12px;
        gap: 8px;
        padding: 11px 12px;
    }
    .contact-admin-summary-copy {
        grid-column: 1 / -1;
        grid-row: 2;
    }
    .contact-admin-summary-state {
        grid-column: 2;
        grid-row: 1;
    }
    .contact-admin-open-message::after {
        grid-column: 3;
        grid-row: 1;
    }
    .contact-admin-dialog {
        width: calc(100% - 20px);
        max-height: 92vh;
        border-radius: 14px;
    }
    .contact-admin-dialog-panel {
        max-height: 92vh;
    }
    .contact-admin-dialog-header,
    .contact-admin-dialog-content {
        padding-right: 14px;
        padding-left: 14px;
    }
    .contact-admin-dialog-header h2 {
        font-size: 17px;
    }
    .contact-admin-message-actions {
        grid-template-columns: minmax(0, 1fr);
    }
    .contact-admin-message-actions > *,
    .contact-admin-message-actions form {
        width: 100%;
    }
    .contact-admin-message-actions .contact-admin-reply,
    .contact-admin-message-actions form .search-btn { justify-content: center; text-align: center; }
    .contact-admin-message-actions .contact-admin-delete-form { justify-content: flex-end; }
}
@media (min-width: 681px) and (max-width: 1180px) {
    .contact-admin-open-message {
        grid-template-columns: minmax(150px, .8fr) minmax(200px, 1.7fr) max-content 14px;
        gap: 10px;
    }
}
@media (max-width: 680px) {
    .contact-admin-summary-state time { display: none; }
}

/* Analytics redesign: a light financial workspace with individually styled metrics. */
.main-content.analytics-page {
    --analytics-ink: #142338;
    --analytics-muted: #6b7c91;
    --analytics-blue: #2563eb;
    --analytics-cyan: #0891b2;
    --analytics-line: #e4edf6;
    background:
        radial-gradient(ellipse at 92% 3%, rgba(34, 211, 238, .11), transparent 28%),
        radial-gradient(ellipse at 4% 28%, rgba(59, 130, 246, .07), transparent 25%),
        linear-gradient(180deg, #f7fbff 0%, #f3f7fc 48%, #f8fbff 100%);
    color: var(--analytics-ink);
    padding-bottom: clamp(24px, 4vw, 52px);
}
.analytics-page .content-header {
    position: relative;
    display: block;
    margin: 0 0 18px;
    padding: clamp(16px, 2.2vw, 24px) clamp(16px, 2.6vw, 30px);
    overflow: hidden;
    border: 1px solid #dceaf6;
    border-radius: 22px;
    background: linear-gradient(112deg, rgba(255,255,255,.98), rgba(235,248,255,.9) 58%, rgba(241,245,255,.92));
    box-shadow: 0 12px 30px rgba(29, 78, 125, .065);
}
.analytics-page .content-header::after {
    position: absolute;
    top: -58px;
    right: 5%;
    width: 210px;
    height: 150px;
    border: 1px solid rgba(37, 99, 235, .12);
    border-radius: 50%;
    box-shadow: 0 0 0 17px rgba(37,99,235,.025), 0 0 0 36px rgba(8,145,178,.025);
    content: "";
    pointer-events: none;
}
.analytics-page .content-header h2 {
    position: relative;
    z-index: 1;
    margin: 0 0 4px;
    color: #15395f;
    font-size: clamp(25px, 3vw, 35px);
    font-weight: 850;
    letter-spacing: -1.1px;
}
.analytics-page .content-header .greeting {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #61758b;
    font-size: 12px;
}
/* ---- Account snapshot hero (used: top of analytics.php). .account-* base styles live above. ---- */
.analytics-page .analytics-account-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 17px;
    border: 1px solid #d5e8f5;
    border-radius: 24px;
    background:
        linear-gradient(125deg, rgba(255,255,255,.97) 0%, rgba(239,249,255,.96) 58%, rgba(239,245,255,.94) 100%);
    box-shadow: 0 13px 34px rgba(20, 75, 124, .075);
}
.analytics-page .analytics-account-hero::after {
    position: absolute;
    right: -44px;
    bottom: -85px;
    width: 250px;
    height: 180px;
    border: 1px solid rgba(14, 165, 233, .13);
    border-radius: 50%;
    box-shadow: 0 0 0 16px rgba(14,165,233,.035), 0 0 0 34px rgba(37,99,235,.025);
    content: "";
    pointer-events: none;
}
.analytics-page .analytics-account-hero .account-avatar {
    border: 4px solid rgba(255,255,255,.92);
    background: linear-gradient(145deg, #0ea5e9, #315be8 70%, #784de8);
    box-shadow: 0 12px 26px rgba(37,99,235,.24);
}
.analytics-page .analytics-account-hero .account-tag {
    border-color: #dbeaf5;
    background: rgba(255,255,255,.76);
    color: #38536f;
}
.analytics-page .analytics-account-hero .account-facts {
    gap: 0;
    padding-top: 13px;
    border-top: 1px solid rgba(67, 116, 160, .13);
}
.analytics-page .analytics-account-hero .account-fact {
    min-width: 0;
    padding: 5px 14px;
    border: 0;
    border-left: 1px solid rgba(67, 116, 160, .16);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.analytics-page .analytics-account-hero .account-fact:first-child { border-left: 0; }
.analytics-page .analytics-account-hero .account-fact:hover {
    transform: none;
    border-color: rgba(67, 116, 160, .16);
    box-shadow: none;
}
.analytics-page .analytics-account-hero .account-fact-label {
    color: #7890a6;
    font-size: 9px;
    letter-spacing: .75px;
}
.analytics-page .analytics-account-hero .account-fact-value {
    color: #1c3d5d;
    font-size: 12px;
}
/* ---- Period panel: caption | preset chips | current range (used inside .analytics-filter-bar) ---- */
.analytics-page .analytics-period-panel {
    display: grid;
    grid-template-columns: minmax(180px, .8fr) minmax(0, 2fr) max-content;
    align-items: center;
    gap: 8px 18px;
    margin: 0 0 19px;
    padding: 13px 17px;
    border: 1px solid #dfebf5;
    border-left: 4px solid #2584d8;
    border-radius: 16px;
    background: rgba(255,255,255,.86);
    box-shadow: 0 8px 22px rgba(40, 78, 112, .045);
}
.analytics-page .analytics-period-panel .analytics-filter-caption {
    display: grid;
    gap: 3px;
    margin: 0;
}
.analytics-page .analytics-period-panel .analytics-filter-caption strong {
    color: #244767;
    font-size: 12px;
}
.analytics-page .analytics-period-panel .analytics-filter-caption span {
    color: #8192a5;
    font-size: 10px;
}
.analytics-page .analytics-period-panel .analytics-history-filter {
    min-width: 0;
    margin: 0;
}
.analytics-page .analytics-period-panel .history-filter-presets { gap: 5px; }
.analytics-page .analytics-period-panel .history-chip {
    padding: 6px 10px;
    border: 1px solid #e4edf5;
    border-radius: 9px;
    background: #f7fafe;
    color: #58718a;
    font-size: 10px;
    font-weight: 750;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}
.analytics-page .analytics-period-panel .history-chip:hover {
    transform: translateY(-1px);
    border-color: #9bc6ea;
    background: #edf7ff;
    color: #175c96;
    box-shadow: none;
}
.analytics-page .analytics-period-panel .history-chip.active {
    border-color: transparent;
    background: linear-gradient(120deg, #1686d5, #3566dc);
    color: #fff;
    box-shadow: 0 5px 12px rgba(37,99,235,.2);
}
.analytics-page .analytics-period-panel .filter-current {
    justify-content: flex-end;
    gap: 5px;
    padding: 0;
    border: 0;
    white-space: nowrap;
    font-size: 10px;
}
.analytics-page .analytics-period-panel .filter-current-value {
    padding: 5px 9px;
    border: 1px solid #d9ebf8;
    background: #f0f8ff;
    color: #17649e;
}
.analytics-page .analytics-section-heading {
    justify-content: flex-start;
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 32px 0 11px;
    padding: 0;
    border: 0;
    color: #203b56;
    font-size: 16px;
    font-weight: 850;
    letter-spacing: -.3px;
}
.analytics-page .analytics-section-heading::before {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    display: block;
    flex: 0 0 27px;
    width: 27px;
    height: 5px;
    border-radius: 99px;
    background: var(--section-accent, linear-gradient(90deg, #1686d5, #33c5d5));
    box-shadow: 0 3px 9px var(--section-glow, rgba(37,99,235,.18));
    content: "";
}
.analytics-page .analytics-section-heading::after {
    margin-left: auto;
    color: #9aabba;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 1.4px;
}
.analytics-page .heading-wallet { --section-accent:linear-gradient(90deg,#087fce,#41c5d5); --section-glow:rgba(14,165,233,.24); }
/* ---- Withdrawals heading (unused alternate — stat-grid below is used instead) ---- */
.analytics-page .heading-withdrawals { --section-accent:linear-gradient(90deg,#e45d70,#ffad75); --section-glow:rgba(244,63,94,.2); }
.analytics-page .heading-network { --section-accent:linear-gradient(90deg,#7457d9,#bf83e8); --section-glow:rgba(139,92,246,.22); }
.analytics-page .heading-payments { --section-accent:linear-gradient(90deg,#1686d5,#66b8f0); }
.analytics-page .heading-payouts { --section-accent:linear-gradient(90deg,#e36d79,#f6ad83); }
.analytics-page .heading-investment { --section-accent:linear-gradient(90deg,#7457d9,#bf83e8); --section-glow:rgba(139,92,246,.22); }
.analytics-page .heading-diamonds { --section-accent:linear-gradient(90deg,#09a7b5,#60d4bd); }
.analytics-page .heading-tasks { --section-accent:linear-gradient(90deg,#48a86c,#a3cb66); }
.analytics-page .heading-store { --section-accent:linear-gradient(90deg,#4380dc,#81baf1); }
.analytics-page .heading-referrals { --section-accent:linear-gradient(90deg,#0fae9d,#82d9b8); }
.analytics-page .analytics-stat-grid {
    gap: 11px;
    margin: 0 0 14px;
}
/* Analytics metric cards reuse the Overview card design; each metric keeps
   its own palette through the --metric-* variables set per stat class. */
.analytics-page .analytics-stat-grid .stat-card {
    --uc-accent: color-mix(in srgb, var(--metric-hover, #91b5d2) 62%, var(--metric-label, #536a80));
    --uc-border: var(--metric-border, color-mix(in srgb, var(--uc-accent) 30%, #fff));
    --uc-value: var(--value-grad, linear-gradient(90deg,#245a91,#3889c9));
    position: relative;
    min-width: 0;
    min-height: 142px;
    padding: 15px;
    overflow: hidden;
    border: 1px solid var(--uc-border);
    border-top: 3px solid var(--uc-accent);
    border-radius: 18px 18px 11px 18px;
    background: var(--metric-surface, linear-gradient(145deg,color-mix(in srgb,var(--uc-accent) 7%,#fff),#fff 76%));
    box-shadow: 0 7px 18px rgba(37,83,120,.07), inset 0 1px rgba(255,255,255,.9);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.analytics-page .analytics-stat-grid .stat-card::before {
    top: 0;
    right: 13px;
    bottom: auto;
    left: 13px;
    width: auto;
    height: 3px;
    border: 0;
    border-radius: 0 0 6px 6px;
    background: linear-gradient(90deg,transparent,var(--uc-accent),transparent);
    filter: none;
    opacity: .72;
}
.analytics-page .analytics-stat-grid .stat-card::after {
    right: 14px;
    bottom: 14px;
    left: auto;
    width: 34px;
    height: 34px;
    border: 1px solid var(--metric-mark, color-mix(in srgb, var(--uc-accent) 26%, #fff));
    border-radius: 50%;
    background: transparent;
    filter: none;
    opacity: .8;
}
.analytics-page .analytics-stat-grid .stat-card:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--uc-accent) 48%, #fff);
    box-shadow: 0 14px 26px color-mix(in srgb, var(--uc-accent) 15%, transparent), inset 0 1px rgba(255,255,255,.9);
}
.analytics-page .analytics-stat-grid .stat-card:hover .stat-icon {
    transform: translateY(-2px) rotate(-5deg);
}
.analytics-page .analytics-stat-grid .stat-icon {
    width: 42px;
    height: 42px;
    margin: 0 0 12px;
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 13px 13px 6px 13px;
    background: var(--icon-bg, linear-gradient(145deg,#1686d5,#44bad0));
    box-shadow: 0 6px 13px color-mix(in srgb, var(--uc-accent) 26%, transparent), inset 0 1px rgba(255,255,255,.4);
}
.analytics-page .analytics-stat-grid .stat-icon svg {
    width: 20px;
    height: 20px;
}
.analytics-page .analytics-stat-grid .stat-info { min-width: 0; gap: 3px; }
.analytics-page .analytics-stat-grid .stat-value {
    overflow-wrap: anywhere;
    margin: 0;
    background: var(--uc-value);
    -webkit-background-clip: text;
    background-clip: text;
    font-size: clamp(18px, 1.8vw, 23px);
    font-weight: 850;
    line-height: 1.2;
    letter-spacing: -.55px;
}
.analytics-page .analytics-stat-grid .stat-label {
    color: var(--metric-label, #536a80);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .55px;
    line-height: 1.4;
    text-transform: uppercase;
}
.analytics-page .analytics-wallet-grid .stat-income {
    --uc-accent: #8ce5f1;
    --metric-border: #3aaed0;
    --metric-mark: rgba(255,255,255,.42);
    --metric-surface: linear-gradient(145deg,#087fc6 0%,#168fd2 52%,#35b8ce 100%);
    --metric-label: rgba(255,255,255,.86);
    --icon-bg: rgba(255,255,255,.2);
    --value-grad: linear-gradient(90deg,#fff,#dcf9ff);
}
.analytics-page .analytics-wallet-grid .stat-income .stat-icon {
    border-color: rgba(255,255,255,.46);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 6px 13px rgba(6,67,111,.18);
}
.analytics-page .analytics-wallet-grid .stat-income .stat-value {
    color: #fff;
    -webkit-text-fill-color: #fff;
    text-shadow: 0 1px 2px rgba(5,58,97,.22);
}
.analytics-page .analytics-wallet-grid .stat-balance {
    --metric-border:#cfe2fb;
    --metric-surface:linear-gradient(145deg,#f0f6ff,#fff 78%);
    --metric-hover:#95bff3;
    --metric-mark:rgba(37,99,235,.28);
    --icon-bg:linear-gradient(145deg,#387de5,#5ba7f3);
    --value-grad:linear-gradient(90deg,#2457a0,#4089d7);
    --metric-label:#6883a3;
}
.analytics-page .analytics-wallet-grid .stat-today {
    --metric-border:#c9ece7;
    --metric-surface:linear-gradient(155deg,#e8fbf8,#fff 76%);
    --metric-hover:#8bd7ca;
    --metric-mark:rgba(13,148,136,.25);
    --icon-bg:linear-gradient(145deg,#0fae9d,#54cbb4);
    --value-grad:linear-gradient(90deg,#0b827d,#1aa798);
    --metric-label:#548b88;
}
.analytics-page .analytics-wallet-grid .stat-investment {
    --metric-border:#ded8f9;
    --metric-surface:linear-gradient(145deg,#f5f2ff,#fff 78%);
    --metric-hover:#b1a0ed;
    --metric-mark:rgba(124,88,217,.25);
    --icon-bg:linear-gradient(145deg,#7457d9,#a178e8);
    --value-grad:linear-gradient(90deg,#6448bc,#9771db);
    --metric-label:#7f729d;
}
.analytics-page .analytics-wallet-grid .stat-diamonds {
    --metric-border:#c4eaf3;
    --metric-surface:linear-gradient(145deg,#eafaff,#fff 80%);
    --metric-hover:#81cde1;
    --metric-mark:rgba(8,145,178,.27);
    --icon-bg:linear-gradient(145deg,#0e9bb8,#58c9dc);
    --value-grad:linear-gradient(90deg,#087f9d,#1aa7bb);
    --metric-label:#528596;
}
.analytics-page .analytics-withdraw-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}
.analytics-page .analytics-withdraw-grid .stat-card {
    min-height: 132px;
    padding: 12px;
}
.analytics-page .analytics-withdraw-grid .stat-icon {
    width: 38px;
    height: 38px;
    margin-bottom: 9px;
}
.analytics-page .analytics-withdraw-grid .stat-label {
    font-size: 8px;
    letter-spacing: .35px;
}
.analytics-page .analytics-withdraw-grid .stat-withdraw {
    --metric-border:#f3ccd4;
    --metric-surface:linear-gradient(110deg,#fff3f5,#fff 78%);
    --metric-hover:#eaa2b0;
    --metric-mark:rgba(225,78,105,.24);
    --icon-bg:linear-gradient(145deg,#e15a73,#f39391);
    --value-grad:linear-gradient(90deg,#bc3853,#e57475);
    --metric-label:#966a75;
}
.analytics-page .analytics-withdraw-grid .stat-processing {
    --metric-border:#cfe1ef;
    --metric-surface:linear-gradient(150deg,#eef7fd,#fff 80%);
    --metric-hover:#91bad4;
    --metric-mark:rgba(67,139,184,.24);
    --icon-bg:linear-gradient(145deg,#4285b5,#76b7d2);
    --value-grad:linear-gradient(90deg,#356c97,#4c9bbd);
    --metric-label:#647f92;
}
.analytics-page .analytics-withdraw-grid .stat-rejected-withdraw {
    --metric-border:#f1cbd2;
    --metric-surface:linear-gradient(145deg,#fff0f3,#fff 80%);
    --metric-hover:#e58d9d;
    --metric-mark:rgba(230,80,112,.24);
    --icon-bg:linear-gradient(145deg,#d94261,#f27d91);
    --value-grad:linear-gradient(90deg,#bb3555,#e96b82);
    --metric-label:#996c78;
}
.analytics-page .analytics-withdraw-grid .stat-pendingpay {
    --metric-border:#f0dfb8;
    --metric-surface:linear-gradient(150deg,#fff9e9,#fff 80%);
    --metric-hover:#e6c97d;
    --metric-mark:rgba(217,151,30,.26);
    --icon-bg:linear-gradient(145deg,#e39a2d,#f1c65a);
    --value-grad:linear-gradient(90deg,#a96812,#ce8c1e);
    --metric-label:#927c58;
}
.analytics-page .analytics-withdraw-grid .stat-txcount {
    --metric-border:#d5e1ed;
    --metric-surface:linear-gradient(130deg,#f0f5fa,#fff 75%);
    --metric-hover:#a8bdcf;
    --metric-mark:rgba(83,112,142,.24);
    --icon-bg:linear-gradient(145deg,#547b9e,#82a9c3);
    --value-grad:linear-gradient(90deg,#385a79,#6888a4);
    --metric-label:#6d8194;
}
.analytics-page .analytics-level-showcase {
    position: relative;
    overflow: hidden;
    border: 1px solid #d9dafa;
    border-radius: 22px 22px 22px 8px;
    background:
        radial-gradient(circle at 96% 4%, rgba(130,115,231,.14), transparent 27%),
        linear-gradient(115deg,#fff 0%,#f8f7ff 62%,#f1f8ff 100%);
    box-shadow: 0 12px 28px rgba(89,75,166,.075);
}
.analytics-page .analytics-level-showcase::after {
    position: absolute;
    right: 22px;
    bottom: 18px;
    width: 86px;
    height: 86px;
    border: 1px dashed rgba(122,103,211,.25);
    border-radius: 50%;
    box-shadow: 0 0 0 11px rgba(122,103,211,.035), 0 0 0 22px rgba(37,99,235,.025);
    content: "";
    pointer-events: none;
}
.analytics-page .analytics-level-showcase .level-progress-track {
    height: 9px;
    background: #e8e9fb;
}
.analytics-page .analytics-level-showcase .level-progress-fill {
    background: linear-gradient(90deg,#6d63dc,#37a9d0,#58c9b0);
    box-shadow: 0 0 15px rgba(68,155,206,.3);
}
.analytics-page .analytics-network-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.analytics-page .analytics-network-grid .stat-direct {
    --metric-border:#c8e4f7;
    --metric-surface:linear-gradient(165deg,#eff9ff,#fff 75%);
    --metric-hover:#86c4eb;
    --metric-mark:rgba(37,99,235,.2);
    --icon-bg:linear-gradient(145deg,#168bd2,#4aaee7);
    --value-grad:linear-gradient(90deg,#246b9f,#278ac1);
    --metric-label:#66839b;
}
.analytics-page .analytics-network-grid .stat-indirect {
    --metric-border:#e0d5f6;
    --metric-surface:linear-gradient(165deg,#f7f2ff,#fff 75%);
    --metric-hover:#b6a1e3;
    --metric-mark:rgba(124,88,217,.2);
    --icon-bg:linear-gradient(145deg,#7858cf,#a180df);
    --value-grad:linear-gradient(90deg,#6147a7,#8a68c7);
    --metric-label:#817298;
}
.analytics-page .analytics-network-grid .stat-level {
    --metric-border:#ccece2;
    --metric-surface:linear-gradient(165deg,#effcf7,#fff 75%);
    --metric-hover:#8bd2bc;
    --metric-mark:rgba(15,145,116,.2);
    --icon-bg:linear-gradient(145deg,#149b83,#55c3a1);
    --value-grad:linear-gradient(90deg,#137862,#24a384);
    --metric-label:#63897e;
}
.analytics-page .analytics-network-grid .stat-team {
    --metric-border:#f0dfb9;
    --metric-surface:linear-gradient(165deg,#fff9e9,#fff 75%);
    --metric-hover:#dfc57f;
    --metric-mark:rgba(206,147,40,.2);
    --icon-bg:linear-gradient(145deg,#d89125,#efbd54);
    --value-grad:linear-gradient(90deg,#9e681d,#c08b2e);
    --metric-label:#8e7d61;
}
/* ---- Investment portfolio panel (used: wraps the investment graph card) ---- */
.analytics-page .analytics-investment-panel {
    position: relative;
    overflow: hidden;
    padding: 18px 20px 20px;
    border: 1px solid #cfe5f1;
    border-radius: 25px 12px 25px 25px;
    background:
        radial-gradient(circle at 96% 4%, rgba(31,181,198,.1), transparent 25%),
        linear-gradient(145deg,#fff,#f5fbff 55%,#f6f8ff);
    box-shadow: 0 15px 34px rgba(28,94,128,.08);
}
.analytics-page .analytics-investment-panel .analytics-section-toolbar {
    align-items: center;
    padding-bottom: 13px;
    border-bottom: 1px solid #e2edf5;
}
/* Footnote style used inside analytics cards (investment panel, etc.) */
.analytics-page .analytics-earnings-note { margin: -2px 4px 20px; color: #7a8fa4; }
.analytics-page .analytics-graph-card {
    position: relative;
    border: 1px solid var(--graph-border, #deebf5);
    border-radius: var(--graph-radius, 20px);
    background: var(--graph-surface, #fff);
    box-shadow: var(--graph-shadow, 0 9px 24px rgba(31,66,98,.065));
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.analytics-page .analytics-graph-card:hover {
    transform: translateY(-3px);
    border-color: var(--graph-hover, #b8d7ee);
    box-shadow: var(--graph-hover-shadow, 0 16px 30px rgba(31,66,98,.105));
}
.analytics-page .analytics-graph-head {
    min-height: 45px;
    border-bottom: 1px solid rgba(53,94,128,.1);
}
.analytics-page .analytics-graph-head h4 {
    color: #203d59;
    font-size: 14px;
}
.analytics-page .analytics-graph-tools { gap: 8px; }
.analytics-page .analytics-graph-tools {
    display:flex;
    align-items:center;
    justify-content:flex-end;
    flex-wrap:wrap;
}
.analytics-page .analytics-graph-range {
    color: #8397a9;
    font-size: 9px;
}
.analytics-page .analytics-mini-filter {
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    gap:6px;
    margin:0;
}
.analytics-page .analytics-mini-filter select {
    width:auto;
    min-width:112px;
    max-width:145px;
    min-height:32px;
    padding:6px 28px 6px 10px;
    border-radius:10px;
    font-size:11px;
}
.analytics-page .analytics-mini-custom { display:none; }
.analytics-page .analytics-mini-filter.is-custom {
    position: relative;
    min-width:min(310px, calc(100vw - 56px));
}
.analytics-page .analytics-mini-filter.is-custom .analytics-mini-custom {
    display:grid;
    position: absolute;
    z-index: 30;
    top: 40px;
    right: 0;
    width: min(260px, calc(100vw - 52px));
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:6px;
    padding:9px 9px 8px;
    border:1px solid #dbeafe;
    border-radius:12px;
    background:#ffffff;
    box-shadow: 0 8px 22px rgba(33, 71, 108, .14), 0 2px 6px rgba(33, 71, 108, .06);
}
.analytics-page .analytics-mini-custom label {
    display:grid;
    gap:3px;
    min-width:0;
    color:#5b7186;
    font-size:10px;
    font-weight:600;
}
.analytics-page .analytics-mini-custom input[type="date"] {
    width:100%;
    min-width:0;
    padding:5px 7px;
    border:1px solid #cbd5e1;
    border-radius:7px;
    background:#f8fafc;
    color:#1e3a5f;
    font-size:11px;
}
.analytics-page .analytics-mini-custom input[type="date"]:focus {
    border-color:#3b82f6;
    background:#fff;
    outline:none;
    box-shadow: 0 0 0 2px rgba(59,130,246,.18);
}
.analytics-page .analytics-mini-custom button {
    grid-column:1 / -1;
    min-height:30px;
    padding:6px 10px;
    border:0;
    border-radius:8px;
    background:linear-gradient(135deg, #3b82f6, #2563eb);
    color:#fff;
    font-size:11px;
    font-weight:700;
    box-shadow:0 3px 8px rgba(37,99,235,.25);
    cursor:pointer;
}
.analytics-page .analytics-mini-custom button:hover {
    background:linear-gradient(135deg, #2563eb, #1d4ed8);
}
.analytics-page .analytics-mini-filter select {
    border-color: #dbe7f0;
    background: rgba(255,255,255,.92);
    color: #42627e;
    box-shadow: 0 2px 5px rgba(36,75,106,.04);
}
.analytics-page .analytics-earnings-grid {
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    align-items:stretch;
    gap:14px;
    margin:10px 0 8px;
}
.analytics-page .analytics-earnings-grid > .analytics-graph-card {
    min-width:0;
    margin:0;
}
.analytics-page .analytics-earnings-grid > .analytics-line-card {
    --graph-border:#c9e1f4;
    --graph-hover:#86c0e8;
    --graph-radius:22px 12px 22px 22px;
    --graph-surface:linear-gradient(145deg,#fff 0%,#f7fbff 72%,#eff8ff);
    --graph-shadow:0 10px 24px rgba(27,111,169,.075);
    --graph-hover-shadow:0 15px 30px rgba(27,111,169,.12);
    padding:13px 17px 10px;
}
.analytics-page .analytics-earnings-grid > .analytics-line-card .analytics-line-summary {
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:12px;
    margin:13px 3px 3px;
}
.analytics-page .analytics-earnings-grid > .analytics-line-card .analytics-line-summary > div > strong {
    color: #164e79;
    display:block;
    font-size: clamp(24px, 2.4vw, 32px);
    line-height:1.05;
    letter-spacing: -1px;
}
.analytics-page .analytics-earnings-grid > .analytics-line-card .analytics-line-summary > div > span {
    color: #7290a8;
    display:block;
    margin-top:4px;
    font-size: 10px;
}
.analytics-page .analytics-earnings-grid > .analytics-line-card .analytics-line-change {
    flex:0 0 auto;
    padding:5px 9px;
    border:1px solid #ccebdd;
    border-radius:999px;
    background:#f0fbf5;
    color:#16805a;
    font-size:10px;
    font-weight:800;
}
.analytics-page .analytics-earnings-grid > .analytics-line-card .analytics-line-svg {
    display:block;
    width:100%;
    min-width:0;
    max-width:100%;
    min-height:0;
    max-height:280px;
    margin:5px 0 0;
}
.analytics-page .analytics-earnings-grid > .analytics-graph--lollipop {
    --graph-border:#ccebdd;
    --graph-hover:#84d2ad;
    --graph-radius:12px 24px 12px 24px;
    --graph-surface:linear-gradient(145deg,#f2fcf6,#fff 68%,#f5fbff);
    --graph-shadow:0 10px 25px rgba(30,139,97,.075);
    padding:13px 15px 10px;
}
.analytics-page .analytics-earnings-grid > .analytics-graph--lollipop .analytics-graph-plot {
    min-width:420px;
    height:155px;
    border:0;
    border-radius:14px;
    background:repeating-linear-gradient(to bottom,transparent 0,transparent 36px,rgba(62,153,116,.1) 37px,transparent 38px);
}
.analytics-page .analytics-earnings-grid > .analytics-graph--lollipop .analytics-graph-bars {
    height:127px;
}
.analytics-page .analytics-line-area {
    fill: color-mix(in srgb, var(--line-color) 15%, transparent);
}
.analytics-page .analytics-line-stroke {
    stroke: var(--line-color);
    filter: drop-shadow(0 4px 5px color-mix(in srgb, var(--line-color) 24%, transparent));
}
.analytics-page .analytics-line-point {
    stroke: var(--line-color);
}
.analytics-page .analytics-line-point:hover {
    fill: color-mix(in srgb, var(--line-color) 22%, white);
}
.analytics-page .analytics-earnings-grid > .analytics-line-card .analytics-line-grid {
    stroke: rgba(70, 132, 180, .16);
}
.analytics-page .analytics-earnings-grid > .analytics-line-card .analytics-trend-bar {
    opacity: .92;
    filter: drop-shadow(0 3px 4px color-mix(in srgb, var(--bar-color, #2563eb) 22%, transparent));
    transition: transform .18s ease, opacity .18s ease, filter .18s ease;
    transform-box: fill-box;
    transform-origin: bottom center;
    animation: analytics-bar-rise .55s cubic-bezier(.22,1,.36,1) both;
}
.analytics-page .analytics-earnings-grid > .analytics-line-card .analytics-trend-bar:hover {
    opacity: 1;
    filter: drop-shadow(0 5px 8px color-mix(in srgb, var(--bar-color, #2563eb) 35%, transparent));
}
.analytics-page .analytics-earnings-grid > .analytics-line-card .analytics-line-stroke {
    stroke: #22c55e;
    stroke-width: 3;
    filter: drop-shadow(0 3px 6px rgba(34,197,94,.28));
}
.analytics-page .analytics-earnings-grid > .analytics-line-card .analytics-line-point {
    fill: #fff;
    stroke: #16a34a;
    stroke-width: 2.5;
}
.analytics-page .analytics-earnings-grid > .analytics-line-card .analytics-line-point:hover {
    fill: #bbf7d0;
}
.analytics-page .analytics-earnings-grid > .analytics-line-card .analytics-line-area {
    fill: url(#analytics-line-fill-earnings);
}
.analytics-page .analytics-earnings-grid > .analytics-line-card .analytics-line-hover-band:hover {
    fill: rgba(37, 99, 235, .09);
}
/* ---- Live Earnings circular card ---- */
.analytics-page .analytics-live-earnings-card {
    --graph-border:#d6ecff;
    --graph-hover:#7ab8e8;
    --graph-radius:12px 22px 22px 22px;
    --graph-surface:linear-gradient(150deg,#f5fbff,#fff 60%,#f2fbf6);
    --graph-shadow:0 10px 26px rgba(40,113,170,.07);
    display:flex;
    flex-direction:column;
}
.analytics-page .analytics-live-earnings-card .live-eyebrow {
    display:inline-flex;
    align-items:center;
    gap:6px;
    color:#0d7ab8;
}
.analytics-page .analytics-live-earnings-card .live-dot {
    width:8px;
    height:8px;
    border-radius:50%;
    background:#22c55e;
    box-shadow:0 0 0 0 rgba(34,197,94,.6);
    animation:live-pulse 1.6s infinite;
}
@keyframes live-pulse {
    0% { box-shadow:0 0 0 0 rgba(34,197,94,.55); }
    70% { box-shadow:0 0 0 8px rgba(34,197,94,0); }
    100% { box-shadow:0 0 0 0 rgba(34,197,94,0); }
}
.analytics-page .analytics-live-earnings-card .live-badge {
    display:inline-flex;
    align-items:center;
    gap:5px;
    padding:4px 10px;
    border-radius:999px;
    background:linear-gradient(135deg,#22c55e,#16a34a);
    color:#fff;
    font-size:10px;
    font-weight:800;
    letter-spacing:.5px;
    box-shadow:0 3px 10px rgba(34,197,94,.3);
}
.analytics-page .analytics-live-earnings-card .live-badge::before {
    content:'';
    width:6px;
    height:6px;
    border-radius:50%;
    background:#fff;
    animation:live-pulse 1.4s infinite;
}
.analytics-page .live-earnings-body {
    display:grid;
    grid-template-columns:auto 1fr;
    align-items:center;
    gap:18px;
    margin-top:6px;
}
.analytics-page .live-donut-wrap {
    width:150px;
    height:150px;
    flex-shrink:0;
}
.analytics-page .live-donut {
    width:100%;
    height:100%;
    overflow:visible;
    filter:drop-shadow(0 6px 12px rgba(37,99,235,.1));
}
.analytics-page .live-donut-ring {
    stroke:#eaf2fb;
}
.analytics-page .live-donut-seg {
    stroke-linecap:round;
    transition:stroke-width .2s ease, filter .2s ease;
    transform-origin:center;
    animation:live-donut-draw 1.1s cubic-bezier(.22,1,.36,1) both;
}
.analytics-page .live-donut-seg:hover {
    stroke-width:15;
    filter:brightness(1.1) drop-shadow(0 0 6px color-mix(in srgb,var(--seg-color,#3b82f6) 60%,transparent));
}
@keyframes live-donut-draw {
    from { stroke-dasharray:0 100; }
}
.analytics-page .live-donut-value {
    fill:#1e3a5f;
    font-size:15px;
    font-weight:850;
}
.analytics-page .live-donut-label {
    fill:#7a93ab;
    font-size:7px;
    font-weight:700;
    letter-spacing:.4px;
}
.analytics-page .live-earnings-stats {
    display:flex;
    flex-direction:column;
    gap:8px;
    min-width:0;
    flex:1;
}
.analytics-page .live-stat-title {
    color:#1e3a5f;
    font-size:12px;
    font-weight:800;
    letter-spacing:.3px;
    text-transform:uppercase;
    margin-bottom:2px;
}
.analytics-page .live-stat {
    display:flex;
    align-items:center;
    gap:8px;
    min-width:0;
}
.analytics-page .live-stat-dot {
    width:10px;
    height:10px;
    border-radius:3px;
    flex-shrink:0;
    box-shadow:0 2px 5px rgba(0,0,0,.12);
}
.analytics-page .live-stat-label {
    color:#64748b;
    font-size:11px;
    font-weight:700;
}
.analytics-page .live-stat-value {
    margin-left:auto;
    color:#1e3a5f;
    font-size:13px;
    font-weight:850;
    white-space:nowrap;
}
.analytics-page .live-stat-sub {
    padding-left:18px;
    margin-top:-3px;
}
.analytics-page .live-stat-sub span {
    color:#94a3b8;
    font-size:10px;
    font-weight:700;
}
.analytics-page .live-stat-bar {
    height:4px;
    margin:1px 0 4px 18px;
    border-radius:999px;
    background:#eef2f7;
    overflow:hidden;
}
.analytics-page .live-stat-bar span {
    display:block;
    height:100%;
    border-radius:999px;
    animation:live-bar-grow .8s cubic-bezier(.22,1,.36,1) both;
}
@keyframes live-bar-grow {
    from { width:0 !important; }
}
.analytics-page .live-earnings-note {
    margin-top:12px;
    color:#94a3b8;
    font-size:10px;
    line-height:1.5;
}
@media (max-width:760px) {
    .analytics-page .live-earnings-body {
        grid-template-columns:1fr;
        justify-items:center;
        text-align:center;
    }
    .analytics-page .live-earnings-stats { width:100%; }
}
.analytics-page [data-analytics-graph-card="investment"] {
    --graph-border:#d9def7;
    --graph-hover:#aaaeea;
    --graph-radius:12px 23px 12px 23px;
    --graph-surface:linear-gradient(150deg,#fff,#f8f7ff);
    --graph-shadow:0 9px 24px rgba(92,79,168,.07);
}
.analytics-page .investment-multi-line-card {
    padding: 14px 17px 11px;
}
.analytics-page .investment-multi-line-card .analytics-line-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    margin: 11px 0 4px;
    padding: 9px 11px;
    border: 1px solid #e2ecf8;
    border-radius: 12px;
    background: linear-gradient(100deg, #eff8ff, #f7f4ff 70%, #fff);
}
.analytics-page .investment-multi-line-card .analytics-line-summary > div {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 3px 7px;
}
.analytics-page .investment-multi-line-card .analytics-line-summary > div > strong {
    display: inline-block;
    margin: 0;
    background: linear-gradient(100deg, #287fc2, #7653d6);
    background-clip: text;
    color: transparent;
    font-size: clamp(16px, 1.7vw, 19px);
    font-weight: 850;
    line-height: 1.1;
    -webkit-background-clip: text;
}
.analytics-page .investment-multi-line-card .analytics-line-summary > div > span {
    display: inline-block;
    margin: 0;
    color: #536d86;
    font-size: 12px;
    font-weight: 650;
}
.analytics-page .investment-multi-line-card .analytics-line-change {
    flex: 0 0 auto;
    margin-left: auto;
    padding: 5px 9px;
    border: 1px solid #e3defa;
    border-radius: 999px;
    background: #fff;
    color: #7256c9;
    font-size: 10px;
    font-weight: 800;
}
.analytics-page .analytics-mini-filter.is-custom .analytics-filter-error:empty {
    display: none;
}
.analytics-page .investment-multi-line-scroll {
    display: flex;
    justify-content: center;
    overflow: visible;
    margin: 4px 0 0;
}
.analytics-page .investment-multi-line-svg {
    width: 100%;
    max-width: 420px;
    min-width: 0;
    max-height: none;
    transform-origin: 50% 50%;
    animation: investmentChartReveal .75s cubic-bezier(.2, .75, .25, 1) both;
}
@keyframes investmentChartReveal {
    from { opacity: 0; transform: scale(.94); }
    to { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    .analytics-page .investment-multi-line-svg { animation: none; }
    .analytics-page .analytics-ring-spin { animation: none; }
}
.analytics-page .investment-donut-orbit {
    fill: none;
    stroke: #e7eaf6;
    stroke-width: 1.3;
    stroke-dasharray: 3 7;
    opacity: .9;
}
.analytics-page .investment-donut-track {
    fill: none;
    stroke-opacity: .12;
    stroke-linecap: round;
}
.analytics-page .investment-donut-segment {
    fill: none;
    stroke-linecap: round;
    filter: drop-shadow(0 3px 5px rgba(44, 69, 91, .18));
    cursor: pointer;
    transition: filter .3s ease, opacity .3s ease, stroke-width .3s ease;
}
.analytics-page .investment-donut-segment:hover {
    filter: drop-shadow(0 4px 8px rgba(53, 69, 103, .34));
    opacity: 1;
    stroke-width: calc(var(--investment-ring-width, 8px) + 2.5px);
}
.analytics-page .investment-donut-center {
    fill: #3899d3;
    stroke: #2f89c0;
    stroke-width: 1;
    filter: drop-shadow(0 3px 7px rgba(42, 125, 180, .22));
}
.analytics-page .investment-donut-kicker {
    fill: #d8efff;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 1.1px;
}
.analytics-page .investment-donut-value {
    fill: #fff;
    font-size: 18px;
    font-weight: 850;
}
.analytics-page .investment-donut-count {
    fill: #d8efff;
    font-size: 8px;
    font-weight: 750;
    letter-spacing: .7px;
}
.analytics-page .investment-multi-line-legend {
    gap: 8px 10px;
    padding-top: 7px;
}
.analytics-page .investment-multi-line-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid #e6edf3;
    border-radius: 10px;
    background: rgba(255, 255, 255, .8);
}
.analytics-page .investment-multi-line-legend .investment-legend-name {
    color: #52667b;
    font-size: 10px;
    font-weight: 700;
}
.analytics-page .investment-multi-line-legend strong {
    color: #243b53;
    font-size: 10px;
    font-weight: 800;
}
.analytics-page .analytics-payment-status-card {
    --graph-border:#d8e8e1;
    --graph-hover:#9ecbb7;
    --graph-radius:32px 12px 32px 12px;
    --graph-surface:linear-gradient(160deg,#fff,#f4fbf6 72%,#f7fbff);
    --graph-shadow:0 10px 24px rgba(40,111,85,.065);
}
/* Donut drop-shadow for payment-status card (used — card emits .donut + .donut-seg) */
.analytics-page .analytics-payment-status-card .donut {
    filter: drop-shadow(0 8px 12px rgba(29,105,82,.1));
}
.analytics-page .analytics-graph--stacked {
    --graph-border:#d0e5f7;
    --graph-hover:#8cc0e8;
    --graph-radius:22px 22px 8px 22px;
    --graph-surface:linear-gradient(155deg,#f4faff,#fff 70%);
    --graph-shadow:0 10px 24px rgba(40,103,160,.065);
}
.analytics-page .analytics-graph--stacked .analytics-graph-stack {
    background: #e6f1fb;
    box-shadow: inset 0 0 0 1px rgba(49,117,174,.08);
}
.analytics-page .analytics-graph--stacked .analytics-graph-segment {
    border-radius: 6px 6px 2px 2px;
    box-shadow: inset 0 1px rgba(255,255,255,.35);
}
/* ---- Chart theme variants: horizontal / area / lollipop / step / heatmap / scatter ----
   Theme vars apply to any .analytics-graph-card; child rules need matching markup. */
/* Base layout for the horizontal share-bar list (.analytics-graph--horizontal) */
.analytics-horizontal-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.analytics-horizontal-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12.5px;
    color: #334155;
}
.analytics-horizontal-item-head b { color: #0f172a; font-weight: 800; }
.analytics-horizontal-track i {
    display: block;
    height: 100%;
}
.analytics-page .analytics-graph--horizontal {
    --graph-border:#f1d8dc;
    --graph-hover:#eab3b9;
    --graph-radius:9px 24px 24px 24px;
    --graph-surface:linear-gradient(135deg,#fff8f8,#fff 70%);
    --graph-shadow:0 9px 22px rgba(169,74,85,.055);
}
.analytics-page .analytics-graph--horizontal .analytics-horizontal-track {
    background: #f8e9eb;
}
.analytics-page .analytics-graph--area {
    --graph-border:#bfe9eb;
    --graph-hover:#73cbd0;
    --graph-radius:23px 9px 23px 9px;
    --graph-surface:linear-gradient(145deg,#effdfc,#fff 65%,#f4faff);
    --graph-shadow:0 10px 24px rgba(18,137,149,.065);
}
.analytics-page .analytics-graph--area .analytics-multi-area { fill-opacity: .3; }
.analytics-page .analytics-graph--area .analytics-multi-line { stroke-width: 3.5; }
.analytics-page [data-analytics-graph-card="withdrawals"].analytics-graph--line .analytics-withdrawal-breakdown {
    width: 100%;
    padding: 3px 2px 1px;
}
.analytics-page [data-analytics-graph-card="withdrawals"].analytics-graph--line .analytics-withdrawal-period {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #7b8da0;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .07em;
    text-transform: uppercase;
}
.analytics-page [data-analytics-graph-card="withdrawals"].analytics-graph--line .analytics-withdrawal-period strong {
    padding: 5px 9px;
    border: 1px solid #e5ebf2;
    border-radius: 999px;
    background: #fff;
    color: #344e68;
    font-size: 11px;
    letter-spacing: 0;
}
.analytics-page [data-analytics-graph-card="withdrawals"].analytics-graph--line .analytics-withdrawal-status-list {
    display: grid;
    gap: 8px;
}
.analytics-page [data-analytics-graph-card="withdrawals"].analytics-graph--line .analytics-withdrawal-breakdown-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(390px, 1fr);
    align-items: center;
    gap: clamp(24px, 4vw, 58px);
}
.analytics-page [data-analytics-graph-card="withdrawals"].analytics-graph--line .analytics-withdrawal-circles {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 12px;
    min-width: 0;
}
.analytics-page [data-analytics-graph-card="withdrawals"].analytics-graph--line .analytics-withdrawal-circle-card {
    display: flex;
    min-width: 100px;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    perspective: 500px;
}
.analytics-page [data-analytics-graph-card="withdrawals"].analytics-graph--line .analytics-withdrawal-circle-card:hover .analytics-withdrawal-circle {
    transform: translateY(-3px) rotateX(7deg) scale(1.04);
    box-shadow: 0 12px 24px color-mix(in srgb, var(--graph-color) 25%, transparent), inset 0 2px 4px #fff, inset 0 -4px 8px rgba(35,55,75,.08);
}
.analytics-page [data-analytics-graph-card="withdrawals"].analytics-graph--line .analytics-withdrawal-circle {
    position: relative;
    display: grid;
    width: 96px;
    height: 96px;
    place-items: center;
    isolation: isolate;
    border: 2px solid color-mix(in srgb, var(--graph-color) 36%, #dfe7ee);
    border-radius: 50%;
    background: radial-gradient(circle at 35% 25%, #fff 0%, color-mix(in srgb, var(--graph-color) 5%, #fff) 72%, color-mix(in srgb, var(--graph-color) 13%, #edf2f6));
    box-shadow: 0 9px 20px color-mix(in srgb, var(--graph-color) 20%, transparent), 0 2px 5px rgba(35,55,75,.08), inset 0 2px 4px #fff, inset 0 -4px 8px rgba(35,55,75,.07);
    transform-style: preserve-3d;
    transition: transform .25s ease, box-shadow .25s ease;
}
.analytics-page [data-analytics-graph-card="withdrawals"].analytics-graph--line .analytics-withdrawal-circle::before {
    position: absolute;
    z-index: 0;
    inset: -2px;
    border-radius: inherit;
    background: conic-gradient(from 0deg, transparent 0deg, color-mix(in srgb, var(--graph-color) 65%, #fff) 35deg, var(--graph-color) 95deg, color-mix(in srgb, var(--graph-color) 45%, #fff) 150deg, transparent 195deg 360deg);
    content: "";
    animation: withdrawal-circle-spin 3s linear infinite;
    filter: drop-shadow(0 1px 3px color-mix(in srgb, var(--graph-color) 65%, transparent));
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 7px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 7px));
}
.analytics-page [data-analytics-graph-card="withdrawals"].analytics-graph--line .analytics-withdrawal-circle strong {
    position: relative;
    z-index: 1;
    max-width: 82px;
    overflow: hidden;
    color: #263f58;
    font-size: 10px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.analytics-page [data-analytics-graph-card="withdrawals"].analytics-graph--line .analytics-withdrawal-circle-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #465a6f;
    font-size: 10px;
    font-weight: 750;
    white-space: nowrap;
}
.analytics-page [data-analytics-graph-card="withdrawals"].analytics-graph--line .analytics-withdrawal-circle-label i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--graph-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--graph-color) 14%, #fff);
}
.analytics-page [data-analytics-graph-card="withdrawals"].analytics-graph--line .analytics-withdrawal-status {
    padding: 9px 12px 10px;
    border: 1px solid color-mix(in srgb, var(--graph-color) 18%, #fff);
    border-radius: 12px;
    background: linear-gradient(105deg, color-mix(in srgb, var(--graph-color) 6%, #fff), #fff 48%);
}
.analytics-page [data-analytics-graph-card="withdrawals"].analytics-graph--line .analytics-withdrawal-status-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 7px;
    color: #42566c;
    font-size: 11px;
}
.analytics-page [data-analytics-graph-card="withdrawals"].analytics-graph--line .analytics-withdrawal-status-head span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 750;
}
.analytics-page [data-analytics-graph-card="withdrawals"].analytics-graph--line .analytics-withdrawal-status-head span i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--graph-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--graph-color) 13%, #fff);
}
.analytics-page [data-analytics-graph-card="withdrawals"].analytics-graph--line .analytics-withdrawal-status-head strong {
    color: #213f5b;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}
.analytics-page [data-analytics-graph-card="withdrawals"].analytics-graph--line .analytics-withdrawal-track {
    height: 8px;
    overflow: hidden;
    border-radius: 99px;
    background: #edf1f5;
}
.analytics-page [data-analytics-graph-card="withdrawals"].analytics-graph--line .analytics-withdrawal-track i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--graph-color), color-mix(in srgb, var(--graph-color) 68%, #fff));
    box-shadow: 0 2px 6px color-mix(in srgb, var(--graph-color) 30%, transparent);
    transition: width .35s ease;
}
@keyframes withdrawal-circle-spin {
    to { transform: rotate(360deg); }
}
@media (max-width: 760px) {
    .analytics-page [data-analytics-graph-card="withdrawals"].analytics-graph--line .analytics-withdrawal-breakdown-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }
    .analytics-page [data-analytics-graph-card="withdrawals"].analytics-graph--line .analytics-withdrawal-circles {
        justify-content: center;
        gap: clamp(18px, 7vw, 46px);
        padding: 5px 0;
    }
}
@media (max-width: 480px) {
    .analytics-page [data-analytics-graph-card="withdrawals"].analytics-graph--line .analytics-withdrawal-circles {
        gap: 10px;
    }
    .analytics-page [data-analytics-graph-card="withdrawals"].analytics-graph--line .analytics-withdrawal-circle-card {
        min-width: 82px;
    }
    .analytics-page [data-analytics-graph-card="withdrawals"].analytics-graph--line .analytics-withdrawal-circle {
        width: 78px;
        height: 78px;
    }
    .analytics-page [data-analytics-graph-card="withdrawals"].analytics-graph--line .analytics-withdrawal-circle strong {
        max-width: 68px;
        font-size: 9px;
    }
    .analytics-page [data-analytics-graph-card="withdrawals"].analytics-graph--line .analytics-withdrawal-circle-label {
        gap: 4px;
        font-size: 9px;
    }
}
.analytics-page .analytics-graph--lollipop {
    --graph-border:#d9e8c8;
    --graph-hover:#aacc82;
    --graph-radius:26px 10px 26px 10px;
    --graph-surface:linear-gradient(150deg,#f8fdf1,#fff 72%);
    --graph-shadow:0 9px 22px rgba(83,122,52,.06);
}
.analytics-page .analytics-graph--lollipop .analytics-graph-bar {
    position: relative;
    width: 4px;
    overflow: visible;
    border-radius: 99px;
    background: linear-gradient(180deg,#75bd68,#a7d677);
}
.analytics-page .analytics-graph--lollipop .analytics-graph-bar::after {
    position: absolute;
    top: -5px;
    left: 50%;
    width: 13px;
    height: 13px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #55a95c;
    box-shadow: 0 2px 6px rgba(64,139,72,.22);
    content: "";
    transform: translateX(-50%);
}
.analytics-page .analytics-graph--step {
    --graph-border:#cdddf5;
    --graph-hover:#98b6e7;
    --graph-radius:10px 24px 10px 24px;
    --graph-surface:linear-gradient(140deg,#f4f7ff,#fff 72%);
    --graph-shadow:0 9px 22px rgba(54,91,158,.06);
}
.analytics-page .analytics-graph--step .analytics-multi-line {
    stroke-width: 4;
    stroke-dasharray: none;
}
.analytics-page .analytics-graph--heatmap {
    --graph-border:#dcd8f5;
    --graph-hover:#afa3e7;
    --graph-radius:24px 10px 24px 10px;
    --graph-surface:linear-gradient(145deg,#f8f6ff,#fff 70%);
    --graph-shadow:0 9px 22px rgba(104,83,170,.065);
}
.analytics-page .analytics-graph--heatmap .analytics-heat-cell i { border-radius: 7px 14px 7px 14px; }
.analytics-page .analytics-graph--scatter {
    --graph-border:#cbe8de;
    --graph-hover:#8dcab3;
    --graph-radius:10px 24px 10px 24px;
    --graph-surface:linear-gradient(145deg,#f0fbf7,#fff 70%);
    --graph-shadow:0 9px 22px rgba(41,125,97,.06);
}
.analytics-page .analytics-graph--scatter .analytics-multi-point { stroke-width: 4; }
.analytics-page .analytics-graph--horizontal .analytics-horizontal-item { margin-bottom: 10px; }
.analytics-page .analytics-graph--horizontal .analytics-horizontal-track {
    height: 8px;
    border-radius: 99px;
    overflow: hidden;
}
.analytics-page .analytics-graph--horizontal .analytics-horizontal-track i {
    border-radius: inherit;
}
.analytics-page .analytics-graph--stacked .analytics-graph-stack { border-radius: 8px; }
.analytics-page .analytics-graph--heatmap .analytics-heat-cell i {
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.52), 0 3px 8px rgba(90,75,145,.08);
}
.analytics-page .analytics-payment-status-card .donut-wrap {
    padding: 10px 0 4px;
}
.analytics-page .analytics-payment-status-card .donut-seg {
    filter: drop-shadow(0 1px 2px rgba(31,74,54,.12));
}
/* ---- Payment purposes card: donut + per-purpose share bars (used by analytics.php) ---- */
.analytics-page .analytics-payment-purpose-card {
    background: linear-gradient(160deg,#f8fafc 0%,#fff 60%,#f5f3ff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 18px 20px 16px;
    box-shadow: 0 10px 30px rgba(79,70,229,.07);
}
.analytics-page .analytics-payment-purpose-card .analytics-graph-tools {
    align-items: flex-start;
}
.analytics-page .analytics-payment-purpose-card .analytics-graph-range {
    color: #6366f1;
    font-size: 11px;
    font-weight: 700;
    border-color: #c7d2fe;
    background: #eef2ff;
    padding: 6px 12px;
    margin-top: 2px;
}
.analytics-page .analytics-payment-purpose-card .analytics-graph-sub {
    margin: 4px 0 0;
    font-size: 12px;
    color: #64748b;
    font-weight: 400;
}
.analytics-page .payment-purpose-layout {
    display: grid;
    grid-template-columns: minmax(180px,260px) 1fr;
    gap: 22px;
    align-items: center;
    margin-top: 14px;
}
.analytics-page .payment-purpose-donut {
    display: flex;
    justify-content: center;
    align-items: center;
}
.analytics-page .payment-purpose-svg {
    width: 100%;
    max-width: 220px;
    height: auto;
    filter: drop-shadow(0 8px 18px rgba(99,102,241,.12));
}
.analytics-page .payment-purpose-svg .donut-ring { stroke: #e2e8f0; }
.analytics-page .payment-purpose-svg .donut-seg {
    stroke-linecap: round;
    transition: stroke-width .25s ease, filter .25s ease;
}
.analytics-page .payment-purpose-svg .donut-seg:hover {
    stroke-width: 6.5;
    filter: drop-shadow(0 0 6px currentColor);
}
.analytics-page .payment-purpose-svg .donut-center-value {
    font-size: 7px;
    font-weight: 700;
    fill: #1e293b;
}
.analytics-page .payment-purpose-svg .donut-center-label {
    font-size: 2.6px;
    font-weight: 600;
    fill: #64748b;
    letter-spacing: .3px;
    text-transform: uppercase;
}
.analytics-page .payment-purpose-svg .payment-purpose-total {
    font-size: 2.8px;
    font-weight: 700;
    fill: #6366f1;
}
.analytics-page .payment-purpose-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.analytics-page .payment-purpose-item {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 14px;
    padding: 10px 14px;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.analytics-page .payment-purpose-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15,23,42,.06);
    border-color: #c7d2fe;
}
.analytics-page .payment-purpose-item-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.analytics-page .payment-purpose-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(255,255,255,.6), 0 1px 3px rgba(15,23,42,.15);
}
.analytics-page .payment-purpose-name {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    flex: 1;
}
.analytics-page .payment-purpose-count {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
}
.analytics-page .payment-purpose-bar {
    height: 6px;
    background: #f1f5f9;
    border-radius: 999px;
    overflow: hidden;
}
.analytics-page .payment-purpose-bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
    transition: width .6s cubic-bezier(.22,1,.36,1);
}
.analytics-page .payment-purpose-item-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
}
.analytics-page .payment-purpose-amount {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}
.analytics-page .payment-purpose-percent {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
}
@media (max-width: 640px) {
    .analytics-page .payment-purpose-layout {
        grid-template-columns: 1fr;
    }
    .analytics-page .payment-purpose-svg { max-width: 180px; }
}
/* Graph-grid helpers (used: tasks + store chart pairs share these classes) */
.analytics-page .analytics-graph-grid,
.analytics-page .charts-grid.analytics-featured-graphs {
    gap: 15px;
}
.analytics-page .analytics-withdraw-grid .stat-card:nth-child(1) {
    border: 1px solid #f0c9d0;
    border-radius: 22px 8px 22px 8px;
    background: linear-gradient(135deg,#fff0f2,#fff 76%);
}
.analytics-page .analytics-withdraw-grid .stat-card:nth-child(2) {
    border: 1px solid #f0dfb5;
    border-top: 4px solid #e3a23a;
    border-radius: 8px 8px 20px 20px;
    background: linear-gradient(160deg,#fff9e8,#fff 80%);
}
.analytics-page .analytics-withdraw-grid .stat-card:nth-child(3) {
    border: 1px solid #d9e0e9;
    border-right: 4px solid #8295aa;
    border-radius: 18px 8px 18px 8px;
    background: linear-gradient(145deg,#f1f4f8,#fff 78%);
}
.analytics-page .analytics-kpis-diamonds .analytics-kpi {
    translate: 0 0;
    border: 1px solid var(--ak-border, #e2e8f0);
    border-top: 3px solid color-mix(in srgb, var(--ak-label, #64748b) 66%, #fff);
    border-radius: 14px;
    box-shadow: 0 5px 13px rgba(32,91,107,.045);
}
.analytics-page .analytics-kpis-tasks .analytics-kpi {
    translate: 0 0;
    border: 1px solid var(--ak-border, #e2e8f0);
    border-top: 3px solid color-mix(in srgb, var(--ak-label, #64748b) 66%, #fff);
    border-radius: 14px;
    background: linear-gradient(145deg, var(--ak-bg, #f8fafc), #fff 82%);
    box-shadow: 0 5px 13px rgba(32,91,107,.045);
}
.analytics-page .analytics-kpis-store .analytics-kpi:nth-child(1) { border-radius: 22px 8px 8px 8px; border-top: 3px solid #4f8ed9; }
.analytics-page .analytics-kpis-store .analytics-kpi:nth-child(2) { border-radius: 8px 22px 8px 8px; border-right: 3px solid #43b18e; }
.analytics-page .analytics-kpis-store .analytics-kpi:nth-child(3) { border-radius: 8px 8px 22px 8px; border-bottom: 3px solid #e1ac4f; }
.analytics-page .analytics-kpis-store .analytics-kpi:nth-child(4) { border-radius: 8px 8px 8px 22px; border-left: 3px solid #de7087; }
.analytics-page .analytics-kpis-store .analytics-kpi:nth-child(5) { border-radius: 18px 7px 18px 7px; border: 1px dashed #c7b9eb; }
.analytics-page .analytics-kpis-referrals .analytics-kpi:nth-child(1) {
    border: 1px solid #c8def4;
    border-radius: 26px 8px 8px 8px;
    background: linear-gradient(145deg,#eef7ff,#fff 78%);
}
.analytics-page .analytics-kpis-referrals .analytics-kpi:nth-child(2) {
    border: 1px solid #dfd3f1;
    border-radius: 8px 26px 8px 8px;
    background: linear-gradient(145deg,#f8f2ff,#fff 78%);
}
.analytics-page .analytics-kpis-referrals .analytics-kpi:nth-child(3) {
    border: 1px solid #cae8dc;
    border-radius: 8px 8px 8px 26px;
    background: linear-gradient(145deg,#effbf5,#fff 78%);
}
.analytics-page .analytics-kpis-referrals .analytics-kpi:nth-child(4) {
    border: 1px solid #f0dfb9;
    border-radius: 8px 8px 26px 8px;
    background: linear-gradient(145deg,#fff9ea,#fff 78%);
}
.analytics-page [data-analytics-graph-card="earnings"] .analytics-eyebrow { color:#1876bb; }
.analytics-page .analytics-earnings-grid > .analytics-graph--lollipop .analytics-eyebrow { color:#14845d; }
.analytics-page [data-analytics-graph-card="investment"] .analytics-eyebrow { color:#7659c7; }
.analytics-page [data-analytics-graph-card="payment_status"] .analytics-eyebrow { color:#27886a; }
.analytics-page .analytics-graph--stacked .analytics-eyebrow { color:#267bb7; }
.analytics-page .analytics-graph--horizontal .analytics-eyebrow { color:#c35368; }
.analytics-page .analytics-graph--area .analytics-eyebrow { color:#078f9b; }
.analytics-page .analytics-graph--lollipop .analytics-eyebrow { color:#568f44; }
.analytics-page .analytics-graph--step .analytics-eyebrow { color:#386ac1; }
.analytics-page .analytics-graph--heatmap .analytics-eyebrow { color:#7355bf; }
.analytics-page .analytics-graph--scatter .analytics-eyebrow { color:#188d75; }
.analytics-page [data-analytics-graph-card="earnings"] .analytics-mini-filter select { border-color:#b9d9ef; color:#176aa6; }
.analytics-page [data-analytics-graph-card="investment"] .analytics-mini-filter select { border-color:#d5cbf2; color:#6950b5; }
.analytics-page .analytics-graph--stacked .analytics-mini-filter select { border-color:#c7e0f2; color:#2473a8; }
.analytics-page .analytics-graph--horizontal .analytics-mini-filter select { border-color:#edcbd0; color:#b64d60; }
.analytics-page .analytics-graph--area .analytics-mini-filter select { border-color:#bde5e1; color:#117e82; }
.analytics-page .analytics-graph--lollipop .analytics-mini-filter select { border-color:#d7e6c1; color:#568a45; }
.analytics-page .analytics-graph--step .analytics-mini-filter select { border-color:#cbd9f2; color:#3c66ac; }
.analytics-page .analytics-graph--heatmap .analytics-mini-filter select { border-color:#d8d0f0; color:#7158b5; }
.analytics-page .analytics-graph--scatter .analytics-mini-filter select { border-color:#c4e4d8; color:#21806e; }
.analytics-page .analytics-graph--lollipop .analytics-graph-plot { align-items:flex-end; }
.analytics-page .analytics-graph--scatter .analytics-multi-scroll {
    border-radius: 14px;
    background-image: radial-gradient(rgba(38,149,119,.12) .8px, transparent .8px);
    background-size: 15px 15px;
}
.analytics-page .analytics-data-note {
    padding-left: 11px;
    border-left: 2px solid #bedbed;
    color: #788da1;
    font-size: 10px;
}
.analytics-page .analytics-filter-error {
    border-radius: 10px;
    background: #fff5f5;
    padding: 8px 10px;
}
@media (max-width: 1050px) {
    .analytics-page .analytics-period-panel {
        grid-template-columns: minmax(150px, .7fr) minmax(0, 1.5fr);
    }
    .analytics-page .analytics-period-panel .filter-current {
        grid-column: 1 / -1;
        justify-content: flex-start;
        padding-top: 7px;
        border-top: 1px solid #edf2f7;
    }
    .analytics-page .analytics-wallet-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .main-content.analytics-page { padding-right: 13px; padding-left: 13px; }
    .analytics-page .analytics-period-panel { grid-template-columns: minmax(0, 1fr); }
    .analytics-page .analytics-period-panel .filter-current { grid-column: auto; }
    .analytics-page .analytics-period-panel .history-filter-presets { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
    .analytics-page .analytics-earnings-grid { grid-template-columns: minmax(0, 1fr); }
    .analytics-page [data-analytics-graph-card="earnings"] .analytics-line-svg { width: 100%; min-width: 0; max-width: 100%; }
    .analytics-page .investment-multi-line-svg { min-width: 0; }
    .analytics-page .analytics-wallet-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .analytics-page .analytics-withdraw-grid,
    .analytics-page .analytics-network-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .analytics-page .analytics-featured-graphs { grid-template-columns: minmax(0, 1fr); }
    .analytics-page .analytics-kpis-store { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
    .analytics-page .content-header { border-radius: 17px; }
    .analytics-page .analytics-account-hero { padding: 15px; border-radius: 19px; }
    .analytics-page .analytics-account-hero .account-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .analytics-page .analytics-account-hero .account-fact { padding: 7px 9px; }
    .analytics-page .analytics-wallet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .analytics-page .analytics-stat-grid .stat-card { min-height: 124px; padding: 13px; }
    .analytics-page .analytics-kpis-diamonds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .analytics-page .analytics-section-heading { margin-top: 25px; font-size: 14px; }
    .analytics-page .analytics-section-heading::after { font-size: 8px; letter-spacing: .8px; }
}
@media (prefers-reduced-motion: reduce) {
    .analytics-page *,
    .analytics-page *::before,
    .analytics-page *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* Unified member dashboard metric cards */
.dashboard-home-page .dashboard-overview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}
.dashboard-home-page .dashboard-overview-copy {
    min-width: 0;
}
.dashboard-home-page .dashboard-overview-date {
    min-width: 176px;
    padding: 12px 15px;
    border-color: rgba(67, 126, 188, 0.18);
    border-radius: 15px;
    background: linear-gradient(135deg, #f2f8ff, #fff 58%, #eafaff);
    box-shadow: 0 12px 26px -22px rgba(23, 70, 112, 0.55);
}
.dashboard-home-page .dashboard-overview-date span {
    color: #66809d;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: none;
}
.dashboard-home-page .dashboard-overview-date strong {
    color: #244566;
    font-size: 13px;
    text-shadow: none;
}
.dashboard-home-page .dashboard-overview-date .dashboard-overview-time-label {
    margin-top: 4px;
}
@media (max-width: 640px) {
    .dashboard-home-page .dashboard-overview-header {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }
    .dashboard-home-page .dashboard-overview-date {
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center;
        gap: 5px 12px;
        width: 100%;
        min-width: 0;
    }
    .dashboard-home-page .dashboard-overview-date strong {
        text-align: right;
    }
}

.dashboard-home-page .stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}
.dashboard-home-page .stat-grid > .stat-card {
    --dash-accent:#3986d9;
    --dash-soft:#eff7ff;
    --dash-border:#d5e6f6;
    --dash-value:linear-gradient(90deg,#245a91,#3889c9);
    position:relative;
    min-width:0;
    min-height:142px;
    padding:15px;
    overflow:hidden;
    border:1px solid var(--dash-border);
    border-top:3px solid var(--dash-accent);
    border-radius:18px 18px 11px 18px;
    background:linear-gradient(145deg,var(--dash-soft),#fff 76%);
    box-shadow:0 7px 18px rgba(37,83,120,.07), inset 0 1px rgba(255,255,255,.9);
    backdrop-filter:none;
    -webkit-backdrop-filter:none;
    transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;
}
.dashboard-home-page .stat-grid > .stat-card::before {
    top:0;
    right:13px;
    left:13px;
    width:auto;
    height:3px;
    border-radius:0 0 6px 6px;
    background:linear-gradient(90deg,transparent,var(--dash-accent),transparent);
    filter:none;
    opacity:.72;
}
.dashboard-home-page .stat-grid > .stat-card::after {
    right:14px;
    bottom:14px;
    left:auto;
    width:34px;
    height:34px;
    border:1px solid color-mix(in srgb,var(--dash-accent) 26%,white);
    border-radius:50%;
    background:transparent;
    filter:none;
    opacity:.8;
}
.dashboard-home-page .stat-grid > .stat-card:hover {
    transform:translateY(-4px);
    border-color:color-mix(in srgb,var(--dash-accent) 48%,white);
    background:linear-gradient(145deg,var(--dash-soft),#fff 76%);
    box-shadow:0 14px 26px color-mix(in srgb,var(--dash-accent) 15%,transparent),inset 0 1px rgba(255,255,255,.9);
}
.dashboard-home-page .stat-grid > .stat-card .stat-icon {
    width:42px;
    height:42px;
    margin:0 0 12px;
    border:1px solid rgba(255,255,255,.72);
    border-radius:13px 13px 6px 13px;
    background:linear-gradient(145deg,color-mix(in srgb,var(--dash-accent) 78%,white),var(--dash-accent));
    box-shadow:0 6px 13px color-mix(in srgb,var(--dash-accent) 26%,transparent),inset 0 1px rgba(255,255,255,.4);
}
.dashboard-home-page .stat-grid > .stat-card .stat-icon svg { width:20px; height:20px; }
.dashboard-home-page .stat-grid > .stat-card .stat-info { min-width:0; gap:3px; }
.dashboard-home-page .stat-grid > .stat-card .stat-value {
    overflow-wrap:anywhere;
    margin:0;
    background:var(--dash-value);
    background-clip:text;
    font-size:clamp(18px,1.8vw,23px);
    letter-spacing:-.55px;
    -webkit-background-clip:text;
}
.dashboard-home-page .stat-grid > .stat-card .stat-label {
    color:color-mix(in srgb,var(--dash-accent) 58%,#52677b);
    font-size:9px;
    font-weight:800;
    letter-spacing:.9px;
    line-height:1.35;
    text-transform:uppercase;
}
.dashboard-home-page .stat-grid > .stat-income {
    --dash-accent:#178bc7;
    --dash-soft:#eaf8ff;
    --dash-border:#bfe4f4;
    --dash-value:linear-gradient(90deg,#14679f,#25a4cb);
    grid-column:span 2;
}
.dashboard-home-page .stat-grid > .stat-balance {
    --dash-accent:#18a88e;
    --dash-soft:#eafbf7;
    --dash-border:#c5ede4;
    --dash-value:linear-gradient(90deg,#117c70,#20ad96);
}
.dashboard-home-page .stat-grid > .stat-investment,
.dashboard-home-page .stat-grid > .stat-package {
    --dash-accent:#825fd2;
    --dash-soft:#f4f0ff;
    --dash-border:#ded5f6;
    --dash-value:linear-gradient(90deg,#6448ae,#9872d7);
}
.dashboard-home-page .stat-grid > .stat-today {
    --dash-accent:#e07c51;
    --dash-soft:#fff4ed;
    --dash-border:#f5d7c7;
    --dash-value:linear-gradient(90deg,#b55b38,#dc8551);
}
.dashboard-home-page .stat-grid > .stat-level {
    --dash-accent:#cc9a2e;
    --dash-soft:#fff9e8;
    --dash-border:#f0e0b4;
    --dash-value:linear-gradient(90deg,#926817,#c99a2e);
}
.dashboard-home-page .stat-grid > .stat-diamonds {
    --dash-accent:#139db8;
    --dash-soft:#eafaff;
    --dash-border:#c5eaf1;
    --dash-value:linear-gradient(90deg,#087b96,#1ba5bb);
}
.dashboard-home-page .stat-grid > .stat-direct {
    --dash-accent:#3f9c69;
    --dash-soft:#effaf2;
    --dash-border:#cfe9d5;
    --dash-value:linear-gradient(90deg,#347d50,#51aa6c);
}
.dashboard-home-page .stat-grid > .stat-indirect {
    --dash-accent:#3c8dbb;
    --dash-soft:#eef8ff;
    --dash-border:#cee5f2;
    --dash-value:linear-gradient(90deg,#326f99,#459bc4);
}
.dashboard-home-page .stat-grid > .stat-card .stat-value-sm {
    font-size:clamp(15px,1.55vw,20px);
}

.analytics-page .analytics-wallet-grid {
    grid-template-columns:repeat(5,minmax(0,1fr));
}
/* KPI mini cards follow the same design language as the metric cards */
.analytics-page .analytics-kpi {
    --uc-accent:var(--ak-label,#64748b);
    position:relative;
    min-height:82px;
    padding:12px 14px;
    border:1px solid var(--ak-border,rgba(15,23,42,.08));
    border-top:3px solid var(--uc-accent);
    border-radius:15px 15px 8px 15px;
    background:linear-gradient(145deg,var(--ak-bg,#f8fafc),#fff 82%);
    box-shadow:0 6px 15px color-mix(in srgb,var(--uc-accent) 9%,transparent),inset 0 1px rgba(255,255,255,.9);
}
.analytics-page .analytics-kpi::after {
    top:auto;
    right:10px;
    bottom:10px;
    width:22px;
    height:22px;
    border:1px solid color-mix(in srgb,var(--uc-accent) 30%,#fff);
    border-radius:50%;
    background:transparent;
}
.analytics-page .analytics-kpi:hover {
    transform:translateY(-3px);
    border-color:color-mix(in srgb,var(--uc-accent) 45%,#fff);
    box-shadow:0 12px 22px color-mix(in srgb,var(--uc-accent) 15%,transparent),inset 0 1px rgba(255,255,255,.9);
}
@media (max-width:1100px) {
    .dashboard-home-page .stat-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
    .analytics-page .analytics-wallet-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
@media (max-width:768px) {
    .dashboard-home-page .stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; }
    .dashboard-home-page .stat-grid > .stat-card { min-height:124px; padding:13px; }
    .dashboard-home-page .stat-grid > .stat-income { grid-column:1 / -1; }
    .analytics-page .analytics-wallet-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:380px) {
    .dashboard-home-page .stat-grid > .stat-card { min-height:116px; padding:11px; }
    .dashboard-home-page .stat-grid > .stat-card .stat-value { font-size:17px; }
    .dashboard-home-page .stat-grid > .stat-card .stat-label { font-size:8px; letter-spacing:.55px; }
}

.dashboard-home-page .qmenu-header-badge,
.dashboard-home-page .qmenu-icon {
    width:42px;
    height:42px;
    border:1px solid rgba(255,255,255,.72);
    border-radius:13px 13px 6px 13px;
    box-shadow:0 6px 13px color-mix(in srgb,var(--i-glow,rgba(37,99,235,.35)) 42%,transparent),
        inset 0 1px rgba(255,255,255,.4),
        inset 0 -2px 4px rgba(15,23,42,.12);
}
.dashboard-home-page .qmenu-header-badge {
    --i-grad:linear-gradient(145deg,#5296e8,#2b78c9);
    --i-glow:rgba(43,120,201,.38);
    flex:0 0 42px;
    background:var(--i-grad);
}
.dashboard-home-page .qmenu-icon {
    background:var(--i-grad,linear-gradient(145deg,#5296e8,#2b78c9));
    transition:transform .2s ease,box-shadow .2s ease;
}
.dashboard-home-page .qmenu-icon::after {
    top:4px;
    right:6px;
    left:6px;
    height:2px;
    border-radius:999px;
    background:rgba(255,255,255,.48);
}
.dashboard-home-page .qmenu-icon svg,
.dashboard-home-page .qmenu-header-badge svg {
    width:20px;
    height:20px;
    filter:drop-shadow(0 1px 2px rgba(15,23,42,.14));
}
.dashboard-home-page .qmenu-tile:hover .qmenu-icon {
    transform:translateY(-2px) rotate(-5deg);
    box-shadow:0 9px 16px color-mix(in srgb,var(--i-glow,rgba(37,99,235,.35)) 48%,transparent),
        inset 0 1px rgba(255,255,255,.48),
        inset 0 -2px 4px rgba(15,23,42,.12);
}
@media (max-width:600px) {
    .dashboard-home-page .qmenu-icon,
    .dashboard-home-page .qmenu-header-badge {
        width:42px;
        height:42px;
    }
}

.dashboard-home-page .stat-grid > .stat-income {
    --dash-accent:#8ce5f1;
    --dash-border:#3aaed0;
    --dash-value:linear-gradient(90deg,#fff,#dffaff);
    border-color:var(--dash-border);
    border-top-color:#a4f0f7;
    background:linear-gradient(145deg,#087fc6 0%,#168fd2 52%,#35b8ce 100%);
    box-shadow:0 13px 27px rgba(18,125,183,.2),inset 0 1px rgba(255,255,255,.28);
}
.dashboard-home-page .stat-grid > .stat-income .stat-icon {
    border-color:rgba(255,255,255,.46);
    background:rgba(255,255,255,.2);
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.18),0 6px 13px rgba(6,67,111,.18);
}
.dashboard-home-page .stat-grid > .stat-income .stat-value {
    background:var(--dash-value);
    background-clip:text;
    color:#fff;
    -webkit-background-clip:text;
    -webkit-text-fill-color:#fff;
}
.dashboard-home-page .stat-grid > .stat-income .stat-label {
    color:rgba(255,255,255,.82);
}
.dashboard-home-page .stat-grid > .stat-income::after {
    border-color:rgba(255,255,255,.42);
}
.dashboard-home-page .stat-grid > .stat-income:hover {
    background:linear-gradient(145deg,#0876b8 0%,#1284c5 52%,#2caec5 100%);
    box-shadow:0 17px 32px rgba(18,125,183,.27),inset 0 1px rgba(255,255,255,.32);
}
.dashboard-home-page .stat-grid > .stat-package {
    --dash-accent:hsl(var(--package-hue,267) 56% 50%);
    --dash-soft:hsl(var(--package-hue,267) 85% 97%);
    --dash-border:hsl(var(--package-hue,267) 55% 86%);
    --dash-value:linear-gradient(90deg,hsl(var(--package-hue,267) 48% 34%),hsl(var(--package-hue,267) 56% 52%));
}
.dashboard-home-page .stat-grid > .stat-card .stat-value {
    font-size:clamp(18px,1.8vw,23px);
    font-weight:850;
    line-height:1.2;
    letter-spacing:-.35px;
}
.dashboard-home-page .stat-grid > .stat-card .stat-value-sm {
    font-size:clamp(15px,1.55vw,20px);
    line-height:1.25;
}
.dashboard-home-page .stat-grid > .stat-card .stat-label {
    color:#40566d;
    font-size:9px;
    font-weight:850;
    letter-spacing:.55px;
    line-height:1.4;
}
.dashboard-home-page .stat-grid > .stat-income .stat-label {
    color:rgba(255,255,255,.94);
}
.dashboard-home-page .stat-grid > .stat-income .stat-value {
    text-shadow:0 1px 2px rgba(5,58,97,.22);
}
.analytics-page .analytics-kpi-grid .analytics-kpi span,
.analytics-page .analytics-kpi-grid .analytics-kpi small {
    font-size:11px;
    line-height:1.4;
}
.analytics-page .analytics-kpi-grid .analytics-kpi strong {
    font-size:18px;
    line-height:1.25;
}
.dashboard-home-page .dashboard-level-progress {
    position:relative;
    margin:4px 0 20px;
    padding:15px 17px 13px;
    overflow:hidden;
    border:1px solid var(--lvl-border,rgba(59,130,246,.2));
    border-radius:18px 18px 10px 18px;
    background:linear-gradient(125deg,color-mix(in srgb,var(--lvl-a,#3b82f6) 9%,white),#fff 58%,color-mix(in srgb,var(--lvl-b,#2563eb) 7%,white));
    box-shadow:0 8px 20px color-mix(in srgb,var(--lvl-b,#2563eb) 10%,transparent),inset 0 1px rgba(255,255,255,.9);
}
.dashboard-home-page .dashboard-level-progress::before {
    position:absolute;
    top:0;
    left:16px;
    right:16px;
    height:3px;
    border-radius:0 0 8px 8px;
    background:var(--lvl-grad,linear-gradient(90deg,#3b82f6,#22c1c3));
    content:"";
}
.dashboard-home-page .dashboard-level-progress-head {
    display:flex;
    align-items:center;
    gap:12px;
}
.dashboard-home-page .dashboard-level-progress .level-badge {
    flex:0 0 46px;
    width:46px;
    height:46px;
    border-radius:14px 14px 7px 14px;
    font-size:11px;
    box-shadow:0 6px 13px var(--lvl-glow,rgba(37,99,235,.25)),inset 0 0 0 2px rgba(255,255,255,.42);
}
.dashboard-home-page .dashboard-level-progress-title {
    flex:1;
    min-width:0;
}
.dashboard-home-page .dashboard-level-progress-title h3 {
    margin:0 0 3px;
    color:#243b53;
    font-size:14px;
    font-weight:850;
}
.dashboard-home-page .dashboard-level-progress-title p {
    margin:0;
    color:#61758a;
    font-size:11px;
    line-height:1.4;
}
.dashboard-home-page .dashboard-level-progress-percent {
    color:var(--lvl-b,#2563eb);
    font-size:17px;
    font-weight:850;
}
.dashboard-home-page .dashboard-level-progress-track {
    height:8px;
    margin-top:13px;
    overflow:hidden;
    border-radius:999px;
    background:color-mix(in srgb,var(--lvl-a,#3b82f6) 12%,white);
    box-shadow:inset 0 1px 2px rgba(23,48,74,.08);
}
.dashboard-home-page .dashboard-level-progress-track span {
    display:block;
    height:100%;
    border-radius:inherit;
    background:var(--lvl-grad,linear-gradient(90deg,#3b82f6,#22c1c3));
    box-shadow:0 0 10px var(--lvl-glow,rgba(37,99,235,.24));
    transition:width .6s ease;
}
.dashboard-home-page .dashboard-level-progress-meta {
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:7px 16px;
    margin-top:10px;
    color:#5c7085;
    font-size:10.5px;
    line-height:1.4;
}
.dashboard-home-page .dashboard-level-progress-meta strong {
    color:#263e57;
    font-weight:850;
}
.dashboard-home-page .dashboard-level-progress-meta .dashboard-level-pending {
    color:#98621d;
}
.dashboard-home-page .dashboard-level-link {
    margin-left:auto;
    padding:6px 10px;
    border:1px solid color-mix(in srgb,var(--lvl-b,#2563eb) 24%,white);
    border-radius:999px;
    background:color-mix(in srgb,var(--lvl-a,#3b82f6) 8%,white);
    color:var(--lvl-b,#2563eb);
    font-size:10px;
    font-weight:800;
    text-decoration:none;
    transition:background .18s ease,transform .18s ease;
}
.dashboard-home-page .dashboard-level-link:hover {
    transform:translateY(-1px);
    background:color-mix(in srgb,var(--lvl-a,#3b82f6) 15%,white);
}
@media (max-width:600px) {
    .dashboard-home-page .dashboard-level-progress { padding:14px 13px 12px; }
    .dashboard-home-page .dashboard-level-progress-head { gap:9px; }
    .dashboard-home-page .dashboard-level-progress-meta { gap:7px 11px; }
    .dashboard-home-page .dashboard-level-link { margin-left:0; }
}
.dashboard-home-page .dashboard-profile-snapshot {
    margin:0 0 20px;
    padding:15px 17px;
    border:1px solid rgba(67,146,220,.19);
    border-radius:18px 18px 10px 18px;
    background:linear-gradient(125deg,#f2f9ff 0%,#fff 48%,#f1fbfa 100%);
    box-shadow:0 8px 22px rgba(31,94,149,.08),inset 0 1px rgba(255,255,255,.95);
}
.dashboard-home-page .dashboard-profile-head {
    display:flex;
    align-items:center;
    gap:11px;
    padding-bottom:12px;
    border-bottom:1px solid rgba(77,123,164,.12);
}
.dashboard-home-page .dashboard-profile-icon {
    display:grid;
    flex:0 0 40px;
    width:40px;
    height:40px;
    place-items:center;
    border:1px solid rgba(255,255,255,.72);
    border-radius:13px 13px 6px 13px;
    background:linear-gradient(145deg,#69c9f4,#3585e8 65%,#416bd1);
    box-shadow:0 5px 12px rgba(42,130,213,.25),inset 0 1px rgba(255,255,255,.55);
    color:#fff;
}
.dashboard-home-page .dashboard-profile-icon svg {
    width:21px;
    height:21px;
}
.dashboard-home-page .dashboard-profile-heading {
    flex:1;
    min-width:0;
}
.dashboard-home-page .dashboard-profile-heading > span {
    color:#4380b6;
    font-size:9px;
    font-weight:850;
    letter-spacing:.8px;
}
.dashboard-home-page .dashboard-profile-heading h3 {
    margin:2px 0;
    color:#263e57;
    font-size:14px;
    font-weight:850;
}
.dashboard-home-page .dashboard-profile-heading p {
    margin:0;
    color:#61758a;
    font-size:10.5px;
    line-height:1.4;
}
.dashboard-home-page .dashboard-profile-edit {
    padding:7px 11px;
    border:1px solid rgba(55,129,197,.2);
    border-radius:999px;
    background:linear-gradient(135deg,#f8fcff,#eaf5ff);
    box-shadow:0 3px 8px rgba(43,112,173,.1);
    color:#276fae;
    font-size:10px;
    font-weight:800;
    text-decoration:none;
    transition:transform .18s ease,box-shadow .18s ease;
}
.dashboard-home-page .dashboard-profile-edit:hover {
    transform:translateY(-1px);
    box-shadow:0 5px 12px rgba(43,112,173,.16);
}
.dashboard-home-page .dashboard-profile-content {
    display:grid;
    grid-template-columns:minmax(150px,.72fr) minmax(0,1.8fr);
    gap:12px;
    padding-top:12px;
}
.dashboard-home-page .dashboard-profile-completion {
    align-self:stretch;
    padding:11px 12px;
    border:1px solid rgba(69,143,201,.12);
    border-radius:13px;
    background:linear-gradient(145deg,rgba(226,243,255,.8),rgba(244,250,255,.65));
}
.dashboard-home-page .dashboard-profile-completion-head {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    color:#536b82;
    font-size:10px;
    font-weight:750;
}
.dashboard-home-page .dashboard-profile-completion-head strong {
    color:#286eaa;
    font-size:15px;
    font-weight:850;
}
.dashboard-home-page .dashboard-profile-track {
    height:6px;
    margin-top:9px;
    overflow:hidden;
    border-radius:999px;
    background:rgba(65,132,184,.14);
}
.dashboard-home-page .dashboard-profile-track span {
    display:block;
    height:100%;
    border-radius:inherit;
    background:linear-gradient(90deg,#47b8d8,#3585e8,#526ad5);
    box-shadow:0 0 8px rgba(51,130,213,.24);
    transition:width .5s ease;
}
.dashboard-home-page .dashboard-profile-completion p {
    margin:7px 0 0;
    color:#60778d;
    font-size:10px;
}
.dashboard-home-page .dashboard-profile-details {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
}
.dashboard-home-page .dashboard-profile-details > div {
    min-width:0;
    padding:8px 10px;
    border:1px solid rgba(87,133,171,.11);
    border-radius:11px;
    background:rgba(255,255,255,.75);
}
.dashboard-home-page .dashboard-profile-details span {
    display:block;
    margin-bottom:3px;
    color:#72859a;
    font-size:9px;
    font-weight:750;
    letter-spacing:.35px;
}
.dashboard-home-page .dashboard-profile-details strong {
    display:block;
    overflow-wrap:anywhere;
    color:#344d65;
    font-size:10.5px;
    font-weight:750;
    line-height:1.35;
}
@media (max-width:640px) {
    .dashboard-home-page .dashboard-profile-snapshot { padding:13px; }
    .dashboard-home-page .dashboard-profile-content { grid-template-columns:1fr; }
}
@media (max-width:420px) {
    .dashboard-home-page .dashboard-profile-details { grid-template-columns:1fr; }
    .dashboard-home-page .dashboard-profile-head { flex-wrap:wrap; }
    .dashboard-home-page .dashboard-profile-edit { margin-left:auto; }
}

/* ---- Shared metric-card design for the remaining member pages ----
   Dashboard and Analytics keep their scoped variants above; every other
   member page (tasks, levels, investment, team, supervisor) inherits the
   same card shape, while each stat keeps its own palette. */
.main-content .stat-grid {
    gap:14px;
    margin-bottom:24px;
}
.main-content .stat-card {
    --uc-accent:var(--icon-color,#3986d9);
    --uc-value:var(--value-grad,linear-gradient(90deg,#245a91,#3889c9));
    position:relative;
    min-width:0;
    min-height:142px;
    padding:15px;
    overflow:hidden;
    border:1px solid color-mix(in srgb,var(--uc-accent) 30%,#fff);
    border-top:3px solid var(--uc-accent);
    border-radius:18px 18px 11px 18px;
    background:linear-gradient(145deg,color-mix(in srgb,var(--uc-accent) 7%,#fff),#fff 76%);
    box-shadow:0 7px 18px rgba(37,83,120,.07),inset 0 1px rgba(255,255,255,.9);
    backdrop-filter:none;
    -webkit-backdrop-filter:none;
    transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;
}
.main-content .stat-card::before {
    top:0;
    right:13px;
    bottom:auto;
    left:13px;
    width:auto;
    height:3px;
    border:0;
    border-radius:0 0 6px 6px;
    background:linear-gradient(90deg,transparent,var(--uc-accent),transparent);
    filter:none;
    opacity:.72;
}
.main-content .stat-card::after {
    right:14px;
    bottom:14px;
    left:auto;
    width:34px;
    height:34px;
    border:1px solid color-mix(in srgb,var(--uc-accent) 26%,#fff);
    border-radius:50%;
    background:transparent;
    filter:none;
    opacity:.8;
}
.main-content .stat-card:hover {
    transform:translateY(-4px);
    border-color:color-mix(in srgb,var(--uc-accent) 48%,#fff);
    box-shadow:0 14px 26px color-mix(in srgb,var(--uc-accent) 15%,transparent),inset 0 1px rgba(255,255,255,.9);
}
.main-content .stat-card:hover .stat-icon {
    transform:translateY(-2px) rotate(-5deg);
}
.main-content .stat-icon {
    width:42px;
    height:42px;
    margin:0 0 12px;
    border:1px solid rgba(255,255,255,.72);
    border-radius:13px 13px 6px 13px;
    background:var(--icon-bg,linear-gradient(145deg,#1686d5,#44bad0));
    box-shadow:0 6px 13px color-mix(in srgb,var(--uc-accent) 26%,transparent),inset 0 1px rgba(255,255,255,.4);
}
.main-content .stat-icon svg { width:20px; height:20px; }
.main-content .stat-info { min-width:0; gap:3px; }
.main-content .stat-value {
    overflow-wrap:anywhere;
    margin:0;
    background:var(--uc-value);
    -webkit-background-clip:text;
    background-clip:text;
    -webkit-text-fill-color:transparent;
    font-size:clamp(18px,1.8vw,23px);
    font-weight:850;
    line-height:1.2;
    letter-spacing:-.55px;
}
.main-content .stat-label {
    color:color-mix(in srgb,var(--uc-accent) 52%,#52677b);
    font-size:9px;
    font-weight:850;
    letter-spacing:.55px;
    line-height:1.4;
    text-transform:uppercase;
}
@media (max-width:768px) {
    .main-content .stat-grid { gap:11px; }
    .main-content .stat-card { min-height:124px; padding:13px; }
}
@media (max-width:380px) {
    .main-content .stat-card { min-height:116px; padding:11px; }
    .main-content .stat-value { font-size:17px; }
    .main-content .stat-label { font-size:8px; }
}

/* ===== Restored additions (kept from the newer stylesheet) ===== */

.sidebar-email {

    font-size: 12px;
    color: #64748b;
    word-break: break-word;
}

.btn-3d-danger:hover {

    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.2);
}

.btn-3d-danger:hover svg {

    background: linear-gradient(135deg, #ef4444, #b91c1c);
    stroke: #fff;
}

.stat-earnings {
 --card-glow: rgba(16, 185, 129, 0.5); --card-accent: linear-gradient(135deg, #059669, #10b981); --icon-bg: linear-gradient(135deg, #059669, #10b981); --icon-color: #059669; --value-grad: linear-gradient(90deg, #047857, #10b981); }

.info-row {

    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed rgba(15, 23, 42, 0.1);
    font-size: 14px;
}

.info-row:last-child {
 border-bottom: none; }

.info-label {
 color: #64748b; font-weight: 600; }

.info-value {
 color: #0f172a; font-weight: 500; }

.activity-list {

    margin-left: 20px;
    line-height: 2;
    color: #334155;
}

.activity-list li {

    transition: transform 0.2s ease, color 0.2s ease;
}

.activity-list li:hover {

    transform: translateX(6px);
    color: #06b6d4;
}

.pay-recent {

    margin-top: 24px;
    border-top: 1px dashed rgba(15, 23, 42, 0.1);
    padding-top: 18px;
}

.pay-recent-list {

    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pay-recent-list li {

    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border-radius: 10px;
    padding: 10px 14px;
}

.pay-recent-amount {

    font-weight: 800;
    color: #0f172a;
}

.pay-recent-method {

    font-size: 12px;
    color: #64748b;
    margin-right: auto;
}

.pay-recent-status {

    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 4px 10px;
    border-radius: 999px;
}

.pay-recent-pending {
 background: #fef3c7; color: #92400e; }

.pay-recent-completed {
 background: #dcfce7; color: #166534; }

.pay-recent-failed {
 background: #fee2e2; color: #991b1b; }

.tbl-link {
 color: #4f46e5; font-weight: 600; text-decoration: none; }

.tbl-link:hover {
 text-decoration: underline; }

.admin-user-dist {

    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.dist-row {

    display: grid;
    grid-template-columns: 120px 1fr 50px;
    align-items: center;
    gap: 10px;
}

.dist-label {

    font-size: 13px;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dist-pkg {
 color: #0f172a; }

.dist-count {
 color: #4f46e5; margin-left: 8px; }

.dist-bar-wrap {

    background: rgba(15, 23, 42, 0.06);
    border-radius: 6px;
    height: 22px;
    overflow: hidden;
}

.dist-bar {

    height: 100%;
    background: linear-gradient(90, #6366f1, #06b6d8);
    border-radius: 6px;
    transition: width 0.5s ease;
}

.dist-pct {

    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-align: right;
}

.stat-earnings {

    --card-accent: linear-gradient(180deg, #34d399, #059669);
    --card-glow: rgba(52, 211, 153, 0.4);
    --icon-bg: linear-gradient(135deg, #34d399, #059669);
    --icon-shadow: 0 4px 14px rgba(5, 150, 105, 0.5);
}

.custom-range {

    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, margin 0.35s ease;
}

.custom-range.show {

    max-height: 200px;
    margin-top: 14px;
}

@media (max-width: 768px) {
.contact-btn span {
 display: none; }

.contact-btn {
 padding: 6px 8px; }

}

.ad-sidebar-left,
.ad-sidebar-right {

    flex: 0 0 160px;
    width: 160px;
    max-width: 160px;
    margin: 0;
    align-self: flex-start;
    position: sticky;
    top: 16px;
}

.ad-content-top,
.ad-content-bottom {

    max-width: 728px;
    margin: 20px auto;
}

@media (max-width: 1280px) {
.ad-sidebar-left,
    .ad-sidebar-right {

        display: none;
    }

}

@media (max-width: 768px) {
.ad-header,
    .ad-footer,
    .ad-content-top,
    .ad-content-bottom {

        max-width: 100%;
    }

}

.nav-methods {
 --i-grad: linear-gradient(145deg, #bef264, #65a30d); --i-glow: rgba(101, 163, 13, 0.6); }

.analytics-page-head {

    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 18px;
}

.analytics-page-head h2 {

    margin: 2px 0 4px;
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(90deg, #4f46e5, #06b6d4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.analytics-page-head p {

    margin: 0;
    font-size: 14px;
    color: #64748b;
    max-width: 620px;
}

.analytics-head-chip {

    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 14px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.16);
    font-size: 13px;
    color: #475569;
}

.analytics-head-chip strong {
 color: #4f46e5; }

.analytics-filter-chips {

    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.analytics-chip {

    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: rgba(241, 245, 249, 0.85);
    color: #475569;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.analytics-chip:hover {

    transform: translateY(-1px);
    background: #ffffff;
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 6px 14px rgba(99, 102, 241, 0.16);
}

.analytics-chip.is-active {

    background: linear-gradient(135deg, #6366f1, #06b6d4);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}

.analytics-chip-apply {

    background: linear-gradient(135deg, #0ea5e9, #22c55e);
    border-color: transparent;
    color: #ffffff;
}

.analytics-filter-custom {

    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.analytics-filter-custom label {

    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #64748b;
}

.analytics-filter-custom input[type=] {

    padding: 7px 10px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    background: #ffffff;
    color: #0f172a;
    font-family: inherit;
    font-size: 13px;
    font-weight: 400;
}

/* ============ Analytics: base components ============
   Used by analytics.php: .analytics-two-col, .analytics-kpi-label|value|note,
   .analytics-status-track|fill, .analytics-level-* + .analytics-level-showcase,
   .analytics-donut* (+ .donut/.donut-seg/.donut-legend hooks), .analytics-section,
   .analytics-graph-badge.is-soft, withdrawal pastel accents
   (selectors repointed to .analytics-withdraw-grid .stat-card),
   generic .donut/.donut-wrap/.donut-seg/.donut-legend* hooks on the payment
   status card (dual-classed with .analytics-donut*), .pay-recent-status pills
   + .pay-recent-list on purchase history, .stat-earnings success-rate card,
   .investment-hero-action CTA, .level-progress-card margin hook.
   Only leftover alternate: .heading-withdrawals (superseded "02 / CASH FLOW"
   numbering — .heading-payouts "05 / PAYOUTS" overrides it).
   Dead CSS belonging to OTHER features remains in this file (withdrawal-request-*,
   filter-tabs, ai-chip, admin-hero-*, admin-section-summary-grid, etc.) — not
   analytics.php's scope. */
.analytics-section {

    margin-bottom: 26px;
}

.analytics-two-col {

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

.analytics-kpi-label {

    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #64748b;
}

.analytics-kpi-value {

    font-size: 24px;
    font-weight: 800;
    line-height: 1.1;
    color: #0f172a;
    word-break: break-word;
}

.analytics-kpi-note {

    font-size: 12px;
    color: #94a3b8;
}

.analytics-graph-badge {

    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(6, 182, 212, 0.14));
    color: #4f46e5;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.analytics-graph-badge.is-soft {

    background: rgba(148, 163, 184, 0.16);
    color: #64748b;
}

.analytics-graph-pair {

    display: flex;
    align-items: flex-end;
    gap: 4px;
    width: 100%;
    max-width: 56px;
    height: 190px;
}

.analytics-donut-wrap {

    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 26px;
}

.analytics-donut {

    position: relative;
    flex-shrink: 0;
    width: 180px;
    height: 180px;
}

.analytics-donut svg {

    display: block;
    width: 100%;
    height: 100%;
    transform-origin: 50% 50%;
    animation: uaSpin 22s linear infinite;
}

.analytics-two-col .analytics-graph-card:nth-child(2) .analytics-donut svg {

    animation-delay: 2s;
}

.analytics-donut-track {

    fill: none;
    stroke: rgba(148, 163, 184, 0.22);
    stroke-width: 5.5;
}

.analytics-donut-seg {

    fill: none;
    stroke-width: 5.5;
    stroke-linecap: round;
}

.analytics-donut-center {

    position: absolute;
    inset: 0;
    margin: auto;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-align: center;
    background: radial-gradient(circle at 50% 35%, #eef2ff, #dbe4ff);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 8px 18px -12px rgba(79, 70, 229, 0.7);
    animation: uaFadeScale 0.7s ease both;
}

.analytics-donut-center strong {

    font-size: 17px;
    font-weight: 800;
    color: #312e81;
}

.analytics-donut-center span {

    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #6366f1;
}

.analytics-donut-legend {

    flex: 1 1 160px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.analytics-donut-legend li {

    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #475569;
}

.analytics-donut-legend li i {

    flex-shrink: 0;
    width: 12px;
    height: 12px;
    border-radius: 4px;
    background: var(--legend-color, #6366f1);
}

.analytics-donut-legend li span {

    flex: 1;
    min-width: 0;
}

.analytics-donut-legend li b {

    font-weight: 700;
    color: #0f172a;
}

.analytics-empty {

    margin: 0;
    padding: 34px 16px;
    text-align: center;
    font-size: 14px;
    color: #94a3b8;
}

.analytics-status-list {

    display: flex;
    flex-direction: column;
    gap: 14px;
}

.analytics-status-row {

    display: grid;
    grid-template-columns: 96px 1fr 96px 44px;
    align-items: center;
    gap: 12px;
}

.analytics-status-name {

    font-size: 13px;
    font-weight: 700;
    color: #475569;
}

.analytics-status-track {

    position: relative;
    height: 12px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
    overflow: hidden;
}

.analytics-status-fill {

    display: block;
    height: 100%;
    width: var(--bar-width, 0%);
    border-radius: 999px;
    background-image:
        linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0)),
        linear-gradient(90deg, var(--bar-color, #6366f1), var(--bar-color, #6366f1));
    box-shadow: 0 0 12px -2px var(--bar-color, #6366f1);
    animation: uaGrowWidth 1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.analytics-status-value {

    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    text-align: right;
}

.analytics-status-count {

    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-align: right;
}

.analytics-level-card {

    position: relative;
    margin-top: 16px;
    padding: 18px 20px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(238, 242, 255, 0.95), rgba(236, 254, 255, 0.95));
    border: 1px solid rgba(99, 102, 241, 0.16);
    box-shadow: 0 12px 26px -20px rgba(15, 23, 42, 0.4);
    overflow: hidden;
}

.analytics-level-head {

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.analytics-level-head h4 {

    margin: 3px 0 0;
    font-size: 16px;
    font-weight: 800;
    color: #1e293b;
}

.analytics-level-percent {

    font-size: 24px;
    font-weight: 800;
    color: #4f46e5;
}

.analytics-level-track {

    height: 14px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.14);
    overflow: hidden;
}

.analytics-level-fill {

    display: block;
    height: 100%;
    width: var(--bar-width, 0%);
    border-radius: 999px;
    background: linear-gradient(90deg, #6366f1, #06b6d4);
    box-shadow: 0 0 14px -2px rgba(99, 102, 241, 0.7);
    animation: uaGrowWidth 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.analytics-level-meta {

    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 12px;
    font-size: 13px;
    color: #475569;
}

.analytics-level-meta strong {

    color: #0f172a;
}

.refcompare {

    display: flex;
    flex-direction: column;
    gap: 12px;
}

.refcompare-row {

    display: grid;
    grid-template-columns: 62px 1fr;
    align-items: center;
    gap: 14px;
    animation: uaPopIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(var(--i, 0) * 45ms);
}

.refcompare-date {

    font-size: 12px;
    font-weight: 700;
    color: #475569;
}

.refcompare-meters {

    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.refcompare-meter {

    display: grid;
    grid-template-columns: 62px 1fr 46px;
    align-items: center;
    gap: 10px;
}

.refcompare-name {

    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
}

.refcompare-track {

    position: relative;
    height: 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
    overflow: hidden;
}

.refcompare-track i {

    display: block;
    height: 100%;
    width: var(--w, 0%);
    border-radius: 999px;
    background-image:
        linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0)),
        linear-gradient(90deg, var(--graph-color, #2563eb), var(--graph-color, #2563eb));
    animation: uaGrowWidthVar 1s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(var(--i, 0) * 45ms);
}

.refcompare-count {

    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    text-align: right;
}

@keyframes uaBarRise {

    from { transform: scaleY(0); opacity: 0.25; }
    to   { transform: scaleY(1); opacity: 1; }
}

@keyframes uaShimmer {

    0%, 100% { transform: translateY(0); opacity: 0; }
    50%      { transform: translateY(300%); opacity: 1; }
}

@keyframes uaGrowWidth {

    from { width: 0%; }
    to   { width: var(--bar-width, 0%); }
}

@keyframes uaGrowWidthVar {

    from { width: 0%; }
    to   { width: var(--w, 0%); }
}

@keyframes uaSpin {

    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes uaPopIn {

    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes uaFadeScale {

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

@media (max-width: 900px) {
.analytics-two-col {

        grid-template-columns: 1fr;
    }

}

@media (max-width: 640px) {
.analytics-graph-pair {

        height: 150px;
        max-width: 30px;
    }

.analytics-status-row {

        grid-template-columns: 76px 1fr 70px;
    }

.analytics-status-count {

        display: none;
    }

.analytics-donut {

        width: 150px;
        height: 150px;
    }

.analytics-donut-center {

        width: 82px;
        height: 82px;
    }

.analytics-donut-center strong {

        font-size: 15px;
    }

}

@media (max-width: 480px) {
.analytics-kpi-value {

        font-size: 20px;
    }

}

/* ============ Analytics: compact density pass ============
   Tightens card/chart sizing so the dashboard reads smaller and cleaner. */
.analytics-page .account-hero.analytics-account-hero { margin-bottom: 12px; }
.analytics-page .analytics-account-hero .account-avatar { width: 62px; height: 62px; font-size: 25px; border-radius: 20px; }
.analytics-page .analytics-account-hero .account-hero-main { gap: 14px; }
.analytics-page .analytics-account-hero .account-facts { margin-top: 12px; gap: 8px; }
.analytics-page .analytics-account-hero .account-fact { padding: 8px 12px; }
.analytics-page .analytics-account-hero .account-fact-value { font-size: 13px; }
.analytics-page .analytics-page-head { margin-bottom: 12px; }
.analytics-page .analytics-filter-bar { padding: 14px 16px; margin-bottom: 16px; }
.analytics-page .analytics-section-toolbar { margin-bottom: 8px; }
.analytics-page .analytics-kpi-grid { gap: 8px; margin: 8px 0; }
.analytics-page .analytics-kpi { min-height: 72px; padding: 10px 12px; gap: 4px; }
.analytics-page .analytics-kpi-value { font-size: 19px; }
.analytics-page .analytics-kpi-label { text-transform: none; letter-spacing: 0.2px; }
.analytics-page .analytics-graph-card { padding: 14px 15px 11px; margin: 10px 0 14px; }
.analytics-page .analytics-graph-head { margin-bottom: 7px; }
.analytics-page .analytics-graph-head h4 { font-size: 14px; }
.analytics-page .analytics-graph-plot { height: 176px; min-width: max(100%, 340px); }
.analytics-page .analytics-line-svg { min-width: 340px; }
.analytics-page .analytics-donut { width: 148px; height: 148px; }
.analytics-page .analytics-donut-center { width: 78px; height: 78px; }
.analytics-page .analytics-stat-grid .stat-card { min-height: 110px; padding: 12px; }
.analytics-page .analytics-investment-panel { padding: 14px 16px 16px; }
.analytics-page .analytics-level-card { margin-top: 12px; padding: 14px 16px; }
.analytics-page .analytics-two-col { gap: 14px; }
.analytics-page .analytics-status-list { gap: 8px; }
.analytics-page .analytics-earnings-grid { gap: 12px; }

/* Live earnings card — compact + stable ring (no orbit spin) */
.analytics-page .live-donut-wrap { width: 118px; height: 118px; }
.analytics-page .live-earnings-body { gap: 12px; margin-top: 4px; }
.analytics-page .live-earnings-stats { gap: 6px; }
.analytics-page .live-stat-bar { margin: 0 0 2px 18px; }
.analytics-page .live-stat-sub { margin-top: -4px; }
.analytics-page .live-earnings-note { margin-top: 8px; }
.analytics-page .live-donut-value { font-size: 13px; }
.analytics-page .live-donut-label { font-size: 6px; }
.analytics-page .analytics-earnings-grid { align-items: start; }

/* Live donut — seamless segments + smaller card */
.analytics-page .live-donut-seg { stroke-linecap: butt; }
.analytics-page .live-donut-wrap { width: 100px; height: 100px; }
.analytics-page .live-donut-value { font-size: 11px; }
.analytics-page .live-donut-label { font-size: 5px; letter-spacing: .3px; }
.analytics-page .live-stat-value { font-size: 12px; }
.analytics-page .live-stat { gap: 6px; }
.analytics-page .live-earnings-stats { gap: 4px; }
.analytics-page .live-stat-bar { height: 3px; }

/* Earnings section — stack live snapshot above the trend chart, full width */
.analytics-page .analytics-earnings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }

/* Earnings wrapper — transparent shell so only the two inner cards show */
.analytics-page .analytics-graph-card.analytics-earnings-card {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.analytics-page .analytics-graph-card.analytics-earnings-card:hover {
    transform: none;
    border-color: transparent;
    box-shadow: none;
}

/* Analytics — stack paired cards on tablets & phones */
@media (max-width: 980px) {
    .analytics-page .analytics-earnings-grid,
    .analytics-page .analytics-two-col,
    .analytics-page .analytics-graph-grid,
    .analytics-page .charts-grid.analytics-featured-graphs {
        grid-template-columns: minmax(0, 1fr);
    }
}
@media (max-width: 760px) {
    .analytics-page .analytics-live-earnings-card .live-earnings-body {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        text-align: center;
    }
    .analytics-page .analytics-live-earnings-card .live-earnings-stats { width: 100%; }
}

/* Live donut — multi-source rings, larger size */
.analytics-page .live-donut-wrap { width: 138px; height: 138px; }
.analytics-page .live-donut-value { font-size: 14px; }
.analytics-page .live-donut-label { font-size: 6.5px; letter-spacing: .4px; }
.analytics-page .live-donut-seg:hover { stroke-width: 10; }

/* ============ Live Earnings — hero amount + sparkline ============ */
.analytics-page .live-earnings-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
}
.analytics-page .live-today-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 14px 10px 10px;
    border-radius: 14px;
    background:
        radial-gradient(120% 100% at 50% 0%, rgba(16,185,129,.14), transparent 65%),
        linear-gradient(180deg, #f2fbf6, #eef7f2);
    border: 1px solid rgba(16,185,129,.16);
    text-align: center;
}
.analytics-page .live-today-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0d8a4f;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .6px;
    text-transform: uppercase;
}
.analytics-page .live-today-value {
    background: linear-gradient(120deg, #059669, #10b981 55%, #34d399);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: clamp(26px, 3.4vw, 36px);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -.5px;
}
.analytics-page .live-today-sub {
    color: #7fae97;
    font-size: 10px;
    font-weight: 700;
}
.analytics-page .live-spark { padding: 2px 4px 0; }
.analytics-page .live-spark svg {
    display: block;
    width: 100%;
    height: 40px;
}
.analytics-page .live-spark-cap {
    display: block;
    margin-top: 2px;
    color: #a3bdb0;
    font-size: 9px;
    font-weight: 700;
    text-align: center;
}
.analytics-page .live-mini-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
}
.analytics-page .live-mini-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 9px;
    border-radius: 11px;
    background: rgba(255,255,255,.75);
    border: 1px solid rgba(15,23,42,.06);
    min-width: 0;
}
.analytics-page .live-mini-stat span {
    color: #8aa79b;
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: .4px;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.analytics-page .live-mini-stat strong {
    color: #14532d;
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (max-width: 560px) {
    .analytics-page .live-mini-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ============ Analytics — final compact pass (all devices) ============ */
.analytics-page .analytics-page-head { margin-bottom: 10px; }
.analytics-page .analytics-page-head h2 { font-size: 21px; }
.analytics-page .analytics-page-head p { font-size: 11.5px; }
.analytics-page .analytics-account-hero { padding: 12px 14px; }
.analytics-page .analytics-filter-bar,
.analytics-page .analytics-period-panel { padding: 9px 12px; margin-bottom: 10px; }
.analytics-page .analytics-section-toolbar { margin: 12px 0 7px; }
.analytics-page .analytics-section-toolbar h3 { font-size: 13px; margin: 0; }
.analytics-page .analytics-kpi-grid { gap: 8px; }
.analytics-page .analytics-kpi { min-height: 60px; padding: 9px 11px; border-radius: 12px; }
.analytics-page .analytics-kpi-value { font-size: 17px; }
.analytics-page .analytics-kpi-note { font-size: 9.5px; }
.analytics-page .analytics-graph-card { padding: 10px 12px 9px; border-radius: 14px; }
.analytics-page .analytics-graph-head { min-height: 34px; padding-bottom: 6px; }
.analytics-page .analytics-graph-head h4 { font-size: 13px; }
.analytics-page .analytics-graph-eyebrow { font-size: 8.5px; }
.analytics-page .analytics-graph-badge { padding: 4px 9px; font-size: 10px; }
.analytics-page .analytics-graph-range { font-size: 8.5px; }
.analytics-page .analytics-mini-filter select { min-height: 28px; padding: 4px 24px 4px 9px; font-size: 10px; }
.analytics-page .analytics-graph-plot { height: 148px; min-width: max(100%, 300px); padding: 6px 6px 0; gap: 5px; }
.analytics-page .analytics-graph-bars { height: 118px; gap: 2px; }
.analytics-page .analytics-line-svg { min-width: 300px; }
.analytics-page .analytics-line-label { font-size: 9px; }
.analytics-page .analytics-graph-label { padding: 4px 1px 5px; font-size: 8.5px; }
.analytics-page .analytics-graph-legend { gap: 5px 11px; padding: 6px 2px 0; font-size: 9.5px; }
.analytics-page .analytics-graph-empty { min-height: 100px; font-size: 11px; }
.analytics-page .analytics-donut-wrap { gap: 10px; }
.analytics-page .analytics-donut { width: 118px; height: 118px; }
.analytics-page .analytics-donut-center { width: 62px; height: 62px; }
.analytics-page .analytics-donut-center-strong { font-size: 12px; }
.analytics-page .analytics-donut-center-label { font-size: 7.5px; }
.analytics-page .analytics-donut-legend { gap: 6px; font-size: 10px; }
.analytics-page .analytics-purchase-card .analytics-status-row,
.analytics-page .analytics-status-list .analytics-status-row { padding: 6px 0; gap: 8px; font-size: 11px; }
.analytics-page .analytics-status-track,
.analytics-page .analytics-status-fill { height: 4px; }
.analytics-page .analytics-two-col,
.analytics-page .analytics-earnings-grid { gap: 10px; }
.analytics-page .analytics-investment-panel { padding: 12px; }
.analytics-page .investment-multi-line-svg { min-width: 300px; }
.analytics-page .investment-multi-line-card .analytics-graph-plot { height: 148px; min-width: max(100%, 300px); }
.analytics-page .analytics-level-card { padding: 12px 14px; }
.analytics-page .analytics-level-showcase .level-badge { width: 40px; height: 40px; font-size: 15px; }
.analytics-page .analytics-withdraw-grid .stat-card { min-height: 96px; padding: 10px 12px; }
.analytics-page .live-earnings-body { gap: 8px; }
.analytics-page .live-today-hero { padding: 10px 8px 8px; }
.analytics-page .live-today-value { font-size: clamp(22px, 2.8vw, 30px); }
.analytics-page .live-spark svg { height: 32px; }
.analytics-page .live-mini-stat { padding: 6px 8px; }
.analytics-page .live-mini-stat strong { font-size: 11px; }
.analytics-page .analytics-stat-card { min-height: 96px; }
.analytics-page .analytics-graph--heatmap .analytics-heat-cell i { width: 20px; height: 20px; }
.analytics-page .analytics-graph--heatmap .analytics-heat-cell span { font-size: 8px; }

/* Extra-small devices — tighten further */
@media (max-width: 640px) {
    .analytics-page .analytics-page-head h2 { font-size: 18px; }
    .analytics-page .analytics-kpi-grid { gap: 6px; }
    .analytics-page .analytics-kpi { min-height: 54px; padding: 8px 9px; }
    .analytics-page .analytics-kpi-value { font-size: 15px; }
    .analytics-page .analytics-kpi-label { font-size: 8.5px; }
    .analytics-page .analytics-graph-card { padding: 8px 9px 8px; }
    .analytics-page .analytics-graph-plot { height: 132px; min-width: max(100%, 280px); }
    .analytics-page .analytics-line-svg { min-width: 280px; }
    .analytics-page .analytics-donut { width: 104px; height: 104px; }
    .analytics-page .analytics-donut-center { width: 54px; height: 54px; }
    .analytics-page .analytics-donut-center-strong { font-size: 11px; }
    .analytics-page .analytics-graph-badge { font-size: 9px; padding: 3px 7px; }
    .analytics-page .live-today-value { font-size: 24px; }
    .analytics-page .live-mini-stats { gap: 5px; }
    .analytics-page .analytics-withdraw-grid .stat-card { min-height: 84px; }
}
@media (max-width: 400px) {
    .analytics-page .analytics-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .analytics-page .analytics-graph-plot { height: 118px; min-width: max(100%, 260px); }
    .analytics-page .analytics-line-svg { min-width: 260px; }
    .analytics-page .live-mini-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .analytics-page .analytics-donut { width: 92px; height: 92px; }
}

/* ============ Diamonds — diverging earned-vs-spent flow ============ */
.analytics-page .diamond-flow-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 6px 2px 2px;
}
.analytics-page .diamond-flow-bar {
    display: flex;
    align-items: stretch;
    gap: 0;
    min-height: 44px;
}
.analytics-page .diamond-flow-side {
    position: relative;
    flex: 1 1 50%;
    display: flex;
    align-items: center;
    min-width: 0;
}
.analytics-page .diamond-flow-side.is-earned { justify-content: flex-end; }
.analytics-page .diamond-flow-side.is-spent { justify-content: flex-start; }
.analytics-page .diamond-flow-side i {
    position: absolute;
    top: 50%;
    height: 16px;
    transform: translateY(-50%);
    border-radius: 99px;
    transition: width .5s cubic-bezier(.2,.8,.2,1);
}
.analytics-page .diamond-flow-side.is-earned i {
    right: 0;
    background: linear-gradient(90deg, #0891b2, #22d3ee);
    box-shadow: 0 4px 10px rgba(8,145,178,.28);
}
.analytics-page .diamond-flow-side.is-spent i {
    left: 0;
    background: linear-gradient(90deg, #7c3aed, #a78bfa);
    box-shadow: 0 4px 10px rgba(124,58,237,.26);
}
.analytics-page .diamond-flow-val {
    position: relative;
    z-index: 1;
    padding: 0 8px;
    color: #0e7490;
    font-size: 11px;
    font-weight: 850;
    white-space: nowrap;
}
.analytics-page .diamond-flow-side.is-spent .diamond-flow-val { color: #6d28d9; }
.analytics-page .diamond-flow-net {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 74px;
    margin: 0 6px;
    padding: 5px 8px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid rgba(15,23,42,.07);
}
.analytics-page .diamond-flow-net strong {
    font-size: 13px;
    font-weight: 900;
    line-height: 1.1;
}
.analytics-page .diamond-flow-net span {
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: #94a3b8;
}
.analytics-page .diamond-flow-net.is-pos strong { color: #059669; }
.analytics-page .diamond-flow-net.is-neg strong { color: #dc2626; }
.analytics-page .diamond-flow-legend {
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
}
.analytics-page .diamond-flow-legend i {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 99px;
    margin-right: 5px;
}
.analytics-page .diamond-flow-legend i.is-earned { background: #06b6d4; }
.analytics-page .diamond-flow-legend i.is-spent { background: #8b5cf6; }
.analytics-page .diamond-flow-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}
.analytics-page .diamond-flow-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 7px 9px;
    border-radius: 10px;
    background: rgba(255,255,255,.7);
    border: 1px solid rgba(15,23,42,.05);
    min-width: 0;
}
.analytics-page .diamond-flow-stat span {
    color: #8aa0b4;
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: .4px;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.analytics-page .diamond-flow-stat strong {
    color: #1e293b;
    font-size: 11.5px;
    font-weight: 850;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.analytics-page .diamond-flow-stat strong.is-pos { color: #059669; }
.analytics-page .diamond-flow-stat strong.is-neg { color: #dc2626; }
@media (max-width: 560px) {
    .analytics-page .diamond-flow-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
    .analytics-page .diamond-flow-stat { padding: 6px 7px; }
    .analytics-page .diamond-flow-net { min-width: 62px; padding: 4px 6px; }
    .analytics-page .diamond-flow-net strong { font-size: 11px; }
}

/* Diamonds: compact donut visual with a clear source/usage legend. */
.analytics-page .diamond-breakdown {
    display: grid;
    grid-template-columns: minmax(118px, 150px) minmax(0, 1fr);
    align-items: center;
    gap: clamp(12px, 2vw, 24px);
    min-height: 154px;
    padding: 8px 2px 4px;
}
.analytics-page .diamond-donut {
    position: relative;
    display: grid;
    place-items: center;
    width: clamp(118px, 10vw, 148px);
    aspect-ratio: 1;
    margin-inline: auto;
    border-radius: 50%;
    background: var(--diamond-donut-fill, conic-gradient(#e2e8f0 0% 100%));
    box-shadow: 0 8px 22px rgba(59, 130, 246, .12);
}
.analytics-page .diamond-donut::before {
    position: absolute;
    inset: 13px;
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: inherit;
    background: linear-gradient(145deg, #fff, #f8fbff);
    box-shadow: inset 0 2px 7px rgba(15, 23, 42, .05);
    content: "";
}
.analytics-page .diamond-donut-center {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    max-width: 78%;
    text-align: center;
}
.analytics-page .diamond-donut-center span {
    color: #71839b;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 1.1px;
}
.analytics-page .diamond-donut-center strong {
    max-width: 100%;
    overflow: hidden;
    color: #1e3a8a;
    font-size: clamp(15px, 1.4vw, 20px);
    font-weight: 900;
    line-height: 1.1;
    text-overflow: ellipsis;
}
.analytics-page .diamond-donut-center small {
    color: #94a3b8;
    font-size: 9px;
    font-weight: 700;
}
.analytics-page .diamond-legend {
    display: grid;
    align-content: center;
    gap: 3px;
    min-width: 0;
}
.analytics-page .diamond-legend-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px 16px;
    min-width: 0;
    padding: 5px 2px;
    border-radius: 0;
    border: none;
    background: transparent;
}
.analytics-page .diamond-legend-row::before { content: none; }
.analytics-page .diamond-legend-copy {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}
.analytics-page .diamond-legend-copy > i {
    flex: 0 0 10px;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: var(--diamond-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--diamond-color) 18%, transparent);
}
.analytics-page .diamond-legend-copy > i::after { content: none; }
.analytics-page .diamond-legend-copy > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.analytics-page .diamond-legend-copy strong {
    overflow: hidden;
    color: #1e293b;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: .1px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.analytics-page .diamond-legend-copy small {
    margin-top: 1px;
    color: #94a3b8;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .1px;
}
.analytics-page .diamond-legend-value {
    color: #0f172a;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.analytics-page .diamond-legend-track {
    grid-column: 1 / -1;
    height: 4px;
    overflow: hidden;
    border-radius: 99px;
    background: #eef2f7;
}
.analytics-page .diamond-legend-track i {
    display: block;
    width: var(--diamond-share, 0%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, color-mix(in srgb, var(--diamond-color) 75%, #fff), var(--diamond-color));
    animation: uaGrowWidth .8s cubic-bezier(.22, 1, .36, 1) both;
}
@media (max-width: 560px) {
    .analytics-page .diamond-breakdown {
        grid-template-columns: 104px minmax(0, 1fr);
        gap: 10px;
        min-height: 0;
    }
    .analytics-page .diamond-donut { width: 104px; }
    .analytics-page .diamond-donut::before { inset: 10px; }
    .analytics-page .diamond-donut-center strong { font-size: 14px; }
    .analytics-page .diamond-legend { gap: 6px; }
    .analytics-page .diamond-legend-row { padding: 4px 1px; gap: 4px 8px; }
    .analytics-page .diamond-legend-copy { gap: 7px; }
    .analytics-page .diamond-legend-copy > i { width: 8px; height: 8px; flex-basis: 8px; }
    .analytics-page .diamond-legend-copy strong { font-size: 12px; }
    .analytics-page .diamond-legend-copy small { font-size: 9.5px; }
    .analytics-page .diamond-legend-value { font-size: 13px; }
}

/* Refined overall analytics range control. */
.analytics-page .analytics-filter-bar {
    display: grid;
    grid-template-columns: max-content minmax(260px, 1fr) max-content auto;
    align-items: center;
    gap: 9px;
    margin: 8px 0 13px;
    padding: 9px 12px;
    border: 1px solid #d9e8f5;
    border-left: 3px solid #318bd0;
    border-radius: 14px;
    background: linear-gradient(112deg, #f1f8ff 0%, #ffffff 48%, #f8fbff 100%);
    box-shadow: 0 6px 18px rgba(39, 93, 137, .08);
}
.analytics-page .analytics-period-panel {
    display: contents;
}
.analytics-page .analytics-filter-caption { margin: 0; }
.analytics-page .analytics-filter-caption strong {
    color: #31516f;
    font-size: 10px;
    letter-spacing: .45px;
    white-space: nowrap;
}
.analytics-page .analytics-filter-caption span { display: none; }
.analytics-page .analytics-history-filter { min-width: 0; margin: 0; }
.analytics-page .analytics-period-panel .history-filter-presets {
    flex-wrap: nowrap;
    gap: 5px;
}
.analytics-page .analytics-period-panel .history-chip {
    padding: 6px 10px;
    border: 1px solid #dbe8f4;
    border-radius: 9px;
    background: #ffffff;
    color: #5b7188;
    font-size: 9px;
    box-shadow: 0 2px 5px rgba(36, 77, 112, .04);
    white-space: nowrap;
}
.analytics-page .analytics-period-panel .history-chip.active {
    border-color: transparent;
    background: linear-gradient(125deg, #328ed2, #426be1);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(50, 118, 205, .22);
}
.analytics-page .analytics-period-panel .filter-current {
    justify-content: flex-end;
    gap: 5px;
    padding: 0;
    border: 0;
    font-size: 9px;
    white-space: nowrap;
}
.analytics-page .analytics-period-panel .filter-current-label { color: #71869b; }
.analytics-page .analytics-period-panel .filter-current-value {
    padding: 4px 8px;
    border: 1px solid #d7e9f8;
    border-radius: 7px;
    background: #edf7ff;
    color: #17649e;
}
.analytics-page .analytics-period-panel .filter-current-dates { color: #486078; font-size: 9px; }
.analytics-page .analytics-filter-custom {
    align-items: center;
    gap: 5px;
}
.analytics-page .analytics-filter-custom label {
    gap: 2px;
    padding: 4px 7px;
    border: 1px solid #dce8f2;
    border-radius: 9px;
    background: rgba(255,255,255,.9);
    font-size: 8px;
}
.analytics-page .analytics-filter-custom input[type="date"] {
    width: 112px;
    min-height: 25px;
    padding: 2px 4px;
    border: 0;
    background: transparent;
    font-size: 10px;
}
.analytics-page .analytics-filter-custom .analytics-chip-apply {
    min-height: 32px;
    padding: 6px 11px;
    border-radius: 9px;
    font-size: 9px;
    box-shadow: 0 4px 9px rgba(29, 112, 190, .2);
}
@media (max-width: 1180px) {
    .analytics-page .analytics-filter-bar {
        grid-template-columns: max-content minmax(0, 1fr) max-content;
    }
    .analytics-page .analytics-filter-custom {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }
}
@media (max-width: 760px) {
    .analytics-page .analytics-filter-bar {
        grid-template-columns: minmax(0, 1fr) max-content;
        gap: 7px;
        padding: 8px;
    }
    .analytics-page .analytics-filter-caption { grid-column: 1; }
    .analytics-page .analytics-period-panel .filter-current { grid-column: 2; grid-row: 1; }
    .analytics-page .analytics-history-filter { grid-column: 1 / -1; }
    .analytics-page .analytics-period-panel .history-filter-presets {
        overflow-x: auto;
        padding: 2px 1px 4px;
        scrollbar-width: thin;
    }
    .analytics-page .analytics-filter-custom {
        grid-column: 1 / -1;
        justify-content: stretch;
    }
    .analytics-page .analytics-filter-custom label { flex: 1 1 0; min-width: 0; }
    .analytics-page .analytics-filter-custom input[type="date"] { width: 100%; min-width: 0; }
}

.analytics-page .analytics-earnings-grid > .analytics-live-earnings-card,
.analytics-page .analytics-earnings-grid > .analytics-line-card {
    padding-top: 13px;
}
.analytics-page .analytics-earnings-grid > .analytics-live-earnings-card > .analytics-graph-head,
.analytics-page .analytics-earnings-grid > .analytics-line-card > .analytics-graph-head {
    align-items: flex-start;
    min-height: 32px;
    padding-bottom: 0;
    margin-bottom: 9px;
}
.analytics-page .analytics-line-card[data-analytics-graph-card="earnings"] .analytics-graph-tools {
    align-items: flex-start;
}
.analytics-page .analytics-line-card[data-analytics-graph-card="earnings"] .analytics-mini-filter {
    align-self: flex-start;
    margin-top: -3px;
}
.analytics-page .analytics-line-card[data-analytics-graph-card="earnings"] .analytics-mini-filter select {
    transform: none;
}

.analytics-page .analytics-line-card[data-analytics-graph-card="earnings"] .analytics-graph-range {
    display: none;
}
.analytics-page .analytics-line-card[data-analytics-graph-card="earnings"] > .analytics-graph-head {
    position: relative;
    z-index: 5;
    overflow: visible;
}
.analytics-page .analytics-line-card[data-analytics-graph-card="earnings"] .analytics-mini-filter.is-custom {
    position: relative;
    width: auto;
    min-width: 0;
}
.analytics-page .analytics-line-card[data-analytics-graph-card="earnings"] .analytics-mini-filter.is-custom .analytics-filter-error:empty {
    display: none;
}
.analytics-page .analytics-line-card[data-analytics-graph-card="earnings"] .analytics-mini-filter.is-custom .analytics-mini-custom {
    display: grid;
    position: absolute;
    z-index: 30;
    top: 40px;
    right: 0;
    width: min(260px, calc(100vw - 52px));
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 9px 9px 8px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(33, 71, 108, .14), 0 2px 6px rgba(33, 71, 108, .06);
}
.analytics-page .analytics-line-card[data-analytics-graph-card="earnings"] .analytics-mini-custom label {
    gap: 3px;
    font-size: 10px;
    color: #5b7186;
    font-weight: 600;
}
.analytics-page .analytics-line-card[data-analytics-graph-card="earnings"] .analytics-mini-custom input[type="date"] {
    padding: 5px 7px;
    font-size: 11px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #f8fafc;
    color: #1e3a5f;
}
.analytics-page .analytics-line-card[data-analytics-graph-card="earnings"] .analytics-mini-custom input[type="date"]:focus {
    border-color: #3b82f6;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(59,130,246,.18);
}
.analytics-page .analytics-line-card[data-analytics-graph-card="earnings"] .analytics-mini-custom button {
    grid-column: 1 / -1;
    min-height: 30px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 8px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border: 0;
    box-shadow: 0 3px 8px rgba(37,99,235,.25);
    cursor: pointer;
}
.analytics-page .analytics-line-card[data-analytics-graph-card="earnings"] .analytics-mini-custom button:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

/* Restore the live earnings circle with a readable, contained amount. */
.analytics-page .analytics-live-earnings-card .live-earnings-body {
    display: grid;
    grid-template-columns: minmax(190px, .9fr) minmax(0, 1.1fr);
    align-items: center;
    gap: 18px;
}
.analytics-page .live-circle-panel {
    display: grid;
    justify-items: center;
    gap: 10px;
    min-width: 0;
    padding: 14px 10px;
    border: 1px solid rgba(119, 157, 203, .2);
    border-radius: 20px;
    background:
        radial-gradient(circle at 12% 10%, rgba(96, 165, 250, .13), transparent 34%),
        linear-gradient(155deg, #f0f7ff, #fff 62%, #faf5ff);
    box-shadow: 0 10px 24px rgba(47, 83, 145, .08), inset 0 1px 0 #fff;
}
.analytics-page .live-circle-wrap {
    position: relative;
    isolation: isolate;
    width: clamp(168px, 14vw, 194px);
    max-width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 0 48%, #eef5ff 70%, transparent 71%);
    animation: live-circle-pulse 3.6s ease-in-out infinite;
}
.analytics-page .live-circle-wrap::before {
    position: absolute;
    z-index: 0;
    inset: -7px;
    border-radius: 50%;
    content: "";
    --live-ring-color: #3b82f6;
    background: conic-gradient(from 0deg, transparent 0deg 255deg, var(--live-ring-color) 255deg 360deg);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 6px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 6px));
    filter: drop-shadow(0 0 4px rgba(59, 130, 246, .3));
    transform-origin: 50% 50%;
    animation: live-ring-rotate 7s linear infinite, live-ring-color-cycle 28s steps(1, end) infinite;
}
.analytics-page .live-circle-svg {
    position: absolute;
    z-index: 1;
    inset: 0;
    width: 100%;
    height: 100%;
}
.analytics-page .live-circle-track,
.analytics-page .live-circle-inner-track,
.analytics-page .live-ring-segment {
    fill: none;
    transform-box: view-box;
    transform-origin: 50% 50%;
}
.analytics-page .live-circle-track { stroke: #e7eef8; stroke-width: 11; }
.analytics-page .live-circle-inner-track { stroke: #edf1fb; stroke-width: 11; }
.analytics-page .live-ring-segment { stroke-linecap: round; }
.analytics-page .live-ring-orbit-segment { stroke-width: 11; filter: drop-shadow(0 0 4px rgba(99, 102, 241, .48)); }
.analytics-page .live-ring-today-ring { stroke: #14b8a6; stroke-width: 11; filter: drop-shadow(0 0 3px rgba(20, 184, 166, .45)); }
.analytics-page .live-ring-spin {
    transform-box: view-box;
    transform-origin: 50% 50%;
    animation: live-ring-rotate 22s linear infinite;
}
.analytics-page .live-ring-spin-today { animation-duration: 15s; animation-direction: reverse; }
@keyframes live-ring-rotate { to { transform: rotate(360deg); } }
@keyframes live-ring-color-cycle {
    0%, 24.999% { --live-ring-color: #3b82f6; }
    25%, 49.999% { --live-ring-color: #8b5cf6; }
    50%, 74.999% { --live-ring-color: #14b8a6; }
    75%, 99.999% { --live-ring-color: #f59e0b; }
    100% { --live-ring-color: #3b82f6; }
}
@keyframes live-circle-pulse {
    0%, 100% { box-shadow: 0 8px 16px rgba(57, 101, 174, .11); }
    50% { box-shadow: 0 10px 24px rgba(79, 70, 229, .18), 0 0 0 7px rgba(99, 102, 241, .045); }
}
.analytics-page .live-circle-center {
    position: absolute;
    z-index: 2;
    inset: 19%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    overflow: hidden;
    border: 1px solid rgba(221, 232, 246, .92);
    border-radius: 50%;
    background: rgba(255,255,255,.96);
    box-shadow: inset 0 2px 10px rgba(58, 89, 147, .06), 0 3px 10px rgba(65, 99, 167, .08);
    text-align: center;
}
.analytics-page .live-circle-center .live-today-label {
    gap: 4px;
    color: #334b65;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .2px;
    white-space: nowrap;
}
.analytics-page .live-circle-center .live-today-value {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0 2px;
    box-sizing: border-box;
    overflow: hidden;
    background: none;
    background-clip: border-box;
    -webkit-background-clip: border-box;
    -webkit-text-fill-color: #0f766e;
    color: #0f766e;
    font-size: clamp(12px, 1vw, 15px);
    font-weight: 850;
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
    letter-spacing: -.15px;
    white-space: nowrap;
    text-overflow: clip;
}
.analytics-page .live-spark-cap { color: #526b85; font-size: 10px; font-weight: 700; }
.analytics-page .live-circle-legend {
    width: 100%;
    margin-top: 1px;
    color: #334b65;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .1px;
    text-align: center;
}
.analytics-page .live-earnings-details { display: grid; gap: 10px; min-width: 0; }
.analytics-page .live-mini-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.analytics-page .live-mini-stat {
    position: relative;
    overflow: hidden;
    padding: 10px 12px;
    border: 1px solid var(--live-stat-border, rgba(255,255,255,.3));
    border-radius: 13px;
    background: var(--live-stat-bg, linear-gradient(135deg, #36a9ef, #4f6ee8));
    background-size: 200% 200%;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.34), 0 7px 16px rgba(39, 66, 104, .18);
    animation: live-stat-gradient-shift 8s ease-in-out infinite;
    transition: box-shadow .2s ease, border-color .2s ease;
}
.analytics-page .live-mini-stat::before {
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--live-stat-accent, #3b82f6);
    content: "";
}
.analytics-page .live-mini-stat::after {
    position: absolute;
    z-index: 0;
    top: -55%;
    bottom: -55%;
    left: -45%;
    width: 38%;
    background: linear-gradient(105deg, transparent 8%, rgba(255,255,255,.08) 34%, rgba(255,255,255,.42) 50%, rgba(255,255,255,.08) 66%, transparent 92%);
    content: "";
    pointer-events: none;
    transform: translateX(-180%) skewX(-18deg);
    animation: live-stat-crystal-shine 5.6s ease-in-out infinite;
}
.analytics-page .live-mini-stat span,
.analytics-page .live-mini-stat strong { position: relative; z-index: 2; }
.analytics-page .live-mini-stat:nth-child(2) { animation-delay: -.9s; }
.analytics-page .live-mini-stat:nth-child(3) { animation-delay: -1.8s; }
.analytics-page .live-mini-stat:nth-child(4) { animation-delay: -2.7s; }
.analytics-page .live-mini-stat:nth-child(2)::after { animation-delay: -.8s; }
.analytics-page .live-mini-stat:nth-child(3)::after { animation-delay: -1.6s; }
.analytics-page .live-mini-stat:nth-child(4)::after { animation-delay: -2.4s; }
@keyframes live-stat-gradient-shift {
    0%, 100% { background-position: 0% 45%; }
    50% { background-position: 100% 55%; }
}
@keyframes live-stat-crystal-shine {
    0%, 14% { opacity: 0; transform: translateX(-180%) skewX(-18deg); }
    22% { opacity: .8; }
    48%, 100% { opacity: 0; transform: translateX(430%) skewX(-18deg); }
}
.analytics-page .live-mini-stat:nth-child(1) {
    --live-stat-accent: rgba(255,255,255,.78);
    --live-stat-border: rgba(255,255,255,.3);
    --live-stat-bg: linear-gradient(135deg, #36a9ef, #4f6ee8);
    --live-stat-ink: #fff;
    --live-stat-label: rgba(255,255,255,.92);
}
.analytics-page .live-mini-stat:nth-child(2) {
    --live-stat-accent: rgba(255,255,255,.78);
    --live-stat-border: rgba(255,255,255,.3);
    --live-stat-bg: linear-gradient(135deg, #39bd82, #239b76);
    --live-stat-ink: #fff;
    --live-stat-label: rgba(255,255,255,.92);
}
.analytics-page .live-mini-stat:nth-child(3) {
    --live-stat-accent: rgba(255,255,255,.78);
    --live-stat-border: rgba(255,255,255,.3);
    --live-stat-bg: linear-gradient(135deg, #9654f2, #673be0);
    --live-stat-ink: #fff;
    --live-stat-label: rgba(255,255,255,.92);
}
.analytics-page .live-mini-stat:nth-child(4) {
    --live-stat-accent: rgba(255,255,255,.78);
    --live-stat-border: rgba(255,255,255,.3);
    --live-stat-bg: linear-gradient(135deg, #31b5ac, #218e8b);
    --live-stat-ink: #fff;
    --live-stat-label: rgba(255,255,255,.92);
}
.analytics-page .live-mini-stat:hover {
    border-color: rgba(255,255,255,.65);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 10px 20px rgba(39, 66, 104, .2);
}
.analytics-page .live-mini-stat span {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--live-stat-label, #52677e);
    color: #fff;
    font-size: 10.5px;
    font-weight: 850;
    letter-spacing: .25px;
    text-shadow: 0 1px 2px rgba(16, 24, 40, .2);
}
.analytics-page .live-mini-stat span::before {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: var(--live-stat-accent, rgba(255,255,255,.78));
    box-shadow: 0 0 7px rgba(255,255,255,.35);
    content: "";
}
.analytics-page .live-mini-stat strong {
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 1px 3px rgba(16, 24, 40, .24);
}
.analytics-page .live-earnings-note {
    margin-top: 12px;
    padding: 10px 12px;
    border-left: 3px solid #3b82f6;
    border-radius: 7px;
    background: #f1f6fd;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.55;
    opacity: 1;
}
@media (max-width: 760px) {
    .analytics-page .analytics-live-earnings-card .live-earnings-body { grid-template-columns: 1fr; }
    .analytics-page .live-circle-panel { width: min(100%, 270px); justify-self: center; }
    .analytics-page .live-circle-wrap { width: 184px; }
    .analytics-page .live-circle-center .live-today-value { font-size: clamp(12px, 3vw, 15px); }
}
@media (prefers-reduced-motion: reduce) {
    .analytics-page .live-mini-stat { animation: none; }
    .analytics-page .live-mini-stat::after { display: none; animation: none; }
}

/* Keep the overall range selector visually balanced and easy to scan. */
.analytics-page .analytics-filter-bar {
    display: none;
    grid-template-columns: minmax(0, 1fr) max-content;
    grid-template-rows: auto auto;
    gap: 8px 14px;
    padding: 11px 14px;
    border-left-width: 4px;
    border-radius: 13px;
    background: #fff;
}
.analytics-page .analytics-period-panel { display: contents; }
.analytics-page .analytics-filter-caption {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 0;
}
.analytics-page .analytics-filter-caption strong {
    color: #294966;
    font-size: 12px;
    letter-spacing: .1px;
}
.analytics-page .analytics-filter-caption span {
    display: inline;
    color: #8596a8;
    font-size: 10px;
}
.analytics-page .analytics-history-filter {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
    margin: 0;
}
.analytics-page .analytics-period-panel .history-filter-presets {
    width: fit-content;
    max-width: 100%;
    gap: 3px;
    padding: 3px;
    border: 1px solid #e6edf4;
    border-radius: 10px;
    background: #f3f7fb;
}
.analytics-page .analytics-period-panel .history-chip {
    padding: 6px 12px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #60778f;
    box-shadow: none;
}
.analytics-page .analytics-period-panel .history-chip.active {
    background: linear-gradient(125deg, #328ed2, #426be1);
    color: #fff;
    box-shadow: 0 2px 6px rgba(50, 118, 205, .2);
}
.analytics-page .analytics-period-panel .filter-current {
    grid-column: 2;
    grid-row: 1;
    gap: 6px;
    font-size: 9px;
}
.analytics-page .analytics-period-panel .filter-current-value {
    padding: 4px 8px;
    border-radius: 7px;
}
.analytics-page .analytics-filter-custom {
    grid-column: 2;
    grid-row: 2;
    align-items: center;
    gap: 7px;
}
.analytics-page .analytics-filter-custom label {
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border: 1px solid #dce6ef;
    border-radius: 8px;
    background: #fff;
    letter-spacing: .35px;
}
.analytics-page .analytics-filter-custom label span { color: #7b8da0; }
.analytics-page .analytics-filter-custom input[type="date"] {
    width: 118px;
    min-height: 24px;
    padding: 2px 3px;
    border: 0;
    background: transparent;
}
.analytics-page .analytics-filter-custom .analytics-chip-apply {
    min-height: 33px;
    padding: 6px 13px;
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(29, 112, 190, .18);
}
@media (max-width: 1050px) {
    .analytics-page .analytics-filter-caption span { display: none; }
    .analytics-page .analytics-period-panel .history-filter-presets { width: 100%; }
    .analytics-page .analytics-filter-custom {
        grid-column: 1 / -1;
        grid-row: 3;
        justify-content: flex-end;
    }
}
@media (max-width: 760px) {
    .analytics-page .analytics-filter-bar {
        grid-template-columns: minmax(0, 1fr) max-content;
        gap: 7px 8px;
        padding: 9px;
    }
    .analytics-page .analytics-filter-caption { grid-column: 1; grid-row: 1; }
    .analytics-page .analytics-period-panel .filter-current { grid-column: 2; grid-row: 1; }
    .analytics-page .analytics-history-filter { grid-column: 1 / -1; grid-row: 2; }
    .analytics-page .analytics-period-panel .history-filter-presets {
        width: 100%;
        overflow-x: auto;
        padding: 3px;
        scrollbar-width: thin;
    }
    .analytics-page .analytics-filter-custom {
        grid-column: 1 / -1;
        grid-row: 3;
        justify-content: stretch;
    }
    .analytics-page .analytics-filter-custom label { flex: 1 1 0; min-width: 0; }
    .analytics-page .analytics-filter-custom input[type="date"] { width: 100%; min-width: 0; }
}

/* ============================================================
   Modern Payment Charts redesign (unique style)
   ============================================================ */

/* ---- Payment Volume: modern rounded stacked columns ---- */
.analytics-page [data-analytics-graph-card="payment_volume"] {
    background: linear-gradient(160deg, #f5f7ff 0%, #ffffff 55%, #eef2ff 100%);
    border: 1px solid #e0e7ff;
    border-radius: 22px;
    box-shadow: 0 12px 30px rgba(79, 70, 229, .08);
}
.analytics-page [data-analytics-graph-card="payment_volume"] .analytics-graph-plot {
    box-sizing: border-box;
    height: 184px;
}
.analytics-page [data-analytics-graph-card="payment_volume"] .analytics-graph-bars {
    box-sizing: border-box;
    height: 100%;
    align-items: stretch;
    gap: 10px;
    padding: 0 4px 4px;
}
.analytics-page [data-analytics-graph-card="payment_volume"] .analytics-graph-column {
    height: 100%;
    min-height: 0;
    gap: 0;
    justify-content: flex-end;
}
.analytics-page [data-analytics-graph-card="payment_volume"] .analytics-graph-stack {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-end;
    width: min(34px, 60%);
    min-height: 10px;
    border-radius: 14px;
    background: transparent;
    box-shadow: none;
    overflow: hidden;
    transition: transform .22s ease, filter .22s ease;
}
.analytics-page [data-analytics-graph-card="payment_volume"] .analytics-graph-scroll {
    overflow-x: auto;
    overflow-y: hidden;
}
.analytics-page [data-analytics-graph-card="payment_volume"] .analytics-graph-column:hover .analytics-graph-stack {
    transform: scaleY(1.04);
    filter: brightness(1.05);
}
.analytics-page [data-analytics-graph-card="payment_volume"] .analytics-graph-segment {
    display: block;
    width: 100%;
    flex: 0 0 auto;
    min-height: 2px;
    border-radius: 14px;
    position: relative;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.5), inset 0 -1px 0 rgba(0,0,0,.06);
}
.analytics-page [data-analytics-graph-card="payment_volume"] .analytics-graph-segment::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,.35), transparent 55%);
    pointer-events: none;
}
.analytics-page [data-analytics-graph-card="payment_volume"] .analytics-graph-label {
    margin-top: 7px;
    font-size: 10px;
    font-weight: 700;
    color: #475569;
    letter-spacing: .2px;
}
.analytics-page [data-analytics-graph-card="payment_volume"] .analytics-graph-value {
    font-size: 10px;
    font-weight: 800;
    color: #1e293b;
}
.analytics-page [data-analytics-graph-card="payment_volume"] .analytics-graph-column.has-value .analytics-graph-value {
    width: auto;
    max-width: 100%;
    padding: 4px 6px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    margin-bottom: 5px;
    background: #fff;
    color: #1d4ed8;
    box-shadow: 0 2px 8px rgba(37, 99, 235, .09);
    opacity: 1;
}
.analytics-page [data-analytics-graph-card="payment_volume"] .analytics-graph-legend {
    justify-content: center;
    gap: 8px 18px;
    padding: 12px 2px 2px;
    border-top: 1px dashed #e2e8f0;
    margin-top: 8px;
}
.analytics-page [data-analytics-graph-card="payment_volume"] .analytics-graph-legend span {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 700;
    color: #334155;
    box-shadow: 0 1px 3px rgba(15,23,42,.04);
}
.analytics-page [data-analytics-graph-card="payment_volume"] .analytics-graph-legend i {
    width: 9px;
    height: 9px;
    border-radius: 3px;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--legend-color) 25%, transparent);
}

/* ---- Payment Purposes: modern donut + purpose cards ---- */
.analytics-page .analytics-payment-purpose-card {
    background: linear-gradient(160deg, #fef6ff 0%, #ffffff 55%, #f0fdfa 100%);
    border: 1px solid #fce7f3;
    box-shadow: 0 12px 30px rgba(236, 72, 153, .06);
}
.analytics-page .payment-purpose-svg {
    filter: drop-shadow(0 10px 22px rgba(168, 85, 247, .14));
}
.analytics-page .payment-purpose-svg .donut-seg {
    stroke-linecap: round;
    transition: stroke-width .25s ease, filter .25s ease;
}
.analytics-page .payment-purpose-svg .donut-seg:hover {
    stroke-width: 6.8;
    filter: drop-shadow(0 0 7px currentColor);
}
.analytics-page .payment-purpose-item {
    background: linear-gradient(135deg, #ffffff 0%, #fafaff 100%);
    border: 1px solid #ede9fe;
    border-radius: 16px;
    padding: 12px 16px;
}
.analytics-page .payment-purpose-item:hover {
    border-color: #c4b5fd;
    box-shadow: 0 10px 24px rgba(124, 58, 237, .1);
}
.analytics-page .payment-purpose-dot {
    width: 11px;
    height: 11px;
    border-radius: 4px;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot-color, #8b5cf6) 22%, transparent);
}
.analytics-page .payment-purpose-name {
    font-weight: 700;
    color: #1e1b4b;
}
.analytics-page .payment-purpose-count {
    background: #f1f5f9;
    border-radius: 999px;
    padding: 1px 8px;
    font-size: 10px;
}
.analytics-page .payment-purpose-bar {
    height: 7px;
    background: #f1f5f9;
}
.analytics-page .payment-purpose-amount {
    font-size: 14px;
    font-weight: 800;
    color: #4c1d95;
}
.analytics-page .payment-purpose-percent {
    font-weight: 700;
    color: #7c3aed;
}

/* Payment cards use the same dimensions as the rest of the analytics graphs. */
.analytics-page .analytics-payments-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 12px;
    margin: 8px 0 16px;
}
.analytics-page .analytics-payments-grid > .analytics-graph-card {
    min-width: 0;
    min-height: 270px;
    margin: 0;
    padding: 14px 15px 11px;
    border-radius: 20px;
}
.analytics-page .analytics-payment-history-card {
    border-color: #dbeafe;
    background: linear-gradient(145deg, #ffffff 0%, #f7fbff 62%, #f2f7ff 100%);
}
.analytics-page .analytics-payment-history-card .analytics-graph-head {
    margin-bottom: 9px;
}
.analytics-page .analytics-payment-history-card .analytics-eyebrow {
    color: #3878bd;
}
.analytics-page .analytics-payment-history-list {
    display: flex;
    max-height: 218px;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    padding: 1px 3px 2px 1px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
.analytics-page .analytics-payment-history-item {
    --payment-accent: #6366f1;
    display: grid;
    grid-template-columns: 4px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    min-height: 54px;
    padding: 7px 10px 7px 8px;
    border: 1px solid color-mix(in srgb, var(--payment-accent) 18%, white);
    border-radius: 12px;
    background: linear-gradient(105deg, color-mix(in srgb, var(--payment-accent) 8%, white), #fff 78%);
}
.analytics-page .analytics-payment-history-item.is-approved { --payment-accent: #10a779; }
.analytics-page .analytics-payment-history-item.is-pending { --payment-accent: #e89a16; }
.analytics-page .analytics-payment-history-item.is-rejected { --payment-accent: #e24b69; }
.analytics-page .analytics-payment-history-rail {
    align-self: stretch;
    min-height: 34px;
    border-radius: 99px;
    background: linear-gradient(180deg, var(--payment-bar-start), var(--payment-bar-color));
    box-shadow: 0 1px 7px color-mix(in srgb, var(--payment-accent) 24%, transparent);
}
.analytics-page .analytics-payment-history-info {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 1px;
}
.analytics-page .analytics-payment-history-purpose {
    color: color-mix(in srgb, var(--payment-accent) 78%, #17243c);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .25px;
    line-height: 1.25;
    text-transform: uppercase;
}
.analytics-page .analytics-payment-history-info strong {
    overflow: hidden;
    color: #14233f;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.analytics-page .analytics-payment-history-info small {
    overflow: hidden;
    color: #3f4f68;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.analytics-page .analytics-payment-history-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    white-space: nowrap;
}
.analytics-page .analytics-payment-history-meta strong {
    color: #14233f;
    font-size: 13px;
    font-weight: 900;
}
.analytics-page .analytics-payment-history-meta span {
    padding: 3px 7px;
    border-radius: 99px;
    background: color-mix(in srgb, var(--payment-accent) 11%, white);
    color: color-mix(in srgb, var(--payment-accent) 78%, #17243c);
    font-size: 9px;
    font-weight: 850;
}
.analytics-page [data-analytics-graph-card="payment_volume"].analytics-payment-breakdown-card {
    border-color: #d5e3fa;
    background: linear-gradient(145deg, #ffffff 0%, #f8fbff 60%, #f2f7ff 100%);
    box-shadow: 0 8px 22px rgba(59, 99, 160, .07);
}
.analytics-page [data-analytics-graph-card="payment_volume"].analytics-payment-breakdown-card .analytics-eyebrow {
    color: #3973bc;
}
.analytics-page [data-analytics-graph-card="payment_volume"].analytics-payment-breakdown-card .analytics-graph-head {
    margin-bottom: 12px;
}
.analytics-page .analytics-payment-breakdown-list {
    max-height: 218px;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
.analytics-page .analytics-payment-breakdown-item {
    display: block;
    margin: 0 0 13px;
}
.analytics-page .analytics-payment-breakdown-row {
    display: grid;
    grid-template-columns: minmax(130px, 1.1fr) minmax(100px, 4fr) auto;
    align-items: center;
    gap: 12px;
}
.analytics-page .analytics-payment-breakdown-label {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding-left: 14px;
    color: #26344d;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    -webkit-font-smoothing: antialiased;
}
.analytics-page .analytics-payment-breakdown-label::before {
    position: absolute;
    top: 4px;
    left: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--payment-accent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--payment-accent) 16%, white);
    content: "";
}
.analytics-page .analytics-payment-breakdown-label small {
    color: #56647a;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
}
.analytics-page .analytics-payment-breakdown-row > b {
    flex: 0 0 auto;
    color: #172554;
    font-size: 11px;
    font-weight: 800;
    -webkit-font-smoothing: antialiased;
}
.analytics-page [data-analytics-graph-card="payment_volume"] .analytics-horizontal-track {
    height: 8px;
    border: 0;
    border-radius: 99px;
    background: color-mix(in srgb, var(--payment-accent) 8%, white);
    box-shadow: inset 0 1px 1px rgba(33, 50, 77, .06);
    overflow: hidden;
}
.analytics-page [data-analytics-graph-card="payment_volume"] .analytics-horizontal-track i {
    display: block;
    width: 100%;
    height: 6px;
    margin: 1px 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--payment-bar-start), var(--payment-bar-color));
    box-shadow: 0 1px 4px color-mix(in srgb, var(--payment-bar-color) 22%, transparent);
}
.analytics-page .analytics-payment-breakdown-note {
    margin: 0;
    color: #7b8798;
    font-size: 9px;
    line-height: 1.4;
}
@media (max-width: 900px) {
    .analytics-page .analytics-payments-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .analytics-page .analytics-payments-grid > .analytics-graph-card {
        min-height: 0;
    }
    .analytics-page .analytics-payment-history-list {
        max-height: 250px;
    }
}
@media (max-width: 480px) {
    .analytics-page .analytics-payments-grid {
        gap: 8px;
        margin-top: 6px;
    }
    .analytics-page .analytics-payments-grid > .analytics-graph-card {
        padding: 10px;
    }
    .analytics-page .analytics-payment-breakdown-row {
        grid-template-columns: minmax(105px, 1.15fr) minmax(48px, 1.5fr) auto;
        gap: 8px;
    }
    .analytics-page .analytics-payment-breakdown-label {
        font-size: 10px;
    }
    .analytics-page .analytics-payment-breakdown-label small {
        font-size: 10px;
    }
    .analytics-page .analytics-payment-breakdown-row > b {
        font-size: 10px;
    }
}

/* Task analytics: milestone route and faceted reward calendar. */
.analytics-page .analytics-task-rhythm-card {
    display: flex;
    flex-direction: column;
    height: 286px;
    min-height: 286px;
    max-height: 286px;
    padding: 14px 15px 12px;
    overflow: hidden;
}
.analytics-page .analytics-task-rhythm-card .analytics-graph-head {
    flex: 0 0 auto;
    margin-bottom: 10px;
}
.analytics-page .analytics-task-mosaic-chart {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    padding: 8px;
    overflow: hidden;
    border: 1px solid #dbe4ff;
    border-radius: 16px;
    background:
        radial-gradient(circle at 100% 0, rgba(91,111,245,.1), transparent 38%),
        linear-gradient(145deg, #fff, #f7f9ff);
}
.analytics-page .analytics-task-mosaic-heading {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 2px 7px;
    color: #56678e;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .6px;
}
.analytics-page .analytics-task-mosaic-heading span:last-child {
    color: #8793ae;
    font-weight: 700;
    letter-spacing: 0;
}
.analytics-page .analytics-task-mosaic-grid {
    display: grid;
    flex: 1 1 auto;
    min-height: 0;
    align-content: start;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    grid-auto-rows: minmax(118px, auto);
    gap: 8px;
    overflow-y: auto;
    padding: 0 2px 3px;
    scrollbar-width: thin;
    scrollbar-color: #b9c6f1 transparent;
}
.analytics-page .analytics-task-mosaic-tile {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 118px;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 5px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--task-tile-accent) 18%, white);
    border-radius: 16px;
    background:
        radial-gradient(circle at 50% 18%, color-mix(in srgb, var(--task-tile-accent) 10%, white), transparent 56%),
        rgba(255,255,255,.9);
    box-shadow: 0 3px 9px color-mix(in srgb, var(--task-tile-accent) 8%, transparent);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.analytics-page .analytics-task-mosaic-tile:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--task-tile-accent) 38%, white);
    box-shadow: 0 7px 15px color-mix(in srgb, var(--task-tile-accent) 15%, transparent);
}
.analytics-page .analytics-task-mosaic-ring {
    position: relative;
    display: grid;
    width: 53px;
    height: 53px;
    flex: 0 0 53px;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(var(--task-tile-accent) 0 var(--task-ring-fill), #e8edf6 var(--task-ring-fill) 100%);
    box-shadow: 0 4px 10px color-mix(in srgb, var(--task-tile-accent) 17%, transparent);
}
.analytics-page .analytics-task-mosaic-ring::before {
    position: absolute;
    inset: 5px;
    border: 1px solid color-mix(in srgb, var(--task-tile-accent) 16%, white);
    border-radius: 50%;
    background: #fff;
    content: "";
}
.analytics-page .analytics-task-mosaic-ring b {
    position: relative;
    color: color-mix(in srgb, var(--task-tile-accent) 78%, #24334f);
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
}
.analytics-page .analytics-task-mosaic-unit {
    color: #8994aa;
    font-size: 7px;
    font-weight: 850;
    letter-spacing: .65px;
    line-height: 9px;
}
.analytics-page .analytics-task-mosaic-title {
    display: -webkit-box;
    width: 100%;
    min-width: 0;
    min-height: 24px;
    overflow: hidden;
    color: #293954;
    font-size: 9px;
    font-weight: 850;
    line-height: 1.25;
    text-align: center;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.analytics-page .analytics-task-mosaic-date {
    display: block;
    width: 100%;
    overflow: hidden;
    color: #74819a;
    font-size: 7px;
    font-weight: 650;
    line-height: 10px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.analytics-page .analytics-task-gem-chart {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding: 5px;
    border: 1px solid #f0dfb6;
    border-radius: 18px;
    background:
        radial-gradient(ellipse at 50% 0, rgba(239,183,63,.14), transparent 62%),
        linear-gradient(145deg, #fffefa, #fff8e9);
}
.analytics-page .analytics-task-gem-chart.is-long-range {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #dfbd70 transparent;
}
.analytics-page .analytics-task-gem-grid {
    display: grid;
    width: 100%;
    height: 100%;
    grid-template-columns: repeat(var(--gem-columns), minmax(0, 1fr));
    grid-auto-rows: 62px;
    align-content: center;
    gap: 5px;
}
.analytics-page .analytics-task-gem-chart.is-long-range .analytics-task-gem-grid {
    height: auto;
    align-content: start;
    grid-auto-rows: 48px;
}
.analytics-page .analytics-task-gem-period {
    display: grid;
    min-width: 0;
    min-height: 0;
    grid-template-rows: 12px minmax(14px, 1fr) 12px;
    justify-items: center;
    align-items: center;
    gap: 1px;
    padding: 3px 2px;
    border: 1px solid color-mix(in srgb, var(--month-accent) 30%, white);
    border-radius: 12px;
    background: color-mix(in srgb, var(--month-accent) 6%, white);
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.analytics-page .analytics-task-gem-period.has-reward {
    border-color: color-mix(in srgb, var(--month-accent) 62%, white);
    background: linear-gradient(150deg, color-mix(in srgb, var(--month-accent) 7%, white), color-mix(in srgb, var(--month-accent) 18%, white));
    box-shadow: 0 3px 9px color-mix(in srgb, var(--month-accent) 13%, transparent);
}
.analytics-page .analytics-task-gem-period:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px color-mix(in srgb, var(--month-accent) 18%, transparent);
}
.analytics-page .analytics-task-gem-label {
    display: block;
    width: 100%;
    overflow: hidden;
    color: color-mix(in srgb, var(--month-accent) 42%, #1f3047);
    font-size: 9px;
    font-weight: 850;
    line-height: 12px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.analytics-page .analytics-task-gem-stone {
    position: relative;
    display: block;
    width: var(--gem-size);
    height: calc(var(--gem-size) * 1.08);
    max-width: 17px;
    max-height: 18px;
    clip-path: polygon(50% 0, 100% 34%, 78% 100%, 22% 100%, 0 34%);
    background: linear-gradient(145deg, color-mix(in srgb, var(--month-accent) 38%, white), var(--month-accent));
    opacity: .65;
    filter: drop-shadow(0 2px 3px color-mix(in srgb, var(--month-accent) 19%, transparent));
    transition: transform .2s ease, filter .2s ease;
}
.analytics-page .analytics-task-gem-stone::before {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.8) 0 48%, rgba(255,255,255,0) 49%);
    clip-path: polygon(50% 0, 50% 100%, 0 34%);
    content: "";
}
.analytics-page .analytics-task-gem-stone.is-earned {
    background: linear-gradient(145deg, color-mix(in srgb, var(--month-accent) 34%, white), var(--month-accent) 74%, color-mix(in srgb, var(--month-accent) 68%, #25324c));
    opacity: 1;
    filter: drop-shadow(0 3px 5px color-mix(in srgb, var(--month-accent) 30%, transparent));
}
.analytics-page .analytics-task-gem-period:hover .analytics-task-gem-stone {
    transform: translateY(-2px) scale(1.08);
}
.analytics-page .analytics-task-gem-value {
    color: color-mix(in srgb, var(--month-accent) 58%, #1c2c40);
    font-size: 10px;
    font-weight: 900;
    line-height: 12px;
}
@media (max-width: 760px) {
    .analytics-page .analytics-task-rhythm-card {
        height: 258px;
        min-height: 258px;
        max-height: 258px;
        padding: 11px 10px 9px;
    }
    .analytics-page .analytics-task-mosaic-chart {
        padding: 6px;
    }
    .analytics-page .analytics-task-mosaic-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: minmax(108px, auto);
        gap: 6px;
    }
    .analytics-page .analytics-task-mosaic-tile {
        min-height: 108px;
        padding: 5px 4px;
    }
    .analytics-page .analytics-task-mosaic-ring {
        width: 47px;
        height: 47px;
        flex-basis: 47px;
    }
    .analytics-page .analytics-task-mosaic-title {
        font-size: 8px;
    }
    .analytics-page .analytics-task-gem-chart {
        padding: 4px;
    }
    .analytics-page .analytics-task-gem-grid {
        grid-template-columns: repeat(var(--gem-mobile-columns), minmax(0, 1fr));
        grid-auto-rows: 42px;
        gap: 4px;
    }
    .analytics-page .analytics-task-gem-period {
        grid-template-rows: 10px minmax(12px, 1fr) 10px;
        gap: 1px;
        padding: 2px;
    }
    .analytics-page .analytics-task-gem-label {
        font-size: 8px;
        line-height: 10px;
    }
    .analytics-page .analytics-task-gem-value {
        font-size: 9px;
        line-height: 10px;
    }
    .analytics-page .analytics-task-gem-chart.is-long-range .analytics-task-gem-grid {
        grid-auto-rows: 38px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .analytics-page .analytics-task-mosaic-tile,
    .analytics-page .analytics-task-gem-period,
    .analytics-page .analytics-task-gem-stone {
        transition: none;
    }
}
.analytics-page .analytics-task-graphs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 14px;
}
@media (max-width: 980px) {
    .analytics-page .analytics-task-graphs {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Investment portfolio: KPI strip, deposit coin timeline and allocation matrix. */
.analytics-page .analytics-kpis-investment {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 10px;
    margin: 12px 0 15px;
}
.analytics-page .analytics-kpis-investment .analytics-kpi {
    min-width: 0;
    min-height: 82px;
}
.analytics-page .investment-analytics-charts {
    align-items: stretch;
    gap: 12px;
}
.analytics-page .investment-timeline-card,
.analytics-page .investment-allocation-card {
    height: 100%;
    min-height: 350px;
    padding: 14px 15px 13px;
}
.analytics-page .investment-timeline-card {
    --graph-border: #d5e9e8;
    --graph-hover: #9dcfca;
    --graph-radius: 17px 17px 8px 17px;
    --graph-surface: linear-gradient(155deg, #fff, #f5fbfb 72%, #f8faff);
    --graph-shadow: 0 9px 22px rgba(34, 112, 121, .075);
}
.analytics-page .investment-timeline-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 10px 0;
    padding: 9px 11px;
    border: 1px solid #dceceb;
    border-radius: 11px;
    background: linear-gradient(100deg, #eff9f8, #fff 82%);
}
.analytics-page .investment-timeline-summary > div {
    display: grid;
    gap: 2px;
}
.analytics-page .investment-timeline-summary > div > span {
    color: #63817f;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: .65px;
}
.analytics-page .investment-timeline-summary > div > strong {
    color: #1b6976;
    font-size: 16px;
    font-weight: 900;
}
.analytics-page .investment-timeline-summary > small {
    padding: 5px 8px;
    border-radius: 999px;
    background: #e2f3f1;
    color: #337a78;
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap;
}
.analytics-page .investment-deposit-grid {
    display: grid;
    grid-template-columns: repeat(var(--deposit-columns), minmax(0, 1fr));
    grid-auto-rows: 112px;
    gap: 8px;
    margin-top: 7px;
}
.analytics-page .investment-deposit-grid.is-single {
    justify-content: center;
    grid-template-columns: minmax(0, 220px);
}
.analytics-page .investment-deposit-cell {
    display: grid;
    min-width: 0;
    grid-template-rows: auto 1fr auto;
    justify-items: center;
    gap: 4px;
    padding: 8px 7px 7px;
    border: 1px solid color-mix(in srgb, var(--deposit-accent) 25%, white);
    border-bottom: 3px solid var(--deposit-accent);
    border-radius: 12px 12px 8px 8px;
    background: linear-gradient(155deg, color-mix(in srgb, var(--deposit-accent) 7%, white), #fff 76%);
    box-shadow: 0 4px 10px color-mix(in srgb, var(--deposit-accent) 9%, transparent);
}
.analytics-page .investment-deposit-period {
    display: grid;
    justify-items: center;
    gap: 2px;
    max-width: 100%;
    text-align: center;
}
.analytics-page .investment-deposit-period > strong {
    overflow: hidden;
    max-width: 100%;
    color: #35485d;
    font-size: 9px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.analytics-page .investment-deposit-period > small {
    color: color-mix(in srgb, var(--deposit-accent) 76%, #34465a);
    font-size: 7px;
    font-weight: 850;
    letter-spacing: .35px;
}
.analytics-page .investment-coin-stack {
    display: flex;
    width: 54px;
    min-height: 40px;
    flex-direction: column-reverse;
    align-items: center;
    justify-content: flex-start;
    padding-top: 3px;
}
.analytics-page .investment-coin-stack > i {
    display: block;
    width: 36px;
    height: 9px;
    flex: 0 0 9px;
    margin-top: -3px;
    border: 1px solid color-mix(in srgb, var(--deposit-accent) 72%, white);
    border-radius: 50%;
    background: linear-gradient(180deg, #fff 0%, color-mix(in srgb, var(--deposit-accent) 38%, white) 42%, var(--deposit-accent) 100%);
    box-shadow: 0 2px 4px color-mix(in srgb, var(--deposit-accent) 20%, transparent);
}
.analytics-page .investment-coin-stack.is-empty::after {
    width: 17px;
    height: 17px;
    border: 1px dashed #cbd8df;
    border-radius: 50%;
    background: #fff;
    content: "";
}
.analytics-page .investment-deposit-amount {
    max-width: 100%;
    overflow: hidden;
    color: #263d52;
    font-size: 10px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.analytics-page .investment-empty-state {
    display: grid;
    min-height: 220px;
    place-items: center;
    color: #718398;
    font-size: 12px;
    font-weight: 650;
}
.analytics-page .investment-allocation-card {
    --graph-border: #e2dcf7;
    --graph-hover: #c1b3ee;
    --graph-radius: 8px 17px 17px 17px;
    --graph-surface: linear-gradient(155deg, #fff, #faf8ff 76%, #f7fbff);
    --graph-shadow: 0 9px 22px rgba(100, 79, 158, .07);
}
.analytics-page .investment-plan-matrix {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-content: start;
    gap: 9px;
    margin: 12px 0 3px;
}
.analytics-page .investment-plan-tile {
    display: grid;
    min-width: 0;
    min-height: 132px;
    grid-template-rows: auto minmax(24px, 1fr) auto auto auto;
    align-content: stretch;
    gap: 8px;
    padding: 11px 12px 10px;
    border: 1px solid color-mix(in srgb, var(--plan-accent) 25%, white);
    border-top: 3px solid var(--plan-accent);
    border-radius: 12px;
    background: linear-gradient(155deg, color-mix(in srgb, var(--plan-accent) 8%, white), #fff 78%);
    box-shadow: 0 4px 11px color-mix(in srgb, var(--plan-accent) 8%, transparent);
    transition: transform .18s ease, box-shadow .18s ease;
}
.analytics-page .investment-plan-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px color-mix(in srgb, var(--plan-accent) 17%, transparent);
}
.analytics-page .investment-plan-tile > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
}
.analytics-page .investment-plan-tile > header > span {
    color: color-mix(in srgb, var(--plan-accent) 74%, #26384c);
    font-size: 9px;
    font-weight: 850;
}
.analytics-page .investment-plan-tile > header > i {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: var(--plan-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--plan-accent) 12%, white);
}
.analytics-page .investment-plan-name {
    display: -webkit-box;
    overflow: hidden;
    color: #24384f;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.analytics-page .investment-plan-capital {
    overflow: hidden;
    color: #182d43;
    font-size: 13px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.analytics-page .investment-plan-share-cells {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 3px;
}
.analytics-page .investment-plan-share-cells > i {
    height: 5px;
    border-radius: 99px;
    background: #e8edf2;
}
.analytics-page .investment-plan-share-cells > i.is-filled {
    background: var(--plan-accent);
    box-shadow: 0 1px 4px color-mix(in srgb, var(--plan-accent) 25%, transparent);
}
.analytics-page .investment-plan-tile > small {
    color: #596d82;
    font-size: 9px;
    font-weight: 700;
}
@media (max-width: 900px) {
    .analytics-page .analytics-kpis-investment {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .analytics-page .investment-timeline-card,
    .analytics-page .investment-allocation-card {
        min-height: 320px;
    }
}
@media (max-width: 640px) {
    .analytics-page .analytics-kpis-investment .analytics-kpi {
        min-height: 74px;
        padding: 9px 10px;
    }
    .analytics-page .investment-timeline-card,
    .analytics-page .investment-allocation-card {
        min-height: 0;
        padding: 11px 10px;
    }
    .analytics-page .investment-deposit-grid {
        grid-template-columns: repeat(var(--deposit-mobile-columns), minmax(0, 1fr));
        grid-auto-rows: 105px;
    }
    .analytics-page .investment-deposit-grid.is-single {
        grid-template-columns: minmax(0, 220px);
    }
    .analytics-page .investment-plan-matrix {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }
    .analytics-page .investment-plan-tile {
        min-height: 122px;
        padding: 9px 9px 8px;
        gap: 7px;
    }
}
@media (max-width: 380px) {
    .analytics-page .analytics-kpis-investment {
        grid-template-columns: minmax(0, 1fr);
    }
    .analytics-page .investment-plan-matrix {
        grid-template-columns: minmax(0, 1fr);
    }
}
@media (prefers-reduced-motion: reduce) {
    .analytics-page .investment-plan-tile {
        transition: none;
    }
}
.analytics-page .analytics-investment-panel {
    overflow: visible;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

/* Keep Analytics sections and summary cards on one spacing and sizing rhythm. */
.analytics-page .analytics-section-toolbar {
    align-items: center;
    margin: 20px 0 12px;
}
.analytics-page .analytics-section-toolbar h3 {
    margin: 0;
}
.analytics-page .analytics-investment-panel {
    margin: 20px 0 16px;
}
.analytics-page .analytics-investment-panel > .analytics-section-toolbar {
    margin: 0 0 12px;
    padding-bottom: 0;
    border-bottom: 0;
}
.analytics-page .analytics-kpi-grid,
.analytics-page .analytics-stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    grid-auto-rows: 1fr;
    align-items: stretch;
    gap: 12px;
    margin: 0 0 16px;
}
.analytics-page .analytics-kpi-grid .analytics-kpi,
.analytics-page .analytics-stat-grid .stat-card {
    min-height: 128px;
}
.analytics-page .analytics-earnings-grid,
.analytics-page .analytics-graph-grid,
.analytics-page .charts-grid.analytics-featured-graphs,
.analytics-page .analytics-payments-grid {
    align-items: stretch;
    grid-auto-rows: 1fr;
    gap: 12px;
    margin: 0 0 16px;
}
.analytics-page .analytics-graph-card {
    margin: 0 0 16px;
}
.analytics-page .analytics-earnings-grid > .analytics-graph-card,
.analytics-page .analytics-graph-grid > .analytics-graph-card,
.analytics-page .charts-grid.analytics-featured-graphs > .analytics-graph-card,
.analytics-page .analytics-payments-grid > .analytics-graph-card {
    min-width: 0;
    margin: 0;
}
@media (max-width: 980px) {
    .analytics-page .analytics-kpi-grid .analytics-kpi,
    .analytics-page .analytics-stat-grid .stat-card {
        min-height: 120px;
    }
}
@media (max-width: 760px) {
    .analytics-page .analytics-section-toolbar {
        margin: 18px 0 10px;
    }
    .analytics-page .analytics-kpi-grid,
    .analytics-page .analytics-stat-grid {
        gap: 10px;
    }
    .analytics-page .analytics-kpi-grid .analytics-kpi,
    .analytics-page .analytics-stat-grid .stat-card {
        min-height: 116px;
    }
}
@media (max-width: 480px) {
    .analytics-page .analytics-section-toolbar {
        margin: 16px 0 9px;
    }
    .analytics-page .analytics-kpi-grid,
    .analytics-page .analytics-stat-grid {
        gap: 9px;
    }
    .analytics-page .analytics-kpi-grid .analytics-kpi,
    .analytics-page .analytics-stat-grid .stat-card {
        min-height: 108px;
    }
    .analytics-page .analytics-earnings-grid,
    .analytics-page .analytics-graph-grid,
    .analytics-page .charts-grid.analytics-featured-graphs,
    .analytics-page .analytics-payments-grid {
        gap: 10px;
    }
}

/* Store analytics: equal purchase-history and order-status cards. */
.analytics-page .analytics-store-graphs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    grid-auto-rows: 1fr;
}
.analytics-page .analytics-store-graphs > .analytics-graph-card {
    display: flex;
    min-width: 0;
    min-height: 286px;
    flex-direction: column;
    padding: 14px 15px 13px;
}
.analytics-page .analytics-store-purchases-card {
    --graph-border: #cce9df;
    --graph-hover: #8dcab4;
    --graph-radius: 10px 22px 10px 22px;
    --graph-surface: linear-gradient(150deg, #f4fcf8, #fff 66%, #f1faf6);
    --graph-shadow: 0 9px 24px rgba(38, 132, 99, .07);
}
.analytics-page .analytics-store-purchases-card .analytics-eyebrow {
    color: #198568;
}
.analytics-page .analytics-store-purchases-card .analytics-mini-filter select {
    border-color: #bfe5d6;
    color: #18785f;
}
.analytics-page .analytics-store-orders-card {
    --graph-border: #d9d3f7;
    --graph-hover: #aaa0e7;
    --graph-radius: 22px 10px 22px 10px;
    --graph-surface: linear-gradient(150deg, #f8f7ff, #fff 68%, #f5f2ff);
    --graph-shadow: 0 9px 24px rgba(100, 79, 174, .07);
}
.analytics-page .analytics-store-orders-card .analytics-eyebrow {
    color: #7054bd;
}
.analytics-page .analytics-store-orders-card .analytics-mini-filter select {
    border-color: #d4cdf2;
    color: #6750b0;
}
.analytics-page .analytics-store-purchase-grid {
    display: grid;
    flex: 1 1 auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-content: center;
    gap: 9px;
    padding: 8px 1px 1px;
}
.analytics-page .analytics-store-purchase-ticket {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 62px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    overflow: hidden;
    padding: 8px 10px;
    border: 1px dashed rgba(25, 133, 104, var(--store-purchase-alpha));
    border-radius: 10px;
    background:
        radial-gradient(circle at 100% 0, rgba(54, 184, 137, var(--store-purchase-alpha)), transparent 56%),
        linear-gradient(135deg, #fff, rgba(232, 248, 240, var(--store-purchase-alpha)));
    box-shadow: 0 3px 9px rgba(38, 132, 99, .045), inset 0 1px #fff;
}
.analytics-page .analytics-store-purchase-ticket::after {
    position: absolute;
    right: -12px;
    bottom: -18px;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(25, 133, 104, .13);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}
.analytics-page .analytics-store-purchase-ticket > span {
    overflow: hidden;
    color: #648173;
    font-size: 9px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.analytics-page .analytics-store-purchase-ticket > strong {
    overflow: hidden;
    color: #1e4d3d;
    font-size: 12px;
    font-weight: 850;
    font-variant-numeric: tabular-nums;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.analytics-page .analytics-store-purchase-ticket > small {
    color: #70877c;
    font-size: 8px;
    font-weight: 700;
}
.analytics-page .analytics-store-order-timeline {
    display: grid;
    flex: 1 1 auto;
    align-content: center;
    gap: 7px;
    padding: 7px 1px 9px;
}
.analytics-page .analytics-store-order-period-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 3px;
    color: #69748b;
    font-size: 9px;
    font-weight: 700;
}
.analytics-page .analytics-store-order-period-head strong {
    min-width: 22px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #eeebfb;
    color: #57449f;
    font-size: 9px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.analytics-page .analytics-store-order-track {
    display: flex;
    width: 100%;
    height: 7px;
    gap: 2px;
    overflow: hidden;
    border-radius: 999px;
    background: #ebe9f5;
}
.analytics-page .analytics-store-order-track i {
    min-width: 3px;
    border-radius: inherit;
    background: var(--store-order-color);
    box-shadow: inset 0 1px rgba(255, 255, 255, .45);
}
.analytics-page .analytics-store-order-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    padding: 9px 1px 0;
    border-top: 1px solid rgba(112, 84, 189, .12);
}
.analytics-page .analytics-store-order-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #59657b;
    font-size: 9px;
    font-weight: 700;
}
.analytics-page .analytics-store-order-legend span > i {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 2px;
    background: var(--store-order-color);
}
.analytics-page .analytics-store-order-legend b {
    color: #283750;
    font-variant-numeric: tabular-nums;
}
.analytics-page .analytics-store-empty {
    display: flex;
    flex: 1 1 auto;
    min-height: 190px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 12px;
    text-align: center;
}
.analytics-page .analytics-store-empty > span {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid #cfe9dd;
    border-radius: 14px 14px 14px 5px;
    background: #effaf4;
    color: #218667;
    font-size: 17px;
    font-weight: 850;
}
.analytics-page .analytics-store-empty > span svg {
    width: 21px;
    height: 21px;
}
.analytics-page .analytics-store-orders-card .analytics-store-empty > span {
    border-color: #ddd7f7;
    background: #f4f1ff;
    color: #7157bc;
}
.analytics-page .analytics-store-empty strong {
    color: #354a5c;
    font-size: 12px;
}
.analytics-page .analytics-store-empty small {
    color: #8291a0;
    font-size: 10px;
}
@media (max-width: 980px) {
    .analytics-page .analytics-store-graphs {
        grid-template-columns: minmax(0, 1fr);
    }
}
@media (max-width: 480px) {
    .analytics-page .analytics-store-graphs > .analytics-graph-card {
        min-height: 270px;
        padding: 10px 11px;
    }
    .analytics-page .analytics-store-purchase-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }
    .analytics-page .analytics-store-purchase-ticket {
        min-height: 57px;
        padding: 7px 8px;
    }
}

/* Network and Level: connected team flow plus qualified-referral milestones. */
.analytics-page .analytics-network-charts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    grid-auto-rows: 1fr;
    gap: 12px;
    margin: 0 0 16px;
}
.analytics-page .analytics-network-charts > .analytics-graph-card {
    display: flex;
    min-width: 0;
    min-height: 260px;
    flex-direction: column;
    margin: 0;
    padding: 11px 13px 10px;
}
.analytics-page .analytics-network-chart-head {
    flex: 0 0 auto;
    min-height: 38px;
    margin-bottom: 6px;
}
.analytics-page .analytics-network-flow-card {
    --graph-border: #c9e3f1;
    --graph-hover: #8bc8e2;
    --graph-radius: 21px 9px 21px 9px;
    --graph-surface: linear-gradient(150deg, #f2faff, #fff 68%, #f1fbff);
    --graph-shadow: 0 9px 24px rgba(39, 123, 165, .07);
    background-size: 210% 210%;
    animation: analyticsNetworkColorDrift 13s ease-in-out infinite;
}
.analytics-page .analytics-network-flow-card .analytics-eyebrow {
    color: #277ea6;
}
.analytics-page .analytics-level-roadmap-card {
    --graph-border: #d8d2f2;
    --graph-hover: #aaa0df;
    --graph-radius: 9px 21px 9px 21px;
    --graph-surface: linear-gradient(150deg, #f8f6ff, #fff 70%, #f5f2ff);
    --graph-shadow: 0 9px 24px rgba(103, 83, 164, .07);
    background-size: 210% 210%;
    animation: analyticsNetworkColorDrift 15s ease-in-out -6s infinite alternate;
}
.analytics-page .analytics-level-roadmap-card .analytics-eyebrow {
    color: #7158b4;
    font-size: 9px;
    letter-spacing: .09em;
}
.analytics-page .analytics-network-chart-head h4 {
    margin-top: 3px;
    color: #203d59;
    font-size: 15px;
    font-weight: 850;
}
.analytics-page .analytics-network-flow-key {
    flex: 0 0 auto;
    padding: 5px 9px;
    border: 1px solid #dce8f2;
    border-radius: 999px;
    background: rgba(255,255,255,.82);
    color: #62788c;
    font-size: 10px;
    font-weight: 850;
}
.analytics-page .analytics-network-flow-card .analytics-network-flow-key {
    border-color: #cfe7f3;
    color: #317b9f;
}
.analytics-page .analytics-level-roadmap-card .analytics-network-flow-key {
    border-color: #ded7f5;
    color: #6b56aa;
}
.analytics-page .analytics-network-flow {
    display: grid;
    flex: 1 1 auto;
    grid-template-columns: minmax(0, .9fr) 20px minmax(0, 1.25fr) 20px minmax(0, .9fr);
    align-items: center;
    padding: 3px 0;
}
.analytics-page .analytics-network-node {
    display: flex;
    min-width: 0;
    min-height: 96px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 7px 6px;
    border: 1px solid var(--network-node-border);
    border-radius: 16px 16px 6px 16px;
    background: linear-gradient(145deg, var(--network-node-wash), #fff 80%);
    box-shadow: 0 7px 15px var(--network-node-shadow), inset 0 1px #fff;
    text-align: center;
}
.analytics-page .analytics-network-node-owner {
    --network-node-border: #d2e5f2;
    --network-node-wash: #eaf6ff;
    --network-node-shadow: rgba(48, 130, 177, .06);
    --network-node-color: #2b7fa9;
}
.analytics-page .analytics-network-node-direct {
    --network-node-border: #cfe9de;
    --network-node-wash: #eaf8f1;
    --network-node-shadow: rgba(37, 143, 106, .07);
    --network-node-color: #208265;
    min-height: 116px;
    animation: analyticsNetworkNodeGlow 5.5s ease-in-out infinite;
}
.analytics-page .analytics-network-node-indirect {
    --network-node-border: #ded7f3;
    --network-node-wash: #f2effc;
    --network-node-shadow: rgba(111, 88, 174, .06);
    --network-node-color: #7056b1;
}
.analytics-page .analytics-network-node-kicker {
    color: var(--network-node-color);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .12em;
}
.analytics-page .analytics-network-node > strong {
    color: #253f55;
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.analytics-page .analytics-network-node > small {
    color: #64788a;
    font-size: 9px;
    font-weight: 750;
    line-height: 1.3;
}
.analytics-page .analytics-network-node-split {
    display: grid;
    width: 100%;
    gap: 3px;
    margin-top: 3px;
}
.analytics-page .analytics-network-node-split span {
    display: flex;
    justify-content: space-between;
    gap: 5px;
    padding: 2px 5px;
    border-radius: 6px;
    background: rgba(255,255,255,.75);
    color: #5c746b;
    font-size: 8px;
    font-weight: 750;
}
.analytics-page .analytics-network-node-split b {
    color: #26785f;
    font-variant-numeric: tabular-nums;
}
.analytics-page .analytics-network-connector {
    position: relative;
    display: block;
    height: 2px;
    background: linear-gradient(90deg, #79b7d5, #76c6aa);
    background-size: 210% 100%;
    animation: analyticsNetworkConnectorFlow 3.8s ease-in-out infinite;
}
.analytics-page .analytics-network-connector i {
    position: absolute;
    top: -3px;
    right: 0;
    width: 8px;
    height: 8px;
    border-top: 2px solid #64b49a;
    border-right: 2px solid #64b49a;
    transform: rotate(45deg);
}
.analytics-page .analytics-network-chart-note {
    flex: 0 0 auto;
    margin: 0;
    padding-top: 6px;
    border-top: 1px solid rgba(72, 124, 153, .12);
    color: #50657e;
    font-size: 10px;
    line-height: 1.4;
}
.analytics-page .analytics-level-roadmap-card .analytics-network-chart-note {
    border-color: rgba(112, 86, 177, .13);
}
.analytics-page .analytics-level-roadmap {
    position: relative;
    display: grid;
    flex: 1 1 auto;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-content: center;
    gap: 7px;
    padding: 5px 0 7px;
}
.analytics-page .analytics-level-milestone {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 68px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 3px;
    overflow: hidden;
    padding: 7px 8px;
    border: 1px solid #e2e7ef;
    border-radius: 10px 10px 4px 10px;
    background: linear-gradient(145deg, #f7f9fc, #fff 78%);
}
.analytics-page .analytics-level-milestone::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: #d6dde7;
    content: "";
}
.analytics-page .analytics-level-milestone-no {
    color: #53657b;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .08em;
}
.analytics-page .analytics-level-milestone > strong {
    overflow: hidden;
    max-width: 100%;
    color: #263950;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.analytics-page .analytics-level-milestone > small {
    color: #50647d;
    font-size: 10px;
    font-weight: 750;
    line-height: 1.2;
}
.analytics-page .analytics-level-milestone-state {
    overflow: hidden;
    max-width: 100%;
    color: #586b83;
    font-size: 9px;
    font-weight: 850;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.analytics-page .analytics-level-milestone.is-unlocked {
    border-color: #cae9d9;
    background: linear-gradient(145deg, #eefaf3, #fff 80%);
}
.analytics-page .analytics-level-milestone.is-unlocked::before {
    background: linear-gradient(90deg, #48aa7b, #8bd1a7);
}
.analytics-page .analytics-level-milestone.is-unlocked .analytics-level-milestone-state {
    color: #216c4c;
}
.analytics-page .analytics-level-milestone.is-current {
    border-color: #b8a9ee;
    background: linear-gradient(145deg, #eeeaff, #fff 82%);
    box-shadow: 0 5px 13px rgba(104, 80, 183, .11);
}
.analytics-page .analytics-level-milestone.is-current::before {
    height: 4px;
    background: linear-gradient(90deg, #7659cf, #ae8de8);
}
.analytics-page .analytics-level-milestone.is-current .analytics-level-milestone-no,
.analytics-page .analytics-level-milestone.is-current .analytics-level-milestone-state {
    color: #563d9e;
}
.analytics-page .analytics-level-milestone.is-next {
    border-color: #d8c891;
    background: linear-gradient(145deg, #fff9e9, #fff 80%);
    animation: analyticsLevelNextGlow 3.8s ease-in-out infinite;
}
.analytics-page .analytics-level-milestone.is-next::before {
    background: linear-gradient(90deg, #d39b36, #efd17b);
}
.analytics-page .analytics-level-milestone.is-next .analytics-level-milestone-state {
    color: #805a0c;
}
.analytics-page .analytics-network-empty {
    display: grid;
    flex: 1 1 auto;
    min-height: 180px;
    place-items: center;
    color: #78869a;
    font-size: 11px;
    text-align: center;
}
@media (max-width: 980px) {
    .analytics-page .analytics-network-charts {
        grid-template-columns: minmax(0, 1fr);
    }
    .analytics-page .analytics-network-charts > .analytics-graph-card {
        min-height: 260px;
    }
}
@media (max-width: 600px) {
    .analytics-page .analytics-network-flow {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }
    .analytics-page .analytics-network-node,
    .analytics-page .analytics-network-node-direct {
        width: min(100%, 270px);
        min-height: 76px;
        justify-self: center;
    }
    .analytics-page .analytics-network-node-direct {
        min-height: 96px;
    }
    .analytics-page .analytics-network-connector {
        width: 2px;
        height: 13px;
        justify-self: center;
        background: linear-gradient(180deg, #79b7d5, #76c6aa);
        background-size: 100% 210%;
    }
    .analytics-page .analytics-network-connector i {
        top: auto;
        right: -3px;
        bottom: 0;
        transform: rotate(135deg);
    }
    .analytics-page .analytics-level-roadmap {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@keyframes analyticsNetworkColorDrift {
    0%, 100% { background-position: 0% 45%; }
    50% { background-position: 100% 55%; }
}
@keyframes analyticsNetworkNodeGlow {
    0%, 100% { box-shadow: 0 7px 15px var(--network-node-shadow), inset 0 1px #fff; }
    50% { box-shadow: 0 9px 19px rgba(37, 143, 106, .14), inset 0 1px #fff; }
}
@keyframes analyticsNetworkConnectorFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
@keyframes analyticsLevelNextGlow {
    0%, 100% { box-shadow: 0 0 0 rgba(211, 155, 54, 0); }
    50% { box-shadow: 0 4px 13px rgba(211, 155, 54, .16); }
}
@media (prefers-reduced-motion: reduce) {
    .analytics-page .analytics-network-flow-card,
    .analytics-page .analytics-level-roadmap-card,
    .analytics-page .analytics-network-node-direct,
    .analytics-page .analytics-network-connector,
    .analytics-page .analytics-level-milestone.is-next {
        animation: none !important;
    }
}
@media (max-width: 380px) {
    .analytics-page .analytics-network-charts > .analytics-graph-card {
        padding: 11px 10px;
    }
    .analytics-page .analytics-level-roadmap {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }
}

/* Keep the level percentage centered inside its own progress marker. */
.analytics-page .analytics-level-showcase::after {
    display: none;
}
.analytics-page .analytics-level-showcase .analytics-level-head {
    display: grid;
    grid-template-columns: minmax(56px, 1fr) auto minmax(56px, 1fr);
    align-items: center;
    min-height: 68px;
    margin-bottom: 7px;
}
.analytics-page .analytics-level-showcase .analytics-level-head .level-badge {
    position: relative;
    z-index: 1;
    justify-self: start;
}
.analytics-page .analytics-level-showcase .analytics-level-head h4 {
    justify-self: center;
    margin: 0;
    text-align: center;
}
.analytics-page .analytics-level-showcase .analytics-level-percent {
    position: relative;
    z-index: 1;
    display: grid;
    width: 56px;
    height: 56px;
    place-items: center;
    justify-self: end;
    padding: 0;
    border: 1px dashed rgba(112, 87, 194, .38);
    border-radius: 50%;
    background: radial-gradient(circle at 36% 30%, #fff, #f0edff 84%);
    box-shadow: 0 4px 12px rgba(92, 75, 168, .11), inset 0 1px #fff;
    color: #5a4bd0;
    font-size: 19px;
    font-weight: 850;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
@media (max-width: 480px) {
    .analytics-page .analytics-level-showcase .analytics-level-head {
        grid-template-columns: minmax(48px, 1fr) auto minmax(48px, 1fr);
        min-height: 60px;
    }
    .analytics-page .analytics-level-showcase .analytics-level-percent {
        width: 48px;
        height: 48px;
        font-size: 16px;
    }
}

/* One shared frame for every Analytics KPI and stat summary card. */
.analytics-page .analytics-kpi-grid > .analytics-kpi:nth-child(n),
.analytics-page .analytics-stat-grid > .stat-card:nth-child(n) {
    --analytics-summary-accent: var(--ak-label, var(--metric-hover, var(--icon-color, #64748b)));
    --analytics-summary-label: color-mix(in srgb, var(--analytics-summary-accent) 24%, #20334a);
    --analytics-summary-value: color-mix(in srgb, var(--ak-value, var(--icon-color, var(--analytics-summary-accent))) 62%, #172b40);
    min-height: 128px;
    padding: 13px 14px;
    border: 1px solid color-mix(in srgb, var(--analytics-summary-accent) 27%, #fff);
    border-top: 3px solid color-mix(in srgb, var(--analytics-summary-accent) 76%, #fff);
    border-radius: 14px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--analytics-summary-accent) 8%, #fff), #fff 82%);
    box-shadow: 0 6px 15px color-mix(in srgb, var(--analytics-summary-accent) 9%, transparent), inset 0 1px rgba(255,255,255,.9);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.analytics-page .analytics-kpi-grid > .analytics-kpi:nth-child(n)::before,
.analytics-page .analytics-kpi-grid > .analytics-kpi:nth-child(n)::after,
.analytics-page .analytics-stat-grid > .stat-card:nth-child(n)::before,
.analytics-page .analytics-stat-grid > .stat-card:nth-child(n)::after {
    display: none;
}
.analytics-page .analytics-kpi-grid > .analytics-kpi:nth-child(n) {
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
}
.analytics-page .analytics-kpi-grid > .analytics-kpi:nth-child(n) .analytics-kpi-label,
.analytics-page .analytics-stat-grid > .stat-card:nth-child(n) .stat-label {
    color: var(--analytics-summary-label);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.35;
    text-transform: none;
}
.analytics-page .analytics-kpi-grid > .analytics-kpi:nth-child(n) .analytics-kpi-note {
    color: #4c5e73;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.35;
}
.analytics-page .analytics-kpi-grid > .analytics-kpi:nth-child(n) .analytics-kpi-value,
.analytics-page .analytics-stat-grid > .stat-card:nth-child(n) .stat-value {
    color: var(--analytics-summary-value);
    background: none;
    background-clip: border-box;
    -webkit-background-clip: border-box;
    -webkit-text-fill-color: var(--analytics-summary-value);
    font-size: clamp(17px, 1.55vw, 20px);
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -.25px;
    text-shadow: none;
}
.analytics-page .analytics-stat-grid > .stat-card:nth-child(n) {
    align-items: flex-start;
    justify-content: center;
}
.analytics-page .analytics-stat-grid > .stat-card:nth-child(n) .stat-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    margin: 0 0 5px;
    border-radius: 12px;
}
.analytics-page .analytics-stat-grid > .stat-card:nth-child(n) .stat-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.analytics-page .analytics-stat-grid > .stat-card:nth-child(n) .stat-label {
    order: -1;
}
.analytics-page .analytics-kpi-grid > .analytics-kpi:nth-child(n):hover,
.analytics-page .analytics-stat-grid > .stat-card:nth-child(n):hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--analytics-summary-accent) 46%, #fff);
    box-shadow: 0 11px 22px color-mix(in srgb, var(--analytics-summary-accent) 15%, transparent), inset 0 1px rgba(255,255,255,.9);
}
@media (max-width: 980px) {
    .analytics-page .analytics-kpi-grid > .analytics-kpi:nth-child(n),
    .analytics-page .analytics-stat-grid > .stat-card:nth-child(n) {
        min-height: 120px;
        padding: 12px;
    }
}
@media (max-width: 640px) {
    .analytics-page .analytics-kpi-grid > .analytics-kpi:nth-child(n),
    .analytics-page .analytics-stat-grid > .stat-card:nth-child(n) {
        min-height: 108px;
        padding: 10px 11px;
    }
    .analytics-page .analytics-stat-grid > .stat-card:nth-child(n) .stat-icon {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        margin-bottom: 4px;
    }
    .analytics-page .analytics-kpi-grid > .analytics-kpi:nth-child(n) .analytics-kpi-label,
    .analytics-page .analytics-stat-grid > .stat-card:nth-child(n) .stat-label {
        font-size: 10px;
    }
    .analytics-page .analytics-kpi-grid > .analytics-kpi:nth-child(n) .analytics-kpi-note {
        font-size: 10px;
    }
    .analytics-page .analytics-kpi-grid > .analytics-kpi:nth-child(n) .analytics-kpi-value,
    .analytics-page .analytics-stat-grid > .stat-card:nth-child(n) .stat-value {
        font-size: 17px;
    }
}
@media (max-width: 400px) {
    .analytics-page .analytics-kpi-grid > .analytics-kpi:nth-child(n),
    .analytics-page .analytics-stat-grid > .stat-card:nth-child(n) {
        min-height: 98px;
        padding: 9px;
    }
}

.analytics-page .analytics-wallet-grid > .stat-card.stat-income:nth-child(1) {
    --analytics-summary-accent: #3aaed0;
    --analytics-summary-value: #fff;
    --icon-color: #fff;
    --icon-bg: rgba(255,255,255,.2);
    border-color: #3aaed0;
    border-top-color: #a4f0f7;
    background: linear-gradient(145deg,#087fc6 0%,#168fd2 52%,#35b8ce 100%);
    box-shadow: 0 13px 27px rgba(18,125,183,.2), inset 0 1px rgba(255,255,255,.28);
}
.analytics-page .analytics-wallet-grid > .stat-card.stat-income:nth-child(1) .stat-label {
    color: rgba(255,255,255,.94);
}
.analytics-page .analytics-wallet-grid > .stat-card.stat-income:nth-child(1) .stat-value {
    color: #fff;
    -webkit-text-fill-color: #fff;
    text-shadow: 0 1px 2px rgba(5,58,97,.22);
}
.analytics-page .analytics-wallet-grid > .stat-card.stat-income:nth-child(1) .stat-icon {
    border-color: rgba(255,255,255,.46);
    background: rgba(255,255,255,.2);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 6px 13px rgba(6,67,111,.18);
}
.analytics-page .analytics-wallet-grid > .stat-card.stat-income:nth-child(1):hover {
    background: linear-gradient(145deg,#0876b8 0%,#1284c5 52%,#2caec5 100%);
    box-shadow: 0 17px 32px rgba(18,125,183,.27), inset 0 1px rgba(255,255,255,.32);
}

/* Referral analytics: conversion funnel and two-level team tree. */
.analytics-page .analytics-referral-charts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    grid-auto-rows: 1fr;
    gap: 12px;
    margin: 0 0 16px;
}
.analytics-page .analytics-referral-charts > .analytics-referral-card {
    display: flex;
    min-width: 0;
    min-height: 286px;
    flex-direction: column;
    margin: 0;
    padding: 14px 15px 12px;
}
.analytics-page .analytics-referral-direct-card {
    --graph-border: #c9d9fb;
    --graph-hover: #91aff0;
    --graph-radius: 20px 10px 20px 10px;
    --graph-surface: linear-gradient(145deg, #f3f7ff, #fff 68%, #f2f6ff);
    --graph-shadow: 0 9px 24px rgba(63, 103, 190, .08);
}
.analytics-page .analytics-referral-direct-card .analytics-eyebrow {
    color: #416fc1;
}
.analytics-page .analytics-referral-direct-card .analytics-mini-filter select {
    border-color: #c8d8f5;
    color: #3d65a8;
}
.analytics-page .analytics-referral-team-card {
    --graph-border: #c9e7dd;
    --graph-hover: #91ceb7;
    --graph-radius: 10px 20px 10px 20px;
    --graph-surface: linear-gradient(145deg, #f0faf6, #fff 68%, #f1faf7);
    --graph-shadow: 0 9px 24px rgba(43, 135, 103, .08);
}
.analytics-page .analytics-referral-team-card .analytics-eyebrow {
    color: #27826b;
}
.analytics-page .analytics-referral-team-card .analytics-mini-filter select {
    border-color: #c4e4d8;
    color: #247560;
}
.analytics-page .analytics-referral-card .analytics-graph-head {
    flex: 0 0 auto;
    min-height: 48px;
    margin-bottom: 8px;
}
.analytics-page .analytics-referral-card .analytics-graph-head h4 {
    color: #213b56;
    font-size: 14px;
    font-weight: 850;
}
.analytics-page .analytics-referral-card .analytics-graph-tools {
    gap: 6px;
}
.analytics-page .analytics-referral-card .analytics-referral-empty {
    display: flex;
    flex: 1 1 auto;
    min-height: 150px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 18px;
    border: 1px dashed #cbd8e7;
    border-radius: 14px;
    background: rgba(255,255,255,.72);
    text-align: center;
}
.analytics-page .analytics-referral-card .analytics-referral-empty strong {
    color: #30465d;
    font-size: 12px;
    font-weight: 850;
}
.analytics-page .analytics-referral-card .analytics-referral-empty small,
.analytics-page .analytics-referral-chart-note {
    color: #60748a;
    font-size: 10px;
    font-weight: 650;
    line-height: 1.45;
}
.analytics-page .analytics-referral-funnel-grid,
.analytics-page .analytics-referral-team-grid {
    display: grid;
    flex: 1 1 auto;
    grid-template-columns: repeat(var(--referral-period-columns, 6), minmax(0, 1fr));
    align-content: center;
    gap: 8px;
    min-width: 0;
    padding: 4px 0;
}
.analytics-page .analytics-referral-funnel-period {
    display: flex;
    min-width: 0;
    min-height: 153px;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    padding: 8px 5px;
    border: 1px solid #e1eafa;
    border-radius: 11px;
    background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(239,245,255,.78));
}
.analytics-page .analytics-referral-period-label {
    max-width: 100%;
    overflow: hidden;
    color: #435a74;
    font-size: 9px;
    font-weight: 850;
    line-height: 1.2;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.analytics-page .analytics-referral-funnel-shape {
    display: grid;
    width: min(100%, 52px);
    height: 43px;
    flex: 0 0 43px;
    place-items: center;
    clip-path: polygon(8% 0, 92% 0, 76% 100%, 24% 100%);
    background: linear-gradient(160deg, #6d9cf5, #4778d5);
    filter: drop-shadow(0 3px 4px rgba(67, 111, 205, .18));
}
.analytics-page .analytics-referral-funnel-shape strong {
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}
.analytics-page .analytics-referral-funnel-caption {
    color: #365b9c;
    font-size: 9px;
    font-weight: 850;
    line-height: 1.2;
    text-align: center;
}
.analytics-page .analytics-referral-funnel-track {
    width: 74%;
    height: 5px;
    overflow: hidden;
    border-radius: 99px;
    background: #f3d6a0;
}
.analytics-page .analytics-referral-funnel-track i {
    display: block;
    width: var(--referral-active-share, 0%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #38b98c, #6bd2a8);
}
.analytics-page .analytics-referral-funnel-stats {
    display: grid;
    width: 100%;
    gap: 3px;
    margin-top: 1px;
}
.analytics-page .analytics-referral-funnel-stats span {
    display: grid;
    grid-template-columns: 5px minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px;
    color: #475b70;
    font-size: 8px;
    line-height: 1.2;
}
.analytics-page .analytics-referral-funnel-stats i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #48bd91;
}
.analytics-page .analytics-referral-funnel-stats i.is-pending {
    background: #e7a941;
}
.analytics-page .analytics-referral-funnel-stats small {
    overflow: hidden;
    font-size: inherit;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.analytics-page .analytics-referral-funnel-stats b {
    color: #263d55;
    font-size: 9px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}
.analytics-page .analytics-referral-team-period {
    display: flex;
    min-width: 0;
    min-height: 153px;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 8px 5px 7px;
    border: 1px solid #ccebe6;
    border-radius: 50% 50% 12px 12px / 16% 16% 12px 12px;
    background: linear-gradient(155deg, rgba(255,255,255,.97), rgba(231,249,246,.9) 58%, rgba(243,239,255,.8));
    box-shadow: 0 7px 15px rgba(42, 139, 133, .09), inset 0 1px #fff;
    perspective: 700px;
    transform-style: preserve-3d;
    animation: analyticsReferralTileFloat 5.5s ease-in-out infinite;
}
.analytics-page .analytics-referral-team-period:nth-child(3n + 2) {
    animation-delay: -1.8s;
}
.analytics-page .analytics-referral-team-period:nth-child(3n) {
    animation-delay: -3.6s;
}
.analytics-page .analytics-referral-team-period:hover {
    z-index: 1;
    border-color: #9ddbd4;
    box-shadow: 0 15px 24px rgba(59, 135, 179, .16), inset 0 1px #fff;
    transform: translateY(-4px) rotateX(5deg) scale(1.025);
}
.analytics-page .analytics-referral-team-tree {
    display: flex;
    width: 100%;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.analytics-page .analytics-referral-team-root {
    position: relative;
    display: flex;
    width: var(--referral-node-size, 44px);
    height: var(--referral-node-size, 44px);
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid #63cdb3;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 22%, #fff 0 10%, #ddfff5 37%, #c9e9ff 76%, #e9dcff);
    box-shadow: 0 5px 10px rgba(43, 141, 139, .2), 0 0 0 3px rgba(111, 215, 194, .13), inset 0 2px 3px #fff, inset 0 -4px 8px rgba(83, 139, 194, .12);
    transform: translateZ(12px);
    animation: analyticsReferralNodeGlow 3.4s ease-in-out infinite;
}
.analytics-page .analytics-referral-team-root strong {
    position: relative;
    z-index: 1;
    color: #176a71;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 1px 0 #fff;
}
.analytics-page .analytics-referral-team-root small {
    display: none;
    width: 100%;
    margin-top: 3px;
    color: #365f74;
    font-size: 6px;
    font-weight: 850;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}
.analytics-page .analytics-referral-tree-trunk {
    width: 2px;
    height: 11px;
    border-radius: 99px;
    background: linear-gradient(180deg, #58c7b3, #8b9dea);
    box-shadow: 0 0 5px rgba(79, 184, 177, .32);
}
.analytics-page .analytics-referral-tree-branches {
    position: relative;
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    padding-top: 8px;
}
.analytics-page .analytics-referral-tree-branches::before {
    position: absolute;
    top: 0;
    left: 25%;
    width: 50%;
    height: 2px;
    border-radius: 99px;
    background: linear-gradient(90deg, #52b8ed, #9c84ea);
    content: "";
}
.analytics-page .analytics-referral-tree-branches span {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 34px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: 1px solid #d7e4f3;
    border-radius: 9px;
    background: linear-gradient(150deg, #fff, #f1f8ff);
    box-shadow: 0 3px 7px rgba(75, 111, 172, .09), inset 0 1px #fff;
    transform: translateZ(5px);
    transition: transform .22s ease, box-shadow .22s ease;
}
.analytics-page .analytics-referral-tree-branches span:hover {
    box-shadow: 0 7px 12px rgba(75, 111, 172, .17), inset 0 1px #fff;
    transform: translateY(-2px) translateZ(9px);
}
.analytics-page .analytics-referral-tree-branches span::before {
    position: absolute;
    top: -9px;
    left: 50%;
    width: 2px;
    height: 8px;
    border-radius: 99px;
    background: linear-gradient(180deg, #65c8b0, #8b9dea);
    content: "";
}
.analytics-page .analytics-referral-tree-branches b {
    color: #267b62;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.analytics-page .analytics-referral-tree-branches .is-direct {
    border-color: #d0e6fa;
    background: linear-gradient(150deg, #fff, #eaf5ff);
}
.analytics-page .analytics-referral-tree-branches .is-direct b {
    color: #2677c1;
}
.analytics-page .analytics-referral-tree-branches small {
    color: #526b68;
    font-size: 8px;
    font-weight: 800;
    line-height: 1;
}
.package-popular-discounted {
    right: auto;
    left: 12px;
}
.analytics-page .analytics-referral-tree-branches .is-indirect b {
    color: #7a62b1;
}
.analytics-page .analytics-referral-tree-branches .is-indirect {
    border-color: #e1d8fa;
    background: linear-gradient(150deg, #fff, #f2edff);
}
.analytics-page .analytics-referral-chart-note {
    flex: 0 0 auto;
    margin: 5px 0 0;
    text-align: center;
}
@keyframes analyticsReferralTileFloat {
    0%, 100% { transform: translateY(0) rotateX(0); }
    50% { transform: translateY(-2px) rotateX(1.2deg); }
}
@keyframes analyticsReferralNodeGlow {
    0%, 100% {
        box-shadow: 0 5px 10px rgba(43, 141, 139, .2), 0 0 0 3px rgba(111, 215, 194, .13), inset 0 2px 3px #fff, inset 0 -4px 8px rgba(83, 139, 194, .12);
    }
    50% {
        box-shadow: 0 7px 14px rgba(67, 128, 198, .25), 0 0 0 5px rgba(126, 177, 240, .17), inset 0 2px 3px #fff, inset 0 -4px 8px rgba(132, 108, 205, .17);
    }
}
@media (max-width: 980px) {
    .analytics-page .analytics-referral-charts {
        grid-template-columns: minmax(0, 1fr);
    }
    .analytics-page .analytics-referral-charts > .analytics-referral-card {
        min-height: 260px;
    }
}
@media (max-width: 560px) {
    .analytics-page .analytics-referral-charts {
        gap: 10px;
    }
    .analytics-page .analytics-referral-charts > .analytics-referral-card {
        min-height: 245px;
        padding: 10px 11px 9px;
    }
    .analytics-page .analytics-referral-card .analytics-graph-head {
        min-height: 42px;
        gap: 7px;
    }
    .analytics-page .analytics-referral-card .analytics-graph-head h4 {
        font-size: 12px;
    }
    .analytics-page .analytics-referral-card .analytics-graph-tools {
        gap: 4px;
    }
    .analytics-page .analytics-referral-card .analytics-graph-range,
    .analytics-page .analytics-referral-card .analytics-graph-badge {
        display: none;
    }
    .analytics-page .analytics-referral-funnel-grid,
    .analytics-page .analytics-referral-team-grid {
        gap: 6px;
    }
    .analytics-page .analytics-referral-funnel-period,
    .analytics-page .analytics-referral-team-period {
        min-height: 142px;
        padding-right: 3px;
        padding-left: 3px;
    }
}
@media (max-width: 380px) {
    .analytics-page .analytics-referral-funnel-grid,
    .analytics-page .analytics-referral-team-grid {
        gap: 4px;
    }
    .analytics-page .analytics-referral-funnel-period,
    .analytics-page .analytics-referral-team-period {
        padding-right: 2px;
        padding-left: 2px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .analytics-page .analytics-referral-team-period,
    .analytics-page .analytics-referral-team-root {
        animation: none !important;
    }
    .analytics-page .analytics-referral-card,
    .analytics-page .analytics-referral-card * {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

/* ============================================================================
   GLOBAL MOBILE POLISH  (loaded last, so these win on small screens only)
   Right-sizes buttons / chips / headings on phones so oversized tap targets
   and cramped or oddly-wrapped text no longer appear. Desktop and tablet
   layouts are untouched because everything is scoped to <=768 / <=480.
   ========================================================================== */
@media (max-width: 768px) {
    body { overflow-wrap: break-word; }

    /* ---- Buttons & form actions ---- */
    form button {
        padding: 11px 16px;
        font-size: 14px;
        border-radius: 10px;
    }

    .btn-3d {
        height: 46px;
        gap: 10px;
        padding: 0 12px 0 8px;
        border-radius: 13px;
    }
    .btn-3d svg { width: 30px; height: 30px; padding: 6px; border-radius: 9px; }
    .btn-3d .btn-label { font-size: 13.5px; }

    .package-btn { padding: 9px 18px; font-size: 13px; border-radius: 10px; }
    .save-btn { padding: 10px 20px; font-size: 14px; border-radius: 10px; }
    .save-btn-danger { padding: 10px 18px; font-size: 13.5px; }
    .referral-copy-btn { padding: 0 14px; font-size: 13px; }
    .mini-btn { padding: 6px 11px; font-size: 11.5px; }
    .admin-tab-btn { padding: 7px 14px; font-size: 13px; }
    .inv-btn { height: 42px; padding: 0 18px; }
    .pay-copy { padding: 8px 12px; }

    /* Site CTAs that ship tall desktop pills (contact form / auth screens) */
    .contact-submit { min-height: 46px; padding: 0 20px; font-size: 13.5px; border-radius: 12px; }
    .auth-cta { min-height: 46px; padding: 11px 22px; font-size: 14.5px; border-radius: 12px; }

    /* ---- Search bars: a fixed 320px flex-basis was stretching the field to
       320px TALL once .admin-search-bar stacks vertically. Reset it and trim. ---- */
    .search-input { flex: 1 1 auto; width: 100%; padding: 10px 12px; font-size: 14px; }
    .search-btn { padding: 9px 14px; }
    .fm-search { min-width: 0; width: 100%; }
    .contact-admin-search-controls input { flex: 1 1 100%; height: 40px; min-height: 40px; }
    .contact-admin-search-controls .search-btn { height: 40px; min-height: 40px; }
    .store-search { max-width: none; }
    /* The admin users search form ships an inline `flex:1 1 320px`, which makes
       the field 320px TALL once the bar stacks into a column. Higher specificity
       is needed to beat that page-level inline rule. */
    .admin-search-bar.users-search-form .search-input { flex: 1 1 auto; width: 100%; height: 44px; }
    .admin-search-bar.users-search-form .search-btn { height: 44px; }

    /* ---- Form fields / selects: trim the vertical bulk so forms look right ---- */
    form input, form select { padding: 10px 12px; margin: 8px 0 14px; }

    /* Inline-styled submit buttons on the withdraw page: shrink via !important
       so they beat the hard-coded inline padding/font. */
    .wd-submit { padding: 12px !important; font-size: 15px !important; margin-bottom: 18px !important; }
    .wd-submit-sm { padding: 11px !important; font-size: 14px !important; }

    /* Inline-styled "Pay Now" CTA on the activation page ships oversized
       padding/font, so override it with !important to beat the inline style. */
    .btn-pay-now { padding: 13px 26px !important; font-size: 16px !important; }

    /* Primary auth CTA: trimmed from the large desktop pill */
    .auth-panel .auth-form button[type="submit"] {
        min-height: 46px;
        font-size: 15px;
        border-radius: 12px;
    }

    /* ---- Slide-out header menu: keep it clear of the screen edges ---- */
    .mobile-menu { width: min(280px, 84vw); }
    .mobile-menu-content { padding: 56px 16px 18px; }
    .mobile-menu-item { padding: 12px 14px; font-size: 14px; gap: 10px; }
    .mobile-user-info { font-size: 15px; }

    /* ---- Headings: calmer scale + spacing so titles stop looking odd ---- */
    h2 { font-size: 20px; line-height: 1.3; letter-spacing: normal; }
    h3 { font-size: 17px; line-height: 1.34; letter-spacing: normal; }
}

@media (max-width: 480px) {
    form button { padding: 10px 14px; font-size: 13.5px; }
    form input, form select { padding: 9px 11px; margin: 7px 0 12px; }

    .btn-3d { height: 44px; gap: 9px; padding: 0 10px 0 7px; border-radius: 12px; }
    .btn-3d svg { width: 28px; height: 28px; padding: 5.5px; border-radius: 8px; }
    .btn-3d .btn-label { font-size: 13px; letter-spacing: 0.1px; }

    .package-btn { padding: 8px 16px; font-size: 12.5px; }
    .save-btn { padding: 9px 18px; font-size: 13.5px; }
    .admin-tab-btn { padding: 6px 12px; font-size: 12.5px; }
    .inv-btn { height: 40px; padding: 0 16px; font-size: 13px; }
    .search-input { padding: 9px 11px; }
    .contact-admin-search-controls input { height: 38px; min-height: 38px; }
    .btn-pay-now { padding: 12px 20px !important; font-size: 15px !important; }
    .wd-submit { padding: 11px !important; font-size: 14.5px !important; }

    h2 { font-size: 19px; }
    h3 { font-size: 16px; }
}

/* ============================================================================
   GLOBAL MOBILE CARDS + DISPLAY TEXT POLISH
   Right-sizes every card-like surface (dashboards, referral + withdrawal
   blocks, forms, legal / SEO panels) and their value / label type on phones.
   Scoped to <=768 / <=480 and loaded last, so desktop & tablet are untouched.
   Cards that already ship a more specific mobile rule simply keep it.
   ========================================================================== */
@media (max-width: 768px) {
    /* ---- Content / panel cards: trim padding + radii ---- */
    .info-card,
    .wd-card,
    .history-card,
    .admin-access-card,
    .seo-radio-card,
    .seo-submit-card,
    .legal-card,
    .legal-contact-card,
    .contact-settings-card,
    .db-option-card,
    .pay-summary-card,
    .sponsor-card,
    .pm-usage-card,
    .home-img-card,
    .withdrawal-detail-card,
    .inv-plan-card,
    .inv-pos-card,
    .level-card {
        padding: 15px;
        border-radius: 15px;
    }

    /* ---- Quick-menu tiles ---- */
    .qmenu-section { padding: 16px 15px 18px; border-radius: 17px; }
    .qmenu-tile { padding: 14px 6px 11px; border-radius: 15px; }
    .qmenu-icon { width: 44px; height: 44px; border-radius: 14px; }
    .qmenu-header-badge { width: 38px; height: 38px; }
    .qmenu-label { font-size: 11px; }

    /* ---- 3D stat tiles ---- */
    .hero3d-card { padding: 15px 16px; border-radius: 16px; }
    .hero3d-value { font-size: 22px; }
    .hero3d-card.is-text .hero3d-value { font-size: 15px; }
    .hero3d-label { font-size: 10px; letter-spacing: 0.6px; }
    .hero3d-sub { font-size: 11px; }

    /* ---- Referral block ---- */
    .referral-box { padding: 13px; border-radius: 14px; }
    .referral-input { padding: 10px 12px; font-size: 13.5px; }
    .ref-stat { padding: 11px 6px; border-radius: 13px; }
    .ref-stat-value { font-size: 19px; }
    .ref-stat-label { font-size: 10px; }

    /* ---- Dashboard intro / hero banners ---- */
    .overview-intro,
    .admin-panel-hero.admin-hero {
        min-height: 0;
        padding: 17px 18px;
        border-radius: 17px;
    }
    .overview-intro h2,
    .admin-panel-hero h2 { font-size: 20px; line-height: 1.3; }
    .admin-panel-hero h3 { font-size: 17px; }
    .overview-activation-card { min-height: 0; padding: 13px; }
    .overview-intro-date { min-width: 0; }

    /* ---- Withdrawal / investment summary cards ---- */
    .withdrawal-count-card { padding: 13px 14px; border-radius: 13px; }
    .withdrawal-count-card > strong { font-size: 22px; }
    .withdrawal-count-card > span { font-size: 11px; }
    .withdrawal-count-card > small { font-size: 10px; }
    .withdrawal-request-card { padding: 14px; border-radius: 15px; }
    .investment-summary-card { min-height: 0; }
    .investment-summary-card > strong { font-size: 20px; }
    .owner-finance-panel { padding: 16px; border-radius: 18px; }

    /* ---- Generic stat tile: one notch tighter ---- */
    .stat-card { padding: 14px; min-height: 116px; border-radius: 16px; }

    /* ---- Display text rhythm ---- */
    .section-heading { font-size: 13px; letter-spacing: 0.6px; }
    .content-header h2 { font-size: 20px; }
    .greeting { font-size: 13.5px; }
}

@media (max-width: 480px) {
    .info-card,
    .wd-card,
    .history-card,
    .admin-access-card,
    .seo-radio-card,
    .seo-submit-card,
    .legal-card,
    .legal-contact-card,
    .contact-settings-card,
    .db-option-card,
    .pay-summary-card,
    .sponsor-card,
    .pm-usage-card,
    .home-img-card,
    .withdrawal-detail-card,
    .inv-plan-card,
    .inv-pos-card,
    .level-card {
        padding: 13px;
        border-radius: 14px;
    }

    .qmenu-section { padding: 14px 13px 16px; }
    .qmenu-tile { padding: 12px 5px 10px; }
    .qmenu-icon { width: 40px; height: 40px; }
    .qmenu-label { font-size: 10.5px; }

    .hero3d-card { padding: 13px 14px; }
    .hero3d-value { font-size: 20px; }
    .hero3d-card.is-text .hero3d-value { font-size: 14px; }

    .overview-intro,
    .admin-panel-hero.admin-hero { padding: 15px; }
    .overview-intro h2,
    .admin-panel-hero h2 { font-size: 18px; }

    .withdrawal-count-card { padding: 11px 12px; }
    .withdrawal-count-card > strong { font-size: 20px; }
    .withdrawal-request-card { padding: 12px; }
    .ref-stat-value { font-size: 17px; }
    .stat-card { padding: 12px; min-height: 108px; border-radius: 15px; }
}

/* ============================================================================
   GLOBAL MOBILE TYPOGRAPHY
   Phones were rendering oversized headings and value text because many rules
   ship a large clamp() minimum that a narrow viewport never shrinks. These
   overrides pin a calm, consistent type scale on <=768 / <=480 only; every
   desktop / tablet size (the fluid clamp values) stays exactly as designed.
   ========================================================================== */
@media (max-width: 768px) {
    /* Headings */
    h1 { font-size: 22px; line-height: 1.24; letter-spacing: normal; }
    h2 { font-size: 20px; line-height: 1.3; letter-spacing: normal; }
    h3 { font-size: 16px; line-height: 1.34; letter-spacing: normal; }
    h4 { font-size: 14px; line-height: 1.35; }

    /* Big labels / values / names */
    .account-name { font-size: 20px; }
    .account-avatar { font-size: 30px; }
    .level-progress-pct { font-size: 20px; }
    .level-hero-badge-value { font-size: 28px; }
    .package-price { font-size: 22px; }
    .pay-amount-line strong { font-size: 20px; }
    .maintenance-card h2 { font-size: 20px; }
    .sponsor-avatar { font-size: 26px; }

    /* SEO / traffic stat values */
    .seo-stat-value,
    .seo-colorful-stat-grid .seo-stat-value { font-size: 24px; }
    .traffic-stat-grid .seo-stat-value { font-size: 21px; }

    /* Public marketing heroes */
    .legal-hero h1 { font-size: 24px; }
    .contact-copy h1 { font-size: 27px; }
    .contact-form-heading h2 { font-size: 20px; }
    .custom-page-content h1 { font-size: 21px; }

    /* Auth screens */
    .auth-brand-name { font-size: 24px; }
    .auth-panel .auth-intro h2 { font-size: 21px; }
    body.brand-bg .auth-bg-words span { font-size: clamp(30px, 13vw, 60px); }

    /* Admin / dashboard heroes */
    .admin-access-heading h2 { font-size: 22px; }
    .admin-panel-hero.admin-hero h3 { font-size: 18px; }
    .withdrawals-hero h2 { font-size: 21px; }
    .investment-hero h2 { font-size: 21px; }
    .owner-finance-result > strong { font-size: 20px; }
    .withdrawal-summary-style .hero3d-value { font-size: 22px; }
    .admin-section-summary-grid-live_monitor .withdrawal-count-card strong { font-size: 22px; }
    .admin-section-summary-grid-contact_settings .withdrawal-count-card > strong { font-size: 22px; }

    /* Section headings */
    .analytics-page .section-heading { font-size: 15px; }
    .analytics-page .analytics-section-heading { font-size: 15px; }
}

@media (max-width: 480px) {
    h1 { font-size: 20px; }
    h2 { font-size: 18px; }
    h3 { font-size: 15px; }
    h4 { font-size: 13.5px; }

    .account-name { font-size: 18px; }
    .package-price { font-size: 20px; }
    .legal-hero h1 { font-size: 22px; }
    .contact-copy h1 { font-size: 24px; }
    .contact-form-heading h2 { font-size: 18px; }
    .custom-page-content h1 { font-size: 19px; }
    .auth-brand-name { font-size: 22px; }
    .auth-panel .auth-intro h2 { font-size: 19px; }
    .admin-access-heading h2 { font-size: 20px; }
    .withdrawals-hero h2 { font-size: 19px; }
    .investment-hero h2 { font-size: 19px; }
    .seo-stat-value,
    .seo-colorful-stat-grid .seo-stat-value { font-size: 21px; }
    body.brand-bg .auth-bg-words span { font-size: clamp(26px, 12vw, 46px); }
}

/* Public footer: contact details on the left, editable page menus on the right. */
footer.site-footer {
    display: block;
    padding: clamp(30px, 4.5vw, 58px) clamp(18px, 5vw, 64px) 18px;
    color: #dbe7f5;
    text-align: left;
}
.site-footer .footer-main {
    display: grid;
    grid-template-columns: minmax(240px, 0.9fr) minmax(240px, 0.95fr) minmax(0, 2.3fr);
    align-items: start;
    gap: clamp(24px, 2.2vw, 32px);
    width: min(100%, 1240px);
    margin: 0 auto;
}
.site-footer .footer-main.footer-main-single {
    grid-template-columns: minmax(0, 1fr);
    max-width: 1240px;
}
.site-footer .footer-contact-panel,
.site-footer .footer-menu-panel {
    min-width: 0;
}
.site-footer .footer-contact-panel {
    --footer-brand-mark-size: 48px;
    --footer-brand-gap: 11px;
}
.site-footer .footer-brand-lockup {
    display: flex;
    align-items: center;
    gap: var(--footer-brand-gap);
    width: fit-content;
    margin: 0;
    color: #fff;
    text-decoration: none;
}
.site-footer .footer-brand-lockup img {
    display: block;
    width: var(--footer-brand-mark-size);
    height: var(--footer-brand-mark-size);
    flex: 0 0 var(--footer-brand-mark-size);
    object-fit: contain;
    transition: transform 0.2s ease;
}
.site-footer .footer-brand-lockup:hover img { transform: translateY(-2px); }
.site-footer .footer-contact-kicker {
    margin: 0;
    color: #ffe08a;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1.3;
    text-transform: uppercase;
}
.site-footer .footer-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 13px;
    margin: 19px 0 0 calc(var(--footer-brand-mark-size) + var(--footer-brand-gap));
}
.site-footer .footer-contact-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    color: #fff;
    text-decoration: none;
    transition: transform 0.2s ease, color 0.2s ease;
}
.site-footer .footer-contact-item:hover { transform: translateX(3px); }
.site-footer .footer-contact-label {
    color: #9fb4ce;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}
.site-footer .footer-contact-item strong {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    overflow-wrap: anywhere;
}
.site-footer .footer-social {
    width: auto;
    max-width: 100%;
    justify-content: flex-start;
    margin: 0 0 0 calc(var(--footer-brand-mark-size) + var(--footer-brand-gap));
}
.site-footer .footer-social-link {
    margin-left: 0;
}
.site-footer nav.footer-menu-panel {
    display: block;
    width: auto;
    max-width: none;
    min-width: 0;
    padding: 5px 0 0 clamp(24px, 4vw, 54px);
    border: 0;
    border-left: 1px solid rgba(207, 224, 244, 0.2);
    border-radius: 0;
    color: inherit;
    background: transparent;
    background-image: none;
    box-shadow: none;
    position: static;
    z-index: auto;
    flex: initial;
    flex-wrap: nowrap;
    justify-content: initial;
    align-items: stretch;
    gap: 0;
}
.site-footer .footer-menu-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    justify-content: stretch;
    align-items: start;
    gap: 24px 40px;
    margin: 0;
}
.site-footer .footer-menu-col {
    gap: 10px;
    text-align: left;
}
.site-footer .footer-menu-col h4 {
    margin: 0 0 5px;
    color: #ffe08a;
    font-size: 13px;
    letter-spacing: 1px;
}
.site-footer .footer-menu-col a {
    margin: 0;
    width: fit-content;
    color: #d1deee;
    font-size: 13.5px;
    line-height: 1.45;
}
.site-footer .footer-menu-col a:hover,
.site-footer .footer-menu-col a.current { color: #ffe08a; }
.site-footer .footer-since-feature {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 176px;
    perspective: 700px;
    isolation: isolate;
}
.site-footer .footer-since-feature::before {
    position: absolute;
    z-index: -1;
    inset: 18% 4%;
    content: "";
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(255, 226, 173, 0.19), rgba(199, 163, 97, 0.12) 42%, transparent 72%);
    filter: blur(16px);
    animation: footerSinceAura 3.8s ease-in-out infinite alternate;
}
.site-footer .footer-since-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    margin-top: -10px;
    line-height: 1;
    text-align: center;
    transform-style: preserve-3d;
    animation: footerSinceFloat 3.6s ease-in-out infinite;
}
.site-footer .footer-since-word {
    display: flex;
    align-items: baseline;
    justify-content: center;
    font-size: clamp(30px, 2.5vw, 36px);
    font-weight: 400;
    letter-spacing: 1.5px;
    white-space: nowrap;
}
.site-footer .footer-since-initial,
.site-footer .footer-since-rest {
    color: #fff3d6;
    background: linear-gradient(115deg, #fff8e7 0%, #d8bb7b 42%, #fff4d8 68%, #c5a05e 100%);
    background-size: 180% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 400;
    text-shadow: 0 1px 0 rgba(255, 249, 233, 0.55), 0 2px 0 rgba(130, 99, 43, 0.62), 0 7px 14px rgba(0, 0, 0, 0.3);
    animation: footerSinceColor 8s ease-in-out infinite alternate;
}
.site-footer .footer-since-year {
    margin-top: 10px;
    color: #e6cf9d;
    font-size: clamp(18px, 1.5vw, 22px);
    font-weight: 400;
    letter-spacing: 5px;
    line-height: 1;
    text-shadow: 0 1px 0 rgba(255, 246, 221, 0.38), 0 3px 8px rgba(0, 0, 0, 0.32);
    animation: footerSinceYearGlow 3.8s ease-in-out infinite alternate;
}
@keyframes footerSinceColor {
    to { background-position: 180% center; }
}
@keyframes footerSinceFloat {
    0%, 100% { transform: translateY(-2px) rotateX(6deg); }
    50% { transform: translateY(-7px) rotateX(0); }
}
@keyframes footerSinceYearGlow {
    from { opacity: 0.76; }
    to { opacity: 1; }
}
@keyframes footerSinceAura {
    from { opacity: 0.45; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1.08); }
}
.site-footer .footer-bottom {
    width: min(100%, 1240px);
    margin: 34px auto 0;
    padding: 16px 0 2px;
    border-top: 1px solid rgba(207, 224, 244, 0.16);
}
.site-footer .footer-bottom .footer-bottom-copy {
    margin: 0;
    color: #aebed2;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}
@media (prefers-reduced-motion: reduce) {
    .site-footer .footer-since-text,
    .site-footer .footer-since-initial,
    .site-footer .footer-since-rest,
    .site-footer .footer-since-year,
    .site-footer .footer-since-feature::before {
        animation: none;
    }
}
@media (max-width: 960px) {
    .site-footer .footer-main {
        grid-template-columns: minmax(0, 1fr);
        gap: 30px;
    }
    .site-footer .footer-since-feature { min-height: 110px; }
    .site-footer nav.footer-menu-panel {
        padding: 24px 0 0;
        border-top: 1px solid rgba(207, 224, 244, 0.2);
        border-left: 0;
    }
}
@media (max-width: 480px) {
    footer.site-footer { padding: 28px 18px 16px; }
    .site-footer .footer-contact-panel { --footer-brand-mark-size: 42px; }
    .site-footer .footer-menu-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
    .site-footer .footer-contact-item strong { font-size: 13px; }
    .site-footer .footer-bottom { margin-top: 26px; }
}

.site-back-to-top {
    position: fixed;
    z-index: 9997;
    right: 22px;
    bottom: 98px;
    display: flex;
    width: 50px;
    height: 50px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 4px;
    border: 1px solid rgba(224, 250, 255, 0.92);
    border-radius: 50%;
    color: #082543;
    background: linear-gradient(145deg, #67e8f9 0%, #22d3ee 42%, #2563eb 100%);
    box-shadow: 0 8px 22px rgba(8, 65, 119, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.72);
    font-family: inherit;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(12px) scale(0.96);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    isolation: isolate;
}

.site-back-to-top::before,
.site-back-to-top::after {
    position: absolute;
    z-index: -1;
    content: "";
    pointer-events: none;
}

.site-back-to-top::before {
    inset: -4px;
    border: 1px solid rgba(103, 232, 249, 0.62);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0.88);
}

.site-back-to-top::after {
    inset: -9px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.42), rgba(37, 99, 235, 0.2) 48%, transparent 73%);
    filter: blur(5px);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.site-back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.site-back-to-top.is-visible::before {
    animation: siteBackToTopRing 2.7s ease-out infinite;
}

.site-back-to-top.is-visible::after {
    opacity: 0.8;
    animation: siteBackToTopGlow 2.1s ease-in-out infinite alternate;
}

.site-back-to-top__icon,
.site-back-to-top__label {
    position: relative;
    z-index: 1;
}

.site-back-to-top__icon {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    transition: transform 0.22s ease;
}

.site-back-to-top__icon svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.site-back-to-top__icon .site-back-to-top__spark {
    stroke: #fff;
    stroke-width: 3;
}

.site-back-to-top__label {
    color: #082543;
    font-size: 7px;
    font-weight: 800;
    letter-spacing: 1.2px;
    line-height: 1;
}

.site-back-to-top:hover {
    border-color: #fff;
    box-shadow: 0 12px 27px rgba(8, 65, 119, 0.42), 0 0 18px rgba(34, 211, 238, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.88);
    transform: translateY(-3px) scale(1.04);
}

.site-back-to-top:hover .site-back-to-top__icon { transform: translateY(-1px); }

.site-back-to-top:focus-visible {
    outline: 3px solid #67e8f9;
    outline-offset: 4px;
}

@keyframes siteBackToTopRing {
    0% { opacity: 0.66; transform: scale(0.9); }
    75%, 100% { opacity: 0; transform: scale(1.34); }
}

@keyframes siteBackToTopGlow {
    from { opacity: 0.45; transform: scale(0.88); }
    to { opacity: 0.9; transform: scale(1.08); }
}

@media (max-width: 480px) {
    .site-back-to-top {
        right: 14px;
        bottom: 78px;
        width: 46px;
        height: 46px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-back-to-top,
    .site-back-to-top::after,
    .site-back-to-top__icon {
        transition: none;
    }
    .site-back-to-top.is-visible::before,
    .site-back-to-top.is-visible::after {
        animation: none;
    }
}

/* ============================================================
   Live Messenger (widget + admin)
   ============================================================ */

/* Widget: live agent online dot */
.ai-panel-title .ai-live-dot {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #10b981;
    font-weight: 600;
}
.ai-panel-title .ai-live-dot::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
    animation: lmPulse 1.6s ease-in-out infinite;
}
@keyframes lmPulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25); }
    50%      { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.12); }
}

/* Admin Live Messenger layout */
.lm-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 22px;
    margin-top: 16px;
}
.lm-agents,
.lm-inbox {
    background: #fff;
    border: 1px solid #e3e8ef;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}
.lm-agents {
    align-self: start;
}
.lm-agents-head,
.lm-inbox-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: linear-gradient(135deg, #0f2a4a, #1e4d8c);
    color: #fff;
}
.lm-agents-head h4,
.lm-inbox-head h4 {
    margin: 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.lm-badge {
    background: #10b981;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
}
.lm-add-btn {
    padding: 7px 14px !important;
    font-size: 13px !important;
    margin: 0 !important;
}
.lm-agent-list {
    list-style: none;
    margin: 0;
    padding: 8px;
}
.lm-agent-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 6px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
}
.lm-agent-row.is-active {
    border-color: #bbf7d0;
    background: #f0fdf4;
}
.lm-agent-row.is-off {
    opacity: 0.6;
}
.lm-agent-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #22d3ee);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 18px;
    flex-shrink: 0;
    overflow: hidden;
}
.lm-agent-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.lm-agent-info {
    flex: 1;
    min-width: 0;
}
.lm-agent-info strong {
    display: block;
    font-size: 14px;
    color: #0f2a4a;
}
.lm-agent-info small {
    display: block;
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lm-toggle-select {
    padding: 5px 8px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    background: #fff;
}
.lm-agent-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.lm-agent-actions form {
    margin: 0;
    display: flex;
}
.lm-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: none;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    cursor: pointer;
    text-decoration: none;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    white-space: nowrap;
}
.lm-action-btn svg {
    width: 13px;
    height: 13px;
}
.lm-action-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}
.lm-edit-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
}
.lm-delete-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
}
.lm-link {
    background: none;
    border: none;
    color: #2563eb;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
}
.lm-link:hover { text-decoration: underline; }
.lm-delete { color: #dc2626; }
.lm-empty {
    text-align: center;
    color: #94a3b8;
    padding: 24px 12px;
    font-size: 14px;
}
.lm-agent-form {
    padding: 16px 18px;
    border-top: 1px solid #eef2f7;
}

/* Inbox */
.lm-inbox-body {
    display: grid;
    grid-template-columns: 230px 1fr;
    min-height: 420px;
}
.lm-chat-list {
    list-style: none;
    margin: 0;
    padding: 6px;
    border-right: 1px solid #eef2f7;
    overflow-y: auto;
    max-height: 540px;
}
.lm-chat-item a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    margin-bottom: 4px;
}
.lm-chat-item a:hover { background: #f1f5f9; }
.lm-chat-item.is-selected a { background: #dbeafe; }
.lm-chat-item.is-closed { opacity: 0.55; }

/* Closed chat row with inline delete button */
.lm-chat-item-inner {
    display: flex;
    align-items: stretch;
    gap: 4px;
    margin-bottom: 4px;
}
.lm-chat-item-inner a {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}
.lm-chat-del-form {
    margin: 0;
    display: flex;
}
.lm-chat-del-btn {
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: #fee2e2;
    color: #dc2626;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
    flex-shrink: 0;
}
.lm-chat-del-btn svg {
    width: 15px;
    height: 15px;
}
.lm-chat-del-btn:hover {
    background: #dc2626;
    color: #fff;
    transform: translateY(-1px);
}
.lm-chat-name {
    display: block;
    font-weight: 700;
    font-size: 14px;
    color: #0f2a4a;
}
.lm-chat-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
}
.lm-unread {
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 999px;
}
.lm-chat-time {
    display: block;
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}

/* Chat window */
.lm-chat-window {
    display: flex;
    flex-direction: column;
    min-height: 420px;
}
.lm-chat-window-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid #eef2f7;
    background: #f8fafc;
}
.lm-chat-window-head strong { color: #0f2a4a; }
.lm-chat-agent { font-size: 12px; color: #64748b; }
.lm-closed-tag {
    margin-left: auto;
    background: #e2e8f0;
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
}
.lm-end-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 7px 16px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    line-height: 1;
}
.lm-end-btn svg {
    width: 15px;
    height: 15px;
}
.lm-end-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.45);
}
.lm-end-btn:active {
    transform: translateY(0);
}
.lm-chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 420px;
}
.lm-msg { max-width: 78%; }
.lm-msg-visitor { align-self: flex-start; }
.lm-msg-agent { align-self: flex-end; text-align: right; }
.lm-msg-name {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 3px;
}
.lm-msg-bubble {
    padding: 9px 13px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.45;
    word-wrap: break-word;
}
.lm-msg-visitor .lm-msg-bubble {
    background: #f1f5f9;
    color: #0f172a;
    border-top-left-radius: 4px;
}
.lm-msg-agent .lm-msg-bubble {
    background: linear-gradient(135deg, #2563eb, #22d3ee);
    color: #fff;
    border-top-right-radius: 4px;
}
.lm-msg-time {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 3px;
}
.lm-reply-form {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid #eef2f7;
    background: #f8fafc;
}
.lm-reply-form textarea {
    flex: 1;
    resize: none;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
}
.lm-reply-form .save-btn {
    align-self: stretch;
    width: auto;
    margin: 0 !important;
    padding: 9px 22px !important;
    min-height: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}
.lm-empty-window {
    flex: 1;
    display: grid;
    place-items: center;
    color: #94a3b8;
}

@media (max-width: 980px) {
    .lm-wrap { grid-template-columns: 1fr; }
    .lm-inbox-body { grid-template-columns: 180px 1fr; }
}
@media (max-width: 640px) {
    .lm-inbox-body { grid-template-columns: 1fr; }
    .lm-chat-list { max-height: 200px; border-right: 0; border-bottom: 1px solid #eef2f7; }
}

