/* =========================================================================
   Chairday milestone 1: back office (/manage), sign-up and staff sign-in.
   Only what the Daylight kit does not cover. Tokens only (both themes).
   ========================================================================= */

.cd-plain__logo b { font: 700 1.125rem/1.2 var(--cd-font-display); }
.cd-support-banner { position: sticky; top: 0; z-index: 40; border-radius: 0; margin: 0; }
.cd-align-end { align-items: end; }
.cd-mt-6 { margin-top: 24px; }

/* Choice cards in a grid (sign-up categories). Columns of at least 170px (one column
   when the form is narrower than two) and a tighter gap leave the title at least 54px,
   so "Barber" or "Mobile pro" never break mid-word on a phone */
.cd-options--grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.cd-options--grid > .cd-option { gap: 10px; }

/* Accent swatches (Settings and wizard) */
.cd-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.cd-swatch { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 1px solid var(--cd-control-border); border-radius: var(--cd-radius-pill); cursor: pointer; background: var(--cd-control-bg); }
.cd-swatch__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cd-swatch__chip { width: 24px; height: 24px; border-radius: 50%; background: var(--cd-acc-deep, #0B3341); box-shadow: inset -8px -8px 0 0 var(--cd-acc-tint, #FF9548); }
.cd-swatch__label { font-size: 0.875rem; font-weight: 600; }
.cd-swatch:has(.cd-swatch__input:checked) { border-color: var(--cd-text); box-shadow: inset 0 0 0 1px var(--cd-text); }
.cd-swatch:has(.cd-swatch__input:focus-visible) { outline: 2px solid var(--cd-focus); outline-offset: 2px; }
.cd-swatch--dawn { --cd-acc-deep: #0B3341; --cd-acc-tint: #FF9548; }
.cd-swatch--teal { --cd-acc-deep: #0F5C66; --cd-acc-tint: #5CC7D1; }
.cd-swatch--forest { --cd-acc-deep: #1F5C3A; --cd-acc-tint: #6FCF97; }
.cd-swatch--navy { --cd-acc-deep: #1D3A8A; --cd-acc-tint: #9AB4F5; }
.cd-swatch--plum { --cd-acc-deep: #5B2A6E; --cd-acc-tint: #C9A2E0; }
.cd-swatch--berry { --cd-acc-deep: #8A1F4A; --cd-acc-tint: #F28DB2; }
.cd-swatch--rust { --cd-acc-deep: #9A3412; --cd-acc-tint: #FDA47A; }
.cd-swatch--charcoal { --cd-acc-deep: #2B2B2B; --cd-acc-tint: #E0DDD8; }

/* Opening hours and shift editors */
.cd-hours-grid, .cd-shift-grid { display: flex; flex-direction: column; gap: 10px; }
.cd-hours-row, .cd-shift-row { display: grid; gap: 8px 16px; align-items: center; grid-template-columns: 140px auto 1fr; padding: 8px 0; border-top: 1px solid var(--cd-border); }
.cd-shift-row { grid-template-columns: 140px auto auto 1fr; }
.cd-hours-row:first-child, .cd-shift-row:first-child { border-top: 0; }
.cd-hours-row .cd-field__error, .cd-shift-row .cd-field__error { grid-column: 1 / -1; margin: 0; }
@media (max-width: 760px) {
  .cd-hours-row, .cd-shift-row { grid-template-columns: 1fr; }
}
.cd-week2 { border-top: 1px dashed var(--cd-border-strong); padding-top: 12px; }

/* Wizard */
.cd-wizard-nav { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; font-size: 0.875rem; }
.cd-wizard-nav a { display: inline-flex; align-items: center; gap: 4px; }
.cd-template-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* QR and images */
.cd-qr-preview { width: 140px; height: 140px; flex: none; background: #FFFFFF; border-radius: 12px; padding: 6px; box-shadow: var(--cd-shadow-1); }
.cd-logo-preview { max-width: 160px; height: auto; border-radius: var(--cd-radius-md); background: #FFFFFF; padding: 8px; box-shadow: var(--cd-shadow-1); }
.cd-cover-preview { width: 100%; max-width: 420px; height: auto; border-radius: var(--cd-radius-lg); }
.cd-cover--preview { max-width: 420px; min-height: 120px; }

/* Tables */
.cd-table__group th { background: var(--cd-surface-2); font: 700 0.8125rem/1.3 var(--cd-font-ui); letter-spacing: 0.04em; text-transform: uppercase; color: var(--cd-text-muted); }
.cd-import-row--error td { color: var(--cd-danger); }
.cd-import-row--skip td { color: var(--cd-text-muted); }
.cd-import-row--flag td:nth-child(2) { color: var(--cd-warning-text); font-weight: 600; }

/* Improvement round 1: the client list reads at a glance (who, how to reach them, how often they come) */
.cd-clients__who { display: inline-flex; align-items: center; gap: 12px; color: var(--cd-text); text-decoration: none; }
.cd-clients__who:hover b { text-decoration: underline; text-underline-offset: 3px; }
.cd-clients__who > span:last-child { display: grid; min-width: 0; }
.cd-clients__who b { font-weight: 700; }
.cd-clients__who small { font-size: 0.75rem; font-weight: 500; color: var(--cd-text-muted); }
.cd-clients__contact { display: grid; gap: 2px; font-size: 0.875rem; }
.cd-clients .cd-num { text-align: right; font-variant-numeric: tabular-nums; }
.cd-clients__next { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px; border-radius: var(--cd-radius-pill); background: var(--cd-success-soft); color: var(--cd-success); font-weight: 700; font-size: 0.8125rem; white-space: nowrap; }
.cd-clients__next .cd-icon { width: 14px; height: 14px; }
.cd-clients tbody tr:hover { background: var(--cd-surface-sunk); }

/* Improvement round 1: the Today page leads with the day (counts, next up, the diary) */
.cd-day-kpis { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .cd-day-kpis { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); } }
.cd-day-kpi { display: grid; gap: 4px; align-content: start; min-width: 0; padding: 16px 18px; border-radius: 18px; background: var(--cd-surface); border: 1px solid var(--cd-border); box-shadow: var(--cd-shadow-1); }
.cd-day-kpi p { margin: 0; }
.cd-day-kpi__label { display: inline-flex; align-items: center; gap: 8px; font: 700 0.8125rem/1.2 var(--cd-font-ui); color: var(--cd-text-muted); }
.cd-day-kpi__label .cd-icon { width: 16px; height: 16px; color: var(--cd-text); }
.cd-day-kpi__value { font: 800 2.25rem/1.05 var(--cd-font-display); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; color: var(--cd-text); }
.cd-day-kpi__meta { font-size: 0.8125rem; color: var(--cd-text-muted); }
.cd-day-kpi--money { background: var(--cd-primary); border-color: var(--cd-primary); color: var(--cd-on-primary); }
.cd-day-kpi--money .cd-day-kpi__value, .cd-day-kpi--money .cd-day-kpi__label .cd-icon { color: var(--cd-on-primary); }
.cd-day-kpi--money .cd-day-kpi__label, .cd-day-kpi--money .cd-day-kpi__meta { color: color-mix(in srgb, var(--cd-on-primary) 78%, transparent); }
@media (max-width: 599px) { .cd-day-kpi { padding: 12px 14px; } .cd-day-kpi__value { font-size: 1.875rem; } }

.cd-nextup {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 16px 18px;
  border-radius: 20px; background: var(--cd-accent-soft); border: 1px solid color-mix(in srgb, var(--cd-accent) 45%, transparent);
  color: var(--cd-text); text-decoration: none;
}
.cd-nextup:hover { text-decoration: none; border-color: var(--cd-accent); }
.cd-nextup:focus-visible { outline: 3px solid var(--cd-focus); outline-offset: 2px; }
.cd-nextup__when { display: grid; justify-items: start; gap: 2px; padding-right: 18px; border-right: 1px solid color-mix(in srgb, var(--cd-accent) 45%, transparent); }
.cd-nextup__when small { font: 700 0.6875rem/1 var(--cd-font-ui); text-transform: uppercase; letter-spacing: 0.08em; color: var(--cd-attention); }
.cd-nextup__when b { font: 800 1.75rem/1 var(--cd-font-display); font-variant-numeric: tabular-nums; }
.cd-nextup__when span { font-size: 0.8125rem; font-weight: 700; color: var(--cd-attention); }
.cd-nextup__who { display: grid; gap: 2px; min-width: 0; }
.cd-nextup__who b { font: 800 1.125rem/1.2 var(--cd-font-display); }
.cd-nextup__who span { color: var(--cd-text-muted); font-size: 0.875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-nextup__go { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--cd-primary); color: var(--cd-on-primary); }
.cd-nextup__go .cd-icon { width: 18px; height: 18px; }

.cd-day { display: grid; gap: 18px; }
.cd-day__group { display: grid; gap: 10px; }
.cd-day__head { display: flex; align-items: center; gap: 10px; margin: 0; font: 800 1.125rem/1.2 var(--cd-font-display); }
.cd-day__head span { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 8px; border-radius: var(--cd-radius-pill); background: var(--cd-surface-3); font: 700 0.75rem/1 var(--cd-font-ui); font-variant-numeric: tabular-nums; }
.cd-day__done > summary { cursor: pointer; list-style: none; min-height: 44px; }
.cd-day__done > summary::-webkit-details-marker { display: none; }
.cd-day__done > summary .cd-icon { width: 18px; height: 18px; transition: transform 0.15s ease; }
.cd-day__done[open] > summary .cd-icon { transform: rotate(180deg); }
.cd-day__empty { margin: 0; padding: 14px 16px; border-radius: 14px; border: 1px dashed var(--cd-border-strong); color: var(--cd-text-muted); }
.cd-day__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cd-day__item {
  --day-bar: var(--cd-success);
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 60px; padding: 10px 14px 10px 16px;
  border-radius: 14px; background: var(--cd-surface); border: 1px solid var(--cd-border); box-shadow: inset 4px 0 0 var(--day-bar);
  color: var(--cd-text); text-decoration: none;
}
.cd-day__item:hover { border-color: var(--cd-border-strong); text-decoration: none; }
.cd-day__item:focus-visible { outline: 3px solid var(--cd-focus); outline-offset: 2px; }
.cd-day__item--now { --day-bar: var(--cd-info); background: var(--cd-info-soft); }
.cd-day__item--done { --day-bar: var(--cd-control-border); background: var(--cd-surface-sunk); }
.cd-day__item--noshow { --day-bar: var(--cd-danger); }
.cd-day__item--noshow .cd-day__main b { text-decoration: line-through; }
.cd-day__time { display: grid; line-height: 1.15; font-variant-numeric: tabular-nums; }
.cd-day__time b { font: 800 1.0625rem/1.1 var(--cd-font-ui); }
.cd-day__time small { font-size: 0.75rem; color: var(--cd-text-muted); }
.cd-day__main { display: grid; gap: 1px; min-width: 0; }
.cd-day__main b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-day__main small { font-size: 0.8125rem; color: var(--cd-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 480px) { .cd-day__item { grid-template-columns: 48px minmax(0, 1fr); } .cd-day__item .cd-status { grid-column: 2; justify-self: start; } }
.cd-checklist-done > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; cursor: pointer; font-weight: 700; color: var(--cd-text-muted); list-style: none; }
.cd-checklist-done > summary::-webkit-details-marker { display: none; }
.cd-checklist-done > summary .cd-icon { width: 16px; height: 16px; }
.cd-checklist-done[open] > summary .cd-icon { transform: rotate(180deg); }
.cd-status--done { background: var(--cd-surface-sunk); color: var(--cd-text-muted); box-shadow: inset 0 0 0 1px var(--cd-border); }
.cd-status--walkin { background: var(--cd-accent-soft); color: var(--cd-attention); }

/* Improvement round 1: grouped side navigation; Set up folds away until you need it */
.cd-sidenav__setup > summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; border-radius: 10px; }
.cd-sidenav__setup > summary::-webkit-details-marker { display: none; }
.cd-sidenav__setup > summary .cd-icon { width: 14px; height: 14px; transition: transform 0.15s ease; }
.cd-sidenav__setup[open] > summary .cd-icon { transform: rotate(180deg); }
.cd-sidenav__setup > summary:focus-visible { outline: 3px solid var(--cd-focus); outline-offset: 2px; }
@media (max-width: 600px) {
  .cd-pagehead__help { width: 40px; padding: 0; justify-content: center; }
  .cd-pagehead__help span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* round 3 (a11y target size): the Set up fold is a full-height row */
.cd-sidenav__setup > summary { min-height: 40px; padding-top: 8px; padding-bottom: 8px; }

/* round 3: a slim reminder away from the pages where two-step matters, and the help button stays
   on the title row on phones */
.cd-alert--slim { padding-top: 8px; padding-bottom: 8px; }
.cd-alert--slim .cd-alert__icon { width: 28px; height: 28px; }
.cd-alert--slim .cd-alert__body { font-size: 0.875rem; }
@media (max-width: 600px) {
  .cd-alert--slim { margin-bottom: 16px; }
  .cd-pagehead--help { position: relative; padding-right: 52px; }
  .cd-pagehead--help .cd-pagehead__help { position: absolute; top: 0; right: 0; }
}
@media (max-width: 639.98px) { .cd-clients .cd-clients__contact { grid-column: 1 / -1; } }
.cd-day__more { display: grid; gap: 8px; }
.cd-day__more > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; cursor: pointer; font-weight: 700; list-style: none; }
.cd-day__more > summary::-webkit-details-marker { display: none; }
.cd-day__more > summary .cd-icon { width: 16px; height: 16px; }
.cd-day__more[open] > summary .cd-icon { transform: rotate(180deg); }
