/* =========================================================
   KNN PARÁISÓPOLIS — DESIGN SYSTEM
   Vermelho KNN + branco + preto/cinza
   Mantém as classes existentes do projeto
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&display=swap');

:root {
    /* KNN */
    --knn-red: #ed1b2f;
    --knn-red-dark: #c9001d;
    --knn-red-deep: #a90018;
    --knn-red-light: #fff0f2;

    /* Neutros */
    --black: #111111;
    --text: #171717;
    --text-soft: #5f5f5f;
    --muted: #858585;

    --white: #ffffff;
    --background: #f7f7f7;
    --surface: #ffffff;
    --border: #e7e7e7;
    --border-dark: #d5d5d5;

    /* Estados */
    --green: #159447;
    --green-light: #eaf8ef;
    --yellow: #f0a800;
    --yellow-light: #fff7df;

    /* Compatibilidade com CSS antigo */
    --blue: var(--knn-red);
    --blue-dark: var(--knn-red-dark);
    --blue-light: var(--knn-red-light);

    --red: var(--knn-red);
    --red-dark: var(--knn-red-dark);

    --pink: #ff3150;
    --pink-light: #fff0f2;

    /* Layout */
    --max-width: 1180px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;

    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.08);
}


/* =========================================================
   RESET
   ========================================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;

    font-family: "DM Sans", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;

    color: var(--text);
    background: var(--background);

    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

img {
    display: block;
    max-width: 100%;
}


/* =========================================================
   TOPBAR
   ========================================================= */

.topbar {
    position: sticky;
    top: 0;
    z-index: 1000;

    width: 100%;
    height: 72px;

    background: var(--knn-red);
    color: var(--white);

    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.topbar>* {
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
}

.topbar {
    padding-left: 24px;
    padding-right: 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}


/* =========================================================
   BRAND
   ========================================================= */

.brand {
    display: flex;
    align-items: center;
    gap: 12px;

    flex-shrink: 0;

    color: var(--white);
}

.brand-knn {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1;
}

.brand-secret {
    padding-left: 12px;

    border-left: 1px solid rgba(255, 255, 255, 0.45);

    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
}


/* =========================================================
   ADMIN NAV
   ========================================================= */

.admin-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 6px;

    min-width: 0;
}

.admin-nav a {
    display: flex;
    align-items: center;

    min-height: 40px;
    padding: 8px 13px;

    border-radius: 999px;

    color: rgba(255, 255, 255, 0.92);

    font-size: 14px;
    font-weight: 600;

    white-space: nowrap;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: rgba(255, 255, 255, 0.18);
    color: var(--white);
}


/* =========================================================
   MAIN CONTAINER
   ========================================================= */

.main-container {
    width: min(calc(100% - 48px), var(--max-width));

    margin: 0 auto;
    padding: 48px 0 64px;
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
    position: relative;
    overflow: hidden;

    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
    align-items: center;

    min-height: 390px;

    padding: 64px;

    border-radius: var(--radius-lg);

    color: var(--white);

    background:
        linear-gradient(120deg,
            var(--knn-red-deep) 0%,
            var(--knn-red) 55%,
            #ff3048 100%);

    box-shadow: var(--shadow-md);
}

.hero::after {
    content: "";

    position: absolute;
    right: -100px;
    bottom: -150px;

    width: 420px;
    height: 420px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.07);

    pointer-events: none;
}

.hero>* {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;

    width: fit-content;

    margin-bottom: 20px;
    padding: 7px 13px;

    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.1);

    font-size: 13px;
    font-weight: 700;
}

.hero h1 {
    max-width: 680px;

    margin-bottom: 18px;

    font-size: clamp(42px, 5vw, 72px);
    line-height: 0.98;
    letter-spacing: -3px;
    font-weight: 800;
}

.hero-text {
    max-width: 600px;

    color: rgba(255, 255, 255, 0.9);

    font-size: 18px;
    line-height: 1.6;
}


/* =========================================================
   SECRET CARD
   ========================================================= */

