@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

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

html, body {
    width: 100%;
    height: 100%;
    font-family: 'Inter', Arial, sans-serif;
    overflow: hidden;
}

/* ============================================================
   LAYOUT PRINCIPAL — split screen full height
   ============================================================ */

.login-split {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* ============================================================
   LADO ESQUERDO — painel azul full height
   ============================================================ */

.login-left {
    flex: 0 0 58%;
    background: radial-gradient(ellipse at 20% 15%, #0a1f48 0%, #041230 55%, #020a1e 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 52px 60px;
    overflow: hidden;
    color: #fff;
}

/* Grid técnico de fundo */
.login-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 87, 212, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 87, 212, 0.07) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

/* Orb azul canto superior */
.login-left::after {
    content: '';
    position: absolute;
    top: -160px;
    left: -100px;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 70, 200, 0.35) 0%, transparent 70%);
    pointer-events: none;
    filter: blur(40px);
}

/* Orb inferior direito */
.glow-br {
    position: absolute;
    bottom: -120px;
    right: -80px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 87, 212, 0.22) 0%, transparent 70%);
    pointer-events: none;
    filter: blur(50px);
    z-index: 0;
}

/* Linha decorativa vertical */
.login-left-line {
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 87, 212, 0.4) 30%, rgba(0, 87, 212, 0.4) 70%, transparent 100%);
    z-index: 2;
}

/* Tudo acima do pseudo-elemento */
.login-left > * { position: relative; z-index: 2; }

/* Brand */
.brand {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 52px;
}

.brand-icon {
    width: 58px;
    height: 58px;
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.brand h1 {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 0.08em;
    margin: 0 0 4px;
    line-height: 1;
}

.brand span {
    font-size: 10.5px;
    opacity: 0.6;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

/* Hero text */
.login-hero {
    margin-bottom: 44px;
}

.login-hero h2 {
    font-size: 2.6rem;
    font-weight: 900;
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    color: #fff;
}

.login-hero h2 span {
    background: linear-gradient(90deg, #60a5fa, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-hero p {
    font-size: 14.5px;
    line-height: 1.7;
    opacity: 0.65;
    max-width: 400px;
    font-weight: 400;
}

/* Features */
.features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
    margin-bottom: 36px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    transition: background .2s;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.07);
}

.feature-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-item strong {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    margin-bottom: 2px;
}

.feature-item span {
    font-size: 12px;
    opacity: 0.6;
    font-weight: 400;
}

/* SSL badge */
.ssl-badge {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 28px;
}

.ssl-badge-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ssl-badge strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 2px;
}

.ssl-badge span {
    font-size: 11.5px;
    opacity: 0.6;
}

.ssl-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    margin-left: auto;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.8);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 10px rgba(34, 197, 94, 0.8); }
    50%       { opacity: 0.7; box-shadow: 0 0 18px rgba(34, 197, 94, 0.5); }
}

/* Footer esquerdo */
.left-footer {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 400;
    letter-spacing: 0.02em;
}

.left-footer strong {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 700;
}

.left-footer .sep {
    margin: 0 8px;
    opacity: 0.4;
}

/* ============================================================
   LADO DIREITO — painel branco com formulário
   ============================================================ */

.login-right {
    flex: 0 0 42%;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 52px;
    position: relative;
    overflow-y: auto;
}

/* Linha sutil de topo a baixo */
.login-right::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #003087, #0057d4, #60a5fa);
}

.login-form-inner {
    width: 100%;
    max-width: 380px;
}

/* Logo no formulário */
.form-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 36px;
}

.form-logo {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #003087, #0057d4);
    color: #fff;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.04em;
    flex-shrink: 0;
    box-shadow: 0 8px 22px rgba(0, 55, 145, 0.28);
}

.form-brand-text h2 {
    font-size: 21px;
    font-weight: 900;
    color: #0a1628;
    margin: 0 0 3px;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.form-brand-text p {
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
    font-weight: 400;
}

/* Divisor */
.form-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.form-divider-line {
    flex: 1;
    height: 1px;
    background: #f1f5f9;
}

.form-divider-label {
    font-size: 11px;
    font-weight: 700;
    color: #cbd5e1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Campos */
.field-group {
    margin-bottom: 18px;
}

/* Permissão de localização */
.field-toggle-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 22px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 12px;
}

.field-toggle {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 22px;
    flex-shrink: 0;
    margin-top: 2px;
}

.field-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.field-toggle-slider {
    position: absolute;
    inset: 0;
    background: #cbd5e1;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.field-toggle-slider::before {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.field-toggle input:checked + .field-toggle-slider {
    background: #0057d4;
}

.field-toggle input:checked + .field-toggle-slider::before {
    transform: translateX(16px);
}

.field-toggle-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.field-toggle-text strong {
    font-size: 12px;
    font-weight: 700;
    color: #374151;
}

.field-toggle-text span {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.5;
}

.field-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 8px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.field-wrap {
    position: relative;
}

.field-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    opacity: .6;
}

.field-input {
    width: 100%;
    border: 1.5px solid #e8eef6;
    border-radius: 12px;
    height: 52px;
    font-size: 14.5px;
    color: #0a1628;
    padding: 0 16px 0 44px;
    font-family: 'Inter', Arial, sans-serif;
    transition: border-color .2s, box-shadow .2s, background .2s;
    outline: none;
    background: #f8fafc;
}

.field-input:focus {
    border-color: #0057d4;
    background: #fff;
    box-shadow: 0 0 0 3.5px rgba(0, 87, 212, 0.1);
}

