/* Salon dashboard: same palette as the public site, tuned for long days of use */
:root {
  --ink: #24141b; --ink-2: #3a2530; --paper: #f9f4f6; --panel: #fff; --line: #e6d6dd; --line-strong: #cdb6bf;
  --muted: #63525a; --lacquer: #a3123a; --lacquer-dark: #7a0c2b; --lacquer-soft: #fbe9ee; --rose: #f2b8c6;
  --sage: #2f5d50; --sage-soft: #e5f0eb; --amber: #8a5a00; --amber-soft: #fff1d2; --focus: #1d5fd1; --white: #fff;
  --shadow-1: 0 1px 2px rgba(36, 20, 27, .06), 0 2px 6px rgba(36, 20, 27, .04);
  --shadow-2: 0 2px 4px rgba(36, 20, 27, .05), 0 16px 36px -14px rgba(36, 20, 27, .25);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --t-ui: 200ms;
  --display: 'Bricolage Grotesque', 'Arial Narrow', sans-serif;
  --body: 'Figtree', 'Trebuchet MS', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.5 var(--body); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--display); font-stretch: 85%; line-height: 1.12; margin: 0 0 .5em; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: 2rem; font-weight: 800; } h2 { font-size: 1.4rem; font-weight: 750; } h3 { font-size: 1.12rem; font-weight: 720; }
