/* ============================================================
   XDress "Maison Clair" — Clarity layer (v1)
   Loaded LAST on every page. Two jobs, one file:
   1. Grandma-easy: sentence case, bigger type, bigger targets,
      one idea per line — readable at arm's length.
   2. Award polish: calm ivory canvas, soft depth, confident
      serif moments. Professional, never busy.
   ============================================================ */

/* ---------------- Sentence case, readable sizes ----------------
   The micro-uppercase aesthetic reads "premium" but is hard work
   for older eyes. Labels become normal-case and grow up. */
.btn {
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  padding-inline: 18px;
  gap: 8px;
  border-radius: var(--r-full);
}
.btn-sm { height: 32px; padding-inline: 14px; font-size: 13px; }
.btn .icon-sm { width: 16px; height: 16px; }

.chip {
  height: 34px;
  padding-inline: 15px;
  font-size: var(--fs-sm);
  font-weight: 550;
  letter-spacing: 0;
  text-transform: none;
}
.tabs button {
  font-size: var(--fs-sm);
  letter-spacing: 0;
  text-transform: none;
  padding: 12px 15px;
}
.segmented button {
  font-size: var(--fs-sm);
  letter-spacing: 0;
  text-transform: none;
  padding-inline: 16px;
}
.pill {
  height: 26px;
  padding-inline: 11px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .01em;
  text-transform: none;
}
.tbl th {
  font-size: 12.5px;
  letter-spacing: .02em;
  text-transform: none;
  font-weight: 650;
}
.card-head h3 {
  font-size: var(--fs-md);
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
}
.card-link { font-size: var(--fs-sm); letter-spacing: 0; text-transform: none; font-weight: 600; }
.kpi-label, .stat-grid .s-label, .smallcaps, .tri-head {
  font-size: 12.5px; letter-spacing: .04em;
}
.field > label { font-size: var(--fs-sm); letter-spacing: .01em; text-transform: none; font-weight: 600; color: var(--text-2); }
.menu-label { font-size: var(--fs-xs); letter-spacing: .04em; text-transform: none; }
.crumbs { font-size: var(--fs-sm); letter-spacing: .01em; text-transform: none; font-weight: 550; }
.top-ctl { font-size: var(--fs-sm); letter-spacing: 0; text-transform: none; font-weight: 550; height: 38px; }
.palette-group { font-size: var(--fs-xs); letter-spacing: .04em; text-transform: none; }
.kanban-col-head { font-size: var(--fs-sm); letter-spacing: .01em; text-transform: none; }
.cal-day-head { font-size: var(--fs-xs); letter-spacing: .04em; }
.bc-name, .chart-tip .tt-day, .ag-now, .mast-kicker, .sb-brand-sub, .ps-label {
  letter-spacing: .08em; /* a few jewellery moments keep their tracking */
}
.ps-label { font-size: 12px; text-transform: none; letter-spacing: .02em; font-weight: 600; }

/* ---------------- Bigger, friendlier furniture ---------------- */
svg.icon { width: 18px; height: 18px; }
svg.icon-sm { width: 16px; height: 16px; }
.icon-btn { border-radius: var(--r-full); }
.input { font-size: var(--fs-base); padding-inline: 14px; border-radius: var(--r-md); }
.avatar { width: 32px; height: 32px; font-size: 11.5px; }
.avatar.av-lg { width: 48px; height: 48px; font-size: 15px; }
.count-badge { min-width: 21px; height: 21px; font-size: 12px; }
.kbd { font-size: 11px; }
.menu-item { padding: 10px 12px; font-size: var(--fs-base); border-radius: var(--r-sm); }
.menu { min-width: 230px; }

/* ---------------- Sidebar — maison rail, enhanced ----------------
   Big icon tiles, an always-there "New booking" action, the daily
   seven up top, Reports & Settings pinned at the bottom. */
.sb-item {
  height: 48px;
  padding-inline: 9px;
  gap: 12px;
  font-size: var(--fs-base);
  border-radius: var(--r-md);
  margin-bottom: 3px;
}
.sb-item .sb-ico {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3);
  background: transparent;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-med), box-shadow var(--t-med);
}
.sb-item .icon { width: 19px; height: 19px; }
.sb-item:hover .sb-ico { background: var(--accent-softer); color: var(--accent-strong, var(--accent)); transform: translateY(-1px); }
.sb-item.active { font-weight: 650; background: var(--accent-softer); }
.sb-item.active .sb-ico {
  background: var(--accent);
  box-shadow: 0 4px 12px color-mix(in oklab, var(--accent) 35%, transparent);
}
/* beat layout.css's `.sb-item.active .icon { color: var(--accent) }`,
   which would paint the glyph gold-on-gold (invisible) */
.sb-item.active .sb-ico .icon { color: var(--on-accent); }
.sb-item:hover .sb-ico .icon { color: var(--accent-strong, var(--accent)); }
.sb-item.active:hover .sb-ico .icon { color: var(--on-accent); }
/* the filled tile IS the indicator — the old edge rail just peeks out
   from under the rounded row as a glitchy notch. Kill it. */
.sb-item.active::before { display: none; }
.sb-item .count-badge { margin-inline-end: 3px; }

/* section whisper-labels — structure without noise */
.sb-group-label {
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700;
  padding: 6px 12px 9px;
  color: color-mix(in oklab, var(--accent-strong, var(--accent)) 45%, var(--text-3));
}
.sb-nav-bottom .sb-group-label { padding-top: 12px; }
.sb-search { height: 40px; border-radius: var(--r-full); font-size: var(--fs-sm); }
.sb-nav { padding-inline: 12px; padding-top: 8px; }

