:root {
    color-scheme: light;
    --auth-ink: #172b4d;
    --auth-muted: #64748b;
    --auth-border: #dbe4ee;
    --auth-blue: #0d6efd;
}

* {
    box-sizing: border-box;
}

body {
    background:
        radial-gradient(circle at top left, rgba(13, 110, 253, .10), transparent 520px),
        radial-gradient(circle at top right, rgba(32, 201, 151, .10), transparent 460px),
        #f4f8fb;
    color: var(--auth-ink);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
}

.auth-shell {
    display: flex;
    min-height: 100vh;
    min-height: 100svh;
    padding: 32px 16px;
}

.auth-card {
    background: #fff;
    border: 1px solid var(--auth-border);
    border-radius: 14px;
    box-shadow: 0 12px 36px rgba(23, 43, 77, .07);
    margin: auto;
    min-width: 0;
    width: min(100%, 440px);
}

.directory-icon {
    flex-shrink: 0;
    height: 20px;
    width: 20px;
}

.auth-brand {
    background: linear-gradient(120deg, #f8fbff, #f5fbfc);
    border-bottom: 1px solid var(--auth-border);
    border-radius: 14px 14px 0 0;
    padding: 24px 28px;
}

.auth-brand__link {
    align-items: center;
    color: var(--auth-ink);
    display: inline-flex;
    gap: 12px;
    max-width: 100%;
    text-decoration: none;
}

.auth-brand__mark {
    align-items: center;
    background: linear-gradient(140deg, #3975df 8%, #3daeb4 92%);
    border-radius: 13px;
    box-shadow: 0 3px 9px rgba(41, 115, 180, .16);
    color: #fff;
    display: inline-flex;
    flex: 0 0 46px;
    height: 46px;
    justify-content: center;
}

.auth-brand__mark .directory-icon {
    height: 29px;
    width: 29px;
}

.auth-brand__text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.auth-brand__text strong {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -.55px;
    line-height: 1.3;
}

.auth-brand__text strong span {
    font-weight: 500;
}

.auth-brand__text small {
    color: var(--auth-muted);
    font-size: 12px;
}

.auth-body {
    padding: 28px;
}

.auth-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.4px;
    line-height: 1.4;
    margin: 0 0 24px;
    overflow-wrap: anywhere;
}

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

.auth-field {
    min-width: 0;
}

.auth-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 7px;
}

.auth-input {
    position: relative;
}

.auth-input > .directory-icon {
    color: #7b8da6;
    left: 14px;
    pointer-events: none;
    position: absolute;
    top: 14px;
}

.auth-control {
    appearance: none;
    background: #fff;
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    color: var(--auth-ink);
    display: block;
    font: inherit;
    font-size: 16px;
    height: 48px;
    min-width: 0;
    padding: 11px 14px 11px 44px;
    transition: border-color .16s ease, box-shadow .16s ease;
    width: 100%;
}

.auth-control::placeholder {
    color: #78879b;
    opacity: 1;
}

.auth-control:focus {
    border-color: #7eaff4;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, .12);
    outline: none;
}

.auth-control.is-invalid {
    border-color: #d64a59;
}

.auth-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(214, 74, 89, .12);
}

.auth-error {
    color: #bd3546;
    font-size: 13px;
    line-height: 1.5;
    margin: 7px 0 0;
    overflow-wrap: anywhere;
}

.auth-alert {
    align-items: flex-start;
    background: #fff4f5;
    border: 1px solid #f2cbd0;
    border-radius: 8px;
    color: #a62b3c;
    display: flex;
    font-size: 14px;
    gap: 10px;
    overflow-wrap: anywhere;
    padding: 12px 14px;
}

.auth-alert .directory-icon {
    margin-top: 1px;
}

.auth-remember {
    align-items: flex-start;
    display: flex;
    font-size: 14px;
    gap: 9px;
}

.auth-remember input {
    accent-color: var(--auth-blue);
    cursor: pointer;
    flex: 0 0 18px;
    height: 18px;
    margin: 2px 0 0;
    width: 18px;
}

.auth-remember label {
    cursor: pointer;
}

.auth-submit {
    align-items: center;
    background: linear-gradient(135deg, var(--auth-blue), #0aa2c0);
    border: 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(13, 110, 253, .17);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    gap: 9px;
    justify-content: center;
    min-height: 48px;
    padding: 12px 20px;
    transition: background .16s ease, box-shadow .16s ease;
    width: 100%;
}

.auth-submit:hover {
    background: linear-gradient(135deg, #0b5ed7, #087f9b);
    box-shadow: 0 5px 16px rgba(13, 110, 253, .22);
}

.auth-brand__link:focus-visible,
.auth-submit:focus-visible,
.auth-remember input:focus-visible {
    outline: 3px solid rgba(13, 110, 253, .4);
    outline-offset: 4px;
}

@media (max-width: 479px) {
    .auth-shell {
        padding: 24px 16px;
    }

    .auth-brand,
    .auth-body {
        padding: 24px;
    }

    .auth-title {
        font-size: 21px;
    }
}

@media (max-width: 359px) {
    .auth-brand,
    .auth-body {
        padding: 20px;
    }

    .auth-brand__text strong {
        font-size: 17px;
    }

    .auth-title {
        font-size: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-control,
    .auth-submit {
        transition: none;
    }
}
