/* ═══════════════════════════════════════
   AgentChain Wallet v2 — Styles
   ═══════════════════════════════════════ */

:root {
    --bg: #050508;
    --bg-card: rgba(12, 12, 24, 0.6);
    --bg-card-solid: #0c0c18;
    --bg-hover: rgba(20, 20, 40, 0.8);
    --bg-input: rgba(8, 8, 20, 0.8);
    --border: rgba(255, 255, 255, 0.06);
    --border-focus: rgba(0, 212, 255, 0.4);
    --text: #e2e8f0;
    --text-dim: rgba(255, 255, 255, 0.5);
    --text-muted: rgba(255, 255, 255, 0.3);
    --cyan: #00d4ff;
    --green: #00ff88;
    --purple: #8b5cf6;
    --red: #ff4757;
    --orange: #ff9f43;
    --gradient: linear-gradient(135deg, #00d4ff, #00ff88);
    --gradient-purple: linear-gradient(135deg, #8b5cf6, #00d4ff);
    --glass: rgba(255, 255, 255, 0.03);
    --sidebar-w: 260px;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --font: 'Inter', -apple-system, sans-serif;
    --mono: 'JetBrains Mono', monospace;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

.screen { display: none; }
.screen.active { display: flex; }
.accent { color: var(--cyan); }

/* ═══ Onboarding & Lock Screen ═══ */

#onboarding, #lockscreen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.onboarding-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.25;
    animation: orbFloat 20s ease-in-out infinite;
}
.orb-1 { width: 400px; height: 400px; background: var(--cyan); top: -100px; left: -100px; }
.orb-2 { width: 350px; height: 350px; background: var(--purple); bottom: -100px; right: -100px; animation-delay: -7s; }
.orb-3 { width: 250px; height: 250px; background: var(--green); top: 50%; left: 50%; transform: translate(-50%, -50%); animation-delay: -14s; }

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(30px, -30px); }
    50% { transform: translate(-20px, 20px); }
    75% { transform: translate(20px, 30px); }
}

.onboarding-content {
    position: relative;
    z-index: 2;
    max-width: 520px;
    width: 100%;
    padding: 2rem;
    text-align: center;
}

.onboarding-logo { margin-bottom: 2.5rem; }
.logo-icon {
    display: inline-flex;
    margin-bottom: 1rem;
    animation: logoPulse 3s ease-in-out infinite;
}
@keyframes logoPulse {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(0,212,255,0.3)); }
    50% { filter: drop-shadow(0 0 25px rgba(0,212,255,0.5)); }
}

.onboarding-logo h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.onboarding-sub {
    color: var(--text-dim);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

.onboard-step { display: none; }
.onboard-step.active { display: block; animation: fadeSlideUp 0.4s ease; }

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Buttons */
.btn-onboard {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    margin-bottom: 0.75rem;
}
.btn-primary-lg {
    background: var(--gradient);
    color: #050508;
}
.btn-primary-lg:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,212,255,0.25); }
.btn-primary-lg:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-secondary-lg {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
}
.btn-secondary-lg:hover { border-color: var(--cyan); background: var(--bg-hover); }

.onboard-hint {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 1rem;
}
.btn-link {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-family: var(--font);
    font-size: 0.9rem;
    padding: 0.5rem;
    transition: color var(--transition);
}
.btn-link:hover { color: var(--cyan); }

/* Input Groups */
.input-group {
    text-align: left;
    margin-bottom: 1.25rem;
}
.input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}
.input-group input,
.input-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--mono);
    font-size: 0.9rem;
    outline: none;
    transition: border-color var(--transition);
    resize: vertical;
}
.input-group input:focus,
.input-group textarea:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}
.input-group input::placeholder,
.input-group textarea::placeholder { color: var(--text-muted); }

.input-hint {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}
.input-with-suffix { position: relative; }
.input-with-suffix input { padding-right: 5rem; }
.input-suffix {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-family: var(--mono);
    font-size: 0.85rem;
    font-weight: 600;
}

/* Password Strength */
.password-strength {
    height: 3px;
    border-radius: 2px;
    margin-top: 0.5rem;
    background: var(--border);
    overflow: hidden;
}
.password-strength .strength-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s, background 0.3s;
}

.step-desc {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}
.warning-text { color: var(--orange); }

h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

