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

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ─────────────────────────────────────────
   THEME VARIABLES
───────────────────────────────────────── */

[data-theme="dark"] {
    --bg-1:      #0a0a0a;
    --bg-2:      #111111;
    --bg-3:      #1a1a1a;
    --bg-4:      #222222;
    --border:    rgba(255,255,255,0.06);
    --border-md: rgba(255,255,255,0.11);
    --text-1:    #f0ede8;
    --text-2:    #8a8480;
    --text-3:    #4a4540;
    --accent:    #f97316;
    --accent-h:  #fb8c3a;
    --accent-bg: rgba(249,115,22,0.1);
    --accent-bd: rgba(249,115,22,0.22);
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.7);
    --shadow-md: 0 4px 24px rgba(0,0,0,0.8);
    --check:     #4ade80;
    --cross:     #3a3530;
    --toggle-bg: #1a1a1a;
    --toggle-bd: rgba(255,255,255,0.09);
    --code-bg:   #0f0f0f;
}

[data-theme="light"] {
    --bg-1:      #f5f0e8;
    --bg-2:      #fdfaf4;
    --bg-3:      #ede8de;
    --bg-4:      #e2dbd0;
    --border:    rgba(0,0,0,0.07);
    --border-md: rgba(0,0,0,0.13);
    --text-1:    #18140e;
    --text-2:    #5c5248;
    --text-3:    #a09585;
    --accent:    #e8630a;
    --accent-h:  #d05808;
    --accent-bg: rgba(232,99,10,0.08);
    --accent-bd: rgba(232,99,10,0.2);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 24px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
    --check:     #16a34a;
    --cross:     #c8bfb0;
    --toggle-bg: #e2dbd0;
    --toggle-bd: rgba(0,0,0,0.1);
    --code-bg:   #ede8de;
}

/* ─────────────────────────────────────────
   BASE
───────────────────────────────────────── */

html {
    scroll-behavior: smooth;
    /* Fixed navbar outer height (padding + row); keep admin / mobile menu in sync */
    --navbar-height: 72px;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg-1);
    color: var(--text-1);
    line-height: 1.65;
    font-size: 16px;
    transition: background 0.25s, color 0.25s;
    overflow-x: hidden;
}

.container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 28px;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb { background: var(--border-md); border-radius: 99px; }

/* ─────────────────────────────────────────
   TYPOGRAPHY HELPERS
───────────────────────────────────────── */

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.75rem, 3.5vw, 2.6rem);
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -0.025em;
    color: var(--text-1);
    margin-bottom: 14px;
}

.section-desc {
    font-size: 1rem;
    color: var(--text-2);
    line-height: 1.75;
    max-width: 540px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header .section-desc { margin: 0 auto; }

.accent-text { color: var(--accent); }

/* ─────────────────────────────────────────
   BUTTONS
───────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 0.18s, color 0.18s, border-color 0.18s, box-shadow 0.18s;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.btn-primary:hover {
    background: var(--accent-h);
    border-color: var(--accent-h);
}

.btn-ghost {
    background: transparent;
    color: var(--text-2);
    border-color: var(--border-md);
}
.btn-ghost:hover {
    color: var(--text-1);
    border-color: var(--border-md);
    background: var(--bg-3);
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent-bd);
}
.btn-outline:hover {
    background: var(--accent-bg);
    border-color: var(--accent);
}

.btn-lg { padding: 12px 28px; font-size: 0.95rem; }

/* ─────────────────────────────────────────
   NAVBAR
───────────────────────────────────────── */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 18px 0;
    transition: padding 0.25s, background 0.25s, border-color 0.25s;
}

.navbar.scrolled {
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    padding: 13px 0;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    position: relative;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
    color: var(--text-1);
}

.nav-logo .nav-brand-img {
    display: block;
    height: auto;
    max-height: 40px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    flex-shrink: 0;
}

.logo-mark {
    width: 30px;
    height: 30px;
    background: var(--accent);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
}

.logo-accent { color: var(--accent); }

