:root {
    --survey-primary: #a4133c;
    --survey-primary-dark: #800f2f;
    --survey-primary-soft: #ffd6e0;
    --survey-accent: #ff4d6d;
    --survey-bg-1: #fff0f3;
    --survey-bg-2: #ffe0e6;
    --survey-ink: #3a0d1a;
}

body.survey-bg {
    background: linear-gradient(135deg, var(--survey-bg-1) 0%, var(--survey-bg-2) 100%);
    min-height: 100vh;
    color: var(--survey-ink);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.survey-card {
    border-radius: 20px;
    overflow: hidden;
    background: #ffffff;
}

.brand-mark {
    display: inline-block;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--survey-primary);
    background: var(--survey-primary-soft);
    padding: .35rem .75rem;
    border-radius: 999px;
}

.btn-primary {
    background-color: var(--survey-primary);
    border-color: var(--survey-primary);
    font-weight: 600;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--survey-primary-dark);
    border-color: var(--survey-primary-dark);
}

.btn-outline-secondary {
    font-weight: 600;
}

.progress-bar {
    background-color: var(--survey-primary);
    transition: width .35s ease;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: .75rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .75rem;
    border: 1px solid #f1d3da;
    border-radius: 12px;
    background: #fff7f9;
}

.info-icon { font-size: 1.4rem; }

.section-tag {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--survey-primary-dark);
}

.question-step-badge {
    background: var(--survey-primary-soft);
    color: var(--survey-primary-dark);
    font-weight: 600;
}

.enumerator-note {
    background: #fff3cd;
    color: #664d03;
    font-size: .88rem;
    border-radius: 10px;
}

.enumerator-icon { margin-right: .35rem; }

.option-box {
    border: 1.5px solid #efd7dd;
    border-radius: 12px;
    padding: .7rem .9rem;
    margin-bottom: .6rem;
    cursor: pointer;
    transition: all .15s ease;
}

.option-box:hover { border-color: var(--survey-accent); background: #fff7f9; }

.option-box:has(input:checked) {
    border-color: var(--survey-primary);
    background: var(--survey-primary-soft);
}

.form-check-input:checked {
    background-color: var(--survey-primary);
    border-color: var(--survey-primary);
}

.other-text-input { max-width: 420px; }

.terms-box {
    background: #fff7f9;
    border: 1px solid #f1d3da;
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    line-height: 1.7;
}

/* Grouped questions */
.group-field {
    border: 1px solid #f1d3da;
    border-radius: 12px;
    padding: .9rem 1rem;
    background: #fffafc;
}

.group-field-label { font-weight: 600; }
.group-field-hint { font-style: italic; }

.chip-option {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border: 1.5px solid #efd7dd;
    border-radius: 999px;
    padding: .4rem .85rem;
    cursor: pointer;
    background: #fff;
    transition: all .15s ease;
    font-size: .92rem;
}

.chip-option:hover { border-color: var(--survey-accent); }

.chip-option:has(input:checked) {
    border-color: var(--survey-primary);
    background: var(--survey-primary-soft);
    font-weight: 600;
}

.chip-input { accent-color: var(--survey-primary); }

/* Matrix tables */
.matrix-table th,
.matrix-table td { vertical-align: middle; }

.matrix-table thead th {
    font-size: .85rem;
    font-weight: 600;
}

.matrix-table .form-check-input {
    width: 1.15rem;
    height: 1.15rem;
    cursor: pointer;
}

.matrix-table td .form-select-sm { min-width: 64px; }

.scale-legend { font-weight: 500; }

.matrix-row-invalid { background: #fff0f3; }

/* Loading */
.loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .7);
    border-radius: 20px;
}

.card-body { position: relative; }

.thank-you-icon { font-size: 3.5rem; }

.field-error {
    color: var(--survey-primary-dark);
    font-size: .85rem;
    margin-top: .35rem;
}

@media (max-width: 576px) {
    .card-body { padding: 1.5rem !important; }
    .matrix-table { font-size: .82rem; }
}
