*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); }
body { font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

#app { min-height: 100vh; }

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.accent { color: var(--accent); }
.danger { color: var(--danger); }
.warn { color: var(--warning); }

.money { font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.tabular { font-variant-numeric: tabular-nums; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 99px; }
::-webkit-scrollbar-track { background: transparent; }

input, select, textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  min-height: 42px;
}
input[type="checkbox"], input[type="radio"] {
  width: 16px;
  height: 16px;
  min-height: 0;
  min-width: 16px;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--accent);
  border-radius: 3px;
}
textarea { resize: vertical; min-height: 72px; }
input:focus, select:focus, textarea:focus {
  border-color: #6f8260;
  box-shadow: 0 0 0 3px var(--accent-dim);
}
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 500; }
.row-2, .row-3, .row-4 { display: grid; gap: 12px; }
@media (min-width: 700px) {
  .row-2 { grid-template-columns: 1fr 1fr; }
  .row-3 { grid-template-columns: 1fr 1fr 1fr; }
  .row-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
}
