:root {
    --bg-base: #070a14;
    --bg-elevated: #0e1322;
    --bg-card: #131a2e;
    --bg-soft: #1c2540;
    --primary: #f7931a;
    --primary-light: #ffb04d;
    --primary-glow: rgba(247, 147, 26, 0.35);
    --secondary: #22d3ee;
    --success: #22c55e;
    --success-glow: rgba(34, 197, 94, 0.3);
    --danger: #ff3860;
    --danger-glow: rgba(255, 56, 96, 0.3);
    --purple: #a855f7;
    --pink: #ec4899;
    --text-main: #ffffff;
    --text-soft: #cbd5e1;
    --text-muted: #8896b0;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --border-primary: rgba(247, 147, 26, 0.4);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.7);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 26px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-base);
    color: var(--text-main);
    line-height: 1.55;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    font-size: 15px;
    background-image:
        radial-gradient(circle at 15% 0%, rgba(247, 147, 26, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 85% 100%, rgba(34, 211, 238, 0.1) 0%, transparent 45%);
    background-attachment: fixed;
}

/* ============ АНИМАЦИИ ============ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes modalPop {
    from { opacity: 0; transform: scale(0.94) translateY(16px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes pulseSoft {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
@keyframes pulseRing {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
    70% { box-shadow: 0 0 0 14px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
@keyframes pulseGlowOrange {
    0% { box-shadow: 0 8px 24px rgba(247, 147, 26, 0.4), 0 0 0 0 rgba(247, 147, 26, 0.5); }
    70% { box-shadow: 0 8px 24px rgba(247, 147, 26, 0.4), 0 0 0 16px rgba(247, 147, 26, 0); }
    100% { box-shadow: 0 8px 24px rgba(247, 147, 26, 0.4), 0 0 0 0 rgba(247, 147, 26, 0); }
}
@keyframes shimmer {
    0% { background-position: -600px 0; }
    100% { background-position: 600px 0; }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes floatCoin {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-110vh) rotate(540deg); opacity: 0; }
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes tickerScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
@keyframes blinkGreen {
    0%, 100% { color: var(--success); }
    50% { color: #4ade80; text-shadow: 0 0 12px var(--success); }
}
@keyframes msgIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}
@keyframes spinCircle {
    to { transform: rotate(360deg); }
}
@keyframes pulseGlow {
    0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(34, 197, 94, 0.5); }
    50% { transform: scale(1.08); box-shadow: 0 0 40px rgba(34, 197, 94, 0.8); }
}

/* ============ ФОН ============ */
.bg-decor {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.bg-decor::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(247, 147, 26, 0.14) 0%, transparent 65%);
    border-radius: 50%;
}
.bg-decor::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 55vw;
    height: 55vw;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.1) 0%, transparent 65%);
    border-radius: 50%;
}
.grid-overlay {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(247, 147, 26, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(247, 147, 26, 0.025) 1px, transparent 1px);
    background-size: 44px 44px;
    pointer-events: none;
    z-index: 0;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}
.floating-coins {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}
.coin {
    position: absolute;
    font-size: 20px;
    animation: floatCoin linear infinite;
    opacity: 0;
    will-change: transform, opacity;
}

/* ============ ИНДИКАТОР КУРСА ============ */
.rate-status {
    position: fixed;
    bottom: calc(14px + var(--safe-bottom));
    left: calc(14px + var(--safe-left));
    background: rgba(19, 26, 46, 0.9);
    border: 1px solid var(--border-strong);
    border-radius: 30px;
    padding: 8px 14px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 100;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s;
    font-family: 'JetBrains Mono', monospace;
    max-width: calc(100vw - 28px);
}
.rate-status .rs-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
    flex-shrink: 0;
    animation: pulseSoft 1.8s infinite;
}
.rate-status.syncing .rs-dot {
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary);
}
.rate-status.error .rs-dot {
    background: var(--danger);
    box-shadow: 0 0 8px var(--danger);
    animation: none;
}
.rate-status .rs-text { color: var(--text-muted); }
.rate-status .rs-text strong { color: var(--text-main); }

/* ============ ЛЕНДИНГ ============ */
.landing {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}
.top-ticker {
    background: linear-gradient(90deg, #0a0f1e, #131a2e, #0a0f1e);
    border-bottom: 1px solid var(--border);
    padding: 6px 0;
    overflow: hidden;
    position: relative;
    z-index: 40;
    height: 32px;
}
.top-ticker-track {
    display: flex;
    animation: tickerScroll 40s linear infinite;
    white-space: nowrap;
    width: max-content;
}
.ticker-item {
    padding: 0 24px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    border-right: 1px solid var(--border);
}
.ticker-item .sym { color: var(--text-muted); font-weight: 700; }
.ticker-item .val { color: var(--text-main); font-variant-numeric: tabular-nums; }
.ticker-item .chg { font-size: 10.5px; }
.ticker-item .chg.up { color: var(--success); }
.ticker-item .chg.down { color: var(--danger); }

.header {
    padding: 16px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(7, 10, 20, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 20px;
}
.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    box-shadow: 0 0 20px var(--primary-glow);
}
.logo span { color: var(--primary); }
.nav { display: flex; gap: 26px; }
.nav a {
    color: var(--text-soft);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}
.nav a:hover { color: var(--primary); }

.hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    text-align: center;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    border-radius: 30px;
    font-size: 13px;
    color: var(--success);
    font-weight: 600;
    margin-bottom: 24px;
}
.live-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulseSoft 1.8s infinite;
    box-shadow: 0 0 12px var(--success);
}
.hero h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(32px, 5.5vw, 66px);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -1.8px;
    margin-bottom: 22px;
    max-width: 900px;
}
.hero h1 .gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 5s ease infinite;
}
.hero p {
    font-size: 17px;
    color: var(--text-soft);
    max-width: 600px;
    margin-bottom: 40px;
}
.hero-stats {
    display: flex;
    gap: 44px;
    margin-top: 40px;
    flex-wrap: wrap;
    justify-content: center;
}
.hero-stat {
    text-align: center;
    padding: 16px 24px;
    background: rgba(19, 26, 46, 0.6);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
    min-width: 140px;
}
.hero-stat .value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}
.hero-stat .label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-top: 4px;
}

