
:root {
    --auth-primary: #831d2b;
    --auth-primary-dark: #641321;
    --auth-primary-light: #fdf1f3;
    --auth-text: #182233;
    --auth-muted: #69768a;
    --auth-border: #e4e8ef;
    --auth-success: #167347;
    --auth-success-bg: #eaf7ef;
    --auth-warning: #986400;
    --auth-warning-bg: #fff5db;
    --auth-danger: #b42332;
    --auth-danger-bg: #fff0f1;
}

.pulse-login-body {
    min-height: 100vh;
    margin: 0;
    background: #f4f6fa;
    color: var(--auth-text);
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}

.pulse-auth-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 28px 16px;
    background:
        radial-gradient(
            circle at 15% 12%,
            rgba(196, 73, 89, .11),
            transparent 32%
        ),
        radial-gradient(
            circle at 88% 90%,
            rgba(131, 29, 43, .065),
            transparent 30%
        ),
        linear-gradient(135deg, #f7f8fb, #edf1f6);
}

.pulse-auth-card {
    width: min(480px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 32px;
    border: 1px solid rgba(222, 227, 236, .95);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 22px 65px rgba(20, 30, 50, .13);
}

.pulse-auth-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 19px;
}

.pulse-auth-icon {
    display: grid;
    width: 55px;
    height: 55px;
    flex: 0 0 55px;
    place-items: center;
    border: 1px solid #f3d7dc;
    border-radius: 15px;
    background: var(--auth-primary-light);
    font-size: 27px;
}

.pulse-auth-brand h1 {
    margin: 0;
    color: var(--auth-primary);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: .2px;
}

.pulse-auth-brand p {
    margin: 4px 0 0;
    color: var(--auth-muted);
    font-size: 11px;
}

.pulse-auth-facility {
    margin-bottom: 17px;
    padding: 12px 15px;
    border: 1px solid #f2d8dc;
    border-left: 4px solid var(--auth-primary);
    border-radius: 10px;
    background: #fdf5f6;
}

.pulse-auth-facility strong,
.pulse-auth-facility span {
    display: block;
}

.pulse-auth-facility strong {
    color: var(--auth-primary-dark);
    font-size: 12px;
    letter-spacing: .25px;
}

.pulse-auth-facility span {
    margin-top: 3px;
    color: var(--auth-muted);
    font-size: 10px;
}

.pulse-security-notice {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 23px;
    padding: 13px 14px;
    border: 1px solid #f0dfa8;
    border-radius: 11px;
    background: var(--auth-warning-bg);
}

.pulse-security-mark {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    border-radius: 9px;
    background: rgba(152, 100, 0, .09);
    font-size: 14px;
}

.pulse-security-notice strong {
    display: block;
    margin-bottom: 4px;
    color: #805900;
    font-size: 11px;
    font-weight: 800;
}

.pulse-security-notice p {
    margin: 0;
    color: #79591d;
    font-size: 10px;
    line-height: 1.55;
}

.pulse-auth-panel {
    width: 100%;
}

.pulse-auth-heading {
    margin-bottom: 18px;
}

.pulse-auth-eyebrow {
    display: inline-block;
    margin-bottom: 7px;
    color: var(--auth-primary);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
}

.pulse-auth-heading h2 {
    margin: 0;
    color: var(--auth-text);
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.3px;
}

.pulse-auth-heading p {
    margin: 5px 0 0;
    color: var(--auth-muted);
    font-size: 11px;
    line-height: 1.55;
}

.pulse-auth-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 15px;
}

.pulse-auth-group label {
    color: #344054;
    font-size: 11px;
    font-weight: 750;
}

