:root {
    --auth-navy: #092b45;
    --auth-navy-deep: #061e31;
    --auth-teal: #078579;
    --auth-teal-dark: #066b64;
    --auth-teal-soft: #e9f7f4;
    --auth-highlight: #ffd66b;
    --auth-text: #132b40;
    --auth-muted: #66778a;
    --auth-border: #d7e1e8;
    --auth-surface: #f5f8fa;
    --auth-danger: #b82f39;
    --auth-font: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

body.noble-login {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    overflow-x: hidden;
    color: var(--auth-text);
    background: var(--auth-navy-deep);
    font-family: var(--auth-font);
    font-size: .875rem;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(22rem, 42%) minmax(0, 58%);
    min-height: 100vh;
    min-height: 100dvh;
}

/* Panel corporativo */
.auth-brand {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 100%;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 8% 5%, rgba(18, 164, 151, .15), transparent 35%),
        radial-gradient(circle at 100% 100%, rgba(46, 132, 172, .12), transparent 40%),
        var(--auth-navy-deep);
}

.auth-brand-pattern {
    position: absolute;
    inset: 0;
    opacity: .28;
    background-image:
        linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: linear-gradient(145deg, #000 0%, transparent 82%);
    pointer-events: none;
}

.auth-brand-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(100%, 42rem);
    min-height: 100%;
    margin: 0 auto;
    padding: clamp(2.5rem, 4.2vw, 4.75rem);
}

.auth-brand-header {
    display: grid;
    justify-items: start;
}

.auth-brand-logo {
    padding: .55rem .7rem;
    background: rgba(255, 255, 255, .97);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 11px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .12);
}

.auth-brand-logo img,
.auth-mobile-logo img {
    display: block;
    width: auto;
    height: 44px;
}

.auth-brand-product {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    margin-top: 1.65rem;
}

.auth-brand-product-icon {
    display: grid;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    place-items: center;
    color: var(--auth-highlight);
    border: 1px solid rgba(255, 214, 107, .45);
    border-radius: 9px;
    font-size: .95rem;
}

.auth-brand-product-copy {
    display: grid;
    gap: .1rem;
    padding-left: .75rem;
    border-left: 1px solid rgba(255, 255, 255, .17);
}

.auth-brand-product-copy small {
    color: rgba(226, 238, 246, .62);
    font-size: .62rem;
    font-weight: 500;
    letter-spacing: .085em;
    text-transform: uppercase;
}

.auth-brand-product-copy strong {
    color: #f8fbfd;
    font-size: clamp(.9rem, 1.1vw, 1.02rem);
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1.3;
}

.auth-brand-product-copy strong span,
.auth-brand-product-copy strong b {
    color: var(--auth-highlight);
}

.auth-brand-product-copy strong b {
    padding-inline: .12rem;
    font-weight: 400;
}

.auth-brand-message {
    max-width: 34rem;
    margin-top: clamp(3.5rem, 10vh, 7rem);
}

.auth-brand-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1rem;
    color: #8fe0d7;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.auth-brand-message h2 {
    max-width: 33rem;
    margin: 0;
    color: #fff;
    font-size: clamp(2.25rem, 3vw, 3.15rem);
    font-weight: 600;
    letter-spacing: -.052em;
    line-height: 1.06;
}

.auth-brand-message p {
    max-width: 31rem;
    margin: 1.15rem 0 0;
    color: rgba(226, 238, 246, .72);
    font-size: clamp(.86rem, 1vw, .98rem);
    line-height: 1.7;
}

.auth-brand-features {
    display: grid;
    gap: .8rem;
    max-width: 32rem;
    margin-top: 2.25rem;
    padding-top: 1.35rem;
    border-top: 1px solid rgba(255, 255, 255, .13);
}

.auth-brand-features > div {
    display: grid;
    grid-template-columns: 1.3rem minmax(0, 1fr);
    align-items: start;
    gap: .7rem;
    min-width: 0;
}

.auth-brand-features i {
    color: #79d5cb;
    font-size: .95rem;
    line-height: 1.35;
}

.auth-brand-features span {
    display: flex;
    align-items: baseline;
    gap: .55rem;
    min-width: 0;
}

.auth-brand-features strong {
    flex: 0 0 auto;
    color: #f7fbfd;
    font-size: .72rem;
    font-weight: 600;
}

