/* ============================================================================
   SGE - Sistema de Gestión de Encuestas
   Public Survey / Respondent Stylesheet
   Version: 1.0.0

   Mobile-first, clean, spacious, intuitive survey experience.

   Table of Contents:
   1. Variables & Base
   2. Layout & Container
   3. Progress Bar
   4. Survey Header
   5. Question Cards & Sections
   6. Question Types: Radio Buttons
   7. Question Types: Checkboxes
   8. Question Types: Text Inputs
   9. Question Types: Scale
   10. Question Types: Rating (Stars)
   11. Question Types: Grid / Matrix
   12. Question Types: Dropdown / Select
   13. Question Types: Date & Time
   14. Question Types: File Upload
   15. Navigation Buttons
   16. Incomplete Survey Banner
   17. Directed Survey: Login Form
   18. Messages & States
   19. Section Transitions
   20. Responsive (320px+)
   ============================================================================ */


/* ============================================================================
   1. Variables & Base
   ============================================================================ */

:root {
    --s-primary: #25604C;
    --s-primary-dark: #1a4536;
    --s-primary-light: #2d7359;
    --s-primary-lighter: #e8f5f0;
    --s-success: #22c55e;
    --s-danger: #ef4444;
    --s-warning: #f59e0b;
    --s-bg: #f0f4f8;
    --s-bg-white: #ffffff;
    --s-text: #1e293b;
    --s-text-secondary: #64748b;
    --s-text-light: #94a3b8;
    --s-border: #e2e8f0;
    --s-border-focus: #25604C;
    --s-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    --s-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --s-shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.08);
    --s-radius: 12px;
    --s-radius-lg: 16px;
    --s-max-width: 720px;
    --s-transition: all 0.2s ease;
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
        'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--s-text);
    background-color: var(--s-bg);
    min-height: 100vh;
}

a {
    color: var(--s-primary);
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}


/* ============================================================================
   2. Layout & Container
   ============================================================================ */

.survey-container {
    max-width: var(--s-max-width);
    margin: 0 auto;
    padding: 0 1rem 3rem;
    position: relative;
}

.survey-page {
    padding-top: 1rem;
}


/* ============================================================================
   3. Progress Bar (Sticky)
   ============================================================================ */

.survey-progress {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--s-bg-white);
    padding: 0.75rem 0;
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    border-bottom: 1px solid var(--s-border);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.92);
}

.survey-progress-inner {
    max-width: var(--s-max-width);
    margin: 0 auto;
}

.survey-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.survey-progress-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--s-text-secondary);
}

.survey-progress-count {
    font-size: 0.8125rem;
    color: var(--s-text-light);
}

.survey-progress-bar {
    width: 100%;
    height: 6px;
    background: var(--s-border);
    border-radius: 3px;
    overflow: hidden;
}

.survey-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--s-primary), var(--s-primary-light));
    border-radius: 3px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.survey-progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: progressShimmer 2s ease-in-out infinite;
}

@keyframes progressShimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}


/* ============================================================================
   4. Survey Header
   ============================================================================ */

.survey-header {
    background: var(--s-bg-white);
    border-radius: var(--s-radius-lg);
    box-shadow: var(--s-shadow-md);
    padding: 2rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    border-top: 4px solid var(--s-primary);
    text-align: center;
}

.survey-header-image {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: var(--s-radius);
    margin-bottom: 1.5rem;
}

.survey-title {
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--s-text);
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.survey-description {
    font-size: 0.9375rem;
    color: var(--s-text-secondary);
    line-height: 1.7;
    max-width: 560px;
    margin: 0 auto;
}

.survey-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
    font-size: 0.8125rem;
    color: var(--s-text-light);
}

.survey-meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.survey-meta-item svg {
    width: 16px;
    height: 16px;
}


/* ============================================================================
   5. Question Cards & Sections
   ============================================================================ */

.section-card {
    background: var(--s-bg-white);
    border-radius: var(--s-radius-lg);
    box-shadow: var(--s-shadow);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: var(--s-transition);
}

.section-card:hover {
    box-shadow: var(--s-shadow-md);
}