/* keyboard hints — appear on hover, power users only */
.sb-kbd { opacity: 0; transition: opacity var(--t-fast); margin-inline-end: 3px; }
.sb-item:hover .sb-kbd { opacity: .9; }
.app.sb-collapsed .sb-kbd { display: none; }

/* urgent badge breathes gently */
@media (prefers-reduced-motion: no-preference) {
  .count-badge.urgent { animation: badge-pulse 3.2s var(--ease) infinite; }
  @keyframes badge-pulse {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--bad) 35%, transparent); }
    45%      { box-shadow: 0 0 0 5px transparent; }
  }
}

/* sync status — quiet trust signal above the profile */
.sb-sync {
  flex: none; display: flex; align-items: center; gap: 8px;
  margin: 4px 22px 4px; padding-block: 8px;
  font-size: 11.5px; color: var(--text-3);
  border-top: 1px solid var(--border);
}
.sb-sync .sync-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-sync .sync-time { font-variant-numeric: tabular-nums; opacity: .8; }
.sync-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }
@media (prefers-reduced-motion: no-preference) {
  .sync-dot { animation: badge-pulse 4s var(--ease) infinite; }
}
.app.sb-collapsed .sb-sync { justify-content: center; margin-inline: 10px; }
.app.sb-collapsed .sb-sync .sync-text, .app.sb-collapsed .sb-sync .sync-time { display: none; }

/* collapsed-rail tooltip (fixed-position, injected by app.js) */
.sb-tip {
  position: fixed; z-index: 220; transform: translateY(-50%);
  background: var(--text); color: var(--bg);
  padding: 7px 12px; border-radius: 9px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
  box-shadow: var(--shadow-2); pointer-events: none;
  animation: sbtip-in .14s var(--ease);
}
@keyframes sbtip-in { from { opacity: 0; transform: translateY(-50%) translateX(-3px); } }
html[dir="rtl"] .sb-tip { animation-name: sbtip-in-rtl; }
@keyframes sbtip-in-rtl { from { opacity: 0; transform: translateY(-50%) translateX(3px); } }

/* the one action that matters, always within thumb's reach */
.sb-new {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  margin: 2px 14px 10px; height: 46px; flex: none;
  border-radius: var(--r-full);
  background: var(--accent); color: var(--on-accent);
  font-size: var(--fs-base); font-weight: 650;
  box-shadow: 0 4px 14px color-mix(in oklab, var(--accent) 32%, transparent),
              inset 0 1px 0 oklch(1 0 0 / .25);
  transition: filter var(--t-fast), transform var(--t-fast), box-shadow var(--t-med);
  white-space: nowrap; overflow: hidden;
}
.sb-new:hover { filter: brightness(1.08); transform: translateY(-1px);
  box-shadow: 0 7px 20px color-mix(in oklab, var(--accent) 40%, transparent),
              inset 0 1px 0 oklch(1 0 0 / .25); }
.sb-new:active { transform: translateY(0); }
.sb-new .icon { width: 18px; height: 18px; }

/* Reports & Settings pinned above the profile */
.sb-nav-bottom { flex: none; padding: 0 12px 6px; }
.sb-sep { border-top: 1px solid var(--border); margin: 6px 4px 10px; }

/* active tile: jewel finish — inner highlight + soft drop */
.sb-item.active .sb-ico {
  background: linear-gradient(150deg,
    color-mix(in oklab, var(--accent) 88%, white) 0%,
    var(--accent) 55%,
    var(--accent-strong, var(--accent)) 100%);
  box-shadow: 0 4px 12px color-mix(in oklab, var(--accent) 38%, transparent),
              inset 0 1px 0 oklch(1 0 0 / .35);
}

/* nav scroll: long lists fade out at the bottom edge */
.sb-nav {
  mask-image: linear-gradient(to bottom, black calc(100% - 24px), transparent);
  -webkit-mask-image: linear-gradient(to bottom, black calc(100% - 24px), transparent);
}

/* profile card */
.sb-org { border-radius: var(--r-lg); padding: 10px; }
.sb-org-avatar { width: 36px; height: 36px; font-size: 12.5px; flex: none; position: relative; }
.sb-org-avatar::after {
  content: ""; position: absolute; bottom: -1px; inset-inline-end: -1px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--ok); border: 2px solid var(--bg-deep);
}
.sb-org .org-name { font-size: var(--fs-sm); font-weight: 650; line-height: 1.3; }
.sb-org .org-plan { font-size: var(--fs-xs); color: var(--text-3); }

/* collapsed sidebar keeps everything reachable */
.app.sb-collapsed .sb-new { width: 46px; padding: 0; margin-inline: auto; }
.app.sb-collapsed .sb-new .label { display: none; }
.app.sb-collapsed .sb-item { justify-content: center; padding-inline: 0; }
.app.sb-collapsed .sb-nav-bottom .sb-item { justify-content: center; }
.app.sb-collapsed .sb-org-avatar { margin-inline: auto; }
.sb-mini { cursor: pointer; }
.app.sb-collapsed .sb-collapse {
  background: var(--accent-softer); color: var(--accent-strong, var(--accent));
}
.app.sb-collapsed .sb-collapse:hover { background: var(--accent-soft); }

/* toasts — big enough to actually read */
.toast { padding: 16px 18px; min-width: 300px; max-width: 420px; border-radius: var(--r-lg); }
.toast .t-title { font-size: var(--fs-md); }
.toast .t-sub { font-size: var(--fs-sm); }
.toast .t-icon { width: 34px; height: 34px; }