/* ============ МОДАЛКА ============ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: calc(16px + var(--safe-top)) calc(16px + var(--safe-right)) calc(16px + var(--safe-bottom)) calc(16px + var(--safe-left));
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.modal-overlay.active { opacity: 1; visibility: visible; }

.modal {
    background: linear-gradient(180deg, #131a2e 0%, #0e1322 100%);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    max-width: 560px;
    width: 100%;
    max-height: calc(100dvh - 32px - var(--safe-top) - var(--safe-bottom));
    overflow-y: auto;
    padding: 32px;
    position: relative;
    box-shadow: var(--shadow-lg), 0 0 80px rgba(247, 147, 26, 0.1);
    animation: modalPop 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    scrollbar-width: thin;
    scrollbar-color: rgba(247, 147, 26, 0.3) transparent;
    margin: auto;
}
.modal::-webkit-scrollbar { width: 6px; }
.modal::-webkit-scrollbar-thumb {
    background: rgba(247, 147, 26, 0.3);
    border-radius: 3px;
}
.modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary));
    background-size: 200% 100%;
    animation: gradientShift 4s linear infinite;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.step-indicator {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
}
.step-dot {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    transition: background 0.3s;
}
.step-dot.active {
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
}
.step-dot.done { background: var(--success); }

.modal-screen {
    display: none;
    animation: fadeInUp 0.35s ease;
}
.modal-screen.active { display: block; }

.modal-greeting {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.modal-greeting span {
    color: var(--secondary);
    font-weight: 600;
}
.modal-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.25;
    text-shadow: 0 0 30px var(--primary-glow);
}
.modal-title.danger {
    color: var(--danger);
    text-shadow: 0 0 30px var(--danger-glow);
}
.modal-text {
    color: var(--text-soft);
    font-size: 14px;
    margin-bottom: 14px;
    line-height: 1.7;
}
.modal-text strong {
    color: var(--text-main);
    font-weight: 700;
}
.modal-text .btc-highlight {
    color: var(--primary);
    font-weight: 700;
}
.modal-text .usd-highlight {
    color: var(--success);
    font-weight: 700;
}

/* ============ ГЕО ============ */
.geo-block {
    display: flex;
    gap: 10px;
    margin: 16px 0 18px;
    flex-wrap: wrap;
}
.geo-item {
    flex: 1;
    min-width: 140px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    background: rgba(7, 10, 20, 0.6);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
}
.geo-item .geo-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(34, 211, 238, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    color: var(--secondary);
}
.geo-item .geo-icon.ip-icon {
    background: rgba(247, 147, 26, 0.12);
    color: var(--primary);
}
.geo-item .geo-icon.loc-icon {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success);
}
.geo-item .geo-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.geo-item .geo-label {
    font-size: 9.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 2px;
}
.geo-item .geo-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-variant-numeric: tabular-nums;
}
.geo-item .geo-value.loading {
    color: var(--text-muted);
    animation: pulseSoft 1.5s infinite;
}


/* ============ DEVICE INFO ============ */
.device-info-block {
    background: linear-gradient(135deg, rgba(7, 10, 20, 0.7), rgba(19, 26, 46, 0.5));
    border: 1px solid var(--border-strong);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: 13px 15px;
    margin: 14px 0 18px;
    font-family: 'JetBrains Mono', monospace;
    position: relative;
    overflow: hidden;
}
.device-info-block::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 80px; height: 80px;
    background: radial-gradient(circle, rgba(247, 147, 26, 0.08) 0%, transparent 70%);
    pointer-events: none;
}
.device-info-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
    margin-bottom: 9px;
    position: relative;
    z-index: 1;
}
.device-icon {
    font-size: 20px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 6px var(--primary-glow));
}
.device-name {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.3px;
    word-break: break-word;
    line-height: 1.3;
}
.device-info-specs {
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: relative;
    z-index: 1;
}
.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    font-size: 11.5px;
    line-height: 1.4;
}
.spec-label {
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
    font-size: 9.5px;
    flex-shrink: 0;
}
.spec-value {
    color: var(--text-main);
    font-weight: 600;
    text-align: right;
    font-variant-numeric: tabular-nums;
    word-break: break-word;
}

@media (max-width: 768px) {
    .device-info-block {
        padding: 11px 12px;
        margin: 12px 0 14px;
    }
    .device-icon { font-size: 17px; }
    .device-name { font-size: 11.5px; }
    .spec-row { font-size: 11px; }
    .spec-label { font-size: 9px; }
}


/* ============ БАЛАНС-БЛОК ============ */
.balance-box {
    background: linear-gradient(135deg, rgba(247, 147, 26, 0.1), rgba(34, 211, 238, 0.05));
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}
.balance-box::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    background-size: 600px 100%;
    animation: shimmer 3s infinite;
    pointer-events: none;
}
.balance-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.8px;
    margin-bottom: 8px;
}
.balance-amount {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 40px;
    font-weight: 900;
    color: var(--text-main);
    line-height: 1.1;
    letter-spacing: -1px;
    text-shadow: 0 0 40px var(--primary-glow);
    font-variant-numeric: tabular-nums;
}
.balance-btc {
    font-size: 16px;
    color: var(--primary);
    font-weight: 700;
    margin-top: 6px;
    font-family: 'Space Grotesk', sans-serif;
    font-variant-numeric: tabular-nums;
}
.balance-week {
    font-size: 12px;
    color: var(--success);
    font-weight: 600;
    margin-top: 10px;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.25);
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
}

/* ============ СПИСОК ШАГОВ ============ */
.steps-list {
    list-style: none;
    counter-reset: step;
    margin: 20px 0;
}
.steps-list li {
    counter-increment: step;
    position: relative;
    padding: 14px 14px 14px 56px;
    background: rgba(28, 37, 64, 0.5);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    color: var(--text-soft);
    font-size: 13.5px;
    line-height: 1.55;
}
.steps-list li::before {
    content: counter(step);
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 13px;
    font-family: 'Space Grotesk', sans-serif;
}

/* ============ COUNTDOWN ============ */
.countdown {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 20px 0;
    padding: 18px 12px;
    background: rgba(255, 56, 96, 0.08);
    border: 1px solid rgba(255, 56, 96, 0.25);
    border-radius: var(--radius-md);
    flex-wrap: wrap;
}
.countdown-item {
    text-align: center;
    min-width: 54px;
}
.countdown-item .num {
    font-size: 26px;
    font-weight: 700;
    color: var(--danger);
    display: block;
    line-height: 1;
    font-family: 'Space Grotesk', sans-serif;
    font-variant-numeric: tabular-nums;
}
.countdown-item .lbl {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 6px;
    display: block;
}
.countdown-sep {
    font-size: 24px;
    font-weight: 700;
    color: var(--danger);
    opacity: 0.4;
    align-self: center;
}

/* ============ КНОПКИ ============ */
.btn {
    width: 100%;
    padding: 16px 24px;
    border-radius: 14px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.25s;
    border: none;
    text-decoration: none;
    text-align: center;
    display: inline-block;
    -webkit-appearance: none;
    appearance: none;
    letter-spacing: 0.3px;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #0a0e1a;
    box-shadow: 0 8px 24px rgba(247, 147, 26, 0.4);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(247, 147, 26, 0.55);
}
.btn-primary:active { transform: translateY(0); }
.btn-glow { animation: pulseGlowOrange 2.4s infinite; }

