/* AVBeautyAgenda – design "Cald" (spec 003, specs/003-visual-redesign/contracts/ui-tokens.md):
   cream background, one plum accent, Fraunces titles, DM Sans text; menu at the bottom on phones */
:root {
  --bg: #f8f5f0; --surface: #fffdfa; --primary: #7a3e5c; --on-primary: #ffffff;
  --cta: #7a3e5c; --cta-hover: #66334d; --text: #2a211c; --muted: #6f6157; --line: #ece4da;
  --accent-soft: #f1e6ea; --danger: #c2410c; --ok: #3f7d4e; --radius: 12px; --radius-card: 18px; --menu-h: 62px;
  --shadow: 0 1px 2px rgba(60,40,20,.06), 0 2px 8px rgba(60,40,20,.04);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1); --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --font: "DM Sans", system-ui, sans-serif; --font-head: Fraunces, Georgia, serif;
  --op-1: #5b7fd6; --op-2: #3f9e8f; --op-3: #c45a8a; --op-4: #8a63c9;
  --op-5: #5a9a5c; --op-6: #c49a3a; --op-7: #6a67c9; --op-8: #3f94ad;
  /* the call buttons (spec 005, schite/apeluri-butoane.html variant B) */
  --c-call: #3f7d4e; --c-wa: #2e9d5b; --c-sms: #5b7fd6; --c-card: #8a63c9; --c-later: #c49a3a; --c-none: #6f6157; --c-ign: #c2410c; --c-see: #2b7689;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.5 var(--font); font-variant-numeric: tabular-nums; }
a { color: var(--primary); }
h1 { font: 600 30px/1.15 var(--font-head); letter-spacing: -.01em; margin: 4px 0 14px; text-wrap: balance; }
h2 { font: 600 20px/1.25 var(--font-head); margin: 24px 0 10px; }
.muted { color: var(--muted); }
main { max-width: 1100px; margin: 0 auto; padding: 16px max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px)); }

/* top bar and menu */
.bar { background: var(--surface); color: var(--text); box-shadow: var(--shadow); padding: 10px 14px; display: flex; align-items: center; gap: 12px; }
.bar .brand { font: 600 19px var(--font-head); color: inherit; text-decoration: none; }
.bar .who { margin-left: auto; font-size: 14px; color: var(--muted); display: flex; gap: 10px; align-items: center; }
.bar form { margin: 0; }
.bar button { background: transparent; color: var(--primary); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 6px 12px; font-weight: 600; font: inherit; cursor: pointer; }
.menu { display: flex; background: var(--surface); border-bottom: 1px solid var(--line); }
.menu a { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; position: relative; font-size: 11px; font-weight: 600; padding: 8px 2px 7px; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; }
.menu a.on { color: var(--primary); border-bottom-color: var(--cta); }
.menu svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.badge { background: var(--danger); color: #fff; border-radius: 9px; font-size: 11px; padding: 1px 6px; margin-left: 3px; }
.menu .badge { position: absolute; top: 3px; left: calc(50% + 6px); margin: 0; }
.badge.beat { animation: badge-beat 360ms var(--ease-out); }
@keyframes badge-beat { 45% { transform: scale(1.35); } }

/* phones: the menu sits at the bottom, under the thumb, always in the same place */
@media (max-width: 899px) {
  .menu { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; border-bottom: 0; border-top: 1px solid var(--line);
          padding-bottom: env(safe-area-inset-bottom, 0px); box-shadow: 0 -4px 12px rgba(60,40,20,.06); }
  .menu a { border-bottom: 0; border-top: 3px solid transparent; padding-top: 7px; }
  .menu a.on { border-top-color: var(--cta); }
  body.with-menu main { padding-bottom: calc(var(--menu-h) + 90px + env(safe-area-inset-bottom, 0px)); }
  /* no top bar on phones (spec 003 FR-D11): the page title comes first, below the notch */
  .bar { display: none; }
  main { padding-top: max(16px, env(safe-area-inset-top, 0px)); }
}
body.with-menu main { padding-bottom: 96px; }

/* the round "+" (Programare nouă), always bottom right (spec 003 FR-D13) */
.fab { position: fixed; z-index: 4; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px));
       width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
       background: var(--cta); color: #fff; font-size: 30px; font-weight: 300; line-height: 1; text-decoration: none;
       box-shadow: 0 8px 20px rgba(122,62,92,.3); }
@media (max-width: 899px) { .fab { bottom: calc(var(--menu-h) + 14px + env(safe-area-inset-bottom, 0px)); } }

