/* =====================================================================
   Design system: Dubai Cologne Scent.
   Gold primary on emerald (dark theme), emerald and bronze on sand
   (light theme). Two balanced themes driven by [data-theme] with brand
   variables injected from admin settings by brand_css().
   Fonts: Cinzel (headings), Jost (body and UI), Cormorant Garamond
   italic (tagline and quotes).
   ===================================================================== */

:root {
    --radius: 14px;
    --font-heading: 'Cinzel', Georgia, 'Times New Roman', serif;
    --font-body: 'Jost', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-accent: 'Cormorant Garamond', Georgia, serif;
    --shadow-soft: 0 6px 24px rgba(10, 45, 44, .10);
    --shadow-lift: 0 14px 40px rgba(var(--primary-rgb), .22);
    --transition: .25s cubic-bezier(.4, 0, .2, 1);
}

/* ---------------- Theme palettes ---------------- */

[data-theme="dark"] {
    --line: var(--border);
    --ink: var(--text);
    --canvas: var(--bg);
    --shadow: var(--shadow-soft);
    --bg:          var(--navy-deep);
    --bg-soft:     var(--secondary);
    --surface:     rgba(255, 255, 255, .045);
    --surface-2:   rgba(255, 255, 255, .08);
    --border:      rgba(255, 255, 255, .10);
    --text:        #F1EBDC;
    --muted:       #C9C0AA;
    --link:        var(--primary);
    --link-hover:  var(--primary-soft);
    --glass:       rgba(8, 36, 35, .66);
    --glow:        rgba(var(--primary-rgb), .45);
    --particle:    rgba(var(--primary-rgb), .8);
    --hero-grad-a: rgba(var(--primary-rgb), .28);
    --hero-grad-b: rgba(var(--secondary-rgb), .55);
    --card-bg:     var(--navy-soft);
    --input-bg:    rgba(255, 255, 255, .05);
}

[data-theme="light"] {
    --line: var(--border);
    --ink: var(--text);
    --canvas: var(--bg);
    --shadow: var(--shadow-soft);
    --bg:          #F1EBDC;
    --bg-soft:     #E9E1CF;
    --surface:     #FBF8F1;
    --surface-2:   #F4EEE1;
    --border:      #DCD2BC;
    --text:        #1B2422;
    --muted:       #5E6A66;
    --link:        var(--primary-text);
    --link-hover:  var(--secondary);
    --glass:       rgba(251, 248, 241, .76);
    --glow:        rgba(var(--primary-rgb), .22);
    --particle:    rgba(var(--secondary-rgb), .35);
    --hero-grad-a: rgba(var(--primary-rgb), .22);
    --hero-grad-b: rgba(var(--secondary-rgb), .12);
    --card-bg:     #FBF8F1;
    --input-bg:    #FBF8F1;
}

/* ---------------- Base ---------------- */

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-weight: 300;
    background: var(--bg);
    color: var(--text);
    transition: background-color .35s ease, color .35s ease;
}
strong, b, .fw-bold, .fw-semibold { font-weight: 500; }

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }

::selection { background: rgba(var(--primary-rgb), .35); }

h1, h2, h3, h4, h5, h6 { color: var(--text); }
h1, h2, .h1, .h2, .display-1, .display-2, .display-3, .display-4, .display-5, .display-6,
.hero-title, .section-title, .auth-title, .page-title {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: .04em;
}
h3, h4, h5, h6, .h3, .h4, .h5, .h6 { font-family: var(--font-body); font-weight: 500; }
.brand-tagline { font-family: var(--font-accent); font-style: italic; font-weight: 500; font-size: 1.05rem; color: var(--muted); }
.text-primary { color: var(--link) !important; }
.form-label { font-weight: 500; }
.badge { font-weight: 500; letter-spacing: .04em; }

/* Logo: one image per theme, the other is hidden */
.brand-logo { display: inline-flex; align-items: center; line-height: 1; }
.brand-logo img { display: block; height: 44px; width: auto; max-width: 100%; }
.brand-logo-full img { height: 64px; }
.brand-logo-mark img { height: 36px; }
[data-theme="dark"] .logo-on-light, [data-theme="light"] .logo-on-dark { display: none; }
.admin-sidebar .brand-logo img, .cta-band .brand-logo img { height: 40px; }
.admin-sidebar .logo-on-light, .cta-band .logo-on-light { display: none; }
.admin-sidebar .logo-on-dark, .cta-band .logo-on-dark { display: block; }
.brand-text { font-family: var(--font-heading); font-weight: 700; letter-spacing: .06em; }
.text-muted { color: var(--muted) !important; }

.btn { border-radius: 10px; transition: var(--transition); }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    border: none;
    color: var(--on-primary);
    font-weight: 500;
    letter-spacing: .02em;
    box-shadow: 0 4px 16px rgba(var(--primary-rgb), .35);
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary:disabled {
    background: linear-gradient(135deg, var(--primary-soft), var(--primary));
    color: var(--on-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(var(--primary-rgb), .45);
}
.btn-outline-primary { color: var(--link); border-color: var(--primary); font-weight: 500; }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn-secondary { background: var(--secondary); border-color: var(--secondary); color: #F1EBDC; }
.btn-secondary:hover { background: var(--navy-soft); border-color: var(--navy-soft); color: #F1EBDC; }

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}
.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}

.form-control, .form-select {
    background: var(--input-bg);
    border-color: var(--border);
    color: var(--text);
    border-radius: 10px;
}
.form-control:focus, .form-select:focus {
    background: var(--input-bg);
    color: var(--text);
    border-color: var(--primary);
    box-shadow: 0 0 0 .2rem rgba(var(--primary-rgb), .18);
}
.form-control::placeholder { color: var(--muted); }

.table { color: var(--text); border-color: var(--border); }
.table > :not(caption) > * > * { background: transparent; color: var(--text); border-color: var(--border); }
.table thead th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }

.modal-content { background: var(--card-bg); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); }
.dropdown-menu { background: var(--card-bg); border-color: var(--border); }
.dropdown-item { color: var(--text); }
.dropdown-item:hover { background: var(--surface-2); color: var(--text); }

.nav-tabs { border-color: var(--border); }
.nav-tabs .nav-link { color: var(--muted); }
.nav-tabs .nav-link.active {
    background: transparent;
    color: var(--primary);
    border-color: var(--border) var(--border) transparent;
    border-bottom: 2px solid var(--primary);
}

.alert { border-radius: var(--radius); }

/* ---------------- Theme toggle ---------------- */

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    cursor: pointer;
    transition: var(--transition);
}
.theme-toggle:hover { border-color: var(--primary); color: var(--primary); transform: rotate(18deg); }
[data-theme="dark"] .theme-toggle .icon-sun { display: inline; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: inline; }

/* ---------------- Public navbar and footer ---------------- */

