/**
 * Access gateway & portal login pages (organization-neutral until floor selection).
 */

:root {
    --auth-ink: #082838;
    --auth-muted: #647582;
    --auth-line: #dcebf0;
    --auth-teal: #0e7f8f;
    --auth-aqua: #22c1d6;
    --auth-indigo: #4338ca;
    --auth-indigo-deep: #312e81;
    --auth-navy: #082838;
}

.auth-body {
    margin: 0;
    min-height: 100vh;
    color: var(--auth-ink);
}

.auth-body--gateway {
    background:
        radial-gradient(circle at 12% 8%, rgba(34, 193, 214, .16), transparent 30%),
        radial-gradient(circle at 88% 4%, rgba(99, 102, 241, .12), transparent 28%),
        linear-gradient(160deg, #f7fcfd 0%, #edf8fb 42%, #ffffff 100%);
}

.auth-body--operations {
    background:
        radial-gradient(circle at 82% 6%, rgba(129, 140, 248, .2), transparent 32%),
        linear-gradient(165deg, #f5f3ff 0%, #eef2ff 38%, #ffffff 100%);
}

.auth-body--employee {
    background:
        radial-gradient(circle at 18% 10%, rgba(34, 193, 214, .14), transparent 30%),
        linear-gradient(165deg, #f7fcfd 0%, #edf8fb 45%, #ffffff 100%);
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px 16px 32px;
}

.auth-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 1120px;
    width: 100%;
    margin: 0 auto 8px;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(14, 127, 143, .12);
    border-radius: 16px;
    padding: 8px 14px;
    box-shadow: 0 12px 32px rgba(8, 40, 56, .08);
    text-decoration: none;
}

.auth-logo img,
.auth-logo .brand-logo-inline svg {
    height: 46px;
    max-width: 260px;
    object-fit: contain;
    display: block;
}

.auth-back-link {
    font-size: 13px;
    font-weight: 800;
    color: var(--auth-teal);
    text-decoration: none;
}

.auth-body--operations .auth-back-link {
    color: var(--auth-indigo);
}

.auth-main {
    flex: 1;
    display: grid;
    place-items: center;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
}

.auth-hero {
    text-align: center;
    margin-bottom: 28px;
}

.auth-hero-title {
    font-size: clamp(28px, 4.5vw, 42px);
    font-weight: 900;
    letter-spacing: -.04em;
    margin-bottom: 8px;
}

.auth-hero-subtitle {
    color: var(--auth-muted);
    font-size: clamp(15px, 2vw, 17px);
    max-width: 640px;
    margin: 0 auto;
}

.auth-gateway-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
}

@media (max-width: 767.98px) {
    .auth-gateway-grid {
        grid-template-columns: 1fr;
    }
}

.access-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 380px;
    padding: 28px 26px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, .85);
    text-decoration: none;
    color: inherit;
    transition: transform .22s ease, box-shadow .22s ease;
    box-shadow: 0 22px 60px rgba(8, 40, 56, .09);
}

.access-card:hover,
.access-card:focus {
    transform: translateY(-4px);
    color: inherit;
    box-shadow: 0 28px 72px rgba(8, 40, 56, .14);
    outline: none;
}

.access-card--operations {
    color: #fff;
    border-color: rgba(165, 180, 252, .35);
    background:
        radial-gradient(circle at 86% 10%, rgba(129, 140, 248, .28), transparent 34%),
        linear-gradient(145deg, var(--auth-indigo-deep), var(--auth-indigo) 52%, #4f46e5);
}

.access-card--employee {
    background:
        radial-gradient(circle at 88% 8%, rgba(34, 193, 214, .18), transparent 34%),
        linear-gradient(145deg, rgba(255, 255, 255, .95), rgba(232, 248, 251, .9));
    border-color: rgba(14, 127, 143, .14);
}

.access-card-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
}

.access-card--operations .access-card-icon {
    background: rgba(255, 255, 255, .14);
    color: #c7d2fe;
}

.access-card--employee .access-card-icon {
    background: #e5f8fb;
    color: var(--auth-teal);
}

