/* ============================================================================
 * AITC - Login standalone (split-screen)
 * Mesmo layout do WEHA Payroll Hub, com a branding AITC (teal #02B7B7,
 * DM Sans). Light-only. Sem dependencia de Tailwind nem do brand.css.
 * ========================================================================== */
:root {
    --brand:       #02B7B7;
    --brand-dim:   #019C9C;
    --brand-deep:  #017F7F;
    --brand-darker:#014949;

    --ink:         #0F172A;
    --ink-strong:  #0B1220;
    --ink-soft:    #64748B;
    --ink-faint:   #94A3B8;

    --bg-paper:    #FFFFFF;
    --line:        #E2E8F0;
    --line-strong: #CBD5E1;
    --danger:      #D55A38;

    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
    font-family: 'DM Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-feature-settings: "ss01", "cv01";
    background: var(--bg-paper);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.login-shell { display: flex; min-height: 100vh; min-height: 100dvh; }

/* ============================================================================
 * BRAND PANEL (esquerda) - gradiente teal com profundidade
 * ========================================================================== */
.login-brand {
    position: relative;
    display: none;
    width: 48%;
    color: #fff;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(135deg, #017F7F 0%, #019C9C 38%, #02B7B7 72%, #016464 100%);
}
@media (min-width: 1024px) { .login-brand { display: flex; } }

/* radial wash pra dar volume */
.login-brand::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 18% 22%, rgba(255,255,255,.12), transparent 60%),
        radial-gradient(ellipse 60% 45% at 82% 82%, rgba(0,0,0,.20), transparent 60%);
    pointer-events: none;
    z-index: -1;
}
/* padrao de pontos sutil, com mascara radial */
.login-brand::after {
    content: '';
    position: absolute; inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.06) 1px, transparent 1.5px);
    background-size: 28px 28px;
    -webkit-mask-image: radial-gradient(ellipse 130% 100% at 50% 50%, #000 35%, transparent 100%);
            mask-image: radial-gradient(ellipse 130% 100% at 50% 50%, #000 35%, transparent 100%);
    pointer-events: none;
    z-index: -1;
}

.login-brand-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    padding: 48px 56px;
}

.login-b-head {
    display: flex;
    align-items: center;
    gap: 14px;
    animation: loginRise .7s var(--ease-out) .05s both;
}
.login-b-head .login-b-logo {
    display: inline-flex; align-items: center;
    background: #fff;
    border-radius: 11px;
    padding: 9px 13px;
    box-shadow: 0 10px 26px -12px rgba(0,0,0,.45);
}
.login-b-head .login-b-logo img { height: 36px; width: auto; display: block; }
.login-b-head .pipe { width: 1px; height: 26px; background: rgba(255,255,255,.28); }
.login-b-head .wm {
    font-size: 12px; font-weight: 600;
    letter-spacing: .24em; text-transform: uppercase;
    color: rgba(255,255,255,.85);
}
.login-b-head .wm small {
    display: block; margin-top: 3px;
    font-size: 10px; font-weight: 500;
    letter-spacing: .2em;
    color: rgba(255,255,255,.55);
}

.login-b-body {
    max-width: 460px;
    animation: loginRise .7s var(--ease-out) .2s both;
}
.login-b-body h1 {
    margin: 0;
    font-size: clamp(34px, 4.4vw, 48px);
    line-height: 1.08;
    letter-spacing: -0.03em;
    font-weight: 700;
}
.login-b-body p {
    margin: 18px 0 0;
    max-width: 380px;
    font-size: 15.5px; line-height: 1.6; font-weight: 400;
    color: rgba(255,255,255,.80);
}

.login-b-foot {
    display: flex; align-items: center; gap: 10px;
    font-size: 13px; color: rgba(255,255,255,.62);
    animation: loginRise .7s var(--ease-out) .35s both;
}
.login-b-foot svg { width: 14px; height: 14px; color: rgba(255,255,255,.55); }

/* ============================================================================
 * FORM PANEL (direita) - branco limpo
 * ========================================================================== */
