/* AURIA LASH — calendar page. Dashboard is the precedent: whites
   ladder, espresso ink, rose data marks, champagne ceremony. */

.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: calc(var(--unit) * 3) calc(var(--unit) * 2) calc(var(--unit) * 6);
  display: grid;
  gap: calc(var(--unit) * 3);
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--unit) * 2);
}

.page-head h1 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rose);
}

.month-nav {
  display: flex;
  align-items: center;
  gap: calc(var(--unit) * 2);
}
.month-nav .tl-arrow { margin-top: 0; }
.month-label {
  font-family: var(--font-head);
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  min-width: 150px;
  text-align: center;
}

/* booking banner */
.book-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--unit) * 2);
  background: var(--rose);
  color: var(--on-accent);
  border-radius: var(--radius);
  padding: 10px calc(var(--unit) * 2);
  font-size: 13px;
  letter-spacing: 0.04em;
}
.book-banner[hidden] { display: none; }
.book-cancel {
  color: var(--on-accent);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- month grid ---------- */

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 6px;
}
.cal-weekdays div {
  font-family: var(--font-mark);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rose);
  text-align: center;
  padding: 4px 0;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-cell {
  min-height: 56px;
  background: var(--porcelain);
  border: var(--hairline);
  border-radius: var(--radius);
  padding: 6px;
  display: grid;
  gap: 4px;
  align-content: start;
  justify-items: start;
  cursor: pointer;
}
.cal-cell:hover { border-color: var(--rose); }
.cal-cell.blank {
  background: transparent;
  border-color: transparent;
  cursor: default;
}
.cal-cell .d-num {
  font-family: var(--font-mark);
  font-size: 14px;
  color: var(--ink);
}
.cal-cell .d-dots { display: flex; gap: 3px; flex-wrap: wrap; }
.cal-cell .d-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rose-vivid);
}
.cal-cell .d-more {
  font-size: 9px;
  color: var(--ink);
  opacity: 0.55;
}

/* days behind the clock: faded into the whites, never gray; still
   selectable for history, typed dots keep their colors */
.cal-cell.past {
  background: var(--pearl);
  border-color: var(--pearl);
}
.cal-cell.past .d-num { opacity: 0.4; }
.cal-cell.past .d-more { opacity: 0.4; }

/* PTO days: ivory wall, champagne badge; visible, selectable, closed */
.cal-cell.pto {
  background: var(--ivory);
  border-color: var(--champagne);
}
.cal-cell.pto .d-off {
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-weight: bold;
  font-size: 8px;
  letter-spacing: 0.14em;
  color: var(--champagne);
}

.cal-cell.today {
  background: var(--rose);
  border-color: var(--rose);
}
.cal-cell.today .d-num { color: var(--on-accent); }
/* typed dot colors survive on the rose ground; white ring separates */
.cal-cell.today .d-dots i { box-shadow: 0 0 0 1.5px #FFFFFF; }
.cal-cell.today .d-more { color: var(--on-accent); opacity: 0.85; }

.cal-cell.selected { border: 2px solid var(--sel-border); padding: 5px; }

/* ---------- day detail ---------- */

.day-card .appt-list .a-open {
  color: var(--ink);
  opacity: 0.45;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  flex: 1;
}
.book-btn {
  border: none;
  background: var(--ink); /* chocolate; one dress site-wide */
  color: var(--on-ink);
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-weight: bold;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 14px;
  border-radius: var(--radius-btn);
  cursor: pointer;
  white-space: nowrap;
}
.book-btn:not(.booked):hover { background: var(--rose-vivid); }
.book-btn.booked {
  background: var(--champagne);
  cursor: default;
}
.a-client-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--bone);
}
.a-client-link:hover { border-bottom-color: var(--rose); }

/* hours button + pop-up; the ONE chocolate button on the page, kept
   dark deliberately to draw the eye */
.hours-btn {
  margin-left: calc(var(--unit) * 1);
  padding: 7px 16px;
  background: var(--ink);
  color: var(--on-ink);
}

.hours-card { max-width: 420px; padding: calc(var(--unit) * 3); }
.hrs-grid { display: grid; gap: calc(var(--unit) * 2); }

/* weekday tabs: one schedule per day, Sun through Sat */
.hrs-days {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.hrs-day {
  flex: 1;
  min-width: 40px;
  border: 1px solid var(--rose);
  border-radius: var(--radius-btn);
  background: var(--white);
  color: var(--ink);
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-weight: bold;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 0;
  cursor: pointer;
}
.hrs-day:hover { background: var(--ivory); }
.hrs-day.sel { background: var(--rose); color: var(--on-accent); }

/* Break and PTO add-buttons: white, rose stroke, Save's stature */
.brk-add {
  border: 1px solid var(--rose);
  background: var(--white);
  color: var(--ink);
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-weight: bold;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 22px;
  border-radius: var(--radius-btn);
  cursor: pointer;
}
.brk-add:hover { background: var(--rose-vivid); color: var(--on-accent); border-color: var(--rose-vivid); }
.hrs-save { padding: 8px 22px; }

.hrs-off-head {
  display: flex;
  align-items: center;
  gap: calc(var(--unit) * 1.5);
  margin-top: calc(var(--unit) * 1);
  padding-top: calc(var(--unit) * 2);
  border-top: 1px solid var(--pearl);
}
.hrs-off-head .rule { width: 28px; height: 2px; background: var(--champagne); }
.hrs-off-head h3 {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.pto-row input[type="date"] {
  border: 1px solid var(--champagne);
  border-radius: var(--radius-btn);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--ink);
  padding: 7px 8px;
}
.pto-row input[type="date"]:focus {
  outline: 2px solid var(--champagne);
  outline-offset: 1px;
}
.hrs-row {
  display: flex;
  align-items: center;
  gap: calc(var(--unit) * 1);
}
.hrs-label {
  width: 56px;
  flex: none;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.6;
}
.hrs-to { font-size: 11px; opacity: 0.55; }
/* custom time picker: whole square taps open, no clock icon */
.tp { position: relative; display: inline-block; }
.tp-field {
  border: 1px solid var(--champagne);
  border-radius: var(--radius-btn);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink);
  padding: 8px 14px;
  cursor: pointer;
  min-width: 92px;
}
.tp-type {
  border: 1px solid var(--rose);
  border-radius: var(--radius-btn);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink);
  padding: 8px 10px;
  width: 92px;
}
.tp-type:focus { outline: none; }

