
:root {
    --auth-success: #2e7d32;
    --auth-success-hover: #1b5e20;
    /* Vidrio plateado elegante */
    --auth-silver-glass: #ffffff;
    --auth-silver-border: rgba(255, 255, 255, 0.72);
    --auth-silver-border-soft: rgba(148, 163, 184, 0.35);
    --auth-silver-shadow: 0 12px 40px rgba(15, 23, 42, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 0 rgba(15, 23, 42, 0.06);
    --auth-silver-text: #0f172a;
    --auth-silver-text-muted: #475569;
    --auth-silver-blur: 22px;
}

.auth-layout {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-image: url(/images/fondo/background.png);
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    /* background: radial-gradient(circle at 10% 20%, rgba(135, 206, 235, 0.08) 0%, transparent 20%), radial-gradient(circle at 90% 80%, rgb(255 255 255 / 6%) 0%, transparent 25%); */
}

    .auth-layout::before {
        content: "";
        position: absolute;
        inset: 0;
        background-position: center;
        background-color: rgba(0, 0, 0, 0.4);
        /* filter: saturate(251%) brightness(0.7); */
        /* z-index: 1; */
    }

@media (max-width: 768px) {
    .auth-layout {
        background-attachment: scroll;
    }
}

.auth-page {
    width: 100%;
    max-width: 420px;
}

.auth-glass-panel,
.auth-card,
.auth-card.rz-card {
    /*background: rgb(255 255 255 / 8%);*/
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 30px;
    border-radius: 18px;
    box-shadow: 0 8px 30px #0000004d;
    color: #fff;
    max-width: 480px;
    margin: 50px auto;
    transition: all .3s ease-in-out;
}

.auth-glass-panel .rz-text,
.auth-card.auth-glass-panel .rz-text {
    color: var(--auth-silver-text-muted) !important;
}

.auth-page .auth-glass-panel h1,
.auth-page .auth-glass-panel .rz-h4,
.auth-page .auth-glass-panel .rz-h6,
.auth-page .auth-card.auth-glass-panel h1,
.auth-page .auth-card.auth-glass-panel .rz-h4,
.auth-page .auth-card.auth-glass-panel .rz-h6 {
    color: white !important;
}

.auth-card:not(.auth-login-glass) .rz-textbox input,
.auth-card:not(.auth-login-glass) .rz-password input,
.auth-card:not(.auth-login-glass) .rz-inputtext,
.auth-card:not(.auth-login-glass) input.rz-inputtext {
    background-color: #ffffff !important;
    color: #333 !important;
}

.auth-card .rz-textbox,
.auth-card .rz-password {
    background-color: transparent !important;
}

.auth-input-white input,
.auth-input-white.rz-textbox input,
.auth-input-white.rz-password input {
    background-color: #ffffff !important;
    color: #000000 !important;
    font-size: 15px !important;
}

.auth-card .rz-button.rz-primary,
.auth-card .rz-button.rz-state-primary {
    background-color: var(--auth-success) !important;
    border-color: var(--auth-success) !important;
}

.auth-card .rz-button.rz-primary:hover,
.auth-card .rz-button.rz-state-primary:hover {
    background-color: var(--auth-success-hover) !important;
    border-color: var(--auth-success-hover) !important;
}

.auth-link {
    color: #0369a1 !important;
    text-decoration: none;
    font-size: 0.9rem;
}

.auth-link:hover {
    text-decoration: underline;
    color: #0c4a6e !important;
}

.auth-error-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 12px;
    max-width: 400px;
    text-align: center;
}

.auth-error-card h2 {
    color: #333;
    margin-bottom: 1rem;
}

.auth-error-card p {
    color: #666;
    margin-bottom: 1.5rem;
}

.auth-btn-retry {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--auth-success);
    color: white !important;
    border-radius: 6px;
    text-decoration: none;
}

.auth-btn-retry:hover {
    background: var(--auth-success-hover);
}

.login-panel .logo-img {
    max-height: 80px;
    object-fit: contain;
}

.auth-link-inline {
    color: white !important;
    text-decoration: underline;
    font-weight: 500;
}

.auth-link-inline:hover {
    color: #0c4a6e !important;
}

.auth-glass-panel .auth-link-inline {
    color: #0369a1 !important;
}

.auth-glass-panel .rz-fieldset {
    border-color: var(--auth-silver-border-soft) !important;
    background: transparent !important;
}