.section-divider {
    background: var(--s-primary-lighter);
    border-radius: var(--s-radius-lg);
    padding: 1.5rem 2rem;
    margin-bottom: 1rem;
    margin-top: 2rem;
    border-left: 4px solid var(--s-primary);
}

.section-divider-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--s-primary-dark);
    margin-bottom: 0.25rem;
}

.section-divider-description {
    font-size: 0.875rem;
    color: var(--s-text-secondary);
}

.question-card {
    background: var(--s-bg-white);
    border-radius: var(--s-radius-lg);
    box-shadow: var(--s-shadow);
    padding: 1.75rem 2rem;
    margin-bottom: 1rem;
    border-left: 4px solid transparent;
    transition: var(--s-transition);
}

.question-card:hover {
    box-shadow: var(--s-shadow-md);
}

.question-card.active {
    border-left-color: var(--s-primary);
    box-shadow: var(--s-shadow-md);
}

.question-card.has-error {
    border-left-color: var(--s-danger);
}

.question-number {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--s-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.question-title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--s-text);
    line-height: 1.5;
    margin-bottom: 0.25rem;
}

.question-title .required-mark {
    color: var(--s-danger);
    margin-left: 3px;
}

.question-description {
    font-size: 0.875rem;
    color: var(--s-text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.question-error {
    font-size: 0.8125rem;
    color: var(--s-danger);
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.question-error svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}


/* ============================================================================
   6. Question Types: Radio Buttons
   ============================================================================ */

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.125rem;
    border: 2px solid var(--s-border);
    border-radius: var(--s-radius);
    cursor: pointer;
    transition: var(--s-transition);
    user-select: none;
}

.radio-option:hover {
    border-color: var(--s-primary-light);
    background: var(--s-primary-lighter);
}

.radio-option.selected {
    border-color: var(--s-primary);
    background: var(--s-primary-lighter);
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.radio-circle {
    width: 24px;
    height: 24px;
    border: 2.5px solid var(--s-border);
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--s-transition);
}

.radio-option:hover .radio-circle {
    border-color: var(--s-primary-light);
}

.radio-option.selected .radio-circle {
    border-color: var(--s-primary);
}

.radio-circle::after {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--s-primary);
    transform: scale(0);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.radio-option.selected .radio-circle::after {
    transform: scale(1);
}

.radio-label {
    font-size: 0.9375rem;
    color: var(--s-text);
    flex: 1;
}

/* Other option with text field */
.radio-other-input {
    margin-top: 0.5rem;
    margin-left: 2.875rem;
}

.radio-other-input input {
    width: 100%;
    padding: 0.5rem 0;
    font-size: 0.9375rem;
    border: none;
    border-bottom: 2px solid var(--s-border);
    outline: none;
    background: transparent;
    color: var(--s-text);
    transition: var(--s-transition);
}

.radio-other-input input:focus {
    border-bottom-color: var(--s-primary);
}


/* ============================================================================
   7. Question Types: Checkboxes
   ============================================================================ */

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.125rem;
    border: 2px solid var(--s-border);
    border-radius: var(--s-radius);
    cursor: pointer;
    transition: var(--s-transition);
    user-select: none;
}

.checkbox-option:hover {
    border-color: var(--s-primary-light);
    background: var(--s-primary-lighter);
}

.checkbox-option.selected {
    border-color: var(--s-primary);
    background: var(--s-primary-lighter);
}

.checkbox-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkbox-box {
    width: 24px;
    height: 24px;
    border: 2.5px solid var(--s-border);
    border-radius: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--s-transition);
}

.checkbox-option:hover .checkbox-box {
    border-color: var(--s-primary-light);
}

.checkbox-option.selected .checkbox-box {
    background: var(--s-primary);
    border-color: var(--s-primary);
}

