/* ============================================
   AITrade — Global Styles
   ============================================ */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #16161f;
    --bg-card-hover: #1c1c28;
    --bg-input: #1a1a25;
    --border: #2a2a3a;
    --border-light: #333345;

    --gold: #d4a843;
    --gold-light: #e8c36a;
    --gold-dark: #b8922e;
    --gold-gradient: linear-gradient(135deg, #d4a843, #f0d77a, #d4a843);

    --text-primary: #f0f0f5;
    --text-secondary: #9090a0;
    --text-muted: #606070;

    --green: #22c55e;
    --green-dark: #16a34a;
    --red: #ef4444;
    --blue: #3b82f6;
    --purple: #a855f7;
    --yellow: #eab308;
    --orange: #f97316;

    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-gold: 0 4px 20px rgba(212, 168, 67, 0.15);

    --sidebar-width: 260px;
    --topbar-height: 70px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--gold);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--gold-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.hidden {
    display: none !important;
}

.text-gold { color: var(--gold); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-yellow { color: var(--yellow); }

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
}

.btn-primary {
    background: var(--gold-gradient);
    color: #0a0a0f;
}

.btn-primary:hover {
    box-shadow: var(--shadow-gold);
    transform: translateY(-1px);
    color: #0a0a0f;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
}

.btn-outline:hover {
    background: rgba(212, 168, 67, 0.1);
    color: var(--gold-light);
}

.btn-sm { padding: 6px 16px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-block { width: 100%; }

/* ============================================
   Header (Landing)
   ============================================ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px 0;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(42, 42, 58, 0.5);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 800;
    margin-right: 12px;
    flex-shrink: 0;
}

.logo img {
    height: 56px;
    width: auto;
    object-fit: contain;
}

.logo span {
    display: none;
}

.nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav a {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.nav a:hover {
    color: var(--text-primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

@media (max-width: 768px) {
    .header { padding: 10px 0; }
    .header-inner { position: relative; }
    .mobile-menu-btn { display: inline-flex; }

    .nav {
        display: none;
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 12px 16px 16px;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
    }
    .nav.open { display: flex; }
    .nav a {
        padding: 12px 14px;
        border-radius: var(--radius-sm);
        font-size: 15px;
        text-align: center;
    }
    .nav a:not(.btn):hover { background: var(--bg-card-hover); }
    .nav a.btn { margin-top: 4px; padding: 12px 16px; }
}

/* ============================================
   Hero
   ============================================ */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 60px;
    overflow: hidden;
}

.hero-bg-effects {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-glow {
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(212, 168, 67, 0.08), transparent 70%);
    border-radius: 50%;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(42, 42, 58, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(42, 42, 58, 0.1) 1px, transparent 1px);
    background-size: 60px 60px;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(212, 168, 67, 0.1);
    border: 1px solid rgba(212, 168, 67, 0.2);
    border-radius: 100px;
    color: var(--gold);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: 52px;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 540px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 48px;
}

.hero-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px 40px;
}

.hero-inner > * {
    min-width: 0;
}

.hero-stat {
    display: flex;
    flex-direction: column;
}

.hero-stat-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--gold);
}

.hero-stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* Hero Card */
.hero-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-lg);
}

.hero-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

.hero-chart-placeholder {
    height: 200px;
    position: relative;
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: var(--radius-sm);
}

.hero-card-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.hero-card-stats > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hero-card-stats .label {
    font-size: 12px;
    color: var(--text-muted);
}

.hero-card-stats .value {
    font-size: 16px;
    font-weight: 700;
}

@media (max-width: 968px) {
    .hero { min-height: auto; padding: 110px 0 50px; }
    .hero-inner { grid-template-columns: 1fr; text-align: center; }
    .hero h1 { font-size: 36px; }
    .hero-subtitle { margin: 0 auto 32px; }
    .hero-actions { justify-content: center; }
    .hero-stats-row { justify-content: center; }
    .hero-visual { display: none; }
}

