:root {
    --brand: #14274e;
    --brand-2: #1b3a66;
    --accent: #2f6df6;
    --accent-d: #2256d6;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --bg: #f4f6fb;
    --card: #ffffff;
    --ok: #16a34a;
    --ok-bg: #ecfdf3;
    --err: #dc2626;
    --err-bg: #fef2f2;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

.container { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 20px; }

/* Topbar */
.topbar { background: var(--brand); color: #fff; }
.topbar-inner { display: flex; align-items: center; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-size: 20px; letter-spacing: .2px; }
.brand-mark { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; background: rgba(255, 255, 255, .12); border-radius: 10px; }
.brand-name strong { font-weight: 800; }
.brand-name { font-weight: 500; }

.main { padding: 32px 20px 56px; }

/* Cabeçalho da página */
.page-head { text-align: center; margin: 8px 0 24px; }
.page-head h1 { font-size: 30px; margin: 0 0 6px; color: var(--brand); letter-spacing: -.4px; }
.page-head .lead { color: var(--muted); max-width: 560px; margin: 0 auto; }

/* Card */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* Formulário em grid */
.grid-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0; overflow: hidden; }
.grid-form .col { padding: 28px; }
.grid-form .col:first-child { border-right: 1px solid var(--line); }

.step { display: flex; align-items: center; gap: 10px; font-size: 16px; margin: 0 0 18px; color: var(--brand); }
.step span { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; background: var(--accent); color: #fff; border-radius: 50%; font-size: 14px; font-weight: 700; }

label { display: block; font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 14px; }
input, select, textarea {
    width: 100%; margin-top: 6px; padding: 11px 12px; font-size: 15px; font-family: inherit;
    color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 10px; outline: none;
    transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 109, 246, .14); }
textarea { resize: vertical; }

/* Slots */
.slots-wrap { margin-top: 4px; }
.slots-hint { font-size: 13px; color: var(--muted); margin: 6px 0 12px; }
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.slot {
    padding: 9px 6px; font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer;
    color: var(--brand); background: #f8fafc; border: 1px solid var(--line); border-radius: 9px;
    transition: all .12s;
}
.slot:hover { border-color: var(--accent); color: var(--accent); }
.slot.sel { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 10px rgba(47, 109, 246, .3); }

/* Rodapé do card */
.card-foot {
    grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 18px 28px; border-top: 1px solid var(--line); background: #fbfcfe;
}
.resumo { font-size: 14px; color: var(--muted); font-weight: 600; }
.resumo.ok { color: var(--ok); }

/* Botões */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px;
    font-size: 15px; font-weight: 700; font-family: inherit; border: 0; border-radius: 10px; cursor: pointer;
    text-decoration: none; transition: transform .05s, background .15s, box-shadow .15s; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-d); }
.btn-primary:disabled { background: #c3cee0; cursor: not-allowed; box-shadow: none; }
.btn-whats { background: #25d366; color: #fff; }
.btn-whats:hover { background: #1eb858; }
.btn-ghost { background: #fff; color: var(--brand); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Alertas */
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-size: 14px; }
.alert-erro { background: var(--err-bg); color: var(--err); border: 1px solid #f7c8c8; }
.alert ul { margin: 0; padding-left: 18px; }

/* Página de sucesso */
.sucesso { max-width: 560px; margin: 10px auto; padding: 36px 32px; text-align: center; }
.sucesso .check { width: 64px; height: 64px; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; font-size: 34px; color: #fff; background: var(--ok); border-radius: 50%; box-shadow: 0 8px 20px rgba(22, 163, 74, .3); }
.sucesso h1 { margin: 0 0 6px; color: var(--brand); font-size: 24px; }
.sucesso .lead { color: var(--muted); margin: 0 0 22px; }
.resumo-box { text-align: left; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 22px; }
.resumo-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.resumo-item:last-child { border-bottom: 0; }
.resumo-item span { color: var(--muted); }
.resumo-item strong { color: var(--ink); text-align: right; word-break: break-word; }
.badge { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge-pendente { background: #fff7ed; color: #c2410c; }
.sucesso-acoes { display: flex; flex-direction: column; gap: 10px; }
.sucesso-acoes .btn { width: 100%; }

/* Footer */
.footer { color: var(--muted); font-size: 13px; text-align: center; padding: 24px 0 36px; }

/* Responsivo */
@media (max-width: 720px) {
    .grid-form { grid-template-columns: 1fr; }
    .grid-form .col:first-child { border-right: 0; border-bottom: 1px solid var(--line); }
    .card-foot { flex-direction: column; align-items: stretch; }
    .card-foot .btn { width: 100%; }
    .slots { grid-template-columns: repeat(3, 1fr); }
    .page-head h1 { font-size: 25px; }
}
