:root {
    color-scheme: light;
}

html {
    font-size: 18px;
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

@media (max-width: 767.98px) {
    .app-shell.menu-mobile-open > .app-sidebar {
        transform: translateX(0) !important;
        visibility: visible !important;
    }
}

.swal2-container {
    z-index: 20000 !important;
}

/* Modal overlay fix: ensure modal breaks out of parent flex/grid constraints */
.modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 1055 !important;
    padding: 0 !important;
}

.modal-backdrop {
    position: fixed !important;
    inset: 0 !important;
    z-index: 1050 !important;
}

/* AOS/Blazor.Animate deja translateZ(0) en .aos-animate, que crea un containing
   block y captura los modales position:fixed. Se neutraliza el transform final. */
[data-aos].aos-animate {
    transform: none !important;
}

.app-brand-title {
    font-size: 1.5em !important;
    font-weight: 700 !important;
    line-height: 1.05;
}

@media (max-width: 900px) {
    .app-brand-title { font-size: 0.75em !important; }
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: linear-gradient(135deg, #0f2746 0%, #1b6ec2 100%);
}

.auth-card {
    width: 100%;
    max-width: 430px;
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.35);
}

.split-login {
    min-height: 100vh;
    display: flex;
}

.split-brand {
    flex: 1 1 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    background:
        radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.10) 0%, transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(255, 255, 255, 0.12) 0%, transparent 40%),
        linear-gradient(135deg, #1b1b2f 0%, #2d2d5e 45%, #512bd4 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.split-brand::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px);
    background-size: 26px 26px;
    opacity: 0.35;
    pointer-events: none;
}

.brand-content {
    max-width: 420px;
    position: relative;
    z-index: 1;
}

.brand-logo-wrap {
    width: 132px;
    height: 132px;
    margin-bottom: 1.5rem;
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.4);
    padding: 0.5rem;
    backdrop-filter: blur(4px);
    overflow: hidden;
}

.brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
    border-radius: 1rem;
}

.brand-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.brand-subtitle {
    font-size: 1.1rem;
    opacity: 0.85;
    margin-bottom: 2rem;
}

.brand-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.brand-features li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0;
    opacity: 0.92;
}

.brand-features li::before {
    content: "✓";
    color: #7fe08c;
    font-weight: 700;
}

.split-form {
    flex: 1 1 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #fff;
}

.login-box {
    width: 100%;
    max-width: 400px;
}

.pin-input {
    font-size: 1.5rem;
    letter-spacing: 0.5rem;
}

.pinpad {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    user-select: none;
}

.pinpad-dots {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    padding: 0.5rem 0;
}

.pinpad-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--bs-primary, #0d6efd);
    background: transparent;
    transition: all 0.15s ease;
}