@media (max-width: 480px) {
    .hero { padding: 96px 0 40px; }
    .hero-badge { font-size: 12px; padding: 6px 12px; margin-bottom: 18px; }
    .hero h1 { font-size: 30px; }
    .hero-subtitle { font-size: 15px; margin-bottom: 24px; }
    .hero-actions { flex-direction: column; gap: 10px; margin-bottom: 32px; }
    .hero-actions .btn { width: 100%; }
    .hero-stats-row { gap: 16px 12px; }
    .hero-stat { flex: 1 1 calc(50% - 12px); min-width: 120px; align-items: center; text-align: center; }
    .hero-stat-value { font-size: 20px; }
    .hero-stat-label { font-size: 12px; }
}

/* ============================================
   Sections
   ============================================ */

.section {
    padding: 100px 0;
}

.section-dark {
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 16px;
}

.section-header p {
    font-size: 18px;
    color: var(--text-secondary);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--gold);
    transform: translateY(-4px);
    box-shadow: var(--shadow-gold);
}

.feature-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 168, 67, 0.1);
    border-radius: var(--radius-sm);
    color: var(--gold);
    font-size: 24px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

@media (max-width: 768px) {
    .features-grid { grid-template-columns: 1fr; gap: 16px; }
    .feature-card { padding: 24px; }
    .section { padding: 60px 0; }
    .section-header { margin-bottom: 36px; }
    .section-header h2 { font-size: 28px; }
    .section-header p { font-size: 15px; }
}

/* Steps */
.steps {
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-width: 700px;
    margin: 0 auto;
}

.step {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.step:hover {
    border-color: var(--gold);
}

.step-number {
    font-size: 48px;
    font-weight: 900;
    color: var(--gold);
    line-height: 1;
    min-width: 70px;
}

.step-content h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 15px;
}

@media (max-width: 600px) {
    .steps { gap: 16px; }
    .step { padding: 20px; gap: 16px; }
    .step-number { font-size: 32px; min-width: 44px; }
    .step-content h3 { font-size: 17px; }
    .step-content p { font-size: 14px; }
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--gold);
    transform: translateY(-4px);
}

.stat-icon {
    font-size: 32px;
    color: var(--gold);
    margin-bottom: 16px;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    display: block;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stat-card { padding: 20px 12px; }
    .stat-icon { font-size: 24px; margin-bottom: 10px; }
    .stat-value { font-size: 24px; }
    .stat-label { font-size: 12px; }
}

/* CTA */
.cta-section {
    padding: 60px 0;
}

.cta-card {
    background: linear-gradient(135deg, rgba(212, 168, 67, 0.1), rgba(212, 168, 67, 0.02));
    border: 1px solid rgba(212, 168, 67, 0.2);
    border-radius: var(--radius-xl);
    padding: 60px;
    text-align: center;
}

.cta-card h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 16px;
}

.cta-card p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 32px;
}

@media (max-width: 600px) {
    .cta-section { padding: 40px 0; }
    .cta-card { padding: 32px 20px; border-radius: var(--radius-lg); }
    .cta-card h2 { font-size: 24px; }
    .cta-card p { font-size: 14px; margin-bottom: 24px; }
    .cta-card .btn { width: 100%; }
}

/* Demo preview (landing) */
.demo-preview-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.demo-preview-stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
}

.demo-preview-stat-value {
    font-size: 28px;
    font-weight: 800;
}

.demo-preview-stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.demo-preview-stat-online {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--green);
    min-height: 42px;
}

@media (max-width: 600px) {
    .demo-preview-stats { gap: 10px; margin-bottom: 16px; }
    .demo-preview-stat { padding: 14px 8px; }
    .demo-preview-stat-value { font-size: 20px; }
    .demo-preview-stat-label { font-size: 11px; }
    .demo-preview-stat-online { font-size: 13px; min-height: 30px; }
    .dp-card { padding: 14px 16px !important; }
    .dp-card-grid { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
    #ai-demo .btn-lg { width: 100%; }
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    padding: 60px 0 0;
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-logo {
    height: 52px;
    width: auto;
    margin-bottom: 16px;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 14px;
    max-width: 300px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--gold);
}

.footer-bottom {
    padding: 24px 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 13px;
}

@media (max-width: 768px) {
    .footer { padding-top: 40px; }
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px 24px; padding-bottom: 32px; }
    .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 400px) {
    .footer-inner { grid-template-columns: 1fr; }
}

