* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    /* Prevenir zoom */
    zoom: 1 !important;
    -webkit-transform: scale(1) !important;
    -moz-transform: scale(1) !important;
    -ms-transform: scale(1) !important;
    transform: scale(1) !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #2c3e50;
    height: 100%;
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    min-width: 800px;
    position: relative;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    /* Prevenir zoom */
    zoom: 1 !important;
    -webkit-transform: scale(1) !important;
    -moz-transform: scale(1) !important;
    -ms-transform: scale(1) !important;
    transform: scale(1) !important;
    touch-action: pan-x pan-y;
}

.app-container {
    width: 100%;
    min-width: 800px;
    min-height: 100vh;
    height: auto;
    position: relative;
    /* Prevenir transformaciones de zoom */
    zoom: 1 !important;
    -webkit-transform: scale(1) !important;
    -moz-transform: scale(1) !important;
    -ms-transform: scale(1) !important;
    transform: scale(1) !important;
}

/* Login page */
.login-page {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top left, #1673ba 0, #0b4978 40%, #020b13 100%);
    z-index: 2000;
}

.login-page.hidden {
    display: none;
}

.login-card {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 32px 40px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    color: #1673ba;
    margin-bottom: 6px;
    text-align: center;
}

.login-subtitle {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 20px;
    text-align: center;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.login-field label {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
}

.login-field input {
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #d0d0d0;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.login-field input:focus {
    border-color: #1673ba;
}

.login-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.login-password-wrapper input {
    padding-right: 40px;
    width: 100%;
}

.login-password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    color: #7f8c8d;
    padding: 4px;
}

.login-password-toggle:active {
    color: #1673ba;
}

.login-error {
    margin-top: 4px;
    padding: 8px 10px;
    border-radius: 6px;
    background-color: #fdecea;
    color: #c0392b;
    font-size: 13px;
}

.login-error.hidden {
    display: none;
}

