/* =========================
   Variables (compat + nuevas)
   ========================= */
:root{
  /* Base previas */
  --bg:#f6f8fb; --card:#fff; --text:#0f172a; --muted:#64748b;
  --brand:#FF6C00; --accent:#2563eb; --ok:#16a34a; --warn:#d97706; --border:#e6eaf1;
  --radius:16px; --shadow:0 10px 30px rgba(2,6,23,.08);

  /* Nuevas */
  --primary:#2563eb;
  --primary-dark:#1e40af;
  --success:#10b981;
  --warning:#f59e0b;
  --danger:#ef4444;

  --gray-50:#f9fafb;
  --gray-100:#f3f4f6;
  --gray-200:#e5e7eb;
  --gray-300:#d1d5db;
  --gray-400:#9ca3af;
  --gray-500:#6b7280;
  --gray-600:#4b5563;
  --gray-700:#374151;
  --gray-800:#1f2937;
  --gray-900:#111827;

  --radius-sm:.5rem;
  --radius-lg:.75rem;
  --shadow-sm:0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md:0 4px 6px -1px rgb(0 0 0 / 0.1),0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg:0 10px 15px -3px rgb(0 0 0 / 0.1),0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl:0 20px 25px -5px rgb(0 0 0 / 0.1),0 8px 10px -6px rgb(0 0 0 / 0.1);
}

*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text);font:15px/1.5 Inter,system-ui,Arial}

