:root {
  color-scheme: dark;
  --bg: #0e0e10;
  --surface: #17171a;
  --surface-2: #1f1f23;
  --surface-3: #27272c;
  --border: #2d2d33;
  --border-strong: #3b3b42;
  --text: #f0efec;
  --text-2: #c3c2b7;
  --muted: #8e8d87;
  --accent: #c8a24a;
  --accent-ink: #16130b;
  --accent-soft: rgba(200, 162, 74, 0.14);
  --accent-strong: #7a6024;
  --good: #2fa66f;
  --warn: #c98500;
  --bad: #e05252;
  --info: #3987e5;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --link: var(--accent);
  --good-text: #7fd3a8;
  --bad-text: #f08a8a;
  --info-text: #8fbaf0;
  --neutral-text: #b4b3ad;
  --overlay: rgba(0, 0, 0, .62);
  --bar-bg: rgba(14, 14, 16, .92);
  --feature-bg: rgba(255, 255, 255, .03);
  --stripe: rgba(255, 255, 255, .025);
  --hl-half: rgba(45, 45, 51, .6);
  --chart-grid: #25252a;
  --hero-bg: radial-gradient(1200px 500px at -10% -10%, rgba(200, 162, 74, .18), transparent 60%), linear-gradient(160deg, #141416, #0b0b0c);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Playfair Display', Georgia, serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; font-weight: 700; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Botões e formulários ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  padding: 10px 16px; border-radius: var(--radius-sm); font: inherit; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s, transform .05s; text-decoration: none !important; }
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: transparent; border-color: rgba(224, 82, 82, .5); color: var(--bad-text); }
.btn-danger:hover { background: rgba(224, 82, 82, .12); }
.btn-good { background: var(--good); border-color: var(--good); color: #fff; }
.btn-sm { padding: 6px 11px; font-size: 13px; }
.btn-lg { padding: 14px 22px; font-size: 16px; }
.btn-block { width: 100%; }
.icon-btn { background: none; border: 0; color: var(--text-2); font-size: 18px; cursor: pointer; padding: 6px 9px; border-radius: 8px; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); font-weight: 500; }
input, select, textarea { font: inherit; font-size: 16px; color: var(--text); background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 10px 12px; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=color] { padding: 3px; height: 42px; cursor: pointer; }
input[type=checkbox] { width: auto; accent-color: var(--accent); }
textarea { resize: vertical; min-height: 70px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-2); cursor: pointer; font-size: 13px; font-weight: 600; user-select: none; }
.chip input { display: none; }
.chip.on, .chip:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
.hint { font-size: 12px; color: var(--muted); font-weight: 400; }

/* ---------- Cartões, tabelas, badges ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h3 { margin: 0; font-size: 16px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.st-agendado { background: rgba(57, 135, 229, .14); color: var(--info-text); border-color: rgba(57, 135, 229, .35); }
.st-concluido { background: rgba(47, 166, 111, .14); color: var(--good-text); border-color: rgba(47, 166, 111, .35); }
.st-cancelado { background: rgba(142, 141, 135, .14); color: var(--neutral-text); border-color: rgba(142, 141, 135, .35); }
.st-faltou { background: rgba(224, 82, 82, .14); color: var(--bad-text); border-color: rgba(224, 82, 82, .35); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.empty { text-align: center; color: var(--muted); padding: 34px 16px; }
.empty .big { font-size: 34px; display: block; margin-bottom: 6px; }

/* ---------- Modal e toast ---------- */
.modal-backdrop { position: fixed; inset: 0; background: var(--overlay); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; animation: fade .15s; }
.modal { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 16px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: var(--shadow); }
.modal-wide { max-width: 760px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
#toasts { position: fixed; bottom: 18px; right: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 60; max-width: calc(100vw - 36px); }
.toast { background: var(--surface-3); border: 1px solid var(--border-strong); border-left: 4px solid var(--good); padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow); animation: fade .2s; transition: opacity .35s; font-size: 14px; }
.toast-err { border-left-color: var(--bad); }
.toast.out { opacity: 0; }