.checkbox-box svg {
    width: 14px;
    height: 14px;
    color: white;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.checkbox-option.selected .checkbox-box svg {
    opacity: 1;
    transform: scale(1);
}

.checkbox-label {
    font-size: 0.9375rem;
    color: var(--s-text);
    flex: 1;
}


/* ============================================================================
   8. Question Types: Text Inputs
   ============================================================================ */

.text-input-wrapper {
    position: relative;
}

.text-input {
    width: 100%;
    padding: 0.75rem 0;
    font-size: 1rem;
    color: var(--s-text);
    border: none;
    border-bottom: 2px solid var(--s-border);
    outline: none;
    background: transparent;
    transition: var(--s-transition);
}

.text-input:focus {
    border-bottom-color: var(--s-primary);
}

/* Animated underline */
.text-input-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--s-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-input:focus ~ .text-input-line {
    left: 0;
    width: 100%;
}

.text-input::placeholder {
    color: var(--s-text-light);
}

/* Textarea variant */
.text-area {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    color: var(--s-text);
    border: 2px solid var(--s-border);
    border-radius: var(--s-radius);
    outline: none;
    background: var(--s-bg-white);
    resize: vertical;
    min-height: 100px;
    transition: var(--s-transition);
    font-family: inherit;
    line-height: 1.6;
}

.text-area:focus {
    border-color: var(--s-primary);
    box-shadow: 0 0 0 3px rgba(37, 96, 76, 0.1);
}

.text-area::placeholder {
    color: var(--s-text-light);
}

.char-count {
    font-size: 0.75rem;
    color: var(--s-text-light);
    text-align: right;
    margin-top: 0.375rem;
}

.char-count.near-limit {
    color: var(--s-warning);
}

.char-count.at-limit {
    color: var(--s-danger);
}


/* ============================================================================
   9. Question Types: Scale
   ============================================================================ */

.scale-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8125rem;
    color: var(--s-text-secondary);
}

.scale-buttons {
    display: flex;
    gap: 0.5rem;
}

.scale-btn {
    flex: 1;
    padding: 0.75rem 0.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--s-text-secondary);
    background: var(--s-bg);
    border: 2px solid var(--s-border);
    border-radius: var(--s-radius);
    cursor: pointer;
    transition: var(--s-transition);
    text-align: center;
    min-width: 44px;
    min-height: 48px;
}

.scale-btn:hover {
    border-color: var(--s-primary-light);
    background: var(--s-primary-lighter);
    color: var(--s-primary);
}

.scale-btn.selected {
    background: var(--s-primary);
    border-color: var(--s-primary);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(37, 96, 76, 0.25);
}

.scale-btn input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}


/* ============================================================================
   10. Question Types: Rating (Stars / Hearts)
   ============================================================================ */

.rating-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
}

.rating-stars {
    display: flex;
    gap: 0.5rem;
    direction: rtl; /* enables hover-from-right trick */
}

.rating-star {
    cursor: pointer;
    transition: var(--s-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.rating-star input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rating-star svg {
    width: 40px;
    height: 40px;
    fill: var(--s-border);
    stroke: var(--s-border);
    stroke-width: 1;
    transition: all 0.15s ease;
}

.rating-star:hover svg,
.rating-star:hover ~ .rating-star svg {
    fill: #fbbf24;
    stroke: #f59e0b;
    transform: scale(1.15);
}

.rating-star.selected svg,
.rating-star.selected ~ .rating-star svg {
    fill: #fbbf24;
    stroke: #f59e0b;
}

.rating-star:active svg {
    transform: scale(0.95);
}

.rating-label {
    font-size: 0.875rem;
    color: var(--s-text-secondary);
    font-weight: 500;
}

/* Heart variant */
.rating-hearts .rating-star:hover svg,
.rating-hearts .rating-star:hover ~ .rating-star svg {
    fill: #f43f5e;
    stroke: #e11d48;
}

.rating-hearts .rating-star.selected svg,
.rating-hearts .rating-star.selected ~ .rating-star svg {
    fill: #f43f5e;
    stroke: #e11d48;
}


/* ============================================================================
   11. Question Types: Grid / Matrix
   ============================================================================ */

.grid-table-wrapper {
    overflow-x: auto;
    border-radius: var(--s-radius);
    border: 1px solid var(--s-border);
    -webkit-overflow-scrolling: touch;
}

.grid-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.grid-table thead th {
    padding: 0.75rem 1rem;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--s-text-secondary);
    background: var(--s-bg);
    border-bottom: 1px solid var(--s-border);
    white-space: nowrap;
}

.grid-table thead th:first-child {
    text-align: left;
    min-width: 180px;
}

.grid-table tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--s-border);
    text-align: center;
    vertical-align: middle;
}

