:root {
  --ink: #18312a;
  --muted: #6b7c76;
  --green: #174c3c;
  --green-2: #287a62;
  --cream: #f4f7f5;
  --paper: #ffffff;
  --line: #dce5e1;
  --danger: #a53b3b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--cream); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.eyebrow { margin: 0 0 4px; text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 800; color: var(--green-2); }
h1, h2, h3, p { margin-top: 0; }
.muted { color: var(--muted); }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top right, #cae2d9, transparent 35%), var(--cream); }
.login-card { width: min(420px, 100%); padding: 34px; border-radius: 28px; background: var(--paper); box-shadow: 0 24px 60px #14382b1a; }
.brand-mark { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 24px; border-radius: 18px; color: white; background: var(--green); font-size: 1.5rem; font-weight: 800; }
.stack, .inline-form { display: grid; gap: 14px; }
label { display: grid; gap: 7px; font-size: .88rem; font-weight: 700; }
input, select, textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 3px solid #287a6220; border-color: var(--green-2); }
.primary, .secondary, .danger { border: 0; border-radius: 12px; padding: 12px 17px; font-weight: 800; }
.primary { background: var(--green); color: white; }
.secondary { background: #e8efec; color: var(--ink); }
.danger { background: #f7e5e5; color: var(--danger); }
.error { min-height: 1.2em; margin: 10px 0 0; color: var(--danger); font-size: .88rem; }
.app { min-height: 100vh; padding-bottom: 92px; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 22px max(20px, calc((100vw - 1200px) / 2)); background: var(--green); color: white; }
.topbar .eyebrow { color: #a9d8c7; }
.topbar h1 { margin: 0; font-size: clamp(1.25rem, 4vw, 1.7rem); }
.icon-btn { width: 42px; height: 42px; border: 0; border-radius: 50%; background: #ffffff18; color: inherit; font-size: 1.6rem; }
.tabs { display: flex; gap: 6px; padding: 12px max(16px, calc((100vw - 1200px) / 2)); overflow-x: auto; background: white; border-bottom: 1px solid var(--line); }
.tab { white-space: nowrap; padding: 10px 14px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-weight: 750; }
.tab.active { color: var(--green); background: #e9f2ee; }
.view { max-width: 1200px; margin: auto; padding: 22px 16px; }
.calendar-toolbar, .section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.calendar-toolbar .icon-btn { color: var(--green); background: white; box-shadow: 0 4px 15px #18312a10; }
.calendar-toolbar h2 { margin: 0; font-size: 1.2rem; }
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.legend-item { display: flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 999px; background: white; font-size: .8rem; font-weight: 700; }
.dot { width: 9px; height: 9px; border-radius: 50%; }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.day { min-height: 280px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: #fbfdfc; }
.day.today { border-color: var(--green-2); box-shadow: inset 0 3px var(--green-2); }
.day-head { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: .82rem; font-weight: 800; }
.day-date { color: var(--muted); }
.booking { width: 100%; text-align: left; margin-bottom: 8px; padding: 10px; border: 0; border-left: 5px solid; border-radius: 10px; background: white; box-shadow: 0 3px 12px #18312a0d; color: var(--ink); }
.booking strong, .booking span { display: block; }
.booking span { margin-top: 3px; color: var(--muted); font-size: .76rem; }
.card-list { display: grid; gap: 12px; }
.booking-card, .panel { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.booking-card { display: flex; gap: 14px; align-items: center; }
.booking-card .color-bar { align-self: stretch; width: 6px; border-radius: 9px; }
.booking-card .grow { flex: 1; }
.booking-card p { margin: 4px 0 0; color: var(--muted); font-size: .88rem; }
.admin-grid { display: grid; gap: 18px; }
.panel h3 { margin-bottom: 16px; }
.inline-form { grid-template-columns: 1.2fr 1.2fr 1fr .7fr auto; align-items: end; }
.inline-form.compact { grid-template-columns: 1fr auto auto; }
.manage-list { display: grid; gap: 8px; margin-top: 18px; }
.manage-row { display: flex; align-items: center; gap: 10px; padding: 10px; border-top: 1px solid var(--line); }
.manage-row .grow { flex: 1; }
.manage-row small { display: block; color: var(--muted); }
.small-btn { padding: 7px 10px; border: 0; border-radius: 9px; background: #edf2f0; color: var(--ink); }
.fab { position: fixed; right: max(20px, calc((100vw - 1200px) / 2)); bottom: 22px; border: 0; border-radius: 999px; padding: 15px 22px; color: white; background: var(--green); box-shadow: 0 12px 30px #174c3c4a; font-weight: 800; }
dialog { width: min(520px, calc(100% - 24px)); padding: 0; border: 0; border-radius: 22px; box-shadow: 0 30px 80px #0b211a50; }
dialog::backdrop { background: #0b211a99; backdrop-filter: blur(3px); }
.dialog-card { display: grid; gap: 15px; padding: 23px; }
.dialog-head, .dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.dialog-head h2 { margin: 0; }
.dialog-head .icon-btn { color: var(--ink); background: #edf2f0; }
.dialog-actions { justify-content: flex-end; margin-top: 8px; }
.dialog-actions .danger { margin-right: auto; }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.toast { position: fixed; z-index: 20; top: 16px; left: 50%; transform: translate(-50%, -100px); padding: 11px 17px; border-radius: 12px; background: var(--ink); color: white; transition: transform .25s; }
.toast.show { transform: translate(-50%, 0); }
@media (max-width: 720px) {
  .week-grid { display: block; overflow: visible; }
  .day { min-height: 100px; margin-bottom: 10px; }
  .day:not(.has-bookings):not(.today) { min-height: auto; }
  .inline-form, .inline-form.compact { grid-template-columns: 1fr; }
  .fab span { display: none; }
  .fab { width: 58px; height: 58px; padding: 0; font-size: 1.2rem; }
  .booking-card { align-items: flex-start; }
}
