:root { --bg:#f3f4f6; --text:#111827; --muted:#6b7280; --card:#ffffff; --border:#e5e7eb; }
* { box-sizing: border-box; }
body { font-family: Arial, sans-serif; margin: 0; background: var(--bg); color: var(--text); }
header { background: #1f2937; color: white; padding: .9rem 1rem; display:flex; justify-content:space-between; align-items:center; gap:.75rem; }
main { padding: 1rem; max-width: 1200px; margin: 0 auto; }
.card { background: var(--card); border-radius: 16px; padding: 1rem; margin-bottom: 1rem; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.muted { color: var(--muted); }
.row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.stack { display: flex; flex-direction: column; gap: .5rem; }
.actions { display:flex; gap:.5rem; flex-wrap: wrap; margin-top:.85rem; }
form.inline { display:inline; }
input, textarea, select, button { font: inherit; }
input, textarea, select { width: 100%; padding: .65rem .75rem; border: 1px solid #cbd5e1; border-radius: 10px; background:white; }
textarea { min-height: 80px; }
button, .button-link { border: none; border-radius: 10px; padding: .7rem .95rem; cursor: pointer; text-decoration:none; display:inline-flex; align-items:center; justify-content:center; }
.btn-primary { background: #2563eb; color: white; }
.btn-secondary { background: #e5e7eb; color: #111827; }
.btn-danger { background: #dc2626; color: white; }
.btn-warning { background: #f59e0b; color: white; }
.pill { display:inline-block; padding:.25rem .55rem; border-radius:999px; background:#e5e7eb; font-size:.9rem; }
.pill.ok { background:#dcfce7; color:#166534; }
.pill.wait { background:#fce7f3; color:#9d174d; }
.pill.blocked { background:#fee2e2; color:#991b1b; }
.grid-2 { display:grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap:1rem; }
.grid-3 { display:grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap:1rem; }
ul.compact { margin:.35rem 0 0 1.1rem; padding:0; }
li { margin:.25rem 0; }
.small { font-size:.92rem; }
.page-intro { margin-bottom: .75rem; }

.agenda-nav { display:flex; align-items:center; justify-content:space-between; gap:.75rem; margin-bottom:1rem; }
.agenda-date { flex:1; text-align:center; font-size:1.15rem; font-weight:700; }
.nav-arrow { width:44px; height:44px; padding:0; border-radius:999px; background:white; border:1px solid var(--border); color:#111827; font-size:1.25rem; }
.agenda-list { display:flex; flex-direction:column; gap:.85rem; }
.agenda-card { display:flex; gap:.75rem; background:white; border-radius:18px; box-shadow: 0 1px 4px rgba(0,0,0,.08); overflow:hidden; }
.agenda-color { width:6px; flex:0 0 6px; }
.agenda-body { padding:.9rem .95rem 1rem; flex:1; }
.agenda-top { display:flex; justify-content:space-between; gap:.75rem; align-items:center; }
.agenda-time { font-size:.95rem; font-weight:700; }
.status-dot { width:10px; height:10px; border-radius:999px; display:inline-block; }
.status-free { background:#22c55e; }
.status-full { background:#ef4444; }
.status-waitlist { background:#ec4899; }
.status-blocked { background:#f59e0b; }
.agenda-title-row { margin:.35rem 0 .15rem; display:flex; align-items:baseline; justify-content:space-between; gap:.75rem; }
.agenda-title { margin:0; font-size:1.15rem; font-weight:700; flex:1; min-width:0; }
.agenda-count { margin:0; font-size:.98rem; font-weight:700; color:var(--muted); white-space:nowrap; }
.agenda-subtitle { margin:0; color:var(--muted); font-size:.9rem; }
.agenda-state { margin:.75rem 0 0; font-size:.95rem; }
.agenda-state-wrap { margin:.8rem 0 0; }
.agenda-state-label { font-size:.82rem; color:var(--muted); margin-bottom:.3rem; font-weight:700; text-transform:uppercase; letter-spacing:.02em; }
.agenda-state-badge { display:inline-flex; align-items:center; padding:.38rem .7rem; border-radius:999px; font-size:.92rem; font-weight:700; line-height:1.2; max-width:100%; }
.state-reserved { background:#dcfce7; color:#166534; }
.state-wait { background:#fef3c7; color:#92400e; }
.state-free { background:#e5e7eb; color:#374151; }
.state-free-credit { background:#dbeafe; color:#1d4ed8; }
.state-cancelled { background:#e5e7eb; color:#111827; }
.state-cancelled-source { background:#fce7f3; color:#9d174d; }
.state-past { background:#f3f4f6; color:#6b7280; }
.empty-state { text-align:center; padding:2rem 1rem; }
.color-chip { width:14px; height:14px; border-radius:999px; display:inline-block; border:1px solid rgba(0,0,0,.15); }
.admin-section-title { margin-top:.95rem; font-size:.92rem; font-weight:700; color:var(--muted); }
.admin-people-list { margin-left:0; list-style:none; }
.admin-person-row { display:flex; align-items:center; justify-content:space-between; gap:.75rem; }
.btn-icon { height:34px; aspect-ratio: 1/1; padding:0; border-radius:999px; }

.mobile-shell { max-width: 560px; margin: 0 auto; }
.mobile-shell .card { border-radius: 18px; }
.mobile-shell .row.mobile-stack { align-items: stretch; }
.mobile-shell .row.mobile-stack > * { flex: 1 1 100%; }
.mobile-shell .button-link, .mobile-shell button { min-height: 42px; }

@media (max-width: 767px) {
header { align-items:flex-start; }
header .row { width:100%; justify-content:flex-end; }
}

@media (min-width: 768px) {
.agenda-list { max-width: 560px; margin: 0 auto; }
.page-intro, #agenda-root, .mobile-shell { max-width: 560px; margin-left:auto; margin-right:auto; }
}