.grid-table tbody td:first-child {
    text-align: left;
    font-weight: 500;
    color: var(--s-text);
}

.grid-table tbody tr:last-child td {
    border-bottom: none;
}

.grid-table tbody tr:hover {
    background: var(--s-primary-lighter);
}

/* Grid radio/checkbox */
.grid-radio,
.grid-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid var(--s-border);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--s-transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    appearance: none;
    background: white;
}

.grid-checkbox {
    border-radius: 5px;
}

.grid-radio:checked,
.grid-checkbox:checked {
    background: var(--s-primary);
    border-color: var(--s-primary);
}

.grid-radio:checked::after {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.grid-checkbox:checked::after {
    content: '';
    width: 5px;
    height: 10px;
    border: 2px solid white;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translate(-1px, -1px);
}

/* Mobile stacked grid */
@media (max-width: 600px) {
    .grid-table-wrapper {
        border: none;
    }

    .grid-table,
    .grid-table thead,
    .grid-table tbody,
    .grid-table tr,
    .grid-table th,
    .grid-table td {
        display: block;
    }

    .grid-table thead {
        display: none;
    }

    .grid-table tbody tr {
        background: var(--s-bg-white);
        border: 1px solid var(--s-border);
        border-radius: var(--s-radius);
        padding: 1rem;
        margin-bottom: 0.75rem;
    }

    .grid-table tbody td {
        padding: 0.375rem 0;
        border: none;
        text-align: left;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
    }

    .grid-table tbody td:first-child {
        font-weight: 600;
        padding-bottom: 0.625rem;
        margin-bottom: 0.375rem;
        border-bottom: 1px solid var(--s-border);
    }

    .grid-table tbody td::before {
        content: attr(data-label);
        font-size: 0.8125rem;
        color: var(--s-text-secondary);
        font-weight: 500;
    }

    .grid-table tbody td:first-child::before {
        display: none;
    }
}


/* ============================================================================
   12. Question Types: Dropdown / Select
   ============================================================================ */

.select-wrapper {
    position: relative;
}

.select-custom {
    width: 100%;
    padding: 0.875rem 1rem;
    padding-right: 2.75rem;
    font-size: 0.9375rem;
    color: var(--s-text);
    background: var(--s-bg-white);
    border: 2px solid var(--s-border);
    border-radius: var(--s-radius);
    appearance: none;
    outline: none;
    cursor: pointer;
    transition: var(--s-transition);
    font-family: inherit;
}

.select-custom:focus {
    border-color: var(--s-primary);
    box-shadow: 0 0 0 3px rgba(37, 96, 76, 0.1);
}

.select-wrapper::after {
    content: '';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--s-text-secondary);
    pointer-events: none;
    transition: var(--s-transition);
}

.select-custom:focus + .select-wrapper::after,
.select-wrapper:focus-within::after {
    border-top-color: var(--s-primary);
}

.select-custom option {
    padding: 0.5rem;
}

.select-placeholder {
    color: var(--s-text-light);
}


/* ============================================================================
   13. Question Types: Date & Time
   ============================================================================ */

.datetime-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    color: var(--s-text);
    background: var(--s-bg-white);
    border: 2px solid var(--s-border);
    border-radius: var(--s-radius);
    appearance: none;
    outline: none;
    transition: var(--s-transition);
    font-family: inherit;
}

.datetime-input:focus {
    border-color: var(--s-primary);
    box-shadow: 0 0 0 3px rgba(37, 96, 76, 0.1);
}

.datetime-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.5;
    transition: var(--s-transition);
}

.datetime-input:hover::-webkit-calendar-picker-indicator {
    opacity: 0.8;
}

