/* ========================================================================
   IKONIC Member Area — Liquid Glass Dark Theme (override layer)
   Scoped via body.theme-glass so it can be rolled out page-by-page.
   ======================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

body.theme-glass {
    --tg-bg-0: #0c0a12;
    --tg-bg-1: #141118;
    --tg-bg-2: #1b1724;
    --tg-surface: rgba(255, 255, 255, 0.04);
    --tg-surface-hi: rgba(255, 255, 255, 0.07);
    --tg-border: rgba(255, 255, 255, 0.10);
    --tg-border-hi: rgba(255, 255, 255, 0.18);
    --tg-bevel: inset 0 1px 0 rgba(255, 255, 255, 0.10), inset 0 -1px 0 rgba(0, 0, 0, 0.45);
    --tg-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.70), 0 8px 16px -10px rgba(0, 0, 0, 0.55);
    --tg-glow: 0 0 0 1px rgba(114, 134, 255, 0.25), 0 18px 50px -12px rgba(114, 134, 255, 0.35);
    --tg-text: #ececf1;
    --tg-text-dim: rgba(236, 236, 241, 0.68);
    --tg-text-mute: rgba(236, 236, 241, 0.45);
    --tg-accent: #7286ff;
    --tg-accent-2: #a78bfa;
    --tg-coral: #fe7587;
    --tg-success: #22c55e;
    --tg-warn: #f6ad55;
    --tg-danger: #e93d3d;
    --tg-radius: 16px;
    --tg-radius-sm: 10px;

    background: radial-gradient(1200px 700px at 15% -10%, rgba(114, 134, 255, 0.18), transparent 60%),
                radial-gradient(900px 600px at 110% 10%, rgba(254, 117, 135, 0.12), transparent 55%),
                linear-gradient(180deg, var(--tg-bg-0) 0%, var(--tg-bg-1) 40%, #0a0810 100%) fixed;
    color: var(--tg-text);
    font-family: 'Inter', 'Poppins', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.theme-glass h1,
body.theme-glass h2,
body.theme-glass h3,
body.theme-glass h4,
body.theme-glass .title,
body.theme-glass .subtitle {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    color: var(--tg-text);
    letter-spacing: -0.01em;
}

body.theme-glass a { color: var(--tg-accent); }
body.theme-glass a:hover { color: #9db0ff; }

/* ---- Chrome: header, sidebar, main content ------------------------------- */
/* NOTE: Never apply backdrop-filter / filter / transform to .site-header or
   #header — they are ancestors of the position:fixed .sidebar and .topbar,
   and any of those properties would turn the header into the containing
   block, clipping the sidebar. Style the inner bars directly instead. */
body.theme-glass .topbar {
    background: linear-gradient(180deg, rgba(20, 17, 24, 0.85), rgba(20, 17, 24, 0.65)) !important;
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-bottom: 1px solid var(--tg-border);
}

body.theme-glass .sidebar-content,
body.theme-glass .main-content,
body.theme-glass .first-main-content {
    background: transparent !important;
}

body.theme-glass #sidebar,
body.theme-glass .sidebar {
    background: rgba(20, 17, 24, 0.72) !important;
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border-right: 1px solid var(--tg-border);
}

body.theme-glass .sidebar-link {
    color: var(--tg-text-dim) !important;
    border-radius: 10px;
    transition: background 160ms ease, color 160ms ease;
}
body.theme-glass .sidebar-link:hover,
body.theme-glass .sidebar-item.is-active > .sidebar-link {
    background: var(--tg-surface-hi) !important;
    color: var(--tg-text) !important;
}
/* Active top-level item: re-tint the inherited purple left accent. */
body.theme-glass .sidebar-item.is-active > .sidebar-link {
    border-left-color: #00b3ff !important;
}
body.theme-glass .sidebar-item.is-active > .sidebar-link .sidebar-icon {
    color: #00b3ff !important;
}
/* Active submenu link (L2 and L3) */
body.theme-glass .sidebar-submenu a.is-active,
body.theme-glass .sidebar-submenu-l3 a.is-active {
    color: #fff !important;
    background: rgba(0, 179, 255, 0.12) !important;
    box-shadow: inset 3px 0 0 #00b3ff;
}
body.theme-glass .sidebar-icon { color: var(--tg-accent); }
body.theme-glass .sidebar-submenu { background: rgba(0, 0, 0, 0.25) !important; }

/* ---- Glass tiles --------------------------------------------------------- */
body.theme-glass .inner-page-wrap,
body.theme-glass .sub-wrap,
body.theme-glass .box,
body.theme-glass .card,
body.theme-glass .tile,
body.theme-glass .glass-tile,
body.theme-glass .panel,
body.theme-glass .main-content .inner-wrapper,
body.theme-glass .box-section,
body.theme-glass .box-section-top {
    background: var(--tg-surface) !important;
    color: var(--tg-text);
    border: 1px solid var(--tg-border);
    border-radius: var(--tg-radius);
    box-shadow: var(--tg-bevel), var(--tg-shadow);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    position: relative;
    overflow: hidden;
}

