/* ==========================================================================
   Telas de acesso (Login / Recuperar senha / Alterar senha)
   Mesmo padrão visual do SIGP 4.0 — identidade InfoPublic
   ========================================================================== */

body.controller-login {
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(90% 70% at 100% 0%, rgba(34, 211, 197, .28), transparent 60%),
        linear-gradient(135deg, #0B2D4A 0%, #0c4356 55%, #0F766E 130%) !important;
    background-attachment: fixed !important;
    font-family: var(--ip-font, 'Inter', system-ui, sans-serif);
}

/* Marca d'água: símbolo da marca, semitransparente, na lateral da página */
body.controller-login::before {
    content: "";
    position: fixed;
    top: 0;
    bottom: 0;
    right: -4vw;
    height: 100vh;
    aspect-ratio: 124 / 145;
    background: url('../img/brand/simbolo-infopublic-branco.svg') no-repeat center / contain;
    opacity: .10;
    pointer-events: none;
    z-index: 0;
}

body.controller-login > .footer { display: none !important; }

.controller-login main[role="main"] {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem !important;
}

.ip-login-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.ip-login-page__copy {
    margin: 1.25rem 0 0;
    color: rgba(255, 255, 255, .7);
    font-size: .8rem;
    text-align: center;
}

/* ---------- Cartão em duas colunas ---------- */
.ip-login {
    display: flex;
    width: 100%;
    max-width: 1060px;
    min-height: 620px;
    border-radius: 24px;
    overflow: hidden;
    background: #f3f5f6;
    box-shadow: 0 30px 70px rgba(2, 20, 30, .45);
    text-align: left;
}

/* ---------- Painel esquerdo ---------- */
.ip-login__brand {
    position: relative;
    flex: 0 0 50%;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(110% 75% at 100% 0%, rgba(34, 211, 197, .42), transparent 58%),
        linear-gradient(160deg, #0F766E 0%, #0d4d5e 45%, #0B2D4A 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 3.25rem;
}

.ip-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(34, 211, 197, .09);
    pointer-events: none;
}
.ip-circle--1 { width: 280px; height: 280px; top: -110px; right: -70px; }
.ip-circle--2 { width: 190px; height: 190px; bottom: 120px; left: -100px; }
.ip-circle--3 { width: 240px; height: 240px; bottom: -90px; left: -40px; }

.ip-login__brand-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    text-align: center;
}

.ip-login__logo {
    display: block;
    width: 280px;
    max-width: 85%;
    height: auto;
    margin: 0 auto 2rem;
}

.ip-login__brand-title {
    margin: 0 0 .9rem;
    color: #fff !important;
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.01em;
    text-align: center;
}

.ip-login__brand-text {
    max-width: 360px;
    margin: 0 auto 2rem;
    color: rgba(255, 255, 255, .92);
    font-size: .98rem;
    line-height: 1.55;
}

.ip-features {
    display: flex;
    flex-direction: column;
    gap: .9rem;
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: left;
}

.ip-features li {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: .9rem 1.1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, .11);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.ip-features__icon {
    display: flex;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .26);
    color: #fff;
}

.ip-features strong {
    display: block;
    color: #fff;
    font-size: .95rem;
    font-weight: 600;
}

.ip-features small {
    display: block;
    margin-top: 2px;
    color: rgba(255, 255, 255, .85);
    font-size: .78rem;
}

/* ---------- Painel direito ---------- */
.ip-login__panel {
    display: flex;
    flex: 1 1 50%;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 3.25rem;
    background: #f3f5f6;
}

.ip-login__panel form { margin: 0; }

.ip-login__head {
    position: relative;
    margin-bottom: 1.9rem;
}

.ip-login__head h1 {
    margin: 0 0 .5rem;
    padding-right: 2rem;
    color: #1a2233;
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: -.01em;
}

.ip-login__head p {
    margin: 0;
    color: #6f7f96;
    font-size: .95rem;
}