/* =========
   Utilidades
   ========= */
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}
.ellip{max-width:340px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.file-link{text-decoration:none}
body.no-scroll{overflow:hidden}

/* ==============
   Layout heredado
   ============== */
.wrap{width:min(1100px,92%);margin:0 auto}
.topbar{position:sticky;top:0;background:linear-gradient(90deg,#ff7a1a,#ff9a3d);color:#fff;box-shadow:var(--shadow);z-index:5}
.topbar .wrap{display:flex;align-items:center;justify-content:space-between;padding:12px 0}
.brand{display:flex;gap:.8rem;align-items:center}
.logo{width:42px;height:42px;border-radius:12px;background:#fff1;border:1px solid #fff4;display:grid;place-items:center;font-weight:900}
.brand strong{display:block;margin-top:2px}
.brand .sub{font-size:.8rem;opacity:.9}
.nav a{color:#fff;text-decoration:none;font-weight:700;margin-left:14px;opacity:.95}
.nav a:hover{opacity:1}
.card{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);padding:18px;margin:16px 0}
.card-head h1{margin:0 0 2px}
.muted{color:var(--muted)}
.grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}
@media (max-width:940px){.grid{grid-template-columns:1fr}}
.formcol label{display:block;font-weight:700;margin:.6rem 0 .25rem}
input[type="text"],input[type="date"],select,input[type="file"]{width:100%;border:1px solid var(--border);border-radius:12px;padding:10px 12px;background:#fff}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.hint{color:var(--muted);font-size:.9rem;margin-top:.3rem}
.actions{display:flex;gap:10px;margin-top:14px}
.btn{border:1px solid var(--border);border-radius:12px;padding:10px 14px;font-weight:800;background:#fff;cursor:pointer}
.btn.primary{background:linear-gradient(90deg,var(--brand),#ff9a3d);color:#fff;border-color:transparent}
.btn.ghost{background:#fff}
.flashes{margin:12px 0}
.flash{padding:10px 12px;border-radius:10px;border:1px solid var(--border);background:#fff}
.flash.ok{border-color:#b7f7c2;background:#ecfdf5}
.flash.error{border-color:#ffd6ae;background:#fff7ed}

/* ==========================
   Tabla simple (heredada)
   ========================== */
.table{border:1px solid var(--border);border-radius:14px;overflow:hidden}
.t-head,.t-row{display:grid;grid-template-columns:60px 1.2fr .9fr 1.2fr 1fr .8fr 1fr 1.1fr}
.t-head{background:#f8fafc;font-weight:900}
.t-head>div,.t-row>div{padding:10px 12px;border-bottom:1px solid #eef2f7}
.badge{display:inline-flex;align-items:center;padding:3px 8px;border-radius:999px;font-weight:800;font-size:.8rem}
.badge.ok{background:#ecfdf5;color:#065f46;border:1px solid #a7f3d0}
.badge.warn{background:#fff7ed;color:#b45309;border:1px solid #fde68a}
.footer{margin:28px 0;color:var(--muted);text-align:center}

/* Tabla responsive bonita (heredada) */
.table-wrap{width:100%;overflow:auto}
.tbl{width:100%;border-collapse:separate;border-spacing:0}
.tbl th,.tbl td{padding:12px 14px;border-bottom:1px solid var(--border,#e6eaf0);vertical-align:top}
.tbl thead th{background:#f8fafc;font-weight:800;color:#0f172a;position:sticky;top:0;z-index:1}
.file-pill{display:inline-block;max-width:420px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border:1px solid var(--border,#e6eaf0);padding:6px 10px;border-radius:10px;background:#fff}
.badge-ok{background:#eafff3;color:#067647;padding:6px 10px;border-radius:999px;font-weight:800;border:1px solid #b7f0cd}
.badge-bad{background:#fff1f1;color:#b42318;padding:6px 10px;border-radius:999px;font-weight:800;border:1px solid #ffcccc}
.table-tools{display:flex;justify-content:flex-end;margin-bottom:10px}
.search{border:1px solid var(--border,#e6eaf0);padding:10px 12px;border-radius:10px;min-width:280px}
.chip{display:inline-flex;align-items:center;gap:.35rem;padding:.15rem .5rem;border-radius:999px;font-size:.8rem;border:1px solid #f3c0c0;background:#fff1f1;color:#b42318;margin-right:.35rem}
.chip-green{border-color:#b7f0cd;background:#eafff3;color:#067647}
@media (max-width:900px){.hide-sm{display:none}.file-pill{max-width:240px}}

/* ======================================
   NUEVO UI: Header, Toolbar, KPIs, Tabla
   ====================================== */
.main-header{background:#fff;border-bottom:1px solid var(--gray-200);padding:1.5rem 2rem;box-shadow:var(--shadow-sm)}
.header-content{max-width:1800px;margin:0 auto;display:flex;justify-content:space-between;align-items:center;gap:2rem}
.header-left{display:flex;flex-direction:column;gap:.25rem}
.header-title{font-size:1.75rem;font-weight:700;color:var(--gray-900);display:flex;align-items:center;gap:.75rem}
.header-icon{width:32px;height:32px;color:var(--primary)}
.header-subtitle{color:var(--gray-500);font-size:.95rem}

.stats-group{display:flex;gap:1rem}
.stat-card{background:#fff;border:1px solid var(--gray-200);border-radius:var(--radius-lg);padding:1rem 1.5rem;min-width:120px;text-align:center}
.stat-card.success{border-color:var(--success);background:linear-gradient(135deg,#fff,#f0fdf4)}
.stat-card.warning{border-color:var(--warning);background:linear-gradient(135deg,#fff,#fffbeb)}
.stat-card.danger{border-color:var(--danger);background:linear-gradient(135deg,#fff,#fef2f2)}
.stat-value{font-size:1.875rem;font-weight:700;color:var(--gray-900);line-height:1}
.stat-card.success .stat-value{color:var(--success)}
.stat-card.warning .stat-value{color:var(--warning)}
.stat-card.danger .stat-value{color:var(--danger)}
.stat-label{font-size:.75rem;color:var(--gray-500);margin-top:.25rem;text-transform:uppercase;letter-spacing:.05em}

.toolbar{background:#fff;padding:1rem 2rem;border-bottom:1px solid var(--gray-200)}
.toolbar-content{max-width:1800px;margin:0 auto;display:flex;justify-content:space-between;align-items:center;gap:2rem;flex-wrap:wrap}
.toolbar-left{display:flex;gap:1rem;flex:1;align-items:center}
.search-box{position:relative;flex:1;max-width:400px}
.search-icon{position:absolute;left:1rem;top:50%;transform:translateY(-50%);width:20px;height:20px;color:var(--gray-400);pointer-events:none}
.search-input{width:100%;padding:.625rem 1rem .625rem 2.75rem;border:1px solid var(--gray-300);border-radius:var(--radius-sm);font-size:.875rem;transition:all .2s}
.search-input:focus{outline:none;border-color:var(--primary);box-shadow:0 0 0 3px rgb(37 99 235 / .1)}
.search-results{position:absolute;top:calc(100% + .25rem);left:0;right:0;background:#fff;border:1px solid var(--gray-200);border-radius:var(--radius-sm);box-shadow:var(--shadow-lg);max-height:300px;overflow-y:auto;display:none;z-index:100}
.filter-group{display:flex;gap:.5rem}
.filter-select,.filter-date{padding:.625rem 1rem;border:1px solid var(--gray-300);border-radius:var(--radius-sm);font-size:.875rem;background:#fff;cursor:pointer;transition:all .2s}
.filter-select:hover,.filter-date:hover{border-color:var(--gray-400)}
.filter-select:focus,.filter-date:focus{outline:none;border-color:var(--primary);box-shadow:0 0 0 3px rgb(37 99 235 / .1)}
.toolbar-right{display:flex;gap:.5rem}
.btn-action{display:flex;align-items:center;gap:.5rem;padding:.625rem 1rem;border:1px solid var(--gray-300);background:#fff;border-radius:var(--radius-sm);font-size:.875rem;font-weight:500;color:var(--gray-700);cursor:pointer;transition:all .2s}
.btn-action svg{width:18px;height:18px}
.btn-action:hover{background:var(--gray-50);border-color:var(--gray-400)}
.btn-action.export{color:var(--primary);border-color:var(--primary)}
.btn-action.export:hover{background:var(--primary);color:#fff}

.data-section{max-width:1800px;margin:2rem auto;padding:0 2rem}

/* Contenedor: preparado para scroll horizontal real */
.table-container{background:#fff;border-radius:var(--radius-lg);box-shadow:var(--shadow-md);overflow:visible}
.table-container.h-scroll{overflow-x:auto;overflow-y:visible;-webkit-overflow-scrolling:touch}
.table-container.h-scroll::-webkit-scrollbar{height:10px}
.table-container.h-scroll::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:6px}
.table-container.h-scroll::-webkit-scrollbar-track{background:#f1f5f9}

.data-table{width:100%;border-collapse:collapse;min-width:1900px;table-layout:auto}
.data-table thead{background:var(--gray-50);border-bottom:2px solid var(--gray-200)}
.data-table th{padding:1rem;text-align:left;font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--gray-600);white-space:nowrap}
.data-table td{padding:1rem;font-size:.875rem;color:var(--gray-700);white-space:nowrap}
.sticky-head thead th{position:sticky;top:0;background:#f8fafc;z-index:2}

.sortable{cursor:pointer;user-select:none;position:relative}
.sortable:hover{color:var(--gray-900)}
.sort-icon{width:14px;height:14px;display:inline-block;margin-left:.25rem;vertical-align:middle;opacity:.5}
.sortable:hover .sort-icon{opacity:1}

.data-row{border-bottom:1px solid var(--gray-100);transition:background .15s}
.data-row:hover{background:var(--gray-50)}
.checkbox{width:18px;height:18px;cursor:pointer}

/* Anchos mínimos por columna (garantiza scroll horizontal) */
.th-check,.td-check{min-width:52px}
.th-status,.td-status{min-width:160px}
.th-file,.td-file{min-width:420px}
.th-type,.td-type{min-width:140px}
.td-company{min-width:220px}
.td-branch{min-width:220px}
.td-region{min-width:260px}
.td-dates{min-width:230px}
.td-validation{min-width:280px}
.th-actions,.td-actions{min-width:180px}

/* Estado */
.status-indicator{display:inline-flex;align-items:center;gap:.5rem;padding:.375rem .75rem;border-radius:999px;font-size:.75rem;font-weight:500}
.status-dot{width:8px;height:8px;border-radius:50%;animation:pulse 2s infinite}
.status-valid{background:#f0fdf4;color:var(--success)}
.status-valid .status-dot{background:var(--success)}
.status-warning{background:#fffbeb;color:var(--warning)}
.status-warning .status-dot{background:var(--warning)}
.status-error{background:#fef2f2;color:var(--danger)}
.status-error .status-dot{background:var(--danger)}
.status-pending{background:var(--gray-100);color:var(--gray-600)}
.status-pending .status-dot{background:var(--gray-400)}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.5}}

/* Archivo */
.file-info{display:flex;align-items:center;gap:.75rem}
.file-icon{width:32px;height:32px;color:var(--gray-400)}
.file-details{display:flex;flex-direction:column;gap:.125rem}
.file-name{color:var(--primary);text-decoration:none;font-weight:500;transition:color .2s}
.file-name:hover{color:var(--primary-dark);text-decoration:underline}
.file-meta{font-size:.75rem;color:var(--gray-500)}
.type-badge{display:inline-block;padding:.25rem .75rem;background:var(--gray-100);border-radius:var(--radius-sm);font-size:.75rem;font-weight:500;color:var(--gray-700)}
.region-info,.dates-info{display:flex;flex-direction:column;gap:.25rem}
.text-muted{font-size:.75rem;color:var(--gray-500)}
.date-item{display:flex;gap:.5rem;font-size:.8125rem}
.date-label{color:var(--gray-500);font-weight:500}
.date-value{color:var(--gray-700);font-family:'SF Mono',Monaco,'Courier New',monospace}

/* Validación */
.validation-info{display:flex;flex-direction:column;gap:.5rem}
.validation-ok{color:var(--success);font-weight:500;font-size:.8125rem}
.validation-details{display:flex;flex-direction:column;gap:.375rem}
.validation-count{color:var(--danger);font-size:.75rem;font-weight:600}
.missing-fields{display:flex;flex-wrap:wrap;gap:.25rem}
.field-chip{display:inline-block;padding:.125rem .5rem;background:var(--danger);color:#fff;border-radius:999px;font-size:.625rem;font-weight:500}
.field-more{display:inline-block;padding:.125rem .5rem;background:var(--gray-300);color:var(--gray-700);border-radius:999px;font-size:.625rem;font-weight:500}

/* Acciones */
.action-buttons{display:flex;gap:.375rem}
.btn-icon{width:32px;height:32px;display:flex;align-items:center;justify-content:center;border:1px solid var(--gray-300);background:#fff;border-radius:var(--radius-sm);cursor:pointer;transition:all .2s}
.btn-icon svg{width:16px;height:16px;color:var(--gray-600)}
.btn-icon:hover{background:var(--gray-50);border-color:var(--gray-400)}
.btn-icon.ocr:hover{background:var(--primary);border-color:var(--primary)}
.btn-icon.ocr:hover svg{color:#fff}
.btn-icon.validate:not(:disabled):hover{background:var(--success);border-color:var(--success)}
.btn-icon.validate:not(:disabled):hover svg{color:#fff}
.btn-icon.download:hover{background:var(--gray-700);border-color:var(--gray-700)}
.btn-icon.download:hover svg{color:#fff}
.btn-icon.delete:hover{background:var(--danger);border-color:var(--danger)}
.btn-icon.delete:hover svg{color:#fff}
.btn-icon:disabled{opacity:.5;cursor:not-allowed}

/* Empty state */
.empty-state{padding:4rem 2rem;text-align:center}
.empty-icon{width:64px;height:64px;margin:0 auto 1.5rem;color:var(--gray-300)}
.empty-state h3{font-size:1.25rem;color:var(--gray-900);margin-bottom:.5rem}
.empty-state p{color:var(--gray-500);margin-bottom:1.5rem}
.btn-primary{display:inline-flex;align-items:center;gap:.5rem;padding:.75rem 1.5rem;background:var(--primary);color:#fff;border:none;border-radius:var(--radius-sm);font-size:.875rem;font-weight:500;text-decoration:none;cursor:pointer;transition:all .2s}
.btn-primary:hover{background:var(--primary-dark);transform:translateY(-1px);box-shadow:var(--shadow-md)}
.btn-secondary{display:inline-flex;align-items:center;gap:.5rem;padding:.75rem 1.5rem;background:#fff;color:var(--gray-700);border:1px solid var(--gray-300);border-radius:var(--radius-sm);font-size:.875rem;font-weight:500;cursor:pointer;transition:all .2s}
.btn-secondary:hover{background:var(--gray-50);border-color:var(--gray-400)}

/* =======
   MODALES
   ======= */
.modal{position:fixed;inset:0;display:none;align-items:center;justify-content:center;z-index:9999;padding:2rem}
.modal.show{display:flex}
.modal-backdrop{position:absolute;inset:0;background:rgba(17,24,39,.75);backdrop-filter:blur(4px)}
.modal-container{position:relative;width:100%;max-width:1200px;max-height:90vh;z-index:1}
.modal-container.compact{max-width:500px}
.modal-dialog{background:#fff;border-radius:var(--radius-lg);box-shadow:var(--shadow-xl);display:flex;flex-direction:column;max-height:90vh;overflow:hidden}
.modal-header{display:flex;justify-content:space-between;align-items:center;padding:1.5rem;border-bottom:1px solid var(--gray-200);background:var(--gray-50)}
.modal-title-group{display:flex;flex-direction:column;gap:.25rem}
.modal-title{font-size:1.25rem;font-weight:600;color:var(--gray-900)}
.modal-subtitle{font-size:.875rem;color:var(--gray-500)}
.modal-close{width:32px;height:32px;display:flex;align-items:center;justify-content:center;border:1px solid var(--gray-300);background:#fff;border-radius:var(--radius-sm);cursor:pointer;transition:all .2s}
.modal-close svg{width:16px;height:16px;color:var(--gray-600)}
.modal-close:hover{background:var(--danger);border-color:var(--danger)}
.modal-close:hover svg{color:#fff}
.modal-body{padding:1.5rem;overflow-y:auto;flex:1}
.modal-footer{display:flex;justify-content:space-between;align-items:center;padding:1rem 1.5rem;border-top:1px solid var(--gray-200);background:var(--gray-50)}
.footer-info{font-size:.875rem;color:var(--gray-500)}
.footer-actions{display:flex;gap:.5rem}

/* OCR toolbar + content */
.ocr-toolbar{padding:1rem 1.5rem;border-bottom:1px solid var(--gray-200);background:#fff}
.toolbar-section{display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap}
.search-container{position:relative;flex:1;max-width:400px}
.ocr-search{width:100%;padding:.5rem 1rem .5rem 2.5rem;border:1px solid var(--gray-300);border-radius:var(--radius-sm);font-size:.875rem}
.ocr-search:focus{outline:none;border-color:var(--primary);box-shadow:0 0 0 3px rgb(37 99 235 / .1)}
.search-stats{position:absolute;right:1rem;top:50%;transform:translateY(-50%);font-size:.75rem;color:var(--gray-500);background:#fff;padding:0 .5rem}
.toolbar-actions{display:flex;gap:.375rem;align-items:center}
.nav-btn,.tool-btn{height:32px;display:flex;align-items:center;justify-content:center;padding:0 .75rem;border:1px solid var(--gray-300);background:#fff;border-radius:var(--radius-sm);cursor:pointer;transition:all .2s;font-size:.875rem;font-weight:500;color:var(--gray-700)}
.nav-btn{width:32px;padding:0}
.nav-btn svg,.tool-btn svg{width:16px;height:16px}
.tool-btn svg{margin-right:.375rem}
.nav-btn:hover,.tool-btn:hover{background:var(--gray-50);border-color:var(--gray-400)}
.tool-btn.primary{background:var(--primary);border-color:var(--primary);color:#fff}
.tool-btn.primary:hover{background:var(--primary-dark);border-color:var(--primary-dark)}
.toolbar-separator{width:1px;height:24px;background:var(--gray-300);margin:0 .25rem}
.zoom-level{font-size:.75rem;color:var(--gray-600);font-weight:500;min-width:40px;text-align:center}

/* Panel de validación dentro del modal OCR */
.validation-panel{background:var(--gray-50);border-bottom:1px solid var(--gray-200)}
.validation-header{display:flex;justify-content:space-between;align-items:center;padding:.75rem 1.5rem;cursor:pointer}
.validation-header h3{font-size:.875rem;font-weight:600;color:var(--gray-700)}
.toggle-btn{width:24px;height:24px;display:flex;align-items:center;justify-content:center;border:none;background:transparent;cursor:pointer;transition:transform .2s}
.toggle-btn svg{width:16px;height:16px;color:var(--gray-600)}
.validation-panel.collapsed .toggle-btn{transform:rotate(-90deg)}
.validation-content{padding:0 1.5rem 1rem;max-height:200px;overflow-y:auto;transition:max-height .3s}
.validation-panel.collapsed .validation-content{max-height:0;padding:0 1.5rem;overflow:hidden}
.validation-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:.5rem}
.validation-item{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;background:#fff;border:1px solid var(--gray-200);border-radius:var(--radius-sm);font-size:.8125rem;cursor:pointer;transition:all .2s}
.validation-item:hover{border-color:var(--primary);background:var(--primary);color:#fff}
.validation-item.found{background:#f0fdf4;border-color:var(--success);color:var(--success)}
.validation-item.not-found{background:#fef2f2;border-color:var(--danger);color:var(--danger)}
.validation-icon{width:16px;height:16px}

/* Texto OCR + sidebar */
.ocr-content{display:flex;flex:1;overflow:hidden}
.ocr-viewport{flex:1;display:flex;overflow:hidden;background:var(--gray-50)}
.line-numbers{width:50px;background:var(--gray-100);border-right:1px solid var(--gray-200);padding:1rem 0;font-family:'SF Mono',Monaco,'Courier New',monospace;font-size:.75rem;line-height:1.5rem;color:var(--gray-500);text-align:right;user-select:none;overflow-y:hidden}
.ocr-text{flex:1;padding:1rem 1.5rem;font-family:'SF Mono',Monaco,'Courier New',monospace;font-size:.875rem;line-height:1.5rem;color:var(--gray-800);white-space:pre-wrap;word-wrap:break-word;overflow-y:auto;margin:0;background:#fff}
.ocr-text mark{background:#fde68a;padding:.125rem .25rem;border-radius:.25rem;font-weight:500}
.ocr-text mark.current{background:var(--primary);color:#fff}
.ocr-text .highlight-date{background:#ddd6fe;padding:.125rem .25rem;border-radius:.25rem}
.ocr-text .highlight-number{background:#bfdbfe;padding:.125rem .25rem;border-radius:.25rem}
.ocr-sidebar{width:250px;background:var(--gray-50);border-left:1px solid var(--gray-200);overflow-y:auto;padding:1rem}
.sidebar-section{margin-bottom:1.5rem}
.sidebar-section h4{font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--gray-600);margin-bottom:.75rem}
.info-list{display:grid;gap:.5rem}
.info-list dt{font-size:.8125rem;color:var(--gray-500)}
.info-list dd{font-size:.875rem;font-weight:500;color:var(--gray-900);margin-left:0}
.field-stats{display:flex;flex-direction:column;gap:.5rem}
.field-stat{display:flex;justify-content:space-between;align-items:center;padding:.5rem;background:#fff;border-radius:var(--radius-sm);font-size:.8125rem}
.field-stat.found{background:#f0fdf4;color:var(--success)}
.field-stat.not-found{background:#fef2f2;color:var(--danger)}
.sidebar-btn{width:100%;display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;border:1px solid var(--gray-300);background:#fff;border-radius:var(--radius-sm);font-size:.8125rem;font-weight:500;color:var(--gray-700);cursor:pointer;transition:all .2s;margin-bottom:.5rem}
.sidebar-btn svg{width:16px;height:16px}
.sidebar-btn:hover{background:var(--primary);border-color:var(--primary);color:#fff}

/* Modal de Validación Manual */
.validation-message{margin-bottom:1rem;color:var(--gray-700)}
.missing-fields-list{background:var(--gray-50);border:1px solid var(--gray-200);border-radius:var(--radius-sm);padding:1rem;margin-bottom:1rem}
.validation-notes{width:100%;padding:.75rem;border:1px solid var(--gray-300);border-radius:var(--radius-sm);font-size:.875rem;resize:vertical}
.validation-notes:focus{outline:none;border-color:var(--primary);box-shadow:0 0 0 3px rgb(37 99 235 / .1)}

/* =================
   Responsive mínimo
   ================= */
@media (max-width:768px){
  .header-content{flex-direction:column;align-items:flex-start}
  .stats-group{width:100%;overflow-x:auto}
  .toolbar-content{flex-direction:column;align-items:stretch}
  .toolbar-left{flex-direction:column}
  .search-box{max-width:none}
  .ocr-sidebar{display:none}
  .modal-container{padding:1rem}
}