:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #38bdf8;
    --border-color: #334155;
    --danger: #ef4444;
    --success: #10b981;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body { background-color: var(--bg-color); color: var(--text-primary); min-height: 100vh; display: flex; justify-content: center; }

.hidden { display: none !important; }

.auth-wrapper, .app-container { width: 100%; max-width: 480px; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg-color); }
.auth-wrapper { justify-content: center; align-items: center; padding: 20px; }

.auth-card { background: var(--card-bg); padding: 24px; border-radius: 16px; width: 100%; box-shadow: 0 10px 25px rgba(0,0,0,0.4); }
.auth-card h2 { text-align: center; margin-bottom: 16px; }

.auth-tabs { display: flex; gap: 8px; margin-bottom: 20px; background: #0f172a; padding: 4px; border-radius: 8px; }
.tab-btn { flex: 1; background: none; border: none; color: var(--text-secondary); padding: 8px; border-radius: 6px; cursor: pointer; font-weight: 600; }
.tab-btn.active { background: var(--accent); color: #0f172a; }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 4px; }
.form-group input, .form-group select { width: 100%; padding: 10px; border-radius: 8px; border: 1px solid var(--border-color); background: #0f172a; color: #fff; }

.primary-btn { background: var(--accent); color: #0f172a; border: none; padding: 10px 14px; border-radius: 8px; font-weight: 600; cursor: pointer; }
.secondary-btn { background: #334155; color: #fff; border: none; padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: 0.8rem; }
.full-btn { width: 100%; }

.error-msg { color: var(--danger); font-size: 0.8rem; margin-top: 8px; text-align: center; }
.info-msg { color: var(--success); font-size: 0.8rem; margin-top: 8px; text-align: center; }

/* Header & Vault */
.app-header { padding: 16px; background: rgba(15, 23, 42, 0.9); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--border-color); }
.header-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.header-actions { display: flex; gap: 6px; }
.search-box input { width: 100%; padding: 10px; border-radius: 10px; border: 1px solid var(--border-color); background: #1e293b; color: #fff; margin-bottom: 10px; }

.filter-group { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.filter-group label { font-size: 0.75rem; color: var(--text-secondary); min-width: 55px; }
.chip-scroll { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.chip { background: #1e293b; border: 1px solid var(--border-color); color: var(--text-secondary); padding: 4px 12px; border-radius: 16px; font-size: 0.78rem; cursor: pointer; white-space: nowrap; }
.chip.active { background: var(--accent); color: #0f172a; font-weight: 600; }

.content-area { padding: 16px; flex: 1; }
.card-list { display: flex; flex-direction: column; gap: 14px; }
.wallet-card { border-radius: 16px; padding: 18px; color: #fff; box-shadow: 0 10px 20px rgba(0,0,0,0.3); }
.card-blue { background: linear-gradient(135deg, #1e3a8a, #3b82f6); }
.card-purple { background: linear-gradient(135deg, #581c87, #a855f7); }
.card-emerald { background: linear-gradient(135deg, #064e3b, #10b981); }
.card-amber { background: linear-gradient(135deg, #78350f, #f59e0b); }

.card-header-row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 0.75rem; font-weight: 600; }
.card-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.card-actions-bar { display: flex; gap: 8px; margin-top: 12px; border-top: 1px solid rgba(255,255,255,0.15); padding-top: 8px; }
.card-actions-bar button { background: rgba(255,255,255,0.2); border: none; color: #fff; padding: 6px 10px; border-radius: 6px; font-size: 0.75rem; cursor: pointer; }

/* Modals */
.modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.7); display: flex; justify-content: center; align-items: flex-end; z-index: 100; }
.modal-content { background: var(--card-bg); width: 100%; max-width: 480px; border-radius: 20px 20px 0 0; padding: 20px; max-height: 90vh; overflow-y: auto; }
.modal-large { height: 85vh; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.close-btn { background: none; border: none; color: var(--text-secondary); font-size: 1.5rem; cursor: pointer; }
.form-row { display: flex; gap: 10px; }
.form-row .form-group { flex: 1; }

.info-box { background: #0f172a; padding: 10px; border-radius: 8px; margin-top: 10px; font-family: monospace; font-size: 0.85rem; word-break: break-all; }
.admin-list { background: #0f172a; border-radius: 8px; padding: 10px; margin-top: 8px; max-height: 200px; overflow-y: auto; }
.admin-item { display: flex; justify-content: space-between; align-items: center; padding: 8px; border-bottom: 1px solid var(--border-color); font-size: 0.85rem; }