/* ==========================================================================
   Auth pages — "Help"
   Login, register, forgot password, reset password and two-step
   verification share one shell on the grey canvas: a top bar (logo, Help
   Center, Contact support), one wide bordered card with the form on the
   left and a quiet help column on the right (sunken, hairline), and a
   footer with links and the language switch. Denim marks where you are
   (current language, pressed account type, current step); brand blue acts.

   Markup: resources/views/livewire/auth/{login,register,forgot-password,
   reset-password,two-factor}.blade.php, partials/{top,foot,contact} and
   components/auth/field (.au-*). The guest layout renders these pages
   without its left panel and footer. Loads after the refreshed foundation
   (skeleton, background, forms, fonts). Every rule is namespaced to .au-*
   (only these pages have it); the page background uses the body hooks.
   ========================================================================== */

#kt_body:is(.auth-page--login, .auth-page--register, .auth-page--forgot-password, .auth-page--password-reset, .auth-page--two-factor) {
    background-color: var(--sk-canvas, #f1f3f6) !important;
}

/* --- Tokens ------------------------------------------------------------------- */
#kt_body .au {
    --au-font: var(--ty-ui, Figtree, Helvetica, Arial, sans-serif);
    --au-head-font: var(--ty-head, var(--au-font));
    --au-text: var(--sk-text, #1f2733);
    --au-muted: var(--ty-muted, #646d7c);
    --au-line: var(--sk-line, #dfe3e9);
    --au-line-soft: var(--sk-line-soft, #eceff3);
    --au-canvas: var(--sk-canvas, #f1f3f6);
    --au-card: var(--sk-card, #ffffff);
    --au-sunken: var(--sk-sunken, #f5f7fa);
    --au-accent: var(--sk-accent, #009ef7);
    --au-accent-hover: var(--sk-accent-hover, #008bd9);
    --au-accent-soft: var(--sk-accent-soft, #e3f2fd);
    --au-link: #0a7fc4;            /* text links: the accent one step darker, 4.6:1 on white */
    --au-denim: var(--sk-selected, #22588c);
    --au-danger: var(--fm-danger, #c81f48);
    --au-radius: var(--sk-radius, 10px);
    --au-radius-card: 16px;
    --au-input-h: 46px;
    --au-card-w: 980px;
    --au-cols: minmax(0, 1.08fr) minmax(0, 1fr);
}

#kt_body .au--register {
    --au-card-w: 1100px;
    --au-cols: minmax(0, 1.5fr) minmax(0, 1fr);
}

/* --- Page frame ------------------------------------------------------------------ */
#kt_body .au {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: var(--au-font);
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.55;
    color: var(--au-text);
    background-color: var(--au-canvas);
    -webkit-font-smoothing: antialiased;
}

#kt_body .au a {
    color: var(--au-link);
    font-weight: 600;
    text-decoration: none;
    transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}

#kt_body .au a:hover {
    color: var(--au-accent-hover);
    text-decoration: underline;
    text-underline-offset: 3px;
}

#kt_body .au :is(a, button):focus-visible {
    outline: 2px solid var(--au-accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* --- Top bar ----------------------------------------------------------------------- */
#kt_body .au-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding: 24px 40px;
}

#kt_body .au-top-logo {
    display: inline-flex;
}

/* Any white-label logo fits the same box without stretching. */
#kt_body .au-top-logo img {
    display: block;
    width: auto;
    max-width: 200px;
    height: 30px;
    object-fit: contain;
    object-position: left center;
}

#kt_body .au-wordmark {
    font-family: var(--au-head-font);
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--au-text);
}

#kt_body .au-top-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px 22px;
}

#kt_body .au .au-top-links a {
    color: var(--au-text);
}

#kt_body .au .au-top-links a:hover {
    color: var(--au-link);
}

/* --- The card: form | help ------------------------------------------------------------ */
#kt_body .au-main {
    display: grid;
    grid-template-columns: var(--au-cols);
    align-items: stretch;
    width: calc(100% - 48px);
    max-width: var(--au-card-w);
    margin: auto;
    overflow: hidden;
    background-color: var(--au-card);
    border: 1px solid var(--au-line);
    border-radius: var(--au-radius-card);
}

#kt_body .au-card {
    align-self: center;
    min-width: 0;
    padding: 52px 56px;
}

