/* ============================================================
   DANGOFE OS LIQUID V2 — fiscal.css
   Módulo GESTIÓN FISCAL (DANGOFE-FISCAL-001 · v1.0.23)
   Estética Liquid Glass: reutiliza glass-normal / glass-soft
   y solo añade la capa propia del módulo (prefijo fx-).
   ============================================================ */

.fiscal { display: flex; flex-direction: column; gap: 16px; }

/* ---------- encabezado ---------- */
.fx-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fx-hero h1 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.55rem; }
.fx-hero__sub { margin: 4px 0 0; opacity: .75; font-size: .92rem; }

/* ---------- pestañas internas ---------- */
.fx-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.fx-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--glass-border);
  background: var(--glass-bg-input); color: inherit; cursor: pointer;
  font: inherit; font-size: .9rem; backdrop-filter: blur(8px); transition: all .18s ease;
}
.fx-tab:hover { background: var(--glass-bg-hover); }
.fx-tab.is-active { background: rgba(99,132,255,.28); border-color: rgba(99,132,255,.55); font-weight: 600; }

/* ---------- pantalla de candado ---------- */
.fx-lock-wrap { display: flex; justify-content: center; padding: 8vh 12px 4vh; }
.fx-lock { max-width: 420px; width: 100%; padding: 34px 30px; border-radius: 22px; text-align: center; }
.fx-lock__icon {
  width: 68px; height: 68px; margin: 0 auto 14px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(99,132,255,.18); border: 1px solid rgba(99,132,255,.4);
}
.fx-lock h2 { margin: 0 0 6px; }
.fx-lock__form { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.fx-lock__btn { justify-content: center; }

/* ---------- utilidades ---------- */
.fx-sub { opacity: .78; font-size: .9rem; line-height: 1.45; margin: 6px 0; }
.fx-nota { opacity: .65; font-size: .82rem; margin: 6px 2px; display: flex; align-items: center; gap: 6px; }
.fx-error { color: #ff8f8f; font-size: .9rem; display: flex; align-items: center; gap: 6px; }
.fx-cargando { padding: 42px 18px; border-radius: 18px; text-align: center; opacity: .85; }
.fx-cargando p { margin: 10px 0 0; }

.fx-input {
  padding: 9px 12px; border-radius: 12px; border: 1px solid var(--glass-border);
  background: var(--glass-bg-input); color: inherit; font: inherit; font-size: .9rem;
  outline: none; transition: border-color .15s ease;
}
.fx-input:focus { border-color: rgba(99,132,255,.65); }
select.fx-input option { color: #16181f; }

/* ---------- tarjetas del inicio ---------- */
.fx-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 12px; }
.fx-card { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: 18px; }
.fx-card__icon {
  width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(99,132,255,.18); border: 1px solid rgba(99,132,255,.35);
}
.fx-card__titulo { margin: 0; font-size: .82rem; opacity: .75; }
.fx-card__valor { margin: 3px 0 0; font-size: 1.28rem; font-weight: 700; }
.fx-card__sub { margin: 2px 0 0; font-size: .78rem; opacity: .6; }

.fx-panel { padding: 16px 18px; border-radius: 18px; }
.fx-panel h3 { margin: 0 0 8px; display: flex; align-items: center; gap: 7px; font-size: 1.02rem; }
.fx-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.fx-quick { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

.fx-periodos { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-top: 8px; }
.fx-periodo {
  display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--glass-border); cursor: pointer; color: inherit; font: inherit;
  text-align: left; transition: transform .15s ease, background .15s ease;
}
.fx-periodo:hover { transform: translateY(-2px); background: var(--glass-bg-hover); }
.fx-periodo__nombre { font-weight: 600; text-transform: capitalize; }
.fx-periodo__datos { font-size: .8rem; opacity: .75; }
.fx-periodo__itbis { font-size: .78rem; opacity: .6; }

/* ---------- barra de herramientas ---------- */
.fx-toolbar { padding: 12px 14px; border-radius: 16px; display: flex; flex-direction: column; gap: 10px; }
.fx-toolbar__fila { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fx-toolbar__sep { flex: 1; }
.fx-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.fx-chip {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--glass-border);
  background: var(--glass-bg); color: inherit; cursor: pointer; font: inherit; font-size: .82rem;
}
.fx-chip:hover { background: var(--glass-bg-hover); }
.fx-chip.is-active { background: rgba(99,132,255,.3); border-color: rgba(99,132,255,.55); font-weight: 600; }
.fx-input--buscar { flex: 1; min-width: 190px; }
.fx-input--fecha { width: 145px; }
.fx-check { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; opacity: .85; cursor: pointer; }
.fx-campo-inline { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; }

/* ---------- totales ---------- */
.fx-totales { display: flex; gap: 16px; flex-wrap: wrap; padding: 11px 16px; border-radius: 14px; margin-bottom: 10px; }
.fx-total { font-size: .85rem; opacity: .85; }
.fx-total b { font-weight: 700; opacity: 1; }

/* ---------- tabla ---------- */
.fx-tabla-wrap { border-radius: 16px; overflow: auto; }
.fx-tabla { width: 100%; border-collapse: collapse; font-size: .87rem; min-width: 720px; }
.fx-tabla th {
  text-align: left; padding: 11px 12px; font-size: .74rem; text-transform: uppercase;
  letter-spacing: .05em; opacity: .65; border-bottom: 1px solid var(--glass-border);
}
.fx-tabla td { padding: 9px 12px; border-bottom: 1px solid var(--glass-border); vertical-align: top; }
.fx-tabla tbody tr:hover { background: var(--glass-bg); }
.fx-tabla tfoot td { border-top: 2px solid var(--glass-border); border-bottom: none; padding: 12px; }
.fx-td-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fx-td-ncf { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; white-space: nowrap; }
.fx-td-prov { font-weight: 600; max-width: 260px; }
.fx-td-nota { display: block; font-weight: 400; font-size: .76rem; opacity: .6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.fx-td-notacol { font-size: .8rem; opacity: .75; max-width: 190px; }
.fx-td-acciones { white-space: nowrap; text-align: right; }
.fx-fila--anulada { opacity: .5; }
.fx-fila--anulada td { text-decoration: line-through; }
.fx-fila--anulada td.fx-td-acciones, .fx-fila--anulada td:last-child { text-decoration: none; }

.fx-mini {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  width: 30px; height: 30px; margin-left: 4px; border-radius: 9px;
  border: 1px solid var(--glass-border); background: var(--glass-bg-input);
  color: inherit; cursor: pointer; transition: background .15s ease;
}
.fx-mini:hover { background: var(--glass-bg-active); }
.fx-mini--danger:hover { background: rgba(255,90,90,.28); border-color: rgba(255,90,90,.5); }

.fx-badge {
  display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px;
  font-size: .72rem; font-weight: 600; border: 1px solid var(--glass-border);
  background: var(--glass-bg-strong); text-transform: capitalize;
}
.fx-badge--ok, .fx-badge--seed, .fx-badge--manual { background: rgba(80,200,140,.18); border-color: rgba(80,200,140,.4); }
.fx-badge--importacion { background: rgba(99,132,255,.18); border-color: rgba(99,132,255,.4); }
.fx-badge--anulada { background: rgba(255,110,110,.18); border-color: rgba(255,110,110,.45); }

/* ---------- importación ---------- */
.fx-import { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
.fx-import-res { margin-top: 12px; padding: 14px 16px; border-radius: 14px; }
.fx-import-res p { margin: 0 0 8px; }
.fx-import-cifras { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- formularios / modales ---------- */
.fx-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 12px; }
.fx-campo { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; }
.fx-campo > span { opacity: .72; }
.fx-campo--ancho { grid-column: 1 / -1; }
.fx-campo--btn { display: flex; align-items: flex-end; }
.fx-grupo { margin: 14px 0 8px; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; opacity: .65; }
.fx-mas { margin: 12px 0 4px; }
.fx-mas summary { cursor: pointer; font-size: .85rem; opacity: .8; padding: 6px 0; }
.fx-mas > .fx-grid { margin-top: 10px; }

.fx-modal-overlay {
  position: fixed; inset: 0; z-index: var(--z-modal); display: flex; align-items: center; justify-content: center;
  background: rgba(8,10,18,.55); backdrop-filter: blur(6px); padding: 18px;
}
.fx-modal {
  width: 100%; max-width: 760px; max-height: 90vh; display: flex; flex-direction: column;
  border-radius: 20px; overflow: hidden;
}
.fx-modal--chico { max-width: 480px; }
.fx-modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 10px; border-bottom: 1px solid var(--glass-border);
}
.fx-modal__head h2 { margin: 0; font-size: 1.08rem; display: flex; align-items: center; gap: 8px; }
.fx-modal__close {
  background: none; border: none; color: inherit; cursor: pointer; padding: 6px;
  border-radius: 10px; display: flex;
}
.fx-modal__close:hover { background: var(--glass-bg-hover); }
.fx-modal__body { padding: 14px 20px; overflow-y: auto; }
.fx-modal__foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 12px 20px 16px; border-top: 1px solid var(--glass-border);
}

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  .fx-hero h1 { font-size: 1.25rem; }
  .fx-toolbar__fila { flex-direction: column; align-items: stretch; }
  .fx-input--buscar, .fx-input--fecha { width: 100%; }
  .fx-tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .fx-tab { white-space: nowrap; }
  .fx-modal { max-height: 94vh; }
}


/* ============================================================
   v1.0.24 — FISCAL-02: empresas, fotos, facturación, rubros
   ============================================================ */

/* ---------- selector de empresa ---------- */
.fx-empresas { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; border-radius: 14px; }
.fx-emp-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; opacity: .65; display: flex; align-items: center; gap: 6px; }
.fx-emp-chip {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--glass-border);
  background: var(--glass-bg-input); color: inherit; cursor: pointer; font-size: .86rem;
  display: inline-flex; align-items: center; gap: 6px; transition: background .15s, border-color .15s;
}
.fx-emp-chip:hover { background: var(--glass-bg-hover); }
.fx-emp-chip.is-active { background: rgba(120,205,150,.24); border-color: rgba(120,205,150,.55); font-weight: 600; }