.pinpad-dot.filled {
    background: var(--bs-primary, #0d6efd);
    transform: scale(1.1);
}

.pinpad-dot.active {
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

.pinpad-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    width: 280px;
}

.pinpad-key {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid var(--bs-border-color, #dee2e6);
    background: var(--bs-body-bg, #fff);
    color: var(--bs-body-color, #212529);
    font-size: 1.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.1s ease;
    margin: 0 auto;
    padding: 0;
    line-height: 1;
}

.pinpad-key:hover:not(:disabled) {
    background: var(--bs-primary, #0d6efd);
    color: #fff;
    border-color: var(--bs-primary, #0d6efd);
    transform: scale(1.05);
}

.pinpad-key:active:not(:disabled) {
    transform: scale(0.95);
}

.pinpad-key:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pinpad-key-special {
    background: transparent;
    border-color: transparent;
    color: var(--bs-secondary, #6c757d);
}

.pinpad-key-special:hover:not(:disabled) {
    background: rgba(108, 117, 125, 0.1);
    color: var(--bs-body-color, #212529);
    border-color: transparent;
}

.pinpad-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--bs-primary, #0d6efd);
    font-size: 0.9rem;
}

.pinpad-shake {
    animation: pinpad-shake 0.5s ease;
}

@keyframes pinpad-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-12px); }
    40% { transform: translateX(10px); }
    60% { transform: translateX(-8px); }
    80% { transform: translateX(6px); }
}

@media (max-width: 400px) {
    .pinpad-grid {
        width: 240px;
        gap: 0.6rem;
    }

    .pinpad-key {
        width: 62px;
        height: 62px;
        font-size: 1.3rem;
    }

    .pinpad-dots {
        gap: 0.6rem;
    }

    .pinpad-dot {
        width: 12px;
        height: 12px;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 16px;
    }

    body {
        overflow-x: hidden;
    }

    h1, .h1 {
        font-size: 1.65rem;
    }

    h2, .h2 {
        font-size: 1.4rem;
    }

    .app-content > .d-flex.align-items-center,
    .app-content > .d-flex.justify-content-between,
    .card-header.d-flex {
        align-items: stretch !important;
        flex-wrap: wrap;
        gap: 0.65rem;
    }

    .app-content > .d-flex > .btn,
    .app-content > .d-flex > a.btn {
        width: 100%;
    }

    .btn:not(.btn-close),
    .form-control,
    .form-select,
    fluent-button {
        min-height: 44px;
    }

    .btn-sm:not(.btn-close) {
        min-height: 40px;
    }

    .card-body {
        padding: 0.85rem;
    }

    .table-responsive {
        max-width: 100%;
        -webkit-overflow-scrolling: touch;
    }

    .table-responsive > .table {
        min-width: 680px;
        margin-bottom: 0;
    }

    .table-responsive > .table.table-sm {
        min-width: 600px;
    }

.modal {
        padding: 0 !important;
        position: fixed !important;
        inset: 0 !important;
        z-index: 1055 !important;
    }

    .modal-dialog,
    .modal-dialog.modal-lg,
    .modal-dialog.modal-xl {
        width: 100%;
        max-width: none;
        min-height: 100%;
        margin: 0;
    }

    .modal-content {
        min-height: 100dvh;
        border: 0;
        border-radius: 0;
    }

    .modal-header,
    .modal-footer {
        position: sticky;
        z-index: 2;
        background: #fff;
    }

    .modal-header {
        top: 0;
    }

    .modal-footer {
        bottom: 0;
        gap: 0.5rem;
    }

    .modal-footer .btn {
        flex: 1 1 auto;
    }

    .swal2-popup {
        width: calc(100vw - 1.5rem) !important;
        padding: 1rem !important;
    }

    .split-login {
        flex-direction: column;
    }

    .split-brand {
        flex: 0 0 auto;
        padding: 1.5rem 1rem;
    }

    .brand-title {
        font-size: 1.65rem;
    }

    .brand-features {
        display: none;
    }

    .brand-subtitle {
        margin-bottom: 0;
    }

    .split-form {
        padding: 1.25rem 1rem;
    }
}

@media print {
    .app-sidebar, .app-topbar {
        display: none !important;
    }

    .app-content {
        padding: 0 !important;
        background: #fff !important;
    }
}
body.menu-lateral-bloqueado {
    overflow: hidden;
}

/* FluentUI NavMenu - force light theme inside sidebar */
.app-sidebar {
    background-color: #ffffff !important;
}

.app-sidebar ::deep fluent-nav-menu {
    background-color: #ffffff !important;
    --neutral-layer-1: #ffffff;
    --neutral-layer-2: #fafafa;
    --neutral-foreground-on-accent: #ffffff;
    --neutral-foreground-rest: #242424;
    --neutral-stroke-rest: #d1d1d1;
    --accent-foreground-rest: #005fb8;
    --neutral-foreground-hint: #616161;
}

.app-sidebar ::deep fluent-nav-menu-item {
    color: #242424 !important;
    background-color: transparent !important;
}

.app-sidebar ::deep fluent-nav-menu-item:hover {
    background-color: #f5f5f5 !important;
}

.app-sidebar ::deep fluent-nav-menu-item[aria-expanded="true"],
.app-sidebar ::deep fluent-nav-menu-item[aria-current="page"] {
    background-color: #e8f0fe !important;
    color: #005fb8 !important;
}

.app-sidebar ::deep fluent-nav-group {
    color: #242424 !important;
}

.app-sidebar ::deep .nav-menu-indicator {
    color: #616161 !important;
}

.app-sidebar ::deep .fluent-nav-item {
    color: #242424 !important;
}

.app-sidebar ::deep .fluent-nav-item:hover {
    background-color: #f5f5f5 !important;
}

.app-sidebar ::deep .fluent-nav-item.active {
    background-color: #e8f0fe !important;
    color: #005fb8 !important;
}

/* Responsive: ocultar columnas secundarias en móvil */
@media (max-width: 767.98px) {
    .d-mobile-none {
        display: none !important;
    }

    .table-responsive > .table > thead > tr > th,
    .table-responsive > .table > tbody > tr > td {
        white-space: nowrap;
    }

    .table-responsive > .table > tbody > tr > td.text-truncate-mobile {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .table > thead > tr > th.actions-col,
    .table > tbody > tr > td.actions-col {
        position: sticky;
        right: 0;
        background: inherit;
        z-index: 1;
    }
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.loading-overlay .spinner-border {
    width: 2.5rem;
    height: 2.5rem;
}

/* Skeleton loader para tablas */
.skeleton-row {
    display: flex;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.skeleton-cell {
    height: 1rem;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

#kardex-sesion-expirada-dialog {
    border: 0;
    border-radius: 0.75rem;
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
    padding: 0;
    max-width: 380px;
}
#kardex-sesion-expirada-dialog::backdrop {
    background: rgba(0,0,0,.5);
}
#kardex-sesion-expirada-dialog[open] {
    animation: kardex-dialog-in .3s ease;
}
@keyframes kardex-dialog-in {
    from { opacity: 0; transform: scale(.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Búsqueda global Ctrl+K */
.busqueda-global-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,.45);
    display: flex; justify-content: center; padding-top: 12vh;
}
.busqueda-global-dialog {
    background: #fff; border-radius: 12px; width: 560px; max-width: 92vw;
    box-shadow: 0 8px 32px rgba(0,0,0,.3); overflow: hidden;
    animation: kardex-dialog-in .2s ease;
}
.busqueda-global-input-wrapper {
    display: flex; align-items: center; padding: 12px 16px; border-bottom: 1px solid #e9ecef;
}
.busqueda-global-input {
    flex: 1; border: none; outline: none; font-size: 1rem; background: transparent;
}
.busqueda-global-kbd {
    font-size: .7rem; padding: 2px 6px; border: 1px solid #ccc; border-radius: 4px;
    background: #f8f9fa; color: #666;
}
.busqueda-global-body { max-height: 400px; overflow-y: auto; }
.busqueda-global-grupo {
    padding: 8px 16px 4px; font-size: .75rem; font-weight: 600; color: #6c757d;
    text-transform: uppercase; letter-spacing: .5px; background: #f8f9fa;
}
.busqueda-global-item {
    display: block; width: 100%; text-align: left; padding: 8px 16px;
    border: none; background: none; cursor: pointer; border-bottom: 1px solid #f1f1f1;
}
.busqueda-global-item:hover { background: #e9f1ff; }
.busqueda-global-item-titulo { font-size: .9rem; font-weight: 500; }
.busqueda-global-item-sub { font-size: .8rem; color: #6c757d; }

/* ── SweetAlert2: tema moderno compartido ─────────────────────────────── */
.swal2-popup { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; }

.kex-popup {
    border-radius: 16px !important;
    border: 1px solid #e9ecef;
    box-shadow: 0 18px 50px rgba(20, 30, 55, 0.18) !important;
    padding: 0 !important;
    overflow: hidden;
}
.kex-popup .swal2-html-container { padding: 0 !important; margin: 0 !important; }
.swal2-popup.kex-popup .swal2-title { padding: 1rem 1.25rem 0 !important; }

.kex-title {
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    color: #1c2333 !important;
    line-height: 1.3 !important;
}

.kex-btn {
    border-radius: 10px !important;
    font-weight: 500 !important;
    padding: 0.5rem 1.3rem !important;
    margin: 0 !important;
    transition: filter 0.15s ease, transform 0.1s ease !important;
}
.kex-btn:hover { filter: brightness(1.06); }
.kex-btn:active { transform: scale(0.98); }
.kex-btn-primary { background: #1b6ec2 !important; color: #fff !important; }
.kex-btn-danger { background: #dc3545 !important; color: #fff !important; }
.kex-btn-secondary { background: #f1f3f5 !important; color: #495057 !important; }
.kex-popup .swal2-actions { margin: 0.9rem 1.3rem 1.1rem !important; }

@keyframes kex-pop-in {
    0% { opacity: 0; transform: translateY(18px) scale(0.96); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes kex-pop-out {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(12px) scale(0.97); }
}

/* ── Modal de error profesional ───────────────────────────────────────── */
.kerr-head {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1.15rem 1.3rem;
    background: linear-gradient(135deg, #f8f9fb 0%, #eef1f7 100%);
    border-bottom: 1px solid #e9ecef;
}
.kerr-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fdeaea;
    color: #d63031;
    font-size: 1.3rem;
    border: 1px solid #f7d7d7;
}
.kerr-title { font-size: 1.02rem; font-weight: 700; color: #1c2333; line-height: 1.25; }
.kerr-subtitle { font-size: 0.82rem; color: #6c757d; margin-top: 2px; }
.kerr-body { padding: 1rem 1.3rem 1.1rem; text-align: left; }
.kerr-msg {
    background: #fff8f8;
    border: 1px solid #f3d9d9;
    border-radius: 10px;
    padding: 0.7rem 0.85rem;
    color: #8b2f2f;
    font-size: 0.88rem;
    line-height: 1.45;
    word-break: break-word;
}
.kerr-meta { display: flex; gap: 0.5rem; margin-top: 0.75rem; flex-wrap: wrap; }
.kerr-chip {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.kerr-chip-modulo { background: #e8f0fe; color: #1b4f9c; }
.kerr-chip-tipo { background: #f1f3f5; color: #6c757d; }
.kerr-details { margin-top: 0.9rem; border: 1px solid #e9ecef; border-radius: 10px; overflow: hidden; }
.kerr-details summary {
    cursor: pointer;
    padding: 0.55rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #1b6ec2;
    background: #f8f9fa;
    user-select: none;
    list-style: none;
}
.kerr-details summary::-webkit-details-marker { display: none; }
.kerr-details summary::before { content: "▸ "; display: inline-block; transition: transform 0.15s ease; }
.kerr-details[open] summary::before { transform: rotate(90deg); }
.kerr-details-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0.85rem;
    font-size: 0.72rem;
    color: #6c757d;
    border-bottom: 1px solid #eef0f3;
    background: #fcfcfd;
}
.kerr-copy {
    border: 1px solid #d7dbe0;
    background: #fff;
    color: #495057;
    border-radius: 6px;
    font-size: 0.72rem;
    padding: 0.15rem 0.6rem;
    cursor: pointer;
}
.kerr-copy:hover { border-color: #1b6ec2; color: #1b6ec2; }
.kerr-details pre {
    margin: 0;
    max-height: 220px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.72rem;
    line-height: 1.5;
    color: #3d4552;
    background: #fafbfc;
    padding: 0.85rem;
}

/* Fallback inline del ErrorBoundary (si JS no está disponible) */
.kex-error-inline {
    border-left: 4px solid #dc3545;
    box-shadow: 0 4px 14px rgba(20, 30, 55, 0.08);
    border-radius: 0.5rem;
}

@media (max-width: 480px) {
    .kerr-head { padding: 1rem; }
    .kerr-body { padding: 0.9rem 1rem 1rem; }
    .kex-popup .swal2-actions { margin: 0.8rem 1rem 1rem !important; flex-direction: column-reverse !important; }
    .kex-popup .swal2-actions .swal2-styled { width: 100% !important; margin: 0.25rem 0 !important; }
}

/* ============================================================
   POS — reglas base de la tarjeta de producto.
   El CSS aislado de Pos.razor.css PIERDE estas reglas base al
   compilar (bug del CSS isolation de Blazor: descarta la variante
   desktop y deja solo la del @media). Se duplican aquí en el CSS
   global para garantizar que la foto del producto se muestre
   completa (object-fit: contain) y no recortada ("mitad de arriba").
   ============================================================ */
.producto-visual { min-height: 211px; }
.producto-imagen {
    width: 146px;
    height: 105px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: .45rem;
    background: #f2f4f7;
    color: #89929c;
    font-size: 1.8rem;
}
.producto-imagen img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