/* focus — thick, unmissable */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------------- Light canvas, quieter ornament ---------------- */
:root[data-theme="light"] {
  --bg: oklch(0.972 0.008 88);            /* warm gallery ivory */
  --bg-deep: oklch(0.952 0.010 87);
  --panel: oklch(0.995 0.003 90);
  --text: oklch(0.235 0.022 60);
  --text-2: oklch(0.42 0.025 65);
  --text-3: oklch(0.50 0.024 68);
  --shadow-1: 0 1px 2px oklch(0.4 0.04 70 / .06);
  --shadow-2: 0 8px 28px oklch(0.4 0.04 70 / .09);
}
:root[data-theme="light"] body::after { opacity: .02; }   /* fainter grain */
:root[data-theme="light"] .foil {
  /* darker gold so headline numerals stay legible on ivory */
  background: linear-gradient(102deg, #8a6a35 0%, #c39a58 38%, #7c5e2d 70%, #b08a48 100%);
  -webkit-background-clip: text; background-clip: text;
}
:root[data-theme="light"] .card { border-color: oklch(0.3 0.04 70 / 0.09); }

/* hover lift was a little jumpy — settle it down */
.card:hover { transform: none; }

/* ---------------- Booking wizard ---------------- */
.modal.wizard { width: min(680px, 94vw); max-height: 86vh; display: flex; flex-direction: column; }
.wiz-head { display: flex; align-items: flex-start; gap: 12px; padding: 22px 24px 6px; }
.wiz-stepline { font-size: var(--fs-xs); font-weight: 650; color: var(--accent-strong, var(--accent)); margin-bottom: 6px; letter-spacing: .05em; }
.wiz-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.15; }
.wiz-sub { font-size: var(--fs-sm); color: var(--text-2); margin-top: 6px; }
.wiz-dots { display: flex; align-items: center; gap: 8px; padding: 14px 24px 4px; }
.wiz-dot {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 650; font-variant-numeric: lining-nums;
  border: 1.5px solid var(--border-strong); color: var(--text-3); background: var(--panel);
  transition: all var(--t-med);
}
.wiz-dot.now { border-color: var(--accent); color: var(--on-accent); background: var(--accent); }
.wiz-dot.done { border-color: var(--ok); color: var(--ok); background: var(--ok-soft); }
.wiz-line { flex: 1; border-top: 1.5px solid var(--border); }
.wiz-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 24px 8px; }
.wiz-foot {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: 16px 24px 20px; border-top: 1px solid var(--border);
}
.wiz-foot .btn { height: 48px; font-size: var(--fs-md); padding-inline: 26px; }
.wiz-foot .btn[disabled] { opacity: .45; cursor: not-allowed; }
.wiz-foot .spacer { flex: 1; }

.wiz-opts { display: flex; flex-direction: column; gap: 10px; }
.wiz-opts.wiz-grid2 { display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 700px) { .wiz-opts.wiz-grid2 { grid-template-columns: 1fr; } }
.wiz-opt {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 14px 16px; text-align: start;
  border: 1.5px solid var(--border-strong); border-radius: var(--r-lg);
  background: var(--panel);
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
  cursor: pointer;
}
.wiz-opt:hover { border-color: var(--accent-line); background: var(--accent-softer); }
.wiz-opt:active { transform: scale(.99); }
.wiz-opt .wo-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wiz-opt .wo-title { font-size: var(--fs-md); font-weight: 600; line-height: 1.3; }
.wiz-opt .wo-title.item-name { font-size: 17px; }
.wiz-opt .wo-sub { font-size: var(--fs-sm); color: var(--text-2); }
.wiz-opt .wo-note { font-size: var(--fs-xs); color: var(--text-3); margin-top: 2px; }
.wiz-opt .wo-note.ok { color: var(--ok); font-weight: 600; }
.wiz-opt .wo-check { color: transparent; flex: none; transition: color var(--t-fast), transform var(--t-fast); transform: scale(.7); }
.wiz-opt.sel { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-softer); }
.wiz-opt.sel .wo-check { color: var(--accent-strong, var(--accent)); transform: scale(1); }
.wiz-opt.wiz-add {
  justify-content: center; border-style: dashed; background: transparent; color: var(--text-2);
}
.wiz-opt.wiz-add:hover { color: var(--accent-strong, var(--accent)); }

.wiz-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
@media (max-width: 640px) { .wiz-dates { grid-template-columns: 1fr; } }
.wiz-date { height: 54px; font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }
.wiz-date-say { font-size: var(--fs-sm); color: var(--accent-strong, var(--accent)); font-weight: 600; }
.wiz-summary {
  border: 1px solid var(--border-strong); border-radius: var(--r-lg);
  background: var(--accent-softer); padding: 18px 20px;
}
.wiz-summary .ws-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; font-size: var(--fs-base); }
.wiz-summary .ws-row b { font-weight: 650; }
.wiz-summary .ws-cal { width: 32px; height: 32px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; border: 1px solid var(--accent-line); color: var(--accent-strong, var(--accent)); }