/* ---------- alertas del inicio ---------- */
.fx-alertas { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.fx-alerta {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 14px;
  font-size: .88rem; border: 1px solid var(--glass-border); background: var(--glass-bg-input);
}
.fx-alerta--critica { background: rgba(255,95,95,.14); border-color: rgba(255,95,95,.45); }
.fx-alerta--aviso { background: rgba(255,190,80,.13); border-color: rgba(255,190,80,.42); }
.fx-alerta--info { background: rgba(99,132,255,.13); border-color: rgba(99,132,255,.4); }

/* ---------- subir facturas (fotos / PDF) ---------- */
.fx-dropzone {
  border: 2px dashed var(--glass-border); border-radius: 18px; padding: 34px 20px;
  text-align: center; cursor: pointer; transition: background .15s, border-color .15s;
}
.fx-dropzone:hover, .fx-dropzone.is-over { background: rgba(99,132,255,.12); border-color: rgba(99,132,255,.6); }
.fx-dropzone p { margin: 8px 0 0; opacity: .75; font-size: .9rem; }
.fx-oculto { display: none !important; }

.fx-pendientes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 10px; }
.fx-pend { border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--glass-border); background: var(--glass-bg); }
.fx-pend__img { width: 100%; height: 150px; object-fit: cover; display: block; background: rgba(0,0,0,.25); }
.fx-pend__info { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.fx-pend__nom { font-size: .8rem; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* miniaturas de fotos por compra */
.fx-fotos-mini { display: flex; gap: 10px; flex-wrap: wrap; }
.fx-foto-mini { width: 140px; display: flex; flex-direction: column; gap: 4px; }
.fx-foto-mini img { width: 100%; height: 100px; object-fit: cover; border-radius: 10px; border: 1px solid var(--glass-border); }
.fx-foto-mini__pdf {
  width: 100%; height: 100px; border-radius: 10px; border: 1px solid var(--glass-border);
  display: flex; align-items: center; justify-content: center; background: var(--glass-bg-input); font-size: .8rem; opacity: .8;
}
.fx-foto-mini__nom { font-size: .72rem; opacity: .65; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-clip-n { font-size: .72rem; margin-left: 2px; }
.fx-mini--con-foto { background: rgba(120,205,150,.16); border-color: rgba(120,205,150,.4); }

/* ---------- validación lado a lado ---------- */
.fx-modal--valida { max-width: 1120px; }
.fx-valida {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; align-items: start;
  padding: 14px 20px 18px; overflow-y: auto; /* el modal no usa fx-modal__body: scroll propio */
}
.fx-valida__doc { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fx-valida__zoombar { display: flex; align-items: center; gap: 8px; font-size: .82rem; opacity: .9; }
.fx-valida__visor {
  border-radius: 14px; border: 1px solid var(--glass-border); background: rgba(0,0,0,.3);
  overflow: auto; max-height: 62vh; min-height: 260px; padding: 8px;
}
.fx-valida__visor img { display: block; max-width: 100%; transform-origin: top left; }
.fx-valida__pdf { width: 100%; height: 60vh; border: none; border-radius: 10px; }
.fx-valida__form { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.fx-valida__foot { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 4px; }
.fx-input--ocr { border-color: rgba(120,205,150,.6) !important; background: rgba(120,205,150,.1); }

/* ---------- facturación ---------- */
.fx-input--num { text-align: right; font-variant-numeric: tabular-nums; }
.fx-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fx-prev-cab { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px; background: var(--glass-bg); font-size: .88rem; }
.fx-prev-tot { display: flex; gap: 18px; justify-content: flex-end; flex-wrap: wrap; padding: 10px 14px; font-size: .9rem; }
.fx-prev-tot__total { font-size: 1.05rem; font-weight: 700; }
.fx-tabla--renglones { min-width: 560px; }
.fx-tabla--renglones .fx-input { padding: 6px 8px; font-size: .84rem; width: 100%; min-width: 70px; }

/* ---------- responsive v1.0.24 ---------- */
@media (max-width: 860px) {
  .fx-valida { grid-template-columns: 1fr; }
  .fx-valida__visor { max-height: 42vh; }
  .fx-modal--valida { max-width: 760px; }
}



/* ============================================================
   v1.0.25 — FISCAL-03: DGII, similitud de rubros y catálogos web
   ============================================================ */

/* ---------- badges de estado DGII ---------- */
.fx-badge--dgii-ok { background: rgba(120,205,150,.2); border: 1px solid rgba(120,205,150,.5); color: #b8f0cd; }
.fx-badge--dgii-mal { background: rgba(255,95,95,.16); border: 1px solid rgba(255,95,95,.5); color: #ffc4c4; }
.fx-badge--dgii-neutro { background: var(--glass-bg-strong); border: 1px solid var(--glass-border); color: inherit; opacity: .9; }

/* ---------- rubros sugeridos (chips confirmables por el humano) ---------- */
.fx-sug-label { display: inline-block; margin-top: 6px; font-size: .8rem; opacity: .75; }
.fx-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--glass-border); background: var(--glass-bg-input); color: inherit;
  font-size: .8rem; cursor: pointer; transition: background .15s, border-color .15s;
}
.fx-chip:hover { background: var(--glass-bg-hover); }
.fx-chip--sug { background: rgba(99,132,255,.14); border-color: rgba(99,132,255,.45); margin: 3px 3px 0 0; }
.fx-chip--sug:hover { background: rgba(99,132,255,.26); }
.fx-chip.is-active { background: rgba(120,205,150,.22); border-color: rgba(120,205,150,.55); font-weight: 600; }

/* ---------- aviso DGII en la vista previa de factura (no bloqueante) ---------- */
.fx-aviso-dgii {
  margin: 10px 0 0; padding: 10px 14px; border-radius: 14px; font-size: .86rem;
  background: rgba(255,190,80,.13); border: 1px solid rgba(255,190,80,.45);
}

/* ---------- catálogo: fuentes (tienda / página web de origen) ---------- */
.fx-fuente-chip {
  display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .72rem;
  background: rgba(99,132,255,.14); border: 1px solid rgba(99,132,255,.4); white-space: nowrap;
}
.fx-chips--fuentes { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 10px; }
.fx-td-fecha { font-size: .72rem; opacity: .6; display: block; margin-top: 2px; }

/* ---------- pegado desde página web ---------- */
.fx-textarea {
  width: 100%; min-height: 150px; resize: vertical; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--glass-border); background: var(--glass-bg-input); color: inherit;
  font-size: .86rem; font-family: inherit; line-height: 1.45;
}
.fx-textarea:focus { outline: none; border-color: rgba(99,132,255,.6); background: rgba(99,132,255,.08); }
.fx-tabla--pegado .fx-input { padding: 6px 8px; font-size: .84rem; width: 100%; min-width: 80px; }

/* ---------- checkbox en línea (incluir rubros similares) ---------- */
.fx-check { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; cursor: pointer; }
.fx-check input { width: 16px; height: 16px; accent-color: rgba(120,205,150,.9); cursor: pointer; }

/* ---------- explorador "qué puedo facturarle" ---------- */
.fx-exp-cab { padding: 10px 14px; border-radius: 14px; background: var(--glass-bg); font-size: .9rem; margin-bottom: 10px; }
.fx-exp-buscar { margin-bottom: 10px; }
.fx-exp-buscar .fx-input { flex: 1; min-width: 180px; }
.fx-exp-sec { margin-top: 12px; }
.fx-exp-sec h4 { margin: 0 0 8px; font-size: .92rem; display: flex; align-items: center; gap: 6px; }
.fx-exp-sim { margin: 10px 0 0; }
.fx-exp-sim .fx-tabla-wrap { margin-top: 6px; }


/* ============================================================
   FISCAL-04 (v1.0.26) — Lector inteligente, escáner y álbum
   ============================================================ */

/* ---------- tarjetas de acción en "Subir facturas" ---------- */
.fx-lector-acciones { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
@media (max-width: 720px) { .fx-lector-acciones { grid-template-columns: 1fr; } }
.fx-scan-card {
  border-radius: 16px; padding: 22px 16px; text-align: center; cursor: pointer;
  border: 1px dashed var(--glass-border); display: flex; flex-direction: column;
  align-items: center; gap: 8px; transition: background .18s ease, border-color .18s ease;
}
.fx-scan-card:hover { background: rgba(99,132,255,.1); border-color: rgba(99,132,255,.55); }
.fx-scan-card p { margin: 0; font-size: .9rem; }
.fx-scan-card .fx-sub { font-size: .78rem; }

/* ---------- barra de progreso del flujo automático ---------- */
.fx-progreso { border-radius: 16px; padding: 12px 16px; margin: 10px 0; }
.fx-progreso__pasos { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.fx-progreso__paso {
  display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; opacity: .45;
  padding: 4px 10px; border-radius: 999px; border: 1px solid var(--glass-border);
}
.fx-progreso__paso.is-activo {
  opacity: 1; background: rgba(99,132,255,.16); border-color: rgba(99,132,255,.5); font-weight: 600;
}
.fx-progreso__paso.is-hecho { opacity: .85; background: rgba(120,205,150,.14); border-color: rgba(120,205,150,.45); }
.fx-progreso__extra { margin: 8px 0 0; font-size: .8rem; opacity: .75; }

/* ---------- badge de confianza (reglas ≥95 / 80–94 / <80) ---------- */
.fx-conf-badge {
  display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .72rem; font-weight: 700;
  border: 1px solid transparent; vertical-align: middle;
}
.fx-conf-badge--ok { background: rgba(120,205,150,.2); border-color: rgba(120,205,150,.5); color: #b8f0cd; }
.fx-conf-badge--ambar { background: rgba(255,190,80,.18); border-color: rgba(255,190,80,.5); color: #ffe1a8; }
.fx-conf-badge--mal { background: rgba(255,95,95,.16); border-color: rgba(255,95,95,.5); color: #ffc4c4; }
.fx-badge--neutro { background: var(--glass-bg-strong); border-color: var(--glass-border); }

/* ---------- campos del visor según confianza ---------- */
.fx-input--ambar { border-color: rgba(255,190,80,.65) !important; background: rgba(255,190,80,.08) !important; }
.fx-input--dudoso { border-color: rgba(255,95,95,.55) !important; background: rgba(255,95,95,.06) !important; }
.fx-input--conflicto { border-color: rgba(255,95,95,.75) !important; background: rgba(255,95,95,.12) !important; }
.fx-campo__aviso { font-size: .72rem; opacity: .8; margin: 2px 0 0; display: flex; align-items: flex-start; gap: 4px; }
.fx-campo--check { flex-direction: row; align-items: center; gap: 8px; }
.fx-visor-aviso {
  margin: 6px 0 0; padding: 8px 12px; border-radius: 12px; font-size: .8rem;
  background: rgba(255,190,80,.12); border: 1px solid rgba(255,190,80,.4);
  display: flex; align-items: flex-start; gap: 6px;
}
.fx-visor-mate { margin: 6px 0 0; padding: 8px 12px; border-radius: 12px; font-size: .8rem; display: flex; gap: 6px; align-items: flex-start; }
.fx-visor-mate--ok { background: rgba(120,205,150,.12); border: 1px solid rgba(120,205,150,.4); }
.fx-visor-mate--mal { background: rgba(255,95,95,.12); border: 1px solid rgba(255,95,95,.45); }

/* ---------- escáner con la cámara ---------- */
.fx-modal--scanner { max-width: 860px; }
.fx-scanner { display: flex; flex-direction: column; gap: 10px; }
.fx-scanner__visor { position: relative; width: 100%; border-radius: 14px; overflow: hidden; background: rgba(0,0,0,.4); }
.fx-scanner__visor video { display: block; width: 100%; max-height: 56vh; object-fit: contain; }
.fx-scanner__visor canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none;
}
.fx-sc-estado {
  position: absolute; left: 10px; bottom: 10px; padding: 4px 12px; border-radius: 999px;
  font-size: .76rem; background: rgba(0,0,0,.55); border: 1px solid var(--glass-border); backdrop-filter: blur(6px);
}
.fx-scanner__tira { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0; min-height: 4px; }
.fx-sc-mini { position: relative; flex: 0 0 auto; width: 72px; border-radius: 10px; overflow: hidden; }
.fx-sc-mini img { display: block; width: 100%; height: 96px; object-fit: cover; }
.fx-sc-mini span {
  position: absolute; left: 4px; top: 4px; padding: 0 6px; border-radius: 999px; font-size: .68rem;
  background: rgba(0,0,0,.6); border: 1px solid var(--glass-border);
}
.fx-scanner__foot { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- álbum documental ---------- */
.fx-album-filtros { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.fx-album-filtros .fx-input, .fx-album-filtros .fx-select { min-width: 120px; }
.fx-album-prov { margin-top: 14px; }
.fx-album-prov > h3 { margin: 0 0 4px; font-size: .98rem; display: flex; align-items: center; gap: 6px; }
.fx-album-mes { margin: 8px 0 0; }
.fx-album-mes > h4 { margin: 0 0 8px; font-size: .82rem; opacity: .7; text-transform: capitalize; }
.fx-album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.fx-album-card {
  border-radius: 14px; overflow: hidden; cursor: pointer; border: 1px solid var(--glass-border);
  background: var(--glass-bg); transition: transform .15s ease, border-color .15s ease;
}
.fx-album-card:hover { transform: translateY(-2px); border-color: rgba(99,132,255,.5); }
.fx-album-card__img { position: relative; height: 110px; background: rgba(0,0,0,.25); display: flex; align-items: center; justify-content: center; }
.fx-album-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fx-album-card__pags {
  position: absolute; right: 6px; top: 6px; padding: 0 7px; border-radius: 999px; font-size: .68rem;
  background: rgba(0,0,0,.6); border: 1px solid var(--glass-border);
}
.fx-album-card__info { padding: 8px 10px; font-size: .76rem; display: flex; flex-direction: column; gap: 2px; }
.fx-album-card__ncf { opacity: .65; font-size: .7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-album-full { max-width: 1000px; }
.fx-album-detalle { display: grid; grid-template-columns: 1.1fr .9fr; gap: 14px; }
@media (max-width: 860px) { .fx-album-detalle { grid-template-columns: 1fr; } }
.fx-album-detalle__imgs { display: flex; flex-direction: column; gap: 8px; max-height: 62vh; overflow: auto; border-radius: 12px; }
.fx-album-detalle__imgs img { width: 100%; border-radius: 10px; display: block; }
.fx-album-detalle__datos { font-size: .86rem; display: flex; flex-direction: column; gap: 6px; }

/* ---------- botón de peligro (resetear pruebas) y modal encima ---------- */
.fx-btn-peligro {
  background: rgba(255,95,95,.16) !important; border-color: rgba(255,95,95,.5) !important; color: #ffc4c4 !important;
}
.fx-btn-peligro:hover { background: rgba(255,95,95,.28) !important; }
.fx-modal-overlay--encima { z-index: calc(var(--z-modal) + 10); }
.fx-pend__img img { width: 100%; height: 100%; object-fit: cover; display: block; }


/* ---------- v1.0.27: estados de factura ---------- */
.fx-badge--estado { padding: 1px 9px; border-radius: 999px; font-size: .68rem; border: 1px solid var(--glass-border); background: var(--glass-bg-strong); white-space: nowrap; }
.fx-badge--borrador { background: rgba(160,160,160,.18); border-color: rgba(160,160,160,.45); color: #d8d8d8; }
.fx-badge--emitida  { background: rgba(99,132,255,.18); border-color: rgba(99,132,255,.5);  color: #b9c8ff; }
.fx-badge--enviada  { background: rgba(90,200,250,.16); border-color: rgba(90,200,250,.5);  color: #b6e6ff; }
.fx-badge--pagada   { background: rgba(80,220,140,.16); border-color: rgba(80,220,140,.5);  color: #b8f0cf; }
.fx-badge--parcial  { background: rgba(255,200,90,.16); border-color: rgba(255,200,90,.5);  color: #ffe3ae; }
.fx-badge--vencida  { background: rgba(255,140,80,.18); border-color: rgba(255,140,80,.55); color: #ffcdb3; }
.fx-badge--anulada  { background: rgba(255,95,95,.18);  border-color: rgba(255,95,95,.55);  color: #ffc4c4; }

/* ---------- v1.0.27: catálogo revista ---------- */
.fx-rev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-top: 10px; }
.fx-rev-card { position: relative; border-radius: 14px; padding: 10px; border: 1px solid var(--glass-border); background: var(--glass-bg); display: flex; flex-direction: column; gap: 6px; }
.fx-rev-card:hover { border-color: rgba(99,132,255,.5); }
.fx-rev-fav { position: absolute; top: 8px; right: 10px; font-size: 18px; cursor: pointer; opacity: .55; background: none; border: none; color: inherit; }
.fx-rev-fav.is-active { opacity: 1; color: #ffd76a; }
.fx-rev-img { width: 100%; height: 120px; object-fit: contain; border-radius: 10px; background: rgba(0,0,0,.22); }
.fx-rev-img--vacia { display: flex; align-items: center; justify-content: center; opacity: .5; font-size: .78rem; }
.fx-rev-info h4 { margin: 0; font-size: .84rem; }
.fx-rev-precio { font-weight: 700; font-size: .9rem; }
.fx-rev-acciones { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.fx-rev-pag { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; gap: 8px; }

/* ---------- v1.0.27: progreso de envío masivo ---------- */
.fx-em-progreso { height: 10px; border-radius: 999px; background: var(--glass-bg-hover); overflow: hidden; }
.fx-em-progreso__barra { height: 100%; border-radius: 999px; background: rgba(99,132,255,.85); transition: width .25s ease; }
.fx-em-log { max-height: 220px; overflow: auto; font-size: 12px; border-radius: 10px; background: rgba(0,0,0,.2); padding: 8px 10px; margin-top: 8px; }

/* ---------- v1.0.27: utilidades de modales y filtros ---------- */
.fx-md-acciones { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.fx-num-filtros { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.fx-sug-panel { padding: 10px 12px; border-radius: 12px; margin-top: 10px; border: 1px dashed rgba(99,132,255,.45); background: rgba(99,132,255,.08); }
.fx-sug-item { display: block; margin: 4px 0; font-size: .82rem; }
.fx-docs-arbol details { margin: 4px 0; }
.fx-docs-mes { margin-left: 14px; }
.fx-logo-prev { max-height: 44px; max-width: 120px; border-radius: 6px; }
.fx-cmp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 720px) { .fx-cmp-grid { grid-template-columns: 1fr; } }
.fx-cmp-col { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--glass-border); background: var(--glass-bg-soft); }
.fx-cmp-dif { color: #ffe3ae; background: rgba(255,200,90,.12); border-radius: 6px; padding: 0 4px; }


/* ---------- v1.0.32: tarjeta resumen del catálogo de proveedores ---------- */
.fx-cat-resumen { padding: 14px 16px; border-radius: 14px; margin: 10px 0 14px; }
.fx-cat-resumen__stats { display: flex; gap: 18px; flex-wrap: wrap; }
.fx-cat-stat { display: flex; flex-direction: column; min-width: 74px; }
.fx-cat-stat__num { font-size: 1.45rem; font-weight: 700; line-height: 1.15; }
.fx-cat-stat__lbl { font-size: .74rem; opacity: .75; }
.fx-cat-stat--ok .fx-cat-stat__num { color: #7ed6a5; }
.fx-cat-stat--warn .fx-cat-stat__num { color: #ffce7a; }
.fx-cat-stat--err .fx-cat-stat__num { color: #ff9c9c; }
.fx-cat-resumen__fecha { margin: 8px 0 0; }
.fx-cat-resumen__alerta { margin: 6px 0 0; font-size: .82rem; color: #ff9c9c; background: rgba(220,80,80,.12); border: 1px solid rgba(220,80,80,.3); border-radius: 10px; padding: 6px 10px; }
/* Aviso de conteo parcial mientras se sincroniza (ámbar, no es error) — v1.0.35 */
.fx-cat-resumen__parcial { color: #ffd9a0; background: rgba(220,150,60,.12); border-color: rgba(220,150,60,.3); }
#fx-cs-progreso { margin-top: 8px; }
#fx-cs-progreso:empty { display: none; }



/* ---------- v1.0.33: secciones colapsables de Configuración (DANGOFE-FISCAL-011) ---------- */
.fx-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.fx-sec-head__btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fx-sec-resumen { margin: 6px 0 4px; font-size: .85rem; opacity: .85; }
.fx-sec-resumen--warn { color: #ffce7a; opacity: 1; }
.fx-sec-resumen--err { color: #ff9c9c; opacity: 1; }
.fx-sec-detalle { margin-top: 8px; }
