:root {
    --navy: #14213d;
    --navy-2: #1b2d50;
    --blue: #2563eb;
    --blue-soft: #eff6ff;
    --surface: #ffffff;
    --background: #f4f7fb;
    --border: #e3eaf3;
    --text: #182235;
    --muted: #718096;
    --success: #138a5b;
    --danger: #c13c4b;
    --shadow: 0 14px 38px rgba(24, 34, 53, 0.07);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--background);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

.sidebar {
    position: fixed;
    z-index: 50;
    inset: 0 auto 0 0;
    width: 268px;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #14213d 0%, #101a30 100%);
    color: #ffffff;
    box-shadow: 12px 0 36px rgba(20, 33, 61, 0.08);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 8px 22px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: #ffffff;
    color: var(--navy);
    font-size: 15px;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.brand strong,
.brand span {
    display: block;
}

.brand strong {
    font-size: 17px;
}

.brand span {
    margin-top: 1px;
    color: #aebbd0;
    font-size: 12px;
}

.nav-caption {
    margin: 18px 10px 8px;
    color: #7184a5;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.4px;
}

.nav-caption.inner {
    margin-top: 24px;
}

nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 13px;
    border-radius: 11px;
    color: #c7d2e4;
    text-decoration: none;
    font-size: 14px;
    font-weight: 650;
    transition: 0.18s ease;
}

nav a:hover,
nav a.active {
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
}

.nav-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #667a9c;
}

nav a.active .nav-dot {
    background: #72a7ff;
    box-shadow: 0 0 0 4px rgba(114, 167, 255, 0.12);
}

.user-card {
    margin-top: auto;
    padding: 12px;
    display: grid;
    grid-template-columns: 38px 1fr auto;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.045);
}

.avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: #2d4775;
    font-weight: 800;
}

.user-info {
    min-width: 0;
}

.user-info strong,
.user-info span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-info strong {
    font-size: 12px;
}

.user-info span {
    margin-top: 2px;
    color: #91a2bd;
    font-size: 10px;
}

.logout {
    color: #b8c6da;
    text-decoration: none;
    font-size: 11px;
}

.app-main {
    min-height: 100vh;
    margin-left: 268px;
}

.topbar {
    height: 76px;
    padding: 0 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 30;
}

.topbar > div:first-of-type {
    flex: 1;
}

.topbar strong {
    font-size: 14px;
}

.topbar-subtitle {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.topbar-date {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 12px;
}

.topbar-date strong {
    padding: 7px 10px;
    border-radius: 9px;
    background: #f2f5fa;
    color: var(--text);
}

.menu-toggle {
    display: none;
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 10px;
    background: #eef3fa;
    color: var(--text);
    font-size: 18px;
}

.content {
    max-width: 1680px;
    margin: 0 auto;
    padding: 34px;
}

.page-heading {
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
}

.page-heading h1 {
    margin: 4px 0 5px;
    font-size: clamp(28px, 3vw, 38px);
    line-height: 1.1;
    letter-spacing: -1.1px;
}

.page-heading p,
.panel-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.eyebrow {
    color: var(--blue);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 1.25px;
}

.stat-grid,
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
}

