/* FINCONEX ERP — Login refinado Visual 3.0
   Escopo somente visual. Não altera autenticação, sessão, CSRF ou banco. */

:root {
    --fx-navy: #06163c;
    --fx-navy-2: #0a2458;
    --fx-blue: #00a6e8;
    --fx-purple: #7b1f78;
    --fx-bg: #f5f3f6;
    --fx-text: #171526;
    --fx-muted: #6f6878;
    --fx-line: #e5e0e8;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; margin: 0; }

body.finconex-login-refined {
    min-height: 100vh;
    background: var(--fx-bg) !important;
    color: var(--fx-text) !important;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    overflow-x: hidden;
}

.login-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(440px, .95fr);
}

.login-brand {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(34px, 4vw, 58px);
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 94, 44, .26), transparent 30%),
        radial-gradient(circle at 82% 45%, rgba(123, 31, 120, .36), transparent 34%),
        linear-gradient(112deg, #130914 0%, #1b0719 48%, #17071e 100%);
}

.login-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    opacity: .18;
    background-image:
        linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 84%, transparent);
}

.login-brand__glow {
    position: absolute;
    z-index: -1;
    width: 420px;
    height: 420px;
    right: -150px;
    top: 33%;
    border-radius: 50%;
    background: rgba(123,31,120,.23);
    filter: blur(18px);
}

.login-brand__top {
    display: flex;
    align-items: center;
    gap: 18px;
}

.login-logo-box {
    width: clamp(180px, 20vw, 270px);
    min-height: 66px;
    display: flex;
    align-items: center;
    padding: 11px 16px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 18px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 18px 48px rgba(0,0,0,.18);
}

