/* ═══════════════════════════════════════════════════════════════════
   Skin Delight Cebu — Clinic System
   Tablet-first UI extending the website design system
   ═══════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Dancing Script';
  font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('fonts/dancing-script.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal; font-weight: 300 700; font-display: swap;
  src: url('fonts/cormorant-garamond.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic; font-weight: 300 700; font-display: swap;
  src: url('fonts/cormorant-garamond-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Jost';
  font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('fonts/jost.woff2') format('woff2');
}

:root {
  --pink-50:  #fff5f9;
  --pink-100: #fde9f1;
  --pink-200: #fbd5e4;
  --pink-300: #f9b4d6;
  --pink-400: #f487bd;
  --pink-text:#9d4d74;
  --blue:     #3b8ce0;
  --blue-deep:#2b64a8;
  --blue-cta: #3577c6;
  --gold:     #d9a441;
  --gold-soft:#e9c98d;
  --gold-deep:#8f6a17;   /* text gold: readable on white */
  --ink:      #4a3b41;
  --ink-soft: #756269;
  --white:    #ffffff;
  --good:     #25734a;
  --good-bg:  #e6f4ec;
  --warn:     #b3541e;
  --warn-bg:  #fdeee2;

  --script: 'Dancing Script', cursive;
  --serif:  'Cormorant Garamond', serif;
  --sans:   'Jost', sans-serif;

  --shadow-card: 0 10px 34px -14px rgba(178, 95, 134, 0.22);
  --shadow-pop:  0 24px 60px -20px rgba(74, 59, 65, 0.35);
  --radius: 18px;
  --ease: cubic-bezier(.22, .7, .3, 1);
  --tap: 48px;               /* minimum touch target */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html { scrollbar-color: var(--pink-300) var(--pink-50); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--pink-50); }
::-webkit-scrollbar-thumb { background: var(--pink-300); border-radius: 8px; border: 2px solid var(--pink-50); }

body {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  color: var(--ink);
  background: var(--pink-50);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
  overscroll-behavior-y: none;
}
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.15; }
a { color: var(--blue-deep); text-decoration: none; }
button { font-family: var(--sans); cursor: pointer; }
::selection { background: var(--pink-300); color: var(--blue-deep); }
a:focus-visible, button:focus-visible, input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible,
input[type="file"]:focus-visible, canvas:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px;
}
/* (text fields, dropdowns and date fields show focus with a blue edge and glow: end of this file) */

.script-accent { font-family: var(--script); font-weight: 600; color: var(--blue); font-size: 1.12em; }

/* ─────────── Buttons ─────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--tap);
  font-weight: 500; font-size: 1rem; letter-spacing: 0.03em;
  padding: 12px 26px; border-radius: 999px; border: 0;
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
  position: relative; overflow: hidden;
  white-space: nowrap;
}
.btn-wrap { white-space: normal; text-align: center; }
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--blue-cta) 0%, var(--blue-deep) 100%);
  color: var(--white);
  box-shadow: 0 10px 24px -10px rgba(43, 100, 168, 0.55);
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost { background: var(--white); color: var(--blue-deep); border: 1px solid var(--pink-300); }
.btn-ghost:hover { border-color: var(--blue); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, #c08a2c 100%);
  color: #3d2c0a;
  box-shadow: 0 10px 24px -10px rgba(120, 84, 20, 0.45);
}
.btn-soft { background: var(--pink-100); color: var(--pink-text); }
.btn-danger { background: #fbe4e4; color: #a2372f; }
.btn-sm { min-height: 44px; padding: 9px 18px; font-size: 0.9rem; }
.btn-lg { min-height: 58px; padding: 16px 34px; font-size: 1.08rem; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

/* ─────────── Shell layout ─────────── */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; min-height: 100dvh; }
.sidebar {
  background: linear-gradient(178deg, #ffffff 0%, #fff0f6 100%);
  border-right: 1px solid var(--pink-200);
  padding: 22px 16px;
  display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: 0; height: 100vh; height: 100dvh;
}
.side-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 18px; }
.side-brand svg { width: 52px; height: 52px; flex: none; filter: drop-shadow(0 4px 10px rgba(244, 135, 189, 0.4)); }
.side-brand-name { line-height: 1; }
.side-brand-name .s1 { font-family: var(--script); font-weight: 600; font-size: 1.3rem; color: var(--blue); display: block; }
.side-brand-name .s2 { font-size: 0.68rem; letter-spacing: 0.36em; color: var(--blue-deep); }
.side-brand-name .s3 { display: block; font-size: 0.68rem; letter-spacing: 0.14em; color: var(--pink-text); text-transform: uppercase; margin-top: 5px; }

.side-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.side-link {
  display: flex; align-items: center; gap: 13px;
  min-height: var(--tap);
  padding: 10px 14px; border-radius: 14px;
  font-size: 0.98rem; font-weight: 400; color: var(--ink);
  border: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.side-link svg { width: 22px; height: 22px; flex: none; color: var(--pink-text); transition: color 0.25s ease; }
.side-link:hover { background: var(--pink-100); }
.side-link.active {
  background: var(--white);
  border-color: var(--pink-200);
  box-shadow: var(--shadow-card);
  font-weight: 500; color: var(--blue-deep);
}
.side-link.active svg { color: var(--blue); }
.side-foot { border-top: 1px dashed var(--pink-200); padding-top: 14px; }

.user-chip { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 14px; }
.avatar {
  width: 42px; height: 42px; flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 500; font-size: 0.95rem; color: var(--white);
  background: linear-gradient(135deg, var(--pink-400), var(--pink-text));
}
.avatar.role-admin   { background: linear-gradient(135deg, var(--gold), #c08a2c); }
.avatar.role-manager { background: linear-gradient(135deg, var(--blue), var(--blue-deep)); }
.user-chip .u-name { font-size: 0.92rem; font-weight: 500; line-height: 1.2; }
.user-chip .u-role { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pink-text); }

.main { min-width: 0; max-width: 100%; display: flex; flex-direction: column; overflow-x: hidden; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px clamp(18px, 3vw, 34px) 0;
}
.topbar h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.topbar h1 .script-accent { font-size: 1.1em; }
.top-meta { display: flex; align-items: center; gap: 14px; text-align: right; }
.top-clock { line-height: 1.25; }
.top-clock .t1 { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; color: var(--blue-deep); }
.top-clock .t2 { font-size: 0.78rem; color: var(--ink-soft); }
.view { padding: 20px clamp(18px, 3vw, 34px) 90px; display: grid; gap: 20px; align-content: start;
  grid-template-columns: minmax(0, 1fr); }   /* wide tables scroll inside their card, never widen the page */
.view-page { display: contents; }

/* ─────────── Cards & grids ─────────── */
.card {
  background: var(--white);
  border: 1px solid var(--pink-200);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-card);
}
.card-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin-bottom: 14px; }
.card-title h3 { font-size: 1.25rem; }
.card-title .sub { font-size: 0.8rem; color: var(--ink-soft); }
a.sub { display: inline-flex; align-items: center; min-height: 44px; }
.grid { display: grid; gap: 20px; }
.grid > * { min-width: 0; }   /* a wide table scrolls inside its card instead of pushing it off screen */
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) {
  .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .grid.cols-2 { grid-template-columns: 1fr; }   /* portrait iPad: side-by-side cards stack */
}
@media (max-width: 700px) {
  .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
}

/* Stat tiles */
.stat { position: relative; overflow: hidden; }
.stat .s-label { font-size: 0.74rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--pink-text); }
.stat .s-value { font-family: var(--serif); font-weight: 600; font-size: clamp(1.9rem, 3.2vw, 2.6rem); color: var(--blue-deep); line-height: 1.1; margin-top: 6px; }
.stat .s-foot { font-size: 0.82rem; color: var(--ink-soft); margin-top: 4px; }
.stat::after {
  content: '✦'; position: absolute; right: 18px; top: 14px;
  color: var(--gold-soft); font-size: 0.8rem;
}
.stat.gold .s-value { color: var(--gold-deep); }

