/* ============================================
   ELS 당근마켓 - Premium Fintech UI v2.0
   모바일 웹 최적화 (PoC)
   ============================================ */

:root {
    --primary: #FF6F0F;
    --primary-dark: #E55A00;
    --primary-light: #FFF3EB;
    --primary-gradient: linear-gradient(135deg, #FF6F0F 0%, #FF9B4F 100%);
    --secondary: #0F172A;
    --secondary-light: #1E293B;
    --accent: #3B82F6;
    --accent-light: #EFF6FF;
    --success: #10B981;
    --success-light: #ECFDF5;
    --warning: #F59E0B;
    --warning-light: #FFFBEB;
    --danger: #EF4444;
    --danger-light: #FEF2F2;
    --purple: #8B5CF6;
    --purple-light: #F5F3FF;
    --bg: #F1F5F9;
    --bg-card: #FFFFFF;
    --text-primary: #0F172A;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    --border: #E2E8F0;
    --border-light: #F1F5F9;
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
    --shadow-glow: 0 0 20px rgba(255,111,15,0.15);
    --radius: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --font: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============ App Shell ============ */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    position: relative;
    box-shadow: 0 0 40px rgba(0,0,0,0.06);
}

/* ============ Header ============ */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226,232,240,0.6);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-left { display: flex; align-items: center; gap: 8px; }
.header-right { display: flex; align-items: center; gap: 6px; }
.logo { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.logo-icon { font-size: 26px; filter: drop-shadow(0 2px 4px rgba(255,111,15,0.3)); }
.logo-text { font-size: 18px; font-weight: 800; background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; letter-spacing: -0.5px; }
.header-user {
    font-size: 11px;
    color: var(--primary-dark);
    background: var(--primary-light);
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
    border: 1px solid rgba(255,111,15,0.15);
}
.btn-icon {
    background: none;
    border: none;
    font-size: 17px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-icon:hover { background: var(--bg); color: var(--primary); }
.btn-icon:active { transform: scale(0.92); }

/* ============ Main Content ============ */
.main-content {
    flex: 1;
    padding: 16px 20px;
    padding-bottom: 88px;
    overflow-y: auto;
}

/* ============ Bottom Navigation ============ */
.bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(226,232,240,0.6);
    padding: 6px 0 env(safe-area-inset-bottom, 8px);
    z-index: 100;
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: none;
    border: none;
    font-size: 10px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px 16px;
    transition: var(--transition);
    border-radius: var(--radius-sm);
    position: relative;
    font-weight: 500;
}
.nav-item i { font-size: 20px; transition: var(--transition); }
.nav-item.active { color: var(--primary); }
.nav-item.active i { transform: scale(1.1); }
.nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 0 0 3px 3px;
}
.nav-item:active { transform: scale(0.92); }
.nav-item.active { font-weight: 700; }

/* ============ Cards ============ */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    margin-bottom: 12px;
    border: 1px solid var(--border-light);
    transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.card-title { font-size: 15px; font-weight: 700; letter-spacing: -0.3px; }
.card-subtitle { font-size: 12px; color: var(--text-secondary); margin-top: 3px; }

