/* ================================================================
   TEMA DA MARCA — troque cores e fontes aqui.
   Paleta tirada da placa da Emeli: preto, roxo e rosa neon.
   ================================================================ */
:root {
  --bg: #0b0710;
  --bg-glow: #2a0f33;
  --surface: #160d1c;
  --surface-2: #1f1327;
  --ink: #fbf2fa;
  --muted: #b9a3bf;
  --line: #3a2644;
  --accent: #ff3fc8;        /* rosa neon */
  --accent-ink: #1a0414;
  --accent-soft: rgba(255, 63, 200, .14);
  --purple: #9b4dff;        /* roxo do anel */
  --purple-soft: rgba(155, 77, 255, .16);
  --ok: #5fe3a1;
  --warn: #ffb54d;
  --danger: #ff6b8b;
  --display: "Satisfy", "Brush Script MT", cursive;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 14px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  background-image: radial-gradient(120% 60% at 50% -10%, var(--bg-glow), transparent 70%);
  background-attachment: fixed;
  font: 15px/1.5 var(--body);
  padding: env(safe-area-inset-top, 0) max(16px, env(safe-area-inset-right, 0)) calc(40px + env(safe-area-inset-bottom, 0)) max(16px, env(safe-area-inset-left, 0));
}
.wrap { max-width: 560px; margin: 0 auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
[hidden] { display: none !important; }
a { color: var(--accent); }

/* ---------- topo com logo ---------- */
header.hero { text-align: center; padding: 22px 0 6px; }
.logo { width: min(230px, 62vw); height: auto; aspect-ratio: 1; display: block; margin: 0 auto;
  filter: drop-shadow(0 0 26px rgba(155, 77, 255, .35)); }
.hero p { margin: 14px 0 0; color: var(--muted); }
.steps { display: flex; gap: 6px; justify-content: center; margin: 18px 0 20px; }
.steps i { width: 28px; height: 4px; border-radius: 4px; background: var(--line); }
.steps i.on { background: var(--accent); box-shadow: 0 0 10px var(--accent); }

/* ---------- cartões ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px; }
.sec-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.sec-title h2 { font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1.1; color: var(--ink); text-shadow: 0 0 14px rgba(255, 63, 200, .45); }
.back { background: none; border: 0; color: var(--muted); font-size: 14px; padding: 4px 0; }

.svc-list { display: grid; gap: 10px; }
.svc { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; transition: border-color .15s, box-shadow .15s; }
.svc:hover, .svc:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 18px rgba(255, 63, 200, .25); }
.svc .chip { flex: none; width: 22px; height: 34px; border-radius: 11px 11px 9px 9px; border: 1px solid rgba(255,255,255,.25); box-shadow: inset -4px -6px 0 rgba(255,255,255,.18); }
.svc .nm { font-weight: 700; }
.svc .meta { font-size: 13px; color: var(--muted); }
.svc .arrow { margin-left: auto; color: var(--accent); font-size: 20px; }

.picked { display: flex; align-items: center; gap: 10px; background: var(--accent-soft); border-radius: var(--r); padding: 10px 12px; margin-bottom: 16px; font-size: 14px; }
.picked .chip { width: 14px; height: 22px; border-radius: 7px 7px 6px 6px; border: 1px solid rgba(255,255,255,.25); flex: none; }
.label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin: 4px 0 8px; }
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.day { flex: none; scroll-snap-align: start; width: 64px; border: 1px solid var(--line); background: var(--surface-2); border-radius: var(--r); padding: 8px 0; text-align: center; }
.day b { display: block; font-size: 22px; font-weight: 700; line-height: 1.15; }
.day small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.day.sel { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 0 16px rgba(255, 63, 200, .5); }
.day.sel small { color: var(--accent-ink); }
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; margin-top: 6px; }
.time { border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: 10px 0; font-variant-numeric: tabular-nums; font-weight: 700; }
.time:hover { border-color: var(--accent); }
.time.sel { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.empty { color: var(--muted); font-size: 14px; padding: 12px 0; }
.loading { color: var(--muted); font-size: 14px; padding: 14px 0; text-align: center; }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: 11px 12px; min-width: 0; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.field textarea { min-height: 70px; resize: vertical; }
.hint { font-size: 12px; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 99px; padding: 13px 20px; font-weight: 800; text-decoration: none; background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 18px rgba(255, 63, 200, .35); }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn.purple { background: var(--purple); color: #fff; box-shadow: 0 0 18px rgba(155, 77, 255, .35); }
.btn.small { padding: 7px 12px; font-size: 13px; font-weight: 700; }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--line); box-shadow: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

.summary { display: grid; gap: 8px; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); padding: 14px 0; margin: 4px 0 18px; }
.summary div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 700; text-align: right; }
.done { text-align: center; }
.done .big { font-family: var(--display); font-size: 40px; margin: 4px 0 6px; text-shadow: 0 0 16px rgba(255, 63, 200, .6); }
.eyebrow { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--purple); font-weight: 800; }
.note { font-size: 13px; color: var(--muted); background: var(--purple-soft); border-radius: var(--r); padding: 12px 14px; margin-top: 14px; text-align: left; }
.err { color: var(--danger); font-size: 13px; margin: 0 0 10px; }
.stack { display: grid; gap: 10px; margin-top: 16px; }
footer { text-align: center; margin-top: 28px; font-size: 13px; color: var(--muted); }
footer a { color: var(--muted); }

/* ---------- painel ---------- */
.admin-top { position: sticky; top: 0; background: var(--bg); z-index: 5; padding: calc(12px + env(safe-area-inset-top, 0)) 0 10px; margin-top: calc(-1 * env(safe-area-inset-top, 0)); border-bottom: 1px solid var(--line); }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.admin-head .brand { display: flex; align-items: center; gap: 10px; }
.admin-head img { width: 40px; height: 40px; border-radius: 50%; }
.admin-head h1 { font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1; }
.tabs { display: flex; gap: 6px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; }
.tab { border: 1px solid var(--line); background: transparent; border-radius: 99px; padding: 7px 14px; font-size: 14px; font-weight: 700; flex: none; position: relative; }
.tab.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tab .dot { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; line-height: 18px; padding: 0 5px; }
.datenav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 16px 0 12px; }
.datenav strong { font-size: 17px; text-align: center; }
.datenav button { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; width: 40px; height: 40px; font-size: 18px; flex: none; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.list { display: grid; gap: 10px; }
.item { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r); padding: 12px 14px; display: grid; grid-template-columns: 58px 1fr; gap: 12px; }
.item .t { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 14px; }
.item .t small { display: block; font-weight: 500; color: var(--muted); }
.item .who { font-weight: 800; }
.item .what { font-size: 14px; color: var(--muted); }
.item .acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.item.block { border-left-color: var(--purple); background: repeating-linear-gradient(135deg, var(--purple-soft) 0 8px, var(--surface) 8px 16px); }
.item.gap { border: 1px dashed var(--line); border-left: 3px dashed var(--line); background: transparent; }
.pill { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); vertical-align: middle; }
.pill.warn { color: var(--warn); background: rgba(255, 181, 77, .12); }
.pill.ok { color: var(--ok); background: rgba(95, 227, 161, .12); }
.pill.purple { color: var(--purple); background: var(--purple-soft); }
.week { display: grid; gap: 10px; }
.wday { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; text-align: left; width: 100%; }
.wday.today { border-color: var(--accent); }
.wday .h { display: flex; justify-content: space-between; font-weight: 800; margin-bottom: 4px; text-transform: capitalize; }
.wday .h span { color: var(--muted); font-weight: 500; font-size: 13px; text-transform: none; }
.wday .r { font-size: 13px; display: flex; gap: 8px; font-variant-numeric: tabular-nums; }
.wday .r b { min-width: 42px; }
.wday.off { opacity: .55; }
.client { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; width: 100%; text-align: left; display: block; }
.client .top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.client .meta { font-size: 13px; color: var(--muted); }
.wa { color: var(--accent); font-weight: 700; text-decoration: none; font-size: 13px; }
.daychecks { display: flex; flex-wrap: wrap; gap: 6px; }
.daychecks label { border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; font-size: 14px; display: flex; gap: 6px; align-items: center; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.svc-edit { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; margin-bottom: 10px; background: var(--surface-2); }
.svc-edit .row3 { display: grid; grid-template-columns: 1fr 90px; gap: 8px; }
.banner { background: var(--purple-soft); border: 1px solid var(--purple); border-radius: var(--r); padding: 12px 14px; margin: 14px 0; font-size: 14px; display: grid; gap: 8px; }
.login { max-width: 380px; margin: 0 auto; padding-top: 6vh; text-align: center; }
.login .card { text-align: left; margin-top: 18px; }
.hist { display: grid; gap: 6px; margin-top: 10px; }
.hist div { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; border-bottom: 1px dashed var(--line); padding: 6px 0; }
.hist .x { color: var(--muted); text-decoration: line-through; }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 99px; font-weight: 700; font-size: 14px; z-index: 50; box-shadow: 0 6px 24px rgba(0,0,0,.4); max-width: calc(100% - 32px); }

/* ---------- folha (modal) ---------- */
.sheet-bg { position: fixed; inset: 0; background: rgba(5, 2, 8, .7); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--surface); border: 1px solid var(--line); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 22px 22px 0 0;
  padding: 20px max(18px, env(safe-area-inset-right, 0)) calc(20px + env(safe-area-inset-bottom, 0)) max(18px, env(safe-area-inset-left, 0)); }
.sheet h3 { font-family: var(--display); font-weight: 400; font-size: 30px; margin-bottom: 14px; }
.sheet .acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; flex-wrap: wrap; }
@media (min-width: 600px) { .sheet-bg { align-items: center; } .sheet { border-radius: 22px; } }
@media (prefers-reduced-motion: no-preference) { .card, .sheet { animation: rise .3s ease both; } @keyframes rise { from { transform: translateY(8px); opacity: .6; } to { transform: none; opacity: 1; } } }