.nav-links {
    display: flex;
    list-style: none;
    gap: 2px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-link {
    text-decoration: none;
    color: var(--text-2);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 6px 13px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}

.nav-link:hover { color: var(--text-1); background: var(--bg-3); }
.nav-link.active { color: var(--accent); background: var(--accent-bg); }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

/* Theme Toggle */
.theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--toggle-bd);
    background: var(--toggle-bg);
    color: var(--text-2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    flex-shrink: 0;
}

.theme-toggle:hover { color: var(--text-1); border-color: var(--border-md); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    margin-left: 4px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-2);
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─────────────────────────────────────────
   HERO
───────────────────────────────────────── */

.hero {
    padding: 130px 0 90px;
    background: var(--bg-1);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 13px;
    background: var(--accent-bg);
    border: 1px solid var(--accent-bd);
    border-radius: 6px;
    font-size: 0.775rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 22px;
    width: fit-content;
}

.badge-dot {
    width: 5px;
    height: 5px;
    background: var(--accent);
    border-radius: 50%;
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.4rem, 4.5vw, 3.6rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text-1);
    margin-bottom: 18px;
}

.hero-desc {
    font-size: 1.05rem;
    color: var(--text-2);
    line-height: 1.75;
    margin-bottom: 34px;
    max-width: 460px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Hero Visual */
.hero-visual {
    position: relative;
}

.app-window {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.app-titlebar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 11px 14px;
    background: var(--bg-3);
    border-bottom: 1px solid var(--border);
}

.win-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-md);
}

.win-title {
    font-size: 0.775rem;
    font-weight: 600;
    color: var(--text-3);
    margin-left: 4px;
}

.app-body {
    padding: 18px;
}

.prompt-block {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 13px 15px;
    margin-bottom: 14px;
}

.prompt-tag {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 7px;
}

.prompt-text {
    font-size: 0.85rem;
    color: var(--text-2);
    line-height: 1.55;
}