#kt_body .au-help {
    min-width: 0;
    padding: 44px;
    background-color: var(--au-sunken);
    border-left: 1px solid var(--au-line);
}

/* --- Form head ------------------------------------------------------------------------- */
#kt_body .au-head {
    margin-bottom: 28px;
}

#kt_body .au-title {
    margin: 0 0 6px;
    font-family: var(--au-head-font);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.02em;
    color: var(--au-text);
}

#kt_body .au-sub {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--au-muted);
    text-wrap: pretty;
}

#kt_body .au-sub strong {
    font-weight: 700;
    color: var(--au-text);
    overflow-wrap: anywhere;
}

/* --- Notices (rotated password, broken reset link) ---------------------------------------- */
#kt_body .au-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 28px;
    padding: 14px 16px;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--au-text);
    background-color: var(--au-accent-soft);
    border: 1px solid #b8dcf5;
    border-radius: var(--au-radius);
}

#kt_body .au-notice > svg {
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    color: var(--au-denim);
}

#kt_body .au-notice strong {
    display: block;
    margin-bottom: 2px;
    font-size: 14px;
    font-weight: 700;
}

#kt_body .au-notice span {
    color: #3b4656;
    text-wrap: pretty;
}

#kt_body .au-notice--error {
    background-color: #fdf1f4;
    border-color: #f2c4d0;
}

#kt_body .au-notice--error > svg {
    color: var(--au-danger);
}

/* --- Fields ------------------------------------------------------------------------------- */
#kt_body .au-field {
    min-width: 0;
    margin: 0 0 20px;
}

#kt_body .au .au-field .form-label {
    font-size: 14px;
}

#kt_body fieldset.au-field {
    padding: 0;
    border: 0;
}

#kt_body .au legend.form-label {
    float: none;
    width: auto;
    margin-bottom: var(--fm-label-gap, 7px);
    padding: 0;
}

#kt_body .au :is(.form-control, .form-select) {
    min-height: var(--au-input-h);
    font-size: 15px;
}

#kt_body .au .form-control {
    padding-right: var(--fm-px, 14px);
    background-image: none !important;   /* no Bootstrap error glyph; the border and message say it */
}

#kt_body .au .form-text {
    margin-top: 6px;
    font-size: 13px;
}

#kt_body .au .invalid-feedback {
    font-size: 13.5px;
}

/* A link beside the label (Forgot your password?). It follows the input in the markup so Tab
   goes from one field to the next; the grid lifts it up next to the label. */
#kt_body .au-field--aside {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    column-gap: 12px;
}

#kt_body .au-field--aside > * {
    grid-column: 1 / -1;
}

#kt_body .au-field--aside > .form-label {
    grid-row: 1;
    grid-column: 1;
}

#kt_body .au .au-field--aside > .au-aside-link {
    grid-row: 1;
    grid-column: 2;
    font-size: 13.5px;
}

/* Password with show/hide. */
#kt_body .au-password {
    position: relative;
}

#kt_body .au .au-password .form-control {
    padding-right: 50px;
}

#kt_body .au-reveal {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    padding: 0;
    color: var(--au-muted);
    background: none;
    border: 0;
    border-radius: 0 var(--au-radius) var(--au-radius) 0;
    cursor: pointer;
}

#kt_body .au-reveal:hover {
    color: var(--au-text);
}

#kt_body .au .au-reveal:focus-visible {
    outline-offset: -5px;
    border-radius: 8px;
}

#kt_body .au-reveal span {
    display: inline-flex;
}

#kt_body .au-reveal svg {
    width: 18px;
    height: 18px;
}

/* Reset password: whose password it is. The hidden input is for password managers. */
#kt_body .au-account {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    margin: -8px 0 22px;
    padding: 6px 12px;
    font-size: 13.5px;
    font-weight: 600;
    background-color: var(--au-sunken);
    border: 1px solid var(--au-line-soft);
    border-radius: 999px;
}

#kt_body .au-account svg {
    flex: none;
    width: 15px;
    height: 15px;
    color: var(--au-denim);
}

#kt_body .au-account span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#kt_body .au-username {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* --- Buttons and links under the form -------------------------------------------------------- */
#kt_body .au .au-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    margin-top: 8px;
    font-size: 15px;
    font-weight: 700;
    border-radius: var(--au-radius);
}

#kt_body .au .au-submit .spinner-border {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

#kt_body .au .au-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    font-size: 14px;
}