/* Avoid double-nesting: inner-wrapper > box-section should be flat. */
body.theme-glass .main-content .inner-wrapper > .box-section,
body.theme-glass .main-content .inner-wrapper > .box-section-top {
    background: transparent !important;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
body.theme-glass .main-content .inner-wrapper > .box-section::before,
body.theme-glass .main-content .inner-wrapper > .box-section-top::before {
    display: none;
}

body.theme-glass .inner-page-wrap,
body.theme-glass .main-content .inner-wrapper {
    padding: 38px 32px 36px;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}
/* Training page: slightly roomier top so the lesson video/title breathes. */
body.theme-glass #training-page .inner-wrapper {
    padding: 24px 36px 40px;
}

/* Subtle top-edge highlight (beveled look) */
body.theme-glass .inner-page-wrap::before,
body.theme-glass .glass-tile::before,
body.theme-glass .box::before,
body.theme-glass .card::before,
body.theme-glass .main-content .inner-wrapper::before,
body.theme-glass .box-section::before,
body.theme-glass .box-section-top::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    pointer-events: none;
}

/* ---- Unlock section (home welcome) -------------------------------------- */
body.theme-glass #unlock-section .container {
    background: linear-gradient(135deg, rgba(114, 134, 255, 0.08), rgba(254, 117, 135, 0.05));
    border: 1px solid var(--tg-border);
    border-radius: var(--tg-radius);
    padding: 28px;
    backdrop-filter: blur(16px);
    box-shadow: var(--tg-bevel);
}

body.theme-glass #unlock-section p {
    font-size: 1.5rem;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--tg-text);
    margin: 0;
}

/* ---- Buttons with shimmer sweep ----------------------------------------- */
body.theme-glass .button,
body.theme-glass button.button,
body.theme-glass a.button,
body.theme-glass input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 10px 22px;
    border-radius: 9999px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    cursor: pointer;
    color: #fff !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -1px 0 rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: all 250ms ease;
}

body.theme-glass .button::before,
body.theme-glass button.button::before,
body.theme-glass a.button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -150%;
    width: 60%;
    height: 100%;
    background: linear-gradient(100deg,
        transparent 0%,
        rgba(255, 255, 255, 0.00) 30%,
        rgba(255, 255, 255, 0.35) 50%,
        rgba(255, 255, 255, 0.00) 70%,
        transparent 100%);
    transform: skewX(-18deg);
    transition: left 700ms ease;
    pointer-events: none;
    z-index: 1;
}

body.theme-glass .button:hover::before,
body.theme-glass button.button:hover::before,
body.theme-glass a.button:hover::before {
    left: 160%;
}

body.theme-glass .button:hover,
body.theme-glass button.button:hover,
body.theme-glass a.button:hover {
    border-color: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 -1px 0 rgba(0, 0, 0, 0.25), 0 12px 28px -12px rgba(0, 0, 0, 0.8);
}

body.theme-glass .button.is-primary,
body.theme-glass a.button.is-primary,
body.theme-glass button.is-primary {
    /* Solid dark base so the translucent blue gradient reads consistently
       regardless of what page background it sits on. */
    background-color: #0a1530;
    background-image: linear-gradient(135deg, rgba(0, 179, 255, 0.70) 0%, rgba(8, 78, 199, 0.50) 50%, rgba(0, 179, 255, 0.65) 100%);
    border: 1px solid rgba(0, 179, 255, 0.30);
    color: #fff !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

body.theme-glass .button.is-primary:hover {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), inset 0 -1px 0 rgba(0, 0, 0, 0.2), 0 14px 34px -12px rgba(0, 179, 255, 0.55);
}

/* Kill the legacy purple focus/active states from main.css and Bulma
   so clicked buttons stay on-theme. */
body.theme-glass .button:focus,
body.theme-glass .button:focus:not(:active),
body.theme-glass .button.is-focused,
body.theme-glass .button:active,
body.theme-glass .button.is-active,
body.theme-glass .button:visited,
body.theme-glass a.button:visited,
body.theme-glass .button.is-primary:focus,
body.theme-glass .button.is-primary:focus:not(:active),
body.theme-glass .button.is-primary.is-focused:not(:active),
body.theme-glass .button.is-primary:active,
body.theme-glass .button.is-primary.is-active,
body.theme-glass .button.is-primary:visited,
body.theme-glass a.button.is-primary:visited {
    background-color: #0a1530 !important;
    background-image: linear-gradient(135deg, rgba(0, 179, 255, 0.70) 0%, rgba(8, 78, 199, 0.50) 50%, rgba(0, 179, 255, 0.65) 100%) !important;
    border-color: rgba(0, 179, 255, 0.45) !important;
    color: #fff !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 -1px 0 rgba(0, 0, 0, 0.2), 0 0 0 3px rgba(0, 179, 255, 0.28) !important;
    outline: none;
    filter: none;
}
body.theme-glass .button:active,
body.theme-glass .button.is-primary:active {
    transform: translateY(0);
    filter: brightness(0.95);
}