/* =================== Landing / autenticação =================== */
.landing { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.landing-hero { padding: 56px; display: flex; flex-direction: column; justify-content: space-between; background: var(--hero-bg); border-right: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: .02em; color: var(--text); }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 19px; }
.hero-title { font-family: var(--display); font-size: clamp(34px, 4.2vw, 54px); line-height: 1.08; margin: 40px 0 18px; }
.hero-title em { color: var(--link); font-style: normal; }
.hero-sub { color: var(--text-2); font-size: 17px; max-width: 520px; }
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 34px; max-width: 600px; }
.feature { background: var(--feature-bg); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.feature b { display: block; margin-bottom: 3px; }
.feature span { color: var(--muted); font-size: 13px; }
.landing-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-box { width: 100%; max-width: 420px; }
.tabs { display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 4px; margin-bottom: 22px; }
.tabs button { flex: 1; background: none; border: 0; color: var(--text-2); padding: 10px; border-radius: 9px; font: inherit; font-weight: 600; cursor: pointer; }
.tabs button.on { background: var(--surface-3); color: var(--text); }
.auth-box form { display: flex; flex-direction: column; gap: 14px; }
.demo-note { margin-top: 22px; font-size: 13px; color: var(--muted); background: var(--surface); border: 1px dashed var(--border-strong); border-radius: 10px; padding: 12px 14px; }

/* =================== Página de agendamento =================== */
.book { max-width: 640px; margin: 0 auto; padding: 0 16px 120px; }
.book-head { text-align: center; padding: 34px 0 18px; }
.book-logo { width: 84px; height: 84px; border-radius: 22px; object-fit: cover; margin: 0 auto 12px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-family: var(--display); font-size: 36px; font-weight: 700; }
.book-head h1 { font-family: var(--display); font-size: 30px; margin-bottom: 4px; }
.book-head .meta { color: var(--muted); font-size: 14px; display: flex; gap: 6px 14px; justify-content: center; flex-wrap: wrap; }
.stepper { display: flex; gap: 6px; margin: 10px 0 22px; }
.stepper div { flex: 1; height: 4px; border-radius: 4px; background: var(--surface-3); transition: background .25s; }
.stepper div.on { background: var(--accent); }
.step-title { font-size: 20px; margin-bottom: 4px; }
.step-sub { color: var(--muted); margin-bottom: 18px; font-size: 14px; }
.opt-list { display: flex; flex-direction: column; gap: 10px; }
.opt { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1.5px solid var(--border); cursor: pointer; text-align: left; color: var(--text); font: inherit; width: 100%; transition: border-color .15s, background .15s; }
.opt:hover { border-color: var(--border-strong); background: var(--surface-2); }
.opt.on { border-color: var(--accent); background: var(--accent-soft); }
.opt .check-c { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--border-strong); flex: none; display: grid; place-items: center; font-size: 14px; color: transparent; transition: all .15s; }
.opt.on .check-c { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.opt.radio .check-c { border-radius: 50%; }
.opt .grow { flex: 1; min-width: 0; }
.opt .t { font-weight: 700; display: block; }
.opt .d { color: var(--muted); font-size: 13px; display: block; }
.opt .price { font-weight: 700; text-align: right; white-space: nowrap; }
.opt .price small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }
.avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; flex: none; color: #fff; font-size: 16px; }
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.day { flex: none; width: 64px; padding: 10px 4px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); text-align: center; cursor: pointer; color: var(--text); font: inherit; scroll-snap-align: start; }
.day .wd { font-size: 12px; color: var(--muted); display: block; text-transform: uppercase; }
.day .n { font-size: 20px; font-weight: 800; display: block; }
.day .m { font-size: 12px; color: var(--muted); display: block; }
.day.on { border-color: var(--accent); background: var(--accent-soft); }
.day:disabled { opacity: .35; cursor: not-allowed; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 18px; }
.slot { padding: 11px 6px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; font-variant-numeric: tabular-nums; }
.slot:hover { border-color: var(--border-strong); }
.slot.on { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.slot-group { margin-top: 18px; }
.slot-group h4 { font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 8px; }
.slot-group .slots { margin-top: 0; }
.summary { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px; }
.summary .row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14px; }
.summary .row + .row { border-top: 1px dashed var(--border); }
.summary .row span:first-child { color: var(--muted); }
.summary .total { font-size: 17px; font-weight: 800; }
.bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--bar-bg); backdrop-filter: blur(10px); border-top: 1px solid var(--border); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); z-index: 20; }
.bottom-bar .inner { max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.bottom-bar .info { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); }
.bottom-bar .info b { color: var(--text); font-size: 16px; display: block; }
.success { text-align: center; padding: 30px 0; }
.success .ok-icon { width: 76px; height: 76px; border-radius: 50%; background: rgba(47, 166, 111, .16); color: var(--good); display: grid; place-items: center; font-size: 38px; margin: 0 auto 16px; border: 2px solid rgba(47, 166, 111, .5); }
.success h2 { font-family: var(--display); font-size: 28px; }
.success .summary { text-align: left; margin-top: 20px; }
.link-back { background: none; border: 0; color: var(--text-2); font: inherit; cursor: pointer; padding: 6px 0; margin-bottom: 8px; display: inline-flex; gap: 6px; align-items: center; }
.link-back:hover { color: var(--text); }

