/* ============================================================================
   Exhale HR — admin login scene
   Full-screen animated brand background + left-centred frosted sign-in card.
   Loaded only by Views/Auth/Login.cshtml, after timeattendance.css, and scoped
   under .exhale-login-scene so the other auth surfaces are untouched.
   All animation is transform/opacity only and respects prefers-reduced-motion.
   ============================================================================ */

/* ---------------------------------------------------------------- shell --- */

.exhale-login-shell.exhale-login-scene {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    min-height: 100dvh;
    padding: clamp(20px, 4vh, 56px) clamp(18px, 4vw, 56px);
    overflow: hidden;
    background:
        radial-gradient(ellipse at 16% -8%, rgba(30, 100, 205, 0.34), transparent 52%),
        radial-gradient(ellipse at 88% 108%, rgba(11, 97, 194, 0.30), transparent 54%),
        linear-gradient(148deg, #050e20 0%, #0a1f3c 44%, #0c2a5b 78%, #0e3a7d 120%);
}

/* ------------------------------------------------------ background scene --- */

.exhale-scene {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* Soft vignette above the base glows, below the chips and copy. */
.exhale-scene::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 46% 48%, transparent 52%, rgba(3, 10, 24, 0.42) 100%);
}

/* Glow orbs */
.exhale-scene-orb {
    position: absolute;
    aspect-ratio: 1;
    border-radius: 50%;
}

.exhale-scene-orb-one {
    top: -24%;
    left: -14%;
    width: min(54vw, 820px);
    background: radial-gradient(circle, rgba(28, 106, 214, 0.46) 0%, rgba(28, 106, 214, 0) 68%);
    filter: blur(70px);
    animation: exhale-orb-drift-a 26s ease-in-out infinite alternate;
}

.exhale-scene-orb-two {
    right: -18%;
    bottom: -28%;
    width: min(58vw, 880px);
    background: radial-gradient(circle, rgba(12, 70, 158, 0.5) 0%, rgba(12, 70, 158, 0) 68%);
    filter: blur(80px);
    animation: exhale-orb-drift-b 34s ease-in-out infinite alternate;
}

.exhale-scene-orb-three {
    bottom: -16%;
    left: 30%;
    width: min(30vw, 460px);
    background: radial-gradient(circle, rgba(255, 104, 0, 0.20) 0%, rgba(255, 104, 0, 0) 66%);
    filter: blur(70px);
    animation: exhale-orb-drift-c 30s ease-in-out infinite alternate;
}

@keyframes exhale-orb-drift-a {
    from { transform: translate3d(-2%, -2%, 0) scale(0.97); }
    to   { transform: translate3d(4%, 5%, 0) scale(1.06); }
}

@keyframes exhale-orb-drift-b {
    from { transform: translate3d(3%, 2%, 0) scale(1.05); }
    to   { transform: translate3d(-3%, -4%, 0) scale(0.96); }
}

@keyframes exhale-orb-drift-c {
    from { transform: translate3d(-4%, 1%, 0) scale(0.95); }
    to   { transform: translate3d(5%, -4%, 0) scale(1.08); }
}