/* ============ Badges ============ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: -0.2px;
    white-space: nowrap;
}
.badge-primary { background: var(--primary-light); color: var(--primary-dark); }
.badge-success { background: var(--success-light); color: #047857; }
.badge-warning { background: var(--warning-light); color: #B45309; }
.badge-danger { background: var(--danger-light); color: #B91C1C; }
.badge-secondary { background: #F1F5F9; color: #475569; }
.badge-info { background: var(--accent-light); color: #1D4ED8; }
.badge-purple { background: var(--purple-light); color: #7C3AED; }

/* ============ Buttons ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    width: 100%;
    letter-spacing: -0.3px;
    position: relative;
    overflow: hidden;
}
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, transparent 100%);
    pointer-events: none;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 12px rgba(255,111,15,0.3);
}
.btn-primary:hover { box-shadow: 0 6px 20px rgba(255,111,15,0.4); }
.btn-primary:disabled { background: #CBD5E1; box-shadow: none; cursor: not-allowed; }
.btn-secondary { background: #F1F5F9; color: var(--text-primary); box-shadow: none; }
.btn-secondary:hover { background: #E2E8F0; }
.btn-secondary::after { display: none; }
.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    box-shadow: none;
}
.btn-outline::after { display: none; }
.btn-outline:hover { background: var(--primary-light); }
.btn-sm { padding: 8px 14px; font-size: 12px; width: auto; border-radius: var(--radius-sm); }
.btn-danger { background: linear-gradient(135deg, #EF4444, #F87171); color: #fff; box-shadow: 0 4px 12px rgba(239,68,68,0.3); }
.btn-success { background: linear-gradient(135deg, #10B981, #34D399); color: #fff; box-shadow: 0 4px 12px rgba(16,185,129,0.3); }
.btn-accent { background: linear-gradient(135deg, #3B82F6, #60A5FA); color: #fff; box-shadow: 0 4px 12px rgba(59,130,246,0.3); }
.btn-group { display: flex; gap: 10px; margin-top: 16px; }
.btn-group .btn { flex: 1; }

/* ============ Forms ============ */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; letter-spacing: -0.2px; }
.form-input, .form-select {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: var(--font);
    background: #fff;
    transition: var(--transition);
    color: var(--text-primary);
}
.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255,111,15,0.1);
}
.form-input::placeholder { color: var(--text-muted); }
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 6px; line-height: 1.5; }
.form-error { font-size: 11px; color: var(--danger); margin-top: 4px; }

/* ============ OTP Input ============ */
.otp-inputs { display: flex; gap: 10px; justify-content: center; margin: 24px 0; }
.otp-input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 24px;
    font-weight: 800;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: #fff;
    transition: var(--transition);
}
.otp-input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 4px rgba(255,111,15,0.1); }

/* ============ Strategy Cards ============ */
.strategy-cards { display: flex; flex-direction: column; gap: 12px; }
.strategy-card {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    background: #fff;
}
.strategy-card:hover { border-color: rgba(255,111,15,0.4); box-shadow: var(--shadow); }
.strategy-card.selected { border-color: var(--primary); background: var(--primary-light); box-shadow: 0 0 0 3px rgba(255,111,15,0.15); }
.strategy-card.default { border-color: var(--accent); }
.strategy-card .strategy-icon { font-size: 32px; margin-bottom: 8px; }
.strategy-card .strategy-name { font-size: 15px; font-weight: 800; letter-spacing: -0.3px; }
.strategy-card .strategy-price { font-size: 22px; font-weight: 800; color: var(--primary); margin: 8px 0; letter-spacing: -0.5px; }
.strategy-card .strategy-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.strategy-card .strategy-badge {
    position: absolute;
    top: -10px;
    right: 16px;
    background: linear-gradient(135deg, #3B82F6, #6366F1);
    color: #fff;
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(59,130,246,0.4);
}

/* ============ Product List ============ */
.product-item {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}
.product-item:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.product-item.selected { border-color: var(--primary); background: var(--primary-light); }
.product-item .product-name { font-size: 14px; font-weight: 700; margin-bottom: 8px; line-height: 1.4; letter-spacing: -0.3px; }
.product-item .product-info { display: flex; flex-wrap: wrap; gap: 6px; }
.product-item .info-chip {
    font-size: 11px;
    color: var(--text-secondary);
    background: var(--bg);
    padding: 3px 10px;
    border-radius: 6px;
    font-weight: 500;
}

/* ============ Data Display ============ */
.data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}
.data-row:last-child { border-bottom: none; }
.data-label { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.data-value { font-size: 14px; font-weight: 700; text-align: right; letter-spacing: -0.3px; }
.data-value.positive { color: var(--danger); }
.data-value.negative { color: var(--accent); }

/* ============ Progress Steps ============ */
.progress-steps { display: flex; justify-content: space-between; margin: 20px 0; position: relative; }
.progress-steps::before { content: ''; position: absolute; top: 18px; left: 32px; right: 32px; height: 2px; background: var(--border); }
.step { display: flex; flex-direction: column; align-items: center; position: relative; z-index: 1; }
.step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    transition: var(--transition);
    border: 3px solid #fff;
    box-shadow: var(--shadow-xs);
}
.step.active .step-circle { background: var(--primary-gradient); color: #fff; box-shadow: 0 4px 12px rgba(255,111,15,0.4); }
.step.done .step-circle { background: linear-gradient(135deg, #10B981, #34D399); color: #fff; box-shadow: 0 4px 12px rgba(16,185,129,0.4); }
.step-label { font-size: 10px; color: var(--text-muted); margin-top: 8px; text-align: center; max-width: 60px; font-weight: 500; }
.step.active .step-label { color: var(--primary); font-weight: 700; }
.step.done .step-label { color: var(--success); font-weight: 600; }

/* ============ Analysis Display ============ */
.analysis-box {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 60%, #334155 100%);
    border-radius: var(--radius);
    padding: 24px;
    color: #fff;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
}
.analysis-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,111,15,0.15) 0%, transparent 70%);
    border-radius: 50%;
}
.analysis-box .analysis-title { font-size: 12px; color: rgba(255,255,255,.5); margin-bottom: 6px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.analysis-box .analysis-value { font-size: 32px; font-weight: 800; letter-spacing: -1px; position: relative; }
.analysis-box .analysis-sub { font-size: 12px; color: rgba(255,255,255,.4); margin-top: 4px; }
.analysis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; position: relative; }
.analysis-metric {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: var(--radius-md);
    padding: 14px;
    backdrop-filter: blur(8px);
}
.analysis-metric .metric-label { font-size: 11px; color: rgba(255,255,255,.4); font-weight: 500; }
.analysis-metric .metric-value { font-size: 18px; font-weight: 800; margin-top: 4px; letter-spacing: -0.5px; }

