/* Kodeira Agenda — estilos (sem fontes externas) */
:root {
  --bg: #f5f7fa; --surface: #fff; --text: #0f172a; --muted: #5b6475; --line: #e3e8ef;
  --brand: #0d9488; --brand-2: #7c3aed; --brand-ink: #fff; --danger: #dc2626; --warn: #d97706; --ok: #059669;
  --wa: #25d366; --radius: 14px; --shadow: 0 8px 24px rgba(15, 23, 42, .08);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1020; --surface: #141c33; --text: #e8ecf5; --muted: #9aa4b8; --line: #243050;
    --brand: #2dd4bf; --brand-2: #a78bfa; --brand-ink: #04121a; --shadow: 0 8px 24px rgba(0, 0, 0, .35); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1020; --surface: #141c33; --text: #e8ecf5; --muted: #9aa4b8; --line: #243050;
  --brand: #2dd4bf; --brand-2: #a78bfa; --brand-ink: #04121a; --shadow: 0 8px 24px rgba(0, 0, 0, .35); color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 480px; }
.muted { color: var(--muted); } .small { font-size: .875rem; }
.hidden, [hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; background: var(--brand); color: var(--brand-ink); border: 0; border-radius: 999px; padding: .7em 1.2em; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:disabled { opacity: .6; cursor: default; }
.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn--sm { padding: .4em .8em; font-size: .85rem; }
.btn--wa { background: var(--wa); color: #05301a; }
.btn--danger { background: transparent; color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 40%, var(--line)); }
.btn--full { width: 100%; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; font-weight: 600; }
input, select, textarea { font: inherit; padding: .65em .8em; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); width: 100%; }
input[type=checkbox] { width: auto; }
.check { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 400; }
.form { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } }
.msg { font-size: .9rem; margin: 0; }
.msg:empty { display: none; }
.msg.err { color: var(--danger); } .msg.ok { color: var(--ok); font-weight: 600; }

/* Topo */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; align-items: center; gap: 12px; height: 58px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; color: var(--text); text-decoration: none; letter-spacing: -.03em; }
.brand small { font-size: .65rem; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .1em; }
.top .spacer { flex: 1; }

/* Abas do painel */
.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 12px 0; scrollbar-width: none; }
.tabs button { font: inherit; font-size: .92rem; background: none; border: 0; color: var(--muted); padding: .5em .9em; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"] { background: color-mix(in srgb, var(--brand) 14%, var(--surface)); color: var(--text); font-weight: 700; }
main { padding-bottom: 60px; }

/* Agenda */
.daynav { display: flex; align-items: center; gap: 8px; margin: 8px 0 16px; flex-wrap: wrap; }
.daynav input { width: auto; }
.daynav h2 { margin: 0; font-size: 1.15rem; flex-basis: 100%; order: -1; }
.stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: .85rem; color: var(--muted); }
.stat b { color: var(--text); font-size: 1.05rem; margin-right: 4px; }
.appt { display: grid; grid-template-columns: 64px 1fr; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.appt.concluido { border-left-color: var(--ok); opacity: .75; }
.appt.faltou { border-left-color: var(--danger); opacity: .75; }
.appt .hora { font-weight: 800; font-size: 1.05rem; }
.appt .hora small { display: block; font-weight: 400; color: var(--muted); font-size: .78rem; }
.appt .quem { font-weight: 700; }
.appt .info { color: var(--muted); font-size: .88rem; }
.appt .acoes { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: .15em .6em; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); margin-left: 6px; vertical-align: middle; }
.badge.ok { color: var(--ok); } .badge.err { color: var(--danger); }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }

/* Listas de configuração */
.list { display: flex; flex-direction: column; gap: 8px; }
.item { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.item .grow { flex: 1; min-width: 0; }
.item .grow small { display: block; color: var(--muted); }
.hours { display: flex; flex-direction: column; gap: 8px; }
.hour { display: grid; grid-template-columns: 110px repeat(4, minmax(0, 1fr)); gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.hour input[type=time] { padding: .45em .5em; }
.hour.fechado input[type=time] { opacity: .35; }
@media (max-width: 600px) { .hour { grid-template-columns: 1fr 1fr; } .hour .dia { grid-column: 1 / -1; } }
.share { display: flex; gap: 8px; }
.share input { flex: 1; }

/* Página pública */
.pub-head { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; padding: 28px 0 56px; }
.pub-head h1 { font-size: 1.7rem; margin: 0; }
.pub-head p { margin: 4px 0 0; opacity: .9; }
.pub-body { margin-top: -36px; }
.step { margin-bottom: 14px; }
.step h2 { font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.step h2 span { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-size: .8rem; }
.choices { display: flex; flex-direction: column; gap: 8px; }
.choice { display: flex; justify-content: space-between; gap: 10px; align-items: center; text-align: left; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.choice[aria-pressed="true"] { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, var(--surface)); }
.choice small { color: var(--muted); display: block; }
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.day { flex: 0 0 64px; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 8px 4px; cursor: pointer; text-align: center; }
.day small { display: block; font-size: .72rem; color: var(--muted); text-transform: uppercase; }
.day b { font-size: 1.15rem; }
.day[aria-pressed="true"] { border-color: var(--brand); background: var(--brand); color: var(--brand-ink); }
.day[aria-pressed="true"] small { color: inherit; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; margin-top: 12px; }
.slot { font: inherit; font-weight: 600; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 0; cursor: pointer; }
.slot[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.done { text-align: center; padding: 28px 18px; }
.done .big { font-size: 3rem; }
.foot { text-align: center; font-size: .8rem; color: var(--muted); padding: 24px 0; }
.foot a { color: inherit; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Diálogo */
dialog { border: 0; padding: 0; border-radius: var(--radius); background: var(--surface); color: var(--text); width: min(480px, calc(100% - 32px)); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(5, 10, 25, .55); }
dialog .form { padding: 20px; }
dialog .form .form { padding: 0; }
@media (max-width: 520px) { dialog .form { padding: 16px; } dialog.wide, dialog { width: calc(100% - 16px); } }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

/* Entrada */
.auth { padding: 40px 0; }
.hero-mini { text-align: center; margin-bottom: 24px; }
.hero-mini h1 { font-size: 1.9rem; }
.switch { display: flex; background: var(--bg); border-radius: 999px; padding: 4px; margin-bottom: 18px; }
.switch button { flex: 1; font: inherit; border: 0; background: none; padding: .55em; border-radius: 999px; color: var(--muted); cursor: pointer; }
.switch button[aria-selected="true"] { background: var(--surface); color: var(--text); font-weight: 700; box-shadow: var(--shadow); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.mt { margin-top: 14px; }
.legal { padding: 32px 16px 64px; }
.legal h2 { font-size: 1.15rem; margin-top: 1.6em; }
.legal p, .legal li { color: var(--muted); }
.spacer { flex: 1; }
.link-btn { background: none; border: 0; color: var(--brand); font: inherit; font-size: .9rem; cursor: pointer; text-decoration: underline; align-self: center; padding: 4px; }
.mb { margin-bottom: 12px; }
.m0 { margin: 0; }
.row.between { justify-content: space-between; }
.grow-input { flex: 1; min-width: 160px; width: auto; }
.row select { width: auto; }
.grid3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; align-items: end; }
.grid4 { display: grid; grid-template-columns: 1fr 1fr 1.3fr 1fr; gap: 10px; align-items: end; margin-top: 10px; }
#form-plano, #form-fixo { margin-top: 10px; }
#form-plano .msg, #form-plano .row, #form-fixo .msg, #form-fixo .row { grid-column: 1 / -1; }
@media (max-width: 640px) { .grid3, .grid4 { grid-template-columns: 1fr 1fr; } .grid3 label:first-of-type { grid-column: 1 / -1; } }
.lock { font-weight: 400; font-size: .78rem; color: var(--ok); }
.check.end { align-self: end; padding-bottom: .6em; }
.sub-card { margin-top: 14px; background: var(--bg); }
.sub-card h3 { margin-bottom: 10px; }
.item .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.item.inativo { opacity: .55; }
.item.clicavel { cursor: pointer; }
.item.clicavel:hover { border-color: var(--brand); }
.ex-head, .ex { display: grid; grid-template-columns: 2.6fr .7fr .9fr .9fr .9fr auto; gap: 6px; align-items: center; }
.ex-head { font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.exs { display: flex; flex-direction: column; gap: 8px; }
.ex { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.ex input { padding: .5em .6em; font-size: .9rem; }
.ex .extra { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ex .ctl { display: flex; gap: 2px; }
.ex .ctl button { background: none; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); cursor: pointer; padding: 4px 7px; font: inherit; font-size: .8rem; }
@media (max-width: 640px) { .ex-head { display: none; } .ex { grid-template-columns: repeat(4, 1fr); } .ex .nome { grid-column: 1 / -1; } .ex .ctl { grid-column: 1 / -1; justify-content: flex-end; } }
.fin { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--warn); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.fin.pago { border-left-color: var(--ok); }
.fin.atrasada { border-left-color: var(--danger); }
.fin .acoes { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.fin small { display: block; color: var(--muted); }
.fin-sep { font-size: .85rem; font-weight: 700; color: var(--danger); margin: 18px 0 8px; }
.stat.ok b { color: var(--ok); } .stat.err b { color: var(--danger); }
.chips-check { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-check label { flex-direction: row; align-items: center; gap: 6px; font-weight: 500; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .4em .9em; cursor: pointer; }
fieldset.sub { display: flex; flex-direction: column; gap: 12px; margin: 0; background: var(--bg); }
fieldset.sub legend { font-weight: 700; padding: 0 6px; }
dialog.wide { width: min(720px, calc(100% - 32px)); }
.hours.desativado { opacity: .4; pointer-events: none; }

/* Área do aluno */
.kick { margin: 0 0 4px; opacity: .85; font-size: .9rem; font-weight: 600; }
.row.center { justify-content: center; margin: 8px 0 4px; }
.err-text { color: var(--danger); font-weight: 600; }
.mens { display: flex; flex-direction: column; gap: 10px; }
.mens + .mens { border-top: 1px dashed var(--line); padding-top: 14px; margin-top: 14px; }
.qr-box { display: flex; justify-content: center; }
.qr { border-radius: 12px; border: 1px solid var(--line); background: #fff; max-width: 100%; height: auto; }
.item.destaque { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--surface)); }
.treino { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; background: var(--bg); }
.treino summary { cursor: pointer; list-style: none; display: flex; flex-direction: column; }
.treino summary::-webkit-details-marker { display: none; }
.treino summary small { color: var(--muted); }
.treino[open] summary { margin-bottom: 10px; }
.exlist { padding-left: 1.3em; margin: 0 0 12px; display: flex; flex-direction: column; gap: 10px; }
.exlist li { display: flex; flex-direction: column; gap: 3px; }
.chips-inline { display: flex; flex-wrap: wrap; gap: 6px; }
.chips-inline span { font-size: .8rem; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .1em .6em; }

.kick-brand { color: var(--brand); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; margin: 0 0 8px; }
