/* ConverteZap — sistema visual */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f3f6f9;
  --surface-3: #e8edf2;
  --line: #e6ebf0;
  --ink: #131a24;
  --ink-2: #3b4555;
  --muted: #6b7584;
  --brand: #0f9d6a;
  --brand-strong: #0b8458;
  --brand-ink: #ffffff;
  --brand-soft: #e7f8ef;
  --brand-soft-ink: #0a7550;
  --hero-a: #d3f5e4;
  --hero-b: #dde9ff;
  --danger: #c2410c;
  --danger-soft: #fdeee6;
  --warn: #a16207;
  --warn-soft: #fdf4dc;
  --info-soft: #e8f0fd;
  --info-ink: #2558b5;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 26, 22, .05), 0 6px 20px rgba(15, 26, 22, .05);
  --shadow-lg: 0 20px 50px rgba(15, 26, 22, .16);
  --ring: 0 0 0 3px rgba(10, 143, 92, .22);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1311;
    --surface: #151c19;
    --surface-2: #1b2420;
    --surface-3: #232e29;
    --line: #26312c;
    --ink: #e8efec;
    --ink-2: #c3cfca;
    --muted: #8d9c96;
    --brand: #22b07a;
    --brand-strong: #34c48c;
    --brand-ink: #04140d;
    --brand-soft: #143528;
    --brand-soft-ink: #7fdcb2;
    --hero-a: rgba(34, 176, 122, .16);
    --hero-b: rgba(57, 135, 229, .12);
    --danger: #f08a5d;
    --danger-soft: #3a1f14;
    --warn: #e0b351;
    --warn-soft: #3a2f12;
    --info-soft: #1b2a45;
    --info-ink: #9dbaf2;
    --series-1: #3987e5;
    --series-2: #d95926;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