.secret-card {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 360px;

    margin-left: auto;
    padding: 30px;

    border-radius: var(--radius-lg);

    background: var(--white);
    color: var(--black);

    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
}

.secret-card h2 {
    margin-bottom: 8px;

    font-size: 24px;
    line-height: 1.15;
    font-weight: 800;
}

.secret-card p {
    color: var(--text-soft);
}


/* =========================================================
   DISCOVERY PAGE
   ========================================================= */

.discovery-page {
    width: min(100%, 760px);

    margin: 0 auto;
    padding: 30px 0 60px;

    text-align: center;
}

.discovery-symbol {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 76px;
    height: 76px;

    margin: 0 auto 24px;

    border-radius: 50%;

    background: var(--knn-red);
    color: var(--white);

    font-size: 28px;
    font-weight: 800;

    box-shadow: 0 12px 30px rgba(237, 27, 47, 0.25);
}

.secret-phrase {
    margin-bottom: 20px;

    color: var(--knn-red);

    font-size: clamp(38px, 7vw, 72px);
    line-height: 1;
    letter-spacing: -3px;
    font-weight: 800;
}

.discovery-page>p {
    max-width: 620px;

    margin: 0 auto 34px;

    color: var(--text-soft);
    font-size: 17px;
}


/* =========================================================
   QUESTION
   ========================================================= */

.question {
    width: 100%;

    margin: 32px 0;
    padding: 28px;

    border: 1px solid var(--border);
    border-radius: var(--radius-lg);

    background: var(--white);

    box-shadow: var(--shadow-sm);
}

.question h2 {
    margin-bottom: 22px;

    font-size: 24px;
    line-height: 1.2;
}


/* =========================================================
   ANSWERS
   ========================================================= */

.answer-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 12px;

    width: 100%;
}

.answer {
    width: 100%;
    min-height: 54px;

    padding: 14px 20px;

    border: 2px solid var(--border);
    border-radius: 999px;

    background: var(--white);
    color: var(--text);

    font-weight: 700;
    text-align: center;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.answer:hover {
    border-color: var(--knn-red);
    color: var(--knn-red);

    transform: translateY(-1px);
}

.answer.correct {
    border-color: var(--green);
    background: var(--green-light);
    color: var(--green);
}

.answer.incorrect {
    border-color: var(--knn-red);
    background: var(--red-light);
    color: var(--knn-red);
}


/* =========================================================
   TRANSLATION CARD
   ========================================================= */

.translation-card {
    width: 100%;

    margin-top: 28px;
    padding: 26px;

    border-left: 5px solid var(--knn-red);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;

    background: var(--knn-red-light);

    text-align: left;
}

.translation-card strong {
    display: block;

    margin-bottom: 7px;

    color: var(--knn-red);

    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.translation-card p {
    color: var(--text);
    font-size: 17px;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 48px;

    padding: 12px 22px;

    border: 0;
    border-radius: 999px;

    font-size: 15px;
    font-weight: 700;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--knn-red);
    color: var(--white);

    box-shadow: 0 7px 18px rgba(237, 27, 47, 0.2);
}

.btn-primary:hover {
    background: var(--knn-red-dark);
}

.btn-secondary {
    border: 1px solid var(--border);

    background: var(--white);
    color: var(--text);
}

.btn-secondary:hover {
    border-color: var(--border-dark);
    background: #fafafa;
}

.btn-danger {
    background: var(--knn-red-dark);
    color: var(--white);
}


/* =========================================================
   FORM PAGE
   ========================================================= */

.form-page {
    width: min(100%, 720px);

    margin: 0 auto;
    padding: 30px 0 60px;
}

.form-header {
    margin-bottom: 28px;
}

.form-header h1 {
    margin-bottom: 8px;

    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.05;
    letter-spacing: -2px;
    font-weight: 800;
}

.form-header p {
    color: var(--text-soft);
}


.form-card {
    width: 100%;

    padding: 32px;

    border: 1px solid var(--border);
    border-radius: var(--radius-lg);

    background: var(--white);

    box-shadow: var(--shadow-sm);
}


/* =========================================================
   INPUTS
   ========================================================= */

.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;

    margin-bottom: 7px;

    color: var(--text);

    font-size: 14px;
    font-weight: 700;
}

