:root{
    --azul-escuro:#003366;
    --teal:#007C77;
    --teal-dark:#00695C;
    --teal-light:#009688;
    --bg:#f5f7fb;
    --card-bg:#ffffff;
    --text-muted:#5a6b7a;
    --radius-lg:18px;
    --radius-md:10px;
    --transition:.25s ease;
}

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

body{
    font-family:'Segoe UI', Arial, Helvetica, sans-serif;
    background:var(--bg);
    display:flex;
    justify-content:center;
    padding:40px;
    color:#333;
}

#unidadessaude_back{
    position:fixed;
    top:20px;
    left:20px;
    display:inline-flex;
    align-items:center;
    gap:6px;
    color:var(--azul-escuro);
    text-decoration:none;
    font-weight:600;
    font-size:15px;
    background:white;
    padding:10px 16px;
    border-radius:30px;
    box-shadow:0 4px 12px rgba(0,0,0,.1);
    transition:var(--transition);
    z-index:10;
}

#unidadessaude_back:hover{
    color:var(--teal-dark);
    gap:10px;
    box-shadow:0 6px 16px rgba(0,0,0,.15);
}
.container{
    width:100%;
    max-width:900px;
}

.card{
    background:var(--card-bg);
    border-radius:var(--radius-lg);
    overflow:hidden;
    box-shadow:0 12px 30px rgba(0,0,0,.10);
}

#imagem{
    width:100%;
    height:320px;
    object-fit:cover;
    display:block;
}

.card-body{
    padding:35px 40px;
}

#nomeUnidade{
    font-size:32px;
    font-weight:700;
    color:var(--azul-escuro);
    margin-bottom:25px;
    letter-spacing:-.3px;
}

.info{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
    gap:16px;
    margin-bottom:30px;
}

.info p{
    background:#f8fafc;
    padding:15px 18px;
    border-radius:var(--radius-md);
    border-left:5px solid var(--teal);
    font-size:15px;
    line-height:1.5;
    transition:var(--transition);
}

.info p:hover{
    background:#eef4f4;
}

.info strong{
    color:var(--azul-escuro);
}

hr{
    border:none;
    border-top:1px solid #e4e8ee;
    margin:30px 0;
}

h2{
    font-size:20px;
    margin-bottom:18px;
    color:var(--azul-escuro);
}

h3{
    font-size:17px;
    margin-bottom:14px;
    color:var(--azul-escuro);
}

.symptoms-tags{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
}

.tag{
    background:var(--teal);
    color:white;
    padding:9px 18px;
    border-radius:30px;
    font-size:14px;
    font-weight:600;
    transition:var(--transition);
    cursor:default;
}

.tag:hover{
    transform:translateY(-3px);
    box-shadow:0 5px 15px rgba(0,124,119,.3);
}

.acoes{
    margin-top:40px;
    display:flex;
    justify-content:flex-end;
}

.acoes{
    margin-top:40px;
    display:flex;
    justify-content:center; /* antes era flex-end */
}

.btn-encaminhar{
    background:linear-gradient(135deg, #00c9b7, #009688);
    color:white;
    border:none;
    border-radius:50px;
    padding:16px 40px;
    font-size:17px;
    font-weight:700;
    letter-spacing:.3px;
    cursor:pointer;
    transition:var(--transition);
    box-shadow:0 6px 16px rgba(0,150,136,.35);
}

.btn-encaminhar:hover{
    background:linear-gradient(135deg, #00b3a1, #00796B);
    transform:translateY(-4px);
    box-shadow:0 10px 24px rgba(0,150,136,.45);
}

.btn-encaminhar:active{
    transform:translateY(-1px);
    box-shadow:0 4px 10px rgba(0,150,136,.35);
}

.modal{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.55);
    display:none;
    justify-content:center;
    align-items:center;
    z-index:1000;
    animation:fadeIn .2s ease;
}

@keyframes fadeIn{
    from{opacity:0;}
    to{opacity:1;}
}

.modal-content{
    background:white;
    width:550px;
    max-width:90%;
    border-radius:15px;
    padding:35px 40px;
    text-align:center;
    box-shadow:0 20px 50px rgba(0,0,0,.25);
    animation:slideUp .25s ease;
}

@keyframes slideUp{
    from{opacity:0; transform:translateY(15px);}
    to{opacity:1; transform:translateY(0);}
}

.modal-content h2{
    margin-bottom:20px;
    color:var(--azul-escuro);
}

.modal-content p{
    font-size:17px;
    line-height:1.6;
    color:var(--text-muted);
}

.botoes{
    display:flex;
    justify-content:space-between;
    gap:15px;
    margin-top:35px;
}

#cancelar,
#confirmar{
    flex:1;
    max-width:180px;
    padding:15px;
    border:none;
    border-radius:10px;
    cursor:pointer;
    font-size:16px;
    font-weight:600;
    transition:var(--transition);
}

#cancelar{
    background:#e4e8ee;
    color:#333;
}

#cancelar:hover{
    background:#d5dae2;
}

#confirmar{
    background:var(--teal-light);
    color:white;
}

#confirmar:hover{
    background:var(--teal-dark);
}

@media(max-width:700px){
    body{
        padding:20px;
    }

    .card-body{
        padding:25px;
    }

    #imagem{
        height:220px;
    }

    #nomeUnidade{
        font-size:26px;
    }

    .info{
        grid-template-columns:1fr;
    }

    .modal-content{
        padding:25px;
    }

    .botoes{
        flex-direction:column;
    }

    #cancelar,
    #confirmar{
        max-width:100%;
    }
}