/* ===== Elara Family Salon – airy white look =====
   White surfaces, thin sage lines, clean sans-serif, a fresh teal accent.
   A theme only sets the colour variables below (switch it in Setup → Colours). */
:root, [data-theme="sage-gold"] {
  --bg: #fbfcfa; --surface: #ffffff; --selected: #edf3ea;
  --ink: #24332a; --muted: #5d6f61; --line: #d9e2d5;
  --nav: #ffffff; --nav-ink: #3f5d4a; --nav-line: #c3d2bf;            /* header */
  --bar: #ffffff; --bar-ink: #2f4637; --bar-num: #2f4637;              /* bottom bar */
  --head-bg: #ffffff; --head-ink: #3f5d4a; --head-line: #b9cab5;       /* head buttons */
  --btn: #4f6f57; --btn-ink: #ffffff; --link: #3f5d4a;                 /* buttons & links */
  --accent: #2f7d72; --accent-ink: #ffffff; --accent-text: #1f6559; --accent-soft: #e2f0ed;  /* teal */
  --danger: #a8392a; --danger-ink: #ffffff;
}
[data-theme="noir-gold"] {
  --bg: #15130f; --surface: #1f1c17; --selected: #2b2619;
  --ink: #f2ecdd; --muted: #b9af9b; --line: #3a352b;
  --nav: #1f1c17; --nav-ink: #e8d8a6; --nav-line: #5a4e2e;
  --bar: #1f1c17; --bar-ink: #f2ecdd; --bar-num: #e8c968;
  --head-bg: #1f1c17; --head-ink: #f4ecd6; --head-line: #5a4e2e;
  --btn: #b8923a; --btn-ink: #1a1405; --link: #e3c36b;
  --accent: #c9a24a; --accent-ink: #1a1405; --accent-text: #e3c36b; --accent-soft: #3a3118;
  --danger: #ff8d7a; --danger-ink: #1a0a05;
}
[data-theme="rose-gold"] {
  --bg: #fbf6f2; --surface: #ffffff; --selected: #f7ece8;
  --ink: #2b2224; --muted: #6b5a5d; --line: #eadcd6;
  --nav: #ffffff; --nav-ink: #5a3f47; --nav-line: #dcc5c0;
  --bar: #5a3f47; --bar-ink: #ffffff; --bar-num: #f1d3b8;
  --head-bg: #ffffff; --head-ink: #5a3f47; --head-line: #dcc5c0;
  --btn: #6b4b54; --btn-ink: #ffffff; --link: #6b4b54;
  --accent: #b9805f; --accent-ink: #261408; --accent-text: #8a5236; --accent-soft: #f6e6dc;
  --danger: #a8392a; --danger-ink: #ffffff;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); font-size: 17px; display: flex; flex-direction: column; }
button, input, select { font: inherit; color: inherit; }

/* header */
.top { display: flex; align-items: center; gap: 18px; background: var(--nav); padding: 8px 18px; border-bottom: 1px solid var(--nav-line); box-shadow: 0 1px 0 color-mix(in srgb, var(--accent) 55%, transparent); }
.logo-badge { background: #fff; border-radius: 10px; padding: 2px 10px; display: flex; }
.logo { height: 46px; width: auto; }
.top-title { font-size: 13px; color: var(--nav-ink); letter-spacing: .28em; text-transform: uppercase; flex: 1; }
.top-right { display: flex; gap: 8px; }
.top .btn.ghost { color: var(--nav-ink); border: 1px solid var(--nav-line); background: transparent; letter-spacing: .04em; }
#screen { flex: 1; overflow-y: auto; padding: 18px; }

/* buttons: flat, quiet */
.btn { border: 0; border-radius: 10px; padding: 12px 22px; background: var(--btn); color: var(--btn-ink); cursor: pointer; min-height: 48px; letter-spacing: .03em; }
.btn:active { filter: brightness(.88); }
.btn.ghost { background: transparent; color: var(--link); border: 1px solid var(--line); border-color: color-mix(in srgb, var(--link) 45%, transparent); }
.btn.gold { background: var(--accent); color: var(--accent-ink); font-weight: 600; letter-spacing: .06em; }
.btn.danger { background: var(--danger); color: var(--danger-ink); }
.btn.small { min-height: 40px; padding: 8px 16px; font-size: 16px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

/* heads: one tone, thin gold frame */
.search { width: 100%; padding: 14px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); margin-bottom: 14px; }
.search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.heads { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.head-btn { position: relative; min-height: 118px; border: 1px solid var(--head-line); border-radius: 16px; background: var(--head-bg); color: var(--head-ink); font-family: inherit; font-size: 20px; font-weight: 500; letter-spacing: .02em; padding: 14px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; transition: background .12s, border-color .12s; }
.head-btn:hover { border-color: var(--accent); }
.head-btn:active { background: var(--selected); border-color: var(--accent); }
.head-btn small { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.head-btn small::before { content: ""; display: block; width: 26px; height: 1px; background: var(--accent); margin: 2px auto 7px; }
.head-btn .in-bill { background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 2px 12px; font-size: 13px; letter-spacing: .06em; font-weight: 600; }
.product-btn { background: var(--selected); border-color: var(--accent); }
.product-btn small { color: var(--accent-text); }

/* services screen */
.svc-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; position: sticky; top: -18px; background: linear-gradient(180deg, var(--bg) 78%, transparent); padding: 10px 0 12px; z-index: 2; }
.svc-top h2 { margin: 0; font-size: 24px; font-weight: 500; letter-spacing: .02em; color: var(--ink); flex: 1; min-width: 160px; }
.chips { display: flex; gap: 6px; }
.chip { border: 1px solid var(--line); border-color: color-mix(in srgb, var(--link) 40%, transparent); background: transparent; color: var(--link); border-radius: 999px; padding: 8px 18px; cursor: pointer; min-height: 44px; letter-spacing: .04em; }
.chip.on { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.svc { position: relative; text-align: left; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 14px; padding: 14px 16px; min-height: 96px; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; }
.svc:active { background: var(--selected); }
.svc.added { border-color: var(--accent); background: var(--selected); box-shadow: inset 0 0 0 1px var(--accent); }
.svc .nm { font-size: 17px; font-weight: 500; line-height: 1.2; }
.svc .row { display: flex; justify-content: space-between; align-items: baseline; color: var(--muted); font-size: 15px; gap: 8px; letter-spacing: .02em; }
.svc .pr { color: var(--accent-text); font-size: 18px; font-weight: 600; white-space: nowrap; letter-spacing: .02em; }
.svc .badge { position: absolute; top: -9px; right: -7px; background: var(--accent); color: var(--accent-ink); border-radius: 999px; min-width: 28px; height: 28px; display: grid; place-items: center; font-size: 15px; padding: 0 8px; font-weight: 600; }
.svc.add-new { border: 1px dashed var(--accent); background: transparent; align-items: center; justify-content: center; color: var(--link); font-size: 19px; }
.empty { color: var(--muted); padding: 30px; text-align: center; }
.subhead { margin: 20px 0 10px; font-size: 14px; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--accent-text); display: flex; align-items: center; gap: 14px; scroll-margin-top: 150px; }
.subhead::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.subchips { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; }
.svc.out { opacity: .5; }
.lowtxt { color: var(--danger); font-weight: 600; }
div.svc { cursor: pointer; }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.stepper button { width: 56px; height: 48px; border-radius: 10px; border: 1px solid var(--accent); background: transparent; color: var(--link); font-size: 26px; cursor: pointer; }
.stepper button:active { background: var(--accent-soft); }
.stepper b { font-size: 24px; color: var(--ink); font-weight: 600; }

/* bottom bar */
.billbar { background: var(--bar); color: var(--bar-ink); border-top: 1px solid var(--nav-line); padding: 10px 18px; display: flex; align-items: center; gap: 14px; }
.billbar .sum { flex: 1; font-size: 19px; letter-spacing: .04em; }
.billbar .sum b { color: var(--bar-num); font-size: 22px; font-weight: 600; }

/* bill screen */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.panel h3 { margin: 0 0 12px; color: var(--accent-text); font-size: 14px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; }
.line { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line .nm { font-size: 17px; }
.line .staffrow { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tag { background: var(--accent-soft); color: var(--accent-text); border-radius: 999px; padding: 5px 14px; font-size: 16px; letter-spacing: .02em; }
.tag.warn { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.qty { display: flex; align-items: center; gap: 6px; }
.qty button { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--accent); background: transparent; font-size: 22px; cursor: pointer; color: var(--link); }
.money { font-size: 21px; text-align: right; min-width: 90px; }
.totals div { display: flex; justify-content: space-between; padding: 4px 0; }
.totals .grand { font-size: 30px; color: var(--ink); border-top: 1px solid var(--accent); margin-top: 8px; padding-top: 10px; }
.totals .grand b { color: var(--accent-text); font-weight: 600; }
.seg { display: inline-flex; border: 1px solid var(--accent); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 10px 18px; min-height: 46px; cursor: pointer; color: var(--link); letter-spacing: .03em; }
.seg button.on { background: var(--btn); color: var(--btn-ink); }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.field label { color: var(--muted); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.field input, .field select { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); min-height: 48px; width: 100%; }
.inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.pay { display: flex; gap: 10px; flex-wrap: wrap; }
.pay button { flex: 1; min-width: 110px; }
.err { color: var(--danger); margin: 8px 0; min-height: 1.2em; }
.ok { color: var(--link); }

/* modal */
.overlay { position: fixed; inset: 0; background: rgba(10,14,11,.6); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 10; }
.modal { background: var(--bg); color: var(--ink); border-radius: 14px; padding: 22px; width: min(620px, 100%); max-height: 92vh; overflow-y: auto; border: 1px solid var(--accent); box-shadow: 0 20px 50px rgba(0,0,0,.4); }
.modal h2 { margin: 0 0 14px; font-weight: 500; letter-spacing: .01em; color: var(--ink); }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.staffpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-bottom: 12px; }
.staffpick button { min-height: 56px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.staffpick button.on { border-color: var(--accent); background: var(--btn); color: var(--btn-ink); }
.splitrow { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.splitrow .nm { flex: 1; }
.splitrow input { width: 100px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); text-align: right; min-height: 46px; }
.receipt .big { font-size: 34px; color: var(--ink); }
table { width: 100%; border-collapse: collapse; }
td, th { padding: 9px 6px; border-bottom: 1px solid var(--line); text-align: left; }
th { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
td.r, th.r { text-align: right; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px); background: var(--bar); color: var(--bar-ink); padding: 12px 24px; border-radius: 999px; opacity: 0; pointer-events: none; transition: .2s; z-index: 20; max-width: 90vw; border: 1px solid var(--accent); letter-spacing: .03em; }
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.bad { background: var(--danger); color: var(--danger-ink); border-color: var(--danger-ink); }

/* theme picker (Setup) */
.themes { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.theme-opt { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); padding: 10px; cursor: pointer; text-align: left; letter-spacing: .03em; }
.theme-opt.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.theme-opt .sw { display: flex; height: 30px; border-radius: 8px; overflow: hidden; margin-bottom: 8px; border: 1px solid var(--line); }
.theme-opt .sw i { flex: 1; }

@media (max-width: 640px) { .top-title { display: none; } .logo { height: 40px; } .head-btn { min-height: 100px; font-size: 18px; } }

/* open orders */
.top .btn .count { background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 1px 9px; margin-left: 6px; font-size: 14px; font-weight: 600; }
.open-card { border-left: 3px solid var(--accent); }

.sheet th, .sheet td { padding: 2px; font-size: 13px; }
.sheet .cell { min-width: 34px; min-height: 40px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); }
.sheet .cell.present { background: #dff1ec; color: #1d5b52; } .sheet .cell.half { background: #fbefd0; color: #6b4a00; }
.sheet .cell.absent { background: #f8dcdc; color: #8a1f1f; } .sheet .cell.leave { background: #e3e8f6; color: #2d3f7a; } .sheet .cell.off { background: var(--surface); }
.top-right { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.top .btn.ghost { padding-left: 12px; padding-right: 12px; }
@media (max-width: 1180px) { .top-title { display: none; } .top { gap: 10px; } .top-right { flex: 1; } }

body.loggedout .top-right { display: none; }
[hidden] { display: none !important; }

/* monthly report */
.report .rep-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:14px}.report h2{margin:2px 0 0;font-size:24px}.eyebrow{letter-spacing:.22em;font-size:12px;color:var(--accent);text-transform:uppercase}
.score{background:var(--accent);color:#fff;border-radius:18px;padding:10px 18px;text-align:center;min-width:110px}.score b{font-size:34px}.score span{opacity:.85}.score em{display:block;font-style:normal;font-size:13px}
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin-bottom:10px}.kpi{background:#fff;border:1px solid var(--line,#dfe8dc);border-radius:14px;padding:12px 14px;display:flex;flex-direction:column;gap:2px}.kpi>span:first-child{color:var(--muted);font-size:12px;letter-spacing:.1em;text-transform:uppercase}.kpi b{font-size:22px}.kpi.wide{grid-column:1/-1}
.delta{font-size:12.5px;color:var(--muted)}.delta.up{color:#1f7a4d}.delta.down{color:#b4452f}
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:12px}@media(max-width:820px){.two-col{grid-template-columns:1fr}.report .rep-head{flex-direction:column;align-items:flex-start}}
.bars{display:flex;align-items:flex-end;gap:10px;height:170px;padding-top:10px}.bar{flex:1;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;height:100%;gap:2px;position:relative}.bar i{width:100%;max-width:46px;background:var(--accent);border-radius:8px 8px 0 0;display:block}.bar small{color:var(--muted)}.bar em{font-style:normal;font-size:11.5px;color:var(--muted)}
.wds{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}.wd{background:rgba(31,138,125,var(--a));border-radius:10px;padding:8px 4px;text-align:center;display:flex;flex-direction:column;font-size:12px}.wd b{font-size:11px;letter-spacing:.08em}.wd small{opacity:.8}
.plan{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:10px}.plan li span{display:block;color:var(--muted)}.report .note{color:var(--muted);font-size:13px;margin-top:6px}
@media print{body *{visibility:hidden}.report,.report *{visibility:visible}.report{position:absolute;left:0;top:0;width:100%}.no-print{display:none!important}.panel,.kpi{break-inside:avoid}.score,.bar i,.wd{-webkit-print-color-adjust:exact;print-color-adjust:exact}}

.rep-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}.rep-card{text-align:left;background:#fff;border:1px solid var(--line,#dfe8dc);border-radius:16px;padding:16px;cursor:pointer;display:flex;flex-direction:column;gap:6px;font:inherit;color:inherit}.rep-card:hover{border-color:var(--accent)}.rep-card b{font-size:17px}.rep-card span{color:var(--muted);font-size:14px}