.datetime-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}


/* ============================================================================
   14. Question Types: File Upload
   ============================================================================ */

.file-upload-zone {
    border: 2px dashed var(--s-border);
    border-radius: var(--s-radius);
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--s-transition);
    position: relative;
    overflow: hidden;
}

.file-upload-zone:hover,
.file-upload-zone.drag-over {
    border-color: var(--s-primary);
    background: var(--s-primary-lighter);
}

.file-upload-zone.drag-over {
    transform: scale(1.01);
}

.file-upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-upload-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    background: var(--s-primary-lighter);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--s-primary);
}

.file-upload-icon svg {
    width: 28px;
    height: 28px;
}

.file-upload-text {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--s-text);
    margin-bottom: 0.25rem;
}

.file-upload-hint {
    font-size: 0.8125rem;
    color: var(--s-text-light);
}

.file-upload-browse {
    color: var(--s-primary);
    font-weight: 600;
    cursor: pointer;
}

/* Uploaded file preview */
.file-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--s-bg);
    border-radius: var(--s-radius);
    margin-top: 0.75rem;
}

.file-preview-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--s-primary-lighter);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--s-primary);
    flex-shrink: 0;
}

.file-preview-icon svg {
    width: 20px;
    height: 20px;
}

.file-preview-info {
    flex: 1;
    min-width: 0;
}

.file-preview-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--s-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-preview-size {
    font-size: 0.75rem;
    color: var(--s-text-light);
}

.file-preview-remove {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--s-text-light);
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--s-transition);
    flex-shrink: 0;
}

.file-preview-remove:hover {
    background: #fee2e2;
    color: var(--s-danger);
}

.file-preview-remove svg {
    width: 16px;
    height: 16px;
}


/* ============================================================================
   15. Navigation Buttons
   ============================================================================ */

.survey-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0;
    margin-top: 1rem;
    gap: 1rem;
}

.survey-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--s-radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--s-transition);
    font-family: inherit;
    text-decoration: none;
    min-height: 52px;
}

.survey-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.survey-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.survey-btn-prev {
    background: var(--s-bg-white);
    color: var(--s-text-secondary);
    border-color: var(--s-border);
}

.survey-btn-prev:hover:not(:disabled) {
    background: var(--s-bg);
    color: var(--s-text);
    border-color: var(--s-text-light);
}

.survey-btn-next {
    background: var(--s-primary);
    color: white;
    border-color: var(--s-primary);
}

.survey-btn-next:hover:not(:disabled) {
    background: var(--s-primary-dark);
    border-color: var(--s-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(37, 96, 76, 0.3);
}

.survey-btn-next:active:not(:disabled) {
    transform: translateY(0);
}

.survey-btn-submit {
    background: var(--s-success);
    color: white;
    border-color: var(--s-success);
}

.survey-btn-submit:hover:not(:disabled) {
    background: #16a34a;
    border-color: #16a34a;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.3);
}


/* ============================================================================
   16. Incomplete Survey Banner
   ============================================================================ */

.incomplete-banner {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--s-radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.incomplete-banner-icon {
    width: 44px;
    height: 44px;
    background: #fef3c7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b45309;
    flex-shrink: 0;
}

.incomplete-banner-icon svg {
    width: 22px;
    height: 22px;
}

.incomplete-banner-content {
    flex: 1;
}

.incomplete-banner-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 0.125rem;
}

.incomplete-banner-text {
    font-size: 0.8125rem;
    color: #b45309;
}

.incomplete-banner-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.incomplete-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    transition: var(--s-transition);
    font-family: inherit;
}

.incomplete-btn-continue {
    background: #b45309;
    color: white;
}

.incomplete-btn-continue:hover {
    background: #92400e;
}

.incomplete-btn-restart {
    background: transparent;
    color: #b45309;
    border: 1px solid #fbbf24;
}

.incomplete-btn-restart:hover {
    background: #fef3c7;
}


/* ============================================================================
   17. Directed Survey: Login Form
   ============================================================================ */

