body {
    margin: 0;
    font-family: Inter, system-ui, sans-serif;
    background: #020617;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

/* Animated background glow */
body::before {
    content: "";
    pointer-events: none;
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #2563eb, transparent 70%);
    top: -200px;
    left: -200px;
    filter: blur(120px);
    opacity: .35;
    animation: moveGlow1 12s infinite alternate ease-in-out;
}

body::after {
    content: "";
    pointer-events: none;
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #38bdf8, transparent 70%);
    bottom: -200px;
    right: -200px;
    filter: blur(120px);
    opacity: .25;
    animation: moveGlow2 14s infinite alternate ease-in-out;
}

@keyframes moveGlow1 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(120px, 80px); }
}

@keyframes moveGlow2 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-100px, -60px); }
}

/* Login card */
.login-container {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: rgba(5, 12, 25, .85);
    border-radius: 24px;
    padding: 32px;
    border: 1px solid rgba(148, 163, 184, .18);
    box-shadow: 0 40px 90px rgba(2, 8, 23, .7);
    backdrop-filter: blur(14px);
    z-index: 1;
    animation: floatCard 6s ease-in-out infinite;
}

@keyframes floatCard {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* Badge */
.badge {
    text-align: center;
    margin-bottom: 18px;
}

.badge span {
    font-size: 12px;
    letter-spacing: .08em;
    background: rgba(255, 255, 255, .06);
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, .18);
}

/* Logo */
.logo {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.logo img {
    width: 220px;
    box-sizing: border-box;
    padding: 8px 12px;
    background: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.96);
    border-radius: 8px;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .6));
}

/* Headings */
h1 {
    text-align: center;
    margin: 10px 0;
    font-size: 34px;
}

.sub {
    text-align: center;
    color: #9ca3af;
    margin-bottom: 24px;
}

.sub strong {
    color: #fff;
}

/* Inputs */
label {
    font-size: 13px;
    font-weight: 600;
}

input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 999px;
    border: none;
    background: #e2e8f0;
    font-size: 15px;
    box-sizing: border-box;
    margin: 8px 0 18px;
}

/* Buttons */
button {
    width: 100%;
    padding: 14px 16px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    color: white;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(37, 99, 235, .45);
    margin-top: 6px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(37, 99, 235, .6);
}

.form-group {
    width: 100%;
}

/* Links */
.links {
    margin-top: 14px;
    font-size: 13px;
}

.links a {
    color: #93c5fd;
    text-decoration: none;
}

.links a:hover {
    text-decoration: underline;
}

/* Remember me */
.remember-row {
    margin: 0 0 18px;
}

.remember-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #cbd5e1;
    font-weight: 500;
}

.remember-label input {
    width: 18px;
    height: 18px;
    margin: 0;
}

/* Privacy button */
.privacy-panel {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 18px;
    gap: 11px;
    align-items: center;
    margin-top: 22px;
    padding: 14px 15px;
    border: 1px solid rgba(147, 197, 253, .28);
    border-radius: 15px;
    background: rgba(37, 99, 235, .08);
    color: #dbeafe;
    text-decoration: none;
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.privacy-panel:hover,
.privacy-panel:focus-visible {
    border-color: rgba(147, 197, 253, .62);
    background: rgba(37, 99, 235, .14);
    transform: translateY(-1px);
}

.privacy-panel:focus-visible {
    outline: 3px solid #60a5fa;
    outline-offset: 4px;
}

.privacy-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(147, 197, 253, .28);
    border-radius: 10px;
    background: rgba(59, 130, 246, .13);
    color: #bfdbfe;
    font-size: 17px;
}