/* ============ Blockchain Badge ============ */
.bc-record {
    background: linear-gradient(135deg, #ECFDF5, #F0FFF4);
    border: 1px solid #86EFAC;
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin: 10px 0;
}
.bc-record .bc-title { font-size: 12px; font-weight: 700; color: #047857; display: flex; align-items: center; gap: 6px; }
.bc-record .bc-hash {
    font-size: 10px;
    font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
    color: var(--text-secondary);
    word-break: break-all;
    margin-top: 6px;
    background: rgba(255,255,255,0.6);
    padding: 6px 8px;
    border-radius: var(--radius-xs);
}

/* ============ Agreement Checkbox ============ */
.agreement-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
}
.agreement-item input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin-top: 1px;
    accent-color: var(--primary);
    border-radius: 4px;
    cursor: pointer;
}
.agreement-item label { font-size: 13px; color: var(--text-secondary); cursor: pointer; flex: 1; line-height: 1.5; }

/* ============ Empty State ============ */
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 56px; margin-bottom: 16px; opacity: 0.8; }
.empty-state .empty-text { font-size: 14px; line-height: 1.6; }

/* ============ Loading ============ */
.loading-spinner { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px; gap: 16px; }
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-spinner p { font-size: 13px; color: var(--text-muted); font-weight: 500; }