.form-group input,
.form-group select,
.form-group textarea,
.form-card input,
.form-card select,
.form-card textarea {
    width: 100%;

    min-height: 48px;

    padding: 12px 14px;

    border: 1px solid var(--border-dark);
    border-radius: 10px;

    outline: none;

    background: var(--white);
    color: var(--text);

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.form-group textarea,
.form-card textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus {
    border-color: var(--knn-red);

    box-shadow: 0 0 0 3px rgba(237, 27, 47, 0.1);
}


/* =========================================================
   LOGIN
   ========================================================= */

.login-page {
    min-height: calc(100vh - 72px);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 40px 20px;
}

.login-card {
    width: min(100%, 430px);

    padding: 40px;

    border: 1px solid var(--border);
    border-radius: var(--radius-lg);

    background: var(--white);

    box-shadow: var(--shadow-md);
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 72px;
    height: 72px;

    margin: 0 auto 22px;

    border-radius: 50%;

    background: var(--knn-red);
    color: var(--white);

    font-size: 25px;
    font-weight: 800;
}

.login-card h1 {
    margin-bottom: 8px;

    text-align: center;

    font-size: 30px;
    font-weight: 800;
}

.login-card>p {
    margin-bottom: 28px;

    color: var(--text-soft);
    text-align: center;
}


/* =========================================================
   LOGIN — CORREÇÃO DE ALINHAMENTO
   ========================================================= */

.login-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.login-card form {
    width: 100%;
}

.login-card .form-group {
    width: 100%;
}

.login-card .form-group label {
    display: block;
    width: 100%;
    text-align: left;
}

.login-card .form-group input,
.login-card .form-group select,
.login-card .form-group textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.login-card .btn,
.login-card button {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}


/* =========================================================
   SUCCESS PAGE
   ========================================================= */

.success-page {
    width: min(100%, 700px);

    margin: 0 auto;
    padding: 70px 20px;

    text-align: center;
}

.success-page .success-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 82px;
    height: 82px;

    margin: 0 auto 24px;

    border-radius: 50%;

    background: var(--green-light);
    color: var(--green);

    font-size: 36px;
}

.success-page h1 {
    margin-bottom: 12px;

    font-size: clamp(34px, 6vw, 52px);
    line-height: 1;
    letter-spacing: -2px;
}

.success-page p {
    color: var(--text-soft);
}


/* =========================================================
   PROGRESS
   ========================================================= */

.progress-card {
    width: 100%;

    margin-bottom: 24px;
    padding: 24px;

    border: 1px solid var(--border);
    border-radius: var(--radius-md);

    background: var(--white);
}

.progress-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;

    margin-bottom: 12px;
}

.progress-bar {
    width: 100%;
    height: 9px;

    overflow: hidden;

    border-radius: 999px;

    background: #ededed;
}

.progress-bar-fill {
    height: 100%;

    border-radius: inherit;

    background: var(--knn-red);

    transition: width 0.3s ease;
}


/* =========================================================
   PASS CARD
   ========================================================= */

.pass-card {
    width: 100%;

    margin-bottom: 24px;
    padding: 32px;

    border-radius: var(--radius-lg);

    background:
        linear-gradient(135deg,
            var(--knn-red-deep),
            var(--knn-red));

    color: var(--white);

    box-shadow: var(--shadow-md);
}

.pass-card h2 {
    margin-bottom: 8px;

    font-size: 30px;
    font-weight: 800;
}

.pass-card p {
    color: rgba(255, 255, 255, 0.88);
}


/* =========================================================
   NEXT CARD
   ========================================================= */