.access-card-icon svg {
    width: 28px;
    height: 28px;
}

.access-card h2 {
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 900;
    letter-spacing: -.03em;
    margin-bottom: 8px;
}

.access-card-lead {
    font-size: 14px;
    margin-bottom: 18px;
    line-height: 1.5;
}

.access-card--operations .access-card-lead {
    color: rgba(255, 255, 255, .8);
}

.access-card--employee .access-card-lead {
    color: var(--auth-muted);
}

.access-feature-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: auto;
    padding-bottom: 20px;
}

.access-feature-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .02em;
}

.access-card--operations .access-feature-pill {
    background: rgba(255, 255, 255, .14);
    color: #e0e7ff;
    border: 1px solid rgba(255, 255, 255, .16);
}

.access-card--employee .access-feature-pill {
    background: rgba(14, 127, 143, .1);
    color: var(--auth-teal);
    border: 1px solid rgba(14, 127, 143, .14);
}

.access-card-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    border-radius: 14px;
    font-weight: 900;
    font-size: 14px;
    margin-top: 8px;
}

.access-card--operations .access-card-cta {
    background: #fff;
    color: var(--auth-indigo-deep);
}

.access-card--employee .access-card-cta {
    background: linear-gradient(135deg, var(--auth-teal), var(--auth-aqua));
    color: #fff;
    box-shadow: 0 12px 28px rgba(14, 127, 143, .22);
}

.auth-form-card {
    width: min(480px, 100%);
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 28px;
    padding: 32px 28px;
    box-shadow: 0 24px 70px rgba(8, 40, 56, .1);
    backdrop-filter: blur(14px);
}

.auth-body--operations .auth-form-card {
    border-color: rgba(67, 56, 202, .12);
}

.auth-portal-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.auth-portal-badge--operations {
    color: #fff;
    background: linear-gradient(135deg, var(--auth-indigo-deep), var(--auth-indigo));
}

.auth-portal-badge--employee {
    color: var(--auth-teal);
    background: #e8f8fb;
}

.auth-form-title {
    font-size: clamp(24px, 3.5vw, 30px);
    font-weight: 900;
    letter-spacing: -.04em;
    margin-bottom: 6px;
}

.auth-form-subtitle {
    color: var(--auth-muted);
    font-size: 14px;
    margin-bottom: 22px;
}

.auth-form-card .form-control {
    min-height: 48px;
    border-radius: 14px;
    border-color: #d8e6ec;
}

.auth-form-card .form-control:focus {
    border-color: var(--auth-aqua);
    box-shadow: 0 0 0 .2rem rgba(34, 193, 214, .16);
}

.auth-body--operations .auth-form-card .form-control:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 .2rem rgba(99, 102, 241, .18);
}

.auth-submit {
    min-height: 50px;
    border: 0;
    border-radius: 14px;
    font-weight: 900;
    color: #fff;
    width: 100%;
}

.auth-submit--employee {
    background: linear-gradient(135deg, var(--auth-teal), var(--auth-aqua));
    box-shadow: 0 14px 30px rgba(14, 127, 143, .2);
}

.auth-submit--operations {
    background: linear-gradient(135deg, var(--auth-indigo-deep), var(--auth-indigo));
    box-shadow: 0 14px 30px rgba(67, 56, 202, .22);
}

.auth-alert {
    max-width: 480px;
    margin: 0 auto 16px;
    border-radius: 14px;
}

.auth-footer-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    font-size: 13px;
}

.auth-footer-links a {
    font-weight: 800;
    text-decoration: none;
}

.auth-body--operations .auth-footer-links a {
    color: var(--auth-indigo);
}

.auth-body--employee .auth-footer-links a,
.auth-body--gateway .auth-footer-links a {
    color: var(--auth-teal);
}

@media (max-width: 575.98px) {
    .access-card {
        min-height: auto;
        padding: 22px 20px;
        border-radius: 22px;
    }

    .auth-form-card {
        padding: 24px 20px;
        border-radius: 22px;
    }

    .auth-logo img {
        height: 40px;
    }
}