/* ============ ФОРМА ВХОДА ============ */
.login-form { margin-top: 18px; }
.login-form label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    margin-top: 16px;
    font-weight: 600;
}
.login-form input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(7, 10, 20, 0.6);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: 'JetBrains Mono', monospace;
    font-size: 14.5px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.login-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.login-form input[readonly] {
    color: var(--primary);
    cursor: default;
}

/* ============ КАБИНЕТ ============ */
.cabinet {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: var(--bg-base);
    overflow-y: auto;
    display: none;
    padding: calc(24px + var(--safe-top)) calc(16px + var(--safe-right)) calc(60px + var(--safe-bottom)) calc(16px + var(--safe-left));
    -webkit-overflow-scrolling: touch;
}
.cabinet.active { display: block; }
.cabinet-inner {
    max-width: 900px;
    margin: 0 auto;
}
.cabinet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 12px;
    flex-wrap: wrap;
}
.cabinet-header h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
}
.user-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: 30px;
    font-size: 12.5px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}
.user-chip .avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    flex-shrink: 0;
    box-shadow: 0 0 12px var(--primary-glow);
}
.balance-card {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated));
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.balance-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}
.balance-main {
    display: flex;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
}
.balance-main .btc {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 38px;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
    letter-spacing: -1px;
    text-shadow: 0 0 40px var(--primary-glow);
    font-variant-numeric: tabular-nums;
}
.balance-main .usd {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
}
.balance-rub {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 8px;
    font-variant-numeric: tabular-nums;
}
.action-card {
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-md);
}
.action-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px;
    margin-bottom: 12px;
}
.action-card p {
    color: var(--text-soft);
    font-size: 14px;
    margin-bottom: 14px;
    line-height: 1.65;
}


/* ============================================================
   CABINET DASHBOARD — крипто-биржа
   ============================================================ */

/* Верхний бегущий тикер в кабинете */
.cb-ticker-strip {
    background: linear-gradient(90deg, #0a0f1e, #131a2e, #0a0f1e);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0;
    overflow: hidden;
    margin-bottom: 16px;
    position: relative;
    height: 40px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
}
.cb-ticker-strip::before,
.cb-ticker-strip::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30px;
    z-index: 3;
    pointer-events: none;
}
.cb-ticker-strip::before {
    left: 0;
    background: linear-gradient(90deg, #0a0f1e, transparent);
}
.cb-ticker-strip::after {
    right: 0;
    background: linear-gradient(-90deg, #0a0f1e, transparent);
}
.cb-ticker-track {
    display: flex;
    animation: tickerScroll 80s linear infinite;
    white-space: nowrap;
    width: max-content;
}
.cb-tick {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px;
    height: 40px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    font-weight: 600;
    border-right: 1px solid var(--border);
}
.cb-tick-sym {
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.5px;
}
.cb-tick-val {
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
}
.cb-tick-chg.up { color: var(--success); }
.cb-tick-chg.down { color: var(--danger); }

/* Главный портфель */
.cb-portfolio-card {
    background: linear-gradient(135deg, #1a2440 0%, #131a2e 100%);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 60px rgba(247, 147, 26, 0.08), var(--shadow-md);
}
.cb-portfolio-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary));
    background-size: 200% 100%;
    animation: gradientShift 4s linear infinite;
}
.cb-portfolio-card::after {
    content: '';
    position: absolute;
    right: -50px;
    bottom: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(247, 147, 26, 0.08) 0%, transparent 65%);
    border-radius: 50%;
    pointer-events: none;
}
.cb-portfolio-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}
.cb-portfolio-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cb-portfolio-label::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--primary);
}
.cb-live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    color: var(--success);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    letter-spacing: 1.2px;
    padding: 4px 9px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: 20px;
}
.cb-live-indicator .dot {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success);
    animation: pulseSoft 1.4s infinite;
}
.cb-portfolio-value {
    display: flex;
    align-items: baseline;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}
.cb-portfolio-btc {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 38px;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: -1px;
    line-height: 1;
    text-shadow: 0 0 40px var(--primary-glow);
    font-variant-numeric: tabular-nums;
}
.cb-portfolio-usd {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
}
.cb-portfolio-rub {
    font-size: 14px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    font-variant-numeric: tabular-nums;
    position: relative;
    z-index: 1;
}
.cb-portfolio-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}
.cb-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    font-weight: 700;
}
.cb-change.up {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.3);
}
.cb-change.down {
    background: rgba(255, 56, 96, 0.12);
    color: var(--danger);
    border: 1px solid rgba(255, 56, 96, 0.3);
}
.cb-source-tag {
    font-size: 10px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 5px;
    letter-spacing: 0.5px;
}

