:root {
    --dark-blue: #003366;      /* Azul Escuro Institucional */
    --light-blue: #0099ff;     /* Azul Claro */
    --accent-blue: #e6f2ff;    /* Azul de Fundo Suave */
    --error-red: #e53e3e;      /* Vermelho de Erro */
    --success-green: #2f855a;
    --border-color: #cbd5e0;
    --text-main: #2d3748;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f0f4f8;
    color: var(--text-main);
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.container {
    background-color: var(--white);
    max-width: 850px;
    width: 100%;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-top: 8px solid var(--dark-blue);
    min-height: 600px;
    position: relative;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

.header-icon {
    margin-bottom: 15px;
    fill: var(--dark-blue);
}

.uni-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--dark-blue);
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 1px;
}

.course-info {
    font-size: 1rem;
    color: var(--light-blue);
    font-weight: 600;
    margin: 5px 0;
}

.form-title {
    font-size: 1.8rem;
    margin: 15px 0;
    color: var(--dark-blue);
    font-weight: 800;
    border-bottom: 2px solid var(--accent-blue);
    padding-bottom: 10px;
}

.meta-info {
    display: flex;
    justify-content: space-between;
    background: var(--accent-blue);
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--dark-blue);
    margin-bottom: 25px;
}

/* Consentimento e Protocolo */
#initial-screen {
    display: block;
}

.card-box {
    background: var(--white);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.tcle-section {
    background: #fffbe6;
    border: 2px solid #ffe58f;
}

.protocol-section {
    border-top: 4px solid var(--light-blue);
    background: #f0f9ff;
}

.tcle-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-weight: bold;
    cursor: pointer;
    padding: 10px;
    background: white;
    border-radius: 5px;
    border: 1px solid #ffe58f;
}

.protocol-input-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
}

.input-text {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    width: 250px;
    text-transform: uppercase;
    font-weight: bold;
    text-align: center;
}

/* Blocos de Questões */
#questionnaire-body {
    display: none;
}

.section-block {
    margin-bottom: 30px;
    display: none;
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.section-header {
    background: linear-gradient(90deg, var(--dark-blue), var(--light-blue));
    color: var(--white);
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 25px;
}

.question-item {
    margin-bottom: 25px;
    position: relative;
}

.question-text {
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
    color: var(--dark-blue);
}

textarea {
    width: 100%;
    min-height: 110px;
    padding: 12px;
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    resize: vertical;
    font-size: 1rem;
    transition: border-color 0.3s;
}

textarea.error-border {
    border-color: var(--error-red);
    background-color: #fff5f5;
}

.error-msg {
    color: var(--error-red);
    font-size: 0.85rem;
    font-weight: bold;
    margin-top: 5px;
    display: none;
}

.footer-nav {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--accent-blue);
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
}

.btn-action {
    background-color: var(--dark-blue);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95rem;
}

.btn-action:hover {
    background-color: var(--light-blue);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.progress-indicator {
    text-align: center;
    font-weight: bold;
    color: var(--dark-blue);
    font-size: 0.9rem;
    background: var(--accent-blue);
    padding: 5px 12px;
    border-radius: 20px;
    justify-self: center;
}

.thanks-message {
    text-align: center;
    padding: 40px;
    display: none;
    animation: fadeIn 0.8s ease;
}

.protocol-badge {
    display: inline-block;
    background: var(--dark-blue);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1.5rem;
    letter-spacing: 3px;
    margin: 20px 0;
    font-family: monospace;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.loading-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.8);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 12px;
}

@media print {
    .no-print, .btn-action, #initial-screen, .footer-nav, .loading-overlay { display: none !important; }
    .section-block { display: block !important; margin-bottom: 50px; page-break-inside: avoid; }
    .container { box-shadow: none; border: none; padding: 0; }
    textarea { border: 1px solid #000; height: 150px; }
}