.pulse-auth-group input,
.pulse-auth-group select {
    width: 100%;
    min-height: 43px;
    padding: 10px 12px;
    border: 1px solid #d8dee8;
    border-radius: 9px;
    outline: none;
    background: #fff;
    color: var(--auth-text);
    font: inherit;
    font-size: 12px;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.pulse-auth-group input::placeholder {
    color: #9aa4b2;
}

.pulse-auth-group input:hover,
.pulse-auth-group select:hover {
    border-color: #b9c2cf;
}

.pulse-auth-group input:focus,
.pulse-auth-group select:focus {
    border-color: #b74b59;
    box-shadow: 0 0 0 3px rgba(196, 73, 89, .11);
}

.pulse-auth-group small {
    color: #7d8899;
    font-size: 10px;
    line-height: 1.45;
}

.pulse-auth-primary-btn {
    display: flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    margin-top: 5px;
    padding: 11px 16px;
    border: 1px solid var(--auth-primary);
    border-radius: 10px;
    background: linear-gradient(135deg, #831d2b, #9b2b3b);
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 5px 14px rgba(131, 29, 43, .15);
    transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.pulse-auth-primary-btn:hover {
    transform: translateY(-1px);
    background: var(--auth-primary-dark);
    box-shadow: 0 8px 17px rgba(131, 29, 43, .2);
}

.pulse-auth-primary-btn:focus-visible {
    outline: 3px solid rgba(196, 73, 89, .3);
    outline-offset: 3px;
}

.pulse-auth-primary-btn:disabled {
    cursor: wait;
    opacity: .6;
    transform: none;
}

.pulse-auth-message {
    min-height: 18px;
    margin-top: 12px;
    padding: 0;
    font-size: 11px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.pulse-auth-message:empty {
    min-height: 0;
    margin-top: 0;
}

.pulse-auth-message.success,
.pulse-auth-message.error,
.pulse-auth-message.warning {
    padding: 10px 12px;
    border-radius: 9px;
}

.pulse-auth-message.success {
    border: 1px solid #c8ead7;
    background: var(--auth-success-bg);
    color: var(--auth-success);
}

.pulse-auth-message.error {
    border: 1px solid #f1c6cc;
    background: var(--auth-danger-bg);
    color: var(--auth-danger);
}

.pulse-auth-message.warning {
    border: 1px solid #f0dfa8;
    background: var(--auth-warning-bg);
    color: #805900;
}

.pulse-auth-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 19px;
    padding-top: 16px;
    border-top: 1px solid var(--auth-border);
    color: var(--auth-muted);
    font-size: 10px;
    text-align: center;
}

.pulse-auth-switch button {
    padding: 2px;
    border: 0;
    background: transparent;
    color: var(--auth-primary);
    cursor: pointer;
    font: inherit;
    font-size: 10px;
    font-weight: 800;
}

.pulse-auth-switch button:hover {
    text-decoration: underline;
}

.pulse-auth-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 21px;
    padding-top: 14px;
    border-top: 1px solid var(--auth-border);
    color: #8792a3;
    font-size: 9px;
}

.pulse-auth-footer span:first-child {
    color: var(--auth-success);
    font-weight: 750;
}

/* Supervisor access manager modal */

.pulse-access-btn {
    padding: 8px 11px;
    border: 1px solid #edc8ce;
    border-radius: 8px;
    background: var(--auth-primary-light);
    color: var(--auth-primary);
    cursor: pointer;
    font-size: 10px;
    font-weight: 800;
}

.pulse-access-btn:hover {
    background: #f9e3e7;
}

.pulse-access-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 20px;
    background: rgba(17, 24, 39, .58);
    backdrop-filter: blur(4px);
}

.pulse-access-card {
    width: min(950px, 100%);
    max-height: 88vh;
    overflow: auto;
    padding: 23px;
    border: 1px solid var(--auth-border);
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 25px 75px rgba(0, 0, 0, .24);
}

.pulse-access-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 18px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--auth-border);
}

.pulse-access-header h2 {
    margin: 0;
    color: var(--auth-text);
    font-size: 18px;
    font-weight: 800;
}

.pulse-access-header p {
    margin: 4px 0 0;
    color: var(--auth-muted);
    font-size: 11px;
}

.pulse-access-close {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border: 1px solid var(--auth-border);
    border-radius: 9px;
    background: #f7f8fa;
    color: #4a5568;
    cursor: pointer;
    font-size: 19px;
}

.pulse-access-close:hover {
    background: #eef0f4;
}

.pulse-user-row {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr .8fr 1fr;
    align-items: center;
    gap: 10px;
    margin-bottom: 9px;
    padding: 13px;
    border: 1px solid var(--auth-border);
    border-radius: 11px;
    background: #fff;
    color: #3b475b;
    font-size: 10px;
}

.pulse-user-row strong {
    display: block;
    color: var(--auth-text);
    font-size: 11px;
}

.pulse-user-row small {
    display: block;
    margin: 3px 0;
    color: var(--auth-muted);
    font-size: 9px;
}

.pulse-pending-badge,
.pulse-approved-badge,
.pulse-rejected-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 9px;
    border: 1px solid transparent;
    border-radius: 30px;
    font-size: 9px;
    font-weight: 800;
}

.pulse-pending-badge {
    border-color: #f0dfa8;
    background: var(--auth-warning-bg);
    color: #805900;
}

.pulse-approved-badge {
    border-color: #c8ead7;
    background: var(--auth-success-bg);
    color: var(--auth-success);
}

.pulse-rejected-badge {
    border-color: #f1c6cc;
    background: var(--auth-danger-bg);
    color: var(--auth-danger);
}

.pulse-user-action-btn {
    min-height: 28px;
    margin: 2px;
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: 7px;
    cursor: pointer;
    font-size: 9px;
    font-weight: 800;
}

.pulse-approve-btn {
    border-color: #c8ead7;
    background: var(--auth-success-bg);
    color: var(--auth-success);
}

.pulse-approve-btn:hover {
    background: #d8f2e3;
}

.pulse-reject-btn {
    border-color: #f1c6cc;
    background: var(--auth-danger-bg);
    color: var(--auth-danger);
}

.pulse-reject-btn:hover {
    background: #ffe1e5;
}

@media (max-width: 700px) {
    .pulse-auth-card {
        padding: 23px;
    }

    .pulse-user-row {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .pulse-access-card {
        padding: 17px;
    }

    .pulse-access-overlay {
        align-items: flex-start;
    }
}

@media (max-width: 450px) {
    .pulse-auth-screen {
        padding: 12px;
    }

    .pulse-auth-card {
        padding: 19px;
        border-radius: 15px;
    }

    .pulse-auth-brand h1 {
        font-size: 21px;
    }

    .pulse-auth-heading h2 {
        font-size: 19px;
    }

    .pulse-auth-footer {
        flex-direction: column;
        gap: 5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}