body.theme-glass .button.is-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.75) 0%, rgba(185, 28, 28, 0.55) 50%, rgba(239, 68, 68, 0.70) 100%);
    border-color: rgba(239, 68, 68, 0.30);
}

body.theme-glass .button.is-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.70) 0%, rgba(21, 128, 61, 0.50) 50%, rgba(34, 197, 94, 0.65) 100%);
    border-color: rgba(34, 197, 94, 0.30);
}

/* ---- Nav items ---------------------------------------------------------- */
body.theme-glass .navbar,
body.theme-glass .navbar-menu {
    background: transparent !important;
}

body.theme-glass .navbar-item,
body.theme-glass a.navbar-item {
    color: var(--tg-text-dim) !important;
    border-radius: 10px;
    transition: background 180ms ease, color 180ms ease;
}

body.theme-glass a.navbar-item:hover,
body.theme-glass .navbar-item:hover {
    background: var(--tg-surface-hi) !important;
    color: var(--tg-text) !important;
}

body.theme-glass .navbar-item .menu-icon { color: var(--tg-accent); }

body.theme-glass .navbar-dropdown {
    background: rgba(27, 23, 36, 0.92) !important;
    border: 1px solid var(--tg-border);
    border-radius: var(--tg-radius-sm);
    backdrop-filter: blur(20px) saturate(140%);
    box-shadow: var(--tg-shadow);
}

/* Topbar profile dropdown — glass panel instead of white card */
body.theme-glass .topbar-profile-menu {
    background: rgba(20, 17, 24, 0.85) !important;
    border: 1px solid var(--tg-border) !important;
    border-radius: var(--tg-radius-sm);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    box-shadow: var(--tg-bevel), var(--tg-shadow);
}
body.theme-glass .topbar-profile-menu a {
    color: var(--tg-text-dim) !important;
    transition: background 180ms ease, color 180ms ease;
}
body.theme-glass .topbar-profile-menu a:hover {
    background: var(--tg-surface-hi) !important;
    color: var(--tg-text) !important;
}

/* ---- Alert banners ------------------------------------------------------ */
body.theme-glass .alert-banner {
    background: var(--tg-surface) !important;
    border: 1px solid var(--tg-border);
    border-radius: var(--tg-radius-sm);
    color: var(--tg-text);
    backdrop-filter: blur(18px);
    box-shadow: var(--tg-bevel);
    padding: 14px 18px;
}
body.theme-glass .alert-banner--warning { border-color: rgba(246, 173, 85, 0.4); }
body.theme-glass .alert-banner--danger  { border-color: rgba(233, 61, 61, 0.45); background: rgba(233, 61, 61, 0.08) !important; }
body.theme-glass .alert-banner--success { border-color: rgba(34, 197, 94, 0.4); }

/* Bootstrap-style .alert boxes used by WriteErrors / WriteMsgs */
body.theme-glass .alert {
    background: var(--tg-surface) !important;
    color: var(--tg-text) !important;
    border: 1px solid var(--tg-border);
    border-radius: var(--tg-radius-sm);
    padding: 12px 16px;
    margin-bottom: 16px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    font-size: 14px;
    line-height: 1.5;
}
body.theme-glass .alert-danger,
body.theme-glass .alert.alert-danger {
    background: rgba(233, 61, 61, 0.10) !important;
    border-color: rgba(233, 61, 61, 0.45);
    color: #fecaca !important;
}
body.theme-glass .alert-success,
body.theme-glass .alert.alert-success {
    background: rgba(34, 197, 94, 0.10) !important;
    border-color: rgba(34, 197, 94, 0.40);
    color: #bbf7d0 !important;
}
body.theme-glass .alert-warning,
body.theme-glass .alert.alert-warning {
    background: rgba(246, 173, 85, 0.10) !important;
    border-color: rgba(246, 173, 85, 0.40);
    color: #fde68a !important;
}
body.theme-glass .alert-info,
body.theme-glass .alert.alert-info {
    background: rgba(114, 134, 255, 0.10) !important;
    border-color: rgba(114, 134, 255, 0.40);
    color: #c7d2fe !important;
}