#kt_body .au-back svg {
    width: 16px;
    height: 16px;
}

#kt_body .au-linkbtn {
    padding: 0;
    font: inherit;
    font-weight: 600;
    color: var(--au-link);
    background: none;
    border: 0;
    cursor: pointer;
}

#kt_body .au-linkbtn:hover {
    color: var(--au-accent-hover);
    text-decoration: underline;
    text-underline-offset: 3px;
}

#kt_body .au-linkbtn:disabled {
    opacity: .5;
}

/* --- Register: sections, account type, terms, admin paste box --------------------------------- */
#kt_body .au-sec + .au-sec {
    margin-top: 8px;
}

#kt_body .au-sec-title {
    margin: 0 0 18px;
    padding-bottom: 10px;
    font-family: var(--au-head-font);
    font-size: 16px;
    font-weight: 700;
    color: var(--au-text);
    border-bottom: 1px solid var(--au-line-soft);
}

#kt_body .au-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 16px;
}

#kt_body .au-grid > .au-span {
    grid-column: 1 / -1;
}

#kt_body .au-type {
    margin: 0 0 20px;
    padding: 0;
    border: 0;
}

#kt_body .au-type-options {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    padding: 3px;
    background-color: var(--au-card);
    border: 1px solid var(--fm-border, #cdd4de);
    border-radius: var(--au-radius);
}

#kt_body .au-type-opt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 6px 12px;
    font-family: var(--au-font);
    font-size: 14.5px;
    font-weight: 600;
    color: var(--au-text);
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color .12s ease, color .12s ease;
}

#kt_body .au-type-opt:hover {
    background-color: var(--au-sunken);
}

#kt_body .au-type-opt[aria-pressed="true"] {
    font-weight: 700;
    color: #ffffff;
    background-color: var(--au-denim);
}

#kt_body .au-type-opt svg {
    flex: none;
    width: 16px;
    height: 16px;
}

#kt_body .au-terms {
    margin: 0 0 12px;
    font-size: 13.5px;
    color: var(--au-muted);
}

#kt_body .au-paste {
    margin-bottom: 24px;
    padding: 14px 16px 0;
    border: 1px dashed var(--au-line);
    border-radius: var(--au-radius);
}

/* --- Forgot password: the "check your inbox" state ---------------------------------------------- */
#kt_body .au-done-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    margin-bottom: 20px;
    color: var(--au-denim);
    background-color: var(--au-accent-soft);
    border-radius: 12px;
}

#kt_body .au-done-icon svg {
    width: 22px;
    height: 22px;
}

#kt_body .au-hint {
    margin: 0 0 24px;
    font-size: 13.5px;
    color: var(--au-muted);
    text-wrap: pretty;
}

/* --- Two-step verification ------------------------------------------------------------------------ */
#kt_body .au-sentto {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

#kt_body .au-sentto li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-weight: 700;
    color: var(--au-text);
}

#kt_body .au-sentto svg {
    flex: none;
    width: 16px;
    height: 16px;
    color: var(--au-denim);
}

#kt_body .au-code {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    max-width: 400px;
}

#kt_body .au .au-code .form-control {
    min-height: 58px;
    padding: 0;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    -moz-appearance: textfield;
}

#kt_body .au-code .form-control::-webkit-outer-spin-button,
#kt_body .au-code .form-control::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

#kt_body .au-resend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin: 20px 0 0;
    font-size: 14px;
    color: var(--au-muted);
}

/* --- Help column ----------------------------------------------------------------------------------- */
#kt_body .au-help-title {
    margin: 0 0 18px;
    font-family: var(--au-head-font);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--au-text);
}

#kt_body .au-help-lead {
    margin: -10px 0 22px;
    font-size: 14px;
    color: var(--au-muted);
    text-wrap: pretty;
}

#kt_body .au-help-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

#kt_body .au-help-list li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 0;
    border-top: 1px solid var(--au-line);
}

#kt_body .au-help-list li:first-child {
    padding-top: 0;
    border-top: 0;
}

#kt_body .au-help-list li:last-child {
    padding-bottom: 0;
}

#kt_body .au-help-icon {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--au-denim);
    background-color: var(--au-card);
    border: 1px solid var(--au-line);
    border-radius: 10px;
}

#kt_body .au-help-icon svg {
    width: 17px;
    height: 17px;
}

#kt_body .au-help-list strong {
    display: block;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--au-text);
}

