/* ===== RESET ===== */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0e17;
    color: #ffffff;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

#app {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* ===== LANDING PAGE ===== */
header {
    padding: 3rem 1rem 1rem;
    text-align: center;
}
.logo {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
}
.logo span { color: #6c5ce7; }
.tagline {
    margin-top: 0.5rem;
    font-size: 1.05rem;
    color: #8892b0;
}

main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    width: 100%;
}

.field { margin-bottom: 1rem; }
.field label {
    display: block;
    font-size: 0.85rem;
    color: #8892b0;
    margin-bottom: 0.4rem;
}
.field input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid #2a3045;
    background: #0d1120;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}
.field input:focus { border-color: #6c5ce7; }
.field input:disabled { opacity: 0.5; cursor: not-allowed; }

.btn {
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: 10px;
    background: #6c5ce7;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 0.5rem;
}
.btn:hover { background: #5a4bd1; }
.btn:active { opacity: 0.8; }

#code-step { display: none; }
.back-link {
    display: block;
    text-align: center;
    margin-top: 1rem;
    color: #6c5ce7;
    font-size: 0.85rem;
    cursor: pointer;
    background: none;
    border: none;
}

footer {
    padding: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: #555;
}

/* ===== HERO ===== */
.hero {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 38vh;
    background: radial-gradient(ellipse 80% 60% at 50% 45%, #1a1a3e 0%, #12122a 40%, #0a0e17 70%);
}

.hero-shield {
    position: relative;
    width: 88px;
    height: 88px;
    color: #ffffff;
    z-index: 2;
}
.hero-shield svg { width: 100%; height: 100%; }
.hero-shield.dimmed { color: #4a4a6e; opacity: 0.4; }

.hero-rings {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}
.hero-rings circle { fill: none; stroke-width: 1; }
.hero-rings .ring1 { stroke: #2d2b6e; opacity: 0.4; }
.hero-rings .ring2 { stroke: #2d2b6e; opacity: 0.25; }
.hero-rings .ring3 { stroke: #2d2b6e; opacity: 0.12; }

/* ===== BOTTOM CARD ===== */
.bottom-card {
    background: linear-gradient(180deg, #16213e 0%, #121a30 100%);
    border-top: 1px solid rgba(108, 92, 231, 0.25);
    border-radius: 24px 24px 0 0;
    padding: 28px 16px 36px;
    flex-shrink: 0;
    margin: 0;
    width: 100%;
}

/* Info row */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    padding: 0 2px;
}
.info-left .username {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
}
.info-left .status {
    font-size: 13px;
    color: #8892b0;
    margin-top: 3px;
}
.info-right { text-align: right; }
.info-right .date {
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.2px;
}
.info-right .plan-label {
    font-size: 13px;
    color: #6c5ce7;
    margin-top: 3px;
}
.info-right .plan-label.none { color: #8892b0; }

/* ===== BUTTONS ===== */
.btn-accent {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 16px 20px;
    background: #6c5ce7;
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 10px;
    transition: opacity 0.15s;
    gap: 12px;
}
.btn-accent:active { opacity: 0.75; }

.btn-accent .btn-icon { width: 22px; height: 22px; color: #ffffff; flex-shrink: 0; }
.btn-accent .price { margin-left: auto; font-weight: 600; }

.btn-outline {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 16px 20px;
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(108, 92, 231, 0.35);
    border-radius: 14px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 10px;
    transition: background 0.15s;
    gap: 10px;
}
.btn-outline:active { background: rgba(108, 92, 231, 0.15); }
.btn-outline .btn-icon { width: 20px; height: 20px; flex-shrink: 0; color: #8892b0; }
.btn-outline .accent { color: #6c5ce7; margin-left: auto; font-weight: 500; }

.btn-row {
    display: flex;
    gap: 10px;
}
.btn-row .btn-outline {
    flex: 1;
    margin-bottom: 0;
    justify-content: center;
}

/* ===== SCREENS ===== */
.screen {
    min-height: 100vh;
    min-height: 100dvh;
    background: #0a0e17;
    padding: 16px 20px 32px;
}

.screen-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.screen-subtitle { font-size: 14px; color: #8892b0; margin-bottom: 20px; }

/* ===== CARDS ===== */
.card {
    background: #16213e;
    border: 1px solid rgba(108, 92, 231, 0.2);
    border-radius: 16px;
    padding: 18px 16px;
    margin-bottom: 12px;
    width: 100%;
    max-width: 400px;
}
.card h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #fff;
}
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.card-sub { font-size: 13px; color: #8892b0; margin-bottom: 4px; }

/* ===== PLANS SCREEN ===== */
.plans-screen {
    min-height: 100vh;
    min-height: 100dvh;
    background: #0a0e17;
    display: flex;
    flex-direction: column;
    padding: 16px;
}

.plans-outer-card {
    background: linear-gradient(180deg, #161e3a 0%, #0e1525 100%);
    border: 1px solid rgba(108, 92, 231, 0.5);
    border-radius: 20px;
    padding: 20px 16px;
    position: relative;
    overflow: hidden;
}
.plans-outer-card::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.plans-outer-card > * { position: relative; z-index: 1; }

.plans-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}
.plans-subtitle {
    font-size: 13px;
    color: #8892b0;
    line-height: 1.4;
    margin-bottom: 18px;
}

/* Device row */
.device-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    background: #1a1a3e;
    border: 1px solid rgba(108, 92, 231, 0.25);
    border-radius: 16px;
    padding: 14px 16px;
}
.device-icon-box {
    width: 48px; height: 48px;
    border: none;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #252550;
    flex-shrink: 0;
}
.device-count {
    font-size: 24px;
    font-weight: 700;
    color: #6c5ce7;
}
.device-info { flex: 1; }
.device-label {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.device-sub { font-size: 13px; color: #8892b0; margin-top: 1px; }

.savings-badge {
    background: #e74c3c;
    color: #FFF;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    white-space: nowrap;
    letter-spacing: 0.3px;
    margin-left: auto;
}

/* Dot slider */
.dot-slider {
    position: relative;
    margin-bottom: 20px;
    height: 36px;
    touch-action: none;
}
.dot-track {
    position: absolute;
    top: 50%; left: 0; right: 0;
    transform: translateY(-50%);
    height: 32px;
    background: #1e1e40;
    border-radius: 16px;
    overflow: hidden;
}
.dot-track-fill {
    height: 100%;
    background: linear-gradient(90deg, #4834d4, #6c5ce7);
    border-radius: 16px 0 0 16px;
}
.dot-positions {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
}
.dot-pos {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: rgba(14, 21, 37, 0.6);
    border: none;
    cursor: pointer;
    z-index: 2;
}
.dot-pos.filled {
    background: #6c5ce7;
}
.dot-pos.thumb {
    width: 28px; height: 28px;
    background: #ffffff;
    border: 3px solid #6c5ce7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 10px rgba(108, 92, 231, 0.4);
    z-index: 3;
}

/* Plan grid */
.plan-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.plan-tile {
    background: rgba(22, 33, 62, 0.6);
    border: 1px solid rgba(108, 92, 231, 0.35);
    border-radius: 16px;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
}
.plan-tile.selected {
    border-color: #6c5ce7;
    background: rgba(108, 92, 231, 0.08);
}
.plan-tile:active { opacity: 0.85; }

.plan-tile-name {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 12px;
    color: #ffffff;
}
.plan-tile-badge {
    display: inline-block;
    background: #6c5ce7;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 8px;
    margin-bottom: 8px;
}
.plan-tile-price {
    font-size: 26px;
    font-weight: 700;
    color: #6c5ce7;
    margin-bottom: 2px;
}
.plan-tile-per {
    font-size: 12px;
    color: #8892b0;
}

/* Pay section */
.plans-pay-section {
    margin-top: auto;
    padding-top: 16px;
}
.btn-pay {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 18px 20px;
    background: #16213e;
    border: 1px solid rgba(108, 92, 231, 0.35);
    border-radius: 16px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-pay:active { background: rgba(108, 92, 231, 0.3); }
.btn-pay .old-price {
    text-decoration: line-through;
    color: #6c5ce7;
    font-size: 14px;
    font-weight: 400;
    opacity: 0.7;
}

/* ===== SETUP ===== */
.platform-tabs { display: flex; gap: 8px; margin: 12px 0 16px; }
.platform-tab {
    flex: 1;
    padding: 10px 8px;
    background: transparent;
    border: 1px solid rgba(108, 92, 231, 0.3);
    border-radius: 10px;
    color: #8892b0;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
}
.platform-tab.active {
    background: rgba(108, 92, 231, 0.12);
    border-color: #6c5ce7;
    color: #6c5ce7;
}

.vless-box {
    background: #0a0e17;
    border: 1px solid rgba(108, 92, 231, 0.3);
    border-radius: 10px;
    padding: 14px;
    font-size: 12px;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    color: #8892b0;
    word-break: break-all;
    cursor: pointer;
    margin: 10px 0 12px;
    line-height: 1.5;
}

.qr-container { text-align: center; margin: 16px 0; }
.qr-container img { width: 180px; height: 180px; border-radius: 12px; }
.qr-label { font-size: 13px; color: #8892b0; margin-top: 8px; }

.step { display: flex; gap: 12px; margin-bottom: 14px; align-items: flex-start; }
.step-num {
    width: 28px; height: 28px;
    background: rgba(108, 92, 231, 0.12);
    color: #6c5ce7;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600; flex-shrink: 0;
}
.step-text { font-size: 14px; color: #ffffff; line-height: 1.5; padding-top: 3px; }

/* ===== PROFILE ===== */
.prof-screen { padding-top: 8px; }

.prof-header {
    text-align: center;
    padding: 20px 0 28px;
}
.prof-name {
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
}
.prof-id {
    font-size: 14px;
    color: #8892b0;
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.prof-copy-icon {
    cursor: pointer;
    color: #8892b0;
    display: inline-flex;
    align-items: center;
}
.prof-copy-icon:active { color: #6c5ce7; }

.prof-menu {
    background: #16213e;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 24px;
}
.prof-menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    cursor: pointer;
    transition: background 0.15s;
}
.prof-menu-item:active {
    background: rgba(108, 92, 231, 0.06);
}
.prof-menu-item + .prof-menu-item {
    border-top: 1px solid rgba(108, 92, 231, 0.15);
}
.prof-menu-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.prof-icon-green {
    background: rgba(0, 184, 148, 0.12);
    color: #00b894;
}
.prof-icon-orange {
    background: rgba(251, 146, 60, 0.12);
    color: #FB923C;
}
.prof-icon-yellow {
    background: rgba(250, 204, 21, 0.12);
    color: #FACC15;
}
.prof-icon-red {
    background: rgba(231, 76, 60, 0.12);
    color: #e74c3c;
}
.prof-menu-text {
    font-size: 15px;
    font-weight: 500;
    color: #ffffff;
}

.prof-sub-section {
    margin-bottom: 16px;
}
.prof-sub-label {
    font-size: 14px;
    color: #8892b0;
    margin-bottom: 10px;
}
.prof-sub-link {
    background: #16213e;
    border-radius: 14px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
}
.prof-sub-link:active {
    background: #1a2848;
}
.prof-sub-url {
    font-size: 14px;
    color: #8892b0;
    word-break: break-all;
    flex: 1;
}
.prof-sub-copy {
    color: #5a6080;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.prof-instructions-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: #16213e;
    border: none;
    border-radius: 14px;
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 500;
    color: #ffffff;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.15s;
}
.prof-instructions-btn:active {
    background: #1a2848;
}
.prof-instructions-icon {
    color: #6c5ce7;
    display: flex;
    align-items: center;
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 40px; left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #16213e;
    border: 1px solid rgba(108, 92, 231, 0.3);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 14px;
    opacity: 0;
    transition: all 0.3s;
    z-index: 999;
    pointer-events: none;
    white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== LOADING ===== */
.skeleton {
    background: linear-gradient(90deg, #16213e 25%, #1e2d50 50%, #16213e 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 12px;
    margin-bottom: 12px;
}
.skeleton-card { height: 100px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ===== CONFIRM BOTTOM SHEET ===== */
.confirm-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,0);
    transition: background 0.3s;
    display: flex; align-items: flex-end;
}
.confirm-overlay.visible { background: rgba(0,0,0,0.6); }

.confirm-sheet {
    width: 100%;
    background: linear-gradient(180deg, #1a2240 0%, #111828 100%);
    border-radius: 24px 24px 0 0;
    padding: 28px 24px 32px;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}
.confirm-overlay.visible .confirm-sheet { transform: translateY(0); }

.confirm-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 24px;
}
.confirm-title { font-size: 20px; font-weight: 700; color: #fff; letter-spacing: -0.3px; }
.confirm-close {
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; border: none; color: #8892b0;
    transition: background 0.15s;
}
.confirm-close:active { background: rgba(255,255,255,0.15); }
.confirm-close svg { width: 18px; height: 18px; }

.confirm-info {
    background: rgba(255,255,255,0.04);
    border-radius: 14px;
    padding: 4px 0;
    margin-bottom: 16px;
}
.confirm-info-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 13px 18px;
}
.confirm-info-row + .confirm-info-row {
    border-top: 1px solid rgba(255,255,255,0.06);
}
.confirm-info-label { font-size: 14px; color: #8892b0; }
.confirm-info-value { font-size: 14px; font-weight: 500; color: #e0e6f0; }
.confirm-info-row.total .confirm-info-label { font-weight: 600; color: #a0b0d0; }
.confirm-info-row.total .confirm-info-value { font-size: 17px; font-weight: 700; color: #fff; }

.confirm-method {
    display: flex; align-items: center; gap: 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 14px 16px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: background 0.15s;
}
.confirm-method:active { background: rgba(255,255,255,0.08); }
.confirm-method-icon {
    width: 44px; height: 44px; border-radius: 12px;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    padding: 4px;
}
.confirm-method-icon svg { width: 26px; height: 26px; }
.confirm-method-icon img { width: 100%; height: 100%; object-fit: contain; }
.confirm-method-body { flex: 1; }
.confirm-method-text { display: block; font-size: 15px; font-weight: 600; color: #fff; }
.confirm-method-sub { display: block; font-size: 12px; color: #8892b0; margin-top: 2px; }
.confirm-method-arrow { color: #5a6080; flex-shrink: 0; }
.confirm-method-arrow svg { width: 20px; height: 20px; }

.confirm-pay-btn {
    width: 100%; padding: 17px;
    background: linear-gradient(135deg, #6c5ce7 0%, #5a4bd1 100%);
    color: #fff;
    font-size: 17px; font-weight: 700;
    border: none; border-radius: 14px;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.15s;
    box-shadow: 0 4px 20px rgba(108, 92, 231, 0.25);
    letter-spacing: -0.2px;
}
.confirm-pay-btn:active {
    transform: scale(0.98);
    box-shadow: 0 2px 10px rgba(108, 92, 231, 0.2);
}

.confirm-secure {
    text-align: center; font-size: 12px; color: #5a6080;
    margin-top: 14px; letter-spacing: 0.1px;
}

/* ===== AGREEMENT SHEET ===== */
.agreement-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,0);
    transition: background 0.3s;
    display: flex; align-items: flex-end;
    pointer-events: none;
}
.agreement-overlay.visible { background: rgba(0,0,0,0.6); pointer-events: auto; }

.agreement-sheet {
    width: 100%;
    max-height: 80vh;
    background: linear-gradient(180deg, #1a2240 0%, #111828 100%);
    border-radius: 24px 24px 0 0;
    padding: 0;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    display: flex;
    flex-direction: column;
}
.agreement-overlay.visible .agreement-sheet { transform: translateY(0); }

.agreement-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 24px 16px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(108, 92, 231, 0.2);
}
.agreement-title { font-size: 18px; font-weight: 700; color: #fff; }
.agreement-close {
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; border: none; color: #8892b0;
}
.agreement-close:active { background: rgba(255,255,255,0.15); }

.agreement-body {
    padding: 16px 24px 24px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
}
.agreement-body h3 {
    font-size: 15px; font-weight: 600; color: #6c5ce7;
    margin: 16px 0 8px;
}
.agreement-body h3:first-child { margin-top: 0; }
.agreement-body p {
    font-size: 13px; color: #b0c0d0; line-height: 1.6;
    margin: 0 0 8px;
}

/* ===== REFERRAL MODAL ===== */
.referral-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,0);
    transition: background 0.3s;
    display: flex; align-items: flex-end;
    pointer-events: none;
}
.referral-overlay.visible { background: rgba(0,0,0,0.5); pointer-events: auto; }

.referral-sheet {
    width: 100%;
    max-height: 85vh;
    background: #0d1117;
    border-radius: 16px 16px 0 0;
    padding: 24px;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    display: flex;
    flex-direction: column;
}
.referral-overlay.visible .referral-sheet { transform: translateY(0); }

.referral-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px;
}
.referral-header h2 {
    font-size: 20px; font-weight: 700; color: #fff; margin: 0;
}
.referral-close {
    background: none; border: none; color: #666;
    font-size: 22px; cursor: pointer; padding: 4px;
    line-height: 1;
}

.referral-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
}

.referral-info-card {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}
.referral-info-card p {
    font-size: 13px; color: #8892b0; line-height: 1.5; margin: 0 0 8px;
}
.referral-info-card p:last-child { margin-bottom: 0; }
.referral-info-divider {
    border: none; border-top: 1px solid rgba(255,255,255,0.1);
    margin: 12px 0;
}
.referral-info-stat {
    font-size: 13px; color: #8892b0;
}
.referral-info-stat span { color: #fff; }

.referral-section-title {
    font-size: 14px; color: #fff; font-weight: 400;
    margin: 0 0 10px;
}

.referral-link-field {
    display: flex; justify-content: space-between; align-items: center;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 24px;
    padding: 12px 16px;
    margin-bottom: 20px;
    cursor: pointer;
}
.referral-link-text {
    font-size: 13px; color: #8892b0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    flex: 1; margin-right: 12px;
}
.referral-copy-icon { flex-shrink: 0; }

.referral-share-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    margin-bottom: 20px;
    justify-content: center;
}
.referral-share-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 12px;
    background: rgba(255,255,255,0.08);
    border: none;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.referral-share-chip:active {
    background: rgba(255,255,255,0.15);
}
.referral-share-chip svg {
    flex-shrink: 0;
}

.referral-history-empty {
    display: flex; flex-direction: column; align-items: center;
    padding: 32px 0; gap: 8px;
}
.referral-history-empty p {
    font-size: 13px; color: #555; margin: 0;
}

.referral-loading { color: #8892b0; text-align: center; padding: 40px 0; }
.referral-error { color: #e74c3c; text-align: center; padding: 20px 0; }

/* ===== WIZARD ===== */
.wizard {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: #0a0e17;
}

.wizard .hero { flex: 0 0 auto; min-height: 38vh; }

.wizard-hero-icon {
    position: relative;
    width: 72px; height: 72px;
    color: #6c5ce7;
    z-index: 2;
}
.wizard-hero-icon svg { width: 100%; height: 100%; }
.wizard-hero-icon.success-pulse { animation: wizardPulse 2s ease-in-out infinite; }

@keyframes wizardPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.85; }
}

.wizard-progress-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-90deg);
    z-index: 1;
}
.wizard-progress-track {
    fill: none;
    stroke: rgba(108, 92, 231, 0.15);
    stroke-width: 3;
}
.wizard-progress-bar {
    fill: none;
    stroke: #6c5ce7;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.wizard-progress-bar.complete {
    animation: progressPulse 2s ease-in-out infinite;
}
@keyframes progressPulse {
    0%, 100% { stroke-opacity: 1; filter: drop-shadow(0 0 4px rgba(108, 92, 231, 0.3)); }
    50% { stroke-opacity: 0.7; filter: drop-shadow(0 0 12px rgba(108, 92, 231, 0.6)); }
}

.wizard-body {
    text-align: center;
    padding: 8px 28px 0;
}
.wizard-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 8px;
}
.wizard-desc {
    font-size: 15px;
    color: #8892b0;
    line-height: 1.5;
}

.wizard-actions .btn-accent,
.wizard-actions .btn-outline {
    justify-content: center;
}
.wizard-actions {
    padding: 24px 20px 36px;
    margin-top: auto;
}

/* ===== PAYMENT SCREEN ===== */
.pay-screen { padding-top: 8px; }
.pay-title { font-size: 26px; font-weight: 700; margin-bottom: 20px; }

.pay-empty-card {
    background: #16213e; border-radius: 16px; padding: 32px 20px;
    text-align: center; margin-bottom: 12px;
}
.pay-empty-icon { color: #8892b0; margin-bottom: 12px; display: flex; justify-content: center; }
.pay-empty-text { font-size: 15px; color: #ffffff; }

.pay-method-card {
    background: #16213e; border-radius: 16px; padding: 16px 18px;
    display: flex; align-items: center; gap: 14px; margin-bottom: 12px;
}
.pay-method-icon {
    width: 40px; height: 40px; border-radius: 12px;
    background: rgba(108, 92, 231, 0.12); color: #6c5ce7;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.pay-method-icon--sbp {
    width: 44px; height: 44px;
    background: #fff;
    padding: 4px;
    overflow: hidden;
}
.pay-method-icon--sbp img {
    width: 100%; height: 100%; object-fit: contain; border-radius: 8px;
}
.pay-method-info { flex: 1; }
.pay-method-type { font-size: 15px; font-weight: 500; }
.pay-method-detail { font-size: 13px; color: #8892b0; margin-top: 2px; }
.pay-method-delete { color: #5a6080; cursor: pointer; padding: 8px; }
.pay-method-delete:active { color: #e74c3c; }

.pay-autorenew-card {
    background: #16213e; border-radius: 16px; padding: 16px 18px;
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 12px;
}
.pay-autorenew-text { font-size: 15px; font-weight: 500; }

/* Toggle switch */
.toggle { position: relative; width: 51px; height: 31px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: #3a4060; border-radius: 31px; cursor: pointer;
    transition: background 0.3s;
}
.toggle-slider:before {
    content: ""; position: absolute; width: 27px; height: 27px;
    left: 2px; bottom: 2px; background: #fff; border-radius: 50%;
    transition: transform 0.3s;
}
.toggle input:checked + .toggle-slider { background: #6c5ce7; }
.toggle input:checked + .toggle-slider:before { transform: translateX(20px); }

/* History */
.pay-history-btn {
    background: #16213e; border: none; border-radius: 16px;
    padding: 16px 18px; width: 100%; display: flex; align-items: center;
    justify-content: space-between; color: #ffffff; font-size: 15px;
    font-weight: 500; cursor: pointer; margin-top: 12px;
}
.pay-history-list { margin-top: 8px; }
.pay-history-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 0; border-bottom: 1px solid rgba(108, 92, 231, 0.15);
}
.pay-history-item:last-child { border-bottom: none; }
.pay-history-date { font-size: 13px; color: #8892b0; }
.pay-history-amount { font-size: 14px; font-weight: 600; }
.pay-history-status { font-size: 12px; color: #00b894; }
.pay-history-status.failed { color: #e74c3c; }

/* ===== DISCOUNT ===== */
.price-old {
    text-decoration: line-through;
    color: #8892b0;
    font-size: 14px;
    margin-right: 8px;
}

.price-new {
    color: #e74c3c;
    font-weight: 700;
    font-size: 18px;
}

.discount-badge {
    background: linear-gradient(135deg, #e74c3c, #ff6b6b);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 8px;
}

.discount-timer {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 4px;
}

/* ===== REFERRAL TIMELINE ===== */
.referral-timeline {
    margin-top: 20px;
    padding: 0 4px;
}
.rt-header {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}
.rt-total {
    font-size: 12px;
    color: #00b894;
    margin-bottom: 12px;
    font-weight: 500;
}
.rt-item {
    display: flex;
    align-items: center;
    gap: 8px;
}
.rt-dot {
    color: #6c5ce7;
    font-size: 14px;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}
.rt-dot-empty {
    color: #555;
}
.rt-content {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}
.rt-date {
    color: #8892b0;
    min-width: 45px;
    font-size: 12px;
}
.rt-separator {
    color: #333;
    font-size: 10px;
}
.rt-name {
    color: #fff;
    font-weight: 500;
}
.rt-days {
    color: #00b894;
    font-weight: 600;
    margin-left: auto;
}
.rt-line {
    color: #333;
    font-size: 10px;
    padding-left: 5px;
    line-height: 1;
    height: 12px;
}
.rt-empty {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
}
.rt-empty-dot {
    color: #555;
    font-size: 14px;
    width: 16px;
    text-align: center;
}
.rt-empty-text {
    color: #8892b0;
    font-size: 13px;
}
.rt-empty-hint {
    color: #555;
    font-size: 12px;
    font-style: italic;
}

/* ===== PWA INSTALL BANNER ===== */
.pwa-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 990;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    background: #16213e;
    border-top: 1px solid rgba(108, 92, 231, 0.3);
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.35s ease-out;
}
.pwa-banner.visible {
    transform: translateY(0);
    opacity: 1;
}
.pwa-banner.hiding {
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.25s ease-in, opacity 0.25s ease-in;
}

.pwa-banner__icon img {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    flex-shrink: 0;
}

.pwa-banner__text {
    flex: 1;
    min-width: 0;
}
.pwa-banner__title {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 2px;
}
.pwa-banner__desc {
    font-size: 13px;
    color: #8892b0;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.pwa-banner__share-icon {
    vertical-align: middle;
    color: #6c5ce7;
    flex-shrink: 0;
}

.pwa-banner__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.pwa-banner__btn {
    padding: 8px 18px;
    background: #6c5ce7;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}
.pwa-banner__btn:active {
    background: #5a4bd1;
}
.pwa-banner__close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #8892b0;
    font-size: 18px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.15s;
    flex-shrink: 0;
}
.pwa-banner__close:active {
    background: rgba(255, 255, 255, 0.08);
}

/* Desktop: centered floating banner */
@media (min-width: 600px) {
    .pwa-banner {
        left: 50%;
        right: auto;
        transform: translateX(-50%) translateY(100%);
        max-width: 480px;
        border-radius: 16px;
        margin-bottom: 16px;
        border: 1px solid rgba(108, 92, 231, 0.3);
    }
    .pwa-banner.visible {
        transform: translateX(-50%) translateY(0);
    }
    .pwa-banner.hiding {
        transform: translateX(-50%) translateY(100%);
    }
}
