/* ==========================================================================
   Vaga — Design System "Limpo & Preciso"
   Tokens + componentes. Fonte: Inter. Acento: esmeralda.
   ========================================================================== */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #F7F8FA;
  --surface: #FFFFFF;
  --ink: #101828;
  --ink-2: #344054;
  --muted: #667085;
  --faint: #98A2B3;
  --border: #EAECF0;
  --border-strong: #D0D5DD;
  --accent: #059669;
  --accent-dark: #047857;
  --accent-soft: #ECFDF3;
  --accent-border: #A7F3D0;
  --danger: #DC2626;
  --danger-soft: #FEF2F2;
  --danger-border: #FECACA;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.08), 0 4px 12px rgba(16, 24, 40, 0.05);
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
a:hover { opacity: .85; }

/* ------------------------------------------------------------------ */
/* Layout                                                              */
/* ------------------------------------------------------------------ */
.page { max-width: 680px; margin: 0 auto; padding: 20px 16px 40px; }
.page-narrow { max-width: 480px; margin: 0 auto; padding: 20px 16px 40px; }

/* ------------------------------------------------------------------ */
/* Nav do painel                                                       */
/* ------------------------------------------------------------------ */
.nav { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.nav-inner { max-width: 680px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.nav-brand { font-weight: 700; font-size: 16px; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; }
.nav-brand .mark { width: 26px; height: 26px; border-radius: 8px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link { font-size: 14px; color: var(--muted); padding: 6px 12px; border-radius: 8px; font-weight: 500; transition: all .12s; }
.nav-link:hover { color: var(--ink); background: var(--bg); opacity: 1; }
.nav-link.active { color: var(--ink); background: var(--bg); font-weight: 600; }
.nav-logout { font-size: 14px; color: var(--faint); background: none; border: none; cursor: pointer; padding: 6px 10px; font-family: inherit; }
.nav-logout:hover { color: var(--danger); opacity: 1; }

/* ------------------------------------------------------------------ */
/* Tipografia                                                          */
/* ------------------------------------------------------------------ */
.page-title { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.page-subtitle { font-size: 14px; color: var(--muted); margin-top: 4px; }
.section-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 22px 0 10px; }
.muted { color: var(--muted); }
.greeting { font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------------ */
/* Cards                                                               */
/* ------------------------------------------------------------------ */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }

/* ------------------------------------------------------------------ */
/* Botões                                                              */
/* ------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1;
  border: 1px solid transparent; border-radius: var(--radius); cursor: pointer;
  padding: 12px 18px; transition: background .12s, border-color .12s, color .12s;
}
.btn:active { transform: translateY(1px); }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 18px; font-size: 15px; border-radius: var(--radius); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }

.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #1D2939; opacity: 1; }

.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); opacity: 1; }

.btn-outline { background: var(--surface); border-color: var(--border-strong); color: var(--ink-2); }
.btn-outline:hover { border-color: var(--ink); opacity: 1; }

.btn-danger { background: var(--surface); border-color: var(--danger-border); color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); opacity: 1; }

.btn-ghost { background: none; color: var(--muted); }
.btn-ghost:hover { color: var(--ink); opacity: 1; }

/* ------------------------------------------------------------------ */
/* Formulários                                                         */
/* ------------------------------------------------------------------ */
.field { margin-bottom: 14px; }
.label { display: block; font-size: 13px; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; }
.input {
  width: 100%; font-family: inherit; font-size: 14px; color: var(--ink);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: 11px 13px; background: var(--surface); transition: border-color .12s, box-shadow .12s;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(5, 150, 105, .12); }
.input::placeholder { color: var(--muted); }
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; }

.error-banner { background: var(--danger-soft); border: 1px solid var(--danger-border); color: var(--danger); border-radius: var(--radius); padding: 10px 14px; font-size: 13px; margin-bottom: 14px; }
.success-banner { background: var(--accent-soft); border: 1px solid var(--accent-border); color: var(--accent-dark); border-radius: var(--radius); padding: 14px 16px; }

/* ------------------------------------------------------------------ */
/* Listas                                                              */
/* ------------------------------------------------------------------ */
.list { list-style: none; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--border); }
.list-row:first-child { border-top: none; }
.card-head { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--bg); }
.card-head:first-child { border-top-left-radius: var(--radius-lg); border-top-right-radius: var(--radius-lg); }
.empty { padding: 28px 16px; text-align: center; font-size: 14px; color: var(--faint); }