.privacy-copy {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.privacy-copy strong {
    color: #dbeafe;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.25;
}

.privacy-copy small {
    color: #94a3b8;
    font-size: 11px;
    line-height: 1.4;
}

.privacy-arrow {
    color: #93c5fd;
    font-size: 25px;
    line-height: 1;
    transition: transform .18s ease;
}

.privacy-panel:hover .privacy-arrow,
.privacy-panel:focus-visible .privacy-arrow {
    transform: translateX(2px);
}

/* Footer */
.footer {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(148, 163, 184, .18);
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
}

/* Clean SSO view only */
.sso-login {
    max-width: 420px;
}

.sso-login .badge,
.sso-login h1,
.sso-login .sub,
.sso-login .footer {
    display: none;
}

.sso-login .logo {
    margin: 12px 0 30px;
}

.sso-login .privacy-copy small {
    display: none;
}

.sso-login .privacy-panel {
    margin-top: 22px;
}

.microsoft-sign-in {
    width: 100%;
    min-height: 58px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 16px 20px;
    margin-top: 6px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 15px;
    background: linear-gradient(135deg, #2585f5, #1269d3);
    box-shadow: 0 14px 30px rgba(37, 99, 235, .42);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.2;
    letter-spacing: 0;
    cursor: pointer;
}

.microsoft-sign-in:visited {
    color: #fff;
}

.microsoft-sign-in:hover,
.microsoft-sign-in:focus-visible {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #3993ff, #176fdd);
    box-shadow: 0 18px 34px rgba(37, 99, 235, .58);
}

.microsoft-sign-in:focus-visible {
    outline: 3px solid #bfdbfe;
    outline-offset: 4px;
}

.microsoft-mark {
    display: grid;
    grid-template-columns: repeat(2, 9px);
    grid-template-rows: repeat(2, 9px);
    gap: 2px;
    flex: 0 0 auto;
}

.microsoft-mark i:nth-child(1) { background: #f25022; }
.microsoft-mark i:nth-child(2) { background: #7fba00; }
.microsoft-mark i:nth-child(3) { background: #00a4ef; }
.microsoft-mark i:nth-child(4) { background: #ffb900; }



/* Tablet / iPad / laptop / desktop sizing
   Keep the existing mobile layout unchanged below 501px. */
@media (min-width: 768px) {
    .login-container {
        max-width: 560px;
        padding: 42px;
    }

    .sso-login {
        max-width: 560px;
    }

    .sso-login .logo {
        margin: 10px 0 34px;
    }

    .sso-login .logo img {
        width: 280px;
    }

    .microsoft-sign-in {
        min-height: 72px;
        padding: 20px 26px;
        border-radius: 18px;
        font-size: 18px;
        gap: 16px;
    }

    .microsoft-mark {
        grid-template-columns: repeat(2, 11px);
        grid-template-rows: repeat(2, 11px);
        gap: 2px;
    }

    .sso-login .privacy-panel {
        margin-top: 26px;
        padding: 18px 20px;
        border-radius: 18px;
        grid-template-columns: 40px minmax(0, 1fr) 22px;
        gap: 14px;
    }

    .sso-login .privacy-icon {
        width: 40px;
        height: 40px;
        font-size: 19px;
        border-radius: 12px;
    }

    .sso-login .privacy-copy strong {
        font-size: 15px;
    }

    .sso-login .privacy-arrow {
        font-size: 30px;
    }
}


/* Mobile phones - keep the existing compact layout */
@media (max-width: 500px) {
    body {
        align-items: flex-start;
        overflow-y: auto;
        padding: 16px 0;
    }

    .login-container {
        padding: 24px;
    }

    .logo img {
        width: 180px;
    }

    h1 {
        font-size: 28px;
    }

    .privacy-panel {
        grid-template-columns: 32px minmax(0, 1fr) 14px;
        padding: 12px;
    }

    .privacy-icon {
        width: 32px;
        height: 32px;
    }

    .sso-login .logo {
        margin: 10px 0 26px;
    }

    .microsoft-sign-in {
        min-height: 60px;
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-container,
    body::before,
    body::after {
        animation: none;
    }

    .privacy-panel,
    .privacy-arrow {
        transition: none;
    }
}
