:root {
    --login-bg: #020916;
    --login-bg-2: #071831;
    --panel: rgba(7, 23, 49, 0.82);
    --panel-border: rgba(102, 190, 255, 0.38);
    --text: #f5f9ff;
    --muted: #9eb2cf;
    --cyan: #19c9ff;
    --blue: #2767ff;
    --purple: #7956ff;
    --danger: #ff6b7b;
}

* { box-sizing: border-box; }

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

body.ai-login-page {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text);
    background:
        radial-gradient(circle at 50% 25%, rgba(18, 78, 155, .24), transparent 34%),
        linear-gradient(135deg, var(--login-bg) 0%, var(--login-bg-2) 52%, #070522 100%);
    font-family: "Segoe UI", Arial, sans-serif;
}

.skip-link {
    position: fixed;
    top: -60px;
    left: 16px;
    z-index: 100;
    padding: 10px 14px;
    color: #071426;
    background: #fff;
    border-radius: 8px;
    transition: top .2s ease;
}
.skip-link:focus { top: 16px; }

.ai-background,
.ai-grid,
.ai-background::before,
.ai-background::after {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.ai-background { overflow: hidden; z-index: 0; }

.ai-grid {
    opacity: .24;
    background-image:
        linear-gradient(rgba(41, 131, 255, .11) 1px, transparent 1px),
        linear-gradient(90deg, rgba(41, 131, 255, .11) 1px, transparent 1px);
    background-size: 58px 58px;
    mask-image: radial-gradient(circle at 50% 50%, #000 0%, transparent 78%);
    animation: gridDrift 24s linear infinite;
}

.ai-background::before,
.ai-background::after {
    content: "";
    opacity: .42;
    background-repeat: no-repeat;
}

.ai-background::before {
    background-image:
        linear-gradient(90deg, transparent 4%, rgba(20, 128, 255, .72) 4.2%, transparent 4.5%),
        linear-gradient(90deg, transparent 18%, rgba(20, 128, 255, .36) 18.2%, transparent 18.5%),
        linear-gradient(90deg, transparent 76%, rgba(126, 72, 255, .35) 76.2%, transparent 76.5%);
    background-size: 390px 2px, 520px 1px, 630px 2px;
    background-position: 0 18%, 0 37%, 100% 77%;
    animation: circuitFlow 10s linear infinite;
}

.ai-background::after {
    inset: auto 0 8% 0;
    height: 42%;
    background:
        linear-gradient(90deg, transparent, rgba(20, 151, 255, .35), transparent) 0 35% / 48% 1px no-repeat,
        linear-gradient(90deg, transparent, rgba(130, 66, 255, .35), transparent) 100% 65% / 45% 1px no-repeat;
    animation: circuitPulse 5s ease-in-out infinite;
}

.ai-orb {
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    filter: blur(85px);
    opacity: .16;
    animation: orbFloat 12s ease-in-out infinite;
}
.ai-orb-left { left: -160px; top: 18%; background: #087bff; }
.ai-orb-right { right: -180px; bottom: 2%; background: #7134ff; animation-delay: -5s; }

.ai-globe {
    position: absolute;
    left: -150px;
    bottom: -220px;
    width: 570px;
    height: 570px;
    border: 1px solid rgba(25, 201, 255, .2);
    border-radius: 50%;
    background:
        radial-gradient(circle, transparent 58%, rgba(20, 134, 255, .12) 59%, transparent 61%),
        repeating-radial-gradient(circle, rgba(42, 143, 255, .16) 0 1px, transparent 1px 14px);
    box-shadow: inset 0 0 60px rgba(17, 117, 255, .16), 0 0 70px rgba(15, 87, 255, .1);
    animation: globeTurn 32s linear infinite;
}

.ai-globe::before,
.ai-globe::after {
    content: "";
    position: absolute;
    inset: 6%;
    border: 1px solid rgba(47, 156, 255, .19);
    border-radius: 50%;
    transform: rotateX(67deg);
}
.ai-globe::after { transform: rotateY(67deg); }

.ai-globe-ring {
    position: absolute;
    inset: 16%;
    border: 1px solid rgba(49, 159, 255, .22);
    border-radius: 50%;
}
.ring-1 { transform: rotateX(72deg) rotateZ(18deg); }
.ring-2 { transform: rotateY(72deg) rotateZ(-22deg); }
.ring-3 { inset: -6%; border-color: rgba(77, 159, 255, .13); }

.ai-hud {
    position: absolute;
    top: 9%;
    right: -55px;
    width: 360px;
    height: 360px;
    opacity: .47;
    animation: hudFloat 8s ease-in-out infinite;
}
.ai-hud-ring {
    position: absolute;
    inset: 8%;
    border-radius: 50%;
    border: 1px dashed rgba(74, 137, 255, .34);
}
.hud-1 { animation: rotateClockwise 24s linear infinite; }
.hud-2 { inset: 23%; border-style: solid; animation: rotateCounter 16s linear infinite; }
.hud-3 { inset: 38%; border-width: 4px; border-style: dotted; animation: rotateClockwise 8s linear infinite; }

.ai-particles span {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #2db7ff;
    box-shadow: 0 0 12px 3px rgba(45, 183, 255, .55);
    animation: particleBlink 4s ease-in-out infinite;
}
.ai-particles span:nth-child(1) { left: 11%; top: 22%; }
.ai-particles span:nth-child(2) { left: 23%; top: 58%; animation-delay: -1s; }
.ai-particles span:nth-child(3) { right: 18%; top: 31%; animation-delay: -2.1s; }
.ai-particles span:nth-child(4) { right: 9%; bottom: 18%; animation-delay: -.5s; }
.ai-particles span:nth-child(5) { left: 36%; bottom: 12%; animation-delay: -3s; }
.ai-particles span:nth-child(6) { right: 35%; top: 12%; animation-delay: -1.7s; }

.login-shell {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 34px 18px 24px;
}

.login-brand {
    width: min(100%, 530px);
    margin-bottom: 16px;
    text-align: center;
    animation: brandEnter .75s ease-out both;
}
.login-brand .vug-brand-logo,
.login-brand img {
    max-width: 290px;
    max-height: 94px;
    object-fit: contain;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,.34));
}
.portal-title-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 14px;
    align-items: center;
    max-width: 360px;
    margin: 10px auto 0;
    color: #88cfff;
    letter-spacing: .08em;
    font-size: 1.05rem;
    font-weight: 500;
}
.portal-title-row span {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(45, 177, 255, .8));
}
.portal-title-row span:last-child { transform: scaleX(-1); }
.login-brand > p {
    margin: 5px 0 0;
    color: rgba(174, 199, 230, .72);
    font-size: .76rem;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.login-card {
    position: relative;
    width: min(100%, 540px);
    border: 1px solid var(--panel-border);
    border-radius: 19px;
    background: linear-gradient(145deg, rgba(10, 34, 70, .9), rgba(3, 16, 37, .92));
    box-shadow: 0 24px 70px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.08), 0 0 32px rgba(16, 116, 255, .14);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    animation: cardEnter .78s cubic-bezier(.2,.8,.2,1) .08s both, cardBreath 5s ease-in-out 1s infinite;
}
.login-card-glow {
    position: absolute;
    inset: -1px;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;
}
.login-card-glow::before {
    content: "";
    position: absolute;
    top: -110%;
    left: -35%;
    width: 42%;
    height: 290%;
    background: linear-gradient(90deg, transparent, rgba(83, 205, 255, .2), transparent);
    transform: rotate(18deg);
    animation: glassSweep 8s ease-in-out infinite;
}
.login-card-body { position: relative; z-index: 1; padding: 34px 38px 29px; }