/* ============================================
   Auth Page
   ============================================ */

.auth-page {
    min-height: 100vh;
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

.auth-left {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
}

.auth-left-content {
    max-width: 440px;
}

.auth-left .logo {
    margin-bottom: 40px;
}

.auth-left .logo img {
    height: 64px;
}

.auth-left h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 16px;
}

.auth-left p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 32px;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: var(--text-secondary);
}

.auth-feature i {
    color: var(--gold);
}

.auth-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 400px;
}

.auth-form-wrapper h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
}

.auth-subtitle {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 14px;
    z-index: 1;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.1);
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

.input-lg input {
    padding: 16px 14px 16px 42px;
    font-size: 18px;
    font-weight: 600;
}

.toggle-password {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    z-index: 1;
    border-radius: 6px;
}

.toggle-password:hover {
    color: var(--text-primary);
}

.input-wrapper .toggle-password i {
    position: static;
    left: auto;
}

.input-wrapper:has(.toggle-password) input {
    padding-right: 44px;
}

.auth-switch {
    margin-top: 24px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-switch a {
    color: var(--gold);
    font-weight: 600;
}

@media (max-width: 768px) {
    .auth-container { grid-template-columns: 1fr; grid-template-rows: auto 1fr; min-height: 100vh; min-height: 100dvh; }
    .auth-left {
        padding: 24px 20px 20px;
        border-right: none;
        border-bottom: 1px solid var(--border);
        align-items: flex-start;
        justify-content: flex-start;
    }
    .auth-left-content { max-width: none; width: 100%; text-align: center; }
    .auth-left .logo { margin-bottom: 0; justify-content: center; margin-right: 0; }
    .auth-left .logo img { height: 52px; }
    .auth-left h1,
    .auth-left p,
    .auth-features { display: none; }
    .auth-right { padding: 28px 20px 40px; align-items: flex-start; }
    .auth-form-wrapper { max-width: 440px; margin: 0 auto; }
    .auth-form-wrapper h2 { font-size: 24px; }
    .auth-subtitle { margin-bottom: 24px; font-size: 14px; }
}

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

.dashboard-page {
    display: flex;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 50;
    transition: var(--transition);
}

.sidebar-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.sidebar-header .logo img {
    height: 44px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-link:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.sidebar-link.active {
    background: rgba(212, 168, 67, 0.1);
    color: var(--gold);
}

.sidebar-link i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gold-gradient);
    color: #0a0a0f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.sidebar-user-name {
    font-size: 14px;
    font-weight: 600;
    display: block;
}

.sidebar-user-email {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
}

.mobile-sidebar-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 45;
}

.sidebar-overlay.active {
    display: block;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: min(300px, 85vw);
        box-shadow: none;
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }
    .mobile-sidebar-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        margin-left: -8px;
        border-radius: var(--radius-sm);
    }
    .main-content {
        margin-left: 0 !important;
    }
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-width: 0;
    min-height: 100vh;
}

/* Topbar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: var(--topbar-height);
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.topbar-title h1 {
    font-size: 20px;
    font-weight: 700;
}

/* логотип в топбаре — только на мобильном (на десктопе он в сайдбаре) */
.topbar-logo { display: none; }

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ai-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--green);
    padding: 6px 14px;
    background: rgba(34, 197, 94, 0.1);
    border-radius: 100px;
    border: 1px solid rgba(34, 197, 94, 0.2);
    white-space: nowrap;
}

