/* ------------------------------------------------------------------
   style.css : 全ページ共通のスタイル
   ------------------------------------------------------------------ */

:root {
  --bg: #000000;
  --bg-2: #000000;
  --panel: #000000;
  --panel-2: #000000;
  --line: #0e0505;
  --text: #ffffff;
  --muted: #b5b4b8;
  --accent: #4b0000;
  --accent-2: #a00c0c;
  --danger: #ff0000;
  --ok: #e71b1b;
  --info: #7d7fff;
  --radius: 12px;
  --shadow: 0 8px 28px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1000px 500px at 50% -10%, #2a1a38 0%, transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: "HiraMinProN-W6", "Yu Mincho", "Meiryo", system-ui, sans-serif;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent-2); }

/* ---------- レイアウト ---------- */

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px 56px;
}

.page-narrow { max-width: 620px; }

header.site {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 47, 47, 0.1), transparent);
}

header.site .inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

header.site h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: .06em;
}

header.site .sub {
  color: var(--muted);
  font-size: 13px;
}

.headline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 28px 0 12px;
}

.headline h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: .08em;
  color: var(--accent-2);
}

.headline .hint { color: var(--muted); font-size: 12px; }

/* ---------- パネル ---------- */

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.panel + .panel { margin-top: 14px; }

.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

/* ---------- 数値タイル ---------- */

.stat {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.stat .label { color: var(--muted); font-size: 12px; letter-spacing: .08em; }
.stat .value { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .value small { font-size: 14px; font-weight: 400; color: var(--muted); margin-left: 4px; }

/* ---------- フォーム ---------- */

label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }

input[type="text"],
input[type="password"],
input[type="number"],
input[type="time"],
select {
  width: 100%;
  padding: 11px 12px;
  font-size: 16px;
  color: var(--text);
  background: #01000c;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-family: inherit;
}

input:focus, select:focus, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

button {
  font-family: inherit;
  font-size: 15px;
  padding: 11px 18px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  transition: filter .15s ease;
}

button:hover:not(:disabled) { filter: brightness(1.25); }
button:disabled { opacity: .4; cursor: not-allowed; }

button.primary {
  background: linear-gradient(180deg, var(--accent), #ec0202);
  border-color: #250101;
  color: #030000;
  font-weight: 700;
}

button.danger { border-color: var(--danger); color: var(--danger); }
button.ghost { background: transparent; }
button.small { font-size: 13px; padding: 6px 12px; }
button.block { width: 100%; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- メッセージ ---------- */

.message {
  margin: 12px 0 0;
  padding: 0;
  font-size: 14px;
  min-height: 1.4em;
}

.message.error { color: var(--danger); }
.message.ok { color: var(--ok); }
.message.info { color: var(--info); }

/* ---------- テーブル ---------- */

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th, td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .06em;
}

td.num { font-variant-numeric: tabular-nums; }
tr.is-calling td { background: rgba(255, 47, 47, 0.12); }

.empty {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  padding: 22px 0;
}

/* ---------- バッジ ---------- */

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.badge.open { color: var(--ok); border-color: var(--ok); }
.badge.reserved { color: var(--accent-2); border-color: var(--accent-2); }
.badge.calling { color: var(--accent); border-color: var(--accent); background: rgba(255, 47, 47, 0.12); }
.badge.running { color: var(--info); border-color: var(--info); }
.badge.blocked { color: var(--danger); border-color: var(--danger); }
.badge.ended, .badge.closed, .badge.waiting { color: var(--muted); }

/* ---------- フッター ---------- */

footer.site {
  margin-top: 40px;
  padding: 18px 16px 26px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

/* 隠しリンク：見た目はただの記号、5回連続クリックで管理画面へ */
.secret-gate {
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  opacity: .5;
}

.secret-gate:active { opacity: .5; }

@media print {
  body { background: #fff; color: #000; }
}
