* { 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: #0A1F1A;
    color: #FFFFFF;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

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

/* ===== 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%, #133D32 0%, #0D2B24 40%, #0A1F1A 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: #4A6B60; 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: #1E5C4C; opacity: 0.4; }
.hero-rings .ring2 { stroke: #1E5C4C; opacity: 0.25; }
.hero-rings .ring3 { stroke: #1E5C4C; opacity: 0.12; }

/* ===== BOTTOM CARD ===== */
.bottom-card {
    background: linear-gradient(180deg, #112E26 0%, #0E2520 100%);
    border-top: 1px solid rgba(30, 92, 76, 0.25);
    border-radius: 24px 24px 0 0;
    padding: 28px 16px 36px;
    flex-shrink: 0;
    margin: 0;
    width: 100%;
}

/* Info row: username/status left — date/plan right */
.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: #8BA89E;
    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: #2DD4A0;
    margin-top: 3px;
}
.info-right .plan-label.none { color: #8BA89E; }

/* ===== BUTTONS ===== */
.btn-accent {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 16px 20px;
    background: #2DD4A0;
    color: #000000;
    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: #0A1F1A; 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(30, 92, 76, 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(30, 92, 76, 0.15); }
.btn-outline .btn-icon { width: 20px; height: 20px; flex-shrink: 0; color: #8BA89E; }
.btn-outline .accent { color: #2DD4A0; 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 (plans/setup/profile) ===== */
.screen {
    min-height: 100vh;
    min-height: 100dvh;
    background: #0A1F1A;
    padding: 16px 20px 32px;
}

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

/* ===== CARDS ===== */
.card {
    background: #112E26;
    border: 1px solid rgba(30, 92, 76, 0.2);
    border-radius: 16px;
    padding: 18px 16px;
    margin-bottom: 12px;
}
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.card-sub { font-size: 13px; color: #8BA89E; margin-bottom: 4px; }

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

.plans-outer-card {
    background: linear-gradient(180deg, #0F2B1F 0%, #0A1E15 100%);
    border: 1px solid rgba(26, 77, 53, 0.5);
    border-radius: 20px;
    padding: 20px 16px;
    position: relative;
    overflow: hidden;
}
/* Subtle radial glow */
.plans-outer-card::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(13, 51, 34, 0.4) 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: #8BA89E;
    line-height: 1.4;
    margin-bottom: 18px;
}

/* Device row */
.device-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    background: #0D2520;
    border: 1px solid rgba(45, 212, 160, 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: #1A3D2E;
    flex-shrink: 0;
}
.device-count {
    font-size: 24px;
    font-weight: 700;
    color: #4ADE80;
}
.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: #8BA89E; margin-top: 1px; }

.savings-badge {
    background: #E53935;
    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 — 5 dots on a track bar */
.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: #1A3D2E;
    border-radius: 16px;
    overflow: hidden;
}
.dot-track-fill {
    height: 100%;
    background: linear-gradient(90deg, #1A6B4A, #2DD4A0);
    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(13, 37, 32, 0.6);
    border: none;
    cursor: pointer;
    z-index: 2;
}
.dot-pos.filled {
    background: #4ADE80;
}
.dot-pos.thumb {
    width: 28px; height: 28px;
    background: #FFFFFF;
    border: 3px solid #2DD4A0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 10px rgba(45, 212, 160, 0.4);
    z-index: 3;
}

/* Plan grid 2x2 */
.plan-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.plan-tile {
    background: rgba(15, 43, 31, 0.6);
    border: 1px solid rgba(30, 92, 76, 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: #2DD4A0;
    background: rgba(45, 212, 160, 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: #2DD4A0;
    color: #000;
    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: #2DD4A0;
    margin-bottom: 2px;
}
.plan-tile-per {
    font-size: 12px;
    color: #8BA89E;
}

/* Pay section (sticky bottom) */
.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: linear-gradient(135deg, #00D68F 0%, #00B577 100%);
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 214, 143, 0.25);
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-pay:active { background: linear-gradient(135deg, #00B577 0%, #009960 100%); box-shadow: 0 2px 10px rgba(0, 214, 143, 0.2); }
.btn-pay .old-price {
    text-decoration: line-through;
    color: #2DD4A0;
    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(30, 92, 76, 0.3);
    border-radius: 10px;
    color: #8BA89E;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
}
.platform-tab.active {
    background: rgba(45, 212, 160, 0.12);
    border-color: #2DD4A0;
    color: #2DD4A0;
}

.vless-box {
    background: #0A1F1A;
    border: 1px solid rgba(30, 92, 76, 0.3);
    border-radius: 10px;
    padding: 14px;
    font-size: 12px;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    color: #8BA89E;
    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: #8BA89E; margin-top: 8px; }

.step { display: flex; gap: 12px; margin-bottom: 14px; align-items: flex-start; }
.step-num {
    width: 28px; height: 28px;
    background: rgba(45, 212, 160, 0.12);
    color: #2DD4A0;
    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 (UltimaVPN style) ===== */
.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: #8BA89E;
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.prof-copy-icon {
    cursor: pointer;
    color: #8BA89E;
    display: inline-flex;
    align-items: center;
}
.prof-copy-icon:active { color: #2DD4A0; }

/* Menu list */
.prof-menu {
    background: #0D2B24;
    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(45, 212, 160, 0.06);
}
.prof-menu-item + .prof-menu-item {
    border-top: 1px solid rgba(30, 92, 76, 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(45, 212, 160, 0.12);
    color: #2DD4A0;
}
.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(248, 113, 113, 0.12);
    color: #F87171;
}
.prof-menu-text {
    font-size: 15px;
    font-weight: 500;
    color: #FFFFFF;
}

/* Subscription link section */
.prof-sub-section {
    margin-bottom: 16px;
}
.prof-sub-label {
    font-size: 14px;
    color: #8BA89E;
    margin-bottom: 10px;
}
.prof-sub-link {
    background: #0D2B24;
    border-radius: 14px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
}
.prof-sub-link:active {
    background: #0F332B;
}
.prof-sub-url {
    font-size: 14px;
    color: #8BA89E;
    word-break: break-all;
    flex: 1;
}
.prof-sub-copy {
    color: #5A7D72;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

/* Instructions button */
.prof-instructions-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: #0D2B24;
    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: #0F332B;
}
.prof-instructions-icon {
    color: #2DD4A0;
    display: flex;
    align-items: center;
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 40px; left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #112E26;
    border: 1px solid rgba(30, 92, 76, 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, #112E26 25%, #1A3D34 50%, #112E26 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, #152E26 0%, #0F231D 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: #8BA89E;
    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: #7A9E91; }
.confirm-info-value { font-size: 14px; font-weight: 500; color: #E8F0EC; }
.confirm-info-row.total .confirm-info-label { font-weight: 600; color: #A0C4B6; }
.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: #7A9E91; margin-top: 2px; }
.confirm-method-arrow { color: #5A7D6F; flex-shrink: 0; }
.confirm-method-arrow svg { width: 20px; height: 20px; }

/* Quick-pay radio selection */
.confirm-method--selected {
    background: rgba(74, 222, 128, 0.08);
    border-color: rgba(74, 222, 128, 0.25);
}
.confirm-method-radio {
    width: 22px; height: 22px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.radio-dot {
    width: 18px; height: 18px;
    border-radius: 50%;
    border: 2px solid #5A7D6F;
    transition: all 0.2s;
}
.radio-dot.active {
    border-color: #4ADE80;
    background: #4ADE80;
    box-shadow: inset 0 0 0 3px #0D2520;
}

.confirm-pay-btn {
    width: 100%; padding: 17px;
    background: linear-gradient(135deg, #00D68F 0%, #00B577 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(0, 214, 143, 0.25);
    letter-spacing: -0.2px;
}
.confirm-pay-btn:active {
    transform: scale(0.98);
    box-shadow: 0 2px 10px rgba(0, 214, 143, 0.2);
}

.confirm-secure {
    text-align: center; font-size: 12px; color: #5A7D6F;
    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, #152E26 0%, #0F231D 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(30, 92, 76, 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: #8BA89E;
}
.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: #2DD4A0;
    margin: 16px 0 8px;
}
.agreement-body h3:first-child { margin-top: 0; }
.agreement-body p {
    font-size: 13px; color: #B0C9C0; 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: #888; 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: #888;
}
.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: #888;
    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: #888; text-align: center; padding: 40px 0; }
.referral-error { color: #ff6b6b; text-align: center; padding: 20px 0; }

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

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

.wizard-hero-icon {
    position: relative;
    width: 72px; height: 72px;
    color: #2DD4A0;
    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(74, 222, 128, 0.15);
    stroke-width: 3;
}
.wizard-progress-bar {
    fill: none;
    stroke: #4ADE80;
    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(74, 222, 128, 0.3)); }
    50% { stroke-opacity: 0.7; filter: drop-shadow(0 0 12px rgba(74, 222, 128, 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: #8BA89E;
    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 (UltimaVPN style) ===== */
.pay-screen { padding-top: 8px; }
.pay-title { font-size: 26px; font-weight: 700; margin-bottom: 20px; }

.pay-empty-card {
    background: #0D2B24; border-radius: 16px; padding: 32px 20px;
    text-align: center; margin-bottom: 12px;
}
.pay-empty-icon { color: #8BA89E; margin-bottom: 12px; display: flex; justify-content: center; }
.pay-empty-text { font-size: 15px; color: #FFFFFF; }

.pay-method-card {
    background: #0D2B24; 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(45, 212, 160, 0.12); color: #2DD4A0;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
/* СБП icon — match confirm-method-icon style */
.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: #8BA89E; margin-top: 2px; }
.pay-method-delete { color: #5A7D72; cursor: pointer; padding: 8px; }
.pay-method-delete:active { color: #F87171; }

.pay-autorenew-card {
    background: #0D2B24; 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: #3A5A50; 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: #2DD4A0; }
.toggle input:checked + .toggle-slider:before { transform: translateX(20px); }

/* History section */
.pay-history-btn {
    background: #0D2B24; 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(30, 92, 76, 0.15);
}
.pay-history-item:last-child { border-bottom: none; }
.pay-history-date { font-size: 13px; color: #8BA89E; }
.pay-history-amount { font-size: 14px; font-weight: 600; }
.pay-history-status { font-size: 12px; color: #2DD4A0; }
.pay-history-status.failed { color: #F87171; }

/* ===== DISCOUNT ===== */
.price-old {
    text-decoration: line-through;
    color: var(--text-secondary, #8BA89E);
    font-size: 14px;
    margin-right: 8px;
}

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

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

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

.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: #4CAF50;
    margin-bottom: 12px;
    font-weight: 500;
}
.rt-item {
    display: flex;
    align-items: center;
    gap: 8px;
}
.rt-dot {
    color: #2AABEE;
    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: #888;
    min-width: 45px;
    font-size: 12px;
}
.rt-separator {
    color: #333;
    font-size: 10px;
}
.rt-name {
    color: #fff;
    font-weight: 500;
}
.rt-days {
    color: #4CAF50;
    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: #888;
    font-size: 13px;
}
.rt-empty-hint {
    color: #555;
    font-size: 12px;
    font-style: italic;
}

/* ═══════════════════════════════════════════════════════
   TRANSACTIONS BOTTOM SHEET
   ═══════════════════════════════════════════════════════ */

/* ── Overlay (копия .referral-overlay) ────────────────── */
.txn-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;
}
.txn-overlay.visible { background: rgba(0,0,0,0.5); pointer-events: auto; }

/* ── Sheet (копия .referral-sheet) ────────────────────── */
.txn-sheet {
    width: 100%;
    max-height: 85vh;
    background: #0d1117;
    border-radius: 16px 16px 0 0;
    padding: 0;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.txn-overlay.visible .txn-sheet { transform: translateY(0); }

/* ── Drag handle ──────────────────────────────────────── */
.txn-handle {
    display: flex;
    justify-content: center;
    padding: 12px 0 0;
    flex-shrink: 0;
}
.txn-handle-bar {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.15);
}

/* ── Header ───────────────────────────────────────────── */
.txn-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px 12px;
    flex-shrink: 0;
}
.txn-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}
.txn-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s;
    flex-shrink: 0;
}
.txn-close:active { background: rgba(255, 255, 255, 0.2); }
.txn-close svg { display: block; }

/* ── Summary card ─────────────────────────────────────── */
.txn-summary {
    margin: 0 20px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    gap: 16px;
}
.txn-summary-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.txn-summary-label {
    font-size: 12px;
    color: #8BA89E;
    letter-spacing: 0.02em;
}
.txn-summary-value {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.02em;
}
.txn-summary-value.accent { color: #2DD4A0; }

/* ── Filter chips ─────────────────────────────────────── */
.txn-filters {
    display: flex;
    gap: 6px;
    padding: 0 20px 14px;
    flex-shrink: 0;
}
.txn-filter-chip {
    padding: 7px 14px;
    border-radius: 20px;
    border: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.2s;
    color: #8BA89E;
    background: rgba(255, 255, 255, 0.05);
}
.txn-filter-chip.active {
    color: #000;
    background: #2DD4A0;
}
.txn-filter-chip:not(.active):active {
    background: rgba(255, 255, 255, 0.1);
}

/* ── Scrollable body ──────────────────────────────────── */
.txn-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    padding: 0 20px 24px;
}
.txn-body::-webkit-scrollbar { width: 0; }

/* ── Date group ───────────────────────────────────────── */
.txn-date-group { margin-bottom: 20px; }
.txn-date-label {
    font-size: 12px;
    font-weight: 500;
    color: #8BA89E;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0 2px 10px;
}

/* ── Transaction row ──────────────────────────────────── */
.txn-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s;
}
.txn-item:last-child { border-bottom: none; }
.txn-item:active { background: rgba(255, 255, 255, 0.03); border-radius: 10px; }

/* ── Status icon ──────────────────────────────────────── */
.txn-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.txn-icon.completed { background: rgba(45, 212, 160, 0.12); }
.txn-icon.pending   { background: rgba(245, 158, 11, 0.12); }
.txn-icon.failed    { background: rgba(239, 68, 68, 0.12); }

/* ── Info (plan + date) ───────────────────────────────── */
.txn-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.txn-plan {
    font-size: 15px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
}
.txn-meta {
    font-size: 13px;
    color: #8BA89E;
    display: flex;
    align-items: center;
    gap: 6px;
}
.txn-auto-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: #2DD4A0;
    background: rgba(45, 212, 160, 0.1);
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 500;
}

/* ── Amount + status ──────────────────────────────────── */
.txn-right {
    text-align: right;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}
.txn-amount {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.02em;
}
.txn-status { font-size: 11px; font-weight: 500; letter-spacing: 0.02em; }
.txn-status.completed { color: #2DD4A0; }
.txn-status.pending   { color: #F59E0B; }
.txn-status.failed    { color: #EF4444; }

/* ── Empty state ──────────────────────────────────────── */
.txn-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    gap: 16px;
}
.txn-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
}
.txn-empty-title {
    font-size: 17px;
    font-weight: 600;
    color: #fff;
    text-align: center;
    letter-spacing: -0.01em;
}
.txn-empty-desc {
    font-size: 14px;
    color: #8BA89E;
    text-align: center;
    line-height: 1.5;
    max-width: 240px;
}

/* ── Loading spinner ──────────────────────────────────── */
.txn-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 24px;
    gap: 12px;
}
.txn-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255,255,255,0.1);
    border-top-color: #2DD4A0;
    border-radius: 50%;
    animation: txn-spin 0.7s linear infinite;
}
@keyframes txn-spin { to { transform: rotate(360deg); } }

/* ── Responsive (small screens) ───────────────────────── */
@media (max-width: 380px) {
    .txn-summary { gap: 10px; padding: 14px; }
    .txn-summary-value { font-size: 16px; }
    .txn-header { padding: 14px 18px 10px; }
    .txn-filters { padding: 0 18px 12px; }
    .txn-body { padding: 0 18px 20px; }
    .txn-summary { margin: 0 18px 14px; }
}

/* ===== REFERRAL BANNER ===== */
.ref-banner {
    margin-top: 14px;
    background: linear-gradient(160deg, rgba(22,68,52,0.95) 0%, rgba(14,42,34,0.98) 50%, rgba(12,36,28,1) 100%);
    border: 1px solid rgba(45,212,160,0.2);
    border-radius: 20px;
    padding: 20px 18px 18px;
    position: relative;
    overflow: hidden;
}
/* Ambient glow top-right */
.ref-banner::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -20px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(45,212,160,0.08) 0%, transparent 65%);
    pointer-events: none;
}
/* Subtle bottom-left glow */
.ref-banner::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -10px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(45,212,160,0.04) 0%, transparent 65%);
    pointer-events: none;
}

/* ===== REFERRAL BANNER — TOP ROW ===== */
.ref-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}
.ref-gift {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(45,212,160,0.15) 0%, rgba(45,212,160,0.06) 100%);
    border: 1px solid rgba(45,212,160,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}
.ref-gift-icon {
    width: 24px;
    height: 24px;
    color: #2DD4A0;
    filter: drop-shadow(0 0 6px rgba(45,212,160,0.3));
}
.ref-top-text {
    flex: 1;
}
.ref-top-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.3px;
    line-height: 1.25;
}
.ref-top-sub {
    font-size: 12.5px;
    color: #6B9B8E;
    margin-top: 3px;
    letter-spacing: -0.1px;
}
.ref-earned {
    background: linear-gradient(135deg, rgba(45,212,160,0.14) 0%, rgba(45,212,160,0.08) 100%);
    color: #2DD4A0;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 11px;
    border-radius: 10px;
    white-space: nowrap;
    border: 1px solid rgba(45,212,160,0.12);
    letter-spacing: -0.2px;
}

/* ===== REFERRAL BANNER — MILESTONE TRACK ===== */
.ms-track {
    position: relative;
    margin: 0 6px 14px;
    padding: 0;
}
.ms-line {
    position: absolute;
    top: 18px;
    left: 24px;
    right: 24px;
    height: 3px;
    background: rgba(255,255,255,0.05);
    border-radius: 2px;
    z-index: 0;
}
.ms-line-fill {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, #2DD4A0 0%, #3BEAB8 100%);
    box-shadow: 0 0 8px rgba(45,212,160,0.3);
    transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}
.ms-dots {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}
.ms-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 56px;
}
.ms-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    border: 2px solid rgba(255,255,255,0.08);
    background: rgba(12,38,30,0.9);
    color: rgba(255,255,255,0.25);
    transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
}
.ms-circle.done {
    background: linear-gradient(135deg, #2DD4A0, #25B98D);
    border-color: transparent;
    color: #0A1F1A;
    box-shadow: 0 2px 12px rgba(45,212,160,0.3);
}
.ms-circle.done svg {
    width: 16px;
    height: 16px;
}
.ms-circle.next {
    border-color: #2DD4A0;
    color: #2DD4A0;
    background: rgba(45,212,160,0.06);
    box-shadow: 0 0 0 5px rgba(45,212,160,0.1), 0 0 16px rgba(45,212,160,0.08);
    animation: pulse-ring 2.5s ease-in-out infinite;
}
.ms-circle.mega {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255,200,55,0.4);
    background: linear-gradient(135deg, rgba(255,200,55,0.1) 0%, rgba(255,170,30,0.05) 100%);
    color: #FFD23F;
    font-size: 18px;
    box-shadow: 0 0 20px rgba(255,200,55,0.08);
    animation: glow-gold 3s ease-in-out infinite;
}

/* ===== REFERRAL BANNER — ANIMATIONS ===== */
@keyframes pulse-ring {
    0%, 100% { box-shadow: 0 0 0 5px rgba(45,212,160,0.1), 0 0 16px rgba(45,212,160,0.08); }
    50% { box-shadow: 0 0 0 8px rgba(45,212,160,0.18), 0 0 24px rgba(45,212,160,0.12); }
}
@keyframes glow-gold {
    0%, 100% { box-shadow: 0 0 20px rgba(255,200,55,0.08); }
    50% { box-shadow: 0 0 28px rgba(255,200,55,0.15); }
}

/* ===== REFERRAL BANNER — LABELS ===== */
.ms-label {
    font-size: 10.5px;
    font-weight: 600;
    color: rgba(255,255,255,0.3);
    text-align: center;
    line-height: 1.2;
    letter-spacing: 0.2px;
}
.ms-label.done-label {
    color: rgba(45,212,160,0.55);
}
.ms-label.mega-label {
    color: #FFD23F;
    font-weight: 800;
    font-size: 10.5px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    text-shadow: 0 0 12px rgba(255,200,55,0.15);
}

/* ===== REFERRAL BANNER — INFO ROW ===== */
.ref-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding: 0 2px;
}
.ref-info-left {
    font-size: 13px;
    color: rgba(255,255,255,0.45);
}
.ref-info-left b {
    color: rgba(255,255,255,0.9);
    font-weight: 600;
}
.ref-info-right {
    font-size: 12px;
    color: #2DD4A0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0.85;
}

/* ===== REFERRAL BANNER — CTA BUTTON ===== */
.ref-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #2DD4A0 0%, #25BA8E 100%);
    color: #0A1F1A;
    border: none;
    border-radius: 14px;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    width: 100%;
    cursor: pointer;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 24px rgba(45,212,160,0.25), 0 1px 3px rgba(0,0,0,0.2);
    transition: transform 0.15s, box-shadow 0.2s;
    letter-spacing: -0.2px;
}
.ref-cta:active {
    transform: scale(0.97);
    box-shadow: 0 2px 12px rgba(45,212,160,0.15);
}

/* ===== REFERRAL BANNER — FOOTER ===== */
.ref-footer {
    text-align: center;
    font-size: 11px;
    color: rgba(255,255,255,0.25);
    margin-top: 10px;
    line-height: 1.4;
    letter-spacing: -0.1px;
}
/* ═══════════════════════════════════════════════════════
   ONBOARDING SPOTLIGHT OVERLAY
   Premium coach mark with SVG mask cutout
   ═══════════════════════════════════════════════════════ */

/* ── Overlay container ────────────────────────────────── */
.onboarding-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}
.onboarding-overlay.visible {
    opacity: 1;
}

/* ── SVG mask (full-screen darkening with cutout) ─────── */
.onboarding-mask {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* ── Pulsing ring around the cutout button ────────────── */
.onboarding-ring {
    position: fixed;
    z-index: 101;
    border-radius: 16px;
    border: 2px solid rgba(45, 212, 160, 0.6);
    box-shadow:
        0 0 0 0 rgba(45, 212, 160, 0.3),
        0 0 20px rgba(45, 212, 160, 0.15),
        inset 0 0 20px rgba(45, 212, 160, 0.04);
    cursor: pointer;
    animation: onboarding-ring-pulse 2s ease-in-out infinite;
}

@keyframes onboarding-ring-pulse {
    0%, 100% {
        box-shadow:
            0 0 0 0 rgba(45, 212, 160, 0.3),
            0 0 20px rgba(45, 212, 160, 0.15),
            inset 0 0 20px rgba(45, 212, 160, 0.04);
    }
    50% {
        box-shadow:
            0 0 0 8px rgba(45, 212, 160, 0.08),
            0 0 40px rgba(45, 212, 160, 0.25),
            inset 0 0 24px rgba(45, 212, 160, 0.06);
    }
}

/* ── Tooltip ──────────────────────────────────────────── */
.onboarding-tooltip {
    position: fixed;
    z-index: 103;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #2DD4A0 0%, #22C08A 100%);
    color: #0A1F1A;
    padding: 13px 22px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: -0.2px;
    box-shadow:
        0 8px 32px rgba(45, 212, 160, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.25);
    animation: onboarding-bounce 2s ease-in-out infinite;
    pointer-events: none;
}

/* Arrow pointing down */
.onboarding-tooltip::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 9px solid #27B88A;
}

@keyframes onboarding-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-6px); }
}

/* ── Skip button — subtle, non-distracting ────────────── */
.onboarding-skip {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 104;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.2s, color 0.2s;
    letter-spacing: -0.1px;
}
.onboarding-skip:active {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
}

/* ══════════════════════════════════════════════════════════════════════════
   aimx — экраны «выбор тарифа» и «подтверждение» мини-приложения бота.
   Юнит bot-plans-payments-20260829. Визуальный язык андроид-приложения
   (Color.kt, Type.kt, Shape.kt, TariffCard.kt, RenewSheet.kt, ConfirmSheet.kt).

   ПРАВИЛА ЭТОГО БЛОКА — механически проверяемые (блюпринт §2.2):
     1. Каждый селектор несёт префикс `aimx-`. Ни одного общего имени.
     2. Ни одного `:root`. Токены живут на `.aimx-root`, и только `--aimx-*`.
        Причина конкретная: во всём боевом файле есть РОВНО одна переменная —
        `var(--text-secondary, #8BA89E)` в `.price-old`. Глобальное объявление
        перекрасило бы её во всём приложении.
     3. Ни одного селектора по типу элемента — только классы.
     4. Ни одного @keyframes: шаги `from`/`to`/`0%` не могут нести префикс,
        поэтому движение сделано переходами (transform/opacity), а вращение
        спиннера — SMIL внутри его собственного SVG.
     5. Блок ДОПИСАН в конец. Строки 1..1839 не тронуты ни одним символом.
   ══════════════════════════════════════════════════════════════════════════ */

.aimx-root {
    /* Палитра — Color.kt:6..31 */
    --aimx-bg: #051510;
    --aimx-panel: #0A0D0B;
    --aimx-panel-deep: #050806;
    --aimx-receipt: #050606;
    --aimx-brand: #00FFA3;
    --aimx-pay-b: #00DF8F;
    --aimx-tx: #FFFFFF;
    --aimx-tx-2: #A1A1AA;
    --aimx-tx-3: #71717A;
    --aimx-micro: #0A0E0C;
    --aimx-micro-sel: #0D1612;
    --aimx-badge-idle: #151A17;
    --aimx-pm-bg: #0B1813;
    --aimx-pm-bord: #162E23;
    --aimx-pm-icobox: #112119;
    --aimx-pm-icobord: #1C3328;
    --aimx-pm-ico: #5C7E6D;
    --aimx-pm-badge-tx: #013320;
    --aimx-on-brand: #020503;
    --aimx-line-04: rgba(255, 255, 255, .04);
    --aimx-line-05: rgba(255, 255, 255, .05);
    --aimx-line-08: rgba(255, 255, 255, .08);
    --aimx-line-10: rgba(255, 255, 255, .10);
    --aimx-brand-08: rgba(0, 255, 163, .08);
    --aimx-brand-15: rgba(0, 255, 163, .15);
    --aimx-brand-30: rgba(0, 255, 163, .30);
    --aimx-brand-40: rgba(0, 255, 163, .40);
    /* Типографика — Type.kt: Inter для текста, моно для цен. Веб-шрифты
       НЕ подключаются: третий сторонний источник на денежном пути в WebView
       и риск недоступности из РФ. Макет снят на системных стеках. */
    --aimx-font-ui: -apple-system, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --aimx-font-mono: ui-monospace, 'SF Mono', 'Roboto Mono', 'Cascadia Mono', Menlo, Consolas, monospace;
    /* Движение — RenewSheet.kt:35 (EaseOutExpo) */
    --aimx-ease: cubic-bezier(.16, 1, .3, 1);
    --aimx-t-in: 400ms;
    --aimx-t-state: 200ms;
    /* Радиусы — Shape.kt */
    --aimx-r-sheet: 32px;
    --aimx-r-hero: 20px;
    --aimx-r-micro: 16px;
    --aimx-r-zone: 24px;
    --aimx-r-pay: 20px;
    --aimx-r-btn: 18px;
    --aimx-r-pm: 14px;
    --aimx-glow-card: 0 0 24px rgba(0, 255, 163, .15);
    --aimx-glow-text: 0 0 8px var(--aimx-brand-40);

    font-family: var(--aimx-font-ui);
    color: var(--aimx-tx);
    -webkit-tap-highlight-color: transparent;
}

/* ── Экран выбора тарифа ──────────────────────────────────────────────── */
.aimx-plans {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 24px);
    padding: 14px 16px 12px;
    background:
        radial-gradient(120% 42% at 50% -6%, rgba(0, 255, 163, .06), transparent 60%),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, .012) 0 .5px, transparent .5px 5px),
        repeating-linear-gradient(-45deg, rgba(255, 255, 255, .012) 0 .5px, transparent .5px 5px),
        var(--aimx-bg);
    overflow: hidden;
    transition: transform .25s var(--aimx-ease);
}

.aimx-watermark {
    position: absolute;
    left: 50%;
    top: 34%;
    transform: translate(-50%, -50%);
    width: min(46vw, 190px);
    aspect-ratio: 1;
    color: var(--aimx-brand);
    opacity: .05;
    pointer-events: none;
}

.aimx-watermark .aimx-mark {
    width: 100%;
    height: 100%;
    display: block;
}

.aimx-head {
    padding: 6px 4px 18px;
}

.aimx-h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.3px;
    line-height: 1.2;
}

.aimx-sub {
    margin-top: 4px;
    font-size: 13px;
    color: var(--aimx-tx-3);
    line-height: 1.45;
}

/* Плавающая панель — RenewSheet.kt:99-113. Въезд снизу переходом, не анимацией. */
.aimx-panel {
    margin-top: auto;
    position: relative;
    background: var(--aimx-panel);
    border: 1px solid var(--aimx-line-10);
    border-radius: var(--aimx-r-sheet);
    padding: 16px 20px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, .55);
    transform: translateY(28px);
    opacity: 0;
    transition: transform var(--aimx-t-in) var(--aimx-ease), opacity var(--aimx-t-in);
}

.aimx-panel.aimx-in {
    transform: none;
    opacity: 1;
}

/* Степпер устройств — DeviceStepper.kt:29-133. В разметке ТОЛЬКО для тех
   тарифов, где выбор устройств разрешён; для остальных его нет вовсе. */
.aimx-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: rgba(0, 0, 0, .6);
    border: 1px solid var(--aimx-line-05);
    border-radius: 20px;
    padding: 8px;
    margin-bottom: 20px;
}

.aimx-stepper-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 12px;
    color: #D4D4D8;
    font-size: 14px;
    font-weight: 500;
}

.aimx-stepper-label .aimx-ico {
    width: 16px;
    height: 16px;
    color: var(--aimx-tx-3);
}

.aimx-stepper-ctrl {
    display: flex;
    align-items: center;
    background: var(--aimx-badge-idle);
    border: 1px solid var(--aimx-line-05);
    border-radius: 16px;
    padding: 4px;
}

.aimx-step-btn {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--aimx-line-05);
    color: var(--aimx-tx);
    font: 700 22px/1 var(--aimx-font-ui);
    transition: transform .15s var(--aimx-ease), background var(--aimx-t-state);
}

.aimx-step-btn:active {
    transform: scale(.9);
    background: rgba(255, 255, 255, .07);
}

.aimx-step-btn:disabled {
    color: rgba(255, 255, 255, .3);
    cursor: default;
}

.aimx-step-btn:focus-visible {
    outline: 2px solid var(--aimx-brand);
    outline-offset: 2px;
}

.aimx-step-val {
    width: 48px;
    text-align: center;
    font: 700 24px/1 var(--aimx-font-mono);
    color: var(--aimx-tx);
    font-variant-numeric: tabular-nums;
}

/* ── Годовая hero-карта — TariffCard.kt:30-164 ── */
.aimx-hero-wrap {
    position: relative;
    padding-top: 14px;
}

.aimx-hero {
    display: block;
    width: 100%;
    text-align: left;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background: var(--aimx-panel);
    border: 1px solid var(--aimx-line-08);
    border-radius: var(--aimx-r-hero);
    padding: 24px 20px;
    position: relative;
    overflow: hidden;
    color: var(--aimx-tx);
    transition: border-color var(--aimx-t-state), box-shadow var(--aimx-t-state), transform .18s var(--aimx-ease);
}

.aimx-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    background: linear-gradient(135deg, var(--aimx-brand-15), transparent 70%);
    transition: opacity var(--aimx-t-state);
    pointer-events: none;
}

.aimx-hero[aria-checked="true"] {
    border-color: var(--aimx-brand);
    box-shadow: var(--aimx-glow-card);
}

.aimx-hero[aria-checked="true"]::before {
    opacity: 1;
}

.aimx-hero:active {
    transform: scale(.97);
}

.aimx-hero:focus-visible {
    outline: 2px solid var(--aimx-brand);
    outline-offset: 3px;
}

.aimx-hero-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    position: relative;
}