.login-button {
    margin-top: 8px;
    width: 100%;
    padding: 10px 18px;
    border-radius: 10px;
    border: none;
    background-color: #1673ba;
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(22, 115, 186, 0.4);
    transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.login-button:hover {
    background-color: #0f5b97;
    box-shadow: 0 6px 16px rgba(22, 115, 186, 0.55);
}

.login-button:active {
    transform: translateY(1px);
    box-shadow: 0 3px 8px rgba(22, 115, 186, 0.45);
}

/* Sidebar - FIXED para que no se vea afectado por zoom */
.sidebar {
    width: 260px;
    min-width: 260px;
    max-width: 260px;
    height: 100vh;
    background-color: rgb(22, 115, 186);
    color: white;
    transition: transform 0.3s ease, width 0.3s ease;
    overflow: hidden;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.sidebar.hidden {
    transform: translateX(-100%);
    width: 260px;
}

.sidebar-content {
    padding: 32px 24px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
}

.sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.logout-button {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: none;
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.logout-button:hover {
    background-color: rgba(255, 255, 255, 0.22);
}

.logout-button:active {
    transform: translateY(1px);
}

.sidebar-title {
    font-size: 20px;
    font-weight: bold;
    color: white;
    white-space: nowrap;
}

.menu-btn {
    background-color: rgb(31, 149, 239);
    padding: 12px;
    border-radius: 12px;
    color: white;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 100%;
    white-space: nowrap;
}

.menu-btn:hover {
    background-color: rgb(21, 119, 199);
}

.menu-btn.active {
    background-color: rgb(0, 87, 174);
}

.menu-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu-btn.has-submenu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.menu-btn.has-submenu::after {
    content: '▾';
    font-size: 12px;
    transition: transform 0.2s ease;
}

.menu-btn.has-submenu.submenu-open::after {
    transform: rotate(180deg);
}

.menu-submenu {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding-left: 12px;
}

.menu-submenu.open {
    display: flex;
}

.submenu-btn {
    border: none;
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    padding: 5px 8px;
    border-radius: 6px;
    text-align: left;
    font-size: 11px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    line-height: 1.3;
}

.submenu-btn:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

.submenu-btn.active {
    background-color: rgba(255, 255, 255, 0.35);
    font-weight: 600;
}

/* Indicador anterior tipo "checkbox" oculto: usamos solo el fondo
   y el peso de fuente para marcar selección */
.submenu-btn::before,
.submenu-btn.active::before {
    content: none;
    display: none;
}

/* Main Content - Con margen izquierdo para el sidebar fijo */
.main-content {
    display: flex;
    flex-direction: column;
    background-color: white;
    overflow-x: hidden;
    overflow-y: hidden;
    position: relative;
    margin-left: 260px;
    width: calc(100% - 260px);
    min-width: calc(800px - 260px);
    box-sizing: border-box;
    height: 100vh;
    max-height: 100vh;
}

.top-bar {
    padding: 12px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
    min-height: 60px;
    max-height: 60px;
}

.toggle-menu-btn {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    background-color: rgb(31, 149, 239);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.toggle-menu-btn:hover {
    background-color: rgb(21, 119, 199);
}

.content-area {
    flex: 1;
    overflow-x: hidden;
    overflow-y: hidden;
    position: relative;
    min-height: 0;
    max-height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* Pages */
.page {
    padding: 0;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: 100%;
    flex: 1;
    overflow: hidden;
}

/* Páginas que no son visor necesitan padding */
.page:not(#viewerPage):not(#paginatedViewerPage) {
    padding: 24px;
    overflow-y: auto;
}

.page.hidden {
    display: none;
}

/* Search Page */
.search-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    flex: 1;
    min-height: 0;
    padding: 60px 20px;
    box-sizing: border-box;
    gap: 50px;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 575px;
    margin-bottom: 0;
    min-height: 138px;
    flex-shrink: 0;
}

.logo-image {
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 115px;
    object-fit: contain;
    display: block;
}

.search-bar-wrapper {
    width: 100%;
    max-width: 575px;
    min-width: 300px;
    flex-shrink: 0;
}

.search-input-container {
    display: flex;
    background-color: #ffffff;
    border: 1px solid #6bb3f5;
    border-radius: 24px;
    height: 50px;
    min-height: 50px;
    max-height: 50px;
    overflow: hidden;
    transition: border-color 0.2s;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.search-input-container.focused {
    border-color: #1673BA;
}

.search-input {
    flex: 1;
    border: none;
    padding: 0 20px;
    font-size: 16px;
    color: #2c3e50;
    background-color: transparent;
    outline: none;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    line-height: 50px;
}

.search-input::placeholder {
    color: #7f8c8d;
}

.search-button {
    background-color: rgb(31, 149, 239);
    color: white;
    border: none;
    border-top-right-radius: 24px;
    border-bottom-right-radius: 24px;
    padding: 0 32px;
    font-weight: bold;
    font-size: 16px;
    letter-spacing: 0.3px;
    cursor: pointer;
    border-left: 1px solid #6bb3f5;
    transition: background-color 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    height: 50px;
    min-height: 50px;
    max-height: 50px;
    line-height: 50px;
    box-sizing: border-box;
}

.search-button:hover {
    background-color: rgb(21, 119, 199);
}

.search-button:active {
    background-color: rgb(11, 89, 159);
}

.filter-button-wrapper {
    margin-top: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.filter-button {
    background-color: rgb(22, 115, 186);
    color: white;
    border: none;
    border-radius: 24px;
    padding: 12px 32px;
    font-weight: bold;
    font-size: 16px;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.filter-button:hover {
    background-color: rgb(21, 119, 199);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.filter-button:active {
    background-color: rgb(0, 87, 174);
}

/* Results Page */
.results-header {
    padding: 0 20px 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.results-title {
    font-size: 24px;
    font-weight: bold;
    color: #1673BA;
    margin-bottom: 12px;
}

.search-criteria {
    margin-top: 8px;
}

.criteria-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.criterion-item {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background-color: #e8f4f8;
    border: 1px solid #1673BA;
    border-radius: 16px;
    font-size: 13px;
    color: #2c3e50;
    white-space: nowrap;
}

.criterion-item strong {
    color: #1673BA;
    margin-right: 4px;
    font-weight: 600;
}

.results-container {
    padding: 12px;
    width: 100%;
    box-sizing: border-box;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    padding: 12px;
    width: 100%;
    box-sizing: border-box;
}

.result-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    box-sizing: border-box;
}

.result-thumbnail {
    width: 150px;
    height: 150px;
    min-width: 150px;
    min-height: 150px;
    max-width: 150px;
    max-height: 150px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid #e0e0e0;
    transition: border-color 0.2s;
}

.result-thumbnail:hover {
    border-color: #1673BA;
}

.result-folder {
    width: 150px;
    height: 150px;
    min-width: 150px;
    min-height: 150px;
    max-width: 150px;
    max-height: 150px;
    background-color: #f0f0f0;
    border: 2px solid #3498db;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    cursor: pointer;
    transition: background-color 0.2s;
    box-sizing: border-box;
    overflow: hidden;
}

.folder-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
    box-sizing: border-box;
}

.result-folder:hover {
    background-color: #e0e0e0;
}

.result-caption {
    text-align: center;
    font-size: 12px;
    color: #2c3e50;
    word-wrap: break-word;
    max-width: 150px;
    width: 100%;
    box-sizing: border-box;
}

.results-footer {
    padding: 16px;
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
}

/* Viewer Page */
.viewer-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    max-height: 100vh;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.viewer-content {
    display: flex;
    flex: 1;
    min-height: 0;
    max-height: 100%;
    gap: 0;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.image-viewer {
    flex: 3.5;
    min-width: 0;
    max-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: #f9f9f9;
    display: block;
    position: relative;
    box-sizing: border-box;
    padding: 20px;
    text-align: center;
}

.image-wrapper {
    padding: 0;
    display: inline-block;
    width: auto;
    max-width: 100%;
    min-height: 200px;
    box-sizing: border-box;
    overflow: visible;
    text-align: center;
    vertical-align: top;
}

.image-wrapper img {
    max-width: 100%;
    max-height: calc(100vh - 200px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: block;
    /* Asegurar que la imagen se muestre completa desde arriba */
    object-position: top center;
    margin: 0 auto;
    vertical-align: top;
}

.image-wrapper .image-canvas {
    max-width: 100%;
    max-height: calc(100vh - 200px);
    width: auto;
    height: auto;
    display: none;
    margin: 0 auto;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.info-panel {
    flex: 2.5;
    min-width: 250px;
    max-width: 400px;
    width: auto;
    background-color: #f7f9fc;
    padding: 20px;
    border-left: 1px solid #e0e0e0;
    overflow-y: auto;
    overflow-x: hidden;
    flex-shrink: 0;
    box-sizing: border-box;
}

/* Estilos para la información de posición de imagen en filtros */
.image-position-info {
    text-align: center;
    padding: 10px;
    background-color: #e8f4f8;
    border-top: 1px solid #d0e8f0;
    font-size: 14px;
    color: #1673BA;
    font-weight: 500;
}

.image-position-info span {
    font-weight: bold;
    font-size: 16px;
}

/* Estilos para la tabla de datos del flujo de filtros */
.filter-data-table-container {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.filter-data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 13px;
}

.filter-data-table thead {
    background-color: #1673BA;
    color: white;
}

.filter-data-table th {
    padding: 10px;
    text-align: left;
    font-weight: bold;
    border: 1px solid #0d5a8a;
}

.filter-data-table td {
    padding: 8px 10px;
    border: 1px solid #e0e0e0;
    background-color: white;
}

.filter-data-table td[tabindex="0"] {
    cursor: default;
    outline: none;
}

.filter-data-table td[tabindex="0"]:focus {
    outline: 2px solid #1673BA;
    outline-offset: -2px;
    background-color: #f0f7fc;
    z-index: 1;
    position: relative;
}

.filter-data-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.filter-data-table tbody tr:hover {
    background-color: #f0f7fc;
}

.info-title {
    font-size: 20px;
    font-weight: bold;
    color: #1673BA;
    margin-bottom: 18px;
    white-space: nowrap;
}

.info-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.info-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.field-label {
    font-weight: bold;
    color: #1673BA;
    font-size: 14px;
    white-space: nowrap;
}

.field-value {
    color: #2c3e50;
    font-size: 14px;
    font-weight: 500;
    padding: 4px 0;
    min-height: 36px;
    display: flex;
    align-items: center;
    word-wrap: break-word;
    width: 100%;
}

.viewer-footer {
    padding: 16px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
    min-height: 60px;
    max-height: 60px;
    overflow: visible;
    gap: 12px;
}

/* Paginated Viewer */
.paginated-viewer-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    max-height: 100vh;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.paginated-viewer-content {
    display: flex;
    flex: 1;
    min-height: 0;
    max-height: 100%;
    gap: 0;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.nav-btn {
    width: 60px;
    min-width: 60px;
    max-width: 60px;
    height: 60px;
    min-height: 60px;
    max-height: 60px;
    background-color: rgb(31, 149, 239);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 24px;
    cursor: pointer;
    transition: background-color 0.2s;
    flex-shrink: 0;
    box-sizing: border-box;
    margin-top: 25px;
}

.nav-btn:hover:not(:disabled) {
    background-color: rgb(21, 119, 199);
}

.nav-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.paginated-viewer-footer {
    padding: 16px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
    min-height: 60px;
    max-height: 60px;
    overflow: visible;
    gap: 12px;
}

.image-counter {
    font-size: 14px;
    font-weight: bold;
    color: #2c3e50;
    white-space: nowrap;
}

/* Buttons */
.btn-primary {
    background-color: rgb(31, 149, 239);
    padding: 10px 18px;
    color: white;
    border: none;
    border-radius: 18px;
    font-weight: bold;
    letter-spacing: 0.3px;
    cursor: pointer;
    box-shadow: 0px 3px 8px rgba(0, 87, 174, 0.25);
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    box-sizing: border-box;
    min-width: fit-content;
    width: auto;
    height: auto;
    min-height: 38px;
    max-height: 38px;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.btn-primary:hover {
    background-color: rgb(21, 119, 199);
    box-shadow: 0px 4px 10px rgba(0, 87, 174, 0.35);
    transform: none;
}

.btn-primary:active {
    background-color: rgb(11, 89, 159);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.25);
    transform: none;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
    width: 100%;
}

.error {
    text-align: center;
    padding: 40px;
    color: #e74c3c;
    width: 100%;
}

/* Toggle Switch para Color/BN */
.toggle-field {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    width: 100%;
    margin-top: 4px;
}

.toggle-switch input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    background-color: #ccc;
    border-radius: 24px;
    transition: background-color 0.3s;
}

.toggle-slider:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.toggle-switch input[type="checkbox"]:checked + .toggle-slider {
    background-color: #2196F3;
}

.toggle-switch input[type="checkbox"]:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-label-text {
    font-size: 14px;
    color: #2c3e50;
    font-weight: 500;
}

/* Media queries para zoom extremo */
@media (max-width: 900px) {
    .app-container {
        min-width: 800px;
    }
    
    .info-panel {
        min-width: 200px;
        max-width: 300px;
        width: 250px;
    }
}

/* Media query para pantallas angostas - ajustar proporciones del visor */
@media (max-width: 1600px) {
    /* Visor normal */
    .image-viewer {
        flex: 7;
        min-width: 0;
    }
    
    .info-panel {
        flex: 3;
        min-width: 200px;
        max-width: 350px;
        width: 300px;
    }
    
    /* Visor de filtros */
    .filters-image-viewer {
        flex: 7;
        max-width: 72%;
    }
    
    .filters-info-panel {
        flex: 0 0 350px;
        min-width: 300px;
        max-width: 400px;
        width: 350px;
    }
}

/* Media query para pantallas muy angostas (pantalla partida) */
@media (max-width: 1200px) {
    /* Visor normal */
    .image-viewer {
        flex: 7.5;
        min-width: 0;
    }
    
    .info-panel {
        flex: 2.5;
        min-width: 180px;
        max-width: 300px;
        width: auto;
    }
    
    /* Visor de filtros */
    .filters-image-viewer {
        flex: 7.5;
        max-width: 75%;
    }
    
    .filters-info-panel {
        flex: 0 0 300px;
        min-width: 250px;
        max-width: 350px;
        width: auto;
    }
}

/* Media query para pantallas extremadamente angostas */
@media (max-width: 1000px) {
    /* Visor normal */
    .image-viewer {
        flex: 7.5;
        min-width: 0;
    }
    
    .info-panel {
        flex: 2.5;
        min-width: 160px;
        max-width: 280px;
        width: auto;
    }
    
    /* Visor de filtros */
    .filters-image-viewer {
        flex: 7.5;
        max-width: 75%;
    }
    
    .filters-info-panel {
        flex: 0 0 280px;
        min-width: 220px;
        max-width: 320px;
        width: auto;
    }
}

/* Media query para pantallas pequeñas - Layout vertical con botones flotantes */
@media (max-width: 800px) {
    /* Visor normal - Layout vertical */
    .viewer-content {
        flex-direction: column;
        gap: 0;
        align-items: stretch;
    }
    
    /* Visor paginado normal - Layout vertical */
    .paginated-viewer-content {
        flex-direction: column;
        gap: 0;
        padding: 0;
        align-items: stretch;
    }
    
    .image-viewer {
        flex: 1;
        width: 100%;
        max-width: 100%;
        min-height: 50vh;
        max-height: 60vh;
        padding: 10px;
        order: 1;
    }
    
    .image-wrapper img,
    .image-wrapper .image-canvas {
        max-height: calc(60vh - 40px);
    }
    
    .info-panel {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
        min-width: 100%;
        border-left: none;
        border-top: 1px solid #e0e0e0;
        order: 2;
        max-height: 40vh;
        overflow-y: auto;
    }
    
    /* Botones de navegación flotantes y transparentes */
    .nav-btn {
        position: fixed;
        z-index: 1000;
        margin-top: 0;
        opacity: 0.4;
        transition: opacity 0.3s ease, background-color 0.2s, transform 0.2s;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }
    
    .nav-btn:hover:not(:disabled) {
        opacity: 1;
        background-color: rgb(21, 119, 199);
        transform: translateY(-50%) scale(1.05);
    }
    
    .nav-btn:active:not(:disabled) {
        opacity: 1;
        transform: translateY(-50%) scale(0.95);
    }
    
    .nav-btn:disabled {
        opacity: 0.2;
        cursor: not-allowed;
    }
    
    #btnPrev {
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    #btnNext {
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    /* Visor de filtros - Layout vertical para otras vistas */
    .filters-viewer-content {
        flex-direction: column;
        gap: 0;
        padding: 0;
        align-items: stretch;
    }
    
    .filters-image-viewer {
        flex: 1;
        width: 100%;
        max-width: 100%;
        min-height: 50vh;
        max-height: 60vh;
        padding: 10px;
        order: 1;
    }
    
    .filters-image-wrapper img,
    .filters-image-wrapper .image-canvas {
        max-height: calc(60vh - 40px);
    }
    
    .filters-info-panel {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
        min-width: 100%;
        height: auto;
        max-height: 40vh;
        border-radius: 0;
        box-shadow: none;
        border-top: 1px solid #e0e0e0;
        order: 2;
        overflow-y: auto;
    }
    
    /* Botones de navegación de filtros flotantes y transparentes */
    .filters-nav-btn {
        position: fixed;
        z-index: 1000;
        margin-top: 0;
        opacity: 0.4;
        transition: opacity 0.3s ease, background-color 0.2s, transform 0.2s;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }
    
    .filters-nav-btn:hover:not(:disabled) {
        opacity: 1;
        background-color: rgb(21, 119, 199);
        transform: translateY(-50%) scale(1.05);
    }
    
    .filters-nav-btn:active:not(:disabled) {
        opacity: 1;
        transform: translateY(-50%) scale(0.95);
    }
    
    .filters-nav-btn:disabled {
        opacity: 0.2;
        cursor: not-allowed;
    }
    
    #filtersBtnPrev {
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    #filtersBtnNext {
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    /* Ajustar el contenedor de la tabla para que se vea bien en vertical */
    .filters-data-table-container,
    .filter-data-table-container {
        margin-top: 15px;
        padding-top: 15px;
        margin-bottom: 50px;
        padding-bottom: 20px;
    }
    
    /* Asegurar que las tablas se vean bien en pantallas pequeñas */
    .filters-data-table,
    .filter-data-table {
        font-size: 12px;
    }
    
    .filters-data-table th,
    .filters-data-table td,
    .filter-data-table th,
    .filter-data-table td {
        padding: 6px 8px;
    }
    
    /* Estilos específicos para la vista de detalle de imagen de filtros */
    /* Ocultar top-bar cuando filtersPaginatedViewerPage está visible (no tiene clase hidden) */
    body:has(#filtersPaginatedViewerPage:not(.hidden)) .top-bar {
        display: none !important;
        height: 0 !important;
        min-height: 0 !important;
        max-height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        overflow: hidden !important;
    }
    
    /* Ocultar menú hamburguesa cuando filtersPaginatedViewerPage está visible */
    body:has(#filtersPaginatedViewerPage:not(.hidden)) .toggle-menu-btn {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Layout horizontal para vista de detalle - imagen y tabla en paralelo */
    #filtersPaginatedViewerPage:not(.hidden) .filters-viewer-content {
        flex-direction: row !important;
        gap: 15px !important;
        padding: 0 !important;
        align-items: flex-start !important;
        padding-top: 0 !important;
    }
    
    /* Ajustar el contenedor para que el footer sea visible */
    #filtersPaginatedViewerPage:not(.hidden) .filters-viewer-container {
        padding-top: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: calc(100vh - 60px) !important;
        height: auto !important;
    }
    
    /* Ajustar el contenido para que deje espacio al footer */
    #filtersPaginatedViewerPage:not(.hidden) .filters-viewer-content {
        flex-direction: row !important;
        gap: 15px !important;
        padding: 0 !important;
        align-items: flex-start !important;
        padding-top: 0 !important;
        max-height: calc(100vh - 60px) !important;
        height: calc(100vh - 60px) !important;
    }
    
    /* Imagen ocupa el espacio restante sin superponerse con el footer */
    #filtersPaginatedViewerPage:not(.hidden) .filters-image-viewer {
        flex: 1 1 auto !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        min-height: calc(100vh - 60px) !important;
        max-height: calc(100vh - 60px) !important;
        padding: 5px !important;
        padding-top: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        order: 1 !important;
        box-sizing: border-box !important;
        position: relative !important;
    }
    
    /* Maximizar el espacio de la imagen con margen respecto al footer */
    #filtersPaginatedViewerPage:not(.hidden) .filters-image-wrapper {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: calc(100% - 10px) !important;
        margin-bottom: 10px !important;
        box-sizing: border-box !important;
    }
    
    #filtersPaginatedViewerPage:not(.hidden) .filters-image-wrapper img,
    #filtersPaginatedViewerPage:not(.hidden) .filters-image-wrapper .image-canvas {
        /* max-width: 100% !important; */
        max-height: calc(100vh - 100px) !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
    }
    
    /* Botón de expandir/contraer en la esquina superior del contenedor de imagen */
    /* Ocultar por defecto fuera de esta mediaquery */
    .image-expand-toggle {
        display: none;
    }
    
    #filtersPaginatedViewerPage:not(.hidden) .filters-image-wrapper .image-expand-toggle {
        position: absolute;
        top: 5px;
        right: 5px;
        z-index: 1001;
        background: rgba(128, 128, 128, 0.7);
        border: 1px solid rgba(0, 0, 0, 0.2);
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
        padding: 0;
        outline: none;
        -webkit-tap-highlight-color: transparent;
    }
    
    #filtersPaginatedViewerPage:not(.hidden) .filters-image-wrapper .image-expand-toggle:hover {
        background: rgba(128, 128, 128, 0.9);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
        transform: scale(1.1);
    }
    
    #filtersPaginatedViewerPage:not(.hidden) .filters-image-wrapper .image-expand-toggle:focus {
        outline: none;
        border: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    #filtersPaginatedViewerPage:not(.hidden) .filters-image-wrapper .image-expand-toggle:focus-visible {
        outline: none;
        border: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    #filtersPaginatedViewerPage:not(.hidden) .filters-image-wrapper .image-expand-toggle:active {
        outline: none;
        border: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    #filtersPaginatedViewerPage:not(.hidden) .filters-image-wrapper .image-expand-toggle img {
        width: 24px;
        height: 24px;
        display: block;
    }
    
    /* Overlay negro transparente */
    .image-expand-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.85);
        z-index: 9998;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .image-expand-overlay.active {
        display: block;
        opacity: 1;
    }
    
    /* Estado expandido del filters-image-viewer */
    #filtersPaginatedViewerPage:not(.hidden) .filters-image-viewer.expanded {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        min-height: 100vh !important;
        z-index: 9999 !important;
        padding: 20px !important;
        margin: 0 !important;
        border-radius: 0 !important;
        background-color: transparent !important;
    }
    
    #filtersPaginatedViewerPage:not(.hidden) .filters-image-viewer.expanded .filters-image-wrapper {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
    }
    
    #filtersPaginatedViewerPage:not(.hidden) .filters-image-viewer.expanded .filters-image-wrapper img,
    #filtersPaginatedViewerPage:not(.hidden) .filters-image-viewer.expanded .filters-image-wrapper .image-canvas {
        max-width: 100% !important;
        max-height: 100% !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
    }
    
    /* Asegurar que el botón esté visible cuando está expandido */
    #filtersPaginatedViewerPage:not(.hidden) .filters-image-viewer.expanded .filters-image-wrapper .image-expand-toggle {
        z-index: 10000 !important;
    }
    
    /* Tabla al lado de la imagen con ancho según contenido */
    #filtersPaginatedViewerPage:not(.hidden) .filters-info-panel {
        flex: 0 0 auto !important;
        width: auto !important;
        max-width: none !important;
        min-width: auto !important;
        height: calc(100vh - 60px) !important;
        max-height: calc(100vh - 60px) !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
        border: 1px solid rgba(0, 0, 0, 0.1) !important;
        border-top: 1px solid #e0e0e0 !important;
        order: 2 !important;
        overflow-y: auto !important;
        background-color: rgba(255, 255, 255, 0.98) !important;
        padding: 15px !important;
        flex-shrink: 0 !important;
    }
    
    /* Asegurar que el footer sea visible */
    #filtersPaginatedViewerPage:not(.hidden) .filters-viewer-footer {
        position: relative !important;
        z-index: 10 !important;
        flex-shrink: 0 !important;
    }
    
    /* Estilos para el título "Datos del Cuadernillo" */
    #filtersPaginatedViewerPage:not(.hidden) .filters-info-title {
        font-size: 16px !important;
    }
    
    /* Estilos para la tabla */
    #filtersPaginatedViewerPage:not(.hidden) .filters-data-table {
        width: auto !important;
    }
    
    /* Asegurar que el contenedor de la tabla tenga espacio suficiente para no perder datos */
    #filtersPaginatedViewerPage:not(.hidden) .filters-data-table-container {
        margin-bottom: 50px !important;
        padding-bottom: 20px !important;
    }
    
}