/* ---------------- Theme Studio drawer ---------------- */
.drawer.studio { width: min(420px, 94vw); }
.st-head-icon {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent-strong, var(--accent));
  border: 1px solid var(--accent-line);
}
.st-title { font-family: var(--font-display); font-size: 21px; }
.st-sub { font-size: var(--fs-xs); color: var(--text-2); display: block; margin-top: 2px; line-height: 1.45; }
.st-section { display: flex; flex-direction: column; gap: 10px; }
.st-label { font-size: var(--fs-md); font-weight: 650; }
.st-help { font-size: var(--fs-sm); color: var(--text-3); margin-top: -6px; }
.st-accents { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.st-accent, .st-canvas, .st-text {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 13px 8px 11px;
  border: 1.5px solid var(--border-strong); border-radius: var(--r-lg);
  background: var(--panel); cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.st-accent:hover, .st-canvas:hover, .st-text:hover { border-color: var(--accent-line); }
.st-accent:active, .st-canvas:active, .st-text:active { transform: scale(.97); }
.st-accent.sel, .st-canvas.sel, .st-text.sel, .st-custom.sel {
  border-color: var(--accent); background: var(--accent-soft);
  box-shadow: 0 0 0 3px var(--accent-softer);
}
.st-dot { width: 34px; height: 34px; border-radius: 50%; box-shadow: inset 0 0 0 1px oklch(0 0 0 / .08); }
.st-name { font-size: var(--fs-xs); font-weight: 600; color: var(--text-2); text-align: center; line-height: 1.3; }
.st-accent.sel .st-name, .st-canvas.sel .st-name, .st-text.sel { color: var(--text); }
.st-custom {
  display: flex; align-items: center; gap: 13px; margin-top: 2px;
  padding: 12px 14px; border: 1.5px dashed var(--border-strong);
  border-radius: var(--r-lg); cursor: pointer;
  font-size: var(--fs-sm); font-weight: 600; color: var(--text-2);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.st-custom:hover { border-color: var(--accent-line); }
.st-custom.sel { border-style: solid; }
.st-custom input[type="color"] {
  width: 44px; height: 44px; padding: 0; border: none; border-radius: 50%;
  background: none; cursor: pointer; flex: none;
}
.st-custom input[type="color"]::-webkit-color-swatch-wrapper { padding: 3px; }
.st-custom input[type="color"]::-webkit-color-swatch { border-radius: 50%; border: 1px solid var(--border-strong); }
.st-canvases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.st-canvas-chip {
  width: 100%; height: 38px; border-radius: var(--r-sm);
  box-shadow: inset 0 0 0 1px oklch(0 0 0 / .07);
}
.st-textsize { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.st-text { flex-direction: row; justify-content: center; gap: 10px; font-size: var(--fs-sm); font-weight: 600; padding: 14px 10px; }
.st-text span { font-family: var(--font-display); line-height: 1; }

/* ---------------- "Show more" reveal ---------------- */
.reveal-zone[hidden] { display: none; }
.reveal-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; margin-block: calc(var(--gap-page) * .75);
  height: 52px; border-radius: var(--r-full);
  border: 1.5px dashed var(--border-strong);
  font-size: var(--fs-md); font-weight: 600; color: var(--text-2);
  background: transparent;
  transition: all var(--t-fast);
}
.reveal-btn:hover { border-color: var(--accent-line); color: var(--accent-strong, var(--accent)); background: var(--accent-softer); }
.reveal-btn .rv-arrow { transition: transform var(--t-med); }
.reveal-btn.open .rv-arrow { transform: rotate(180deg); }

/* ---------------- Page furniture, calmer ---------------- */
.page-sub, .mast-sub { font-size: var(--fs-md); }
.empty p { font-size: var(--fs-base); max-width: 340px; }
.empty h4 { font-size: var(--fs-xl); }

/* RTL: arrows in wizard footer buttons flip visually via direction — fine as text */

/* compact tables keep breathing room even at new sizes */
.tbl td { padding-block: 12px; }

/* ---------------- Calendar grid scaffold (was inline in calendar.html) ---------------- */
.calx { display: grid; min-width: 840px; }
.calx.day-mode { min-width: 0; }
.calx-gutter { display: flex; flex-direction: column; }
.calx-col { position: relative; border-inline-start: 1px solid var(--border);
  background: repeating-linear-gradient(to bottom, var(--border) 0 1px, transparent 1px 52px); }
.calx-col.today-col { background-color: var(--accent-softer); }
.calx-week-cols { grid-template-columns: 50px repeat(6, minmax(126px, 1fr)); }

/* ---------------- Calendar — readable at a glance ---------------- */
.cal-event { font-size: 12.5px; line-height: 1.35; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.cal-event .ev-title { font-size: 12.5px; }
.cal-day-head .d-num { font-size: 24px; }
.agenda-time { font-size: var(--fs-sm); width: 52px; }

/* ---------------- Calendar — visual finesse pass ---------------- */
/* hour grid: solid hour lines + whisper half-hour lines */
.calx-col {
  background:
    repeating-linear-gradient(to bottom,
      transparent 0 26px, color-mix(in oklab, var(--border) 55%, transparent) 26px 27px, transparent 27px 52px),
    repeating-linear-gradient(to bottom,
      var(--border) 0 1px, transparent 1px 52px);
}
.calx-col.today-col {
  background-color: var(--accent-softer);
  box-shadow: inset 1.5px 0 0 var(--accent-line), inset -1.5px 0 0 var(--accent-line);
}
/* Friday + Saturday columns & headers carry the weekend tint */
.calx-col:nth-child(6):not(.today-col),
.calx-col:nth-child(7):not(.today-col) { background-color: var(--panel-2); }
#calHead .cal-day-head:nth-child(6),
#calHead .cal-day-head:nth-child(7) { background: var(--panel-2); }

/* events: glassy cards with a satin rail */
.cal-event {
  background: linear-gradient(135deg,
    color-mix(in oklab, var(--evc) 20%, var(--panel)) 0%,
    color-mix(in oklab, var(--evc) 9%, var(--panel)) 100%);
  border: 1px solid color-mix(in oklab, var(--evc) 30%, transparent);
  border-inline-start: 3px solid var(--evc);
  box-shadow: 0 1px 3px color-mix(in oklab, var(--evc) 14%, transparent);
  transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
}
.cal-event:hover {
  transform: translateY(-2px);
  border-color: color-mix(in oklab, var(--evc) 55%, transparent);
  box-shadow: 0 8px 22px color-mix(in oklab, var(--evc) 25%, transparent);
}
.cal-event .ev-title { font-weight: 650; }
.cal-event .ev-sub { font-size: 11.5px; opacity: .85; }
.cal-event.conflict {
  border-color: color-mix(in oklab, var(--bad) 50%, transparent);
  border-inline-start-color: var(--bad);
}
.cal-event.conflict::after {
  width: 16px; height: 16px; font-size: 11px;
  box-shadow: 0 2px 8px color-mix(in oklab, var(--bad) 45%, transparent);
}
@media (prefers-reduced-motion: no-preference) {
  .cal-event.conflict::after { animation: badge-pulse 3s var(--ease) infinite; }
}

/* time gutter: refined small-caps hours */
.cal-time {
  font-size: 10.5px; font-weight: 650; letter-spacing: .04em;
  color: var(--text-3); padding-top: 4px;
}

/* day headers: calmer, with a soft hover */
.cal-day-head { padding-block: 12px 10px; transition: background var(--t-fast); }
.cal-day-head .d-num { margin-top: 3px; }
.cal-day-head.today { background: var(--accent-softer); }

/* agenda: time as a quiet chip, satin rail rows */
.agenda-item { gap: 12px; padding-block: 12px; }
.agenda-time {
  width: auto; min-width: 54px; height: fit-content;
  text-align: center; padding: 5px 8px;
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-weight: 650; line-height: 1.25; color: var(--text-2);
}
.agenda-item.next .agenda-time {
  background: var(--accent); color: var(--on-accent); border-color: transparent;
  box-shadow: 0 3px 10px color-mix(in oklab, var(--accent) 30%, transparent);
}
.agenda-rail { width: 3px; border-radius: 2px; }

/* month grid cells: soft lift on hover */
.cm-day:not(.pad) { transition: background var(--t-fast), box-shadow var(--t-fast); }
.cm-day.has-ev:hover { box-shadow: inset 0 0 0 2px var(--accent-line); }

/* "TODAY" tag in the day header */
.today-tag {
  display: block; margin: 3px auto 0; width: fit-content;
  font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--on-accent); background: var(--accent);
  padding: 2px 8px; border-radius: var(--r-full);
}

/* live "now" line across today's column */
.cal-now {
  position: absolute; inset-inline: 0; z-index: 4; pointer-events: none;
  display: flex; flex-direction: column;
}
.cal-now i { display: block; border-top: 2px solid var(--bad); position: relative; }
.cal-now i::before {
  content: ""; position: absolute; top: -5px; inset-inline-start: -1px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--bad);
}
.cal-now b {
  align-self: flex-start; margin: 0 0 2px 6px;
  font-size: 10px; font-weight: 700; letter-spacing: .06em;
  color: var(--bad); background: var(--bad-soft);
  padding: 1px 7px; border-radius: var(--r-full);
  transform: translateY(-100%);
  position: absolute; top: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .cal-now i::before { animation: badge-pulse 2.6s var(--ease) infinite; }
}

/* month view */
.cal-month {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 1px; background: var(--border); padding: 1px;
}
.cm-head {
  background: var(--panel-2); padding: 10px 8px; text-align: center;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-3);
}
.cm-day {
  background: var(--panel); min-height: 92px; padding: 9px 10px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 5px;
  text-align: start; cursor: pointer;
  transition: background var(--t-fast);
}
.cm-day:hover { background: var(--accent-softer); }
.cm-day.pad { cursor: default; background: var(--panel-2); opacity: .55; }
.cm-day .cm-num { font-family: var(--font-display); font-size: 17px; line-height: 1; color: var(--text-2); }
.cm-day.today { box-shadow: inset 0 0 0 2px var(--accent); }
.cm-day.today .cm-num {
  color: var(--on-accent); background: var(--accent);
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.cm-day .cm-dots { display: flex; gap: 4px; }
.cm-day .cm-dots i { width: 7px; height: 7px; border-radius: 50%; }
.cm-day .cm-count { font-size: var(--fs-xs); color: var(--text-3); font-weight: 600; }
.cm-day.has-ev .cm-count { color: var(--accent-strong, var(--accent)); }

/* ---------------- Brand logo (logo/ PNGs) ----------------
   *-trans.png are generated transparent versions of the brand files
   (cream chroma-keyed out); wrappers crop the generous canvas padding
   to the measured content box. */
.logo-lockup, .logo-lockup-lg, .logo-icon { position: relative; overflow: hidden; }
.logo-lockup img, .logo-lockup-lg img, .logo-icon img {
  position: absolute; max-width: none;
}
.logo-lockup { display: block; width: 128px; height: 28px; }
.logo-lockup img { height: 86px; top: -30px; left: -20px; }
.logo-lockup-lg { display: block; width: 244px; height: 65px; }
.logo-lockup-lg img { height: 166px; top: -51px; left: -39px; }
.logo-icon { width: 22px; height: 28px; margin-inline: auto; }
.logo-icon img { height: 48px; top: -12px; left: -14px; }

/* ---------------- Auth pages (login / forgot / reset) ---------------- */
.auth-wrap {
  min-height: 100vh;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
}
.auth-brand {
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 52px 56px; position: relative; overflow: hidden;
  background:
    radial-gradient(620px 420px at 20% 12%, color-mix(in oklab, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(700px 520px at 85% 90%, color-mix(in oklab, var(--accent) 9%, transparent), transparent 70%),
    repeating-linear-gradient(45deg,  transparent 0 31px, color-mix(in oklab, var(--accent) 7%, transparent) 31px 32px),
    repeating-linear-gradient(-45deg, transparent 0 31px, color-mix(in oklab, var(--accent) 7%, transparent) 31px 32px),
    linear-gradient(165deg, color-mix(in oklab, var(--accent) 13%, var(--bg-deep)), var(--bg-deep) 70%);
  border-inline-end: 1px solid var(--border);
}
.auth-brand::after { /* foil hairline on the seam */
  content: ""; position: absolute; top: 0; bottom: 0; inset-inline-end: 0; width: 1px;
  background: linear-gradient(180deg, transparent, var(--accent-line) 25%, var(--accent-line) 75%, transparent);
}
.auth-mark { /* diamond monogram above the wordmark */
  width: 46px; height: 46px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--accent-line); transform: rotate(45deg);
  background: var(--panel);
  box-shadow: 0 6px 18px color-mix(in oklab, var(--accent) 22%, transparent);
}
.auth-mark b {
  transform: rotate(-45deg);
  font-family: var(--font-display); font-weight: 400; font-size: 22px;
  color: var(--accent-strong, var(--accent));
}
.auth-quote { position: relative; padding-top: 34px; }
.auth-quote::before {
  content: "“"; position: absolute; top: -18px; inset-inline-start: -6px;
  font-family: var(--font-display); font-size: 110px; line-height: 1;
  color: var(--accent); opacity: .25;
}
.auth-swatch-cap {
  font-size: 10.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 10px;
}
.auth-swatches .swatch { transition: transform var(--t-med); }
.auth-swatches:hover .swatch { transform: translateY(-3px); }
.auth-swatches .swatch:hover { transform: translateY(-7px); }
.auth-logo {
  font-family: var(--font-display); font-size: 26px; letter-spacing: .32em; color: var(--text);
}
.auth-logo .x { color: var(--accent-strong, var(--accent)); }
.auth-logo-sub {
  display: block; margin-top: 6px;
  font-size: 10px; font-weight: 700; letter-spacing: .34em; text-transform: uppercase;
  color: var(--text-3);
}
.auth-quote {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: clamp(24px, 2.4vw, 34px); line-height: 1.35; max-width: 17em;
  color: var(--text);
}
.auth-quote-sub { font-size: var(--fs-sm); color: var(--text-2); margin-top: 14px; font-family: var(--font-ui); font-style: normal; }
.auth-swatches { display: flex; gap: 12px; }
.auth-main {
  display: flex; align-items: center; justify-content: center; padding: 44px 24px;
  background: radial-gradient(720px 480px at 70% 20%, var(--accent-softer), transparent 70%);
}
.auth-card {
  width: min(470px, 100%); padding: 42px 40px;
  border-top: 1px solid var(--accent-line);
  box-shadow: var(--shadow-2);
}
@media (prefers-reduced-motion: no-preference) {
  .auth-card { animation: pane-in .55s var(--ease) backwards; }
  .auth-brand > * { animation: pane-in .6s var(--ease) backwards; }
  .auth-brand > *:nth-child(2) { animation-delay: .12s; }
  .auth-brand > *:nth-child(3) { animation-delay: .22s; }
}
.auth-title { font-family: var(--font-display); font-weight: 400; font-size: 32px; line-height: 1.12; }
.auth-sub { font-size: var(--fs-md); color: var(--text-2); margin-top: 9px; }
.auth-form { display: flex; flex-direction: column; gap: 18px; margin-top: 26px; }
.auth-form .input { height: 52px; font-size: var(--fs-md); }
/* leading icon inside fields */
.in-ico { position: relative; display: block; }
.in-ico > .icon {
  position: absolute; inset-inline-start: 16px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); pointer-events: none;
  transition: color var(--t-fast);
}
.in-ico .input { padding-inline-start: 46px; }
.in-ico:focus-within > .icon { color: var(--accent-strong, var(--accent)); }
.pw-wrap { position: relative; display: block; }
.pw-wrap .input { padding-inline-end: 52px; }
.pw-toggle {
  position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px;
}
.auth-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.auth-check { display: inline-flex; align-items: center; gap: 9px; font-size: var(--fs-sm); color: var(--text-2); cursor: pointer; }
.auth-check input { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }
.auth-link { font-size: var(--fs-sm); font-weight: 600; color: var(--accent-strong, var(--accent)); }
.auth-link:hover { text-decoration: underline; }
.auth-submit { width: 100%; height: 52px; font-size: var(--fs-md); justify-content: center; }
.auth-divider {
  display: flex; align-items: center; gap: 14px;
  font-size: var(--fs-xs); color: var(--text-3); margin-block: 2px;
}
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.auth-alt { width: 100%; height: 48px; justify-content: center; }
.auth-foot { text-align: center; font-size: var(--fs-sm); color: var(--text-3); margin-top: 22px; }
@media (max-width: 940px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
}

/* ---------------- Dress detail page ---------------- */
.back-link {
  display: inline-flex; align-items: center; gap: 7px;
  margin-bottom: 14px; font-size: var(--fs-sm); font-weight: 600;
  color: var(--text-2); transition: color var(--t-fast);
}
.back-link:hover { color: var(--accent-strong, var(--accent)); }
.back-link .icon { transform: scaleX(-1); }
html[dir="rtl"] .back-link .icon { transform: none; }

.dress-hero { display: flex; gap: 26px; align-items: flex-start; }
@media (max-width: 860px) { .dress-hero { flex-direction: column; } }
.dh-photo {
  width: 180px; height: 232px; flex: none; position: relative;
  border-radius: 14px; overflow: visible;
  box-shadow: var(--shadow-2);
}
.dh-photo .swatch {
  position: absolute; bottom: -10px; inset-inline-end: -10px;
  box-shadow: 0 0 0 3px var(--panel), var(--shadow-2);
}
.dh-main { flex: 1; min-width: 0; }
.dh-name { font-family: var(--font-display); font-weight: 400; font-size: clamp(26px, 2.6vw, 36px); line-height: 1.1; }
.dh-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 8px; font-size: var(--fs-sm); color: var(--text-2);
}
.dh-stats { margin-top: 18px; }
.dh-cond { margin-top: 16px; }

/* availability grid: generous cells, real event chips */
.av-nav { display: inline-flex; align-items: center; gap: 6px; }
.av-month-label {
  font-family: var(--font-display); font-size: 19px; min-width: 120px;
  text-align: center; font-variant-numeric: lining-nums;
}
.av-nav .icon-btn[disabled] { opacity: .3; cursor: default; }
.av-summary {
  display: flex; gap: 18px; flex-wrap: wrap;
  padding: 12px var(--card-pad) 12px;
  font-size: var(--fs-sm); color: var(--text-2);
  border-bottom: 1px solid var(--border);
}
.av-summary .avs { display: inline-flex; align-items: center; gap: 7px; }
.av-summary .avs::before { content: ""; width: 9px; height: 9px; border-radius: 3px; }
.av-summary .avs.ok::before { background: var(--ok); }
.av-summary .avs.accent::before { background: var(--accent); }
.av-summary .avs.warn::before { background: var(--warn); }
.av-summary .avs b { font-size: var(--fs-md); }

.avail-month .cm-day {
  min-height: 108px; cursor: default; position: relative;
  gap: 6px; padding: 10px 11px;
}
@media (max-width: 1100px) { .avail-month .cm-day { min-height: 86px; } }
.avail-month .cm-day:hover { background: var(--panel); }
.avail-month .cm-day.av-free:hover { background: var(--accent-softer); }
.avail-month .cm-day.wknd { background: var(--panel-2); }
.avail-month .cm-day[data-avres] { cursor: pointer; }
.avail-month .cm-day[data-avres]:hover { box-shadow: inset 0 0 0 2px var(--accent-line); }
.avail-month .cm-day .cm-num { font-size: 19px; }
.avail-month .cm-day.av-booked { background: var(--accent-softer); }
.avail-month .cm-day.av-booked .cm-num { color: var(--accent-strong, var(--accent)); }
.avail-month .cm-day.av-care { background: var(--warn-soft); }
.avail-month .cm-day.av-late,
.avail-month .cm-day.av-conflict { background: var(--bad-soft); }
.avail-month .cm-day.av-late .cm-num,
.avail-month .cm-day.av-conflict .cm-num { color: var(--bad); }

/* event chips inside a day */
.cm-ev {
  display: inline-flex; align-items: center; gap: 5px;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 12px; font-weight: 650; line-height: 1;
  padding: 5px 9px; border-radius: var(--r-full);
}
.cm-ev .icon-sm { width: 12px; height: 12px; flex: none; }
.cm-ev.gold { background: var(--accent); color: var(--on-accent); }
.cm-ev.bad { background: var(--bad); color: #fff; }
.cm-ev.warn { background: color-mix(in oklab, var(--warn) 22%, transparent); color: var(--warn); }

.avail-month .cm-flag {
  position: absolute; top: 9px; inset-inline-end: 10px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--bad); color: #fff;
  font-size: 12px; font-weight: 700; line-height: 18px; text-align: center;
  box-shadow: 0 2px 8px color-mix(in oklab, var(--bad) 40%, transparent);
}
@media (prefers-reduced-motion: no-preference) {
  .avail-month .cm-flag { animation: badge-pulse 3s var(--ease) infinite; }
}

/* bookings grid under the calendar */
.bk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 4px 26px; }
.bk-grid .smallcaps { grid-column: 1 / -1; }