.stat-card,
.card,
.panel {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.stat-card,
.card {
    padding: 20px;
}

.stat-card.featured {
    border-color: #cfe0ff;
    background: linear-gradient(145deg, #ffffff, #f4f8ff);
}

.stat-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.stat-card h3 {
    margin: 18px 0 5px;
    font-size: 15px;
}

.money-value,
.card strong {
    display: block;
    margin: 6px 0;
    font-size: 27px;
    font-weight: 800;
    letter-spacing: -0.8px;
}

.card small,
.card em,
.muted {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.panel {
    margin-top: 20px;
    padding: 24px;
}

.panel-heading {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
}

.panel-heading h2,
.panel h2 {
    margin: 3px 0 4px;
    font-size: 19px;
    letter-spacing: -0.3px;
}

.form-grid,
.grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    align-items: end;
}

.form-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field,
.grid label {
    display: block;
    color: #53627a;
    font-size: 11px;
    font-weight: 750;
}

.field > span:first-child {
    display: block;
    margin-bottom: 7px;
}

input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #d6dfeb;
    border-radius: 11px;
    outline: none;
    background: #ffffff;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    transition: border 0.15s ease, box-shadow 0.15s ease;
}

.grid label input,
.grid label select {
    margin-top: 7px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #8db4fa;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.btn,
button {
    min-height: 44px;
    padding: 10px 17px;
    border: 0;
    border-radius: 11px;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:hover,
button:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.btn.primary,
button {
    background: var(--blue);
    color: #ffffff;
}

.secondary {
    margin-top: 10px;
    background: #31425e;
    color: #ffffff;
}

.form-action {
    display: flex;
    justify-content: flex-end;
}

.span-3 {
    grid-column: span 3;
}

.switch-field {
    align-self: stretch;
}

.switch-row {
    min-height: 44px;
    padding: 0 12px;
    display: flex !important;
    align-items: center;
    gap: 9px;
    border: 1px solid #d6dfeb;
    border-radius: 11px;
    background: #f9fbfd;
    font-size: 12px;
}

.switch-row input {
    width: 17px;
    min-height: auto;
    height: 17px;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.5px;
}

.badge-blue {
    background: #eaf2ff;
    color: #245cc7;
}

.badge-green {
    background: #eaf8f1;
    color: var(--success);
}

.badge-neutral {
    background: #eef2f7;
    color: #5d6b80;
}

.table-panel {
    padding: 0;
    overflow: hidden;
}

.table-panel .panel-heading {
    padding: 22px 24px 0;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 18px;
    border-bottom: 1px solid #edf1f6;
    text-align: left;
    white-space: nowrap;
    font-size: 12px;
}

th {
    background: #fafbfd;
    color: #65748a;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

tbody tr:hover {
    background: #fbfcfe;
}

.start-summary {
    margin: 8px 0 16px;
    padding: 14px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    border-radius: 12px;
    background: #f5f8fc;
    text-align: left;
}

.start-summary span {
    color: var(--muted);
    font-size: 12px;
}

.start-summary strong {
    text-align: right;
    font-size: 12px;
}

.login {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    background:
        radial-gradient(circle at 15% 20%, rgba(67, 113, 191, 0.22), transparent 32%),
        linear-gradient(145deg, #101a30, #182b4d);
}

.loginbox {
    width: min(410px, 94vw);
    padding: 36px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.25);
}

.loginbox h1 {
    margin: 0 0 5px;
    font-size: 27px;
    letter-spacing: -0.7px;
}

.loginbox p {
    margin: 0 0 24px;
    color: var(--muted);
    font-size: 13px;
}

.loginbox label {
    display: block;
    margin-top: 14px;
    color: #53627a;
    font-size: 11px;
    font-weight: 800;
}

.loginbox input {
    margin-top: 7px;
}

.loginbox button {
    width: 100%;
    margin-top: 22px;
}

.error {
    margin-top: 15px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff1f2;
    color: var(--danger);
    font-size: 12px;
}

@media (max-width: 1100px) {
    .form-grid,
    .grid,
    .form-grid.three {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .span-3 {
        grid-column: span 1;
    }
}

@media (max-width: 780px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .app-main {
        margin-left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .topbar {
        height: 68px;
        padding: 0 16px;
    }

    .topbar-subtitle {
        display: none;
    }

    .content {
        padding: 20px 16px;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .form-grid,
    .grid,
    .form-grid.three {
        grid-template-columns: 1fr;
    }

    .span-3 {
        grid-column: auto;
    }

    .panel {
        padding: 18px;
    }

    .stat-grid,
    .cards {
        grid-template-columns: 1fr;
    }
}

/* Modales y acciones administrativas */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.56);
    backdrop-filter: blur(5px);
}

.modal-backdrop.open {
    display: flex;
}

.modal-card {
    width: min(760px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.24);
}

.modal-header,
.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 28px;
}

.modal-header {
    border-bottom: 1px solid #edf2f7;
}

.modal-header h2,
.modal-header p {
    margin: 0;
}

.modal-header p {
    margin-top: 5px;
    color: #718096;
}

.modal-body {
    padding: 28px;
}

.modal-footer {
    justify-content: flex-end;
    border-top: 1px solid #edf2f7;
    background: #f8fafc;
}

.modal-close {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: #f1f5f9;
    color: #475569;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.form-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.span-2 {
    grid-column: span 2;
}

.row-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.row-actions form {
    margin: 0;
}

.btn.compact {
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 10px;
}

.btn.secondary {
    background: #ffffff;
    color: #334155;
    border: 1px solid #dbe3ee;
}

.btn.danger-soft {
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #ffe4e6;
}

.text-right {
    text-align: right;
}

.empty-state {
    padding: 36px !important;
    text-align: center;
    color: #718096;
}

.disabled-option {
    opacity: 0.75;
}

.field small {
    display: block;
    margin-top: 7px;
    color: #718096;
    font-size: 12px;
}

@media (max-width: 760px) {
    .modal-backdrop {
        padding: 12px;
        align-items: flex-end;
    }

    .modal-card {
        max-height: 92vh;
        border-radius: 22px 22px 12px 12px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }

    .form-grid.two {
        grid-template-columns: 1fr;
    }

    .span-2 {
        grid-column: span 1;
    }

    .row-actions {
        justify-content: flex-start;
    }
}

.form-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.span-2 {
    grid-column: span 2;
}

.span-3 {
    grid-column: span 3;
}

.field-space {
    margin-top: 16px;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-actions form {
    margin: 0;
}

.btn.small {
    min-height: 34px;
    padding: 7px 11px;
    font-size: 11px;
}

.btn.secondary,
button.secondary {
    background: #eef3fa;
    color: #33445f;
}

.btn.danger-soft {
    background: #fff0f2;
    color: var(--danger);
}

.full-width {
    width: 100%;
}

.empty-state {
    padding: 18px;
    border: 1px dashed #cbd7e6;
    border-radius: 13px;
    background: #f8fafc;
    color: var(--muted);
    font-size: 13px;
}

.modal-small {
    max-width: 520px;
}

.branch-register-grid {
    display: grid;
    gap: 20px;
}

.branch-group {
    --branch-accent: #2563eb;
    padding: 20px;
    border: 1px solid var(--border);
    border-top: 4px solid var(--branch-accent);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.branch-theme-1 { --branch-accent: #2563eb; }
.branch-theme-2 { --branch-accent: #0f766e; }
.branch-theme-3 { --branch-accent: #7c3aed; }
.branch-theme-4 { --branch-accent: #b45309; }
.branch-theme-5 { --branch-accent: #be123c; }
.branch-theme-6 { --branch-accent: #0369a1; }

.branch-group-heading {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.branch-group-heading > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.branch-group-heading > span {
    color: var(--muted);
    font-size: 12px;
}

.branch-color-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--branch-accent);
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--branch-accent) 12%, transparent);
}

.register-cards {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.register-card {
    border-left: 4px solid var(--branch-accent);
    box-shadow: none;
    background: linear-gradient(145deg, #ffffff, #fbfcff);
}

.register-card form {
    margin-top: 16px;
}

@media (max-width: 760px) {
    .form-grid.two,
    .form-grid.three {
        grid-template-columns: 1fr;
    }

    .span-2,
    .span-3 {
        grid-column: auto;
    }

    .table-actions {
        align-items: stretch;
        flex-direction: column;
    }
}

.heading-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

button:disabled,
.btn:disabled {
    cursor: not-allowed;
    opacity: 0.52;
    transform: none;
}

.cash-close-summary {
    display: grid;
    gap: 10px;
}

.cash-close-summary > div {
    min-height: 46px;
    padding: 11px 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fafc;
}

.cash-close-summary span {
    color: var(--muted);
    font-size: 12px;
}

.cash-close-summary strong {
    font-size: 13px;
    text-align: right;
}

.cash-close-summary .highlight {
    border-color: #cfe0ff;
    background: #f1f6ff;
}

@media (max-width: 780px) {
    .heading-actions {
        width: 100%;
    }

    .heading-actions .btn {
        flex: 1;
    }
}

/* V1.0.7 - modales compactos y control por bodegas */
.modal-compact {
    width: min(600px, 100%);
    overflow: hidden;
}

.modal-medium {
    width: min(720px, 100%);
    overflow: hidden;
}

.modal-compact .modal-header,
.modal-medium .modal-header {
    padding: 22px 24px 18px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.modal-compact .modal-header h2,
.modal-medium .modal-header h2 {
    margin-top: 4px;
    font-size: 25px;
    line-height: 1.15;
}

.modal-compact .modal-header p,
.modal-medium .modal-header p {
    max-width: 500px;
    font-size: 13px;
    line-height: 1.5;
}

.modal-form-body {
    display: grid;
    gap: 16px;
    padding: 22px 24px;
}

.modal-form-body .field,
.modal-form-body .field-space {
    margin: 0;
}

.modal-compact .modal-footer,
.modal-medium .modal-footer {
    padding: 16px 24px;
}

.modal-compact .modal-close,
.modal-medium .modal-close {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    font-size: 24px;
}

.balance-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 15px;
    border: 1px solid #cfe0ff;
    border-radius: 13px;
    background: #f3f7ff;
}

.balance-notice span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.balance-notice strong {
    color: #174ea6;
    font-size: 18px;
}

.warehouse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 18px;
}

.warehouse-card {
    --branch-accent: #2563eb;
    overflow: hidden;
    border: 1px solid var(--border);
    border-top: 4px solid var(--branch-accent);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.warehouse-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 20px 16px;
}

.warehouse-card-head > div {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.warehouse-card-head small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
}

.warehouse-card-head h2 {
    margin: 3px 0 0;
    font-size: 20px;
}

.warehouse-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: #fbfcfe;
}

.warehouse-metrics > div {
    padding: 15px 16px;
}

.warehouse-metrics > div + div {
    border-left: 1px solid var(--border);
}

.warehouse-metrics span,
.warehouse-metrics strong {
    display: block;
}

.warehouse-metrics span {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 11px;
}

.warehouse-metrics strong {
    font-size: 16px;
}

.warehouse-actions {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    flex-wrap: wrap;
}

.detail-anchor {
    margin-top: 22px;
    scroll-margin-top: 20px;
}

.detail-balance {
    font-size: 22px;
}

.modal-register-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.modal-register-item {
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #f8fafc;
}

.modal-register-item span,
.modal-register-item strong {
    display: block;
}

.modal-register-item span {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 12px;
}

.modal-register-item strong {
    font-size: 17px;
}

.swal-balance-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 9px 18px;
    margin-top: 8px;
    text-align: left;
}

.swal-balance-grid strong {
    text-align: right;
}

@media (max-width: 760px) {
    .warehouse-grid {
        grid-template-columns: 1fr;
    }

    .warehouse-metrics {
        grid-template-columns: 1fr;
    }

    .warehouse-metrics > div + div {
        border-top: 1px solid var(--border);
        border-left: 0;
    }

    .warehouse-actions .btn {
        flex: 1 1 100%;
    }

    .modal-register-grid {
        grid-template-columns: 1fr;
    }
}

.cashier-dashboard-grid,
.cashier-summary-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.cashier-balance-card {
    background: linear-gradient(135deg, #152544, #244f96);
    border-radius: 24px;
    color: #ffffff;
    padding: 28px;
    box-shadow: 0 18px 42px rgba(21, 37, 68, 0.18);
}

.cashier-balance-card .eyebrow,
.cashier-balance-card p {
    color: rgba(255, 255, 255, 0.76);
}

.cashier-balance-card h2 {
    font-size: 42px;
    margin: 12px 0 8px;
}

.cashier-stat-card a {
    display: inline-block;
    margin-top: 14px;
    font-weight: 700;
    text-decoration: none;
}

.cashier-action-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.cashier-action-card {
    border: 1px solid #dbe4f0;
    border-radius: 18px;
    padding: 22px;
    text-decoration: none;
    color: #17233b;
    background: #ffffff;
}

.cashier-action-card strong,
.cashier-action-card span {
    display: block;
}

.cashier-action-card span {
    color: #71809a;
    margin-top: 7px;
}

.cashier-action-card.primary-action {
    border-color: #bcd2ff;
    background: #f4f8ff;
}

.modal-wide {
    width: min(1120px, calc(100vw - 36px));
    max-height: calc(100vh - 36px);
    overflow: auto;
}

.capture-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px;
    border: 1px dashed #cbd8e9;
    border-radius: 18px;
    background: #f8fbff;
}

.capture-status {
    color: #71809a;
    font-weight: 600;
}

.receipt-review-list {
    display: grid;
    gap: 18px;
    margin-top: 20px;
}

.receipt-review-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 22px;
    padding: 18px;
    border: 1px solid #dbe4f0;
    border-radius: 20px;
    background: #ffffff;
}

.receipt-preview-wrap {
    border-radius: 16px;
    overflow: hidden;
    background: #edf2f8;
    align-self: start;
}

.receipt-preview {
    display: block;
    width: 100%;
    max-height: 380px;
    object-fit: contain;
    background: #f3f6fa;
}

.ocr-progress {
    padding: 12px 14px;
    font-size: 13px;
    color: #5f6f87;
    background: #f8fafc;
}

.receipt-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.receipt-card-heading h3 {
    margin: 4px 0 0;
}

.scan-warning {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff8e8;
    color: #7b5b13;
    font-size: 13px;
    font-weight: 600;
}

.empty-cell {
    text-align: center;
    color: #71809a;
    padding: 34px !important;
}

@media (max-width: 900px) {
    .cashier-dashboard-grid,
    .cashier-summary-grid,
    .cashier-action-grid,
    .receipt-review-card {
        grid-template-columns: 1fr;
    }

    .receipt-preview {
        max-height: 300px;
    }
}


/* V1.1.1 - Vista ampliada de comprobantes */
.receipt-preview-clickable {
    cursor: zoom-in;
}

.modal-card.modal-image-viewer {
    width: min(1100px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
}

.receipt-image-modal-body {
    display: flex;
    justify-content: center;
    overflow: auto;
    max-height: calc(100vh - 190px);
    background: #f5f7fb;
}

.receipt-image-modal-preview {
    display: block;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 14px;
}
