/* Chair & Deposit — pack styles.
   Only what the engine primitives do not already cover. Everything here uses
   the engine's tokens so light, dark and the rose accent all follow along.
*/

/* A rose accent at 72% saturation is too dark for the engine's default
   near-black button ink, so the primary button carries white. Both blocks are
   declared here, in this order, so the dark theme still wins under [data-theme].
   Dark lifts the accent a few points as well: at the engine's default lightness
   this hue sits at 4.76:1 against the button ink, which clears the bar with no
   room in it. Lifted, it reads 5.9:1. */
:root { --accent-on: #fff; }
[data-theme="dark"] {
  --accent-on: hsl(222 20% 8%);
  --accent: hsl(var(--accent-h) 58% 64%);
}

/* ------------------------------------------------------------- shared -- */

.input--slim { height: 32px; font-size: 13px; padding: 0 26px 0 9px; width: auto; min-width: 132px; }

.linkbtn {
  border: 0; background: none; padding: 0;
  font: inherit; font-weight: 600;
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  text-align: left;
}
.linkbtn:hover { text-decoration-thickness: 2px; }

.who { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-2); font-weight: 500; min-width: 0; }
.who .avatar { font-weight: 700; }
.who span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who--none { color: var(--ink-mute); }

.famdot {
  width: 8px; height: 8px; border-radius: 50%;
  flex: 0 0 auto; display: inline-block;
  box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 8%, transparent);
}

.formula {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink);
  word-break: break-word;
}

.notecard {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-2);
}