/* Recovery Key Display */
.recovery-key-box {
    text-align: left;
    margin-bottom: 1.5rem;
}
.recovery-key-box label {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}
.key-display-box {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--orange);
    word-break: break-all;
    line-height: 1.6;
    user-select: all;
}
.key-display-box.address {
    color: var(--cyan);
}

.seed-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}
.btn-sm {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.85rem;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
}
.btn-ghost-sm {
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--border);
}
.btn-ghost-sm:hover { border-color: var(--cyan); color: var(--cyan); }

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-dim);
    cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--cyan);
}

/* ═══ App Shell ═══ */

#app {
    min-height: 100vh;
    position: relative;
}

/* Mobile Header */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: rgba(5, 5, 8, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
}
.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}
.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
}
.mobile-title { font-weight: 600; font-size: 0.95rem; }
.mobile-network {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* Sidebar */
#sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-w);
    background: rgba(8, 8, 16, 0.95);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 200;
    transition: transform 0.3s ease;
}
.sidebar-header {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid var(--border);
}
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.network-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 255, 136, 0.08);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--green);
}
.network-dot {
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    display: inline-block;
    animation: dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 4px var(--green); }
    50% { opacity: 0.5; box-shadow: 0 0 8px var(--green); }
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
    position: relative;
}
.nav-item:hover { color: var(--text); background: var(--glass); }
.nav-item.active { color: var(--cyan); background: rgba(0, 212, 255, 0.08); }
.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--gradient);
    border-radius: 0 2px 2px 0;
}

.sidebar-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 1rem 0.75rem;
    justify-content: center;
}
.sidebar-links a {
    color: var(--text-muted);
    font-size: 0.7rem;
    text-decoration: none;
    padding: 3px 8px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 4px;
    transition: all var(--transition);
}
.sidebar-links a:hover { color: var(--cyan); border-color: var(--cyan); }

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.wallet-address {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text-dim);
    cursor: pointer;
    transition: all var(--transition);
}
.wallet-address:hover { border-color: var(--cyan); color: var(--cyan); }

.btn-lock {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    font-family: var(--font);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition);
}
.btn-lock:hover { border-color: var(--red); color: var(--red); }

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 150;
}

/* Main Content */
#main-content {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    padding: 2rem;
}

.page { display: none; }
.page.active { display: block; animation: fadeSlideUp 0.3s ease; }

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.page-header h2 { margin-bottom: 0; }
.header-actions { display: flex; gap: 0.5rem; align-items: center; }

.btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    cursor: pointer;
    transition: all var(--transition);
}
.btn-icon:hover { color: var(--cyan); border-color: var(--cyan); }

.chain-info-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-dim);
    font-family: var(--mono);
}

/* ═══ Dashboard ═══ */

.balance-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.balance-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient);
    opacity: 0.5;
}
.balance-label {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}
.balance-amount {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}
.balance-value {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.balance-ticker {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dim);
}
.balance-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}
.balance-actions {
    display: flex;
    gap: 0.75rem;
}
.bal-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-dim);
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}
.bal-btn:hover {
    background: var(--bg-hover);
    color: var(--text);
    border-color: rgba(255,255,255,0.1);
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}
.stat-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    flex-shrink: 0;
}
.staking-icon { background: rgba(0, 212, 255, 0.1); color: var(--cyan); }
.rep-icon { background: rgba(139, 92, 246, 0.1); color: var(--purple); }
.tx-icon { background: rgba(0, 255, 136, 0.1); color: var(--green); }

.stat-info { display: flex; flex-direction: column; gap: 0.15rem; }
.stat-label { font-size: 0.78rem; color: var(--text-muted); }
.stat-value-sm { font-size: 1.05rem; font-weight: 700; }

.rep-bar {
    width: 100%;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin-top: 0.25rem;
}
.rep-fill {
    height: 100%;
    background: var(--gradient-purple);
    border-radius: 2px;
    transition: width 1s ease;
}

/* Section Card */
.section-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    margin-bottom: 1.5rem;
}
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.section-header h3 { font-size: 1rem; font-weight: 600; }

.empty-state {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    padding: 1.5rem 0;
}

/* Account Details Grid */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.detail-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.detail-value {
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--mono);
}

/* ═══ Send Page ═══ */

.send-form { max-width: 560px; }

.gas-estimate {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}
.gas-row {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    font-size: 0.85rem;
    color: var(--text-dim);
}
.gas-row.total {
    border-top: 1px solid var(--border);
    margin-top: 0.4rem;
    padding-top: 0.75rem;
    color: var(--text);
    font-weight: 600;
}
.gas-value { font-family: var(--mono); }

