:root {
  --bg: #f6f8fa; --card: #fff; --ink: #1d2733; --muted: #66727f; --line: #e2e7ec;
  --brand: #0f7c8c; --brand-ink: #fff; --ok: #1a7f37; --warn: #b54708; --bad: #c62828;
  --radius: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); }
header { background: var(--card); border-bottom: 1px solid var(--line); }
header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
header a.logo { font-weight: 700; color: var(--brand); text-decoration: none; font-size: 1.15rem; }
nav { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
nav a, nav button.link { color: var(--ink); text-decoration: none; font-size: .95rem; background: none; border: 0; cursor: pointer; padding: 0; }
.wrap { max-width: 960px; margin: 0 auto; padding: 14px 18px; }
main.wrap { padding-top: 24px; }
h1 { font-size: 1.6rem; margin: 0 0 6px; } h2 { font-size: 1.2rem; margin: 0 0 12px; }
.muted { color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
label { display: block; font-size: .9rem; margin: 10px 0 4px; color: var(--muted); }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
input[type=checkbox] { width: auto; margin-right: 8px; }
button, .btn { display: inline-block; background: var(--brand); color: var(--brand-ink); border: 0; border-radius: 8px; padding: 10px 16px; font: inherit; cursor: pointer; text-decoration: none; }
button.secondary { background: #e9eef2; color: var(--ink); }
button.danger { background: var(--bad); }
button.small { padding: 5px 10px; font-size: .85rem; }
button:disabled { opacity: .5; cursor: default; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1 1 160px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; margin-top: 14px; }
.slot { background: #e7f4f6; color: var(--brand); border: 1px solid #bfe2e7; font-weight: 600; }
.slot.sel { background: var(--brand); color: #fff; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .85rem; }
td.num, th.num { text-align: right; white-space: nowrap; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: .8rem; background: #eef1f4; }
.badge.booked { background: #e7f4f6; color: var(--brand); }
.badge.completed { background: #e6f4ea; color: var(--ok); }
.badge.cancelled, .badge.no_show { background: #fdecea; color: var(--bad); }
.balance { font-size: 2rem; font-weight: 700; }
.balance.due { color: var(--warn); } .balance.clear { color: var(--ok); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.msg { padding: 10px 14px; border-radius: 8px; margin: 12px 0; display: none; }
.msg.show { display: block; } .msg.err { background: #fdecea; color: var(--bad); } .msg.ok { background: #e6f4ea; color: var(--ok); }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs button { background: #e9eef2; color: var(--ink); } .tabs button.active { background: var(--brand); color: #fff; }
.hidden { display: none !important; }
.narrow { max-width: 440px; margin: 0 auto; }
.list-item { padding: 10px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; }
.list-item:hover { border-color: var(--brand); }
footer { color: var(--muted); font-size: .85rem; text-align: center; padding: 30px 0; }
@media (max-width: 600px) { .hide-sm { display: none; } h1 { font-size: 1.35rem; } }
.dot { display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:6px; vertical-align:middle; }
.chips { display:flex; gap:8px; flex-wrap:wrap; }
.chip { background:#e9eef2; color:var(--ink); border:2px solid transparent; }
.chip.active { border-color: var(--brand); background:#e7f4f6; color:var(--brand); }
.card { overflow-x:auto; }
.week-row { display:flex; gap:10px; align-items:center; margin:6px 0; }
.week-row b { width:40px; }
.week-row input { flex:1; }
.modal { position:fixed; inset:0; background:rgba(0,0,0,.35); display:flex; align-items:center; justify-content:center; padding:18px; z-index:9; }
.modal .card { max-width:420px; width:100%; }
.note { background:#fff7e6; border:1px solid #f5d9a8; border-radius:8px; padding:10px 14px; font-size:.9rem; }