.login-card {
    background: var(--s-bg-white);
    border-radius: var(--s-radius-lg);
    box-shadow: var(--s-shadow-lg);
    padding: 2.5rem;
    max-width: 440px;
    margin: 4rem auto;
    text-align: center;
}

.login-logo {
    width: 64px;
    height: 64px;
    background: var(--s-primary);
    border-radius: var(--s-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-weight: 800;
    font-size: 1.5rem;
}

.login-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--s-text);
    margin-bottom: 0.25rem;
}

.login-subtitle {
    font-size: 0.875rem;
    color: var(--s-text-secondary);
    margin-bottom: 2rem;
}

.login-field {
    margin-bottom: 1.25rem;
    text-align: left;
}

.login-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--s-text);
    margin-bottom: 0.375rem;
}

.login-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    border: 2px solid var(--s-border);
    border-radius: var(--s-radius);
    outline: none;
    transition: var(--s-transition);
    font-family: inherit;
}

.login-input:focus {
    border-color: var(--s-primary);
    box-shadow: 0 0 0 3px rgba(37, 96, 76, 0.1);
}

.login-submit {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
    font-weight: 600;
    background: var(--s-primary);
    color: white;
    border: none;
    border-radius: var(--s-radius);
    cursor: pointer;
    transition: var(--s-transition);
    font-family: inherit;
    margin-top: 0.5rem;
}

.login-submit:hover {
    background: var(--s-primary-dark);
    box-shadow: 0 4px 12px rgba(37, 96, 76, 0.25);
}

.login-error {
    background: #fef2f2;
    color: #b91c1c;
    font-size: 0.8125rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid #fecaca;
}


/* ============================================================================
   18. Messages & States
   ============================================================================ */

/* Thank you / Success page */
.survey-complete {
    text-align: center;
    padding: 3rem 2rem;
}

.survey-complete-icon {
    width: 80px;
    height: 80px;
    background: #dcfce7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--s-success);
}

.survey-complete-icon svg {
    width: 40px;
    height: 40px;
}

.survey-complete-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.survey-complete-text {
    font-size: 1rem;
    color: var(--s-text-secondary);
    max-width: 420px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

/* Error page */
.survey-error {
    text-align: center;
    padding: 3rem 2rem;
}

.survey-error-icon {
    width: 80px;
    height: 80px;
    background: #fee2e2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--s-danger);
}

/* Closed survey */
.survey-closed {
    text-align: center;
    padding: 3rem 2rem;
}

.survey-closed-icon {
    width: 80px;
    height: 80px;
    background: var(--s-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--s-text-light);
}


/* ============================================================================
   19. Section Transitions
   ============================================================================ */

.section-enter {
    animation: sectionFadeIn 0.4s ease forwards;
}

.section-exit {
    animation: sectionFadeOut 0.3s ease forwards;
}

@keyframes sectionFadeIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes sectionFadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-30px);
    }
}

/* Reverse (going back) */
.section-enter-reverse {
    animation: sectionFadeInReverse 0.4s ease forwards;
}

.section-exit-reverse {
    animation: sectionFadeOutReverse 0.3s ease forwards;
}

@keyframes sectionFadeInReverse {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes sectionFadeOutReverse {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(30px);
    }
}


/* ============================================================================
   20. Responsive (320px+)
   ============================================================================ */

@media (max-width: 600px) {
    .survey-container {
        padding: 0 0.75rem 2rem;
    }

    .survey-header {
        padding: 1.5rem 1.25rem;
    }

    .survey-title {
        font-size: 1.375rem;
    }

    .survey-description {
        font-size: 0.875rem;
    }

    .survey-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .question-card {
        padding: 1.25rem 1rem;
    }

    .question-title {
        font-size: 1rem;
    }

    .radio-option,
    .checkbox-option {
        padding: 0.75rem 1rem;
    }

    .scale-buttons {
        gap: 0.375rem;
    }

    .scale-btn {
        padding: 0.625rem 0.125rem;
        font-size: 0.875rem;
        min-height: 44px;
    }

    .rating-star svg {
        width: 32px;
        height: 32px;
    }

    .survey-nav {
        flex-direction: column;
    }

    .survey-btn {
        width: 100%;
    }

    .survey-btn-prev {
        order: 1;
    }

    .datetime-row {
        grid-template-columns: 1fr;
    }

    /* Incomplete banner stacks */
    .incomplete-banner {
        flex-direction: column;
        text-align: center;
    }

    .incomplete-banner-actions {
        width: 100%;
        flex-direction: column;
    }

    .incomplete-btn {
        width: 100%;
        text-align: center;
    }

    /* Login */
    .login-card {
        padding: 1.75rem 1.25rem;
        margin: 2rem 0.75rem;
    }
}