@media (max-width: 768px) {
    .topbar {
        gap: 10px;
        height: 70px;
        padding: 0 14px;
    }
    .topbar-title {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 2px;
    }
    .topbar-logo {
        display: block;
        line-height: 0;
        width: fit-content;
    }
    .topbar-logo img {
        height: 42px;
        width: auto;
        display: block;
        filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.25));
    }
    .topbar-title h1 {
        font-size: 11px;
        font-weight: 600;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--text-secondary);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .topbar-actions { gap: 8px; }
    .ai-status { padding: 6px 10px; font-size: 12px; }
    .topbar-deposit-btn { padding: 8px 12px; }
}

@media (max-width: 480px) {
    .ai-status-text { display: none; }
    .ai-status { padding: 8px; border-radius: 50%; }
    .topbar-deposit-btn span { display: none; }
    .topbar-deposit-btn { width: 36px; height: 36px; padding: 0; }
    .topbar-deposit-btn i { margin: 0; }
}

/* Dashboard Sections */
.dashboard-section {
    display: none;
    padding: 32px;
}

.dashboard-section.active {
    display: block;
}

/* Balance Cards */
.balance-cards {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

.balance-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: var(--transition);
}

.balance-card:hover {
    border-color: var(--border-light);
}

.balance-card-main {
    border-color: rgba(212, 168, 67, 0.3);
    background: linear-gradient(135deg, rgba(212, 168, 67, 0.05), var(--bg-card));
}

.balance-card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 168, 67, 0.1);
    border-radius: var(--radius-sm);
    color: var(--gold);
    font-size: 20px;
    flex-shrink: 0;
}

.balance-card-icon.icon-green { background: rgba(34, 197, 94, 0.1); color: var(--green); }
.balance-card-icon.icon-blue { background: rgba(59, 130, 246, 0.1); color: var(--blue); }
.balance-card-icon.icon-purple { background: rgba(168, 85, 247, 0.1); color: var(--purple); }

.balance-card-info {
    flex: 1;
}

.balance-card-label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.balance-card-value {
    font-size: 24px;
    font-weight: 800;
}

.balance-card-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    margin-top: 4px;
}

.balance-cards-3 {
    grid-template-columns: repeat(3, 1fr);
}


/* Charts */
.charts-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.chart-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.chart-card-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.chart-period-selector {
    display: flex;
    gap: 4px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 3px;
}

.chart-period {
    padding: 6px 14px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.chart-period.active {
    background: var(--gold);
    color: #0a0a0f;
}

.chart-container {
    height: 280px;
    position: relative;
}

.chart-container-sm {
    height: 180px;
}

.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.donut-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.donut-legend-item strong {
    margin-left: auto;
    color: var(--text-primary);
}

.donut-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-green { background: var(--green); }
.dot-red { background: var(--red); }

@media (max-width: 900px) {
    .charts-row { grid-template-columns: 1fr; }
}

/* AI Engine Card */
.ai-engine-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 28px;
}

.ai-engine-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.ai-engine-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-engine-title i {
    color: var(--gold);
    font-size: 20px;
}

.ai-engine-title h3 {
    font-size: 16px;
    font-weight: 700;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-green {
    background: rgba(34, 197, 94, 0.15);
    color: var(--green);
}

.badge-red {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red);
}

.badge-yellow {
    background: rgba(234, 179, 8, 0.15);
    color: var(--yellow);
}

.ai-engine-meta {
    color: var(--text-muted);
    font-size: 13px;
}

.ai-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.ai-metric-bar {
    height: 6px;
    background: var(--bg-input);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.ai-metric-fill {
    height: 100%;
    background: var(--gold-gradient);
    border-radius: 10px;
    transition: width 1.5s ease;
}

.ai-metric-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
}

.ai-metric-info span:last-child {
    font-weight: 700;
    color: var(--gold);
}