.kvs { margin: 0; }
.detail { display: flex; flex-direction: column; gap: 18px; }
.detail__top { display: flex; align-items: flex-start; gap: 12px; }
.detail__v { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.detail__vs { font-size: 12.5px; color: var(--ink-mute); margin-top: 3px; }
.detail__top .badge { margin-left: auto; }
.detail__bar { display: flex; flex-wrap: wrap; gap: 6px; }
.detail__sec { display: flex; flex-direction: column; gap: 10px; }

.minilist { display: flex; flex-direction: column; }
.minilist__i, .minilist__plain {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 8px 2px;
  border: 0; border-bottom: 1px solid var(--line-2);
  background: none; text-align: left; font: inherit; color: var(--ink);
}
.minilist__i { cursor: pointer; }
.minilist li:last-child .minilist__i, .minilist li:last-child.minilist__plain { border-bottom: 0; }
.minilist__i:hover { background: var(--surface-2); }
.minilist__t { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.minilist__d { font-size: 11px; color: var(--ink-mute); white-space: nowrap; }
.minilist__v { font-size: 12px; font-weight: 600; white-space: nowrap; }
.minilist__plain { color: var(--ink-2); }
.minilist__plain .ic { color: var(--ink-mute); flex: 0 0 auto; }

/* ---------------------------------------------------------------- book -- */

.book { gap: 10px; }

/* A salon day fits on one screen at this height, so the book does not scroll
   itself out from under the earliest booking. */
.cal__scroll { max-height: min(760px, calc(100vh - 196px)); }

.daybar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.daybar__d { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.daybar .input--slim { margin-left: auto; min-width: 0; max-width: 100%; }

.bookwarn {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--warn);
  background: var(--warn-soft);
  border-radius: var(--radius-sm);
  padding: 7px 11px;
}
.bookwarn .ic { flex: 0 0 auto; }

.legend { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.legend__set { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.legend__i { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-2); font-weight: 500; }
.legend__i i { width: 10px; height: 10px; border-radius: 3px; display: block; flex: 0 0 auto; }
.legend__h { font-size: 11.5px; color: var(--ink-mute); margin-left: auto; }

/* a no show still has to be visible in the book, just plainly dead */
.cal__ev--noshow {
  opacity: 0.72;
  background: repeating-linear-gradient(
    135deg,
    var(--surface-2) 0 6px,
    color-mix(in srgb, var(--bad) 10%, var(--surface-2)) 6px 12px
  ) !important;
  --ev-c: var(--bad) !important;
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--bad) 60%, transparent);
}
.cal__ev--done { opacity: 0.72; }

/* Half hour bookings have room for a name and a service, not a clock as well,
   and the grid position already says when it is. */
.cal__ev--short .cal__evh { display: none; }
.cal__ev--short .cal__evt { -webkit-line-clamp: 1; }
.cal__ev--short .cal__evs { font-size: 9.5px; }

.chase { display: flex; flex-direction: column; }
.chase__i { border-bottom: 1px solid var(--line-2); padding: 9px 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chase__i:last-child { border-bottom: 0; }
.chase__b {
  display: flex; align-items: center; gap: 10px;
  flex: 1 1 220px; min-width: 0;
  border: 0; background: none; padding: 0; cursor: pointer; text-align: left; font: inherit;
}
.chase__t { flex: 1; min-width: 0; }
.chase__n { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chase__s { display: block; font-size: 11px; color: var(--ink-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chase__v { font-size: 12.5px; font-weight: 700; color: var(--warn); white-space: nowrap; }
.chase__a { display: flex; gap: 5px; flex: 0 0 auto; }

.chairs { display: flex; flex-direction: column; }
.chairs__i { display: flex; align-items: flex-start; gap: 11px; padding: 11px 16px; border-bottom: 1px solid var(--line-2); }
.chairs__i:last-child { border-bottom: 0; }
.chairs__i > .who { flex: 0 0 108px; padding-top: 1px; }
.chairs__b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.chairs__top { display: flex; align-items: baseline; gap: 10px; }
.chairs__r { font-size: 11.5px; color: var(--ink-mute); font-weight: 600; letter-spacing: 0.02em; }
.chairs__v { margin-left: auto; font-size: 12.5px; font-weight: 700; }
.chairs__m { font-size: 10.5px; color: var(--ink-mute); }

.svclist { display: flex; flex-direction: column; gap: 4px; }
.svclist__i { display: flex; align-items: center; gap: 7px; font-size: 12.5px; }
.svclist__i .mono { margin-left: auto; color: var(--ink-mute); font-size: 11.5px; }

/* ------------------------------------------------------------ deposits -- */

.depcard {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 13px 14px;
  display: flex; flex-direction: column; gap: 7px;
}
.depcard--paid { border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: var(--ok-soft); }
.depcard--requested { border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: var(--warn-soft); }
.depcard--kept { border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: var(--accent-soft); }
.depcard--none { flex-direction: row; align-items: center; gap: 9px; color: var(--ink-mute); font-size: 12.5px; }
.depcard--none .ic { flex: 0 0 auto; }
.depcard__h { display: flex; align-items: center; gap: 8px; }
.depcard__t { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.depcard__h .badge { margin-left: auto; }
.depcard__v { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.depcard__r { font-size: 11.5px; color: var(--ink-2); }
.depcard__a { margin-top: 3px; }
.depcard__n { font-size: 11.5px; color: var(--ink-mute); font-style: normal; }

.proof { display: flex; align-items: stretch; gap: 12px; }
.proof__c {
  flex: 1 1 0; min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface-2);
}
.proof__c--good { border-color: color-mix(in srgb, var(--ok) 45%, transparent); background: var(--ok-soft); }
.proof__l { font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-mute); }
.proof__v { font-size: 27px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; margin-top: 4px; }
.proof__c--good .proof__v { color: var(--ok); }
.proof__s { font-size: 11px; color: var(--ink-mute); margin-top: 3px; line-height: 1.4; }
.proof__arrow { display: grid; place-items: center; color: var(--ink-mute); flex: 0 0 auto; }
.proof__note { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; border-top: 1px solid var(--line-2); padding-top: 12px; }

/* ------------------------------------------------------------ vouchers -- */

.gift {
  border-radius: var(--radius-lg);
  padding: 18px;
  color: #fff;
  background:
    radial-gradient(120% 120% at 88% 6%, hsl(var(--accent-h) 62% 46% / 0.92) 0%, transparent 62%),
    linear-gradient(155deg, hsl(var(--accent-h) 46% 22%) 0%, hsl(var(--accent-h) 52% 14%) 100%);
  display: flex; flex-direction: column; gap: 6px;
  box-shadow: var(--shadow-2);
}
.gift__top { display: flex; align-items: center; gap: 10px; }
.gift__mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: hsl(0 0% 100% / 0.14); color: #fff; flex: 0 0 auto; }
.gift__mark svg { display: block; }
.gift__b { font: 700 13.5px var(--display); letter-spacing: -0.01em; }
.gift__a { font-size: 10.5px; opacity: 0.72; }
.gift__v { font-size: 38px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; margin-top: 8px; }
.gift__to { font-size: 13px; font-weight: 600; opacity: 0.92; }
.gift__m { font-size: 12.5px; line-height: 1.55; opacity: 0.8; max-width: 42ch; }
.gift__foot {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin-top: 10px; padding-top: 11px;
  border-top: 1px solid hsl(0 0% 100% / 0.18);
}
.gift__code { font-size: 14px; font-weight: 700; letter-spacing: 0.09em; }
.gift__exp { font-size: 10.5px; opacity: 0.7; margin-left: auto; }

.balbar { display: flex; flex-direction: column; gap: 7px; }
.balbar__row { display: flex; align-items: baseline; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); }
.balbar__row--big { font-size: 14px; font-weight: 700; color: var(--ink); }

/* ----------------------------------------------------------- rebooking -- */

.nwrap { display: grid; grid-template-columns: 348px minmax(0, 1fr); gap: 16px; align-items: start; }

.nlist { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.nlist .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.nlist .tabs::-webkit-scrollbar { display: none; }
.nlist .tabs__t { flex: 0 0 auto; }
.nlist__l {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); overflow: hidden;
  max-height: min(620px, calc(100vh - 300px)); overflow-y: auto;
}
.nlist__i {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 12px;
  border: 0; border-bottom: 1px solid var(--line-2); border-left: 3px solid transparent;
  background: none; cursor: pointer; text-align: left; font: inherit;
}
.nlist__l li:last-child .nlist__i { border-bottom: 0; }
.nlist__i:hover { background: var(--surface-2); }
.nlist__i.is-on { background: var(--accent-soft); border-left-color: var(--accent); }
.nlist__b { flex: 1; min-width: 0; }
.nlist__h { display: flex; align-items: center; gap: 7px; }
.nlist__n { font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nlist__h .badge { margin-left: auto; flex: 0 0 auto; }
.nlist__s { font-size: 11px; color: var(--ink-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }

.ndetail {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 16px;
  display: flex; flex-direction: column; gap: 16px; min-width: 0;
}
.ndetail__head { display: flex; align-items: center; gap: 11px; }
.ndetail__t { font-size: 16px; }
.ndetail__s { font-size: 12px; color: var(--ink-mute); margin-top: 2px; }
.ndetail__head .badge { flex: 0 0 auto; }

.ndraft { display: flex; flex-direction: column; gap: 6px; }
.ndraft__bub {
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  border-radius: 4px 14px 14px 14px;
  padding: 4px 6px;
}
.ndraft__t {
  width: 100%; border: 0; background: none; resize: vertical;
  font: 400 13px/1.55 var(--sans); color: var(--accent-ink);
  padding: 7px 8px; min-height: 78px;
}
.ndraft__t:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 8px; }
.ndraft__c { font-size: 10.5px; color: var(--ink-mute); text-align: right; }

.nreply {
  background: var(--surface-2);
  border-radius: 14px 4px 14px 14px;
  padding: 10px 12px;
  font-size: 12.5px; line-height: 1.5; color: var(--ink-2);
  max-width: 46ch;
}

.nactions { display: flex; flex-wrap: wrap; gap: 6px; border-top: 1px solid var(--line-2); padding-top: 14px; }
.nactions .btn--primary { margin-left: auto; }

.bookedrow {
  display: flex; align-items: center; gap: 9px; width: 100%;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2); padding: 10px 12px;
  cursor: pointer; text-align: left; font: inherit; color: var(--ink);
}
.bookedrow:hover { border-color: var(--accent); }
.bookedrow__t { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bookedrow__d { font-size: 11px; color: var(--ink-mute); white-space: nowrap; }
.bookedrow__v { font-size: 12.5px; font-weight: 700; }

/* ------------------------------------------------------------ clients -- */

.clienthead { display: flex; align-items: center; gap: 12px; }
.clienthead__n { font: 700 17px var(--display); letter-spacing: -0.015em; }
.clienthead__s { font-size: 12px; color: var(--ink-mute); margin-top: 2px; }
.clienthead__tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }

.prefs { display: flex; flex-wrap: wrap; gap: 6px; }
.prefs__i {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-2); border-radius: 999px;
  padding: 5px 11px 5px 8px;
  font-size: 12px; color: var(--ink-2);
}
.prefs__i .ic { color: var(--ok); flex: 0 0 auto; }

/* ------------------------------------------------------------- services */

.svccard .card__actions { align-items: center; }
.famswatch { width: 14px; height: 14px; border-radius: 4px; display: block; }

.svcm { display: flex; flex-direction: column; }
.svcm__i {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 11px 16px; border-bottom: 1px solid var(--line-2);
}
.svcm__i:last-child { border-bottom: 0; }
.svcm__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.svcm__n { font-size: 13px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.svcm__d { font-size: 11.5px; color: var(--ink-mute); line-height: 1.45; }
.svcm__who { display: flex; flex-wrap: wrap; gap: 8px; }
.svcm__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: 0 0 auto; }
.svcm__t { font-size: 11px; color: var(--ink-mute); }
.svcm__p { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.svcm__dep { font-size: 10.5px; color: var(--ink-mute); white-space: nowrap; }
.svcm__dep.is-on { color: var(--accent-ink); font-weight: 600; }

.rules p { font-size: 13px; line-height: 1.6; color: var(--ink-2); }
.rules__l { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.rules__l li {
  font-size: 12.5px; line-height: 1.55; color: var(--ink-2);
  padding-left: 14px; position: relative;
}
.rules__l li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.rules__l strong { color: var(--ink); }

/* ------------------------------------------------------------- reports -- */

.teamrows { display: flex; flex-direction: column; }
.teamrows__i { display: flex; align-items: center; gap: 11px; padding: 10px 16px; border-bottom: 1px solid var(--line-2); }
.teamrows__i:last-child { border-bottom: 0; }
.teamrows__i > .who { flex: 0 0 106px; }
.teamrows__n { font-size: 11px; color: var(--ink-mute); white-space: nowrap; }
.teamrows__v { font-size: 12.5px; font-weight: 700; white-space: nowrap; min-width: 62px; text-align: right; }

.toplist { display: flex; flex-direction: column; }
.toplist__i { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-bottom: 1px solid var(--line-2); }
.toplist__i:last-child { border-bottom: 0; }
.toplist__r { font-size: 11px; color: var(--ink-mute); width: 16px; flex: 0 0 auto; }
.toplist__t { flex: 1; min-width: 0; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toplist__n { font-size: 11px; color: var(--ink-mute); white-space: nowrap; }
.toplist__v { font-size: 12.5px; font-weight: 700; white-space: nowrap; }

.heatwrap { overflow-x: auto; }
.heat { border-collapse: separate; border-spacing: 3px; width: 100%; min-width: 460px; }
.heat__h, .heat__d {
  font: 700 10px var(--sans); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-mute); padding: 2px 4px; text-align: center; font-weight: 700;
}
.heat__d { text-align: right; white-space: nowrap; }
.heat__corner { width: 34px; }
.heat__c {
  height: 26px; min-width: 26px;
  border-radius: 5px;
  background: var(--surface-2);
  text-align: center;
  font: 600 11px var(--mono);
  color: var(--ink-2);
}
.heat__c.is-shut { background: transparent; border: 1px dashed var(--line-2); }
.heat__k { font-size: 11.5px; color: var(--ink-mute); margin-top: 10px; }

/* --------------------------------------------------------- responsive -- */

@media (max-width: 1180px) {
  .nwrap { grid-template-columns: minmax(0, 1fr); }
  .nlist__l { max-height: 320px; }
}

@media (max-width: 900px) {
  .tabs { overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs__t { flex: 0 0 auto; }

  .legend__h { margin-left: 0; flex-basis: 100%; }
  .proof { flex-direction: column; }
  .proof__arrow { transform: rotate(90deg); }
  .chairs__i { flex-direction: column; gap: 8px; }
  .chairs__i > .who { flex: 0 0 auto; }
  .svcm__i { flex-wrap: wrap; }
  .svcm__meta { flex-direction: row; align-items: baseline; gap: 10px; }
  .gift__v { font-size: 32px; }
  .nactions .btn--primary { margin-left: 0; }
  .teamrows__i > .who { flex: 0 0 92px; }
}
