:root {
  color-scheme: light;
  --canvas: #f7f7f5;
  --surface: #fff;
  --ink: #252121;
  --muted: #665e61;
  --line: #e4e2de;
  --plum: #6f3557;
  --plum-soft: #f5eaf0;
  --green: #235d49;
  --green-soft: #e5f3eb;
  --amber: #764b09;
  --amber-soft: #fff1d4;
  font: 16px/1.5 "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 100vh; }
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2rem, 4vw, 3.6rem); letter-spacing: -.055em; line-height: 1.07; }
h2 { font-size: 1.15rem; letter-spacing: -.024em; }
a { color: var(--plum); text-underline-offset: .18em; }
button, input, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #9c547b; outline-offset: 3px; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip:focus { position: fixed; z-index: 3; top: 8px; left: 8px; padding: 8px 12px; background: white; }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 28px 20px; display: flex; flex-direction: column;
  gap: 32px; border-right: 1px solid var(--line); background: var(--surface);
}
.brand { display: flex; gap: 12px; align-items: center; color: var(--ink); text-decoration: none; }
.mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--plum); color: white; font: 600 1.45rem Georgia, serif; }
.brand strong { display: block; font-size: 1.2rem; line-height: 1.15; }
.brand small { display: block; margin-top: 3px; color: var(--muted); }
.navigation { display: grid; gap: 5px; }
.navigation a { padding: 10px 12px; border-radius: 9px; color: var(--muted); text-decoration: none; font-weight: 600; }
.navigation a:hover, .navigation a[aria-current="page"] { background: var(--plum-soft); color: var(--plum); }
.demo-note { margin-top: auto; color: var(--muted); font-size: .8rem; }
main { width: min(100%, 1420px); margin-inline: auto; padding: 26px clamp(20px, 4vw, 56px) 48px; }
.top, .section-head, .calendar-controls, .date-controls, .dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.top { margin-bottom: 22px; }
.top p, .heading p, .search span, .filter span { color: var(--muted); }
.top p::first-letter { text-transform: uppercase; }
.button, .subtle, .hero-link { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 10px; padding: 8px 14px; border-radius: 10px; border: 1px solid transparent; font-weight: 650; text-decoration: none; }
.button { color: white; background: var(--plum); }
.button:hover { background: #54233e; }
.subtle { background: white; border-color: var(--line); color: var(--plum); }
.subtle:hover { background: var(--plum-soft); }
.hero {
  display: flex; align-items: flex-end; min-height: 263px; border-radius: 22px; padding: clamp(22px, 4vw, 42px);
  color: white; background: linear-gradient(90deg, #2e1b25ee, #321f2bb8 54%, #321f2b38), url("salon.webp") center 58% / cover;
}
.hero h1 { margin: 8px 0 12px; }
.hero p { max-width: 34ch; }
.eyebrow { font-size: .75rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; }
.hero-link { margin-top: 20px; color: #402234; background: #faf1f5; }
.hero-link:hover { background: white; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.metric, .surface { border: 1px solid var(--line); border-radius: 17px; background: var(--surface); }
.metric, .surface { padding: clamp(14px, 2vw, 22px); }
.metric span { display: block; color: var(--muted); font-size: .88rem; }
.metric strong { display: block; margin-top: 5px; font-size: clamp(1.35rem, 3vw, 1.9rem); letter-spacing: -.03em; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; }
.section-head { margin-bottom: 10px; }
.section-head a { white-space: nowrap; font-size: .85rem; }
.record { display: grid; grid-template-columns: 3.6rem minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; text-align: left; color: inherit; padding: 11px 2px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); }
.record:last-child { border-bottom: 0; }
.record:hover { background: var(--plum-soft); }
.record span { display: block; }
.record small, .record .time, .load small { color: var(--muted); }
.record .time { font-variant-numeric: tabular-nums; font-weight: 650; }
.badge { display: inline-block; border-radius: 999px; padding: 4px 9px; font-size: .72rem; font-weight: 650; }
.badge.pending { background: var(--amber-soft); color: var(--amber); }
.badge.confirmed { background: var(--plum-soft); color: var(--plum); }
.badge.completed { background: var(--green-soft); color: var(--green); }
.badge.canceled { background: #eeecea; color: #5e5754; }
.load { margin-top: 12px; }
.load p { display: flex; justify-content: space-between; gap: 8px; }
progress { width: 100%; height: 8px; accent-color: var(--plum); }
.heading { margin: 4px 0 20px; }
.heading p { margin-top: 9px; }
.calendar-controls { flex-wrap: wrap; margin-bottom: 14px; }
.date-controls { justify-content: flex-start; flex-wrap: wrap; gap: 6px; }
.date-controls .subtle { padding-inline: 9px; }
.filter { display: flex; align-items: center; gap: 8px; }
input, select { min-height: 42px; max-width: 100%; border: 1px solid #cfc8c9; border-radius: 9px; background: white; color: var(--ink); padding: 7px 10px; }
.search { display: grid; gap: 6px; max-width: 345px; margin-bottom: 14px; }
.client { grid-template-columns: minmax(0, 1fr) auto; }
.empty { padding: 18px 0; color: var(--muted); }
.feedback { margin: 0 0 16px; padding: 10px 14px; border-radius: 10px; background: var(--green-soft); color: var(--green); }
dialog { width: min(530px, calc(100% - 28px)); max-height: calc(100vh - 28px); padding: 22px; border: 1px solid var(--line); border-radius: 19px; color: var(--ink); box-shadow: 0 24px 70px #32213133; }
dialog::backdrop { background: #261b2585; }
.dialog-top { margin-bottom: 16px; }
.details { display: grid; gap: 8px; margin-bottom: 18px; }
.details dt { color: var(--muted); font-size: .83rem; }
.details dd { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.fields label { display: grid; gap: 4px; min-width: 0; font-size: .9rem; font-weight: 600; }
.fields .full { grid-column: 1 / -1; }
.error { margin-bottom: 12px; color: #963833; }
@media (max-width: 960px) {
  body { grid-template-columns: 175px minmax(0, 1fr); }
  .overview-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  body { display: block; }
  .sidebar { position: static; height: auto; padding: 14px 16px; gap: 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .navigation { display: flex; flex-wrap: wrap; }
  .navigation a { padding: 8px 10px; }
  main { padding: 16px 14px 28px; }
  .top p { font-size: .8rem; }
  .metrics { gap: 7px; }
  .metric { padding: 10px; }
  .metric strong { font-size: 1.15rem; }
  .metric span { font-size: .75rem; }
  .record { grid-template-columns: 2.6rem minmax(0, 1fr); gap: 4px 8px; }
  .record .badge { grid-column: 2; justify-self: start; }
  .client { grid-template-columns: minmax(0, 1fr) auto; }
}
@media (max-width: 355px) {
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric:first-child { grid-column: 1 / -1; }
  .fields { grid-template-columns: 1fr; }
}
