:root {
  --black: #080808;
  --black-2: #101010;
  --panel: #151515;
  --panel-2: #1b1b1b;
  --line: #2a2a2a;
  --white: #f4f1eb;
  --muted: #aaa9a5;
  --teal: #37c7c7;
  --pink: #ee0a64;
  --red: #ff5b63;
  --yellow: #f7c94b;
  --green: #77d7a2;
  --radius: 18px;
  --display: "Arial Narrow", "Roboto Condensed", "Helvetica Neue Condensed", Impact, sans-serif;
  --body: Inter, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { color-scheme: dark; scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--black);
  color: var(--white);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button, label { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }

.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.survey-page { overflow-x: hidden; }

.ambient { display: none; }

.site-header, .admin-header {
  min-height: 118px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand-lockup { display: flex; align-items: center; gap: 22px; min-width: 0; }
.brand-logo { width: 132px; height: 86px; object-fit: cover; object-position: center; display: block; }
.brand-divider { width: 1px; height: 44px; background: var(--line); flex: none; }
.eyebrow, .section-label {
  display: block;
  font-size: 10px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: .22em;
  color: var(--teal);
}
.product-name { display: block; margin-top: 5px; font: 800 23px/1 var(--display); letter-spacing: .04em; }
.step-counter { color: var(--muted); font: 700 13px/1 var(--body); letter-spacing: .16em; }
.step-counter span:first-child { color: var(--pink); }

.survey-shell { padding: 36px 0 48px; }
.progress-track { height: 2px; background: var(--line); overflow: hidden; }
.progress-track span { display: block; width: 33.333%; height: 100%; background: var(--pink); transition: width .35s ease; }

.form-step { display: none; padding: 54px 0 20px; animation: enter .42s cubic-bezier(.4,0,.2,1); }
.form-step.is-active { display: block; }
@keyframes enter { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

h1, h2 {
  margin: 18px 0 20px;
  max-width: 900px;
  font-family: var(--display);
  font-stretch: condensed;
  font-weight: 900;
  letter-spacing: -.045em;
  text-transform: uppercase;
}
h1 { font-size: clamp(58px, 9vw, 112px); line-height: .84; }
h2 { font-size: clamp(50px, 7vw, 88px); line-height: .86; }
h1 span, h2 span { color: var(--pink); }
.lead { max-width: 650px; margin: 0 0 38px; color: #d0cfca; font-size: clamp(17px, 2vw, 21px); line-height: 1.55; }

.field-grid { display: grid; gap: 18px; }
.identity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 900px; }
.field-wide { grid-column: 1 / -1; }
.field { display: grid; gap: 9px; }
.field > span, .filters label > span { color: #d4d2cd; font-size: 13px; font-weight: 700; }
.field small { color: var(--muted); font-weight: 500; }
.field b { color: var(--pink); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; margin-left: 6px; }
input[type="text"], input[type="password"], input[type="date"], select {
  width: 100%; min-height: 56px; border: 1px solid var(--line); border-radius: 12px; padding: 0 17px;
  background: var(--panel); color: var(--white); outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
}
input::placeholder { color: #6e6e6b; }
input:focus, select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(55,199,199,.12); background: #181818; }
.honeypot { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }

fieldset { border: 0; padding: 0; margin: 34px 0 0; }
legend { margin-bottom: 12px; color: #d4d2cd; font-size: 13px; font-weight: 700; }
.type-options, .contact-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 900px; }
.type-options label, .contact-options label { cursor: pointer; }
.type-options input, .contact-options input, .rating-options input { position: absolute; opacity: 0; pointer-events: none; }
.type-options span, .contact-options span {
  display: flex; align-items: center; min-height: 74px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel); color: #d5d4cf; font-weight: 700; transition: .2s ease;
}
.type-options input:checked + span, .contact-options input:checked + span { border-color: var(--teal); color: var(--white); background: rgba(55,199,199,.1); box-shadow: inset 3px 0 var(--teal); }
.type-options input:focus-visible + span, .contact-options input:focus-visible + span, .rating-options input:focus-visible + span { outline: 3px solid rgba(55,199,199,.35); outline-offset: 2px; }

.question-list { display: grid; gap: 16px; max-width: 1000px; }
.question-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: #141414; }
.question-number { color: var(--teal); font: 800 10px/1 var(--body); letter-spacing: .18em; }
.question-card h3 { margin: 10px 0 18px; max-width: 780px; font-size: clamp(17px, 2vw, 22px); line-height: 1.35; }
.rating-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.rating-options.is-nps { grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 6px; }
.rating-options.is-nps span { min-height: 50px; font-size: 18px; }
.rating-options label { cursor: pointer; }
.rating-options span {
  display: grid; place-items: center; min-height: 57px; border: 1px solid #323232; border-radius: 10px; background: #202020;
  color: var(--muted); font: 900 22px/1 var(--display); transition: .16s ease;
}
.rating-options label:hover span { border-color: #5b5b5b; color: var(--white); transform: translateY(-1px); }
.rating-options input:checked + span { color: var(--black); border-color: var(--teal); background: var(--teal); transform: translateY(-2px); box-shadow: 0 7px 20px rgba(55,199,199,.17); }
.rating-scale { display: flex; justify-content: space-between; margin-top: 8px; color: #777; font-size: 10px; font-weight: 700; letter-spacing: .04em; }

.contact-block, .review-card { max-width: 900px; border-radius: var(--radius); }
.contact-block { padding: 23px; margin: 0 0 18px; border: 1px solid rgba(238,10,100,.45); background: rgba(238,10,100,.08); }
.contact-block p { margin: 0 0 14px; font-weight: 700; line-height: 1.5; }
.review-card { border: 1px solid var(--line); background: var(--panel); padding: 22px; }
.review-head { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.review-head strong { display: block; font-size: 18px; }
.review-head span { color: var(--muted); font-size: 13px; }
.review-scores { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding-top: 17px; }
.review-score { padding: 12px; border-radius: 10px; background: #202020; }
.review-score small { display: block; color: var(--muted); font-size: 10px; }
.review-score strong { display: block; margin-top: 5px; font: 900 25px/1 var(--display); color: var(--teal); }
.consent-line { max-width: 900px; display: flex; gap: 11px; align-items: flex-start; margin: 18px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; cursor: pointer; }
.consent-line input { accent-color: var(--teal); margin-top: 2px; }

.actions { max-width: 900px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 30px; }
.actions-end { justify-content: flex-end; }
.button { min-height: 52px; border: 1px solid transparent; border-radius: 999px; padding: 0 24px; cursor: pointer; font-weight: 800; transition: transform .18s, background .18s, border-color .18s, opacity .18s; }
.button span { margin-left: 12px; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.button.primary { background: var(--pink); color: white; }
.button.primary:hover { background: #ff1975; }
.button.ghost { background: transparent; border-color: var(--line); color: #d3d2ce; }
.button.ghost:hover { border-color: #5d5d5d; }
.button.small { min-height: 40px; padding: 0 17px; font-size: 12px; }
.form-error { min-height: 20px; margin-top: 12px; color: #ff747b; font-size: 13px; font-weight: 700; }

.success-step { min-height: 540px; place-content: center; }
.success-step.is-active { display: grid; }
.success-mark { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 25px; border-radius: 50%; background: var(--teal); color: var(--black); font-size: 30px; font-weight: 900; }
.success-step .lead { margin-bottom: 0; }

.loading-state { min-height: 460px; display: grid; place-items: center; color: var(--muted); font-size: 13px; letter-spacing: .08em; }
.invalid-state { padding: 70px 0; min-height: 540px; }
.project-context { display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 1px; max-width: 900px; margin: 0 0 26px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); }
.project-context > div { min-height: 94px; padding: 19px; background: var(--panel); }
.project-context span { display: block; color: var(--teal); font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.project-context strong { display: block; margin-top: 10px; font-size: 16px; line-height: 1.35; }
.survey-policy { display: flex; flex-wrap: wrap; gap: 8px 18px; max-width: 900px; margin: -10px 0 26px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.survey-policy span:first-child { color: var(--teal); }
.survey-policy strong { color: var(--white); }
.optional-name { max-width: 430px; }

.site-footer { min-height: 68px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); color: #676764; font-size: 9px; font-weight: 800; letter-spacing: .13em; }

/* Admin */
.auth-gate { min-height: 100vh; display: grid; place-items: center; padding: 30px 20px; background: var(--black); }
.auth-card { width: min(440px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: 22px; background: #111; }
.auth-card .brand-logo { margin: -12px 0 14px; }
.auth-card h1 { font-size: 58px; margin: 13px 0 28px; }
.auth-card .button { width: 100%; margin-top: 8px; }
.dashboard { min-height: 100vh; }
.brand-lockup.compact .brand-logo { width: 110px; height: 72px; }
.admin-actions { display: flex; align-items: center; gap: 10px; }
.icon-button { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; font-size: 23px; }
.admin-main { padding-block: 48px 70px; }
.dashboard-title { display: flex; justify-content: space-between; align-items: end; gap: 30px; }
.dashboard-title h1 { margin-bottom: 0; font-size: clamp(54px, 7vw, 92px); }
.dashboard-title p { max-width: 330px; margin: 0 0 8px; color: var(--muted); line-height: 1.55; }

.filters { display: grid; grid-template-columns: 1.1fr 1.1fr 1fr 1fr .8fr .8fr auto auto; gap: 10px; align-items: end; margin: 40px 0 24px; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: #111; }
.filters label { display: grid; gap: 6px; }
.filters input, .filters select { min-height: 40px; padding-inline: 12px; font-size: 12px; }

.metric-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.metric-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric-grid + .metric-grid { margin-top: 12px; }
.code-input { text-align: center; font-size: 26px; font-weight: 800; letter-spacing: .5em; }
.metric-card { min-height: 150px; padding: 21px; border: 1px solid var(--line); border-radius: 16px; background: #141414; }
.metric-card.accent { border-color: rgba(55,199,199,.7); }
.metric-card.danger { border-color: rgba(238,10,100,.55); }
.metric-label { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.metric-value { display: block; margin-top: 22px; font: 900 clamp(34px, 4vw, 52px)/1 var(--display); }
.metric-note { display: block; margin-top: 8px; color: #797976; font-size: 10px; }

.dashboard-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 14px; margin-top: 14px; }
.panel { border: 1px solid var(--line); border-radius: 17px; padding: 21px; background: #111; overflow: hidden; }
.panel h2 { margin: 5px 0 0; font: 800 23px/1.1 var(--body); letter-spacing: -.02em; text-transform: none; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.panel-wide { min-height: 310px; }
.section-label.danger { color: var(--pink); }
.status-chart { display: grid; grid-template-columns: 160px 1fr; align-items: center; gap: 28px; min-height: 210px; }
.donut { --positive: 0; --attention: 0; width: 150px; aspect-ratio: 1; border-radius: 50%; background: conic-gradient(var(--green) 0 calc(var(--positive) * 1%), var(--yellow) calc(var(--positive) * 1%) calc((var(--positive) + var(--attention)) * 1%), var(--pink) calc((var(--positive) + var(--attention)) * 1%) 100%); display: grid; place-items: center; }
.donut::after { content: attr(data-total); width: 96px; aspect-ratio: 1; border-radius: 50%; background: #111; display: grid; place-items: center; font: 900 32px/1 var(--display); }
.chart-legend { display: grid; gap: 13px; }
.legend-row { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; color: var(--muted); font-size: 12px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.legend-row strong { color: var(--white); }
.trend-chart { min-height: 210px; display: flex; gap: 8px; align-items: flex-end; padding-top: 20px; border-bottom: 1px solid var(--line); }
.trend-bar { flex: 1; min-width: 8px; max-width: 42px; height: calc(var(--value) * 1%); min-height: 3px; border-radius: 5px 5px 0 0; background: var(--teal); position: relative; }
.trend-bar:hover::after { content: attr(data-label); position: absolute; left: 50%; bottom: calc(100% + 7px); transform: translateX(-50%); white-space: nowrap; padding: 5px 7px; border-radius: 5px; background: #272727; font-size: 9px; }
.empty-state { color: #737370; font-size: 13px; padding: 32px 0; }

.alert-panel { margin-top: 14px; }
.count-pill { display: grid; place-items: center; min-width: 35px; height: 28px; padding: 0 10px; border-radius: 999px; background: rgba(238,10,100,.13); color: #ff5d91; font-size: 12px; font-weight: 900; }
.alerts-list { display: grid; gap: 9px; }
.alert-row { display: grid; grid-template-columns: 1fr auto; gap: 20px; padding: 14px 15px; border-left: 3px solid var(--pink); border-radius: 6px 11px 11px 6px; background: #191919; }
.alert-row strong { display: block; font-size: 13px; }
.alert-row span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.alert-scores { display: flex; gap: 5px; align-items: center; }
.score-chip, .status-chip { display: inline-grid; place-items: center; min-width: 27px; height: 27px; padding: 0 7px; border-radius: 7px; background: #282828; font-size: 11px; font-weight: 800; }
.score-chip.low { background: rgba(238,10,100,.14); color: #ff5d91; }

.tables-grid { grid-template-columns: 1fr 1.2fr; }
.table-wrap { overflow: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th { padding: 0 10px 11px; color: #71716e; text-align: left; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
td { padding: 12px 10px; border-top: 1px solid #242424; color: #c8c7c2; vertical-align: top; }
td strong { display: block; color: var(--white); }
td small { display: block; margin-top: 3px; color: #777774; }
.muted { color: #777774; font-size: 10px; }
.status-chip.critical { color: #ff628f; background: rgba(238,10,100,.13); }
.status-chip.attention { color: var(--yellow); background: rgba(247,201,75,.1); }
.status-chip.positive { color: var(--green); background: rgba(119,215,162,.1); }

/* Configurador */
.config-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(340px, .75fr); gap: 14px; margin-top: 40px; align-items: start; }
.config-form .field-grid { grid-template-columns: 1fr 1fr; }
.config-form .field:nth-child(2), .config-form .field:nth-child(3) { grid-column: 1 / -1; }
.cadence-preview { display: grid; gap: 5px; margin-top: 18px; padding: 15px; border-left: 3px solid var(--teal); background: rgba(55,199,199,.07); }
.cadence-preview strong { color: var(--teal); font-size: 11px; text-transform: uppercase; letter-spacing: .09em; }
.cadence-preview span, .cadence-text { color: var(--muted); font-size: 12px; line-height: 1.5; }
.generated-card { position: sticky; top: 20px; min-height: 340px; }
.generated-card h2 { margin: 15px 0; font: 900 38px/.95 var(--display); text-transform: uppercase; }
.generated-meta { margin: 24px 0 18px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.generated-meta strong, .generated-meta span, .generated-meta small { display: block; }
.generated-meta strong { font-size: 20px; }
.generated-meta span { margin-top: 5px; color: #d0cfca; }
.generated-meta small { margin-top: 9px; color: var(--teal); text-transform: uppercase; letter-spacing: .08em; }
.survey-list-panel { margin-top: 14px; }
.system-warning { display: grid; gap: 4px; margin-top: 28px; padding: 16px 18px; border: 1px solid rgba(247,201,75,.4); border-radius: 13px; background: rgba(247,201,75,.06); }
.system-warning strong { color: var(--yellow); font-size: 13px; }
.system-warning span { color: var(--muted); font-size: 11px; line-height: 1.45; }
.link-button { border: 0; padding: 0; background: transparent; color: var(--teal); font-weight: 800; cursor: pointer; }
.button[href] { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

/* Modal "Ver resposta" */
.modal-overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(8,8,8,.72); backdrop-filter: blur(3px); }
.modal-overlay[hidden] { display: none; }
.modal-card { width: min(560px, 100%); max-height: 86vh; overflow: auto; padding: 26px; border: 1px solid var(--line); border-radius: 20px; background: #131313; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 6px 0 0; font: 900 26px/1.05 var(--display); text-transform: uppercase; }
.modal-close { border: 0; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.modal-close:hover { color: var(--white); }
.modal-meta { color: var(--muted); font-size: 12px; }
.modal-scores { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 18px 0; }
.modal-score { padding: 13px; border-radius: 12px; background: #1c1c1c; }
.modal-score span { display: block; color: var(--muted); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.modal-score strong { display: block; margin-top: 6px; font: 900 24px/1 var(--display); color: var(--teal); }
.modal-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid #242424; font-size: 13px; }
.modal-row span:first-child { color: var(--muted); }
.modal-row span:last-child { color: var(--white); font-weight: 700; text-align: right; }

@media (max-width: 980px) {
  .filters { grid-template-columns: repeat(3, 1fr); }
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .metric-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid, .tables-grid { grid-template-columns: 1fr; }
  .config-grid { grid-template-columns: 1fr; }
  .generated-card { position: static; }
}

@media (max-width: 700px) {
  .shell { width: min(100% - 28px, 620px); }
  .site-header, .admin-header { min-height: 94px; }
  .brand-lockup { gap: 13px; }
  .brand-logo, .brand-lockup.compact .brand-logo { width: 86px; height: 58px; }
  .brand-divider { height: 34px; }
  .eyebrow { font-size: 8px; letter-spacing: .13em; }
  .product-name { font-size: 17px; }
  .survey-shell { padding-top: 24px; }
  .form-step { padding-top: 39px; }
  h1 { font-size: clamp(54px, 17vw, 82px); }
  h2 { font-size: clamp(48px, 15vw, 74px); }
  .lead { margin-bottom: 28px; font-size: 16px; }
  .identity-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .type-options, .contact-options { grid-template-columns: 1fr; }
  .type-options span, .contact-options span { min-height: 57px; }
  .question-card { padding: 19px 15px; }
  .rating-options { gap: 6px; }
  .rating-options span { min-height: 52px; }
  .rating-options.is-nps { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .project-context { grid-template-columns: 1fr; }
  .project-context > div { min-height: auto; }
  .review-head { display: block; }
  .review-head span { display: block; margin-top: 5px; }
  .review-scores { grid-template-columns: repeat(2, 1fr); }
  .actions .button { padding-inline: 18px; }
  .site-footer { display: grid; justify-content: start; align-content: center; gap: 5px; }

  .admin-header { position: sticky; top: 0; z-index: 10; background: rgba(8,8,8,.94); backdrop-filter: blur(12px); }
  .admin-header .brand-divider, .admin-header .eyebrow { display: none; }
  .admin-actions .button { display: none; }
  .admin-main { padding-top: 34px; }
  .dashboard-title { display: block; }
  .dashboard-title p { margin-top: 18px; }
  .filters { grid-template-columns: 1fr 1fr; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric-grid.cols-4 { grid-template-columns: 1fr 1fr; }
  .metric-card { min-height: 130px; }
  .status-chart { grid-template-columns: 120px 1fr; gap: 18px; }
  .donut { width: 118px; }
  .donut::after { width: 74px; font-size: 26px; }
  .alert-row { grid-template-columns: 1fr; }
  .panel { padding: 17px 14px; }
  .config-form .field-grid { grid-template-columns: 1fr; }
  .config-form .field:nth-child(2), .config-form .field:nth-child(3) { grid-column: auto; }
}

@media (max-width: 430px) {
  .step-counter { font-size: 10px; }
  .brand-logo { width: 74px; height: 52px; }
  .metric-grid, .metric-grid.cols-4 { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr; }
  .status-chart { grid-template-columns: 1fr; }
  .actions { align-items: stretch; }
  .actions .button { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