.prompt-cursor {
    display: inline-block;
    width: 2px;
    height: 13px;
    background: var(--accent);
    vertical-align: text-bottom;
    margin-left: 2px;
    animation: blink 1.1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.gen-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.gen-input {
    flex: 1;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 9px 13px;
    color: var(--text-2);
    font-size: 0.825rem;
    font-family: inherit;
    outline: none;
}

.gen-btn {
    background: var(--accent);
    border: none;
    border-radius: 7px;
    padding: 9px 17px;
    color: #fff;
    font-size: 0.825rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}

.gen-btn:hover { background: var(--accent-h); }

.img-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.img-cell {
    aspect-ratio: 1;
    border-radius: 7px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.img-cell--filled .img-cell-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.img-cell .img-tag {
    position: relative;
    z-index: 1;
}

[data-theme="dark"] .img-cell:nth-child(1) { background: #1a1510; }
[data-theme="dark"] .img-cell:nth-child(2) { background: #161210; }
[data-theme="dark"] .img-cell:nth-child(3) { background: #1c1510; }
[data-theme="dark"] .img-cell:nth-child(4) { background: #141210; }

[data-theme="light"] .img-cell:nth-child(1) { background: #e8e0d0; }
[data-theme="light"] .img-cell:nth-child(2) { background: #ddd5c5; }
[data-theme="light"] .img-cell:nth-child(3) { background: #e4dcc8; }
[data-theme="light"] .img-cell:nth-child(4) { background: #dad2c0; }

.img-tag {
    margin: 7px;
    background: rgba(0,0,0,0.35);
    color: rgba(255,255,255,0.8);
    font-size: 0.65rem;
    font-weight: 600;
    padding: 3px 7px;
    border-radius: 4px;
}

[data-theme="light"] .img-tag { background: rgba(0,0,0,0.18); }

/* ─────────────────────────────────────────
   FEATURES
───────────────────────────────────────── */

.features {
    padding: 90px 0;
    background: var(--bg-2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.feature-card {
    background: var(--bg-2);
    padding: 28px 26px;
    transition: background 0.18s;
}

.feature-card:hover { background: var(--bg-3); }

.feature-icon {
    font-size: 1.4rem;
    margin-bottom: 14px;
    display: block;
}

.feature-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 8px;
    font-family: 'Space Grotesk', sans-serif;
}

.feature-desc {
    font-size: 0.845rem;
    color: var(--text-2);
    line-height: 1.6;
}

/* ─────────────────────────────────────────
   WHY US
───────────────────────────────────────── */

.why-us {
    padding: 90px 0;
    background: var(--bg-1);
}

.why-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.why-list {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.why-item {
    display: flex;
    gap: 14px;
    padding: 18px 20px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: border-color 0.18s;
}

.why-item:hover { border-color: var(--border-md); }

.why-check {
    width: 22px;
    height: 22px;
    background: var(--accent-bg);
    border: 1px solid var(--accent-bd);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 800;
}

.why-text h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 4px;
}

.why-text p {
    font-size: 0.845rem;
    color: var(--text-2);
    line-height: 1.55;
}

/* Metric panel */
.why-visual {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 100px;
}

.metric-card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 22px 24px;
}

.metric-title {
    font-size: 0.775rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-3);
    margin-bottom: 16px;
}

.metric-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.metric-row:last-child { margin-bottom: 0; }

.metric-name {
    font-size: 0.825rem;
    color: var(--text-2);
    width: 80px;
    flex-shrink: 0;
}

.metric-bar-bg {
    flex: 1;
    height: 6px;
    background: var(--bg-3);
    border-radius: 99px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.metric-bar-fill {
    height: 100%;
    border-radius: 99px;
    background: var(--accent);
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.metric-bar-fill.dim { background: var(--border-md); }

.metric-pct {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-1);
    width: 32px;
    text-align: right;
    flex-shrink: 0;
}

.stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.stat-cell {
    background: var(--bg-2);
    padding: 18px 16px;
    text-align: center;
}

.stat-cell-num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--accent);
    display: block;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-cell-label {
    font-size: 0.75rem;
    color: var(--text-3);
    font-weight: 500;
}

/* ─────────────────────────────────────────
   PRICING
───────────────────────────────────────── */

.pricing {
    padding: 90px 0;
    background: var(--bg-2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

/* Tabs */
.pricing-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 44px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.pricing-tab-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 22px;
    border-radius: 7px;
    border: none;
    background: transparent;
    color: var(--text-2);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, color 0.15s;
}

.tab-icon { font-size: 0.95rem; }

.pricing-tab-btn.active {
    background: var(--bg-2);
    color: var(--accent);
    border: 1px solid var(--accent-bd);
    box-shadow: var(--shadow-sm);
}

.pricing-tab-btn:not(.active):hover {
    color: var(--text-1);
    background: var(--bg-4);
}

.pricing-panel { display: block; }
.pricing-panel.hidden { display: none; }

/* Grids */
.pricing-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 780px;
    margin: 0 auto;
}

.pricing-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

/* Cards */
.pricing-card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    position: relative;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.pricing-card:hover {
    border-color: var(--border-md);
    box-shadow: var(--shadow-md);
}

.pricing-card.popular {
    border-color: var(--accent-bd);
    background: var(--bg-2);
}

.pricing-card.popular:hover { border-color: var(--accent); }

.popular-badge {
    position: absolute;
    top: -12px;
    left: 24px;
    background: var(--accent);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 5px;
    letter-spacing: 0.04em;
}

.plan-name {
    font-size: 0.775rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text-3);
    margin-bottom: 8px;
}

.plan-price {
    display: flex;
    align-items: baseline;
    gap: 2px;
    margin-bottom: 5px;
    line-height: 1;
}

.price-currency {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-2);
    align-self: flex-start;
    margin-top: 6px;
}

.price-amount {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text-1);
    letter-spacing: -0.03em;
}

.price-period {
    font-size: 0.85rem;
    color: var(--text-3);
    margin-left: 2px;
}

.plan-bonus-days {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(74,222,128,0.1);
    border: 1px solid rgba(74,222,128,0.25);
    color: #22c55e;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
    transform: translateY(-1px);
    white-space: nowrap;
}

.plan-desc {
    font-size: 0.845rem;
    color: var(--text-2);
    line-height: 1.55;
    margin-bottom: 20px;
    min-height: 38px;
}

.plan-divider {
    height: 1px;
    background: var(--border);
    margin-bottom: 20px;
}

.plan-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.845rem;
    color: var(--text-2);
}

.plan-features li .check { color: var(--check); font-size: 0.7rem; font-weight: 800; flex-shrink: 0; }
.plan-features li .cross { color: var(--cross); font-size: 0.7rem; font-weight: 800; flex-shrink: 0; }
.plan-features li.disabled { opacity: 0.45; }

.pricing-card .btn { width: 100%; justify-content: center; }

/* Credit specific */
.credit-amount {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.credit-bonus {
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(74,222,128,0.1);
    border: 1px solid rgba(74,222,128,0.25);
    color: #22c55e;
    padding: 2px 8px;
    border-radius: 4px;
}

.credit-cost-table {
    margin-top: 32px;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 26px 28px;
}

.credit-table-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 18px;
    text-align: center;
}

.credit-cost-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.credit-cost-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: border-color 0.15s;
}

.credit-cost-item:hover { border-color: var(--border-md); }

.cost-icon { font-size: 1rem; flex-shrink: 0; }
.cost-label { font-size: 0.825rem; color: var(--text-2); flex: 1; }
.cost-value { font-size: 0.825rem; font-weight: 700; color: var(--accent); white-space: nowrap; }

.pricing-note {
    text-align: center;
    font-size: 0.825rem;
    color: var(--text-3);
    margin-top: 20px;
}

/* ─────────────────────────────────────────
   CTA
───────────────────────────────────────── */

.cta-section {
    padding: 90px 0;
    background: var(--bg-1);
}

.cta-box {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 60px;
    text-align: center;
}

.cta-box .section-title { max-width: 560px; margin: 0 auto 14px; }
.cta-box .section-desc { margin: 0 auto 32px; }

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */

.footer {
    background: var(--bg-2);
    border-top: 1px solid var(--border);
    padding: 56px 0 28px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 44px;
}

.footer-tagline {
    font-size: 0.855rem;
    color: var(--text-2);
    line-height: 1.65;
    margin: 14px 0 20px;
    max-width: 260px;
}

.footer-social {
    display: flex;
    gap: 8px;
}

.social-link {
    width: 34px;
    height: 34px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-2);
    text-decoration: none;
    font-size: 0.875rem;
    transition: border-color 0.15s, color 0.15s;
}

.social-link:hover { border-color: var(--border-md); color: var(--text-1); }

.footer-col h4 {
    font-size: 0.775rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-1);
    margin-bottom: 14px;
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }

.footer-col ul a {
    text-decoration: none;
    color: var(--text-2);
    font-size: 0.855rem;
    transition: color 0.15s;
}

.footer-col ul a:hover { color: var(--text-1); }

.footer-bottom {
    padding-top: 22px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-copy { font-size: 0.825rem; color: var(--text-3); }

.footer-age {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-3);
}

.age-badge {
    background: var(--bg-3);
    border: 1px solid var(--border-md);
    color: var(--text-2);
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.72rem;
}

/* ─────────────────────────────────────────
   NAV USER / DROPDOWN
───────────────────────────────────────── */

.nav-credits {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--text-2);
    padding: 5px 11px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 7px;
}

.nav-credits-icon { font-size: 0.85rem; }

.nav-user { position: relative; }

.nav-user-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 9px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-1);
    transition: border-color 0.15s, background 0.15s;
}

