:root {
    --auth-primary: #087fb9;
    --auth-primary-dark: #05618f;
    --auth-accent: #f28c28;
    --auth-text: #263746;
    --auth-muted: #687987;
    --auth-border: #d7e0e7;
    --auth-surface: #ffffff;
    --auth-background: #f3f6f8;
}

html,
body.auth-body {
    min-height: 100%;
}

body.auth-body {
    margin: 0;
    color: var(--auth-text);
    background:
        radial-gradient(circle at 12% 15%, rgba(242, 140, 40, 0.12), transparent 27rem),
        radial-gradient(circle at 88% 85%, rgba(8, 127, 185, 0.12), transparent 30rem),
        var(--auth-background);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

.auth-shell {
    width: 100%;
    max-width: 460px;
}

.auth-brand {
    margin-bottom: 24px;
    text-align: center;
}

.auth-brand-link {
    display: inline-flex;
    border-radius: 8px;
}

.auth-brand-link:focus-visible {
    outline: 3px solid rgba(8, 127, 185, 0.3);
    outline-offset: 5px;
}

.auth-logo {
    display: block;
    width: min(235px, 72vw);
    height: auto;
}

.auth-card {
    overflow: hidden;
    border: 1px solid rgba(25, 70, 96, 0.1);
    border-radius: 18px;
    background: var(--auth-surface);
    box-shadow: 0 22px 60px rgba(24, 57, 77, 0.14);
}

.auth-card::before {
    display: block;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--auth-accent) 0 24%, var(--auth-primary) 24% 100%);
    content: "";
}

.auth-card-content {
    padding: 34px 36px 36px;
}

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

.auth-title {
    margin: 0;
    color: var(--auth-text);
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.auth-subtitle {
    margin: 8px 0 0;
    color: var(--auth-muted);
    font-size: 0.95rem;
    line-height: 1.55;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: inline-block;
    margin-bottom: 7px;
    color: #354b5b;
    font-size: 0.88rem;
    font-weight: 600;
}

.auth-control {
    position: relative;
}

.auth-control-icon {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 16px;
    width: 18px;
    color: #7b8d99;
    text-align: center;
    transform: translateY(-50%);
    pointer-events: none;
}

.auth-control .form-control {
    min-height: 50px;
    padding: 11px 16px 11px 48px;
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    background: #fbfcfd;
    color: var(--auth-text);
    font-size: 1rem;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.auth-page .auth-control .form-control {
    height: 50px;
    min-height: 50px;
}

.auth-control.has-password-toggle .form-control {
    padding-right: 52px;
}

.auth-control .form-control:hover {
    border-color: #b9c8d2;
}

.auth-control .form-control:focus {
    border-color: var(--auth-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(8, 127, 185, 0.14);
}

.auth-password-toggle {
    position: absolute;
    z-index: 3;
    top: 1px;
    right: 1px;
    display: inline-flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 0 9px 9px 0;
    color: #607582;
    background: transparent;
    cursor: pointer;
}

.auth-password-toggle:hover {
    color: var(--auth-primary-dark);
    background: rgba(8, 127, 185, 0.06);
}

.auth-password-toggle:focus-visible {
    outline: 3px solid rgba(8, 127, 185, 0.28);
    outline-offset: -3px;
}

.auth-actions {
    margin-top: 26px;
}

.auth-submit.btn {
    display: inline-flex;
    width: 100%;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    border-color: var(--auth-primary);
    border-radius: 10px;
    background: var(--auth-primary);
    box-shadow: 0 8px 20px rgba(8, 127, 185, 0.2);
    font-size: 1rem;
    font-weight: 700;
}

.auth-submit.btn:hover,
.auth-submit.btn:focus {
    border-color: var(--auth-primary-dark);
    background: var(--auth-primary-dark);
}

.auth-submit.btn:focus-visible {
    outline: 3px solid rgba(8, 127, 185, 0.3);
    outline-offset: 3px;
}

.auth-link-row {
    margin-top: 18px;
    text-align: center;
}

.auth-link {
    color: var(--auth-primary-dark);
    font-weight: 600;
    text-decoration: none;
}

.auth-link:hover,
.auth-link:focus {
    color: #034b70;
    text-decoration: underline;
}

.auth-alert.alert {
    margin-bottom: 22px;
    padding: 14px 16px;
    border-width: 0 0 0 4px;
    border-radius: 9px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.auth-status {
    padding: 4px 0 2px;
    text-align: center;
}

.auth-status-icon {
    display: inline-flex;
    width: 64px;
    height: 64px;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    border-radius: 50%;
    color: var(--auth-primary-dark);
    background: rgba(8, 127, 185, 0.11);
    font-size: 1.55rem;
}

.auth-status-icon.is-success {
    color: #23733f;
    background: rgba(35, 115, 63, 0.11);
}

.auth-status-title {
    margin: 0 0 10px;
    color: var(--auth-text);
    font-size: 1.35rem;
    font-weight: 700;
}

.auth-status-text {
    margin: 0;
    color: var(--auth-muted);
    line-height: 1.6;
}

.auth-footer {
    margin-top: 24px;
    color: #73838e;
    font-size: 0.78rem;
    line-height: 1.6;
    text-align: center;
}

.auth-footer p {
    margin: 0;
}

.auth-footer a {
    color: #526b79;
    font-weight: 600;
}

@media (max-width: 575.98px) {
    .auth-page {
        align-items: flex-start;
        padding: 24px 14px;
    }

    .auth-brand {
        margin-bottom: 18px;
    }

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

    .auth-card-content {
        padding: 28px 22px 26px;
    }

    .auth-title {
        font-size: 1.45rem;
    }
}

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