/* ============================================
   SANTO TÉ — ACCESO Y SELECCIÓN OPERATIVA
   ============================================ */

.st-login-body {
    --st-login-surface: #fcfaf7;
    --st-login-field: #f5f3ef;
    --st-login-border: #d8d3cb;
    --st-login-primary: #1d4ed8;
    --st-login-primary-hover: #1e40af;
    --st-login-focus: 0 0 0 .1875rem rgb(29 78 216 / .16);
    --st-login-seam: rgb(45 32 22 / .1);
    --st-login-seam-shadow: -.75rem 0 2rem rgb(18 8 3 / .06);
    min-width: 20rem;
    min-height: 100dvh;
    margin: 0;
    background: var(--st-login-surface);
    color: var(--st-text);
    font-family: var(--st-font);
    -webkit-font-smoothing: antialiased;
}

.st-login-body *,
.st-login-body *::before,
.st-login-body *::after {
    box-sizing: border-box;
}

.st-login-layout {
    display: grid;
    min-height: 100dvh;
    grid-template-columns: minmax(24rem, 1.08fr) minmax(26rem, .92fr);
}

.st-login-brand-panel {
    position: relative;
    display: grid;
    min-height: 100dvh;
    overflow: hidden;
    place-items: center;
    background: #120803;
    isolation: isolate;
}

.st-login-brand-panel::after {
    position: absolute;
    inset: 1.5rem;
    z-index: 2;
    border: 1px solid rgb(245 158 11 / .32);
    border-radius: 1.5rem;
    content: "";
    pointer-events: none;
}

.st-login-slides {
    position: absolute;
    inset: 0;
}

.st-login-slide {
    position: absolute;
    inset: 0;
    display: grid;
    margin: 0;
    padding: clamp(2.25rem, 4vw, 3.5rem);
    opacity: 0;
    place-items: center;
    pointer-events: none;
    transition: opacity 260ms ease;
}

.st-login-slide.is-active {
    z-index: 1;
    opacity: 1;
    pointer-events: auto;
}

.st-login-slide img {
    display: block;
    width: 100%;
    max-width: min(48rem, 88vh);
    height: 100%;
    max-height: min(48rem, calc(100dvh - 7rem));
    border-radius: 1.125rem;
    object-fit: contain;
    user-select: none;
    animation: st-access-enter 260ms ease-out both;
}

.st-carousel-controls {
    position: absolute;
    bottom: 2.25rem;
    left: 50%;
    z-index: 3;
    display: flex;
    min-height: 3rem;
    align-items: center;
    gap: .75rem;
    padding: .375rem;
    border: 1px solid rgb(255 255 255 / .18);
    border-radius: var(--st-radius-pill);
    background: rgb(18 8 3 / .82);
    box-shadow: 0 .5rem 1.5rem rgb(0 0 0 / .26);
    transform: translateX(-50%);
}

.st-carousel-arrow,
.st-carousel-dot {
    border: 0;
    color: #fff;
    cursor: pointer;
}

.st-carousel-arrow {
    display: grid;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    place-items: center;
    border-radius: 50%;
    background: transparent;
    transition: background-color var(--st-transition), color var(--st-transition);
}

.st-carousel-arrow:hover {
    background: rgb(255 255 255 / .12);
    color: #f59e0b;
}

.st-carousel-arrow svg {
    width: 1.125rem;
    height: 1.125rem;
}

.st-carousel-dots {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.st-carousel-dot {
    width: .625rem;
    height: .625rem;
    padding: 0;
    border-radius: 50%;
    background: rgb(255 255 255 / .42);
    transition: background-color var(--st-transition), box-shadow var(--st-transition);
}

.st-carousel-dot.is-active {
    background: #f59e0b;
    box-shadow: 0 0 0 .1875rem rgb(245 158 11 / .2);
}

.st-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.st-login-main {
    display: flex;
    min-width: 0;
    min-height: 100dvh;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 5vw, 4.5rem);
    background: var(--st-login-surface);
    box-shadow: inset 1px 0 0 var(--st-login-seam), var(--st-login-seam-shadow);
}

