:root {
  --brand: #0B3D91; --brand-dark: #082B6A; --brand-light: #E6EEF9;
  --accent: #00A86B; --accent-dark: #007A4D;
  --warn: #E8A33D; --danger: #C0392B;
  --bg: #F5F6F8; --card: #FFFFFF; --text: #1A1F2B;
  --muted: #6B7280; --border: #E2E5EA;
  --radius: 12px; --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.25);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; padding: 24px; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.logo { font-size: 22px; font-weight: 700; color: var(--brand); }
.logo span { color: var(--accent); }
.controls { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.tab-group, .lang-group { display: flex; background: var(--bg); border-radius: 8px; padding: 4px; }
.tab, .lang { padding: 8px 16px; border: none; background: transparent; border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--muted); transition: all 0.15s; font-family: inherit; }
.tab.active, .lang.active { background: var(--brand); color: white; }
.lang.active { background: var(--accent); }
.persona { display: none; }
.persona.active { display: block; }
.phone { width: 375px; height: 760px; background: #1A1F2B; border-radius: 40px; padding: 12px; box-shadow: var(--shadow-lg); position: relative; flex-shrink: 0; }
.phone-inner { width: 100%; height: 100%; background: var(--card); border-radius: 30px; overflow: hidden; display: flex; flex-direction: column; position: relative; }
.notch { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 120px; height: 24px; background: #1A1F2B; border-radius: 0 0 16px 16px; z-index: 10; }
.status-bar { height: 32px; padding: 6px 20px 0; display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--text); }
.app-header { padding: 16px 20px 12px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.app-title { font-size: 18px; font-weight: 700; color: var(--brand); }
.app-body { flex: 1; overflow-y: auto; padding: 16px 20px 80px; }
.app-body::-webkit-scrollbar { width: 4px; }
.app-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.curr-toggle.active { background: rgba(255,255,255,0.25) !important; }
.bottom-nav { position: absolute; bottom: 0; left: 0; right: 0; height: 64px; background: var(--card); border-top: 1px solid var(--border); display: flex; justify-content: space-around; align-items: center; padding-bottom: 8px; }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; color: var(--muted); cursor: pointer; padding: 6px 12px; }
.nav-item.active { color: var(--brand); }
.nav-icon { width: 22px; height: 22px; border-radius: 6px; background: var(--border); }
.nav-item.active .nav-icon { background: var(--brand); }
.desktop { width: 1100px; height: 760px; background: var(--card); border-radius: 12px; box-shadow: var(--shadow-lg); overflow: hidden; display: flex; flex-direction: column; flex-shrink: 0; }
.browser-bar { height: 40px; background: #E8EAED; display: flex; align-items: center; padding: 0 16px; gap: 12px; }
.traffic { display: flex; gap: 6px; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.r { background: #FF5F57; } .dot.y { background: #FFBD2E; } .dot.g { background: #28CA42; }
.url { flex: 1; background: white; border-radius: 6px; padding: 6px 12px; font-size: 12px; color: var(--muted); }
.admin-layout { flex: 1; display: flex; overflow: hidden; }
.sidebar { width: 220px; background: var(--brand-dark); color: white; padding: 20px 0; flex-shrink: 0; }
.sidebar-logo { padding: 0 20px 20px; font-size: 18px; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 16px; }
.sidebar-logo span { color: var(--accent); }
.side-item { padding: 12px 20px; font-size: 14px; color: rgba(255,255,255,0.75); cursor: pointer; border-left: 3px solid transparent; }
.side-item.active { background: rgba(255,255,255,0.08); color: white; border-left-color: var(--accent); }
.side-item:hover { background: rgba(255,255,255,0.05); }
.admin-main { flex: 1; overflow-y: auto; padding: 24px; background: var(--bg); }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.admin-header h1 { font-size: 24px; font-weight: 700; }
.admin-user { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: white; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; }
.card { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 12px; }
.balance-card { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: white; border-radius: var(--radius); padding: 24px; margin-bottom: 16px; position: relative; overflow: hidden; }
.balance-card::after { content: ''; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,0.06); }
.balance-label { font-size: 12px; opacity: 0.8; margin-bottom: 4px; }
.balance-amount { font-size: 32px; font-weight: 700; margin-bottom: 4px; }
.balance-sub { font-size: 12px; opacity: 0.7; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: 11px; font-weight: 600; }
.badge.success { background: #E6F7EF; color: var(--accent); }
.badge.warn { background: #FDF3E2; color: var(--warn); }
.badge.danger { background: #FCEAE8; color: var(--danger); }
.badge.info { background: #E6EEF9; color: var(--brand); }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 20px; border-radius: 8px; border: none; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.15s; text-align: center; font-family: inherit; }
.btn-primary { background: var(--brand); color: white; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--brand); border: 1px solid var(--border); }
.btn-danger { background: var(--danger); color: white; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); }
.row:last-child { border-bottom: none; }
.row-label { font-size: 14px; font-weight: 500; }
.row-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.row-value { font-size: 14px; font-weight: 600; }
.avatar-row { display: flex; align-items: center; gap: 12px; }
.avatar-sm { width: 40px; height: 40px; border-radius: 50%; background: var(--border); display: flex; align-items: center; justify-content: center; font-weight: 600; color: var(--muted); font-size: 14px; flex-shrink: 0; }
.tx-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; flex-shrink: 0; }
.tx-in { background: #E6F7EF; color: var(--accent); }
.tx-out { background: #FCEAE8; color: var(--danger); }
.tx-fx { background: #E6EEF9; color: var(--brand); }
.screen-label { text-align: center; font-size: 12px; color: var(--muted); margin-bottom: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.screens-grid { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; margin-bottom: 32px; }
table.admin-table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.admin-table th { text-align: left; padding: 12px 16px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); background: var(--bg); border-bottom: 1px solid var(--border); }
table.admin-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
table.admin-table tr:last-child td { border-bottom: none; }
table.admin-table tr:hover td { background: var(--bg); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.stat-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.stat-value { font-size: 28px; font-weight: 700; margin-top: 8px; color: var(--brand); }
.stat-delta { font-size: 12px; color: var(--accent); margin-top: 4px; }
.section-title { font-size: 14px; font-weight: 700; color: var(--brand); margin: 20px 0 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.login-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; padding: 40px; background: linear-gradient(135deg, #F5F6F8, #E6EEF9); }
.login-logo { font-size: 32px; font-weight: 700; color: var(--brand); margin-bottom: 8px; }
.login-logo span { color: var(--accent); }
.login-tag { font-size: 14px; color: var(--muted); margin-bottom: 32px; text-align: center; }
.login-input { width: 100%; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--border); font-size: 14px; margin-bottom: 12px; background: white; font-family: inherit; }
.login-input:focus { outline: 2px solid var(--brand); border-color: transparent; }
.info-banner { background: #E6EEF9; color: var(--brand); border-radius: var(--radius); padding: 12px 16px; font-size: 13px; margin-bottom: 16px; border-left: 3px solid var(--brand); }
.kpi-row { display: flex; gap: 12px; margin-bottom: 16px; }
.kpi { flex: 1; background: var(--bg); border-radius: 10px; padding: 12px; }
.kpi-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.kpi-value { font-size: 18px; font-weight: 700; margin-top: 4px; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.6); display: none; align-items: center; justify-content: center; z-index: 1000; padding: 20px; backdrop-filter: blur(4px); }
.modal-backdrop.open { display: flex; }
.modal { background: white; border-radius: 20px; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.modal-header { padding: 24px 28px 16px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: flex-start; }
.modal-header h2 { font-size: 22px; font-weight: 700; color: var(--brand); margin-bottom: 4px; }
.modal-header p { font-size: 13px; color: var(--muted); }
.modal-close { background: transparent; border: none; font-size: 24px; cursor: pointer; color: var(--muted); line-height: 1; padding: 4px 8px; border-radius: 6px; }
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-body { padding: 24px 28px 28px; }
.modal-field { margin-bottom: 16px; }
.modal-field label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.modal-field input, .modal-field select { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1.5px solid var(--border); font-size: 15px; font-family: inherit; transition: border-color 0.15s; background: white; color: var(--text); }
.modal-field input:focus, .modal-field select:focus { outline: none; border-color: var(--brand); }
.modal-field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.modal-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-error { display: none; background: #FCEAE8; color: var(--danger); padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }
.modal-error.visible { display: block; }
.modal-footer { padding: 0 28px 28px; }
.modal-footer .btn { width: 100%; }
.modal-footer .legal { font-size: 12px; color: var(--muted); text-align: center; margin-top: 12px; line-height: 1.5; }
.modal-footer .legal a { color: var(--brand); text-decoration: none; }
.modal-footer .legal a:hover { text-decoration: underline; }
@media (max-width: 600px) {
  .modal-field-row { grid-template-columns: 1fr; }
}