.public-navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: var(--glass);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}
.public-navbar.scrolled { box-shadow: 0 8px 30px rgba(0, 0, 0, .18); background: var(--glass); }
.public-navbar .navbar-brand { color: var(--text); font-weight: 700; letter-spacing: .02em; padding: 0; }
.public-navbar .nav-link { color: var(--muted); font-weight: 500; position: relative; }
.public-navbar .nav-link::after {
    content: "";
    position: absolute;
    left: .75rem;
    right: 100%;
    bottom: .35rem;
    height: 2px;
    background: var(--primary);
    transition: right .25s ease;
}
.public-navbar .nav-link:hover { color: var(--text); }
.public-navbar .nav-link:hover::after { right: .75rem; }
.navbar-toggler { border-color: var(--border); }
[data-theme="dark"] .navbar-toggler-icon { filter: invert(1); }

.public-footer {
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
    color: var(--muted);
}
.public-footer a { color: var(--muted); }
.public-footer a:hover { color: var(--primary); }

/* ---------------- Hero with particles and 3D depth ---------------- */

.hero-3d {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(900px 480px at 15% -10%, var(--hero-grad-a), transparent 60%),
        radial-gradient(800px 500px at 90% 10%, var(--hero-grad-b), transparent 55%),
        var(--bg);
    padding: 90px 0 110px;
}

.particles-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hero-inner { position: relative; z-index: 2; }

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: .55;
    pointer-events: none;
    will-change: transform;
}
.orb-1 { width: 340px; height: 340px; background: rgba(var(--primary-rgb), .5);  top: -80px; left: -60px; animation: orb-float 11s ease-in-out infinite; }
.orb-2 { width: 260px; height: 260px; background: rgba(var(--secondary-rgb), .8); bottom: -70px; right: 8%; animation: orb-float 14s ease-in-out infinite reverse; }
.orb-3 { width: 160px; height: 160px; background: rgba(var(--primary-rgb), .35); top: 30%; right: 28%; animation: orb-float 9s ease-in-out infinite 1.5s; }

@keyframes orb-float {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50%      { transform: translate3d(24px, -28px, 0) scale(1.06); }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem 1.1rem;
    border-radius: 999px;
    border: 1px solid rgba(var(--primary-rgb), .4);
    background: rgba(var(--primary-rgb), .10);
    color: var(--primary-soft);
    font-size: .8rem;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
}
[data-theme="light"] .hero-badge { color: var(--primary-text); }
.hero-badge::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 0 rgba(var(--primary-rgb), .6);
    animation: badge-pulse 2s infinite;
}
@keyframes badge-pulse {
    70% { box-shadow: 0 0 0 9px rgba(var(--primary-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0); }
}

.gradient-text {
    background: linear-gradient(92deg, var(--primary-soft), var(--primary), var(--primary-soft));
    background-size: 200% auto;
}
[data-theme="light"] .gradient-text {
    background: linear-gradient(92deg, var(--secondary), var(--primary-text), var(--secondary));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-slide 5s linear infinite;
}
@keyframes gradient-slide { to { background-position: 200% center; } }

.hero-title { font-weight: 700; letter-spacing: .03em; }
.hero-sub { color: var(--muted); font-size: 1.15rem; }

.hero-layer { will-change: transform; transition: transform .12s ease-out; }

/* ---------------- Sections ---------------- */

.section-pad { padding: 76px 0; }
.section-alt { background: var(--bg-soft); }
.section-title { font-weight: 700; letter-spacing: -.01em; }
.section-kicker {
    color: var(--primary);
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .14em;
}

/* ---------------- Scroll reveal ---------------- */

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.revealed { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s; }
.reveal-d2 { transition-delay: .16s; }
.reveal-d3 { transition-delay: .24s; }
.reveal-d4 { transition-delay: .32s; }

/* ---------------- Cards: stats, plans, features, testimonials ---------------- */

.stat-card {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    padding: 1.6rem 1.2rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
    transition: var(--transition);
}
.stat-card:hover { transform: translateY(-4px); border-color: rgba(var(--primary-rgb), .5); box-shadow: var(--shadow-lift); }
.stat-value { font-size: 1.75rem; font-weight: 800; color: var(--primary); }
.stat-label { color: var(--muted); font-size: .88rem; }

.tilt-card { transform-style: preserve-3d; will-change: transform; transition: transform .18s ease, box-shadow .25s ease, border-color .25s ease; }

.plan-card {
    position: relative;
    padding: 1.8rem 1.4rem;
    border-radius: var(--radius);
    background: var(--card-bg);
    border: 1px solid var(--border);
    text-align: center;
    height: 100%;
    overflow: hidden;
}
.plan-card::before {
    content: "";
    position: absolute;
    inset: -60% -60% auto;
    height: 160%;
    background: radial-gradient(closest-side, rgba(var(--primary-rgb), .16), transparent);
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none;
}
.plan-card:hover { border-color: rgba(var(--primary-rgb), .55); box-shadow: var(--shadow-lift); }
.plan-card:hover::before { opacity: 1; }
.plan-roi { font-family: var(--font-heading); font-size: 2.1rem; font-weight: 700; color: var(--link); }
.plan-popular { border-color: var(--primary); animation: popular-pulse 2.6s ease-in-out infinite; }
@keyframes popular-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), .30); }
    50%      { box-shadow: 0 0 26px 4px rgba(var(--primary-rgb), .28); }
}
.plan-flag {
    position: absolute;
    top: 14px;
    right: -34px;
    transform: rotate(45deg);
    background: var(--primary);
    color: var(--on-primary);
    font-size: .68rem;
    font-weight: 600;
    padding: .2rem 2.4rem;
    letter-spacing: .05em;
}

.feature-card {
    padding: 1.7rem 1.4rem;
    border-radius: var(--radius);
    background: var(--card-bg);
    border: 1px solid var(--border);
    height: 100%;
    transition: var(--transition);
}
.feature-card:hover { transform: translateY(-5px); border-color: rgba(var(--primary-rgb), .5); box-shadow: var(--shadow-lift); }
.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(var(--primary-rgb), .14);
    color: var(--primary);
    margin-bottom: 1rem;
}

.step-num {
    width: 58px;
    height: 58px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--on-primary);
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    box-shadow: 0 8px 22px rgba(var(--primary-rgb), .4);
}
.step-line { position: relative; }
@media (min-width: 768px) {
    .step-line::after {
        content: "";
        position: absolute;
        top: 29px;
        left: calc(50% + 44px);
        width: calc(100% - 88px);
        border-top: 2px dashed rgba(var(--primary-rgb), .35);
    }
    .step-line:last-child::after { display: none; }
}

.testi-card {
    padding: 1.6rem 1.4rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
    height: 100%;
}
.testi-card .quote { font-size: 2rem; color: var(--primary); line-height: 1; }
.testi-name { font-weight: 700; }
.testi-role { color: var(--muted); font-size: .85rem; }