/* bookings list on the dress page */
.bk-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 8px; border-radius: var(--r-md);
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background var(--t-fast);
}
.bk-row:last-child { border-bottom: none; }
.bk-row:hover { background: var(--accent-softer); }
.bk-row.done { opacity: .55; }
.bk-row .pill { margin-top: 3px; }

/* agenda: next-up glows, finished items fade */
.agenda-item { cursor: pointer; border-radius: var(--r-md); padding-inline: 8px; transition: background var(--t-fast); }
.agenda-item:hover { background: var(--accent-softer); }
.agenda-item.next {
  background: var(--accent-softer);
  box-shadow: inset 2.5px 0 0 var(--accent);
}
html[dir="rtl"] .agenda-item.next { box-shadow: inset -2.5px 0 0 var(--accent); }
.agenda-item.done { opacity: .5; }

/* ---------------- Money that needs attention jumps out ---------------- */
.tbl tbody tr.row-overdue { background: var(--bad-soft); }
.tbl tbody tr.row-overdue:hover { background: color-mix(in oklab, var(--bad) 18%, transparent); }

/* ---------------- Kanban — calmer columns ---------------- */
.kanban-col { width: 300px; }
.kcard { padding: 16px; gap: 10px; border-radius: var(--r-lg); }
.kcard .k-title { font-size: var(--fs-base); }
.kcard .k-name { font-size: 17px; }
.kcard .k-meta { font-size: var(--fs-sm); }

