/* Pantalla del encargado (maqueta opción 1). Se carga después de /admin/admin.css: las vistas, tablas
   y diálogos reusados toman los colores de acá en los dos temas. Oscuro por defecto; claro es la otra. */

html[data-tema="oscuro"] {
  color-scheme: dark;
  --fondo: #07090c;
  --panel: #0e1217;
  --panel-2: #131820;
  --panel-solido: #10151b;
  --linea: #1f2630;
  --linea-2: #2a3340;
  --texto: #eef2f6;
  --texto-2: #9aa6b4;
  --texto-3: #7a8594;
  --verde-agua: #2dd4bf;
  --celeste: #38bdf8;
  --violeta: #a78bfa;
  --ambar: #fbbf24;
  --verde: #4ade80;
  --durazno: #fdba74;
  --anillos: #ffffff;
  --anillos-op: 1;
  --dato-fondo: rgba(14, 18, 23, 0.78);
  --boton-fondo: linear-gradient(160deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0) 55%), rgba(12, 15, 20, 0.9);
  --borde-c: 70%;
  --brillo-c: 45%;
  --sombra: 0 0 0 1px rgba(0, 0, 0, 0.4);
  --sobre-c: #0b0f14;
  --campo: #0a0e13;
  /* Variables de admin.css para las vistas reusadas */
  --page: var(--fondo);
  --surface-1: #0e1217;
  --surface-2: #161c25;
  --surface-hover: #141a23;
  --text-primary: var(--texto);
  --text-secondary: #a3afbd;
  --text-muted: #7f8a99;
  --grid: #1f2630;
  --axis: #3b4655;
  --border: #222a35;
  --border-input: #333d4a;
  --series-1: #60a5fa;
  --series-2: #fb923c;
  --accent: #2dd4bf;
  --accent-ink: #5eead4;
  --accent-wash: rgba(45, 212, 191, 0.14);
  --good: #4ade80;
  --good-ink: #86efac;
  --warning: #fbbf24;
  --warning-wash: rgba(251, 191, 36, 0.13);
  --warning-ink: #fcd34d;
  --serious: #fdba74;
  --critical: #f87171;
  --critical-ink: #fca5a5;
  --critical-wash: rgba(248, 113, 113, 0.14);
  --saman: #a78bfa;
  --pos: #60a5fa;
  --neg: #fb923c;
}

html[data-tema="claro"] {
  color-scheme: light;
  --fondo: #f3f1ec;
  --panel: #ffffff;
  --panel-2: #f2f0ea;
  --panel-solido: #ffffff;
  --linea: #dfdbcf;
  --linea-2: #cfcabc;
  --texto: #12161b;
  --texto-2: #4b5563;
  --texto-3: #69707c;
  --verde-agua: #0d9488;
  --celeste: #0284c7;
  --violeta: #7c3aed;
  --ambar: #c26d06;
  --verde: #15803d;
  --durazno: #dd6b2a;
  --anillos: #4a3a22;
  --anillos-op: 0.55;
  --dato-fondo: rgba(255, 255, 255, 0.82);
  --boton-fondo: linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.82));
  --borde-c: 75%;
  --brillo-c: 22%;
  --sombra: 0 1px 2px rgba(18, 22, 27, 0.06);
  --sobre-c: #ffffff;
  --campo: #ffffff;
  --page: var(--fondo);
  --surface-1: #ffffff;
  --surface-2: #f2f0ea;
  --surface-hover: #f7f6f2;
  --text-primary: var(--texto);
  --text-secondary: #4b5563;
  --text-muted: #69707c;
  --grid: #e6e2d8;
  --axis: #c4bfb2;
  --border: rgba(18, 22, 27, 0.12);
  --border-input: rgba(18, 22, 27, 0.24);
  --series-1: #2563eb;
  --series-2: #ea580c;
  --accent: #0f766e;
  --accent-ink: #0f766e;
  --accent-wash: #dff3ef;
  --good: #16a34a;
  --good-ink: #15803d;
  --warning: #b45309;
  --warning-wash: #fdf1d6;
  --warning-ink: #8a4b06;
  --serious: #ea580c;
  --critical: #dc2626;
  --critical-ink: #b91c1c;
  --critical-wash: #fde8e8;
  --saman: #6d28d9;
  --pos: #2563eb;
  --neg: #ea580c;
}