@media (max-width: 380px) {
    .scale-buttons {
        flex-wrap: wrap;
    }

    .scale-btn {
        flex: 0 0 calc(20% - 0.375rem);
    }

    .rating-stars {
        gap: 0.25rem;
    }

    .rating-star svg {
        width: 28px;
        height: 28px;
    }
}

/* Landscape phone adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .survey-progress {
        padding: 0.5rem 0;
    }

    .question-card {
        padding: 1rem;
    }
}


/* ============================================================================
   Survey Footer / Branding
   ============================================================================ */

.survey-footer {
    text-align: center;
    padding: 2rem 0 1rem;
    font-size: 0.75rem;
    color: var(--s-text-light);
}

.survey-footer a {
    color: var(--s-text-secondary);
    font-weight: 600;
}

.survey-footer a:hover {
    color: var(--s-primary);
}


/* ============================================================================
   Directed Survey: Login / Identification Card
   ============================================================================ */

.directed-login-card {
    max-width: 440px;
    margin: 2rem auto;
    background: var(--s-bg-white, #fff);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--s-border, #e2e8f0);
}

.directed-login-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--s-primary-lighter, #e8f5f0), #dcfce7);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.directed-login-icon svg {
    color: var(--s-primary, #25604C);
}

.directed-login-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--s-text, #1e293b);
    margin-bottom: 0.5rem;
}

.directed-login-subtitle {
    font-size: 0.875rem;
    color: var(--s-text-secondary, #64748b);
    line-height: 1.6;
    margin-bottom: 1.75rem;
}

.directed-login-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    color: #dc2626;
    font-size: 0.8125rem;
    margin-bottom: 1.25rem;
    text-align: left;
}

.directed-login-form {
    text-align: left;
}

.directed-form-group {
    margin-bottom: 1.25rem;
}

.directed-form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--s-text, #1e293b);
    margin-bottom: 0.375rem;
}

.directed-form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    border: 1.5px solid var(--s-border, #e2e8f0);
    border-radius: 10px;
    outline: none;
    font-family: inherit;
    color: var(--s-text, #1e293b);
    background: var(--s-bg-white, #fff);
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.directed-form-input:focus {
    border-color: var(--s-primary, #25604C);
    box-shadow: 0 0 0 3px rgba(37, 96, 76, 0.1);
}

.directed-form-input::placeholder {
    color: var(--s-text-light, #94a3b8);
}

.directed-form-submit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    background: var(--s-primary, #25604C);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.directed-form-submit:hover {
    background: #1a4536;
}

.directed-form-submit:active {
    transform: scale(0.98);
}


/* ============================================================================
   Directed Survey: Respondent Info Banner
   ============================================================================ */

.respondent-info-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    background: var(--s-bg-white, #fff);
    border-radius: 12px;
    border: 1px solid var(--s-border, #e2e8f0);
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.respondent-info-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--s-primary, #25604C);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.respondent-info-details {
    flex: 1;
    min-width: 0;
}

.respondent-info-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--s-text, #1e293b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.respondent-info-cedula {
    font-size: 0.75rem;
    color: var(--s-text-secondary, #64748b);
}

.respondent-info-note {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--s-text-light, #94a3b8);
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .directed-login-card {
        margin: 1rem auto;
        padding: 1.75rem 1.25rem;
    }

    .respondent-info-banner {
        flex-wrap: wrap;
    }

    .respondent-info-note {
        width: 100%;
        margin-top: 0.25rem;
    }
}