#kt_body .au-help-list p {
    margin: 3px 0 6px;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--au-muted);
    text-wrap: pretty;
}

#kt_body .au-help-list li > div > :last-child {
    margin-bottom: 0;
}

#kt_body .au .au-help-list a {
    font-size: 13.5px;
}

#kt_body .au-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 18px;
}

/* Steps (forgot and reset password): a line through the numbers, denim where you are. */
#kt_body .au-steps {
    margin: 0;
    padding: 0;
    list-style: none;
}

#kt_body .au-steps li {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 20px;
}

#kt_body .au-steps li:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 32px;
    bottom: 4px;
    left: 15px;
    width: 1px;
    background-color: var(--au-line);
}

#kt_body .au-step-n {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 31px;
    height: 31px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--au-muted);
    background-color: var(--au-card);
    border: 1px solid var(--au-line);
    border-radius: 50%;
}

#kt_body .au-steps li > div {
    padding-top: 4px;
}

#kt_body .au-steps strong {
    display: block;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.4;
}

#kt_body .au-steps p {
    margin: 2px 0 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--au-muted);
}

#kt_body .au-steps .is-done .au-step-n {
    color: var(--au-denim);
    background-color: var(--au-accent-soft);
    border-color: transparent;
}

#kt_body .au-steps .is-current .au-step-n {
    color: #ffffff;
    background-color: var(--au-denim);
    border-color: var(--au-denim);
}

#kt_body .au-steps .is-current strong {
    color: var(--au-denim);
}

#kt_body .au-steps + .au-help-list {
    margin-top: 4px;
    padding-top: 20px;
    border-top: 1px solid var(--au-line);
}

/* --- Footer: links + languages -------------------------------------------------------------------- */
#kt_body .au-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    margin-top: 24px;
    padding: 24px 40px;
    font-size: 13.5px;
}

#kt_body .au-foot-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 22px;
}

#kt_body .au .au-foot-links a {
    color: var(--au-muted);
}

#kt_body .au .au-foot-links a:hover {
    color: var(--au-text);
}

#kt_body .au-lang {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 3px;
    background-color: var(--au-card);
    border: 1px solid var(--au-line);
    border-radius: 999px;
}

#kt_body .au .au-lang a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px 5px 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--au-muted);
    border-radius: 999px;
}

#kt_body .au .au-lang a:hover {
    color: var(--au-text);
    text-decoration: none;
    background-color: var(--au-sunken);
}

#kt_body .au .au-lang a[aria-current] {
    color: #ffffff;
    background-color: var(--au-denim);
}

#kt_body .au-lang img {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

/* --- Tablets: the help column goes under the form --------------------------------------------------- */
@media (max-width: 991.98px) {
    #kt_body .au-main {
        grid-template-columns: minmax(0, 1fr);
        max-width: 560px;
    }

    #kt_body .au--register .au-main {
        max-width: 680px;
    }

    #kt_body .au-help {
        border-top: 1px solid var(--au-line);
        border-left: 0;
    }
}

/* --- Phones ------------------------------------------------------------------------------------------- */
@media (max-width: 575.98px) {
    #kt_body .au-top {
        margin-bottom: 0;
        padding: 16px 16px 14px;
    }

    #kt_body .au-top-logo img {
        height: 26px;
    }

    #kt_body .au .au-top-links a:not(:last-child) {
        display: none;
    }

    #kt_body .au-main {
        width: calc(100% - 24px);
        margin: 0 auto;
        border-radius: 14px;
    }

    #kt_body .au-card {
        padding: 30px 22px 28px;
    }

    #kt_body .au-help {
        padding: 26px 22px 28px;
    }

    #kt_body .au-title {
        font-size: 25px;
    }

    /* 16px inputs: no zoom on focus in iOS. */
    #kt_body .au :is(.form-control, .form-select) {
        font-size: 16px;
    }

    #kt_body .au-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    #kt_body .au-code {
        gap: 7px;
    }

    #kt_body .au .au-code .form-control {
        min-height: 52px;
        font-size: 22px;
    }

    #kt_body .au-foot {
        flex-direction: column;
        justify-content: center;
        margin-top: 0;
        padding: 24px 16px 28px;
        text-align: center;
    }

    #kt_body .au-foot-links {
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    #kt_body .au a,
    #kt_body .au-type-opt {
        transition: none;
    }
}
