/* ──────────────────────────────────────────────────────────────
   EXPO webapp · CSS funcional (no definitivo)
   ────────────────────────────────────────────────────────────── */
:root {
  --bg: #f5f5f7;
  --bg-card: #ffffff;
  --bg-muted: #f9fafb;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --text: #111827;
  --text-mute: #6b7280;
  --text-dim: #9ca3af;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --warn: #dc2626;
  --warn-bg: #fee2e2;
  --ok: #10b981;
  --ok-bg: #d1fae5;
  --amber: #f59e0b;
  --amber-bg: #fef3c7;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 14px;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.92em; }

/* Header */
header.top {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}
header.top .brand { font-weight: 700; font-size: 15px; }
header.top .brand a { color: var(--text); }
header.top .user {
  display: flex; align-items: center; gap: 10px; font-size: 13px;
}
.robot-status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 12px;
  font-size: 11px; font-weight: 600;
  background: rgba(255,255,255,0.08); color: #cbd5e1;
  margin-right: 6px;
}
.robot-status .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #6b7280;
}
.robot-status.ok    { background: rgba(16,185,129,0.18); color: #6ee7b7; }
.robot-status.ok    .dot { background: #10b981; box-shadow: 0 0 6px #10b981; animation: pulse 2s infinite; }
.robot-status.warn  { background: rgba(245,158,11,0.18); color: #fcd34d; }
.robot-status.warn  .dot { background: #f59e0b; }
.robot-status.err   { background: rgba(220,38,38,0.18); color: #fca5a5; }
.robot-status.err   .dot { background: #dc2626; animation: pulse 1s infinite; }
@keyframes pulse {
  0%,100% { opacity: 1; }
  50%     { opacity: 0.4; }
}
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 600; font-size: 12px;
}
.link-mute { color: var(--text-mute); font-size: 12px; }

.container { max-width: 1280px; margin: 0 auto; padding: 20px 24px; }
.container.wide { max-width: 100%; padding: 16px 22px; }

/* ── Login ────────────────────────────────────────────────────── */
.login {
  max-width: 420px; margin: 80px auto;
  background: #fff; padding: 32px; border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.login h1 { margin: 0 0 6px 0; font-size: 22px; }
.login .hint { color: var(--text-mute); margin: 0 0 18px 0; font-size: 13px; }
.login .footnote { margin-top: 16px; font-size: 11px; }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-form label { display: flex; flex-direction: column; gap: 5px; }
.login-form .lbl {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-mute); font-weight: 600;
}
.login-form select, .login-form input[type="password"] {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border-strong); border-radius: 6px;
  font-size: 14px; background: #fff;
}
.login-form select:focus, .login-form input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.btn-primary {
  margin-top: 6px; padding: 10px 16px;
  background: var(--accent); color: #fff; border: 0; border-radius: 6px;
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn-primary:hover { background: var(--accent-hover); }
.form-error {
  background: var(--warn-bg); color: var(--warn);
  padding: 10px 12px; border-radius: 6px; font-size: 13px;
  margin-bottom: 14px; border: 1px solid #fca5a5;
}
.warn { color: var(--warn); background: var(--warn-bg); padding: 10px; border-radius: var(--radius); }

/* ── Filtros ──────────────────────────────────────────────────── */
.filtros {
  display: flex; gap: 10px; flex-wrap: wrap;
  background: #fff; padding: 12px 14px;
  border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.filtros input, .filtros select {
  padding: 7px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
}
.filtros input[type=search] { flex: 1; min-width: 220px; }
.filtros input:focus, .filtros select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.lista-meta { color: var(--text-mute); font-size: 12px; margin: 0 0 8px 4px; }

/* ── Tabla de operaciones ─────────────────────────────────────── */
.ops {
  width: 100%; background: #fff;
  border-collapse: collapse; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
.ops th {
  background: var(--bg-muted); color: var(--text-mute);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 9px 12px; text-align: left; font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.ops th.center, .ops td.center { text-align: center; }
.ops td { padding: 10px 12px; border-bottom: 1px solid var(--bg-muted); vertical-align: middle; }
.ops tbody tr { cursor: pointer; transition: background 0.06s; }
.ops tbody tr:hover { background: #eff6ff; }
.ops tr.estado-archivada { opacity: 0.55; }
.ops tr.estado-atendida { background: #f0fdf4; }
.ops tr.estado-atendida:hover { background: #dcfce7; }

.codigo { font-weight: 600; color: var(--text); }
.titulo { max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.small { font-size: 11px; }
.muted { color: var(--text-dim); }

/* Chips y badges */
.chip {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  background: color-mix(in srgb, var(--c) 15%, white);
  color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 30%, white);
  font-size: 11px; font-weight: 600;
}
.chip-mini {
  display: inline-block; padding: 1px 6px; border-radius: 8px;
  background: color-mix(in srgb, var(--c) 18%, white);
  color: var(--c); font-size: 10px; font-weight: 600;
}
.badge-coment {
  display: inline-block; margin-left: 6px; padding: 1px 6px;
  background: var(--bg-muted); color: var(--text-mute);
  border-radius: 8px; font-size: 11px;
}

.estado {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
}
.estado.est-abierta   { background: #dbeafe; color: #1e40af; }
.estado.est-atendida  { background: var(--ok-bg); color: #065f46; }
.estado.est-archivada { background: #e5e7eb; color: #4b5563; }

/* Categorías */
.cat { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 10px; font-weight: 700; letter-spacing: 0.02em; }
.cat-DOCUMENTOS     { background: #e5e7eb; color: #4b5563; }
.cat-DUS-1          { background: #dbeafe; color: #1e40af; }
.cat-MATRIZ         { background: #ddd6fe; color: #5b21b6; }
.cat-DUS-LEG        { background: #e9d5ff; color: #6b21a8; }
.cat-CO             { background: #d1fae5; color: #065f46; }
.cat-ZP             { background: #fed7aa; color: #9a3412; }
.cat-ACLARACION     { background: #fef3c7; color: #92400e; }
.cat-CORRECCION     { background: #fde68a; color: #78350f; }
.cat-ANULAR         { background: #fecaca; color: #991b1b; }
.cat-REUNION        { background: #cffafe; color: #155e75; }
.cat-NUEVO-CLIENTE  { background: #d9f99d; color: #3f6212; }
.cat-PAGOS          { background: #ccfbf1; color: #115e59; }
.cat-URGENTE        { background: #fee2e2; color: #b91c1c; font-weight: 800; }

/* Select de categoría en grilla: se tinta del color de la categoría seleccionada */
.sel-categoria {
  padding: 3px 6px; font-size: 11px;
  border: 1px solid var(--border-strong); border-radius: 4px;
  background: #fff; min-width: 110px; max-width: 130px;
  font-weight: 600;
}
.sel-categoria:focus { outline: none; border-color: var(--accent); }
.sel-categoria.cat-sel-DOCUMENTOS    { background: #e5e7eb; color: #4b5563; border-color: #d1d5db; }
.sel-categoria.cat-sel-DUS-1         { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.sel-categoria.cat-sel-MATRIZ        { background: #ddd6fe; color: #5b21b6; border-color: #c4b5fd; }
.sel-categoria.cat-sel-DUS-LEG       { background: #e9d5ff; color: #6b21a8; border-color: #d8b4fe; }
.sel-categoria.cat-sel-CO            { background: #d1fae5; color: #065f46; border-color: #86efac; }
.sel-categoria.cat-sel-ZP            { background: #fed7aa; color: #9a3412; border-color: #fdba74; }
.sel-categoria.cat-sel-ACLARACION    { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.sel-categoria.cat-sel-CORRECCION    { background: #fde68a; color: #78350f; border-color: #fbbf24; }
.sel-categoria.cat-sel-ANULAR        { background: #fecaca; color: #991b1b; border-color: #fca5a5; }
.sel-categoria.cat-sel-REUNION       { background: #cffafe; color: #155e75; border-color: #67e8f9; }
.sel-categoria.cat-sel-NUEVO-CLIENTE { background: #d9f99d; color: #3f6212; border-color: #bef264; }
.sel-categoria.cat-sel-PAGOS         { background: #ccfbf1; color: #115e59; border-color: #5eead4; }
.sel-categoria.cat-sel-URGENTE       { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; font-weight: 800; }

.empty { padding: 40px; text-align: center; color: var(--text-mute); background: #fff; border-radius: var(--radius); }

/* Select de asignado en grilla */
.sel-asignado {
  padding: 3px 6px; font-size: 11px;
  border: 1px solid var(--border-strong); border-radius: 4px;
  background: #fff; min-width: 90px; max-width: 110px;
}
.sel-asignado:focus { outline: none; border-color: var(--accent); }

/* Select de estado en grilla — coloreado por estado */
.sel-estado {
  padding: 3px 6px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.03em;
  border: 1px solid var(--border-strong); border-radius: 10px;
  min-width: 92px; cursor: pointer;
}
.sel-estado:focus { outline: none; border-color: var(--accent); }
.sel-estado.est-abierta   { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.sel-estado.est-atendida  { background: var(--ok-bg); color: #065f46; border-color: #86efac; }
.sel-estado.est-archivada { background: #e5e7eb; color: #4b5563; border-color: #d1d5db; }

/* ── Operación: detalle ───────────────────────────────────────── */
.back { display: inline-block; color: var(--text-mute); font-size: 13px; margin-bottom: 14px; }
.op-header {
  background: #fff; padding: 16px 20px; border-radius: var(--radius);
  margin-bottom: 14px; box-shadow: var(--shadow);
}
.op-codigo code {
  font-size: 14px; font-weight: 700; color: var(--text-mute);
  background: var(--bg-muted); padding: 3px 8px; border-radius: 4px;
}
.op-header h1 { margin: 10px 0 8px 0; font-size: 20px; }
.op-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; color: var(--text-mute); }
.op-meta strong { color: var(--text); }

.acciones-bar {
  background: #fff; padding: 12px 16px; border-radius: var(--radius);
  margin-bottom: 14px; box-shadow: var(--shadow);
  display: flex; gap: 24px; flex-wrap: wrap; align-items: center;
}
.acciones-bar .grp { display: flex; align-items: center; gap: 8px; }
.grp-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-mute); font-weight: 700;
}
.acciones-bar button, .acciones-bar select {
  padding: 5px 10px; border: 1px solid var(--border-strong);
  background: #fff; border-radius: 6px; font-size: 12px; cursor: pointer;
}
.acciones-bar button:hover { background: var(--bg-muted); }
.acciones-bar button.warn { color: var(--warn); border-color: #fecaca; }
.acciones-bar button.warn:hover { background: var(--warn-bg); }
.estado-actual {
  display: inline-block; padding: 3px 9px; border-radius: 10px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
}
.estado-actual.est-abierta   { background: #dbeafe; color: #1e40af; }
.estado-actual.est-atendida  { background: var(--ok-bg); color: #065f46; }
.estado-actual.est-archivada { background: #e5e7eb; color: #4b5563; }

/* Grid de detalle */
.op-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 14px;
}
.op-grid section.correos, .op-grid section.comentarios { grid-column: 1; }
.op-grid aside.historial { grid-column: 2; grid-row: 1 / span 2; }

section.comentarios, section.correos, aside.historial {
  background: #fff; padding: 16px 18px; border-radius: var(--radius);
  box-shadow: var(--shadow);
}
section.comentarios h2, section.correos h2, aside.historial h2 {
  margin: 0 0 12px 0; font-size: 13px; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-mute); font-weight: 700;
}
.comentario { padding: 10px 0; border-bottom: 1px solid var(--bg-muted); }
.comentario:last-child { border-bottom: none; }
.comentario header { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.comentario time { color: var(--text-dim); font-size: 11px; }
.comentario p { margin: 4px 0 0 0; white-space: pre-wrap; }

.comentario-form { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.comentario-form textarea {
  width: 100%; min-height: 60px; padding: 8px 10px;
  border: 1px solid var(--border-strong); border-radius: 6px;
  font-family: inherit; font-size: 13px; resize: vertical;
}
.comentario-form button {
  align-self: flex-start; padding: 6px 14px;
  background: var(--accent); color: #fff; border: 0; border-radius: 6px;
  font-size: 12px; cursor: pointer; font-weight: 600;
}
.comentario-form button:hover { background: var(--accent-hover); }

.correo-card {
  border: 1px solid var(--border); border-radius: 6px; padding: 12px 14px;
  margin-bottom: 10px; background: #fff;
}
.correo-card:last-child { margin-bottom: 0; }
.correo-card header { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--text-mute); margin-bottom: 4px; }
.correo-card .remit { font-weight: 600; color: var(--text); }
.correo-card h3 { margin: 4px 0; font-size: 13px; color: var(--text); }
.resumen-ia {
  background: #f0f9ff; border-left: 3px solid #0ea5e9;
  padding: 8px 12px; margin: 8px 0;
  border-radius: 0 6px 6px 0; font-size: 13px;
}
.resumen-ia .label, .adjuntos .label {
  display: block; font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: #0369a1; margin-bottom: 4px;
}
.adjuntos { margin-top: 10px; }
.adjunto {
  border: 1px solid var(--border); padding: 8px 10px; border-radius: 6px;
  margin-bottom: 8px; background: var(--bg-muted);
}
.adjunto.error { border-color: #fca5a5; background: var(--warn-bg); }
.adj-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.adj-info { flex: 1; min-width: 0; }
.adj-nombre { font-weight: 600; font-size: 12px; word-break: break-all; }
.adj-meta { font-size: 11px; color: var(--text-mute); margin-top: 2px; }
.adj-error { color: var(--warn); font-size: 12px; margin-top: 4px; }
.resumen-adj { background: #f0f9ff; padding: 6px 10px; border-radius: 4px; font-size: 12px; margin-top: 6px; }
.btn-download {
  display: inline-block; padding: 4px 10px;
  background: var(--accent); color: #fff; border-radius: 4px;
  font-size: 11px; font-weight: 600; text-decoration: none;
  white-space: nowrap; flex-shrink: 0;
}
.btn-download:hover { background: var(--accent-hover); text-decoration: none; }

/* Inputs inline en la grilla */
.inp-despacho {
  width: 80px; padding: 3px 6px; font-size: 12px;
  border: 1px solid var(--border-strong); border-radius: 4px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.inp-despacho:focus { outline: none; border-color: var(--accent); }
.inp-despacho.err { border-color: var(--warn); background: var(--warn-bg); }
.sel-agente {
  padding: 3px 6px; font-size: 12px;
  border: 1px solid var(--border-strong); border-radius: 4px;
  background: #fff; min-width: 70px;
}
.sel-agente:focus { outline: none; border-color: var(--accent); }

.inp-codigo {
  width: 140px; padding: 3px 6px; font-size: 12px;
  border: 1px solid var(--border-strong); border-radius: 4px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-weight: 600;
  background: #fff;
}
.inp-codigo:focus { outline: none; border-color: var(--accent); }
.inp-codigo.err { border-color: var(--warn); background: var(--warn-bg); }
.inp-codigo::placeholder { font-weight: 400; color: var(--text-dim); }

/* Despachos múltiples — chips + input para agregar */
.cell-despacho { min-width: 150px; }
.despachos-box {
  display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
}
.desp-chips { display: contents; }
.desp-chip {
  display: inline-flex; align-items: center; gap: 3px;
  background: #e0e7ff; color: #3730a3;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px; font-weight: 600;
  padding: 2px 4px 2px 7px; border-radius: 10px;
}
.desp-x {
  border: 0; background: transparent; cursor: pointer;
  color: #6366f1; font-size: 13px; line-height: 1;
  padding: 0 2px; border-radius: 50%;
}
.desp-x:hover { background: #c7d2fe; color: #312e81; }
.inp-despacho-add {
  width: 64px; padding: 3px 6px; font-size: 11px;
  border: 1px dashed var(--border-strong); border-radius: 4px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  background: #fff;
}
.inp-despacho-add:focus { outline: none; border-style: solid; border-color: var(--accent); }
.inp-despacho-add::placeholder { color: var(--text-dim); }

.inp-cliente {
  width: 140px; padding: 3px 6px; font-size: 12px;
  border: 1px solid var(--border-strong); border-radius: 4px;
  background: #fff;
}
.inp-cliente:focus { outline: none; border-color: var(--accent); }
.inp-cliente::placeholder { color: var(--text-dim); }

/* ── Burbuja de hover (operación) ─────────────────────────────── */
#hover-bubble {
  position: fixed; z-index: 1000; display: none;
  pointer-events: none;
  width: 400px; max-height: 72vh; overflow-y: auto;
  background: #fff; border: 1px solid var(--border-strong);
  border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.22);
  padding: 14px 16px;
}
#hover-bubble .pv-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px; margin-bottom: 6px;
}
#hover-bubble .pv-head code {
  font-size: 13px; font-weight: 700; color: #111827;
  background: var(--bg-muted); padding: 2px 8px; border-radius: 4px;
}
#hover-bubble .pv-asunto {
  font-size: 13px; font-weight: 600; color: #111827;
  margin-bottom: 10px; line-height: 1.35;
}
#hover-bubble .pv-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3px 14px;
  font-size: 11px; color: var(--text); margin-bottom: 10px;
  padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
#hover-bubble .pv-meta b {
  color: var(--text-mute); font-weight: 600; margin-right: 4px;
  text-transform: uppercase; font-size: 9px; letter-spacing: 0.04em;
}
#hover-bubble .pv-correos-titulo {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-mute); font-weight: 700; margin-bottom: 6px;
}
#hover-bubble .pv-correos { list-style: none; margin: 0; padding: 0; }
#hover-bubble .pv-correos li {
  padding: 6px 0; border-bottom: 1px solid var(--bg-muted);
}
#hover-bubble .pv-correos li:last-child { border-bottom: none; }
#hover-bubble .pv-c-top {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: 10px; color: var(--text-mute);
}
#hover-bubble .pv-remit { font-weight: 600; color: var(--text); }
#hover-bubble .pv-c-asunto { font-size: 11px; color: #374151; margin-top: 2px; }
#hover-bubble .pv-adj { color: var(--accent); font-weight: 600; }

/* ── Preview de adjuntos (detalle) ────────────────────────────── */
#doc-preview {
  position: fixed; z-index: 1000; display: none;
  pointer-events: none;
  background: #fff; border: 1px solid var(--border-strong);
  border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  padding: 8px;
}
#doc-preview img { display: block; max-width: 460px; max-height: 60vh; border-radius: 4px; }
#doc-preview iframe { width: 520px; height: 62vh; border: 0; border-radius: 4px; }
#doc-preview .dp-text {
  width: 440px; max-height: 50vh; overflow-y: auto;
  font-size: 11px; white-space: pre-wrap; word-break: break-word;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  background: var(--bg-muted); padding: 10px; border-radius: 4px; margin: 0;
}
#doc-preview .dp-info { padding: 12px 16px; font-size: 12px; color: var(--text-mute); }
.adjunto { cursor: default; }
.adj-nombre { cursor: help; }

/* SSE: flash visual cuando otro usuario modificó esta celda */
@keyframes sseFlash {
  0%   { background: #fef08a; box-shadow: 0 0 0 3px #facc15; }
  100% { background: transparent; box-shadow: none; }
}
.sse-flash {
  animation: sseFlash 700ms ease-out;
  border-radius: 4px;
}

details { margin-top: 6px; }
details summary { cursor: pointer; color: var(--accent); font-size: 12px; }
details pre {
  background: var(--bg-muted); padding: 10px; border-radius: 4px;
  font-size: 11px; max-height: 400px; overflow-y: auto;
  white-space: pre-wrap; word-break: break-word;
}

aside.historial ul { list-style: none; padding: 0; margin: 0; }
aside.historial li {
  font-size: 12px; padding: 6px 0;
  border-bottom: 1px solid var(--bg-muted);
  display: flex; flex-direction: column; gap: 3px;
}
aside.historial li:last-child { border-bottom: none; }
aside.historial time { color: var(--text-dim); font-size: 10px; }
aside.historial .accion { color: var(--text); font-family: ui-monospace, monospace; font-size: 11px; }

@media (max-width: 900px) {
  .op-grid { grid-template-columns: 1fr; }
  .op-grid aside.historial { grid-column: 1; grid-row: auto; }
}