/* Card */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.card-header h3 {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.card-body {
    padding: 24px;
}

.link-gold {
    color: var(--gold);
    font-size: 13px;
    font-weight: 600;
}

/* Trades Table */
.trades-table-wrapper {
    overflow-x: auto;
}

.trades-table {
    width: 100%;
    border-collapse: collapse;
}

.trades-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.trades-table td {
    padding: 12px 16px;
    font-size: 13px;
    border-bottom: 1px solid rgba(42, 42, 58, 0.3);
    white-space: nowrap;
}

.trades-table tr:hover td {
    background: rgba(212, 168, 67, 0.02);
}

.trade-pair {
    font-weight: 700;
    color: var(--text-primary);
}

.trade-buy { color: var(--green); font-weight: 600; }
.trade-sell { color: var(--red); font-weight: 600; }

/* Form Select */
.form-select {
    padding: 8px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: var(--gold);
}

/* Deposit */
.deposit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 900px) {
    .deposit-grid { grid-template-columns: 1fr; }
}

.deposit-amount-selector {
    margin-bottom: 24px;
}

.deposit-amount-selector label,
.payment-methods label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.amount-presets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.amount-preset {
    padding: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.amount-preset:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.amount-preset.active {
    background: rgba(212, 168, 67, 0.1);
    border-color: var(--gold);
    color: var(--gold);
}

.payment-methods {
    margin-bottom: 24px;
}

.payment-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.payment-option {
    cursor: pointer;
}

.payment-option input {
    display: none;
}

.payment-option-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.payment-option-inner i {
    font-size: 24px;
    color: var(--text-secondary);
}

.payment-option-inner span {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.payment-option.active .payment-option-inner,
.payment-option input:checked + .payment-option-inner {
    border-color: var(--gold);
    background: rgba(212, 168, 67, 0.1);
}

.payment-option input:checked + .payment-option-inner i,
.payment-option input:checked + .payment-option-inner span {
    color: var(--gold);
}

.deposit-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(212, 168, 67, 0.05);
    border: 1px solid rgba(212, 168, 67, 0.1);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
}

.deposit-note i {
    color: var(--gold);
    margin-top: 2px;
}

.deposit-history,
.withdraw-history {
    max-height: 500px;
    overflow-y: auto;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 14px;
}

/* History Items */
.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(42, 42, 58, 0.3);
    transition: var(--transition);
}

.history-item:hover {
    background: rgba(212, 168, 67, 0.02);
}

.history-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.history-item-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
}

.history-item-icon.icon-deposit {
    background: rgba(34, 197, 94, 0.1);
    color: var(--green);
}

.history-item-icon.icon-withdraw {
    background: rgba(239, 68, 68, 0.1);
    color: var(--red);
}

.history-item-info span {
    display: block;
}

.history-item-info .history-amount {
    font-weight: 700;
    font-size: 14px;
}

.history-item-info .history-date {
    font-size: 12px;
    color: var(--text-muted);
}

.history-item-right {
    text-align: right;
}

.history-item-right .history-method {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Withdraw */
.withdraw-balance-info {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 24px;
}

.withdraw-balance-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.withdraw-balance-row + .withdraw-balance-row {
    border-top: 1px solid var(--border);
}

.withdraw-balance-row strong {
    font-size: 18px;
}

/* Settings */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 768px) {
    .settings-grid { grid-template-columns: 1fr; }
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
}

.modal p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Referral link row */
.ref-link-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.ref-link-input {
    flex: 1;
    min-width: 0;
}

.ref-copy-btn {
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .ref-link-row { flex-direction: column; align-items: stretch; }
    .ref-copy-btn { width: 100%; }
    .modal { padding: 22px 18px; width: calc(100% - 24px); border-radius: var(--radius); }
    .modal h3 { font-size: 18px; }
    .modal-actions { flex-direction: column-reverse; }
    .modal-actions .btn { width: 100%; }
}

/* Toast */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 300px;
    animation: toastIn 0.3s ease;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

.toast-success { border-left: 3px solid var(--green); }
.toast-error { border-left: 3px solid var(--red); }
.toast-info { border-left: 3px solid var(--blue); }
.toast-warning { border-left: 3px solid var(--yellow); }

.toast i {
    font-size: 18px;
}

.toast-success i { color: var(--green); }
.toast-error i { color: var(--red); }
.toast-info i { color: var(--blue); }
.toast-warning i { color: var(--yellow); }

