/* Reset e configurações base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f7;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    -webkit-font-smoothing: antialiased;
}

.container {
    background: white;
    border-radius: 24px;
    padding: 48px 40px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Logo */
.logo-container {
    text-align: center;
    margin-bottom: 32px;
}

.logo {
    max-width: 100%;
    height: auto;
    max-height: 120px;
}

/* Título */
.title {
    text-align: center;
    color: #1d1d1f;
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.subtitle {
    text-align: center;
    color: #86868b;
    font-size: 17px;
    margin-bottom: 48px;
    font-weight: 400;
    line-height: 1.4;
}

/* Botões principais */
.main-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 24px;
    border: none;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: -0.2px;
}

.btn-primary {
    background: #2c5f6f;
    color: white;
    border: 1px solid transparent;
}

.btn-primary:hover {
    background: #234d5b;
    transform: scale(1.02);
}

.btn-primary:active {
    transform: scale(0.98);
    opacity: 0.9;
}

/* Seção secundária */
.secondary-section {
    position: relative;
    padding-top: 32px;
    margin-top: 24px;
}

.secondary-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #d2d2d7, transparent);
}

.btn-secondary {
    background: white;
    color: #1d1d1f;
    border: 1.5px solid #d2d2d7;
    width: 100%;
}

.btn-secondary:hover {
    background: #f5f5f7;
    border-color: #b8b8bd;
    transform: scale(1.02);
}

.btn-secondary:active {
    transform: scale(0.98);
    background: #ececec;
}

/* Ícones e textos dos botões - estilo minimalista */
.btn-icon {
    font-size: 20px;
    opacity: 0.9;
}

.btn-text {
    font-size: 17px;
    letter-spacing: -0.2px;
}

/* Rodapé */
.footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 24px;
}

.footer p {
    color: #86868b;
    font-size: 13px;
    font-weight: 400;
}

/* Responsivo */
@media (max-width: 480px) {
    .container {
        padding: 40px 24px;
    }
    
    .title {
        font-size: 28px;
    }
    
    .subtitle {
        font-size: 15px;
    }
    
    .btn {
        padding: 16px 20px;
        font-size: 16px;
    }
}

/* Animação suave ao carregar */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    animation: fadeIn 0.5s ease-out;
}

/* ===== ESTILOS PARA PÁGINAS INTERNAS ===== */

/* Botão Voltar */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: white;
    border: 1.5px solid #d2d2d7;
    border-radius: 10px;
    color: #2c5f6f;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 24px;
}

.btn-back:hover {
    background: #f5f5f7;
    border-color: #2c5f6f;
}

.btn-back:active {
    transform: scale(0.96);
}

.back-arrow {
    font-size: 18px;
    font-weight: 600;
}

/* Logo pequena */
.logo-container-small {
    text-align: center;
    margin-bottom: 20px;
}

.logo-small {
    max-width: 180px;
    height: auto;
    opacity: 0.9;
}

/* Título da página */
.page-title {
    text-align: center;
    color: #1d1d1f;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 32px;
    letter-spacing: -0.5px;
}

/* Caixa de pergunta */
.question-box {
    background: #f5f5f7;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 32px;
    border: 1px solid #e5e5e7;
}

.question-text {
    color: #1d1d1f;
    font-size: 18px;
    font-weight: 500;
    text-align: center;
    line-height: 1.5;
    letter-spacing: -0.2px;
}

