:root {
  color-scheme: light;
  --white: #fff;
  --ink: #111827;
  --muted: #52616b;
  --line: #e5e7eb;
  --teal: #003c41;
  --tint: #edf5f5;
  --brand: #ff0000;
  font-family: system-ui, sans-serif;
  color: var(--ink);
  background: var(--white);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.55; }
.frame { max-width: 1120px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 44px); }
.topbar { border-bottom: 1px solid var(--line); }
.header-content, .page-heading, .dialog-head, .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.header-content { min-height: 72px; }
.brand { font-size: 1.65rem; font-weight: 750; letter-spacing: -.07em; color: var(--teal); }
.brand strong { color: var(--brand); }
main { padding-block: 30px 44px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); letter-spacing: -.05em; line-height: 1.15; }
h2 { font-size: 1.17rem; letter-spacing: -.02em; }
.page-heading { flex-wrap: wrap; margin-bottom: 20px; }
.tag, .status { color: var(--teal); background: var(--tint); border-radius: 8px; padding: 4px 9px; }
.demo { color: var(--muted); margin-bottom: 12px; font-size: .875rem; }
.dashboard { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 5fr); gap: 16px; }
.card { border: 1px solid var(--line); padding: clamp(16px, 3vw, 26px); border-radius: 18px; }
.balance { background: var(--tint); color: var(--teal); border-color: #d3e5e6; }
.amount { font-size: clamp(2.4rem, 6vw, 3.6rem); font-weight: 720; letter-spacing: -.06em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.muted, small { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.primary, .secondary { font-weight: 600; min-height: 44px; padding: 8px 13px; border-radius: 9px; border: 1px solid #cbdedf; }
.primary, [aria-pressed="true"] { border-color: var(--teal); background: var(--teal); color: var(--white); }
.secondary:not([aria-pressed="true"]) { background: var(--white); color: var(--teal); }
:is(button, input, select, a):focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.list { margin: 7px 0 0; padding: 0; list-style: none; }
.row { padding: 9px 0; }
.row + .row { border-top: 1px solid var(--line); }
.row > strong { text-align: end; }
.row small:not(.status) { display: block; }
.status { flex-shrink: 0; max-width: 45%; }
.operation-credit { color: var(--teal); }
.login { margin: 18px auto; max-width: 480px; }
label { display: grid; gap: 5px; margin: 12px 0; }
input:not([type="hidden"]), select { min-height: 44px; width: 100%; border: 1px solid #cbd5db; border-radius: 8px; background: var(--white); color: var(--ink); padding: 8px 10px; }
.alert { color: #a00000; margin: 8px 0; }
dialog { width: min(520px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 20px; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: var(--white); }
dialog::backdrop { background: #14242699; }
.dialog-body { margin-top: 10px; }
.close { width: 44px; font-size: 1.45rem; line-height: 1; }
.history-result { margin-top: 12px; }
.choices { border: 0; padding: 0; margin: 12px 0; min-inline-size: 0; }
.choice { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; }
.choice input { width: auto; min-height: auto; accent-color: var(--teal); }
.choice small { display: block; }
.choice:has(:checked) { background: var(--tint); border-color: var(--teal); }
.confirmation { color: var(--teal); background: var(--tint); padding: 10px 12px; border-radius: 9px; }
button:disabled { opacity: .6; cursor: default; }
@media (max-width: 650px) {
  .dashboard { grid-template-columns: minmax(0, 1fr); }
  dialog { width: 100%; max-width: 100%; margin: auto auto 0; border-radius: 18px 18px 0 0; }
}