/* Заголовок секции */
.cb-section-title {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    margin: 22px 0 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.cb-section-title::before {
    content: '';
    width: 3px;
    height: 12px;
    background: var(--primary);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--primary-glow);
}
.cb-section-title .cb-count {
    margin-left: auto;
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

/* Карточки криптовалют */
.cb-markets {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}
.cb-market-card {
    background: linear-gradient(135deg, #131a2e, #0e1322);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    padding: 12px 12px 8px;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.cb-market-card:hover {
    border-color: var(--border-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(247, 147, 26, 0.12);
}
.cb-market-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0;
    transition: opacity 0.25s;
}
.cb-market-card:hover::before { opacity: 0.8; }

.cb-market-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 6px;
}
.cb-market-name {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.cb-market-sym {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.3px;
    line-height: 1.1;
}
.cb-market-full {
    font-size: 9.5px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}
.cb-market-change {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 5px;
    white-space: nowrap;
}
.cb-market-change.up {
    color: var(--success);
    background: rgba(34, 197, 94, 0.1);
}
.cb-market-change.down {
    color: var(--danger);
    background: rgba(255, 56, 96, 0.1);
}
.cb-market-price {
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.cb-spark {
    width: 100%;
    height: 32px;
    display: block;
    margin-top: 2px;
}

/* Фиатные валюты */
.cb-fiat {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px;
}
.cb-fiat-card {
    background: linear-gradient(135deg, #131a2e, #0e1322);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto auto;
    column-gap: 10px;
    row-gap: 2px;
    align-items: center;
    transition: all 0.25s;
}
.cb-fiat-card:hover {
    border-color: var(--border-primary);
    transform: translateY(-2px);
}
.cb-fiat-code {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.5px;
    grid-column: 1;
    grid-row: 1;
}
.cb-fiat-name {
    font-size: 10px;
    color: var(--text-muted);
    grid-column: 1;
    grid-row: 2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
}
.cb-fiat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    grid-column: 2;
    grid-row: 1 / 3;
    text-align: right;
    font-variant-numeric: tabular-nums;
    align-self: center;
}
.cb-fiat-change {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    font-weight: 700;
    grid-column: 1 / 3;
    grid-row: 3;
    margin-top: 4px;
    text-align: right;
}
.cb-fiat-change.up { color: var(--success); }
.cb-fiat-change.down { color: var(--danger); }

/* Большой график */
.cb-big-chart-panel {
    background: linear-gradient(135deg, #0a0f1e, #0e1322);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin: 22px 0 16px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}
.cb-chart-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    gap: 10px;
    flex-wrap: wrap;
}
.cb-chart-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.cb-pair {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    background: rgba(247, 147, 26, 0.12);
    border: 1px solid var(--border-primary);
    padding: 4px 9px;
    border-radius: 5px;
    letter-spacing: 0.6px;
}
.cb-price-live {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
}
.cb-chart-tabs {
    display: flex;
    gap: 3px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 3px;
}
.cb-tab {
    padding: 5px 11px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.5px;
}
.cb-tab:hover { color: var(--text-main); }
.cb-tab.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #0a0e1a;
    box-shadow: 0 4px 12px rgba(247, 147, 26, 0.3);
}
.cb-chart-wrap {
    height: 220px;
    position: relative;
}
#cbBigChart {
    width: 100% !important;
    height: 220px !important;
}

.cb-loading {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 12.5px;
    font-family: 'JetBrains Mono', monospace;
}

/* Мобильный адаптив кабинета */
@media (max-width: 768px) {
    .cb-markets {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .cb-fiat {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .cb-portfolio-card { padding: 20px; }
    .cb-portfolio-btc { font-size: 28px; }
    .cb-portfolio-usd { font-size: 16px; }
    .cb-portfolio-rub { font-size: 12.5px; }
    .cb-market-card { padding: 10px 10px 6px; }
    .cb-market-price { font-size: 13.5px; }
    .cb-market-full { font-size: 9px; max-width: 80px; }
    .cb-spark { height: 28px; }
    .cb-fiat-card { padding: 10px 12px; }
    .cb-fiat-value { font-size: 12.5px; }
    .cb-fiat-name { max-width: 70px; }
    .cb-chart-wrap { height: 180px; }
    #cbBigChart { height: 180px !important; }
    .cb-price-live { font-size: 15px; }
    .cb-tab { padding: 4px 8px; font-size: 10px; }
    .cb-tick { padding: 0 14px; font-size: 11px; }
}

@media (max-width: 380px) {
    .cb-markets { grid-template-columns: 1fr 1fr; }
    .cb-fiat { grid-template-columns: 1fr 1fr; }
    .cb-portfolio-btc { font-size: 24px; }
    .cb-market-sym { font-size: 12px; }
    .cb-market-price { font-size: 12.5px; }
}



/* ============ СБОР ============ */
.collection-view {
    max-width: 900px;
    margin: 0 auto;
    padding: 8px 0 40px;
}
.collection-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 26px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}
.collection-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 13.5px;
    margin-bottom: 22px;
}
.sticky-progress {
    position: sticky;
    top: calc(8px + var(--safe-top));
    z-index: 200;
    margin-bottom: 16px;
    border-radius: var(--radius-lg);
    background: rgba(19, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-primary);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), 0 0 30px rgba(247, 147, 26, 0.15);
    padding: 14px 18px;
    scroll-margin-top: calc(12px + var(--safe-top));
}
.sticky-progress-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.sticky-progress .sp-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 700;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}
.sticky-progress .sp-label::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulseSoft 1.4s infinite;
    box-shadow: 0 0 8px var(--primary);
}
.sticky-progress .sp-bar-wrap {
    flex: 1;
    min-width: 120px;
    height: 8px;
    background: rgba(7, 10, 20, 0.8);
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.sticky-progress .sp-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--secondary), var(--purple), var(--primary));
    background-size: 300% 100%;
    border-radius: 5px;
    transition: width 0.25s ease;
    animation: gradientShift 3s linear infinite;
}
.sticky-progress .sp-percent {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    min-width: 46px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.sticky-progress .sp-btc {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--success);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 10px var(--success-glow);
}

/* ============ MARKET STRIP ============ */
.market-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated));
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 14px;
    box-shadow: var(--shadow-md);
}
.market-item {
    text-align: center;
    padding: 8px 4px;
    border-right: 1px solid var(--border);
}
.market-item:last-child { border-right: none; }
.market-item .m-label {
    font-size: 9.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
    font-weight: 600;
}
.market-item .m-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
}
.market-item .m-value.up { color: var(--success); }
.market-item .m-value.blink-green { animation: blinkGreen 1.6s infinite; }

/* ============ ТЕРМИНАЛ ============ */
.terminal-panel {
    background: linear-gradient(135deg, #0a0f1e 0%, #0e1322 100%);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}
.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border);
    gap: 10px;
    flex-wrap: wrap;
}
.terminal-header .th-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    font-weight: 600;
}
.terminal-header .pair-badge {
    padding: 3px 8px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #0a0e1a;
    border-radius: 5px;
    font-weight: 700;
    font-size: 10.5px;
}
.terminal-header .status-live {
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10.5px;
}
.terminal-header .status-live::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    animation: pulseSoft 1.4s infinite;
    box-shadow: 0 0 8px var(--success);
}
.terminal-header .th-right {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    color: var(--text-muted);
}
.terminal-header .tf-btn {
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
}
.terminal-header .tf-btn.active {
    background: rgba(247, 147, 26, 0.15);
    border-color: var(--primary);
    color: var(--primary);
}
.terminal-chart-wrap {
    position: relative;
    height: 320px;
    padding: 10px 0;
}
#mainTerminalChart {
    width: 100% !important;
    height: 300px !important;
}
.chart-overlay-stats {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 3;
    pointer-events: none;
}
.cos-item {
    background: rgba(10, 15, 30, 0.85);
    backdrop-filter: blur(6px);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}
.cos-item .cos-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.cos-item .cos-name {
    color: var(--text-muted);
    text-transform: uppercase;
}
.cos-item .cos-val {
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
}

/* ============ CANDLES STRIP ============ */
.candles-strip {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1px;
    background: var(--border);
    border-top: 1px solid var(--border);
}
.candle-cell {
    background: #0a0f1e;
    padding: 8px 6px;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
}
.candle-cell .cc-label {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 3px;
    font-weight: 600;
}
.candle-cell .cc-value {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
}
.candle-cell .cc-value.up { color: var(--success); }
.candle-cell .cc-value.down { color: var(--danger); }
.candle-cell .cc-value.orange { color: var(--primary); }
.candle-cell .cc-value.cyan { color: var(--secondary); }

/* ============ MAIN COUNTER ============ */
.main-counter {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated));
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 26px;
    margin-bottom: 16px;
    text-align: center;
    box-shadow: var(--shadow-md), 0 0 40px rgba(247, 147, 26, 0.1);
    position: relative;
    overflow: hidden;
}
.main-counter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary));
    background-size: 200% 100%;
    animation: gradientShift 4s linear infinite;
}
.main-counter .counter-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}
.main-counter .counter-btc {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(28px, 7vw, 46px);
    font-weight: 700;
    color: var(--primary);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -1px;
    text-shadow: 0 0 40px var(--primary-glow);
}
.main-counter .counter-usd {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(17px, 4vw, 24px);
    font-weight: 700;
    color: var(--success);
    margin-top: 6px;
    font-variant-numeric: tabular-nums;
}
.main-counter .counter-rub {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
    font-family: 'JetBrains Mono', monospace;
}