/* ---- Inputs ------------------------------------------------------------- */
body.theme-glass input[type="text"],
body.theme-glass input[type="email"],
body.theme-glass input[type="password"],
body.theme-glass input[type="number"],
body.theme-glass input[type="search"],
body.theme-glass textarea,
body.theme-glass select,
body.theme-glass .input,
body.theme-glass .textarea {
    background: rgba(0, 0, 0, 0.25) !important;
    border: 1px solid var(--tg-border) !important;
    color: var(--tg-text) !important;
    border-radius: 10px;
    box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.4);
    transition: border-color 180ms ease, box-shadow 180ms ease;
}
body.theme-glass input::placeholder,
body.theme-glass textarea::placeholder,
body.theme-glass .input::placeholder,
body.theme-glass .textarea::placeholder {
    color: rgba(236, 236, 241, 0.55) !important;
    opacity: 1;
}

body.theme-glass input:focus,
body.theme-glass textarea:focus,
body.theme-glass select:focus,
body.theme-glass .input:focus {
    border-color: var(--tg-accent) !important;
    box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(114, 134, 255, 0.25) !important;
    outline: none;
}

/* ---- Training: course sidebar (module + lesson list) ------------------- */
body.theme-glass .custum-sidenav,
body.theme-glass .training-modules-sidebar {
    background: transparent;
}

/* Module section header (e.g. "COURSE INTRO") — small uppercase cyan label */
body.theme-glass .lessonHeader {
    background: transparent !important;
    border: 0;
    margin-top: 18px;
    margin-bottom: 4px;
}
body.theme-glass .lessonHeader a.navbar-item,
body.theme-glass .custum-sidenav li.lessonHeader a,
body.theme-glass .custum-sidenav li.lessonHeader a:hover {
    background: transparent !important;
    color: #00b3ff !important;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 6px 12px;
    cursor: pointer;
    user-select: none;
}
body.theme-glass .lessonHeader a .fa-bars { opacity: 0.6; }
body.theme-glass .lessonHeader .grey { color: var(--tg-text-mute) !important; }

/* Sublist lesson rows */
body.theme-glass .custum-sidenav ul.sublist,
body.theme-glass .sublist {
    background: transparent !important;
    padding-left: 0;
}
body.theme-glass .custum-sidenav ul.sublist li,
body.theme-glass .sublist li.custom-sub {
    background: transparent !important;
    border: 0 !important;
}
body.theme-glass .custum-sidenav ul.sublist li a,
body.theme-glass .sublist li.custom-sub a {
    color: var(--tg-text-dim) !important;
    background: transparent !important;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    padding: 8px 14px !important;
    border-radius: 10px;
    transition: background 180ms ease, color 180ms ease;
    border: 0 !important;
}
body.theme-glass .custum-sidenav ul.sublist li a:hover,
body.theme-glass .sublist li.custom-sub a:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--tg-text) !important;
}
/* Active lesson */
body.theme-glass .custum-sidenav ul li.lesson-selected a,
body.theme-glass .custum-sidenav li.is-active a,
body.theme-glass .sublist li.is-active a,
body.theme-glass .sublist li.selected a {
    background: rgba(0, 179, 255, 0.12) !important;
    color: #fff !important;
    box-shadow: inset 3px 0 0 #00b3ff;
}
/* Completed lesson checkmark stays green */
body.theme-glass .sublist li a i.fa-check.green,
body.theme-glass .training-modules-sidebar .sublist li i.fa-check.green {
    color: #22c55e !important;
}
/* Lesson thumbnail bevel */
body.theme-glass .sublist li a img {
    border: 1px solid var(--tg-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* ---- Training: lesson navigation buttons ------------------------------- */
/* Match .button.is-primary so lesson CTAs look standard. */
body.theme-glass a.MarkLessonComplete,
body.theme-glass a.prev-next-btn,
body.theme-glass a.prev-next-btn-new {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 9999px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #fff !important;
    background-color: #0a1530 !important;
    background-image: linear-gradient(135deg, rgba(0, 179, 255, 0.70) 0%, rgba(8, 78, 199, 0.50) 50%, rgba(0, 179, 255, 0.65) 100%) !important;
    border: 1px solid rgba(0, 179, 255, 0.30) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 -1px 0 rgba(0, 0, 0, 0.2) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: all 250ms ease;
    text-decoration: none;
}
body.theme-glass a.MarkLessonComplete:hover,
body.theme-glass a.prev-next-btn:hover,
body.theme-glass a.prev-next-btn-new:hover {
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), inset 0 -1px 0 rgba(0, 0, 0, 0.2), 0 14px 34px -12px rgba(0, 179, 255, 0.55) !important;
    filter: none;
}

/* ---- Training: lesson video progress bar ------------------------------- */
body.theme-glass #progressbar {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--tg-border);
    border-radius: 9999px;
    padding: 3px;
    margin-top: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}
