/* ==========================================================================
   Nyxware — unified design system (2026 refresh)
   Single source of truth for color, spacing, elevation, motion and
   components used across the landing page and the personal cabinet.
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.006em;
    animation: pageIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pageIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

::selection {
    background: var(--accent-glow-strong);
    color: var(--text-main);
}

:focus-visible {
    outline: 2px solid var(--accent-from);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Кастомный скроллбар */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--input-border);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-label);
    background-clip: padding-box;
}
* { scrollbar-width: thin; scrollbar-color: var(--input-border) transparent; }

/* --------------------------------------------------------------------------
   Design tokens
   -------------------------------------------------------------------------- */
body.theme-light {
    --bg-main: linear-gradient(160deg, #fbfcfe 0%, #f2f4f9 100%);
    --bg-section: #ffffff;
    --card-bg: #ffffff;
    --sidebar-bg: #ffffff;
    --input-bg: #f8f9fc;

    --text-main: #1e2433;
    --text-soft: #47506b;
    --text-muted: #6b7385;
    --text-label: #7a8296;
    --text-date: #9aa2b5;

    --border-color: rgba(30, 36, 51, 0.07);
    --row-border: #eef0f5;
    --input-border: #e6e9f2;

    --accent-from: #6366f1;
    --accent-mid: #7c5cf0;
    --accent-to: #8b5cf6;
    --accent-glow: rgba(99, 102, 241, 0.28);
    --accent-glow-strong: rgba(99, 102, 241, 0.45);
    --accent-soft-bg: rgba(99, 102, 241, 0.08);

    --success-bg: #e9f9f1;
    --success-text: #12915a;
    --warning-bg: #fef6e7;
    --warning-text: #b7791f;
    --danger-bg: #fdedec;
    --danger-text: #c0392b;

    --shadow-sm: 0 2px 10px rgba(30, 36, 51, 0.05);
    --shadow-md: 0 10px 30px rgba(30, 36, 51, 0.08);
    --shadow-lg: 0 20px 55px rgba(30, 36, 51, 0.12);
    --shadow-glow: 0 10px 30px var(--accent-glow);

    --glow-1: rgba(99, 102, 241, 0.10);
    --glow-2: rgba(139, 92, 246, 0.08);
}

body.theme-dark {
    /* Surfaces sit close to the page background (like the near-white cards on
       near-white bg in light theme) so blocks read as airy/transparent rather
       than raised opaque boxes. Definition comes from the hairline border, not
       from a big luminance jump. */
    --bg-main: linear-gradient(160deg, #0f1117 0%, #0b0c12 100%);
    --bg-section: #14161d;
    --card-bg: #14161d;
    --sidebar-bg: transparent;
    --input-bg: #191c24;

    --text-main: #f2f4f9;
    --text-soft: #b8c0d4;
    --text-muted: #8891a6;
    --text-label: #7d859b;
    --text-date: #6b7389;

    --border-color: rgba(255, 255, 255, 0.08);
    --row-border: rgba(255, 255, 255, 0.06);
    --input-border: rgba(255, 255, 255, 0.10);

    --accent-from: #6d8bff;
    --accent-mid: #8b7dfb;
    --accent-to: #a78bfa;
    --accent-glow: rgba(109, 139, 255, 0.3);
    --accent-glow-strong: rgba(109, 139, 255, 0.5);
    --accent-soft-bg: rgba(109, 139, 255, 0.12);

    --success-bg: rgba(16, 185, 129, 0.14);
    --success-text: #3ddc9b;
    --warning-bg: rgba(245, 158, 11, 0.14);
    --warning-text: #f4b657;
    --danger-bg: rgba(239, 68, 68, 0.14);
    --danger-text: #f5786a;

    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 55px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 10px 30px var(--accent-glow);

    --glow-1: rgba(109, 139, 255, 0.16);
    --glow-2: rgba(167, 139, 250, 0.13);
}

body.theme-light, body.theme-dark {
    background: var(--bg-main);
    color: var(--text-main);
}

.gradient-text,
.accent-text {
    background: linear-gradient(135deg, var(--accent-from) 0%, var(--accent-to) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --------------------------------------------------------------------------
   Ambient background glow — soft blurred blobs behind hero-like sections.
   Pure CSS, no images, theme-aware, decorative (pointer-events: none).
   -------------------------------------------------------------------------- */
.bg-glow {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.bg-glow::before,
.bg-glow::after {
    content: '';
    position: absolute;
    width: 46vw;
    height: 46vw;
    max-width: 620px;
    max-height: 620px;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.35;
}
.bg-glow::before {
    top: -14%;
    left: -8%;
    background: var(--glow-1);
}
.bg-glow::after {
    bottom: -18%;
    right: -8%;
    background: var(--glow-2);
}

/* --------------------------------------------------------------------------
   Icons
   -------------------------------------------------------------------------- */
.nx-icon { display: block; flex-shrink: 0; }

.icon-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-soft);
    box-shadow: none;
    flex-shrink: 0;
}
.icon-chip-sm { width: 30px; height: 30px; border-radius: 8px; }
.icon-chip-md { width: 38px; height: 38px; }
.icon-chip-lg { width: 48px; height: 48px; border-radius: 12px; }

.icon-chip-soft {
    background: var(--input-bg);
    color: var(--text-soft);
    box-shadow: none;
}

/* --------------------------------------------------------------------------
   Header / top navigation (shared by auth + dashboard pages)
   -------------------------------------------------------------------------- */
.site-header {
    padding: 22px 44px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 2;
}

.site-header .logo {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-main);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.logo-mark {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--accent-from);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: none;
}
.logo-mark .nx-icon { width: 17px; height: 17px; }

.auth-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
    opacity: 0.75;
    cursor: pointer;
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none;
    position: relative;
    padding: 8px 14px;
    border-radius: 10px;
    transition: all 0.2s ease;
}
.auth-btn:hover { opacity: 1; color: var(--danger-text); background: var(--danger-bg); }
.auth-btn-icon { padding: 9px; border-radius: 9px; }

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.credits-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 999px;
    background: var(--accent-soft-bg);
    color: var(--accent-from);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}