/* ============ STATS GRID ============ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    padding: 18px 14px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.stat-card .stat-label {
    font-size: 10.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}
.stat-card .stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 19px;
    font-weight: 700;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}

/* ============ BONUSES ============ */
.bonuses-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-md);
}
.bonuses-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    gap: 10px;
    flex-wrap: wrap;
}
.bonuses-header .title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15px;
    font-weight: 700;
}
.bonuses-header .counter {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}
.bonuses-header .counter strong {
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
    font-variant-numeric: tabular-nums;
}
.bonuses-scroll {
    max-height: 440px;
    overflow-y: auto;
    padding-right: 4px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(247, 147, 26, 0.3) transparent;
}
.bonuses-scroll::-webkit-scrollbar { width: 5px; }
.bonuses-scroll::-webkit-scrollbar-thumb {
    background: rgba(247, 147, 26, 0.3);
    border-radius: 3px;
}
.bonus-item {
    background: rgba(7, 10, 20, 0.5);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    animation: slideInRight 0.4s ease;
}
.bonus-item.completed {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(34, 197, 94, 0.02));
    border-color: rgba(34, 197, 94, 0.35);
}
.bonus-item.active-item {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(247, 147, 26, 0.1), rgba(247, 147, 26, 0.02));
    box-shadow: 0 0 20px rgba(247, 147, 26, 0.2);
}
.bonus-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.bonus-wallet {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-muted);
    word-break: break-all;
    line-height: 1.3;
    flex: 1;
}
.bonus-wallet .prefix {
    color: var(--secondary);
    font-weight: 700;
}
.bonus-amount {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.bonus-amount.done { color: var(--success); }
.bonus-progress-bg {
    height: 7px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    overflow: hidden;
}
.bonus-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 5px;
    transition: width 0.2s linear;
    position: relative;
}
.bonus-progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
    background-size: 100px 100%;
    animation: shimmer 1.2s infinite;
}
.bonus-progress-fill.done {
    background: linear-gradient(90deg, var(--success), #4ade80);
}
.bonus-progress-fill.done::after { display: none; }
.bonus-status {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 600;
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
}
.bonus-status .label { color: var(--text-muted); }
.bonus-status .value {
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
    font-variant-numeric: tabular-nums;
}
.bonus-status .value.done { color: var(--success); }

/* ============ FINAL ============ */
.final-view {
    max-width: 900px;
    margin: 0 auto;
    padding: 8px 0 40px;
}
.result-header {
    text-align: center;
    margin-bottom: 26px;
}
.result-header .check-circle {
    width: 70px;
    height: 70px;
    background: rgba(34, 197, 94, 0.12);
    border: 2px solid var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 30px;
    color: var(--success);
    animation: pulseRing 2.4s infinite;
}
.result-header h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}
.result-header p {
    color: var(--text-muted);
    font-size: 13.5px;
}
.recommendation {
    background: linear-gradient(135deg, rgba(247, 147, 26, 0.1), rgba(34, 211, 238, 0.05));
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 26px;
    margin-top: 16px;
    text-align: center;
    box-shadow: var(--shadow-md);
}
.recommendation h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px;
    margin-bottom: 10px;
}
.recommendation p {
    color: var(--text-soft);
    font-size: 13.5px;
    margin-bottom: 20px;
    line-height: 1.65;
}
.recommendation .highlight {
    color: var(--success);
    font-weight: 700;
}
.reset-btn {
    display: block;
    margin: 30px auto 0;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}
.reset-btn:hover {
    color: var(--danger);
    border-color: rgba(255, 56, 96, 0.3);
}

/* ============ PRICE TICKER ============ */
.price-ticker {
    position: fixed;
    bottom: calc(14px + var(--safe-bottom));
    right: calc(14px + var(--safe-right));
    background: rgba(19, 26, 46, 0.9);
    border: 1px solid var(--border-strong);
    border-radius: 30px;
    padding: 10px 18px;
    font-size: 12.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 100;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    transition: opacity 0.3s;
}
.price-ticker .btc-icon {
    color: var(--primary);
    font-size: 16px;
}
.price-ticker .price {
    font-family: 'JetBrains Mono', monospace;
    color: var(--success);
    font-variant-numeric: tabular-nums;
}
.price-ticker.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ============ CHAT ============ */
.chat-page {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    padding: calc(24px + var(--safe-top)) 16px calc(24px + var(--safe-bottom));
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-card {
    width: 100%;
    max-width: 620px;
    height: min(820px, calc(100dvh - 48px - var(--safe-top) - var(--safe-bottom)));
    background: linear-gradient(180deg, #131a2e 0%, #0e1322 100%);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-lg), 0 0 80px rgba(247, 147, 26, 0.1);
    position: relative;
    animation: modalPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary));
    background-size: 200% 100%;
    animation: gradientShift 4s linear infinite;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    z-index: 5;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(20px);
    flex-shrink: 0;
    position: relative;
    z-index: 4;
}

.manager-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}
.manager-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    box-shadow: 0 0 16px var(--primary-glow), 0 0 0 3px rgba(247, 147, 26, 0.1);
    background: linear-gradient(135deg, #f7931a, #22d3ee);
}
.manager-online-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 12px;
    height: 12px;
    background: var(--success);
    border-radius: 50%;
    border: 2px solid #131a2e;
    box-shadow: 0 0 10px var(--success);
    animation: pulseSoft 1.8s infinite;
}
.manager-info { flex: 1; min-width: 0; }
.manager-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15.5px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 7px;
}
.manager-verified {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    background: linear-gradient(135deg, #1DA1F2, #22d3ee);
    border-radius: 50%;
    color: #fff;
    font-size: 9px;
    font-weight: 900;
    flex-shrink: 0;
}
.manager-role {
    font-size: 11.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 1px;
}
.manager-role::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--success);
}
.chat-header-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}
.chat-header-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.chat-header-btn:hover {
    background: rgba(247, 147, 26, 0.12);
    color: var(--primary);
    border-color: var(--border-primary);
}

.chat-subheader {
    padding: 6px 18px;
    background: rgba(247, 147, 26, 0.05);
    border-bottom: 1px solid var(--border);
    font-size: 10.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}
.chat-subheader .lock-icon { color: var(--success); }
.chat-subheader .label-enc {
    color: var(--success);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 9.5px;
    letter-spacing: 1px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    background-image:
        radial-gradient(circle at 15% 0%, rgba(247, 147, 26, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 85% 100%, rgba(34, 211, 238, 0.03) 0%, transparent 40%);
}
.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(247, 147, 26, 0.25);
    border-radius: 3px;
}

