:root {
    --auth-navy: #002347;
    --auth-blue: #0b4987;
    --auth-accent: #1677ff;
    --auth-ink: #102a43;
    --auth-muted: #62748a;
}

.auth-page {
    position: relative;
    min-height: calc(100vh - 57px);
    padding: clamp(2rem, 6vh, 5rem) 1rem;
    display: grid;
    place-items: start center;
    background: #f4f7fb;
}

.auth-card {
    width: min(100%, 32rem);
    overflow: hidden;
    border: 1px solid rgba(15, 47, 87, .1);
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 24px 64px rgba(15, 47, 87, .14), 0 4px 14px rgba(15, 47, 87, .06);
}

.auth-card::before {
    content: "";
    display: block;
    height: 4px;
    background: linear-gradient(90deg, var(--auth-blue), var(--auth-accent));
}

.auth-brand {
    padding: 1.75rem 2rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.auth-brand img {
    width: min(13.5rem, 62%);
    height: auto;
}

.auth-heading {
    padding: 2rem 2rem 1.35rem;
    text-align: center;
}

.auth-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    display: grid;
    place-items: center;
    border-radius: .9rem;
    color: var(--auth-blue);
    background: rgba(11, 73, 135, .09);
    font-size: 1.15rem;
}

.auth-heading h1 {
    margin: 0;
    color: var(--auth-ink);
    font-size: clamp(1.55rem, 4vw, 1.9rem);
    font-weight: 700;
    letter-spacing: -.025em;
}

.auth-heading p {
    margin: .65rem auto 0;
    max-width: 25rem;
    color: var(--auth-muted);
    line-height: 1.55;
}

.auth-content {
    padding: 0 2rem 2rem;
}

.auth-content .form-label {
    color: var(--auth-ink);
    font-size: .9rem;
    font-weight: 700;
}

.auth-content .form-control {
    min-height: 3rem;
    border-color: #d7e0ea;
    border-radius: .7rem;
    background: #fbfcfe;
}

.auth-content .form-control:focus {
    border-color: var(--auth-accent);
    background: #fff;
    box-shadow: 0 0 0 .22rem rgba(22, 119, 255, .12);
}

.auth-content .btn {
    min-height: 3rem;
    border-radius: .7rem;
    font-weight: 700;
}

.auth-content .btn-primary {
    border-color: var(--auth-blue);
    background: linear-gradient(135deg, var(--auth-blue), #1266b2);
    box-shadow: 0 8px 18px rgba(11, 73, 135, .18);
}

.auth-content .btn-primary:hover,
.auth-content .btn-primary:focus {
    border-color: var(--auth-navy);
    background: linear-gradient(135deg, var(--auth-navy), var(--auth-blue));
}

.auth-content .btn-microsoft {
    border: 1px solid #cdd8e5;
    color: var(--auth-ink);
    background: #fff;
}

.auth-content .btn-microsoft:hover,
.auth-content .btn-microsoft:focus {
    border-color: var(--auth-blue);
    color: var(--auth-blue);
    background: #f6faff;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: .85rem;
    margin: 1.25rem 0;
    color: #8190a3;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #e0e7ef;
}

.auth-links {
    padding: 1rem 2rem;
    border-top: 1px solid #e8edf3;
    background: #f8fafc;
    text-align: center;
    font-size: .9rem;
}

.auth-links a {
    color: var(--auth-blue);
    font-weight: 700;
    text-decoration: none;
}

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

.auth-state {
    text-align: center;
    color: var(--auth-muted);
    line-height: 1.6;
}

.auth-state .state-mark {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1.25rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 1.5rem;
}

.auth-state .state-mark-success { color: #18794e; background: #e8f7ef; }
.auth-state .state-mark-danger { color: #b42318; background: #fdecec; }

@media (max-width: 575.98px) {
    .auth-page { padding: 1rem .75rem 2rem; place-items: start center; }
    .auth-card { border-radius: .9rem; }
    .auth-brand { padding: 1.35rem 1.25rem 0; }
    .auth-brand img { width: 12rem; max-width: 75%; }
    .auth-heading { padding: 1.6rem 1.25rem 1.15rem; }
    .auth-content { padding: 0 1.25rem 1.5rem; }
    .auth-links { padding: 1rem 1.25rem; }
}
