
  @import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

  :root {
    --bg: #EEF0F4; --surface: #FFFFFF; --surface-2: #F6F7FA;
    --ink: #171A24; --ink-soft: #5B6070; --ink-faint: #8A8FA0;
    --border: #E1E4EB; --border-strong: #CBD0DC;
    --accent: #0E6E63; --accent-ink: #FFFFFF; --accent-soft: #E3F1EE; --focus: #0E6E63;
    --puente: #B5460B; --puente-bg: #FDECDD;

    --st-nuevo-bg: #E7EAF3; --st-nuevo-fg: #34406B;
    --st-alerta-bg: #FBE7DD; --st-alerta-fg: #9A3E14;
    --st-respuesta-bg: #FDEBC7; --st-respuesta-fg: #8A5A05;
    --st-cotizada-bg: #DCF0E6; --st-cotizada-fg: #146C43;
    --st-seguimiento1-bg: #FDF0C8; --st-seguimiento1-fg: #8A6205;
    --st-seguimiento2-bg: #FCE3C3; --st-seguimiento2-fg: #9A4E0A;
    --st-seguimiento3-bg: #FBD8CE; --st-seguimiento3-fg: #A5330F;
    --st-perdida-bg: #EDEEF2; --st-perdida-fg: #6E7280;
    --st-aprobada-bg: #D9EDFA; --st-aprobada-fg: #0B5C8C;

    --shadow-sm: 0 1px 2px rgba(23,26,36,0.06);
    --shadow-md: 0 6px 20px rgba(23,26,36,0.10);
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg: #14161C; --surface: #1C1F27; --surface-2: #21242D;
      --ink: #EDEEF3; --ink-soft: #A6ABBB; --ink-faint: #767C8F;
      --border: #2B2F3B; --border-strong: #383D4B;
      --accent: #3FB7A5; --accent-ink: #0B1512; --accent-soft: #1B322D; --focus: #3FB7A5;
      --puente: #F2A25C; --puente-bg: #3A2612;
      --st-nuevo-bg: #232A44; --st-nuevo-fg: #AEBBEE;
      --st-alerta-bg: #3D2417; --st-alerta-fg: #F0A578;
      --st-respuesta-bg: #3A2E0E; --st-respuesta-fg: #F0C46A;
      --st-cotizada-bg: #133226; --st-cotizada-fg: #7BD9A8;
      --st-seguimiento1-bg: #362D0E; --st-seguimiento1-fg: #F0CD6A;
      --st-seguimiento2-bg: #3A2812; --st-seguimiento2-fg: #F0AC70;
      --st-seguimiento3-bg: #3D2016; --st-seguimiento3-fg: #F09A82;
      --st-perdida-bg: #262A35; --st-perdida-fg: #9FA4B4;
      --st-aprobada-bg: #113247; --st-aprobada-fg: #7DC4EF;
      --shadow-sm: 0 1px 2px rgba(0,0,0,0.3); --shadow-md: 0 10px 30px rgba(0,0,0,0.4);
    }
  }
  :root[data-theme="dark"] {
    --bg: #14161C; --surface: #1C1F27; --surface-2: #21242D;
    --ink: #EDEEF3; --ink-soft: #A6ABBB; --ink-faint: #767C8F;
    --border: #2B2F3B; --border-strong: #383D4B;
    --accent: #3FB7A5; --accent-ink: #0B1512; --accent-soft: #1B322D; --focus: #3FB7A5;
    --puente: #F2A25C; --puente-bg: #3A2612;
    --st-nuevo-bg: #232A44; --st-nuevo-fg: #AEBBEE;
    --st-alerta-bg: #3D2417; --st-alerta-fg: #F0A578;
    --st-respuesta-bg: #3A2E0E; --st-respuesta-fg: #F0C46A;
    --st-cotizada-bg: #133226; --st-cotizada-fg: #7BD9A8;
    --st-seguimiento1-bg: #362D0E; --st-seguimiento1-fg: #F0CD6A;
    --st-seguimiento2-bg: #3A2812; --st-seguimiento2-fg: #F0AC70;
    --st-seguimiento3-bg: #3D2016; --st-seguimiento3-fg: #F09A82;
    --st-perdida-bg: #262A35; --st-perdida-fg: #9FA4B4;
    --st-aprobada-bg: #113247; --st-aprobada-fg: #7DC4EF;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3); --shadow-md: 0 10px 30px rgba(0,0,0,0.4);
  }

  * { box-sizing: border-box; }
  body { margin: 0; background: var(--bg); color: var(--ink); font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif; font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
  .mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; }
  button { font-family: inherit; cursor: pointer; }
  button:focus-visible, [tabindex]:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

  .wa-link { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; color: var(--accent); text-decoration: none; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); white-space: nowrap; transition: filter .12s; }
  .wa-link:hover { filter: brightness(0.95); }
  :root:not([data-theme="light"]) .wa-link:hover, :root[data-theme="dark"] .wa-link:hover { filter: brightness(1.2); }

  .puente-banner { background: var(--puente-bg); color: var(--puente); font-size: 12.5px; font-weight: 700; text-align: center; padding: 7px 12px; letter-spacing: .01em; flex-shrink: 0; border-bottom: 1px solid color-mix(in srgb, var(--puente) 30%, transparent); }

  .shell { display: flex; flex-direction: column; height: 100vh; min-height: 560px; }
  .topbar { display: flex; align-items: center; gap: 20px; padding: 12px 20px; border-bottom: 1px solid var(--border); background: var(--surface); flex-shrink: 0; flex-wrap: wrap; }
  .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 15px; letter-spacing: -0.01em; white-space: nowrap; }
  .brand .mark { width: 26px; height: 26px; border-radius: 7px; background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
  .brand .sub { color: var(--ink-faint); font-weight: 600; font-size: 12px; }
  .flag { font-size: 15px; }
  .summary-strip { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
  .summary-chip { display: flex; align-items: baseline; gap: 6px; padding: 6px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); }
  .summary-chip b { font-size: 14px; font-weight: 800; }
  .summary-chip span { font-size: 11px; color: var(--ink-faint); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

  .btn-new { background: var(--accent); color: var(--accent-ink); border: none; border-radius: 8px; padding: 8px 14px; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
  .btn-new:hover { filter: brightness(1.05); }

  .body { display: flex; flex: 1; min-height: 0; }
  .queue { width: 350px; flex-shrink: 0; border-right: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; min-height: 0; }
  .queue-controls { padding: 12px 14px 10px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
  .search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; background: var(--surface-2); }
  .search input { border: none; background: transparent; outline: none; color: var(--ink); font-size: 13px; width: 100%; font-family: inherit; }
  .search input::placeholder { color: var(--ink-faint); }
  .search svg { flex-shrink: 0; color: var(--ink-faint); }
  .filter-row { display: flex; flex-wrap: wrap; gap: 5px; }
  .filter-pill { border: 1px solid var(--border); background: var(--surface); color: var(--ink-soft); font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 999px; display: flex; align-items: center; gap: 5px; transition: border-color .15s, color .15s, background .15s; }
  .filter-pill .dot { width: 6px; height: 6px; border-radius: 50%; }
  .filter-pill.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

  .queue-list { overflow-y: auto; flex: 1; }
  .ticket-row { display: block; width: 100%; text-align: left; padding: 12px 14px; border: none; border-bottom: 1px solid var(--border); background: var(--surface); position: relative; }
  .ticket-row:hover { background: var(--surface-2); }
  .ticket-row.selected { background: var(--accent-soft); }
  .ticket-row.selected::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
  .tr-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
  .tr-name { font-weight: 700; font-size: 13.5px; letter-spacing: -0.01em; }
  .tr-time { font-size: 11px; color: var(--ink-faint); flex-shrink: 0; }
  .tr-product { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tr-bottom { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
  .tr-id { font-size: 10.5px; color: var(--ink-faint); font-weight: 700; }

  .chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
  .chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
  .chip.st-nuevo { background: var(--st-nuevo-bg); color: var(--st-nuevo-fg); }
  .chip.st-alerta { background: var(--st-alerta-bg); color: var(--st-alerta-fg); }
  .chip.st-respuesta { background: var(--st-respuesta-bg); color: var(--st-respuesta-fg); }
  .chip.st-cotizada { background: var(--st-cotizada-bg); color: var(--st-cotizada-fg); }
  .chip.st-seguimiento1 { background: var(--st-seguimiento1-bg); color: var(--st-seguimiento1-fg); }
  .chip.st-seguimiento2 { background: var(--st-seguimiento2-bg); color: var(--st-seguimiento2-fg); }
  .chip.st-seguimiento3 { background: var(--st-seguimiento3-bg); color: var(--st-seguimiento3-fg); }
  .chip.st-perdida { background: var(--st-perdida-bg); color: var(--st-perdida-fg); }
  .chip.st-aprobada { background: var(--st-aprobada-bg); color: var(--st-aprobada-fg); }

  .empty-queue { padding: 40px 20px; text-align: center; color: var(--ink-faint); font-size: 13px; }

  .detail { flex: 1; min-width: 0; overflow-y: auto; background: var(--bg); }
  .detail-inner { max-width: 760px; margin: 0 auto; padding: 24px 28px 60px; }
  .no-selection { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ink-faint); gap: 10px; text-align: center; padding: 40px; }
  .no-selection .mark-big { width: 52px; height: 52px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 6px; }

  .d-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
  .d-title { display: flex; flex-direction: column; gap: 4px; }
  .d-title h1 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
  .d-meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-faint); flex-wrap: wrap; }
  .d-meta .sep { opacity: .5; }
  .d-actions { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }

  .btn { border-radius: 8px; padding: 8px 14px; font-size: 13px; font-weight: 700; border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink); display: inline-flex; align-items: center; gap: 6px; transition: filter .12s, background .12s; }
  .btn:hover { filter: brightness(0.97); }
  :root:not([data-theme="light"]) .btn:hover, :root[data-theme="dark"] .btn:hover { filter: brightness(1.15); }
  .btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
  .btn-primary:disabled { opacity: .45; cursor: not-allowed; }
  .btn-ghost { background: transparent; border-color: transparent; color: var(--ink-soft); }
  .btn-danger { background: transparent; border-color: var(--st-perdida-fg); color: var(--st-perdida-fg); }
  .btn-sm { padding: 6px 11px; font-size: 12px; }

  .alert-banner { display: flex; gap: 10px; align-items: flex-start; background: var(--st-alerta-bg); color: var(--st-alerta-fg); border: 1px solid color-mix(in srgb, var(--st-alerta-fg) 30%, transparent); border-radius: 10px; padding: 12px 14px; margin-bottom: 18px; font-size: 13px; }
  .alert-banner strong { font-weight: 800; }

  .status-banner { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; border-radius: 10px; padding: 11px 14px; margin-bottom: 18px; font-size: 13px; font-weight: 600; }
  .status-banner.respuesta { background: var(--st-respuesta-bg); color: var(--st-respuesta-fg); }
  .status-banner.perdida { background: var(--st-perdida-bg); color: var(--st-perdida-fg); }
  .status-banner.aprobada { background: var(--st-aprobada-bg); color: var(--st-aprobada-fg); }

  .card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
  .card h2 { margin: 0 0 14px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); }

  .field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; }
  .field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
  .field.full { grid-column: 1 / -1; }
  .field label { font-size: 11px; color: var(--ink-faint); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
  .field .val { font-size: 14px; font-weight: 600; word-break: break-word; }
  .field .val.muted { color: var(--ink-faint); font-weight: 500; font-style: italic; }

  .notes-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; }

  textarea.note-input, input.form-input, select.form-input { width: 100%; resize: vertical; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); padding: 9px 11px; font-family: inherit; font-size: 13px; }
  textarea.note-input { min-height: 70px; }

  .seg-stepper { display: flex; align-items: flex-start; gap: 0; margin-bottom: 18px; }
  .seg-step { display: flex; flex-direction: column; align-items: center; flex: 1; min-width: 0; gap: 6px; position: relative; }
  .seg-step .num { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; border: 2px solid var(--border-strong); color: var(--ink-faint); background: var(--surface); z-index: 1; }
  .seg-step.enviado .num { background: var(--st-cotizada-fg); border-color: var(--st-cotizada-fg); color: white; }
  .seg-step.due .num { background: var(--st-seguimiento2-fg); border-color: var(--st-seguimiento2-fg); color: white; }
  .seg-step.cancelado .num { background: var(--st-perdida-fg); border-color: var(--st-perdida-fg); color: white; }
  .seg-step .line { position: absolute; top: 13px; left: calc(50% + 18px); right: calc(-50% + 18px); height: 2px; background: var(--border-strong); z-index: 0; }
  .seg-step:last-child .line { display: none; }
  .seg-step.enviado .line { background: var(--st-cotizada-fg); }
  .seg-step .lbl { font-size: 11.5px; font-weight: 700; text-align: center; }
  .seg-step .sub { font-size: 10.5px; color: var(--ink-faint); text-align: center; }

  .seg-due-box { background: var(--st-seguimiento2-bg); border: 1px solid color-mix(in srgb, var(--st-seguimiento2-fg) 35%, transparent); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
  .seg-due-box .seg-due-title { font-size: 13px; font-weight: 700; color: var(--st-seguimiento2-fg); display: flex; align-items: center; gap: 6px; }
  .seg-waiting-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; font-size: 13px; color: var(--ink-soft); display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }

  .toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(12px); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-md); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; white-space: nowrap; max-width: 90vw; overflow: hidden; text-overflow: ellipsis; }
  .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

  .modal-overlay { position: fixed; inset: 0; background: rgba(10,12,18,0.45); display: flex; align-items: center; justify-content: center; z-index: 60; padding: 20px; }
  .modal-overlay[hidden] { display: none; }
  .modal { background: var(--surface); border-radius: 14px; max-width: 560px; width: 100%; max-height: 88vh; overflow-y: auto; padding: 22px 24px 24px; box-shadow: var(--shadow-md); }
  .modal h2 { margin: 0 0 4px; font-size: 17px; font-weight: 800; }
  .modal .modal-sub { font-size: 12.5px; color: var(--ink-faint); margin-bottom: 18px; }
  .modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
  .checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
  .checkbox-row input { width: 16px; height: 16px; }
  .req { color: var(--st-alerta-fg); }

  ::-webkit-scrollbar { width: 9px; height: 9px; }
  ::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; }
  ::-webkit-scrollbar-track { background: transparent; }

  /* ---------- view tabs ---------- */
  .view-tabs { display: flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 3px; }
  .view-tab { border: none; background: transparent; color: var(--ink-soft); font-size: 12.5px; font-weight: 700; padding: 6px 12px; border-radius: 7px; display: flex; align-items: center; gap: 6px; }
  .view-tab.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
  #viewDb[hidden], #viewMesa[hidden] { display: none; }

  /* ---------- database view (reutiliza el mismo look de Base de Datos) ---------- */
  .db-wrap { max-width: 1320px; margin: 0 auto; padding: 20px 24px 60px; }
  .db-topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
  .db-topbar h1 { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 4px; }
  .db-topbar p { margin: 0; color: var(--ink-soft); font-size: 13px; max-width: 60ch; }
  .db-dl-group { display: flex; gap: 8px; flex-wrap: wrap; }
  .db-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 18px; }
  .db-kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 13px 15px; box-shadow: var(--shadow-sm); }
  .db-kpi .num { font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; font-size: 21px; font-weight: 700; line-height: 1.1; }
  .db-kpi .lbl { font-size: 11px; color: var(--ink-soft); margin-top: 4px; text-transform: uppercase; letter-spacing: .04em; }
  .db-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
  .db-search { flex: 1 1 220px; position: relative; }
  .db-search input { width: 100%; padding: 8px 10px 8px 30px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface-2); color: var(--ink); font: inherit; font-size: 13.5px; }
  .db-search svg { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--ink-faint); pointer-events: none; }
  .db-toolbar select { padding: 8px 26px 8px 10px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface-2); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%238A8FA0' stroke-width='1.6'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 6px center; background-size: 15px; }
  .db-date-range { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }
  .db-date-range input[type="date"] { padding: 7px 8px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface-2); color: var(--ink); font: inherit; font-size: 12.5px; color-scheme: light dark; }
  .db-divider { width: 1px; align-self: stretch; background: var(--border); margin: 2px 2px; }
  .db-clear-link { background: none; border: none; color: var(--ink-soft); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 6px 4px; text-decoration: underline; text-underline-offset: 2px; }
  .db-clear-link:hover { color: var(--ink); }
  .db-count-note { font-size: 12.5px; color: var(--ink-faint); white-space: nowrap; padding-left: 4px; }
  .db-table-shell { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-sm); overflow: hidden; }
  .db-table-scroll { overflow-x: auto; }
  .db-table-shell table { width: 100%; border-collapse: collapse; min-width: 1120px; }
  .db-table-shell thead th { position: sticky; top: 0; background: var(--surface-2); text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; cursor: pointer; user-select: none; }
  .db-table-shell thead th:hover { color: var(--ink); }
  .db-table-shell thead th .db-arrow { opacity: .35; margin-left: 3px; font-size: 10px; }
  .db-table-shell thead th.sorted .db-arrow { opacity: 1; color: var(--accent); }
  .db-table-shell tbody tr.db-main-row { border-bottom: 1px solid var(--border); cursor: pointer; }
  .db-table-shell tbody tr:last-child { border-bottom: none; }
  .db-table-shell tbody tr.db-main-row:hover { background: var(--surface-2); }
  .db-table-shell tbody td { padding: 10px 12px; font-size: 13px; vertical-align: top; }
  .db-table-shell td.db-id { font-family: 'IBM Plex Mono', monospace; font-weight: 600; font-size: 12.5px; }
  .db-table-shell td.db-phone { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
  .db-table-shell td.db-cliente { font-weight: 600; }
  .db-table-shell td.db-empresa { color: var(--ink-soft); }
  .db-table-shell td .db-empty { color: var(--ink-faint); }
  .db-tag-yes { color: var(--st-cotizada-fg); font-weight: 600; }
  .db-tag-no { color: var(--ink-faint); }
  .db-warn-badge { display: inline-flex; align-items: center; gap: 4px; color: var(--st-alerta-fg); font-size: 11.5px; font-weight: 700; }
  tr.db-detail-row { display: none; }
  tr.db-detail-row.open { display: table-row; }
  tr.db-detail-row td { background: var(--surface-2); padding: 14px 16px 16px; border-bottom: 1px solid var(--border); }
  .db-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 24px; }
  .db-detail-field .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); font-weight: 700; margin-bottom: 3px; }
  .db-detail-field .v { font-size: 13px; color: var(--ink); }
  .db-detail-field .v.mono { font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; }
  .db-detail-note { grid-column: 1 / -1; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 13px; }
  .db-detail-note.alert { border-color: color-mix(in srgb, var(--st-alerta-fg) 40%, var(--border)); background: var(--st-alerta-bg); color: var(--st-alerta-fg); }
  .db-empty-state-msg { text-align: center; padding: 48px 20px; color: var(--ink-faint); font-size: 13.5px; }
  .db-footnote { margin-top: 14px; font-size: 12px; color: var(--ink-faint); }

  @media (max-width: 780px) {
    .body { flex-direction: column; }
    .queue { width: 100%; height: 40%; border-right: none; border-bottom: 1px solid var(--border); }
    .field-grid { grid-template-columns: 1fr; }
    .seg-step .lbl { font-size: 10px; }
  }