.chat-date-separator {
    text-align: center;
    margin: 4px 0 2px;
}
.chat-date-separator span {
    font-size: 9.5px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    padding: 3px 11px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'JetBrains Mono', monospace;
}

.msg-row {
    display: flex;
    gap: 8px;
    max-width: 88%;
    animation: msgIn 0.4s ease forwards;
}
.msg-row.manager { align-self: flex-start; }
.msg-row.user { align-self: flex-end; flex-direction: row-reverse; }
.msg-row.system { align-self: center; max-width: 100%; }

.msg-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    border: 2px solid rgba(247, 147, 26, 0.4);
    box-shadow: 0 0 10px rgba(247, 147, 26, 0.12);
}
.msg-row.user .msg-avatar {
    border-color: rgba(34, 211, 238, 0.5);
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.2);
}

.msg-bubble {
    padding: 9px 13px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.5;
    position: relative;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.msg-row.manager .msg-bubble {
    background: linear-gradient(135deg, #1a2440, #131a2e);
    border: 1px solid var(--border-strong);
    border-top-left-radius: 4px;
    color: var(--text-soft);
}
.msg-row.user .msg-bubble {
    background: linear-gradient(135deg, var(--primary), #e08214);
    color: #0a0e1a;
    border-top-right-radius: 4px;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(247, 147, 26, 0.2);
}
.msg-row.system .msg-bubble {
    background: rgba(247, 147, 26, 0.08);
    border: 1px solid var(--border-primary);
    color: var(--text-soft);
    font-size: 12px;
    text-align: center;
    padding: 8px 16px;
    border-radius: 18px;
    font-family: 'JetBrains Mono', monospace;
}
.msg-time {
    font-size: 9.5px;
    color: var(--text-muted);
    margin-top: 3px;
    display: block;
    opacity: 0.7;
}
.msg-row.user .msg-time {
    text-align: right;
    color: rgba(10, 14, 26, 0.55);
    font-weight: 600;
}
.msg-bubble strong {
    color: var(--primary);
    font-weight: 700;
}
.msg-bubble .money-inline {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: var(--success);
    background: rgba(34, 197, 94, 0.1);
    padding: 1px 6px;
    border-radius: 5px;
    font-size: 12.5px;
    white-space: nowrap;
}
.msg-bubble .money-inline-rub {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: var(--primary);
    background: rgba(247, 147, 26, 0.12);
    padding: 1px 6px;
    border-radius: 5px;
    font-size: 12.5px;
    white-space: nowrap;
}

.typing-bubble {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #1a2440, #131a2e);
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    border-top-left-radius: 4px;
    align-self: flex-start;
}
.typing-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
    animation: typingBounce 1.4s infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

.chat-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 2px;
    max-width: 88%;
    animation: msgIn 0.4s ease forwards;
}
.chat-option-btn {
    padding: 11px 16px;
    background: rgba(247, 147, 26, 0.06);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.chat-option-btn::after {
    content: '→';
    color: var(--primary);
    font-weight: 700;
    transition: transform 0.2s;
}
.chat-option-btn:hover {
    background: rgba(247, 147, 26, 0.14);
    border-color: var(--primary);
    transform: translateX(2px);
}
.chat-option-btn:hover::after { transform: translateX(4px); }
.chat-option-btn:active { transform: translateX(0); }

.chat-loader {
    align-self: center;
    max-width: 90%;
    background: linear-gradient(135deg, rgba(247, 147, 26, 0.1), rgba(34, 211, 238, 0.05));
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    text-align: center;
    animation: msgIn 0.4s ease forwards;
    box-shadow: 0 0 40px rgba(247, 147, 26, 0.08);
}
.chat-loader .loader-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.chat-loader .loader-spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2.5px solid rgba(247, 147, 26, 0.2);
    border-top-color: var(--primary);
    animation: spinCircle 0.8s linear infinite;
    flex-shrink: 0;
}
.chat-loader .loader-bar-bg {
    height: 5px;
    background: rgba(7, 10, 20, 0.8);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
    border: 1px solid var(--border);
}
.chat-loader .loader-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--secondary));
    background-size: 200% 100%;
    border-radius: 4px;
    animation: gradientShift 1.8s linear infinite;
    transition: width 0.25s linear;
}
.chat-loader .loader-timer {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}
.chat-loader .loader-timer strong {
    color: var(--primary);
    font-weight: 700;
    font-size: 12.5px;
}

.chat-block-overlay {
    position: absolute;
    inset: 0;
    background: rgba(7, 10, 20, 0.85);
    backdrop-filter: blur(10px);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.chat-block-overlay.active {
    opacity: 1;
    visibility: visible;
}
.chat-block-overlay .spinner-big {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 4px solid rgba(247, 147, 26, 0.15);
    border-top-color: var(--primary);
    border-right-color: var(--secondary);
    animation: spinCircle 1s linear infinite;
    box-shadow: 0 0 40px rgba(247, 147, 26, 0.3);
}
.chat-block-overlay .block-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.5px;
    text-align: center;
}
.chat-block-overlay .block-sub {
    font-size: 12.5px;
    color: var(--text-muted);
    text-align: center;
    max-width: 280px;
    line-height: 1.6;
}
.chat-block-overlay .block-bar-bg {
    width: 220px;
    height: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.chat-block-overlay .block-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    background-size: 200% 100%;
    animation: gradientShift 2s linear infinite;
    transition: width 0.25s linear;
}

.chat-bottom {
    padding: 10px 14px calc(10px + var(--safe-bottom));
    background: linear-gradient(180deg, rgba(14, 19, 34, 0.9), rgba(7, 10, 20, 0.98));
    border-top: 1px solid var(--border-strong);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 56px;
}
.chat-input-disabled {
    width: 100%;
    max-width: 720px;
    padding: 11px 16px;
    background: rgba(7, 10, 20, 0.6);
    border: 1px solid var(--border);
    border-radius: 22px;
    font-size: 12.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'JetBrains Mono', monospace;
}
.chat-input-disabled .send-icon {
    margin-left: auto;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 13px;
}

.chat-form {
    background: linear-gradient(135deg, #131a2e, #0e1322);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-top: 4px;
    animation: msgIn 0.4s ease forwards;
    max-width: 100%;
    width: 100%;
    box-shadow: 0 0 40px rgba(247, 147, 26, 0.08);
}
.chat-form-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 0 20px var(--primary-glow);
}
.chat-form label {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    margin-top: 12px;
    font-weight: 700;
}
.chat-form input {
    width: 100%;
    padding: 11px 13px;
    background: rgba(7, 10, 20, 0.6);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 13.5px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-weight: 500;
}
.chat-form input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}
.chat-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.chat-form input.invalid {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px var(--danger-glow);
}
.chat-form input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.chat-form .form-actions { margin-top: 18px; }
.chat-form .form-submitted-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 20px;
    font-size: 11px;
    color: var(--success);
    font-weight: 600;
    margin-top: 8px;
}