/* Lista full-bleed (formulários sem card) */
.form-list { border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.form-list .list-row { padding-left: 0; padding-right: 0; }

/* ------------------------------------------------------------------ */
/* Grid de dias (público)                                              */
/* ------------------------------------------------------------------ */
.day-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.day { text-align: center; padding: 13px 2px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); cursor: pointer; transition: all .13s; }
.day:hover { border-color: var(--accent); }
.day .wk { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.day .num { font-weight: 600; font-size: 15px; margin-top: 2px; color: var(--ink); }
.day.disabled { background: transparent; border-color: transparent; cursor: not-allowed; }
.day.disabled .wk, .day.disabled .num { color: var(--faint); }
.day.selected { background: var(--accent); border-color: var(--accent); }
.day.selected .wk, .day.selected .num { color: #fff; }

/* ------------------------------------------------------------------ */
/* Grid de horários (público)                                          */
/* ------------------------------------------------------------------ */
.slot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.slot { text-align: center; padding: 14px 4px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: 14px; cursor: pointer; transition: all .13s; }
.slot:hover { border-color: var(--accent); color: var(--accent-dark); }
.slot.selected { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ------------------------------------------------------------------ */
/* Cartões de serviço (público)                                        */
/* ------------------------------------------------------------------ */
.svc { display: flex; align-items: center; justify-content: space-between; padding: 17px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: 10px; transition: border-color .13s, box-shadow .13s; }
.svc:hover { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(5, 150, 105, .1); opacity: 1; }
.svc-name { font-weight: 600; font-size: 15px; }
.svc-meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.svc-price { font-weight: 600; color: var(--ink); }
.svc-arrow { color: var(--faint); margin-left: 10px; }

/* ------------------------------------------------------------------ */
/* Cabeçalho público                                                   */
/* ------------------------------------------------------------------ */
.public-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.public-brand .avatar { width: 46px; height: 46px; border-radius: 13px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; letter-spacing: -0.02em; }
.public-brand h1 { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.public-brand p { font-size: 13px; color: var(--muted); }
.back-link { display: inline-block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.back-link:hover { color: var(--ink); opacity: 1; }

/* ------------------------------------------------------------------ */
/* Resumo (tela de sucesso)                                            */
/* ------------------------------------------------------------------ */
.summary { background: var(--bg); border-radius: var(--radius); padding: 16px; margin: 20px 0; text-align: left; }
.summary-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.summary-row .k { color: var(--muted); }
.summary-row .v { font-weight: 600; }

/* ------------------------------------------------------------------ */
/* Diversos                                                            */
/* ------------------------------------------------------------------ */
.link { color: var(--accent-dark); font-weight: 500; }
.link:hover { text-decoration: underline; opacity: 1; }
.inline-form { display: inline; }
.phone-chip { font-size: 12px; color: var(--faint); }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.badge-accent { background: var(--accent-soft); color: var(--accent-dark); }

/* ------------------------------------------------------------------ */
/* Formulários: campo com toggle de senha, erro inline, prefixo R$     */
/* ------------------------------------------------------------------ */
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 64px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-family: inherit;
  font-size: 13px; font-weight: 600; color: var(--accent-dark);
  padding: 6px 10px; border-radius: 8px;
}
.pw-toggle:hover { background: var(--accent-soft); }

.field-error { font-size: 12px; color: var(--danger); margin-top: 6px; }
.input.input-error { border-color: var(--danger-border); }
.input.input-error:focus { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(220, 38, 38, .12); }

.pw-hint { font-size: 12px; color: var(--muted); margin-top: 5px; transition: color .12s; }
.pw-hint.short { color: var(--danger); }
.pw-hint.ok { color: var(--accent-dark); }

.prefix-wrap { position: relative; }
.prefix-wrap .input { padding-left: 42px; }
.prefix { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 14px; font-weight: 600; color: var(--muted); pointer-events: none; }

.checkbox-row { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--ink-2); margin: 4px 0 16px; line-height: 1.45; }
.checkbox-row input { margin-top: 1px; width: 16px; height: 16px; accent-color: var(--accent); flex-shrink: 0; }
.checkbox-row a { color: var(--accent-dark); font-weight: 500; }