.aimx-hero-name {
    font-size: 20px;
    font-weight: 700;
}

.aimx-hero-note {
    display: block;
    font-size: 12px;
    color: var(--aimx-tx-3);
    margin-top: 2px;
}

.aimx-hero-col {
    text-align: right;
    flex-shrink: 0;
}

.aimx-price-old {
    display: block;
    font: 400 18px/1.25 var(--aimx-font-mono);
    color: var(--aimx-tx-3);
    text-decoration: line-through;
}

.aimx-hero-price {
    font: 700 28px/1.15 var(--aimx-font-mono);
    color: var(--aimx-tx);
    letter-spacing: -.5px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    transition: color var(--aimx-t-state), text-shadow var(--aimx-t-state);
}

.aimx-hero[aria-checked="true"] .aimx-hero-price {
    color: var(--aimx-brand);
    text-shadow: var(--aimx-glow-text);
}

.aimx-hero-pm {
    display: block;
    font: 400 12px/1.4 var(--aimx-font-mono);
    color: var(--aimx-tx-3);
    white-space: nowrap;
}

/* Бейдж — TariffCard.kt:139-163. Рисуется ТОЛЬКО по флагу с сервера. */
.aimx-flag {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, 0);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--aimx-badge-idle);
    border: 1px solid var(--aimx-line-05);
    border-radius: 999px;
    padding: 6px 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .5);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--aimx-tx-3);
    white-space: nowrap;
    pointer-events: none;
    transition: background var(--aimx-t-state), color var(--aimx-t-state), box-shadow var(--aimx-t-state);
}