.cta-band {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    padding: 3.4rem 2rem;
    text-align: center;
    background:
        radial-gradient(600px 300px at 20% 0%, rgba(var(--primary-rgb), .35), transparent 60%),
        linear-gradient(135deg, var(--secondary), var(--navy-deep));
    border: 1px solid rgba(var(--primary-rgb), .35);
    color: #F1EBDC;
}
.cta-band h2 { color: #F1EBDC; }
.cta-band p { color: #C9C0AA; }

/* ---------------- Auth pages ---------------- */

.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(700px 420px at 10% 0%, var(--hero-grad-a), transparent 55%),
        radial-gradient(700px 420px at 95% 100%, var(--hero-grad-b), transparent 55%),
        var(--bg);
    padding: 1rem;
}
.auth-card {
    width: 100%;
    max-width: 430px;
    padding: 2.2rem;
    border-radius: 18px;
    background: var(--glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    animation: auth-in .5s ease both;
}
@keyframes auth-in { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.auth-title { font-weight: 700; margin-bottom: 1.4rem; text-align: center; font-size: 1.5rem; }
.auth-logo { display: flex; justify-content: center; margin-bottom: 1.2rem; }
.auth-logo .brand-logo img { height: 56px; }
.auth-links { margin-top: 1rem; text-align: center; font-size: .9rem; }

/* ---------------- Member and admin shells ---------------- */

.page-header { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin-bottom: 1.4rem; }
.page-title { font-size: 1.35rem; font-weight: 700; margin: 0; }

.balance-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    padding: 1.5rem;
    color: #F1EBDC;
    background:
        radial-gradient(420px 220px at 100% 0%, rgba(var(--primary-rgb), .35), transparent 60%),
        linear-gradient(135deg, var(--secondary), var(--navy-deep));
    border: 1px solid rgba(var(--primary-rgb), .45);
    box-shadow: 0 10px 30px rgba(var(--secondary-rgb), .35);
}
.balance-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: -70%;
    width: 45%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .18), transparent);
    animation: shimmer 3.6s ease-in-out infinite;
}
@keyframes shimmer { 60%, 100% { left: 130%; } }
.balance-card .stat-value { color: var(--primary); font-family: var(--font-heading); }
.balance-card .stat-label { color: #C9C0AA; }

.ring { transform: rotate(-90deg); }
.ring .ring-bg { stroke: var(--border); }
.ring .ring-fill {
    stroke: var(--primary);
    stroke-linecap: round;
    transition: stroke-dashoffset 1.1s cubic-bezier(.4, 0, .2, 1);
    filter: drop-shadow(0 0 6px rgba(var(--primary-rgb), .5));
}
.ring-wrap { position: relative; display: inline-flex; }
.ring-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: none;
    font-weight: 700;
}

/* Admin shell */
.admin-body { background: var(--bg); }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--sidebar), var(--navy-deep));
    color: #F1EBDC;
    display: flex;
    flex-direction: column;
    transition: transform .3s ease;
}
.admin-brand {
    padding: 1rem 1.2rem;
    font-weight: 700;
    color: #F1EBDC;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    letter-spacing: .02em;
}
.admin-nav { overflow-y: auto; padding: .6rem 0; flex: 1; }
.admin-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .42rem 1.2rem .42rem 2rem;
    color: #C9C0AA;
    font-size: .88rem;
    font-weight: 400;
    border-left: 3px solid transparent;
    transition: var(--transition);
}
.admin-nav a:hover, .admin-nav a.active {
    color: #F1EBDC;
    background: rgba(var(--primary-rgb), .16);
    border-left-color: var(--primary);
}
.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-topbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .8rem 1.4rem;
    background: var(--glass);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1020;
}
.admin-title { font-size: 1.1rem; font-weight: 700; margin: 0; flex: 1; }
.admin-user { display: flex; align-items: center; gap: .7rem; }
.admin-content { padding: 1.6rem 1.4rem; }

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 1039;
}

@media (max-width: 991.98px) {
    .admin-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 1040;
        transform: translateX(-100%);
        box-shadow: 20px 0 60px rgba(0, 0, 0, .35);
    }
    .admin-sidebar.open { transform: translateX(0); }
    .sidebar-backdrop.show { display: block; }
    .admin-content { padding: 1.1rem .9rem; }
}

/* ---------------- Status badges, bars, misc contracts ---------------- */

.status { display: inline-block; padding: .22rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 700; }
.status-active, .status-approved { background: rgba(34, 197, 94, .15); color: var(--success); }
.status-pending  { background: rgba(234, 179, 8, .16); color: #d97706; }
[data-theme="dark"] .status-pending { color: #fbbf24; }
.status-rejected { background: rgba(239, 68, 68, .15); color: var(--danger); }

.bar-row { margin-bottom: .8rem; }
.bar-label { display: flex; justify-content: space-between; font-size: .85rem; margin-bottom: .3rem; color: var(--muted); }
.bar-value { font-weight: 700; color: var(--text); }
.bar-track { height: 9px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--primary-soft));
    box-shadow: 0 0 10px rgba(var(--primary-rgb), .5);
    transition: width 1.1s cubic-bezier(.4, 0, .2, 1);
}

.ticker-bar {
    background: linear-gradient(90deg, var(--primary-deep), var(--primary));
    color: var(--on-primary);
    overflow: hidden;
    white-space: nowrap;
    font-size: .85rem;
    padding: 6px 0;
}
.ticker-bar span { display: inline-block; padding-left: 100%; animation: ticker-scroll 22s linear infinite; }
.ticker-bar a { color: var(--on-primary); text-decoration: underline; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-100%); } }

.social-links a { display: inline-block; margin: 0 8px; color: var(--muted); font-size: .9rem; transition: var(--transition); }
.social-links a:hover { color: var(--primary); transform: translateY(-2px); }

.copy-field { display: flex; gap: .5rem; }
.copy-field .form-control { font-size: .85rem; }

.qr-box { display: inline-block; padding: 12px; background: #fff; border-radius: 12px; box-shadow: var(--shadow-soft); }

.secret-code {
    font-family: monospace;
    font-size: 1.25rem;
    letter-spacing: .18em;
    background: var(--surface-2);
    border: 1px dashed var(--border);
    border-radius: 10px;
    padding: .6rem 1rem;
    display: inline-block;
}

.demo-bar, .impersonation-bar {
    text-align: center;
    padding: .45rem .8rem;
    font-size: .85rem;
    font-weight: 600;
}
.demo-bar { background: #fbbf24; color: #1f2937; }
.impersonation-bar { background: var(--danger); color: #fff; }
.impersonation-bar a { color: #fff; text-decoration: underline; }

.cookie-consent {
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    max-width: 520px;
    margin: 0 auto;
    z-index: 1080;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
    padding: 1.1rem 1.2rem;
    animation: auth-in .4s ease both;
}
.cookie-actions { display: flex; gap: .6rem; margin-top: .8rem; }

/* ---------------- Reduced motion ---------------- */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; }
}

/* Animations switched off in admin settings */
.no-anim *, .no-anim *::before, .no-anim *::after { animation: none !important; transition: none !important; }
.no-anim .reveal { opacity: 1; transform: none; }

/* ---------- Selling sessions ---------- */
.sell-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-soft);
}
.sell-plan { font-family: var(--font-heading); font-weight: 700; letter-spacing: .04em; font-size: 1.05rem; }
.sell-stat { background: var(--surface-2); border-radius: 10px; padding: .55rem .75rem; display: flex; flex-direction: column; }
.sell-stat .stat-label { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.sell-stat .stat-value { font-family: var(--font-heading); font-size: 1.15rem; font-weight: 700; color: var(--link); }
.sell-live { display: inline-block; padding: .15rem .55rem; border-radius: 999px; background: rgba(46, 158, 106, .18); color: var(--success); font-weight: 500; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; margin-right: .35rem; }
.sell-live::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--success); margin-right: .4rem; animation: sellPulse 1.2s ease-in-out infinite; }
@keyframes sellPulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.sell-pending { background: rgba(var(--primary-rgb), .12); border: 1px dashed rgba(var(--primary-rgb), .5); border-radius: 10px; padding: .5rem .75rem; }
.sell-button:disabled { opacity: .55; transform: none; box-shadow: none; }