/* Grid de botões de dias */
.day-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.btn-day {
    background: white;
    color: #2c5f6f;
    border: 1.5px solid #d2d2d7;
    padding: 18px 12px;
    font-size: 17px;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.btn-day:hover {
    background: #2c5f6f;
    color: white;
    border-color: #2c5f6f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 95, 111, 0.2);
}

.btn-day:active {
    transform: translateY(0);
}

/* Botão ≥D8 com destaque mas no grid normal */
.btn-day-posterior {
    background: #2c5f6f;
    color: white;
    border-color: #2c5f6f;
}

.btn-day-posterior:hover {
    background: #234d5b;
    border-color: #234d5b;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(44, 95, 111, 0.3);
}

.btn-day-posterior:active {
    background: #1e3e48;
}

/* Responsivo para dias */
@media (max-width: 480px) {
    .day-buttons {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .btn-day {
        padding: 16px 10px;
        font-size: 16px;
    }
    
    .question-box {
        padding: 20px;
    }
    
    .question-text {
        font-size: 16px;
    }
}

/* ===== ESTILOS PARA PERGUNTAS ===== */

.question-section {
    animation: fadeIn 0.4s ease-out;
}

.question-box-highlight {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 28px;
    border: 2px solid #bae6fd;
}

.question-subtext {
    color: #64748b;
    font-size: 15px;
    text-align: center;
    margin-top: 8px;
    font-style: italic;
}

/* Botões de resposta Sim/Não */
.answer-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.btn-answer {
    padding: 20px 24px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 14px;
    transition: all 0.2s ease;
}

.btn-answer-yes {
    background: #2c5f6f;
    color: white;
    border: 2px solid #2c5f6f;
}

.btn-answer-yes:hover {
    background: #234d5b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 95, 111, 0.3);
}

.btn-answer-no {
    background: white;
    color: #2c5f6f;
    border: 2px solid #d2d2d7;
}

.btn-answer-no:hover {
    background: #f5f5f7;
    border-color: #2c5f6f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ===== ESTILOS PARA RESULTADOS ===== */

.result-box {
    border-radius: 20px;
    padding: 32px 28px;
    margin-bottom: 24px;
    animation: fadeIn 0.5s ease-out;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Resultado: Uso Obrigatório */
.result-mandatory {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 3px solid #f59e0b;
}

/* Resultado: Indicação Clínica */
.result-clinical {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 3px solid #3b82f6;
}

.result-icon {
    font-size: 48px;
    text-align: center;
    margin-bottom: 16px;
}

.result-title {
    color: #1d1d1f;
    font-size: 26px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.result-content {
    text-align: center;
}

.result-text {
    color: #374151;
    font-size: 17px;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Destaque da dose - Uso Obrigatório */
.result-highlight {
    background: white;
    border-radius: 14px;
    padding: 20px;
    margin-top: 16px;
    border: 2px solid #f59e0b;
}

.result-dose {
    color: #1d1d1f;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
}

.result-small {
    color: #6b7280;
    font-size: 14px;
}

/* Destaque - Indicação Clínica */
.result-highlight-clinical {
    background: white;
    border-radius: 14px;
    padding: 20px;
    margin-top: 16px;
    border: 2px solid #3b82f6;
}

.result-clinical-text {
    color: #1d1d1f;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

/* Responsivo para resultados */
@media (max-width: 480px) {
    .result-box {
        padding: 24px 20px;
    }
    
    .result-title {
        font-size: 22px;
    }
    
    .result-text {
        font-size: 16px;
    }
    
    .answer-buttons {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .question-box-highlight {
        padding: 20px;
    }
}

/* ===== BOTÕES DE NAVEGAÇÃO (múltiplos) ===== */

.nav-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.nav-buttons .btn-back {
    flex: 1;
    min-width: 120px;
    justify-content: center;
}

/* Responsivo */
@media (max-width: 480px) {
    .nav-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .nav-buttons .btn-back {
        width: 100%;
    }
}


/* ===== ESTILOS PARA GRUPO PRECOCE ===== */

/* Caixa de informação (PAM) */
.info-box {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 28px;
    border: 2px solid #86efac;
}

.info-text {
    color: #166534;
    font-size: 15px;
    text-align: center;
    line-height: 1.6;
    margin: 0;
}

.info-suggestion {
    display: block;
    margin-top: 8px;
    color: #15803d;
    font-style: italic;
    font-size: 14px;
}

/* Botões de dose */
.dose-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.btn-dose {
    padding: 20px;
    font-size: 17px;
    font-weight: 600;
    border-radius: 14px;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.dose-subtitle {
    font-size: 14px;
    font-weight: 400;
    opacity: 0.9;
}

.btn-dose-ideal {
    background: #10b981;
    color: white;
    border: 2px solid #10b981;
}

.btn-dose-ideal:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.btn-dose-alta {
    background: #ef4444;
    color: white;
    border: 2px solid #ef4444;
}

.btn-dose-alta:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);
}

.btn-dose-baixa {
    background: #f59e0b;
    color: white;
    border: 2px solid #f59e0b;
}

.btn-dose-baixa:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
}

/* Resultados - Sucesso */
.result-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 3px solid #10b981;
}

/* Resultados - Desvio */
.result-deviation {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
    border: 3px solid #ef4444;
}

/* Resultados - Instrução */
.result-instruction {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 3px solid #3b82f6;
}

/* Resultados - Vigilância */
.result-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 3px solid #f59e0b;
}

.result-text-large {
    color: #1d1d1f;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Caixa de ação */
.result-action {
    background: white;
    border-radius: 14px;
    padding: 20px;
    margin-top: 16px;
    border: 2px solid #ef4444;
}

.action-title {
    color: #991b1b;
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.action-text {
    color: #1d1d1f;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
}

/* Destaque de informação */
.result-highlight-info {
    background: white;
    border-radius: 14px;
    padding: 18px;
    margin-top: 16px;
    border: 2px solid #3b82f6;
}

.result-highlight-warning {
    background: white;
    border-radius: 14px;
    padding: 18px;
    margin-top: 16px;
    border: 2px solid #f59e0b;
}

.result-note {
    color: #374151;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
}

/* Responsivo */
@media (max-width: 480px) {
    .info-box {
        padding: 16px;
    }
    
    .info-text {
        font-size: 14px;
    }
    
    .btn-dose {
        padding: 18px;
        font-size: 16px;
    }
}

/* ===== ESTILOS PARA DESMAME ===== */

.vasopressor-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.btn-vasopressor {
    background: white;
    color: #2c5f6f;
    border: 2px solid #d2d2d7;
    padding: 20px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 14px;
    transition: all 0.2s ease;
    text-align: center;
    line-height: 1.4;
}

.btn-vasopressor:hover {
    background: #2c5f6f;
    color: white;
    border-color: #2c5f6f;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 95, 111, 0.2);
}

/* Caixa de ação - sucesso */
.result-action-success {
    background: white;
    border-radius: 14px;
    padding: 20px;
    margin-top: 16px;
    border: 2px solid #10b981;
}

/* Nota de protocolo (menos destacada) */
.protocol-note {
    background: #f9fafb;
    border-radius: 10px;
    padding: 14px;
    margin-top: 16px;
    border: 1px solid #e5e7eb;
}

.protocol-note p {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

/* Caixa de exceção (Resgate) */
.exception-box {
    background: #fef3c7;
    border-radius: 12px;
    padding: 16px;
    margin-top: 20px;
    border: 2px solid #fbbf24;
}

.exception-title {
    color: #92400e;
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.exception-text {
    color: #78350f;
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
}

/* Responsivo */
@media (max-width: 480px) {
    .vasopressor-buttons {
        gap: 10px;
    }
    
    .btn-vasopressor {
        padding: 18px 20px;
        font-size: 15px;
    }
}