.aimx-crown {
    font-size: 11px;
    line-height: 1;
}

.aimx-hero-wrap.aimx-sel .aimx-flag {
    background: var(--aimx-brand);
    color: #000;
    border-color: transparent;
    box-shadow: 0 0 16px var(--aimx-brand-40);
}

/* ── Ряд мини-карт — RenewSheet.kt:150-172 ── */
.aimx-micro-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.aimx-micro {
    flex: 1 1 0;
    min-width: 0;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    text-align: center;
    background: var(--aimx-micro);
    border: 1px solid var(--aimx-line-05);
    border-radius: var(--aimx-r-micro);
    padding: 16px 10px;
    color: var(--aimx-tx);
    transition: border-color var(--aimx-t-state), background var(--aimx-t-state), box-shadow var(--aimx-t-state), transform .18s var(--aimx-ease);
}

.aimx-micro[aria-checked="true"] {
    background: var(--aimx-micro-sel);
    border-color: var(--aimx-brand);
    box-shadow: 0 0 18px rgba(0, 255, 163, .10);
}

.aimx-micro:active {
    transform: scale(.96);
}

.aimx-micro:focus-visible {
    outline: 2px solid var(--aimx-brand);
    outline-offset: 2px;
}

.aimx-micro-name {
    display: block;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 600;
    color: var(--aimx-tx-2);
    transition: color var(--aimx-t-state);
}