.tp-drop {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 30;
  background: var(--white);
  border: 1px solid var(--champagne);
  border-radius: var(--radius-btn);
  box-shadow: var(--shadow-card);
  padding: 6px;
  width: 132px;
}
.tp-cols { display: flex; gap: 6px; }
.tp-col {
  flex: 1;
  max-height: 168px;
  overflow-y: auto;
  display: grid;
  gap: 2px;
}
.tp-col button,
.tp-ampm button {
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink);
  padding: 6px 0;
  border-radius: var(--radius-btn);
  cursor: pointer;
  text-align: center;
}
.tp-col button:hover,
.tp-ampm button:hover { background: var(--ivory); }
.tp-col button.sel,
.tp-ampm button.sel { background: var(--rose); color: var(--on-accent); }
/* AM/PM at the bottom, never a third column */
.tp-ampm {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  border-top: 1px solid var(--pearl);
  padding-top: 6px;
}
.tp-ampm button { flex: 1; }
.hrs-remove {
  border: none;
  background: transparent;
  color: var(--rose-vivid);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.hrs-actions {
  display: flex;
  justify-content: space-between;
  margin-top: calc(var(--unit) * 1);
}

/* lunch and break rows in the day panel: blocked, champagne-labeled */
.a-blocked {
  flex: 1;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--champagne);
}

/* past slots: rose-red, dead, N/A */
.na-btn {
  border: none;
  background: var(--rose-vivid);
  color: var(--on-accent);
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-weight: bold;
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 5px 16px;
  border-radius: var(--radius-btn);
  cursor: not-allowed;
  white-space: nowrap;
}

/* appointment-type legend; colors from the SVC map, one source */
.type-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px calc(var(--unit) * 2);
  margin-top: calc(var(--unit) * 1.5);
  padding-top: calc(var(--unit) * 1.5);
  border-top: 1px solid var(--pearl);
}
.tl-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.7;
}
.tl-item i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* cancel-or-reschedule pop-up */
.cx-card { max-width: 340px; }
.cx-text {
  font-size: 13px;
  letter-spacing: 0.03em;
  margin: calc(var(--unit) * 1) 0 calc(var(--unit) * 2);
}
.cx-text .a-time { margin-right: 6px; }
.cx-actions {
  display: flex;
  justify-content: flex-end;
  gap: calc(var(--unit) * 1.5);
}
.cx-actions .cancel-btn { margin-left: 0; }
.cx-btn { padding: 8px 18px; }

/* cancel: right side, offset from the other buttons, never centered */
.cancel-btn {
  border: none;
  background: var(--rose);
  color: var(--on-accent);
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-weight: bold;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: var(--radius-btn);
  cursor: pointer;
  margin-left: calc(var(--unit) * 3);
  white-space: nowrap;
}
.cancel-btn:hover { background: var(--rose-vivid); }

/* ---------- client picker modal ---------- */

.modal-veil {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(36, 30, 25, 0.35);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: calc(var(--unit) * 8) calc(var(--unit) * 2);
}
.modal-veil[hidden] { display: none; }

.modal-card {
  position: relative; /* the close circle pins to this corner */
  background: var(--white);
  border: 1px solid var(--champagne);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  width: 100%;
  max-width: 420px;
  max-height: 70vh;
  overflow-y: auto;
  padding: calc(var(--unit) * 2.5);
}

/* scrollbar styling comes from the house rule in layout.css:
   rose thumb, porcelain track, invisible buttons */

/* close: rose circle, white X, pinned top right of every modal */
.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: var(--rose);
  color: var(--on-accent);
  font-size: 15px;
  font-weight: bold;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  z-index: 2;
}
.modal-close:hover { background: var(--rose-vivid); }

/* simplified horizontal client rows, not the card dress */
.pick-list { display: grid; }
.pick-row {
  display: flex;
  align-items: center;
  gap: calc(var(--unit) * 1.5);
  padding: 9px 6px;
  border-top: 1px solid var(--pearl);
  cursor: pointer;
}
.pick-row:hover { background: var(--ivory); }
.pick-row .p-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--rose);
  color: var(--on-accent);
  font-family: var(--font-mark);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.pick-row .p-name { font-weight: 600; font-size: 13px; }
.pick-row .svc-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
}
.pick-row .p-fave {
  margin-left: auto;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.55;
}

/* ---------- desktop ---------- */

@media (min-width: 840px) {
  .page { padding-top: calc(var(--unit) * 5); }
  .page-head h1 { font-size: 26px; }
  .cal-cell { min-height: 84px; }
  .cal-cell .d-num { font-size: 16px; }
}