.auth-glass-panel .rz-fieldset-legend {
    color: var(--auth-silver-text) !important;
    font-weight: 600;
}

.auth-glass-panel .rz-textbox input,
.auth-glass-panel .rz-password input {
    background-color: rgba(255, 255, 255, 0.88) !important;
    color: var(--auth-silver-text) !important;
    border-radius: 10px !important;
    border: 1px solid var(--auth-silver-border-soft) !important;
}

.auth-glass-panel .rz-button.rz-light {
    background: rgba(255, 255, 255, 0.55) !important;
    color: var(--auth-silver-text) !important;
    border: 1px solid var(--auth-silver-border-soft) !important;
}

.auth-glass-panel .rz-button.rz-light:hover {
    background: rgba(255, 255, 255, 0.85) !important;
}

.auth-head-icon {
    font-size: 3rem !important;
    color: var(--pcg-accent, #0d6b5c) !important;
}

.auth-layout:has(.auth-login-page) {
    display: block;
    padding: 0;
}

.auth-login-page {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
}

.auth-login-split {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
    grid-template-areas: "brand main";
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
}

.auth-login-split--flipped {
    grid-template-areas: "main brand";
}

.auth-login-brand {
    grid-area: brand;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 3rem);
    background: linear-gradient(145deg, rgba(5, 41, 36, 0.94) 0%, rgba(10, 61, 54, 0.9) 45%, rgba(5, 31, 27, 0.92) 100%);
    color: #fff;
    overflow: hidden;
}

.auth-login-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    /*background-image: url(/images/fondo/background.png);*/
    background-size: cover;
    background-position: center;
    opacity: 0.50;
    filter: saturate(1.1);
    z-index: 0;
}

.auth-login-brand-inner {
    position: relative;
    z-index: 1;
    max-width: 22rem;
}

.auth-login-brand-logo {
    display: block;
    max-width: 220px;
    height: auto;
    margin: 0 auto 1rem;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
}

.auth-login-tagline {
    text-align: center;
    font-size: clamp(1rem, 2vw, 1.15rem);
    font-weight: 600;
    letter-spacing: 0.02em;
    margin: 0 0 1rem;
    color: rgba(255, 255, 255, 0.98);
}

.auth-login-gradient-line {
    height: 3px;
    width: 100%;
    max-width: 14rem;
    margin: 0 auto 1.5rem;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--pcg-accent-light, #0e7d6c) 0%, #2dd4bf 50%, #0d6b5c 100%);
}

.auth-login-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.auth-login-feature {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.auth-login-feature-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 1px rgba(13, 107, 92, 0.35);
    color: #5eead4;
}

.auth-login-feature-icon .rz-icon {
    font-size: 1.35rem !important;
}

.auth-login-feature-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.9rem;
    line-height: 1.35;
}

.auth-login-feature-text strong {
    font-size: 0.95rem;
    color: #fff;
}

.auth-login-feature-text span:last-child {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.72);
}

.auth-login-main {
    grid-area: main;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.25rem, 4vw, 2.5rem);
    position: relative;
    min-width: 0;
}

.auth-split-body {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 0;
}

.auth-split-body--from-right {
    animation: auth-split-slide-from-right 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
}