.auth-brand-features small {
    color: rgba(215, 231, 240, .57);
    font-size: .64rem;
    line-height: 1.4;
}

.auth-brand-footer {
    margin: auto 0 0;
    padding-top: 1.75rem;
    color: rgba(215, 231, 240, .46);
    font-size: .66rem;
}

/* Área de acceso */
.auth-access {
    display: grid;
    min-width: 0;
    min-height: 100%;
    place-items: center;
    padding: clamp(2.5rem, 6vw, 6rem);
    background:
        radial-gradient(circle at 100% 0, rgba(7, 133, 121, .05), transparent 30%),
        #fff;
}

.auth-form-container {
    width: min(100%, 27.5rem);
}

.auth-mobile-logo {
    display: none;
}

.auth-heading > span {
    display: block;
    margin-bottom: .55rem;
    color: var(--auth-teal);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.auth-heading h1 {
    margin: 0;
    color: var(--auth-text);
    font-size: clamp(2.25rem, 4vw, 3rem);
    font-weight: 600;
    letter-spacing: -.05em;
    line-height: 1.08;
}

.auth-heading p {
    margin: .7rem 0 0;
    color: var(--auth-muted);
    font-size: .88rem;
    line-height: 1.65;
}

.auth-form {
    display: grid;
    gap: 1.1rem;
    margin-top: 2rem;
}

.auth-validation-summary {
    padding: .8rem .95rem;
    color: #93252e;
    background: #fff5f5;
    border: 1px solid #efc8cd;
    border-radius: 10px;
    font-size: .76rem;
    line-height: 1.45;
}

.auth-validation-summary:empty,
.auth-validation-summary.validation-summary-valid {
    display: none;
}

.auth-validation-summary ul {
    margin: 0;
    padding-left: 1.1rem;
}

.auth-field label {
    display: block;
    margin-bottom: .45rem;
    color: #294259;
    font-size: .78rem;
    font-weight: 600;
}

.auth-input-wrap {
    position: relative;
    border-radius: 12px;
}

.auth-input-wrap > i {
    position: absolute;
    top: 50%;
    left: 1rem;
    z-index: 1;
    color: #788b9c;
    font-size: 1rem;
    transform: translateY(-50%);
    transition: color .18s ease;
    pointer-events: none;
}

.auth-input-wrap:focus-within > i {
    color: var(--auth-teal-dark);
}

.auth-input {
    width: 100%;
    min-height: 54px;
    padding: .8rem 1rem .8rem 2.8rem;
    color: var(--auth-text);
    background: #fff;
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    outline: none;
    font-family: var(--auth-font);
    font-size: .86rem;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.auth-password-wrap .auth-input {
    padding-right: 3.25rem;
}

.auth-input::placeholder {
    color: #93a2b0;
}

.auth-input:hover:not(:disabled) {
    border-color: #aebdc8;
}

.auth-input:focus {
    background: #fff;
    border-color: var(--auth-teal);
    box-shadow: 0 0 0 4px rgba(7, 133, 121, .1);
}

.auth-input:disabled {
    color: #718191;
    background: #f0f3f5;
    cursor: not-allowed;
}

.auth-input.input-validation-error {
    border-color: #d8656d;
    box-shadow: 0 0 0 3px rgba(184, 47, 57, .07);
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: .3rem;
    display: grid;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    place-items: center;
    color: #667b8d;
    background: transparent;
    border: 0;
    border-radius: 9px;
    transform: translateY(-50%);
    transition: color .18s ease, background-color .18s ease;
    cursor: pointer;
}

.auth-password-toggle:hover {
    color: var(--auth-teal-dark);
    background: var(--auth-teal-soft);
}

.auth-password-toggle:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.auth-password-toggle:focus-visible,
.auth-submit:focus-visible,
.auth-form-options a:focus-visible {
    outline: 3px solid rgba(7, 133, 121, .24);
    outline-offset: 2px;
}

.auth-field-error {
    display: block;
    min-height: .9rem;
    margin-top: .32rem;
    color: var(--auth-danger);
    font-size: .68rem;
    line-height: 1.4;
}

.auth-field-error:empty {
    min-height: 0;
    margin: 0;
}

.auth-form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: -.15rem;
    font-size: .75rem;
}

.auth-checkbox {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: #506375;
    cursor: pointer;
}

.auth-checkbox input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--auth-teal);
}