.login-logo {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.login-brand__caption {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.login-brand__caption strong { font-size: 15px; letter-spacing: .03em; }
.login-brand__caption span { font-size: 12px; color: rgba(255,255,255,.72); }

.login-brand__content { max-width: 760px; padding: 60px 0; }
.login-eyebrow {
    display: block;
    margin-bottom: 24px;
    color: #d65bc5;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .18em;
}

.login-brand h1 {
    max-width: 750px;
    margin: 0;
    color: #fff;
    font-size: clamp(48px, 5.3vw, 82px);
    line-height: 1.02;
    letter-spacing: -.052em;
    font-weight: 850;
}

.login-brand__content p {
    max-width: 640px;
    margin: 24px 0 0;
    color: rgba(255,255,255,.82);
    font-size: clamp(15px, 1.25vw, 18px);
    line-height: 1.65;
}

.login-brand__footer { display: flex; flex-wrap: wrap; gap: 10px; }
.login-brand__footer span {
    padding: 10px 15px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.9);
    font-size: 12px;
}

.login-access {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 38px;
    background:
        radial-gradient(circle at 80% 18%, rgba(123,31,120,.06), transparent 28%),
        #f4f2f5;
}

.login-card {
    width: min(100%, 430px);
    padding: 38px 34px 32px;
    border: 1px solid rgba(23,21,38,.08);
    border-radius: 24px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 24px 70px rgba(37,25,48,.10);
}

.login-card__badge {
    color: var(--fx-purple);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .16em;
}
.login-card__header h2 {
    margin: 13px 0 6px;
    color: var(--fx-text);
    font-size: 31px;
    line-height: 1.08;
    letter-spacing: -.04em;
}
.login-card__header p { margin: 0; color: var(--fx-muted); font-size: 14px; line-height: 1.5; }

.login-form { margin-top: 24px; }
.login-access-switch {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 6px;
    padding: 5px;
    margin-bottom: 20px;
    border: 1px solid var(--fx-line);
    border-radius: 15px;
    background: #f7f5f8;
}
.login-access-option {
    min-width: 0;
    min-height: 54px;
    padding: 8px 5px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: #756d7d;
    cursor: pointer;
    transition: .18s ease;
}
.login-access-option strong, .login-access-option span { display: block; }
.login-access-option strong { font-size: 11px; }
.login-access-option span { margin-top: 3px; font-size: 8.5px; opacity: .8; }
.login-access-option:hover { background: #fff; }
.login-access-option.is-active {
    color: #fff;
    background: linear-gradient(135deg, #731d73, #8c247f);
    box-shadow: 0 9px 20px rgba(123,31,120,.22);
}

.login-alert {
    margin-bottom: 16px;
    padding: 11px 13px;
    border-radius: 11px;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 650;
}
.login-alert--success { border: 1px solid #a7e8c6; background: #effcf5; color: #087443; }
.login-alert--error { border: 1px solid #f3b9be; background: #fff2f3; color: #a82935; }

.login-field { display: block; margin-top: 17px; }
.login-field > span:first-child {
    display: block;
    margin-bottom: 7px;
    color: #272333;
    font-size: 12px;
    font-weight: 800;
}
.login-control {
    height: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border: 1px solid #d9d2de;
    border-radius: 12px;
    background: #eef3fb;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.login-control:focus-within {
    border-color: #8c247f;
    background: #f4f7fc;
    box-shadow: 0 0 0 3px rgba(123,31,120,.12);
}
.login-control > svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: none;
    stroke: #6e6a7a;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.login-control input {
    width: 100%;
    min-width: 0;
    height: 46px;
    padding: 0;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #181523 !important;
    font: inherit;
    font-size: 13px;
}
.login-control input::placeholder { color: #9a93a1; }
.login-password-toggle {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    cursor: pointer;
}
.login-password-toggle:hover { background: rgba(123,31,120,.08); }
.login-password-toggle svg { width: 17px; height: 17px; fill: none; stroke: #6e6a7a; stroke-width: 1.7; }

.login-submit {
    width: 100%;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 22px;
    padding: 0 16px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #731d73, #8b247c);
    color: #fff;
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(123,31,120,.22);
    transition: transform .18s ease, box-shadow .18s ease;
}
.login-submit:hover { transform: translateY(-1px); box-shadow: 0 16px 32px rgba(123,31,120,.28); }
.login-submit svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.login-links { display: flex; justify-content: space-between; gap: 14px; margin-top: 16px; }
.login-links a { color: var(--fx-purple); font-size: 11px; font-weight: 750; text-decoration: none; }
.login-links a:hover { text-decoration: underline; }
.login-note { margin: 24px 0 0; padding-top: 17px; border-top: 1px solid var(--fx-line); color: #8a8390; font-size: 10.5px; line-height: 1.5; }
.login-prestador-help { margin-top: 13px; padding: 12px; border-radius: 11px; background: #f7f4f8; font-size: 11px; color: #6f6878; }
.login-prestador-help a { margin-left: 5px; color: var(--fx-purple); font-weight: 800; text-decoration: none; }

@media (max-width: 1050px) {
    .login-layout { grid-template-columns: minmax(0,1fr) minmax(390px,.92fr); }
    .login-brand h1 { font-size: clamp(42px, 5.6vw, 66px); }
    .login-brand__caption { display: none; }
}

@media (max-width: 820px) {
    .login-layout { grid-template-columns: 1fr; }
    .login-brand { min-height: auto; padding: 28px; }
    .login-brand__content { padding: 42px 0 24px; }
    .login-brand h1 { max-width: 650px; font-size: clamp(35px, 9vw, 54px); }
    .login-brand__footer, .login-brand__content p { display: none; }
    .login-logo-box { width: 230px; }
    .login-access { min-height: auto; padding: 28px 18px 42px; }
}

@media (max-width: 520px) {
    .login-brand { padding: 22px 18px; }
    .login-brand__content { padding: 30px 0 8px; }
    .login-eyebrow { margin-bottom: 14px; font-size: 9px; }
    .login-brand h1 { font-size: 34px; }
    .login-logo-box { width: 205px; min-height: 56px; }
    .login-access { padding: 16px 10px 28px; }
    .login-card { padding: 28px 19px 24px; border-radius: 19px; }
    .login-access-switch { grid-template-columns: 1fr; }
    .login-access-option { min-height: 43px; }
    .login-access-option span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