.next-card {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    width: 100%;

    padding: 24px;

    border: 1px solid var(--border);
    border-radius: var(--radius-md);

    background: var(--white);
}


/* =========================================================
   ADMIN HEADER
   ========================================================= */

.admin-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 24px;

    margin-bottom: 32px;
}

.admin-header h1 {
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1;
    letter-spacing: -2px;
    font-weight: 800;
}

.admin-header p {
    margin-top: 8px;

    color: var(--text-soft);
}


/* =========================================================
   STATS
   ========================================================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 16px;

    margin-bottom: 32px;
}

.stat-card {
    min-width: 0;

    padding: 24px;

    border: 1px solid var(--border);
    border-radius: var(--radius-md);

    background: var(--white);

    box-shadow: var(--shadow-sm);
}

.stat-card .stat-label {
    display: block;

    margin-bottom: 8px;

    color: var(--text-soft);

    font-size: 13px;
    font-weight: 600;
}

.stat-card .stat-value {
    color: var(--text);

    font-size: 32px;
    line-height: 1;
    font-weight: 800;
}

.stat-card.primary {
    border-color: rgba(237, 27, 47, 0.18);
    background: var(--knn-red-light);
}

.stat-card.primary .stat-value {
    color: var(--knn-red);
}


/* =========================================================
   ADMIN SECTION
   ========================================================= */

.admin-section {
    width: 100%;

    margin-bottom: 32px;

    border: 1px solid var(--border);
    border-radius: var(--radius-lg);

    background: var(--white);

    box-shadow: var(--shadow-sm);

    overflow: hidden;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 22px 24px;

    border-bottom: 1px solid var(--border);
}

.section-header h2 {
    font-size: 21px;
    font-weight: 800;
}

.section-header p {
    margin-top: 3px;

    color: var(--text-soft);
    font-size: 14px;
}


/* =========================================================
   CAMPAIGN HIGHLIGHT
   ========================================================= */

.campaign-highlight {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;

    align-items: center;
    gap: 24px;

    margin-bottom: 32px;
    padding: 28px;

    border-radius: var(--radius-lg);

    background: var(--knn-red);
    color: var(--white);
}

.campaign-highlight h2 {
    margin-bottom: 5px;

    font-size: 27px;
    font-weight: 800;
}

.campaign-highlight p {
    color: rgba(255, 255, 255, 0.88);
}


/* =========================================================
   TABLE
   ========================================================= */

.table-container {
    width: 100%;

    overflow-x: auto;
}

table {
    width: 100%;

    border-collapse: collapse;

    text-align: left;
}

table th {
    padding: 14px 18px;

    border-bottom: 1px solid var(--border);

    background: #fafafa;

    color: var(--text-soft);

    font-size: 12px;
    font-weight: 800;

    text-transform: uppercase;
    letter-spacing: 0.5px;

    white-space: nowrap;
}

table td {
    padding: 16px 18px;

    border-bottom: 1px solid var(--border);

    color: var(--text);

    vertical-align: middle;
}

table tr:last-child td {
    border-bottom: 0;
}

table tbody tr {
    transition: background 0.15s ease;
}

table tbody tr:hover {
    background: #fcfcfc;
}


/* =========================================================
   STATUS
   ========================================================= */

.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 28px;

    padding: 4px 10px;

    border-radius: 999px;

    font-size: 12px;
    font-weight: 700;
}

.status.active,
.status.success {
    background: var(--green-light);
    color: var(--green);
}

.status.pending {
    background: var(--yellow-light);
    color: #966700;
}

.status.inactive,
.status.error {
    background: var(--knn-red-light);
    color: var(--knn-red-dark);
}


/* =========================================================
   TABLE LINKS / BUTTONS
   ========================================================= */

.table-link {
    color: var(--knn-red);

    font-weight: 700;
}

.table-link:hover {
    text-decoration: underline;
}

.table-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 34px;

    padding: 6px 12px;

    border: 1px solid var(--border);
    border-radius: 8px;

    background: var(--white);
    color: var(--text);

    font-weight: 700;

    cursor: pointer;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}