.nav-user-link:hover { border-color: var(--border-md); background: var(--bg-4); }

.nav-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 7px;
    text-decoration: none;
    font-size: 1rem;
    color: var(--text-3);
    flex-shrink: 0;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.nav-logout-btn:hover { background: var(--bg-4); color: #ef4444; border-color: #ef4444; }

.nav-avatar-img,
.nav-avatar-initials {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.nav-avatar-initials {
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-user-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-chevron { font-size: 0.7rem; color: var(--text-3); }

.nav-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 220px;
    background: var(--bg-2);
    border: 1px solid var(--border-md);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    z-index: 500;
    overflow: hidden;
    animation: dropIn 0.15s ease;
}

.nav-dropdown.open { display: block; }

@keyframes dropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.nav-dropdown-header {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-dropdown-name { font-size: 0.875rem; font-weight: 700; color: var(--text-1); }
.nav-dropdown-email { font-size: 0.775rem; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav-dropdown-divider { height: 1px; background: var(--border); }

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 0.875rem;
    color: var(--text-2);
    text-decoration: none;
    transition: background 0.12s, color 0.12s;
}

.nav-dropdown-item:hover { background: var(--bg-3); color: var(--text-1); }
.nav-dropdown-item-danger { color: #f87171; }
.nav-dropdown-item-danger:hover { background: rgba(248,113,113,0.08); color: #f87171; }

/* ─────────────────────────────────────────
   AUTH PAGES
───────────────────────────────────────── */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 24px 60px;
    background: var(--bg-1);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 40px;
    box-shadow: var(--shadow-md);
}

.auth-header { text-align: center; margin-bottom: 28px; }

.auth-logo {
    display: inline-flex;
    margin-bottom: 18px;
}

.auth-logo .logo-mark {
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
    border-radius: 10px;
}

.auth-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 6px;
}

.auth-subtitle { font-size: 0.9rem; color: var(--text-2); }

.auth-form { display: flex; flex-direction: column; gap: 18px; }

.auth-switch {
    text-align: center;
    margin-top: 22px;
    font-size: 0.875rem;
    color: var(--text-2);
}

.auth-switch a { color: var(--accent); text-decoration: none; font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }

/* ─────────────────────────────────────────
   FORM ELEMENTS
───────────────────────────────────────── */

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--text-1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-label-link { font-size: 0.8rem; font-weight: 500; color: var(--accent); text-decoration: none; }
.form-label-link:hover { text-decoration: underline; }

.form-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-3);
    border: 1px solid var(--border-md);
    border-radius: 8px;
    color: var(--text-1);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}

.form-input::placeholder { color: var(--text-3); }
.form-input:focus { border-color: var(--accent); background: var(--bg-2); }
.form-input:disabled { opacity: 0.5; cursor: not-allowed; }
.form-input.is-error { border-color: #f87171; }

.form-textarea { resize: vertical; min-height: 80px; }

.form-error { font-size: 0.8rem; color: #f87171; }
.form-hint { font-size: 0.78rem; color: var(--text-3); }
.form-optional { font-size: 0.75rem; font-weight: 400; color: var(--text-3); }

.form-terms { font-size: 0.8rem; color: var(--text-2); line-height: 1.5; }
.form-terms a { color: var(--accent); text-decoration: none; }
.form-terms a:hover { text-decoration: underline; }

.input-wrap { position: relative; }
.input-wrap .form-input { padding-right: 44px; }

.input-eye {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 42px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.eye-icon { font-size: 0.9rem; opacity: 0.5; transition: opacity 0.15s; }
.input-eye:hover .eye-icon { opacity: 0.9; }

.btn-block { width: 100%; justify-content: center; }

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 18px;
    border: 1px solid transparent;
}

.alert-success {
    background: rgba(74,222,128,0.08);
    border-color: rgba(74,222,128,0.25);
    color: #4ade80;
}

[data-theme="light"] .alert-success {
    background: rgba(22,163,74,0.07);
    border-color: rgba(22,163,74,0.2);
    color: #16a34a;
}

.alert-error {
    background: rgba(248,113,113,0.08);
    border-color: rgba(248,113,113,0.25);
    color: #f87171;
}

[data-theme="light"] .alert-error {
    background: rgba(220,38,38,0.06);
    border-color: rgba(220,38,38,0.2);
    color: #dc2626;
}

/* ─────────────────────────────────────────
   PROFILE PAGE
───────────────────────────────────────── */

.profile-page {
    padding: 100px 0 80px;
    background: var(--bg-1);
    min-height: 100vh;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 28px 32px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 28px;
}

.profile-avatar-wrap { position: relative; flex-shrink: 0; }

.profile-avatar-img,
.profile-avatar-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    object-fit: cover;
}

.profile-avatar-placeholder {
    background: var(--accent);
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-plan-badge {
    position: absolute;
    bottom: -7px;
    right: -7px;
    background: var(--accent);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.profile-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 4px;
}

.profile-meta { font-size: 0.855rem; color: var(--text-2); margin-bottom: 6px; }

.profile-credits { font-size: 0.855rem; color: var(--text-2); }
.credits-num { font-weight: 800; color: var(--accent); }

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.profile-card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px;
}

.profile-card-full { grid-column: 1 / -1; }

.profile-card-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 4px;
}

.profile-card-desc { font-size: 0.825rem; color: var(--text-2); margin-bottom: 22px; }

.profile-subsection-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 6px;
}