/* Escolha manual de tema escuro (mesmos valores do bloco acima) */
:root[data-theme="dark"] {
  --bg: #0d1311;
  --surface: #151c19;
  --surface-2: #1b2420;
  --surface-3: #232e29;
  --line: #26312c;
  --ink: #e8efec;
  --ink-2: #c3cfca;
  --muted: #8d9c96;
  --brand: #22b07a;
  --brand-strong: #34c48c;
  --brand-ink: #04140d;
  --brand-soft: #143528;
  --brand-soft-ink: #7fdcb2;
  --hero-a: rgba(34, 176, 122, .16);
  --hero-b: rgba(57, 135, 229, .12);
  --danger: #f08a5d;
  --danger-soft: #3a1f14;
  --warn: #e0b351;
  --warn-soft: #3a2f12;
  --info-soft: #1b2a45;
  --info-ink: #9dbaf2;
  --series-1: #3987e5;
  --series-2: #d95926;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

/* Seletor de tema */
.theme-toggle { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); gap: 2px; }
.theme-toggle button { width: 30px; height: 28px; border: 0; border-radius: 7px; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.theme-toggle button:hover { color: var(--ink); }
.theme-toggle button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.theme-toggle svg { width: 15px; height: 15px; }

/* Assinatura no rodapé */
.credit { text-align: center; font-size: 12.5px; color: var(--muted); padding: 22px 16px 8px; }
.credit strong { color: var(--ink-2); font-weight: 600; }

/* Botão Apple */
.btn.apple { background: #000; border-color: #000; color: #fff; font-weight: 600; padding: 12px 16px; }
.btn.apple:hover { background: #1f1f1f; border-color: #1f1f1f; }
.btn.apple svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }
:root[data-theme="dark"] .btn.apple { background: #fff; border-color: #fff; color: #000; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.apple { background: #fff; border-color: #fff; color: #000; } }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.auth-main { display: flex !important; flex-direction: column; }
.auth-main .auth-card { margin: auto; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 14.5px; line-height: 1.5; }
h1 { font-size: 24px; line-height: 1.2; margin: 0; letter-spacing: -.02em; font-weight: 700; }
h2 { font-size: 16px; margin: 0 0 4px; letter-spacing: -.01em; font-weight: 650; }
h3 { font-size: 15px; margin: 0 0 12px; font-weight: 650; }
p { margin: 0; }
a { color: var(--brand); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; color: var(--muted); }
.hidden { display: none !important; }
.error { color: var(--danger); min-height: 1.3em; margin: 6px 0; font-size: 13px; }
svg.i { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* Formulários */
label { display: block; font-size: 13px; font-weight: 550; color: var(--ink-2); margin-bottom: 14px; }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; margin-top: 4px; }
input, textarea, select {
  width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font: inherit; transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 550; color: var(--ink); margin-bottom: 14px; }
.switch input { appearance: none; width: 40px; height: 23px; margin: 0; border-radius: 20px; background: var(--surface-3); border: 0; position: relative; cursor: pointer; flex-shrink: 0; transition: background .2s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(17px); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  padding: 9px 15px; border-radius: var(--radius-sm); font: inherit; font-weight: 550; cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.btn.danger { color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { padding: 6px 11px; font-size: 13px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
.link { background: none; border: 0; color: var(--brand); cursor: pointer; font: inherit; font-weight: 550; padding: 0; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.badge.ok { background: var(--brand-soft); color: var(--brand-soft-ink); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.err { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info-ink); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }

/* Login */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-hero {
  background: radial-gradient(circle at 12% 8%, var(--hero-a), transparent 50%), radial-gradient(circle at 95% 95%, var(--hero-b), transparent 45%), var(--surface-2);
  border-right: 1px solid var(--line); color: var(--ink); padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-hero h2 { font-size: 34px; line-height: 1.15; letter-spacing: -.03em; margin: 0 0 14px; font-weight: 750; max-width: 460px; }
.auth-hero p { color: var(--ink-2); max-width: 440px; font-size: 15.5px; }
.auth-hero ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.auth-hero li { display: flex; gap: 10px; align-items: center; color: var(--ink-2); }
.auth-hero li svg { color: var(--brand); }
.auth-hero .small { color: var(--muted); }
.auth-main { display: grid; place-items: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h1 { margin-bottom: 6px; }
.auth-card form { margin-top: 26px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 18px; letter-spacing: -.02em; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(140deg, #3fd39b, #0f9d6a); display: grid; place-items: center; color: #fff; }
.brand-mark svg { width: 18px; height: 18px; stroke: #fff; }

/* Estrutura do app */
.layout { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); color: var(--ink-2); padding: 22px 14px; display: flex; flex-direction: column; gap: 26px; position: sticky; top: 0; height: 100vh; }
.sidebar .brand { padding: 0 8px; color: var(--ink); }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 520; transition: background .15s; }
.nav a svg { color: var(--muted); }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.active { background: var(--brand-soft); color: var(--brand-soft-ink); font-weight: 600; }
.nav a.active svg { color: var(--brand); }
.nav .status { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--surface-3); }
.nav .status.on { background: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.side-foot { margin-top: auto; padding: 12px; border-radius: 12px; background: var(--surface-2); display: flex; align-items: center; gap: 10px; }
.side-foot .who { min-width: 0; flex: 1; }
.side-foot .who div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .who div:first-child { color: var(--ink); font-weight: 600; }
.side-foot button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 8px; }
.side-foot button:hover { color: var(--ink); background: var(--surface-3); }
.content { padding: 32px 36px 48px; max-width: 1180px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head p { color: var(--muted); margin-top: 6px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow); }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.card-head p { color: var(--muted); font-size: 13.5px; }
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.grid-2 > .card { margin-bottom: 0; }

/* Indicadores */
.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat .top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 13px; font-weight: 550; }
.stat .chip { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-soft-ink); }
.stat .chip svg { width: 16px; height: 16px; }
.stat .value { font-size: 28px; font-weight: 720; letter-spacing: -.02em; margin-top: 8px; font-variant-numeric: tabular-nums; }

/* Checklist */
.progress { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; margin: 4px 0 16px; }
.progress span { display: block; height: 100%; background: var(--brand); border-radius: 6px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.steps a { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.steps a:hover { background: var(--surface-2); }
.steps .check { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex-shrink: 0; }
.steps .done .check { background: var(--brand); border-color: var(--brand); color: #fff; }
.steps .done .check svg { width: 14px; height: 14px; stroke-width: 3; }
.steps .done span.t { color: var(--muted); text-decoration: line-through; }
.steps .go { margin-left: auto; color: var(--muted); }

/* Gráfico */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: 220px; overflow: visible; }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .legend { display: flex; gap: 16px; font-size: 13px; color: var(--ink-2); margin-bottom: 10px; }
.chart .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover { fill: var(--surface-2); }
.tooltip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); border-radius: 10px; padding: 8px 11px; font-size: 12.5px; min-width: 130px; transform: translate(-50%, -100%); z-index: 2; }
.tooltip b { display: block; margin-bottom: 4px; }
.tooltip div { display: flex; justify-content: space-between; gap: 14px; color: var(--ink-2); }
.tooltip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }

/* Escolha do modelo de negócio */
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.choice { position: relative; text-align: left; border: 1.5px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 18px; cursor: pointer; font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s, background .15s; }
.choice:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.choice.selected { border-color: var(--brand); box-shadow: var(--ring); background: color-mix(in srgb, var(--brand-soft) 45%, var(--surface)); }
.choice .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-soft-ink); margin-bottom: 12px; }
.choice .ic svg { width: 22px; height: 22px; }
.choice strong { display: block; font-size: 15.5px; margin-bottom: 4px; }
.choice span { color: var(--muted); font-size: 13.5px; }
.choice .tick { position: absolute; top: 14px; right: 14px; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; display: none; place-items: center; }
.choice.selected .tick { display: grid; }
.choice .tick svg { width: 13px; height: 13px; stroke-width: 3; }
.specialties { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.spec { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; padding: 11px 12px; cursor: pointer; font: inherit; color: inherit; font-weight: 550; text-align: left; transition: border-color .15s, background .15s; }
.spec:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.spec.selected { border-color: var(--brand); background: color-mix(in srgb, var(--brand-soft) 60%, var(--surface)); }
.spec .emoji { font-size: 20px; }
.section-title { font-size: 13px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 22px 0 10px; }

/* WhatsApp (QR) */
.qr-box { display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center; }
.qr-frame { width: 264px; height: 264px; border-radius: 16px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; padding: 10px; position: relative; }
.qr-frame img { width: 100%; height: 100%; }
.qr-frame.empty { background: var(--surface-2); color: var(--muted); text-align: center; padding: 24px; font-size: 13.5px; }
.qr-frame .big { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin: 0 auto 10px; }
.qr-frame .big svg { width: 28px; height: 28px; }
.howto { counter-reset: s; list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 10px; }
.howto li { display: flex; gap: 10px; color: var(--ink-2); }
.howto li::before { counter-increment: s; content: counter(s); width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); font-size: 12px; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--surface-3); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 10px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Tabelas */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: 0; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-state .big { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); margin: 0 auto 12px; color: var(--muted); }
.empty-state strong { display: block; color: var(--ink); margin-bottom: 4px; }

.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sticky-save { position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(180deg, transparent, var(--bg) 35%); display: flex; justify-content: flex-end; gap: 10px; }

dialog { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); width: min(440px, calc(100% - 32px)); padding: 24px; box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(5, 12, 9, .5); backdrop-filter: blur(2px); }
dialog .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(90px); background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 10px; transition: transform .25s; z-index: 20; max-width: calc(100% - 32px); box-shadow: var(--shadow-lg); font-weight: 520; }
.toast.show { transform: translateX(-50%) translateY(0); }

/* Mídia nas mensagens (compartilhado com o admin) */
.wa-media { display: block; max-width: 320px; max-height: 340px; width: 100%; border-radius: 8px; object-fit: cover; background: rgba(0,0,0,.06); }
.wa-sticker { display: block; width: 150px; height: 150px; object-fit: contain; }
.wa-audio { display: block; width: 270px; max-width: 100%; height: 40px; }
.wa-doc { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; background: rgba(0,0,0,.05); text-decoration: none; color: inherit; min-width: 220px; }
.wa-doc .ext { width: 32px; height: 38px; border-radius: 4px; background: #e8574a; color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }

@media (max-width: 960px) {
  .grid-2 { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
}
@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { min-width: 0; position: static; height: auto; padding: 12px 16px; gap: 12px; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .nav { flex-direction: row; overflow-x: auto; width: 100%; order: 3; padding-bottom: 2px; }
  .nav a { white-space: nowrap; }
  .side-foot { margin: 0 0 0 auto; padding: 4px; background: none; }
  .side-foot .who { display: none; }
  .content { padding: 20px 16px 40px; }
  .row, .choices { grid-template-columns: 1fr; }
  .qr-box { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .howto li { text-align: left; }
}

.main-col { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.main-col .content { flex: 1; }
.side-theme { display: flex; align-items: center; justify-content: space-between; padding: 0 8px; color: var(--muted); font-size: 12.5px; margin-top: auto; }
.side-theme + .side-foot { margin-top: 0; }
@media (max-width: 820px) {
  .side-theme { margin: 0; order: 2; padding: 0; }
  .side-theme span { display: none; }
  .main-col { min-height: 0; }
}

/* Agenda */
.ag-card { padding: 0; overflow: hidden; }
.ag-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.ag-nav { display: flex; align-items: center; gap: 6px; }
.ag-nav .btn svg { width: 16px; height: 16px; }
.ag-nav strong { margin-left: 8px; font-size: 15px; letter-spacing: -.01em; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.seg button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 550; padding: 6px 11px; border-radius: 7px; cursor: pointer; }
.seg button svg { width: 15px; height: 15px; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .1); }
.ag-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.ag-day { border-right: 1px solid var(--line); min-height: 360px; display: flex; flex-direction: column; }
.ag-day:last-child { border-right: 0; }
.ag-day.past { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.ag-day-head { display: flex; align-items: baseline; gap: 6px; padding: 12px 12px 10px; color: var(--muted); font-size: 12.5px; font-weight: 600; text-transform: capitalize; }
.ag-day-head b { font-size: 18px; color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.ag-day.today .ag-day-head { color: var(--brand-soft-ink); }
.ag-day.today .ag-day-head b { background: var(--brand); color: var(--brand-ink); border-radius: 8px; padding: 0 7px; }
.ag-day-list { display: flex; flex-direction: column; gap: 6px; padding: 0 8px 12px; }
.ag-free { color: var(--muted); font-size: 12px; padding: 4px; opacity: .7; }
.ag-item {
  display: grid; align-content: start; gap: 1px; text-align: left; width: 100%; cursor: pointer; font: inherit; color: var(--ink);
  background: var(--brand-soft); border: 1px solid transparent; border-left: 3px solid var(--brand); border-radius: 8px; padding: 7px 9px;
  transition: border-color .15s, transform .05s;
}
.ag-item:hover { border-color: var(--line); border-left-color: var(--brand-strong); }
.ag-item:focus-visible { outline: none; box-shadow: var(--ring); }
.ag-time { font-size: 12px; font-weight: 650; color: var(--brand-soft-ink); font-variant-numeric: tabular-nums; }
.ag-who { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-what { font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.ag-tags:empty { display: none; }
.ag-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); }
.ag-tag svg { width: 12px; height: 12px; }
.ag-item.s-concluido { background: var(--info-soft); border-left-color: var(--info-ink); }
.ag-item.s-concluido .ag-time { color: var(--info-ink); }
.ag-item.s-faltou { background: var(--warn-soft); border-left-color: var(--warn); }
.ag-item.s-faltou .ag-time { color: var(--warn); }
.ag-item.s-cancelado { background: var(--surface-2); border-left-color: var(--surface-3); color: var(--muted); }
.ag-item.s-cancelado .ag-time, .ag-item.s-cancelado .ag-what { color: var(--muted); }
.ag-item.s-cancelado .ag-who { text-decoration: line-through; }
#ag-body > .ag-group, #ag-body > .empty-state { padding-left: 18px; padding-right: 18px; }
.ag-group { padding-top: 16px; padding-bottom: 4px; }
.ag-group + .ag-group { border-top: 1px solid var(--line); }
.ag-group-head { font-weight: 650; font-size: 13.5px; margin-bottom: 10px; }
.ag-group-head::first-letter { text-transform: uppercase; }
.ag-rows { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); padding-bottom: 12px; }
.ag-dialog { width: min(480px, calc(100% - 32px)); }
.ag-dlg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.ag-dlg-head h3 { margin: 8px 0 0; font-size: 18px; }
form .ag-dlg-head h3 { margin-top: 0; }
.ag-facts { display: grid; grid-template-columns: 22px 1fr; gap: 10px 10px; margin: 0 0 18px; }
.ag-facts dt { color: var(--muted); }
.ag-facts dd { margin: 0; color: var(--ink-2); }
.ag-facts dd::first-letter { text-transform: uppercase; }
.ag-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.row.three { grid-template-columns: 1.3fr 1fr 1fr; }
@media (max-width: 960px) {
  .ag-week { grid-template-columns: 1fr; }
  .ag-day { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; align-items: flex-start; }
  .ag-day:last-child { border-bottom: 0; }
  .ag-day-head { flex-direction: column; align-items: center; gap: 0; width: 58px; flex-shrink: 0; padding: 12px 6px; }
  .ag-day-list { flex: 1; padding: 10px 12px 10px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .ag-free { padding-top: 10px; }
}
@media (max-width: 560px) {
  .row.three { grid-template-columns: 1fr 1fr; }
  .ag-nav strong { width: 100%; margin: 6px 0 0; }
  .ag-nav { flex-wrap: wrap; }
}
.next-appts { list-style: none; margin: 0; padding: 0; display: grid; }
.next-appts li { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.next-appts li:first-child { border-top: 0; padding-top: 0; }
.next-appts .when { display: grid; width: 74px; flex-shrink: 0; font-size: 12px; color: var(--muted); text-transform: capitalize; }
.next-appts .when b { font-size: 15px; color: var(--brand-soft-ink); font-variant-numeric: tabular-nums; }
.next-appts .who { display: grid; flex: 1; min-width: 0; }
.next-appts .who > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