/* Collapse the stray <br> that the PHP prints before the progress bar. */
body.theme-glass #training-page br + #progressbar {
    margin-top: 0;
}
body.theme-glass #training-page #progressbar {
    margin-top: 4px;
}
body.theme-glass #progressbar > #progress_div,
body.theme-glass #progressbar > div {
    background: linear-gradient(90deg, rgba(0, 179, 255, 0.85) 0%, rgba(8, 78, 199, 0.85) 100%);
    height: 18px;
    line-height: 18px;
    border-radius: 9999px;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.30), 0 0 16px -4px rgba(0, 179, 255, 0.6);
    transition: width 0.3s ease;
}

/* ---- Campaigns page ----------------------------------------------------- */
/* .campaigns-page re-scopes its own --color-* variables to light ones
   (white card bg, purple primary, dark text). Override at the same scope
   so the rest of campaigns.css inherits the glass palette. */
body.theme-glass .campaigns-page {
    --color-text: #ececf1;
    --color-text-muted: rgba(236, 236, 241, 0.68);
    --color-primary: #00b3ff;
    --color-primary-dark: #0891d1;
    --color-bg-card: rgba(255, 255, 255, 0.04);
    --color-bg-light: rgba(255, 255, 255, 0.04);
    --color-bg-muted: rgba(255, 255, 255, 0.06);
    --color-border: rgba(255, 255, 255, 0.10);
    --color-border-light: rgba(255, 255, 255, 0.10);
    color: var(--tg-text);
}

/* Campaign card — glass tile with bevel, matches the rest of the site. */
body.theme-glass .campaign-card {
    background: var(--tg-surface) !important;
    border: 1px solid var(--tg-border) !important;
    border-radius: var(--tg-radius);
    box-shadow: var(--tg-bevel), var(--tg-shadow);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    position: relative;
}
body.theme-glass .campaign-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    pointer-events: none;
    border-radius: var(--tg-radius) var(--tg-radius) 0 0;
    z-index: 1;
}
body.theme-glass .campaign-card:hover {
    border-color: rgba(255, 255, 255, 0.18) !important;
    box-shadow: var(--tg-bevel), 0 24px 48px -16px rgba(0, 0, 0, 0.75);
}
body.theme-glass .campaign-card-body,
body.theme-glass .campaign-card-footer {
    background: transparent;
    border-top-color: var(--tg-border) !important;
}

/* Campaigns-page inputs were hardcoded to white. */
body.theme-glass .campaigns-page .input,
body.theme-glass .campaigns-page .textarea,
body.theme-glass .campaigns-page .select select {
    background-color: rgba(0, 0, 0, 0.25) !important;
    color: var(--tg-text) !important;
    border-color: var(--tg-border) !important;
}

/* Campaign detail page: tab nav */
body.theme-glass .funnel-tab-btn {
    background: var(--tg-surface) !important;
    border: 1px solid var(--tg-border) !important;
    color: var(--tg-text-dim) !important;
    border-radius: 9999px;
    transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}
