/* =========================================================
   TesteSeuQI — estilos
   Cores principais ficam nas variáveis abaixo (fácil de trocar)
   ========================================================= */
:root {
  /* Identidade visual TesteSeuQI */
  --navy: #14213D;          /* azul-marinho da marca (textos, logo) */
  --cream: #F6F3EC;         /* creme de fundo */
  --accent: #D9651F;        /* laranja da marca (destaques grandes, "QI") */
  --primary: #B8521A;       /* laranja mais escuro: botões (contraste com texto branco) */
  --primary-dark: #9E4515;
  --primary-soft: #FBEBDD;
  --text: #14213D;
  --muted: #4A5163;
  --line: #E4DED2;
  --bg: #F6F3EC;
  --card: #ffffff;
  --ok: #1f7a55;
  --ok-soft: #e4f3ec;
  --warn: #9a6412;
  --warn-soft: #fbf1de;
  --error: #b93a34;
  --error-soft: #fbe9e8;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(20, 33, 61, .05), 0 8px 28px rgba(20, 33, 61, .07);
  --font: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Fonte da marca (hospedada no próprio site — licença OFL em assets/fonts) */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/bricolage-grotesque-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/bricolage-grotesque-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/bricolage-grotesque-latin-800-normal.woff2") format("woff2"); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.55; font-size: 16px; }
img { max-width: 100%; height: auto; }
a { color: var(--navy); text-decoration-color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--primary); }
h1, h2, h3 { line-height: 1.1; margin: 0 0 .6em; letter-spacing: -.02em; font-weight: 800; }
h1 { letter-spacing: -.035em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); }
.h2 { font-size: 1.6rem; }
.h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .8rem; word-break: break-all; }
[hidden] { display: none !important; }

/* ---------- Botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; border: 0; border-radius: 12px; background: var(--primary); color: #fff; font: inherit; font-weight: 800; padding: .7em 1.2em; cursor: pointer; text-decoration: none; transition: background .15s, transform .05s, opacity .15s; }
.btn:hover { background: var(--primary-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:focus-visible, .option:focus-visible { outline: 3px solid rgba(217, 101, 31, .45); outline-offset: 2px; }
.btn-lg { font-size: 1.05rem; padding: .9em 1.6em; }
.btn-sm { font-size: .9rem; padding: .45em .9em; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { background: var(--primary-soft); }
.btn-danger { background: var(--error); }
.btn-danger:hover { background: #a3322d; }
.link-btn { background: none; border: 0; color: var(--navy); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }

/* ---------- Cabeçalho / rodapé ---------- */
.site-header { background: var(--cream); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: .55em; text-decoration: none; color: var(--text); font-size: 1.15rem; }
.brand-mark { display: block; width: 36px; height: 36px; flex: none; }
.brand-name { font-weight: 500; letter-spacing: -.03em; font-size: 1.3rem; color: var(--navy); }
.brand-name strong { color: var(--accent); font-weight: 800; }
.header-nav { display: flex; align-items: center; gap: 1.2em; }
.header-nav a:not(.btn) { color: var(--muted); text-decoration: none; font-size: .95rem; }
.header-nav a:not(.btn):hover { color: var(--text); }
@media (max-width: 600px) { .header-nav a:not(.btn) { display: none; } }

.site-footer { background: var(--navy); margin-top: 48px; padding: 32px 0; font-size: .875rem; color: #B9BFCC; }
.site-footer strong { color: var(--cream); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.2em; margin-bottom: .8em; }
.footer-nav a { color: var(--cream); text-decoration-color: var(--accent); }
.disclaimer { max-width: 760px; }
.copy { margin: 0; }
.is-minimal .site-footer { margin-top: 24px; }

/* ---------- Landing ---------- */
.hero { background: var(--cream); padding: 56px 0 40px; }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 800; color: var(--primary); margin-bottom: .8em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 36em; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 1.4em; }
.hero-note { color: var(--muted); font-size: .9rem; }
.preview { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; border: 1px solid var(--line); }
.preview-top { display: flex; align-items: center; gap: 12px; font-size: .8rem; color: var(--muted); margin-bottom: 14px; }
.preview-bar { flex: 1; height: 6px; background: var(--line); border-radius: 9px; overflow: hidden; }
.preview-bar i { display: block; height: 100%; background: var(--accent); }
.preview-q { font-size: .95rem; }
.preview-opt { display: flex; gap: 10px; align-items: center; border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px; margin-top: 8px; font-size: .95rem; }
.preview-opt b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--bg); font-size: .75rem; }
.preview-opt.is-selected { border-color: var(--accent); background: var(--primary-soft); }
.preview-opt.is-selected b { background: var(--primary); color: #fff; }
@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero { padding-top: 36px; }
}

