/* Layout: one booking surface, two roles. Salome Nails identity: white ground, the logo's warm beige, espresso-brown type. Single light theme by design. */
  :root {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-2: #f8f4f1;     /* the logo's inner ivory */
    --ink: #3e2e25;           /* espresso brown */
    --muted: #8a7568;         /* taupe */
    --line: #ebe2dc;
    --beige: #d4c8c2;         /* the logo's circle */
    --gel: #6e5444;           /* primary: cocoa brown */
    --gel-ink: #ffffff;
    --nude: #dccabd;          /* build */
    --removal: #e9e3da;       /* removal */
    --regular: #efe2da;       /* anatomy */
    --pending: #9a6a2c;
    --pending-bg: #f7eedf;
    --ok: #4f6e4a;
    --ok-bg: #e9efe5;
    --no: #8a7a72;
    --no-bg: #f2eeeb;
    --shadow: 0 1px 2px rgba(62, 46, 37, .05), 0 10px 30px rgba(110, 84, 68, .08);
    --display: "Frank Ruhl Libre", "Cormorant Garamond", Georgia, serif;
    --latin: "Cormorant Garamond", "Frank Ruhl Libre", Georgia, serif;
    --body: "Assistant", system-ui, sans-serif;
    color-scheme: light;
  }
  * { box-sizing: border-box; }
  [hidden] { display: none !important; }
  body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 15.5px; line-height: 1.55; direction: rtl; }
  body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
  h1, h2, h3 { font-family: var(--display); font-weight: 500; margin: 0; text-wrap: balance; }
  button, input, select, textarea { font: inherit; color: inherit; }
  button { cursor: pointer; }
  :is(button, input, select, textarea, [tabindex]):focus-visible { outline: 2px solid var(--gel); outline-offset: 2px; }
  .wrap { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 0 48px; }

  /* ---------- top bar ---------- */
  .top {
    position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(8px); border-bottom: 1px solid var(--beige);
  }
  .top .wrap { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-block: 12px; }
  .brand { display: flex; align-items: center; gap: 10px; }
  .logo { width: 46px; height: 46px; border-radius: 50%; flex: none; display: block; }
  .brand h1 { font-family: var(--latin); font-weight: 600; font-size: 26px; line-height: 1; direction: ltr; letter-spacing: .02em; }
  .brand small { color: var(--muted); font-size: 13px; }
  .spacer { flex: 1; }
  .seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; gap: 2px; }
  .seg button { border: 0; background: transparent; padding: 7px 16px; border-radius: 999px; font-weight: 600; color: var(--muted); }
  .seg button[aria-pressed="true"] { background: var(--gel); color: var(--gel-ink); }
  .demo-tag { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px; }
  .link-btn { border: 0; background: transparent; color: var(--muted); text-decoration: underline; font-size: 13px; padding: 4px; }

  /* ---------- shared ---------- */
  .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 18px; min-width: 0; }
  .panel h2 { font-size: 21px; margin-bottom: 4px; }
  .sub { color: var(--muted); margin: 0 0 14px; font-size: 14px; }
  .btn { border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 8px 14px; font-weight: 600; }
  .btn.primary { background: var(--gel); color: var(--gel-ink); border-color: var(--gel); }
  .btn.ok { background: var(--gel); color: var(--gel-ink); border-color: var(--gel); }
  .btn.ghost { background: transparent; }
  .btn:disabled { opacity: .45; cursor: default; }
  .tnum { font-variant-numeric: tabular-nums; }
  label.field { display: grid; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 500; }
  .field input, .field select, .field textarea {
    border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 10px; font-size: 15px; color: var(--ink); width: 100%;
  }
  .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
  .pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
  .pill.pending { color: var(--pending); background: var(--pending-bg); }
  .pill.approved { color: var(--ok); background: var(--ok-bg); }
  .pill.declined, .pill.cancelled { color: var(--no); background: var(--no-bg); }
  .type { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; color: var(--ink); }
  .type.regular { background: var(--regular); } .type.build { background: var(--nude); } .type.removal { background: var(--removal); }
  .empty { color: var(--muted); padding: 18px; text-align: center; border: 1px dashed var(--line); border-radius: 14px; }

  /* ---------- day strip ---------- */
  .days { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; }
  .day {
    flex: none; width: 66px; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 8px 4px; text-align: center;
    scroll-snap-align: start; display: grid; gap: 2px;
  }
  .day .dn { font-size: 12px; color: var(--muted); }
  .day .dd { font-family: var(--latin); font-weight: 600; font-size: 24px; line-height: 1.1; }
  .day .dm { font-size: 11px; color: var(--muted); }
  .day .dots { display: flex; justify-content: center; gap: 3px; min-height: 8px; }
  .day .dots i { width: 7px; height: 7px; border-radius: 50%; }
  .dot-open { background: var(--beige); } .dot-pending { background: var(--pending); } .dot-booked { background: var(--ok); }
  .day[aria-pressed="true"] { border-color: var(--gel); background: color-mix(in srgb, var(--gel) 9%, var(--surface)); box-shadow: inset 0 0 0 1px var(--gel); }
  .day.closed { opacity: .45; }
  .day:disabled { cursor: default; }

  /* ---------- manicurist ---------- */
  .studio { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; margin-top: 18px; align-items: start; }
  @media (max-width: 880px) { .studio { grid-template-columns: 1fr; } }
  .stack { display: grid; gap: 16px; min-width: 0; }
  .slots { display: grid; gap: 8px; margin-top: 12px; }
  .slot {
    display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px;
    border: 1px solid var(--line); background: var(--surface);
  }
  .slot .t { font-weight: 700; font-size: 16px; }
  .slot .t small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
  .slot .who { min-width: 0; font-size: 14px; }
  .slot .who b { font-weight: 600; }
  .slot.pending { border-color: color-mix(in srgb, var(--pending) 45%, var(--line)); background: color-mix(in srgb, var(--pending-bg) 55%, var(--surface)); }
  .slot.booked { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); background: color-mix(in srgb, var(--ok-bg) 55%, var(--surface)); }
  .slot .acts { display: flex; gap: 6px; }
  .slot .acts .btn { padding: 5px 10px; font-size: 13px; }
  details.add { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 12px; }
  details.add summary { cursor: pointer; font-weight: 600; color: var(--gel); }
  details.add[open] summary { margin-bottom: 12px; }
  .add-grid { display: grid; gap: 14px; }
  .add-grid h3 { font-family: var(--body); font-weight: 700; font-size: 14px; margin-bottom: 6px; }
  .check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }

  .req { border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: grid; gap: 6px; background: var(--surface); }
  .req + .req { margin-top: 10px; }
  .req .head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; flex-wrap: wrap; }
  .req .name { font-weight: 700; font-size: 16px; }
  .req .when { font-weight: 600; }
  .req .meta { color: var(--muted); font-size: 13px; }
  .req .note { font-size: 14px; background: var(--surface-2); padding: 6px 10px; border-radius: 10px; }
  .req .acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
  .req .reply { flex: 1; min-width: 160px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 6px 10px; font-size: 14px; }
  .badge { background: var(--gel); color: var(--gel-ink); border-radius: 999px; font-size: 12px; padding: 1px 9px; margin-inline-start: 6px; font-family: var(--body); font-weight: 700; vertical-align: middle; }
  .agenda { display: grid; gap: 4px; }
  .agenda .ad { font-weight: 700; margin-top: 10px; font-size: 13px; color: var(--muted); }
  .agenda .ai { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
  .agenda .ai .tnum { font-weight: 700; width: 46px; flex: none; }

  /* ---------- client ---------- */
  .client { max-width: 720px; margin: 22px auto 0; display: grid; gap: 16px; }
  .hero-c { text-align: center; padding: 8px 0 2px; }
  .hero-c h2 { font-size: 32px; }
  .hero-logo { width: 150px; height: 150px; border-radius: 50%; display: block; margin: 0 auto 12px; box-shadow: 0 8px 30px rgba(110, 84, 68, .15); }
  .hero-c p { color: var(--muted); margin: 6px 0 0; }
  .step-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
  .step-h .n { width: 26px; height: 26px; border-radius: 50%; background: var(--gel); color: var(--gel-ink); display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
  .step-h h3 { font-family: var(--body); font-weight: 700; font-size: 17px; }
  .svc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  @media (max-width: 520px) { .svc { grid-template-columns: 1fr; } }
  .svc button {
    text-align: start; border: 1.5px solid var(--line); background: var(--surface); border-radius: 16px; padding: 14px; display: grid; gap: 4px;
  }
  .svc button b { font-size: 17px; }
  .svc button span { color: var(--muted); font-size: 14px; }
  .svc button .swatch { width: 34px; height: 8px; border-radius: 999px; }
  .svc button[aria-pressed="true"] { border-color: var(--gel); box-shadow: inset 0 0 0 1px var(--gel); }
  .times { display: flex; flex-wrap: wrap; gap: 8px; }
  .times button { border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; padding: 8px 14px; font-weight: 700; font-size: 16px; }
  .times button small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); }
  .times button[aria-pressed="true"] { border-color: var(--gel); background: color-mix(in srgb, var(--gel) 10%, var(--surface)); }
  .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .form-grid .full { grid-column: 1 / -1; }
  @media (max-width: 520px) { .form-grid { grid-template-columns: 1fr; } }
  .summary { background: var(--surface-2); border-radius: 14px; padding: 10px 14px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
  .done { text-align: center; display: grid; gap: 8px; justify-items: center; padding: 10px 0; }
  .done .big { font-family: var(--display); font-size: 28px; }
  .err { color: var(--gel); font-size: 13px; min-height: 1em; }
  .mine .req .acts { display: none; }

  .opts { display: flex; flex-wrap: wrap; gap: 8px; }
  .opt { position: relative; }
  .opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
  .opt span {
    display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px;
    padding: 7px 14px; font-weight: 600; font-size: 14px;
  }
  .opt span::before { content: ""; width: 14px; height: 14px; border-radius: 5px; border: 1.5px solid var(--muted); flex: none; }
  .opt input:checked + span { border-color: var(--gel); background: color-mix(in srgb, var(--gel) 10%, var(--surface)); }
  .opt input:checked + span::before { background: var(--gel); border-color: var(--gel); box-shadow: inset 0 0 0 2px var(--surface); }
  .opt input:focus-visible + span { outline: 2px solid var(--gel); outline-offset: 2px; }
  .inspo { display: grid; gap: 8px; border: 1px dashed var(--line); border-radius: 14px; padding: 10px 12px; }
  .inspo img { max-height: 160px; width: auto; border-radius: 10px; }
  .terms { max-height: 230px; overflow-y: auto; background: var(--surface-2); border-radius: 14px; padding: 12px 16px; font-size: 14px; }
  .terms p { margin: 0 0 6px; font-weight: 700; }
  .terms ul { margin: 0; padding-inline-start: 18px; display: grid; gap: 4px; }
  .agree { display: flex; gap: 8px; align-items: center; font-weight: 600; margin-top: 10px; }
  .agree input { width: 18px; height: 18px; accent-color: var(--gel); }
  .prices { display: grid; gap: 0; }
  .prices .pr { display: flex; align-items: baseline; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
  .prices .pr:last-child { border-bottom: 0; }
  .prices .pr .lead { flex: 1; border-bottom: 1px dotted var(--muted); opacity: .35; transform: translateY(-4px); }
  .prices .pr b { font-variant-numeric: tabular-nums; white-space: nowrap; }
  .extras { display: flex; flex-wrap: wrap; gap: 4px; }
  .extra { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
  .req .thumb { max-height: 120px; width: auto; border-radius: 10px; justify-self: start; }
  .sms { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: grid; gap: 4px; background: var(--surface); }
  .sms + .sms { margin-top: 8px; }
  .sms .h { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
  .sms .h b { color: var(--ink); }
  .sms .txt { background: var(--surface-2); border-radius: 12px 12px 12px 4px; padding: 8px 10px; font-size: 14px; }
  .pill.sched { color: var(--muted); background: var(--surface-2); border: 1px dashed var(--line); }
  .pill.sent { color: var(--ok); background: var(--ok-bg); }
  .sms-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
  .sms-tabs button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; color: var(--muted); }
  .sms-tabs button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
  .modal { position: fixed; inset: 0; z-index: 30; background: rgba(62, 46, 37, .35); display: grid; place-items: center; padding: 16px; }
  .modal .box { width: min(620px, 100%); max-height: 100%; overflow-y: auto; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow); padding: 18px; display: grid; gap: 12px; }
  .modal h2 { font-size: 22px; }
  .moved { font-size: 12px; color: var(--muted); }
  .wa { display: inline-flex; align-items: center; gap: 6px; background: #1f9d57; color: #fff; border-radius: 10px; padding: 6px 12px; font-weight: 700; font-size: 13px; text-decoration: none; }
  .wa svg { width: 15px; height: 15px; flex: none; }
  .sms .foot-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
  .plan { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: grid; gap: 6px; font-size: 14px; }
  .plan .pl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
  .plan .arrow { color: var(--muted); }
  .plan .warn { color: var(--pending); font-size: 13px; }
  .toast {
    position: fixed; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); z-index: 20;
    background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 14px; box-shadow: var(--shadow); font-size: 14px; max-width: calc(100vw - 32px);
  }
  .foot { color: var(--muted); font-size: 12.5px; text-align: center; margin-top: 30px; }
  @media (max-width: 520px) {
    .slot { grid-template-columns: 74px 1fr; }
    .slot .acts { grid-column: 1 / -1; justify-content: flex-end; }
    .brand h1 { font-size: 21px; }
    .brand small { display: none; }
  }
  @media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

  /* ---------- real-site additions ---------- */
  html { -webkit-text-size-adjust: 100%; }
  body { margin: 0; }
  :root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
  img { max-width: 100%; }
  a { color: var(--gel); }
  .loading { color: var(--muted); padding: 24px; text-align: center; }
  .copybox { display: flex; gap: 8px; align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 6px 8px 6px 12px; }
  .copybox input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 13px; color: var(--ink); direction: ltr; text-align: left; }
  .status-big { display: grid; gap: 10px; justify-items: center; text-align: center; }
  .status-big .when { font-family: var(--display); font-size: 24px; }
  .fineprint { color: var(--muted); font-size: 12.5px; }
  .fineprint a { color: var(--muted); }

/* ---- admin additions ---- */
.login { max-width: 400px; margin: 40px auto; display: grid; gap: 12px; text-align: center; }
.login form { display: grid; gap: 10px; text-align: start; }
.tabs-admin { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.tabs-admin button { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 7px 16px; font: inherit; font-weight: 600; cursor: pointer; }
.tabs-admin button[aria-pressed="true"] { background: var(--gel); color: #fff; border-color: var(--gel); }
.imp-wrap { overflow-x: auto; margin-top: 10px; border: 1px solid var(--line); border-radius: 14px; }
table.imp { border-collapse: collapse; width: 100%; font-size: 14px; min-width: 640px; }
table.imp th, table.imp td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: middle; }
table.imp th { background: var(--surface-2); font-size: 12px; color: var(--muted); position: sticky; top: 0; }
table.imp input, table.imp select { font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; background: var(--surface); color: var(--ink); width: 100%; min-width: 0; }
table.imp tr.off td { opacity: .45; }
table.imp td.res { font-size: 12px; white-space: nowrap; }
table.imp td.res.bad { color: var(--no); } table.imp td.res.good { color: var(--ok); }
.settings-grid { display: grid; gap: 12px; }
.howto { font-size: 14px; line-height: 1.6; }
.howto ol { margin: 6px 0; padding-inline-start: 20px; }