body.theme-glass .funnel-tab-btn:hover {
    background: var(--tg-surface-hi) !important;
    color: var(--tg-text) !important;
}
body.theme-glass .funnel-tab-btn.is-active {
    background-color: #0a1530 !important;
    background-image: linear-gradient(135deg, rgba(0, 179, 255, 0.70) 0%, rgba(8, 78, 199, 0.50) 50%, rgba(0, 179, 255, 0.65) 100%) !important;
    border-color: rgba(0, 179, 255, 0.45) !important;
    color: #fff !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

/* =======================================================================
   System-wide tabs. Covers three different tab implementations used on
   this site so they all render with the same underlined look:
     1. .tab-nav  — shared custom tab nav (campaigns Overview/Paid/Organic,
        my-account/chat, etc.).  Defaults in main.css paint a white active
        tab with a purple border.
     2. .ui-tabs  — jQuery UI Tabs widget (ad-links, forms, some my-account
        pages).  Its own theme injects gradient backgrounds.
     3. .account-tabs / .funnel-tab-btn — already styled as pill/underline
        variants above; left alone here.
   ======================================================================= */

/* --- 1. .tab-nav --- */
body.theme-glass .tab-nav {
    border-bottom-color: var(--tg-border) !important;
}
body.theme-glass .tab-nav li a {
    color: var(--tg-text-dim) !important;
    background: transparent !important;
    border-color: transparent !important;
}
body.theme-glass .tab-nav li a:hover {
    background: var(--tg-surface-hi) !important;
    color: var(--tg-text) !important;
}
body.theme-glass .tab-nav li.is-active a {
    background: transparent !important;
    border-color: transparent !important;
    border-bottom: 2px solid #00b3ff !important;
    color: #fff !important;
}

/* --- 2. jQuery UI Tabs (.ui-tabs) --- */
body.theme-glass .ui-tabs,
body.theme-glass .ui-tabs.ui-widget-content,
body.theme-glass .ui-tabs-panel,
body.theme-glass .ui-tabs-panel.ui-widget-content {
    background: transparent !important;
    border: 0 !important;
    color: var(--tg-text);
    padding-left: 0;
    padding-right: 0;
}
body.theme-glass .ui-tabs .ui-tabs-nav,
body.theme-glass .ui-tabs-nav.ui-widget-header {
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid var(--tg-border) !important;
    border-radius: 0;
    padding: 0 !important;
    margin-bottom: 20px;
}
body.theme-glass .ui-tabs .ui-tabs-nav li,
body.theme-glass .ui-tabs-nav li.ui-state-default,
body.theme-glass .ui-tabs-nav li.ui-tabs-tab {
    background: transparent !important;
    border: 0 !important;
    margin: 0 0 -1px 0 !important;
    top: 0;
}
body.theme-glass .ui-tabs .ui-tabs-nav li a,
body.theme-glass .ui-tabs-nav li a.ui-tabs-anchor {
    background: transparent !important;
    color: var(--tg-text-dim) !important;
    border: 0 !important;
    border-bottom: 2px solid transparent !important;
    padding: 10px 16px !important;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    outline: none;
    transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}
body.theme-glass .ui-tabs .ui-tabs-nav li a:hover,
body.theme-glass .ui-tabs-nav li a.ui-tabs-anchor:hover {
    background: var(--tg-surface-hi) !important;
    color: var(--tg-text) !important;
}
body.theme-glass .ui-tabs .ui-tabs-nav li.ui-tabs-active,
body.theme-glass .ui-tabs .ui-tabs-nav li.ui-state-active,
body.theme-glass .ui-tabs-nav li.ui-tabs-active a,
body.theme-glass .ui-tabs-nav li.ui-state-active a {
    background: transparent !important;
    border-color: transparent !important;
    color: #fff !important;
}
body.theme-glass .ui-tabs .ui-tabs-nav li.ui-tabs-active a,
body.theme-glass .ui-tabs .ui-tabs-nav li.ui-state-active a {
    border-bottom: 2px solid #00b3ff !important;
}

/* Ad-links page: inline-styled white ad cards */
body.theme-glass .masterclass-businesses-section .ad-link-card,
body.theme-glass .masterclass-businesses-section .card-content {
    background: var(--tg-surface) !important;
    border: 1px solid var(--tg-border) !important;
    color: var(--tg-text) !important;
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    box-shadow: var(--tg-bevel);
}
body.theme-glass .masterclass-businesses-section .ad-link-card h6,
body.theme-glass .masterclass-businesses-section .card-content h6 {
    color: var(--tg-text) !important;
}

/* Training video cards (Overview tab) */
body.theme-glass .training-video-card {
    background: var(--tg-surface) !important;
    border: 1px solid var(--tg-border);
    box-shadow: var(--tg-bevel);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
}
body.theme-glass .training-video-thumb {
    background: rgba(0, 0, 0, 0.35) !important;
}
body.theme-glass .training-video-placeholder {
    color: var(--tg-text-mute) !important;
}
body.theme-glass .training-video-title {
    color: var(--tg-text) !important;
}

/* Funnel walkthrough step cards */
body.theme-glass .funnel-step-card {
    background: var(--tg-surface) !important;
    border: 1px solid var(--tg-border) !important;
    color: var(--tg-text);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
}
body.theme-glass .funnel-step-number {
    background-color: #0a1530 !important;
    background-image: linear-gradient(135deg, rgba(0, 179, 255, 0.85), rgba(8, 78, 199, 0.85)) !important;
    color: #fff !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
body.theme-glass .funnel-step-header i {
    color: #00b3ff !important;
}

/* Generic funnel content cards */
body.theme-glass .funnel-content-card {
    background: var(--tg-surface) !important;
    border: 1px solid var(--tg-border) !important;
    color: var(--tg-text);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
}

/* ---- Campaigns: performance page --------------------------------------- */
body.theme-glass .perf-stat-card,
body.theme-glass .perf-chart-section,
body.theme-glass .perf-table-section {
    background: var(--tg-surface) !important;
    border: 1px solid var(--tg-border);
    border-radius: var(--tg-radius);
    box-shadow: var(--tg-bevel), var(--tg-shadow);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    position: relative;
}
body.theme-glass .perf-stat-card::before,
body.theme-glass .perf-chart-section::before,
body.theme-glass .perf-table-section::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    pointer-events: none;
    border-radius: var(--tg-radius) var(--tg-radius) 0 0;
}
body.theme-glass .perf-stat-label { color: var(--tg-text-mute); }
body.theme-glass .perf-stat-value { color: var(--tg-text); }

/* Retint the conversions-stat icon off the legacy purple. */
body.theme-glass .perf-stat-conversions .perf-stat-icon {
    background: rgba(0, 179, 255, 0.12) !important;
    color: #00b3ff !important;
}

/* Section heading on this page uses legacy colors — retint. */
body.theme-glass .section-heading {
    color: var(--tg-text) !important;
    border-bottom-color: var(--tg-border) !important;
}
body.theme-glass .section-heading i {
    color: #00b3ff !important;
}

/* ---- Pagination -------------------------------------------------------- */
body.theme-glass .pagination-link,
body.theme-glass .pagination-previous,
body.theme-glass .pagination-next {
    background: var(--tg-surface) !important;
    border: 1px solid var(--tg-border) !important;
    color: var(--tg-text-dim) !important;
    border-radius: 9999px;
    transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}
body.theme-glass .pagination-link:hover,
body.theme-glass .pagination-previous:hover,
body.theme-glass .pagination-next:hover {
    background: var(--tg-surface-hi) !important;
    border-color: var(--tg-border-hi) !important;
    color: var(--tg-text) !important;
}
body.theme-glass .pagination-link.is-current {
    background-color: #0a1530 !important;
    background-image: linear-gradient(135deg, rgba(0, 179, 255, 0.70) 0%, rgba(8, 78, 199, 0.50) 50%, rgba(0, 179, 255, 0.65) 100%) !important;
    border-color: rgba(0, 179, 255, 0.45) !important;
    color: #fff !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}
body.theme-glass .pagination-ellipsis {
    color: var(--tg-text-mute) !important;
}

/* ---- Account tabs (sidebar nav on /my-account/*) ----------------------- */
body.theme-glass .account-tabs {
    border-bottom: 1px solid var(--tg-border);
}
body.theme-glass .account-tabs a {
    color: var(--tg-text-dim) !important;
    border-bottom: 3px solid transparent;
    transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}
body.theme-glass .account-tabs a:hover {
    color: var(--tg-text) !important;
    border-bottom-color: var(--tg-border-hi);
}
body.theme-glass .account-tabs a.is-active {
    color: #fff !important;
    border-bottom-color: #00b3ff;
    text-shadow: 0 0 24px rgba(0, 179, 255, 0.35);
}
body.theme-glass .account-tabs a.is-active i {
    color: #00b3ff;
}

/* ---- Table / section header (WriteIncludeHeader) ----------------------- */
body.theme-glass .inner-page-wrap h1,
body.theme-glass .box-section h1,
body.theme-glass .inner-wrapper h1 {
    color: var(--tg-text) !important;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.01em;
}
body.theme-glass .csv-export-btn {
    color: var(--tg-accent) !important;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 9999px;
    border: 1px solid rgba(0, 179, 255, 0.35);
    background: rgba(0, 179, 255, 0.08);
    transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}
body.theme-glass .csv-export-btn:hover {
    background: rgba(0, 179, 255, 0.18);
    border-color: rgba(0, 179, 255, 0.55);
    color: #fff !important;
}

/* ---- Search filter card ------------------------------------------------ */
body.theme-glass .search-filters {
    background: var(--tg-surface) !important;
    border: 1px solid var(--tg-border) !important;
    border-radius: var(--tg-radius);
    color: var(--tg-text);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    box-shadow: var(--tg-bevel);
    position: relative;
}
body.theme-glass .search-filters::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    pointer-events: none;
    border-radius: var(--tg-radius) var(--tg-radius) 0 0;
}
body.theme-glass .search-filters-field label,
body.theme-glass .search-filters label {
    color: var(--tg-text-dim);
}
body.theme-glass .search-filters-clear {
    color: var(--tg-text-mute);
}
body.theme-glass .search-filters-clear:hover {
    color: var(--tg-accent);
}

/* ---- Tables ------------------------------------------------------------- */
body.theme-glass .table-res-wrap {
    background: transparent;
    border: 1px solid var(--tg-border);
    border-radius: var(--tg-radius-sm);
}
body.theme-glass table.table,
body.theme-glass .table {
    background: transparent !important;
    color: var(--tg-text);
}
body.theme-glass table.table th,
body.theme-glass table.table td,
body.theme-glass .table th,
body.theme-glass .table td {
    border-color: var(--tg-border) !important;
    background: transparent !important;
    color: var(--tg-text);
}
body.theme-glass table.table thead th,
body.theme-glass .table thead th {
    color: var(--tg-text-dim);
    background: rgba(255, 255, 255, 0.03) !important;
}
body.theme-glass .table.is-striped tbody tr:not(.is-selected):nth-child(even),
body.theme-glass .table tbody tr:hover,
body.theme-glass .sys-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.03) !important;
}
body.theme-glass .table tr.is-selected,
body.theme-glass .table tr.is-selected td,
body.theme-glass .table tr.is-selected th {
    background: rgba(0, 179, 255, 0.18) !important;
    color: #fff !important;
}
body.theme-glass .table a { color: var(--tg-accent); }

