/* Telas de autenticação — Gestor RDV
   Escopo: somente classes .lg-* ; carregado apenas por login-form.php */

.lg-root {
    --lg-brand: #2750ac;
    --lg-brand-hover: #1f4190;
    --lg-brand-deep: #14295c;
    --lg-brand-mid: #1d3b82;
    --lg-accent: #7fb2ff;
    --lg-bg: #ffffff;
    --lg-text: #1c2434;
    --lg-muted: #566074;
    --lg-border: #b9c2d3;
    --lg-border-hover: #7d8ba6;
    --lg-focus: #2750ac;
    --lg-danger-bg: #fdecec;
    --lg-danger-border: #e5a3a3;
    --lg-danger-text: #8c1d1d;
    --lg-radius: 10px;

    position: fixed;
    inset: 0;
    display: grid;
    grid-template-columns: 1fr;
    overflow-y: auto;
    background: var(--lg-bg);
    color: var(--lg-text);
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    text-align: left;
    z-index: 1000;
}

.lg-root *,
.lg-root *::before,
.lg-root *::after {
    box-sizing: border-box;
}

/* Neutraliza fontes do tema Bootstrap (Litera) dentro da tela */
.lg-root p,
.lg-root a,
.lg-root strong,
.lg-root li,
.lg-root h1,
.lg-root h2,
.lg-root label,
.lg-root span {
    font-family: inherit;
}

/* ---------- Painel decorativo ---------- */
.lg-panel {
    display: none;
    position: relative;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(155deg, var(--lg-brand-mid) 0%, var(--lg-brand-deep) 100%);
}

.lg-panel-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 56px 56px 40px;
    gap: 24px;
}

.lg-panel-title {
    margin: 0 0 12px;
    max-width: 18ch;
    font-size: clamp(1.75rem, 2.6vw, 2.5rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.lg-panel-text {
    margin: 0;
    max-width: 44ch;
    font-size: 1.0625rem;
    color: #dbe6fb;
}

.lg-panel-art {
    width: 100%;
    max-width: 520px;
    height: auto;
    align-self: center;
}

.lg-panel-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lg-panel-list li {
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    font-size: .875rem;
    font-weight: 600;
    color: #eaf1ff;
}

.lg-float {
    animation: lg-float 6s ease-in-out infinite;
}

.lg-float-2 {
    animation-delay: -3s;
}

@keyframes lg-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ---------- Coluna do formulário ---------- */
.lg-main {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    padding: 32px 20px;
}

.lg-box {
    width: 100%;
    max-width: 400px;
}

.lg-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 32px;
}

.lg-logo {
    display: block;
    width: 160px;
    max-width: 50%;
    height: auto;
}

.lg-brand-rdv {
    padding-left: 16px;
    border-left: 2px solid var(--lg-border);
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .04em;
    color: var(--lg-brand);
}

.lg-panel-brand {
    margin: 0 0 16px;
    font-size: clamp(3rem, 6vw, 5.5rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: .06em;
    color: #fff;
}

.lg-title {
    margin: 0 0 6px;
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--lg-text);
}

.lg-sub {
    margin: 0 0 28px;
    color: var(--lg-muted);
}

.lg-alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 0 0 20px;
    padding: 12px 14px;
    border: 1px solid var(--lg-danger-border);
    border-radius: var(--lg-radius);
    background: var(--lg-danger-bg);
    color: var(--lg-danger-text);
    font-size: .9375rem;
}

.lg-alert svg {
    flex: none;
    margin-top: 2px;
}

.lg-field {
    margin: 0 0 18px;
}

.lg-label {
    display: block;
    margin: 0 0 6px;
    font-size: .9375rem;
    font-weight: 600;
    color: var(--lg-text);
}

.lg-input-wrap {
    position: relative;
}

.lg-input {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    border: 1.5px solid var(--lg-border);
    border-radius: var(--lg-radius);
    background: #fff;
    color: var(--lg-text);
    font: inherit;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.lg-input::placeholder {
    color: #6b7589;
}

.lg-input:hover {
    border-color: var(--lg-border-hover);
}

.lg-input:focus {
    outline: none;
    border-color: var(--lg-focus);
    box-shadow: 0 0 0 3px rgba(39, 80, 172, .25);
}

.lg-input-wrap .lg-input {
    padding-right: 52px;
}

.lg-eye {
    position: absolute;
    top: 50%;
    right: 2px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--lg-muted);
    cursor: pointer;
}

.lg-eye:hover {
    color: var(--lg-brand);
    background: #eef2fa;
}

.lg-eye .lg-eye-off {
    display: none;
}

.lg-eye[aria-pressed="true"] .lg-eye-on {
    display: none;
}

.lg-eye[aria-pressed="true"] .lg-eye-off {
    display: block;
}

.lg-btn,
.lg-btn-sec {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    padding: 10px 20px;
    border-radius: var(--lg-radius);
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.lg-btn {
    margin-top: 8px;
    border: 1.5px solid var(--lg-brand);
    background: var(--lg-brand);
    color: #fff;
}

.lg-btn:hover {
    background: var(--lg-brand-hover);
    border-color: var(--lg-brand-hover);
}

.lg-btn:disabled {
    cursor: not-allowed;
    opacity: .85;
}

/* Botão secundário: outline, sem sombra */
.lg-btn-sec {
    border: 1.5px solid var(--lg-border);
    background: transparent;
    color: var(--lg-brand);
    box-shadow: none;
}

.lg-btn-sec:hover {
    border-color: var(--lg-brand);
    background: #eef2fa;
    color: var(--lg-brand-hover);
}

.lg-btn:focus-visible,
.lg-btn-sec:focus-visible,
.lg-eye:focus-visible,
.lg-link:focus-visible {
    outline: 3px solid var(--lg-focus);
    outline-offset: 2px;
}

.lg-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lg-spin .7s linear infinite;
}

.lg-btn.is-loading .lg-spinner {
    display: inline-block;
}

.lg-btn.is-loading .lg-btn-icon {
    display: none;
}

@keyframes lg-spin {
    to { transform: rotate(360deg); }
}

.lg-link {
    color: var(--lg-brand);
    font-weight: 600;
}

.lg-link:hover {
    color: var(--lg-brand-hover);
}

.lg-foot {
    margin: 32px 0 0;
    padding-top: 20px;
    border-top: 1px solid #e1e6f0;
    font-size: .8125rem;
    color: var(--lg-muted);
}

/* Mensagem do captcha (quando presente) */
.lg-captcha-msg {
    margin: 6px 0 0;
    font-size: .875rem;
    color: var(--lg-danger-text);
}

.lg-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Desktop: split-screen 54/46 ---------- */
@media (min-width: 992px) {
    .lg-root {
        grid-template-columns: 54fr 46fr;
        overflow: hidden;
    }

    .lg-panel {
        display: block;
    }

    .lg-main {
        overflow-y: auto;
        padding: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lg-root *,
    .lg-root *::before,
    .lg-root *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* ---------- Recuperação de senha ---------- */
.lg-alert-ok {
    border-color: #9fd3b0;
    background: #eaf7ee;
    color: #14532d;
}

a.lg-btn-link {
    text-decoration: none;
    text-align: center;
}

a.lg-btn-link:hover {
    color: #fff;
}

.lg-forgot {
    margin: -6px 0 4px;
    text-align: right;
    font-size: .875rem;
}

.lg-forgot .lg-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}
