* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Page background */
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #1f2933 0, #050608 45%, #000000 100%);
    color: #f9fafb;
    min-height: 100vh;
}

/* Centering container */
.login-page {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

/* Main card */
.login-card {
    width: 100%;
    max-width: 420px;
    background: rgba(15, 23, 42, 0.92);
    border-radius: 18px;
    padding: 24px 22px 20px;
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(148, 163, 184, 0.1);
    backdrop-filter: blur(14px);
    animation: login-fade-in 0.6s ease-out;
}

/* Header (logo + title) */
.login-header {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
}

/* EFI circle logo */
.login-logo-circle {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 0%, #38bdf8, #0ea5e9, #0369a1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 0 2px rgba(15, 23, 42, 0.9),
        0 10px 25px rgba(56, 189, 248, 0.35);
    margin-right: 12px;
}

.login-logo-text {
    font-weight: 700;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    color: #0b1120;
}

/* Title block */
.login-title-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.login-title {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #e5e7eb;
}

.login-subtitle {
    font-size: 0.8rem;
    color: #9ca3af;
}

/* Flash messages */
.login-flash-container {
    margin-bottom: 12px;
}

.flash {
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 6px;
    text-align: left;
}

.flash-error,
.flash.danger {
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.6);
    color: #fecaca;
}

.flash-info,
.flash.message {
    background: rgba(59, 130, 246, 0.14);
    border: 1px solid rgba(96, 165, 250, 0.6);
    color: #bfdbfe;
}

.flash-success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(74, 222, 128, 0.6);
    color: #bbf7d0;
}

/* Body copy */
.login-body {
    margin-top: 6px;
    margin-bottom: 14px;
}

.login-description {
    font-size: 0.9rem;
    color: #cbd5f5;
    margin-bottom: 14px;
}

/* Microsoft SSO button */
.ms-button {
    width: 100%;
    border-radius: 999px;
    border: 0;
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    cursor: pointer;

    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow:
        0 12px 30px rgba(37, 99, 235, 0.4),
        0 0 0 1px rgba(148, 163, 184, 0.3);

    color: #f9fafb;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    transition:
        transform 0.1s ease-out,
        box-shadow 0.1s ease-out,
        background 0.1s ease-out;
}

.ms-button:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #1d4ed8, #1e3a8a);
    box-shadow:
        0 14px 28px rgba(37, 99, 235, 0.6),
        0 0 0 1px rgba(191, 219, 254, 0.35);
}

.ms-button:active {
    transform: translateY(0);
    box-shadow:
        0 8px 18px rgba(37, 99, 235, 0.4),
        0 0 0 1px rgba(129, 140, 248, 0.4);
}

/* Microsoft logo (4 squares) */
.ms-logo {
    width: 20px;
    height: 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 2px;
    background: #f9fafb;
    border-radius: 4px;
    padding: 2px;
}

.ms-logo-square {
    border-radius: 1px;
}

.ms-logo-orange {
    background: #f25022;
}

.ms-logo-green {
    background: #7fba00;
}

.ms-logo-blue {
    background: #00a4ef;
}

.ms-logo-yellow {
    background: #ffb900;
}

.ms-button-text {
    white-space: nowrap;
}

/* Small note under button */
.login-note {
    margin-top: 12px;
    font-size: 0.78rem;
    color: #9ca3af;
    line-height: 1.4;
}

/* Footer */
.login-footer {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid rgba(55, 65, 81, 0.8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.75rem;
    color: #6b7280;
}

.login-env-tag {
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid rgba(129, 140, 248, 0.6);
    background: rgba(30, 64, 175, 0.35);
    color: #e5e7eb;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
}

/* Animations */
@keyframes login-fade-in {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive tweaks */
@media (max-width: 480px) {
    .login-card {
        padding: 20px 18px 16px;
    }

    .login-title {
        font-size: 1.05rem;
    }

    .login-description {
        font-size: 0.85rem;
    }

    .ms-button {
        font-size: 0.9rem;
        padding: 9px 14px;
    }
}