/* ============================================================
   Agenda Studio — estilos
   ============================================================ */

:root {
  --bg: #f7f6f4;
  --surface: #ffffff;
  --surface-2: #f2f0ed;
  --text: #1c1a19;
  --muted: #74706b;
  --line: #e8e4df;
  --accent: #b4537a;
  --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
  --on-accent: #ffffff;
  --danger: #cf3f36;
  --ok: #23875b;
  --info: #2f6fdb;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgb(28 26 25 / .04), 0 6px 20px rgb(28 26 25 / .05);
  --shadow-lg: 0 24px 64px rgb(28 26 25 / .2);
  --tabbar-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141312;
    --surface: #1d1c1a;
    --surface-2: #272523;
    --text: #f3f1ee;
    --muted: #a39e98;
    --line: #332f2c;
    --accent-soft: color-mix(in srgb, var(--accent) 22%, transparent);
    --shadow: 0 1px 2px rgb(0 0 0 / .3);
    --shadow-lg: 0 24px 64px rgb(0 0 0 / .5);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.no-scroll { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: 16px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.i { display: inline-flex; width: 20px; height: 20px; flex: none; }
.i svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- Layout ---------- */
.app { min-height: 100dvh; }
.sidebar { display: none; }
.main {
  max-width: 780px;
  margin: 0 auto;
  padding: calc(20px + env(safe-area-inset-top)) 16px calc(var(--tabbar-h) + 96px + env(safe-area-inset-bottom));
}
.view { display: flex; flex-direction: column; gap: 16px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 500; color: var(--muted);
}
.tabbar a.active { color: var(--accent); }
.tabbar a .i { width: 22px; height: 22px; }

.fab {
  position: fixed; right: 18px; z-index: 21;
  bottom: calc(var(--tabbar-h) + 18px + env(safe-area-inset-bottom));
  width: 56px; height: 56px; border-radius: 18px; border: 0;
  display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 40%, transparent);
}
.fab .i { width: 26px; height: 26px; }
.fab:active { transform: scale(.96); }

.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent);
}
.brand strong { display: block; font-size: 15px; line-height: 1.2; }
.brand small { color: var(--muted); font-size: 12px; }

.sidenav { display: flex; flex-direction: column; gap: 2px; }
.sidenav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  color: var(--muted); font-weight: 500;
}
.sidenav a:hover { background: var(--surface-2); color: var(--text); }
.sidenav a.active { background: var(--accent-soft); color: var(--accent); }
.sidebar-foot { margin-top: auto; color: var(--muted); }

@media (min-width: 900px) {
  .app { display: grid; grid-template-columns: 252px 1fr; }
  .sidebar {
    display: flex; flex-direction: column; gap: 24px;
    position: sticky; top: 0; height: 100dvh;
    padding: 24px 16px;
    border-right: 1px solid var(--line);
    background: var(--surface);
  }
  .tabbar, .fab { display: none; }
  .main { padding: 36px 32px 64px; width: 100%; }
}