.st-login-card {
    width: 100%;
    max-width: 27rem;
    animation: st-access-enter 260ms ease-out 60ms both;
}

.st-login-header {
    margin-bottom: 2rem;
}

.st-login-form-logo {
    display: block;
    width: 10.5rem;
    height: 5rem;
    margin: 0 0 1.5rem;
    object-fit: cover;
    object-position: center;
}

.rb-access-eyebrow {
    margin: 0 0 .5rem;
    color: var(--st-primary);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.st-login-header h1 {
    margin: 0;
    color: var(--st-text);
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -.035em;
    line-height: 1.15;
}

.st-login-developer {
    margin: .75rem 0 0;
    color: var(--st-text-secondary);
    font-size: .9375rem;
    line-height: 1.5;
}

.st-login-developer strong {
    color: var(--st-text);
    font-weight: 600;
}

.st-login-version {
    margin: 1rem 0 0;
    color: var(--st-text-muted);
    font-size: .8125rem;
    font-weight: 500;
    text-align: right;
}

.st-login-instruction {
    margin: 1rem 0 0;
    color: var(--st-text-secondary);
    font-size: .9375rem;
    line-height: 1.6;
}

.st-form-alert,
.rb-access-alert {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    margin-bottom: 1.5rem;
    padding: .875rem 1rem;
    border: 1px solid rgb(220 38 38 / .24);
    border-radius: var(--st-radius-md);
    background: var(--st-danger-soft);
    color: var(--st-danger);
    font-size: .875rem;
    line-height: 1.45;
}

.st-form-alert svg,
.rb-access-alert > svg {
    width: 1.125rem;
    height: 1.125rem;
    flex: 0 0 1.125rem;
    margin-top: .0625rem;
}

.st-form-group {
    margin-bottom: 1.25rem;
}

.st-form-group > label {
    display: block;
    margin-bottom: .5rem;
    color: var(--st-text-secondary);
    font-size: .875rem;
    font-weight: 600;
}

.st-input-control {
    position: relative;
    display: flex;
    min-height: 3.25rem;
    align-items: center;
    border: 1px solid var(--st-login-border);
    border-radius: var(--st-radius-md);
    background: var(--st-login-field);
    transition: border-color var(--st-transition), box-shadow var(--st-transition), background-color var(--st-transition);
}

.st-input-control:focus-within {
    border-color: var(--st-login-primary);
    background: var(--st-login-surface);
    box-shadow: var(--st-login-focus);
}

.st-input-control.has-error {
    border-color: var(--st-danger);
    background: var(--st-danger-soft);
}

.st-input-control > svg {
    width: 1.125rem;
    height: 1.125rem;
    flex: 0 0 1.125rem;
    margin-left: 1rem;
    color: var(--st-text-muted);
}

.st-input-control:focus-within > svg {
    color: var(--st-login-primary);
}

.st-input-control input {
    width: 100%;
    min-width: 0;
    min-height: 3.125rem;
    padding: .75rem 1rem;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--st-text);
    font-family: inherit;
    font-size: 1rem;
}

.st-input-control input::placeholder {
    color: var(--st-text-muted);
}

.st-input-control input:focus-visible {
    outline: 0;
}

.st-password-toggle {
    display: grid;
    width: 2.75rem;
    height: 2.75rem;
    flex: 0 0 2.75rem;
    margin-right: .25rem;
    place-items: center;
    border: 0;
    border-radius: var(--st-radius-sm);
    background: transparent;
    color: var(--st-text-muted);
    cursor: pointer;
}

.st-password-toggle:hover {
    background: var(--st-surface-hover);
    color: var(--st-text);
}

.st-password-toggle svg {
    width: 1.125rem;
    height: 1.125rem;
}

.st-eye-closed {
    display: none;
}

.st-password-toggle.is-visible .st-eye-open {
    display: none;
}

.st-password-toggle.is-visible .st-eye-closed {
    display: block;
}