.profile-section-sep {
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.profile-pricing-card { margin-top: 20px; }
.profile-pricing-tabs { margin-bottom: 18px; }

/* Avatar Drop Zone */
.avatar-drop {
    border: 2px dashed var(--border-md);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s;
    margin-bottom: 16px;
}

.avatar-drop:hover { border-color: var(--accent); background: var(--accent-bg); }
.avatar-drop.drag-over { border-color: var(--accent); background: var(--accent-bg); }

.avatar-drop-preview {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-3);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
}

.avatar-drop-preview img { width: 100%; height: 100%; object-fit: cover; }

.avatar-drop-initials {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent);
}

.avatar-drop-text { flex: 1; }

.avatar-drop-icon {
    display: block;
    font-size: 1.3rem;
    margin-bottom: 6px;
    color: var(--text-3);
}

.avatar-drop-text p { font-size: 0.875rem; color: var(--text-2); line-height: 1.5; }
.avatar-drop-text strong { color: var(--text-1); }

.avatar-drop-hint { font-size: 0.775rem; color: var(--text-3); margin-top: 4px; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* Profile form row (password section) */
.profile-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 16px;
    align-items: end;
}

.form-group-action { display: flex; align-items: flex-end; }

.profile-form { display: flex; flex-direction: column; gap: 16px; }