.login-form {
    flex: 1;
    display: flex; align-items: center; justify-content: center;
    padding: 40px 24px;
    background: var(--bg-paper);
}
.login-form-inner { width: 100%; max-width: 384px; }

.login-mobile-logo { display: block; text-align: center; margin-bottom: 36px; }
.login-mobile-logo img { height: 56px; width: auto; }
@media (min-width: 1024px) { .login-mobile-logo { display: none; } }

.login-head { text-align: center; margin-bottom: 34px; animation: loginRise .55s var(--ease-out) .15s both; }
.login-head h2 {
    margin: 0 0 8px;
    font-size: 26px; font-weight: 700;
    letter-spacing: -0.022em;
    color: var(--ink-strong);
}
.login-head p { margin: 0; font-size: 14.5px; color: var(--ink-soft); }

.login-err {
    display: flex; align-items: flex-start; gap: 10px;
    margin-bottom: 22px;
    padding: 12px 14px;
    background: rgba(213, 90, 56, .07);
    border: 1px solid rgba(213, 90, 56, .26);
    color: var(--danger);
    border-radius: 10px;
    font-size: 13px; line-height: 1.45; font-weight: 500;
    animation: loginSlide .35s var(--ease-out);
}
.login-err svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }

.login-field { margin-bottom: 18px; animation: loginRise .5s var(--ease-out) both; }
.login-field:nth-of-type(1) { animation-delay: .22s; }
.login-field:nth-of-type(2) { animation-delay: .28s; }
.login-field label {
    display: block; margin-bottom: 7px;
    font-size: 13px; font-weight: 600;
    letter-spacing: -0.003em;
    color: var(--ink);
}

.login-input {
    position: relative;
    display: flex; align-items: center;
    background: var(--bg-paper);
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    transition: border-color .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.login-input:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(2, 183, 183, .15);
}
.login-input .lead {
    display: flex; align-items: center; justify-content: center;
    padding-left: 13px;
    color: var(--ink-faint); flex-shrink: 0;
    transition: color .2s var(--ease-out);
}
.login-input:focus-within .lead { color: var(--brand); }
.login-input input {
    flex: 1; min-width: 0;
    background: transparent; border: none; outline: none;
    padding: 12px 14px 12px 10px;
    font-family: inherit; font-size: 14.5px;
    color: var(--ink); letter-spacing: -0.005em;
}
.login-input input::placeholder { color: var(--ink-faint); }
.login-input input:-webkit-autofill {
    -webkit-text-fill-color: var(--ink);
    -webkit-box-shadow: 0 0 0 1000px var(--bg-paper) inset;
    transition: background-color 5000s ease-in-out 0s;
}
.login-input .trail {
    padding: 0 12px;
    background: none; border: none; cursor: pointer;
    color: var(--ink-faint);
    display: flex; align-items: center;
    transition: color .2s var(--ease-out);
}
.login-input .trail:hover { color: var(--brand); }
.login-input .trail svg[hidden] { display: none; }

.login-submit {
    width: 100%; margin-top: 24px;
    padding: 13px 20px;
    background: var(--brand); color: #fff;
    border: 1px solid var(--brand); border-radius: 10px;
    font-family: inherit; font-size: 14.5px; font-weight: 600;
    letter-spacing: -0.003em; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: background .2s var(--ease-out), transform .12s var(--ease-out), box-shadow .25s var(--ease-out);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 8px 20px -10px rgba(2,183,183,.45);
    animation: loginRise .5s var(--ease-out) .34s both;
}
.login-submit:hover {
    background: var(--brand-dim);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 12px 28px -10px rgba(2,183,183,.55);
}
.login-submit:active { transform: translateY(1px); background: var(--brand-deep); }
.login-submit svg { transition: transform .25s var(--ease-out); }
.login-submit:hover svg { transform: translateX(3px); }
.login-submit:disabled { opacity: .6; cursor: not-allowed; }

.login-foot {
    margin-top: 30px; text-align: center;
    font-size: 12px; color: var(--ink-faint);
    animation: loginRise .5s var(--ease-out) .42s both;
}

@keyframes loginRise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes loginSlide {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
