/* Agenda Hicone — design system (claro/escuro), acolhedor e profissional. */
:root {
  --bg: #f7f5f1;
  --card: #ffffff;
  --ink: #2c2a27;
  --muted: #8a857c;
  --soft: #b6b0a6;
  --line: #e8e3da;
  --accent: #5a7d6f;        /* verde-sálvia */
  --accent-ink: #466155;
  --accent-soft: #eef3f0;
  --danger: #b4564b;
  --warn: #b88a3e;
  --ok: #5a7d6f;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(44, 42, 39, .04), 0 8px 24px rgba(44, 42, 39, .06);
  --shadow-sm: 0 1px 2px rgba(44, 42, 39, .06);
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
:root[data-theme="dark"] {
  --bg: #14171a;
  --card: #1b1f23;
  --ink: #e8e6e1;
  --muted: #9aa0a6;
  --soft: #6b7178;
  --line: #2a2f34;
  --accent: #7fa897;
  --accent-ink: #a7c7ba;
  --accent-soft: #1f2a26;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .3);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
a { color: var(--accent-ink); }

.wrap { max-width: 560px; margin: 0 auto; padding: 24px 18px 64px; }
.wrap-wide { max-width: 920px; }

/* ── Cabeçalho ───────────────────────────────────────── */
.brand { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.brand b { font-size: 17px; font-weight: 700; letter-spacing: .2px; color: var(--accent-ink); }
.brand span { font-size: 13px; color: var(--muted); }
.lede { color: var(--muted); font-size: 14.5px; margin: 2px 0 22px; }

/* ── Passos (stepper) ────────────────────────────────── */
.steps { display: flex; gap: 6px; margin-bottom: 22px; }
.steps i {
  height: 4px; flex: 1; border-radius: 99px; background: var(--line);
  transition: background .25s;
}
.steps i.on { background: var(--accent); }

h1 { font-size: 22px; font-weight: 700; margin: 0 0 4px; letter-spacing: -.2px; }
h2.step-title { font-size: 18px; font-weight: 700; margin: 0 0 14px; letter-spacing: -.2px; }
.hint { color: var(--muted); font-size: 13.5px; margin: -8px 0 18px; }

/* ── Cartões de escolha (modalidade) ─────────────────── */
.choices { display: grid; gap: 12px; }
.choice {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 18px; cursor: pointer; transition: border-color .15s, transform .05s, box-shadow .15s;
  color: var(--ink); font-family: inherit;
}
.choice:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.choice:active { transform: scale(.995); }
.choice.sel { border-color: var(--accent); background: var(--accent-soft); }
.choice .ic { width: 42px; height: 42px; flex: none; display: grid; place-items: center;
  border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); }
.choice .ic svg { width: 22px; height: 22px; }
.choice .t { font-weight: 600; font-size: 15.5px; }
.choice .d { color: var(--muted); font-size: 13px; }

/* ── Dias e horários ─────────────────────────────────── */
.days { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; margin-bottom: 4px;
  scrollbar-width: thin; }
.day {
  flex: none; min-width: 64px; text-align: center; padding: 10px 12px; cursor: pointer;
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  color: var(--ink); font-family: inherit; transition: border-color .15s, background .15s;
}
.day:hover { border-color: var(--accent); }
.day.sel { border-color: var(--accent); background: var(--accent); color: #fff; }
.day .dow { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; opacity: .8; }
.day .num { font-size: 18px; font-weight: 700; line-height: 1.1; }
.day .mon { font-size: 11px; opacity: .8; }

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.slot {
  padding: 11px 8px; text-align: center; cursor: pointer; font-weight: 600; font-size: 14px;
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  color: var(--ink); font-family: inherit; transition: border-color .15s, background .15s;
}
.slot:hover { border-color: var(--accent); }
.slot.sel { border-color: var(--accent); background: var(--accent); color: #fff; }

.empty { text-align: center; color: var(--muted); padding: 40px 16px; font-size: 14px; }

/* ── Formulário ──────────────────────────────────────── */
.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.field .req { color: var(--danger); }
input, select, textarea {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--ink);
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 13px; transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; min-height: 76px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg { display: flex; gap: 8px; }
.seg button {
  flex: 1; padding: 11px; border: 1.5px solid var(--line); background: var(--card);
  border-radius: var(--radius-sm); font-family: inherit; font-size: 14px; font-weight: 600;
  color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s;
}
.seg button.sel { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--ink); }
.check input { width: auto; margin-top: 3px; flex: none; }
.guardian { background: var(--accent-soft); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 16px; }
.guardian .gh { font-size: 13px; font-weight: 700; color: var(--accent-ink); margin-bottom: 10px; }

/* ── Resumo ──────────────────────────────────────────── */
.summary { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.summary .li { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0;
  border-bottom: 1px solid var(--line); font-size: 14.5px; }
.summary .li:last-child { border-bottom: 0; }
.summary .k { color: var(--muted); }
.summary .v { font-weight: 600; text-align: right; }

/* ── Botões / navegação ──────────────────────────────── */
.nav { display: flex; gap: 10px; margin-top: 22px; }
.btn {
  flex: 1; padding: 13px 18px; border-radius: var(--radius-sm); font-family: inherit;
  font-size: 15px; font-weight: 700; cursor: pointer; border: 1.5px solid var(--line);
  background: var(--card); color: var(--ink); transition: filter .15s, border-color .15s;
}
.btn:hover { filter: brightness(.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn.sm { flex: none; padding: 8px 14px; font-size: 13px; }

/* ── Tela de sucesso ─────────────────────────────────── */
.done { text-align: center; padding: 30px 10px; }
.done .seal { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; }
.done .seal svg { width: 32px; height: 32px; }
.done h1 { margin-bottom: 8px; }
.done p { color: var(--muted); font-size: 15px; }

/* ── Avisos / banner ─────────────────────────────────── */
.note { font-size: 12.5px; color: var(--muted); margin-top: 18px; text-align: center;
  display: flex; align-items: center; gap: 6px; justify-content: center; }
.note svg { width: 14px; height: 14px; }
.demo-flag { background: var(--warn); color: #fff; font-size: 12px; font-weight: 600;
  text-align: center; padding: 6px; border-radius: 8px; margin-bottom: 16px; }
.error-msg { background: #fbecea; color: var(--danger); border-radius: var(--radius-sm);
  padding: 11px 14px; font-size: 13.5px; margin-bottom: 14px; }
:root[data-theme="dark"] .error-msg { background: #3a2522; }

.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .8s linear infinite; margin: 36px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Admin ───────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 1.5px solid var(--line); margin-bottom: 22px;
  overflow-x: auto; }
.tab { padding: 10px 14px; font-size: 14px; font-weight: 600; color: var(--muted);
  background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer;
  font-family: inherit; white-space: nowrap; }
.tab.on { color: var(--accent-ink); border-bottom-color: var(--accent); }

.bk { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.bk .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.bk .name { font-weight: 700; font-size: 15.5px; }
.bk .when { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.bk .meta { font-size: 13px; color: var(--muted); margin-top: 8px; display: flex;
  flex-wrap: wrap; gap: 4px 14px; }
.bk .reason { font-size: 13.5px; margin-top: 10px; padding: 10px 12px; background: var(--bg);
  border-radius: 8px; }
.bk .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.pill { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px;
  text-transform: uppercase; letter-spacing: .3px; }
.pill.pendente { background: #fdf3e0; color: #9a6b1e; }
.pill.confirmada, .pill.reagendada { background: var(--accent-soft); color: var(--accent-ink); }
.pill.cancelada, .pill.faltou { background: #fbecea; color: var(--danger); }
.pill.realizada { background: #eef0f2; color: #5a6168; }
:root[data-theme="dark"] .pill.pendente { background: #3a2f1a; }
:root[data-theme="dark"] .pill.realizada { background: #23282d; }

.login-card { max-width: 360px; margin: 12vh auto 0; background: var(--card); padding: 28px;
  border: 1.5px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

.cfg { display: grid; gap: 16px; background: var(--card); border: 1.5px solid var(--line);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.cfg h3 { margin: 0; font-size: 15px; }
.wk { display: grid; grid-template-columns: 90px 1fr; gap: 8px; align-items: center; }
.wk label { font-size: 13px; font-weight: 600; }

.modal-bg { position: fixed; inset: 0; background: rgba(20, 18, 16, .45); display: grid;
  place-items: center; padding: 18px; z-index: 50; }
.modal { background: var(--card); border-radius: var(--radius); padding: 22px; width: 100%;
  max-width: 420px; box-shadow: var(--shadow); }
.modal h3 { margin: 0 0 14px; font-size: 17px; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 60;
  background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 99px;
  font-size: 14px; box-shadow: var(--shadow); }