/* .sys-table adds its own white border + light thead + dark cell text;
   override all of that for the glass theme. */
body.theme-glass .sys-table {
    border: 1px solid var(--tg-border) !important;
    background: transparent !important;
}
body.theme-glass .sys-table thead,
body.theme-glass .sys-table thead tr {
    background: rgba(255, 255, 255, 0.04) !important;
}
body.theme-glass .sys-table thead tr th {
    color: var(--tg-text-dim) !important;
    border-bottom: 1px solid var(--tg-border) !important;
    background: transparent !important;
}
body.theme-glass .sys-table tbody td {
    color: var(--tg-text) !important;
    border-color: var(--tg-border) !important;
    background: transparent !important;
}

/* Bulma's is-bordered paints light borders on every cell — retint. */
body.theme-glass .table.is-bordered td,
body.theme-glass .table.is-bordered th,
body.theme-glass .table.is-bordered tr:last-child td,
body.theme-glass .table.is-bordered tr:last-child th {
    border-color: var(--tg-border) !important;
}

/* ---- Misc: text, hr, labels -------------------------------------------- */
body.theme-glass hr { border-color: var(--tg-border); background: var(--tg-border); }
body.theme-glass label { color: var(--tg-text-dim); }
body.theme-glass small { color: var(--tg-text-mute); }