html[data-tema] { --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body {
  background: var(--fondo);
  color: var(--texto);
  font-family: var(--font);
  font-size: 15px;
  font-feature-settings: 'tnum' 1, 'cv11' 1;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--accent-ink); }

.fondo-anillos { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; color: var(--anillos); opacity: var(--anillos-op); z-index: 0; }
.pagina { position: relative; z-index: 1; max-width: 1640px; margin: 0 auto; min-height: 100vh; padding: 26px 48px 32px; display: flex; flex-direction: column; gap: 22px; }

/* Cabecera */
.cabecera { display: flex; align-items: center; justify-content: space-between; gap: 12px 22px; flex-wrap: wrap; }
.marca { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 22px; letter-spacing: -0.01em; color: var(--texto); text-decoration: none; }
.marca .logo svg { width: 34px; height: 34px; color: var(--verde-agua); display: block; fill: none; stroke: currentColor; stroke-width: 1.8; }
.marca .chip {
  font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--texto-2);
  border: 1px solid var(--linea); padding: 5px 10px; border-radius: 999px; background: transparent; line-height: 1.2;
}
.marca .chip.marca-copia { color: var(--ambar); border-color: color-mix(in srgb, var(--ambar) 45%, transparent); }
.der { display: flex; align-items: center; gap: 22px; color: var(--texto-2); font-size: 17px; }
.der b { color: var(--texto); font-weight: 600; }
.tema { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid var(--linea); border-radius: 999px; background: var(--panel); }
.tema button {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 0; background: none;
  font-size: 15px; color: var(--texto-3); font-weight: 500; cursor: pointer;
}
.tema button[aria-pressed="true"] { background: var(--panel-2); color: var(--texto); box-shadow: inset 0 0 0 1px var(--linea-2); }
.tema svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tema button:focus-visible, .volver.casa:focus-visible, .boton:focus-visible, .chico:focus-visible, .volver:focus-visible, .dato:focus-visible, .btn-accion:focus-visible, .btn-grande:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

