:root {
  --bg: #faf6f4;
  --card: #ffffff;
  --ink: #2b2226;
  --muted: #7a6b71;
  --line: #e8dedb;
  --accent: #a94f73;
  --accent-ink: #ffffff;
  --accent-soft: #f6e6ec;
  --danger: #b3261e;
  --ok-bg: #e6f4ea;
  --ok-ink: #1e5c31;
  --err-bg: #fde8e6;
  --err-ink: #8c1d18;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--accent); }
h1 { font-size: 1.3rem; margin: 0 0 .8rem; font-weight: 600; }
.muted { color: var(--muted); }

/* ---- Header ---- */
.top {
  display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.2rem;
  padding: .6rem 1rem; background: var(--card); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: .01em; }
.top nav { display: flex; flex-wrap: wrap; gap: .2rem; }
.top nav a, .top .right > a {
  padding: .35rem .65rem; border-radius: 999px; text-decoration: none; color: var(--ink);
}
.top nav a:hover, .top .right > a:hover { background: var(--accent-soft); }
.top a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.top .right { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.langs { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.langs a { padding: .2rem .55rem; font-size: .8rem; text-decoration: none; color: var(--muted); }
.langs a.on { background: var(--accent); color: var(--accent-ink); }
form.inline { display: inline; margin: 0; }
button.link { background: none; border: 0; padding: .35rem .3rem; color: var(--muted); font: inherit; cursor: pointer; }
button.link:hover { color: var(--accent); }

main { padding: 1rem; max-width: 1400px; margin: 0 auto; }

/* ---- Messages ---- */
.flash { padding: .6rem .9rem; border-radius: var(--radius); margin: 0 0 .8rem; }
.flash.ok { background: var(--ok-bg); color: var(--ok-ink); }
.flash.err { background: var(--err-bg); color: var(--err-ink); }

/* ---- Buttons & forms ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 38px;
  padding: .4rem .9rem; border: 1px solid var(--line); border-radius: 8px;
  background: var(--card); color: var(--ink); font: inherit; text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--danger); border-color: #e9c4c1; }
.btn.small { min-height: 30px; padding: .15rem .6rem; font-size: .88rem; }
.btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.push { margin-left: auto; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem; max-width: 720px; margin: 0 auto 1rem;
}
.card.narrow { max-width: 380px; margin-top: 2rem; }
.card.wide { max-width: 980px; }
label { display: block; margin: 0 0 .8rem; font-size: .88rem; color: var(--muted); }
label.check { display: flex; align-items: center; gap: .5rem; color: var(--ink); font-size: 1rem; }
.card.narrow label.check { font-size: .92rem; }
input, select, textarea {
  display: block; width: 100%; margin-top: .25rem; padding: .5rem .6rem;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
  font: inherit; font-size: 16px;   /* 16px stops iOS zooming on focus */
}
input[type=checkbox] { width: auto; margin: 0; }
input[type=color] { padding: .15rem; height: 40px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
label small { display: block; margin-top: .2rem; }
.ac { position: relative; display: block; }
.ac-list {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 10; margin-top: 2px;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  box-shadow: 0 6px 18px rgba(43, 34, 38, .14);
}
.ac-list[hidden] { display: none; }
.ac-item {
  display: flex; justify-content: space-between; gap: 1rem; padding: .55rem .7rem;
  font-size: 1rem; color: var(--ink); cursor: pointer;
}
.ac-item + .ac-item { border-top: 1px solid var(--line); }
.ac-item:hover, .ac-item.on { background: var(--accent-soft); }
.ac-item span { color: var(--muted); white-space: nowrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .4rem; }

/* ---- Tables ---- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .8rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
td.r, th.r { text-align: right; white-space: nowrap; }
td.nowrap { white-space: nowrap; }
.client-name { margin: 0; }
.toolbar .grow { flex: 1 1 320px; max-width: 560px; }
.toolbar .grow input { flex: 1; min-width: 0; }
tr.dim td { color: var(--muted); }
tr.group-row td { background: var(--accent-soft); color: var(--accent); font-weight: 600; padding: .35rem .6rem; }
.table-wrap { overflow-x: auto; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .4rem; vertical-align: baseline; }
.tag { font-size: .75rem; padding: .1rem .45rem; border-radius: 999px; background: var(--line); color: var(--muted); }

/* ---- Reminders ---- */
.tag.ok { background: var(--ok-bg); color: var(--ok-ink); }
.rem-list { display: grid; gap: .6rem; max-width: 980px; }
.rem {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem;
}
.rem.sent { background: #f6faf7; border-color: #cfe6d6; }
.rem-info { display: grid; gap: .1rem; min-width: 0; }
.rem-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.rem-badge, .rem-undo { display: none; }
.rem.sent .rem-badge { display: inline-block; }
.rem.sent .rem-undo { display: inline-flex; }
.rem.sent .rem-mark { display: none; }
.rem.sent .js-sms { background: var(--card); color: var(--ink); border-color: var(--line); font-weight: 400; }
.bk-sms { font-size: .7rem; color: var(--ok-ink); }

.color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0 1rem; }
.legend { display: flex; flex-wrap: wrap; gap: .2rem 1rem; margin: 0 0 .8rem; font-size: .88rem; color: var(--muted); }
.legend > span { white-space: nowrap; }

/* ---- Calendar ---- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: .8rem; }
.toolbar .group { display: flex; gap: .3rem; margin: 0; }
.toolbar input, .toolbar select { margin: 0; width: auto; min-height: 38px; padding: .3rem .5rem; }
.seg .btn:first-child { border-radius: 8px 0 0 8px; }
.seg .btn:last-child { border-radius: 0 8px 8px 0; margin-left: -1px; }
.seg { gap: 0 !important; }
.cal-title { text-transform: capitalize; }
.cal-title::first-letter { text-transform: uppercase; }

.cal-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.cal { display: grid; min-width: min-content; }
.cal-corner, .col-head {
  position: sticky; top: 0; z-index: 3; background: var(--card);
  border-bottom: 1px solid var(--line); padding: .55rem .5rem; font-weight: 600; text-align: center;
}
.col-head { border-left: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col-head a { color: inherit; text-decoration: none; }
.col-head.today { color: var(--accent); background: var(--accent-soft); }
.gutter { position: relative; }
.gutter span { position: absolute; right: 6px; transform: translateY(-1px); font-size: .72rem; color: var(--muted); }
.col { position: relative; border-left: 1px solid var(--line); }
.slot { display: block; border-top: 1px dotted #f0e8e5; text-decoration: none; }
.slot.hour { border-top: 1px solid var(--line); }
.slot span { display: none; padding: 0 .4rem; font-size: .75rem; line-height: 22px; color: var(--accent); }
.slot:hover, .slot:focus { background: var(--accent-soft); }
.slot:hover span, .slot:focus span { display: block; }
.bk {
  position: absolute; left: 3px; right: 3px; z-index: 2; overflow: hidden;
  padding: 2px 6px; border-radius: 6px; border-left: 4px solid var(--c);
  background: color-mix(in srgb, var(--c) 16%, #fff); color: var(--ink);
  text-decoration: none; font-size: .8rem; line-height: 1.25;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 30%, #fff);
}
.bk:hover { background: color-mix(in srgb, var(--c) 28%, #fff); }
.bk strong, .bk-srv { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk.short { white-space: nowrap; }
.bk.short strong { display: inline; }
.bk.short .bk-srv { display: none; }
.bk-time { font-size: .72rem; color: var(--muted); margin-right: .3rem; }
.bk-srv { color: var(--muted); }
.col.off { background: repeating-linear-gradient(135deg, #f4eeec, #f4eeec 10px, #fbf8f7 10px, #fbf8f7 20px); }
.off-label {
  position: sticky; top: 60px; display: block; margin: 1rem .4rem; padding: .5rem; text-align: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px; color: var(--muted); text-decoration: none;
}
.off-label strong { display: block; color: var(--ink); }

@media (max-width: 640px) {
  main { padding: .6rem; }
  .grid2 { grid-template-columns: 1fr; }
  .grid2 > span { display: none; }
  .top .right { margin-left: 0; width: 100%; justify-content: space-between; }
  .toolbar .push { margin-left: 0; width: 100%; }
}

/* Automatic SMS setup card */
details { margin-top: 1rem; }
details summary { cursor: pointer; font-weight: 600; }
ol.steps { padding-left: 1.3rem; margin: .6rem 0 0; }
ol.steps li { margin-bottom: .5rem; line-height: 1.45; }
code { background: var(--line); padding: .05rem .3rem; border-radius: 4px; font-size: .9em; }
input.copy-all { font-family: ui-monospace, Menlo, monospace; font-size: .85rem; }

/* =====================================================================
   Look & feel (v10): warmer colours, softer cards, gentle motion.
   Everything below only restyles; no page structure depends on it.
   ===================================================================== */
:root {
  --bg: #fbf5f3;
  --ink: #2d2028;
  --muted: #7d6a73;
  --line: #eadfdc;
  --accent: #b0486f;
  --accent-2: #d98a6a;            /* warm peach, used in gradients */
  --accent-soft: #f8e7ee;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(74, 38, 54, .05), 0 8px 24px rgba(74, 38, 54, .07);
  --shadow-lift: 0 2px 4px rgba(74, 38, 54, .08), 0 14px 32px rgba(74, 38, 54, .13);
  --grad: linear-gradient(135deg, var(--accent), var(--accent-2));
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
body {
  min-height: 100vh;
  background:
    radial-gradient(900px 480px at 100% -10%, rgba(217, 138, 106, .16), transparent 60%),
    radial-gradient(800px 520px at -10% 0%, rgba(176, 72, 111, .13), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
h1 { font-family: var(--display); font-size: 1.5rem; font-weight: 600; letter-spacing: .005em; }
::selection { background: var(--accent-soft); }

/* ---- Header ---- */
.top {
  position: sticky; top: 0; z-index: 20; padding: .55rem 1.1rem;
  background: rgba(255, 255, 255, .82); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid rgba(234, 223, 220, .9); box-shadow: 0 4px 20px rgba(74, 38, 54, .05);
}
.brand { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--display); font-size: 1.12rem; }
.brand::before {
  content: ""; width: 26px; height: 26px; border-radius: 50% 50% 50% 4px; background: var(--grad);
  box-shadow: 0 3px 10px rgba(176, 72, 111, .35); transform: rotate(-45deg); transition: transform .5s var(--ease);
}
.brand:hover::before { transform: rotate(135deg); }
.top nav a, .top .right > a { transition: background .2s, color .2s, transform .2s var(--ease); }
.top nav a:hover { transform: translateY(-1px); }
.top a.on { background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgba(176, 72, 111, .28); }
.langs { background: #fff; }
.langs a { transition: background .2s, color .2s; }
.langs a.on { background: var(--grad); }

main { padding: 1.3rem 1rem 3rem; animation: page-in .45s var(--ease) both; }
@keyframes page-in { from { transform: translateY(8px); } }

/* ---- Messages ---- */
.flash { border: 1px solid transparent; box-shadow: var(--shadow); animation: flash-in .5s var(--ease) both; }
.flash.ok { border-color: #cfe6d6; }
.flash.ok::before { content: "✓  "; font-weight: 700; }
.flash.err { border-color: #f3c9c5; }
@keyframes flash-in { from { transform: translateY(-10px) scale(.98); } }

/* ---- Buttons ---- */
.btn {
  border-radius: 10px; box-shadow: 0 1px 2px rgba(74, 38, 54, .05);
  transition: transform .18s var(--ease), box-shadow .18s, border-color .18s, background .18s, filter .18s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(74, 38, 54, .1); }
.btn:active { transform: translateY(0) scale(.97); box-shadow: none; }
.btn.primary { background: var(--grad); border-color: transparent; box-shadow: 0 4px 14px rgba(176, 72, 111, .3); }
.btn.primary:hover { filter: brightness(1.06); box-shadow: 0 8px 20px rgba(176, 72, 111, .36); }
.btn.on { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.btn.danger:hover { background: var(--err-bg); border-color: var(--danger); }
.seg .btn { box-shadow: none; }
.seg .btn:first-child { border-radius: 10px 0 0 10px; }
.seg .btn:last-child { border-radius: 0 10px 10px 0; }
.seg .btn:hover { transform: none; }

/* ---- Cards & forms ---- */
.card { border-color: rgba(234, 223, 220, .8); box-shadow: var(--shadow); padding: 1.4rem; animation: rise .5s var(--ease) both; }
.card + .card, form.card ~ .card { animation-delay: .07s; }
@keyframes rise { from { transform: translateY(14px); } }
.card.narrow { margin-top: 7vh; padding: 1.8rem 1.6rem; position: relative; overflow: hidden; }
.card.narrow::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--grad); }
.card.narrow h1 { text-align: center; font-size: 1.7rem; margin-bottom: 1.1rem; }
.card.narrow .btn.primary { width: 100%; min-height: 44px; margin-top: .3rem; }
input, select, textarea { border-radius: 10px; transition: border-color .18s, box-shadow .18s, background .18s; }
input:hover, select:hover, textarea:hover { border-color: #d9c6cd; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(176, 72, 111, .15); }
input[type=checkbox] { accent-color: var(--accent); width: 18px; height: 18px; }
.ac-list { border-radius: 12px; box-shadow: var(--shadow-lift); animation: flash-in .2s var(--ease) both; }

/* ---- Tables ---- */
tbody tr, table tr { transition: background .15s; }
table tr:hover td { background: #fdf8f6; }
tr.group-row:hover td, tr.group-row td { background: var(--accent-soft); }
tr.group-row td { font-family: var(--display); font-size: 1rem; }
tr:last-child td { border-bottom: 0; }
.dot { box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(74, 38, 54, .08); }
.tag { font-weight: 600; }

/* ---- Reminders ---- */
.rem { box-shadow: var(--shadow); transition: transform .2s var(--ease), box-shadow .2s, background .3s, border-color .3s; animation: rise .45s var(--ease) both; }
.rem:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.rem:nth-child(2) { animation-delay: .04s; } .rem:nth-child(3) { animation-delay: .08s; }
.rem:nth-child(4) { animation-delay: .12s; } .rem:nth-child(n+5) { animation-delay: .16s; }
.rem.sent .rem-badge { animation: pop .4s var(--ease) both; }
@keyframes pop { from { transform: scale(.6); } 60% { transform: scale(1.08); } }

/* ---- Calendar ---- */
.cal-title { font-size: 1.65rem; margin-bottom: .5rem; }
.legend > span { background: rgba(255, 255, 255, .7); border: 1px solid var(--line); border-radius: 999px; padding: .12rem .6rem .12rem .5rem; }
.cal-wrap { box-shadow: var(--shadow); border-color: rgba(234, 223, 220, .8); animation: rise .5s var(--ease) both; }
.cal-corner, .col-head { background: #fffdfc; padding: .7rem .5rem; }
.col-head.today { background: var(--accent-soft); box-shadow: inset 0 -3px 0 var(--accent); }
.col.today-col { background: linear-gradient(rgba(248, 231, 238, .35), rgba(248, 231, 238, .12)); }
.slot { transition: background .15s; }
.slot span { font-weight: 600; }
.bk {
  border-radius: 9px; padding: 3px 7px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 20%, #fff), color-mix(in srgb, var(--c) 11%, #fff));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 28%, #fff), 0 2px 6px color-mix(in srgb, var(--c) 18%, transparent);
  transition: transform .18s var(--ease), box-shadow .18s, background .18s;
  animation: bk-in .45s var(--ease) both;
}
.bk:hover {
  z-index: 4; transform: translateY(-1px) scale(1.015);
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 30%, #fff), color-mix(in srgb, var(--c) 18%, #fff));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 45%, #fff), 0 8px 18px color-mix(in srgb, var(--c) 30%, transparent);
}
@keyframes bk-in { from { transform: translateY(6px) scale(.97); } }
.col:nth-child(odd) .bk { animation-delay: .05s; }
.col:nth-child(3n) .bk { animation-delay: .1s; }
.bk-sms { font-weight: 700; }
.off-label { box-shadow: var(--shadow); border-radius: 12px; }

/* "Now" line on today's column(s) */
.now-line { position: absolute; left: 0; right: 0; z-index: 3; height: 0; border-top: 2px solid var(--accent); pointer-events: none; transition: top 1s linear; }
.now-line::before {
  content: ""; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 0 rgba(176, 72, 111, .5); animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse { to { box-shadow: 0 0 0 10px rgba(176, 72, 111, 0); } }

details summary { color: var(--accent); }
details[open] > ol { animation: flash-in .3s var(--ease) both; }
a { transition: color .15s; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 640px) {
  .top { padding: .5rem .7rem; gap: .35rem .8rem; }
  .top nav { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .top nav::-webkit-scrollbar { display: none; }
  .top nav a { white-space: nowrap; flex: none; }
  .card { padding: 1.1rem; }
  .cal-title { font-size: 1.35rem; }
  h1 { font-size: 1.35rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.col.today-col ~ .col.today-col .now-line::before { display: none; }   /* one dot per row is enough */

/* Pages with a title, a toolbar and a table share one centred column. */
.page { max-width: 980px; margin: 0 auto; }
.page .card, .page .card.wide { max-width: none; }
.page .toolbar .grow { max-width: none; }
.page .toolbar input[type=search] { min-height: 42px; padding: .4rem .8rem; }
.page .toolbar .btn { min-height: 42px; }
td a:not(.btn) { text-decoration: none; }
td a:not(.btn):hover { text-decoration: underline; }
td a strong { font-weight: 600; }
.card .table-wrap th:first-child, .card .table-wrap td:first-child { padding-left: .2rem; }

/* ---- Booking form: list of chosen services ---------------------------------- */
.chosen {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .6rem;
  margin: 0 0 1rem; padding: .7rem .8rem; border: 1px dashed var(--line); border-radius: 12px;
  background: var(--accent-soft);
}
.chosen-title { font-size: .85rem; font-weight: 600; flex-basis: 100%; }
.chips { display: contents; }
.chip {
  display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .35rem .3rem .75rem;
  border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: .9rem;
  box-shadow: var(--shadow); animation: pop .25s var(--ease);
}
.chip-x {
  width: 1.6rem; height: 1.6rem; border: 0; border-radius: 50%; cursor: pointer; font-size: 1.05rem; line-height: 1;
  background: var(--accent-soft); color: var(--accent);
}
.chip-x:hover { background: var(--accent); color: #fff; }
#chosen_total { margin-left: auto; white-space: nowrap; }
.bk-srv { overflow: hidden; }

/* ---- Settings: work days ----------------------------------------------------- */
.days { border: 0; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.days legend { font-size: .85rem; font-weight: 600; margin-bottom: .35rem; padding: 0; }
.days small { flex-basis: 100%; color: var(--muted); }
.days .day { margin: 0; cursor: pointer; }
.days .day input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.days .day span {
  display: inline-block; padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--muted); transition: transform .15s var(--ease);
}
.days .day input:checked + span { background: var(--grad); color: #fff; border-color: transparent; }
.days .day input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.days .day span:hover { transform: translateY(-1px); }
.cal-title .tag { vertical-align: middle; margin-left: .4rem; }

/* ---- Calendar: absence for part of a day -------------------------------------- */
.off-part {
  position: absolute; left: 0; right: 0; z-index: 1; overflow: hidden; padding: 3px 8px;
  background: repeating-linear-gradient(135deg, #efe6e3, #efe6e3 10px, #f9f4f2 10px, #f9f4f2 20px);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  color: var(--muted); font-size: .8rem; line-height: 1.3; text-decoration: none; cursor: not-allowed;
}
.off-part strong { color: var(--ink); }
.off-part span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Calendar: overlapping bookings side by side ------------------------------ */
.cal { --free: 0px; }
.cal.overlap { --free: 22px; }   /* strip on the right that stays clickable for another booking */
.bk {
  right: auto;
  left: calc((100% - var(--free)) * var(--lane, 0) / var(--lanes, 1) + 3px);
  width: calc((100% - var(--free)) / var(--lanes, 1) - 6px);
}
.bk.shared { padding-left: 4px; padding-right: 3px; }
.bk.shared .bk-time { display: block; margin-right: 0; }

/* ---- Settings: on/off switch --------------------------------------------------- */
.switch { display: flex; align-items: flex-start; gap: .7rem; cursor: pointer; margin: 0 0 1rem; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-knob {
  flex: none; width: 2.6rem; height: 1.5rem; border-radius: 999px; background: var(--line); position: relative; margin-top: .1rem;
}
.switch-knob::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: calc(1.5rem - 6px); height: calc(1.5rem - 6px);
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.switch input:checked + .switch-knob { background: var(--grad); }
.switch input:checked + .switch-knob::after { left: calc(100% - 1.5rem + 3px); }
.switch input:focus-visible + .switch-knob { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch-text strong { display: block; font-size: .95rem; }
.switch-text small { color: var(--muted); }

/* ---- Calendar: hour column and day header row (v17) ----------------------------- */
.cal-corner, .col-head { background: linear-gradient(#fffdfc, #fbf3f1); border-bottom: 1px solid var(--line); }
.col-head { padding: .35rem .3rem; }
.col-head .day-link {
  display: flex; flex-direction: column; align-items: center; gap: .05rem; padding: .3rem .4rem;
  border-radius: 12px; border: 1px solid transparent; color: var(--ink); cursor: pointer;
  transition: transform .15s var(--ease), box-shadow .15s;
}
.col-head .day-link small { font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.col-head .day-link b { font-family: var(--display); font-size: 1.05rem; font-weight: 600; }
.col-head .day-link:hover, .col-head .day-link:focus-visible {
  background: #fff; border-color: var(--accent); color: var(--accent);
  box-shadow: var(--shadow); transform: translateY(-1px); outline: none;
}
.col-head .day-link:hover small, .col-head .day-link:focus-visible small { color: var(--accent); }
.col-head.today .day-link { color: var(--accent); }
.col-head.today .day-link small { color: var(--accent); }

/* Hour column: tinted, with the hour large and the minutes small. */
.gutter { background: linear-gradient(90deg, #fbf3f1, #fffdfc); border-right: 1px solid var(--line); }
.gutter span { right: 8px; transform: translateY(3px); color: var(--ink); font-size: .8rem; line-height: 1; white-space: nowrap; }
.gutter span b { font-family: var(--display); font-size: 1rem; font-weight: 600; }
.gutter span small { font-size: .68rem; color: var(--muted); margin-left: 1px; }

/* Hour rows: every other hour gets a faint band, hour lines are a little stronger. */
.col {
  background-image: repeating-linear-gradient(to bottom,
    transparent 0, transparent var(--hour, 96px),
    rgba(176, 72, 111, .028) var(--hour, 96px), rgba(176, 72, 111, .028) calc(var(--hour, 96px) * 2));
  background-position: 0 var(--band, 0px);
}
.col.off { background-image: repeating-linear-gradient(135deg, #f4eeec, #f4eeec 10px, #fbf8f7 10px, #fbf8f7 20px); background-position: 0 0; }
.slot { border-top-color: #f3ebe8; }
.slot.hour { border-top: 1px solid #e6d8d4; }

/* ---- Stranke: edit a client ----------------------------------------------------- */
.client-edit > summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.client-edit[open] > summary { margin-bottom: .9rem; }
.client-add > summary { list-style: none; }
.client-add > summary::-webkit-details-marker { display: none; }
.client-add > summary::marker { content: ""; }

/* ---- Calendar: reminder status on each booking ---------------------------------- */
.bk-sms {
  display: inline-block; padding: 0 .4rem; border-radius: 999px; font-size: .66rem; font-weight: 700; line-height: 1.5;
  background: var(--ok-bg); color: var(--ok-ink); white-space: nowrap; vertical-align: 1px;
}
.bk-sms.wait { background: #fdf0d9; color: #94610a; }
.bk-sms.none { background: #efe9e7; color: #7d7177; }

/* ---- Calendar: note on each booking ---------------------------------------------- */
.bk-note {
  display: block; margin-top: 1px; font-size: .74rem; font-style: italic; color: var(--ink); opacity: .8;
  white-space: normal; overflow: hidden; overflow-wrap: anywhere;
}
.bk-note::before { content: "✎ "; font-style: normal; color: var(--accent); }
.bk.short .bk-note { display: inline; margin-left: .35rem; white-space: nowrap; }

/* ---- Odsotnosti: the row being edited ---------------------------------------------- */
tr.editing td { background: var(--accent-soft); }

/* ---- Date picker in the app's own design ------------------------------------------- */
.dp { position: relative; display: inline-block; }
label .dp, .grid2 .dp { display: block; }
.dp-btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: .6rem; width: 100%; min-height: 40px;
  padding: .45rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
  font: inherit; font-variant-numeric: tabular-nums; cursor: pointer; white-space: nowrap;
  transition: border-color .18s, box-shadow .18s;
}
.dp-btn::after {
  content: ""; width: 1rem; height: 1rem; flex: none; border: 2px solid var(--accent); border-top-width: 5px; border-radius: 4px; opacity: .8;
}
.dp-btn:hover { border-color: #d9c6cd; }
.dp-btn:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(176, 72, 111, .15); }
.dp-pop {
  position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; width: 19rem; max-width: calc(100vw - 16px); padding: .8rem;
  background: #fff; border: 1px solid rgba(234, 223, 220, .9); border-radius: 16px; box-shadow: var(--shadow-lift);
  animation: pop .18s var(--ease);
}
.dp-pop.right { left: auto; right: 0; }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.dp-title { font-family: var(--display); font-size: 1.1rem; text-transform: capitalize; }
.dp-nav {
  width: 2.1rem; height: 2.1rem; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--accent);
  font-size: 1.2rem; line-height: 1; cursor: pointer;
}
.dp-nav:hover { background: var(--accent-soft); border-color: var(--accent); }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-dow { padding: .3rem 0; text-align: center; font-size: .68rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dp-dow.we { color: var(--accent); opacity: .75; }
.dp-day {
  aspect-ratio: 1; border: 1px solid transparent; border-radius: 50%; background: none; color: var(--ink);
  font: inherit; font-size: .9rem; font-variant-numeric: tabular-nums; cursor: pointer;
}
.dp-day:hover { background: var(--accent-soft); color: var(--accent); }
.dp-day.other { color: #c5b9bd; }
.dp-day.we:not(.other) { color: var(--accent); }
.dp-day.today { border-color: var(--accent); font-weight: 700; }
.dp-day.on, .dp-day.on:hover { background: var(--grad); color: #fff; border-color: transparent; font-weight: 700; box-shadow: 0 3px 8px rgba(176, 72, 111, .35); }
.dp-foot { display: flex; justify-content: center; margin-top: .6rem; padding-top: .6rem; border-top: 1px solid var(--line); }
.dp-day:focus-visible, .dp-day.today:focus { outline: none; box-shadow: 0 0 0 4px rgba(176, 72, 111, .22); background: var(--accent-soft); }
.dp-day.on:focus { background: var(--grad); }

/* ---- Booking form: preparation time note ---- */
.chosen-buffer { flex-basis: 100%; font-size: .82rem; color: var(--muted); }
/* ---- Settings: light / dark choice ---- */
.themes { border: 0; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.themes legend { font-size: .85rem; font-weight: 600; margin-bottom: .35rem; padding: 0; }
.themes label { margin: 0; cursor: pointer; }
.themes input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.themes span { display: inline-flex; align-items: center; gap: .5rem; padding: .45rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--muted); }
.themes span::before { content: ""; width: .9rem; height: .9rem; border-radius: 50%; border: 1px solid currentColor; background: #fbf5f3; }
.themes .t-dark span::before { background: #14120f; }
.themes input:checked + span { background: var(--grad); color: var(--accent-ink); border-color: transparent; font-weight: 600; }
.themes input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- Storitve: groups ---- */
table.groups input[type=color] { width: 56px; height: 34px; margin: 0; }
.group-add { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem 1rem; margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.group-add label { margin: 0; flex: 1 1 220px; }
.group-add label + label { flex: 0 0 90px; }

/* ---- Public holidays (Nastavitve → Državni prazniki) ------------------------------- */
.col.holiday { background-color: #f3f0ef; background-image: repeating-linear-gradient(135deg, rgba(138, 128, 134, .07) 0 8px, transparent 8px 16px); }
.col-head.holiday .day-link b, .col-head.holiday .day-link small { color: var(--muted); }
.hol-name { display: block; font-style: normal; font-size: .66rem; font-weight: 600; line-height: 1.2; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.hol-label { cursor: default; }
.tag.hol { background: #ebe6e4; color: var(--ink); }
.dp-day.hol { color: var(--muted); background: repeating-linear-gradient(135deg, rgba(138, 128, 134, .12) 0 4px, transparent 4px 8px); }
.dp-day.hol.on { color: #fff; background: var(--grad); }
.hol-ask { margin-top: 1rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--accent-soft); }
.hol-ask p { margin: 0 0 .6rem; }

/* ---- Novice (newsletter) ------------------------------------------------------------- */
.news-progress progress { width: 100%; height: 12px; accent-color: var(--accent); }
.news-compose textarea { min-height: 14rem; }
.news-img { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin: .2rem 0 1rem; }
.news-img img { max-width: 220px; max-height: 140px; border-radius: 10px; border: 1px solid var(--line); }
.news-test { display: flex; gap: .6rem; align-items: flex-end; flex-wrap: wrap; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.news-test label { flex: 1 1 16rem; margin: 0; }
.news-send { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); align-items: center; }
.mail-preview { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.mail-preview img { max-width: 100%; }
label.news-ok { display: flex; gap: .6rem; align-items: flex-start; font-weight: normal; margin: .2rem 0 1rem; }
label.news-ok input { width: auto; margin-top: .25rem; }
label.news-ok span { display: flex; flex-direction: column; }
label.news-how { display: block; max-width: 22rem; margin: -.4rem 0 1rem 1.6rem; }
label.news-ok:not(:has(input:checked)) + label.news-how { display: none; }
.client-mail small { margin-left: .3rem; }
.client-mail .tag { vertical-align: middle; }

/* Client notes and no-shows */
.tag.warn { background: var(--err-bg); color: var(--err-ink); }
.client-warn { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .25rem .6rem; align-items: baseline;
  margin: .2rem 0 .8rem; padding: .6rem .9rem; border-radius: 12px; background: var(--err-bg); color: var(--err-ink); }
.client-warn[hidden] { display: none; }
.client-warn .cw-w { white-space: pre-line; }
.client-warn .cw-x:empty, .client-warn .cw-w:empty { display: none; }
.ac-warn { color: var(--err-ink); margin-left: auto; }
.client-note textarea { margin-top: .35rem; }
.client-note.has-note { border-left: 4px solid var(--err-ink); }
.client-note .btn { margin-top: .6rem; }
.bk-warn { color: var(--err-ink); }
.bk.noshow { opacity: .55; }
.bk.noshow strong { text-decoration: line-through; }