/* ============ CHANGE ============ */
.change-page {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    padding: calc(40px + var(--safe-top)) 20px calc(60px + var(--safe-bottom));
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}
.change-card {
    max-width: 520px;
    width: 100%;
    background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated));
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    padding: 36px 30px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg), 0 0 80px rgba(247, 147, 26, 0.1);
    animation: modalPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.change-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary));
    background-size: 200% 100%;
    animation: gradientShift 4s linear infinite;
}
.change-icon-badge {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 211, 238, 0.1));
    border: 2px solid var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 34px;
    color: var(--success);
    animation: pulseGlow 2.4s infinite;
}
.change-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff, #cbd5e1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.change-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 13.5px;
    margin-bottom: 22px;
}
.change-amount-box {
    background: rgba(34, 197, 94, 0.06);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}
.change-amount-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.6px;
    margin-bottom: 8px;
    font-weight: 600;
}
.change-amount-btc {
    font-family: 'JetBrains Mono', monospace;
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.1;
    text-shadow: 0 0 30px var(--primary-glow);
    font-variant-numeric: tabular-nums;
}
.change-amount-usd {
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    color: var(--success);
    margin-top: 6px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.change-amount-rub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: var(--text-soft);
    margin-top: 2px;
    font-variant-numeric: tabular-nums;
}
.change-urgent {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(255, 56, 96, 0.08);
    border: 1px solid rgba(255, 56, 96, 0.3);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 13.5px;
    color: var(--danger);
    font-weight: 600;
    line-height: 1.5;
}
.change-urgent .urgent-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(255, 56, 96, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    animation: pulseSoft 1.5s infinite;
}
.change-info-block {
    background: rgba(7, 10, 20, 0.5);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 16px;
}
.change-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    font-size: 13.5px;
    gap: 12px;
}
.change-info-row + .change-info-row {
    border-top: 1px dashed rgba(255, 255, 255, 0.05);
}
.change-info-row .info-label {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}
.change-info-row .info-value {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: var(--text-main);
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.change-info-row .info-value.orange { color: var(--primary); }
.change-info-row .info-value.green { color: var(--success); }
.change-info-row .info-value.cyan { color: var(--secondary); }

.exchange-direction {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    align-items: center;
    margin: 18px 0;
    padding: 16px;
    background: linear-gradient(135deg, rgba(247, 147, 26, 0.06), rgba(34, 211, 238, 0.04));
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
}
.ex-dir-item { text-align: center; }
.ex-dir-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 6px;
    font-weight: 700;
}
.ex-dir-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}
.ex-dir-value.rub { color: var(--success); }
.ex-dir-arrow {
    font-size: 20px;
    color: var(--text-muted);
    animation: pulseSoft 2s infinite;
}
.exchange-btn-wrap { margin-top: 20px; }