/* =================== Painel =================== */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--border); padding: 18px 14px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { padding: 4px 8px 18px; }
.sidebar .brand img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; }
.sidebar .brand .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: 14px; text-decoration: none; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.on { background: var(--accent-soft); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.nav .ico { width: 20px; height: 20px; flex: none; opacity: .85; }
.nav a.on .ico, .nav a:hover .ico { opacity: 1; }
.nav-sep { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 14px 12px 4px; }
.sidebar .user { margin-top: auto; padding: 12px; border-top: 1px solid var(--border); font-size: 13px; }
.sidebar .user b { display: block; font-size: 14px; }
.main { padding: 26px 30px 60px; min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar select, .toolbar input { width: auto; padding: 8px 10px; }
.mobile-top { display: none; }
.share-box { display: flex; gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin-bottom: 18px; flex-wrap: wrap; }
.share-box code { color: var(--link); font-size: 14px; flex: 1; min-width: 180px; word-break: break-all; }

.grid { display: grid; gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; min-width: 0; }
.kpi .label { color: var(--muted); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.kpi .value { font-size: 26px; font-weight: 800; margin: 6px 0 2px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .delta { font-size: 12px; font-weight: 600; color: var(--muted); }
.kpi .delta.up { color: var(--good-text); }
.kpi .delta.down { color: var(--bad-text); }
.kpi.hero { background: linear-gradient(145deg, var(--accent-soft), var(--surface) 70%); border-color: var(--accent); }
.charts-2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; align-items: start; }
.charts-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; align-items: start; }
.up-list { max-height: 300px; overflow-y: auto; }
.chart-box { position: relative; height: 280px; }
.chart-box.sm { height: 240px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--text-2); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 3px; flex-wrap: wrap; }
.seg button { background: none; border: 0; color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600; padding: 7px 12px; border-radius: 7px; cursor: pointer; }
.seg button.on { background: var(--surface-3); color: var(--text); }
.bar-list .item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 8px 0; font-size: 14px; }
.bar-list .bar { grid-column: 1 / -1; height: 8px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.bar-list .bar i { display: block; height: 100%; border-radius: 4px; }
.up-list .item { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.up-list .item:last-child { border-bottom: 0; }
.time-pill { font-weight: 800; font-variant-numeric: tabular-nums; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 5px 8px; font-size: 13px; min-width: 58px; text-align: center; }

/* Agenda (linha do tempo) */
.agenda-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.agenda-nav .date-label { font-weight: 700; font-size: 16px; min-width: 210px; text-align: center; }
.agenda { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: auto; max-height: calc(100vh - 210px); }
.agenda-grid { display: grid; position: relative; min-width: 100%; }
.agenda-col-head { position: sticky; top: 0; z-index: 3; background: var(--surface); border-bottom: 1px solid var(--border); padding: 10px; font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; justify-content: center; border-left: 1px solid var(--border); white-space: nowrap; }
.agenda-col-head.corner { position: sticky; left: 0; z-index: 4; border-left: 0; }
.agenda-times { position: sticky; left: 0; z-index: 2; background: var(--surface); }
.agenda-times div { font-size: 12px; color: var(--muted); text-align: right; padding-right: 8px; transform: translateY(-8px); font-variant-numeric: tabular-nums; }
.agenda-col { position: relative; border-left: 1px solid var(--border); }
.agenda-col .hl { position: absolute; left: 0; right: 0; border-top: 1px solid var(--border); }
.agenda-col .hl.half { border-top-style: dashed; border-color: var(--hl-half); }
.agenda-col .off { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, transparent 0 6px, var(--stripe) 6px 12px); }
.agenda-col .free { position: absolute; left: 2px; right: 2px; border-radius: 6px; cursor: pointer; }
.agenda-col .free:hover { background: var(--accent-soft); outline: 1px dashed var(--accent); }
.agenda-col .free:hover::after { content: '+ agendar'; font-size: 12px; color: var(--link); padding: 4px 8px; display: block; font-weight: 600; }
.ev { position: absolute; left: 4px; right: 4px; border-radius: 8px; padding: 5px 8px; font-size: 12px; overflow: hidden; cursor: pointer; background: var(--surface-3); border: 1px solid var(--border-strong); border-left: 4px solid var(--c, var(--accent)); z-index: 1; transition: transform .1s; }
.ev:hover { z-index: 2; box-shadow: var(--shadow); }
.ev b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev .s { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.ev.concluido { background: rgba(47, 166, 111, .12); }
.ev.cancelado, .ev.faltou { opacity: .55; }
.ev.cancelado b { text-decoration: line-through; }
.ev .tag { position: absolute; top: 5px; right: 6px; font-size: 12px; }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--bad); z-index: 2; pointer-events: none; }
.now-line::before { content: ''; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--bad); }