/* ---------- Dashboard trade and sell buttons ---------- */
.trade-actions { padding: .25rem 0 .5rem; }
.trade-action-btn { min-width: 180px; font-family: var(--font-heading); letter-spacing: .08em; text-transform: uppercase; font-size: 1rem; padding: .85rem 2rem; }
.trade-action-btn.is-live { box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .25), 0 10px 30px rgba(var(--primary-rgb), .35); animation: sellGlow 1.6s ease-in-out infinite; }
@keyframes sellGlow { 0%, 100% { box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .25); } 50% { box-shadow: 0 0 0 8px rgba(var(--primary-rgb), .12); } }
@media (max-width: 575px) { .trade-action-btn { min-width: 140px; width: 46%; padding: .75rem 1rem; } }

/* ---------- First visit explainer ---------- */
.explainer-card { background: linear-gradient(135deg, rgba(var(--primary-rgb), .14), rgba(var(--primary-rgb), .04)); border: 1px solid rgba(var(--primary-rgb), .35); border-radius: var(--radius); padding: 1.25rem 1.4rem; }
.explainer-card .section-kicker { font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--link); }
.sell-timeline td, .sell-timeline th { white-space: nowrap; }

/* ---------- Homepage: story, packages, timetable ---------- */
.hero-session { display: inline-block; margin-top: 1.25rem; padding: .55rem 1.1rem; border-radius: 999px; background: rgba(var(--primary-rgb), .14); border: 1px solid rgba(var(--primary-rgb), .4); font-size: .9rem; }
.story-points li { display: flex; gap: .75rem; align-items: flex-start; margin-bottom: .6rem; }
.story-check { flex: 0 0 24px; height: 24px; border-radius: 50%; background: rgba(var(--primary-rgb), .18); color: var(--link); display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; }
.story-flow { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-soft); }
.story-node { display: flex; gap: 1rem; align-items: center; }
.story-icon { flex: 0 0 48px; height: 48px; border-radius: 14px; background: linear-gradient(135deg, var(--primary), var(--primary-dark, var(--primary))); color: #0A2D2C; font-family: var(--font-heading); font-weight: 700; font-size: 1.2rem; display: inline-flex; align-items: center; justify-content: center; }
.story-arrow { width: 2px; height: 22px; margin: .35rem 0 .35rem 23px; background: linear-gradient(var(--primary), transparent); }
.plan-facts li { display: flex; justify-content: space-between; gap: .75rem; padding: .35rem 0; border-bottom: 1px dashed var(--border); }
.plan-facts li:last-child { border-bottom: 0; }
.plan-facts span { color: var(--muted); }
.plan-facts strong { text-align: right; }
.schedule-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.schedule-item { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.2rem; box-shadow: var(--shadow-soft); }
.schedule-name { font-family: var(--font-heading); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .9rem; color: var(--link); }
.schedule-times { font-size: .95rem; margin: .25rem 0; }
.schedule-next { font-size: .85rem; color: var(--muted); }

/* ---------- Admin sidebar accordion ---------- */
.admin-group { border-bottom: 1px solid rgba(255, 255, 255, .05); }
.admin-group-toggle {
    width: 100%; display: flex; align-items: center; gap: .5rem;
    padding: .62rem 1.2rem; background: none; border: 0; text-align: left;
    color: #F1EBDC; font-family: var(--font-heading); font-size: .74rem; font-weight: 700;
    letter-spacing: .14em; text-transform: uppercase; cursor: pointer; transition: var(--transition);
}
.admin-group-toggle:hover { background: rgba(255, 255, 255, .05); }
.admin-group-toggle > span:first-child { flex: 1; }
.admin-group.is-active > .admin-group-toggle { color: var(--primary); }
.admin-chevron { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .25s ease; opacity: .7; }
.admin-group.is-open .admin-chevron { transform: rotate(45deg); }
.admin-group-links { display: none; padding-bottom: .35rem; }
.admin-group.is-open .admin-group-links { display: block; animation: adminGroupIn .22s ease; }
@keyframes adminGroupIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.admin-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--primary); color: #0A2D2C; font-size: .7rem; font-weight: 700; letter-spacing: 0; font-family: var(--font-body); }
.admin-group-toggle .admin-count { margin-right: .25rem; }
.no-anim .admin-group.is-open .admin-group-links { animation: none; }

/* ---------- Member navbar groups ---------- */
.navbar .dropdown-menu .dropdown-item.active, .navbar .dropdown-menu .dropdown-item:active { background: rgba(var(--primary-rgb), .18); color: var(--link); }
.navbar .nav-link.is-group-active { color: var(--link); }
@media (max-width: 991.98px) {
    .navbar .navbar-nav .dropdown-menu { border: 0; background: transparent; padding-left: .75rem; box-shadow: none; }
    .navbar .navbar-nav .dropdown-toggle::after { float: right; margin-top: .55rem; transition: transform .25s ease; }
    .navbar .navbar-nav .dropdown-toggle.show::after { transform: rotate(180deg); }
    .navbar .navbar-nav .nav-item.dropdown { border-top: 1px solid var(--border); }
}

/* ---------- App banner, crypto widget ---------- */
.app-banner { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; background: linear-gradient(135deg, rgba(var(--primary-rgb), .16), rgba(var(--primary-rgb), .04)); border: 1px solid rgba(var(--primary-rgb), .4); border-radius: var(--radius); padding: .9rem 1.1rem; margin-bottom: 1.25rem; }
.app-banner-icon { width: 48px; height: 48px; border-radius: 12px; }
.crypto-widget { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem .5rem .2rem; overflow: hidden; }
.crypto-widget-label { font-family: var(--font-heading); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--link); }
.crypto-widget-note { font-size: .74rem; color: var(--muted); }
.crypto-widget-home { margin-top: -1.5rem; margin-bottom: 1rem; position: relative; z-index: 2; }
[data-theme="light"] .crypto-widget .binance-widget-marquee { background: #0E3B3A; border-radius: 10px; }
@media (max-width: 575px) { .crypto-widget-note { display: none; } }

/* ======================================================================
   Trade page
   ====================================================================== */
.trade-page { max-width: 980px; margin: 0 auto; }
.trade-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.trade-how { background: rgba(var(--primary-rgb), .08); border: 1px solid rgba(var(--primary-rgb), .3); border-radius: var(--radius); padding: .9rem 1.1rem; font-size: .92rem; margin-bottom: 1rem; }
.trade-step { margin-bottom: 1.75rem; }
.trade-step-head { display: flex; align-items: center; gap: .75rem; margin-bottom: .85rem; }
.trade-step-num { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-deep)); color: var(--on-primary); font-family: var(--font-heading); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(var(--primary-rgb), .35); }