/* gantt rows readable */
.gantt-bar { font-size: 11.5px; }

/* ---------------- Bookings page ---------------- */
/* attention strip — counters that ARE the filters */
.att-strip {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px;
  margin-bottom: var(--gap-page);
}
@media (max-width: 1100px) { .att-strip { grid-template-columns: repeat(2, 1fr); } }
.att-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; text-align: start;
  background: var(--panel); border: 1.5px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-1);
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
  cursor: pointer; min-width: 0;
}
.att-card:hover { border-color: var(--accent-line); transform: translateY(-1px); }
.att-card:active { transform: none; }
.att-card .att-ico {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--neutral-soft); color: var(--text-2);
}
.att-card.bad .att-ico { background: var(--bad-soft); color: var(--bad); }
.att-card.warn .att-ico { background: var(--warn-soft); color: var(--warn); }
.att-card.info .att-ico { background: var(--accent-soft); color: var(--accent-strong, var(--accent)); }
.att-card .att-n { font-family: var(--font-display); font-size: 26px; line-height: 1; flex: none; font-variant-numeric: lining-nums; }
.att-card .att-label { font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); line-height: 1.25; min-width: 0; }
.att-card.active {
  border-color: var(--accent); background: var(--accent-softer);
  box-shadow: 0 0 0 3px var(--accent-softer);
}
.att-card.active .att-label { color: var(--text); }

