/* ==================== Reset & Variables ==================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface2: #f0f2f7;
    --surface3: #e8ebf2;
    --border: #dfe3ec;
    --text: #1a1d27;
    --text-mid: #3d4259;
    --text-muted: #6b7194;
    --text-faint: #9ba2bf;
    --accent: #6c5ce7;
    --accent-hover: #5a4bd1;
    --accent-soft: rgba(108,92,231,.08);
    --accent-glow: rgba(108,92,231,.2);
    --success: #00b894;
    --success-soft: rgba(0,184,148,.1);
    --danger: #e74c3c;
    --danger-soft: rgba(231,76,60,.08);
    --warning: #f39c12;
    --warning-soft: rgba(243,156,18,.08);
    --info: #0984e3;
    --info-soft: rgba(9,132,227,.08);
    --gradient: linear-gradient(135deg, #6c5ce7, #a29bfe);
    --gradient2: linear-gradient(135deg, #6c5ce7 0%, #e17bed 100%);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --shadow: 0 1px 3px rgba(26,29,39,.05), 0 1px 2px rgba(26,29,39,.03);
    --shadow-md: 0 4px 16px rgba(26,29,39,.08);
    --shadow-lg: 0 8px 32px rgba(26,29,39,.1);
    --transition: .2s cubic-bezier(.4,0,.2,1);
}

[data-theme="dark"] {
    --bg: #0d0f18;
    --surface: #171a27;
    --surface2: #1e2235;
    --surface3: #262b42;
    --border: #2a2f47;
    --text: #eaecf4;
    --text-mid: #c0c4d8;
    --text-muted: #8189ad;
    --text-faint: #505878;
    --accent: #a29bfe;
    --accent-hover: #b5afff;
    --accent-soft: rgba(162,155,254,.1);
    --accent-glow: rgba(162,155,254,.15);
    --success: #55efc4;
    --success-soft: rgba(85,239,196,.1);
    --danger: #ff7675;
    --danger-soft: rgba(255,118,117,.1);
    --warning: #ffeaa7;
    --warning-soft: rgba(255,234,167,.08);
    --info: #74b9ff;
    --info-soft: rgba(116,185,255,.1);
    --gradient: linear-gradient(135deg, #a29bfe, #6c5ce7);
    --gradient2: linear-gradient(135deg, #a29bfe 0%, #e17bed 100%);
    --shadow: 0 1px 3px rgba(0,0,0,.2), 0 1px 2px rgba(0,0,0,.15);
    --shadow-md: 0 4px 16px rgba(0,0,0,.25);
    --shadow-lg: 0 8px 32px rgba(0,0,0,.35);
}

/* ==================== Base ==================== */
html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    transition: background var(--transition), color var(--transition);
}
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); text-decoration: none; }

/* ==================== Navbar ==================== */
.navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 1.5rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    background: rgba(255,255,255,.85);
    transition: background var(--transition), border-color var(--transition);
}
[data-theme="dark"] .navbar {
    background: rgba(23,26,39,.85);
}
.navbar-brand {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: .6rem;
    letter-spacing: -.01em;
}
.navbar-brand svg { flex-shrink: 0; }
.navbar-brand:hover { text-decoration: none; color: var(--accent); }
.navbar-nav {
    display: flex;
    align-items: center;
    gap: .15rem;
    list-style: none;
}
.navbar-nav a {
    padding: .5rem .9rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: .875rem;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
    display: flex;
    align-items: center;
    gap: .4rem;
}
.navbar-nav a svg { width: 18px; height: 18px; opacity: .6; flex-shrink: 0; }
.navbar-nav a:hover,
.navbar-nav a.active {
    background: var(--accent-soft);
    color: var(--accent);
    text-decoration: none;
}
.navbar-nav a.active svg,
.navbar-nav a:hover svg { opacity: 1; }
.navbar-actions {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.container {
    max-width: 920px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ==================== Cards ==================== */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: background var(--transition), border-color var(--transition);
}
.card + .card { margin-top: 1rem; }
.card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: .85rem;
    color: var(--text);
}