/* Faint dot grid */
.exhale-scene-dots {
    position: absolute;
    inset: 0;
    opacity: 0.32;
    background-image: radial-gradient(rgba(158, 196, 255, 0.22) 1px, transparent 1.5px);
    background-size: 28px 28px;
    -webkit-mask-image: radial-gradient(ellipse at 60% 42%, #000 18%, transparent 78%);
    mask-image: radial-gradient(ellipse at 60% 42%, #000 18%, transparent 78%);
}

/* Faint contour lines */
.exhale-scene-contours {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.exhale-scene-contours path {
    stroke: rgba(146, 184, 255, 0.09);
    stroke-width: 1.2;
}

/* ---------------------------------------------------- parallax chip layers --- */

.exhale-scene-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.exhale-scene-layer-far {
    animation: exhale-layer-drift-far 52s ease-in-out infinite alternate;
}

.exhale-scene-layer-near {
    animation: exhale-layer-drift-near 34s ease-in-out infinite alternate;
}

@keyframes exhale-layer-drift-far {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(-22px, 14px, 0); }
}

@keyframes exhale-layer-drift-near {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(18px, -14px, 0); }
}

.exhale-scene-chip {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 17px 11px 12px;
    border: 1px solid rgba(158, 196, 255, 0.24);
    border-radius: 16px;
    background: rgba(8, 26, 56, 0.58);
    box-shadow: 0 18px 44px rgba(2, 10, 28, 0.45);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.exhale-scene-chip-rota    { top: 10%; left: 52%; animation: exhale-chip-float-a 11s ease-in-out -2s infinite alternate; }
.exhale-scene-chip-payslip { bottom: 9%; left: 47%; animation: exhale-chip-float-b 13s ease-in-out -6s infinite alternate; }
.exhale-scene-chip-pin     { top: 16%; right: 8%; animation: exhale-chip-float-b 9s ease-in-out -1s infinite alternate; }
.exhale-scene-chip-clock   { bottom: 13%; right: 17%; animation: exhale-chip-float-a 10s ease-in-out -4s infinite alternate; }

@keyframes exhale-chip-float-a {
    from { transform: translate3d(0, -7px, 0); }
    to   { transform: translate3d(4px, 8px, 0); }
}

@keyframes exhale-chip-float-b {
    from { transform: translate3d(3px, 8px, 0); }
    to   { transform: translate3d(-4px, -8px, 0); }
}

.exhale-chip-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
}

.exhale-chip-copy {
    display: grid;
    gap: 2px;
    white-space: nowrap;
}

.exhale-chip-copy strong {
    color: #f2f7ff;
    font-size: 0.78rem;
    font-weight: 750;
    line-height: 1.25;
}

.exhale-chip-copy small {
    color: #9fbce8;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Map pin + pulsing geofence ring */
.exhale-geo-base {
    fill: none;
    stroke: rgba(255, 255, 255, 0.20);
    stroke-width: 1.4;
    stroke-dasharray: 2.6 3.4;
}

.exhale-geo-ring {
    fill: none;
    stroke: rgba(255, 140, 58, 0.75);
    stroke-width: 1.6;
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    animation: exhale-geo-pulse 3s ease-out infinite;
}

.exhale-geo-ring-late {
    animation-delay: 1.5s;
}

@keyframes exhale-geo-pulse {
    0%   { transform: scale(0.45); opacity: 0.9; }
    70%  { opacity: 0.25; }
    100% { transform: scale(1.35); opacity: 0; }
}

.exhale-pin-body { fill: #ff7a1f; }
.exhale-pin-dot  { fill: #ffffff; }

/* Clock */
.exhale-clock-face {
    fill: rgba(120, 168, 255, 0.12);
    stroke: rgba(178, 208, 255, 0.85);
    stroke-width: 2;
}

.exhale-clock-ticks {
    stroke: rgba(178, 208, 255, 0.5);
    stroke-width: 1.6;
    stroke-linecap: round;
}

.exhale-clock-hand {
    stroke: #ffffff;
    stroke-width: 2;
    stroke-linecap: round;
    transform-origin: 24px 24px;
}

.exhale-clock-hand-hour {
    transform: rotate(118deg);
}

.exhale-clock-hand-minute {
    animation: exhale-clock-sweep 48s linear infinite;
}

@keyframes exhale-clock-sweep {
    to { transform: rotate(360deg); }
}

.exhale-clock-pin { fill: #ff6800; }

/* Rota grid */
.exhale-rota-frame {
    fill: rgba(120, 168, 255, 0.10);
    stroke: rgba(178, 208, 255, 0.8);
    stroke-width: 2;
}

.exhale-rota-line {
    stroke: rgba(178, 208, 255, 0.5);
    stroke-width: 1.6;
}

.exhale-rota-cell { fill: rgba(200, 222, 255, 0.28); }
.exhale-rota-cell.is-on { fill: #6fa8ff; }
.exhale-rota-cell.is-accent { fill: #ff7a1f; }

.exhale-rota-cell.is-pulse {
    animation: exhale-cell-pulse 2.6s ease-in-out infinite alternate;
}

@keyframes exhale-cell-pulse {
    from { opacity: 0.35; }
    to   { opacity: 1; }
}

/* Payslip */
.exhale-pay-doc {
    fill: rgba(120, 168, 255, 0.10);
    stroke: rgba(178, 208, 255, 0.8);
    stroke-width: 2;
}

.exhale-pay-lines {
    stroke: rgba(200, 222, 255, 0.55);
    stroke-width: 1.6;
    stroke-linecap: round;
}

.exhale-pay-coin {
    fill: #ff7a1f;
    stroke: rgba(255, 255, 255, 0.35);
    stroke-width: 1;
}

.exhale-pay-pound {
    fill: #ffffff;
    font-family: inherit;
    font-size: 9.5px;
    font-weight: 800;
}

/* --------------------------------------------- right typographic layer --- */

.exhale-scene-copy {
    position: absolute;
    top: 50%;
    right: clamp(48px, 7vw, 140px);
    z-index: 1;
    max-width: 470px;
    transform: translateY(-50%);
    /* from-only keyframe + backwards fill: the animation releases the element
       to its natural style on completion instead of pinning a filled state. */
    animation: exhale-copy-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.35s backwards;
}

.exhale-scene-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: rgba(190, 214, 248, 0.75);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.exhale-scene-kicker-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff6800;
    box-shadow: 0 0 0 5px rgba(255, 104, 0, 0.14);
}

.exhale-scene-copy h2 {
    margin: 16px 0 14px;
    color: rgba(255, 255, 255, 0.87);
    font-size: clamp(2.1rem, 2.9vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.02;
}

.exhale-scene-copy p {
    max-width: 430px;
    margin: 0;
    color: rgba(198, 217, 244, 0.6);
    font-size: 0.98rem;
    line-height: 1.7;
}

.exhale-scene-points {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(203, 220, 246, 0.7);
    font-size: 0.78rem;
    font-weight: 650;
}

.exhale-scene-points span {
    display: grid;
    gap: 6px;
}

.exhale-scene-points b {
    color: rgba(255, 145, 60, 0.85);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
}

@keyframes exhale-copy-in {
    from { transform: translateY(calc(-50% + 16px)); opacity: 0; }
}

/* ----------------------------------------------- frame + frosted card --- */

.exhale-scene-frame {
    position: relative;
    z-index: 2;
    display: flex;
    width: 100%;
    justify-content: flex-start;
}

.exhale-login-scene .exhale-login-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: min(100%, 440px);
    min-width: 0;
    min-height: 0;
    margin-left: clamp(0px, 5vw, 96px);
    padding: clamp(26px, 3vw, 40px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow:
        0 32px 80px rgba(3, 14, 36, 0.55),
        0 6px 22px rgba(3, 14, 36, 0.35);
    -webkit-backdrop-filter: blur(26px) saturate(1.5);
    backdrop-filter: blur(26px) saturate(1.5);
    /* Backwards fill only: after the entrance the card returns to its natural
       styles, so the is-authenticating dim (timeattendance.css) still applies. */
    animation: exhale-card-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

@supports not ((backdrop-filter: blur(4px)) or (-webkit-backdrop-filter: blur(4px))) {
    .exhale-login-scene .exhale-login-card {
        background: rgba(255, 255, 255, 0.97);
    }

    .exhale-login-scene .exhale-scene-chip {
        background: rgba(8, 26, 56, 0.86);
    }
}

/* Card entrance: one rise for the card, staggered rise for its children. */
@keyframes exhale-card-in {
    from { transform: translateY(18px) scale(0.985); opacity: 0; }
}

.exhale-login-scene .exhale-login-card > * {
    animation: exhale-card-child-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.exhale-login-scene .exhale-login-card > *:nth-child(1) { animation-delay: 0.06s; }
.exhale-login-scene .exhale-login-card > *:nth-child(2) { animation-delay: 0.13s; }
.exhale-login-scene .exhale-login-card > *:nth-child(3) { animation-delay: 0.20s; }
.exhale-login-scene .exhale-login-card > *:nth-child(4) { animation-delay: 0.27s; }
.exhale-login-scene .exhale-login-card > *:nth-child(5) { animation-delay: 0.34s; }
.exhale-login-scene .exhale-login-card > *:nth-child(6) { animation-delay: 0.41s; }

@keyframes exhale-card-child-in {
    from { transform: translateY(10px); opacity: 0; }
}

/* ------------------------------- pixel grid inside the card (alignment) --- */
/* One consistent content column: every block spans the card's full width,
   with a single spacing scale (26 / 16 / 7). */

.exhale-login-scene .exhale-login-brand {
    display: inline-flex;
    align-self: flex-start;
    width: 150px;
    margin-bottom: 22px;
}

.exhale-login-scene .exhale-login-intro,
.exhale-login-scene .exhale-login-form,
.exhale-login-scene .exhale-login-trust-line {
    width: 100%;
    max-width: none;
}

.exhale-login-scene .exhale-login-intro h1 {
    max-width: none;
    margin: 13px 0 10px;
    color: #0c1f48;
    font-size: clamp(1.6rem, 2vw, 1.9rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.exhale-login-scene .exhale-login-intro p {
    max-width: none;
    color: #56688c;
    font-size: 0.86rem;
    line-height: 1.65;
}

.exhale-login-scene .exhale-login-alert,
.exhale-login-scene .exhale-login-validation {
    margin-top: 18px;
    border-radius: 12px;
}

.exhale-login-scene .exhale-login-form {
    gap: 16px;
    margin-top: 26px;
}

.exhale-login-scene .exhale-login-form .exhale-login-validation {
    margin-top: 0;
}

/* The validation summary placeholder MVC renders on a clean GET (an empty,
   hidden list with .validation-summary-valid) must not paint an empty box. */
.exhale-login-scene .exhale-login-validation.validation-summary-valid {
    display: none;
}

.exhale-login-scene .exhale-login-validation ul {
    padding: 11px 14px 11px 30px;
    border-radius: 12px;
}

.exhale-login-scene .exhale-login-field {
    gap: 7px;
}

.exhale-login-scene .exhale-login-field > label {
    color: #14264c;
    font-size: 0.8rem;
    font-weight: 750;
    letter-spacing: 0.01em;
    line-height: 1.3;
}

.exhale-login-scene .exhale-password-label-row {
    align-items: center;
    gap: 14px;
}

.exhale-login-scene .exhale-password-label-row a {
    font-size: 0.78rem;
    line-height: 1.3;
}

.exhale-login-scene .exhale-input-icon {
    left: 14px;
    width: 19px;
    height: 19px;
}

.exhale-login-scene .exhale-login-input {
    min-height: 46px;
    padding: 0 46px 0 42px;
    border: 1px solid rgba(148, 166, 198, 0.55);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
}

.exhale-login-scene .exhale-login-input:hover {
    border-color: rgba(112, 138, 182, 0.7);
}

.exhale-login-scene .exhale-login-input:focus {
    border-color: #2463e8;
    background: #ffffff;
}

.exhale-login-scene .exhale-password-input {
    padding-right: 52px;
}

.exhale-login-scene .exhale-password-toggle {
    right: 6px;
    width: 36px;
    height: 36px;
    border-radius: 9px;
}

.exhale-login-scene .exhale-field-validation {
    min-height: 0;
    line-height: 1.35;
}

.exhale-login-scene .exhale-field-validation:empty {
    display: none;
}

.exhale-login-scene .exhale-remember-choice {
    grid-template-columns: 20px minmax(0, 1fr);
    column-gap: 10px;
    margin-top: 2px;
}

.exhale-login-scene .exhale-login-submit {
    min-height: 48px;
    margin-top: 4px;
    border-radius: 12px;
}

.exhale-login-scene .exhale-login-trust-line {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid rgba(16, 42, 90, 0.1);
}

/* ------------------------------------------------------------ responsive --- */

@media (max-width: 1100px) {
    .exhale-scene-copy {
        display: none;
    }

    .exhale-scene-frame {
        justify-content: center;
    }

    .exhale-login-scene .exhale-login-card {
        margin-left: 0;
    }

    .exhale-scene-chip-rota    { top: 8%; left: 4%; }
    .exhale-scene-chip-payslip { bottom: 8%; left: 6%; }
    .exhale-scene-chip-pin     { top: 6%; right: 4%; }
    .exhale-scene-chip-clock   { bottom: 6%; right: 6%; }
}

@media (max-width: 760px) {
    .exhale-scene-chip {
        padding: 9px 14px 9px 10px;
    }

    .exhale-chip-icon {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .exhale-chip-copy strong { font-size: 0.72rem; }
    .exhale-chip-copy small  { font-size: 0.64rem; }
}

@media (max-width: 560px) {
    .exhale-login-shell.exhale-login-scene {
        padding: 18px 16px;
    }

    .exhale-login-scene .exhale-login-card {
        min-height: 0;
        padding: 26px 20px;
        border-radius: 18px;
    }

    .exhale-login-scene .exhale-login-brand {
        width: 150px;
        margin-bottom: 22px;
    }

    .exhale-login-scene .exhale-login-intro h1 {
        font-size: 1.7rem;
    }

    .exhale-login-scene .exhale-login-form {
        margin-top: 24px;
    }

    .exhale-scene-layer-far {
        display: none;
    }

    .exhale-scene-chip {
        opacity: 0.85;
    }

    .exhale-scene-chip-pin   { top: 3%; right: 3%; }
    .exhale-scene-chip-clock { top: auto; bottom: 3%; right: auto; left: 3%; }
}

/* -------------------------------------------------------- reduced motion --- */
/* The scene stays fully composed, just static. */

@media (prefers-reduced-motion: reduce) {
    .exhale-scene-orb,
    .exhale-scene-layer-far,
    .exhale-scene-layer-near,
    .exhale-scene-chip,
    .exhale-geo-ring,
    .exhale-rota-cell.is-pulse,
    .exhale-clock-hand-minute,
    .exhale-scene-copy,
    .exhale-login-scene .exhale-login-card,
    .exhale-login-scene .exhale-login-card > * {
        animation: none !important;
    }

    .exhale-geo-ring {
        opacity: 0.3;
        transform: none;
    }

    .exhale-geo-ring-late {
        opacity: 0;
    }

    .exhale-rota-cell.is-pulse {
        opacity: 1;
    }
}

/* ------------------------------------------------------------------ orbits
   The circling motion from the original illustration, promoted to the
   full-screen scene: concentric rings rotating at different speeds and
   directions, each carrying glowing satellites. Position anchors the system
   behind the right-hand typographic layer. */
.exhale-login-scene .exhale-scene-orbits {
    position: absolute;
    top: 50%;
    right: -12vw;
    width: min(72vmin, 880px);
    aspect-ratio: 1;
    transform: translateY(-50%);
    pointer-events: none;
}
.exhale-login-scene .exhale-orbit {
    position: absolute;
    inset: 0;
    border: 1.5px dashed rgba(148, 187, 233, 0.16);
    border-radius: 50%;
    animation: exhale-orbit-spin 64s linear infinite;
}
.exhale-login-scene .exhale-orbit-middle {
    inset: 12%;
    border-color: rgba(148, 187, 233, 0.22);
    animation-duration: 46s;
    animation-direction: reverse;
}
.exhale-login-scene .exhale-orbit-inner {
    inset: 26%;
    border-color: rgba(255, 154, 61, 0.18);
    animation-duration: 32s;
}
.exhale-login-scene .exhale-orbit-sat {
    position: absolute;
    inset: 0;
}
.exhale-login-scene .exhale-orbit-sat::after {
    content: "";
    position: absolute;
    top: -5px;
    left: calc(50% - 5px);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #9fc4f2;
    box-shadow: 0 0 14px 3px rgba(120, 176, 245, 0.55);
}
.exhale-login-scene .exhale-orbit-sat.is-accent::after {
    background: #ff9a3d;
    box-shadow: 0 0 16px 4px rgba(255, 122, 26, 0.5);
}
.exhale-login-scene .exhale-orbit-sat.is-soft::after {
    width: 7px;
    height: 7px;
    top: -3.5px;
    left: calc(50% - 3.5px);
    background: rgba(198, 219, 246, 0.75);
    box-shadow: 0 0 10px 2px rgba(150, 190, 240, 0.4);
}
.exhale-login-scene .exhale-orbit-sat.is-pos-2 { transform: rotate(140deg); }
.exhale-login-scene .exhale-orbit-sat.is-pos-3 { transform: rotate(250deg); }

@keyframes exhale-orbit-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media (max-width: 1100px) {
    .exhale-login-scene .exhale-scene-orbits { right: -34vmin; opacity: 0.6; }
}

@media (prefers-reduced-motion: reduce) {
    .exhale-login-scene .exhale-orbit { animation: none; }
}