.aimx-micro[aria-checked="true"] .aimx-micro-name {
    color: var(--aimx-brand);
}

.aimx-micro-old {
    display: block;
    font: 400 13px/1.3 var(--aimx-font-mono);
    color: var(--aimx-tx-3);
    text-decoration: line-through;
    margin-top: 4px;
}

.aimx-micro-price {
    display: block;
    margin-top: 6px;
    font: 600 18px/1.2 var(--aimx-font-mono);
    letter-spacing: -.25px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    transition: color var(--aimx-t-state), text-shadow var(--aimx-t-state);
}

.aimx-micro[aria-checked="true"] .aimx-micro-price {
    color: var(--aimx-brand);
    text-shadow: var(--aimx-glow-text);
}

.aimx-micro-old + .aimx-micro-price {
    margin-top: 2px;
}

/* ── Зона оплаты — RenewSheet.kt:176-233 ── */
.aimx-pay-zone {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--aimx-line-05);
    border-radius: var(--aimx-r-zone);
    padding: 8px 8px 8px 20px;
}

.aimx-total-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--aimx-tx-3);
}

.aimx-total {
    margin-top: 2px;
    font: 700 22px/1.2 var(--aimx-font-mono);
    letter-spacing: -.5px;
    color: var(--aimx-tx);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.aimx-proceed {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    border: 0;
    height: 48px;
    padding: 0 24px;
    flex-shrink: 0;
    background: var(--aimx-brand);
    color: #000;
    border-radius: var(--aimx-r-btn);
    font: 700 13px/1 var(--aimx-font-ui);
    letter-spacing: 1.5px;
    box-shadow: 0 8px 22px var(--aimx-brand-30);
    transition: transform .18s var(--aimx-ease), box-shadow var(--aimx-t-state), filter var(--aimx-t-state);
}

.aimx-proceed:active {
    transform: scale(.95);
    filter: brightness(.92);
}

.aimx-proceed:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Скелет панели — экран рисуется сразу, до ответа ручки планов. */
.aimx-skel {
    border-radius: 12px;
    background: rgba(255, 255, 255, .05);
}

.aimx-skel-hero {
    height: 92px;
    margin-top: 14px;
}

.aimx-skel-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.aimx-skel-micro {
    flex: 1 1 0;
    height: 78px;
    border-radius: var(--aimx-r-micro);
    background: rgba(255, 255, 255, .04);
}

.aimx-skel-zone {
    height: 64px;
    margin-top: 12px;
    border-radius: var(--aimx-r-zone);
    background: rgba(255, 255, 255, .03);
}

/* ══ Шторка подтверждения — ConfirmSheet.kt ══════════════════════════════ */
.aimx-confirm-layer {
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
}

.aimx-confirm-layer.aimx-open {
    pointer-events: auto;
}

.aimx-scrim {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .85);
    opacity: 0;
    transition: opacity 300ms;
    pointer-events: none;
}