.auth-form-options a {
    color: var(--auth-teal-dark);
    font-weight: 600;
    text-decoration: none;
}

.auth-form-options a:hover {
    text-decoration: underline;
}

.auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    width: 100%;
    min-height: 54px;
    margin: .15rem 0 0;
    padding: .8rem 1.25rem;
    color: #fff;
    background: var(--auth-teal);
    border: 0;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(7, 133, 121, .17);
    font-family: var(--auth-font);
    font-size: .88rem;
    font-weight: 600;
    transition: background-color .18s ease, box-shadow .18s ease, transform .18s ease;
    cursor: pointer;
}

.auth-submit:hover:not(:disabled):not([aria-disabled="true"]) {
    background: var(--auth-teal-dark);
    box-shadow: 0 10px 23px rgba(7, 107, 100, .22);
    transform: translateY(-1px);
}

.auth-submit:active:not(:disabled) {
    transform: translateY(0);
}

.auth-submit-arrow {
    transition: transform .18s ease;
}

.auth-submit:hover .auth-submit-arrow {
    transform: translateX(3px);
}

.auth-submit:disabled,
.auth-submit[aria-disabled="true"],
.auth-submit.is-pending {
    opacity: .78;
    cursor: wait;
    transform: none;
}

.auth-submit .app-action-feedback__spinner {
    color: currentColor;
}

.auth-access-meta {
    display: grid;
    justify-items: center;
    gap: .8rem;
    margin-top: 1.65rem;
    padding-top: 1.35rem;
    border-top: 1px solid #e8eef2;
}

.auth-environment {
    display: inline-flex;
    align-items: center;
    gap: .48rem;
    padding: .38rem .6rem;
    color: #526a7b;
    background: var(--auth-surface);
    border: 1px solid #e2e9ee;
    border-radius: 999px;
    font-size: .64rem;
    font-weight: 500;
}

.auth-environment-dot {
    width: 7px;
    height: 7px;
    background: #19a974;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(25, 169, 116, .12);
}

.auth-environment strong {
    padding-left: .5rem;
    color: var(--auth-teal-dark);
    border-left: 1px solid #d5e0e6;
    font-size: .63rem;
}

.auth-security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .42rem;
    color: #82919f;
    font-size: .64rem;
    line-height: 1.45;
    text-align: center;
}

.auth-security-note i {
    color: #638b86;
}

@media (min-width: 1440px) {
    .auth-brand-content {
        padding-inline: clamp(3.5rem, 4.5vw, 5.25rem);
    }

    .auth-form-container {
        width: min(100%, 28rem);
    }
}

@media (min-width: 821px) and (max-width: 1199px) {
    .auth-shell {
        grid-template-columns: minmax(22rem, 44%) minmax(0, 56%);
    }

    .auth-brand-content {
        padding: clamp(2rem, 3.6vw, 3rem);
    }

    .auth-brand-message {
        margin-top: clamp(2.5rem, 7vh, 4.5rem);
    }

    .auth-brand-message h2 {
        font-size: clamp(2.15rem, 4vw, 3rem);
    }

    .auth-access {
        padding-inline: clamp(2.5rem, 5vw, 4rem);
    }
}

@media (min-width: 821px) and (max-height: 760px) {
    .auth-brand-content {
        padding-block: 1.5rem;
    }

    .auth-brand-logo {
        padding: .42rem .58rem;
    }

    .auth-brand-logo img {
        height: 36px;
    }

    .auth-brand-product {
        margin-top: .8rem;
    }

    .auth-brand-product-icon {
        width: 32px;
        height: 32px;
    }

    .auth-brand-message {
        margin-top: 1.5rem;
    }

    .auth-brand-eyebrow {
        margin-bottom: .55rem;
    }

    .auth-brand-message h2 {
        font-size: clamp(2rem, 3.25vw, 2.65rem);
    }

    .auth-brand-message p {
        margin-top: .65rem;
        line-height: 1.5;
    }

    .auth-brand-features {
        gap: .45rem;
        margin-top: 1rem;
        padding-top: .8rem;
    }

    .auth-brand-footer {
        padding-top: .75rem;
    }

    .auth-access {
        padding-block: 1.5rem;
    }

    .auth-heading h1 {
        font-size: 2.15rem;
    }

    .auth-heading p {
        margin-top: .4rem;
    }

    .auth-form {
        gap: .75rem;
        margin-top: 1.15rem;
    }

    .auth-field label {
        margin-bottom: .3rem;
    }

    .auth-input,
    .auth-submit {
        min-height: 48px;
    }

    .auth-access-meta {
        gap: .55rem;
        margin-top: .9rem;
        padding-top: .8rem;
    }
}