/* ---------- Cabeçalhos ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.eyebrow { margin: 0 0 4px; color: var(--muted); font-size: 13px; font-weight: 500; }
.eyebrow::first-letter { text-transform: uppercase; }
.head-actions { display: flex; gap: 8px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 2px 10px; }
.section-head h2::first-letter { text-transform: uppercase; }
.section-head .small { display: inline-flex; align-items: center; gap: 4px; }
.section-head .small .i { width: 14px; height: 14px; }
.lead { margin: -8px 0 0; color: var(--muted); font-size: 14px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 16px;
  border-radius: 12px; border: 1px solid transparent;
  font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:active:not(:disabled) { transform: scale(.98); }
.btn .i { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: var(--surface); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-ghost { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.btn-danger-ghost:hover { background: color-mix(in srgb, var(--danger) 8%, transparent); }
.btn-wa { color: #1a9e55; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-icon { width: 42px; padding: 0; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 0;
  display: grid; place-items: center;
  background: transparent; color: var(--muted);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* ---------- Cards e estatísticas ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.card.pad { padding: 18px; }
.card.pad > h2 { margin-bottom: 14px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); min-width: 0;
}
.stat span { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.stat strong {
  display: block; margin-top: 2px;
  font-size: clamp(14px, 4.2vw, 18px); font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stats.flat .stat { background: var(--surface-2); border: 0; box-shadow: none; }

/* ---------- Semana ---------- */
.week-card { padding: 12px; }
.week-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.month-btn {
  position: relative; display: inline-flex; align-items: center; gap: 4px;
  border: 0; background: transparent; padding: 6px 10px; border-radius: 10px;
  font-weight: 600; text-transform: capitalize;
}
.month-btn:hover { background: var(--surface-2); }
.month-btn .i { width: 16px; height: 16px; color: var(--muted); }
.month-btn .i { transition: transform .2s; }
.week-card.is-month .month-btn .i { transform: rotate(180deg); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.day {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 0 6px; border-radius: 14px; border: 0; background: transparent;
}
.day:hover:not(.is-selected) { background: var(--surface-2); }
.day-dow { font-size: 11px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.day-num { font-size: 17px; font-weight: 600; width: 34px; height: 30px; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.day.is-off .day-num { color: var(--muted); opacity: .6; }
.day.is-today .day-num { color: var(--accent); opacity: 1; }
.day.is-selected { background: var(--accent); }
.day.is-selected .day-dow, .day.is-selected .day-num { color: var(--on-accent); opacity: 1; }
.day-dot { display: flex; gap: 3px; height: 5px; }
.day-dot i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.day.is-selected .day-dot i { background: var(--on-accent); }

/* Mês inteiro */
.month-grid { row-gap: 2px; }
.month-dow { padding: 2px 0 6px; text-align: center; font-size: 11px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.month-grid .day { padding: 4px 0 5px; border-radius: 12px; min-height: 52px; }
.month-grid .day-num { font-size: 15px; height: 26px; }
.month-grid .day.is-other:not(.is-selected) { opacity: .35; }
.day-count { display: none; font-size: 11px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.day.is-selected .day-count { color: var(--on-accent); }
@media (min-width: 640px) {
  .month-grid .day { min-height: 64px; }
  .month-grid .day-dot { display: none; }
  .month-grid .day-count { display: block; }
}

/* ---------- Agendamentos ---------- */
.timeline { display: flex; flex-direction: column; gap: 8px; }
.appt {
  display: grid; grid-template-columns: 50px 4px 1fr auto; align-items: center; gap: 12px;
  width: 100%; padding: 14px; text-align: left;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  transition: border-color .15s;
}
.appt:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.appt-time strong { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }
.appt-time span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.appt-bar { align-self: stretch; border-radius: 4px; min-height: 36px; }
.appt-body { min-width: 0; }
.appt-title, .li-title { display: flex; flex-wrap: wrap; align-items: center; row-gap: 2px; min-width: 0; font-weight: 600; }
.appt-title > span:first-child, .li-title > span:first-child { max-width: 100%; }
.appt-title > span:first-child, .li-title > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt-title .tag, .li-title .tag { flex: none; }
.appt-sub {
  font-size: 13px; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.appt-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.appt-price { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.appt.st-cancelado { opacity: .55; }
.appt.st-cancelado .appt-title { text-decoration: line-through; }

.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
  background: var(--surface-2); color: var(--muted);
}
.badge.st-agendado { background: var(--accent-soft); color: var(--accent); }
.badge.st-confirmado { background: color-mix(in srgb, var(--info) 14%, transparent); color: var(--info); }
.badge.st-concluido { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.badge.st-faltou { background: color-mix(in srgb, #c2410c 13%, transparent); color: #c2410c; }
.appt.st-faltou { opacity: .6; }
.tag-noshow { background: color-mix(in srgb, #c2410c 13%, transparent); color: #c2410c; }
.segmented.seg-status { grid-template-columns: repeat(3, 1fr); }
@media (min-width: 560px) { .segmented.seg-status { grid-template-columns: repeat(5, 1fr); } }
.mini-stats { grid-template-columns: repeat(2, 1fr) !important; }
@media (min-width: 560px) { .mini-stats { grid-template-columns: repeat(4, 1fr) !important; } }
.mini-stats .is-warn { background: color-mix(in srgb, #c2410c 10%, var(--surface-2)); }
.mini-stats .is-warn strong { color: #c2410c; }
.badge.st-cancelado { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }

.gap {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; padding: 10px 14px;
  border: 1.5px dashed var(--line); border-radius: var(--radius);
  background: transparent; color: var(--muted); font-size: 13px; text-align: left;
}
.gap b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.gap-cta { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.gap-cta .i { width: 16px; height: 16px; }
.gap:hover { border-color: var(--accent); }

.empty {
  text-align: center; padding: 40px 20px;
  background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius-lg);
  color: var(--muted);
}
.empty > .i { width: 36px; height: 36px; color: var(--accent); margin-bottom: 8px; }
.empty h3 { color: var(--text); font-size: 16px; margin-bottom: 4px; }
.empty p { margin: 0 0 16px; font-size: 14px; }
.empty.flat { border: 0; background: transparent; padding: 32px 20px; }

/* ---------- Listas ---------- */
.list { overflow: hidden; }
.list-item {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 14px 16px; text-align: left;
  border: 0; border-bottom: 1px solid var(--line); background: transparent;
}
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: var(--surface-2); }
.swatch { width: 10px; height: 38px; border-radius: 6px; flex: none; }
.li-body { flex: 1; min-width: 0; }

.li-sub { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-sub .i { width: 14px; height: 14px; }
.li-side { display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.li-side .i { width: 18px; height: 18px; color: var(--muted); }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  font-weight: 600; font-size: 14px;
  background: var(--accent-soft); color: var(--accent);
}

.search { position: relative; }
.search .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search input { padding-left: 40px !important; }

/* ---------- Formulários ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--muted); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { margin: -8px 0 0; font-size: 13px; color: var(--muted); }
.hint.warn { color: var(--danger); }

input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  width: 100%; height: 44px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); outline: none;
  font-size: 16px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; padding: 10px 12px; resize: vertical; min-height: 70px; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2374706b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 36px; }
input:disabled, select:disabled, textarea:disabled { opacity: .45; cursor: not-allowed; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }

.readout {
  height: 44px; display: flex; align-items: center; padding: 0 12px;
  border-radius: 12px; background: var(--surface-2); font-weight: 600; font-variant-numeric: tabular-nums;
}

.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.chip-opt { position: relative; }
.chip-opt input, .segmented input, .swatches input, .daypills input { position: absolute; opacity: 0; pointer-events: none; }
.chip-card {
  display: flex; flex-direction: column; gap: 2px; height: 100%;
  padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.chip-card b { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.chip-card i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.chip-card small { font-size: 12px; color: var(--muted); }
.chip-opt input:checked + .chip-card { border-color: var(--accent); background: var(--accent-soft); }
.chip-opt input:focus-visible + .chip-card { outline: 2px solid var(--accent); outline-offset: 2px; }

.segmented { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 12px; }
.segmented label { position: relative; }
.segmented span {
  display: block; text-align: center; padding: 8px 2px; border-radius: 9px;
  font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer;
}
.segmented input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -6px; }
.quick button {
  height: 32px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 13px; font-weight: 500;
}
.quick button.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.swatches label { position: relative; }
.swatches span { display: block; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .08); }
.swatches input:checked + span { outline: 2px solid var(--text); outline-offset: 3px; }
.swatches input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }

.daypills { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.daypills label { position: relative; }
.daypills span {
  display: grid; place-items: center; height: 40px;
  border: 1px solid var(--line); border-radius: 10px;
  font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer;
}
.daypills input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* ---------- Finanças ---------- */
.period-card { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; width: 100%; max-width: 360px; background: var(--surface-2); border-radius: 12px; }
.tabs button { border: 0; background: transparent; padding: 8px 14px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--muted); }
.tabs button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.period-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; }
.period-label { flex: 1; text-align: center; font-size: 15px; }
.period-label::first-letter { text-transform: uppercase; }

.stats.stats-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .stats.stats-4 { grid-template-columns: repeat(4, 1fr); } }
.stat small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.notice {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--radius);
  background: color-mix(in srgb, #c98a14 13%, var(--surface));
  border: 1px solid color-mix(in srgb, #c98a14 30%, transparent);
  font-size: 13px;
}
.notice .i { color: #b7791f; width: 18px; height: 18px; margin-top: 1px; }
.notice p { margin: 0; }

.chart { position: relative; }
.chart-legend { display: flex; gap: 16px; margin: -4px 0 14px; font-size: 12px; color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 10px; height: 10px; border-radius: 3px; }
.chart-plot { position: relative; height: 180px; margin-left: 48px; }
.chart-grid { position: absolute; inset: 0; pointer-events: none; }
.chart-grid div { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.chart-grid span {
  position: absolute; right: calc(100% + 8px); transform: translateY(-50%);
  font-size: 11px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.chart-cols { position: absolute; inset: 0; display: flex; gap: 2px; }
.bar-col {
  flex: 1; min-width: 0; position: relative;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  padding: 0; border: 0; border-radius: 6px 6px 0 0; background: transparent;
}
.bar-col:hover, .bar-col:focus-visible { background: color-mix(in srgb, var(--text) 5%, transparent); outline: none; }
.bar { display: flex; flex-direction: column; gap: 2px; width: min(72%, 30px); min-height: 3px; }
.seg { display: block; flex-basis: 0; min-height: 2px; }
.bar .seg:first-child { border-radius: 4px 4px 0 0; }
.seg-done { background: var(--accent); }
.seg-pending { background: color-mix(in srgb, var(--accent) 35%, var(--surface)); }
.chart-x { display: flex; gap: 2px; margin: 6px 0 0 48px; }
.chart-x span {
  flex: 1; min-width: 0; text-align: center; line-height: 1.3;
  font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.chart-x span.today { color: var(--accent); font-weight: 700; }
.chart-hint { margin: 10px 0 0; }
.chart-tip {
  position: absolute; z-index: 5; pointer-events: none;
  transform: translate(-50%, calc(-100% - 8px));
  padding: 8px 10px; border-radius: 10px;
  background: var(--text); color: var(--bg);
  font-size: 12px; line-height: 1.5; white-space: nowrap;
  opacity: 0; transition: opacity .12s;
}
.chart-tip.show { opacity: 1; }

.svc-rows { display: flex; flex-direction: column; gap: 14px; }
.svc-row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; font-size: 14px; }
.svc-row-head span { display: flex; align-items: center; gap: 8px; min-width: 0; }
.svc-row-head span b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc-row-head span i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.svc-row-head small { color: var(--muted); }
.svc-row-head strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.meter { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }

/* ---------- Painel (sheet) e diálogo ---------- */
#sheet-root, #dialog-root { position: fixed; inset: 0; z-index: 50; display: none; }
#dialog-root { z-index: 60; }
#sheet-root.open, #dialog-root.open { display: block; }
.overlay { position: absolute; inset: 0; background: rgb(20 16 14 / .45); animation: fade .2s ease; }

.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 92dvh; display: flex; flex-direction: column;
  background: var(--surface); border-radius: 22px 22px 0 0;
  box-shadow: var(--shadow-lg);
  animation: up .28s cubic-bezier(.2, .8, .2, 1);
}
.sheet-grip { width: 36px; height: 4px; border-radius: 4px; background: var(--line); margin: 8px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 6px 20px; flex: none; }
.sheet-head h2 { font-size: 18px; }
.sheet-body { overflow: auto; padding: 8px 20px 20px; overscroll-behavior: contain; }
.sheet-foot {
  display: flex; gap: 8px; align-items: center; flex: none;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.sheet-foot .spacer { flex: 1; }
.sheet-foot .btn-primary { min-width: 120px; }

@media (min-width: 700px) {
  .sheet {
    left: 50%; top: 50%; right: auto; bottom: auto;
    width: min(580px, calc(100% - 48px)); max-height: 88dvh;
    transform: translate(-50%, -50%);
    border-radius: 22px;
    animation: pop .2s ease;
  }
  .sheet-grip { display: none; }
  .sheet-head { padding-top: 16px; }
}

.dialog {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(400px, calc(100% - 32px));
  background: var(--surface); border-radius: 18px; padding: 22px;
  box-shadow: var(--shadow-lg); animation: pop .18s ease;
}
.dialog h3 { font-size: 17px; margin-bottom: 6px; }
.dialog p { margin: 0 0 20px; color: var(--muted); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }

.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini-stats div { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.mini-stats span { display: block; font-size: 12px; color: var(--muted); }
.mini-stats strong { display: block; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history { display: flex; flex-direction: column; margin-top: 6px; }
.history button {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  width: 100%; padding: 11px 0; text-align: left;
  border: 0; border-bottom: 1px solid var(--line); background: transparent;
}
.history button:last-child { border-bottom: 0; }
.history .h-main { min-width: 0; }
.history .h-main strong { display: block; font-size: 14px; }
.history .h-main span { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history .h-side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-variant-numeric: tabular-nums; font-size: 14px; }

/* ---------- Etiquetas, interruptor, link ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; vertical-align: 1px;
  padding: 1px 7px; border-radius: 999px;
  font-size: 11px; font-weight: 600; background: var(--surface-2); color: var(--muted);
}
.tag .i { width: 12px; height: 12px; }

.switch { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
.switch > span:first-child b { display: block; font-size: 14px; font-weight: 600; }
.switch > span:first-child small { display: block; font-size: 13px; color: var(--muted); }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { position: relative; flex: none; width: 44px; height: 26px; border-radius: 999px; background: var(--line); transition: background .15s; }
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .15s;
}
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }

.link-box { position: relative; }
.link-box .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.link-box input { padding-left: 40px !important; font-size: 14px !important; color: var(--muted); background: var(--surface-2) !important; }

.notice-soft {
  display: flex; align-items: flex-start; gap: 8px; margin: 0;
  padding: 10px 12px; border-radius: 12px;
  background: var(--accent-soft); font-size: 13px;
}
.notice-soft .i { width: 16px; height: 16px; margin-top: 1px; color: var(--accent); }

/* ---------- Login do painel ---------- */
.auth-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.auth-wrap[hidden] { display: none; }
.auth-col { width: min(400px, 100%); display: flex; flex-direction: column; align-items: center; }
.auth-col .credit { margin-top: 20px; }
.auth-card { width: 100%; padding: 28px 24px; display: flex; flex-direction: column; gap: 14px; }
.auth-card h1 { font-size: 22px; }
.auth-card > p { margin: -6px 0 6px; }
.auth-link { font-size: 13px; color: var(--muted); text-align: center; text-decoration: underline; text-underline-offset: 3px; }
.auth-loading, .pub-loading { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); padding: 48px 0; }
.auth-loading .i, .pub-loading .i { width: 32px; height: 32px; color: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 48px !important; }
.pass-toggle {
  position: absolute; right: 3px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 0; border-radius: 10px; background: none; color: var(--muted);
}
.pass-toggle:hover { color: var(--text); background: var(--surface-2); }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.label-row label { font-size: 13px; font-weight: 600; color: var(--muted); }
.link-plain { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; font-size: 13px; }
.auth-tips { margin: 0; padding-left: 18px; font-size: 14px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.check-row { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); cursor: pointer; }
.check-row input { width: 16px; height: 16px; accent-color: var(--accent); }

/* ---------- Página pública ---------- */
.pub-wrap { max-width: 560px; margin: 0 auto; padding: calc(20px + env(safe-area-inset-top)) 16px calc(120px + env(safe-area-inset-bottom)); }
.pub-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.pub-head h1 { font-size: 20px; line-height: 1.2; }
.pub-head p { margin: 0; font-size: 13px; color: var(--muted); }
.pub-title { font-size: 20px; margin-bottom: 4px; letter-spacing: -.015em; }
.pub-sub { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.pub-main { display: flex; flex-direction: column; }

.stepper { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 22px; }
.stepper li {
  flex: 1; display: flex; align-items: center; gap: 6px;
  padding-top: 10px; border-top: 3px solid var(--line);
  font-size: 12px; font-weight: 600; color: var(--muted);
}
.stepper li span { width: 20px; height: 20px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); font-size: 11px; }
.stepper li span .i { width: 12px; height: 12px; }
.stepper li.is-current, .stepper li.is-done { border-color: var(--accent); color: var(--text); }
.stepper li.is-current span, .stepper li.is-done span { background: var(--accent); color: var(--on-accent); }

.svc-list { display: flex; flex-direction: column; gap: 10px; }
.svc-pick {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; text-align: left;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: border-color .15s, background .15s;
}
.svc-pick:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.svc-pick.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.svc-check {
  width: 24px; height: 24px; flex: none; display: grid; place-items: center;
  border: 1.5px solid var(--line); border-radius: 8px; color: transparent;
}
.svc-check .i { width: 16px; height: 16px; }
.svc-pick.on .svc-check { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.svc-info { flex: 1; min-width: 0; }
.svc-info b { display: block; font-weight: 600; }
.svc-info small { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.svc-info small .i { width: 14px; height: 14px; }
.svc-pick strong { font-variant-numeric: tabular-nums; white-space: nowrap; }

.back-link {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 2px;
  margin: -6px 0 10px -6px; padding: 4px 8px 4px 2px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); font-size: 14px; font-weight: 500;
}
.back-link:hover { color: var(--text); background: var(--surface-2); }
.back-link .i { width: 18px; height: 18px; }

.day-scroll {
  display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 4px 16px 10px;
  scroll-snap-type: x proximity; scrollbar-width: none;
}
.day-scroll::-webkit-scrollbar { display: none; }
.day-pill {
  flex: none; width: 68px; scroll-snap-align: start;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 10px 4px; border-radius: 14px;
  background: var(--surface); border: 1.5px solid var(--line);
}
.day-pill span { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.day-pill b { font-size: 20px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.day-pill small { font-size: 11px; color: var(--muted); }
.day-pill em { margin-top: 4px; font-style: normal; font-size: 10px; font-weight: 600; color: var(--ok); white-space: nowrap; }
.day-pill:disabled { opacity: .45; cursor: default; }
.day-pill:disabled em { color: var(--muted); }
.day-pill.on { background: var(--accent); border-color: var(--accent); }
.day-pill.on span, .day-pill.on b, .day-pill.on small, .day-pill.on em { color: var(--on-accent); }

.slot-area { margin-top: 14px; }
.slot-day { font-size: 15px; margin-bottom: 12px; }
.slot-day::first-letter { text-transform: uppercase; }
.slot-group + .slot-group { margin-top: 16px; }
.slot-group .label { display: block; margin-bottom: 8px; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.slot {
  height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface);
  font-weight: 600; font-variant-numeric: tabular-nums;
}
.slot:hover { border-color: var(--accent); }
.slot.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.pub-summary { margin: 4px 0 20px; }
.sum-when { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.sum-when > .i { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.sum-when b { display: block; }
.sum-when b::first-letter { text-transform: uppercase; }
.sum-when span { font-size: 14px; color: var(--muted); }
.pub-summary ul { list-style: none; margin: 0; padding: 12px 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; border-bottom: 1px solid var(--line); }
.pub-summary li { display: flex; justify-content: space-between; gap: 12px; }
.pub-summary li span:last-child { font-variant-numeric: tabular-nums; color: var(--muted); }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; }
.sum-total strong { font-size: 18px; font-variant-numeric: tabular-nums; }

.bottom-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.bottom-inner { max-width: 528px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bb-info { min-width: 0; }
.bb-info b { display: block; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bb-info span { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bottom-bar .btn { height: 46px; padding: 0 20px; }

.done { text-align: center; display: flex; flex-direction: column; align-items: center; padding-top: 12px; }
.done-icon {
  width: 64px; height: 64px; margin-bottom: 14px; display: grid; place-items: center; border-radius: 50%;
  background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok);
}
.done-icon .i { width: 32px; height: 32px; }
.done-icon .i svg { stroke-width: 2.4; }
.done h2 { font-size: 22px; margin-bottom: 4px; }
.done .pub-summary { width: 100%; text-align: left; margin-top: 8px; }
.done-actions { width: 100%; display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }

.pub .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }

/* ---------- Bloqueios ---------- */
.block-card, .block-banner {
  display: grid; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; text-align: left;
  border: 1px dashed color-mix(in srgb, var(--muted) 45%, transparent); border-radius: var(--radius);
  color: var(--muted);
  background: repeating-linear-gradient(135deg, var(--surface-2) 0 7px, var(--surface) 7px 14px);
}
.block-card { grid-template-columns: 50px 20px 1fr; }
.block-card:hover, .block-banner:hover { border-color: var(--muted); }
.block-card .appt-title span { color: var(--text); }
.block-card .i, .block-banner > .i { color: var(--muted); }
.block-banner { grid-template-columns: 22px 1fr auto; margin-bottom: 8px; padding: 14px 16px; }
.block-banner b { display: block; color: var(--text); }
.block-banner span { font-size: 13px; }
.block-edit { font-weight: 600; color: var(--accent); }
.day.is-blocked:not(.is-selected) .day-num { text-decoration: line-through; text-decoration-thickness: 2px; }

.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.segmented.seg-2 { grid-template-columns: repeat(2, 1fr); }
.history .h-side .i { width: 18px; height: 18px; color: var(--muted); }

/* ---------- Lembretes e link da cliente ---------- */
.reminder-banner {
  display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 12px;
  width: 100%; padding: 14px 16px; text-align: left;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); border-radius: var(--radius);
  background: var(--accent-soft); color: var(--text);
}
.reminder-banner > .i { color: var(--accent); }
.reminder-banner b { display: block; }
.reminder-banner span { font-size: 13px; color: var(--muted); }
.reminder-banner .block-edit { color: var(--accent); font-size: 14px; }

.rem-list { display: flex; flex-direction: column; }
.rem-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.rem-row:last-child { border-bottom: 0; }
.rem-row .h-main { min-width: 0; }
.rem-row .h-main strong { display: block; font-size: 14px; }
.rem-row .h-main span { display: block; font-size: 13px; color: var(--muted); }
.rem-row .sent { color: var(--ok); font-weight: 600; }
.rem-row .btn { flex: none; }

.link-btn {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
  padding: 0; border: 0; background: none; color: var(--accent); font-size: 13px; font-weight: 600;
}
.link-btn .i { width: 16px; height: 16px; }

.tag-warn { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.tag-info { background: color-mix(in srgb, var(--info) 14%, transparent); color: var(--info); }

.my-bookings { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.my-booking {
  display: grid; grid-template-columns: 22px 1fr 18px; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius); background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.my-booking > .i { color: var(--accent); }
.my-booking b { display: block; font-size: 14px; }
.my-booking small { display: block; font-size: 12px; color: var(--muted); }

.manage-box {
  width: 100%; text-align: left; margin: -6px 0 16px; padding: 14px 16px;
  border-radius: var(--radius); border: 1px dashed color-mix(in srgb, var(--accent) 45%, var(--line));
}
.manage-box > b { display: flex; align-items: center; gap: 6px; }
.manage-box > b .i { width: 16px; height: 16px; color: var(--accent); }
.manage-box p { margin: 4px 0 10px; font-size: 13px; color: var(--muted); }

.confirm-box { padding: 16px; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--danger) 30%, var(--line)); background: color-mix(in srgb, var(--danger) 5%, var(--surface)); }
.confirm-box b { display: block; }
.confirm-box p { margin: 2px 0 12px; font-size: 14px; color: var(--muted); }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.done-icon.is-cancel { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.center { text-align: center; }

.stats-4 .stat small { white-space: normal; overflow: visible; line-height: 1.3; }

/* ---------- Sinal por Pix ---------- */
.deposit-box {
  width: 100%; text-align: left; margin: -6px 0 16px; padding: 16px;
  border-radius: var(--radius); border: 1.5px solid color-mix(in srgb, #1f8a78 45%, var(--line));
  background: color-mix(in srgb, #1f8a78 6%, var(--surface));
  display: flex; flex-direction: column; gap: 10px;
}
.dep-title { display: flex; align-items: center; gap: 8px; }
.dep-title .i { color: #1f8a78; }
.dep-amount { display: flex; justify-content: space-between; align-items: baseline; }
.dep-amount span { font-size: 14px; color: var(--muted); }
.dep-amount strong { font-size: 24px; font-variant-numeric: tabular-nums; }
.deposit-box p { margin: 0; font-size: 13px; color: var(--muted); }
.dep-key { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 13px; }
.dep-key dt { color: var(--muted); font-size: 12px; }
.dep-key dd { margin: 0; font-weight: 600; word-break: break-word; }
.done-icon.is-pending { background: color-mix(in srgb, #c98a14 16%, transparent); color: #b7791f; }

.tag-deposit { background: color-mix(in srgb, #c98a14 16%, transparent); color: #9a6410; }
.reminder-banner.is-deposit { border-color: color-mix(in srgb, #1f8a78 40%, var(--line)); background: color-mix(in srgb, #1f8a78 9%, var(--surface)); }
.reminder-banner.is-deposit > .i, .reminder-banner.is-deposit .block-edit { color: #1f8a78; }
.notice > .i { flex: none; }
.status-line { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 9px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.status-line .i { width: 16px; height: 16px; }
.status-line.is-on { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); }

/* ---------- Quantidade do serviço no agendamento ---------- */
.chip-card .qty { display: none; align-items: center; gap: 8px; margin-top: 6px; }
.chip-opt input:checked + .chip-card .qty { display: inline-flex; }
.chip-card .qty button {
  width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); font-size: 16px; font-weight: 600; line-height: 1; color: var(--text);
}
.chip-card .qty button:hover { border-color: var(--accent); color: var(--accent); }
.chip-card .qty b { min-width: 16px; text-align: center; font-variant-numeric: tabular-nums; }

/* ---------- Adicionais do agendamento ---------- */
.extras { display: flex; flex-direction: column; gap: 6px; }
.extras:empty { display: none; }
.extra-row { display: grid; grid-template-columns: minmax(0, 1fr) 82px 64px 36px; gap: 6px; align-items: center; }
.extra-row input { padding: 0 10px !important; }
.extra-head span { font-size: 11px; font-weight: 600; color: var(--muted); padding-left: 2px; }
.extra-row .icon-btn { width: 36px; height: 36px; }

/* ---------- Calendário do mês (página das clientes) ---------- */
.cal-toggle { margin: 2px 0 4px; }
.cal { margin: 10px 0 4px; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head b { text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow span { text-align: center; font-size: 11px; font-weight: 600; color: var(--muted); padding: 2px 0 4px; }
.cal-day {
  aspect-ratio: 1; border: 0; border-radius: 10px; background: var(--accent-soft);
  font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text);
}
.cal-day:hover:not(:disabled) { outline: 1.5px solid var(--accent); }
.cal-day:disabled { background: transparent; color: var(--muted); opacity: .4; font-weight: 400; }
.cal-day.today { box-shadow: inset 0 0 0 1.5px var(--accent); }
.cal-day.on { background: var(--accent); color: var(--on-accent); }

/* ---------- Encaixe (horários dentro da antecedência mínima) ---------- */
.day-pill.is-rush em { color: #b7791f; }
.day-pill.is-rush.on em { color: var(--on-accent); }
.rush-box {
  padding: 16px; border-radius: var(--radius);
  border: 1.5px solid color-mix(in srgb, #c98a14 40%, var(--line));
  background: color-mix(in srgb, #c98a14 8%, var(--surface));
  display: flex; flex-direction: column; gap: 10px;
}
.rush-box b { display: flex; align-items: center; gap: 8px; }
.rush-box b .i { color: #b7791f; width: 18px; height: 18px; }
.rush-box p { margin: 0; font-size: 14px; color: var(--muted); }
.rush-line {
  margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  font-size: 13px; color: var(--muted);
}
.rush-line span { display: flex; align-items: flex-start; gap: 6px; }
.rush-line span .i { width: 16px; height: 16px; margin-top: 1px; }
.btn-ghost.btn-wa-solid { color: #1a9e55; }

/* ---------- Novidades ---------- */
.reminder-banner.is-news { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--accent-soft); }
.act-list { display: flex; flex-direction: column; }
.act-row {
  display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: center;
  width: 100%; padding: 11px 6px; text-align: left; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; border-radius: 10px;
}
.act-row:last-child { border-bottom: 0; }
.act-row.is-new { background: var(--accent-soft); }
.act-row b { display: block; font-size: 14px; font-weight: 500; }
.act-row.is-new b { font-weight: 600; }
.act-row small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.act-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.act-icon .i { width: 18px; height: 18px; }
.act-icon.k-agendou { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.act-icon.k-remarcou { background: color-mix(in srgb, var(--info) 14%, transparent); color: var(--info); }
.act-icon.k-cancelou { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.act-icon.k-expirou { background: color-mix(in srgb, #c98a14 14%, transparent); color: #b7791f; }

/* ---------- Retornos ---------- */
.reminder-banner.is-return { border-color: color-mix(in srgb, var(--info) 35%, var(--line)); background: color-mix(in srgb, var(--info) 8%, var(--surface)); }
.reminder-banner.is-return > .i, .reminder-banner.is-return .block-edit { color: var(--info); }
.rem-actions { display: flex; gap: 6px; flex: none; }
.rem-row .late { color: var(--danger); font-weight: 600; }
.sub-label { font-size: 12px; font-weight: 500; color: var(--muted); }

/* ---------- Rodapé (crédito) ---------- */
.credit { margin: 32px 0 0; text-align: center; font-size: 12px; color: var(--muted); }
.credit a {
  color: var(--text); font-weight: 600;
  text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px;
}
.credit a:hover { color: var(--accent); text-decoration-color: currentColor; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; z-index: 70;
  bottom: calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom));
  transform: translate(-50%, 16px);
  max-width: calc(100% - 32px);
  padding: 10px 16px; border-radius: 12px;
  background: var(--text); color: var(--bg);
  font-size: 14px; font-weight: 500;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 900px) { .toast { bottom: 28px; } }

@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(100%); } }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -47%) scale(.98); } }

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