.password-card .profile-card-desc { margin-bottom: 14px; }

.security-note {
    margin-bottom: 16px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-3);
    color: var(--text-3);
    font-size: 0.8rem;
    line-height: 1.45;
}

.password-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.payment-modal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(3px);
    z-index: 1200;
    padding: 18px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

.payment-modal-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.payment-modal {
    width: min(560px, 100%);
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)) , var(--bg-2);
    border: 1px solid var(--border-md);
    border-radius: 16px;
    padding: 22px 22px 20px;
    position: relative;
    box-shadow: var(--shadow-lg);
    transform: translateY(8px) scale(0.66);
    transform-origin: center center;
    opacity: 0.96;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ~70% visual scale; keeps long Whop embeds usable on smaller viewports */
.payment-modal-overlay.open .payment-modal {
    transform: translateY(0) scale(0.7);
    opacity: 1;
}

.payment-modal-head {
    display: grid;
    gap: 4px;
    margin-bottom: 12px;
}

.payment-modal-kicker {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
}

.payment-plan-summary-wrap {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 14px;
}

.payment-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-3);
    color: var(--text-2);
    cursor: pointer;
}

.payment-modal-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--text-1);
    margin: 0;
}

.payment-modal-sub {
    color: var(--text-2);
    font-size: 0.87rem;
    margin: 0;
    line-height: 1.45;
}

body.payment-modal-open {
    overflow: hidden;
}

.payment-modal-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.payment-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.payment-step-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-3);
    margin: 0 0 10px;
    letter-spacing: 0.02em;
}

.payment-modal-actions {
    margin-top: 16px;
}

.payment-modal-actions--split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.payment-modal-security-note {
    font-size: 0.78rem;
    color: var(--text-3);
    margin: 10px 0 0;
    line-height: 1.45;
}

.payment-modal-security-note--whop {
    margin: 0 0 8px;
    font-size: 0.74rem;
}