/* ==================== Buttons ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .6rem 1.3rem;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    letter-spacing: -.01em;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 2px 8px var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 4px 16px var(--accent-glow); color: #fff; transform: translateY(-1px); }
.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text-mid);
}
.btn-outline:hover { background: var(--surface2); border-color: var(--accent); color: var(--accent); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success {
    background: linear-gradient(135deg, #00b894, #55efc4);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,184,148,.2);
}
.btn-success:hover { box-shadow: 0 4px 16px rgba(0,184,148,.3); transform: translateY(-1px); }
.btn-sm { padding: .4rem .9rem; font-size: .8rem; }
.btn-lg { padding: .8rem 2rem; font-size: .95rem; }
.btn-block { width: 100%; }

/* ==================== Forms ==================== */
.form-group { margin-bottom: 1.1rem; }
.form-group label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-mid);
    margin-bottom: .4rem;
    letter-spacing: .02em;
}
.form-control {
    width: 100%;
    padding: .65rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .9rem;
    background: var(--surface);
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ==================== Alerts ==================== */
.alert {
    padding: .85rem 1.1rem;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    font-weight: 500;
}
.alert-error { background: var(--danger-soft); color: var(--danger); border: 1px solid rgba(231,76,60,.15); }
.alert-success { background: var(--success-soft); color: var(--success); border: 1px solid rgba(0,184,148,.15); }
.alert-info { background: var(--info-soft); color: var(--info); border: 1px solid rgba(9,132,227,.15); }
.alert-warning { background: var(--warning-soft); color: var(--warning); border: 1px solid rgba(243,156,18,.15); }

[data-theme="dark"] .alert-error { color: #ff7675; }
[data-theme="dark"] .alert-success { color: #55efc4; }
[data-theme="dark"] .alert-info { color: #74b9ff; }
[data-theme="dark"] .alert-warning { color: #ffeaa7; }

/* ==================== Status badges ==================== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .7rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .01em;
}
.status-active { background: var(--success-soft); color: var(--success); }
.status-expired { background: var(--danger-soft); color: var(--danger); }
.status-pending { background: var(--warning-soft); color: var(--warning); }

/* ==================== Subscription link ==================== */
.sub-link {
    background: var(--surface2);
    border: 1.5px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: .7rem 1rem;
    font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
    font-size: .78rem;
    word-break: break-all;
    cursor: pointer;
    position: relative;
    transition: all var(--transition);
    color: var(--text-mid);
}
.sub-link:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* ==================== Setup / Device grid ==================== */
.device-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}
.device-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 1rem;
    text-align: center;
    font-weight: 600;
    font-size: .9rem;
    color: var(--text);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
}
.device-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    transform: translateY(-2px);
    color: var(--accent);
}
.device-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.device-icon svg { width: 28px; height: 28px; }
.device-icon--android { background: linear-gradient(135deg, #a8e6cf, #dcedc1); color: #2d6a4f; }
.device-icon--ios { background: linear-gradient(135deg, #a29bfe, #ddd6fe); color: #5b21b6; }
.device-icon--windows { background: linear-gradient(135deg, #74b9ff, #a2d2ff); color: #1e3a5f; }
.device-icon--macos { background: linear-gradient(135deg, #b8b8b8, #e0e0e0); color: #333; }
.device-icon--linux { background: linear-gradient(135deg, #ffeaa7, #fdcb6e); color: #6c4f00; }
.device-icon--browser { background: linear-gradient(135deg, #fd79a8, #fab1a0); color: #6c1a35; }
[data-theme="dark"] .device-icon--android { background: linear-gradient(135deg, #1a5c35, #2d6a4f); color: #a8e6cf; }
[data-theme="dark"] .device-icon--ios { background: linear-gradient(135deg, #3c2a7e, #5b21b6); color: #ddd6fe; }
[data-theme="dark"] .device-icon--windows { background: linear-gradient(135deg, #1a3a5c, #1e4976); color: #74b9ff; }
[data-theme="dark"] .device-icon--macos { background: linear-gradient(135deg, #333, #555); color: #ccc; }
[data-theme="dark"] .device-icon--linux { background: linear-gradient(135deg, #6c4f00, #8a6500); color: #ffeaa7; }
[data-theme="dark"] .device-icon--browser { background: linear-gradient(135deg, #6c1a35, #8a2249); color: #fd79a8; }

.device-label { font-size: .85rem; }

/* ==================== Auth pages ==================== */
.auth-container {
    max-width: 440px;
    margin: 3rem auto;
    padding: 0 1rem;
}
.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.25rem;
    box-shadow: var(--shadow-lg);
}
.auth-title {
    font-size: 1.4rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1.5rem;
    letter-spacing: -.02em;
}
.auth-separator {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1.25rem 0;
    color: var(--text-faint);
    font-size: .8rem;
    font-weight: 500;
}
.auth-separator::before, .auth-separator::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}
.auth-footer {
    text-align: center;
    margin-top: 1.35rem;
    font-size: .85rem;
    color: var(--text-muted);
}

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

/* Hero */
.dash-hero {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    text-align: center;
    margin-bottom: 1.25rem;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.dash-hero-glow {
    position: absolute;
    top: -60%;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
    opacity: .6;
}
.dash-hero-content { position: relative; z-index: 1; }
.dash-hero-status {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem .9rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    margin-bottom: .75rem;
}
.dash-hero-status--on {
    background: var(--success-soft);
    color: var(--success);
}
.dash-hero-status--off {
    background: var(--surface2);
    color: var(--text-faint);
}
.dash-hero-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.dash-hero-dot--on {
    background: var(--success);
    box-shadow: 0 0 6px var(--success);
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 6px var(--success); }
    50% { box-shadow: 0 0 14px var(--success); }
}
.dash-hero-dot--off { background: var(--text-faint); }
.dash-hero-title {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -.03em;
    margin-bottom: .35rem;
}
.dash-hero-sub {
    font-size: .9rem;
    color: var(--text-muted);
    margin-bottom: .5rem;
}
.dash-time-badge {
    display: inline-block;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 700;
    font-size: .85rem;
    padding: .4rem 1.15rem;
    border-radius: 999px;
    letter-spacing: -.01em;
}

/* Key card */
.dash-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.25rem;
    transition: background var(--transition), border-color var(--transition);
}
.dash-key-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1rem;
}
.dash-key-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dash-key-icon svg { width: 20px; height: 20px; }
.dash-key-title { font-weight: 700; font-size: .95rem; }
.dash-key-hint { font-size: .78rem; color: var(--text-muted); margin-top: .1rem; }

/* Action cards */
.dash-actions {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    margin-bottom: 1.5rem;
}
.dash-action-card {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: 1rem 1.25rem;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
    color: var(--text);
    text-decoration: none;
}
.dash-action-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    transform: translateY(-1px);
}
.dash-action-card--accent {
    background: var(--accent-soft);
    border-color: rgba(108,92,231,.25);
}
[data-theme="dark"] .dash-action-card--accent { border-color: rgba(162,155,254,.25); }
.dash-action-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dash-action-icon svg { width: 22px; height: 22px; }
.dash-action-icon--setup { background: rgba(9,132,227,.1); color: #0984e3; }
.dash-action-icon--renew { background: var(--accent-soft); color: var(--accent); }
.dash-action-icon--ref { background: rgba(225,123,237,.1); color: #e17bed; }
.dash-action-icon--trial { background: var(--success-soft); color: var(--success); }
.dash-action-icon--plans { background: rgba(243,156,18,.1); color: #f39c12; }
[data-theme="dark"] .dash-action-icon--setup { background: rgba(116,185,255,.1); color: #74b9ff; }
[data-theme="dark"] .dash-action-icon--plans { background: rgba(255,234,167,.08); color: #ffeaa7; }
.dash-action-body { flex: 1; min-width: 0; }
.dash-action-title { font-weight: 600; font-size: .9rem; }
.dash-action-desc { font-size: .78rem; color: var(--text-muted); margin-top: .15rem; }
.dash-action-arrow { width: 16px; height: 16px; color: var(--text-faint); flex-shrink: 0; transition: color var(--transition); }
.dash-action-card:hover .dash-action-arrow { color: var(--accent); }

/* Features grid */
.dash-features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .85rem;
}
.dash-feat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1rem;
    text-align: center;
    transition: all var(--transition);
}
.dash-feat:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.dash-feat-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: var(--accent-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: .6rem;
}
.dash-feat-icon svg { width: 20px; height: 20px; color: var(--accent); }
.dash-feat-title { font-size: .85rem; font-weight: 700; margin-bottom: .2rem; }
.dash-feat-desc { font-size: .75rem; color: var(--text-muted); }

@media (max-width: 768px) {
    .dash-features-grid { grid-template-columns: repeat(2, 1fr); }
    .dash-hero { padding: 2rem 1.25rem; }
    .dash-hero-title { font-size: 1.3rem; }
}
@media (max-width: 480px) {
    .dash-features-grid { grid-template-columns: 1fr 1fr; gap: .6rem; }
    .dash-feat { padding: 1rem .75rem; }
}

/* TG link banner */
.tg-banner {
    display: flex;
    align-items: center;
    gap: .85rem;
    margin-bottom: 1.25rem;
    padding: .85rem 1.15rem;
    background: var(--info-soft);
    border: 1px solid rgba(9,132,227,.15);
    border-radius: var(--radius-sm);
    font-size: .875rem;
}
[data-theme="dark"] .tg-banner { border-color: rgba(116,185,255,.15); }
.tg-banner-text { flex: 1; color: var(--text-mid); }

/* ==================== Plans page ==================== */
.plans-page { max-width: 560px; margin: 0 auto; }
.plans-heading {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: .3rem;
    letter-spacing: -.02em;
}
.plans-sub { font-size: .85rem; color: var(--text-muted); margin-bottom: 1.25rem; }

.plans-list {
    display: flex;
    flex-direction: column;
    gap: .7rem;
}
.plan-row {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    transition: all var(--transition);
}
.plan-row:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.plan-row--popular { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-soft); }
.plan-badge {
    position: absolute;
    top: -.55rem;
    right: 1rem;
    background: var(--gradient);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    padding: .15rem .7rem;
    border-radius: 999px;
    letter-spacing: .02em;
}
.plan-row-info { flex: 1; min-width: 0; }
.plan-row-name { font-weight: 700; font-size: .95rem; }
.plan-row-days { font-size: .8rem; color: var(--text-muted); }
.plan-row-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--accent);
    white-space: nowrap;
    text-align: right;
    letter-spacing: -.02em;
}
.plan-row-old {
    font-size: .8rem;
    color: var(--text-faint);
    text-decoration: line-through;
    display: block;
}
.plan-row-actions {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    flex-shrink: 0;
}

@media (max-width: 520px) {
    .plan-row { flex-wrap: wrap; gap: .6rem; }
    .plan-row-info { flex-basis: auto; }
    .plan-row-price { margin-left: auto; }
    .plan-row-actions { flex-basis: 100%; flex-direction: row; flex-wrap: wrap; }
    .plan-row-actions .btn { flex: 1; }
    .dash-features { gap: 1rem; }
    .dash-links { grid-template-columns: 1fr; }
}

/* ==================== Referral ==================== */
.ref-hero {
    text-align: center;
    padding: 1.5rem 0;
}
.ref-hero-icon {
    width: 64px; height: 64px;
    border-radius: 16px;
    background: var(--gradient2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: .75rem;
}
.ref-hero-icon svg { width: 32px; height: 32px; color: #fff; }
.ref-hero-title { font-size: 1.15rem; font-weight: 700; margin: .25rem 0; }
.ref-hero-desc { font-size: .85rem; color: var(--text-muted); }

.ref-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .85rem;
    margin-bottom: 1rem;
}
.ref-stat {
    text-align: center;
    padding: 1.15rem 1rem;
    background: var(--surface2);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.ref-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -.02em;
}
.ref-stat-label {
    font-size: .78rem;
    color: var(--text-muted);
    margin-top: .25rem;
    font-weight: 500;
}

/* ==================== Theme toggle ==================== */
.theme-toggle {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .45rem .55rem;
    cursor: pointer;
    color: var(--text-mid);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}
.theme-toggle:hover { background: var(--surface3); border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }

/* ==================== Banner ==================== */
.banner {
    padding: 1.15rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.banner-referral {
    background: var(--accent-soft);
    border: 1px solid rgba(108,92,231,.12);
}
[data-theme="dark"] .banner-referral { border-color: rgba(162,155,254,.12); }
.banner-warning { background: var(--warning-soft); border: 1px solid rgba(243,156,18,.12); }
.banner-icon { font-size: 1.5rem; flex-shrink: 0; }
.banner-body { flex: 1; }
.banner-body strong { display: block; font-size: .95rem; }
.banner-body p { font-size: .85rem; color: var(--text-muted); margin-top: .2rem; }

/* ==================== Setup instruction page ==================== */
.setup-back {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 1rem;
    transition: color var(--transition);
}
.setup-back svg { width: 16px; height: 16px; }
.setup-back:hover { color: var(--accent); text-decoration: none; }

.setup-steps { counter-reset: step; }
.setup-steps li {
    position: relative;
    padding: .6rem 0 .6rem 2.5rem;
    list-style: none;
    line-height: 1.65;
    font-size: .9rem;
}
.setup-steps li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0; top: .55rem;
    width: 1.75rem; height: 1.75rem;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: .8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.setup-steps li + li { border-top: 1px solid var(--border); }

/* ==================== Responsive ==================== */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
    padding: .35rem;
    border-radius: var(--radius-xs);
}
.mobile-menu-btn svg { width: 22px; height: 22px; }

@media (max-width: 768px) {
    .mobile-menu-btn { display: flex; align-items: center; }
    .navbar-nav { display: none; }
    .navbar-nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        padding: .5rem;
        box-shadow: var(--shadow-lg);
        z-index: 99;
    }
    .navbar-nav.open a { display: flex; padding: .75rem 1rem; }
    .ref-stats { grid-template-columns: 1fr; }
    .container { padding: 1.25rem 1rem; }
    .device-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .device-grid { grid-template-columns: 1fr 1fr; gap: .75rem; }
    .device-card { padding: 1.15rem .75rem; }
}

/* ==================== Utility ==================== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: .85rem; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.hidden { display: none; }

/* ==================== Payment modal ==================== */
dialog::backdrop { background: rgba(0,0,0,.5); backdrop-filter: blur(4px); }
dialog {
    border: none;
    border-radius: var(--radius);
    padding: 0;
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    width: calc(100% - 2rem);

    position: fixed;
    inset: 0;
    margin: auto;
}
dialog[open] { animation: modal-in .2s ease-out; }

@keyframes modal-in {
    from { opacity: 0; transform: translateY(8px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-body { padding: 1.5rem; }
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}
.modal-title { font-size: 1.1rem; font-weight: 700; }
.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-faint);
    padding: .25rem;
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    transition: all var(--transition);
}
.modal-close:hover { color: var(--text); background: var(--surface2); }

.pay-methods {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.pay-method-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1rem;
    background: var(--surface2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text);
    font-size: .9rem;
    font-weight: 500;
    transition: all var(--transition);
}
.pay-method-btn:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}
.pay-method-btn svg { margin-left: auto; color: var(--text-faint); flex-shrink: 0; }
.pay-method-btn:hover svg { color: var(--accent); }
.pay-method-emoji { font-size: 1.25rem; flex-shrink: 0; width: 2rem; text-align: center; }
.pay-method-name { flex: 1; text-align: left; }