a { color: var(--lacquer); text-underline-offset: 3px; }
::selection { background: var(--lacquer); color: #fff; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 50; transition: top var(--t-ui) var(--ease); }
.skip:focus { top: 12px; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 16px; border: 1.5px solid var(--line-strong); background: var(--white); color: var(--ink); border-radius: 9px; font: 650 .95rem/1.1 var(--body); cursor: pointer; text-decoration: none; box-shadow: var(--shadow-1); transition: background-color var(--t-ui) var(--ease), border-color var(--t-ui) var(--ease), color var(--t-ui) var(--ease), box-shadow var(--t-ui) var(--ease), transform var(--t-ui) var(--ease); }
.btn:hover { border-color: var(--ink); background: #fff; }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.98); }
.btn.primary { background: var(--lacquer); border-color: var(--lacquer); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 6px 14px -8px rgba(122,12,43,.7); }
.btn.primary:hover { background: var(--lacquer-dark); border-color: var(--lacquer-dark); }
.btn.danger { border-color: #e2b6c0; color: #9b0d22; }
.btn.danger:hover { background: #fdecef; border-color: #9b0d22; }
.btn.small { min-height: 34px; padding: 5px 12px; font-size: .88rem; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.link { background: none; border: 0; color: var(--lacquer); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px 0; border-radius: 4px; transition: color var(--t-ui) var(--ease); }
.link:hover { color: var(--lacquer-dark); }

input, select, textarea { font: inherit; color: var(--ink); background: #fff; border: 1.5px solid #b9a5ad; border-radius: 9px; padding: 9px 11px; width: 100%; margin-top: 5px; transition: border-color var(--t-ui) var(--ease), box-shadow var(--t-ui) var(--ease); }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(163, 18, 58, .14); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
input[type=checkbox] { width: 18px; height: 18px; margin: 0; accent-color: var(--lacquer); box-shadow: none; }
textarea { min-height: 72px; resize: vertical; }
label { display: block; font-weight: 600; margin-bottom: 14px; font-size: .95rem; }
label.check { display: flex; gap: 10px; align-items: center; font-weight: 500; cursor: pointer; }
.err { color: #8f0c20; font-weight: 650; background: #fdecef; border: 1px solid #f2c4cd; border-radius: 8px; padding: 9px 12px; animation: rise 300ms var(--ease) both; }
.ok { color: var(--sage); font-weight: 650; background: var(--sage-soft); border-radius: 8px; padding: 9px 12px; animation: rise 300ms var(--ease) both; }
.hint { color: var(--muted); font-size: .92rem; }
.warn { background: var(--amber-soft); color: #5c3d00; margin: 0; padding: 11px 24px; font-weight: 600; border-bottom: 1px solid #f0dca8; }
ul.plain { list-style: none; padding: 0; margin: 0 0 20px; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* ---------- sign in ---------- */
.auth { min-height: 100vh; display: grid; align-content: center; justify-items: center; padding: 48px 16px; background: radial-gradient(70% 50% at 50% 0%, var(--lacquer-soft), transparent 70%), var(--paper); }
.auth > * { width: 100%; max-width: 420px; }
.auth-title { font-size: 2rem; text-align: center; margin-bottom: 22px; }
.auth-title::before { content: ''; display: block; width: 18px; height: 30px; margin: 0 auto 14px; border-radius: 9px 9px 3px 3px; background: linear-gradient(100deg, rgba(255,255,255,.45) 0 22%, transparent 34%), var(--lacquer); box-shadow: 0 0 0 1.5px var(--ink); }
.auth-title span { display: block; margin-top: 6px; font: 500 1rem var(--body); color: var(--muted); }
.auth .box { position: relative; overflow: hidden; padding: 28px 26px 22px; box-shadow: var(--shadow-2); animation: rise 500ms var(--ease) both; }
.auth .box::before { content: ''; position: absolute; inset: 0 0 auto; height: 5px; background: var(--lacquer); }
.auth .box .btn.primary { width: 100%; min-height: 46px; margin-top: 4px; }
.auth .box .link { display: block; margin: 10px auto 0; }
.box { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px; margin-bottom: 20px; max-width: 540px; box-shadow: var(--shadow-1); }
.box.wide { max-width: none; }
.box.inline { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.box.inline label { flex: 1 1 220px; margin: 0; }
.box > h2:first-child { padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }

/* ---------- shell ---------- */
.top { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; padding: 10px 24px; background: var(--ink); color: #fff; box-shadow: 0 8px 24px -18px rgba(36,20,27,.8); }
.top::after { content: ''; position: absolute; inset: auto 0 0; height: 3px; background: var(--lacquer); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font: 800 1.18rem/1 var(--display); font-stretch: 82%; text-decoration: none; }
.brand::before { content: ''; width: 11px; height: 19px; border-radius: 6px 6px 2px 2px; background: linear-gradient(100deg, rgba(255,255,255,.5) 0 22%, transparent 34%), var(--lacquer); box-shadow: 0 0 0 1.5px #fff; }
.brand:hover { color: var(--rose); }
.tabs { display: flex; flex-wrap: wrap; gap: 2px; flex: 1; }
.tabs button { position: relative; background: none; border: 0; color: #e6d6dc; font: 600 .94rem/1 var(--body); padding: 11px 12px; border-radius: 8px; cursor: pointer; transition: background-color var(--t-ui) var(--ease), color var(--t-ui) var(--ease); }
.tabs button:hover { background: rgba(255,255,255,.09); color: #fff; }
.tabs button[aria-current="page"] { background: #fff; color: var(--ink); box-shadow: 0 4px 10px -6px rgba(0,0,0,.6); }
.tabs button:focus-visible { outline-color: var(--rose); }
.who { font-size: .9rem; color: #e6d6dc; }
.who .link { color: #fff; margin-left: 6px; }
.who .link:hover { color: var(--rose); }
.who .link:focus-visible { outline-color: var(--rose); }
main#main { padding: 28px 24px 64px; max-width: 1320px; margin: 0 auto; animation: rise 400ms var(--ease) both; }
.bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.bar h1, .bar h2 { margin: 0; }
.date-nav, .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.date-nav input { width: auto; margin: 0; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 14px; }
@media (max-width: 560px) { main#main { padding: 20px 16px 48px; } .top { padding: 10px 16px; } }

/* ---------- schedule ---------- */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; list-style: none; padding: 0; margin: 0 0 22px; }
.week button { width: 100%; padding: 9px 2px; border: 1.5px solid var(--line); background: #fff; border-radius: 11px; font: inherit; color: var(--ink); cursor: pointer; transition: border-color var(--t-ui) var(--ease), background-color var(--t-ui) var(--ease), transform var(--t-ui) var(--ease); }
.week button:hover { border-color: var(--ink); transform: translateY(-1px); }
.week button b { display: block; font: 800 1.2rem/1.15 var(--display); font-stretch: 85%; }
.week button small { display: block; color: var(--muted); font-size: .78rem; }
.week button[aria-current="date"] { border-color: var(--ink); background: var(--ink); color: #fff; box-shadow: 0 8px 16px -10px rgba(36,20,27,.8); }
.week button[aria-current="date"] small { color: #eadde2; }
.day-label { font-size: 1.6rem; }
.totals { color: var(--muted); margin-top: 0; font-variant-numeric: tabular-nums; }
.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; margin-bottom: 36px; }
.col { min-width: 0; }
.col h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin-bottom: 12px; }
.col h3 small { font: 500 .85rem var(--body); color: var(--muted); }
.appt { position: relative; border: 1px solid var(--line); border-left: 5px solid var(--lacquer); background: #fff; border-radius: 6px 12px 12px 6px; padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--shadow-1); transition: box-shadow var(--t-ui) var(--ease), transform var(--t-ui) var(--ease), border-color var(--t-ui) var(--ease); animation: rise 350ms var(--ease) both; }
.appt:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.appt.arrived { border-left-color: var(--amber); }
.appt.completed { border-left-color: var(--sage); }
.appt.cancelled, .appt.no_show { border-left-color: #b6a2aa; opacity: .72; }
.appt.cancelled .n { text-decoration: line-through; }
.appt .t { font-weight: 750; font-variant-numeric: tabular-nums; }
.appt .n { font-weight: 700; font-size: 1.05rem; }
.appt .s, .appt .m { color: var(--muted); font-size: .92rem; }
.appt .note { background: #f8eff2; padding: 6px 10px; border-radius: 6px; font-size: .9rem; margin: 8px 0 0; overflow-wrap: anywhere; }
.tag { display: inline-block; font-size: .74rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #f0e4e9; margin-left: 6px; vertical-align: middle; }
.tag.walkin { background: var(--amber-soft); color: #5c3d00; } .tag.phone { background: #e3eef9; color: #173f73; }
.appt .row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.appt details { margin-top: 8px; }
.appt summary { cursor: pointer; color: var(--lacquer); font-weight: 650; font-size: .92rem; border-radius: 4px; width: fit-content; }
.appt summary:hover { color: var(--lacquer-dark); }
.appt details[open] .edit { animation: rise 250ms var(--ease) both; }
.appt .edit { padding-top: 10px; }
.off-block { background: repeating-linear-gradient(135deg, #f3ecef 0 8px, #fff 8px 16px); border: 1px dashed #b6a2aa; border-radius: 10px; padding: 9px 12px; margin-bottom: 10px; color: var(--muted); }
.empty { color: var(--muted); font-style: normal; padding: 18px 14px; text-align: center; border: 1px dashed var(--line-strong); border-radius: 12px; background: rgba(255,255,255,.6); }
.search { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; border-top: 1px solid var(--line-strong); padding-top: 22px; }
.search h2 { flex-basis: 100%; }
.search input { flex: 1 1 220px; width: auto; margin: 0; }
.results { margin-top: 14px; }
.results .appt { max-width: 640px; }

/* ---------- hours ---------- */
.week-edit { display: grid; gap: 4px; margin-bottom: 16px; }
.week-edit .d { display: grid; grid-template-columns: 120px 110px 1fr 1fr; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 8px; transition: background-color var(--t-ui) var(--ease); }
.week-edit .d:hover { background: #fbf5f7; }
.week-edit .d input[type=time] { margin: 0; }
.week-edit label { margin: 0; }
@media (max-width: 560px) { .week-edit .d { grid-template-columns: 1fr 1fr; } }

/* ---------- services ---------- */
.table-wrap { overflow-x: auto; margin-bottom: 20px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow-1); }
.svc-table { border-collapse: collapse; width: 100%; min-width: 860px; }
.svc-table th, .svc-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.svc-table thead th { position: sticky; top: 0; background: #fbf6f8; font-size: .8rem; letter-spacing: .02em; color: var(--muted); }
.svc-table tbody tr { transition: background-color var(--t-ui) var(--ease); }
.svc-table tbody tr:hover { background: #fdf8fa; }
.svc-table tr:last-child td { border-bottom: 0; }
.svc-table input { margin: 0; }
.svc-table input[type=number] { width: 80px; }
.svc-table .price { width: 90px; }
.svc-table td:last-child { white-space: nowrap; }

/* ---------- team ---------- */
.tech { background: #fbf7f9; border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 14px; }
.tech .svc-checks { columns: 2 220px; margin: 8px 0; }
.tech .svc-checks label { break-inside: avoid; }
#staff-list li { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
#staff-list li select { width: auto; margin: 0; }
#timeoff-list li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }

/* ---------- dialog ---------- */
dialog { border: 0; border-radius: 16px; padding: 0; width: min(680px, calc(100vw - 24px)); max-height: calc(100vh - 24px); box-shadow: 0 40px 100px -30px rgba(36,20,27,.6); }
dialog[open] { animation: dlg 280ms var(--ease) both; }
@keyframes dlg { from { opacity: 0; transform: translateY(14px) scale(.98); } }
dialog::backdrop { background: rgba(36, 20, 27, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
dialog form { padding: 24px; }
.svc-pick { border: 0; padding: 0; margin: 0 0 8px; }
.svc-pick legend { font-weight: 700; margin-bottom: 6px; }
#dlg-services { columns: 2 220px; }
#dlg-services label { break-inside: avoid; font-weight: 500; margin-bottom: 6px; }
.free li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