.ip-login__close {
    position: absolute;
    top: 0;
    right: 0;
    padding: 4px 8px;
    border-radius: 8px;
    color: #7d8ba3;
    font-size: 1.05rem;
    text-decoration: none;
}
.ip-login__close:hover { color: #0F766E; background: rgba(15, 118, 110, .08); }

/* Alertas */
.ip-alert {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    margin-bottom: 1.15rem;
    padding: .8rem 1rem;
    border: 1px solid rgba(220, 53, 69, .25);
    border-radius: 12px;
    background: #fdecee;
    color: #a4212f;
    font-size: .88rem;
    font-weight: 500;
}
.ip-alert i { margin-top: 1px; }

/* Campos */
.ip-field { margin-bottom: 1.15rem; }

.ip-field label {
    display: block;
    margin-bottom: .45rem;
    color: #2f3a4e;
    font-size: .9rem;
    font-weight: 600;
}

.ip-input {
    position: relative;
    display: flex;
    align-items: center;
}

.ip-input__icon {
    position: absolute;
    left: 16px;
    z-index: 2;
    color: #9aa7bd;
    pointer-events: none;
    transition: color .2s ease;
}

.ip-input .form-control {
    width: 100%;
    height: 54px;
    padding: 0 3rem !important;
    border: 2px solid #dce4f3;
    border-radius: 14px !important;
    background: #e9effc;
    color: #1a2233;
    font-size: .95rem;
    box-shadow: none;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.ip-input .form-control::placeholder { color: #8b98ae; }

.ip-input .form-control:focus {
    outline: 0;
    border-color: #0F766E;
    background: #eaf0fe;
    box-shadow: 0 0 0 4px rgba(15, 118, 110, .14);
}

.ip-input:focus-within .ip-input__icon { color: #0F766E; }

.ip-input__toggle {
    position: absolute;
    right: 6px;
    z-index: 2;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent !important;
    color: #7d8ba3;
    box-shadow: none !important;
    cursor: pointer;
}
.ip-input__toggle:hover { color: #0F766E; }

/* Links */
.ip-login__links {
    display: flex;
    justify-content: center;
    margin-top: 1.1rem;
}

.ip-login__links a {
    color: #0F766E;
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
}
.ip-login__links a:hover { color: #0b5f59; text-decoration: underline; }

/* Botões */
.ip-btn {
    display: inline-flex;
    height: 54px;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    padding: 0 1.5rem;
    border: 0;
    border-radius: 14px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease, background-color .18s ease;
}

.ip-btn--primary {
    width: 100%;
    margin-top: .35rem;
    color: #fff;
    background: linear-gradient(100deg, #0F766E 0%, #0B2D4A 100%);
    box-shadow: 0 10px 24px rgba(15, 118, 110, .28);
}
.ip-btn--primary:hover:not(:disabled) {
    color: #fff;
    transform: translateY(-1px);
    filter: brightness(1.08);
    box-shadow: 0 14px 28px rgba(15, 118, 110, .36);
}
.ip-btn--primary:active:not(:disabled) { transform: translateY(0); }

.ip-btn--ghost {
    border: 1px solid #d5dce8;
    background: #fff;
    color: #475569;
}
.ip-btn--ghost:hover { background: #eef2f7; color: #334155; }

.ip-btn:disabled { opacity: .6; cursor: not-allowed; box-shadow: none; }

.ip-login__actions-row {
    display: flex;
    gap: .75rem;
    margin-top: 1.4rem;
}
.ip-login__actions-row .ip-btn--ghost { flex: 0 0 auto; min-width: 110px; }
.ip-login__actions-row .ip-btn--primary { flex: 1 1 auto; width: auto; margin-top: 0; }

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
    .ip-login { flex-direction: column; max-width: 520px; min-height: 0; }
    .ip-login__brand { flex: 0 0 auto; padding: 2rem 1.75rem; }
    .ip-features { display: none; }
    .ip-login__brand-text { margin-bottom: 0; }
    .ip-login__logo { width: 210px; margin-bottom: 1.25rem; }
    .ip-login__brand-title { font-size: 1.3rem; }
    .ip-login__panel { padding: 2rem 1.75rem 2.25rem; }
    body.controller-login::before { right: -35vw; opacity: .06; }
}

@media (max-width: 480px) {
    .controller-login main[role="main"] { padding: 1rem .75rem !important; }
    .ip-login { border-radius: 18px; }
    .ip-login__panel { padding: 1.75rem 1.25rem 2rem; }
    .ip-login__head h1 { font-size: 1.5rem; }
}

/* Garante as cores dos links-botão acima das regras globais de <a> */
.ip-login a.ip-btn--ghost,
.ip-login a.ip-btn--ghost:hover { color: #475569; text-decoration: none; }
.ip-login a.ip-login__close { color: #7d8ba3; }
.ip-login a.ip-login__close:hover { color: #0F766E; }
.ip-login .ip-login__links a { color: #0F766E; }
.ip-login .ip-login__links a:hover { color: #0b5f59; }
