/* Focused customer authentication surface. — Hegel */

.auth-page {
    background: #f3f2ee;
    color: #17242c;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-page #main-nav,
.auth-page #mobile-menu,
.auth-page footer {
    display: none !important;
}

.auth-page #main-content {
    max-width: none;
    min-height: 100svh;
    padding-top: 0 !important;
}

.auth-stage {
    position: relative;
    isolation: isolate;
    display: grid;
    min-height: 100svh;
    place-items: center;
    overflow: hidden;
    padding: 48px 24px;
    background-color: #f3f2ee;
}

.auth-stage::before,
.auth-stage::after,
.auth-frame {
    position: absolute;
    z-index: -1;
    content: "";
    pointer-events: none;
}

.auth-stage::before {
    top: 0;
    bottom: 0;
    left: clamp(28px, 8vw, 128px);
    border-left: 1px solid rgba(47, 75, 88, 0.1);
}

.auth-stage::after {
    top: clamp(28px, 8vh, 96px);
    right: 0;
    left: 0;
    border-top: 1px solid rgba(47, 75, 88, 0.1);
}

.auth-frame {
    inset: clamp(28px, 8vh, 96px) clamp(28px, 8vw, 128px);
    border-right: 1px solid rgba(47, 75, 88, 0.1);
    border-bottom: 1px solid rgba(47, 75, 88, 0.1);
}

.auth-shell {
    width: min(100%, 456px);
}

.auth-shell--wide {
    width: min(100%, 520px);
}

.auth-brand {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 12px;
    margin: 0 0 18px 10px;
    color: #17242c;
    text-decoration: none;
}

.auth-brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    place-items: center;
    border: 1px solid #ccd2d2;
    background: #ffffff;
    box-shadow: 3px 3px 0 #c86f2b;
}

.auth-brand-mark img {
    display: block;
    width: 30px;
    height: 30px;
}

.auth-brand-copy {
    display: grid;
    gap: 1px;
}

.auth-brand-copy strong {
    font-size: 16px;
    font-weight: 750;
    letter-spacing: -0.015em;
    line-height: 1.2;
}

.auth-brand-copy span {
    color: #657076;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.12em;
    line-height: 1.4;
    text-transform: uppercase;
}

.auth-card {
    position: relative;
    border: 1px solid #c9cfce;
    border-top: 3px solid #b86222;
    background: #ffffff;
    box-shadow: 0 24px 64px rgba(23, 36, 44, 0.13), 6px 6px 0 rgba(47, 75, 88, 0.07);
    padding: 40px;
}

.auth-card::before,
.auth-card::after {
    position: absolute;
    width: 12px;
    height: 12px;
    content: "";
    pointer-events: none;
}

.auth-card::before {
    top: 8px;
    left: 8px;
    border-top: 1px solid #8c999b;
    border-left: 1px solid #8c999b;
}

.auth-card::after {
    right: 8px;
    bottom: 8px;
    border-right: 1px solid #8c999b;
    border-bottom: 1px solid #8c999b;
}

.auth-card-heading {
    margin-bottom: 28px;
}

.auth-kicker {
    margin: 0 0 11px;
    color: #9a4d17;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.15em;
    line-height: 1.4;
    text-transform: uppercase;
}

.auth-card h1 {
    margin: 0;
    color: #17242c;
    font-size: 32px;
    font-weight: 730;
    letter-spacing: -0.035em;
    line-height: 1.12;
}

.auth-intro {
    margin: 9px 0 0;
    color: #5b676c;
    font-size: 15px;
    line-height: 1.55;
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: -4px 0 22px;
    border: 1px solid #d9afa8;
    border-left: 3px solid #9f3b2e;
    background: #fff7f5;
    color: #762d24;
    padding: 12px 13px;
    font-size: 13px;
    font-weight: 550;
    line-height: 1.45;
}

.auth-alert svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin-top: 1px;
}

.auth-alert--success {
    border-color: #b9cfbf;
    border-left-color: #397247;
    background: #f3faf5;
    color: #285c36;
}

.auth-alert--info {
    border-color: #b7cdd4;
    border-left-color: #1b647e;
    background: #f3f8fa;
    color: #234f5f;
}

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

.auth-field {
    display: grid;
    gap: 8px;
}

.auth-field label,
.auth-label-row a {
    font-size: 13px;
    line-height: 1.4;
}

.auth-field label {
    color: #35444b;
    font-weight: 650;
}

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

.auth-label-row a,
.auth-card-footer a {
    color: #8e4718;
    font-weight: 650;
    text-underline-offset: 3px;
}

.auth-label-row a:hover,
.auth-card-footer a:hover {
    text-decoration: underline;
}