/* bookings search */
.res-search {
  display: flex; align-items: center; gap: 10px;
  height: 44px; width: min(440px, 90vw); padding-inline: 15px;
  border: 1.5px solid var(--border-strong); border-radius: var(--r-full);
  background: var(--panel); color: var(--text-3);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.res-search:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-softer); }
.res-search input { flex: 1; border: none; outline: none; background: none; font-size: var(--fs-base); color: var(--text); min-width: 0; }

/* per-row "what's next" */
.next-note {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 5px; font-size: var(--fs-xs); font-weight: 650;
}
.next-note.bad { color: var(--bad); }
.next-note.warn { color: var(--warn); }
.next-note .icon-sm { width: 13px; height: 13px; }
.tbl tbody tr.row-attn { box-shadow: inset 3px 0 0 var(--bad); }
html[dir="rtl"] .tbl tbody tr.row-attn { box-shadow: inset -3px 0 0 var(--bad); }
.tbl .row-go { color: var(--text-3); }
.tbl tr:hover .row-go { color: var(--accent-strong, var(--accent)); }
html[dir="rtl"] .tbl .row-go .icon { transform: scaleX(-1); }

/* timeline today marker */
.gantt-track { overflow: visible; }
.gantt-today {
  position: absolute; top: -3px; bottom: -3px; width: 2px;
  background: var(--accent); opacity: .85; border-radius: 1px; z-index: 1;
}
.gantt-today-key {
  display: inline-block; width: 2px; height: 14px;
  background: var(--accent); border-radius: 1px;
}