.btn-primary-full {
    width: 100%;
    padding: 1rem;
    background: var(--gradient);
    color: #050508;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}
.btn-primary-full:hover { transform: translateY(-1px); box-shadow: 0 8px 30px rgba(0, 212, 255, 0.2); }

.tx-status-area {
    margin-top: 1rem;
}
.tx-pending {
    padding: 1rem;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: var(--radius-sm);
    color: var(--cyan);
    font-size: 0.9rem;
    text-align: center;
    animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
.tx-success {
    padding: 1rem;
    background: rgba(0, 255, 136, 0.08);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: var(--radius-sm);
    color: var(--green);
    font-size: 0.9rem;
    text-align: center;
}
.tx-error {
    padding: 1rem;
    background: rgba(255, 71, 87, 0.08);
    border: 1px solid rgba(255, 71, 87, 0.2);
    border-radius: var(--radius-sm);
    color: var(--red);
    font-size: 0.9rem;
    text-align: center;
}

/* ═══ Receive Page ═══ */

.receive-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
    max-width: 800px;
}
.receive-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    backdrop-filter: blur(10px);
}
.receive-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.address-display { text-align: left; }
.address-display label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.address-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
}
.address-box:hover { border-color: var(--cyan); }
.address-box code {
    flex: 1;
    font-size: 0.7rem;
    word-break: break-all;
    line-height: 1.5;
    color: var(--cyan);
}

.address-note {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.75rem;
}

.faucet-hint {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: var(--radius-sm);
}
.faucet-hint p {
    font-size: 0.85rem;
    color: var(--text-dim);
}
.faucet-hint a {
    color: var(--cyan);
    text-decoration: none;
    font-weight: 600;
}
.faucet-hint a:hover { text-decoration: underline; }

.card-desc {
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
.btn-secondary-sm {
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}
.btn-secondary-sm:hover { border-color: var(--cyan); color: var(--cyan); }

.stealth-result {
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--orange);
    word-break: break-all;
    display: none;
    line-height: 1.6;
    user-select: all;
}
.stealth-result.visible { display: block; animation: fadeSlideUp 0.3s ease; }

/* ═══ Modal ═══ */

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-overlay.open { display: flex; }

.modal {
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    max-width: 440px;
    width: 100%;
    animation: fadeSlideUp 0.3s ease;
    overflow: hidden;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1.1rem; }
.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all var(--transition);
}
.modal-close:hover { background: var(--glass); color: var(--text); }

.modal-body { padding: 1.5rem; }
.modal-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
}
.btn-primary-sm {
    padding: 0.5rem 1.25rem;
    background: var(--gradient);
    color: #050508;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}
.btn-primary-sm:hover { box-shadow: 0 4px 15px rgba(0, 212, 255, 0.25); }

.confirm-row {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem 0;
    font-size: 0.9rem;
}
.confirm-row .label { color: var(--text-dim); }
.confirm-row .value { font-weight: 500; font-family: var(--mono); }
.confirm-row.total {
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    font-weight: 700;
}

/* ═══ Toasts ═══ */

#toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column-reverse;
    gap: 0.5rem;
    z-index: 2000;
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
    font-size: 0.9rem;
    pointer-events: auto;
    animation: toastIn 0.3s ease;
    min-width: 280px;
    max-width: 400px;
}
.toast.removing { animation: toastOut 0.3s ease forwards; }
.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }
.toast.info { border-left: 3px solid var(--cyan); }
.toast.warning { border-left: 3px solid var(--orange); }
.toast-icon { font-size: 1.1rem; flex-shrink: 0; }

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

/* ═══ Responsive ═══ */

@media (max-width: 1024px) {
    .stats-row { grid-template-columns: 1fr; }
    .receive-content { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .mobile-header { display: flex; }
    #sidebar { transform: translateX(-100%); }
    #sidebar.open { transform: translateX(0); }
    .sidebar-overlay.open { display: block; }
    #main-content {
        margin-left: 0;
        padding: 56px 1rem 1.5rem;
    }
    .balance-value { font-size: 1.8rem; }
    .balance-actions { flex-wrap: wrap; }
    .balance-actions .bal-btn { flex: 1 1 calc(50% - 0.375rem); }
    .stats-row { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr 1fr; }
    #toast-container {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
    .toast { min-width: auto; width: 100%; }
}

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