.credits-chip .nx-icon { opacity: 0.9; }
@media (max-width: 560px) {
    .credits-chip span { display: none; }
}
.header-user {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    padding: 4px 6px;
    border-radius: 10px;
    border: none;
    background: transparent;
    transition: opacity 0.2s ease;
}
.header-user:hover { opacity: 0.75; }
.avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    font-size: 13px;
}
.header-user-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}
.header-user-name {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}
.header-user-role {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-label);
}
.header-user-role.is-pro { color: var(--success-text); }
@media (max-width: 560px) {
    .header-user-meta { display: none; }
    .header-user { padding: 5px; }
}

/* --------------------------------------------------------------------------
   Dashboard layout: sidebar + content
   -------------------------------------------------------------------------- */
.layout {
    flex: 1;
    display: flex;
    min-height: 0;
}

.sidebar {
    width: 196px;
    flex-shrink: 0;
    background: transparent;
    border-right: 1px solid var(--border-color);
    padding: 26px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 10px 20px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--row-border);
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--accent-soft-bg);
    color: var(--accent-from);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: none;
    text-transform: uppercase;
}

.sidebar-user-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-user-role {
    font-size: 12px;
    color: var(--text-label);
    font-weight: 500;
}

.sidebar h3 {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-label);
    margin-bottom: 10px;
    padding: 0 12px;
    font-weight: 700;
}

.sidebar a {
    padding: 9px 13px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-soft);
    font-weight: 600;
    font-size: 13.5px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
}

.sidebar a .nx-icon { opacity: 0.75; transition: opacity 0.2s ease; }

.sidebar a:hover {
    background: var(--input-bg);
    color: var(--text-main);
}
.sidebar a:hover .nx-icon { opacity: 1; }

.sidebar a.active {
    color: var(--accent-from);
    background: var(--accent-soft-bg);
    box-shadow: none;
}
.sidebar a.active .nx-icon { opacity: 1; }

.sidebar a.locked {
    opacity: 0.42;
    cursor: not-allowed;
    pointer-events: none;
    justify-content: space-between;
}

.sidebar a.locked .lock-chip {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent-from);
    background: var(--accent-soft-bg);
    padding: 3px 7px;
    border-radius: 999px;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 14px;
}

.main-content {
    flex: 1;
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
}

@media (max-width: 900px) {
    .site-header { padding: 18px 20px; }
    .layout { flex-direction: column; }
    .sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 14px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    .sidebar h3, .sidebar-user { display: none; }
    .sidebar a { flex: 1 1 40%; justify-content: center; }
    .main-content { padding: 24px 20px; }
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: none;
    padding: 22px 24px;
    transition: border-color 0.2s ease;
    position: relative;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 16px;
}
.card-header h2 { margin-bottom: 2px; }
.card-header .card-subtitle { font-size: 12.5px; color: var(--text-label); font-weight: 500; }

.card h2 {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-main);
}

.card > h2 { margin-bottom: 14px; }

/* Two-column panel layout so related info sits side by side instead of
   stacking into a long scroll. align-items: start (not stretch) so a card
   with more content doesn't force a shorter sibling to stretch and leave a
   dead gap at its bottom. */
.panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    align-items: start;
}

.card p { color: var(--text-muted); line-height: 1.6; }

/* --------------------------------------------------------------------------
   Identity header (profile page)
   -------------------------------------------------------------------------- */
/* Transparent page header — reads as a title, not another boxed card. */
.identity-card {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 2px 4px 4px;
}
.identity-avatar {
    width: 54px;
    height: 54px;
    border-radius: 15px;
    background: var(--accent-soft-bg);
    color: var(--accent-from);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 22px;
    flex-shrink: 0;
    box-shadow: none;
    text-transform: uppercase;
}
.identity-info { flex: 1; min-width: 180px; }
.identity-name {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.identity-meta { color: var(--text-label); font-size: 13.5px; margin-top: 3px; }

/* --------------------------------------------------------------------------
   Stat tiles (reused on landing page + profile dashboard)
   -------------------------------------------------------------------------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}
.stat-tile {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.stat-tile-top { display: flex; align-items: center; justify-content: space-between; }
.stat-tile-number {
    font-size: 23px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-main);
}
.stat-tile-label { font-size: 12px; color: var(--text-label); font-weight: 600; }

/* --------------------------------------------------------------------------
   Rows (info / referral lists)
   -------------------------------------------------------------------------- */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid var(--row-border);
    font-size: 14px;
    gap: 20px;
}
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--text-label); display: flex; align-items: center; gap: 8px; font-weight: 500; }
.info-label .nx-icon { opacity: 0.55; }
.info-value { color: var(--text-main); font-weight: 600; text-align: right; }
.info-value-row { display: flex; align-items: center; gap: 8px; }

.referral-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--row-border);
    font-size: 14.5px;
    gap: 14px;
}
.referral-row:last-child { border-bottom: none; }
.referral-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.referral-name { font-weight: 700; color: var(--text-main); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.referral-date { color: var(--text-date); font-size: 13px; flex-shrink: 0; }

/* --------------------------------------------------------------------------
   Empty state
   -------------------------------------------------------------------------- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    padding: 30px 10px;
    color: var(--text-muted);
}
.empty-state .icon-chip { margin-bottom: 4px; }
.empty-state p { max-width: 360px; }

/* --------------------------------------------------------------------------
   Badges
   -------------------------------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
}
.badge-success { background: var(--success-bg); color: var(--success-text); }
.badge-warning { background: var(--warning-bg); color: var(--warning-text); }
.badge-danger { background: var(--danger-bg); color: var(--danger-text); }
.badge-neutral { background: var(--input-bg); color: var(--text-label); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 9px;
    border: 1px solid transparent;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    font-family: inherit;
    position: relative;
}
.btn svg { width: 15px; height: 15px; }

.btn-primary {
    background: var(--accent-from);
    color: #fff;
    box-shadow: none;
}
.btn-primary:hover { background: var(--accent-mid); }

.btn-secondary {
    background: transparent;
    color: var(--text-soft);
    border: 1px solid var(--input-border);
}
.btn-secondary:hover { border-color: var(--accent-from); color: var(--accent-from); }

.btn-block { width: 100%; }

.btn-sm {
    padding: 7px 13px;
    font-size: 12.5px;
    font-weight: 600;
    border-radius: 8px;
    gap: 6px;
}
.btn-sm svg { width: 14px; height: 14px; }

.btn-ghost {
    background: none;
    border: none;
    color: var(--accent-from);
    padding: 8px 0;
    font-weight: 600;
    position: relative;
}
.btn-ghost:hover { color: var(--accent-mid); }

.btn-subtle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: none;
    border: none;
    color: var(--text-label);
    padding: 8px 0;
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    transition: color 0.2s ease;
}
.btn-subtle:hover { color: var(--accent-from); }

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 9px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.btn-icon:hover { border-color: var(--accent-from); color: var(--accent-from); }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.form-group { margin-bottom: 22px; }

.form-group label,
label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-label);
    margin-bottom: 8px;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    border-radius: 9px;
    border: 1px solid var(--input-border);
    font-size: 14px;
    color: var(--text-main);
    background: var(--input-bg);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%237a8296' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
    padding-right: 42px;
    cursor: pointer;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-from);
    box-shadow: 0 0 0 3px var(--accent-soft-bg);
}

/* Custom range slider */
input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: var(--input-border);
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-from);
    box-shadow: 0 0 0 3px var(--card-bg);
    cursor: pointer;
    transition: transform 0.15s ease;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.1); }
