/* W360 Entra login page — F.W. Walton branded layout + motion */

* {
    box-sizing: border-box;
}

html:has(body.login-body),
body.login-body {
    height: 100%;
    overflow: hidden;
}

body.login-body {
    margin: 0;
    height: 100dvh;
    max-height: 100dvh;
    background: #061233;
    color: #ffffff;
    font-family: Barlow, "Segoe UI", Arial, sans-serif;
}

body.login-body .login-shell {
    height: 100%;
    max-height: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.login-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.login-topbar {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px clamp(20px, 5vw, 64px);
}

.login-topbar img {
    height: 44px;
    border-radius: 6px;
    display: block;
}

.login-topbar p,
.login-footer {
    margin: 0;
    font-size: 14px;
    color: #c3cce3;
}

.login-wrap {
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: clamp(32px, 6vw, 96px);
    padding: 16px clamp(20px, 5vw, 64px) 140px;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    overflow-y: auto;
}

.login-hero {
    flex: 1 1 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    text-align: center;
}

.ww-emblem {
    position: relative;
    width: min(340px, 78vw);
    aspect-ratio: 1;
}

.ww-glow {
    position: absolute;
    inset: 14%;
    border-radius: 50%;
    background: #e31b23;
    filter: blur(60px);
}

.emblem-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.disc {
    position: absolute;
    inset: 17%;
    border-radius: 50%;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 24px 60px rgba(0, 0, 0, 0.55);
}

.disc img {
    width: 74%;
    display: block;
}

.login-hero h1 {
    margin: 0;
    font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
    font-weight: 800;
    font-size: clamp(40px, 5vw, 60px);
    line-height: 1;
    color: #ffffff;
}

.login-hero .tag {
    margin: 10px 0 0;
    font-size: 18px;
    color: #c3cce3;
}

.login-card-panel {
    flex: 0 1 400px;
    min-width: 0;
    background: #ffffff;
    color: #0b1f4d;
    border-radius: 20px;
    border-top: 6px solid #e31b23;
    padding: 30px 32px 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.login-card-panel form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-card-panel h2 {
    margin: 0 0 6px;
    font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
    font-weight: 700;
    font-size: 34px;
    line-height: 1.05;
    color: #0b1f4d;
}

.login-card-panel .muted {
    margin: 0;
    font-size: 15px;
    color: #4a5675;
    line-height: 1.5;
}

.login-error {
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fee2e2;
    color: #991b1b;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-field label {
    font-size: 14px;
    font-weight: 600;
    color: #0b1f4d;
}

.login-field select {
    height: 52px;
    padding: 0 14px;
    font: inherit;
    font-size: 16px;
    color: #0b1f4d;
    background: #f4f6fb;
    border: 1.5px solid #cbd3e6;
    border-radius: 12px;
}

.login-field select:hover {
    border-color: #0b1f4d;
}

.ww-btn {
    height: 56px;
    width: 100%;
    margin-top: 5px;
    border: 0;
    border-radius: 12px;
    background: #e31b23;
    color: #ffffff;
    font: inherit;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.ww-btn:hover:not(:disabled) {
    background-color: #c8141b;
    box-shadow: 0 10px 28px rgba(227, 27, 35, 0.45);
}

.ww-btn:active:not(:disabled) {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 4px 14px rgba(227, 27, 35, 0.35);
}

.ww-btn:disabled {
    cursor: progress;
    opacity: 1;
}

.ww-btn.is-busy,
.ww-btn:disabled.is-busy {
    background-color: #c8141b;
    box-shadow: 0 10px 28px rgba(227, 27, 35, 0.35);
}

/* Phones have no hover — use a clear press pulse */
@media (hover: none) {
    .ww-btn:active:not(:disabled) {
        background-color: #a91117;
        transform: scale(0.97);
        box-shadow: 0 0 0 4px rgba(227, 27, 35, 0.28);
    }
}

.ms-logo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    width: 20px;
    height: 20px;
    background: #ffffff;
    padding: 2px;
    border-radius: 2px;
    flex: 0 0 auto;
}

.login-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #4a5675;
}

.ww-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1e8e4e;
    flex: none;
}

.login-help {
    border-top: 1px solid #e3e8f2;
    padding-top: 16px;
    font-size: 13px;
    color: #4a5675;
}

.login-help a {
    color: #0b1f4d;
    font-weight: 600;
}

.login-roofline {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: auto;
    pointer-events: none;
}

.login-footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    z-index: 1;
    margin: 0;
    padding: 0 clamp(20px, 5vw, 64px);
    font-size: 13px;
    text-align: center;
    pointer-events: none;
}

.ww-btn:focus-visible,
.login-field select:focus-visible,
.login-help a:focus-visible {
    outline: 3px solid #7fb2ff;
    outline-offset: 3px;
}

[hidden] {
    display: none !important;
}

/* Motion */
@keyframes ww-spin { to { transform: rotate(360deg); } }
@keyframes ww-spin-rev { to { transform: rotate(-360deg); } }
@keyframes ww-rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes ww-pop {
    0% { opacity: 0; transform: scale(0.6); }
    70% { opacity: 1; transform: scale(1.04); }
    100% { transform: scale(1); }
}
@keyframes ww-draw { to { stroke-dashoffset: 0; } }
@keyframes ww-glint { from { stroke-dashoffset: 1000; } to { stroke-dashoffset: 0; } }
@keyframes ww-glow {
    0%, 100% { opacity: 0.35; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.08); }
}
@keyframes ww-dot {
    0%, 100% { opacity: 0.25; }
    50% { opacity: 1; }
}
@keyframes ww-load { to { transform: rotate(360deg); } }

.ww-emblem { animation: ww-pop 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.ww-ring { transform-origin: 50% 50%; animation: ww-spin 9s linear infinite; }
.ww-ring-rev { transform-origin: 50% 50%; animation: ww-spin-rev 22s linear infinite; }
.ww-glow { animation: ww-glow 4s ease-in-out infinite; }
.ww-rise { animation: ww-rise 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.25s both; }
.ww-rise2 { animation: ww-rise 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.45s both; }
.ww-roof {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: ww-draw 2.6s ease-out 0.3s forwards;
}
.ww-roof-glint {
    stroke-dasharray: 36 964;
    stroke-dashoffset: 1000;
    animation: ww-glint 7s linear 3s infinite both;
}
.ww-dot { animation: ww-dot 1.8s ease-in-out infinite; }
.ww-spinner { animation: ww-load 0.8s linear infinite; }

@media (prefers-reduced-motion: reduce) {
    .ww-ring,
    .ww-ring-rev,
    .ww-glow,
    .ww-dot,
    .ww-roof-glint,
    .ww-emblem,
    .ww-rise,
    .ww-rise2 {
        animation: none;
    }

    .ww-roof {
        animation: none;
        stroke-dashoffset: 0;
    }
}

@media (max-width: 720px) {
    .login-wrap {
        padding-bottom: 120px;
    }

    .login-card-panel {
        padding: 28px 22px 22px;
    }

    .login-footer {
        bottom: 10px;
        font-size: 12px;
    }
}
