:root {
  --bg: #faf7f2; --card: #fff; --ink: #2b2522; --muted: #7a6f68; --line: #e7dfd5;
  --brand: #8c3b2b; --brand-soft: #f4e4de; --ok: #2f7a4d; --ok-soft: #e1f1e6;
  --warn: #9a6a00; --warn-soft: #fbf0d4; --bad: #a33030; --bad-soft: #f8e0e0; --info-soft: #e3ecf7;
  --radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.wrap.narrow { max-width: 640px; }
header.top { background: var(--ink); color: #fff; }
header.top .wrap { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; padding-block: .7rem; }
header.top a { color: #fff; text-decoration: none; opacity: .85; }
header.top a:hover, header.top a.on { opacity: 1; text-decoration: underline; }
header.top .brand { font-weight: 700; font-size: 1.1rem; opacity: 1; margin-right: auto; }
header.top form { margin: 0; }
header.top button { background: none; border: 1px solid #fff6; color: #fff; padding: .25rem .6rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.muted { color: var(--muted); } .small { font-size: .85rem; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .2rem; }
input, select, textarea { width: 100%; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
input[type=checkbox] { width: auto; }
.field { margin-bottom: .8rem; }
.field .help { font-size: .8rem; color: var(--muted); }
.errorlist { list-style: none; padding: 0; margin: .2rem 0; color: var(--bad); font-size: .85rem; }
.form-inline { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .7rem; align-items: end; }
.form-inline .field { margin: 0; }
button, .btn { display: inline-block; background: var(--brand); color: #fff; border: 0; border-radius: 8px; padding: .5rem .95rem; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn.secondary, button.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.small, button.small { padding: .25rem .6rem; font-size: .85rem; }
button.danger { background: var(--bad); } button.ok { background: var(--ok); }
.inline { display: inline; margin: 0; }
.messages { list-style: none; padding: 0; margin: 0 0 1rem; }
.messages li { padding: .6rem .9rem; border-radius: 8px; margin-bottom: .4rem; background: var(--info-soft); }
.messages .success { background: var(--ok-soft); } .messages .error { background: var(--bad-soft); } .messages .warning { background: var(--warn-soft); }
.slots { display: flex; flex-wrap: wrap; gap: .5rem; }
.slots a { padding: .45rem .8rem; border: 1px solid var(--brand); border-radius: 999px; text-decoration: none; font-weight: 600; }
.slots a:hover, .slots a.pick { background: var(--brand); color: #fff; }
table.list { width: 100%; border-collapse: collapse; background: #fff; }
table.list th, table.list td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.scroll { overflow-x: auto; }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; background: var(--line); }
.s-booked { background: var(--info-soft); } .s-seated { background: var(--ok-soft); color: var(--ok); }
.s-completed { background: #eee; color: #555; } .s-no_show { background: var(--bad-soft); color: var(--bad); }
.s-cancelled { background: #eee; color: #999; text-decoration: line-through; }
.s-waiting { background: var(--warn-soft); } .s-notified { background: var(--ok-soft); }
.flag { background: var(--bad); color: #fff; }
.stats { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem 1rem; min-width: 120px; }
.stat b { display: block; font-size: 1.4rem; }
/* Service timeline */
.timeline { border-collapse: collapse; font-size: .78rem; background: #fff; }
.timeline th, .timeline td { border: 1px solid var(--line); padding: 0; height: 2.4rem; }
.timeline thead th { padding: .2rem; font-weight: 600; color: var(--muted); min-width: 2.3rem; }
.timeline th.tname { position: sticky; left: 0; background: #fff; padding: 0 .6rem; text-align: left; white-space: nowrap; z-index: 1; }
.timeline td.empty a { display: block; height: 100%; }
.timeline td.empty a:hover { background: var(--brand-soft); }
.timeline td.res { padding: 0 .3rem; }
.timeline td.res a { display: block; color: inherit; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.timeline td.res.s-booked { background: #cfe0f5; } .timeline td.res.s-seated { background: #bfe5cc; }
.timeline td.res.s-completed { background: #e6e6e6; } .timeline td.res.s-no_show { background: #f3c9c9; }
.timeline td.now { box-shadow: inset 2px 0 0 var(--bad); }
.checks ul, .checks > div { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.checks label { font-weight: 400; display: flex; gap: .3rem; align-items: center; }
@media (max-width: 600px) { h1 { font-size: 1.35rem; } .card { padding: .9rem; } }
form.stack > div { margin-bottom: .8rem; }
.helptext { font-size: .8rem; color: var(--muted); }
form.inline-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .7rem; align-items: end; }
form.inline-fields > div { margin: 0; }