.aimx-confirm-layer.aimx-open .aimx-scrim {
    opacity: 1;
    pointer-events: auto;
}

.aimx-confirm {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: linear-gradient(160deg, var(--aimx-panel), var(--aimx-panel-deep));
    border: 1px solid var(--aimx-line-08);
    border-radius: var(--aimx-r-sheet);
    box-shadow: inset 0 1px 0 var(--aimx-brand-15), 0 30px 80px rgba(0, 0, 0, .65);
    padding: 16px 20px;
    transform: translateY(calc(100% + 40px));
    transition: transform var(--aimx-t-in) var(--aimx-ease), opacity 300ms;
    touch-action: pan-y;
}

.aimx-confirm-layer.aimx-open .aimx-confirm {
    transform: none;
}

.aimx-confirm.aimx-dragging {
    transition: none;
}

.aimx-confirm.aimx-flyout {
    transform: translateX(-115%);
    opacity: 0;
}

/* Чек — ConfirmSheet.kt:199-233 */
.aimx-receipt {
    background: var(--aimx-receipt);
    border: 1px solid var(--aimx-line-04);
    border-radius: 24px;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, .02);
    padding: 20px;
}

.aimx-r-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.aimx-r-div {
    height: 1px;
    margin: 16px 0;
    background: repeating-linear-gradient(90deg, var(--aimx-line-10) 0 4px, transparent 4px 8px);
}