/* Filters Page */
.filters-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 40px;
    box-sizing: border-box;
}

.filters-title {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: left;
}

.filters-panel {
    background-color: white;
    border-radius: 0;
    padding: 16px 20px;
    box-shadow: none;
    border: 1px solid #e0e0e0;
    box-sizing: border-box;
    margin-bottom: 20px;
}

.filters-header {
    font-size: 16px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.filters-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 0.7fr;
    gap: 10px 8px;
    margin-bottom: 16px;
    row-gap: 12px;
}

/* Ajustar los últimos 4 campos para que ocupen 4 columnas en la segunda fila */
.filters-grid .filter-field:nth-child(6) {
    grid-column: 1;
}

.filters-grid .filter-field:nth-child(7) {
    grid-column: 2;
}

.filters-grid .filter-field:nth-child(8) {
    grid-column: 3;
    max-width: 100px;
}

.filters-grid .filter-field:nth-child(9) {
    grid-column: 4;
    max-width: 100px;
}

/* Reducir el ancho de Estudiante, Modelo y Hoja */
.filters-grid .filter-field:nth-child(5) {
    max-width: 140px;
}

.filters-grid .filter-field:nth-child(8) {
    max-width: 100px;
}

.filters-grid .filter-field:nth-child(9) {
    max-width: 100px;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-field label {
    font-weight: normal;
    color: #2c3e50;
    font-size: 12px;
    margin-bottom: 2px;
}

.filter-input,
.filter-select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #d0d0d0;
    border-radius: 3px;
    font-size: 13px;
    color: #2c3e50;
    background-color: white;
    box-sizing: border-box;
    transition: border-color 0.2s;
    height: 32px;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #1673BA;
}

