:root {
  --bg:#f7f7fb;
  --card:#fff;
  --text:#111827;
  --muted:#6b7280;
  --accent:#2563eb;
  --border:#e5e7eb;
  --ok:#10b981;
  --warn:#ef4444;
}

/* Base */
* { box-sizing: border-box; }
body {
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.6;
}
h1,h2,h3,h4 { font-weight:700; }

/* Header & Nav */
header {
  position:sticky;
  top:0;
  z-index:10;
  background:var(--card);
  border-bottom:1px solid var(--border);
  padding:0;
}
header .header-inner { max-width:1024px; margin:0 auto; padding:12px 16px; }

.site-nav {
  display:flex; align-items:center; justify-content:space-between;
  gap:1rem; padding:0 0 10px 0;
}
.brand {
  font-weight:800; text-decoration:none; color:var(--text); font-size:20px;
}
.nav-toggle {
  font-size:1.2rem; background:none; border:1px solid var(--border);
  padding:.25rem .5rem; border-radius:8px;
}
.links { list-style:none; margin:0; padding:0; display:none; flex-direction:column; gap:.5rem; }
.links a { text-decoration:none; color:var(--text); padding:.5rem .25rem; border-radius:8px; }
.links a:hover { background:#f4f6f9; }
.links a.active { font-weight:700; color:var(--accent); }
@media (min-width: 768px){
  .nav-toggle{ display:none; }
  .links{ display:flex; flex-direction:row; gap:1rem; }
}

header h1 { margin:4px 0 0; font-size:24px; font-weight:800; }
header p { margin:4px 0 0 0; color:var(--muted); font-size:13px; }

/* Wrapper for content */
.wrap {
  max-width:1024px;
  margin:24px auto;
  padding:0 16px 40px;
}

/* Grid (only used on main index) */
.grid { overflow:auto; border:1px solid var(--border); border-radius:12px; background:var(--card); box-shadow:0 1px 2px rgba(0,0,0,.05); }
table { border-collapse:separate; border-spacing:0; width:100%; min-width:760px; }
thead th { position:sticky; top:0; background:var(--card); z-index:4; font-weight:700; font-size:13px; color:var(--muted); border-bottom:1px solid var(--border); }
th, td { padding:10px 8px; text-align:center; border-right:1px solid var(--border); }
th:first-child, td:first-child { position:sticky; left:0; background:var(--card); z-index:3; text-align:left; font-weight:700; color:#111827; }
tbody tr:nth-child(odd) td { background:#fcfcfe; }

td.slot { cursor:pointer; font-weight:700; font-size:14px; min-width:88px; }
td.slot.empty { color:#9ca3af; font-weight:600; }
td.slot:hover { outline:2px solid var(--accent); outline-offset:-2px; background:#f0f6ff; }

.badges { display:flex; align-items:center; gap:12px; margin:8px 0 0; color:var(--muted); font-size:12px; flex-wrap:wrap; }
.badge { display:inline-flex; gap:6px; align-items:center; padding:4px 8px; border:1px solid var(--border); border-radius:999px; background:#fff; }
.chip { display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border:1px solid var(--border); border-radius:999px; margin:4px; font-size:13px; }
.chip button { border:none; background:transparent; cursor:pointer; color:var(--muted); }

/* Modal */
dialog { border:none; padding:0; border-radius:16px; width:min(460px,92vw); box-shadow:0 10px 30px rgba(0,0,0,.2); }
.modal { background:var(--card); border-radius:16px; padding:16px; }
.modal h3 { margin:0 0 4px; font-size:18px; }
.modal p  { margin:0 0 12px; color:var(--muted); font-size:13px; }
.field { display:flex; flex-direction:column; gap:6px; margin:10px 0; }
.row { display:flex; gap:8px; justify-content:flex-end; margin-top:14px; }
input, select { width:100%; padding:10px 12px; border:1px solid var(--border); border-radius:10px; font-size:14px; }
input[type="checkbox"] { width:auto; height:auto; margin:0; padding:0; }

.list { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0; }
.namesEmpty { color:var(--muted); font-size:13px; }

/* Toast (main page only) */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: #111827; color: #fff; padding: 10px 14px; border-radius: 999px;
  box-shadow: 0 6px 20px rgba(0,0,0,.2); opacity: 0; pointer-events: none;
  transition: transform .25s ease, opacity .25s ease;
  display: flex; align-items: center; gap: 8px; z-index: 1000; font-size: 14px;
}
.toast--ok   { background: #0f766e; }
.toast--warn { background: #b91c1c; }
.toast.show  { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Footer */
.site-footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 20px 12px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  margin-top: 40px;
}
.site-footer a { color: var(--accent); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .small { font-size: 12px; color: #9ca3af; margin-top: 6px; }

.wrap--wide { max-width: 1024px; }

/* BLUE MENU BUTTON IN MOBILE MODE */
.nav-toggle {
  font-size:1.2rem;
  background: #e0f2fe; /* light blue background */
  border:1px solid var(--accent);
  color: var(--accent);
  padding:.25rem .5rem;
  border-radius:8px;
  cursor:pointer;
}
.nav-toggle:hover {
  background:#bfdbfe; /* slightly darker on hover */
}