:root,
html[data-theme="light"] {
    /* Pioneer Finance look — indigo primary, cool gray surface */
    --bg-primary: #f4f6f9;
    --bg-secondary: #eef0ff;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f9ff;
    --accent: #5d5fef;
    --accent-light: #7c7ef5;
    --accent-dark: #4b4dd9;
    --accent-blue: #5d5fef;
    --text-primary: #1a1d2e;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --text-on-accent: #ffffff;
    --border: rgba(26, 29, 46, 0.08);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --purple: #5d5fef;
    --gradient-accent: linear-gradient(135deg, #6c63ff 0%, #5d5fef 55%, #4b4dd9 100%);
    --gradient-success: linear-gradient(135deg, #34d399, #059669);
    --shadow-card: 0 8px 30px rgba(93, 95, 239, 0.12);
    --shadow-glow: 0 0 0 1px rgba(93, 95, 239, 0.12);
    --header-bg: rgba(255, 255, 255, 0.90);
    --nav-bg: rgba(255, 255, 255, 0.90);
    --tg-chrome: #f4f6f9;
    --body-bg:
        radial-gradient(1100px 560px at 90% -12%, rgba(93, 95, 239, 0.16), transparent 55%),
        radial-gradient(900px 480px at -10% 20%, rgba(16, 185, 129, 0.08), transparent 50%),
        linear-gradient(180deg, #f4f6f9 0%, #eef0ff 42%, #fafbff 100%);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-press: cubic-bezier(0.25, 1, 0.5, 1);
    --font-display: "Syne", system-ui, sans-serif;
    --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
    --radius-lg: 16px;
    --radius-md: 12px;
    color-scheme: light;
}

html[data-theme="dark"] {
    --bg-primary: #1a1d2e;
    --bg-secondary: #1e2235;
    --bg-card: #232740;
    --bg-card-hover: #2a3050;
    --accent: #7c7ef5;
    --accent-light: #a5b4fc;
    --accent-dark: #5d5fef;
    --accent-blue: #7c7ef5;
    --text-primary: #f1f5f9;
    --text-secondary: #c7cce8;
    --text-muted: #9ca3af;
    --text-on-accent: #ffffff;
    --border: rgba(199, 204, 232, 0.14);
    --success: #34d399;
    --warning: #fbbf24;
    --danger: #f87171;
    --purple: #7c7ef5;
    --gradient-accent: linear-gradient(135deg, #6c63ff 0%, #5d5fef 55%, #4b4dd9 100%);
    --gradient-success: linear-gradient(135deg, #34d399, #059669);
    --shadow-card: 0 14px 36px rgba(0, 0, 0, 0.45);
    --shadow-glow: 0 0 0 1px rgba(93, 95, 239, 0.22);
    --header-bg: rgba(30, 34, 53, 0.94);
    --nav-bg: rgba(30, 34, 53, 0.94);
    --tg-chrome: #1e2235;
    --body-bg:
        radial-gradient(1000px 520px at 90% -12%, rgba(93, 95, 239, 0.22), transparent 55%),
        radial-gradient(800px 460px at -10% 20%, rgba(16, 185, 129, 0.08), transparent 50%),
        linear-gradient(180deg, #1a1d2e 0%, #1e2235 45%, #1a1d2e 100%);
    color-scheme: dark;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-body);
    background: var(--body-bg);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    padding-top: 60px;
    padding-bottom: 80px;
    letter-spacing: -0.01em;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-titles {
    display: flex;
    flex-direction: column;
}

.header-title {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.header-logo {
    width: 32px;
    height: 32px;
    background: var(--gradient-accent);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: white;
}

.header-subtitle {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: -2px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px;
    transition: transform 160ms var(--ease-press), background-color 160ms var(--ease-out), color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}

.header-btn:active {
    background: var(--bg-card-hover);
    color: var(--accent-light);
    transform: scale(0.94);
}

/* ===== SIDE MENU ===== */
.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms var(--ease-out);
}

.menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.side-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background: var(--bg-secondary);
    z-index: 201;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.side-menu.active {
    right: 0;
}

.menu-user {
    padding: 28px 20px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 14px;
}

.menu-avatar {
    width: 50px;
    height: 50px;
    background: var(--gradient-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
}

.menu-user-name {
    font-size: 17px;
    font-weight: 700;
}

.menu-user-username {
    font-size: 13px;
    color: var(--accent-light);
    margin-top: 2px;
}

.menu-items {
    padding: 12px 0;
    flex: 1;
    overflow-y: auto;
}

.menu-item {
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 15px;
    color: var(--text-primary);
}

.menu-item:active {
    background: var(--bg-card);
}

.menu-item i {
    width: 22px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 16px;
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    display: flex;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 180ms var(--ease-out), transform 160ms var(--ease-press);
    font-size: 11px;
}

.nav-item:active {
    transform: scale(0.96);
}

.nav-item.active {
    color: var(--accent-dark);
}

.nav-item i {
    font-size: 20px;
}

.nav-item.active i {
    filter: none;
    color: var(--accent);
}

/* ===== CONTENT ===== */
.content {
    padding: 16px;
    max-width: 480px;
    margin: 0 auto;
}

.page {
    display: block;
    opacity: 1;
}

.page.active {
    display: block;
    opacity: 1;
    animation: pageIn 280ms var(--ease-out) both;
}

@keyframes pageIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== HERO SECTION (Home) ===== */
.hero-section {
    margin-bottom: 18px;
}

.hero-greeting {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 10px;
    line-height: 1.15;
}

.hero-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid transparent;
}

.hero-status.status-active {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.hero-status.status-inactive {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ===== CONNECTION CARD ===== */
.connection-card {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 22px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card), var(--shadow-glow);
    overflow: hidden;
    color: var(--text-primary);
}

.connection-card.connected {
    border-color: rgba(34,197,94,0.3);
}

.connection-card-bg {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(34,197,94,0.18) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.connection-top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.connection-shield {
    width: 52px;
    height: 52px;
    background: var(--gradient-success);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 6px 18px rgba(34,197,94,0.35);
}

.connection-info {
    flex: 1;
    min-width: 0;
}

.connection-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.connection-sub {
    font-size: 12px;
    color: var(--text-secondary);
}

.connection-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(34,197,94,0.15);
    color: #22c55e;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.pulse-dot {
    width: 7px;
    height: 7px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-ring 1.6s infinite;
}

@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.6); }
    70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
    100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

.connection-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.conn-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 12px;
}

.conn-stat-icon {
    width: 34px;
    height: 34px;
    background: var(--bg-card);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--accent);
    flex-shrink: 0;
}

.conn-stat-info {
    min-width: 0;
}

.conn-stat-value {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conn-stat-label {
    font-size: 11px;
    color: var(--text-secondary);
}

.connection-traffic {
    margin-bottom: 12px;
}

.connection-traffic .traffic-bar {
    width: 100%;
    height: 8px;
    margin-bottom: 6px;
}

.connection-traffic .traffic-text {
    text-align: left;
    color: var(--text-secondary);
}

.connection-client {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 10px 14px;
    border-radius: 10px;
}

.connection-client strong {
    color: var(--text-primary);
}

.btn-block {
    width: 100%;
    box-sizing: border-box;
}

/* ===== TRIAL CARD V2 ===== */
.trial-card-v2 {
    position: relative;
    background: var(--bg-card);
    border-radius: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.trial-card-bg {
    position: absolute;
    top: -60px;
    right: -60px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.22) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.trial-card-content {
    position: relative;
    padding: 24px 20px;
}

.trial-badge {
    display: inline-block;
    background: var(--gradient-accent);
    color: white;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.trial-title-v2 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.trial-desc-v2 {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
}

.trial-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.trial-feat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 20px;
}

.trial-feat i {
    color: #22c55e;
    font-size: 10px;
}

.btn-trial-v2 {
    width: 100%;
    background: var(--gradient-accent);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 20px rgba(14,165,233,0.22);
    transition: transform 0.15s;
}

.btn-trial-v2:active {
    transform: scale(0.97);
}

/* ===== STAT GRID 3 ===== */
.stat-grid-3 {
    grid-template-columns: repeat(3, 1fr) !important;
}

.stat-card-action {
    cursor: pointer;
    transition: transform 0.15s;
}

.stat-card-action:active {
    transform: scale(0.96);
}

/* ===== HOME CTA ===== */
.home-cta-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, rgba(14,165,233,0.14), rgba(20,184,166,0.10));
    border: 1px solid rgba(45, 212, 191, 0.28);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    margin-top: 4px;
    cursor: pointer;
    transition: transform 160ms var(--ease-press), border-color 160ms var(--ease-out);
}

.home-cta-card:active {
    transform: scale(0.98);
}

.cta-icon {
    width: 44px;
    height: 44px;
    background: var(--gradient-accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-on-accent);
    flex-shrink: 0;
}

.cta-content {
    flex: 1;
}

.cta-title {
    font-size: 15px;
    font-weight: 700;
}

.cta-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.cta-arrow {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ===== PAYMENT DISABLED ===== */
.payment-disabled {
    opacity: 0.55;
}

/* keep old trial-card styles for backwards-compat */
.trial-card {
    background: var(--bg-card);
    border-radius: 18px;
    padding: 24px 20px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    display: flex;
    gap: 16px;
    align-items: center;
}

.trial-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-accent);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    flex-shrink: 0;
}

/* traffic bar (shared) */
.traffic-bar {
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.traffic-fill {
    height: 100%;
    background: var(--gradient-accent);
    border-radius: 3px;
    transition: width 400ms var(--ease-out);
}

.traffic-text {
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.trial-content {
    flex: 1;
}

.trial-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.trial-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.btn-trial {
    background: var(--gradient-accent);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ===== QUICK NAV ===== */
.quick-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.quick-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 12px 4px;
    border-radius: 14px;
    transition: transform 160ms var(--ease-press), background-color 160ms var(--ease-out);
}

.quick-nav-item:active {
    background: var(--bg-card);
    transform: scale(0.96);
}

.quick-nav-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    border: 1px solid rgba(255,255,255,0.08);
}

.qn-sub { background: linear-gradient(145deg, #0ea5e9, #0284c7); }
.qn-loc { background: linear-gradient(145deg, #14b8a6, #0f766e); }
.qn-inst { background: linear-gradient(145deg, #38bdf8, #0ea5e9); }
.qn-plans { background: linear-gradient(145deg, #2dd4bf, #0891b2); }

.quick-nav-item span {
    font-size: 11px;
    color: var(--text-secondary);
    text-align: center;
    font-weight: 600;
}

.home-secondary-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 14px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-title {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.card-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
    line-height: 1.5;
}

/* ===== STAT GRID ===== */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 14px;
}

@media (min-width: 400px) {
    .stat-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 16px 10px;
    text-align: center;
    border: 1px solid var(--border);
}

.stat-icon {
    margin-bottom: 8px;
}

.stat-icon i {
    font-size: 20px;
}

.stat-value {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    word-break: break-all;
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
}

/* ===== BADGE ===== */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.badge-active {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.badge-inactive {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.badge-purple,
.badge-accent {
    background: rgba(45, 212, 191, 0.15);
    color: var(--accent);
}

/* ===== SUB STATUS CARD ===== */
.sub-status-card {
    background: var(--bg-card);
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 14px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-card);
}

.sub-status-card.active {
    border-color: rgba(34, 197, 94, 0.3);
}

.sub-status-card.inactive {
    border-color: rgba(239, 68, 68, 0.3);
}

.sub-status-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.sub-status-card.active .sub-status-icon {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.sub-status-card.inactive .sub-status-icon {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.sub-status-info {
    flex: 1;
}

.sub-status-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

/* ===== ACTION GRID ===== */
.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 14px;
}

.action-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 18px 12px;
    text-align: center;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: transform 160ms var(--ease-press), background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), color 160ms var(--ease-out), opacity 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}

.action-card:active {
    background: var(--bg-card-hover);
    transform: scale(0.97);
}

.action-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    margin: 0 auto 10px;
}

.action-card span {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ===== SUBSCRIPTION LINK ===== */
.sub-link-box {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
    border: 1px solid var(--border);
}

.sub-link-box code {
    flex: 1;
    font-size: 11px;
    color: var(--text-secondary);
    word-break: break-all;
    line-height: 1.4;
}

.sub-link-box button {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 160ms var(--ease-press), background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), color 160ms var(--ease-out), opacity 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}

.sub-link-box button:active {
    background: var(--accent);
    color: white;
}

/* ===== DETAIL ROW ===== */
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.detail-value {
    font-size: 15px;
    font-weight: 600;
}

/* ===== REGION ITEMS ===== */
.region-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
}

.region-item:last-child {
    border-bottom: none;
}

.region-item.selected {
    /* visually highlighted via radio */
}

.region-flag {
    font-size: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.region-flag-img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: block;
}

.region-flag-operators {
    display: flex;
    align-items: center;
    gap: 4px;
}

.region-info {
    flex: 1;
}

.region-name {
    font-size: 15px;
    font-weight: 600;
}

.region-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.region-radio {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 160ms var(--ease-press), background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), color 160ms var(--ease-out), opacity 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}

.region-radio.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.region-radio i {
    font-size: 10px;
}

/* ===== FEATURE ITEMS ===== */
.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.feature-item:last-child {
    border-bottom: none;
}

.feature-item i {
    width: 20px;
    text-align: center;
    font-size: 14px;
}

/* ===== PLAN CARDS ===== */
.plan-card {
    background: var(--bg-card);
    border-radius: 18px;
    padding: 22px 20px;
    margin-bottom: 14px;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: transform 160ms var(--ease-press), background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), color 160ms var(--ease-out), opacity 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
    position: relative;
    box-shadow: var(--shadow-card);
}

.plan-card:active {
    border-color: var(--accent);
    transform: scale(0.98);
}

.plan-card.popular {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

.plan-badge {
    position: absolute;
    top: -10px;
    right: 16px;
    background: var(--gradient-accent);
    color: white;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.plan-name {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.plan-price {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.plan-currency {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
}

.plan-features {
    display: flex;
    gap: 16px;
    margin-bottom: 8px;
}

.plan-feature {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.plan-feature i {
    font-size: 12px;
    color: var(--accent);
}

.plan-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 6px;
    line-height: 1.4;
}

.plan-crypto {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 4px 10px;
    background: rgba(247, 147, 26, 0.1);
    border-radius: 8px;
    font-size: 12px;
    color: #f7931a;
    font-weight: 600;
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: opacity 220ms var(--ease-out);
}

.modal-overlay.active {
    opacity: 1;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 24px 24px 0 0;
    padding: 24px 20px;
    width: 100%;
    max-width: 480px;
    border-top: 1px solid var(--border);
    transform: translateY(100%);
    transition: transform 280ms var(--ease-out);
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.modal-close {
    background: var(--bg-card);
    border: none;
    color: var(--text-secondary);
    width: 34px;
    height: 34px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
}

.modal-plan {
    background: var(--bg-card);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid var(--border);
}

.modal-plan-name {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.modal-plan-price {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--accent-light);
}

.modal-section-title {
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 12px;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 14px;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: transform 160ms var(--ease-press), background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), color 160ms var(--ease-out), opacity 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}

.payment-method:active {
    background: var(--bg-card-hover);
    border-color: var(--accent);
}

.payment-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
}

.payment-info {
    flex: 1;
}

.payment-name {
    font-size: 15px;
    font-weight: 600;
}

.payment-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.payment-arrow {
    color: var(--text-muted);
    font-size: 14px;
}

/* ===== PLATFORM TABS ===== */
.platform-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.platform-tab {
    text-align: center;
    padding: 12px 4px;
    background: var(--bg-secondary);
    border-radius: 12px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    border: 2px solid transparent;
    transition: transform 160ms var(--ease-press), background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), color 160ms var(--ease-out), opacity 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.platform-tab i {
    font-size: 18px;
}

.platform-tab.active {
    border-color: var(--accent);
    background: rgba(45, 212, 191, 0.12);
    color: var(--accent-light);
}

/* ===== CLIENT ITEMS ===== */
.client-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}

.client-item:last-child {
    border-bottom: none;
}

.client-item.active {
    background: rgba(45, 212, 191, 0.08);
    border-radius: 12px;
    margin: 0 -8px;
    padding: 14px 8px;
}

.client-download-btn {
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
}

.install-platform-note {
    margin-top: 12px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.install-qr-wrap {
    margin-top: 14px;
    text-align: center;
}

.install-qr-img {
    width: 220px;
    height: 220px;
    border-radius: 16px;
    background: #fff;
    padding: 8px;
}

.install-qr-caption {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.install-hints {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.install-hint {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.install-hint i {
    color: var(--warning);
    margin-top: 2px;
    flex-shrink: 0;
}

.install-video-desc {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.install-video-wrap {
    border-radius: 14px;
    overflow: hidden;
    background: #0b1d32;
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.install-video-player {
    display: block;
    width: 100%;
    max-height: 420px;
    background: #0b1d32;
    vertical-align: top;
}

.client-icon {
    width: 44px;
    height: 44px;
    background: var(--accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
}

.client-info {
    flex: 1;
}

.client-name {
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.client-badge {
    background: var(--gradient-accent);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    letter-spacing: 0.3px;
}

.client-badge.alt {
    background: rgba(139, 92, 246, 0.18);
    color: #c4b5fd;
}

.client-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.client-download {
    color: var(--accent);
    font-size: 18px;
}

/* ===== INSTALL STEPS ===== */
.install-step {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
}

.step-num {
    width: 28px;
    height: 28px;
    background: var(--gradient-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.step-text {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ===== DEVICE LIST ===== */
.device-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.device-item:last-child {
    border-bottom: none;
}

.device-icon {
    width: 44px;
    height: 44px;
    background: var(--accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
}

.device-icon.online {
    background: var(--gradient-success);
}

.device-info {
    flex: 1;
}

.device-name {
    font-size: 15px;
    font-weight: 600;
}

.device-sub {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.device-delete {
    background: none;
    border: none;
    color: var(--danger);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.device-delete:active {
    opacity: 1;
}

/* ===== SECTION HEADER ===== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.section-title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.section-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* ===== PROFILE ===== */
.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    color: var(--text-primary);
}

.profile-avatar {
    width: 60px;
    height: 60px;
    background: var(--gradient-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: var(--text-on-accent);
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.profile-username {
    font-size: 14px;
    color: var(--accent-light);
    margin-top: 2px;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: transform 160ms var(--ease-press), background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), color 160ms var(--ease-out), opacity 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}

.profile-menu-item:active {
    background: var(--bg-card-hover);
    transform: scale(0.98);
}

.profile-menu-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
}

.profile-menu-text {
    flex: 1;
}

.profile-menu-text h4 {
    font-size: 15px;
    font-weight: 600;
}

.profile-menu-text p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.profile-menu-arrow {
    color: var(--text-muted);
    font-size: 14px;
}

/* ===== REFERRALS ===== */
.ref-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.ref-stat {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 16px 8px;
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    color: var(--text-primary);
}

.ref-stat-value {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.ref-stat-label {
    font-size: 11px;
    color: var(--text-secondary);
}

.ref-link-card {
    margin-bottom: 16px;
}

.ref-link-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 8px;
}

.ref-link-box {
    background: var(--bg-card);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
}

.ref-link-box code {
    flex: 1;
    font-size: 11px;
    color: var(--text-secondary);
    word-break: break-all;
}

.ref-link-box button {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 160ms var(--ease-press), background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), color 160ms var(--ease-out), opacity 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}

.ref-link-box button:active {
    background: var(--accent);
    color: var(--text-on-accent);
}

.ref-share-hint {
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.55;
    text-align: left;
    padding: 10px 12px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.how-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.how-item:last-child {
    border-bottom: none;
}

.how-num {
    width: 24px;
    height: 24px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

/* ===== BALANCE ===== */
.balance-card {
    background: var(--gradient-accent);
    border-radius: 18px;
    padding: 28px 20px;
    margin-bottom: 16px;
    text-align: center;
}

.balance-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 8px;
}

.balance-amount {
    font-size: 36px;
    font-weight: 800;
    color: white;
}

/* ===== SUPPORT ===== */
.support-contact {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: var(--bg-card);
    border-radius: 18px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: transform 160ms var(--ease-press), background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), color 160ms var(--ease-out), opacity 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
    box-shadow: var(--shadow-card);
}

.support-contact:active {
    background: var(--bg-card-hover);
}

.support-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    flex-shrink: 0;
}

.support-info {
    flex: 1;
}

.support-name {
    font-size: 16px;
    font-weight: 600;
}

.support-handle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ===== FAQ ===== */
.faq-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-q {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.faq-a {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ===== TOGGLE ===== */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.toggle-label {
    font-size: 15px;
    font-weight: 500;
}

.toggle {
    width: 48px;
    height: 26px;
    background: var(--bg-secondary);
    border-radius: 13px;
    position: relative;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: background 0.3s;
    flex-shrink: 0;
}

.toggle.active {
    background: var(--accent);
    border-color: var(--accent);
}

.toggle::after {
    content: '';
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 1px;
    left: 1px;
    transition: left 0.3s;
}

.toggle.active::after {
    left: 23px;
}

/* ===== FORM ===== */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus {
    border-color: var(--accent);
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: var(--gradient-accent);
    color: var(--text-on-accent);
    border: none;
    border-radius: 14px;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: transform 160ms var(--ease-press), filter 160ms var(--ease-out), opacity 160ms var(--ease-out);
}

.btn-primary:active {
    transform: scale(0.97);
    filter: brightness(1.05);
}

.btn-secondary {
    width: 100%;
    padding: 14px;
    background: transparent;
    color: var(--accent-light);
    border: 1px solid rgba(45, 212, 191, 0.35);
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 160ms var(--ease-press), background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), color 160ms var(--ease-out), opacity 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}

.btn-secondary:active {
    transform: scale(0.98);
}

.btn-small {
    background: var(--accent);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

/* ===== NOTIFICATIONS ===== */
.notif-block {
    margin-bottom: 8px;
}

.notif-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.notif-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
}

.notif-title {
    font-size: 15px;
    font-weight: 600;
}

.notif-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    padding-left: 52px;
}

/* ===== STEPPER ===== */
.stepper {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 10px;
    padding-left: 52px;
}

.stepper-btn {
    width: 36px;
    height: 36px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: transform 160ms var(--ease-press), background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), color 160ms var(--ease-out), opacity 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}

.stepper-btn:active {
    background: var(--accent);
    color: white;
}

.stepper-value {
    font-size: 24px;
    font-weight: 700;
    min-width: 60px;
    text-align: center;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 14px;
}

/* ===== BACK BUTTON ===== */
.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 16px;
    background: none;
    border: none;
    padding: 0;
}

/* ===== CHART (devices) ===== */
.devices-progress {
    width: 160px;
    height: 80px;
    margin: 20px auto 0;
    position: relative;
}

.chart-value {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 26px;
    font-weight: 700;
}

.chart-label {
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* ===== DANGER BTN ===== */
.btn-danger-text {
    background: none;
    border: none;
    color: var(--danger);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

/* ===== INFO ITEMS ===== */
.info-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.info-item:last-child {
    border-bottom: none;
}

.info-item i {
    color: var(--text-secondary);
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.info-item-text {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
}

/* ===== ADMIN SEARCH ===== */
/* ===== ADMIN TABS ===== */
.admin-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.admin-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 4px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 160ms var(--ease-press), background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), color 160ms var(--ease-out), opacity 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}

.admin-tab i {
    font-size: 16px;
}

.admin-tab.active {
    border-color: var(--accent);
    background: rgba(45, 212, 191, 0.1);
    color: var(--accent-light);
}

.admin-tab-panel {
    display: none;
}

.admin-tab-panel.active {
    display: block;
}

.admin-referrals-card {
    margin-bottom: 0;
}

.admin-sources-card {
    margin-top: 14px;
}

.admin-sources-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px 16px;
}

.admin-source-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
}

.admin-source-label {
    font-weight: 700;
    margin-bottom: 4px;
}

.admin-source-stats {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.admin-source-link {
    display: block;
    font-size: 11px;
    color: var(--accent-light);
    word-break: break-all;
}

.admin-utm-tag {
    color: var(--accent-light);
    font-size: 11px;
    text-transform: uppercase;
}

.admin-ref-table-wrap {
    overflow-x: auto;
}

.admin-ref-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.admin-ref-table th {
    text-align: left;
    padding: 8px 10px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}

.admin-ref-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.admin-ref-user {
    font-weight: 600;
    color: var(--text-primary);
}

.admin-ref-meta {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.admin-ref-paid.yes {
    color: var(--success);
    font-weight: 600;
}

.admin-ref-paid.no {
    color: var(--text-secondary);
}

.admin-export-row {
    margin-bottom: 12px;
}

.admin-save-csv-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    font-size: 15px;
}

.admin-export-hint {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.4;
}

.admin-search-bar {
    position: relative;
    margin-bottom: 12px;
}

.admin-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 14px;
    pointer-events: none;
}

.admin-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 40px 12px 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.admin-search-input:focus {
    border-color: var(--accent);
}

.admin-search-input::placeholder {
    color: var(--text-secondary);
}

.admin-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-secondary);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 11px;
    cursor: pointer;
}

/* ===== ADMIN PANEL ===== */
.admin-user-card {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.admin-user-card:last-child {
    border-bottom: none;
}

.admin-user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.admin-user-info {
    flex: 1;
}

.admin-user-name {
    font-size: 15px;
    font-weight: 600;
}

.admin-user-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.admin-user-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
    margin-bottom: 12px;
}

.admin-detail {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
}

.admin-detail strong {
    color: var(--text-primary);
    font-weight: 600;
}

.admin-user-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-danger-outline {
    background: none !important;
    border: 1px solid var(--danger) !important;
    color: var(--danger) !important;
}

.btn-success-outline {
    background: none !important;
    border: 1px solid var(--success) !important;
    color: var(--success) !important;
}

/* ===== ADMIN MODAL ===== */
.admin-modal-input {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 16px;
    margin-bottom: 12px;
    outline: none;
}

.admin-modal-input:focus {
    border-color: var(--accent);
}

.admin-modal-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    display: block;
}

.admin-tools {
    margin-bottom: 14px;
}

.admin-tools-body {
    padding: 14px 16px 16px;
}

.admin-tool-row {
    margin-bottom: 14px;
}

.admin-tool-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
}

.admin-textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    resize: vertical;
    min-height: 90px;
    font-family: inherit;
}

.admin-broadcast-btn {
    margin-top: 4px;
}

.admin-revenue-card {
    margin-bottom: 14px;
}

.admin-revenue-body {
    padding: 14px 16px 16px;
}

.admin-revenue-title {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.admin-revenue-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

.admin-revenue-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
}

.admin-revenue-item span {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.admin-revenue-item strong {
    font-size: 16px;
    color: var(--text-primary);
}

.admin-revenue-total {
    font-size: 13px;
    color: var(--text-secondary);
}

.btn-primary-outline {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
}


/* ===== DESIGN POLISH + THEME SAFETY ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    color: var(--text-primary);
}
.plan-card {
    position: relative;
    background: var(--bg-card);
    color: var(--text-primary);
}
.plan-badge {
    background: var(--gradient-accent);
    color: var(--text-on-accent);
    font-family: var(--font-display);
    letter-spacing: 0.04em;
}
.sub-status-title,
.conn-stat-value,
.stat-value,
.cta-title,
.detail-value {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
    color: var(--text-primary);
}
.detail-label,
.card-title {
    color: var(--text-secondary);
}
.back-btn {
    transition: color 160ms var(--ease-out), transform 160ms var(--ease-press);
}
.back-btn:active {
    transform: translateX(-2px);
    color: var(--accent-light);
}
.toggle {
    transition: background-color 180ms var(--ease-out);
    border: 1px solid var(--border);
}
.toggle.active {
    background: var(--accent);
    border-color: transparent;
}
.toggle::after {
    transition: transform 180ms var(--ease-out);
}
.platform-tab {
    border: 1px solid var(--border);
    transition: transform 160ms var(--ease-press), background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), color 160ms var(--ease-out);
}
.platform-tab:active {
    transform: scale(0.96);
}
.region-item {
    transition: background-color 160ms var(--ease-out);
}
.payment-method {
    transition: transform 160ms var(--ease-press), background-color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}
.payment-method:active {
    transform: scale(0.98);
}
.btn-small {
    transition: transform 160ms var(--ease-press), background-color 160ms var(--ease-out);
}
.btn-small:active {
    transform: scale(0.96);
}
.menu-item {
    transition: background-color 160ms var(--ease-out), transform 160ms var(--ease-press);
}
.menu-item:active {
    transform: scale(0.99);
}