.list-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.item-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.item-card.inactive { opacity: .55; }
.item-card .top { display: flex; gap: 12px; align-items: center; }
.item-card .top .grow { flex: 1; min-width: 0; }
.item-card h4 { margin: 0; font-size: 16px; }
.item-card .meta { display: flex; flex-wrap: wrap; gap: 6px; }
.item-card .actions { display: flex; gap: 6px; margin-top: auto; padding-top: 6px; }
.pill { font-size: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px 9px; color: var(--text-2); }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.logo-prev { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.detail-grid { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; margin-bottom: 14px; }
.detail-grid dt { color: var(--muted); }
.detail-grid dd { margin: 0; }
.loading { padding: 40px; text-align: center; color: var(--muted); }


/* ===================== Tema claro ===================== */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #f2f1ec;
  --surface-3: #e8e6df;
  --border: #e2dfd7;
  --border-strong: #cdc9bf;
  --text: #17160f;
  --text-2: #46443d;
  --muted: #6e6c64;
  --good: #1f8a57;
  --warn: #a86e00;
  --bad: #c93a3a;
  --info: #2a78d6;
  --shadow: 0 10px 30px rgba(30, 25, 10, 0.12);
  --link: var(--accent-strong);
  --good-text: #17794a;
  --bad-text: #b42f2f;
  --info-text: #1f5fb0;
  --neutral-text: #5c5a53;
  --overlay: rgba(25, 22, 15, .45);
  --bar-bg: rgba(255, 255, 255, .94);
  --feature-bg: rgba(255, 255, 255, .7);
  --stripe: rgba(0, 0, 0, .035);
  --hl-half: rgba(0, 0, 0, .07);
  --chart-grid: #ebe9e3;
  --hero-bg: radial-gradient(1200px 500px at -10% -10%, rgba(200, 162, 74, .22), transparent 60%), linear-gradient(160deg, #fbfaf7, #f1efe8);
}
:root[data-theme="light"] .ev { background: var(--surface-2); }

/* Seletor de tema */
.theme-switch { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; }
.theme-switch button { background: none; border: 0; color: var(--text-2); font: inherit; font-size: 12px; font-weight: 600; padding: 6px 9px; border-radius: 7px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.theme-switch button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.theme-float { position: fixed; top: 12px; right: 12px; z-index: 25; }
.sidebar .theme-switch { display: flex; width: 100%; }
.sidebar .theme-switch button { flex: 1; justify-content: center; padding: 6px 4px; }

@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .charts-2, .charts-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .landing { grid-template-columns: 1fr; }
  .landing-hero { padding: 32px 22px; border-right: 0; border-bottom: 1px solid var(--border); }
  .hero-title { margin-top: 26px; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: var(--shadow); }
  .mobile-top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; }
  .mobile-top .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .main { padding: 18px 16px 60px; }
  .settings-grid { grid-template-columns: 1fr; }
  .agenda-nav .date-label { min-width: 0; flex: 1; }
}
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .kpi .value { font-size: 19px; }
  .kpis { gap: 10px; }
  .kpi { padding: 14px; }
  .page-head h1 { font-size: 22px; }
  .modal-foot .btn { flex: 1; }
}

