* {
    box-sizing: border-box;
}

html {
    font-family:
        Inter,
        Arial,
        Helvetica,
        sans-serif;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(
            135deg,
            #f8fafc 0%,
            #eef2f7 100%
        );
    color: #172033;
}

a {
    color: inherit;
}

button,
input {
    font: inherit;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    padding: 38px;
    background: #ffffff;
    border: 1px solid #e4e9f0;
    border-radius: 18px;
    box-shadow:
        0 18px 50px
        rgba(15, 23, 42, 0.09);
}

.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.brand {
    display: inline-block;
    margin-bottom: 10px;
    color: #111827;
    font-size: 30px;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -0.7px;
}

.portal-label {
    display: block;
    width: fit-content;
    margin: 0 auto 18px;
    padding: 6px 12px;
    background: #eef4ff;
    border-radius: 999px;
    color: #315ca8;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.auth-header h1 {
    margin: 0 0 8px;
    font-size: 23px;
    line-height: 1.2;
}

.auth-header p {
    max-width: 350px;
    margin: 0 auto;
    color: #667085;
    font-size: 14px;
    line-height: 1.6;
}

.auth-form {
    display: grid;
    gap: 20px;
}

.form-group {
    display: grid;
    gap: 8px;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.form-group label {
    color: #344054;
    font-size: 14px;
    font-weight: 650;
}

.form-group input {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    background: #ffffff;
    color: #101828;
    outline: none;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.form-group input::placeholder {
    color: #98a2b3;
}

.form-group input:focus {
    border-color: #3b67b0;
    box-shadow:
        0 0 0 3px
        rgba(59, 103, 176, 0.12);
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 70px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);

    padding: 5px 6px;

    border: 0;
    background: transparent;
    color: #475467;

    font-size: 13px;
    font-weight: 650;

    cursor: pointer;
}

.password-toggle:hover {
    color: #101828;
}

.password-toggle:focus-visible {
    outline: 2px solid #3b67b0;
    outline-offset: 2px;
    border-radius: 5px;
}

.forgot-link {
    color: #315ca8;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

.btn-primary {
    width: 100%;
    min-height: 48px;

    border: 0;
    border-radius: 10px;

    background: #172033;
    color: #ffffff;

    font-weight: 700;

    cursor: pointer;

    transition:
        transform 0.12s ease,
        background 0.12s ease;
}

.btn-primary:hover {
    background: #25324a;
}

.btn-primary:active {
    transform: translateY(1px);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;

    margin: 26px 0 20px;

    color: #98a2b3;
    font-size: 12px;
}

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

.auth-footer {
    text-align: center;
}

.auth-footer p {
    margin: 0 0 10px;
    color: #667085;
    font-size: 14px;
}

.btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 46px;

    border: 1px solid #d0d5dd;
    border-radius: 10px;

    background: #ffffff;
    color: #344054;

    font-size: 14px;
    font-weight: 650;

    text-decoration: none;

    transition:
        background 0.12s ease,
        border-color 0.12s ease;
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: #98a2b3;
}

.portal-back {
    margin-top: 24px;
    text-align: center;
}

.portal-back a {
    color: #667085;
    font-size: 13px;
    text-decoration: none;
}

.portal-back a:hover {
    color: #344054;
    text-decoration: underline;
}

@media (max-width: 520px) {
    .auth-page {
        padding: 16px;
    }

    .auth-card {
        padding: 28px 20px;
        border-radius: 14px;
    }

    .brand {
        font-size: 27px;
    }

    .label-row {
        align-items: flex-end;
    }
}