/*ESTABA EN LEFT*/
.auth-split-body--from-right {
    animation: auth-split-slide-from-left 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes auth-split-slide-from-right {
    from {
        opacity: 0;
        transform: translateX(36px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes auth-split-slide-from-left {
    from {
        opacity: 0;
        transform: translateX(-36px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.auth-login-page .svg-loader-overlay {
    position: absolute;
    inset: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    z-index: 10000;
}


/*ANIMACION DEL SPLIT QUE DIVIDE EL LOGIN */
@media (prefers-reduced-motion: reduce) {
    .auth-split-body--from-right,
    .auth-split-body--from-right {
        animation: auth-login-fade-only 0.3s ease both !important;
    }
}

.auth-login-glass.auth-login-glass--wide,
.auth-login-glass--wide {
    max-width: 480px !important;
}

.auth-login-glass.auth-glass-panel,
.auth-login-glass {
    width: 100%;
    max-width: 420px !important;
    margin: 0 !important;
    padding: clamp(1.5rem, 3vw, 2.25rem) !important;
    border-radius: 18px;
    background: linear-gradient(
            165deg,
            rgba(5, 41, 36, 0.52) 0%,
            rgba(6, 61, 53, 0.48) 50%,
            rgba(3, 25, 21, 0.55) 100%
        ) !important;
    backdrop-filter: blur(32px) saturate(1.15);
    -webkit-backdrop-filter: blur(32px) saturate(1.15);
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    color: #fff;
}

.auth-login-glass-head {
    text-align: center;
    margin-bottom: 1.25rem;
}

.auth-login-lock {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 0.65rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #a7f3d0;
}

.auth-login-lock .rz-icon {
    font-size: 1.35rem !important;
}

.auth-login-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    color: #ffffff !important;
}

.auth-login-glass .rz-fieldset-legend-text {
    vertical-align: middle;
    color: #ffffff !important;
}

.auth-login-subtitle {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.35;
    color: #ffffff !important;
}

.auth-login-alert {
    margin-bottom: 0.75rem;
}

.auth-login-fieldset.rz-fieldset {
    width: 100% !important;
    margin-bottom: 1rem !important;
    background: transparent !important;
    border-color: rgba(255, 255, 255, 0.28) !important;
}

.auth-login-fieldset .rz-fieldset-legend {
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.9rem;
}

.auth-login-field {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.auth-login-field-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    flex-shrink: 0;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #ffffff;
}

.auth-login-field-icon .rz-icon {
    font-size: 1.15rem !important;
}

.auth-login-field .rz-textbox,
.auth-login-field .rz-password {
    flex: 1;
    min-width: 0;
    background: transparent !important;
}

.auth-login-field .rz-textbox input,
.auth-login-field .rz-password input,
.auth-login-rz-input input,
.auth-login-glass input.rz-inputtext,
.auth-login-glass .rz-textbox input.rz-inputtext,
.auth-login-glass .rz-password input.rz-inputtext {
    background: rgba(0, 0, 0, 0.38) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border-radius: 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    font-size: 0.95rem !important;
    padding: 0.65rem 0.75rem !important;
    caret-color: #ffffff;
}

.auth-login-field .rz-textbox input::placeholder,
.auth-login-field .rz-password input::placeholder,
.auth-login-glass input::placeholder {
    color: rgba(255, 255, 255, 0.65) !important;
    opacity: 1;
}

.auth-login-glass .rz-textbox input:-webkit-autofill,
.auth-login-glass .rz-password input:-webkit-autofill,
.auth-login-glass input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 32px rgba(0, 0, 0, 0.5) inset !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff;
}

.auth-login-field-password {
    align-items: stretch;
}

.auth-login-eye {
    flex-shrink: 0;
    width: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #ffffff;
    cursor: pointer;
    transition: background 0.15s ease;
}

.auth-login-eye:hover {
    background: rgba(255, 255, 255, 0.12);
}

.auth-login-eye .rz-icon {
    font-size: 1.2rem !important;
}

.auth-login-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
}

.auth-login-remember {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.92) !important;
    user-select: none;
}

.auth-login-remember input {
    accent-color: var(--pcg-accent, #0d6b5c);
    width: 1rem;
    height: 1rem;
}

.auth-login-link-forgot {
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
}

.auth-login-link-forgot:hover {
    text-decoration: underline;
    color: #ffffff !important;
    opacity: 0.9;
}

.auth-session-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 0.25rem;
    width: 100%;
}

.auth-login-glass .auth-rz-btn-primary.rz-button,
.auth-login-glass .auth-rz-btn-primary.rz-button.rz-primary {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.85rem 1rem !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em !important;
    border: none !important;
    color: #fff !important;
    background: linear-gradient(90deg, #0d6b5c 0%, #14b8a6 50%, #149184 55%, #0f766e 100%) !important;
    box-shadow: 0 4px 16px rgba(13, 107, 92, 0.45) !important;
}

.auth-login-glass .auth-rz-btn-primary.rz-button:hover:not(:disabled) {
    filter: brightness(1.06);
}

.auth-login-glass .auth-rz-btn-secondary.rz-button,
.auth-login-glass .auth-rz-btn-secondary.rz-button.rz-light {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.65rem 1rem !important;
    border-radius: 12px !important;
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    color: #ffffff !important;
}

.auth-login-glass .auth-rz-btn-secondary.rz-button:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

.auth-session-code-input input {
    text-align: center !important;
    font-size: 1.35rem !important;
    letter-spacing: 0.4rem !important;
}

.auth-login-submit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(90deg, #0d6b5c 0%, #14b8a6 50%, #0f766e 100%);
    box-shadow: 0 4px 16px rgba(13, 107, 92, 0.45);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.auth-login-submit:hover:not(:disabled) {
    filter: brightness(1.08);
    box-shadow: 0 6px 20px rgba(13, 107, 92, 0.35);
}

.auth-login-submit:active:not(:disabled) {
    transform: translateY(1px);
}

.auth-login-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.auth-login-submit-icon {
    font-size: 1.1rem;
    font-weight: 700;
}

.auth-login-sep {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0 1rem;
}

.auth-login-sep-line {
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.22);
}

.auth-login-sep-o {
    font-size: 0.75rem;
    color: #ffffff;
    text-transform: lowercase;
    opacity: 0.9;
}

.auth-login-footer-links {
    text-align: center;
}

.auth-login-footer-link {
    color: #ffffff !important;
    font-size: 0.9rem;
}

.auth-login-footer-link:hover {
    color: #ffffff !important;
    opacity: 0.88;
    text-decoration: underline;
}

.auth-footer-link-extra {
    margin-top: 0.5rem;
}

.auth-footer-secondary-row {
    margin-top: 0.85rem;
    text-align: center;
    font-size: 0.9rem;
}

.auth-footer-muted {
    color: rgba(255, 255, 255, 0.88);
}

.auth-login-brand-logo--compact {
    max-width: 160px;
    height: auto;
    margin: 0 auto 0.65rem;
    display: block;
}

.auth-login-page .auth-login-glass.auth-glass-panel .rz-text {
    color: rgba(255, 255, 255, 0.92) !important;
}

.auth-login-page .auth-login-glass .rz-textbox input,
.auth-login-page .auth-login-glass .rz-password input,
.auth-login-page .auth-login-glass input.rz-inputtext {
    background: rgba(0, 0, 0, 0.38) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    caret-color: #ffffff !important;
}

.auth-login-anim-brand {
    animation: auth-login-slice-in-left 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-login-anim-main {
    animation: auth-login-fade-slice-in 0.72s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

@keyframes auth-login-slice-in-left {
    from {
        opacity: 0;
        transform: translateX(-48px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes auth-login-fade-slice-in {
    from {
        opacity: 0;
        transform: translateX(36px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes auth-login-fade-only {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.auth-card.rz-card.auth-anim--fade-up {
    animation: auth-anim-fade-up 0.68s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-card.rz-card.auth-anim--slice-right {
    animation: auth-anim-slice-right 0.72s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-card.rz-card.auth-anim--scale-in {
    animation: auth-anim-scale-in 0.64s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}

.auth-card.rz-card.auth-anim--fade-slice {
    animation: auth-anim-fade-slice 0.74s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes auth-anim-fade-up {
    from {
        opacity: 0;
        transform: translateY(26px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes auth-anim-slice-right {
    from {
        opacity: 0;
        transform: translateX(44px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes auth-anim-scale-in {
    from {
        opacity: 0;
        transform: scale(0.94);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes auth-anim-fade-slice {
    from {
        opacity: 0;
        transform: translateY(22px) translateX(-14px);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateX(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-login-anim-brand,
    .auth-login-anim-main,
    .auth-card.rz-card.auth-anim--fade-up,
    .auth-card.rz-card.auth-anim--slice-right,
    .auth-card.rz-card.auth-anim--scale-in,
    .auth-card.rz-card.auth-anim--fade-slice {
        animation: auth-login-fade-only 0.35s ease both !important;
    }
}

@media (max-width: 900px) {
    .auth-login-split,
    .auth-login-split--flipped {
        grid-template-columns: 1fr;
        grid-template-areas: "brand" "main";
    }

    .auth-login-brand {
        min-height: auto;
        padding: 0.5rem 1.25rem 1.25rem;
    }

    .auth-login-brand-inner {
        max-width: 100%;
    }

    .auth-login-features {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
    }

    .auth-login-feature {
        flex: 1 1 240px;
        max-width: 100%;
    }

    .auth-login-main {
        padding-top: 0.5rem;
    }
}


.rz-inputtext {
    border-color: white !important; 
}

    .rz-inputtext:focus {
        border-color: white !important;
        box-shadow: 0 0 0 0.2rem rgba(255, 69, 0, 0.25) !important;
    }