.aimx-r-label {
    font-size: 13px;
    color: var(--aimx-tx-2);
}

.aimx-r-value {
    font-size: 15px;
    font-weight: 500;
    color: var(--aimx-tx);
    text-align: right;
}

.aimx-r-value.aimx-accent {
    color: var(--aimx-brand);
    font-size: 14px;
}

/* Карусель способов — PaymentTypeCard, ConfirmSheet.kt:238-252, 500-640 */
.aimx-pm-carousel {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    padding: 10px 2px 4px;
    overflow-x: auto;
    scrollbar-width: none;
    touch-action: pan-x;
}

.aimx-pm-carousel::-webkit-scrollbar {
    display: none;
}

.aimx-pm-wrap {
    position: relative;
    flex-shrink: 0;
    padding-top: 6px;
}

.aimx-pm-card {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    width: 116px;
    height: 74px;
    border-radius: var(--aimx-r-pm);
    background: var(--aimx-pm-bg);
    border: 1px solid var(--aimx-pm-bord);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px;
    color: var(--aimx-tx);
    transition: border-color var(--aimx-t-state), background var(--aimx-t-state), box-shadow var(--aimx-t-state), transform .18s var(--aimx-ease);
}

.aimx-pm-card[aria-checked="true"] {
    border: 2px solid var(--aimx-brand);
    background: var(--aimx-brand-08);
    box-shadow: 0 0 22px var(--aimx-brand-15);
    padding: 11px;
}

