/* =============================================================================
   auth.css - sign-in, sign-out and access-denied pages (Pages/Shared/_AuthLayout).
   Sections: 1. frame  2. brand panel  3. card  4. Microsoft button  5. test sign-in
   ============================================================================= */

/* 1. Frame -------------------------------------------------------------------- */
:root {
    --brand-dark: #0d3b44;
    --brand-mid: #1b7a78;
    --brand-accent: #f2b35d;
}

.auth-body {
    min-height: 100vh;
    margin: 0;
    background: #eef2f7;
    font-size: 15px;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(320px, 42%) 1fr;
    min-height: 100vh;
}

@media (max-width: 860px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-steps { display: none; }
}

/* 2. Brand panel -------------------------------------------------------------- */
.auth-brand {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    padding: 3rem;
    color: #fff;
    background: linear-gradient(150deg, var(--brand-dark) 0%, var(--brand-mid) 100%);
}

/* Product name on the dark panel */
.auth-logos {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    margin-bottom: 1.75rem;
}
.auth-seal { width: 84px; height: 84px; flex: 0 0 auto; }
.auth-wordmark { height: 42px; width: auto; max-width: 100%; }

.auth-title { font-size: 1.9rem; font-weight: 600; line-height: 1.2; margin: 0; }

.auth-steps { list-style: none; padding: 0; margin: 0; }
.auth-steps li { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; opacity: .92; }
.auth-steps span {
    display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 30px; height: 30px; border-radius: 50%;
    background: rgba(255, 255, 255, .15); font-weight: 600;
}

.auth-foot { display: flex; align-items: center; gap: .75rem; font-size: .85rem; opacity: .85; }

/* 3. Card --------------------------------------------------------------------- */
.auth-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    padding: 2.25rem;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 47, 108, .12);
}

.auth-heading { font-size: 1.5rem; font-weight: 600; margin-bottom: 1rem; color: var(--brand-dark); }
.auth-legal { margin-top: 1rem; font-size: .8rem; color: #6c757d; }

/* 4. Microsoft button ----------------------------------------------------------- */
.btn-ms {
    display: inline-flex; align-items: center; justify-content: center; gap: .7rem;
    padding: .7rem 1rem; font-weight: 600; color: #fff;
    background: var(--brand-dark); border: none; border-radius: 10px;
}
.btn-ms:hover, .btn-ms:focus { background: var(--brand-mid); color: #fff; }

/* 5. Test sign-in --------------------------------------------------------------- */
.test-banner {
    margin-bottom: 1rem;
    padding: .65rem .85rem;
    font-size: .85rem;
    color: #664d03;
    background: #fff3cd;
    border: 1px dashed #e0b84a;
    border-radius: 10px;
}

.user-list {
    max-height: 340px;
    overflow-y: auto;
    border: 1px solid #e3e8ef;
    border-radius: 12px;
}

.user-item { margin: 0; border-bottom: 1px solid #eef1f5; }
.user-item:last-of-type { border-bottom: none; }

.user-button {
    display: flex; align-items: center; gap: .8rem; width: 100%;
    padding: .7rem .85rem; text-align: left;
    background: #fff; border: none; transition: background .12s;
}
.user-button:hover, .user-button:focus { background: #f2f6fc; outline: none; }

.avatar {
    display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 40px; height: 40px; border-radius: 50%;
    font-weight: 600; font-size: .9rem; color: #fff;
}

.user-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.user-name { font-weight: 600; color: #1f2d3d; }
.user-mail { font-size: .8rem; color: #6c757d; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.user-tags { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; }
.role-badge, .dept-badge { padding: .1rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 600; white-space: nowrap; }
.dept-badge { background: #eef1f5; color: #495057; }

/* Role colours: avatar background + badge */
.avatar.role-admin { background: #842029; }
.avatar.role-approver { background: #0a6c74; }
.avatar.role-user { background: var(--brand-mid); }
.role-badge.role-admin { background: #f8d7da; color: #842029; }
.role-badge.role-approver { background: #cff4fc; color: #055160; }
.role-badge.role-user { background: #d7efec; color: var(--brand-dark); }

.auth-product { color: #fff; font-size: 1.15rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
