/* ================= admin panel (redesigned — Inter, SVG icons) ============ */

* { box-sizing: border-box; margin: 0; padding: 0; }
:root { --aside-w: 248px; }
body.admin-body { font-family: 'InterVar', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; background: #f3f5f9; color: #101828; min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }
.mono { font-family: 'SF Mono', 'Cascadia Code', Consolas, Menlo, monospace; }
.muted { color: #8792a3; }
.small { font-size: 12px; }
.inline { display: inline; }
.ic { flex-shrink: 0; vertical-align: middle; }

/* ------------------------------------------------------------- sidebar ---- */
.a-sidebar { position: fixed; inset: 0 auto 0 0; width: var(--aside-w); background: linear-gradient(180deg, #0b1220 0%, #0d1730 100%); color: #cbd5e1; display: flex; flex-direction: column; z-index: 20; border-right: 1px solid rgba(148,163,184,0.12); }
.a-logo { display: flex; align-items: center; gap: 10px; padding: 20px 20px 18px; border-bottom: 1px solid rgba(148,163,184,0.12); }
.a-logo-mark { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, #3b82f6, #6366f1); color: #fff; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(59,130,246,0.35); }
.a-logo-mark.big { width: 52px; height: 52px; border-radius: 14px; margin: 0 auto 14px; }
.a-logo-text { font-size: 19px; font-weight: 700; color: #fff; letter-spacing: -0.3px; }
.a-logo-text em { font-style: normal; color: #60a5fa; }
.a-nav { display: flex; flex-direction: column; padding: 14px 12px; gap: 4px; flex: 1; overflow-y: auto; }
.a-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 10px; font-size: 13.5px; font-weight: 500; color: #9fb0c3; transition: all .12s; }
.a-nav a:hover { background: rgba(148,163,184,0.1); color: #fff; }
.a-nav a.active { background: linear-gradient(135deg, #2563eb, #3b82f6); color: #fff; font-weight: 600; box-shadow: 0 4px 14px rgba(37,99,235,0.4); }
.a-sidebar-bottom { padding: 14px 12px 18px; border-top: 1px solid rgba(148,163,184,0.12); display: flex; flex-direction: column; gap: 6px; }
.a-sidebar-bottom a { display: flex; align-items: center; gap: 10px; padding: 9px 13px; font-size: 13px; border-radius: 9px; color: #94a3b8; }
.a-sidebar-bottom a:hover { color: #fff; background: rgba(148,163,184,0.1); }
.a-side-user { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: #64748b; padding: 8px 13px 2px; }
.a-side-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 8px #22c55e; }

/* --------------------------------------------------------------- main ---- */
.a-main { margin-left: var(--aside-w); padding: 28px 32px 64px; }
.a-content { max-width: 1240px; }
.a-pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.a-h1 { font-size: 24px; letter-spacing: -0.5px; font-weight: 700; }
.a-pagehead p { margin-top: 4px; font-size: 13.5px; }

.a-card { background: #fff; border: 1px solid #e8ecf1; border-radius: 14px; box-shadow: 0 1px 3px rgba(16,24,40,0.05); padding: 20px 22px; margin-bottom: 18px; }
.a-card h3 { font-size: 15px; margin-bottom: 14px; font-weight: 600; }
.a-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.a-card-head h3 { margin-bottom: 0; }
.a-card-sub { font-size: 12px; color: #8792a3; }

.a-toolbar-actions { display: flex; gap: 10px; }

/* --------------------------------------------------------------- stats --- */
.a-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.a-stat { background: #fff; border: 1px solid #e8ecf1; border-radius: 14px; box-shadow: 0 1px 3px rgba(16,24,40,0.05); padding: 18px; display: flex; gap: 14px; align-items: center; }
.a-stat-ic { width: 42px; height: 42px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.a-stat-ic.blue { background: #eff4ff; color: #2563eb; }
.a-stat-ic.green { background: #ecfdf3; color: #059669; }
.a-stat-ic.violet { background: #f4f3ff; color: #7c3aed; }
.a-stat-ic.amber { background: #fffaeb; color: #d97706; }
.a-stat > div { display: flex; flex-direction: column; }
.a-stat span { font-size: 12.5px; color: #8792a3; font-weight: 500; }
.a-stat strong { font-size: 26px; letter-spacing: -0.6px; margin-top: 2px; }
.a-stat small { font-size: 11.5px; color: #98a2b3; margin-top: 2px; }

/* --------------------------------------------------------------- chart --- */
.a-chart { width: 100%; height: 170px; display: block; }
.a-chart .bar { fill: url(#none); fill: #b6cdf8; transition: fill .15s; }
.a-chart .bar:hover { fill: #2563eb; }
.a-chart .bar.hot { fill: #2563eb; }
.a-chart .bar-num { font-size: 11px; fill: #667085; font-weight: 600; font-family: 'InterVar', sans-serif; }
.a-chart .bar-lab { font-size: 11px; fill: #98a2b3; font-family: 'InterVar', sans-serif; }

/* --------------------------------------------------------------- chips --- */
.a-chip-row { display: flex; gap: 10px; flex-wrap: wrap; }
.a-chip { background: #f5f7fa; border: 1px solid #e8ecf1; border-radius: 999px; padding: 7px 14px; font-size: 13px; display: inline-flex; align-items: center; gap: 8px; }
.a-chip i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* -------------------------------------------------------------- tables --- */
.a-table-wrap { overflow-x: auto; }
.a-table { width: 100%; border-collapse: collapse; }
.a-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: #8792a3; font-weight: 600; padding: 10px; border-bottom: 1px solid #e8ecf1; white-space: nowrap; background: #fbfcfe; }
.a-table td { padding: 12px 10px; font-size: 13.5px; border-bottom: 1px solid #f2f4f7; vertical-align: middle; }
.a-table tr:last-child td { border-bottom: none; }
.a-table tr:hover td { background: #fafbfd; }
.a-table.compact td { padding: 8px 10px; }
.a-table .ua { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #8792a3; }

.a-user-cell { display: flex; align-items: center; gap: 10px; }
.a-user-cell .muted { display: block; }
.a-avatar { width: 34px; height: 34px; border-radius: 10px; color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.a-bank-tag { font-size: 12px; font-weight: 600; color: var(--c); background: color-mix(in srgb, var(--c) 10%, white); padding: 4px 10px; border-radius: 999px; white-space: nowrap; border: 1px solid color-mix(in srgb, var(--c) 25%, white); }

.badge { font-size: 10.5px; font-weight: 700; letter-spacing: 0.5px; padding: 4px 9px; border-radius: 999px; }
.badge.ok { background: #ecfdf3; color: #067647; border: 1px solid #abefc6; }
.badge.fail { background: #fef3f2; color: #b42318; border: 1px solid #fecdca; }

/* ------------------------------------------------------------ buttons ---- */
.a-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; background: #2563eb; color: #fff; border: none; border-radius: 9px; padding: 9px 16px; font-size: 13.5px; font-weight: 600; transition: all .12s; box-shadow: 0 1px 2px rgba(16,24,40,0.1); }
.a-btn:hover { background: #1d4ed8; }
.a-btn.big { padding: 12px 26px; font-size: 14.5px; }
.a-btn.sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.a-btn.ghost { background: #fff; color: #334155; border: 1.5px solid #dbe1e8; box-shadow: none; }
.a-btn.ghost:hover { background: #f8fafc; color: #101828; border-color: #c3cbd5; }
.a-btn.danger { background: #fef3f2; color: #b42318; box-shadow: none; }
.a-btn.danger:hover { background: #fee4e2; }
.a-btn.full { width: 100%; margin-top: 14px; }
.a-actions { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.a-link { color: #2563eb; font-size: 13.5px; font-weight: 600; }
.a-link:hover { text-decoration: underline; }

/* -------------------------------------------------------------- forms ---- */
.a-input { padding: 10px 12px; border: 1.5px solid #dbe1e8; border-radius: 9px; font-size: 14px; background: #fff; color: #101828; width: 100%; transition: border-color .12s, box-shadow .12s; }
.a-input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
.a-input.sm { width: auto; }
select.a-input { appearance: auto; }
.a-filter { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.a-filter .a-input { width: auto; }
.a-filter input.a-input { flex: 1; min-width: 220px; }
.a-filter-ic { display: inline-flex; color: #98a2b3; margin-right: -8px; }

.copy-btn { border: none; background: #f2f4f7; border-radius: 7px; font-size: 12px; padding: 3px 7px; color: #667085; display: inline-flex; align-items: center; }
.copy-btn:hover { background: #e6e9ef; color: #101828; }
.copy-btn.copied { background: #ecfdf3; color: #067647; }
.reveal-btn { border: none; background: transparent; font-size: 13px; padding: 1px 4px; opacity: 0.6; color: #667085; display: inline-flex; }
.reveal-btn:hover { opacity: 1; color: #101828; }
.secret { white-space: nowrap; }

.a-form h3 { margin-top: 4px; font-weight: 600; }
.a-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.a-label { display: block; font-size: 13px; font-weight: 600; color: #344054; }
.a-label .a-input { margin-top: 6px; font-weight: 400; }
.a-with-btn { display: flex; gap: 8px; margin-top: 6px; }
.a-with-btn .a-input { margin-top: 0; flex: 1; }
.a-form-actions { margin-top: 22px; }
.a-error, .a-form .a-error { background: #fef3f2; border: 1px solid #fecdca; color: #b42318; border-radius: 10px; padding: 11px 14px; font-size: 13.5px; margin-bottom: 16px; }
.a-success, .a-form .a-success { background: #ecfdf3; border: 1px solid #abefc6; color: #067647; border-radius: 10px; padding: 11px 14px; font-size: 13.5px; margin-bottom: 16px; }

.a-tx-form { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; align-items: center; }
.a-tx-form .a-input { width: auto; }
.a-tx-form input[name="desc"] { flex: 1; min-width: 200px; }
.pos { color: #067647; }
.neg { color: #b42318; }

/* ---- per-account manager blocks ---- */
.a-acct-block { border: 1px solid #e8ecf1; border-radius: 12px; margin-bottom: 14px; overflow: hidden; background: #fbfcfe; }
.a-acct-head { display: flex; align-items: center; gap: 10px; padding: 13px 16px; background: #f4f7fb; border-bottom: 1px solid #e8ecf1; flex-wrap: wrap; }
.a-acct-head strong { font-size: 14.5px; }
.a-acct-type { font-size: 12px; color: #667085; }
.a-acct-head form { margin-left: auto; }
.a-acct-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.a-acct-dot.chk { background: #2563eb; }
.a-acct-dot.sav { background: #7c3aed; }
.a-acct-body { padding: 16px; }
.a-acct-form { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr auto; gap: 10px; align-items: end; }
.a-acct-form .a-label { font-size: 12px; }
.a-acct-form .a-label .a-input { margin-top: 5px; }
.a-tx-wrap { margin-top: 16px; padding-top: 14px; border-top: 1px dashed #e2e8ef; }
.a-acct-add { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 16px; padding-top: 16px; border-top: 2px solid #eef2f6; }
.a-acct-add-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: #475467; }
.a-acct-add input[name="name"] { flex: 1; min-width: 220px; }

@media (max-width: 900px) {
  .a-acct-form { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .a-acct-form { grid-template-columns: 1fr; }
  .a-acct-head form { margin-left: 0; }
  .a-tx-form { flex-direction: column; align-items: stretch; }
  .a-tx-form .a-input { width: 100%; }
  .a-acct-add input[name="name"] { min-width: 0; width: 100%; }
}

/* -------------------------------------------------------- login page ----- */
.admin-login-body { font-family: 'InterVar', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; background: #0b1220; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; position: relative; overflow: hidden; }
.admin-login-glow { position: absolute; width: 640px; height: 640px; border-radius: 50%; background: radial-gradient(circle, rgba(37,99,235,0.25) 0%, transparent 65%); top: -200px; right: -160px; pointer-events: none; }
.admin-login-card { position: relative; background: #fff; border-radius: 20px; padding: 40px 38px 34px; width: 100%; max-width: 400px; box-shadow: 0 30px 80px rgba(2,6,23,0.6); }
.admin-login-card h1 { font-size: 24px; margin-bottom: 4px; letter-spacing: -0.4px; text-align: center; }
.admin-login-card h1 em { font-style: normal; color: #2563eb; }
.admin-login-card .muted { font-size: 13.5px; margin-bottom: 22px; display: block; text-align: center; }
.admin-login-card .a-label { margin-bottom: 12px; display: block; }
.admin-login-card .a-input { margin-top: 6px; }

/* ------------------------------------------------------------ responsive - */
@media (max-width: 1000px) { .a-stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) {
  :root { --aside-w: 200px; }
  .a-main { padding: 20px; }
  .a-form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .a-stat-grid { grid-template-columns: 1fr; }
  .a-pagehead { flex-direction: column; align-items: stretch; }
  .a-toolbar-actions { justify-content: flex-start; }
  .a-toolbar-actions .a-btn { flex: 1; }
  .a-filter { flex-direction: column; align-items: stretch; }
  .a-filter input.a-input { min-width: 0; width: 100%; }
  .a-h1 { font-size: 20px; }
  .a-tx-form { flex-direction: column; align-items: stretch; }
  .a-tx-form .a-input { width: 100%; }
  .a-actions { flex-direction: column; align-items: flex-start; gap: 6px; }
}