/* messages */
.msg { border-radius: var(--radius); padding: 10px 12px; margin: 0 0 12px; font-size: 14px; }
.msg.ok { background: #e4efe3; color: #2f5e3a; }
.msg.error { background: #fbe6dc; color: #9a3412; }
.msg.warn { background: #f6ead2; color: #7a5216; }
/* a booking saved (spec 006 FR-M06): the tick draws itself, the new box rises in once */
.msg.saved { display: flex; align-items: center; gap: 8px; }
.msg .tick { flex: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
             stroke-dasharray: 22; stroke-dashoffset: 0; animation: tick-draw 400ms var(--ease-out) 120ms both; }
@keyframes tick-draw { from { stroke-dashoffset: 22; } }
.ap.fresh { animation: fresh-in 320ms var(--ease-out) both; }
@keyframes fresh-in { from { opacity: 0; transform: translateY(8px); } }

/* cards, forms, buttons */
.card { background: var(--surface); border: 0; border-radius: var(--radius-card); box-shadow: var(--shadow); padding: 16px; margin-bottom: 10px; }
.card > h2:first-of-type { margin-top: 2px; }
.nowrap { white-space: nowrap; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 8px 0 4px; }
input[type=text], input[type=tel], input[type=search], input[type=password], input[type=time], input[type=date], input[type=number], select, textarea {
  width: 100%; font: 16px var(--font); color: var(--text); background: var(--surface);
  border: 1px solid #968779; border-radius: var(--radius); padding: 10px 12px; min-height: 44px;  /* 3:1 on card and page (A11Y-2) */
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px #7a3e5c26; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--text); margin: 4px 14px 4px 0; min-height: 44px; }
.check input { width: 20px; height: 20px; }
.btn { display: inline-block; border: 0; border-radius: var(--radius); padding: 11px 18px; min-height: 44px; font: 600 15px var(--font); cursor: pointer; text-decoration: none; }
.btn-cta { background: var(--cta); color: #fff; }
.btn-sec { background: transparent; color: var(--primary); border: 1.5px solid var(--line); padding: 9.5px 16.5px; }
.btn-block { display: block; width: 100%; }
a.btn-block { text-align: center; }  /* a link as a full-width button (spec 007), centred like a <button> */
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1 1 140px; }
.row > .btn { flex: 0 0 auto; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* tables */
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
th { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }

/* operator colors */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--op); vertical-align: middle; }
.swatch { display: inline-block; width: 26px; height: 26px; border-radius: 6px; background: var(--op); vertical-align: middle; }
.colors { display: flex; flex-wrap: wrap; gap: 6px; }
.colors label { margin: 0; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.colors input { width: 18px; height: 18px; }

/* calendar */
.daynav { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.daynav .btn { padding: 8px 14px; }
.daynav strong { flex: 1; text-align: center; }
.month { background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow); padding: 8px 10px 10px; margin-bottom: 18px; max-width: 520px; }
.month-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.month-head .btn { width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; font-size: 22px; color: var(--muted); }
.month-head strong { flex: 1; text-align: center; font: 600 17px var(--font-head); }
.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.month-grid .wd { font-size: 13px; font-weight: 700; color: var(--muted); padding: 2px 0; }
.mday { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 44px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--text); text-decoration: none; }
.mday.today { color: var(--primary); font-weight: 700; }
.mday.sel { background: var(--primary); color: var(--on-primary); }
.mday i { display: flex; gap: 2px; height: 5px; margin-top: 3px; }
.mday i b { width: 5px; height: 5px; border-radius: 50%; background: var(--cta); }
.mday.sel i b { background: var(--on-primary); }
.day-title { margin: 0 0 10px; }
.tabs { display: flex; gap: 8px; overflow-x: auto; margin: 0 0 12px; padding-bottom: 2px; }
.tabs a { white-space: nowrap; border: 0; background: transparent; border-radius: 999px; padding: 10px 14px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.tabs a.on { background: var(--text); color: var(--bg); }
.cal { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
@media (max-width: 899px) { .cal .sec { display: none; } .cal .sec.on { display: block; } }
@media (min-width: 900px) { .tabs { display: none; } .cal .sec { min-width: 0; } }
.sec { min-width: 280px; flex: 1; background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow); }
.sec h3 { font-size: 13px; letter-spacing: .06em; text-align: center; margin: 0; padding: 12px 0 8px; color: var(--muted); }
.grid { display: grid; grid-template-columns: 46px 1fr 1fr; border-top: 1px solid var(--line); }
.shift { padding: 8px 4px; text-align: center; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); }
.shift b { display: block; color: var(--text); font-size: 14px; margin-top: 2px; }
.times { position: relative; }
.times span { position: absolute; right: 4px; font-size: 13px; color: var(--muted); margin-top: 2px; }
.lane { position: relative; border-left: 1px solid var(--line); background: repeating-linear-gradient(to bottom, transparent 0 44px, var(--line) 44px 45px); }
.free, .ap, .blk { position: absolute; left: 3px; right: 3px; border-radius: 8px; }
.free { display: flex; align-items: center; justify-content: center; color: #968779; font-size: 18px; text-decoration: none; border: 1.5px dashed transparent; }
.free:active { border-color: var(--primary); }
.free:focus-visible { color: var(--primary); background: #7a3e5c0d; }
.ap { z-index: 1; overflow: hidden; padding: 3px 6px; font-size: 13px; line-height: 1.25; color: var(--text); text-decoration: none; background: color-mix(in srgb, var(--op) 16%, var(--surface)); border-left: 3px solid var(--op); }
.ap b, .ap small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap small { color: var(--muted); }
.ap.noshow { background: color-mix(in srgb, var(--op) 6%, var(--surface)); }
.ap.noshow b { text-decoration: line-through; }
/* the day (spec 023): a gap says "+ liber 14:30" once, the gold line of now, past bookings paler, a not-ticked one
   with an orange dot, the one going on now with a thin gold frame; one column per person, as in Zen (spec 025) */
.cal .grid { grid-template-columns: 46px minmax(0, 1fr) minmax(0, 1fr); }
.cal .sec.one .grid { grid-template-columns: 46px minmax(0, 1fr); }
.cal .shift { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; }
.cal .shift b { display: flex; align-items: center; gap: 7px; min-width: 0; margin: 0; font-family: var(--head-font, inherit); }
.cal .shift b span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal .shift .dot { flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--op) 22%, transparent); }
.cal .shift small { font-size: 11px; color: var(--muted); white-space: nowrap; }
.lane .out { position: absolute; left: 0; right: 0; pointer-events: none; background: repeating-linear-gradient(135deg, var(--hatch, rgba(122,62,92,.1)) 0 1.5px, transparent 1.5px 10px); }
body.dark .lane .out { --hatch: rgba(255,255,255,.1); }
.cal .free.first { align-items: flex-start; justify-content: flex-start; padding: 4px 8px; font: 500 13px var(--font); color: #86672a; }
.now-line { position: absolute; left: 0; right: 0; height: 2px; margin-top: -1px; background: #c49a3a; pointer-events: none; }  /* under the bookings */
.now-tag { position: absolute; right: 2px; z-index: 4; transform: translateY(-50%); font: 600 11px var(--font); color: #fff; background: #c49a3a;
  border-radius: 999px; padding: 1px 5px; }
/* back-to-back bookings stay two boxes: a 3 px gap of background on top, inside the box, so its size and time do not change (spec 025) */
.ap { border-top: 3px solid transparent; background-clip: padding-box; }
.cal .ap.past:not(.open) { opacity: .6; }
.cal .ap.live { box-shadow: inset 0 0 0 1.5px #c49a3a; }
.ask-dot { position: absolute; right: 6px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: #e08a1e; }
.wk .ask-dot { display: none; }
/* buttons on an appointment, shown after one tap (spec 002 FR-R05) */
.ap { cursor: pointer; }
.ap-bar { display: none; }
.ap.open { overflow: visible; z-index: 6; box-shadow: 0 0 0 2px var(--op); }
.ap.open .ap-bar { display: flex; flex-wrap: wrap; gap: 6px; position: absolute; top: calc(100% + 4px); left: -2px; width: 228px;
                   padding: 8px; background: var(--surface); border-radius: 14px; box-shadow: 0 10px 24px rgba(60,40,20,.18); cursor: default; }
.lane:last-child .ap.open .ap-bar { left: auto; right: -2px; }
.ap-bar button { min-width: 44px; height: 44px; padding: 0 8px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface);
                 font: 600 15px var(--font); color: var(--text); cursor: pointer; }
.ap-bar button.yes.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.ap-bar button.no.on { background: var(--danger); border-color: var(--danger); color: #fff; }
.ap-bar a { flex-basis: 100%; display: flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 600; padding: 0 2px; }
/* the note on an appointment (spec 004 FR-Z14): a small pencil on the box, the text in the bar */
.ap-note-mark { font-weight: 400; }
.ap-bar .ap-note { flex-basis: 100%; margin: 0 0 2px; font-size: 13px; color: var(--text); white-space: pre-line; overflow-wrap: anywhere; }
.came-mark { color: var(--ok); }
.ap[data-drag] { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.ap.dragging { z-index: 7; opacity: .92; box-shadow: 0 10px 24px rgba(60,40,20,.28); cursor: grabbing; }
.ap-grip { position: absolute; left: 0; right: 0; bottom: 0; height: min(24px, 50%); cursor: ns-resize; touch-action: none; z-index: 2; }
.ap-grip::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 28px; height: 4px; margin-left: -14px; border-radius: 2px; background: var(--op); opacity: .45; }
.ap.resizing { z-index: 7; box-shadow: 0 6px 18px rgba(60,40,20,.22); }
.drag-time { position: absolute; top: 2px; right: 4px; background: var(--primary); color: #fff; font-size: 13px; font-weight: 700; border-radius: 6px; padding: 1px 6px; }
.cal:has(.ap.open) { padding-bottom: 90px; }
.blk { z-index: 1; overflow: hidden; padding: 3px 5px; font-size: 13px; color: var(--muted); background: repeating-linear-gradient(45deg, var(--line) 0 4px, var(--surface) 4px 8px); }
.blk form { margin: 0; }
/* week of one person (spec 004 FR-Z16): three days on a phone, swipe sideways; all seven on a laptop */
.wk-pick { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 4px 12px; margin-bottom: 10px; max-width: 520px; }
.wk-pick .dot { width: 14px; height: 14px; flex: none; }
.wk-pick select { flex: 1; min-width: 0; border: 0; background: transparent; font: 600 16px var(--font); color: var(--text); min-height: 44px; }
.wk { display: flex; background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow); }
.wk-times { flex: 0 0 46px; }
.wk-days { flex: 1; min-width: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; }
.wk-day { flex: 0 0 33.333%; scroll-snap-align: start; }
@media (min-width: 900px) { .wk-day { flex: 1 0 0; min-width: 0; } }
.wk-head { display: block; height: 52px; padding: 8px 2px; text-align: center; font-size: 14px; font-weight: 600; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line); }
.wk-head small { display: block; font-size: 13px; font-weight: 400; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-head.today { color: var(--primary); }
.wk-off .lane { background: repeating-linear-gradient(135deg, var(--line) 0 2px, transparent 2px 10px); }
.wk:has(.ap.open) { padding-bottom: 90px; }
.wk .ap.open .ap-bar { left: -2px; right: -2px; width: auto; min-width: 100px; }
button.link { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; text-decoration: underline; cursor: pointer; }
.hint { font-size: 13px; color: var(--muted); text-align: center; margin: 4px 0 12px; }
details.card summary { cursor: pointer; min-height: 32px; }

/* booking screen: choices as chips (MASTER.md) */
.book { max-width: 640px; }
.lbl { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 16px 0 6px; }
.sublbl { font-size: 13px; color: var(--muted); margin: 6px 0 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { position: relative; display: inline-flex; align-items: center; border: 1.5px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 9px 12px; min-height: 44px; font-size: 14px; font-weight: 500; color: var(--text); margin: 0; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked) { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.chip:has(input:focus-visible) { outline: 3px solid var(--primary); outline-offset: 2px; }
.save { margin-top: 20px; }

.future { color: var(--primary); font-weight: 600; font-size: 13px; margin: 6px 0; }
.next { margin-top: 16px; }
.hint-left { font-size: 13px; margin-top: 14px; }
.summary div { padding: 4px 0; font-size: 15px; }
.duration { display: flex; align-items: center; gap: 8px; margin: 10px 0 14px; flex-wrap: wrap; }
.duration span { font-size: 13px; font-weight: 600; color: var(--muted); }
.duration .btn { padding: 8px 12px; }
.duration b { min-width: 76px; text-align: center; font-size: 16px; }

/* call log (spec 003 FR-D07–FR-D10): one row per call, quiet icons, one main button */
.call-head { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.call-actions { margin: 10px 0 4px; }
.card.call { padding: 12px 14px; }
.call .call-head { gap: 12px; align-items: flex-start; }
.av { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft);
      color: var(--primary); font-size: 15px; font-weight: 600; text-decoration: none; }
.call .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.who-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.who-top .tag { flex: none; }
.who-name { color: var(--text); font-size: 17px; font-weight: 600; line-height: 1.3; text-decoration: none; overflow-wrap: anywhere; }
.call-line { color: var(--muted); font-size: 14px; }
.call.missed .call-line { color: var(--danger); }
.call.missed .call-line::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--danger);
                                  margin-right: 6px; vertical-align: 1px; }
/* spec 011: "Pierdute" apart from "Răspunse azi", with the talk time (sketch schite/apeluri-pierdute-raspunse.html) */
.calls-head .n { color: var(--muted); font: 600 15px var(--font); margin-left: 4px; }
.calls-head.has-missed .n { color: var(--danger); }
.calls-head .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); margin-right: 8px; vertical-align: 3px; }
#calls .calls-head:not(:first-child) { margin-top: 28px; }
.talk { flex: none; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.call .who-top { flex-wrap: wrap; justify-content: flex-start; column-gap: 10px; }
.call .who-top .call-more { margin-left: auto; }
.ic { width: 44px; height: 44px; border: 0; border-radius: 50%; padding: 0; display: grid; place-items: center; background: transparent;
      color: var(--muted); cursor: pointer; list-style: none; }
.ic::-webkit-details-marker { display: none; }
.ic svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ic.off { color: #cdbfb1; }
.ic-why { position: relative; }
.ic-why small { position: absolute; left: 0; top: calc(100% + 2px); z-index: 3; width: max-content; max-width: 220px; padding: 6px 10px;
                border-radius: 10px; background: var(--surface); box-shadow: 0 6px 18px rgba(60,40,20,.14); font-size: 13px; color: var(--muted); }
/* the buttons under a call (spec 005 variant B): talk to the person, then the statuses, then book */
.acts-round { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 10px 0 8px; }
.round { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 64px; padding: 2px 0; border: 0; background: none;
         font: 600 13px var(--font); color: var(--text); text-decoration: none; cursor: pointer; list-style: none; }
.round::-webkit-details-marker { display: none; }
.ico { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--c, var(--muted));
       background: color-mix(in srgb, var(--c, var(--muted)) 15%, #fff); }
.ico svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.round.off { color: var(--muted); }
.round.off .ico { color: #cdbfb1; background: var(--bg); }
.states { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.states form { margin: 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 4px 12px 4px 5px; border: 1.5px solid var(--line); border-radius: 999px;
        background: var(--surface); font: 600 14px var(--font); color: var(--text); cursor: pointer; list-style: none; }
.pill::-webkit-details-marker { display: none; }
.pill .ico { width: 30px; height: 30px; }
.pill .ico svg { width: 17px; height: 17px; }
.reasons-wrap[open] { flex-basis: 100%; }
.reasons-wrap[open] > .pill { border-color: var(--c-none); }
.reasons, .reasons-other { margin-top: 8px; }
.reasons { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 10px 0; border-radius: 12px 12px 0 0; background: var(--bg); }
.reasons p { flex-basis: 100%; margin: 0 0 2px; font-size: 13px; font-weight: 600; color: var(--muted); }
.reasons-other { margin-top: 0; padding: 6px 10px 10px; border-radius: 0 0 12px 12px; background: var(--bg); }
.reasons-other > summary { list-style: none; display: inline-flex; }
.reasons-other > summary::-webkit-details-marker { display: none; }
.other-row { display: flex; gap: 6px; margin-top: 8px; }
.other-row input { flex: 1; min-width: 0; }
.go { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; margin-top: 10px; border-radius: var(--radius);
      background: var(--cta); color: #fff; font: 700 15px var(--font); text-decoration: none; }
.go svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.go.see { background: var(--c-see); }
.round, .pill, .reasons .chip, .reasons-other > summary { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
/* "Apel marcat … Anulează" (spec 005 FR-C08): above the menu and the "A sunat" window */
#undo:empty { display: none; }
.undo-bar { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); max-width: 480px; margin: 0 auto; z-index: 11;
            display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 16px; border-radius: 14px; background: var(--text); color: #fff; font-size: 14px;
            box-shadow: 0 12px 32px rgba(60,40,20,.28); animation: undo-in 240ms var(--ease-out); }
.undo-bar span { flex: 1; }
.undo-bar form { margin: 0; }
.undo-bar button { min-height: 44px; padding: 0 12px; border: 0; background: none; color: #f3c7da; font: 700 15px var(--font); cursor: pointer; }
@media (max-width: 899px) { .undo-bar { bottom: calc(var(--menu-h) + 10px + env(safe-area-inset-bottom, 0px)); } }
@keyframes undo-in { from { transform: translateY(24px); opacity: 0; } }
.undo-bar .undo-x { min-width: 44px; color: #fff; font-size: 18px; }
/* "A sunat" sits above the "Anulează" bar while both show (spec 009, FE-B15) */
body:has(#undo .undo-bar) .popup { bottom: calc(12px + 64px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 899px) { body:has(#undo .undo-bar) .popup { bottom: calc(var(--menu-h) + 10px + 64px + env(safe-area-inset-bottom, 0px)); } }
/* "Salvează fișa" stays in reach while the card scrolls (spec 008 FR-A20); above the menu on a phone page */
.card-foot { position: sticky; bottom: 0; z-index: 2; margin: 16px 0; padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px));
             background: linear-gradient(rgba(248,245,240,0), var(--bg) 30%); }
@media (max-width: 899px) { body:not(.panel-open) .card-foot { bottom: var(--menu-h); padding-right: 64px; } }  /* room for the round "+" */
/* a save that failed (spec 008 FR-A01): the undo bar's place, in red, above the panel too */
#errbar { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); max-width: 480px; margin: 0 auto; z-index: 22;
          display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 16px; border-radius: 14px; background: var(--danger); color: #fff; font-size: 14px;
          box-shadow: 0 12px 32px rgba(60,40,20,.28); animation: undo-in 240ms var(--ease-out); }
#errbar[hidden] { display: none; }
[data-edit-only][hidden] { display: none; }  /* "Activ" only when editing: .check would show it anyway */
#errbar span { flex: 1; }
#errbar span::before { content: "⚠ "; }
#errbar.ok { background: var(--ok); }  /* a success copied from the messages (spec 009 FR-B03); 4.9:1 with white */
#errbar.ok span::before { content: "✓ "; }
#errbar button { min-width: 44px; min-height: 44px; border: 0; background: none; color: #fff; font: 700 18px var(--font); cursor: pointer; }
@media (max-width: 899px) { #errbar { bottom: calc(var(--menu-h) + 10px + env(safe-area-inset-bottom, 0px)); } }
.reopen { min-height: 44px; border-radius: 999px; }
.person.off, .sub-card.off, .phone-card.off { background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
/* a marked call slides away (FR-C14): transform and opacity only, so reduced motion keeps just the fade */
.card.call { transition: transform 200ms var(--ease-out), opacity 200ms var(--ease-out); }
.card.call.out { transform: translateY(16px); opacity: 0; }
.compose-foot { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin: 4px 0 12px; }
.tag { font-size: 13px; font-weight: 600; border-radius: 999px; padding: 2px 9px; background: var(--bg); color: var(--muted); white-space: nowrap; }
.tag-new { background: transparent; padding: 2px 0; }
.tag-booked { background: #e4efe3; color: #2f5e3a; }
.tag-cancelled, .tag-no_show { background: #fbe6dc; color: #9a3412; }
.btn-sec.danger { color: var(--danger); }

/* SMS */
a.chip { text-decoration: none; }
.chip.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.filters { margin-bottom: 12px; }
.sms-text { font-size: 13px; background: var(--bg); border-radius: 10px; padding: 8px; margin: 8px 0; }
.tag-sms-sent { background: #e4efe3; color: #2f5e3a; }
.tag-sms-failed, .tag-sms-unconfirmed { background: #fbe6dc; color: #9a3412; }
.tag-sms-cancelled { background: var(--bg); color: var(--muted); }
/* SMS page (spec 002 US6) */
@media (min-width: 900px) { .tabs.keep { display: flex; } }
/* small things keep their drawing; an invisible band 44 px high is what the finger hits (spec 009 A11Y-17) */
.tag-checks span, .pick-person, .insert-btns .btn { position: relative; }
.tag-checks span::after, .pick-person::after, .insert-btns .btn::after, .switch::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* "A sunat" window (FR-018b) */
.popup { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); max-width: 480px; margin: 0 auto; z-index: 10; background: var(--surface); border-radius: var(--radius-card); padding: 16px; box-shadow: 0 12px 32px rgba(60,40,20,.22); }
.popup { transition: opacity 250ms var(--ease-out), transform 250ms var(--ease-out); }
@starting-style { .popup { opacity: 0; transform: translateY(12px); } }
.popup b { font-size: 17px; }
@media (max-width: 899px) { .popup { bottom: calc(var(--menu-h) + 10px + env(safe-area-inset-bottom, 0px)); } }
.popup .row { margin-top: 12px; }
/* the window's buttons are those of the call (spec 005 FR-C11); ✕ in the corner only closes it */
.popup { padding-right: 52px; max-height: calc(100dvh - var(--menu-h) - 40px - env(safe-area-inset-bottom, 0px)); overflow-y: auto; overscroll-behavior: contain; }
.popup .acts-round, .popup .states, .popup .go { margin-right: -36px; }
.popup-x { position: absolute; top: 6px; right: 6px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--muted);
           font-size: 18px; cursor: pointer; touch-action: manipulation; }
.popup-x:active { transform: scale(.97); }
/* the phone rings once when the window comes (spec 006 FR-M07); a poll with no change does not redraw it */
.popup .ring { width: 22px; height: 22px; margin-right: 8px; vertical-align: -4px; fill: none; stroke: var(--primary); stroke-width: 1.9;
               stroke-linecap: round; stroke-linejoin: round; transform-origin: 50% 20%; animation: ring 600ms ease-in-out 250ms; }
@keyframes ring { 20% { transform: rotate(-12deg); } 40% { transform: rotate(12deg); } 60% { transform: rotate(-8deg); } 80% { transform: rotate(8deg); } }

/* setup steps on /setari */
.steps { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.step-link { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; text-decoration: none; color: var(--text); min-height: 64px; }
.step-link .tick { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; border: 2px solid var(--line); color: var(--muted); }
.step-link.done .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.step-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.step-text .muted { font-size: 13px; }
.chev { color: var(--muted); font-size: 22px; }

/* clients */
.client-row { display: flex; justify-content: space-between; gap: 8px; text-decoration: none; color: var(--text); }
.visit { font-size: 14px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.sub { font-size: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sub form { margin: 4px 0 0; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.gallery img, .gallery video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--bg); display: block; }
.media-missing { aspect-ratio: 1; border-radius: 10px; background: var(--bg); display: flex; align-items: center; justify-content: center; text-align: center; padding: 6px; font-size: 12px; color: var(--muted); }
.upload { margin-top: 10px; }
.upload input[type=file] { font-size: 14px; margin: 4px 0 8px; max-width: 100%; }
.danger-zone { margin-top: 24px; }

/* login */
.login { max-width: 360px; margin: 40px auto; }
.login-brand { font: 600 30px/1.15 var(--font-head); text-align: center; margin: 32px 0 -16px; }
@media (min-width: 900px) { .login-brand { display: none; } }
/* the login silk (spec 006): plum gradient first, the canvas draws the moving silk over it */
body.login-page { background: radial-gradient(120% 90% at 78% 30%, #8a3f5e 0%, #5c2a43 38%, #2e0d1d 100%) fixed; }
.login-page .bar { display: none; }
.login-page .login-brand, .login-page .login, .login-page #msgs { position: relative; z-index: 1; }  /* above the canvas */
#silk { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
.login-page .login-brand { display: block; color: #fbf3ec; text-shadow: 0 2px 16px rgba(40, 10, 25, .45); }
.login-page .login.card { background: rgba(255, 253, 250, .95); box-shadow: 0 1px 2px rgba(60, 40, 20, .08), 0 18px 48px rgba(40, 10, 25, .3); }
.login-links { display: grid; gap: 6px; margin: 14px 0 0; font-size: 15px; }
/* grey see-through window with white text (spec 002): "?" help, after-save note, confirmations */
dialog.grey { border: 0; border-radius: 16px; padding: 20px; width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 48px);
              overflow-y: auto; background: rgba(59, 50, 44, .94); color: #fff; box-shadow: 0 18px 40px rgba(0,0,0,.3); }
dialog.grey::backdrop { background: rgba(42, 33, 28, .35); }
dialog.grey h2 { color: #fff; margin: 0 0 10px; }
dialog.grey p { margin: 0 0 10px; }
dialog.grey a { color: #fff; }
dialog.grey .btn-sec { color: #fff; border-color: #fff; }
dialog.grey label, dialog.grey legend { color: #fff; }
dialog.grey .actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 16px; }
/* (spec 003 FR-D25) the second transition line is for browsers that can also animate the closing */
dialog.grey { transition: opacity 150ms var(--ease-out), transform 150ms var(--ease-out);
              transition: opacity 150ms var(--ease-out), transform 150ms var(--ease-out), overlay 150ms allow-discrete, display 150ms allow-discrete; }
dialog.grey:not([open]) { opacity: 0; transform: scale(.96); }
dialog.grey[open] { transition-duration: 200ms; }
dialog.grey::backdrop { transition: opacity 200ms var(--ease-out);
                        transition: opacity 200ms var(--ease-out), overlay 200ms allow-discrete, display 200ms allow-discrete; }
dialog.grey:not([open])::backdrop { opacity: 0; }
@starting-style { dialog.grey[open] { opacity: 0; transform: scale(.96); } dialog.grey[open]::backdrop { opacity: 0; } }

/* a row to pick in the booking window: a caller of today, a client found, a client on the number */
.pick { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; min-height: 48px; margin: 0 0 6px; padding: 8px 12px;
        background: var(--surface); box-shadow: var(--shadow); border: 1px solid transparent; border-radius: var(--radius); font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.pick.off { color: var(--muted); background: transparent; box-shadow: none; border: 1px dashed var(--line); cursor: default; }
.pick .muted { font-size: 13px; }
a.pick { text-decoration: none; }
.free-row span { font-size: 15px; }
/* spec 026: the row itself is not a link any more; its two buttons say what happens */
.pick.free-row { cursor: default; gap: 2px; }
.free-acts { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; margin-top: 8px; }
.free-acts .btn { flex: 1 1 140px; text-align: center; }

/* the client card sliding in from the right (spec 002 FR-R16): whole screen on a phone, right half on a laptop */
.panel-dim { position: fixed; inset: 0; z-index: 20; background: rgba(42, 33, 28, .35); opacity: 0; pointer-events: none; transition: opacity 200ms var(--ease-out); }
.panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 21; width: 100%; background: var(--bg); overflow-y: auto;
         overscroll-behavior: contain; transform: translateX(100%); visibility: hidden;
         transition: transform 200ms var(--ease-out), visibility 0s linear 200ms;
         padding: 0 max(16px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.panel-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: flex-end; padding: 8px 0; background: var(--bg); }
.panel-x { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--surface); color: var(--text); font-size: 20px; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
body.panel-open { overflow: hidden; }
body.panel-open .panel { transform: none; visibility: visible; transition: transform 300ms var(--ease-drawer), visibility 0s; }
body.panel-open .panel-dim { opacity: 1; pointer-events: auto; transition-duration: 300ms; }
@media (min-width: 900px) { .panel { width: 50%; box-shadow: -10px 0 30px rgba(0,0,0,.12); } }

/* the client held after "Programează" (spec 004 FR-Z11): stays on top while the calendar scrolls */
.hold-band { position: sticky; top: 8px; z-index: 6; display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 6px 6px 6px 14px;
             border-radius: var(--radius); background: var(--accent-soft); color: var(--primary); box-shadow: var(--shadow); }
.hold-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 15px; }
.hold-text > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hold-text small { color: var(--muted); font-size: 13px; }
.hold-band form { margin: 0; }
a.hold-text { color: inherit; text-decoration: none; }  /* outside the calendar the band leads back to it (spec 009 FR-B13) */
a.hold-text small { text-decoration: underline; }
button[aria-busy="true"] { opacity: .55; cursor: progress; }  /* a save on the way (spec 009 FR-B06) */
.hold-x { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--surface); color: var(--text); font-size: 18px; cursor: pointer; }

/* the booking window (spec 004 FR-Z01): in the panel above, variant A of schite/programare-zen.html */
.win-title { margin-bottom: 2px; }
.win-sub { margin: 0 0 12px; font-size: 14px; }
.win .lbl { margin-top: 18px; }
.w-who { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px 12px; }
.w-who-name { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.w-who-name b { overflow-wrap: anywhere; }  /* the whole name, on two lines if needed (2026-10-20) */
.w-who-name small { font-size: 13px; }
.w-who .link { min-height: 44px; font-weight: 600; text-decoration: none; }
.w-past { font-size: 13px; margin: 6px 0; }
.w-new { margin-top: 10px; }
.same-number { margin: 10px 0; padding: 10px 12px; border-radius: var(--radius); background: #f6ead2; color: #7a5216; }
.same-number b { display: block; margin-bottom: 4px; }
.same-number .check { display: flex; margin: 2px 0; min-height: 40px; color: var(--text); }
.w-new summary, .w-cat summary { display: flex; justify-content: space-between; align-items: center; min-height: 48px; cursor: pointer; list-style: none; font-weight: 600; }
.w-new summary { color: var(--primary); }
.w-new summary::-webkit-details-marker, .w-cat summary::-webkit-details-marker { display: none; }
.w-cat { border-bottom: 1px solid var(--line); }
.w-fold { margin-top: 10px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.w-fold summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 48px; cursor: pointer; list-style: none; font-weight: 600; }
.w-fold summary::-webkit-details-marker { display: none; }
.w-fold summary .muted { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.w-fold textarea { margin-bottom: 12px; }
.w-tick { display: flex; margin: 0 0 6px; min-height: 40px; }
.w-tick input { width: 22px; height: 22px; accent-color: var(--primary); }
.w-tick small { margin-left: 4px; }
.w-fold > .w-tick:last-child { margin-bottom: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.w-cat summary span:first-child { font-weight: 500; }
.chip small, .w-svc small { color: var(--muted); font-size: 13px; font-weight: 400; margin-left: 4px; }
.chip:has(input:checked) small { color: var(--accent-soft); }
.chip small { white-space: nowrap; }  /* a long service name wraps; its minutes and price stay on one line */
.w-cat summary { gap: 10px; }
.w-cat summary .muted { flex: none; white-space: nowrap; }
.w-svc { display: flex; align-items: center; gap: 10px; min-height: 48px; margin: 0; padding: 4px 2px; color: var(--text); font-size: 15px; font-weight: 400; cursor: pointer; }
.w-svc input { width: 22px; height: 22px; flex: none; accent-color: var(--primary); }
.w-svc span { flex: 1; }
/* the booking's own page (decided 2026-11-22): the chosen services on top, each with ✕ to take it out */
.chips.chosen { margin-bottom: 2px; }
.chosen-chip { background: var(--accent-soft); border-color: transparent; color: var(--primary); font-weight: 600; }
.chosen-chip span { margin-left: 6px; font-weight: 400; opacity: .75; }
/* the booking's own page (decided 2026-11-22, variant C of schite/programare-jos.html): when it is, big and plain;
   "Mută în altă zi sau oră" opens one window with pills for the day, the length and the free hours */
.when-card .lbl { margin-top: 0; }
.when-big { margin: 0; font: 700 24px/1.2 var(--font-head); }
.when-sub { margin: 2px 0 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.when-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 56px; text-align: left;
  font: inherit; color: var(--text); cursor: pointer; border: 0; }
.when-row b, .when-row small { display: block; }
.when-row small { font-size: 13px; }
dialog.move-sheet { max-height: 92dvh; overflow: auto; overscroll-behavior: contain; }
dialog.move-sheet .lbl { margin: 14px 0 6px; }
.move-svc { margin-top: 0; }
.move-svc .chips.chosen { margin-top: 2px; }
label.w-pill { position: relative; display: inline-flex; align-items: center; justify-content: center; margin: 0; }
label.w-pill input { position: absolute; opacity: 0; pointer-events: none; }
label.w-pill:has(input:checked) { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
label.w-pill:has(input:focus-visible) { outline: 3px solid var(--primary); outline-offset: 2px; }
.w-pills.wrap { flex-wrap: wrap; overflow: visible; }
.move-day { flex-direction: column; min-width: 58px; padding: 6px 10px; border-radius: 16px; line-height: 1.15; }
.move-day small { font-size: 11px; color: var(--muted); }
.move-day:has(input:checked) small { color: inherit; opacity: .85; }
.move-day b { font: 600 17px var(--font-head); }
.move-more { color: var(--primary); font-weight: 600; }
#slots + .move-more { margin-top: 8px; }
.move-other { margin-top: 8px; max-width: 220px; }
.move-pick { position: relative; }
label.w-pill.move-pick input { pointer-events: auto; position: absolute; inset: 0; z-index: 1; opacity: 0; width: 100%; height: 100%; }  /* on top: on iPhone the tap itself opens the calendar */
.move-pick.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.move-who { display: flex; align-items: center; gap: 6px; margin: 4px 0 6px; font-size: 13px; color: var(--muted); }
.move-sms { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; margin-top: 14px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.move-sms .w-row-text b, .move-sms .w-row-text small { display: block; }
.move-save { display: grid; line-height: 1.25; padding-top: 6px; padding-bottom: 6px; }
.move-save small { font-weight: 400; font-size: 12px; opacity: .85; }
dialog.move-sheet .hours-foot { position: sticky; bottom: 0; background: #fffaf7; padding-top: 10px; margin-top: 12px; }
@media (min-width: 900px) { dialog.move-sheet { width: min(560px, calc(100vw - 32px)); } }
.w-total { margin-top: 16px; padding: 12px 14px; border-radius: var(--radius); background: var(--accent-soft); color: var(--primary); font-weight: 600; }
/* "Cât durează" (spec 016, variant A of schite/fereastra-jos.html): one row of pills, scrolled
   sideways when it does not fit; the chosen one is plum like a chosen chip */
.w-pills { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -2px; padding: 2px; }
.w-pills::-webkit-scrollbar { display: none; }
.w-pill { flex: none; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface);
          color: var(--text); font: inherit; font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; cursor: pointer; }
.w-pill[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.w-pill:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.w-span { margin: 12px 0 0; font-size: 20px; font-variant-numeric: tabular-nums; }
.w-span b { font-weight: 600; }
.w-span small { font-size: 14px; margin-left: 6px; }
/* SMS and Notiță on one card, each an icon, a title and its state under it */
.w-rows { margin-top: 16px; background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow); padding: 0 14px; }
.w-rows .w-fold { margin: 0; border: 0; }
.w-rows > * + * { border-top: 1px solid var(--line); }  /* #w-sms, then Notiță */
.w-rows .w-fold summary, .w-fixed { min-height: 60px; gap: 12px; }
.w-fixed { display: flex; align-items: center; margin: 0; }
.w-ico { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--primary); }
.w-ico svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.w-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.w-row-text b { font-weight: 600; }
.w-row-text small { font-size: 14px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-save small { display: block; font-size: 13px; font-weight: 400; opacity: .9; font-variant-numeric: tabular-nums; }
.w-ask { margin-top: 10px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); font-weight: 600; }
.w-ask .row { display: flex; gap: 8px; margin-top: 8px; }
.w-ask .btn { flex: 1; }
.w-foot { position: sticky; bottom: calc(-24px - env(safe-area-inset-bottom, 0px)); margin: 16px 0 0; padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px));
          background: linear-gradient(rgba(248,245,240,0), var(--bg) 30%); }

/* the sky pages (spec 014): the sky's colours come from the sun's height (set by sky.js); Tura 1 plum, Tura 2 gold */
.seg1 { --seg: #7a3e5c; --seg-hi: #a5607f; } .seg2 { --seg: #86672a; --seg-hi: #c49a3a; }
body.sky-page { --head-font: Outfit, var(--font-head); --body-font: "Work Sans", var(--font); font-family: var(--body-font); min-height: 100vh;
  background: radial-gradient(80% 60% at 10% 0%, var(--c1, #ead7e1) 0%, transparent 60%), radial-gradient(70% 55% at 92% 8%, var(--c2, #f2e3c4) 0%, transparent 58%),
    radial-gradient(90% 70% at 50% 100%, var(--c3, #f1e6ea) 0%, transparent 70%), var(--base, #fbf7f5) fixed; }
body.sky-page main h1 { font-family: var(--head-font); letter-spacing: -.02em; }
body.sky-page main { position: relative; }
.stars { position: fixed; inset: 0; pointer-events: none; opacity: var(--stars, 0); transition: opacity 800ms ease;
  background: radial-gradient(1px 1px at 12% 14%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 72% 9%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 88% 34%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 38% 6%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 55% 22%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 24% 40%, #fff 50%, transparent 51%); }
body.sky-page.dark main > .page-head h1, body.sky-page.dark main > .muted, body.sky-page.dark .sunline { color: #fdf6f0; }
.sunline { font-size: 13px; color: var(--muted); margin: -6px 0 16px; }
/* since 2026-11-22 (schite/ture-fresha-booksy.html, variant E, after Booksy): a calm note per section, a tap on it opens a
   small window with the two shifts as lists; a sheet from the bottom on a phone, a card in the middle on a laptop */
.hours-notes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; position: relative; }
.hours-note { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 140px; margin: 0; padding: 12px 12px 10px;
  border: 0; border-radius: 18px; text-align: left; font: inherit; color: var(--text); cursor: pointer; background: rgba(255,255,255,.78); box-shadow: 0 8px 22px rgba(80,30,55,.12); }
.hours-note b { font: 600 16px/1.2 var(--head-font); padding-right: 34px; }
.hours-note .pen { position: absolute; top: 9px; right: 9px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 1.5px solid rgba(122,62,92,.3); color: var(--primary); }
.hours-note .pen svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.hours-line { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hours-line i, .hours-shift legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; background: linear-gradient(135deg, var(--seg-hi), var(--seg)); }
.hours-note small { margin-top: auto; font-size: 12px; color: var(--muted); }
.hours-hint { margin: 12px 2px 0; font-size: 13px; }
body.dark .hours-note { background: rgba(104,64,86,.62); color: #f6ecdc; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
body.dark .hours-note small, body.sky-page.dark main > .hours-hint { color: #e6d6dc; }
body.dark .hours-note .pen { background: transparent; color: #f6e4ec; border-color: #f6e4ec; }
dialog.hours-sheet { border: 0; padding: 10px 16px calc(16px + env(safe-area-inset-bottom)); margin: auto auto 0; width: 100%; max-width: 100%;
  border-radius: 22px 22px 0 0; background: #fffaf7; color: var(--text); box-shadow: 0 -10px 30px rgba(0,0,0,.18); }
dialog.hours-sheet::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 5px; background: #ddd0d6; margin: 0 auto 10px; }
dialog.hours-sheet::backdrop { background: rgba(42, 33, 28, .35); }
dialog.hours-sheet h2 { font: 700 19px var(--head-font, var(--font-head)); margin: 0 0 12px; }
dialog.hours-sheet h2 small { font: 500 13px var(--body-font, var(--font)); color: var(--muted); }
.hours-shift { border: 1.5px solid #eee3e8; border-radius: 14px; padding: 8px 12px 12px; margin: 0 0 10px; min-width: 0; }
.hours-shift legend { display: flex; align-items: center; gap: 7px; width: 100%; padding: 0; float: left; margin-bottom: 8px; font-size: 15px; font-weight: 600; color: var(--text); }
.hours-len { margin-left: auto; font-size: 13px; font-weight: 500; color: var(--muted); }
.hours-times { clear: both; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.hours-times select { width: 100%; min-height: 44px; margin: 0; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hours-foot { display: flex; gap: 10px; margin-top: 4px; }
.hours-foot .btn { flex: 1; } .hours-foot .btn-cta { flex: 2; }
dialog.hours-sheet { transition: transform 220ms var(--ease-out), opacity 220ms var(--ease-out); }
dialog.hours-sheet:not([open]) { transform: translateY(24px); opacity: 0; }
@starting-style { dialog.hours-sheet[open] { transform: translateY(24px); opacity: 0; } }
@media (min-width: 900px) {
  .hours-notes { grid-template-columns: repeat(4, 1fr); }
  dialog.hours-sheet { margin: auto; width: min(440px, calc(100vw - 32px)); border-radius: 22px; padding: 18px 20px 20px; }
  dialog.hours-sheet::before { display: none; }
}

/* Calls under the sky (spec 021, variant C of schite/apeluri-cerul.html): the ring of the day on top,
   glass cards with the phone line's colour on the edge; at night the cards darken with the sky */
.calls-page #calls .card { background: rgba(255,255,255,.72); -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid rgba(255,255,255,.65); border-radius: 24px; box-shadow: 0 10px 30px rgba(122,62,92,.12); transition: background 600ms ease, color 600ms ease; }
.calls-page .calls-head, .calls-page .ring-card b, .calls-page .ring-card text { font-family: var(--head-font); letter-spacing: -.01em; }
.calls-page #calls .card.call { position: relative; overflow: hidden; padding-left: 20px; }
.calls-page #calls .card.call::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--line-c); }
.calls-page #calls .card.call::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 70px; pointer-events: none;
  background: linear-gradient(90deg, var(--line-c), transparent); opacity: .12; }
.line-name { flex: none; font-size: 13px; font-weight: 600; color: var(--line-c); }
.calls-page #calls .go:not(.see) { background: linear-gradient(135deg, #c49a3a, #86672a); }
.ring-card { display: flex; align-items: center; gap: 16px; }
.ring-card svg { width: 112px; height: 112px; flex: none; }
.ring-card .ring-track { fill: none; stroke: currentColor; stroke-opacity: .12; stroke-width: 14; }
.ring-card .ring-part { fill: none; stroke-width: 14; stroke-linecap: round; }
.ring-card text { font-size: 26px; font-weight: 700; fill: currentColor; font-variant-numeric: tabular-nums; }
.ring-card b { display: block; font-size: 22px; line-height: 1.15; }
.ring-card p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
body.calls-page.dark #calls { --text: #f6ecdc; --muted: #d9c8bf; --line: rgba(255,255,255,.34); --bg: rgba(255,255,255,.08); --surface: #5a3a4c; color: var(--text); }
body.calls-page.dark #calls .card { background: rgba(104,64,86,.55); border-color: rgba(255,255,255,.12); box-shadow: 0 10px 30px rgba(0,0,0,.3); }
body.calls-page.dark #calls .card.call .line-name { filter: brightness(1.5); }

/* Clients under the sky (spec 022, idea A of schite/clienti-cerul.html with the beads of schite/clienti-fir.html):
   glass cards, under each client a thread of the last 3 months (plum beads, a tick for today, gold for the next
   booking) that weaves itself in when the page opens; a bar on each subscription */
.clients-page #clients .card, .clients-page #clients .tabs.keep { background: rgba(255,255,255,.72); -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid rgba(255,255,255,.65); border-radius: 24px; box-shadow: 0 10px 30px rgba(122,62,92,.12); transition: background 600ms ease, color 600ms ease; }
.clients-page #clients .tabs.keep { display: flex; padding: 5px; border-radius: 999px; }
.clients-page #clients .tabs a { flex: 1; justify-content: center; }
.clients-page #clients .tabs a.on { background: #7a3e5c; color: #fff; }
.clients-page #clients h2, .clients-page .client-fir .who b, .clients-page .client-fir .sum b { font-family: var(--head-font); letter-spacing: -.01em; }
.clients-page #clients input[type=text] { border-radius: 999px; background: rgba(255,255,255,.72); padding-left: 18px; }
.client-fir { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0 12px; padding: 12px 14px 6px; margin-bottom: 8px;
  text-decoration: none; color: var(--text); }
.client-fir .av { width: 42px; height: 42px; font: 600 15px var(--head-font); color: #fff; background: linear-gradient(135deg, #a5607f, #7a3e5c); }
.client-fir .who { min-width: 0; display: flex; flex-direction: column; }
.client-fir .who b { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client-fir .who small, .client-fir .sum { font-size: 12px; color: var(--muted); }
.client-fir .sum { text-align: right; line-height: 1.25; }
.client-fir .sum b { display: block; font-size: 18px; color: var(--text); }
.thread { grid-column: 1 / -1; display: block; width: 100%; height: 40px; margin-top: 6px; overflow: visible; color: var(--text); }
.thread .str { stroke: currentColor; stroke-opacity: .18; stroke-width: 1.5; }
.thread .done { stroke: #7a3e5c; stroke-opacity: .55; stroke-width: 2; }
.thread .now { stroke: currentColor; stroke-opacity: .5; stroke-width: 3; stroke-linecap: round; }
.thread .bead { fill: #7a3e5c; stroke: #fff; stroke-width: 1.5; }
.thread .bead.next { fill: #c49a3a; }
.thread .halo { fill: #c49a3a; opacity: .25; }
.thread text { font: 500 11px var(--body-font); fill: currentColor; opacity: .7; }
.thread text.b { font-weight: 600; opacity: .95; }
.fir-head { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .thread .str, .thread .done { transform-box: fill-box; transform-origin: left; transform: scaleX(0); animation: weave 900ms cubic-bezier(.23,1,.32,1) var(--d) forwards; }
  .thread .bead { transform-box: fill-box; transform-origin: center; transform: scale(0); animation: drop 380ms cubic-bezier(.34,1.56,.64,1) calc(var(--d) + var(--k)) forwards; }
  .thread .halo.today { transform-box: fill-box; transform-origin: center; animation: today 1.8s ease-out 3; }  /* three pulses, then still: an endless one repainted the whole list (spec 025) */
  @keyframes weave { to { transform: scaleX(1); } }
  @keyframes drop { to { transform: scale(1); } }
  @keyframes today { from { transform: scale(.7); opacity: .45; } to { transform: scale(1.9); opacity: 0; } }
}
@media (min-width: 1024px) {
  .fir-head, .client-fir { display: grid; grid-template-columns: 42px minmax(180px, 1fr) minmax(320px, 2fr) 90px; gap: 16px; align-items: center; }
  .fir-head { padding: 0 16px 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
  .fir-head span:first-child { grid-column: 1 / 3; } .fir-head span:last-child { text-align: right; }
  .client-fir { padding: 10px 16px; margin-bottom: 6px; }
  .client-fir .thread { grid-column: 3; grid-row: 1; margin: 0; }
}
.sub-bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.sub-bar .sub-track { flex: 1; height: 8px; border-radius: 8px; background: rgba(122,62,92,.12); overflow: hidden; }
.sub-bar .sub-track i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #c49a3a, #86672a); }
.sub-bar.soon .sub-track i { background: linear-gradient(90deg, #e0714a, #c2410c); }
.sub-bar.soon .sub-left { color: #c2410c; font-weight: 600; }
@media (min-width: 1024px) { .client-row.sub-row .sub-bar { order: 1; } }  /* under the row, after the button */
body.clients-page.dark #clients { --text: #f6ecdc; --muted: #d9c8bf; --line: rgba(255,255,255,.34); --bg: rgba(255,255,255,.08); --surface: #5a3a4c; color: var(--text); }
body.clients-page.dark #clients .card, body.clients-page.dark #clients .tabs.keep { background: rgba(104,64,86,.55); border-color: rgba(255,255,255,.12); box-shadow: 0 10px 30px rgba(0,0,0,.3); }
body.clients-page.dark #clients input[type=text] { background: rgba(104,64,86,.55); color: var(--text); }
body.clients-page.dark .thread .bead { stroke: #4a2c3d; }
body.clients-page.dark .thread .done { stroke: #d9a3bd; }
body.clients-page.dark .thread .bead.next { filter: drop-shadow(0 0 4px rgba(253,230,138,.9)); }
body.clients-page.dark .sub-bar .sub-track { background: rgba(255,255,255,.12); }
body.clients-page.dark .sub-bar.soon .sub-left { color: #ff9a6b; }
body.clients-page.dark #clients .btn-sec { background: transparent; border-color: var(--line); color: var(--text); }
body.clients-page.dark #clients .btn-sec.danger { color: #ff9a6b; }

/* Calendar day under the sky (spec 023, schite/calendar-simplu.html): the week's days on a row, the month folded behind
   its name, sections as plain words, glass columns (the half-hour lines and the "+" stay, Ionuț: "prea gol"); at night the columns darken with the sky */
.day-page .tabs.keep { display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.6); }
.day-page .tabs.keep a { min-height: 36px; padding: 6px 14px; }
.day-page .tabs.keep a.on { background: #7a3e5c; color: #fff; }
.week-row { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 6px; }
.month-fold > summary { list-style: none; cursor: pointer; align-self: flex-start; font: 600 14px var(--body-font); color: var(--muted); padding: 6px 4px; min-height: 44px; display: inline-flex; align-items: center; }
.month-fold > summary::-webkit-details-marker { display: none; }
.month-fold > summary::after { content: "▾"; margin-left: 6px; }
.month-fold[open] > summary::after { content: "▴"; }
.month-fold .month { margin: 4px 0 8px; background: rgba(255,255,255,.72); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 10px 30px rgba(122,62,92,.12); }
.week-days { display: flex; justify-content: space-between; max-width: 520px; }
.week-days a { flex: 0 1 46px; min-height: 52px; display: grid; justify-items: center; align-content: center; border-radius: 14px; text-decoration: none; color: var(--text); }
.week-days span { font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--muted); }
.week-days b { font: 600 17px var(--head-font); }
.week-days a.sel { background: #7a3e5c; color: #fff; } .week-days a.sel span { color: #fff; opacity: .85; }
@media (min-width: 1024px) { body.with-menu .month-fold { display: none; } }  /* the month is in the left bar */
.day-page main .page-head .day-title { font: 600 17px var(--head-font); color: var(--muted); margin: 6px 0; }
.day-page nav.tabs:not(.keep) { gap: 18px; padding: 0 4px; }
.day-page nav.tabs:not(.keep) a { padding: 6px 0; min-height: 40px; border-radius: 0; background: none; color: var(--muted); font-size: 14px; }
.day-page nav.tabs:not(.keep) a.on { color: var(--text); background: none; box-shadow: inset 0 -2px #7a3e5c; }
.day-page .cal .sec { background: rgba(255,255,255,.72); -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid rgba(255,255,255,.65); border-radius: 24px; box-shadow: 0 10px 30px rgba(122,62,92,.12); transition: background 600ms ease; }
.day-page .cal .sec h3 { font-family: var(--head-font); }
.day-page .cal .grid { border-top: 0; }
.day-page .cal .times span { font-size: 11px; }
.day-page .cal .ap { border-radius: 10px; }
.day-page .cal .free.first { color: #86672a; }
body.day-page.dark main > .page-head h1 { color: #fdf6f0; }
body.day-page.dark main { --text: #f6ecdc; --muted: #d9c8bf; --line: rgba(255,255,255,.34); }
body.day-page.dark .week-days a, body.day-page.dark .day-title { color: var(--text); }
body.day-page.dark .cal { --surface: #5a3a4c; --bg: #4a2c3d; color: var(--text); }
body.day-page.dark .cal .sec, body.day-page.dark .month-fold .month { background: rgba(104,64,86,.55); border-color: rgba(255,255,255,.12); box-shadow: 0 10px 30px rgba(0,0,0,.3); }
body.day-page.dark .day-page .tabs.keep, body.day-page.dark .tabs.keep { background: rgba(104,64,86,.55); }
body.day-page.dark .cal .free.first { color: #e9c27a; }
/* the week under the same sky and glass (spec 025): one glass card for the seven days */
.day-page .wk { background: rgba(255,255,255,.72); -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid rgba(255,255,255,.65); border-radius: 24px; box-shadow: 0 10px 30px rgba(122,62,92,.12); }
.day-page .wk-pick { background: rgba(255,255,255,.6); border-radius: 22px; box-shadow: none; }
.day-page .wk-head, .day-page .daynav strong { font-family: var(--head-font); }
.day-page .wk .times span { font-size: 11px; }
.day-page .wk .ap { border-radius: 10px; }
body.day-page.dark .wk { --surface: #5a3a4c; --bg: #4a2c3d; color: var(--text); background: rgba(104,64,86,.55); border-color: rgba(255,255,255,.12); box-shadow: 0 10px 30px rgba(0,0,0,.3); }
body.day-page.dark .wk-pick { background: rgba(104,64,86,.55); }
body.day-page.dark .wk-pick select, body.day-page.dark .daynav strong { color: var(--text); }
body.day-page.dark .wk-head.today { color: #e9c27a; }
body.day-page.dark main .btn-sec { background: transparent; border-color: var(--line); color: var(--text); }

/* SMS and Settings under the sky (spec 024): the same glass as Apeluri and Clienți, done in one go for the
   presentation to Alex; at night the page tokens turn light on dark glass */
.glass-page main .card, .glass-page main .tile { background: rgba(255,255,255,.72); -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid rgba(255,255,255,.65); border-radius: 22px; box-shadow: 0 10px 30px rgba(122,62,92,.12); transition: background 600ms ease, color 600ms ease; }
.glass-page main h2, .glass-page main h3, .glass-page .tile-link b { font-family: var(--head-font); letter-spacing: -.01em; }
.glass-page main .tabs.keep { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-radius: 22px; background: rgba(255,255,255,.6); }
.glass-page main .tabs.keep a { min-height: 36px; padding: 6px 14px; }
.glass-page main .tabs.keep a.on { background: #7a3e5c; color: #fff; }
body.glass-page.dark main { --text: #f6ecdc; --muted: #d9c8bf; --line: rgba(255,255,255,.34); --surface: #5a3a4c; --bg: #4a2c3d; color: var(--text); }
body.glass-page.dark main .card, body.glass-page.dark main .tile { background: rgba(104,64,86,.55); border-color: rgba(255,255,255,.12); box-shadow: 0 10px 30px rgba(0,0,0,.3); }
body.glass-page.dark main .tabs.keep { background: rgba(104,64,86,.55); }
body.glass-page.dark main .btn-sec { background: transparent; border-color: var(--line); color: var(--text); }
body.glass-page.dark main .btn-sec.danger { color: #ff9a6b; }
body.glass-page.dark main .link:not(.danger), body.glass-page.dark main a:not([class]) { color: #e9c2d4; }
/* lighter glass on long lists (spec 025, stage 4): the cards of Apeluri, Clienți, SMS and Settings drop the background
   blur, which the phone redraws for every card while scrolling, and get a slightly fuller glass instead; the sky under
   them is a smooth gradient, so they look the same. The few large surfaces (calendar sections, week, month) keep the blur. */
.calls-page #calls .card, .clients-page #clients .card, .clients-page #clients .tabs.keep, .glass-page main .card, .glass-page main .tile {
  -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(255,255,255,.8); }
body.calls-page.dark #calls .card, body.clients-page.dark #clients .card, body.clients-page.dark #clients .tabs.keep,
body.glass-page.dark main .card, body.glass-page.dark main .tile { background: rgba(104,64,86,.62); }
/* Settings home: a small ring of what is ready in the title row (spec 025, schite/sms-setari.html); since spec 026
   the seven settings come first as two lists, the week as dots and the team below them */
.set-head { align-items: center; }
.set-ring { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; margin-right: 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.set-ring svg { width: 30px; height: 30px; }
.set-ring .ring-track { fill: none; stroke: currentColor; stroke-opacity: .15; stroke-width: 5; }
.set-ring .ring-part { fill: none; stroke: #7a3e5c; stroke-width: 5; stroke-linecap: round; }
body.dark .set-ring .ring-part { stroke: #e9c27a; }
h2.set-kick { font: 600 13px var(--body-font, var(--font)); color: var(--muted); margin: 16px 4px 8px; letter-spacing: 0; }
/* spec 026 (schite/setari-tot.html, variant A): the seven settings as two short lists on a thread; each row is
   one link, its "?" stays above it. A full plum bead with a tick = done, a hollow gold one = still to do. */
ul.set-rows { list-style: none; margin: 0; padding: 4px 0; position: relative; }
.set-rows::before { content: ""; position: absolute; left: 24px; top: 30px; bottom: 30px; width: 2px; border-radius: 2px; background: rgba(122,62,92,.22); }
.set-row { position: relative; }
.set-row + .set-row { border-top: 1px solid var(--line); }
ul.set-rows .set-row-link { display: grid; grid-template-columns: 22px 22px 1fr auto; gap: 10px; align-items: center; min-height: 56px;
  padding: 9px 50px 9px 13px; color: var(--text); text-decoration: none; }
.set-row .bead { width: 22px; height: 22px; border-radius: 50%; position: relative; z-index: 1; display: grid; place-items: center;
  background: #fbf6f3; box-shadow: inset 0 0 0 2.5px #c49a3a; font: 700 12px/1 var(--body-font, var(--font)); color: #fff; }
.set-row.done .bead { background: #7a3e5c; box-shadow: 0 0 0 3px rgba(122,62,92,.18); }
.set-row .art { width: 22px; height: 22px; }
.set-name { min-width: 0; }
.set-name b { display: block; font: 600 16px/1.2 var(--head-font); }
.set-name small { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; line-height: 1.3; color: var(--muted); }
.set-state { font-size: 13px; font-weight: 600; white-space: nowrap; color: #8a5a12; }
.set-row.done .set-state { color: var(--ok); }
.set-row .help-q { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); width: 26px; height: 26px; font-size: 13px; }
.set-below { margin-top: 10px; }
.set-week, .set-team { display: block; color: var(--text); text-decoration: none; }
.set-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.set-title b, .set-team b { font: 600 15px var(--head-font); }
.set-title .muted { font-size: 12px; }
.set-team { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.set-team p, .set-space p { margin: 2px 0 0; font-size: 12px; }
.set-space { display: flex; align-items: center; gap: 12px; position: relative; padding-right: 52px; }
.set-space .art { width: 24px; height: 24px; flex: none; }
.set-space b { font: 600 15px var(--head-font); }
.set-space .help-q { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); width: 26px; height: 26px; font-size: 13px; }
.set-row .help-q:active, .set-space .help-q:active { transform: translateY(-50%) scale(.97); }  /* the press must not drop it */
.set-store .logout-end { margin-top: 14px; }
.week-dots { display: grid; grid-template-columns: 44px repeat(7, 1fr); gap: 6px 2px; margin-top: 12px; align-items: center; max-width: 460px; }
.week-dots .wd { text-align: center; font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.week-dots .wd.today { color: #7a3e5c; } body.dark .week-dots .wd.today { color: #e9c27a; }
.week-dots .ws { font-size: 11px; font-weight: 600; color: var(--muted); }
.week-dots i { width: 14px; height: 14px; border-radius: 50%; margin: auto; background: var(--c); }
.week-dots i.empty { background: transparent; box-shadow: inset 0 0 0 1.5px #c2410c; }
body.dark .week-dots i.empty { box-shadow: inset 0 0 0 1.5px #ff9a6b; }
.faces { display: flex; padding-left: 6px; }
.faces span { width: 30px; height: 30px; margin-left: -6px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff;
  background: var(--c); box-shadow: 0 0 0 2px #fbf7f5; }
body.dark .faces span { box-shadow: 0 0 0 2px #5a3a4c; }
/* a short phone screen (browser bars, a smaller phone): the grey line under each name goes, so all seven still fit */
@media (max-width: 899px) and (max-height: 760px) {
  .set-name small { display: none; }
  ul.set-rows .set-row-link { min-height: 46px; padding-top: 6px; padding-bottom: 6px; }
  .set-head + .set-lists h2.set-kick, .set-lists h2.set-kick { margin: 10px 4px 6px; }
}
/* on a laptop the two lists sit side by side: the week and the team under the weekly list, the storage under the other */
@media (min-width: 900px) {
  .set-lists { display: grid; grid-template-columns: 1fr 1.2fr; grid-template-areas: "w o" "b o" "b s"; gap: 0 18px; align-items: start; }
  .set-weekly { grid-area: w; } .set-once { grid-area: o; } .set-below { grid-area: b; } .set-store { grid-area: s; margin-top: 10px; }
}
/* at night the drawings and the "?" turn almost white, so they show on the dark glass (Ionuț: "desenele nu se văd") */
body.dark main .art { stroke: #f6e4ec; }
body.dark main .help-q { color: #f6e4ec; border-color: #f6e4ec; background: transparent; }
body.dark main .tile.done .tile-state, body.dark main .set-row.done .set-state { color: #a8e6b2; }
body.dark main .set-state { color: #f0cf8a; }
body.dark main .set-rows::before { background: rgba(255,255,255,.25); }
body.dark main .set-row .bead { background: #5e3d50; box-shadow: inset 0 0 0 2.5px #e9c27a; }
body.dark main .set-row.done .bead { background: #e9c27a; color: #4a2c3d; box-shadow: 0 0 0 3px rgba(233,194,122,.25); }
/* the day / night switch of the sky pages (sky.js): since spec 026 a small circle in the title row, next to
   "?" (schite/cer-buton.html, variant A), so it never covers the page */
.sky-switch { width: 30px; height: 30px; flex: none; position: relative; margin-bottom: 10px; padding: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; font: 16px/1 var(--font); color: var(--primary); background: var(--surface); border: 1.5px solid var(--primary); }
.sky-switch::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; }  /* 44 px to tap, the circle stays 30 px */
.sky-switch.alone { margin: 0 0 8px auto; }  /* its own line, on the right */
body.dark main .sky-switch { color: #f6e4ec; border-color: #f6e4ec; background: transparent; }
body.glass-page.dark main input, body.glass-page.dark main select, body.glass-page.dark main textarea { background: rgba(255,255,255,.08); color: var(--text); }

/* Team (spec 002 FR-R29): one card per person, the person in the sliding panel */
.person { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); padding: 12px 14px; margin-bottom: 10px; }
.person .dot { width: 14px; height: 14px; flex: none; }
.person-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.person-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.person-tags span { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; border-radius: 999px;
                    padding: 2px 9px; background: var(--bg); color: var(--muted); }
.person-tags span.cal { background: var(--accent-soft); color: var(--primary); }
.person-tags svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* the person card in tabs (spec 018): without JavaScript the panes stand one under the other */
.tab-row { display: none; }
.tabbed .tab-row { display: flex; gap: 4px; padding: 4px; margin-bottom: 12px; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); }
.tab-row button { flex: 1 1 0; min-width: 0; min-height: 48px; padding: 4px 6px; border: 0; border-radius: 10px; background: none;
                  font: 600 14px/1.2 var(--font); color: var(--muted); cursor: pointer; }
.tab-row button[aria-selected="true"] { background: var(--accent-soft); color: var(--primary); }
.tab-row button:focus-visible { outline: 3px solid var(--primary); outline-offset: -3px; }
.tab-pane { padding: 14px; margin-bottom: 12px; }
.tab-pane[hidden] { display: none; }
.tab-lead { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.tab-switch { display: flex; align-items: center; gap: 12px; min-height: 56px; margin-top: 6px; }
.tab-switch > span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tab-switch small { font-size: 14px; }
.tab-switch .switch { flex: none; }
/* the role as three buttons and the sections as pills (spec 018); the chosen role's meaning shows under it */
.role-pick .plain { margin-top: 14px; }
.role-pick legend { margin-bottom: 6px; }
.role-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: var(--bg); }
.role-btns label, .sec-btns label { position: relative; margin: 0; cursor: pointer; }
.role-btns input, .sec-btns input { position: absolute; opacity: 0; pointer-events: none; }
.role-btns span { display: grid; place-items: center; min-height: 46px; padding: 0 4px; border-radius: 10px; font-weight: 600; font-size: 15px; color: var(--muted); text-align: center; }
.role-btns input:checked + span { background: var(--primary); color: var(--on-primary); }
.role-btns input:focus-visible + span, .sec-btns input:focus-visible + span { outline: 3px solid var(--primary); outline-offset: 2px; }
.role-note { margin-top: 8px; padding: 10px 12px; border-radius: var(--radius); background: var(--accent-soft); color: var(--text); font-size: 15px; }
.role-note p { margin: 0; }
.role-note p + p { margin-top: 6px; }
.role-pick:has(input[name=rol]:checked) .role-note p { display: none; }
.role-pick:has(input[value=patron]:checked) .role-note [data-role=patron],
.role-pick:has(input[value=specialist]:checked) .role-note [data-role=specialist],
.role-pick:has(input[value=receptie]:checked) .role-note [data-role=receptie] { display: block; }
.role-pick:has(input[value=patron]:checked) .sec-pick { display: none; }
.sec-all { display: none; margin: 14px 0 0; }
.role-pick:has(input[value=patron]:checked) .sec-all { display: block; }
.sec-pick > .muted { margin: 0 0 8px; font-size: 14px; }
.sec-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.sec-btns span { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px;
                 border: 1.5px solid var(--line); background: var(--surface); font-weight: 500; font-size: 15px; }
.sec-btns span::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #968779; flex: none; }
.sec-btns input:checked + span { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.sec-btns input:checked + span::before { border-color: #fff; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%237a3e5c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.former > summary { cursor: pointer; font-weight: 600; color: var(--muted); padding: 10px 0; }
.person-form fieldset { border: 1px solid var(--line); }
.person-form legend { font-weight: 700; padding: 0 6px; }
.person-form > .check { margin: 4px 0 12px; }
/* a group with its name read out (A11Y-13), drawn like a plain label */
fieldset.plain { border: 0; padding: 4px 0 0; margin: 8px 0 0; min-width: 0; }
fieldset.plain > legend { padding: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
fieldset.plain:has(> legend.lbl) { margin-top: 16px; padding-top: 0; }
fieldset.plain > legend.lbl { margin-bottom: 2px; }

/* services (spec 002 FR-R30): category cards, one row per service, those off grey at the end */
.cat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.cat-head h2 { margin-top: 0; }
.svc-row { display: flex; width: 100%; align-items: center; gap: 10px; padding: 12px 2px; border: 0; border-bottom: 1px solid var(--line);
  background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; min-height: 48px; }
.svc-row > span:first-child { flex: 1; font-weight: 600; }
.svc-row.off { color: var(--muted); }
.svc-row.off > span:first-child { font-weight: 400; }
.cat-card > .btn { margin-top: 12px; }

/* roster (spec 002 FR-R31): a card per day, tap a shift, pick the person */
.roster-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.roster-tools form { margin: 0; }
.rday { padding: 10px 14px; margin-bottom: 10px; }
.rday-name { display: block; margin-bottom: 4px; }
.rcell > summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; border-top: 1px solid var(--line); }
.rcell > summary::-webkit-details-marker { display: none; }
.rcell-shift { width: 52px; font-size: 13px; color: var(--muted); }
.saved-ok { margin-left: auto; color: var(--ok); font-weight: 600; }
.warn-text { color: var(--danger); }
.pick-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 10px 62px; }
.pick-person { border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 13px; cursor: pointer; min-height: 38px; }
.pick-person.on { border-color: var(--primary); font-weight: 700; }

/* booking phones (spec 002 FR-R32) */
.phone-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pstate { font-size: 13px; font-weight: 600; border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.pstate.ok { background: #e4efe3; color: #2f5e3a; }
.pstate.bad { background: #fbe6dc; color: #9a3412; white-space: normal; text-align: right; }
.pstate.off { background: var(--bg); color: var(--muted); }
.small { font-size: 13px; }
.tag-checks { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.tag-checks input { position: absolute; opacity: 0; }
.tag-checks span { display: inline-block; border: 1.5px solid var(--line); border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.tag-checks input:checked + span { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.tag-checks input:focus-visible + span { outline: 2px solid var(--cta); }
.phone-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.code-box { font: 600 17px monospace; word-break: break-all; background: rgba(255,255,255,.12); padding: 12px; border-radius: 8px; user-select: all; }

/* SMS texts (spec 002 FR-R33): a card per message, a phone bubble with what the client receives */
.sms-card-head { display: flex; align-items: center; justify-content: space-between; }
.sms-card-head h2 { margin: 0; }
.sms-card.off .bubble { opacity: .5; }
label.inline { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }
label.inline select { width: auto; min-height: 40px; }
.insert-btns { display: flex; gap: 8px; margin: 8px 0 12px; }
.insert-btns .btn { padding: 6px 12px; min-height: 38px; font-size: 14px; }
.bubble { background: var(--accent-soft); border-radius: 16px 16px 16px 4px; padding: 10px 12px; font-size: 14px; line-height: 1.4; max-width: 92%; }
.bubble-foot { font-size: 13px; margin: 4px 0 12px; color: var(--muted); }
.too-long { color: var(--danger); }
.switch { position: relative; display: inline-block; width: 50px; height: 30px; margin: 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch span { position: absolute; inset: 0; border-radius: 15px; background: #968779; transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--cta); }

/* subscriptions (spec 002 FR-R34): a card per subscription, those off the offer grey at the end */
.sub-card { display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.sub-head { display: flex; justify-content: space-between; gap: 10px; }
.sub-head span { color: var(--primary); font-weight: 700; white-space: nowrap; }
.sub-text { font-size: 14px; color: var(--muted); white-space: pre-line; }

/* Settings tiles (spec 002 FR-R25): 2 per row on a phone, 4 on a laptop, a drawing each, one shared background (spec 003 FR-D15) */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { position: relative; border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow); }
.tile-link { display: flex; flex-direction: column; gap: 4px; padding: 12px 12px 10px; min-height: 118px; color: var(--text); text-decoration: none; }
.tile-link b { font-size: 14px; line-height: 1.25; padding-right: 26px; }
.tile .art { width: 38px; height: 38px; margin-bottom: 2px; }
.tile-state { font-size: 13px; color: var(--muted); margin-top: auto; }
.tile.done .tile-state { color: var(--ok); font-weight: 600; }
.tile-tick { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 11px; }
.art { fill: none; stroke: var(--primary); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* the "?" and its grey help window (spec 002 FR-R26) */
.help-q { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--primary); background: var(--surface); color: var(--primary);
  font: 700 15px var(--font); cursor: pointer; flex: none; position: relative; }
.help-q::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; }  /* 44 px to tap, the circle stays 30 px */
.tile .help-q { position: absolute; top: 8px; right: 8px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; }
.page-head h1, .page-head h2 { margin-bottom: 10px; margin-right: auto; flex: 1 1 0; min-width: 0; }
.page-head > .help-q, .page-head > .btn, .page-head > .me-wrap { margin-bottom: 10px; }
/* the initials circle and its small window with "Ieșire" (spec 003 FR-D12); the top bar does this on a laptop */
.me-wrap { position: relative; flex: none; margin-right: -4px; }
.me { list-style: none; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; -webkit-user-select: none; user-select: none; }
.me::-webkit-details-marker { display: none; }
.me span { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--primary);
           font-size: 14px; font-weight: 600; }
.me-pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 9; width: 220px; padding: 14px; display: grid; gap: 10px;
          background: var(--surface); border-radius: 14px; box-shadow: 0 12px 28px rgba(60,40,20,.16); }
.me-pop form { margin: 0; }
@media (min-width: 900px) { .me-wrap { display: none; } }
/* on a phone a page's main button gets its own line under the title, so the circle stays by the title */
@media (max-width: 899px) {
  .page-head:has(> .btn)::after { content: ""; flex-basis: 100%; order: 1; }
  .page-head > .btn { order: 2; }
}
.logout-end { margin: 24px 0 0; }
.page-head .btn { white-space: nowrap; flex: none; }
dialog.help { cursor: pointer; }
.help-art .art { width: 52px; height: 52px; stroke: #fff; animation: help-bob 2.4s ease-in-out infinite; }
@keyframes help-bob { 50% { transform: translateY(-5px) rotate(-4deg); } }
.mock { position: relative; background: #fff; color: var(--text); border-radius: 12px; padding: 10px 12px; margin: 14px 0 4px; font-size: 13px; display: grid; gap: 6px; }
.mock .m-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mock .m-field { border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; }
.mock .m-btn { justify-self: start; background: var(--cta); color: #fff; border-radius: 8px; padding: 5px 12px; font-weight: 600; }
.mock .m-muted { color: var(--muted); }
.mock .m-ok { color: var(--ok); font-weight: 600; }
.mock .m-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.mock .m-row .m-dot + span { margin-right: auto; }
.mock .m-switch { width: 34px; height: 20px; border-radius: 10px; background: var(--ok); position: relative; }
.mock .m-text { background: var(--bg); border-radius: 6px; padding: 6px; }
.mock .m-bar { height: 10px; border-radius: 5px; background: var(--bg); overflow: hidden; }
.mock .m-bar i { display: block; width: 35%; height: 100%; background: var(--primary); position: relative; }
.mock .m-ap { flex: 1; background: color-mix(in srgb, var(--op-1) 16%, var(--surface)); border-left: 3px solid var(--op-1); border-radius: 4px; padding: 4px 6px; }
.mock .m-free { flex: 1; text-align: center; border: 1px dashed var(--line); border-radius: 4px; padding: 4px; color: var(--primary); font-weight: 700; }
.mock .m-btns { display: flex; gap: 4px; flex-wrap: wrap; }
.mock .m-btns span { border: 1px solid var(--line); border-radius: 6px; padding: 4px 7px; color: var(--primary); font-weight: 600; }
.mock .m-btns .m-sent { background: #e4efe3; color: #2f5e3a; border-color: transparent; }
.mock .hit { position: relative; animation: help-hit 3.2s infinite; }
.finger { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%;
  background: rgba(122, 62, 92, .35); border: 2px solid var(--cta); pointer-events: none; animation: help-finger 3.2s infinite; }
@keyframes help-finger {
  0% { transform: translate(70px, 50px); opacity: 0; } 15% { opacity: 1; }
  45% { transform: translate(0, 0) scale(1); } 55% { transform: translate(0, 0) scale(.7); }
  65% { transform: translate(0, 0) scale(1); opacity: 1; } 90%, 100% { transform: translate(0, 0); opacity: 0; } }
@keyframes help-hit { 0%, 50% { box-shadow: none; } 58% { box-shadow: 0 0 0 4px rgba(122, 62, 92, .45); } 80%, 100% { box-shadow: none; } }

/* feel (spec 003 FR-D17, FR-D18, FR-D21): a slight shrink while pressed, hover only with a mouse */
.btn, .ic, .av, .chip, .pick, .tile-link, a.card, .free, .pick-person, .menu a, .fab, .help-q, .panel-x, .mday, .svc-row, .person, .tabs a, .ap-bar button, .round, .pill, .go {
  touch-action: manipulation; transition: transform 160ms var(--ease-out), background-color 160ms ease, border-color 160ms ease; }
.btn:active, .ic:active, .av:active, .chip:active, .pick:not(.off):active, .tile-link:active, a.card:active, .free:active, .pick-person:active, .menu a:active,
.fab:active, .help-q:active, .panel-x:active, .mday:active, .svc-row:active, .person:active, .tabs a:active, .ap-bar button:active,
.round:active, .pill:active, .go:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) {
  .fab:hover, .btn-cta:hover { background: var(--cta-hover); }
  .mday:hover { background: var(--bg); }
  .pick:hover, .btn-sec:hover { border-color: var(--primary); }
  .ic:hover { color: var(--primary); background: var(--accent-soft); }
  .pill:hover { border-color: var(--primary); }
  .go:hover { background: var(--cta-hover); }
  .go.see:hover { background: #2a7285; }
  .pick.off:hover { border-color: var(--line); }
  .pick.free-row:not(.off):hover { border-color: transparent; }
  .free:hover { color: var(--primary); background: #7a3e5c0d; }
}

/* reduced motion (FR-D20): nothing slides or scales; only short fades stay */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-property: opacity, background-color, border-color, color !important; transition-duration: .15s !important; }
  :active { transform: none !important; }
  .card.call.out { transform: none; }
}
/* the section tabs already name the section on a phone (spec 009, FE-A16) */
@media (max-width: 899px) { nav.tabs:not(.keep) + .cal .sec h3 { display: none; } }

/* big screens: the menu becomes a bar on the left, with "+ Programare nouă" on top and the month
   under it, and the page takes the rest of the width (decided 2026-10-23, spec 010) */
.side-extra, .fab-text { display: none; }
@media (max-width: 1023px) { .side { display: contents; } }
@media (min-width: 1024px) {
  body.with-menu { --side: 240px; }
  body.with-menu .side { position: fixed; top: 0; bottom: 0; left: 0; z-index: 5; width: var(--side); box-sizing: border-box; overflow-y: auto;
                         display: flex; flex-direction: column; gap: 14px; padding: 18px 14px; background: var(--surface); border-right: 1px solid var(--line); }
  body.with-menu .bar { display: contents; }
  body.with-menu .bar .brand { order: 0; padding: 0 8px; }
  body.with-menu .fab { order: 1; position: static; flex: none; width: auto; height: 48px; border-radius: var(--radius);
                        display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 24px; box-shadow: none; }
  body.with-menu .fab-text { display: inline; font-size: 15px; font-weight: 600; }
  body.with-menu .menu { order: 2; flex-direction: column; gap: 2px; background: none; border: 0; }
  body.with-menu .menu a { flex: none; flex-direction: row; gap: 12px; padding: 10px 12px; font-size: 15px; border: 0; border-radius: var(--radius); }
  body.with-menu .menu a.on { background: var(--accent-soft); }
  body.with-menu .menu .badge { position: static; margin-left: auto; font-size: 12px; }
  body.with-menu .side-extra { order: 3; display: block; }
  body.with-menu .side-extra .month { margin: 0; padding: 4px 0; box-shadow: none; max-width: none; }
  body.with-menu .side-extra .month-head .btn { width: 36px; height: 36px; min-height: 36px; font-size: 20px; }
  body.with-menu .side-extra .month-head strong { font-size: 15px; }
  body.with-menu .side-extra .mday { min-height: 32px; font-size: 13px; border-radius: 8px; }
  body.with-menu .bar .who { order: 4; margin: auto 0 0; padding: 0 8px; flex-direction: column; align-items: flex-start; gap: 8px; }
  /* the calendar takes the whole width; the other pages keep a readable width, centred in what is left */
  body.with-menu main { max-width: 1200px; margin: 0 0 0 max(var(--side), calc(var(--side) + (100vw - var(--side) - 1200px) / 2)); padding: 24px 32px 96px; }
  body.with-menu.wide main { max-width: none; margin-left: var(--side); }
  body.with-menu main .month { display: none; }  /* it is in the left bar */
  .panel { width: 480px; }  /* as wide as a big phone, the page stays in sight (decided 2026-10-23) */
}
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  body.with-menu .menu a:not(.on):hover { background: var(--bg); color: var(--text); }
}

/* big screens: one row per call, the buttons side by side, the reasons open under "Fără programare"
   without moving the other rows (decided 2026-10-23, spec 010) */
@media (min-width: 1024px) {
  #calls .card.call { display: grid; grid-template-columns: minmax(200px, 1fr) auto auto 180px; grid-template-areas: "who acts states go";
                      align-items: center; column-gap: 18px; padding: 10px 14px; margin-bottom: 8px; }
  #calls .call .call-head { grid-area: who; align-items: center; min-width: 0; }
  #calls .call .who-top { flex-wrap: wrap; justify-content: flex-start; column-gap: 10px; }
  #calls .call .call-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }  /* one line; the whole line on hover */
  #calls .call .acts-round { grid-area: acts; margin: 0; grid-template-columns: repeat(4, 64px); }
  #calls .call .round { min-height: 0; }
  #calls .call .states { grid-area: states; flex-wrap: nowrap; align-items: center; }
  #calls .call .go { grid-area: go; margin: 0; }
  #calls .reasons-wrap { position: relative; }
  #calls .reasons-wrap[open] { flex-basis: auto; }
  #calls .reasons-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 3; width: 340px;
                        border-radius: 12px; box-shadow: 0 12px 32px rgba(60,40,20,.18); }
}

/* big screens: the clients as a table (decided 2026-10-23, spec 010); a phone keeps name and number */
.client-head, .client-row .when { display: none; }
@media (min-width: 1024px) {
  .client-head, .client-row { display: grid; grid-template-columns: minmax(180px, 2fr) 150px minmax(150px, 1fr) minmax(150px, 1fr); gap: 16px; align-items: center; }
  .client-head { padding: 0 16px 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
  .client-row { margin-bottom: 6px; padding: 12px 16px; }
  .client-row .when { display: block; color: var(--muted); }
}

/* the appointment opened from its page: lit, so the eye finds it (decided 2026-10-23) */
.ap.shown { outline: 3px solid var(--cta); outline-offset: 1px; z-index: 2; }
.go-to { flex-direction: column; align-items: stretch; }
.go-to form { margin: 0; display: flex; }
.go-to form .btn { flex: 1; }

/* SMS (spec 012): one row per appointment with its messages as a track; a bubble opens its message under the row.
   Since spec 025 the ring of today's SMS is on top (it replaced the ribbon) and the bubbles are pills */
.sms-ring { margin-bottom: 12px; }
.sms-ring b a { color: #c2410c; text-decoration: none; }
.ring-legend { list-style: none; margin: 6px 0 0; padding: 0; font-size: 14px; }
.ring-legend li { display: flex; align-items: center; gap: 7px; margin: 2px 0; }
.ring-legend li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.ring-legend li.quiet { color: var(--muted); }
h2.sgrp { display: flex; align-items: baseline; gap: 10px; margin: 26px 2px 10px; }
h2.sgrp .muted { font: 400 15px var(--font); }
/* spec 026 (schite/sms-lista.html, variant A): one row per message; the whole row opens it; the edge says its state */
.srow { --pend: #c9a3b6; position: relative; padding: 0; overflow: hidden; scroll-margin-top: 80px; transition: box-shadow 200ms var(--ease-out); }
.srow:target { box-shadow: 0 0 0 2px var(--primary), var(--shadow); }
.srow::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: var(--pend); }
.srow.edge-bad::before { background: var(--danger); } .srow.edge-ok::before { background: var(--ok); }
.srow.edge-off::before, .srow.edge-old-bad::before { background: var(--line); }
.srow.edge-old-bad .srow-main { opacity: .62; }
.srow-main { width: 100%; display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 2px 10px; align-items: center;
             padding: 12px 14px 12px 18px; min-height: 64px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.srow-main:active { transform: scale(.99); }
.s-hour b { display: block; font: 700 18px/1.1 var(--head-font, var(--font-head)); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.s-hour span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.s-who { min-width: 0; }
.s-who b { display: block; font-size: 15px; overflow-wrap: anywhere; }
.s-who .muted { font-size: 13px; }
.s-why { display: block; font-size: 13px; font-style: italic; color: var(--muted); }
.st { --c: #b07d1f; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 12px; white-space: nowrap; color: var(--c);
      background: color-mix(in srgb, var(--c) 14%, transparent); }
.st.ok { --c: var(--ok); } .st.bad { --c: var(--danger); } .st.off, .st.old-bad { --c: var(--muted); }
body.glass-page.dark main .st.ok { --c: #a8e6b2; } body.glass-page.dark main .st.bad { --c: #ff9a6b; } body.glass-page.dark main .st.wait { --c: #f0d08a; }
.peek[hidden] { display: none; }
.peek { padding: 0 14px 14px; }
.phone-msg { padding: 14px 16px; background: #f6efe8; border-radius: 16px; display: grid; gap: 8px; }
.phone-msg .txt { justify-self: start; max-width: 520px; background: var(--primary); color: var(--on-primary); border-radius: 18px 18px 18px 5px; padding: 10px 14px; font-size: 14px; overflow-wrap: anywhere; }
.phone-msg .meta { font-size: 13px; color: var(--muted); }
body.glass-page.dark main .phone-msg { --muted: #6f6157; color: #2a211c; }  /* the light bubble box keeps its day colours at night */
.phone-msg .msg { margin: 0; }
.phone-msg .acts { display: flex; flex-wrap: wrap; gap: 8px; }
.phone-msg .acts:empty { display: none; }
.phone-msg .acts form { margin: 0; }
.s-same { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.s-same a { margin-left: auto; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
details.sms-old { margin-top: 18px; }
details.sms-old > summary { list-style: none; cursor: pointer; font-weight: 600; color: var(--primary); min-height: 44px; display: flex; align-items: center; gap: 8px; }
details.sms-old > summary::-webkit-details-marker { display: none; }
details.sms-old > summary::before { content: "▸"; transition: transform 200ms var(--ease-out); }
details.sms-old[open] > summary::before { transform: rotate(90deg); }
body.glass-page.dark main details.sms-old > summary { color: #f0d08a; }
@media (min-width: 900px) {
  .srow-main { grid-template-columns: 104px minmax(170px, 1fr) auto; gap: 4px 18px; padding: 14px 20px; }
  .s-hour b { font-size: 22px; }
  .peek { padding: 0 20px 18px; }
  .phone-msg { grid-template-columns: 1fr auto; align-items: end; gap: 8px 16px; }
  .phone-msg .acts { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
}

/* calls: the small line behind "Detalii" (decided 2026-10-23, spec 010); a missed call keeps the red dot on it */
.call-line[hidden] { display: none; }
button.call-more { position: relative; margin-left: auto; font-size: 14px; font-weight: 600; text-decoration: none; color: var(--muted); white-space: nowrap; }
.call-more::after { content: ""; position: absolute; left: -8px; right: -8px; top: 50%; height: 44px; transform: translateY(-50%); }
.call.missed .call-more { color: var(--danger); }
.call.missed .call-more::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--danger);
                                  margin-right: 6px; vertical-align: 1px; }
.call.missed .call-line::before { display: none; }
@media (min-width: 1024px) { #calls .call button.call-more { flex-basis: 100%; margin-left: 0; text-align: left; }
  #calls .call .call-line { white-space: normal; } }  /* opened on purpose: the whole line */  /* under the name, the same in every row */

/* client card: visits, subscriptions and media each in a coloured card that opens on a tap (decided 2026-10-23, spec 010) */
.fold { margin-top: 10px; border-radius: 14px; border-left: 4px solid var(--fold); background: var(--fold-bg); padding: 0 12px; }
.fold-notes { --fold: #3f7d4e; --fold-bg: #e6f0e6; }
.fold-visits { --fold: var(--primary); --fold-bg: var(--accent-soft); }
.fold-subs { --fold: #c49a3a; --fold-bg: #f7efdc; }
.fold-media { --fold: #5b7fd6; --fold-bg: #e8edf9; }
.fold > summary { list-style: none; cursor: pointer; min-height: 48px; display: flex; align-items: center; gap: 6px; font-weight: 600; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: "▾"; margin-left: auto; color: var(--fold); transition: transform 200ms var(--ease-out); }
.fold[open] > summary::after { transform: rotate(180deg); }
.fold[open] { padding-bottom: 12px; }
.fold .visit, .fold .sub { border-color: rgba(0,0,0,.08); }
.fold .see { margin: 6px 0 2px; gap: 8px; }
.fold .see .btn, .fold .see-more { padding: 8px 12px; font-size: 14px; background: var(--surface); }
.fold .see-more { margin-left: 8px; }
.fold .sub > div[hidden] { display: none; }
.fold .sub > div { margin-top: 6px; }
.fold figure { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.see-media { font-size: 13px; font-weight: 600; color: var(--primary); min-height: 32px; display: flex; align-items: center; }
.fold .upload { margin-top: 12px; }
/* subscriptions: what the client has, and a new one, in two cards (decided 2026-10-23) */
.fold-new { --fold: #c49a3a; --fold-bg: #fbf6ea; border-style: dashed; border-width: 1px 1px 1px 4px; border-color: #e3cf9f; border-left-color: #c49a3a; }
.fold .sub.expired { color: var(--muted); }
.fold .sub-dates { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 2px; }
.fold .sub-dates .see-more { margin-left: auto; }
.fold-new .row .wide { flex-basis: 100%; }
/* the see-through bubble under "Abonament și preț" (spec 017): floats over the form, moves nothing */
.fold-new .row .wide:has(> [data-hinted]) { position: relative; }
.hint { position: absolute; left: 0; right: 0; top: calc(100% + 10px); z-index: 5; margin: 0; padding: 10px 12px; border-radius: 12px;
        background: rgba(255, 253, 250, .78); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
        box-shadow: 0 6px 20px rgba(42, 33, 28, .14); color: var(--text); font-size: 14px; line-height: 1.4; text-align: left; pointer-events: none;
        animation: hint-in 180ms var(--ease-out); }
.hint::before { content: ""; position: absolute; top: -7px; left: 22px; width: 14px; height: 7px; background: inherit;
                clip-path: polygon(50% 0, 100% 100%, 0 100%); }
@keyframes hint-in { from { opacity: 0; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .hint { animation-name: hint-fade; } }
@keyframes hint-fade { from { opacity: 0; } }
/* the appointment page and the client card: a plain sentence, round buttons on one line, the note folded (decided 2026-10-23) */
.ap-sentence { font-size: 17px; line-height: 1.5; margin: 10px 0 4px; }
.acts-round.three { grid-template-columns: repeat(3, 1fr); max-width: 360px; }
.note-fold { margin: 0 0 16px; }
.fold .fold-hint { margin-left: auto; font-weight: 400; font-size: 14px; }
.fold > summary:has(.fold-hint)::after { margin-left: 8px; }
/* "Alege poză sau video": one small line, three tiny 3D frames instead of an icon (decided 2026-10-23) */
.fold .upload { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fold .upload .msg { flex-basis: 100%; margin: 0; }
.media-stage { flex: none; width: 64px; height: 40px; }
.media-stage[hidden] { display: none; }
.media-3d { display: block; width: 100%; height: 100%; }
.pick-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pick-file { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 2px 10px 2px 4px; cursor: pointer;
             border: 1px dashed color-mix(in srgb, var(--c-sms) 50%, transparent); border-radius: 12px; background: var(--surface); font-size: 14px; }
.pick-file > span:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.pick-name { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-input:focus-visible + .pick-file { outline: 3px solid var(--c-sms); outline-offset: 2px; }
/* Settings: the list on the left of a laptop, and the SMS texts and phones folded to one line (decided 2026-10-23) */
.set-list { display: flex; flex-direction: column; gap: 2px; padding: 14px 0 0; border-top: 1px solid var(--line); }
.set-list a { padding: 9px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; }
.set-list a.on { background: var(--accent-soft); color: var(--primary); }
@media (hover: hover) and (pointer: fine) { .set-list a:not(.on):hover { background: var(--bg); color: var(--text); } }
.set-fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 44px; }
.set-fold > summary::-webkit-details-marker { display: none; }
.set-fold > summary::after { content: "▾"; color: var(--muted); transition: transform 200ms var(--ease-out); }
.set-fold[open] > summary::after { transform: rotate(180deg); }
.set-fold > summary h2 { margin: 0; font-size: 18px; }
.set-fold .set-when { margin-left: auto; font-size: 14px; }
.set-fold > summary.phone-head > div { margin-right: auto; }
.set-fold[open] > summary { margin-bottom: 10px; }
.card:has(> .set-fold) { padding-top: 10px; padding-bottom: 10px; }
.card:has(> .set-fold[open]) { padding-bottom: 16px; }
.set-fold > summary.phone-head .muted { white-space: nowrap; }  /* the number on one line; the state wraps instead */
.set-fold > summary.phone-head .pstate { white-space: normal; text-align: right; min-width: 0; }  /* a long state wraps, the ▾ stays inside (spec 025) */
.set-fold > summary::after { flex: none; }
.dlg-delete { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.dlg-delete[hidden] { display: none; }
dialog.grey .dlg-delete .btn.danger { color: #ffb8a3; border-color: #ffb8a3; }  /* red, readable on the dark window */
/* Clienți → "Cu abonament" (decided 2026-10-23): name, phone, subscription, expiry, "Scoate din fișă" */
.sub-filter { margin: 0 0 12px; }
.client-row.sub-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
.client-row.sub-row > a { color: var(--text); text-decoration: none; }
.client-row.sub-row form { margin: 4px 0 0; grid-column: 1 / -1; }
.client-row.sub-row .btn { padding: 8px 12px; font-size: 14px; }
.client-head.sub-row { display: none; }
@media (min-width: 1024px) {
  .client-head.sub-row, .client-row.sub-row { display: grid; grid-template-columns: minmax(180px, 2fr) 150px minmax(160px, 1.4fr) 110px 150px; }
  .client-row.sub-row form { margin: 0; grid-column: auto; }
}
.dlg-delete [data-if-held] { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dlg-delete [data-if-held][hidden], .dlg-delete [hidden] { display: none; }
.dlg-delete p { flex-basis: 100%; margin: 0; color: #fff; }
.cat-head form { margin: 0; }
.cat-head h2 { margin-right: auto; }
button.link.danger { color: var(--danger); }
#bands { display: contents; }  /* the bands stay sticky to the page, not to this box */
/* the buttons under an appointment: round, with a word under each, like the calls (decided 2026-10-23) */
.ap.open .ap-bar { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 2px; padding: 10px 6px 6px; }
.ap-bar .ap-note { grid-column: 1 / -1; padding: 0 4px; }
.ap-bar .round { height: auto; min-width: 0; min-height: 66px; border: 0; padding: 2px 0; background: none; font: 600 12px/1.2 var(--font);
                 text-align: center; color: var(--text); text-decoration: none; justify-content: flex-start; }
.ap-bar .round .ico { font-size: 20px; font-weight: 700; }
.ap-bar .round.on .ico { background: var(--c); color: #fff; }
.ap-bar button.round.on { background: none; border: 0; color: var(--text); }  /* only the circle fills in */