.table-button:hover {
    border-color: var(--knn-red);
    background: var(--knn-red-light);
    color: var(--knn-red);
}

/* =========================================================
   EXPERIÊNCIA PÚBLICA — QR CODE / CAPTAÇÃO
   ========================================================= */

.discovery-page {
    padding-top: 12px;
}

.discovery-symbol {
    position: relative;
    width: 92px;
    height: 92px;
    border: 7px solid var(--white);
    background: var(--knn-red);
    box-shadow: 0 0 0 7px rgba(237, 27, 47, 0.12), 0 16px 34px rgba(237, 27, 47, 0.24);
    font-family: Georgia, serif;
    font-size: 52px;
    animation: float 2.8s ease-in-out infinite;
}

.small-label {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--knn-red);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.challenge-intro {
    max-width: 590px;
    margin: 0 auto 24px;
    color: var(--text-soft);
    font-size: 17px;
}

.challenge-card {
    margin: 0 auto 18px;
    padding: 25px;
    border: 1px solid rgba(237, 27, 47, 0.18);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: 0 14px 36px rgba(17, 17, 17, 0.08);
    text-align: left;
}

.challenge-card label {
    display: block;
    margin-bottom: 12px;
    color: var(--text);
    font-size: 18px;
    font-weight: 800;
}

.challenge-input-row {
    display: flex;
    gap: 10px;
}

.challenge-input-row input {
    flex: 1;
    min-width: 0;
    min-height: 52px;
    padding: 12px 15px;
    border: 1px solid var(--border-dark);
    border-radius: 11px;
    outline: 0;
}

.challenge-input-row input:focus {
    border-color: var(--knn-red);
    box-shadow: 0 0 0 3px rgba(237, 27, 47, 0.12);
}

.challenge-input-row .btn { min-height: 52px; }

.challenge-feedback {
    min-height: 24px;
    margin: 12px 0 0;
    color: var(--text-soft);
    font-size: 14px;
}

.challenge-feedback.is-error { color: var(--knn-red-dark); }
.challenge-feedback.is-success { color: var(--green); font-weight: 700; }

.reward-teaser {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 19px 22px;
    border-radius: var(--radius-md);
    background: #171717;
    color: var(--white);
    text-align: left;
}

.reward-icon {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: var(--knn-red);
    font-size: 22px;
}

.reward-teaser strong { display: block; margin-bottom: 2px; }
.reward-teaser p { color: rgba(255, 255, 255, 0.72); font-size: 14px; }
.form-note { margin-top: 15px; color: var(--text-soft); font-size: 13px; text-align: center; }
.progress-card { margin-top: 28px; text-align: left; }
.progress-card > strong { display: block; margin: 5px 0 12px; font-size: 19px; }
.progress-card .progress { height: 100%; border-radius: inherit; background: var(--knn-red); transition: width .8s ease; }
.phrase-result { margin: 14px auto; color: var(--knn-red); font-size: 24px; font-weight: 800; }

@keyframes float { 50% { transform: translateY(-6px) rotate(3deg); } }

@media (max-width: 640px) {
    .topbar { height: 62px; padding: 0 18px; }
    .brand-knn { font-size: 28px; }
    .brand-secret { font-size: 10px; padding-left: 9px; }
    .main-container { width: min(calc(100% - 32px), var(--max-width)); padding: 28px 0 42px; }
    .discovery-page { padding: 8px 0 30px; }
    .secret-phrase { font-size: clamp(38px, 14vw, 58px); }
    .challenge-card { padding: 20px; }
    .challenge-input-row { display: block; }
    .challenge-input-row input { width: 100%; margin-bottom: 10px; }
    .challenge-input-row .btn { width: 100%; }
    .reward-teaser { align-items: flex-start; }
    .form-card { padding: 22px; }
}

/* Ocultar rótulos e labels residuais do sistema */
.small-label,
.admin-kicker,
.eyebrow {
    display: none !important;
}