/* ---- Login page -------------------------------------------------------- */
body.login-body.theme-glass {
    background: radial-gradient(1200px 700px at 15% -10%, rgba(114, 134, 255, 0.22), transparent 60%),
                radial-gradient(900px 600px at 110% 10%, rgba(254, 117, 135, 0.14), transparent 55%),
                linear-gradient(180deg, var(--tg-bg-0) 0%, var(--tg-bg-1) 40%, #0a0810 100%) fixed;
    font-family: 'Inter', 'Open Sans', system-ui, sans-serif;
}

body.login-body.theme-glass .login-header {
    background: rgba(20, 17, 24, 0.60);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-bottom: 1px solid var(--tg-border);
}

body.login-body.theme-glass .login-card {
    background: var(--tg-surface);
    border: 1px solid var(--tg-border);
    border-radius: var(--tg-radius);
    padding: 40px 36px;
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    box-shadow: var(--tg-bevel), var(--tg-shadow);
    position: relative;
    overflow: hidden;
}
body.login-body.theme-glass .login-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    pointer-events: none;
}

body.login-body.theme-glass .login-card h1 {
    color: var(--tg-text);
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    letter-spacing: -0.01em;
}

body.login-body.theme-glass .login-card .form-group label {
    color: var(--tg-text-dim);
}

body.login-body.theme-glass .login-card .form-group input {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--tg-border);
    color: var(--tg-text);
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.35);
}
body.login-body.theme-glass .login-card .form-group input::placeholder {
    color: var(--tg-text-mute);
}
body.login-body.theme-glass .login-card .form-group input:focus {
    border-color: var(--tg-accent);
    box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.35), 0 0 0 3px rgba(114, 134, 255, 0.25);
}

/* Reuse the shared primary-button look for the login submit buttons. */
body.login-body.theme-glass .login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 22px;
    border-radius: 9999px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #fff;
    background-color: #0a1530;
    background-image: linear-gradient(135deg, rgba(0, 179, 255, 0.70) 0%, rgba(8, 78, 199, 0.50) 50%, rgba(0, 179, 255, 0.65) 100%);
    border: 1px solid rgba(0, 179, 255, 0.30);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: all 250ms ease;
}
body.login-body.theme-glass .login-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -150%;
    width: 60%;
    height: 100%;
    background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.35) 50%, transparent 100%);
    transform: skewX(-18deg);
    transition: left 700ms ease;
    pointer-events: none;
}
body.login-body.theme-glass .login-btn:hover {
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), inset 0 -1px 0 rgba(0, 0, 0, 0.2), 0 14px 34px -12px rgba(0, 179, 255, 0.55);
}
body.login-body.theme-glass .login-btn:hover::before { left: 160%; }

body.login-body.theme-glass .login-footer a,
body.login-body.theme-glass .login-footer-links,
body.login-body.theme-glass .login-footer-links a {
    color: var(--tg-text-mute);
}
body.login-body.theme-glass .login-footer a:hover,
body.login-body.theme-glass .login-footer-links a:hover {
    color: var(--tg-accent);
}

/* Reduce-motion respect */
@media (prefers-reduced-motion: reduce) {
    body.theme-glass .button::before,
    body.login-body.theme-glass .login-btn::before { display: none; }
    body.theme-glass .button:hover,
    body.login-body.theme-glass .login-btn:hover { transform: none; }
}
