/* SPONOBA 予約 — 会員画面とスタッフ画面で共有する見た目 (2026-10-14)。配色は既存の画面 (紺 + 赤) を踏襲 */
:root {
  --navy: #152c53; --navy-2: #1f3d6e; --red: #e83e0b; --bg: #f4f6f9; --card: #ffffff; --line: #dfe5ec; --line-2: #c9d2dd;
  --text: #1f2733; --muted: #6b7482; --ok: #2f9e44; --ok-bg: #e4f5e7; --warn: #e8a20b; --warn-bg: #fff3cd; --info-bg: #e8f1fb; --danger-bg: #fdecea;
  --radius: 12px; --shadow: 0 2px 10px rgba(21, 44, 83, .08);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic UI", "Segoe UI", sans-serif; margin: 0; background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.5; }
h1, h2, h3 { margin: 0; color: var(--navy); line-height: 1.3; }
h2 { font-size: 18px; } h3 { font-size: 15px; }
p { margin: 6px 0; }
a { color: var(--navy-2); }
.muted { color: var(--muted); font-size: 13px; }
.small { font-size: 12px; }
.hidden { display: none !important; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.mt { margin-top: 12px; } .mb { margin-bottom: 12px; }
.center { text-align: center; }

/* ---- ボタン ---- */
.btn { font: inherit; font-weight: 700; border: 0; border-radius: 10px; padding: 12px 16px; background: var(--navy); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; min-height: 44px; }
.btn.block { width: 100%; }
.btn.secondary { background: #e9eef5; color: var(--navy); }
.btn.ghost { background: transparent; color: var(--navy); border: 1px solid var(--line-2); }
.btn.danger { background: var(--red); }
.btn.ok { background: var(--ok); }
.btn.sm { padding: 6px 10px; min-height: 32px; font-size: 13px; border-radius: 8px; }
.btn.xs { padding: 3px 8px; min-height: 26px; font-size: 12px; border-radius: 6px; font-weight: 600; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.red-outline { background: #fff; color: var(--red); border: 2px solid var(--red); }

/* ---- 入力 ---- */
label.lbl { display: block; margin: 10px 0 4px; color: var(--muted); font-size: 13px; }
input.in, select.in, textarea.in { font: inherit; width: 100%; padding: 11px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; color: var(--text); }
input.in:focus, select.in:focus, textarea.in:focus { outline: 2px solid var(--navy-2); outline-offset: 1px; }
textarea.in { min-height: 80px; resize: vertical; }
.in.sm { padding: 6px 8px; border-radius: 8px; font-size: 14px; }

/* ---- カード ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card.sel { border: 2px solid var(--navy); }
.card.click { cursor: pointer; } .card.click:hover { border-color: var(--navy-2); }
.card-title { font-weight: 700; color: var(--navy); font-size: 16px; }
.price { font-weight: 700; color: var(--red); }

/* ---- チップ・バッジ ---- */
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; background: #eef2f7; color: var(--navy); font-size: 12px; font-weight: 600; margin: 2px 4px 2px 0; }
.chip.red { background: #fdeae4; color: var(--red); }
.chip.green { background: var(--ok-bg); color: var(--ok); }
.chip.gray { background: #eceff3; color: var(--muted); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.chips.scroll .chip { white-space: nowrap; cursor: pointer; padding: 7px 14px; font-size: 14px; }
.chips.scroll .chip.on { background: var(--navy); color: #fff; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; }
.badge.reserved { background: var(--info-bg); color: var(--navy); }
.badge.checked_in { background: var(--ok-bg); color: var(--ok); }
.badge.completed { background: #e3e7ee; color: #3b4a63; }
.badge.cancelled { background: #f0f0f0; color: #777; }
.badge.no_show { background: var(--danger-bg); color: #b3261e; }
.badge.unpaid { background: var(--warn-bg); color: #8a6100; }
.badge.paid { background: var(--ok-bg); color: var(--ok); }
.badge.waived { background: #eceff3; color: var(--muted); }

/* ---- アバター ---- */
.avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--navy); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 32px; height: 32px; font-size: 14px; }
.avatar.lg { width: 64px; height: 64px; font-size: 24px; }

/* ---- 通知・トースト ---- */
.notice { background: var(--info-bg); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.notice.err { background: var(--danger-bg); border: 1px solid #f3b4ad; }
.notice.ok { background: var(--ok-bg); }
.notice.warn { background: var(--warn-bg); }
#toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: #1f2733; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; max-width: 92vw; z-index: 1200; box-shadow: 0 6px 20px rgba(0,0,0,.25); opacity: 0; pointer-events: none; transition: opacity .2s; }
#toast.show { opacity: 1; } #toast.err { background: #b3261e; }

/* ---- ボトムシート ---- */
.sheet-bg { position: fixed; inset: 0; background: rgba(21,44,83,.45); z-index: 1000; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: #fff; width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; border-radius: 16px 16px 0 0; padding: 16px 16px 24px; box-shadow: 0 -4px 24px rgba(0,0,0,.2); }
.sheet .handle { width: 40px; height: 4px; border-radius: 2px; background: #cdd5df; margin: 0 auto 12px; }
@media (min-width: 720px) { .sheet-bg { align-items: center; } .sheet { border-radius: 16px; } }

/* ---- 手順 ---- */
.steps { display: flex; gap: 4px; margin: 4px 0 12px; }
.steps span { flex: 1; height: 5px; border-radius: 3px; background: #dfe5ec; }
.steps span.done { background: var(--navy); }
.steps span.cur { background: var(--red); }

/* ---- ホームのボタングリッド ---- */
.grid-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-btns .gb { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 10px; text-align: center; cursor: pointer; box-shadow: var(--shadow); color: var(--navy); font-weight: 700; font-size: 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 84px; justify-content: center; }
.grid-btns .gb .ico { font-size: 24px; line-height: 1; }
.grid-btns .gb.primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.grid-btns .gb.accent { background: var(--red); color: #fff; border-color: var(--red); }

/* ---- 週の ○× グリッド ---- */
.okwrap { overflow-x: auto; }
table.ok { border-collapse: separate; border-spacing: 3px; width: 100%; min-width: 360px; font-size: 13px; }
table.ok th { font-weight: 700; color: var(--navy); padding: 4px 0; font-size: 12px; }
table.ok th.sat { color: #1565c0; } table.ok th.sun { color: var(--red); }
table.ok td { text-align: center; height: 36px; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
table.ok td.t { background: transparent; border: 0; font-weight: 700; color: var(--muted); width: 48px; font-size: 12px; }
table.ok td.yes { color: var(--ok); font-weight: 700; font-size: 18px; cursor: pointer; }
table.ok td.yes:hover { background: var(--ok-bg); }
table.ok td.few { color: var(--warn); font-weight: 700; font-size: 16px; cursor: pointer; }
table.ok td.no { color: #c3c9d2; background: #f6f7f9; }
table.ok td.past { background: #eef0f3; border-color: #eef0f3; color: #c3c9d2; }

/* ---- リスト行 ---- */
.list-row { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- 表 (スタッフ画面) ---- */
table.tbl { border-collapse: collapse; width: 100%; font-size: 13px; background: #fff; }
table.tbl th, table.tbl td { border: 1px solid var(--line); padding: 5px 7px; text-align: left; vertical-align: top; }
table.tbl th { background: #eef2f7; color: var(--navy); font-weight: 700; white-space: nowrap; }
table.tbl tr.dim td { color: #99a; background: #fafbfc; }

/* ---- KPI ---- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); }
.kpi .v { font-size: 28px; font-weight: 700; color: var(--navy); line-height: 1.1; }
.kpi .k { color: var(--muted); font-size: 12px; }
.kpi.accent { background: var(--navy); color: #fff; } .kpi.accent .v, .kpi.accent .k { color: #fff; }

/* ---- 2 列フォーム ---- */
.form2 { display: grid; grid-template-columns: 120px 1fr; gap: 8px 10px; align-items: center; }
@media (max-width: 560px) { .form2 { grid-template-columns: 1fr; } .form2 > span { color: var(--muted); font-size: 13px; margin-top: 4px; } }