/* ─────────── Tables ─────────── */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.tbl th {
  text-align: left; font-weight: 500;
  font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--pink-text);
  padding: 10px 12px; border-bottom: 1px solid var(--pink-200);
  white-space: nowrap;
}
.tbl td { padding: 12px; border-bottom: 1px dashed var(--pink-200); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.rowbtn { cursor: pointer; transition: background 0.2s ease; }
@media (hover: hover) { .tbl tr.rowbtn:hover { background: var(--pink-50); } }   /* an iPad tap must not leave the row pink */
.tbl .nw { white-space: nowrap; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .money { font-weight: 500; color: var(--blue-deep); }
.tbl .commission { font-weight: 500; color: var(--gold-deep); }
.t-empty { text-align: center; color: var(--ink-soft); padding: 34px 12px !important; }

/* Chips & badges */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.76rem; font-weight: 500; letter-spacing: 0.05em;
  padding: 4px 12px; border-radius: 999px;
  background: var(--pink-100); color: var(--pink-text);
  white-space: nowrap;
}
.chip.blue { background: #e7f0fb; color: var(--blue-deep); }
.chip.gold { background: #f9efdb; color: var(--gold-deep); }
.chip.good { background: var(--good-bg); color: var(--good); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: #fbe4e4; color: #a2372f; }
.face-flag { margin: 0 0 10px; padding: 10px 14px; border-radius: 12px; background: #fbe4e4; color: #a2372f; font-size: 0.95rem; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ─────────── Forms ─────────── */
.field { display: grid; gap: 7px; }
.field > label, .field-label { font-size: 0.8rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pink-text); }
.field input, .field select, .field textarea {
  font-family: var(--sans); font-size: 1.05rem; color: var(--ink);
  min-height: 52px;
  padding: 12px 16px;
  border: 1.5px solid var(--pink-200); border-radius: 14px;
  background-color: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}
.field select { padding-right: 46px; }
.field textarea { min-height: 90px; resize: vertical; }

/* Every field in the app has the same soft, rounded look, inside a .field or not.
   :where() weighs nothing, so any more specific rule below still sets its own size. */
:where(input:not([type="checkbox"], [type="radio"], [type="file"], [type="range"], [type="color"], [type="hidden"],
  [type="button"], [type="submit"], [type="reset"], [type="image"]), select, textarea) {
  font-family: var(--sans); font-size: 1rem; color: var(--ink);   /* 16px or more: Safari never zooms in */
  min-height: 44px; padding: 10px 14px;
  border: 1.5px solid var(--pink-200); border-radius: 12px;
  background-color: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
:where(textarea) { min-height: 90px; line-height: 1.45; }
::placeholder { color: #a8949d; opacity: 1; }
/* dropdowns: the browser's grey box and arrow replaced by the brand chevron */
select {
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239d4d74' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center; background-size: 16px 16px;
  padding-right: 42px;
  text-overflow: ellipsis;
  cursor: pointer;
}
select:disabled {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dcc3cf' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  cursor: default;
}
/* time fields: the time reads from the left like every other field (iPad Safari centres it) */
:where(input[type="time"], input[type="datetime-local"]) { text-align: left; }
input::-webkit-date-and-time-value { text-align: left; }
input::-webkit-calendar-picker-indicator { opacity: 0.55; cursor: pointer; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--blue); outline: none;
  box-shadow: 0 0 0 4px rgba(59, 140, 224, 0.14);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .span2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
/* kiosk: parent or guardian details for a patient under 18 */
.guardian-box { background: #fff4f9; border: 1px solid #f9c6df; border-radius: 14px; padding: 14px 16px; }
.guardian-box[hidden] { display: none; }
.guardian-box > p { font-size: 0.92rem; margin-bottom: 10px; }
.check {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px; border: 1.5px solid var(--pink-200); border-radius: 14px;
  background: var(--pink-50); cursor: pointer;
}
.check input { width: 26px; height: 26px; margin-top: 2px; accent-color: var(--blue); flex: none; cursor: pointer; }
.check span { font-size: 0.98rem; }

/* ─────────── Login ─────────── */
.login-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid; place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 80% 60% at 85% 8%, #fcdcec 0%, transparent 60%),
    radial-gradient(ellipse 70% 60% at 8% 92%, #fde4f0 0%, transparent 55%),
    linear-gradient(175deg, var(--white) 0%, var(--pink-100) 100%);
}
.login-card {
  width: min(460px, 100%);
  background: var(--white);
  border: 1px solid var(--pink-200);
  border-radius: 26px;
  box-shadow: var(--shadow-pop);
  padding: 40px 36px;
  text-align: center;
}
.login-card > svg { width: 108px; height: 108px; margin-bottom: 8px; }
.login-title { font-size: 1.9rem; margin-bottom: 2px; }
.login-sub { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 26px; }
.login-form { display: grid; gap: 14px; text-align: left; }
.demo-roles { display: grid; gap: 10px; margin-top: 6px; }
.role-btn {
  display: flex; align-items: center; gap: 14px;
  width: 100%; min-height: 68px;
  padding: 12px 16px;
  background: var(--white);
  border: 1.5px solid var(--pink-200); border-radius: 16px;
  text-align: left;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.role-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); border-color: var(--pink-300); }
.role-btn:active { transform: scale(0.98); }
.role-btn .r-ico {
  width: 46px; height: 46px; flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--pink-400), var(--pink-text));
}
.role-btn .r-ico svg { width: 24px; height: 24px; }
.role-btn .r-ico.role-admin   { background: linear-gradient(135deg, var(--gold), #c08a2c); }
.role-btn .r-ico.role-manager { background: linear-gradient(135deg, var(--blue), var(--blue-deep)); }
.role-btn .r-txt { flex: 1; min-width: 0; }
.role-btn .r-txt strong { display: block; font-size: 1.02rem; font-weight: 500; color: var(--ink); }
.role-btn .r-txt small { display: block; font-size: 0.8rem; color: var(--ink-soft); line-height: 1.35; }
.demo-note {
  margin-top: 18px; font-size: 0.8rem; color: var(--ink-soft);
  border-top: 1px dashed var(--pink-200); padding-top: 14px;
}
.demo-note .chip { vertical-align: 1px; }

/* ─────────── Attendance ─────────── */
.clock-hero {
  text-align: center;
  padding: 30px 24px;
  background:
    radial-gradient(ellipse 90% 100% at 50% -20%, #fde9f1 0%, transparent 60%),
    var(--white);
}
.clock-hero .big-time { font-family: var(--serif); font-weight: 600; font-size: clamp(2.6rem, 6vw, 4rem); color: var(--blue-deep); line-height: 1; font-variant-numeric: tabular-nums; }
.clock-hero .big-date { color: var(--ink-soft); margin-top: 6px; }
.staff-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.staff-tile {
  display: flex; align-items: center; gap: 12px;
  background: var(--white);
  border: 1.5px solid var(--pink-200); border-radius: 16px;
  padding: 14px 16px;
  min-height: 76px;
  text-align: left;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.staff-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.staff-tile.on { border-color: var(--good); background: linear-gradient(180deg, #ffffff, #f2faf5); }
.staff-tile.busy { opacity: 0.55; }
.staff-tile .st-name { font-weight: 500; font-size: 0.98rem; line-height: 1.2; }
.staff-tile .st-sub { font-size: 0.78rem; color: var(--ink-soft); white-space: nowrap; }   /* "In since 8:52 AM" on one line */
.staff-tile .st-state { margin-left: auto; }

/* ─────────── Patients ─────────── */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.toolbar .pay-btn { min-height: 52px; }   /* filter pills line up with the Period dropdown beside them */
.toolbar .field .paybar { margin-top: 0; }
.toolbar .search { flex: 1; min-width: 220px; position: relative; }
.toolbar .search input {
  width: 100%; min-height: 52px;
  padding: 12px 16px 12px 46px;
  border: 1.5px solid var(--pink-200); border-radius: 999px;
  font-size: 1rem; background: var(--white);
}
.toolbar .search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--pink-text); }
.sig-thumb { width: 120px; height: 48px; object-fit: contain; background: var(--white); border: 1px solid var(--pink-200); border-radius: 8px; }

/* Drawer (patient detail) */
.drawer-veil {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(46, 28, 38, 0.45);
  backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.drawer-veil.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 95;
  width: min(560px, 94vw);
  background: var(--pink-50);
  box-shadow: var(--shadow-pop);
  transform: translateX(102%);
  transition: transform 0.38s var(--ease);
  overflow-y: auto;
  padding: 24px;
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.drawer-head h2 { font-size: 1.6rem; flex: 1; }
.drawer .card { margin-bottom: 16px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 14px; font-size: 0.95rem; }
.kv dt { color: var(--pink-text); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; padding-top: 3px; }
.kv dd { color: var(--ink); }

/* ─────────── Intake (kiosk) ─────────── */
.kiosk {
  position: fixed; inset: 0; z-index: 100;
  overflow-y: auto;
  background:
    radial-gradient(ellipse 80% 50% at 85% 5%, #fcdcec 0%, transparent 60%),
    linear-gradient(175deg, var(--white) 0%, var(--pink-100) 100%);
  display: none;
}
.kiosk.open { display: block; }
.kiosk-exit { position: fixed; top: 16px; left: 16px; z-index: 101; }
.kiosk-inner { max-width: 760px; margin: 0 auto; padding: 68px 24px 80px; }
.kiosk-head { text-align: center; margin-bottom: 26px; }
.kiosk-head svg { width: 92px; height: 92px; }
.kiosk-head h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.kiosk-head p { color: var(--ink-soft); }
.steps { display: flex; justify-content: center; gap: 10px; margin: 18px 0 26px; }
.step-dot {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--white); border: 1.5px solid var(--pink-200);
  font-weight: 500; font-size: 0.9rem; color: var(--pink-text);
  position: relative;
}
.step-dot.done { background: var(--good-bg); border-color: var(--good); color: var(--good); }
.step-dot.now { background: linear-gradient(135deg, var(--blue-cta), var(--blue-deep)); border-color: transparent; color: var(--white); box-shadow: 0 8px 20px -8px rgba(43,100,168,.6); }
.kiosk-card { background: var(--white); border: 1px solid var(--pink-200); border-radius: 22px; box-shadow: var(--shadow-card); padding: 30px 28px; }
.kiosk-actions { display: flex; justify-content: space-between; gap: 14px; margin-top: 24px; }
.terms-box {
  max-height: max(300px, calc(100dvh - 460px)); overflow-y: auto;   /* use the room the screen has */
  border: 1.5px solid var(--pink-200); border-radius: 14px;
  padding: 18px 20px; background: var(--pink-50);
  font-size: 0.95rem; color: var(--ink);
}
.terms-box h4 { margin: 12px 0 6px; font-size: 1.05rem; }
.terms-box p { margin-bottom: 10px; }

/* Signature pad */
.sig-wrap { position: relative; }
.sig-pad {
  width: 100%; height: 240px;
  background: var(--white);
  border: 2px dashed var(--pink-300); border-radius: 16px;
  touch-action: none;
  display: block;
  cursor: crosshair;
}
.sig-line {
  position: absolute; left: 10%; right: 10%; bottom: 52px;
  border-bottom: 1.5px solid var(--pink-200);
  pointer-events: none;
}
.sig-x { position: absolute; left: 10%; bottom: 58px; color: var(--pink-300); font-size: 1.1rem; pointer-events: none; }
/* a shorter pad inside popups; the frame, the cross and the line all follow the canvas */
.sig-compact .sig-pad { height: 180px; }
.sig-compact .sig-line { bottom: 40px; }
.sig-compact .sig-x { bottom: 46px; }
/* in a popup, Undo / Clear sit beside the label, so the always-visible buttons never cover them */
.sig-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0 8px; }
.sig-head .sig-tools { margin-top: 0; }
.sig-tools { display: flex; gap: 10px; margin-top: 12px; }

/* Success */
.kiosk-done { text-align: center; padding: 40px 20px; }
.kiosk-done .tulip-big { width: 120px; height: 120px; margin-bottom: 10px; animation: pop 0.6s var(--ease); }
@keyframes pop { from { transform: scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
.kiosk-done h2 { font-size: 2rem; margin-bottom: 8px; }
.kiosk-done p { color: var(--ink-soft); max-width: 400px; margin: 0 auto 22px; }

/* ─────────── Charts ─────────── */
.chart { width: 100%; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .bar { fill: var(--blue); }
.chart .bar:hover { fill: var(--blue-deep); }
.chart .grid-line { stroke: var(--pink-100); stroke-width: 1; }
.chart .axis-label { font-family: var(--sans); font-size: 13px; fill: var(--ink-soft); }
.chart .val-label { font-family: var(--sans); font-size: 13px; font-weight: 500; fill: var(--ink); }
.hbar-row { display: grid; grid-template-columns: minmax(120px, 200px) 1fr 90px; align-items: center; gap: 12px; padding: 7px 0; }
.hbar-row .hb-name { font-size: 0.92rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
.hbar-row .hb-track { background: var(--pink-100); border-radius: 6px; height: 14px; overflow: hidden; }
.hbar-row .hb-fill { height: 100%; background: linear-gradient(90deg, var(--blue), var(--blue-deep)); border-radius: 6px; min-width: 3px; transition: width 0.8s var(--ease); }
.hbar-row.gold .hb-fill { background: linear-gradient(90deg, var(--gold-soft), var(--gold)); }
.hbar-row .hb-val { font-size: 0.88rem; font-weight: 500; color: var(--blue-deep); text-align: right; font-variant-numeric: tabular-nums; }
.hbar-row.gold .hb-val { color: var(--gold-deep); }
.chart-tip {
  position: fixed; z-index: 120; pointer-events: none;
  background: var(--ink); color: var(--white);
  font-size: 0.8rem; padding: 6px 12px; border-radius: 10px;
  box-shadow: var(--shadow-pop);
  opacity: 0; transition: opacity 0.15s ease;
  white-space: nowrap;
}
.chart-tip.show { opacity: 1; }

/* ─────────── Modal & toast ─────────── */
dialog.modal {
  margin: auto; border: 0; padding: 0;
  width: min(560px, 94vw);
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-pop);
}
dialog.modal::backdrop { background: rgba(46, 28, 38, 0.5); backdrop-filter: blur(4px); }
/* while the camera runs, only dim: re-blurring the page under a live video
   takes the graphics chip away from the face reading */
dialog.modal.cam-on::backdrop { background: rgba(46, 28, 38, 0.62); backdrop-filter: none; }
.modal-inner { padding: 28px; }
.modal-inner h3 { font-size: 1.4rem; margin-bottom: 16px; }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 22px; }
/* in a popup, long forms (Record a sale, a staff record) keep Save on screen while scrolling */
dialog.modal .modal-actions {
  position: sticky; bottom: 0; z-index: 2;
  margin-left: -28px; margin-right: -28px; margin-bottom: -28px; padding: 14px 28px 28px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.86), var(--white) 14px);
}
.modal-actions .push-left { margin-right: auto; }
.modal-actions .actions-break { flex-basis: 100%; height: 0; }   /* main actions above, Delete / Close below */
.toast-zone { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 130; display: grid; gap: 8px; }
.toast {
  background: var(--ink); color: var(--white);
  padding: 12px 22px; border-radius: 999px;
  font-size: 0.92rem;
  box-shadow: var(--shadow-pop);
  animation: toastIn 0.35s var(--ease);
  display: flex; align-items: center; gap: 8px;
}
.toast.good { background: var(--good); }
.toast.bad { background: #a2372f; }
@keyframes toastIn { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ─────────── Bookings ─────────── */
.cal-embed { border-radius: var(--radius); overflow: hidden; border: 6px solid var(--white); box-shadow: var(--shadow-card); background: var(--pink-100); }
.cal-embed iframe { width: 100%; height: 620px; border: 0; display: block; }
.rec-card { border-left: 4px solid var(--gold); }
.rec-card p { margin-bottom: 10px; font-size: 0.95rem; color: var(--ink-soft); }
.rec-card strong { color: var(--ink); font-weight: 500; }

/* ─────────── Responsive: tablet rail & phone ─────────── */
@media (max-width: 1100px) {
  .shell { grid-template-columns: 84px 1fr; }
  .side-brand-name, .user-chip .u-txt { display: none; }
  .side-brand { justify-content: center; padding-bottom: 12px; }
  /* iPad rail: icons keep a short word underneath so nobody has to guess */
  .side-link { flex-direction: column; justify-content: center; gap: 3px; padding: 8px 2px; min-height: 0; }
  .side-link span { display: block; font-size: 0.68rem; line-height: 1.15; text-align: center; letter-spacing: 0; }
  .side-link svg { width: 22px; height: 22px; }
  .user-chip { justify-content: center; padding: 8px 0; }
  .side-foot .btn { padding: 10px; font-size: 0; gap: 0; min-height: 44px; }
  .side-foot .btn svg { width: 20px; height: 20px; }
}
@media (max-width: 640px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; z-index: 80;
    flex-direction: row; align-items: center;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-right: 0; border-top: 1px solid var(--pink-200);
    background: rgba(255, 251, 252, 0.96); backdrop-filter: blur(12px);
  }
  .side-brand, .side-foot { display: none; }
  .side-nav { flex-direction: row; justify-content: space-around; width: 100%; gap: 2px; }
  /* phone: four main pages and More (the rest, plus Change password and Sign out) */
  .side-link { flex-direction: column; gap: 3px; font-size: 0.7rem; padding: 6px 2px; min-height: 56px; flex: 1 1 0; min-width: 0; }
  .side-link:not(.nav-main) { display: none; }
  .side-nav .nav-more { display: flex; }
  .side-link span { display: block; }
  .side-link svg { width: 24px; height: 24px; }
  .view { padding-bottom: 120px; }
  .kv { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ─────────── POS: cart, payments, invoice summary ─────────── */
.cart { display: grid; gap: 8px; }
.cart-line {
  display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap;
  background: var(--pink-50);
  border: 1px solid var(--pink-200); border-radius: 12px;
  padding: 8px 12px;
}
.cart-line .cl-name { flex: 1 1 100%; min-width: 0; font-size: 0.94rem; font-weight: 500; }   /* full name on its own row */
.cart-line .cl-field { display: flex; flex-direction: column; gap: 3px; font-size: 0.85rem; color: var(--ink-soft); }
.cart-line .cl-cap { font-size: 0.68rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--pink-text); }
.cart-line .cl-field:nth-of-type(3) { flex: 1 1 140px; }   /* "Commission to" uses the rest of the row */
.cart-line .cl-field input {
  width: 92px; min-height: 44px;
  padding: 6px 10px;
  border: 1.5px solid var(--pink-200); border-radius: 10px;
  font-size: 1rem; font-family: var(--sans);
}
.cart-line .cl-field input[disabled] { background: var(--pink-100); color: var(--ink-soft); }
.cart-line .cl-field select {
  min-height: 44px; padding: 6px 36px 6px 10px; width: 100%;
  border: 1.5px solid var(--pink-200); border-radius: 10px;
  font-size: 1rem; font-family: var(--sans); background-color: var(--white); color: var(--ink);
  background-position: right 12px center;
}
.cart-line .cl-field:nth-of-type(2) input { width: 72px; }

.paybar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pay-btn {
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--pink-200);
  background: var(--white);
  font-size: 0.9rem; font-weight: 500; color: var(--ink);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.pay-btn:hover { border-color: var(--blue); }
.pay-btn.on {
  background: linear-gradient(135deg, var(--blue-cta), var(--blue-deep));
  border-color: transparent; color: var(--white);
}

/* Clinic | Salon: tabs, then a search box and tap tiles for that side only */
.side-tabs .pay-btn { flex: 1 1 0; min-height: 52px; font-size: 1rem; }
.svc-find {
  width: 100%; margin-top: 10px; min-height: 48px; padding: 10px 14px;
  border: 1.5px solid var(--pink-200); border-radius: 12px;
  font-size: 1rem; font-family: var(--sans); background: var(--white); color: var(--ink);
}
.svc-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; max-height: 300px; overflow-y: auto; }
.svc-tile {
  display: flex; flex-direction: column; justify-content: space-between; gap: 4px;
  min-height: 64px; padding: 10px 12px; text-align: left;
  border: 1.5px solid var(--pink-200); border-radius: 12px; background: var(--white);
  font-family: var(--sans); color: var(--ink); cursor: pointer;
}
.svc-tile:hover { border-color: var(--blue); }
.svc-tile:active { background: var(--pink-100); }
.st-name { font-size: 0.95rem; font-weight: 500; line-height: 1.25; overflow-wrap: anywhere; }
.st-price { font-size: 0.85rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.svc-none { color: var(--ink-soft); font-size: 0.88rem; padding: 8px 0; text-align: center; }
.svc-picked { margin-top: 10px; font-size: 0.92rem; }
.svc-tile .side-chip { margin-left: 2px; }
.side-chip { margin-left: 4px; vertical-align: middle; }
@media (max-width: 900px) and (orientation: portrait) { .svc-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .svc-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 260px; } }
tr.svc-archived td { color: var(--ink-soft); }
.svc-tile.on { border-color: transparent; background: linear-gradient(135deg, var(--blue-cta), var(--blue-deep)); color: var(--white); }
.svc-tile.on .st-price { color: var(--white); }

/* ─────────── Bookings: the clinic's own calendar ─────────── */
.bk-daynav { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px auto; gap: 6px; align-items: center; }
.bk-daynav input { min-width: 0; width: 100%; padding-left: 10px; padding-right: 8px; }
.bk-daynav .bk-arrow { min-width: 48px; min-height: 48px; padding: 0; font-size: 1.2rem; }
.bk-daynav .btn-ghost { min-height: 48px; padding: 0 14px; }
.bk-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 16px 0 20px; }
.bk-wd {
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 64px; padding: 8px 2px;
  border: 1.5px solid var(--pink-200); border-radius: 14px; background: var(--white);
  font-family: var(--sans); color: var(--ink); cursor: pointer;
}
.bk-wd span { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pink-text); }
.bk-wd strong { font-size: 1.15rem; font-weight: 600; font-variant-numeric: lining-nums tabular-nums; }
.bk-wd small { min-height: 1.1em; font-size: 0.7rem; color: var(--ink-soft); white-space: nowrap; }
.bk-wd.today { border-color: var(--gold); }
.bk-wd.on { border-color: transparent; background: linear-gradient(135deg, var(--blue-cta), var(--blue-deep)); }
.bk-wd.on span, .bk-wd.on strong, .bk-wd.on small { color: var(--white); }
.bk-row { width: 100%; text-align: left; font-family: var(--sans); font-size: 0.95rem; color: var(--ink); cursor: pointer; }
.bk-row:hover { border-color: var(--blue); }
.pending-row.bk-row .pr-main { flex-direction: column; align-items: flex-start; gap: 3px; }
.pending-row.bk-row .pr-side { flex-direction: column; align-items: flex-end; gap: 2px; }
.bk-row.bk-off { opacity: 0.6; }
.bk-requests { border: 1.5px solid var(--gold-soft); }
.bk-waiting { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; color: var(--ink-soft); font-size: 0.9rem; text-decoration: none; }
.bk-owner { margin-top: 20px; }
.bk-inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.bk-times { display: flex; flex-wrap: wrap; gap: 8px; }
.bk-time { min-width: 96px; font-variant-numeric: lining-nums tabular-nums; }
.bk-msg textarea {
  width: 100%; margin-top: 8px; padding: 10px 12px; border: 1.5px solid var(--pink-200); border-radius: 12px;
  font-family: var(--sans); font-size: 1rem; line-height: 1.45; color: var(--ink); background: var(--pink-50); resize: vertical;
}
/* Opening hours: one soft card per day, an Open / Closed switch and the two times as pills.
   Narrow card (iPad sideways, phone): day and switch on top, times below. Wide card: one line. */
.hr-rows { display: grid; gap: 8px; margin-top: 4px; container-type: inline-size; container-name: hours; }
.hr-rows > .lock-sub { margin-bottom: 2px; }
.hours-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "day switch" "times times";
  align-items: center; gap: 6px 12px;
  padding: 8px 10px 10px 16px;
  background: var(--white); border: 1px solid var(--pink-200); border-radius: 16px;
  box-shadow: 0 8px 20px -16px rgba(178, 95, 134, 0.45);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.hours-row.is-closed { grid-template-areas: "day switch"; padding-bottom: 8px; background: var(--pink-50); border-color: var(--pink-100); box-shadow: none; }
.hr-day { grid-area: day; font-weight: 500; font-size: 1rem; color: var(--ink); }
.is-closed .hr-day { color: var(--ink-soft); font-weight: 400; }
.hr-switch {
  grid-area: switch; justify-self: end; position: relative;
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 4px;
  cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none;
}
.hr-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.hr-track {
  position: relative; flex: none; width: 50px; height: 30px; border-radius: 999px;
  background: var(--pink-200); box-shadow: inset 0 1px 3px rgba(157, 77, 116, 0.18);
  transition: background-color 0.22s ease;
}
.hr-track::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--white); box-shadow: 0 2px 6px rgba(74, 59, 65, 0.28);
  transition: transform 0.22s var(--ease);
}
.hr-switch input:checked + .hr-track { background: linear-gradient(135deg, var(--blue-cta), var(--blue-deep)); box-shadow: none; }
.hr-switch input:checked + .hr-track::after { transform: translateX(20px); }
.hr-switch input:focus-visible + .hr-track { outline: 2px solid var(--blue); outline-offset: 3px; }
.hr-state { min-width: 3.7em; font-size: 0.92rem; font-weight: 500; color: var(--blue-deep); }
.is-closed .hr-state { color: var(--ink-soft); }
.hr-times { grid-area: times; display: flex; align-items: center; gap: 8px; min-width: 0; }
.hr-times select {
  flex: 1 1 0; min-width: 0; min-height: 44px; padding: 8px 36px 8px 16px;
  border-radius: 999px; background-color: var(--pink-50); border-color: var(--pink-200);
  background-position: right 13px center; font-variant-numeric: lining-nums tabular-nums;
}
.hr-to { flex: none; font-size: 0.9rem; color: var(--ink-soft); }
.hours-row.is-closed .hr-times { display: none; }
@container hours (min-width: 540px) {
  .hours-row { grid-template-columns: minmax(92px, 0.8fr) auto minmax(0, 2fr); grid-template-areas: "day switch times"; padding: 6px 10px 6px 16px; }
  .hours-row.is-closed { grid-template-areas: "day switch ."; padding-bottom: 6px; }
  .hr-switch { justify-self: start; }
}
/* Day / Week / Month views (Google-calendar style): clinic blue, salon pink, a request dashed gold */
.bk-views .pay-btn { min-width: 76px; }
.bk-cal { overflow: hidden; }
.bk-tg { --hours-w: 56px; margin-top: 4px; }
.bk-tg-head { display: grid; grid-template-columns: var(--hours-w) repeat(var(--cols), minmax(0, 1fr)); gap: 0; }
.bk-tg.one .bk-tg-head { display: none; }
.bk-dh {
  display: flex; flex-direction: column; align-items: center; min-height: 52px; padding: 4px 0; border: 0; background: none;
  font-family: var(--sans); color: var(--ink); cursor: pointer; border-radius: 12px;
}
.bk-dh span { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pink-text); }
.bk-dh strong { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-size: 1.05rem; font-weight: 600; font-variant-numeric: lining-nums; }
.bk-dh.today strong { box-shadow: inset 0 0 0 2px var(--gold); }
.bk-dh.sel strong { background: var(--blue); color: var(--white); box-shadow: none; }
.bk-tg-body { position: relative; display: grid; grid-template-columns: var(--hours-w) repeat(var(--cols), minmax(0, 1fr)); border-top: 1px solid var(--pink-200); }
.bk-tg-hours { position: relative; }
.bk-tg-hours span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 0.72rem; color: var(--ink-soft); white-space: nowrap; font-variant-numeric: lining-nums; }
.bk-tg-hours span:first-child { transform: none; }
.bk-tg-col {
  position: relative; border-left: 1px solid var(--pink-200);
  background-image: repeating-linear-gradient(to bottom, var(--pink-200) 0 1px, transparent 1px 60px);
}
.bk-tg-col.closed { background-color: #f6f0f3; }
.bk-closed { position: absolute; top: 10px; left: 0; right: 0; text-align: center; font-size: 0.78rem; color: var(--ink-soft); }
.bk-ev {
  position: absolute; z-index: 1; overflow: hidden; padding: 3px 6px; margin-left: 2px; text-align: left;
  border: 0; border-left: 4px solid var(--blue); border-radius: 8px; background: #e7f0fb; color: var(--blue-deep);
  font-family: var(--sans); font-size: 0.8rem; line-height: 1.25; cursor: pointer;
}
.bk-ev span { display: block; font-size: 0.74rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-ev.salon { border-left-color: var(--pink-400); background: var(--pink-100); color: var(--pink-text); }
.bk-ev.st-requested { background: #fffaf0; border: 1.5px dashed var(--gold); border-left-width: 4px; color: var(--gold-deep); }
.bk-ev.st-done { opacity: 0.85; }
.bk-ev.bk-off, .bk-chip.bk-off { opacity: 0.5; text-decoration: line-through; }
.bk-now { position: absolute; left: 0; right: 0; height: 2px; background: #d6453d; z-index: 2; pointer-events: none; }
.bk-now::before { content: ''; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #d6453d; }
.bk-month { margin-top: 4px; }
.bk-mh, .bk-mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.bk-mh span { padding: 6px 0; text-align: center; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pink-text); }
.bk-mgrid { border-top: 1px solid var(--pink-200); border-left: 1px solid var(--pink-200); }
.bk-mc {
  min-height: 108px; padding: 4px; border-right: 1px solid var(--pink-200); border-bottom: 1px solid var(--pink-200);
  display: flex; flex-direction: column; gap: 3px; min-width: 0; cursor: pointer;
}
.bk-mc.out { background: #fbf7f9; }
.bk-mc.out .bk-mn { color: var(--ink-soft); opacity: 0.6; }
.bk-mc.closed:not(.out) { background: #f6f0f3; }
.bk-mn {
  align-self: center; display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 50%; background: none;
  font-family: var(--sans); font-size: 0.9rem; font-weight: 500; color: var(--ink); cursor: pointer; font-variant-numeric: lining-nums;
}
.bk-mc.today .bk-mn { background: var(--blue); color: var(--white); }
.bk-mevs { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bk-chip {
  display: block; width: 100%; padding: 2px 6px; border: 0; border-left: 3px solid var(--blue); border-radius: 6px; background: #e7f0fb;
  font-family: var(--sans); font-size: 0.74rem; text-align: left; color: var(--blue-deep);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}
.bk-chip.salon { border-left-color: var(--pink-400); background: var(--pink-100); color: var(--pink-text); }
.bk-chip.st-requested { background: #fffaf0; border: 1px dashed var(--gold); border-left-width: 3px; color: var(--gold-deep); }
.bk-more { font-size: 0.72rem; color: var(--ink-soft); padding-left: 4px; }
.bk-mdots { display: none; justify-content: center; gap: 3px; }
.bk-mdots i { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.bk-mdots i.salon { background: var(--pink-400); }
.bk-mdots i.st-requested { background: var(--gold); }
.bk-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 12px; font-size: 0.8rem; color: var(--ink-soft); }
.bk-legend span { display: inline-block; width: 14px; height: 10px; margin-right: -8px; border-radius: 3px; background: #e7f0fb; border-left: 3px solid var(--blue); }
.bk-legend span.salon { background: var(--pink-100); border-left-color: var(--pink-400); }
.bk-legend span.req { background: #fffaf0; border: 1px dashed var(--gold); }

/* the month day-picker (public booking page and the app's booking windows) */
.mp { max-width: 420px; }
.mp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.mp-title { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; color: var(--ink); }
.mp-nav { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--pink-100); font-size: 1.3rem; color: var(--pink-text); cursor: pointer; }
.mp-nav:disabled { opacity: 0.35; cursor: default; }
.mp-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.mp-wd { text-align: center; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--pink-text); padding: 4px 0; }
.mp-day {
  position: relative; display: grid; place-items: center; min-height: 44px; border-radius: 14px; border: 0;
  font-family: var(--sans); font-size: 1rem; font-variant-numeric: lining-nums tabular-nums; color: var(--ink); background: none;
}
/* a day that can be picked: a soft pink tile, no outline (the brand calendar's look) */
button.mp-day { background: var(--pink-50); cursor: pointer; font-weight: 500; transition: background-color 0.15s ease, transform 0.15s var(--ease); }
button.mp-day:active { transform: scale(0.94); background: var(--pink-100); }
.mp-day.off { color: #c9bcc2; }
.mp-day.today { box-shadow: inset 0 0 0 2px var(--gold); }
.mp-day.free::after { content: ''; position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--blue); }
button.mp-day.on { background: linear-gradient(135deg, var(--blue-cta), var(--blue-deep)); color: var(--white); box-shadow: 0 6px 16px -8px rgba(43, 100, 168, 0.8); }
button.mp-day.on::after { background: var(--white); }
button.mp-day.on.today { box-shadow: inset 0 0 0 2px var(--gold), 0 6px 16px -8px rgba(43, 100, 168, 0.8); }

@media (max-width: 640px) {
  .bk-week { gap: 4px; }
  .bk-wd { min-height: 58px; padding: 6px 0; }
  .bk-wd small { font-size: 0; }
  .bk-wd small:not(:empty)::after { content: '•'; font-size: 0.9rem; color: var(--blue); }
  .bk-wd.on small::after { color: var(--white); }
  .pending-row.bk-row .pr-side { flex-direction: row; align-items: center; justify-content: flex-start; }
  .bk-tg { --hours-w: 40px; }
  .bk-tg-hours span { right: 4px; font-size: 0.64rem; }
  .bk-tg:not(.one) .bk-ev { padding: 2px 3px; font-size: 0.66rem; border-left-width: 3px; }
  .bk-tg:not(.one) .bk-ev span { display: none; }
  .bk-dh strong { width: 28px; height: 28px; font-size: 0.95rem; }
  .bk-mc { min-height: 62px; padding: 2px; }
  .bk-mevs { display: none; }
  .bk-mdots { display: flex; }
  .bk-mn { width: 28px; height: 28px; font-size: 0.85rem; }
  .bk-views .pay-btn { min-width: 0; flex: 1 1 0; }
  .bk-views { width: 100%; }

  .toolbar > .field:has(.bk-daynav) { flex: 1 1 100%; }
}

.sum-rows { border-top: 1px dashed var(--pink-200); margin-top: 6px; padding-top: 8px; display: grid; gap: 4px; }
.sum-row { display: flex; justify-content: space-between; font-size: 0.94rem; color: var(--ink-soft); }
.sum-row strong { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.sum-row.bundle strong { color: var(--gold-deep); }
.sum-row.discount strong { color: var(--gold-deep); }
.sum-row.total { font-size: 1.06rem; }
.sum-row.total span { color: var(--ink); font-weight: 500; }
.sum-row.total strong { color: var(--blue-deep); font-family: var(--serif); font-size: 1.25rem; font-weight: 600; }

/* POS checkout: amount received + change readout */
.pos-payrow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.pos-change {
  display: flex; align-items: center; min-height: 52px; padding: 8px 14px;
  border: 1.5px solid var(--pink-200); border-radius: 14px;
  background: var(--pink-50);
  font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--blue-deep);
  font-variant-numeric: tabular-nums;
}
.pos-change.short { color: #a2372f; background: #fdeeec; border-color: #f2c6c0; }
@media (max-width: 480px) { .pos-payrow { grid-template-columns: 1fr; } }

/* Clinic vs Salon strip */
.loc-strip { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; font-size: 0.95rem; }
.loc-strip strong { font-variant-numeric: tabular-nums; color: var(--blue-deep); }

/* Payment photo capture */
.proof-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.proof-thumb { height: 72px; max-width: 200px; border-radius: 10px; border: 1px solid var(--pink-200); object-fit: cover; }

/* Period filter (presets + custom date range) */
.period-ctl { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.period-ctl .field { margin: 0; }
.period-ctl input[type="date"] { min-width: 150px; }
.period-ctl .dp-trigger { width: 212px; }   /* From and To the same size */

/* Sign-in helper links + approved-emails list */
.login-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.link-btn {
  background: none; border: 0; padding: 10px 4px; min-height: 44px;
  font: inherit; font-size: 0.9rem; color: var(--blue-deep); text-decoration: underline; cursor: pointer;
}
.alw-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 12px; border: 1px solid var(--pink-200); border-radius: 12px;
  background: var(--white); margin-bottom: 8px;
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}

.balance-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--warn-bg);
  border: 1px solid #f2c9ad; border-radius: 12px;
  padding: 12px 16px; margin-bottom: 14px;
}
.balance-banner strong { color: var(--warn); }
.balance-banner span { display: block; font-size: 0.8rem; color: var(--ink-soft); }

.tab-card { border: 1px solid var(--pink-200); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; }

/* ─────────── New staff who registered at the front desk ─────────── */
.su-card .lock-sub { margin-bottom: 12px; }
.su-head { font-family: var(--serif); font-size: 1.1rem; font-weight: 600; color: var(--ink); margin: 20px 0 10px; }
.pending-row.su-row .pr-main { flex-direction: column; align-items: flex-start; gap: 2px; }
.pending-row.su-row .pr-main > span:not(.lock-sub) { color: var(--ink-soft); font-size: 0.9rem; }
.pending-row.su-row .pr-side { gap: 10px; }
.su-intro { margin-bottom: 16px; }
.acct-box.su-box { margin: 4px 0 16px; background: var(--warn-bg); }
.su-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 10px; }
.su-open { margin-top: 12px; }
.acct-note.acct-warn { color: var(--warn); background: var(--warn-bg); border-radius: 12px; padding: 10px 12px; }
.su-form .pin-input { max-width: none; }

/* ─────────── Pending payments board & collect flow ─────────── */
.pending-list { display: grid; gap: 10px; }
.pending-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  border: 1px solid var(--pink-200); border-radius: 14px;
  padding: 12px 16px;
  background: var(--pink-50);
}
.pending-row .pr-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.pending-row .pr-svcs { font-size: 0.85rem; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 380px; }
.pending-row .pr-side { display: flex; align-items: center; gap: 14px; flex: none; }
@media (max-width: 700px) {
  .pending-row { flex-direction: column; align-items: stretch; }
  .pending-row .pr-side { justify-content: space-between; }
}

.tab-pick { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.tab-pick input { width: 24px; height: 24px; accent-color: var(--blue); flex: none; }
.tab-pick .tp-body { min-width: 0; }
.tab-pick .tp-sub { display: block; font-size: 0.84rem; color: var(--ink-soft); }

/* ─────────── Home quick actions ─────────── */
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 900px) { .quick-grid { grid-template-columns: 1fr; } }
.quick-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--white);
  border: 1.5px solid var(--pink-200); border-radius: var(--radius);
  padding: 18px 20px;
  min-height: 88px;
  text-align: left;
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, border-color 0.22s ease;
}
.quick-card:hover { transform: translateY(-3px); border-color: var(--blue); }
.quick-card:active { transform: scale(0.98); }
.quick-card .qc-ico {
  width: 52px; height: 52px; flex: none;
  border-radius: 16px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--blue-cta), var(--blue-deep));
  color: var(--white);
}
.quick-card .qc-ico.pink { background: linear-gradient(135deg, var(--pink-400), var(--pink-text)); }
.quick-card .qc-ico.gold { background: linear-gradient(135deg, var(--gold), #c08a2c); }
.quick-card .qc-ico svg { width: 26px; height: 26px; }
.quick-card .qc-txt strong { display: block; font-size: 1.05rem; font-weight: 500; color: var(--ink); }
.quick-card .qc-txt small { display: block; font-size: 0.82rem; color: var(--ink-soft); line-height: 1.35; }

/* Selfie clock-in */
.cam-wrap {
  position: relative; overflow: hidden; border-radius: 16px;
  background: #2e1c26; aspect-ratio: 4 / 3; max-height: 52dvh; margin: 0 auto;
}
.cam-wrap video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
.cam-msg {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--white); font-size: 1rem; letter-spacing: 0.02em;
}
.link-btn {
  background: none; border: 0; padding: 12px 0 0; min-height: 44px;
  color: var(--blue-deep); text-decoration: underline; font-size: 0.95rem;
}
.att-time { font-variant-numeric: tabular-nums; }
.att-shot { min-width: 44px; padding: 6px 10px; }
.chip-tap { border: 0; font-family: inherit; cursor: pointer; min-height: 44px; text-decoration: underline dotted; text-underline-offset: 3px; }
.wrap-any { overflow-wrap: anywhere; }
.att-note { font-size: 0.78rem; color: var(--ink-soft); margin-top: 4px; max-width: 260px; overflow-wrap: anywhere; }
.att-photo { display: block; max-width: 100%; border-radius: 14px; border: 1px solid var(--pink-200); }

/* Registered devices */
.lock-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: 14px; background: var(--pink-50); border: 1px solid var(--pink-200);
}
.lock-sub { display: block; font-size: 0.82rem; color: var(--ink-soft); margin-top: 2px; }
.device-block p { color: var(--ink-soft); margin-bottom: 12px; line-height: 1.5; }
.device-block .btn { width: 100%; margin-top: 6px; }

/* Sale form patient search */
.pt-results { display: grid; gap: 6px; margin-top: 8px; max-height: 240px; overflow-y: auto; }
.pt-hit {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left;
  min-height: 44px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--pink-200);
  background: var(--white); color: var(--ink); font-size: 1rem; font-family: var(--sans);
}
.pt-hit small { color: var(--ink-soft); font-size: 0.85rem; }
.pt-none { color: var(--ink-soft); font-size: 0.9rem; padding: 6px 2px; }
.pt-chosen {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 8px 8px 8px 14px; border-radius: 12px; background: var(--pink-50); border: 1px solid var(--pink-200);
}

/* Sale history (managers) */
.sale-history { margin-top: 14px; padding: 10px 14px; border-radius: 12px; background: var(--pink-50); border: 1px dashed var(--pink-200); font-size: 0.86rem; color: var(--ink-soft); }
.sale-history strong { display: block; color: var(--ink); margin-bottom: 4px; }
.sh-row { padding: 2px 0; }

/* Attendance totals per person */
.att-totals { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.att-total { padding: 8px 12px; border-radius: 12px; background: var(--pink-50); border: 1px solid var(--pink-200); font-size: 0.88rem; }
.att-total strong { display: block; color: var(--ink); }
.att-total span { color: var(--ink-soft); font-variant-numeric: tabular-nums; }

/* Training (demo) mode: unmissable so real patients never go into it */
.demo-ribbon {
  background: repeating-linear-gradient(135deg, var(--gold) 0 14px, #c8932f 14px 28px);
  color: #fff; text-align: center; font-weight: 600; font-size: 0.9rem; letter-spacing: 0.03em;
  padding: 7px 14px; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}

.kiosk-train { border-radius: 12px; margin-bottom: 18px; }

/* Sign-in box in a staff member's window (admin, live system) */
.acct-box { margin-top: 14px; padding: 16px 18px; border: 0; border-radius: 18px; background: var(--pink-50); }
.acct-box > strong:first-child { display: block; font-family: var(--serif); font-size: 1.15rem; font-weight: 600; color: var(--ink); }
.acct-box .field { margin: 10px 0; }
.acct-note { color: var(--ink-soft); font-size: 0.88rem; margin: 6px 0; }
.del-list { margin: 6px 0 10px 20px; line-height: 1.6; }
.acct-row { display: flex; gap: 8px; align-items: center; }
.acct-row input { flex: 1; font-variant-numeric: lining-nums; }
.acct-done { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 8px 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.acct-done span { color: var(--ink-soft); }

/* View as (admin preview): always visible, one tap back */
.preview-bar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
  background: var(--blue-deep); color: #fff; padding: 8px 16px;
  font-size: 0.92rem; font-weight: 500; text-align: center;
}
.preview-bar .btn { background: #fff; color: var(--blue-deep); min-height: 40px; }

/* Approve a sign-in email (optionally linked to an existing staff record) */
.alw-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.alw-form .field { margin: 0; }
.alw-form .btn { min-height: 48px; }
.alw-form .btn svg, #devAdd svg { width: 18px; height: 18px; flex: none; }
.t-email { font-size: 0.88rem; color: var(--ink-soft); word-break: break-all; }
@media (max-width: 820px) { .alw-form { grid-template-columns: 1fr; } }

/* Headings use a serif with old-style figures: "Staff 1" read as "Staff I" */
h1, h2, h3, h4, .card-title, .modal-inner h3 { font-variant-numeric: lining-nums; }
.scroll-hint { font-size: 0.82rem; color: var(--ink-soft); margin: 6px 2px 0; }
.train-score { color: var(--gold-deep); font-size: 0.82rem; }
.field-hint { font-size: 0.8rem; color: var(--ink-soft); }

/* Money and clocks: plain lining figures so 0 and 1 never read as o and I */
.stat .s-value, .top-clock .t1, .clock-hero .big-time, .sum-row strong, .pos-change, .money, .hb-val,
.att-time, .att-total { font-variant-numeric: lining-nums tabular-nums; }

/* Touch screens: no "stuck" lifted cards after a tap */
@media (hover: none) {
  .role-btn:hover, .staff-tile:hover, .quick-card:hover { transform: none; }
}

/* tappable table rows (signed consent forms) */
.tbl tr.row-tap { cursor: pointer; }
.tbl tr.row-tap:active td { background: #fdeef6; }

/* face clock-in */
.acct-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.face-btn { margin-top: 14px; }
.face-status { min-height: 1.6em; margin-top: 10px; font-size: 1.05rem; text-align: center; color: var(--ink); }
.face-status.ok { color: var(--blue-deep); font-size: 1.15rem; }
/* Face registration: one guided step per angle */
.fr-step { margin: 0 0 2px; font-size: 0.9rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.fr-pose { min-height: 1.8em; margin: 0 0 10px; font-size: 1.25rem; font-weight: 500; color: var(--blue-deep); }
.fr-icon { display: inline-block; margin-right: 6px; font-size: 1.4rem; vertical-align: -2px; }
.fr-cam { max-height: 40dvh; }
.fr-count {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: 'Cormorant Garamond', serif; font-size: 7rem; line-height: 1; color: var(--white);
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.45); pointer-events: none;
}
.fr-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.fr-strip li { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 0.78rem; color: var(--ink-soft); }
.fr-thumb {
  display: grid; place-items: center; width: 100%; aspect-ratio: 1; overflow: hidden;
  border: 2px dashed var(--pink-300); border-radius: 12px; background: var(--pink-50);
  font-size: 1.1rem; color: var(--ink-soft);
}
.fr-thumb img { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
.fr-strip li.now .fr-thumb { border: 2px solid var(--blue); background: #e7f0fb; color: var(--blue-deep); }
.fr-strip li.now small { color: var(--blue-deep); font-weight: 500; }
.fr-strip li.done .fr-thumb { border: 2px solid var(--good); }

/* ─────────── Phone (the owner checks the clinic on a phone) ─────────── */
.nav-more { display: none; background: none; }
.more-me { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.more-me .u-name { font-weight: 500; line-height: 1.2; }
.more-me .u-role { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pink-text); }
.more-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.more-link {
  display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 14px;
  border: 1.5px solid var(--pink-200); border-radius: 16px; background: var(--white);
  font: inherit; font-size: 0.98rem; font-weight: 400; color: var(--ink); text-align: left;
}
.more-link svg { width: 22px; height: 22px; flex: none; color: var(--pink-text); }
.more-link.active { border-color: var(--blue); color: var(--blue-deep); font-weight: 500; }
.more-link.active svg { color: var(--blue); }
.more-acct { display: grid; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--pink-200); }
.more-acct .btn { width: 100%; }
/* iPad side menu taller than the screen (iPad held sideways, Safari toolbar, landscape phone):
   it scrolls instead of pushing Sign out off the bottom */
@media (min-width: 641px) { .sidebar { overflow-y: auto; overscroll-behavior: contain; } }

@media (max-width: 640px) {
  .topbar { padding: 14px 16px 0; gap: 10px; }
  .topbar h1 { font-size: 1.55rem; }
  .top-clock .t1 { font-size: 1.05rem; }
  .top-clock .t2 { font-size: 0.72rem; }
  .view { padding-left: 14px; padding-right: 14px; gap: 14px; }
  .card { padding: 18px 16px; }
  .grid { gap: 14px; }
  /* a long button label may take two lines on a phone rather than be cut off
     (popup buttons stay on one line and move to their own row instead) */
  .btn { white-space: normal; }
  /* sign-up and form steps: a compact Back, the main button takes the rest of the row */
  .kiosk-card { padding: 22px 18px; }
  .kiosk-actions { gap: 10px; }
  .kiosk-actions .btn { padding-left: 18px; padding-right: 18px; }
  .kiosk-actions .btn-ghost { flex: none; white-space: nowrap; }
  .kiosk-actions .btn:not(.btn-ghost) { flex: 1 1 auto; }

  /* a title with its note or button: the extra part drops below instead of squeezing */
  .card-title { flex-wrap: wrap; row-gap: 8px; }
  .card-title > div { flex-wrap: wrap; }
  .card-title .btn, .toolbar .btn { flex: none; white-space: nowrap; }
  .btn > svg { width: 20px; height: 20px; flex: none; }
  .card-title .field { flex: 1 1 160px; }
  .card-title .field input { min-width: 0 !important; }
  .toolbar > .btn { flex: 1 1 100%; }

  /* Home: the three actions as one row of tiles, so today's numbers show without scrolling */
  .quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .quick-card { flex-direction: column; justify-content: flex-start; gap: 8px; min-height: 0; padding: 14px 8px 12px; text-align: center; }
  .quick-card .qc-ico { width: 46px; height: 46px; border-radius: 14px; }
  .quick-card .qc-txt strong { font-size: 0.9rem; line-height: 1.25; }
  .quick-card .qc-txt small { display: none; }

  /* today's numbers two to a row instead of one screen each */
  .grid:has(> .stat) { grid-template-columns: 1fr 1fr; gap: 10px; }
  .grid:has(> .stat) > .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .stat { padding: 14px; }
  .stat .s-label { font-size: 0.64rem; letter-spacing: 0.14em; padding-right: 12px; }
  .stat .s-value { font-size: 1.55rem; overflow-wrap: anywhere; }
  .stat .s-foot { font-size: 0.76rem; line-height: 1.35; }
  .stat::after { right: 10px; top: 8px; }

  /* lists: each row becomes a small card of "label / value" pairs, so nothing
     hides off the right edge (labels come from the column titles, see app.js) */
  .table-wrap { overflow-x: visible; }
  table.tbl, .tbl tbody { display: block; width: 100%; }
  .tbl thead { display: none; }
  .tbl tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 14px; padding: 12px 2px; border-bottom: 1px dashed var(--pink-200); }
  .tbl tr:last-child { border-bottom: 0; }
  .tbl td { display: block; padding: 0; border: 0; min-width: 0; text-align: left; overflow-wrap: anywhere; }
  .tbl td.num { text-align: left; }
  .tbl td::before {
    content: attr(data-label); display: block; margin-bottom: 1px;
    font-size: 0.64rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--pink-text);
  }
  .tbl td[data-label=""]::before, .tbl td:not([data-label])::before, .tbl td.t-empty::before { display: none; }
  .tbl td.t-empty { grid-column: 1 / -1; text-align: center; }
  .tbl tr.rowbtn, .tbl tr.row-tap { position: relative; padding-right: 24px; }
  .tbl tr.rowbtn::after, .tbl tr.row-tap::after {
    content: '›'; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    font-size: 1.5rem; line-height: 1; color: var(--pink-300);
  }
  .tbl tr.rowbtn:active { background: var(--pink-50); }
  .att-note { max-width: none; }

  /* charts: name and amount on one line, the bar underneath at full width */
  .hbar-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 6px 0; }
  .hbar-row .hb-track { grid-column: 1 / -1; grid-row: 2; height: 10px; }

  /* popups rise from the bottom (thumb reach), full width */
  dialog.modal {
    width: 100%; max-width: 100%; margin: auto 0 0;
    max-height: calc(100dvh - 10px);
    border-radius: 22px 22px 0 0;
    animation: sheetUp 0.28s var(--ease);
  }
  .modal-inner { padding: 22px 18px calc(18px + env(safe-area-inset-bottom)); }
  .modal-inner h3 { font-size: 1.3rem; }
  /* a long form keeps its main buttons on screen while it scrolls */
  dialog.modal .modal-inner > .modal-actions:last-child {
    position: sticky; bottom: 0; z-index: 2;
    margin: 18px -18px 0; padding: 12px 18px 4px;
    background: var(--white); border-top: 1px solid var(--pink-100);
  }
  .modal-actions { flex-wrap: wrap; }
  .modal-actions .btn { flex: 1 1 auto; white-space: nowrap; padding-left: 18px; padding-right: 18px; }
  .modal-actions > span { flex-wrap: wrap; }

  /* messages at the top, where they never cover the menu or a popup's buttons */
  .toast-zone { top: calc(10px + env(safe-area-inset-top)); bottom: auto; width: calc(100% - 24px); }
  .toast { justify-content: center; text-align: center; border-radius: 16px; }

  .drawer { width: 100%; padding: 18px 14px calc(28px + env(safe-area-inset-bottom)); }
  .loc-strip { gap: 8px 18px; }
  .pending-row .pr-svcs { white-space: normal; max-width: none; }
}
@keyframes sheetUp { from { transform: translateY(48px); opacity: 0.4; } to { transform: none; opacity: 1; } }

/* ─────────── The owner's days out (Leaves page, Home, Bookings) ─────────── */
.dout-wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 22px; margin-top: 14px; align-items: start; }
.dout-cal { background: linear-gradient(180deg, var(--pink-50), var(--white)); border-radius: 20px; padding: 14px 14px 10px;
  box-shadow: inset 0 0 0 1px var(--pink-100); }
.dout-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.dout-head strong { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: var(--ink); }
.dout-nav { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--pink-100); color: var(--pink-text);
  font-size: 1.4rem; line-height: 1; display: grid; place-items: center; }
.dout-nav:disabled { opacity: 0.35; }
.dout-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.dout-wd { text-align: center; font-size: 0.74rem; font-weight: 500; letter-spacing: 0.08em; color: var(--pink-text); padding: 4px 0 6px; }
.dout-day { position: relative; aspect-ratio: 1; min-height: 44px; border: 0; border-radius: 14px; background: transparent;
  font: inherit; font-size: 1rem; color: var(--ink); font-variant-numeric: lining-nums tabular-nums;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  transition: background 0.15s var(--ease), transform 0.15s var(--ease); }
.dout-day:not(:disabled):active { transform: scale(0.94); background: var(--pink-100); }
.dout-day.past { color: var(--ink-soft); }
.dout-day:disabled { color: #c9b9c0; }
.dout-day.today span { box-shadow: 0 0 0 2px var(--gold); border-radius: 50%; width: 30px; height: 30px; display: grid; place-items: center; }
.dout-day.out { background: linear-gradient(160deg, var(--pink-300), var(--pink-400)); color: var(--white); box-shadow: 0 6px 16px -8px rgba(244, 135, 189, 0.9); }
.dout-day.out.other { background: var(--pink-100); color: var(--pink-text); box-shadow: none; }
.dout-day.out.today span { box-shadow: 0 0 0 2px var(--white); }
.dout-day i { font-style: normal; font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; line-height: 1; opacity: 0.95; }
.dout-back { display: block; margin: 4px auto 0; }
.dout-list { display: grid; gap: 8px; }
.dout-list-title { font-size: 0.8rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pink-text); }
.dout-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px;
  border-radius: 16px; background: var(--pink-50); }
.dout-item > div { display: grid; gap: 2px; min-width: 0; }
.dout-item strong { font-weight: 500; }
.dout-item span { color: var(--ink-soft); font-size: 0.9rem; overflow-wrap: anywhere; }
.owner-out { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding: 14px 18px; border-radius: var(--radius);
  background: var(--white); color: var(--ink); box-shadow: var(--shadow-card); }
.owner-out.now { background: linear-gradient(120deg, #fff0f7, #fde3f0); }
.owner-out .oo-ico { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--pink-100); color: var(--pink-text); }
.owner-out .oo-ico svg { width: 22px; height: 22px; }
.owner-out .oo-txt { display: grid; gap: 2px; min-width: 0; }
.owner-out strong { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }
.owner-out small { color: var(--ink-soft); font-size: 0.9rem; }
.bk-out { margin: 0 0 10px; padding: 10px 14px; border-radius: 14px; background: #fff0f7; color: var(--pink-text); font-size: 0.95rem; }
@media (max-width: 900px) { .dout-wrap { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .dout-cal { padding: 10px 8px 8px; }
  .dout-grid { gap: 2px; }
  .dout-day { border-radius: 12px; }
}

/* ─────────── Leaves & monthly attendance evaluation ─────────── */
.month-nav { display: flex; align-items: center; gap: 6px; }
.month-nav input[type="month"], .month-nav select {
  min-height: 44px; padding: 6px 10px; font: inherit; font-size: 16px; color: var(--ink);
  border: 1.5px solid var(--pink-200); border-radius: 12px; background-color: var(--white);
}
.month-nav select { padding-right: 38px; background-position: right 12px center; }
.month-nav .dp-trigger { flex: 0 1 210px; width: 210px; min-height: 44px; padding: 6px 12px; border-radius: 12px; font-size: 1rem; }
.month-nav .btn { min-width: 44px; padding: 8px 12px; font-size: 1.2rem; }
.ev-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ev-sum div { background: var(--pink-50); border: 1px solid var(--pink-200); border-radius: 12px; padding: 8px 10px; }
.ev-sum span { display: block; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pink-text); }
.ev-sum strong { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; color: var(--blue-deep); font-variant-numeric: lining-nums tabular-nums; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-h { text-align: center; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); padding: 2px 0; }
.cal-d {
  min-height: 52px; border-radius: 10px; padding: 4px 6px; display: flex; flex-direction: column; justify-content: space-between;
  background: var(--white); border: 1px solid var(--pink-100); font-variant-numeric: lining-nums tabular-nums;
}
.cal-n { font-weight: 500; font-size: 0.92rem; }
.cal-s { font-size: 0.68rem; line-height: 1.1; }
.cal-d.st-present { background: var(--good-bg); border-color: #bfe3cd; color: var(--good); }
.cal-d.st-leave, .cal-d.st-half_leave { background: #e7f0fb; border-color: #c9dcf3; color: var(--blue-deep); }
.cal-d.st-half_leave { background: linear-gradient(135deg, #e7f0fb 50%, #fbe4e4 50%); }
.cal-d.st-absent { background: #fbe4e4; border-color: #f1c2bd; color: #a2372f; }
.cal-d.st-rest, .cal-d.st-closed, .cal-d.st-left { background: #f4f1f3; color: var(--ink-soft); border-color: #ebe5e9; }
.cal-d.st-rest_worked, .cal-d.st-closed_worked { background: #f4f1f3; color: var(--good); border: 1.5px dashed #9fd2b4; }
.cal-d.st-upcoming, .cal-d.st-not_started { background: transparent; color: #b9aab1; border-style: dashed; }
.ev-sum.ev-sum-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.nowrap { white-space: nowrap; }
.ev-flags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
/* a flag under its number in the evaluation table (keeps the table narrow on an iPad) */
.flag-chip { display: flex; width: max-content; margin: 3px 0 0 auto; font-size: 0.72rem; padding: 2px 8px; }
.chip-under { display: flex; width: max-content; margin-top: 3px; }
@media (max-width: 640px) { .flag-chip, .chip-under { display: inline-flex; margin: 0 0 0 6px; } }
/* a late day: present, with an amber edge and "Late 20m" */
.cal-d.st-present.late { background: var(--warn-bg); border-color: #f0c98a; color: var(--warn); box-shadow: inset 0 -3px 0 #e9a23b; }
.strike-list { display: grid; gap: 6px; margin: 8px 0; }
.strike-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; border-radius: 10px; background: #fbe4e4; color: #7c2a24; font-size: 0.92rem; }
.day-picks { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.day-pick { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 12px; border: 1.5px solid var(--pink-200); border-radius: 999px; background: var(--white); cursor: pointer; }
.day-pick input { width: 20px; height: 20px; accent-color: var(--blue); }
@media (max-width: 640px) {
  .ev-sum, .ev-sum.ev-sum-5 { grid-template-columns: 1fr 1fr; }
  .ev-sum.ev-sum-5 > div:last-child { grid-column: 1 / -1; }
  .strike-row { flex-wrap: wrap; }
  .cal-d { min-height: 46px; padding: 3px 4px; }
  .cal-s { font-size: 0.6rem; }
  .month-nav { width: 100%; }
  .month-nav input[type="month"], .month-nav select, .month-nav .dp-trigger { flex: 1 1 0; min-width: 0; width: auto; }
}
/* a payslip: a receipt-like card, the same for the owner and the person */
.payslip { padding: 14px 16px; border: 1.5px solid var(--pink-200); border-radius: 14px; background: var(--white); font-variant-numeric: lining-nums tabular-nums; }
.ps-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--pink-100); }
.ps-head strong { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--blue-deep); }
.ps-head span { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-deep); }
.ps-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.ps-meta span { display: block; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pink-text); }
.ps-meta strong { font-weight: 500; }
.ps-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--pink-100); }
.ps-line .money { white-space: nowrap; font-weight: 500; color: var(--blue-deep); }
.ps-line.neg .money { color: #a2372f; }
.ps-line.ps-net { border-bottom: 0; border-top: 3px double var(--gold); margin-top: 4px; padding-top: 10px; }
.ps-line.ps-net span:first-child { font-weight: 600; }
.ps-line.ps-net .money { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; }
.ps-adj { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.tbl .num .att-note { white-space: normal; margin-left: auto; }   /* the note under an amount wraps */
.ps-paid { margin-top: 6px; color: var(--ink-soft); font-size: 0.9rem; }
.ps-paid .chip { margin-right: 4px; }
#psPayBox .paybar { margin-bottom: 4px; }
/* staff PINs: big digits shown as dots (not a password field, so no browser offers to save it) */
.pin-input { font-size: 1.6rem !important; letter-spacing: 0.5em; text-align: center; -webkit-text-security: disc; max-width: 220px; font-variant-numeric: tabular-nums; }
.pin-field { margin-top: 12px; }
.pin-field .field-hint { display: block; margin-top: 4px; }
@media (max-width: 640px) {
  .payslip { padding: 12px; }
  .ps-meta { grid-template-columns: 1fr 1fr; }
  .ps-meta > div:first-child { grid-column: 1 / -1; }
}
.modal h3[tabindex="-1"]:focus { outline: none; }

/* ─────────── Public booking page (book.html) ─────────── */
.book-wrap { max-width: 680px; margin: 0 auto; padding: 24px 16px 40px; padding-bottom: max(40px, env(safe-area-inset-bottom)); }
.book-head { text-align: center; margin-bottom: 18px; }
.book-head svg { width: 96px; height: 96px; }
.book-head h1 { font-size: 2rem; margin-top: 4px; }
.book-head p { color: var(--ink-soft); font-size: 0.92rem; }
.book-train { margin-bottom: 14px; padding: 10px 14px; border-radius: 12px; background: #f9efdb; color: var(--gold-deep); font-size: 0.88rem; text-align: center; }
.book-card h2 { display: flex; align-items: center; gap: 10px; font-size: 1.35rem; margin-bottom: 10px; }
.book-step + .book-step { margin-top: 22px; padding-top: 20px; border-top: 1px dashed var(--pink-200); }
.book-num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: var(--pink-100); color: var(--pink-text); font-family: var(--sans); font-size: 0.95rem; font-weight: 600; }
.book-tiles { max-height: none; overflow: visible; }
.book-sum { padding: 12px 14px; border-radius: 12px; background: var(--pink-50); border: 1px solid var(--pink-200); }
.book-sum span { display: block; font-size: 0.85rem; color: var(--ink-soft); }
.book-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.book-privacy { font-size: 0.88rem; color: var(--ink-soft); }
.book-privacy summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--blue-deep); }
.book-error { margin-bottom: 10px; padding: 10px 14px; border-radius: 12px; background: #fbe4e4; color: #a2372f; font-size: 0.92rem; }
.book-note { font-size: 0.85rem; color: var(--ink-soft); text-align: center; }
.book-done { text-align: center; padding: 10px 0; }
.book-done h2 { justify-content: center; }
.book-done p { margin: 10px 0; }
.book-foot { margin-top: 18px; text-align: center; font-size: 0.9rem; color: var(--ink-soft); }
.book-foot a, .book-card a { color: var(--blue-deep); }

/* ─────────── Date fields: the brand calendar (js/datepicker.js) ─────────── */
/* the real date input stays in its form for the app and the checks, out of sight */
input.dp-native {
  position: absolute !important; width: 1px !important; min-width: 0 !important; height: 1px !important; min-height: 0 !important;
  margin: -1px !important; padding: 0 !important; border: 0 !important; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; opacity: 0; pointer-events: none;
}
/* the field people tap: looks like every other field, the date in words */
.dp-trigger {
  display: flex; align-items: center; gap: 10px;
  width: 100%; max-width: 100%; min-width: 0; min-height: 44px; padding: 10px 14px;
  font-family: var(--sans); font-size: 1rem; font-weight: 400; line-height: 1.3; color: var(--ink); text-align: left;
  background: var(--white); border: 1.5px solid var(--pink-200); border-radius: 12px;
  font-variant-numeric: lining-nums;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.dp-trigger .dp-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-trigger.dp-empty .dp-text { color: #a8949d; }
.dp-trigger .dp-ico { flex: none; width: 20px; height: 20px; color: var(--pink-text); }
.dp-trigger:active:not(:disabled) { background-color: var(--pink-50); }
.dp-trigger:disabled { background: var(--pink-50); border-color: var(--pink-100); color: var(--ink-soft); cursor: default; }
.dp-trigger:disabled .dp-ico { color: #dcc3cf; }
.dp-trigger.dp-invalid { border-color: #c2453b; box-shadow: 0 0 0 4px rgba(194, 69, 59, 0.12); }
.dp-error { display: block; font-size: 0.86rem; font-weight: 500; color: #a2372f; }
.field .dp-trigger { min-height: 52px; padding: 12px 16px; font-size: 1.05rem; border-radius: 14px; }
.bk-daynav .dp-trigger { padding-left: 12px; padding-right: 12px; }

/* the calendar: next to the field on the iPad, a sheet from the bottom on a phone */
dialog.dp-dlg {
  position: fixed; inset: auto; margin: 0; padding: 0; border: 0;
  width: 360px; max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); overflow: auto;
  border-radius: 20px; background: var(--white); color: var(--ink);
  box-shadow: 0 0 0 1px var(--pink-200), var(--shadow-pop);
  overscroll-behavior: contain;
}
dialog.dp-dlg::backdrop { background: rgba(46, 28, 38, 0.16); }
.dp-panel { position: relative; padding: 12px 14px; }
.dp-for { display: none; }
.dp-dlg button { font-family: var(--sans); -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.dp-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.dp-nav {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%; background: var(--pink-100); color: var(--pink-text);
  transition: background-color 0.15s ease;
}
.dp-nav svg { width: 20px; height: 20px; }
.dp-nav:active:not(:disabled) { background: var(--pink-200); }
.dp-nav:disabled { opacity: 0.35; cursor: default; }
.dp-dlg .dp-title {
  flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 4px 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 12px; background: none;
  font-family: var(--serif); font-size: 1.45rem; font-weight: 600; line-height: 1.1; color: var(--blue-deep);
  font-variant-numeric: lining-nums;
}
.dp-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-title svg { flex: none; width: 16px; height: 16px; color: var(--pink-text); }
.dp-title:active { background: var(--pink-50); }
.dp-view { height: 306px; }   /* the day grid's height, so month and year grids never make it jump */
.dp-wk { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.dp-wk span { padding: 2px 0 6px; text-align: center; font-size: 0.72rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pink-text); }
.dp-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.dp-day {
  min-width: 0; height: 44px; padding: 0; border: 0; border-radius: 999px; background: none;
  font-size: 1rem; font-weight: 400; color: var(--ink); font-variant-numeric: lining-nums tabular-nums;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.dp-day.dp-out { color: #b8a5ae; }
.dp-day.dp-today { box-shadow: inset 0 0 0 2px var(--gold); color: var(--gold-deep); font-weight: 600; }
.dp-day.dp-sel {
  background: linear-gradient(135deg, var(--blue-cta), var(--blue-deep)); color: var(--white); font-weight: 600;
  box-shadow: 0 8px 18px -10px rgba(43, 100, 168, 0.75);
}
.dp-day.dp-sel.dp-today { box-shadow: inset 0 0 0 2px var(--gold), 0 8px 18px -10px rgba(43, 100, 168, 0.75); }
.dp-day:active:not(.dp-sel):not([aria-disabled="true"]) { background: var(--pink-100); }
.dp-day[aria-disabled="true"], .dp-cell[aria-disabled="true"] {
  color: #d7c7cf; cursor: default; text-decoration: line-through; text-decoration-color: rgba(157, 77, 116, 0.28);
}
.dp-cells { display: grid; gap: 8px; height: 100%; grid-auto-rows: 1fr; }
.dp-months { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dp-years { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dp-cell {
  min-width: 0; min-height: 44px; padding: 0 4px;
  border: 1.5px solid var(--pink-200); border-radius: 14px; background: var(--white);
  font-size: 1rem; font-weight: 400; color: var(--ink); font-variant-numeric: lining-nums tabular-nums;
  transition: background-color 0.15s ease;
}
.dp-cell.dp-today { border-color: var(--gold); color: var(--gold-deep); font-weight: 500; }
.dp-cell.dp-sel { border-color: transparent; background: linear-gradient(135deg, var(--blue-cta), var(--blue-deep)); color: var(--white); font-weight: 500; }
.dp-cell:active:not(.dp-sel):not([aria-disabled="true"]) { background: var(--pink-100); }
.dp-cell[aria-disabled="true"] { background: var(--pink-50); border-color: var(--pink-100); }
.dp-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--pink-200); }
.dp-sp { flex: 1; }
.dp-act {
  min-height: 44px; padding: 8px 18px; border-radius: 999px;
  border: 1.5px solid var(--pink-200); background: var(--white); color: var(--blue-deep);
  font-size: 0.95rem; font-weight: 500;
}
.dp-act-today { border-color: transparent; background: var(--pink-100); color: var(--pink-text); }
.dp-act-clear { border-color: transparent; padding-left: 8px; padding-right: 8px; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; }
.dp-act:active { filter: brightness(0.97); }
.dp-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* a keyboard ring that keeps each button's own shape */
.dp-dlg button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.dp-dlg .dp-day:focus-visible, .dp-dlg .dp-act:focus-visible { border-radius: 999px; }
.dp-dlg .dp-nav:focus-visible { border-radius: 50%; }
.dp-dlg .dp-title:focus-visible { border-radius: 12px; }
.dp-dlg .dp-cell:focus-visible { border-radius: 14px; }
@media (hover: hover) {
  .dp-trigger:hover:not(:disabled):not(.dp-invalid) { border-color: var(--pink-300); }
  .dp-day:hover:not(.dp-sel):not([aria-disabled="true"]), .dp-cell:hover:not(.dp-sel):not([aria-disabled="true"]) { background: var(--pink-50); }
  .dp-nav:hover:not(:disabled) { background: var(--pink-200); }
  .dp-title:hover { background: var(--pink-50); }
}
@media (prefers-reduced-motion: no-preference) {
  dialog.dp-dlg[open] { animation: dpPop 0.16s var(--ease); }
}
@keyframes dpPop { from { opacity: 0; transform: translateY(-4px) scale(0.98); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
  dialog.dp-dlg {
    inset: auto 0 0 0; width: 100%; max-width: 100%;
    max-height: calc(100vh - 10px); max-height: calc(100dvh - 10px);
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -12px 40px -18px rgba(74, 59, 65, 0.4);
  }
  dialog.dp-dlg::backdrop { background: rgba(46, 28, 38, 0.45); }
  .dp-panel { padding: 10px 14px calc(12px + env(safe-area-inset-bottom)); }
  .dp-for:not(:empty) {
    display: block; margin: 2px 2px 6px; text-align: center;
    font-size: 0.76rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pink-text);
  }
  .dp-act { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 640px) and (prefers-reduced-motion: no-preference) {
  dialog.dp-dlg[open] { animation: sheetUp 0.28s var(--ease); }
}

/* ─────────── Every field: one focus look, one "can't change" look ─────────── */
/* (last in the file so it wins over each field's own border; checkboxes keep their ring) */
:is(input:not([type="checkbox"], [type="radio"], [type="file"], [type="range"], [type="color"]), select, textarea, .dp-trigger):focus-visible,
:is(input:not([type="checkbox"], [type="radio"], [type="file"], [type="range"], [type="color"]), select, textarea):focus,
.dp-trigger[aria-expanded="true"] {
  border-color: var(--blue); outline: none; box-shadow: 0 0 0 4px rgba(59, 140, 224, 0.14);
}
.dp-trigger:focus-visible, .dp-trigger[aria-expanded="true"] { border-radius: 12px; }
.field .dp-trigger:focus-visible, .field .dp-trigger[aria-expanded="true"] { border-radius: 14px; }
.month-nav .dp-trigger:focus-visible, .month-nav .dp-trigger[aria-expanded="true"] { border-radius: 12px; }
.dp-trigger.dp-invalid:focus-visible { border-color: #c2453b; box-shadow: 0 0 0 4px rgba(194, 69, 59, 0.16); }
:is(input:not([type="checkbox"], [type="radio"], [type="file"], [type="range"], [type="color"]), select, textarea):disabled {
  background-color: var(--pink-50); border-color: var(--pink-100);
  color: var(--ink-soft); -webkit-text-fill-color: var(--ink-soft); opacity: 1; cursor: default;
}
@media (hover: hover) {
  :is(input:not([type="checkbox"], [type="radio"], [type="file"], [type="range"], [type="color"]), select, textarea):not(:disabled):not(:focus):hover { border-color: var(--pink-300); }
}