/* Whop checkout: taller on Y-axis so embed + CTA fit without inner scrollbar on typical screens */
.payment-modal.payment-modal--whop-embed {
    width: min(640px, 100%);
    max-height: min(97vh, 1180px);
    min-height: min(78vh, 1020px);
    padding: 14px 20px 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.payment-modal.payment-modal--whop-embed .payment-modal-head {
    margin-bottom: 8px;
}

.payment-modal.payment-modal--whop-embed .payment-plan-summary-wrap {
    margin-bottom: 10px;
    padding: 8px 10px;
}

.payment-modal.payment-modal--whop-embed .payment-modal-head,
.payment-modal.payment-modal--whop-embed .payment-plan-summary-wrap,
.payment-modal.payment-modal--whop-embed .payment-modal-security-note--whop {
    flex-shrink: 0;
}

.payment-modal.payment-modal--whop-embed .payment-modal-stub-msg:not(.hidden) {
    flex-shrink: 0;
}

.payment-modal-billing-note {
    font-size: 0.78rem;
    color: var(--text-3);
    margin: 0 0 12px;
    line-height: 1.45;
}

.payment-modal-plan-meta {
    display: block;
    font-size: 0.85rem;
    color: var(--text-2);
    margin-top: 4px;
    font-weight: 500;
}

.payment-modal-stub-msg {
    text-align: center;
    margin-top: 14px;
    font-size: 0.88rem;
    color: var(--accent);
    line-height: 1.45;
}

.payment-modal-stub-msg.hidden {
    display: none;
}

.payment-modal-processing {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 18px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
}

.payment-modal-processing[hidden] {
    display: none !important;
}

.payment-modal-processing-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: 280px;
    text-align: center;
    padding: 22px 24px;
    border-radius: 14px;
    background: var(--bg-2);
    border: 1px solid var(--border-md);
    box-shadow: var(--shadow-md);
}

.payment-modal-processing-spinner {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid var(--border);
    border-top-color: var(--accent, #f97316);
    animation: checkoutSpin 0.72s linear infinite;
}

.payment-modal-processing-title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--text-1);
    line-height: 1.35;
}

.payment-modal-processing-desc {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-3);
    line-height: 1.45;
}

.payment-combobox {
    position: relative;
    width: 100%;
}

.payment-combobox-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-align: left;
    cursor: pointer;
    min-height: 42px;
    font-family: inherit;
}

.payment-combobox-trigger.is-error {
    border-color: #f87171;
}

.payment-combobox-value {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-1);
    font-size: 0.9rem;
}

.payment-combobox-chevron {
    flex-shrink: 0;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--text-2);
    transition: transform 0.15s ease;
}

.payment-combobox--open .payment-combobox-chevron {
    transform: rotate(180deg);
}

.payment-combobox-list {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 10;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    max-height: min(240px, 42vh);
    overflow-y: auto;
    background: var(--bg-2);
    border: 1px solid var(--border-md);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
}

.payment-combobox-option {
    padding: 10px 14px;
    font-size: 0.88rem;
    color: var(--text-1);
    cursor: pointer;
    outline: none;
}

.payment-combobox-option:hover,
.payment-combobox-option:focus {
    background: var(--bg-3);
}

.payment-combobox-option--active {
    background: rgba(255, 255, 255, 0.06);
}

.payment-combobox-option[aria-selected="true"] {
    color: var(--accent);
    font-weight: 600;
}

.payment-whop-root {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-checkout-email-hint {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-2);
    text-align: center;
}

.payment-checkout-email-hint.hidden {
    display: none;
}

.payment-whop-embed-host {
    min-height: 360px;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-3);
    border: 1px solid var(--border);
}

.payment-whop-embed-host.payment-whop-embed-host--hidden {
    display: none;
    min-height: 0;
    border: none;
    background: transparent;
}

.payment-whop-embed-host:empty:not(.payment-whop-embed-host--hidden) {
    min-height: 120px;
}

.payment-modal .payment-whop-embed-host--modal {
    margin-top: 12px;
}

