/* ── RICMA Call Center · sistema de diseño ─────────────────────────────────
   Tokens y componentes base compartidos por la consola de agentes y el portal.
   Marca: azul #015ED0 (el del icono de la app). Tipografía: Inter. */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* Marca */
  --brand: #015ed0;
  --brand-600: #014fb0;
  --brand-700: #013f8c;
  --brand-50: #eef4fd;
  --brand-100: #d9e7fb;
  --brand-200: #b3cff6;

  /* Navegación oscura */
  --navy: #0b1f3a;
  --navy-2: #12305a;
  --navy-text: #a9b8cf;

  /* Superficies y texto */
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e3e7ed;
  --border-2: #d2d9e2;
  --text: #1b2430;
  --text-2: #56627a;
  --text-3: #8892a4;

  /* Estados del aviso */
  --st-abierto: #1d5fd6;     --st-abierto-bg: #e8f0fd;
  --st-curso: #a3570a;       --st-curso-bg: #fdf1e1;
  --st-espera: #6b3fc4;      --st-espera-bg: #f1ebfd;
  --st-resuelto: #17803d;    --st-resuelto-bg: #e5f5ea;
  --st-cerrado: #545e6e;     --st-cerrado-bg: #eceff3;

  /* Prioridad */
  --pr-urgente: #d92d20;
  --pr-alta: #e8710a;
  --pr-normal: #7d8aa0;
  --pr-baja: #bac3d0;

  /* Semánticos */
  --ok: #17803d;      --ok-bg: #e5f5ea;
  --warn: #a3570a;    --warn-bg: #fdf1e1;
  --danger: #c4261a;  --danger-bg: #fdecea;
  --note: #8a6100;    --note-bg: #fff8e0;  --note-border: #f3dd96;

  --radius: 6px;
  --radius-lg: 10px;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow-2: 0 4px 14px rgba(16, 24, 40, .10);
  --focus: 0 0 0 3px rgba(1, 94, 208, .22);

  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
.num, .tab-num { font-variant-numeric: tabular-nums; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Iconos (sprite inyectado por icons.js) */
.ic { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none;
      stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.ic-sm { width: 14px; height: 14px; }
.ic-lg { width: 20px; height: 20px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border: 1px solid var(--border-2); border-radius: var(--radius);
  background: var(--surface); color: var(--text);
  font: 500 13px var(--font); cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); border-color: #c3ccd8; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); border-color: var(--brand-600); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: #eef1f5; border-color: transparent; }
.btn-icon { width: 32px; padding: 0; justify-content: center; }
.btn-split { display: inline-flex; }
.btn-split .btn:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.btn-split .btn:last-child { border-radius: 0 var(--radius) var(--radius) 0; border-left: 1px solid rgba(255,255,255,.28); width: 30px; padding: 0; justify-content: center; }

/* Campos */
.input, .select {
  height: 32px; width: 100%; padding: 0 10px;
  border: 1px solid var(--border-2); border-radius: var(--radius);
  background: var(--surface); color: var(--text); font: 13px var(--font);
}
.input:focus, .select:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
.select { appearance: none; padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2356627a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; }

/* Pastillas de estado */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px;
        border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-abierto  { color: var(--st-abierto);  background: var(--st-abierto-bg); }
.st-curso    { color: var(--st-curso);    background: var(--st-curso-bg); }
.st-espera   { color: var(--st-espera);   background: var(--st-espera-bg); }
.st-resuelto { color: var(--st-resuelto); background: var(--st-resuelto-bg); }
.st-cerrado  { color: var(--st-cerrado);  background: var(--st-cerrado-bg); }

/* Prioridad: barra de color + texto */
.prio { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.prio i { width: 3px; height: 14px; border-radius: 2px; background: var(--pr-normal); }
.prio.urgente i { background: var(--pr-urgente); } .prio.urgente { color: var(--pr-urgente); font-weight: 600; }
.prio.alta i { background: var(--pr-alta); }       .prio.alta { color: #b6560a; font-weight: 600; }
.prio.baja i { background: var(--pr-baja); }

/* Etiquetas y chips */
.chip { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px;
        border-radius: 4px; font-size: 11.5px; font-weight: 500;
        background: #eef1f5; color: var(--text-2); white-space: nowrap; }
.chip-brand { background: var(--brand-50); color: var(--brand-700); }
.chip-ok { background: var(--ok-bg); color: var(--ok); }
.chip-warn { background: var(--warn-bg); color: var(--warn); }
.chip-danger { background: var(--danger-bg); color: var(--danger); }
.marca { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; padding: 0 6px; height: 18px; }
.marca-famiglia { background: #fbe9e7; color: #a32616; }
.marca-ditaly { background: #e7f3ec; color: #19693a; }
.marca-boutique { background: #f3ecfa; color: #6a3c99; }

/* SLA */
.sla { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.sla.ok { color: var(--ok); } .sla.warn { color: var(--warn); } .sla.bad { color: var(--danger); }
.sla.na { color: var(--text-3); font-weight: 500; }

/* Avatares */
.av { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center;
      font-size: 10.5px; font-weight: 700; color: #fff; flex: none; }
.av-lg { width: 32px; height: 32px; font-size: 12px; }
.av-1 { background: #015ed0; } .av-2 { background: #0f8a6b; } .av-3 { background: #b4521b; }
.av-4 { background: #6b3fc4; } .av-5 { background: #3d4b63; }
.av-cli { background: #e9edf3; color: var(--text-2); }

/* Casilla */
.cb { width: 15px; height: 15px; border: 1.5px solid #b9c3d1; border-radius: 4px; display: inline-grid; place-items: center; background: #fff; flex: none; }
.cb.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.cb.on .ic { width: 11px; height: 11px; stroke-width: 3; }

.muted { color: var(--text-2); } .faint { color: var(--text-3); }
.sep { width: 1px; align-self: stretch; background: var(--border); }