@media (max-width: 820px) {
    .auth-shell {
        display: flex;
        flex-direction: column;
        min-height: 100dvh;
    }

    .auth-access {
        order: 1;
        min-height: auto;
        padding: 2.75rem clamp(1.5rem, 7vw, 3.5rem) 3rem;
    }

    .auth-form-container {
        width: min(100%, 30rem);
    }

    .auth-mobile-logo {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 1.25rem;
        margin-bottom: 2.5rem;
    }

    .auth-mobile-brandmark {
        justify-self: start;
        padding: .45rem .55rem;
        background: #fff;
        border: 1px solid #e6ecef;
        border-radius: 10px;
        box-shadow: 0 7px 20px rgba(9, 43, 69, .07);
    }

    .auth-mobile-product {
        display: flex;
        align-items: center;
        justify-self: end;
        gap: .6rem;
        min-width: 0;
        color: var(--auth-navy);
    }

    .auth-mobile-product > i {
        display: grid;
        flex: 0 0 34px;
        width: 34px;
        height: 34px;
        place-items: center;
        color: var(--auth-teal-dark);
        background: var(--auth-teal-soft);
        border-radius: 9px;
    }

    .auth-mobile-product > span {
        display: grid;
        gap: .08rem;
        min-width: 0;
    }

    .auth-mobile-product small {
        color: #778998;
        font-size: .57rem;
        font-weight: 600;
        letter-spacing: .07em;
        text-transform: uppercase;
    }

    .auth-mobile-product strong {
        font-size: .7rem;
        font-weight: 600;
        line-height: 1.35;
    }

    .auth-brand {
        order: 2;
        min-height: auto;
    }

    .auth-brand-content {
        width: min(100%, 48rem);
        min-height: auto;
        padding: 2.5rem clamp(1.5rem, 7vw, 3.5rem);
    }

    .auth-brand-header {
        display: none;
    }

    .auth-brand-message {
        max-width: 36rem;
        margin-top: 0;
    }

    .auth-brand-message h2 {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }

    .auth-brand-message p {
        max-width: 35rem;
    }

    .auth-brand-features {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        max-width: none;
        gap: 1.25rem;
    }

    .auth-brand-features > div {
        grid-template-columns: 1.25rem minmax(0, 1fr);
    }

    .auth-brand-features span {
        display: grid;
        gap: .2rem;
    }

    .auth-brand-features strong {
        white-space: normal;
    }

    .auth-brand-footer {
        margin-top: 2rem;
        padding-top: 0;
    }
}

@media (max-width: 600px) {
    .auth-access {
        padding: 1.75rem 1.15rem 2.5rem;
    }

    .auth-mobile-logo {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .auth-mobile-logo img {
        height: 40px;
    }

    .auth-mobile-product {
        justify-self: start;
    }

    .auth-heading h1 {
        font-size: clamp(2rem, 11vw, 2.55rem);
    }

    .auth-heading p {
        font-size: .82rem;
    }

    .auth-form {
        margin-top: 1.6rem;
    }

    .auth-input,
    .auth-submit {
        min-height: 52px;
    }

    .auth-access-meta {
        justify-items: start;
    }

    .auth-security-note {
        justify-content: flex-start;
        text-align: left;
    }

    .auth-brand-content {
        padding: 2.25rem 1.15rem;
    }

    .auth-brand-features {
        grid-template-columns: 1fr;
        gap: .9rem;
    }
}

@media (max-width: 340px) {
    .auth-access,
    .auth-brand-content {
        padding-inline: .9rem;
    }

    .auth-environment {
        gap: .35rem;
        font-size: .59rem;
    }

    .auth-environment strong {
        padding-left: .35rem;
        font-size: .58rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

@media (forced-colors: active) {
    .auth-brand-logo,
    .auth-mobile-brandmark,
    .auth-input,
    .auth-password-toggle,
    .auth-submit,
    .auth-environment {
        border: 1px solid CanvasText;
    }
}