/* Package cards */
.pkg-card { position: relative; display: block; height: 100%; cursor: pointer; padding: 1.4rem 1.2rem 1.1rem; border-radius: var(--radius); background: var(--card-bg); border: 2px solid var(--border); border-top: 4px solid var(--pkg-colour); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, opacity .25s ease; }
.pkg-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.pkg-card:focus-visible { outline: 3px solid rgba(var(--primary-rgb), .5); outline-offset: 2px; }
.pkg-card.is-selected { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .18), var(--shadow-lift); transform: translateY(-3px); }
.trade-page:has(.pkg-card.is-selected) .pkg-card:not(.is-selected) { opacity: .72; }
.pkg-flag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--primary); color: var(--on-primary); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; padding: .2rem .7rem; border-radius: 999px; font-weight: 700; white-space: nowrap; }
.pkg-name { font-family: var(--font-heading); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .95rem; color: var(--link); }
.pkg-roi { font-family: var(--font-heading); font-size: 2.6rem; font-weight: 700; line-height: 1.05; margin-top: .35rem; background: linear-gradient(135deg, var(--primary), var(--primary-deep)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pkg-roi-label { font-size: .78rem; color: var(--muted); margin-bottom: .9rem; }
.pkg-line { display: flex; gap: .55rem; align-items: flex-start; font-size: .88rem; padding: .3rem 0; border-top: 1px dashed var(--border); }
.pkg-icon { flex: 0 0 18px; color: var(--link); text-align: center; }
.pkg-hint { font-size: .82rem; color: var(--muted); font-style: italic; margin-top: .75rem; font-family: var(--font-accent, inherit); }
.pkg-check { position: absolute; top: .75rem; right: .75rem; width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; transform: scale(0); transition: transform .25s cubic-bezier(.2, 1.4, .5, 1); }
.pkg-card.is-selected .pkg-check { transform: scale(1); }

/* Amount */
.amount-box { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.4rem; box-shadow: var(--shadow-soft); }
.amount-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.amount-field { display: flex; align-items: baseline; gap: .35rem; flex: 1; min-width: 220px; }
.amount-symbol { font-family: var(--font-heading); font-size: 1.8rem; color: var(--link); }
.amount-input { border: 0; border-bottom: 2px solid var(--border); background: transparent; width: 100%; font-family: var(--font-heading); font-size: 2.4rem; font-weight: 700; color: var(--text); padding: .1rem 0; outline: none; transition: border-color .2s ease; }
.amount-input:focus { border-bottom-color: var(--primary); }
.amount-currency { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.amount-currency button { border: 0; background: transparent; color: var(--muted); padding: .4rem .9rem; font-size: .82rem; font-weight: 500; cursor: pointer; }
.amount-currency button.is-on { background: var(--primary); color: var(--on-primary); }
.amount-slider { width: 100%; margin: 1.1rem 0 .25rem; accent-color: var(--primary); height: 6px; }
.amount-ends { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); }
.amount-chips { display: flex; gap: .5rem; flex-wrap: wrap; margin: .9rem 0; }
.chip { border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 999px; padding: .35rem .9rem; font-size: .85rem; cursor: pointer; transition: var(--transition); }
.chip:hover { border-color: var(--primary); }
.chip.is-on { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.amount-balance { font-size: .9rem; color: var(--muted); }
.amount-warning { margin-top: .75rem; padding: .65rem .9rem; border-radius: 10px; background: rgba(220, 53, 69, .1); border: 1px solid rgba(220, 53, 69, .35); color: #c0392b; font-size: .9rem; }

/* Summary */
.summary-box { background: linear-gradient(160deg, rgba(var(--primary-rgb), .12), rgba(var(--primary-rgb), .03)); border: 1px solid rgba(var(--primary-rgb), .35); border-radius: var(--radius); padding: 1.3rem 1.4rem; }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .9rem; }
.summary-item { background: var(--card-bg); border-radius: 12px; padding: .75rem .9rem; display: flex; flex-direction: column; gap: .2rem; }
.summary-label { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.summary-value { font-family: var(--font-heading); font-size: 1.1rem; }
.summary-value.gold { color: var(--link); font-size: 1.4rem; }
.timeline { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); margin: 1.4rem 0 .5rem; }
.timeline-track { position: absolute; left: 12.5%; right: 12.5%; top: 9px; height: 2px; background: linear-gradient(90deg, var(--primary), rgba(var(--primary-rgb), .3)); }
.timeline-point { text-align: center; position: relative; font-size: .78rem; }
.timeline-point .dot { display: block; width: 18px; height: 18px; border-radius: 50%; background: var(--card-bg); border: 3px solid var(--primary); margin: 0 auto .35rem; position: relative; z-index: 1; }
.timeline-point em { display: block; font-style: normal; font-weight: 600; }
.timeline-point small { color: var(--muted); }
.summary-note { font-size: .88rem; color: var(--muted); margin: .75rem 0 0; }
.trade-submit { width: 100%; font-family: var(--font-heading); letter-spacing: .06em; text-transform: uppercase; padding: .95rem; }

/* Confirmation */
.trade-done { max-width: 640px; margin: 2rem auto; text-align: center; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 2.5rem 1.75rem; box-shadow: var(--shadow-soft); }
.trade-done-seal { color: var(--primary); margin-bottom: 1rem; }
.seal-ring { stroke-dasharray: 190; stroke-dashoffset: 190; animation: sealRing .8s ease forwards; }
.seal-tick { stroke-dasharray: 40; stroke-dashoffset: 40; animation: sealTick .5s ease .6s forwards; }
@keyframes sealRing { to { stroke-dashoffset: 0; } }
@keyframes sealTick { to { stroke-dashoffset: 0; } }
.trade-done-title { font-family: var(--font-heading); font-size: 1.5rem; }
.trade-done-steps { text-align: left; display: grid; gap: .6rem; }
.trade-done-steps div { display: flex; gap: .75rem; align-items: flex-start; font-size: .92rem; }
.trade-done-steps span { flex: 0 0 24px; height: 24px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; }
@media (max-width: 575px) {
    .timeline { grid-template-columns: repeat(2, 1fr); row-gap: 1rem; }
    .timeline-track { display: none; }
    .amount-input { font-size: 1.9rem; }
    .pkg-roi { font-size: 2.1rem; }
}

/* ---------- Admin placeholders helper ---------- */
.placeholders summary { cursor: pointer; color: var(--link); }
.placeholders code { background: rgba(var(--primary-rgb), .12); color: var(--link); padding: 0 .3rem; border-radius: 4px; }

/* ---------- Password show or hide ---------- */
.pw-field { position: relative; }
.pw-field input { padding-right: 2.9rem; }
.pw-toggle { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); font-size: 1.05rem; line-height: 1; padding: .35rem .5rem; border-radius: 8px; cursor: pointer; opacity: .75; }
.pw-toggle:hover, .pw-toggle.is-on { opacity: 1; color: var(--link); }
.pw-toggle.is-on::after { content: ''; position: absolute; left: 50%; top: 50%; width: 1.3rem; height: 2px; background: currentColor; transform: translate(-50%, -50%) rotate(-40deg); }

/* ---------- Identity verification ---------- */
.kyc-prompt { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; background: rgba(var(--primary-rgb), .1); border: 1px solid rgba(var(--primary-rgb), .35); border-radius: var(--radius); padding: .85rem 1.1rem; margin-bottom: 1.25rem; }
.kyc-prompt.is-pending { background: rgba(13, 110, 253, .08); border-color: rgba(13, 110, 253, .3); }
.kyc-prompt.is-declined { background: rgba(220, 53, 69, .08); border-color: rgba(220, 53, 69, .3); }
.kyc-prompt-icon { font-size: 1.5rem; }
.kyc-state { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem 1.5rem; box-shadow: var(--shadow-soft); }
.kyc-state-icon { width: 54px; height: 54px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: .75rem; background: rgba(var(--primary-rgb), .15); color: var(--link); }
.kyc-approved .kyc-state-icon { background: rgba(46, 158, 106, .18); color: var(--success); }
.kyc-details { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.25rem; margin: 0; font-size: .92rem; }
.kyc-details dt { color: var(--muted); font-weight: 500; }
.kyc-details dd { margin: 0; }
.kyc-form .kyc-section { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem 1.3rem; margin-bottom: 1rem; }
.kyc-section-head { display: flex; align-items: center; gap: .7rem; font-weight: 600; margin-bottom: 1rem; }
.kyc-section-head span { width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; }
.kyc-drop { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .25rem; padding: 1.4rem 1rem; border: 2px dashed var(--border); border-radius: var(--radius); cursor: pointer; transition: var(--transition); height: 100%; }
.kyc-drop:hover { border-color: var(--primary); background: rgba(var(--primary-rgb), .05); }
.kyc-drop.has-file { border-style: solid; border-color: var(--success); background: rgba(46, 158, 106, .08); }
.kyc-drop-icon { font-size: 1.6rem; }
.kyc-drop small { color: var(--muted); }
.kyc-drop em { font-style: normal; font-size: .82rem; color: var(--success); word-break: break-all; }
.kyc-review.is-pending { border-left: 4px solid var(--primary); }
.kyc-thumb { display: inline-flex; flex-direction: column; align-items: center; gap: .25rem; text-decoration: none; color: var(--muted); }
.kyc-thumb img { width: 150px; height: 100px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.kyc-thumb-pdf { width: 150px; height: 100px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); font-weight: 700; }
@media (max-width: 575px) { .kyc-details { grid-template-columns: 1fr; gap: .1rem; } .kyc-details dt { margin-top: .5rem; } }

/* ---------- Referral sponsor line on registration ---------- */
.sponsor-line { display: flex; align-items: center; gap: .6rem; margin-top: .55rem; font-size: .9rem; }
.sponsor-avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-deep)); color: var(--on-primary); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--font-heading); flex: 0 0 30px; }
.sponsor-avatar.is-unknown { background: var(--surface-2); color: var(--muted); }