.filter-input.input-error {
    border-color: #e74c3c !important;
    border-width: 2px !important;
}

.filter-input.input-error:focus {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2) !important;
}

.error-message {
    color: #e74c3c;
    font-size: 11px;
    margin-top: 4px;
    line-height: 1.3;
    font-weight: 500;
}

.error-message.hidden {
    display: none;
}

.filter-select {
    cursor: pointer;
}

.filters-footer {
    display: flex;
    justify-content: flex-start;
    padding-top: 8px;
    border-top: none;
    margin-top: 8px;
}

.btn-filter {
    background-color: rgb(22, 115, 186);
    color: white;
    border: none;
    border-radius: 3px;
    padding: 8px 20px;
    font-weight: bold;
    font-size: 13px;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
    box-shadow: none;
    min-width: 90px;
}

.btn-filter:hover {
    background-color: rgb(21, 119, 199);
}

.btn-filter:active {
    background-color: rgb(0, 87, 174);
}

.filters-back-wrapper {
    display: flex;
    justify-content: flex-start;
    margin-top: 10px;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 32px;
    font-weight: bold;
    font-size: 16px;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-secondary:active {
    background-color: #6c7a7b;
}

/* Prevenir deformaciones con zoom */
@media (min-resolution: 2dppx) {
    .app-container {
        transform: scale(1);
    }
}

/* Ocultar botón de expandir/contraer cuando la pantalla supera 800px */
@media (min-width: 801px) {
    .image-expand-toggle,
    #filtersPaginatedViewerPage:not(.hidden) .filters-image-wrapper .image-expand-toggle {
        display: none !important;
    }
}