/* Fotos dos serviços */
.svc-thumb { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex: none; background: var(--surface-3); border: 1px solid var(--border); cursor: zoom-in; display: grid; place-items: center; }
.svc-thumb.empty { cursor: default; font-size: 22px; opacity: .55; }
.svc-thumb.sm { width: 44px; height: 44px; border-radius: 10px; font-size: 16px; cursor: default; }
.svc-thumb.lg { width: 112px; height: 112px; border-radius: 16px; cursor: default; font-size: 12px; color: var(--muted); }
.photo-zoom { cursor: zoom-out; }
.photo-zoom figure { margin: 0; max-width: min(92vw, 560px); text-align: center; }
.photo-zoom img { width: 100%; height: auto; border-radius: 18px; box-shadow: var(--shadow); display: block; }
.photo-zoom figcaption { color: #fff; font-weight: 700; margin-top: 12px; text-shadow: 0 1px 4px rgba(0, 0, 0, .5); }

/* ===================== Celular e toque ===================== */
.nav-backdrop { position: fixed; inset: 0; background: var(--overlay); z-index: 35; opacity: 0; pointer-events: none; transition: opacity .2s; }
.nav-backdrop.show { opacity: 1; pointer-events: auto; }
.agenda.snap { scroll-snap-type: x mandatory; scroll-padding-left: 56px; }
.agenda.snap .agenda-col, .agenda.snap .agenda-col-head:not(.corner) { scroll-snap-align: start; }

/* Telas de toque: tudo que se toca com pelo menos ~40-44px */
@media (pointer: coarse), (max-width: 900px) {
  .btn { min-height: 44px; }
  .btn-sm { min-height: 40px; min-width: 44px; padding: 8px 12px; }
  .icon-btn { min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; }
  .chip { min-height: 40px; }
  #colors .chip { min-width: 44px; min-height: 44px; justify-content: center; }
  .seg button { min-height: 40px; }
  .theme-switch button { min-height: 40px; min-width: 44px; justify-content: center; }
  .link-back { min-height: 44px; }
  .tabs button { min-height: 44px; }
  .day { padding: 12px 4px; }
  .slot { min-height: 46px; }
}

@media (max-width: 900px) {
  /* cabeçalho da agenda: data em linha própria, navegação embaixo */
  .agenda-nav { width: 100%; }
  .agenda-nav .date-label { order: -1; flex-basis: 100%; min-width: 0; text-align: left; font-size: 17px; }
  .agenda-nav input[type=date] { flex: 1; min-width: 0; }
  .page-head .toolbar { width: 100%; }
  .page-head .toolbar > .btn { flex: 1; }
  .toolbar select { flex: 1; min-width: 0; }
  #ag-barber { flex-basis: 100%; }
  .mobile-top { min-height: 56px; }
}

/* Tabelas viram cartões no celular */
@media (max-width: 700px) {
  .table-wrap table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tfoot, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { padding: 12px 8px; border-bottom: 1px solid var(--border); }
  table.stack tbody tr:last-child { border-bottom: 0; }
  table.stack td { border: 0; padding: 4px 6px; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: right; min-height: 28px; white-space: normal; }
  table.stack td::before { content: attr(data-label); color: var(--muted); font-size: 13px; font-weight: 500; text-align: left; flex: none; }
  table.stack td:first-child { display: block; text-align: left; font-size: 16px; padding-bottom: 8px; }
  table.stack td:first-child::before, table.stack td[data-label=""]::before, table.stack td.empty::before { content: none; }
  table.stack td[data-label=""] { justify-content: flex-end; }
  table.stack td .chips { justify-content: flex-end; }
  table.stack tfoot tr { background: var(--surface-2); border-radius: 10px; margin-top: 6px; }
  table.stack td.empty { display: block; text-align: center; }
}

/* Faixa do modo demonstração */
.demo-banner { background: #c98500; color: #1a1300; text-align: center; padding: 8px 14px; font-size: 13px; line-height: 1.4; position: relative; z-index: 45; }
.demo-banner b { font-weight: 800; }

/* Balões de WhatsApp e Instagram (página de agendamento) */
.social { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 14px; }
.social a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px 8px 12px; border-radius: 999px; font-weight: 700; font-size: 14px; text-decoration: none !important; box-shadow: 0 2px 10px rgba(0, 0, 0, .15); transition: transform .1s, filter .15s; }
.social a:hover { filter: brightness(1.06); }
.social a:active { transform: scale(.97); }
.social-ico { width: 22px; height: 22px; flex: none; }
.social-wa { background: #25d366; color: #0a3d1f; }
.social-ig { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); color: #fff; }

/* Painel do administrador */
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 24px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; }
.admin-top .brand { padding: 0; }
.admin-main { max-width: 1240px; margin: 0 auto; }
@media (max-width: 700px) { .admin-top { padding: 10px 16px; } .admin-top .toolbar .muted { display: none; } }

/* Rodapé com direitos e links legais */
.site-footer { text-align: center; font-size: 12px; color: var(--muted); padding: 18px 16px 22px; border-top: 1px solid var(--border); }
.site-footer a { color: var(--muted); text-decoration: underline; }
.site-footer .sep { margin: 0 4px; opacity: .6; }
.book-footer { text-align: center; font-size: 12px; color: var(--muted); margin-top: 26px; line-height: 1.6; }
.book-footer a { color: var(--muted); text-decoration: underline; }
.consent { font-size: 12px; color: var(--muted); margin-top: 12px; line-height: 1.5; }
.consent a { color: inherit; text-decoration: underline; }

/* Páginas de Privacidade e Termos */
.legal { max-width: 760px; margin: 0 auto; padding: 32px 16px 60px; line-height: 1.65; }
.legal h1 { font-size: 28px; margin: 18px 0 6px; }
.legal h2 { font-size: 18px; margin: 28px 0 8px; }
.legal p, .legal li { color: var(--text); font-size: 15px; }
.legal ul { padding-left: 20px; }
.legal .updated { color: var(--muted); font-size: 13px; }
.legal a { color: var(--accent); }
.side-copy { font-size: 11px; color: var(--muted); line-height: 1.5; padding: 10px 12px 2px; opacity: .8; }
.side-copy a { color: var(--muted); text-decoration: underline; }
