:root {
    --navy: #1f3a54;
    --navy-deep: #14263a;
    --navy-soft: #2c4d6c;
    --gold: #ad8751;
    --gold-light: #f7eee0;
    --white: #ffffff;
    --ink: #14263a;
    --text-muted: rgba(255, 255, 255, 0.66);
    --error: #ff8a80;
    --na: rgba(255, 255, 255, 0.5);

    /* escala de satisfação */
    --nivel-4: #2fbf78;
    --nivel-3: #8bd450;
    --nivel-2: #f5a623;
    --nivel-1: #ef5350;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--navy-deep);
    color: var(--white);
    overscroll-behavior-y: none;
    overflow: hidden;
}

.app {
    max-width: 480px;
    margin: 0 auto;
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Topo */
.topo {
    padding: 18px 22px 14px;
    flex-shrink: 0;
}
.topo-conteudo {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}
.topo img { width: 80%; max-width: 340px; height: auto; display: block; }
.topo img.logo-fallback-branco { filter: brightness(0) invert(1); }

.topo-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 9px;
}
.topo-status .rotulo {
    font-size: 12.5px;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}
.topo-status .contagem {
    font-size: 17px;
    color: var(--white);
    font-weight: 800;
}

.barra-progresso {
    height: 10px;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    overflow: hidden;
}
.barra-progresso-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), #d9b378);
    border-radius: 20px;
    transition: width .45s cubic-bezier(.4,0,.2,1);
}

/* Slides */
.slides-container {
    flex: 1;
    min-height: 0;
    position: relative;
    overflow: hidden;
}
.slides-track {
    display: flex;
    height: 100%;
    transition: transform .42s cubic-bezier(.4,0,.2,1);
}
.slide {
    min-width: 100%;
    padding: 22px 22px 24px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.slide-eyebrow {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin: 0 0 8px;
}
.slide h2 {
    font-size: 26px;
    margin: 0 0 18px;
    color: var(--white);
    line-height: 1.25;
    letter-spacing: -0.2px;
}
.slide h2:has(+ .sub) { margin-bottom: 8px; }
.slide .sub { color: var(--text-muted); font-size: 15.5px; margin: 0 0 22px; line-height: 1.5; }

/* Tela inicial — texto maior e centralizado */
.slide-intro {
    justify-content: center;
    align-items: center;
    text-align: center;
    flex: 1;
}
.slide-intro h2 {
    font-size: 34px;
    line-height: 1.2;
    margin-bottom: 16px;
}
.slide-intro .sub {
    font-size: 18px;
    line-height: 1.5;
    max-width: 380px;
}

/* Escala Likert — botões grandes e coloridos */
.escala {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.escala label {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 16px 18px;
    border: none;
    border-radius: 0;
    font-size: 17.5px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .12s, box-shadow .15s, opacity .15s;
    color: var(--ink);
}
.escala label:active { transform: scale(0.98); }
.escala label[data-valor="4"] { background: var(--nivel-4); }
.escala label[data-valor="3"] { background: var(--nivel-3); }
.escala label[data-valor="2"] { background: var(--nivel-2); }
.escala label[data-valor="1"] { background: var(--nivel-1); color: var(--white); }

.escala .bolinha {
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 2.5px solid rgba(0,0,0,0.22);
    flex-shrink: 0;
    transition: all .15s;
    background: rgba(255,255,255,0.35);
}
.escala label[data-valor="1"] .bolinha { border-color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.18); }

.escala label.sel {
    box-shadow: 0 0 0 3px rgba(255,255,255,0.85);
    opacity: 1;
}
.escala:has(label.sel) label:not(.sel) { opacity: 0.4; }
.escala label.sel .bolinha {
    background: var(--white);
    border-color: transparent;
}
.escala label.sel .bolinha::after {
    content: "";
    display: block;
    width: 10px; height: 10px;
    margin: 4px;
    border-radius: 50%;
    background: var(--ink);
}
.escala label[data-valor="1"].sel .bolinha::after { background: var(--nivel-1); }

.escala label.na {
    justify-content: center;
    background: transparent;
    border: 1.5px dashed rgba(255,255,255,0.35);
    color: var(--text-muted);
    font-weight: 600;
    box-shadow: none;
}
.escala label.na .bolinha { background: transparent; border-color: rgba(255,255,255,0.4); }
.escala label.na.sel {
    border-color: var(--white);
    color: var(--white);
    box-shadow: 0 0 0 2px rgba(255,255,255,0.5);
}
.escala label.na.sel .bolinha { background: var(--white); }
.escala label.na.sel .bolinha::after { background: var(--navy); }

/* Opções (como conheceu) */
.opcoes { display: flex; flex-direction: column; gap: 10px; }
.opcoes label {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 17px 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.14);
    border-radius: 0;
    font-size: 16.5px;
    font-weight: 600;
    color: var(--white);
    cursor: pointer;
    transition: background .15s, border-color .15s, transform .1s;
}
.opcoes label:active { transform: scale(0.98); }
.opcoes .bolinha {
    width: 20px; height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.4);
    flex-shrink: 0;
}
.opcoes label.sel {
    border-color: var(--gold);
    background: rgba(173, 135, 81, 0.28);
}
.opcoes label.sel .bolinha {
    border-color: var(--gold);
    background: var(--gold);
    box-shadow: inset 0 0 0 3px rgba(255,255,255,0.9);
}

.campo-extra {
    margin-top: 8px;
    margin-left: 2px;
    display: none;
}
.campo-extra.show { display: block; animation: expandeCampo .25s ease; }
@keyframes expandeCampo {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

textarea, input[type=text], input[type=tel], input[type=password] {
    width: 100%;
    padding: 15px 16px;
    border: 1.5px solid rgba(255,255,255,0.18);
    border-radius: 14px;
    font-size: 16.5px;
    font-family: inherit;
    resize: vertical;
    background: rgba(255,255,255,0.08);
    color: var(--white);
}
textarea::placeholder, input::placeholder { color: rgba(255,255,255,0.45); }
textarea { min-height: 130px; }
textarea:focus, input:focus { outline: none; border-color: var(--gold); background: rgba(255,255,255,0.12); }

.campo-label {
    font-weight: 700;
    font-size: 15px;
    margin: 0 0 8px 2px;
    color: var(--white);
}
.campo-bloco { margin-bottom: 20px; }

.opcional-tag {
    font-size: 12.5px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Navegação — sempre fixa e visível no rodapé */
.nav {
    flex-shrink: 0;
    padding: 14px 22px calc(20px + env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 30px;
    background: var(--navy-deep);
}
.nav-voltar {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 4px;
    display: none;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.btn {
    flex: 1;
    padding: 18px;
    border-radius: 0;
    border: none;
    font-size: 17.5px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .1s, opacity .15s;
    background: var(--gold);
    color: var(--white);
    letter-spacing: 0.2px;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
.nav.oculta-avancar .btn { display: none; }

.aviso-erro {
    color: var(--error);
    font-size: 14px;
    margin-top: 10px;
    display: none;
}
.aviso-erro.show { display: block; }

/* Tela final */
.tela-final {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 30px;
}
.tela-final .icone {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: var(--nivel-4);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 22px;
}
.tela-final h2 { color: var(--white); margin: 0 0 8px; font-size: 25px; }
.tela-final p { color: var(--text-muted); font-size: 16px; margin: 0; line-height: 1.5; }

@media (max-width: 480px) {
    .app { box-shadow: none; }
}