.aimx-pm-card:active {
    transform: scale(.96);
}

.aimx-pm-card:focus-visible {
    outline: 2px solid var(--aimx-brand);
    outline-offset: 2px;
}

/* СБП — 28px, размер владельцем одобрен («сбп ОК»), не меняем. */
.aimx-pm-logo {
    height: 28px;
    display: flex;
    align-items: center;
}

/* SberPay — знак словесный и широкий (168x81, соотношение 2.07). При 28px он
   был бы 58px шириной против почти квадратных 28px у СБП: уравниваем МАССУ,
   а не высоту. Требование владельца «уменьшить лого сбер пея». */
.aimx-pm-logo.aimx-wide {
    height: 20px;
}

.aimx-pm-logo .aimx-mark {
    height: 100%;
    width: auto;
    display: block;
}

.aimx-pm-logo .aimx-png {
    height: 100%;
    width: auto;
    display: block;
    border-radius: 8px;
}

.aimx-pm-iconbox {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--aimx-pm-icobox);
    border: 1px solid var(--aimx-pm-icobord);
    color: var(--aimx-pm-ico);
}

.aimx-pm-iconbox .aimx-ico {
    width: 14px;
    height: 14px;
}

.aimx-pm-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .05em;
}

.aimx-pm-sub {
    font-size: 10px;
    font-weight: 500;
    color: var(--aimx-tx-3);
    letter-spacing: .02em;
}

.aimx-pm-flag {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    background: var(--aimx-brand);
    color: var(--aimx-pm-badge-tx);
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .1em;
    white-space: nowrap;
    box-shadow: 0 0 12px var(--aimx-brand-40);
    pointer-events: none;
}

/* Кнопка оплаты — ConfirmSheet.kt:256-393 */
.aimx-btn-pay {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    border: 0;
    width: 100%;
    height: 58px;
    margin-top: 14px;
    border-radius: var(--aimx-r-pay);
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, var(--aimx-brand), var(--aimx-pay-b));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 12px 30px var(--aimx-brand-30);
    color: var(--aimx-on-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform .18s var(--aimx-ease), filter var(--aimx-t-state);
}

.aimx-btn-pay:active {
    transform: scale(.97);
}

.aimx-btn-pay:disabled {
    cursor: default;
    filter: saturate(.65) brightness(.9);
}

.aimx-btn-pay:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.aimx-btn-t {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
}

.aimx-btn-p {
    font: 800 17px/1 var(--aimx-font-mono);
    letter-spacing: -.5px;
    font-variant-numeric: tabular-nums;
}

.aimx-btn-logo {
    display: flex;
    align-items: center;
    height: 26px;
}

.aimx-btn-logo .aimx-mark {
    height: 100%;
    width: auto;
    display: block;
}

/* SberPay в кнопке — 38x18 вместо 46x22 макета, та же пропорция, что в карусели. */
.aimx-btn-logo .aimx-png {
    width: 38px;
    height: 18px;
    border-radius: 9px;
    display: block;
}

.aimx-spin {
    width: 24px;
    height: 24px;
    display: block;
}

.aimx-legal {
    margin-top: 10px;
    text-align: center;
    font-size: 10px;
    line-height: 1.45;
    color: var(--aimx-tx-3);
}

.aimx-legal .aimx-link {
    color: var(--aimx-brand);
    text-decoration: none;
    cursor: pointer;
}

.aimx-legal .aimx-link:focus-visible {
    outline: 1px solid var(--aimx-brand);
    outline-offset: 1px;
}

/* ── Узкие экраны ─────────────────────────────────────────────────────── */
@media (max-width: 344px) {
    .aimx-plans {
        padding-left: 12px;
        padding-right: 12px;
    }
    .aimx-stepper {
        padding: 6px;
        margin-bottom: 16px;
    }
    .aimx-stepper-label {
        padding-left: 8px;
        gap: 6px;
        font-size: 13px;
    }
    .aimx-step-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    .aimx-step-val {
        width: 38px;
        font-size: 20px;
    }
    .aimx-panel {
        padding: 14px 16px;
    }
    .aimx-hero {
        padding: 20px 16px;
    }
    .aimx-hero-price {
        font-size: 24px;
    }
    .aimx-hero-name {
        font-size: 18px;
    }
    .aimx-micro {
        padding: 14px 6px;
    }
    .aimx-micro-price {
        font-size: 15px;
    }
    .aimx-micro-name {
        font-size: 12px;
        letter-spacing: -.2px;
    }
    .aimx-micro-old {
        font-size: 11px;
    }
    .aimx-total {
        font-size: 19px;
    }
    .aimx-proceed {
        padding: 0 18px;
    }
    .aimx-confirm {
        left: 10px;
        right: 10px;
        padding: 14px 16px;
    }
    .aimx-receipt {
        padding: 16px;
    }
    .aimx-btn-p {
        font-size: 15px;
    }
    .aimx-btn-t {
        letter-spacing: .6px;
    }
}

/* ── Бережное движение ────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .aimx-panel,
    .aimx-confirm,
    .aimx-scrim,
    .aimx-hero,
    .aimx-micro,
    .aimx-pm-card,
    .aimx-btn-pay,
    .aimx-step-btn,
    .aimx-proceed,
    .aimx-plans {
        transition-duration: .01ms;
    }
}

/* ══ Отказ платежа — рисуется В шторке, не тостом ════════════════════════
   Тост (.toast, style.css:591) лежит слоем 999 под шторкой (:2369, слой 1000)
   и объявлен `white-space: nowrap`: на денежном экране человек не увидел бы ни
   причины отказа, ни совета «попробуйте СБП или карту». Здесь текст живёт
   внутри той же колонки, что и кнопка, и переносится по словам.            */
.aimx-pay-error {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: var(--aimx-r-pm);
    background: rgba(255, 92, 92, .10);
    border: 1px solid rgba(255, 92, 92, .28);
    color: #FFB4B4;
    font-size: 13px;
    line-height: 1.4;
    /* Перенос — половина правки: без него три из четырёх наших текстов шире
       экрана 390 и обрезаются с обеих сторон. */
    white-space: normal;
    overflow-wrap: anywhere;
}