/* ============ PAGE LOADER ============ */
.page-loader {
    position: fixed;
    inset: 0;
    background: rgba(7, 10, 20, 0.92);
    backdrop-filter: blur(12px);
    z-index: 9000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    padding: 24px;
}
.page-loader.active {
    opacity: 1;
    visibility: visible;
}
.page-loader .spinner-big {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: 4px solid rgba(247, 147, 26, 0.15);
    border-top-color: var(--primary);
    border-right-color: var(--secondary);
    animation: spinCircle 1s linear infinite;
    box-shadow: 0 0 50px rgba(247, 147, 26, 0.3);
}
.page-loader .loader-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
    max-width: 90%;
}
.page-loader .loader-bar-bg {
    width: 260px;
    max-width: 80vw;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.page-loader .loader-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    background-size: 200% 100%;
    animation: gradientShift 2s linear infinite;
    transition: width 0.25s linear;
}
.page-loader .loader-timer {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--text-muted);
}
.page-loader .loader-timer strong {
    color: var(--primary);
    font-weight: 700;
    font-size: 16px;
}

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 768px) {
    body { font-size: 14px; }

    /* Лендинг */
    .header { padding: calc(12px + var(--safe-top)) 16px 12px; }
    .nav { display: none; }
    .hero { padding: 40px 16px; }
    .hero h1 { letter-spacing: -1px; }
    .hero p { font-size: 15px; }
    .hero-stats { gap: 10px; }
    .hero-stat { padding: 12px 16px; min-width: 110px; }
    .hero-stat .value { font-size: 20px; }

    /* Модалка */
    .modal-overlay {
        padding: calc(20px + var(--safe-top)) 12px calc(24px + var(--safe-bottom));
        align-items: flex-start;
    }
    .modal {
        max-height: none;
        padding: 24px 18px 32px;
        margin: 0 auto;
        border-radius: var(--radius-lg);
    }
    .balance-amount { font-size: 32px; }
    .modal-title { font-size: 19px; }
    .countdown { gap: 4px; padding: 14px 8px; }
    .countdown-item { min-width: 46px; }
    .countdown-item .num { font-size: 22px; }
    .countdown-item .lbl { font-size: 8px; }
    .countdown-sep { font-size: 20px; }
    .geo-item { min-width: 100%; }

    /* Кабинет */
    .cabinet {
        padding: calc(20px + var(--safe-top)) 14px calc(110px + var(--safe-bottom));
    }
    .cabinet-header h2 { font-size: 22px; }
    .balance-main .btc { font-size: 30px; }
    .balance-main .usd { font-size: 19px; }
    .balance-card, .action-card { padding: 20px; }
    .collection-title { font-size: 21px; }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .stat-card { padding: 14px 10px; }
    .stat-card .stat-value { font-size: 16px; }
    .bonuses-scroll { max-height: 360px; }
    .bonus-wallet { font-size: 10px; }
    .bonus-amount { font-size: 11px; }
    .price-ticker {
        bottom: calc(10px + var(--safe-bottom));
        right: calc(10px + var(--safe-right));
        font-size: 11px;
        padding: 8px 14px;
    }
    .rate-status {
        bottom: calc(10px + var(--safe-bottom));
        left: calc(10px + var(--safe-left));
        font-size: 10px;
        padding: 6px 11px;
    }
    .recommendation { padding: 20px; }
    .recommendation h3 { font-size: 17px; }
    .result-header h2 { font-size: 22px; }

    /* Терминал / сбор */
    .market-strip {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .market-item {
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 8px 4px;
    }
    .market-item:nth-last-child(-n+2) { border-bottom: none; }
    .terminal-chart-wrap { height: 260px; }
    #mainTerminalChart { height: 240px !important; }
    .candles-strip { grid-template-columns: repeat(3, 1fr); }
    .candle-cell { padding: 6px 4px; }
    .candle-cell .cc-value { font-size: 11px; }
    .cos-item {
        font-size: 9.5px;
        padding: 3px 8px;
    }
    .main-counter { padding: 20px 16px; }
    .main-counter .counter-btc { font-size: 26px; }
    .main-counter .counter-usd { font-size: 17px; }
    .sticky-progress {
        padding: 11px 12px;
        top: calc(4px + var(--safe-top));
    }
    .sticky-progress-inner { gap: 8px; }
    .sticky-progress .sp-label {
        font-size: 9px;
        letter-spacing: 0.8px;
    }
    .sticky-progress .sp-percent {
        font-size: 13px;
        min-width: 40px;
    }
    .sticky-progress .sp-btc { font-size: 11px; }

    /* Чат */
    .chat-page {
        padding: calc(8px + var(--safe-top)) 6px calc(8px + var(--safe-bottom));
        align-items: stretch;
    }
    .chat-card {
        max-width: none;
        height: calc(100dvh - 16px - var(--safe-top) - var(--safe-bottom));
        border-radius: var(--radius-lg);
    }
    .chat-header {
        padding: 10px 14px;
        gap: 10px;
    }
    .manager-avatar {
        width: 40px;
        height: 40px;
    }
    .manager-name { font-size: 14px; }
    .manager-role { font-size: 10.5px; }
    .chat-header-btn {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    .chat-subheader {
        padding: 5px 14px;
        font-size: 9.5px;
    }
    .chat-subheader .label-enc { font-size: 9px; }
    .chat-messages {
        padding: 12px 12px 10px;
        gap: 8px;
    }
    .msg-row {
        max-width: 92%;
        gap: 6px;
    }
    .msg-bubble {
        padding: 8px 11px;
        font-size: 13px;
    }
    .msg-avatar {
        width: 26px;
        height: 26px;
    }
    .chat-loader { padding: 13px 16px; }
    .chat-loader .loader-title { font-size: 12.5px; }
    .chat-block-overlay .spinner-big {
        width: 48px;
        height: 48px;
    }
    .chat-block-overlay .block-title { font-size: 16px; }
    .chat-block-overlay .block-bar-bg { width: 200px; }
    .chat-form { padding: 14px; }
    .chat-form-title { font-size: 12px; }
    .chat-form input {
        padding: 10px 12px;
        font-size: 13px;
    }
    .chat-bottom {
        padding: 8px 12px calc(8px + var(--safe-bottom));
        min-height: 50px;
    }
    .chat-input-disabled {
        padding: 10px 14px;
        font-size: 11.5px;
    }
    .chat-input-disabled .send-icon {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }

    /* Change */
    .change-page {
        padding: calc(30px + var(--safe-top)) 14px calc(40px + var(--safe-bottom));
        align-items: flex-start;
    }
    .change-card {
        padding: 26px 20px;
        border-radius: var(--radius-lg);
    }
    .change-icon-badge {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
    .change-title { font-size: 20px; }
    .change-amount-btc { font-size: 26px; }
    .change-info-row {
        font-size: 12.5px;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .change-info-row .info-value { text-align: left; }
    .exchange-direction { padding: 14px 10px; }
    .ex-dir-value { font-size: 14px; }
}

@media (max-width: 380px) {
    .countdown-item { min-width: 38px; }
    .countdown-item .num { font-size: 18px; }
    .countdown-item .lbl { font-size: 7px; }
    .countdown-sep { font-size: 16px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .main-counter .counter-btc { font-size: 22px; }
    .balance-main .btc { font-size: 26px; }
    .balance-amount { font-size: 26px; }
    .candles-strip { grid-template-columns: repeat(2, 1fr); }
    .sticky-progress .sp-label span { display: none; }
    .change-amount-btc { font-size: 22px; }
}

/* ============ COMMISSION INLINE CARD ============ */
.commission-card-inline {
    margin: 0 auto 20px;
    max-width: 100%;
    position: relative;
    box-shadow: var(--shadow-lg), 0 0 80px rgba(247, 147, 26, 0.08);
}

@media (max-width: 768px) {
    .commission-card-inline {
        max-width: 100%;
        padding: 24px 18px;
    }
}


/* ============ PAYMENT FAILED BANNER ============ */
.payment-failed-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(255, 56, 96, 0.95), rgba(220, 38, 78, 0.95));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 20px rgba(255, 56, 96, 0.3);
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
}
.payment-failed-banner.active {
    transform: translateY(0);
    opacity: 1;
}
.payment-failed-banner__inner {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
}
.payment-failed-banner__icon {
    font-size: 20px;
    flex-shrink: 0;
    color: #fff;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.5));
}
.payment-failed-banner__text {
    flex: 1;
    font-size: 13.5px;
    font-weight: 600;
    color: #fff;
    line-height: 1.45;
}
.payment-failed-banner__close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}
.payment-failed-banner__close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .payment-failed-banner {
        padding: 10px 12px;
    }
    .payment-failed-banner__inner {
        gap: 8px;
    }
    .payment-failed-banner__icon {
        font-size: 17px;
    }
    .payment-failed-banner__text {
        font-size: 12.5px;
    }
    .payment-failed-banner__close {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }
}

/* ============ RENT BOX (express.html) ============ */
.rent-box {
    background: linear-gradient(135deg, rgba(7, 10, 20, 0.85), rgba(19, 26, 46, 0.7));
    border: 1px solid var(--border-strong);
    border-left: 3px solid var(--success);
    border-radius: var(--radius-md);
    padding: 22px 20px;
    margin: 20px 0 4px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.3), 0 4px 20px rgba(0, 0, 0, 0.3);
}
.rent-box::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 120px; height: 120px;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.08) 0%, transparent 70%);
    pointer-events: none;
}
.rent-box::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent);
    background-size: 600px 100%;
    animation: shimmer 3s infinite;
    pointer-events: none;
}
.rent-box__title {
    font-size: 13.5px;
    color: var(--text-main);
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: 0.3px;
    position: relative;
    z-index: 1;
}
.rent-box__amount {
    font-family: 'JetBrains Mono', monospace;
    font-size: 34px;
    font-weight: 700;
    color: var(--success);
    text-shadow: 0 0 30px var(--success-glow);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    position: relative;
    z-index: 1;
    letter-spacing: -0.5px;
}
.rent-box__sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
    position: relative;
    z-index: 1;
}
.rent-box__benefits {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 1;
}
.rent-box__benefit {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    color: var(--text-soft);
    font-weight: 500;
    line-height: 1.5;
}
.rent-box__benefit .check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid var(--success);
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.2);
}

@media (max-width: 768px) {
    .rent-box {
        padding: 18px 16px;
    }
    .rent-box__amount {
        font-size: 28px;
    }
    .rent-box__title {
        font-size: 13px;
    }
    .rent-box__benefit {
        font-size: 13px;
    }
}