/* Paleta y tokens de diseño: fuente única en shared/static/rols-tokens.css
   (servido en /shared/rols-tokens.css). No redefinir aquí. */
@import url("/shared/rols-tokens.css");

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-page);
  color: #2a2a2a;
}

/* ---- Chrome común de la suite (sidebar, botones, inputs) ---- */
.sidebar { background: var(--bg-sidebar); color: var(--text-sidebar); }
.rols-logo { width: 150px; height: auto; display: block; filter: brightness(0) invert(1); }
.sidebar a {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.55rem 0.85rem; border-radius: 0.5rem;
  font-size: 0.875rem; color: var(--text-sidebar);
  transition: background 0.15s;
}
.sidebar a:hover { background: var(--bg-sidebar-hover); }
.sidebar a.active { background: var(--bg-sidebar-active); color: var(--text-sidebar-active); font-weight: 500; }
.sidebar a .check {
  width: 16px; height: 16px; border: 1.5px solid #888879; border-radius: 4px;
  display: inline-block; flex-shrink: 0;
}
.sidebar a.active .check { background: var(--accent); border-color: var(--accent); }
.breadcrumb { font-size: 0.8rem; color: #9a9a9a; }
.breadcrumb a:hover { color: var(--accent); }

.btn-accent {
  background: var(--accent); color: #fff; border-radius: 999px;
  /* Borde transparente y el MISMO padding que .btn-outline-dark: sin el borde
     el botón medía 2 px menos, y juntos en un pie eso se ve. */
  border: 1px solid transparent;
  padding: 0.5rem 1.05rem; font-size: 0.875rem; font-weight: 500;
  transition: background 0.15s;
}
.btn-accent:hover { background: var(--accent-hover); }
.btn-outline-dark {
  background: #fff; border: 1px solid var(--border); color: #2a2a2a;
  border-radius: 999px; padding: 0.5rem 1.05rem; font-size: 0.875rem;
  font-weight: 500; transition: background 0.15s, border-color 0.15s;
}
.btn-outline-dark:hover { background: var(--accent-soft); border-color: var(--accent); }
.btn-danger {
  background: transparent; border: 1px solid #E3332B; color: #E3332B;
  border-radius: 999px; padding: 0.5rem 1.05rem; font-size: 0.875rem;
  font-weight: 500; transition: background 0.15s;
}
.btn-danger:hover { background: #fdeceb; }
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 18px; }
.input-line {
  width: 100%; padding: 0.55rem 0.8rem; border-radius: 12px;
  border: 1px solid var(--border); background: #fff; font-size: 0.85rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input-line:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,94,148,0.12); }
textarea.input-line { resize: vertical; min-height: 4.5rem; line-height: 1.5; }
.lbl {
  display: block; font-size: 0.7rem; font-weight: 600; color: #7a7a7a;
  letter-spacing: 0.03em; text-transform: uppercase; margin-bottom: 0.3rem;
}
html.sso-admin .solo-admin { display: inline-block !important; }

/* ---- Vista (lista / métricas) ---- */
.vista-toggle {
  display: inline-flex; border: 1px solid var(--border);
  border-radius: 999px; overflow: hidden; background: #fff;
}
.vista-toggle button {
  padding: 0.45rem 1rem; font-size: 0.82rem; color: #7a7a7a; background: #fff;
}
.vista-toggle button.active { background: var(--accent); color: #fff; font-weight: 500; }

/* ---- Marcadores del día ---- */
.marcador {
  display: flex; flex-direction: column; gap: 0.1rem;
  padding: 0.75rem 1.1rem; border-radius: 14px;
  border: 1px solid var(--border); background: #fff; min-width: 8rem;
}
.marcador-n { font-size: 1.45rem; font-weight: 600; line-height: 1.1; }
.marcador-lbl { font-size: 0.72rem; color: #7a7a7a; text-transform: uppercase; letter-spacing: 0.03em; }
.marcador.rojo { border-color: #E3332B; background: #fdeceb; }
.marcador.rojo .marcador-n { color: #E3332B; }

/* ---- Semáforo ----
   El color es lo primero que se lee de una fila, así que solo hay tres y
   siempre significan lo mismo: rojo = nadie la está llevando o va tarde;
   ámbar = toca hoy o mañana; sin punto = al día. */
.sem { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.sem-roja { background: #E3332B; }
.sem-ambar { background: #E9A100; }
.sem-ok { background: #cfd8e0; }

/* ---- Fila de incidencia ---- */
/* La lista es una tabla: se compara entre filas, y para eso hacen falta
   columnas alineadas y su cabecera. */
.inc-tabla-wrap { overflow-x: auto; }
.inc-tabla { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.inc-tabla th {
  text-align: left; font-size: 0.64rem; font-weight: 700; color: #9a9a9a;
  text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap;
  padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--bg-card); z-index: 1;
}
.inc-tabla td {
  padding: 0.55rem 0.6rem; border-bottom: 1px solid #F1F4F7; vertical-align: top;
}
.inc-th-sem, .inc-td-sem { width: 18px; padding-right: 0; }
.inc-td-sem .sem { margin-top: 0.3rem; }
.inc-fila { cursor: pointer; transition: background 0.12s; }
.inc-fila:hover td { background: var(--bg-page); }
.inc-fila.cerrada { opacity: 0.55; }
/* Los textos largos no pueden empujar las columnas de fecha fuera de la vista */
.inc-td-cli { max-width: 15rem; }
.inc-td-paso { max-width: 17rem; color: #323F49; }
.inc-td-fecha { white-space: nowrap; font-variant-numeric: tabular-nums; color: #7a7a7a; }
.inc-td-fecha.vencida { color: #E3332B; font-weight: 600; }
.inc-td-fecha.hoy { color: #B26A00; font-weight: 600; }
.inc-td-resp { white-space: nowrap; color: #7a7a7a; }
.inc-sinf { color: #b0b0b0; }
.inc-nunca { color: #E3332B; }
.inc-clas { display: block; color: #323F49; white-space: nowrap; }
/* Dentro de la celda: el dato manda y el matiz va debajo, más pequeño. */
.inc-id { display: block; font-size: 0.76rem; font-weight: 600; color: #4a5a66;
          font-variant-numeric: tabular-nums; white-space: nowrap; }
.inc-cliente { display: block; font-size: 0.84rem; font-weight: 600; color: #323F49;
               overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inc-sub { display: block; font-size: 0.72rem; color: #9a9a9a; margin-top: 0.1rem;
           overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inc-motivo { display: block; font-size: 0.68rem; color: #E3332B; font-weight: 500;
              margin-top: 0.15rem; }
.inc-vacio { padding: 2.5rem 1rem; text-align: center; color: #9a9a9a; font-size: 0.9rem; }

/* ---- Chips ---- */
.chip {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.12rem 0.55rem; border-radius: 999px;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.01em;
  background: var(--accent-soft); color: var(--accent-hover); white-space: nowrap;
}
.chip-gris { background: #eef1f4; color: #6a7681; }
.chip-rojo { background: #fdeceb; color: #E3332B; }
.chip-ambar { background: #fdf3e0; color: #9a6b00; }
.chip-verde { background: #e6f4ea; color: #1e6b34; }

/* ---- Chip del nº de Navision / contacto de HubSpot bajo un campo ---- */
.cliente-nav-chip {
  display: flex; align-items: center; gap: 0.5rem; margin-top: 0.4rem;
  padding: 0.35rem 0.6rem; border-radius: 8px;
  background: var(--accent-soft); border: 1px solid var(--border);
  font-size: 0.8rem; color: #2a2a2a;
}
.cliente-nav-chip span { flex: 1; min-width: 0; }
.cliente-nav-chip button {
  border: none; background: none; cursor: pointer; font-size: 1.1rem;
  line-height: 1; color: #7a7a7a; padding: 0 0.2rem;
}
.cliente-nav-chip button:hover { color: #E3332B; }

/* ---- Tablero (kanban) ----
   Mismo patrón que el tablero de «Envíos de muestras» de Rols One: columnas
   de ancho igual que ENVUELVEN al estrechar (sin scroll horizontal), tarjetas
   de ALTURA FIJA con el pie pegado abajo —si no, unas llevan aviso y otras no
   y el tablero se descuadra— y el nombre del cliente recortado a dos líneas. */
.inc-tablero {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem; align-items: start;
}
.inc-col {
  background: var(--soft-bg, #EDF2F6); border: 1px solid var(--border);
  border-radius: 12px; padding: 0.6rem; min-height: 120px;
  transition: background 0.12s, box-shadow 0.12s;
}
.inc-col.dragover { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.inc-col-cab {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: #7a8791; padding: 0.15rem 0.35rem 0.55rem;
}
.inc-col-n {
  background: #dbe3ea; color: #55636e; border-radius: 999px;
  padding: 0.05rem 0.5rem; font-size: 0.72rem;
}
.inc-col-mas { font-size: 0.72rem; color: #7a8791; text-align: center; padding: 0.3rem; }

.inc-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  padding: 0.55rem 0.6rem; margin-bottom: 0.6rem; cursor: pointer;
  transition: box-shadow 0.12s, border-color 0.12s;
  display: flex; flex-direction: column; min-height: 168px;
}
.inc-card:hover { border-color: var(--accent); box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.inc-card.arrastrando { opacity: 0.5; }
.inc-card[draggable="true"] { cursor: grab; }
.inc-card-top { display: flex; align-items: center; justify-content: space-between; gap: 0.4rem; }
.inc-card-top .inc-id { display: flex; align-items: center; gap: 0.35rem; }
.inc-fchip {
  font-size: 0.66rem; font-weight: 600; white-space: nowrap;
  padding: 0.02rem 0.45rem; border-radius: 999px;
  background: #eef1f4; color: #6a7681;
}
.inc-fchip.venc { background: #fdeceb; color: #E3332B; }
.inc-fchip.amb { background: #fdf3e0; color: #9a6b00; }
.inc-fchip.sinf { background: #fdeceb; color: #E3332B; }
.inc-card-cli {
  font-size: 0.9rem; font-weight: 600; color: #323F49; margin-top: 0.3rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.25;
}
.inc-card-chips { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.3rem; }
.inc-card-sub { font-size: 0.7rem; color: #8a939c; margin-top: 0.3rem; line-height: 1.35; }
.inc-card-sub .sindueno { color: #E3332B; }
.inc-card-paso {
  font-size: 0.76rem; color: #2a2a2a; margin-top: 0.3rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.inc-card-aviso { font-size: 0.7rem; margin-top: 0.3rem; line-height: 1.3; }
.inc-card-aviso.roja { color: #E3332B; font-weight: 500; }
.inc-card-aviso.ambar { color: #9a6b00; }
.inc-card-espera {
  font-size: 0.7rem; color: #8a5a1a; background: #fbf1df; border: 1px solid #ecd9b6;
  border-radius: 6px; padding: 0.2rem 0.4rem; margin-top: 0.35rem; line-height: 1.3;
}
.inc-card-pie { display: flex; align-items: center; gap: 0.3rem; margin-top: auto; padding-top: 0.5rem; }
.inc-mover {
  width: 26px; height: 24px; border: 1px solid var(--border); background: #fff;
  border-radius: 6px; cursor: pointer; color: #55636e; font-size: 1rem;
  line-height: 1; font-family: inherit;
}
.inc-mover:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-hover); }
.inc-mover:disabled { opacity: 0.3; cursor: default; }
.inc-ver {
  margin-left: auto; border: 1px solid var(--border); background: #fff; border-radius: 6px;
  padding: 0.2rem 0.65rem; font-size: 0.76rem; font-family: inherit; color: #55636e; cursor: pointer;
}
.inc-ver:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-hover); }

@media (max-width: 1200px) { .inc-tablero { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .inc-tablero { grid-template-columns: 1fr; } }

/* ---- Panel de detalle ---- */
.panel-fondo {
  position: fixed; inset: 0; background: rgba(50, 63, 73, 0.35);
  opacity: 0; pointer-events: none; transition: opacity 0.18s; z-index: 40;
}
.panel-fondo.show { opacity: 1; pointer-events: auto; }
.panel {
  position: fixed; top: 0; right: 0; height: 100vh; width: 560px; max-width: 96vw;
  background: #fff; border-left: 1px solid var(--border); z-index: 50;
  transform: translateX(100%); transition: transform 0.2s ease;
  display: flex; flex-direction: column;
}
.panel.show { transform: none; }
.panel-head {
  padding: 1.25rem 1.5rem 1rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; gap: 1rem;
}
.panel-body { flex: 1; overflow-y: auto; padding: 1.25rem 1.5rem 2rem; }
.panel-foot {
  padding: 0.9rem 1.5rem; border-top: 1px solid var(--border);
  display: flex; gap: 0.6rem; align-items: center; background: var(--bg-page);
}
/* Un botón de pie no se parte nunca, y su icono va AL LADO del texto, no
   encima: el reset de Tailwind pone los <svg> en display:block, así que «Abrir
   incidencia» se partía en dos líneas y medía el doble que «Cancelar», justo
   al lado y con el mismo estilo. En flex el icono vuelve a su sitio. */
.panel-foot button {
  display: inline-flex; align-items: center; justify-content: center;
  white-space: nowrap; flex-shrink: 0;
}
/* Y en el alta los dos son el mismo par: misma anchura, decidida por el más
   largo de los dos. */
#modal-nueva .panel-foot button { flex: 1 1 0; max-width: 12rem; }
.panel-sec { margin-bottom: 1.5rem; }
.panel-sec-titulo {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.72rem; font-weight: 600; color: #7a7a7a;
  text-transform: uppercase; letter-spacing: 0.04em;
  padding-bottom: 0.45rem; margin-bottom: 0.75rem; border-bottom: 1px solid var(--border);
}
.panel-sec-titulo svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }
.campo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem 1rem; }
.campo-full { grid-column: 1 / -1; }

/* Etiqueta con icono. .lbl era display:block; ahora es una fila con el icono
   delante. Las etiquetas sin icono (filtros, panel) siguen igual de bien. */
.lbl { display: flex; align-items: center; gap: 0.4rem; }
.lbl-ic { width: 15px; height: 15px; color: var(--accent); flex-shrink: 0; }
.lbl-req { color: #E3332B; }

/* Badge del título del modal (el "+" en un cuadrado redondeado). */
.modal-badge {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.modal-badge svg { width: 22px; height: 22px; }

/* Lupa dentro del buscador de HubSpot (sobrevive al nav-wrap que monta el JS). */
.con-lupa {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' fill='none' stroke='%237a7a7a' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 0.75rem center; background-size: 15px;
  padding-left: 2.1rem;
}

/* La letra pequeña que matiza un campo: por qué está ahí, o qué pasa si se
   deja en blanco. La usaban ya el alta (#n-importe-nota) y ahora la ficha. */
.campo-nota { font-size: 0.72rem; color: #9a9a9a; margin-top: 0.25rem; line-height: 1.35; }

/* Un dato que la ficha CALCULA, no algo que se rellene: mismo sitio que un
   campo pero sin borde ni fondo, para que nadie intente escribir dentro. */
.campo-valor { padding: 0.55rem 0.1rem; font-size: 0.85rem; color: #323F49; }
.campo-valor .vencida { color: #E3332B; font-weight: 600; }

/* Los tres números del ritmo, en Métricas. */
.ritmo-fila {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 0.6rem 0; border-bottom: 1px solid #F1F4F7;
}
.ritmo-fila:last-of-type { border-bottom: none; }
.ritmo-t { display: block; font-size: 0.83rem; font-weight: 600; color: #323F49; }
.ritmo-fila .campo-nota { margin-top: 0.15rem; }
.ritmo-n { margin-left: auto; display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }
.ritmo-n input {
  width: 3.6rem; padding: 0.35rem 0.5rem; border-radius: 10px; text-align: right;
  border: 1px solid var(--border); background: #fff; font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}
.ritmo-n input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,94,148,0.12); }
.ritmo-n input:disabled { background: var(--bg-page); color: #9a9a9a; }
.ritmo-n span { font-size: 0.75rem; color: #9a9a9a; }
#ritmo-eco { margin-top: 0.7rem; padding-top: 0.6rem; border-top: 1px solid #F1F4F7; }

/* Iconos dentro de los botones del pie, como los del botón de crear. */
.btn-outline-dark svg, .btn-danger svg {
  width: 15px; height: 15px; vertical-align: -2px; margin-right: 0.4rem;
}

/* Contador de caracteres bajo «Qué ha pasado». */
.char-count { text-align: right; font-size: 0.7rem; color: #b8bcc2; margin-top: 0.25rem; }
.char-count.lleno { color: #E3332B; }

/* El icono de los chips (nº Navision / HubSpot). */
.cliente-nav-chip .chip-ic { width: 15px; height: 15px; color: var(--accent); flex-shrink: 0; }

/* Aviso del pie del modal + icono del botón de crear. */
.foot-hint {
  margin-left: auto; display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.72rem; color: #9a9a9a; max-width: 250px; line-height: 1.25; text-align: right;
}
.foot-hint svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--accent); }
/* En la ficha el aviso explica al botón que tiene al lado, así que va pegado a
   él y no empujado a la derecha: allí «Borrar» ya ocupa esa esquina. */
#panel .foot-hint { margin-left: 0; text-align: left; max-width: 21rem; }
.btn-accent svg { width: 15px; height: 15px; vertical-align: -2px; margin-right: 0.4rem; }

/* Aviso del semáforo dentro del panel: dice por qué está en rojo, no solo que
   lo está. Un color sin motivo no hace que nadie actúe. */
.panel-alerta {
  display: flex; gap: 0.6rem; align-items: flex-start;
  padding: 0.7rem 0.9rem; border-radius: 12px; margin-bottom: 1.25rem;
  font-size: 0.83rem; line-height: 1.45;
}
.panel-alerta.roja { background: #fdeceb; color: #a3231d; }
.panel-alerta.ambar { background: #fdf3e0; color: #7d5700; }
.panel-alerta.ok { display: none; }

/* ---- Diario ---- */
.diario-nota {
  padding: 0.7rem 0.85rem; border-radius: 12px; background: var(--bg-page);
  border: 1px solid var(--border); margin-bottom: 0.6rem;
}
.diario-nota.contacto { border-left: 3px solid var(--accent); }
.diario-meta {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.72rem; color: #9a9a9a; margin-bottom: 0.3rem;
}
.diario-texto { font-size: 0.85rem; line-height: 1.5; white-space: pre-wrap; }
.diario-borrar { margin-left: auto; color: #c0c0c0; font-size: 0.9rem; line-height: 1; }
.diario-borrar:hover { color: #E3332B; }

/* ---- Métricas ---- */
.met-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.met-fila {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.4rem 0; font-size: 0.85rem; border-bottom: 1px solid var(--border);
}
.met-fila:last-child { border-bottom: none; }
.met-fila .met-n { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.met-barra { height: 6px; border-radius: 999px; background: var(--accent-soft); flex-shrink: 0; }
.met-vacio { font-size: 0.85rem; color: #9a9a9a; padding: 0.5rem 0; }

/* ---- Toast ---- */
#toast {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(1rem);
  background: #323F49; color: #fff; padding: 0.65rem 1.2rem; border-radius: 999px;
  font-size: 0.85rem; opacity: 0; pointer-events: none; transition: all 0.2s; z-index: 60;
}
#toast.show { opacity: 1; transform: translateX(-50%); }

/* ---- Buscador de clientes de Navision ----
   La copia local de clientes vive en la calculadora; aquí solo se pinta el
   desplegable. Mismo aire que el selector de cliente de los presupuestos, para
   que quien use las dos pantallas reconozca el gesto. */
.nav-wrap { position: relative; }
.nav-dd {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 14px 38px -10px rgba(77, 77, 77, 0.20);
  z-index: 60; max-height: 320px; overflow: hidden;
  display: flex; flex-direction: column;
}
.nav-dd[hidden] { display: none; }
.nav-dd-cab {
  padding: 0.5rem 0.9rem; font-size: 0.68rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: #7a7a7a; background: var(--bg-page);
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.nav-dd-lista { overflow-y: auto; padding: 0.2rem 0; }
.nav-op { padding: 0.5rem 0.9rem; cursor: pointer; transition: background 0.08s; }
.nav-op:hover, .nav-op.activa { background: var(--accent-soft); }
.nav-op-nom { font-size: 0.85rem; font-weight: 600; color: #323F49; }
.nav-op-meta { font-size: 0.72rem; color: #7a7a7a; margin-top: 0.1rem; }
.nav-op-vacio { padding: 0.7rem 0.9rem; font-size: 0.82rem; color: #9a9a9a; }
/* Distintivo de "esta incidencia ya está cruzada con el ERP". */
.nav-ok {
  display: inline-flex; align-items: center; gap: 0.3rem; margin-top: 0.35rem;
  font-size: 0.72rem; font-weight: 600; color: #1e6b34;
}

/* ---- Contacto de HubSpot: el chip y el nombre abren su ficha ---- */
/* Se enlaza a app.hubspot.com/contacts/<portal>/record/0-1/<id>, en otra
   pestaña: quien mira una incidencia no quiere perder la incidencia. */
.chip-enlace { text-decoration: none; transition: background 0.12s, color 0.12s; }
.chip-enlace:hover { background: var(--accent-soft); color: var(--accent-hover); }
.hs-enlace { color: inherit; text-decoration: none; }
.hs-enlace:hover { text-decoration: underline; }

/* ---------------- Adjuntos: fotos y archivos de la incidencia ------------- */
.adj-zona {
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  border: 1px dashed var(--border); border-radius: 12px;
  padding: 0.6rem 0.8rem; transition: background 0.12s, border-color 0.12s;
}
.adj-zona.dragover { border-color: var(--accent); background: var(--accent-soft); }
.adj-hint { font-size: 0.72rem; color: #9a9a9a; }

/* Lo elegido en el alta, a la espera de que exista la incidencia */
.adj-lista { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.5rem; }
.adj-chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: #f4f7f9; border: 1px solid var(--border); border-radius: 10px;
  padding: 0.25rem 0.5rem; font-size: 0.75rem; max-width: 15rem;
}
.adj-mini { width: 26px; height: 26px; object-fit: cover; border-radius: 6px; flex: none; }
.adj-ext {
  width: 26px; height: 26px; flex: none; border-radius: 6px; background: #e3e9ee;
  color: #6a7681; font-size: 0.58rem; font-weight: 700; text-transform: uppercase;
  display: inline-flex; align-items: center; justify-content: center;
}
.adj-nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adj-tam { color: #9a9a9a; font-size: 0.68rem; white-space: nowrap; }
.adj-quitar {
  border: none; background: none; cursor: pointer; color: #9a9a9a;
  font-size: 0.95rem; line-height: 1; padding: 0 0.1rem;
}
.adj-quitar:hover { color: #E3332B; }

/* Rejilla de la ficha: la foto manda, el nombre acompaña */
.adj-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 0.6rem; margin-bottom: 0.7rem;
}
.adj-item { position: relative; }
.adj-item a { display: block; }
.adj-foto {
  width: 100%; height: 88px; object-fit: cover; border-radius: 10px;
  border: 1px solid var(--border); background: #f4f7f9; display: block;
}
.adj-foto:hover { border-color: var(--accent); }
.adj-doc {
  width: 100%; height: 88px; border-radius: 10px; border: 1px solid var(--border);
  background: #f4f7f9; color: #6a7681; font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; display: flex; align-items: center; justify-content: center;
}
.adj-doc:hover { border-color: var(--accent); color: var(--accent-hover); }
.adj-item-pie { margin-top: 0.25rem; display: flex; flex-direction: column; min-width: 0; }
.adj-item-pie .adj-nom { font-size: 0.7rem; color: #323F49; }
.adj-meta { font-size: 0.62rem; color: #9a9a9a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adj-borrar {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px;
  border: none; border-radius: 50%; cursor: pointer; line-height: 1;
  background: rgba(20,26,31,0.55); color: #fff; font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center; opacity: 0;
  transition: opacity 0.12s, background 0.12s;
}
.adj-item:hover .adj-borrar { opacity: 1; }
.adj-borrar:hover { background: #E3332B; }
.adj-vacio { font-size: 0.78rem; color: #9aa7b0; margin-bottom: 0.6rem; }
