:root {
  color-scheme: light;
  --bg: #eef2f5;
  --surface: #ffffff;
  --text: #14202b;
  --muted: #667582;
  --line: #d8e0e6;
  --primary: #006b43;
  --primary-dark: #005235;
  --danger: #b42318;
  --warning: #b54708;
  --blue: #175cd3;
  --shadow: 0 2px 8px rgba(20, 32, 43, .12);
  font-family: "Noto Sans JP", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { font-size: 16px; }
button, input, select { font: inherit; }
button { min-height: 44px; cursor: pointer; }
button:disabled { opacity: .45; cursor: not-allowed; }
.topbar {
  min-height: 56px; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 8px 14px; background: #123c2d; color: #fff;
}
.topbar h1 { font-size: 19px; margin: 0; font-weight: 700; }
.topbar .status { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.pill { display: inline-flex; align-items: center; min-height: 28px; padding: 3px 9px; border-radius: 999px; background: #e9eef2; color: #243441; font-size: 13px; font-weight: 700; }
.topbar .pill { background: rgba(255,255,255,.18); color: #fff; }
.pill.good { background: #dcfae6; color: #067647; }
.pill.warn { background: #fef0c7; color: #93370d; }
.pill.bad { background: #fee4e2; color: #b42318; }
.page { padding: 12px; max-width: 1600px; margin: 0 auto; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 12px; }
.panel h2, .panel h3 { margin: 0 0 10px; }
.grid { display: grid; gap: 12px; }
.btn { border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); padding: 9px 13px; font-weight: 700; }
.btn:hover { background: #f7f9fa; }
.btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn.primary:hover { background: var(--primary-dark); }
.btn.danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.warning { background: #fff7ed; color: var(--warning); border-color: #fed7aa; }
.btn.big { min-height: 58px; font-size: 18px; }
.btn.block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.field { display: grid; gap: 5px; }
.field label { font-size: 13px; font-weight: 700; color: var(--muted); }
.field input, .field select { min-height: 44px; border: 1px solid #b8c4cc; border-radius: 7px; padding: 8px 10px; background: #fff; color: var(--text); }
.muted { color: var(--muted); }
.danger-text { color: var(--danger); font-weight: 700; }
.success-text { color: var(--primary); font-weight: 700; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.empty { display: grid; place-items: center; min-height: 120px; color: var(--muted); text-align: center; }
.toast-stack { position: fixed; right: 12px; bottom: 12px; z-index: 1000; display: grid; gap: 8px; max-width: min(420px, calc(100vw - 24px)); }
.toast { background: #172b22; color: #fff; border-radius: 8px; padding: 11px 14px; box-shadow: var(--shadow); }
.toast.error { background: #7a271a; }
.modal-backdrop { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 16px; background: rgba(8, 18, 14, .72); }
.modal-backdrop[hidden] { display: none; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #fff; border-radius: 12px; padding: 18px; box-shadow: 0 16px 50px rgba(0,0,0,.32); }
.modal h2 { margin-top: 0; }
.login-form { display: grid; gap: 12px; }
.login-form input { font-size: 18px; letter-spacing: .08em; }
.navlinks { display: flex; flex-wrap: wrap; gap: 6px; }
.navlinks a { color: #fff; text-decoration: none; padding: 5px 8px; border-radius: 6px; background: rgba(255,255,255,.12); font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 700px) {
  .page { padding: 8px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .panel { padding: 10px; }
}