/* ---------- Payment methods admin ---------- */
.gw-section-title { font-family: var(--font-heading); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--link); border-bottom: 1px dashed var(--border); padding-bottom: .3rem; margin-top: .25rem; }
.gw-card { border-left: 4px solid var(--border); }
.gw-card:has(.badge.bg-success) { border-left-color: var(--success); }
.gw-card:has(.badge.bg-warning) { border-left-color: #f0ad4e; }
.pay-details { display: grid; grid-template-columns: max-content 1fr auto; gap: .45rem .9rem; align-items: center; font-size: .92rem; }
.pay-details .k { color: var(--muted); }
.pay-details .v { font-family: var(--font-body); font-weight: 600; word-break: break-all; }

/* ---------- Native select lists follow the theme (no white list on dark) ---------- */
[data-theme="dark"] { color-scheme: dark; }
[data-theme="light"] { color-scheme: light; }
[data-theme="dark"] select.form-select, [data-theme="dark"] select.form-select option, [data-theme="dark"] select.form-select optgroup { background-color: #0F3534; color: #F1EBDC; }
[data-theme="dark"] select.form-select option:checked { background-color: rgba(214, 178, 94, .35); color: #F1EBDC; }
[data-theme="light"] select.form-select option { background-color: #FFFFFF; color: #1B2422; }

/* ---------- Payout method panel ---------- */
.payout-method { display: flex; gap: .9rem; align-items: center; background: rgba(var(--primary-rgb), .1); border: 1px solid rgba(var(--primary-rgb), .35); border-radius: var(--radius); padding: .85rem 1rem; }
.payout-method-icon { width: 42px; height: 42px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.2rem; flex: 0 0 42px; }

/* ---------- Compensation plan ---------- */
.stat-card-gold { background: linear-gradient(135deg, rgba(var(--primary-rgb), .22), rgba(var(--primary-rgb), .06)); border-color: rgba(var(--primary-rgb), .45); }
.goal { padding: .9rem 1rem; border: 1px solid var(--border); border-radius: 12px; }
.goal-prestige { border-color: rgba(var(--primary-rgb), .5); background: rgba(var(--primary-rgb), .07); }
.club-tile { border: 1px dashed var(--border); border-radius: 12px; padding: .7rem .9rem; height: 100%; }
.club-tile.is-held { border-style: solid; border-color: var(--success, #2E9E6A); background: rgba(46, 158, 106, .08); }
.opp-hero { padding: 5rem 0 3.5rem; background: radial-gradient(circle at 50% 0%, rgba(var(--primary-rgb), .22), transparent 60%); }
.opp-hero.has-image { position: relative; background-size: cover; background-position: center; color: #F1EBDC; padding: 6.5rem 0 5rem; }
.opp-hero.has-image::before { content: ''; position: absolute; inset: 0; background: rgba(8, 36, 35, var(--opp-overlay, .6)); }
.opp-hero.has-image .container { position: relative; }
.opp-hero.has-image .opp-intro { color: #DCD5C3; }
.opp-block .about-body img { max-width: 100%; height: auto; border-radius: var(--radius); }
.opp-block .about-body iframe { max-width: 100%; border-radius: var(--radius); }
.opp-block .about-body { line-height: 1.7; }
.opp-title { font-family: var(--font-heading); font-size: clamp(1.8rem, 4vw, 2.8rem); letter-spacing: .04em; }
.opp-intro { max-width: 760px; margin: 1rem auto 1.5rem; color: var(--muted); font-size: 1.05rem; }
.opp-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem 1.4rem; text-align: center; height: 100%; box-shadow: var(--shadow-soft); }
.opp-num { font-family: var(--font-heading); font-size: 2.2rem; font-weight: 700; color: var(--link); }
.opp-num.small { font-size: 1.4rem; }
.opp-reward { margin-top: .75rem; padding: .55rem .8rem; border-radius: 10px; background: rgba(var(--primary-rgb), .12); font-weight: 600; font-size: .92rem; }
.opp-table th { font-family: var(--font-heading); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.opp-prestige { margin-top: 1rem; padding: 1.1rem 1.4rem; border-radius: var(--radius); background: linear-gradient(135deg, var(--primary), var(--primary-deep)); color: var(--on-primary); font-weight: 600; }

/* ---------- Catalogue ---------- */
.cat-hero { padding: 4rem 0 1.5rem; background: radial-gradient(circle at 50% 0%, rgba(var(--primary-rgb), .2), transparent 60%); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem; }
.cat-card { display: block; text-decoration: none; color: inherit; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-soft); transition: transform .25s ease, box-shadow .25s ease; }
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.cat-img { aspect-ratio: 1 / 1; background: #fff; overflow: hidden; }
.cat-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.cat-card:hover .cat-img img { transform: scale(1.04); }
.cat-caption { padding: .7rem .9rem; font-family: var(--font-heading); font-size: .92rem; letter-spacing: .04em; text-align: center; border-top: 1px solid var(--border); }
.cat-lightbox { position: fixed; inset: 0; z-index: 2000; background: rgba(5, 20, 20, .94); display: flex; align-items: center; justify-content: center; }
.cat-lightbox figure { margin: 0; max-width: min(92vw, 1100px); max-height: 90vh; text-align: center; }
.cat-lightbox img { max-width: 100%; max-height: 82vh; border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); background: #fff; }
.cat-lightbox figcaption { color: #F1EBDC; margin-top: .75rem; font-family: var(--font-heading); letter-spacing: .06em; }
.cat-lightbox button { position: absolute; border: 0; background: rgba(255, 255, 255, .1); color: #F1EBDC; width: 46px; height: 46px; border-radius: 50%; font-size: 1.7rem; line-height: 1; cursor: pointer; }
.cat-lightbox button:hover { background: var(--primary); color: var(--on-primary); }
.cat-close { top: 1rem; right: 1rem; } .cat-prev { left: 1rem; top: 50%; transform: translateY(-50%); } .cat-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.cat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.cat-strip .cat-card .cat-img { aspect-ratio: 1 / 1; }
.cat-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.cat-admin-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card-bg); padding: .6rem; cursor: grab; }
.cat-admin-item.is-dragging { opacity: .45; }
.cat-admin-item.is-hidden .cat-admin-img img { opacity: .4; filter: grayscale(1); }
.cat-admin-img { position: relative; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: #fff; margin-bottom: .5rem; }
.cat-admin-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-handle { position: absolute; top: .4rem; right: .5rem; background: rgba(0, 0, 0, .5); color: #fff; border-radius: 6px; padding: 0 .35rem; font-size: .9rem; }
@media (max-width: 575px) { .cat-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; } .cat-lightbox button { width: 38px; height: 38px; } }

/* ---------- Saved payout address ---------- */
.saved-address { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; border: 1px solid rgba(46, 158, 106, .5); background: rgba(46, 158, 106, .08); border-radius: var(--radius); padding: .8rem 1rem; }
/* ---------- Dashboard referral card ---------- */
.ref-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.2rem; box-shadow: var(--shadow-soft); }

/* ---------- Catalogue as a shop ---------- */
.cat-card { cursor: default; }
.cat-img { display: block; position: relative; }
.cat-badge { position: absolute; top: .6rem; left: .6rem; background: var(--primary); color: var(--on-primary); font-family: var(--font-heading); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; padding: .25rem .55rem; border-radius: 999px; }
.cat-badge-out { background: #6c757d; color: #fff; left: auto; right: .6rem; }
.cat-body { padding: .75rem .9rem .9rem; border-top: 1px solid var(--border); }
.cat-name { font-family: var(--font-heading); font-size: .95rem; letter-spacing: .03em; }
.cat-size { font-size: .8rem; color: var(--muted); }
.cat-price-row { display: flex; justify-content: space-between; align-items: center; margin-top: .45rem; gap: .5rem; }
.cat-price { font-weight: 700; color: var(--link); font-size: 1.05rem; }
.cat-lb-name { font-family: var(--font-heading); font-size: 1.1rem; }
.cat-lb-meta { color: #C9C0AA; font-size: .9rem; margin-top: .2rem; }
.cat-lb-desc { color: #F1EBDC; font-size: .9rem; max-width: 640px; margin: .4rem auto 0; opacity: .85; }
.buy-box { position: relative; background: var(--card-bg); color: var(--text); border-radius: var(--radius); padding: 1.5rem; width: min(94vw, 520px); max-height: 92vh; overflow: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.buy-box .cat-close { top: .6rem; right: .6rem; width: 36px; height: 36px; font-size: 1.3rem; background: var(--surface-2); color: var(--text); }

/* ---------- Admin member links ---------- */
.member-link { font-weight: 600; text-decoration: none; white-space: nowrap; }
.member-link:hover { text-decoration: underline; }

/* ---------- Wallet choice ---------- */
.wallet-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; }
.wallet-option { display: flex; flex-direction: column; gap: .15rem; border: 1px solid var(--border); border-radius: 12px; padding: .7rem .8rem; cursor: pointer; position: relative; background: var(--card-bg); }
.wallet-option input { position: absolute; top: .7rem; right: .7rem; }
.wallet-option:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(var(--primary-rgb), .35); }
.wallet-option.is-low { opacity: .65; }
.wallet-name { font-size: .82rem; color: var(--muted); padding-right: 1.4rem; }
.wallet-amount { font-weight: 700; font-size: 1.05rem; }
.wallet-cards .stat-card small { display: block; }
.pay-split { font-size: .88rem; border: 1px dashed var(--border); border-radius: 10px; padding: .6rem .8rem; }

/* ---------- Layla, AI assistant ---------- */
.ai-chat { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 1070; font-size: .93rem; }
.ai-bubble { display: inline-flex; align-items: center; gap: .55rem; border: 0; border-radius: 999px; padding: .7rem 1.1rem .7rem .8rem; background: linear-gradient(135deg, var(--primary), var(--primary-deep)); color: var(--on-primary); font-weight: 600; box-shadow: 0 12px 30px rgba(0, 0, 0, .35); cursor: pointer; transition: transform .2s ease, box-shadow .2s ease; }
.ai-bubble:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(0, 0, 0, .4); }
.ai-bubble-icon { display: inline-flex; }
.ai-chat.is-open .ai-bubble { display: none; }
.ai-panel { width: min(380px, calc(100vw - 24px)); height: min(560px, calc(100dvh - 40px)); display: flex; flex-direction: column; background: linear-gradient(var(--card-bg), var(--card-bg)), var(--bg, #0B2423); color: var(--text); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); overflow: hidden; }
.ai-panel[hidden] { display: none; }
.ai-head { display: flex; align-items: center; gap: .65rem; padding: .8rem .9rem; background: linear-gradient(135deg, rgba(var(--primary-rgb), .22), rgba(var(--primary-rgb), .06)); border-bottom: 1px solid var(--border); }
.ai-avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-deep)); color: var(--on-primary); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem; flex: 0 0 38px; }
.ai-head-text { flex: 1; display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.ai-head-text small { color: var(--muted); font-size: .75rem; }
.ai-icon-btn { border: 0; background: transparent; color: var(--muted); width: 32px; height: 32px; border-radius: 8px; font-size: 1.25rem; line-height: 1; cursor: pointer; }
.ai-icon-btn:hover { background: rgba(var(--primary-rgb), .15); color: var(--text); }
.ai-log { flex: 1; overflow-y: auto; padding: .9rem; display: flex; flex-direction: column; gap: .55rem; overscroll-behavior: contain; }
.ai-msg { display: flex; }
.ai-msg .ai-text { max-width: 86%; padding: .55rem .8rem; border-radius: 14px; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; line-height: 1.45; }
.ai-assistant .ai-text { background: rgba(var(--primary-rgb), .1); border: 1px solid rgba(var(--primary-rgb), .22); border-bottom-left-radius: 4px; }
.ai-user { justify-content: flex-end; }
.ai-user .ai-text { background: linear-gradient(135deg, var(--primary), var(--primary-deep)); color: var(--on-primary); border-bottom-right-radius: 4px; }
.ai-msg.is-note .ai-text { background: transparent; border-style: dashed; color: var(--muted); }
.ai-text a { color: var(--link); text-decoration: underline; word-break: break-all; }
.ai-user .ai-text a { color: inherit; }
.ai-typing .ai-text { display: inline-flex; gap: 4px; align-items: center; }
.ai-typing .ai-text span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: ai-dot 1s infinite ease-in-out; }
.ai-typing .ai-text span:nth-child(2) { animation-delay: .15s; }
.ai-typing .ai-text span:nth-child(3) { animation-delay: .3s; }
@keyframes ai-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.ai-form { display: flex; gap: .45rem; padding: .6rem; border-top: 1px solid var(--border); align-items: flex-end; }
.ai-form textarea { flex: 1; resize: none; border: 1px solid var(--border); border-radius: 12px; padding: .55rem .75rem; background: var(--surface-2, transparent); color: var(--text); font: inherit; max-height: 120px; outline: none; }
.ai-form textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(var(--primary-rgb), .25); }
.ai-send { width: 42px; height: 42px; flex: 0 0 42px; border: 0; border-radius: 12px; background: var(--primary); color: var(--on-primary); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ai-send:disabled { opacity: .5; cursor: default; }
.ai-foot { font-size: .7rem; color: var(--muted); padding: 0 .9rem .6rem; text-align: center; }
@media (max-width: 575px) {
    .ai-chat { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
    .ai-bubble-label { display: none; }
    .ai-bubble { padding: .8rem; }
    .ai-chat.is-open { top: 0; left: 0; right: 0; bottom: auto; height: 100%; height: 100dvh; }
    .ai-panel { width: 100%; height: 100%; max-height: none; border-radius: 0; border: 0; box-shadow: none; }
    .ai-head { padding-top: calc(.8rem + env(safe-area-inset-top, 0px)); }
    .ai-head .ai-icon-btn { width: 40px; height: 40px; }
    .ai-foot { padding-bottom: calc(.6rem + env(safe-area-inset-bottom, 0px)); }
    .ai-form textarea { font-size: 16px; }
}
/* Page behind the open chat on phones: no scrolling, no zoom jumps */
html.ai-locked, html.ai-locked body { overflow: hidden; overscroll-behavior: none; }
@media print { .ai-chat { display: none !important; } }
/* Admin transcript */
.ai-transcript { display: flex; flex-direction: column; gap: .8rem; }
.ai-line { padding: .6rem .8rem; border-radius: 10px; border: 1px solid var(--border); }
.ai-line-user { background: rgba(var(--primary-rgb), .06); }
.ai-line.is-flagged { border-color: var(--danger); }
.ai-line-who { font-weight: 600; font-size: .85rem; margin-bottom: .2rem; }
.ai-line-text { white-space: normal; }

/* ---------- No sideways scrolling on phones ----------
   Anything wider than the screen makes phones treat the page as wider than the screen, which
   pushes fixed buttons (the chat bubble, the bottom bars) partly off the edge. */
html { overflow-x: hidden; }
body { overflow-x: hidden; overflow-x: clip; }
@media (max-width: 575px) {
    .row.g-5, .row.gx-5 { --bs-gutter-x: 1.5rem; }
}

/* ---------- About Us page ---------- */
.about-wrap { max-width: 980px; }
.about-body { color: var(--text); line-height: 1.7; }
.about-body h2 { font-family: var(--font-heading); font-size: 1.45rem; margin: 0 0 .9rem; }
.about-intro { max-width: 780px; margin: 0 auto 2.5rem; text-align: center; }
.about-lead { font-size: 1.15rem; }
.about-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin-bottom: 2.75rem; }
.about-card, .amb-card, .about-hq { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius, 16px); padding: 1.6rem 1.5rem; }
.about-kicker, .amb-country { color: var(--primary); text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 600; margin-bottom: .45rem; }
.about-role { color: var(--muted); margin-top: -.5rem; }
.about-section { margin-bottom: 2.75rem; }
.about-timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid rgba(var(--primary-rgb), .45); }
.about-timeline li { position: relative; padding: 0 0 1.3rem 1.5rem; display: flex; flex-direction: column; }
.about-timeline li:last-child { padding-bottom: 0; }
.about-timeline li::before { content: ""; position: absolute; left: -7px; top: .45rem; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .18); }
.about-when { font-weight: 700; color: var(--primary); }
.about-what { color: var(--text); }
.amb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.amb-name { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 700; margin-top: .35rem; }
.amb-role { color: var(--muted); font-size: .88rem; }
.about-hq { text-align: center; }
.about-arabic { font-size: 1.6rem; font-family: "Noto Naskh Arabic", "Amiri", "Segoe UI", Tahoma, serif; color: var(--primary); margin-bottom: .6rem; }
.about-model { color: var(--muted); font-size: .9rem; margin-bottom: 0; }
.footer-address { color: var(--muted); }
@media (max-width: 767px) {
    .about-grid, .amb-grid { grid-template-columns: 1fr; }
    .about-intro { text-align: left; }
    .about-lead { font-size: 1.05rem; }
}

/* ---------- People on a support ticket ---------- */
.ticket-person { display: inline-flex; align-items: flex-start; gap: .4rem; padding: .35rem .6rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2, transparent); line-height: 1.25; }
.ticket-person-name { font-size: .72rem; color: var(--muted); }

/* ---------- Live sessions ---------- */
.live-card { background: var(--card-bg); border: 1px solid rgba(var(--primary-rgb), .45); border-radius: var(--radius, 16px); padding: 1rem 1.25rem; }
.live-room { overflow: hidden; }
.live-room-bar { display: flex; align-items: center; gap: .5rem; padding: .6rem .9rem; border-bottom: 1px solid var(--border); }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: #e05252; box-shadow: 0 0 0 4px rgba(224, 82, 82, .25); animation: live-pulse 1.4s infinite; }
@keyframes live-pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(224, 82, 82, .25); } 50% { box-shadow: 0 0 0 7px rgba(224, 82, 82, .08); } }
.live-room-frame { position: relative; height: min(75vh, 720px); min-height: 420px; background: #000; }
.live-room-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 767px) {
    .live-room-frame { height: calc(100dvh - 190px); min-height: 360px; }
    .live-room-bar { flex-wrap: wrap; }
}