.section { padding-top: 48px; padding-bottom: 48px; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { font-size: 1.6rem; margin-bottom: 1em; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.steps h3 { font-size: 1.05rem; margin: .6em 0 .4em; }
.steps p { color: var(--muted); margin: 0; }
.step-n { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 700; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; gap: 16px; } }
.check-list { list-style: none; padding: 0; margin: 0 0 1em; }
.check-list li { position: relative; padding-left: 1.8em; margin-bottom: .6em; }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--ok); font-weight: 700; }
.check-list.compact li { margin-bottom: .3em; }
.faq { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: .8em 0 0; color: var(--muted); }
.cta-final h2 { font-size: 1.8rem; }

/* ---------- Cartões, avisos, formulários ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; margin-bottom: 20px; }
@media (max-width: 600px) { .card { padding: 20px; } }
.notice { background: var(--primary-soft); border-radius: 10px; padding: 12px 16px; margin: 16px 0; font-size: .95rem; }
.notice-error { background: var(--error-soft); color: var(--error); }
.notice-ok { background: var(--ok-soft); color: #146b49; }
.badge { display: inline-block; padding: .2em .7em; border-radius: 99px; font-size: .75rem; font-weight: 700; background: var(--primary-soft); color: var(--primary); }
.badge-ok { background: var(--ok-soft); color: #146b49; }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-error { background: var(--error-soft); color: var(--error); }
.badge-muted { background: #eef0f4; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.actions-right { justify-content: flex-end; }
.actions-center { justify-content: center; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field em, .check em { color: var(--error); font-style: normal; }
input[type=email], input[type=text], input[type=password], input[type=number], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: .65em .8em;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(217, 101, 31, .18); }
textarea { min-height: 110px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; font-size: .92rem; }
.check input { margin-top: .25em; width: 18px; height: 18px; flex: none; accent-color: var(--primary); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 600px) { .grid-2 { grid-template-columns: 1fr; } }
.form-error { color: var(--error); font-size: .92rem; margin: 10px 0 0; }
.optional-box { border: 1px dashed var(--line); border-radius: 10px; padding: 12px 16px; margin: 6px 0 12px; }
.optional-box summary { cursor: pointer; font-weight: 600; font-size: .95rem; }
.optional-box[open] summary { margin-bottom: 8px; }

/* ---------- Tela do teste ---------- */
.test-wrap { max-width: 720px; margin: 0 auto; padding: 28px 16px 8px; }
.q-top { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.q-counter { font-weight: 700; font-size: .95rem; white-space: nowrap; }
.progress { flex: 1; height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s ease; }
.q-text { font-size: 1.2rem; font-weight: 600; white-space: pre-line; margin-bottom: 1.1em; }
.q-figure { margin: 0 0 18px; text-align: center; }
.q-figure img { max-height: 280px; border-radius: 10px; border: 1px solid var(--line); background: #fff; padding: 8px; }
.options { display: grid; gap: 10px; }
.option { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; font: inherit; color: var(--text); background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 14px 16px; cursor: pointer; transition: border-color .12s, background .12s; min-height: 56px; }
@media (hover: hover) { .option:hover { border-color: #c5cbe0; } }
.option-letter { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 8px; background: var(--bg); font-weight: 700; font-size: .9rem; color: var(--muted); }
.option.is-selected { border-color: var(--accent); background: var(--primary-soft); }
.option.is-selected .option-letter { background: var(--primary); color: #fff; }
.done-icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); font-size: 1.6rem; font-weight: 700; }
.loading { position: fixed; inset: 0; background: rgba(246, 247, 251, .55); display: grid; place-items: center; z-index: 50; }
.spinner { width: 36px; height: 36px; border: 4px solid var(--primary-soft); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
.spinner-sm { width: 16px; height: 16px; border-width: 3px; vertical-align: -3px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 600px) {
  .q-text { font-size: 1.08rem; }
  .actions-right .btn { width: 100%; }
}

/* ---------- Resultado ---------- */
.locked-card { text-align: left; }
.blurred { position: relative; margin: 20px auto; max-width: 360px; padding: 18px; border-radius: 12px; background: var(--bg); filter: blur(5px); user-select: none; }
.blur-score { font-size: 3.4rem; font-weight: 800; text-align: center; color: var(--accent); }
.blur-lines i { display: block; height: 10px; border-radius: 6px; background: #DCD5C7; margin: 8px 0; }
.blur-lines i:nth-child(2) { width: 80%; } .blur-lines i:nth-child(3) { width: 60%; } .blur-lines i:nth-child(4) { width: 90%; }
.pay-form { margin: 20px 0 12px; }
.result { max-width: 820px; }
.result-hero { text-align: center; }
.score { font-size: clamp(4.5rem, 16vw, 7rem); font-weight: 800; line-height: 1; color: var(--navy); letter-spacing: -.05em; }
.band { font-size: 1.3rem; font-weight: 700; margin: .4em 0 .3em; }
.bell { width: 100%; max-width: 600px; margin-top: 16px; }
.bell-line { fill: none; stroke: var(--navy); stroke-width: 3; stroke-linecap: round; }
.bell-fill { fill: var(--primary-soft); }
.bell-axis { stroke: var(--line); stroke-width: 1.5; }
.bell-tick { font-size: 12px; fill: var(--muted); text-anchor: middle; }
.bell-marker { stroke: var(--accent); stroke-width: 3; stroke-dasharray: 1 7; stroke-linecap: round; }
.bell-you { font-size: 13px; font-weight: 800; fill: var(--primary); text-anchor: middle; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat { display: flex; flex-direction: column; gap: 4px; margin-bottom: 20px; }
.stat-label { font-size: .85rem; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 2rem; font-weight: 800; }
.stat-value small { font-size: 1rem; color: var(--muted); font-weight: 600; }
.stat-help { font-size: .8rem; color: var(--muted); }
@media (max-width: 700px) { .stats { grid-template-columns: 1fr; gap: 0; } }
.bars { display: grid; gap: 14px; }
.bar-label { display: flex; justify-content: space-between; font-size: .95rem; margin-bottom: 5px; }
.bar { height: 10px; background: #EFEAE0; border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.prose h2 { font-size: 1.25rem; margin-top: 1.6em; }
.prose li { margin-bottom: .4em; }
@media print {
  .site-header, .site-footer, .no-print { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; }
}

/* =========================================================
   ÁREA ADMINISTRATIVA
   ========================================================= */
.admin body, body.admin { background: var(--bg); }
.admin-bar { background: var(--navy); color: #fff; }
.admin-bar .container { display: flex; align-items: center; gap: 22px; min-height: 58px; flex-wrap: wrap; max-width: 1280px; }
.admin-bar a { color: #c9cfe6; text-decoration: none; font-size: .93rem; }
.admin-bar a:hover, .admin-bar a.active { color: #fff; }
.admin-bar .brand-name { color: #fff; }
.admin-bar .spacer { flex: 1; }
.admin-main { max-width: 1280px; padding-top: 24px; padding-bottom: 40px; }
.admin-main h1 { font-size: 1.6rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.kpi span { display: block; font-size: .8rem; color: var(--muted); font-weight: 600; }
.kpi strong { font-size: 1.6rem; }
.kpi small { color: var(--muted); display: block; font-size: .78rem; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { background: #fafbfe; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }
.table input.order-input { width: 72px; padding: .3em .5em; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 16px; }
.toolbar .field { margin: 0; }
.toolbar select, .toolbar input { width: auto; min-width: 150px; }
.inline-form { display: inline; }
.pagination { display: flex; gap: 8px; margin-top: 14px; align-items: center; }
.admin-login { max-width: 400px; margin: 60px auto; }
.opt-row { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; margin-bottom: 10px; }
.opt-row label { display: grid; place-items: center; font-weight: 700; }
.thumb { max-height: 120px; border: 1px solid var(--line); border-radius: 8px; padding: 4px; background: #fff; }
.truncate { max-width: 420px; }

/* Prévia gratuita da faixa (resultado bloqueado) */
.preview-band { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; background: var(--primary-soft); border-radius: 12px; padding: 16px; margin: 18px 0 4px; }
.preview-band strong { font-size: 1.7rem; font-weight: 800; color: var(--primary); letter-spacing: -.02em; }

/* Relógio do teste (tempo decorrido, pode ser escondido) */
.q-timer { display: inline-flex; align-items: center; gap: 6px; flex: none; font: inherit; font-size: .9rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--muted); background: #fff; border: 1.5px solid var(--line); border-radius: 99px; padding: 5px 11px; cursor: pointer; min-height: 34px; }
.q-timer:hover { color: var(--navy); border-color: #d2cbbd; }
.q-timer.is-hidden #q-timer-text { display: none; }
.q-timer.is-hidden { opacity: .6; padding: 5px 9px; }
@media (max-width: 420px) { .q-top { gap: 10px; } .q-counter { font-size: .88rem; } }