.field-input::placeholder {
    color: #c8d4e3;
    font-weight: 400;
}

.field-input-senha {
    padding-right: 44px;
}

.field-toggle-senha {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #9ca3af;
    opacity: .8;
}

.field-toggle-senha:hover {
    opacity: 1;
    color: #0057d4;
}

/* Botão entrar */
.btn-login {
    width: 100%;
    background: linear-gradient(135deg, #003087 0%, #0057d4 100%);
    color: #fff;
    border: none;
    border-radius: 13px;
    height: 54px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all .25s;
    letter-spacing: 0.02em;
    box-shadow: 0 8px 26px rgba(0, 55, 145, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Inter', Arial, sans-serif;
    margin-top: 6px;
}

.btn-login:hover {
    background: linear-gradient(135deg, #002266 0%, #003087 100%);
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(0, 55, 145, 0.38);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 6px 16px rgba(0, 55, 145, 0.22);
}

/* Links extras (esqueci senha / solicitar acesso) */
.form-extra-links {
    margin-top: 16px;
    text-align: center;
    font-size: 12.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.form-extra-links a {
    color: #0057d4;
    text-decoration: none;
    transition: color 0.2s;
}

.form-extra-links a:hover {
    color: #003791;
    text-decoration: underline;
}

.form-extra-links-sep {
    color: #c4cdd8;
}

/* Aviso de IP */
.ip-notice {
    margin-top: 22px;
    text-align: center;
    font-size: 11.5px;
    color: #c4cdd8;
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
    line-height: 1.5;
}

.ip-notice svg {
    flex-shrink: 0;
    margin-top: 1px;
}

/* Footer direito */
.right-footer {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 11px;
    color: #cbd5e1;
    font-weight: 400;
}

/* ============================================================
   RESPONSIVO
   ============================================================ */

/* ============================================================
   MODAIS PREMIUM (SweetAlert2) — Solicitar acesso / Recuperar senha
   ============================================================ */

.swal-premium-popup {
    border-radius: 20px !important;
    padding-bottom: 26px !important;
    text-align: left;
    font-family: 'Inter', Arial, sans-serif;
}

.swal-premium-popup .swal2-title {
    font-size: 22px;
    font-weight: 900;
    color: #0a1628;
    letter-spacing: -0.01em;
    padding: 28px 28px 0;
    text-align: left;
}

.swal-premium-popup .swal2-html-container {
    margin: 6px 0 0;
    padding: 0 28px;
}

.swal-premium-popup .swal2-icon {
    margin-top: 24px;
}

.swal-premium-subtitle {
    font-size: 13px;
    color: #94a3b8;
    margin: 0 0 20px;
    font-weight: 400;
    line-height: 1.5;
}

.swal-field-group {
    margin-bottom: 16px;
    text-align: left;
}

.swal-field-group:last-child {
    margin-bottom: 0;
}

.swal-field-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 6px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.swal-field-input,
.swal-field-select {
    width: 100% !important;
    border: 1.5px solid #e8eef6 !important;
    border-radius: 12px !important;
    height: 48px !important;
    font-size: 14px !important;
    color: #0a1628 !important;
    padding: 0 14px !important;
    font-family: 'Inter', Arial, sans-serif !important;
    background: #f8fafc !important;
    box-shadow: none !important;
    margin: 0 !important;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.swal-field-input:focus,
.swal-field-select:focus {
    border-color: #0057d4 !important;
    background: #fff !important;
    box-shadow: 0 0 0 3.5px rgba(0, 87, 212, 0.1) !important;
    outline: none;
}

.swal-field-input::placeholder {
    color: #c8d4e3;
    font-weight: 400;
}

.swal-premium-popup .swal2-actions {
    width: 100%;
    max-width: none;
    padding: 22px 28px 0;
    gap: 10px;
    margin: 0;
}

.swal-premium-popup .swal2-styled.swal2-confirm,
.swal-premium-popup .swal2-styled.swal2-cancel {
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    padding: 13px 22px !important;
    margin: 0 !important;
    flex: 1;
    transition: all .25s;
}

.swal-premium-popup .swal2-styled.swal2-confirm {
    background: linear-gradient(135deg, #003087 0%, #0057d4 100%) !important;
    box-shadow: 0 8px 22px rgba(0, 55, 145, 0.28) !important;
}

.swal-premium-popup .swal2-styled.swal2-confirm:hover {
    background: linear-gradient(135deg, #002266 0%, #003087 100%) !important;
    transform: translateY(-1px);
}

.swal-premium-popup .swal2-styled.swal2-cancel {
    background: #f1f5f9 !important;
    color: #64748b !important;
    box-shadow: none !important;
}

.swal-premium-popup .swal2-styled.swal2-cancel:hover {
    background: #e2e8f0 !important;
}

.swal-premium-popup .swal2-validation-message {
    border-radius: 10px;
    font-size: 12.5px;
    margin: 16px 28px 0;
    width: auto;
}

@media (max-width: 960px) {
    html, body { overflow: auto; }

    .login-split {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .login-left {
        flex: none;
        width: 100%;
        padding: 40px 28px;
    }

    .login-hero h2 { font-size: 1.9rem; }

    .login-right {
        flex: none;
        width: 100%;
        padding: 40px 28px 64px;
        justify-content: flex-start;
    }

    .login-form-inner {
        max-width: 100%;
    }

    .right-footer { position: static; margin-top: 28px; }
    .login-left-line { display: none; }
}