svg.ic { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.vista { padding: 0; flex: 1; display: flex; flex-direction: column; min-width: 0; outline: none; }
.vista > * { min-width: 0; }

/* ---------- Inicio ---------- */
.inicio { display: flex; flex-direction: column; gap: 22px; flex: 1; }
.franja { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 16px; }
.dato {
  background: var(--dato-fondo); border: 1px solid var(--linea); border-radius: 18px; padding: 18px 22px;
  backdrop-filter: blur(4px); color: var(--texto); text-decoration: none; min-width: 0; display: block;
}
a.dato:hover { border-color: var(--linea-2); }
.dato .t { font-size: 14px; color: var(--texto-2); font-weight: 500; display: flex; align-items: center; gap: 9px; }
.dato .n { font-size: 40px; font-weight: 700; letter-spacing: -0.02em; margin-top: 6px; line-height: 1; white-space: nowrap; display: flex; align-items: baseline; gap: 10px; }
.dato .n.texto { font-size: 30px; }
.dato .n small { font-size: 20px; font-weight: 600; color: var(--texto-2); letter-spacing: 0; }
.dato .mas { font-size: 15px; font-weight: 600; color: var(--texto-2); border: 1px solid var(--linea-2); border-radius: 999px; padding: 2px 10px; letter-spacing: 0; align-self: center; }
.dato .s { font-size: 15px; color: var(--texto-2); margin-top: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vivo { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--verde); box-shadow: 0 0 0 4px color-mix(in srgb, var(--verde) 18%, transparent); }
.vivo.quieto { background: var(--texto-3); box-shadow: none; }

.grilla { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(168px, 1fr)); gap: 22px; flex: 1; }
.boton {
  --c: var(--verde-agua);
  position: relative; border-radius: 24px; padding: 28px 30px; display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
  background: var(--boton-fondo); color: var(--texto); text-decoration: none; min-width: 0;
  border: 2px solid color-mix(in srgb, var(--c) var(--borde-c), transparent);
  box-shadow: var(--sombra), 0 0 28px -6px color-mix(in srgb, var(--c) var(--brillo-c), transparent), inset 0 0 40px -20px color-mix(in srgb, var(--c) 40%, transparent);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.boton:hover { transform: translateY(-1px); box-shadow: var(--sombra), 0 0 34px -4px color-mix(in srgb, var(--c) var(--brillo-c), transparent), inset 0 0 44px -18px color-mix(in srgb, var(--c) 45%, transparent); }
.boton:active { transform: translateY(0); }
.boton > .ic { width: 52px; height: 52px; color: var(--c); stroke-width: 1.6; }
.boton h2 { margin: 0; font-size: 29px; font-weight: 650; letter-spacing: -0.015em; line-height: 1.12; }
.boton p { margin: 8px 0 0; font-size: 17px; color: var(--texto-2); }
.boton .flecha { position: absolute; right: 26px; top: 28px; width: 28px; height: 28px; color: var(--texto-3); }
.cuenta { color: var(--c); font-weight: 650; }
.pie { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.chico {
  display: inline-flex; align-items: center; gap: 10px; padding: 13px 20px; border: 1px solid var(--linea); border-radius: 14px;
  background: var(--dato-fondo); font-size: 17px; font-weight: 500; color: var(--texto); text-decoration: none; cursor: pointer; font-family: inherit;
}
.chico:hover { border-color: var(--linea-2); }
.chico .ic { width: 22px; height: 22px; color: var(--texto-2); }

/* ---------- Pantallas: Volver y título ---------- */
.volver {
  display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 22px 0 16px; border-radius: 16px;
  border: 1px solid var(--linea-2); background: var(--panel); color: var(--texto); font-size: 18px; font-weight: 600; cursor: pointer; flex: none; font-family: inherit;
}
.volver:hover { background: var(--panel-2); }
.nav-volver { display: flex; gap: 10px; flex: none; }
.volver.casa { width: 56px; padding: 0; justify-content: center; text-decoration: none; }
.volver.casa .ic { width: 26px; height: 26px; }
.volver .ic { width: 24px; height: 24px; }
.vista .crumb { display: none; }
.vista .top { justify-content: flex-start; align-items: center; gap: 14px 22px; margin-bottom: 22px; }
.vista .top > div:not(.actions) { flex: 1 1 280px; min-width: 0; }
.vista .top > .actions { margin-left: auto; gap: 10px; }
.vista .top > div.nav-volver { flex: none; }
.vista .top h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.vista .top .sub { font-size: 15px; color: var(--texto-2); margin-top: 4px; }
.vista .top .actions .btn { min-height: 48px; padding: 0 18px; border-radius: 14px; font-size: 15.5px; }
.vista .top .actions .btn.primary { min-height: 56px; padding: 0 26px; font-size: 18px; font-weight: 650; border-radius: 16px; }
.vista .top .actions .btn svg { width: 19px; height: 19px; }

/* ---------- Piezas de admin.css, a la escala del encargado ---------- */
.card { background: var(--surface-1); border-color: var(--linea); border-radius: 18px; padding: 18px 20px; }
.card h2 { font-size: 17px; }
.card .hint { font-size: 13.5px; }
.tile { border-radius: 16px; }
.tl { font-size: 13.5px; }
.tv { font-size: 30px; }
.ts { font-size: 13px; }
.btn { border-radius: 12px; padding: 9px 15px; font-size: 14.5px; border-color: var(--linea-2); }
.btn.small, .btn.add { padding: 6px 12px; font-size: 13.5px; border-radius: 10px; }
.btn.primary { color: var(--sobre-c); }
html[data-tema="oscuro"] .btn.primary { color: #04211e; }
html[data-tema="oscuro"] .btn.primary:hover { background: #5eead4; border-color: #5eead4; }
.btn.danger { border-color: color-mix(in srgb, var(--critical) 45%, transparent); }
.link { font-size: 14px; }
.chip { font-size: 12.5px; }
table.cl td, table.compact td { font-size: 14px; }
th { font-size: 12px; }
.seg { border-radius: 12px; }
.seg a, .seg button { padding: 8px 14px; font-size: 14.5px; border-radius: 9px; }
.search { background: var(--campo); border-radius: 14px; border-color: var(--border-input); }
.search input { font-size: 17px; padding: 14px 0; }
.search svg { width: 20px; height: 20px; }
.sel { border-radius: 12px; background: var(--campo); border-color: var(--border-input); }
.sel input, .sel select { padding: 12px 6px 12px 0; font-size: 15px; }
.filters { padding: 14px 16px; gap: 12px; }
.fix input, .precinto-num input, .input, .modal input[type="text"], .modal input[type="tel"], .modal input[type="number"], .modal select, .modal textarea { background: var(--campo); color: var(--texto); }
.input.fijo { background: var(--surface-2); }
tr.anul td { background: var(--surface-2); }
.aviso-box.ok { background: color-mix(in srgb, var(--good) 14%, transparent); }
html[data-tema="claro"] .aviso-box.ok { background: #e7f5e7; }
.pager { font-size: 14px; }
.tip, .lista-res table th { background: var(--panel-solido); }
.vacio { font-size: 14.5px; }

/* Pendientes */
ul.pend li { padding: 16px 0; gap: 18px; align-items: center; }
ul.pend .pt { font-size: 17px; }
ul.pend .pd { font-size: 14px; margin-top: 2px; }
ul.pend li .btn { min-height: 46px; padding: 0 18px; font-size: 15px; border-radius: 12px; }
ul.pend li .btn.add { border-width: 1.5px; }
ul.pend li.suave .pt { color: var(--texto-2); }

/* Precinto en la ficha */
.seal { border-radius: 14px; }
.seal.precinto-edit { padding: 14px 16px; }
.casilla.grande { font-size: 17px; gap: 10px; }
.casilla.grande input { width: 24px; height: 24px; }
.precinto-num input { font-size: 17px; padding: 10px 14px; border-radius: 12px; }
.precinto-num .btn { min-height: 46px; }

/* Planilla: botón grande */
.btn-grande {
  --c: var(--verde-agua);
  display: flex; align-items: center; gap: 22px; width: 100%; text-align: left; padding: 26px 30px; margin: 0 0 18px; border-radius: 24px;
  border: 2px solid color-mix(in srgb, var(--c) var(--borde-c), transparent); background: var(--boton-fondo); color: var(--texto); cursor: pointer; font-family: inherit;
  box-shadow: var(--sombra), 0 0 28px -6px color-mix(in srgb, var(--c) var(--brillo-c), transparent), inset 0 0 40px -20px color-mix(in srgb, var(--c) 40%, transparent);
}
.btn-grande:hover { transform: translateY(-1px); }
.btn-grande > .ic { width: 52px; height: 52px; color: var(--c); stroke-width: 1.6; flex: none; }
.btn-grande b { display: block; font-size: 26px; font-weight: 650; letter-spacing: -0.015em; }
.btn-grande small { display: block; font-size: 16px; color: var(--texto-2); margin-top: 4px; }

/* ---------- Balanzas: filas grandes ---------- */
.seccion { font-size: 18px; font-weight: 650; margin: 6px 0 12px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.seccion .sec { font-size: 14px; font-weight: 400; }
.seccion + .vacio-grande, .lista-grande + .seccion, .vacio-grande + .seccion, .buscador + .seccion { margin-top: 26px; }
.lista-grande { display: flex; flex-direction: column; gap: 12px; }
.fila-grande {
  --c: var(--ambar);
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) auto; align-items: center; gap: 14px 26px;
  padding: 18px 22px; border-radius: 20px; background: var(--boton-fondo);
  border: 1.5px solid color-mix(in srgb, var(--c) 55%, transparent); box-shadow: var(--sombra);
}
.fila-grande.quieta { border-color: var(--linea); }
.fg-info { color: var(--texto); text-decoration: none; min-width: 0; }
.fg-info:hover .fg-num { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.fg-num { font-size: 28px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.fg-sub { font-size: 15px; color: var(--texto-2); margin-top: 4px; }
.fg-datos { display: flex; gap: 28px; flex-wrap: wrap; }
.fg-datos span { display: block; font-size: 13px; color: var(--texto-2); }
.fg-datos b { font-size: 20px; font-weight: 650; white-space: nowrap; }
/* Columnas parejas entre filas: Troncos angosta, los kilos más anchos. */
.fg-datos > div { min-width: 112px; }
.fg-datos > div:first-child { min-width: 70px; }
.btn-accion {
  min-height: 60px; padding: 0 28px; border-radius: 16px; font-size: 19px; font-weight: 700; font-family: inherit;
  background: var(--c); color: var(--sobre-c); border: 0; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-accion:hover { filter: brightness(1.08); }
.btn-accion:disabled { background: var(--panel-2); color: var(--texto-3); cursor: default; filter: none; font-size: 15px; font-weight: 500; }
.fg-botones { display: flex; flex-direction: column; gap: 8px; }
.btn-accion.wa { min-height: 46px; font-size: 16px; font-weight: 600; background: transparent; color: var(--texto); border: 1.5px solid var(--linea-2); }
.btn-accion.wa .ic { width: 20px; height: 20px; }
.fg-wa { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 14.5px; font-weight: 600; color: var(--c); }
.fg-wa .ic { width: 18px; height: 18px; }
.vacio-grande {
  display: flex; align-items: center; gap: 14px; padding: 22px 24px; border-radius: 20px; border: 1px dashed var(--linea-2);
  background: var(--dato-fondo); font-size: 17px; color: var(--texto-2);
}
.vacio-grande .ic { width: 30px; height: 30px; color: var(--verde); flex: none; }
.vacio-grande b { color: var(--texto); font-weight: 600; }
.buscador {
  display: flex; align-items: center; gap: 12px; padding: 0 18px; border-radius: 16px; border: 1px solid var(--border-input); background: var(--campo); max-width: 760px;
}
.buscador .ic { width: 22px; height: 22px; color: var(--texto-2); flex: none; }
.buscador input { flex: 1; min-width: 0; border: 0; background: transparent; outline: 0; font-size: 18px; padding: 16px 0; color: var(--texto); font-family: inherit; }
.buscador:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.resultados { margin-top: 12px; }
.resultados .fila-grande { padding: 14px 20px; }
.resultados .fg-num { font-size: 22px; }
.resultados .btn-accion { min-height: 52px; font-size: 17px; }
.nota { font-size: 15px; color: var(--texto-2); margin: 10px 0 0; }
.compacta { display: flex; flex-direction: column; gap: 8px; }
.compacta a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--linea); background: var(--dato-fondo); color: var(--texto); text-decoration: none; font-size: 15px; flex-wrap: wrap; }
.compacta a:hover { border-color: var(--linea-2); }
.compacta b { font-size: 17px; }

/* ---------- Diálogos y avisos ---------- */
html[data-tema="oscuro"] .scrim { background: rgba(2, 4, 6, 0.7); }
.modal { background: var(--panel-solido); border: 1px solid var(--linea); border-radius: 20px; padding: 24px 26px; }
.modal h3 { font-size: 20px; }
.modal .btn { min-height: 44px; }
.modal .mfoot .btn.primary { padding: 0 22px; font-size: 15.5px; }
.toast { background: var(--panel-2); color: var(--texto); border: 1px solid var(--linea-2); font-size: 15px; }
html[data-tema="claro"] .toast { background: #16201c; color: #fff; border-color: #16201c; }
.toast.mal { background: #7f1d1d; color: #fff; border-color: #7f1d1d; }
.cargando-vista { color: var(--texto-2); font-size: 16px; }

/* ---------- Órdenes: tarjetas grandes y menú "Más" de la ficha ---------- */
.ords { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.ord { --c: var(--verde); min-height: 200px; justify-content: flex-start; }
.ord h2 { font-size: 32px; letter-spacing: 0.01em; padding-right: 120px; overflow-wrap: anywhere; }
.ord-cli { font-size: 17px; color: var(--texto-2); margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ord-barra { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin-top: 18px; display: flex; gap: 2px; }
.ord-barra i { display: block; height: 100%; background: var(--c); }
.ord-barra i.p2 { background: color-mix(in srgb, var(--c) 45%, transparent); }
.ord-lin { display: flex; justify-content: space-between; gap: 6px 12px; margin-top: 10px; font-size: 16px; color: var(--texto-2); flex-wrap: wrap; }
.ord-lin b { color: var(--texto); }
.ord-estado { position: absolute; right: 24px; top: 26px; font-size: 13px; font-weight: 650; padding: 4px 11px; border-radius: 999px; color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); }
.boton.nueva { --c: var(--verde-agua); border-style: dashed; justify-content: center; align-items: center; text-align: center; gap: 10px; cursor: pointer; font-family: inherit; min-height: 200px; }
.boton.nueva > .ic { width: 56px; height: 56px; }
.boton.nueva h2 { font-size: 27px; }
.mas-wrap { position: relative; }
.menu-mas { position: absolute; right: 0; top: calc(100% + 8px); width: 300px; max-width: calc(100vw - 32px); background: var(--panel-solido); border: 1px solid var(--linea-2); border-radius: 16px; padding: 8px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45); z-index: 15; }
.menu-mas[hidden] { display: none; }
.menu-mas > a, .menu-mas > button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; border: 0; background: none; color: var(--texto); font-size: 16px; font-weight: 500; font-family: inherit; border-radius: 10px; text-align: left; cursor: pointer; text-decoration: none; }
.menu-mas > a:hover, .menu-mas > button:hover, .menu-mas > a:focus-visible, .menu-mas > button:focus-visible { background: var(--panel-2); outline: none; }
.menu-mas svg { width: 20px; height: 20px; color: var(--texto-2); flex: none; }
.menu-mas hr { border: 0; border-top: 1px solid var(--linea); margin: 6px 4px; }
.menu-mas .rojo, .menu-mas .rojo svg { color: var(--critical); }
@media (max-width: 1100px) { .ords { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .ords { grid-template-columns: 1fr; gap: 12px; } .ord, .boton.nueva { min-height: 0; } .ord h2 { font-size: 26px; } }

/* ---------- Pantallas medianas (1366, 1280) ---------- */
@media (max-width: 1400px) {
  .pagina { padding: 22px 34px 26px; gap: 18px; }
  .inicio { gap: 18px; }
  .grilla { gap: 18px; grid-template-rows: repeat(2, minmax(150px, 1fr)); }
  .boton { padding: 22px 26px; }
  .boton h2 { font-size: 26px; }
  .boton > .ic { width: 46px; height: 46px; }
  .dato { padding: 16px 20px; }
  .dato .n { font-size: 36px; }
}
@media (max-height: 820px) and (min-width: 901px) {
  .boton > .ic { width: 40px; height: 40px; }
  .boton p { font-size: 16px; margin-top: 6px; }
  .dato .n { font-size: 32px; }
  .dato .s { margin-top: 6px; }
  .chico { padding: 10px 18px; font-size: 16px; }
}

/* ---------- Tablet vertical y celular ---------- */
@media (max-width: 900px) {
  .pagina { padding: 18px 20px 24px; }
  .franja { grid-template-columns: 1fr 1fr; }
  .franja .dato:first-child { grid-column: 1 / -1; }
  .grilla { grid-template-columns: 1fr 1fr; grid-template-rows: none; grid-auto-rows: minmax(150px, auto); }
  .fila-grande { grid-template-columns: minmax(0, 1fr) auto; }
  .fila-grande .fg-datos { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 640px) {
  .pagina { padding: 14px 16px 22px; gap: 16px; }
  .marca { font-size: 20px; gap: 9px; }
  .marca .logo svg { width: 28px; height: 28px; }
  .marca .chip { font-size: 11.5px; padding: 4px 8px; }
  .der { width: 100%; justify-content: space-between; font-size: 15px; gap: 12px; }
  .tema button { padding: 7px 11px; font-size: 14px; }
  .inicio { gap: 16px; }
  .franja { gap: 10px; }
  .dato { padding: 14px 16px; border-radius: 16px; }
  .dato .n { font-size: 30px; }
  .dato .n.texto { font-size: 22px; }
  .dato .s { font-size: 14px; white-space: normal; }
  .grilla { grid-template-columns: 1fr; gap: 12px; grid-auto-rows: auto; }
  .boton { flex-direction: row; align-items: center; justify-content: flex-start; padding: 18px 48px 18px 18px; border-radius: 20px; gap: 16px; min-height: 96px; }
  .boton > .ic { width: 38px; height: 38px; flex: none; }
  .boton h2 { font-size: 21px; }
  .boton p { font-size: 15px; margin-top: 4px; }
  .boton .flecha { top: 50%; right: 16px; transform: translateY(-50%); width: 22px; height: 22px; }
  .pie { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .chico { justify-content: center; padding: 12px 10px; font-size: 15px; }
  .volver { height: 50px; font-size: 17px; padding: 0 18px 0 12px; }
  .vista .top { gap: 12px; margin-bottom: 16px; }
  .vista .top > div:not(.actions) { flex-basis: 100%; }
  .vista .top h1 { font-size: 25px; }
  .vista .top > .actions { margin-left: 0; width: 100%; }
  .vista .top .actions .btn.primary { flex: 1 1 100%; justify-content: center; }
  .card { padding: 14px 14px; border-radius: 16px; }
  .btn-grande { padding: 18px; gap: 14px; border-radius: 20px; }
  .btn-grande > .ic { width: 38px; height: 38px; }
  .btn-grande b { font-size: 21px; }
  .btn-grande small { font-size: 14.5px; }
  .fila-grande { grid-template-columns: 1fr; padding: 16px; gap: 12px; }
  .fila-grande .fg-datos { grid-column: auto; grid-row: auto; gap: 20px; }
  .fg-datos > div, .fg-datos > div:first-child { min-width: 0; }
  .fg-num { font-size: 24px; }
  .btn-accion { width: 100%; }
  .fg-botones { width: 100%; }
  ul.pend li { flex-direction: column; align-items: stretch; gap: 10px; }
  ul.pend li .btn { justify-content: center; }
  .fix { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .seal.precinto-edit { grid-template-columns: 1fr; }
  .scrim { padding: 0; align-items: stretch; }
  .modal, .modal.ancho, .modal.formato { width: 100%; min-height: 100%; border-radius: 0; border: 0; padding: 18px 16px 24px; }
  .row2f, .series-cols { grid-template-columns: 1fr; }
  .mfoot .btn { flex: 1 1 auto; justify-content: center; }
  .toasts { left: 12px; right: 12px; bottom: 12px; }
  .toast { max-width: none; }
}
@media (max-width: 380px) {
  .tema button span { display: none; }
}

/* ---------- Botones más vivos: responden al pasar el mouse y al tocarlos ---------- */
.boton { transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease; }
.boton:hover { transform: translateY(-3px); border-color: var(--c); }
.boton:active { transform: translateY(0) scale(0.985); transition-duration: 0.06s; }
.boton > .ic { transition: transform 0.18s ease; }
.boton:hover > .ic { transform: scale(1.08); }
.boton .flecha { transition: transform 0.18s ease, color 0.18s ease; }
.boton:hover .flecha, .boton:focus-visible .flecha { transform: translateX(5px); color: var(--c); }
a.dato, .chico, .volver, .btn-grande, .btn-accion { transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease; }
a.dato:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 6px 22px -12px color-mix(in srgb, var(--accent) 60%, transparent); }
.chico:hover, .volver:hover { transform: translateY(-1px); border-color: var(--accent); }
a.dato:active, .chico:active, .volver:active, .btn-grande:active, .btn-accion:active { transform: scale(0.98); transition-duration: 0.06s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.97); }
.vista .top .actions .btn:hover { border-color: var(--accent); }
.seg.periodos { padding: 3px; background: var(--campo); border-color: var(--border-input); }
.seg.periodos button { padding: 10px 16px; font-size: 15px; }
.seg.periodos button.on { background: var(--accent-wash); color: var(--accent-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }
.nota-vaciados { font-size: 14px; }
.btn-fila { font-size: 13.5px; padding: 7px 11px; }
.aviso-box.vaciado { font-size: 14.5px; padding: 14px 16px; border-radius: 14px; }
@media (prefers-reduced-motion: reduce) {
  .boton, .boton > .ic, .boton .flecha, a.dato, .chico, .volver, .btn-grande, .btn-accion { transition: none; }
  .boton:hover, .boton:active, a.dato:hover, .chico:hover, .volver:hover, .btn:hover, .btn:active { transform: none; }
  .boton:hover > .ic, .boton:hover .flecha { transform: none; }
}