.toast span {
    font-size: 13px;
    font-weight: 500;
}

@media (max-width: 600px) {
    .toast-container {
        top: auto;
        bottom: 16px;
        left: 12px;
        right: 12px;
    }
    .toast {
        min-width: 0;
        width: 100%;
        padding: 12px 14px;
    }
}

/* ============================================
   Global mobile tweaks
   ============================================ */

@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .logo img { height: 44px; }
    .footer-logo { height: 44px; }
    .btn { min-height: 42px; }
    .btn-sm { min-height: 36px; }
    .btn-lg { padding: 13px 20px; font-size: 15px; }
    .input-wrapper input,
    .form-select,
    textarea { font-size: 16px; }
    .input-lg input { font-size: 17px; }
}

@media (hover: none) {
    .feature-card:hover,
    .stat-card:hover,
    .btn-primary:hover { transform: none; }
}

/* ============================================
   Hero Animated Chart (SVG-based)
   ============================================ */

.hero-chart-placeholder svg {
    width: 100%;
    height: 100%;
}

/* Spin animation (for spinners) */
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}

/* ===== Dashboard: адаптив (вынесено в конец, чтобы перекрывать базовые правила) ===== */
@media (max-width: 1100px) {
    .balance-cards { grid-template-columns: 1fr 1fr; }
    .balance-card-main { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    .dashboard-section { padding: 20px 16px; }
    .balance-cards { gap: 12px; margin-bottom: 20px; }
    .balance-card { padding: 18px; gap: 12px; }
    .balance-card-main { flex-wrap: wrap; }
    .balance-card-main .balance-card-info { flex: 1 1 160px; }
    .balance-card-main .balance-card-actions {
        flex: 1 1 100%;
        margin-top: 8px;
    }
    .balance-card-main .balance-card-actions .btn { flex: 1; }
    .balance-card-value { font-size: 22px; }
    .balance-card-icon { width: 42px; height: 42px; font-size: 17px; }
    .charts-row { gap: 16px; margin-bottom: 20px; }
    .chart-card { padding: 18px 16px; }
    .chart-card-header { flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
    .chart-container { height: 220px; }
    .chart-container-sm { height: 170px; }
    .ai-engine-card { padding: 18px 16px; margin-bottom: 20px; }
    .ai-metrics { grid-template-columns: 1fr; gap: 14px; }
    .card-header { padding: 16px; flex-wrap: wrap; gap: 10px; }
    .card-body { padding: 16px; }
    .trades-table th,
    .trades-table td { padding: 10px 12px; font-size: 12px; white-space: nowrap; }
    /* таблицы: горизонтальный скролл + подсказка-градиент справа */
    .trades-table-wrapper {
        -webkit-overflow-scrolling: touch;
        background:
            linear-gradient(to right, var(--bg-card) 30%, rgba(0,0,0,0)),
            linear-gradient(to left, var(--bg-card) 30%, rgba(0,0,0,0)) 100% 0,
            linear-gradient(to right, rgba(0,0,0,.35), rgba(0,0,0,0)),
            linear-gradient(to left, rgba(0,0,0,.35), rgba(0,0,0,0)) 100% 0;
        background-repeat: no-repeat;
        background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
        background-attachment: local, local, scroll, scroll;
    }
    .deposit-grid, .settings-grid { gap: 16px; }
    .history-item { padding: 14px 16px; }
    .withdraw-balance-info { padding: 14px 16px; }
    .withdraw-balance-row { font-size: 13px; flex-wrap: wrap; gap: 4px 8px; }
    .withdraw-balance-row strong { font-size: 16px; }
    .amount-presets { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .amount-preset { padding: 10px 4px; font-size: 13px; }
    .payment-option-inner { padding: 12px 8px; }
    .deposit-note { font-size: 12px; }
}

@media (max-width: 600px) {
    .balance-cards,
    .balance-cards-3 { grid-template-columns: 1fr 1fr; }
    .balance-card-main { grid-column: 1 / -1; }
    .balance-cards .balance-card:not(.balance-card-main) { flex-direction: column; gap: 10px; padding: 14px; }
    .balance-cards .balance-card:not(.balance-card-main) .balance-card-value { font-size: 18px; }
    .balance-cards .balance-card:not(.balance-card-main) .balance-card-label { font-size: 12px; }
    /* последняя одиночная карточка (Win Rate / 3-я реферальная) — на всю ширину, в ряд */
    #section-overview .balance-cards .balance-card:last-child,
    .balance-cards-3 .balance-card:last-child {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        gap: 14px;
    }
}

@media (max-width: 360px) {
    .balance-cards,
    .balance-cards-3 { grid-template-columns: 1fr; }
}

/* ===== Серверная версия: реквизиты, вкладки оплаты, бейджи ===== */
.payment-grid-2 { grid-template-columns: repeat(2, 1fr); }
.payment-grid-3 { grid-template-columns: repeat(3, 1fr); }
.deposit-instructions { margin: 16px 0; }
.pay-req {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
}
.pay-req-title { font-weight: 700; margin-bottom: 12px; color: var(--text); font-size: 14px; }
.pay-req-title i { color: var(--gold); margin-right: 6px; }
.pay-req-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.pay-req-row span { color: var(--text-secondary); white-space: nowrap; }
.pay-req-row code {
    background: rgba(212,175,55,.12);
    color: var(--gold);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    word-break: break-all;
    text-align: right;
}
.pay-req-row strong { text-align: right; word-break: break-word; }
.pay-req-memo code { background: rgba(239,68,68,.14); color: #ffb4b4; }
.pay-req-warn { margin-top: 10px; font-size: 12px; color: #e9b949; line-height: 1.4; }
.pay-req-warn i { margin-right: 4px; }

.nav-badge {
    display: inline-block;
    min-width: 18px;
    padding: 1px 6px;
    margin-left: 6px;
    border-radius: 10px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    vertical-align: middle;
}

.adm-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 11px 13px;
    color: var(--text);
    font-size: 14px;
    outline: none;
}
.adm-input:focus { border-color: var(--gold); }

.rub-presets { grid-template-columns: repeat(5, 1fr); }
.rub-order { margin-bottom: 8px; }
.rub-pay { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; margin-top: 6px; }
.rub-qr { background: #fff; border-radius: 12px; padding: 10px; width: 240px; height: 240px; }
.rub-pay-info { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 10px; }
.rub-amount { font-size: 30px; font-weight: 800; color: var(--text); }
.rub-credit { font-size: 14px; color: #22c55e; font-weight: 600; }
.rub-timer { font-size: 13px; color: #e9b949; font-weight: 600; }
.rub-hint { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.rub-status { display: flex; gap: 14px; align-items: center; padding: 14px 4px; }
.rub-status > i { font-size: 30px; }
.rub-status b { display: block; font-size: 15px; margin-bottom: 4px; }
.rub-status span { font-size: 13px; color: var(--text-secondary); line-height: 1.45; }
.rub-ok > i { color: #22c55e; }
.rub-wait > i { color: var(--gold); }
.rub-warn > i { color: #e9b949; }
.rub-err > i { color: #ef4444; }
.rub-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

.pwa-banner {
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 9999;
    display: flex; align-items: center; gap: 12px; padding: 12px 14px;
    background: rgba(20, 20, 26, .96); border: 1px solid rgba(212, 168, 67, .45); border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .55); backdrop-filter: blur(10px);
    animation: pwaUp .35s ease;
}
.pwa-banner img { width: 44px; height: 44px; border-radius: 11px; }
.pwa-banner-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pwa-banner-text b { font-size: 14px; color: var(--text); }
.pwa-banner-text span { font-size: 12px; color: var(--text-muted); }
.pwa-banner-close { background: none; border: 0; color: var(--text-muted); font-size: 24px; line-height: 1; cursor: pointer; padding: 0 2px; }
.pwa-sheet-overlay {
    position: fixed; inset: 0; z-index: 10000; background: rgba(0, 0, 0, .65);
    display: flex; align-items: flex-end; justify-content: center; animation: pwaFade .25s ease;
}
.pwa-sheet {
    position: relative; width: 100%; max-width: 480px; text-align: center;
    background: #15151b; border: 1px solid rgba(212, 168, 67, .35); border-bottom: 0;
    border-radius: 22px 22px 0 0; padding: 28px 22px calc(26px + env(safe-area-inset-bottom));
    animation: pwaUp .3s ease;
}
.pwa-sheet-icon { width: 76px; height: 76px; border-radius: 18px; box-shadow: 0 8px 24px rgba(212, 168, 67, .25); }
.pwa-sheet h3 { margin: 14px 0 6px; font-size: 20px; }
.pwa-sheet p { color: var(--text-muted); font-size: 14px; margin-bottom: 18px; }
.pwa-sheet ol { list-style: none; text-align: left; display: flex; flex-direction: column; gap: 12px; padding: 0; margin: 0; }
.pwa-sheet li { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.pwa-sheet li i { color: #3b82f6; }
.pwa-step {
    flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--gold); color: #000;
    font-weight: 800; font-size: 13px; display: inline-flex; align-items: center; justify-content: center;
}
.pwa-sheet-note { margin-top: 16px; font-size: 13px; color: #e9b949; }
.pwa-sheet-close { position: absolute; top: 10px; right: 14px; background: none; border: 0; color: var(--text-muted); font-size: 28px; cursor: pointer; }
@keyframes pwaUp { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pwaFade { from { opacity: 0; } to { opacity: 1; } }

/* Google Authenticator */
.totp-state { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; margin-bottom: 18px;
    border: 1px solid var(--border); border-radius: 12px; background: var(--bg-input); }
.totp-state > i { font-size: 24px; color: var(--gold); margin-top: 2px; }
.totp-state.totp-on { border-color: rgba(34, 197, 94, 0.35); background: rgba(34, 197, 94, 0.06); }
.totp-state.totp-on > i { color: #22c55e; }
.totp-state strong { display: block; margin-bottom: 4px; }
.totp-state span { color: var(--text-secondary); font-size: 13px; line-height: 1.5; }
.totp-steps { margin: 0 0 16px; padding: 0; list-style: none; counter-reset: totp; }
.totp-steps li { counter-increment: totp; display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px;
    font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.totp-steps li::before { content: counter(totp); flex: 0 0 24px; height: 24px; border-radius: 50%; background: var(--gold);
    color: #000; font-weight: 800; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.totp-steps b { color: var(--text-primary, #f0f0f5); }
.totp-qr { display: flex; justify-content: center; margin: 6px 0 14px; }
.totp-qr img { width: 220px; height: 220px; border-radius: 14px; background: #fff; padding: 8px;
    box-shadow: 0 0 0 1px var(--border), 0 10px 30px rgba(212, 168, 67, 0.12); }
.totp-open { display: none; margin-bottom: 14px; }
.totp-secret { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-bottom: 16px;
    font-size: 13px; color: var(--text-secondary); }
.totp-secret code { font-family: ui-monospace, Consolas, monospace; font-size: 14px; letter-spacing: 1px; color: var(--gold-light);
    background: var(--bg-input); border: 1px dashed var(--border-light); border-radius: 8px; padding: 6px 10px; word-break: break-all; }
.totp-input { letter-spacing: 6px; font-size: 18px !important; font-weight: 700; }
.totp-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.captcha-box { min-height: 65px; }
.totp-hint { display: block; margin-top: 6px; color: var(--text-secondary); font-size: 12px; }
@media (hover: none) and (pointer: coarse) { .totp-open { display: flex; justify-content: center; } }

@media (max-width: 600px) {
    .payment-grid-3 { grid-template-columns: 1fr; }
    .rub-presets { grid-template-columns: repeat(3, 1fr); }
    .rub-qr { width: 100%; height: auto; max-width: 260px; margin: 0 auto; }
}
