/* Branded look for the booking app (thistle brand). Loaded after app.css.
   Palette: thistle green #40841A, dark green #246C1C, purple #6B267E, thistle purple #722682,
   white, light grey #E3E3E3, near-black #04040C.
   --accent stays the saved colour (set by boot.js from the demo's storage) so the colour picker still reaches the page. */
:root {
  --brand-green: #40841A; --brand-green-d: #246C1C; --brand-purple: #6B267E; --brand-thistle: #722682; --brand-grey: #E3E3E3; --brand-black: #04040C;
  --brand-purple-d: #53195F; --brand-purple-t: #F4ECF6; --brand-green-t: #EAF3E4; --brand-green-t2: #D5E8CA; --brand-deep: #2C0F35;
}
body { font-family: "Montserrat", Inter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.primary:hover { background: var(--accent-d); }

/* Brand bar: the thistle only. */
.brand-bar { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 16px; background: var(--card); border-bottom: 3px solid var(--brand-green); }
.brand-bar img.th { height: 38px; width: auto; }
@media (min-width: 761px) { body.booking .brand-bar { background: transparent; border: 0; padding-top: 28px; } body.booking .page { padding-top: 16px; } }

/* Neutral initial circle (no photo). */
.avatar {
  background-color: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--brand-green);
}

/* Calendar: available days in thistle green, the chosen day in the saved colour. */
.day.open { background: var(--brand-green-t); color: var(--brand-green-d); }
.day.open:hover { background: var(--brand-green-t2); }
.day.sel, .day.sel:hover { background: var(--accent); color: var(--on-accent); }
html[data-theme="dark"] .day.open { background: rgba(159, 210, 127, .16); color: #9FD27F; }
html[data-theme="dark"] .day.open:hover { background: rgba(159, 210, 127, .28); }
.slot { border-color: color-mix(in srgb, var(--brand-purple) 45%, transparent); }
.tick { background: var(--brand-green); }
@media (min-width: 761px) { .card { border-top: 4px solid var(--brand-purple); } }
.cancel-note { text-align: center; color: var(--ink2); font-size: 14px; margin: 18px 0 0; }
.cancel-note a { font-weight: 700; }

/* Selected list and weekly repeat, in the same colours as the rest of the brand. */
.tray { border-color: color-mix(in srgb, var(--brand-purple) 28%, var(--line)); }
.tray-title { color: var(--brand-purple); }
html[data-theme="dark"] .tray-title { color: #D9B8E3; }
.pick { background: var(--brand-purple-t); }
html[data-theme="dark"] .pick { background: rgba(217, 184, 227, .14); }
.repeat-toggle[aria-pressed="true"] { border-color: var(--brand-purple); background: var(--brand-purple-t); color: var(--brand-purple); }
html[data-theme="dark"] .repeat-toggle[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-t); color: var(--accent-ink); }
.bk { border-color: color-mix(in srgb, var(--brand-green) 35%, var(--line)); }

/* Demo label in the admin bar (replaces the reference's clocks). */
.clocks { display: flex; gap: 6px; min-width: 0; align-items: center; }
.adm-bar .clocks { flex: 1 1 auto; max-width: none; }
.clk { display: flex; align-items: center; border-radius: 999px; padding: 3px 10px; background: var(--brand-purple-t); color: var(--brand-purple); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
html[data-theme="dark"] .clk { background: rgba(217, 184, 227, .14); color: #D9B8E3; }
@media (max-width: 400px) {
  .adm-bar { gap: 6px; }
  .adm-brand img.th { height: 28px; }
}

/* Quiet demo notes. */
.demo-note { margin: 12px 0 0; color: var(--mute); font-size: 13px; text-align: center; }
.foot .demo-note { margin: 0; flex-basis: 100%; }
.mail-mode { margin-top: 6px; }

/* Admin brand. */
.adm-top { border-bottom: 3px solid var(--brand-green); }
.adm-brand { display: flex; align-items: center; flex: none; }
.adm-brand img.th { height: 34px; width: auto; }
.tab[aria-selected="true"] { border-bottom-color: var(--brand-purple); }
html[data-theme="dark"] .tab[aria-selected="true"] { border-bottom-color: var(--accent); }

/* Weekly hours, bulk block and hour blocks (admin, availability tab). Same controls and colours as the rest of the panel. */
.wk { display: grid; gap: 0; }
.wk-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 6px 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.wk-row:first-child { border-top: 0; }
.wk-day { font-weight: 700; }
.wk-ranges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.wk-ranges input[type="text"] { width: 84px; min-height: 40px; padding: 0 10px; text-align: center; }
.wk-ranges .to { color: var(--mute); }
.wk-off { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; font-size: 14px; color: var(--ink2); }
.wk-off input { width: 20px; height: 20px; accent-color: var(--accent); }
.wk-none { color: var(--mute); font-size: 14px; }
.wk-err { grid-column: 1 / -1; margin: 0; color: var(--red); font-size: 13px; min-height: 0; }
.wk-err:empty { display: none; }
.bulk-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.bulk-range { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; align-items: end; margin-top: 12px; }
.bulk-range label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink2); }
.bulk-range select { min-height: 44px; padding: 0 10px; font-size: 15px; }
.aday.chosen { box-shadow: inset 0 0 0 3px var(--ink); }
.blk-list { list-style: none; margin: 14px 0 0; padding: 0; }
.blk-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.blk-list li:first-child { border-top: 0; }
.prof { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end; }
.prof label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink2); }
.prof input, .prof select { min-height: 44px; padding: 0 10px; font-size: 15px; }
.stu-list .fine { margin-left: 6px; }
@media (max-width: 560px) { .wk-row { grid-template-columns: minmax(0, 1fr); } }