.login-heading { display: flex; gap: 15px; align-items: center; margin-bottom: 24px; }
.security-badge,
.footer-shield {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 49px;
    height: 49px;
    border: 1px solid rgba(72, 163, 255, .65);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(27, 91, 191, .3), rgba(91, 48, 207, .25));
    box-shadow: 0 0 22px rgba(48, 121, 255, .24);
    transform: rotate(45deg);
}
.security-badge svg,
.footer-shield svg { width: 25px; height: 25px; transform: rotate(-45deg); fill: none; stroke: #a6ddff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.login-heading h1 { margin: 0 0 5px; font-size: clamp(1.25rem, 3vw, 1.62rem); font-weight: 700; }
.login-heading p { margin: 0; color: var(--muted); font-size: .89rem; }

.crm-info {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 22px;
    padding: 12px 14px;
    border: 1px solid rgba(30, 174, 255, .55);
    border-radius: 9px;
    color: #d9edff;
    background: rgba(10, 63, 119, .28);
    box-shadow: inset 0 0 18px rgba(15, 131, 255, .08);
    font-size: .9rem;
}
.crm-info strong { color: #35c8ff; }
.info-icon { display: grid; place-items: center; flex: 0 0 23px; height: 23px; border-radius: 50%; color: #041225; background: #36bdff; font-weight: 800; font-family: Georgia, serif; }

.validation-summary { margin-bottom: 12px; color: #ffd4da; }
.validation-summary:empty { display: none; }
.validation-summary ul { margin: 0; padding: 11px 14px 11px 30px; border: 1px solid rgba(255, 107, 123, .45); border-radius: 8px; background: rgba(137, 24, 46, .25); }

.field-group { margin-bottom: 18px; }
.field-group label { display: block; margin-bottom: 8px; color: #edf5ff; font-size: .92rem; font-weight: 500; }
.input-shell { position: relative; }
.field-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    z-index: 2;
    width: 21px;
    height: 21px;
    transform: translateY(-50%);
    color: #3baeff;
}
.field-icon svg, .password-toggle svg, .button-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ai-input.form-control {
    height: 49px;
    padding: 10px 46px 10px 46px;
    border: 1px solid rgba(124, 167, 215, .52);
    border-radius: 8px;
    color: #f5f9ff;
    background: rgba(4, 18, 42, .7);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.015);
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.ai-input.form-control::placeholder { color: #8396b4; }
.ai-input.form-control:focus { color: #fff; border-color: #21baff; background: rgba(5, 24, 53, .88); box-shadow: 0 0 0 3px rgba(28, 166, 255, .14), 0 0 20px rgba(26, 145, 255, .1); }
.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    z-index: 3;
    width: 36px;
    height: 36px;
    padding: 8px;
    border: 0;
    border-radius: 7px;
    color: #8da2c1;
    background: transparent;
    transform: translateY(-50%);
}
.password-toggle:hover, .password-toggle:focus-visible { color: #42c9ff; background: rgba(49, 156, 255, .1); outline: none; }
.eye-closed { display: none; }
.password-toggle[aria-pressed="true"] .eye-open { display: none; }
.password-toggle[aria-pressed="true"] .eye-closed { display: block; }
.field-validation { display: block; min-height: 19px; padding-top: 4px; color: #ff9cab; font-size: .78rem; }

.remember-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -2px 0 19px; }
.remember-control { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; color: #e5eefb; font-size: .9rem; }
.remember-control input { position: absolute; opacity: 0; pointer-events: none; }
.custom-checkbox { position: relative; width: 19px; height: 19px; border: 1px solid #617b9c; border-radius: 5px; background: rgba(4, 17, 39, .75); transition: .2s ease; }
.remember-control input:checked + .custom-checkbox { border-color: #22baff; background: linear-gradient(135deg, #246bff, #13bfe9); box-shadow: 0 0 12px rgba(22, 175, 255, .3); }
.remember-control input:checked + .custom-checkbox::after { content: ""; position: absolute; left: 5px; top: 2px; width: 6px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.remember-control input:focus-visible + .custom-checkbox { outline: 3px solid rgba(42, 172, 255, .25); outline-offset: 2px; }
.secure-session { color: #7890ae; font-size: .75rem; }
.secure-session span { color: #27d995; text-shadow: 0 0 8px rgba(39,217,149,.7); }

.login-submit {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 53px;
    overflow: hidden;
    border: 1px solid rgba(87, 211, 255, .75);
    border-radius: 9px;
    color: #fff;
    background: linear-gradient(100deg, #2454f5 0%, #167cf9 45%, #10c5e8 100%);
    box-shadow: 0 10px 25px rgba(12, 105, 255, .26), inset 0 1px 0 rgba(255,255,255,.24);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .01em;
    transition: transform .2s ease, filter .2s ease, box-shadow .2s ease;
}
.login-submit:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 14px 32px rgba(12, 119, 255, .36), 0 0 22px rgba(22, 202, 255, .15); }
.login-submit:focus-visible { outline: 3px solid rgba(87, 213, 255, .35); outline-offset: 3px; }
.login-submit:active { transform: translateY(1px); }
.login-submit:disabled { cursor: wait; opacity: .83; transform: none; }
.button-icon { width: 21px; height: 21px; }
.button-shine { position: absolute; inset: 0; background: linear-gradient(105deg, transparent 25%, rgba(255,255,255,.3) 45%, transparent 65%); transform: translateX(-135%); animation: buttonShine 4.7s ease-in-out infinite; }
.button-spinner { display: none; width: 20px; height: 20px; border: 2px solid rgba(255,255,255,.38); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.login-submit.is-loading .button-icon, .login-submit.is-loading .button-shine { display: none; }
.login-submit.is-loading .button-spinner { display: inline-block; }

.login-footer-note { display: flex; gap: 15px; align-items: center; margin-top: 22px; padding-top: 20px; border-top: 1px solid rgba(132, 165, 207, .22); }
.footer-shield { width: 39px; height: 39px; border-radius: 11px; }
.footer-shield svg { width: 21px; height: 21px; }
.login-footer-note p { margin: 0; color: #a8b8cf; font-size: .82rem; line-height: 1.65; }
.login-footer-note strong { color: #dbeaff; }
.login-page-footer { display: flex; gap: 9px; margin-top: 17px; color: rgba(146, 170, 202, .55); font-size: .72rem; letter-spacing: .05em; animation: brandEnter .8s ease-out .3s both; }

@keyframes gridDrift { to { transform: translate3d(58px, 58px, 0); } }
@keyframes circuitFlow { from { background-position: -390px 18%, -520px 37%, calc(100% + 630px) 77%; } to { background-position: 100% 18%, 100% 37%, -630px 77%; } }
@keyframes circuitPulse { 0%,100% { opacity: .28; } 50% { opacity: .7; } }
@keyframes orbFloat { 0%,100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(35px,-25px,0) scale(1.08); } }
@keyframes globeTurn { to { transform: rotate(360deg); } }
@keyframes hudFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(15px); } }
@keyframes rotateClockwise { to { transform: rotate(360deg); } }
@keyframes rotateCounter { to { transform: rotate(-360deg); } }
@keyframes particleBlink { 0%,100% { opacity: .2; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.25); } }
@keyframes brandEnter { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cardEnter { from { opacity: 0; transform: translateY(24px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes cardBreath { 0%,100% { border-color: rgba(102,190,255,.34); } 50% { border-color: rgba(111,115,255,.52); } }
@keyframes glassSweep { 0%, 62% { transform: translateX(-140%) rotate(18deg); } 82%,100% { transform: translateX(390%) rotate(18deg); } }
@keyframes buttonShine { 0%,65% { transform: translateX(-135%); } 88%,100% { transform: translateX(135%); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 620px) {
    .login-shell { justify-content: flex-start; padding-top: 24px; }
    .login-brand img { max-width: 235px; max-height: 76px; }
    .login-card-body { padding: 28px 22px 24px; }
    .login-heading { align-items: flex-start; }
    .security-badge { width: 43px; height: 43px; }
    .login-heading p { font-size: .82rem; }
    .crm-info { align-items: flex-start; }
    .secure-session { display: none; }
    .ai-hud { right: -190px; }
    .ai-globe { left: -330px; opacity: .62; }
}

@media (max-height: 760px) and (min-width: 621px) {
    .login-shell { justify-content: flex-start; padding-top: 18px; }
    .login-brand { margin-bottom: 10px; }
    .login-brand img { max-height: 70px; }
    .login-card-body { padding-top: 26px; padding-bottom: 22px; }
    .login-heading { margin-bottom: 17px; }
    .crm-info { margin-bottom: 16px; }
    .field-group { margin-bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
/* SEC-0.6A1D - centered transparent brand logo */
.login-brand .vug-brand-logo {
    display: flex;
    width: min(86vw, 420px);
    max-width: 420px;
    max-height: none;
    margin: 0 auto;
    align-items: center;
    justify-content: center;
}

.login-brand .vug-brand-logo-img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 420px;
    max-height: 120px;
    object-fit: contain;
    object-position: center;
}

@media (max-width: 576px) {
    .login-brand .vug-brand-logo,
    .login-brand .vug-brand-logo-img {
        max-width: 340px;
    }
}
