/* UMA Office — brand: navy #06102b, blue #0a5bd8, gold #ffc21a, teal #2ec8c0 */
:root {
  --navy: #06102b;
  --navy-2: #0c1a3f;
  --blue: #0a5bd8;
  --blue-2: #2f74e8;
  --blue-soft: #e8f0fd;
  --gold: #ffc21a;
  --gold-2: #f5a300;
  --teal: #13a39c;
  --teal-soft: #e3f7f5;
  --red: #d93b3b;
  --red-soft: #fdecec;
  --amber: #b86e00;
  --amber-soft: #fff4dc;
  --green: #12865a;
  --green-soft: #e3f6ec;
  --bg: #f3f6fb;
  --card: #ffffff;
  --line: #e3e8f2;
  --line-2: #eef2f8;
  --text: #0f1b33;
  --muted: #5b6782;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(6, 16, 43, .05), 0 6px 18px rgba(6, 16, 43, .05);
  --side: 252px;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14.5px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.r { text-align: right; }
.t-in { color: var(--green); }
.t-out { color: var(--red); }
.ic { flex: none; }
:focus-visible { outline: 3px solid rgba(10, 91, 216, .45); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

/* ---------- Shell ---------- */
.shell { display: flex; min-height: 100vh; }
.side {
  width: var(--side); flex: none; background: linear-gradient(180deg, var(--navy) 0%, #081634 100%); color: #c9d4ee;
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 14px; z-index: 40;
}
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 18px; color: #fff; text-decoration: none !important; }
.brand img { border-radius: 10px; background: #0a1838; }
.brand b { display: block; font-size: 16px; letter-spacing: .01em; }
.brand small { display: block; font-size: 11.5px; color: #8fa0c6; }
.side nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.side nav a, .side-foot a, .side-foot .linkish {
  display: flex; gap: 11px; align-items: center; padding: 9px 11px; border-radius: 10px; color: #c9d4ee;
  font-weight: 500; text-decoration: none; transition: background .15s, color .15s;
}
.side nav a:hover, .side-foot a:hover, .side-foot .linkish:hover { background: rgba(255,255,255,.06); color: #fff; }
.side nav a.on { background: linear-gradient(90deg, rgba(47,116,232,.35), rgba(47,116,232,.12)); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
.side-foot { border-top: 1px solid rgba(255,255,255,.08); padding-top: 10px; margin-top: 10px; }
.linkish { background: none; border: 0; width: 100%; font: inherit; cursor: pointer; }
.install { color: var(--gold) !important; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top {
  display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: rgba(243,246,251,.88);
  backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line);
}
.top h1 { font-size: 20px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.search { display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; color: var(--muted); }
.search input { border: 0; outline: 0; padding: 8px 2px; width: 200px; font: inherit; background: transparent; }
.content { padding: 22px 28px 60px; max-width: 1400px; width: 100%; }
.only-m { display: none !important; }

/* Quick add */
.quick { position: relative; }
.quick-menu {
  position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 40px rgba(6,16,43,.16); padding: 6px; width: 260px; display: none; z-index: 50;
}
.quick-menu.open { display: block; animation: pop .14s ease-out; }
.quick-menu a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 9px; color: var(--text); font-weight: 500; }
.quick-menu a:hover { background: var(--blue-soft); text-decoration: none; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; gap: 7px; align-items: center; justify-content: center; border: 1px solid var(--line); background: #fff;
  color: var(--text); padding: 9px 15px; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none !important;
  transition: transform .06s, box-shadow .15s, background .15s; white-space: nowrap;
}
.btn:hover { box-shadow: 0 2px 8px rgba(6,16,43,.08); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: #094fbd; }
.btn-in { background: var(--green); border-color: var(--green); color: #fff; }
.btn-out { background: #fff; border-color: #f2c4c4; color: var(--red); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.btn-ghost { background: transparent; }
.btn-danger { background: #fff; color: var(--red); border-color: #f2c4c4; }
.btn-sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }
.iconbtn { background: none; border: 0; padding: 6px; border-radius: 8px; color: var(--text); cursor: pointer; display: inline-flex; }
.link { font-weight: 600; font-size: 13px; }

label { display: block; font-weight: 600; font-size: 13px; color: #2b3754; }
input, select, textarea {
  display: block; width: 100%; margin-top: 5px; padding: 10px 12px; border: 1px solid #d5dcea; border-radius: 10px;
  font: inherit; font-weight: 400; color: var(--text); background: #fff; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--blue-2); box-shadow: 0 0 0 3px rgba(47,116,232,.15); }
input[type=checkbox], input[type=radio] { width: auto; display: inline; margin: 0 6px 0 0; }
.check { display: flex; align-items: center; font-weight: 500; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.hint { font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 4px; }
.amount-input { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.pw { position: relative; display: block; }
.pw input { padding-right: 64px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); margin-top: 2px; border: 0; background: var(--blue-soft); color: var(--blue); border-radius: 7px; padding: 5px 9px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 6px; }
.radio-cards label { border: 1px solid #d5dcea; border-radius: 10px; padding: 10px 12px; cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.radio-cards label:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); box-shadow: 0 0 0 2px rgba(10,91,216,.15); }

/* ---------- Cards, KPIs ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.count { background: var(--line-2); color: var(--muted); border-radius: 20px; font-size: 12px; padding: 1px 8px; font-weight: 600; }
.sub { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 14px 0 6px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.grid-2 > .card { margin-bottom: 18px; }
.grid-wide { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.hello h2 { font-size: 24px; }
.hello-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: 1.25fr 1fr 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.kpi {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow);
  color: var(--text); text-decoration: none !important; display: flex; flex-direction: column; gap: 4px; transition: transform .15s, box-shadow .15s;
}
.kpi:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(6,16,43,.09); }
.kpi-label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.kpi-val { font-size: 24px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12.5px; color: var(--muted); }
.kpi-hero { background: radial-gradient(120% 140% at 100% 0%, #1b4fb0 0%, var(--navy-2) 45%, var(--navy) 100%); color: #fff; border-color: transparent; position: relative; overflow: hidden; }
.kpi-hero::after { content: ""; position: absolute; right: -30px; bottom: -40px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, rgba(255,194,26,.35), transparent 70%); }
.kpi-hero .kpi-label, .kpi-hero .kpi-sub { color: #b9c7e8; }
.kpi-hero .kpi-val { color: var(--gold); font-size: 28px; }
.earn-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.earn { border: 1px solid var(--line-2); background: #fafcff; border-radius: 12px; padding: 12px 14px; color: var(--text); text-decoration: none !important; display: flex; flex-direction: column; gap: 3px; }
.earn:hover { border-color: #c8d6f2; }
.earn-label { font-weight: 700; font-size: 13px; margin-bottom: 4px; color: var(--blue); }
.earn-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.earn-row b { font-variant-numeric: tabular-nums; }
.earn-total { border-top: 1px dashed var(--line); padding-top: 5px; margin-top: 3px; color: var(--text); font-weight: 600; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); }
.stat span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat b { font-size: 19px; font-variant-numeric: tabular-nums; }

/* ---------- Tables & lists ---------- */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table td.r, .table th.r { white-space: nowrap; }
.table tbody tr:hover { background: #fafcff; }
.table tr.void td { color: #9aa4ba; text-decoration: line-through; }
.table tr.void td .badge, .table tr.void td .nostrike { text-decoration: none; }
.table tfoot td { font-weight: 700; border-top: 2px solid var(--line); border-bottom: 0; }
.table th.r, .table td.r { text-align: right; }
.w-prog { min-width: 120px; }
.w-prog .prog { margin-bottom: 2px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.list li:last-child { border-bottom: 0; }
.list li small { display: block; color: var(--muted); font-size: 12.5px; }
.list-end { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; font-variant-numeric: tabular-nums; }
.list-total { border-top: 2px solid var(--line) !important; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 10px; padding: 7px 0; font-size: 13.5px; }
.feed .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue-2); margin-top: 7px; flex: none; box-shadow: 0 0 0 3px var(--blue-soft); }
.feed small { display: block; color: var(--muted); font-size: 12px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.b-green { background: var(--green-soft); color: var(--green); }
.b-blue { background: var(--blue-soft); color: var(--blue); }
.b-amber { background: var(--amber-soft); color: var(--amber); }
.b-red { background: var(--red-soft); color: var(--red); }
.b-grey { background: #eef1f6; color: #59647d; }
.b-gold { background: #fff6d6; color: #8a5a00; }
.prog { height: 7px; background: var(--line-2); border-radius: 8px; overflow: hidden; }
.prog span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--teal)); border-radius: 8px; }
.prog.big { height: 10px; }
.empty { text-align: center; padding: 26px 10px; color: var(--muted); }
.empty div { margin-top: 10px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.filters label { font-size: 12px; }
.filters input, .filters select { margin-top: 3px; padding: 8px 10px; }
.seg { display: inline-flex; background: var(--line-2); border-radius: 10px; padding: 3px; flex-wrap: wrap; }
.seg a { padding: 5px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 13px; text-decoration: none !important; }
.seg a.on { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(6,16,43,.1); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none !important; }
.tabs a.on { color: var(--blue); border-color: var(--blue); }

/* ---------- Alerts ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 12px; margin-bottom: 16px; font-weight: 500; }
.alert .ic { margin-top: 1px; }
.alert-ok { background: var(--green-soft); color: #0b6644; border: 1px solid #bfe7d2; }
.alert-err { background: var(--red-soft); color: #a52626; border: 1px solid #f3c6c6; }
.alert-info { background: var(--blue-soft); color: #0b4aa8; border: 1px solid #cddcf7; }

/* ---------- Partners ---------- */
.partner-mini { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.pm { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; color: var(--text); text-decoration: none !important; }
.pm:hover { border-color: #c8d6f2; background: #fafcff; }
.avatar { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: var(--navy); background: linear-gradient(135deg, var(--gold), #ffdf7a); flex: none; }
.pm:nth-child(2) .avatar, .pcard:nth-child(2) .avatar { background: linear-gradient(135deg, #7fb0ff, var(--blue-2)); color: #fff; }
.pm:nth-child(3) .avatar, .pcard:nth-child(3) .avatar { background: linear-gradient(135deg, #5fe0d6, var(--teal)); color: #fff; }
.pm-name { flex: 1; min-width: 0; }
.pm-name b { display: block; }
.pm-name small { color: var(--muted); font-size: 12px; }
.pm-bal { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.pm-bal small { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; }
.pcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.pcard-top { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.pcard-top b { font-size: 16px; display: block; }
.pcard dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.pcard dt { color: var(--muted); }
.pcard dd { margin: 0; text-align: right; font-weight: 600; }
.pcard .bal { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; font-size: 15px; }
.pcard-actions { display: flex; gap: 8px; margin-top: 14px; }
.pcard-actions .btn { flex: 1; }

/* ---------- Detail pages ---------- */
.detail-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 18px; }
.detail-head h2 { font-size: 22px; }
.detail-head .meta { color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; margin-top: 4px; font-size: 13.5px; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.money-box { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 6px 0 14px; }
.money-box div { background: #fafcff; border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; }
.money-box span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.money-box b { font-size: 18px; font-variant-numeric: tabular-nums; }
.note { background: #fffdf3; border: 1px solid #f6e7b0; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; white-space: pre-wrap; }
.note small { display: block; color: var(--muted); margin-top: 4px; white-space: normal; }

/* Modal (dialog) */
dialog { border: 0; border-radius: 16px; padding: 0; width: min(560px, calc(100vw - 24px)); box-shadow: 0 30px 80px rgba(6,16,43,.35); }
dialog::backdrop { background: rgba(6,16,43,.45); backdrop-filter: blur(2px); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.dlg-head h3 { font-size: 17px; }
.dlg-body { padding: 18px 20px 20px; }

/* Charts */
.chart-wrap { width: 100%; overflow: hidden; }
.chart { width: 100%; height: 220px; display: block; }
.chart .grid { stroke: var(--line-2); stroke-width: 1; }
.chart .b-in { fill: var(--blue); }
.chart .b-out { fill: var(--gold); }
.chart text { font-size: 10.5px; fill: var(--muted); }
.legend { display: flex; gap: 16px; font-size: 12.5px; margin-top: 8px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.l-in { background: var(--blue); }
.l-out { background: var(--gold); }
.hbar { display: flex; flex-direction: column; gap: 9px; }
.hbar-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 2fr) auto; gap: 10px; align-items: center; font-size: 13px; }
.hbar-row .track { height: 8px; background: var(--line-2); border-radius: 6px; overflow: hidden; }
.hbar-row .track span { display: block; height: 100%; background: var(--blue-2); border-radius: 6px; }
.hbar.out .track span { background: var(--gold-2); }
.hbar-row b { font-variant-numeric: tabular-nums; }

/* Receipt */
.receipt { max-width: 720px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 34px; box-shadow: var(--shadow); }
.receipt-head { display: flex; justify-content: space-between; gap: 16px; border-bottom: 3px solid var(--gold); padding-bottom: 16px; margin-bottom: 20px; }
.receipt-head img { height: 64px; width: auto; }
.receipt h2 { font-size: 26px; color: var(--navy); letter-spacing: .04em; }
.receipt .amount { font-size: 30px; font-weight: 800; color: var(--navy); margin: 10px 0 18px; }
.receipt .void-stamp { color: var(--red); border: 3px solid var(--red); display: inline-block; padding: 4px 14px; font-weight: 800; transform: rotate(-6deg); letter-spacing: .1em; }
.receipt-foot { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ---------- Login ---------- */
.login-body { background: var(--navy); min-height: 100vh; }
.login-wrap { display: grid; grid-template-columns: 1.2fr 1fr; min-height: 100vh; }
.login-art { position: relative; overflow: hidden; display: flex; align-items: center; padding: 60px; color: #dbe5ff; background: radial-gradient(120% 120% at 0% 0%, #12307a 0%, var(--navy) 55%); }
.login-art-text { position: relative; z-index: 2; max-width: 460px; }
.login-art-text h2 { font-size: 36px; color: #fff; margin: 28px 0 10px; letter-spacing: -.02em; }
.login-art-text p { color: #a9b8dd; font-size: 16px; }
.orb { position: absolute; border-radius: 50%; filter: blur(40px); opacity: .55; animation: drift 14s ease-in-out infinite alternate; }
.o1 { width: 380px; height: 380px; background: #0a5bd8; right: -80px; top: -60px; }
.o2 { width: 260px; height: 260px; background: #ffc21a; left: 30%; bottom: -100px; opacity: .3; animation-delay: -4s; }
.o3 { width: 200px; height: 200px; background: #2ec8c0; left: -60px; top: 40%; opacity: .3; animation-delay: -8s; }
@keyframes drift { to { transform: translate(30px, 24px) scale(1.08); } }
.login-card { align-self: center; justify-self: center; width: min(400px, calc(100vw - 32px)); background: #fff; border-radius: 20px; padding: 32px 30px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.login-card h1 { font-size: 24px; }
.login-card .muted { margin: -10px 0 4px; }
.login-mark { border-radius: 16px; }

/* ---------- Mobile tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 45;
  box-shadow: 0 -6px 20px rgba(6,16,43,.06);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); font-size: 11px; font-weight: 600; text-decoration: none !important; padding: 4px 0; }
.tabbar .tab-plus { background: var(--blue); color: #fff; width: 52px; height: 52px; border-radius: 18px; justify-self: center; justify-content: center; margin-top: -20px; box-shadow: 0 10px 24px rgba(10,91,216,.4); }
.scrim { display: none; }

@media (max-width: 1180px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .earn-grid { grid-template-columns: 1fr 1fr; }
  .pcards { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .only-m { display: inline-flex !important; }
  .tabbar.only-m { display: grid !important; }
  .only-d { display: none !important; }
  .side { position: fixed; left: 0; top: 0; transform: translateX(-105%); transition: transform .22s ease; box-shadow: 20px 0 60px rgba(0,0,0,.3); }
  .side.open { transform: none; }
  .scrim.open { display: block; position: fixed; inset: 0; background: rgba(6,16,43,.45); z-index: 35; }
  .top { padding: 10px 14px; backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .top h1 { font-size: 18px; }
  .content { padding: 16px 14px 100px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 0; }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .money-box { grid-template-columns: 1fr 1fr 1fr; }
  .money-box b { font-size: 15px; }
  .card { padding: 15px; border-radius: 12px; }
  .kpi-val { font-size: 20px; }
  .kpi-hero .kpi-val { font-size: 24px; }
  .hello h2 { font-size: 20px; }
  .hello-actions { width: 100%; }
  .hello-actions .btn { flex: 1; }
  .quick-menu { position: fixed; left: 10px; right: 10px; top: auto; bottom: calc(80px + env(safe-area-inset-bottom)); width: auto; }
  /* Tables become cards */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td, .table tfoot { display: block; width: 100%; }
  .table tr { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin-bottom: 10px; background: #fff; }
  .table td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .table td[data-l]::before { content: attr(data-l); color: var(--muted); font-size: 12.5px; font-weight: 600; text-align: left; flex: none; }
  .table td:not([data-l]) { justify-content: flex-end; }
  .table tbody td:first-child { display: block; text-align: left; font-size: 15px; padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid var(--line-2); }
  .table tbody td:first-child::before { display: none; }
  .table td.r { text-align: right; }
  .table tfoot tr { background: var(--blue-soft); }
  .w-prog { flex-wrap: wrap; }
  .w-prog .prog { flex: 1; min-width: 80px; align-self: center; }
  .kv { grid-template-columns: 110px 1fr; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .receipt { padding: 20px; }
}
@media (max-width: 520px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi-hero { grid-column: 1 / -1; }
  .kpi { padding: 12px 14px; }
  .kpi-val { font-size: 17px; }
  .earn-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .earn { padding: 10px; }
  .earn-row { font-size: 12px; }
  .money-box { grid-template-columns: 1fr; }
}

@media print {
  .side, .top, .tabbar, .no-print, .form-actions, .scrim { display: none !important; }
  body { background: #fff; }
  .content { padding: 0; max-width: none; }
  .card, .receipt { box-shadow: none; border: 0; }
  .table thead { display: table-header-group !important; }
  .table { display: table !important; }
  .table tbody { display: table-row-group !important; }
  .table tr { display: table-row !important; border: 0 !important; }
  .table td { display: table-cell !important; }
  .table td::before { content: none !important; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
