@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@300..700&display=swap');

:root {
    --font-primary: "Comfortaa", sans-serif;
    --login-navy: #0d1747;
    --login-green: #53966b;
    --login-ink: #18243a;
    --login-muted: #6f7888;
    --login-line: #dce3e8;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; font-family: var(--font-primary); }
body {
    min-height: 100vh;
    color: var(--login-ink);
    background: linear-gradient(120deg, rgba(13,23,71,.82), rgba(26,75,72,.58)), url('../img/bg-medico.jpg') center center / cover no-repeat fixed;
}

.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 42px 24px 28px;
}

.login-card {
    width: min(900px, 100%);
    min-height: 520px;
    display: grid;
    grid-template-columns: minmax(300px, .82fr) minmax(430px, 1.18fr);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(5,16,43,.3);
}

.brand-area {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 25px;
    padding: 42px 30px;
    color: #fff;
    text-align: center;
    background: radial-gradient(circle at 90% 12%, rgba(255,255,255,.12) 0 78px, transparent 79px), radial-gradient(circle at 90% 12%, rgba(255,255,255,.07) 0 124px, transparent 125px), linear-gradient(145deg, var(--login-navy), #183756 62%, #397c5a 130%);
}
.brand-area::after { content: ""; position: absolute; left: -90px; bottom: -120px; width: 270px; height: 270px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; }
.brand-box { position: relative; z-index: 1; width: 245px; height: 245px; display: grid; place-items: center; }
.brand-box img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.brand-area p { position: relative; z-index: 1; max-width: 265px; color: rgba(255,255,255,.72); font-size: 11px; line-height: 1.7; }

.form-area { display: flex; flex-direction: column; justify-content: center; padding: 48px 58px; background: linear-gradient(145deg, #fff 0%, #fbfcfd 100%); }
.login-heading { margin-bottom: 25px; }
.login-heading > span { color: var(--login-green); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.login-heading h1 { margin: 8px 0 9px; color: var(--login-ink); font-size: 34px; line-height: 1.1; font-weight: 600; letter-spacing: -.035em; }
.login-heading p { max-width: 410px; color: var(--login-muted); font-size: 11px; line-height: 1.65; }

.error-message { display: grid; grid-template-columns: 32px 1fr; align-items: center; gap: 10px; margin-bottom: 19px; padding: 11px 13px; border: 1px solid #efc5c5; border-radius: 11px; color: #8c3030; background: #fff5f5; }
.error-message > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #bf4c4c; font-size: 13px; font-weight: 700; }
.error-message strong, .error-message small { display: block; }
.error-message strong { margin-bottom: 3px; font-size: 10px; }
.error-message small { color: #a05b5b; font-size: 9px; line-height: 1.4; }

.form-field { display: grid; gap: 8px; margin-bottom: 17px; }
.form-field label { color: #465268; font-size: 10px; font-weight: 700; }
.form-field input { width: 100%; height: 49px; border: 1px solid var(--login-line); border-radius: 11px; outline: none; padding: 0 15px; color: var(--login-ink); background: #fff; font: 500 11px var(--font-primary); transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.form-field input::placeholder { color: #9aa3af; }
.form-field input:hover { border-color: #bdc9c1; }
.form-field input:focus { border-color: var(--login-green); box-shadow: 0 0 0 4px rgba(83,150,107,.13); }

.password-wrapper { display: grid; grid-template-columns: minmax(0,1fr) 62px; }
.password-wrapper input { border-radius: 11px 0 0 11px; }
.password-wrapper button { border: 1px solid #b9d1c1; border-left: 0; border-radius: 0 11px 11px 0; color: #407454; background: #eff7f1; cursor: pointer; font: 700 9px var(--font-primary); }
.password-wrapper button:hover { background: #e5f1e8; }
.password-wrapper:focus-within button { border-color: var(--login-green); }

.login-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 5px; }
.forgot-link { color: #557087; font-size: 9px; text-decoration: none; }
.forgot-link:hover { color: var(--login-green); text-decoration: underline; }
.login-button { min-width: 145px; height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 15px; border: 0; border-radius: 999px; color: #fff; background: linear-gradient(110deg, #407e57, var(--login-green)); box-shadow: 0 10px 24px rgba(63,126,86,.2); cursor: pointer; font: 700 11px var(--font-primary); transition: transform .2s ease, box-shadow .2s ease, filter .2s ease; }
.login-button b { font-size: 17px; font-weight: 400; line-height: 1; }
.login-button:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(63,126,86,.28); filter: brightness(1.04); }
.login-button:focus-visible, .forgot-link:focus-visible, .password-wrapper button:focus-visible { outline: 3px solid rgba(83,150,107,.28); outline-offset: 3px; }

footer { color: rgba(255,255,255,.78); font-size: 10px; font-weight: 500; text-align: center; text-shadow: 0 1px 5px rgba(0,0,0,.2); }

@media (max-width: 820px) {
    body { background-attachment: scroll; }
    .login-page { justify-content: flex-start; padding: 22px 14px 18px; }
    .login-card { width: min(520px,100%); min-height: 0; grid-template-columns: 1fr; border-radius: 22px; }
    .brand-area { min-height: 154px; padding: 20px; }
    .brand-box { width: 185px; height: 105px; }
    .brand-area p { display: none; }
    .form-area { padding: 30px 28px 32px; }
    .login-heading { margin-bottom: 22px; }
    .login-heading h1 { font-size: 29px; }
}

@media (max-width: 430px) {
    .login-page { padding: 12px 10px 16px; gap: 16px; }
    .login-card { border-radius: 18px; }
    .brand-area { min-height: 126px; padding: 13px; }
    .brand-box { width: 160px; height: 90px; }
    .form-area { padding: 25px 21px 26px; }
    .login-heading h1 { font-size: 27px; }
    .login-actions { align-items: stretch; flex-direction: column-reverse; gap: 15px; }
    .login-button { width: 100%; }
    .forgot-link { text-align: center; }
    footer { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }
/* Canais confidenciais disponíveis sem autenticação. */
.confidential-channels{margin-top:22px;padding-top:18px;border-top:1px solid #dbe5e8}.confidential-channels>span{display:block;margin-bottom:10px;color:#587078;font-size:12px;font-weight:700}.confidential-channels>div{display:grid;grid-template-columns:1fr 1fr;gap:9px}.confidential-channels a{padding:10px 12px;border:1px solid #bdd2d7;border-radius:10px;color:#174d65;text-align:center;text-decoration:none;font-size:12px;font-weight:700;background:#f7fbfb}.confidential-channels a:hover{border-color:#4c9871;background:#eef8f2}@media(max-width:520px){.confidential-channels>div{grid-template-columns:1fr}}
