/* 現場ノート 月額クラウド版（app.genbanote.com）PRECISION MILL & CNC DECK UI */
:root {
  color-scheme: light dark;
  --bg: light-dark(#f4f2ec, #0e1420);
  --surface: light-dark(#ffffff, #172033);
  --surface-2: light-dark(#ece9e0, #1f2b42);
  --lcd: #121a2a;
  --lcd-ink: #f1f5f9;
  --lcd-accent: #fbbf24;
  --ink: light-dark(#172033, #f1f5f9);
  --ink-2: light-dark(#475569, #cbd5e1);
  --muted: light-dark(#64748b, #94a3b8);
  --bdr: light-dark(#cbd5e1, #334155);
  --bdr-strong: light-dark(#1e293b, #64748b);
  --amber: #d97706;
  --amber-soft: light-dark(#fef3c7, rgba(245, 158, 11, 0.16));
  --cobalt: light-dark(#1d4ed8, #60a5fa);
  --ok: light-dark(#15803d, #4ade80);
  --ok-soft: light-dark(#dcfce7, rgba(34, 197, 94, 0.16));
  --alert: light-dark(#b91c1c, #f87171);
  --alert-soft: light-dark(#fee2e2, rgba(239, 68, 68, 0.18));
  --f-body: "Zen Kaku Gothic New", "Yu Gothic", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;
  --f-num: "Barlow Condensed", "JetBrains Mono", sans-serif;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--f-body); background: var(--bg); color: var(--ink); line-height: 1.6; }
a { color: var(--cobalt); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 1rem; }

.topbar { position: sticky; top: 0; z-index: 40; background: var(--lcd); color: #fff; border-bottom: 3px solid #f59e0b; }
.topbar-in { max-width: 1180px; margin: 0 auto; padding: 0.65rem 1rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.65rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: #fff; }
.brand img { width: 30px; height: 30px; border-radius: 6px; }
.brand strong { display: block; font-size: 1rem; line-height: 1.15; }
.brand small { display: block; font-family: var(--f-mono); font-size: 0.7rem; color: var(--lcd-accent); }
.top-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; min-height: 44px; padding: 0.5rem 1rem; border-radius: 6px; border: 1.5px solid var(--bdr-strong); font-weight: 700; font-size: 0.9rem; cursor: pointer; text-decoration: none; font-family: inherit; background: var(--surface); color: var(--ink); }
.btn-primary { background: #d97706; border-color: #b45309; color: #fff; }
.btn-primary:hover { background: #b45309; }
.btn-danger { background: var(--alert); border-color: var(--alert); color: #fff; }
.btn-sm { min-height: 36px; padding: 0.3rem 0.75rem; font-size: 0.82rem; }
.btn-console { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.28); color: #fff; }

.tabs { display: flex; gap: 0.35rem; overflow-x: auto; padding: 0.6rem 0 0.8rem; border-bottom: 1.5px solid var(--bdr); margin-bottom: 1rem; }
.tab { flex: none; min-height: 44px; padding: 0.45rem 0.95rem; border-radius: 6px; border: 1.5px solid var(--bdr); background: var(--surface); color: var(--ink-2); font-weight: 700; cursor: pointer; font-family: inherit; font-size: 0.88rem; }
.tab[aria-selected="true"] { background: var(--lcd); color: var(--lcd-accent); border-color: #f59e0b; }

.card { background: var(--surface); border: 1.5px solid var(--bdr-strong); border-radius: 8px; padding: 1.15rem 1.25rem; margin-bottom: 1rem; }
.card h2 { margin: 0 0 0.75rem; font-size: 1.15rem; border-left: 4px solid #f59e0b; padding-left: 0.55rem; }
.banner { padding: 0.75rem 1rem; border-radius: 6px; border: 1.5px solid var(--amber); background: var(--amber-soft); margin-bottom: 1rem; font-size: 0.88rem; }
.banner.is-ok { border-color: var(--ok); background: var(--ok-soft); }
.banner.is-alert { border-color: var(--alert); background: var(--alert-soft); color: var(--alert); font-weight: 700; }

.kpi-grid { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 1rem; }
.kpi { background: var(--surface); border: 1.5px solid var(--bdr-strong); border-radius: 8px; padding: 0.85rem 1rem; }
.kpi.is-lcd { background: var(--lcd); color: var(--lcd-ink); }
.kpi small { display: block; font-family: var(--f-mono); font-size: 0.72rem; color: var(--muted); }
.kpi.is-lcd small { color: #94a3b8; }
.kpi strong { display: block; font-family: var(--f-num); font-size: 1.9rem; font-variant-numeric: tabular-nums; line-height: 1.15; margin-top: 0.15rem; }
.kpi.is-lcd strong { color: var(--lcd-accent); }

.grid2 { display: grid; gap: 0.85rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.field { display: grid; gap: 0.25rem; margin-bottom: 0.65rem; }
.field label { font-size: 0.82rem; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; min-height: 44px; padding: 0.45rem 0.7rem; border: 1.5px solid var(--bdr-strong); border-radius: 6px; background: var(--bg); color: var(--ink); font-size: 0.96rem; font-family: inherit; }

.tbl-wrap { overflow-x: auto; border: 1px solid var(--bdr); border-radius: 6px; }
table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
th, td { padding: 0.55rem 0.65rem; border-bottom: 1px solid var(--bdr); text-align: left; }
thead th { background: var(--lcd); color: #fff; font-size: 0.8rem; white-space: nowrap; }
td.num { text-align: right; font-family: var(--f-num); font-size: 1.05rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.is-alert td { background: var(--alert-soft); }

.chip-grid { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chip { min-height: 46px; padding: 0.45rem 0.9rem; border-radius: 6px; border: 1.5px solid var(--bdr-strong); background: var(--surface-2); color: var(--ink); font-weight: 700; cursor: pointer; font-family: inherit; font-size: 0.92rem; }
.chip[aria-pressed="true"] { background: var(--lcd); color: var(--lcd-accent); border-color: #f59e0b; }

.plan-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.plan-box { border: 2px solid var(--bdr-strong); border-radius: 8px; padding: 1.15rem; background: var(--bg); display: grid; gap: 0.55rem; align-content: start; }
.plan-box.is-hot { border-color: #f59e0b; }
.plan-price { font-family: var(--f-num); font-size: 2.1rem; font-weight: 700; margin: 0; }

.qr-card { display: inline-grid; justify-items: center; gap: 0.45rem; padding: 1rem; background: #fff; color: #111; border: 2px solid #121a2a; border-radius: 8px; }
.toast { position: fixed; right: 1rem; bottom: 1rem; z-index: 90; background: var(--lcd); color: #fff; border: 1.5px solid #f59e0b; border-left: 6px solid #f59e0b; padding: 0.7rem 1rem; border-radius: 6px; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.toast.show { opacity: 1; }
.auth-box { max-width: 460px; margin: 2.5rem auto; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; max-width: 280px; margin: 0.8rem auto; }
.keypad button { min-height: 54px; font-size: 1.35rem; font-family: var(--f-num); }
.pass-dots { text-align: center; font-family: var(--f-mono); font-size: 2rem; letter-spacing: 0.6rem; padding: 0.5rem; background: var(--lcd); color: var(--lcd-accent); border-radius: 6px; margin-bottom: 0.6rem; }
[hidden] { display: none !important; }