.auth-field input {
    width: 100%;
    min-height: 48px;
    border: 1px solid #7f8d90;
    border-radius: 2px;
    background: #ffffff;
    color: #17242c;
    padding: 11px 13px;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.4;
    outline: none;
    transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.auth-field input[readonly] {
    border-color: #c3caca;
    background: #f3f4f1;
    color: #4d595e;
}

.auth-help {
    margin: 0;
    color: #657076;
    font-size: 12px;
    line-height: 1.5;
}

.auth-code-input {
    text-align: center;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    font-size: 22px !important;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.26em;
}

.auth-code-input--recovery {
    font-size: 16px !important;
    letter-spacing: 0.08em;
}

.auth-password-meter {
    display: grid;
    gap: 6px;
}

.auth-password-track {
    height: 4px;
    overflow: hidden;
    background: #e1e4e2;
}

.auth-password-bar {
    width: 0;
    height: 100%;
    background: #9f3b2e;
    transition: width 180ms ease, background-color 180ms ease;
}

.auth-password-bar[data-strength="fair"] {
    background: #9a6417;
}

.auth-password-bar[data-strength="good"],
.auth-password-bar[data-strength="strong"] {
    background: #397247;
}

.auth-legal {
    border: 1px solid #d8dcda;
    background: #f8f8f5;
    padding: 12px 13px;
    color: #59656a;
    font-size: 12px;
    line-height: 1.55;
}

.auth-legal a,
.auth-inline-link {
    color: #8e4718;
    font-weight: 650;
    text-underline-offset: 3px;
}

.auth-legal a:hover,
.auth-inline-link:hover {
    text-decoration: underline;
}

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

.auth-status-icon {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    margin-bottom: 20px;
    border: 1px solid #b9cfbf;
    background: #f3faf5;
    color: #397247;
}

.auth-status-icon--danger {
    border-color: #d9afa8;
    background: #fff7f5;
    color: #9f3b2e;
}

.auth-status-icon svg {
    width: 25px;
    height: 25px;
}

.auth-status h1 {
    margin-bottom: 10px;
}

.auth-status p {
    max-width: 36ch;
    margin: 0 0 22px;
    color: #5b676c;
    font-size: 14px;
    line-height: 1.6;
}

.auth-secondary {
    display: inline-flex;
    width: 100%;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    border: 1px solid #aeb7b7;
    background: #ffffff;
    color: #35444b;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.auth-secondary:hover {
    border-color: #65757a;
    background: #f8f8f5;
}

.auth-details {
    margin-top: 24px;
    border-top: 1px solid #e1e4e2;
    padding-top: 18px;
}

.auth-details summary {
    min-height: 44px;
    color: #536066;
    cursor: pointer;
    font-size: 13px;
    font-weight: 650;
    line-height: 44px;
}

.auth-centered-link {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    color: #657076;
    font-size: 12px;
    font-weight: 650;
    text-decoration: none;
}

.auth-centered-link:hover {
    color: #17242c;
    text-decoration: underline;
}

.auth-form-inline {
    display: inline;
}

.auth-link-button {
    min-height: 44px;
    border: 0;
    background: transparent;
    color: #8e4718;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 650;
    text-underline-offset: 3px;
}

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

.auth-link-button:disabled {
    cursor: wait;
    opacity: 0.6;
}

.auth-submit:focus-visible,
.auth-secondary:focus-visible,
.auth-centered-link:focus-visible,
.auth-link-button:focus-visible,
.auth-legal a:focus-visible,
.auth-inline-link:focus-visible,
.auth-details summary:focus-visible {
    outline: 3px solid rgba(27, 100, 126, 0.35);
    outline-offset: 3px;
}

.auth-field input::placeholder {
    color: #657076;
    opacity: 1;
}

.auth-field input:hover {
    border-color: #65757a;
}

.auth-field input:focus-visible {
    border-color: #1b647e;
    box-shadow: 0 0 0 3px rgba(27, 100, 126, 0.18);
}

.auth-password {
    position: relative;
}

.auth-password input {
    padding-right: 54px;
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 2px;
    display: grid;
    width: 44px;
    min-height: 44px;
    place-items: center;
    border: 0;
    background: transparent;
    color: #667277;
    cursor: pointer;
    transform: translateY(-50%);
}

.auth-password-toggle:hover {
    color: #17242c;
}

.auth-password-toggle:focus-visible,
.auth-brand:focus-visible,
.auth-label-row a:focus-visible,
.auth-card-footer a:focus-visible {
    outline: 3px solid rgba(27, 100, 126, 0.35);
    outline-offset: 2px;
}

.auth-password-toggle svg {
    width: 20px;
    height: 20px;
}

.auth-submit {
    position: relative;
    display: inline-flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    margin-top: 3px;
    border: 1px solid #17242c;
    border-radius: 2px;
    background: #17242c;
    box-shadow: 3px 3px 0 #c86f2b;
    color: #ffffff;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.2;
    transition: background-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
    text-decoration: none;
}

.auth-submit:hover {
    background: #243943;
}

.auth-submit:active {
    box-shadow: 1px 1px 0 #c86f2b;
    transform: translate(2px, 2px);
}

.auth-submit:focus-visible {
    outline: 3px solid rgba(27, 100, 126, 0.35);
    outline-offset: 3px;
}

.auth-submit:disabled {
    cursor: wait;
    opacity: 0.68;
}

.auth-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 28px;
    border-top: 1px solid #e1e4e2;
    padding-top: 20px;
    color: #657076;
    font-size: 12px;
    line-height: 1.5;
}

.auth-card-footer p {
    margin: 0;
}

@media (max-width: 479px) {
    .auth-stage {
        align-items: center;
        padding: 28px 16px;
    }

    .auth-stage::before {
        left: 16px;
    }

    .auth-stage::after {
        top: 28px;
    }

    .auth-frame {
        inset: 28px 16px;
    }

    .auth-brand {
        margin: 0 0 16px 6px;
    }

    .auth-card {
        padding: 31px 27px 28px;
    }

    .auth-card h1 {
        font-size: 29px;
    }

    .auth-card-heading {
        margin-bottom: 25px;
    }

    .auth-card-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 359px) {
    .auth-stage {
        padding: 22px 12px;
    }

    .auth-stage::before {
        left: 12px;
    }

    .auth-stage::after {
        top: 22px;
    }

    .auth-frame {
        inset: 22px 12px;
    }

    .auth-brand {
        margin-left: 4px;
    }

    .auth-brand-copy span {
        letter-spacing: 0.09em;
    }

    .auth-card {
        padding: 28px 21px 25px;
    }

    .auth-card h1 {
        font-size: 27px;
    }

    .auth-intro {
        font-size: 14px;
    }

    .auth-label-row {
        gap: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-field input,
    .auth-submit,
    .auth-password-bar {
        transition: none;
    }
}