/* Whop mount: grow on Y; prefer no inner bar — overflow only if viewport is very short */
.payment-modal.payment-modal--whop-embed .payment-whop-embed-host--modal:not(.payment-whop-embed-host--hidden) {
    flex: 1 1 auto;
    min-height: min(62vh, 720px);
    max-height: none;
    margin-top: 6px;
    overflow: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

@media (max-height: 700px) {
    .payment-modal.payment-modal--whop-embed {
        min-height: unset;
        max-height: min(94vh, 1180px);
    }

    .payment-modal.payment-modal--whop-embed .payment-whop-embed-host--modal:not(.payment-whop-embed-host--hidden) {
        min-height: 0;
    }
}

/* Non–whop-embed modals (if any): keep prior scroll cap */
.payment-modal:not(.payment-modal--whop-embed) .payment-whop-embed-host--modal:not(.payment-whop-embed-host--hidden) {
    min-height: min(420px, 55vh);
    max-height: min(78vh, 640px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.payment-whop-loading {
    margin: 0;
    padding: 28px 16px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-2);
}

.payment-whop-error {
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.84rem;
    color: #fecaca;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.payment-whop-error.hidden {
    display: none;
}

.payment-whop-root--checkout-bridge {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: min(100% - 2rem, 28rem);
    pointer-events: none;
}

.payment-whop-root--checkout-bridge .payment-whop-error:not(.hidden) {
    pointer-events: auto;
}

.checkout-pending-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9998;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(5px);
}

body.nexus-checkout-pending .checkout-pending-overlay {
    display: flex;
}

body.nexus-checkout-pending {
    cursor: wait;
}

.checkout-pending-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 28px 32px;
    border-radius: 14px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.checkout-pending-text {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-2);
    text-align: center;
}

.checkout-pending-spinner {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid var(--border);
    border-top-color: var(--accent, #f97316);
    animation: checkoutSpin 0.75s linear infinite;
}

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

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */

@media (max-width: 1024px) {
    .hero-content { grid-template-columns: 1fr; gap: 52px; }
    .hero-visual { display: none; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .why-content { grid-template-columns: 1fr; }
    .why-visual { position: static; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: fixed;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        background: var(--bg-2);
        border-bottom: 1px solid var(--border);
        padding: 16px 20px;
        gap: 2px;
        box-shadow: var(--shadow-md);
    }
    .nav-links.open { display: flex; }
    .nav-actions .btn { display: none; }
    .nav-toggle { display: flex; }
    .pricing-grid-2 { grid-template-columns: 1fr; max-width: 100%; }
    .pricing-grid-3 { grid-template-columns: 1fr; }
    .credit-cost-grid { grid-template-columns: 1fr 1fr; }
    .pricing-tabs { width: 100%; }
    .features-grid { grid-template-columns: 1fr 1fr; }
    .cta-box { padding: 36px 22px; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 520px) {
    .features-grid { grid-template-columns: 1fr; }
    .credit-cost-grid { grid-template-columns: 1fr; }
    .hero-title { font-size: 2.2rem; }
    .auth-card { padding: 28px 20px; }
    .profile-form-row { grid-template-columns: 1fr; }
    .password-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .profile-grid { grid-template-columns: 1fr; }
    .profile-card-full { grid-column: auto; }
    .profile-form-row { grid-template-columns: 1fr; }
    .password-grid { grid-template-columns: 1fr; }
    .profile-header { flex-direction: column; text-align: center; }
    .nav-user-name { display: none; }
    .nav-credits { display: none; }
}

/* ── Admin nav group with sub-links (global — shown on all pages) ── */
.nav-link-admin {
    color: var(--accent) !important;
}

.nav-admin-group {
    position: relative;
    list-style: none;
}

.nav-admin-sub {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-2);
    border: 1px solid var(--border-md);
    border-radius: 10px;
    padding: 6px;
    min-width: 150px;
    box-shadow: var(--shadow-md);
    z-index: 200;
    flex-direction: column;
    gap: 2px;
}

.nav-admin-group:hover .nav-admin-sub { display: flex; }

.nav-admin-sub-item {
    display: block;
    padding: 8px 12px;
    font-size: 0.83rem;
    font-weight: 500;
    color: var(--text-2);
    text-decoration: none;
    border-radius: 7px;
    transition: background 0.12s, color 0.12s;
    white-space: nowrap;
}

.nav-admin-sub-item:hover  { background: var(--bg-3); color: var(--text-1); }
.nav-admin-sub-item.active { color: var(--accent); background: var(--accent-bg); }