input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border: none;
    border-radius: 50%;
    background: var(--accent-from);
    box-shadow: 0 0 0 3px var(--card-bg);
    cursor: pointer;
}
input[type="range"]::-moz-range-track {
    height: 6px;
    border-radius: 999px;
    background: var(--input-border);
}

/* Toggle switch (replaces plain yes/no <select> for booleans) */
.switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.switch-row label { margin-bottom: 0; }
.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 27px;
    flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch-track {
    position: absolute;
    inset: 0;
    background: var(--input-border);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.25s ease;
}
.switch-track::before {
    content: '';
    position: absolute;
    width: 21px;
    height: 21px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.switch input:checked + .switch-track {
    background: var(--accent-from);
}
.switch input:checked + .switch-track::before {
    transform: translateX(19px);
}
.switch input:focus-visible + .switch-track {
    outline: 2px solid var(--accent-from);
    outline-offset: 3px;
}

/* Segmented control (radio-style button group) */
.segmented {
    display: inline-flex;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 9px;
    padding: 3px;
    gap: 2px;
}
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
    margin: 0;
    padding: 7px 14px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-soft);
    cursor: pointer;
    transition: all 0.2s ease;
}
.segmented input:checked + label {
    background: var(--card-bg);
    color: var(--accent-from);
    box-shadow: none;
}

.form-row { display: flex; flex-direction: column; margin-bottom: 20px; }
.form-row:last-child { margin-bottom: 0; }
.slider-values { margin-top: 10px; font-size: 13.5px; color: var(--text-label); font-weight: 600; }

/* --------------------------------------------------------------------------
   Settings page: subsections, hero toggle, value pills, smooth collapse
   -------------------------------------------------------------------------- */

/* Labeled group of fields inside a card, so a long list of controls reads as
   deliberate sections instead of one undifferentiated pile. */
.settings-subsection + .settings-subsection {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--row-border);
}
.subsection-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--text-label);
    margin-bottom: 18px;
}
.subsection-label .nx-icon { opacity: 0.6; }

/* A form-row label with a leading icon, for a more finished look than bare
   text labels. */
.field-label {
    display: flex;
    align-items: center;
    gap: 8px;
}
.field-label .nx-icon { opacity: 0.55; flex-shrink: 0; }

/* Master on/off switch for a card's whole section -- visually distinct from
   a regular field so it reads as a gate, not just another row. */
.hero-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    margin: -4px -4px 18px;
    border-radius: 12px;
    background: var(--accent-soft-bg);
}
.hero-toggle-label { display: flex; align-items: center; gap: 12px; }
.hero-toggle-label .icon-chip { background: var(--card-bg); }
.hero-toggle-text strong { display: block; font-size: 14.5px; font-weight: 700; color: var(--text-main); }
.hero-toggle-text span { display: block; font-size: 12px; color: var(--text-label); font-weight: 500; margin-top: 1px; }

/* Slider/segmented value readout as a small pill instead of bare text, to
   match the visual weight of badges/pills used elsewhere on the site. */
.value-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--accent-from);
    background: var(--accent-soft-bg);
    padding: 4px 11px;
    border-radius: 999px;
    margin-top: 11px;
    width: fit-content;
}
.field-hint { margin-top: 8px; font-size: 12.5px; color: var(--text-label); line-height: 1.5; }

/* Smooth expand/collapse for sections gated by a master toggle (Aim,
   Fast Zoom delay). max-height is a generous cap, not the real height --
   CSS can't transition to `auto`, so this is the standard workaround. */
.collapsible {
    max-height: 1400px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, margin-top 0.35s ease;
}
.collapsible.is-collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0 !important;
    pointer-events: none;
}

.additional-links { margin-top: 24px; text-align: center; }
.additional-links a {
    color: var(--accent-from);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.25s ease;
}
.additional-links a:hover { color: var(--accent-to); }

/* --------------------------------------------------------------------------
   Auth pages (login / register) — centered card
   -------------------------------------------------------------------------- */
.auth-shell {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    position: relative;
    overflow: hidden;
}

.auth-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    width: 100%;
    max-width: 420px;
    animation: authCardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 1;
}

@keyframes authCardIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-card h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-align: center;
    margin-bottom: 8px;
    color: var(--text-main);
}

.auth-card > p {
    color: var(--text-muted);
    font-size: 15px;
    text-align: center;
    margin-bottom: 34px;
}

.form-group small {
    display: block;
    color: var(--text-date);
    font-size: 12.5px;
    margin-top: 6px;
}

/* --------------------------------------------------------------------------
   Misc utility
   -------------------------------------------------------------------------- */
.placeholder { color: var(--text-muted); font-size: 15px; line-height: 1.7; }