.st-field-error {
    margin: .375rem 0 0;
    color: var(--st-danger);
    font-size: .8125rem;
    font-weight: 500;
}

.st-remember-control {
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
    gap: .625rem;
    margin: -.25rem 0 1.25rem;
    color: var(--st-text-secondary);
    font-size: .875rem;
    cursor: pointer;
}

.st-remember-control input {
    width: 1.125rem;
    height: 1.125rem;
    accent-color: var(--st-login-primary);
    cursor: pointer;
}

.st-login-submit {
    display: inline-flex;
    width: 100%;
    min-height: 3.25rem;
    align-items: center;
    justify-content: center;
    gap: .625rem;
    padding: .75rem 1rem;
    border: 1px solid var(--st-login-primary);
    border-radius: var(--st-radius-md);
    background: var(--st-login-primary);
    color: #fff;
    font-family: inherit;
    font-size: .9375rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color var(--st-transition), border-color var(--st-transition), box-shadow var(--st-transition);
}

.st-login-submit:hover {
    border-color: var(--st-login-primary-hover);
    background: var(--st-login-primary-hover);
    box-shadow: var(--st-shadow-button);
}

.st-login-submit:disabled {
    cursor: wait;
    opacity: .72;
}

.st-login-submit svg,
.st-button-spinner {
    width: 1.125rem;
    height: 1.125rem;
    flex: 0 0 1.125rem;
}

