:root {
    --azul: #2563eb;
    --azul-escuro: #1d4ed8;
    --verde: #16a34a;
    --verde-claro: #dcfce7;
    --amarelo: #d97706;
    --amarelo-claro: #fef3c7;
    --cinza-fundo: #f3f4f6;
    --cinza-borda: #e5e7eb;
    --texto: #1f2937;
    --texto-suave: #6b7280;
    --vermelho: #dc2626;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--cinza-fundo);
    color: var(--texto);
    font-size: 19px;
    line-height: 1.4;
    padding-bottom: 60px;
}

header.topo {
    background: var(--azul);
    color: #fff;
    padding: 20px 16px 24px;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

header.topo h1 {
    margin: 0 0 14px;
    font-size: 26px;
    text-align: center;
}

.nav-dia {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 480px;
    margin: 0 auto;
}

.seta {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255,255,255,0.18);
    color: #fff;
    font-size: 30px;
    font-weight: 700;
    text-decoration: none;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.seta:active {
    background: rgba(255,255,255,0.32);
}

.seta-desativada {
    background: transparent;
    color: rgba(255,255,255,0.25);
}

.titulo-dia-central {
    flex: 1 1 auto;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
}

.btn-hoje {
    display: block;
    width: fit-content;
    margin: 12px auto 0;
    background: rgba(255,255,255,0.18);
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 999px;
    -webkit-tap-highlight-color: transparent;
}

.btn-hoje:active {
    background: rgba(255,255,255,0.32);
}

.progresso-hoje {
    max-width: 480px;
    margin: 14px auto 0;
}

.progresso-texto {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 6px;
    text-align: center;
}

.barra {
    background: rgba(255,255,255,0.35);
    border-radius: 999px;
    height: 14px;
    overflow: hidden;
}

.barra-preenchida {
    background: #fff;
    height: 100%;
    border-radius: 999px;
    transition: width 0.3s ease;
}

main {
    max-width: 560px;
    margin: 0 auto;
    padding: 16px;
}

.grupo-dia {
    margin-bottom: 28px;
}

.lista-doses {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dose-card {
    background: #fff;
    border-radius: 16px;
    border: 2px solid var(--cinza-borda);
    padding: 16px;
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 14px;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.dose-card.status-concluido {
    background: var(--verde-claro);
    border-color: #86efac;
}

.dose-card.status-incerto {
    border-color: #fcd34d;
}

.dose-hora {
    font-size: 20px;
    font-weight: 700;
    color: var(--azul-escuro);
    text-align: center;
    white-space: nowrap;
}

.status-concluido .dose-hora {
    color: #166534;
}

.dose-nome {
    font-size: 21px;
    font-weight: 700;
    margin-bottom: 2px;
}

.dose-obs {
    font-size: 16px;
    color: var(--texto-suave);
    line-height: 1.35;
}

.dose-badge {
    display: inline-block;
    margin-top: 6px;
    font-size: 14px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
}

.badge-incerto {
    background: var(--amarelo-claro);
    color: var(--amarelo);
}

.dose-acao {
    grid-column: 1 / -1;
    margin-top: 4px;
}

.btn {
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn-marcar {
    background: var(--azul);
    color: #fff;
}

.btn-marcar:active {
    background: var(--azul-escuro);
}

.btn-feito {
    background: var(--verde);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-feito:active {
    opacity: 0.85;
}

.icone {
    font-size: 20px;
}

/* Modal de confirmação (double-check) */
.modal-fundo {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 100;
}

.modal-fundo.aberto {
    display: flex;
}

.modal-caixa {
    background: #fff;
    border-radius: 18px;
    padding: 26px 22px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}

.modal-pergunta {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 22px;
    line-height: 1.4;
}

.modal-botoes {
    display: flex;
    gap: 12px;
}

.modal-botoes .btn {
    flex: 1;
}

.btn-cancelar {
    background: var(--cinza-borda);
    color: var(--texto);
}

.btn-confirmar {
    background: var(--verde);
    color: #fff;
}