/* Responsive para filtros */
@media (max-width: 1024px) {
    .filters-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* ============================================
   ESTILOS ÚNICOS PARA EL VISOR DE FILTROS
   (No reutiliza estilos del otro flujo)
   ============================================ */

/* Contenedor principal del visor de filtros */
.filters-viewer-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    max-height: 100vh;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Contenido del visor de filtros */
.filters-viewer-content {
    display: flex;
    flex: 1;
    min-height: 0;
    max-height: 100%;
    gap: 20px;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    padding: 20px;
}

/* Botones de navegación del visor de filtros */
.filters-nav-btn {
    width: 60px;
    min-width: 60px;
    max-width: 60px;
    height: 60px;
    min-height: 60px;
    max-height: 60px;
    background-color: rgb(31, 149, 239);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 24px;
    cursor: pointer;
    transition: background-color 0.2s;
    flex-shrink: 0;
    box-sizing: border-box;
    margin-top: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filters-nav-btn:hover:not(:disabled) {
    background-color: rgb(21, 119, 199);
}

.filters-nav-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

/* Visor de imagen de filtros */
.filters-image-viewer {
    flex: 3.5;
    min-width: 0;
    max-width: 75%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow: auto;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    box-sizing: border-box;
}

.filters-image-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-sizing: border-box;
    position: relative;
    touch-action: none;
    cursor: default;
}

.filters-image-wrapper.is-zoomed {
    cursor: grab;
}

.filters-image-wrapper.is-zoomed.is-dragging {
    cursor: grabbing;
}

.filters-image-wrapper img,
.filters-image-wrapper .image-canvas {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.15s ease-out;
    will-change: transform;
}

.filters-image-wrapper .image-canvas {
    display: none;
}

/* Panel de información de filtros */
.filters-info-panel {
    flex: 2.5;
    min-width: 300px;
    max-width: 450px;
    width: auto;
    height: 100%;
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filters-info-title {
    font-size: 20px;
    font-weight: bold;
    color: #1673BA;
    margin-bottom: 18px;
    white-space: nowrap;
}

/* Ajuste para cuando solo hay tabla (sin sección de información) */
.filters-info-panel:has(.filters-data-table-container:first-child) .filters-data-table-container {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    margin-bottom: 50px;
    padding-bottom: 20px;
}

.filters-info-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.filters-info-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.filters-field-label {
    font-weight: bold;
    color: #1673BA;
    font-size: 14px;
    white-space: nowrap;
}

.filters-field-value {
    color: #2c3e50;
    font-size: 14px;
    font-weight: 500;
    padding: 4px 0;
    min-height: 36px;
    display: flex;
    align-items: center;
    word-wrap: break-word;
    width: 100%;
}

/* Toggle switch específico para filtros */
.filters-toggle-field {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.filters-toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    width: 100%;
    margin-top: 4px;
}

.filters-toggle-switch input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.filters-toggle-slider {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    background-color: #ccc;
    border-radius: 24px;
    transition: background-color 0.3s;
}

.filters-toggle-slider:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.filters-toggle-switch input[type="checkbox"]:checked + .filters-toggle-slider {
    background-color: #2196F3;
}

.filters-toggle-switch input[type="checkbox"]:checked + .filters-toggle-slider:before {
    transform: translateX(26px);
}

.filters-toggle-label-text {
    font-size: 14px;
    color: #2c3e50;
    font-weight: 500;
}

/* Contenedor de tabla de datos de filtros */
.filters-data-table-container {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    width: 100%;
}

/* Tabla de datos de filtros */
.filters-data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 13px;
}

.filters-data-table thead {
    background-color: #1673BA;
    color: white;
}

.filters-data-table th {
    padding: 10px;
    text-align: left;
    font-weight: bold;
    border: 1px solid #0d5a8a;
}

.filters-data-table td {
    padding: 8px 10px;
    border: 1px solid #e0e0e0;
    background-color: white;
}

.filters-data-table td[tabindex="0"] {
    cursor: default;
    outline: none;
}

.filters-data-table td[tabindex="0"]:focus {
    outline: 2px solid #1673BA;
    outline-offset: -2px;
    background-color: #f0f7fc;
    z-index: 1;
    position: relative;
}

.filters-data-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.filters-data-table tbody tr:hover {
    background-color: #f0f7fc;
}

/* Footer del visor de filtros */
.filters-viewer-footer {
    padding: 16px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
    min-height: 60px;
    max-height: 60px;
    overflow: visible;
    gap: 12px;
}

.filters-footer-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.filters-zoom-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.zoom-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #1673BA;
    background-color: white;
    color: #1673BA;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.zoom-icon-btn:hover,
.zoom-icon-btn:focus-visible {
    background-color: #1673BA;
    color: white;
}

.zoom-preset-select {
    width: 110px;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #1673BA;
    background-color: white;
    color: #1673BA;
    font-weight: 600;
    cursor: pointer;
    text-align: right;
}

/* Contador de imágenes de filtros */
.filters-image-counter {
    font-size: 14px;
    font-weight: bold;
    color: #2c3e50;
    white-space: nowrap;
}