/* measurement cells */
.measure-cell { padding: 12px 14px; }
.measure-cell .m-label { font-size: 11.5px; letter-spacing: .03em; text-transform: none; font-weight: 650; }
.measure-cell .m-val { font-size: 21px; }

/* client list: bigger, calmer rows */
.client-li { padding: 13px 14px; gap: 13px; border-radius: var(--r-md); margin-bottom: 2px; }
.client-li .c-name { font-size: var(--fs-base); }
.client-li .c-sub { font-size: var(--fs-sm); }

/* settings: sections swap in place with a soft rise */
@media (prefers-reduced-motion: no-preference) {
  .settings-layout .card.pane-in { animation: pane-in .3s var(--ease); }
  @keyframes pane-in { from { opacity: 0; transform: translateY(8px); } }
}

@media (max-width: 860px) {
  .wiz-foot .btn { flex: 1; }
  .wiz-foot .spacer { display: none; }

  /* Overview grid: collapse the last half-width cards to full width on phones.
     The 1280px tier sends span-5..9 to span 12 but leaves span-3/span-4 at
     span 6 (half) — so "Today's schedule" (.span-4) renders in a ~108px column
     and its rows wrap one word per line. Full width fixes the squeeze. */
  .span-3, .span-4 { grid-column: span 12; }

  /* Topbar: drop the search field on phones (it was stretching into a cramped
     "Se…"); the sidebar's own search stays reachable from the menu. The search
     used margin-inline:auto as the centering spacer, so move that role onto the
     control cluster to keep it pinned to the inline-end. */
  .top-search { display: none; }
  .topbar #langCtl { margin-inline-start: auto; }

  /* Card headers: let the title keep a full line on phones. The head is a flex
     row (title + flex:1 spacer + meta/controls); on a narrow card the spacer
     ate the room and the uppercase h3 got ellipsised to "Mon…"/"Do this n…".
     Letting the head wrap and making the spacer a full-width line break pushes
     the controls to their own line so the title always shows in full. */
  .card-head { flex-wrap: wrap; row-gap: 6px; }
  .card-head .spacer { flex-basis: 100%; }
  .card-head h3 { overflow: visible; text-overflow: clip; }

  /* Availability calendar (dress page): a 7-column month grid with booking
     chips can't shrink below its content, so it overflowed and stretched the
     whole page to ~611px. Let its pane scroll horizontally instead — the month
     keeps legible cells and the page stays phone-width (same pattern as
     .table-wrap / .pipe elsewhere in the theme). */
  .av-pane { overflow-x: auto; overflow-y: hidden; }
  .avail-month { min-width: 33rem; }
}