/* ===== TG-D: «Места для устройств» (the mini-app's own palette: panels #0D2B24, muted #8BA89E, brand #2DD4A0) ===== */
.dev-screen { padding: 20px 16px 32px; gap: 0; }
.dev-title { font-size: 22px; font-weight: 600; color: #FFFFFF; margin-bottom: 6px; }
.dev-head { font-size: 15px; color: #FFFFFF; font-weight: 500; }
.dev-expires { font-size: 13px; color: #8BA89E; margin: 2px 0 16px; }
.dev-notice {
    background: rgba(45, 212, 160, 0.10); border: 1px solid rgba(45, 212, 160, 0.25); color: #D7F5EA;
    border-radius: 14px; padding: 12px 14px; font-size: 14px; line-height: 1.45; margin: 8px 0 14px;
}
.dev-notice[hidden] { display: none; }
.dev-list { background: #0D2B24; border-radius: 16px; overflow: hidden; margin-bottom: 14px; }
.dev-row { display: flex; align-items: center; gap: 12px; padding: 14px 12px 14px 18px; min-height: 64px; }
.dev-row + .dev-row { border-top: 1px solid rgba(30, 92, 76, 0.15); }
.dev-row-body { flex: 1 1 auto; min-width: 0; }
.dev-row-name { font-size: 15px; font-weight: 500; color: #FFFFFF; overflow-wrap: anywhere; }
.dev-row-sub { font-size: 13px; color: #8BA89E; margin-top: 3px; }
.dev-row-own .dev-row-sub, .dev-row-owner .dev-row-sub { color: #2DD4A0; }
.dev-row-waiting .dev-row-name { color: #B9CCC5; }
.dev-row-waiting .dev-row-sub { color: #FACC15; }
.dev-row-unlink {
    flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; border: 0; cursor: pointer;
    background: rgba(248, 113, 113, 0.12); color: #F87171; display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, transform 0.15s;
}
.dev-row-unlink svg { width: 20px; height: 20px; }
.dev-row-unlink:active { background: rgba(248, 113, 113, 0.22); transform: scale(0.94); }
.dev-row-unlink:focus-visible, .dev-action:focus-visible, .dev-code-copy:focus-visible,
.dev-confirm-cancel:focus-visible, .dev-confirm-ok:focus-visible { outline: 2px solid #2DD4A0; outline-offset: 2px; }
.dev-more { font-size: 13px; color: #8BA89E; padding: 12px 18px; border-top: 1px solid rgba(30, 92, 76, 0.15); }
.dev-hint { font-size: 14px; line-height: 1.45; color: #D7F5EA; background: rgba(250, 204, 21, 0.07);
    border-left: 3px solid #FACC15; border-radius: 0 12px 12px 0; padding: 10px 12px; margin-bottom: 10px; }
.dev-empty { font-size: 15px; color: #8BA89E; padding: 24px 4px; }
.dev-action {
    width: 100%; border: 1px solid rgba(45, 212, 160, 0.35); background: transparent; color: #2DD4A0;
    border-radius: 14px; padding: 14px 16px; font-size: 15px; font-weight: 600; cursor: pointer; margin-top: 6px;
}
.dev-action:active { background: rgba(45, 212, 160, 0.08); }
.dev-code { background: #0D2B24; border-radius: 16px; padding: 18px; margin-top: 14px; }
.dev-code-title { font-size: 13px; color: #8BA89E; text-transform: uppercase; letter-spacing: 0.06em; }
.dev-code-value { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 26px; letter-spacing: 0.12em;
    color: #FFFFFF; margin: 8px 0 12px; overflow-wrap: anywhere; }
.dev-code-copy { border: 0; border-radius: 12px; background: #2DD4A0; color: #06261D; font-weight: 600;
    font-size: 15px; padding: 11px 18px; cursor: pointer; }
.dev-code-copy:active { transform: scale(0.97); }
.dev-code-warn { font-size: 13px; line-height: 1.45; color: #8BA89E; margin-top: 12px; }
.dev-code-full { font-size: 13px; line-height: 1.45; color: #FACC15; margin-top: 8px; }
.dev-confirm-layer {
    position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, 0.72); display: flex;
    align-items: center; justify-content: center; padding: 24px; animation: dev-fade 160ms ease-out;
}
.dev-confirm {
    width: 100%; max-width: 380px; background: #0F332B; border: 1px solid rgba(45, 212, 160, 0.18);
    border-radius: 20px; padding: 22px 20px 16px; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}
.dev-confirm-text { font-size: 15px; line-height: 1.5; color: #FFFFFF; }
.dev-confirm-buttons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.dev-confirm-cancel, .dev-confirm-ok { border: 0; background: transparent; font-size: 15px; font-weight: 600;
    padding: 10px 14px; border-radius: 10px; cursor: pointer; }
.dev-confirm-cancel { color: #8BA89E; }
.dev-confirm-ok { color: #F87171; letter-spacing: 0.04em; }
.dev-confirm-cancel:active, .dev-confirm-ok:active { background: rgba(255, 255, 255, 0.06); }
/* RELINK-U (relink v3 §1): an unlinked program — a grey row (its words at .45, Android's STALE_ALPHA SeatsSection.kt:648),
   «Вернуть» in the outline of .dev-action, «Удалить» in the red of .dev-row-unlink; the words on the buttons never wrap.
   The owner 11.10 ~02:3x «чтобы корректно помещалось»: the words take the whole width, the buttons ALWAYS a line of their own
   under them, to the right, 44 high */
.dev-row-unlinked .dev-row-body { opacity: 0.45; }
.dev-row-unlinked { flex-wrap: wrap; }
.dev-row-acts { flex: 0 0 100%; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.dev-row-act {
    min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid rgba(45, 212, 160, 0.35); background: transparent;
    color: #2DD4A0; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background 0.15s, transform 0.15s;
}
.dev-row-act-hide { border-color: transparent; background: rgba(248, 113, 113, 0.12); color: #F87171; }
.dev-row-act:active { background: rgba(45, 212, 160, 0.08); transform: scale(0.94); }
.dev-row-act-hide:active { background: rgba(248, 113, 113, 0.22); }
.dev-row-act:focus-visible { outline: 2px solid #2DD4A0; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .dev-row-act { transition: none; } }
/* RELINK-MR (owner 11.10 ~21:3x «справа … там где кнопка отвязать», 12.10 ~12:2x «да»; Android RELINK-A
   @7094a37): one layout for all grey rows by measuring (app.js devFitGone) — in a line where «Отвязать» stands
   (the row's gap 12, the pair's gap 8), or one under the other on the right, «Вернуть» on top, both as wide as the
   widest (SeatsUnlinkedRows.kt:213-215, gap 12); without a class — under the words, as above (very large text), where
   the pair wraps («Удалить» under «Вернуть») when it cannot stand in one line (320 dp, text 2.0: 275 > 258 px — the
   owner 11.10 ~02:3x «чтобы корректно помещалось … чтобы не съезжал экран») */
.dev-row-unlinked.dev-gone-line, .dev-row-unlinked.dev-gone-stack { flex-wrap: nowrap; }
.dev-gone-line .dev-row-acts, .dev-gone-stack .dev-row-acts { flex: none; }
.dev-gone-stack .dev-row-acts { flex-direction: column; gap: 12px; }
@keyframes dev-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .dev-confirm-layer { animation: none; } .dev-row-unlink { transition: none; } }