/* ============ Toast ============ */
#toast-container {
    position: fixed;
    top: 64px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: 100%;
    max-width: 440px;
    padding: 0 20px;
    pointer-events: none;
}
.toast {
    background: var(--secondary);
    color: #fff;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all .3s ease;
    font-size: 13px;
    box-shadow: var(--shadow-lg);
    pointer-events: auto;
    font-weight: 500;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-content { display: flex; align-items: center; gap: 10px; }
.toast-icon { font-size: 16px; flex-shrink: 0; }
.toast-success { background: linear-gradient(135deg, #059669, #10B981); }
.toast-error { background: linear-gradient(135deg, #DC2626, #EF4444); }
.toast-warning { background: linear-gradient(135deg, #D97706, #F59E0B); color: #fff; }
.toast-info { background: linear-gradient(135deg, #2563EB, #3B82F6); }

/* ============ Section ============ */
.section-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.5px;
}
.section-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.5; }

/* ============ Home Banner ============ */
.home-banner {
    background: linear-gradient(135deg, #FF6F0F 0%, #FF9B4F 50%, #FFBE8A 100%);
    border-radius: var(--radius);
    padding: 28px 24px;
    color: #fff;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(255,111,15,0.25);
}
.home-banner::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    border-radius: 50%;
}
.home-banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}
.home-banner h2 { font-size: 22px; font-weight: 800; margin-bottom: 6px; letter-spacing: -0.5px; position: relative; }
.home-banner p { position: relative; }

.home-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 20px 0; }
.stat-item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 16px 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}
.stat-item:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-item .stat-value { font-size: 24px; font-weight: 800; color: var(--primary); letter-spacing: -0.5px; }
.stat-item .stat-label { font-size: 11px; color: var(--text-muted); margin-top: 4px; font-weight: 600; }

.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.quick-action {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}
.quick-action:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.quick-action:active { transform: scale(0.97); }
.quick-action .qa-icon { font-size: 36px; margin-bottom: 10px; }
.quick-action .qa-title { font-size: 15px; font-weight: 800; letter-spacing: -0.3px; }
.quick-action .qa-desc { font-size: 11px; color: var(--text-muted); margin-top: 6px; line-height: 1.5; }
.quick-action.sell-action { border-bottom: 3px solid var(--primary); }
.quick-action.buy-action { border-bottom: 3px solid var(--accent); }

/* ============ Listing Card ============ */
.listing-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-light);
    position: relative;
}
.listing-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.listing-card:active { transform: scale(0.98); }
.listing-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.listing-name { font-size: 14px; font-weight: 700; flex: 1; line-height: 1.4; letter-spacing: -0.3px; }
.listing-price { font-size: 20px; font-weight: 800; color: var(--primary); letter-spacing: -0.5px; }
.listing-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.meta-tag {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 6px;
    background: var(--bg);
    color: var(--text-secondary);
    font-weight: 500;
    border: 1px solid var(--border-light);
}

/* ============ Detail Section ============ */
.detail-hero {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 60%, #334155 100%);
    border-radius: var(--radius);
    padding: 28px 24px;
    color: #fff;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}
.detail-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(255,111,15,0.2) 0%, transparent 60%);
    border-radius: 50%;
}
.detail-hero .hero-name { font-size: 16px; font-weight: 600; margin-bottom: 14px; line-height: 1.4; position: relative; opacity: 0.9; }
.detail-hero .hero-price { font-size: 30px; font-weight: 800; color: #FFB574; letter-spacing: -1px; position: relative; }
.detail-hero .hero-strategy { font-size: 12px; color: rgba(255,255,255,.5); margin-top: 6px; position: relative; }

/* ============ Tab Navigation ============ */
.tabs { display: flex; gap: 0; margin-bottom: 16px; background: var(--bg); border-radius: var(--radius-md); padding: 4px; }
.tab {
    flex: 1;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
    border-radius: var(--radius-sm);
    text-align: center;
}
.tab.active { color: var(--text-primary); background: #fff; box-shadow: var(--shadow-sm); }

/* ============ Confirmation ============ */
.confirm-summary { background: var(--bg); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.confirm-divider { height: 1px; background: var(--border); margin: 20px 0; }
.confirm-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,111,15,0.15);
}
.confirm-total .total-label { font-size: 14px; font-weight: 700; color: var(--text-secondary); }
.confirm-total .total-value { font-size: 24px; font-weight: 800; color: var(--primary); letter-spacing: -0.5px; }

/* ============ Complete Screen ============ */
.complete-check {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10B981, #34D399);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 28px auto;
    animation: popIn .5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 24px rgba(16,185,129,0.3);
}
.complete-check i { font-size: 44px; color: #fff; }
@keyframes popIn { 0% { transform: scale(0) rotate(-20deg); } 80% { transform: scale(1.1) rotate(5deg); } 100% { transform: scale(1) rotate(0); } }

.complete-title { text-align: center; font-size: 22px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.5px; }
.complete-subtitle { text-align: center; font-size: 14px; color: var(--text-secondary); margin-bottom: 28px; }

/* ============ Blockchain Records ============ */
.bc-timeline { position: relative; padding-left: 28px; }
.bc-timeline::before { content: ''; position: absolute; left: 9px; top: 0; bottom: 0; width: 2px; background: linear-gradient(180deg, #10B981, #3B82F6); }
.bc-timeline-item { position: relative; margin-bottom: 22px; }
.bc-timeline-item::before {
    content: '';
    position: absolute;
    left: -23px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10B981, #3B82F6);
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(16,185,129,0.3);
}
.bc-timeline-item .bc-type { font-size: 12px; font-weight: 700; color: #047857; }
.bc-timeline-item .bc-ref { font-size: 12px; color: var(--text-secondary); margin-top: 3px; }
.bc-timeline-item .bc-tx {
    font-size: 10px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    color: var(--text-muted);
    word-break: break-all;
    margin-top: 4px;
    background: var(--bg);
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}
.bc-timeline-item .bc-time { font-size: 10px; color: var(--text-muted); margin-top: 4px; }

/* ============ Flow Diagram ============ */
.flow-container { display: flex; flex-direction: column; gap: 4px; margin: 16px 0; }
.flow-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    font-size: 12px;
    font-weight: 500;
    transition: var(--transition);
}
.flow-step.active { border-color: var(--primary); background: var(--primary-light); }
.flow-step.done { border-color: var(--success); background: var(--success-light); }
.flow-arrow { text-align: center; color: var(--text-muted); font-size: 14px; }
.flow-step .flow-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}
.flow-step.active .flow-num { background: var(--primary-gradient); color: #fff; box-shadow: 0 2px 8px rgba(255,111,15,0.3); }
.flow-step.done .flow-num { background: linear-gradient(135deg, #10B981, #34D399); color: #fff; }

/* ============ Responsive Utils ============ */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }

/* Simulation progress */
.sim-progress { width: 100%; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; margin: 16px 0; }
.sim-progress-bar {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 4px;
    transition: width .3s ease;
    position: relative;
}
.sim-progress-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Filter panel */
.filter-panel {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}
.filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }

/* Investor type selector */
.investor-types { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.investor-type-btn {
    padding: 14px 10px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: #fff;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
    font-size: 13px;
    font-weight: 600;
}
.investor-type-btn:hover { border-color: rgba(255,111,15,0.4); }
.investor-type-btn.selected { border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark); box-shadow: 0 0 0 3px rgba(255,111,15,0.1); }

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }

/* Info box */
.info-box {
    background: var(--accent-light);
    border: 1px solid #BFDBFE;
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin: 12px 0;
}
.info-box .info-icon { font-size: 12px; color: #1D4ED8; margin-bottom: 4px; font-weight: 700; }
.info-box .info-text { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }

.warning-box {
    background: var(--warning-light);
    border: 1px solid #FDE68A;
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin: 12px 0;
}
.warning-box .warning-icon { font-size: 12px; color: #B45309; margin-bottom: 4px; font-weight: 700; }
.warning-box .warning-text { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }

/* Section with horizontal scroll */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.section-header .section-title { margin: 0; }
.section-link {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: none;
    padding: 4px 8px;
}
.section-link:hover { text-decoration: underline; }

/* Clickable card */
.card-clickable { cursor: pointer; }
.card-clickable:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.card-clickable:active { transform: scale(0.98); }

/* Status indicator dot */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}
.status-dot.live { background: var(--success); animation: pulse 2s infinite; }
@keyframes pulse {
    0%,100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Divider with text */
.divider-text {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}
.divider-text::before, .divider-text::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Account connection indicator */
.connected-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--success-light);
    border: 1px solid #A7F3D0;
    border-radius: var(--radius-sm);
    margin-top: 8px;
}
.connected-indicator .indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s infinite;
}
.connected-indicator .indicator-text { font-size: 12px; color: #047857; font-weight: 600; }