.st-button-spinner {
    display: none;
    border: 2px solid rgb(255 255 255 / .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: st-spin 700ms linear infinite;
}

.st-login-submit.is-loading .st-button-spinner {
    display: block;
}

.st-login-submit.is-loading .st-button-icon {
    display: none;
}

.st-login-body :focus-visible {
    outline: 2px solid var(--st-login-primary);
    outline-offset: 2px;
}

/* Selección de caja dentro del layout autenticado. */
.rb-access-selection {
    width: min(100%, 62rem);
    margin: 0 auto;
    padding: clamp(.5rem, 2vw, 1.5rem) 0 2rem;
}

.rb-access-selection-header {
    max-width: 42rem;
    margin: 0 auto 2rem;
    text-align: center;
}

.rb-access-selection-header h2 {
    margin: 0;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    line-height: 1.15;
}

.rb-access-selection-header > p:last-child {
    margin: .75rem 0 0;
    color: var(--st-text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

.rb-access-alert {
    max-width: 46rem;
    margin: 0 auto 1.5rem;
}

.rb-access-alert div {
    display: grid;
    gap: .1875rem;
}

.rb-access-alert strong,
.rb-access-alert span {
    display: block;
}

.rb-caja-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.rb-caja-card {
    display: flex;
    min-width: 0;
    min-height: 23rem;
    flex-direction: column;
    padding: 1.5rem;
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius-lg);
    background: var(--st-surface);
    box-shadow: var(--st-shadow-card);
}

.rb-caja-card.is-open {
    border-color: rgb(5 150 105 / .32);
}

.rb-caja-card.is-closed {
    background: var(--st-surface-subtle);
}

.rb-caja-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.rb-caja-icon {
    display: grid;
    width: 3.25rem;
    height: 3.25rem;
    place-items: center;
    border-radius: var(--st-radius-md);
    background: var(--st-primary-soft);
    color: var(--st-primary);
}

.rb-caja-card.is-closed .rb-caja-icon {
    background: var(--st-border);
    color: var(--st-text-muted);
}

.rb-caja-icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.rb-caja-status {
    display: inline-flex;
    min-height: 2rem;
    align-items: center;
    gap: .5rem;
    padding: .375rem .625rem;
    border: 1px solid;
    border-radius: var(--st-radius-pill);
    font-size: .75rem;
    font-weight: 700;
}

.rb-caja-status > span {
    width: .5rem;
    height: .5rem;
    border-radius: 50%;
    background: currentColor;
}

.rb-caja-status.is-open {
    border-color: rgb(5 150 105 / .24);
    background: var(--st-success-soft);
    color: var(--st-success);
}

.rb-caja-status.is-closed {
    border-color: var(--st-border-strong);
    background: var(--st-surface);
    color: var(--st-text-muted);
}

.rb-caja-card-body {
    flex: 1;
    padding: 1.5rem 0;
}

.rb-caja-card-body h3 {
    margin: 0 0 .875rem;
    font-size: 1.375rem;
}

.rb-caja-environments {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    color: var(--st-text-secondary);
    font-size: .875rem;
    line-height: 1.5;
}

.rb-caja-environments svg {
    width: 1rem;
    height: 1rem;
    flex: 0 0 1rem;
    margin-top: .125rem;
}

.rb-caja-no-environments {
    margin: 0;
    color: var(--st-text-muted);
    font-size: .875rem;
}

.rb-caja-description {
    margin: 1.25rem 0 0;
    color: var(--st-text-secondary);
    font-size: .9375rem;
    line-height: 1.55;
}

.rb-caja-form {
    margin: 0;
}

.rb-caja-action {
    display: flex;
    width: 100%;
    min-height: 3.25rem;
    align-items: center;
    justify-content: center;
    gap: .625rem;
    padding: .75rem 1rem;
    border: 1px solid var(--st-primary);
    border-radius: var(--st-radius-md);
    background: var(--st-primary);
    color: #fff;
    font-family: inherit;
    font-size: .9375rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color var(--st-transition), border-color var(--st-transition), box-shadow var(--st-transition);
}

.rb-caja-action:hover:not(:disabled) {
    border-color: var(--st-primary-hover);
    background: var(--st-primary-hover);
    box-shadow: var(--st-shadow-button);
}

.rb-caja-action:disabled {
    border-color: var(--st-border-strong);
    background: var(--st-border);
    color: var(--st-text-muted);
    cursor: not-allowed;
}

.rb-caja-action svg {
    width: 1.125rem;
    height: 1.125rem;
    flex: 0 0 1.125rem;
}

.rb-access-logout {
    display: block;
    width: fit-content;
    margin: 1.5rem auto 0;
    color: var(--st-text-secondary) !important;
    font-size: .875rem;
    font-weight: 600;
}

.rb-access-logout:hover {
    color: var(--st-primary) !important;
}

.rb-access-empty {
    padding: 2rem;
    border: 1px dashed var(--st-border-strong);
    border-radius: var(--st-radius-lg);
    background: var(--st-surface);
    text-align: center;
}

.rb-access-empty h3 {
    margin: 0;
}

.rb-access-empty p {
    margin: .5rem 0 0;
    color: var(--st-text-secondary);
}

@keyframes st-access-enter {
    from {
        opacity: 0;
        transform: translateY(.625rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes st-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 55.999rem) {
    .st-login-layout {
        display: block;
    }

    .st-login-brand-panel {
        display: none;
    }

    .st-login-main {
        min-height: 100dvh;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 1.25rem;
        background: var(--st-login-surface);
        box-shadow: none;
    }

    .st-login-card {
        max-width: 31rem;
        margin: 0 auto;
        padding: 1.5rem;
        border: 1px solid var(--st-border);
        border-radius: var(--st-radius-lg);
        background: var(--st-login-surface);
        box-shadow: var(--st-shadow-card);
    }

    .st-login-header {
        margin-bottom: 1.5rem;
    }

    .st-login-form-logo {
        width: 9rem;
        height: 4.25rem;
        margin-bottom: 1.25rem;
    }

    .rb-caja-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .rb-caja-card {
        min-height: 20rem;
    }
}

@media (max-width: 23.4375rem) {
    .st-login-main {
        padding: 1rem;
    }

    .st-login-card {
        padding: 1.25rem;
    }

    .rb-caja-card {
        padding: 1.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .st-login-slide img,
    .st-login-card {
        animation: none;
    }

    .st-login-slide {
        transition: none;
    }

    .st-button-spinner {
        animation-duration: 1ms;
    }
}
