/* =========================================================
   Hultec Inventario - estilos propios (se carga después de main.css)
   ========================================================= */

/* Tablas dentro de cards: solo scroll horizontal, nunca vertical */
.card > .table-responsive {
  overflow-y: hidden;
}

/* ---------- Pestañas con muchas opciones: scroll horizontal ---------- */
.tc-tabs-scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}
.tc-tabs-scroll .nav-link {
  white-space: nowrap;
}


/* ---------- Hojas de impresión ---------- */
.hoja-impresion {
  max-width: 900px;
  margin: 0 auto;
}
.hoja-encabezado {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 2px solid var(--tc-primary, #d90a26);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.8125rem;
}
.hoja-empresa {
  font-size: 1.35rem;
  margin: 0 0 0.25rem;
}
.hoja-titulo {
  font-size: 1.1rem;
  margin: 0 0 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.hoja-seccion {
  margin-bottom: 1.25rem;
}
.hoja-seccion h3 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--tc-border, #e5e9ea);
  padding-bottom: 0.25rem;
  margin-bottom: 0.75rem;
}
.hoja-datos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin-bottom: 0.75rem;
}
.hoja-datos dt {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--tc-muted, #6c7a7f);
  margin: 0;
}
.hoja-datos dd {
  margin: 0;
  font-weight: 600;
}
.hoja-kv {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0.35rem 1rem;
}
.hoja-kv dt {
  font-weight: 600;
}
.hoja-kv dd {
  margin: 0;
}
.hoja-alerta {
  border: 1px solid #E03131;
  color: #C92A2A;
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
}
.hoja-nota {
  border-left: 3px solid var(--tc-primary, #d90a26);
  padding-left: 0.75rem;
  margin-bottom: 0.75rem;
  break-inside: avoid;
}
.hoja-tabla th,
.hoja-tabla td {
  padding: 0.4rem 0.5rem;
}
.hoja-firma {
  margin: 3rem auto 0;
  max-width: 320px;
  text-align: center;
}
.hoja-firmas {
  display: flex;
  justify-content: space-around;
  gap: 2rem;
  margin-top: 3.5rem;
  text-align: center;
}
.hoja-firmas > div {
  flex: 1;
  max-width: 300px;
}
.hoja-linea {
  border-top: 1px solid #333;
  margin-bottom: 0.35rem;
}

@media print {
  @page { margin: 12mm; }
  .tc-sidebar,
  .tc-topbar,
  .tc-footer,
  .tc-backdrop,
  .tc-skip-link,
  .no-imprimir,
  .swal2-container {
    display: none !important;
  }
  html, body, .tc-app, .tc-main, .tc-content {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    min-height: 0 !important;
  }
  .hoja-impresion {
    border: 0 !important;
    box-shadow: none !important;
    max-width: none;
  }
  .hoja-impresion .card-body {
    padding: 0 !important;
  }
  /* Reportes y listados impresos directamente desde la pantalla */
  .tc-page-actions,
  .tc-table-toolbar,
  .nav-tabs,
  .tc-actions,
  [data-tc-table-pager] {
    display: none !important;
  }
  .card {
    box-shadow: none !important;
    break-inside: avoid;
  }
  .tab-content > .tab-pane:not(.active) {
    display: none !important;
  }
}
.hoja-pie {
  margin: 2rem 0 0;
  font-size: 0.75rem;
  color: var(--tc-muted, #6c7a7f);
  text-align: center;
}


/* =====================================================================
   Identidad Hultec — paleta y tipografía (misma del sitio web y la WebApp)
   Azul marino #0E0B3F · Rojo Hultec #D90A26 · Rojo oscuro #B8001F
   Papel #F3F2EE · Blanco #FFFFFF
   Barlow Condensed (títulos) · IBM Plex Sans (texto) · IBM Plex Mono (etiquetas)
   Sobrescribe los tokens del tema (main.css) sin modificarlo.
   ===================================================================== */
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/barlow-condensed-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --hx-navy: #0E0B3F;
  --hx-red: #D90A26;
  --hx-red-dark: #B8001F;
  --hx-red-soft: #FF6B7D;
  --hx-paper: #F3F2EE;
  --tc-font-ui: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --tc-font-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --tc-font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}

:root,
[data-bs-theme=light] {
  --tc-bg: #F3F2EE;
  --tc-bg-rgb: 243, 242, 238;
  --tc-surface: #FFFFFF;
  --tc-surface-rgb: 255, 255, 255;
  --tc-surface-2: #F1F0EB;
  --tc-surface-3: #E4E2DA;
  --tc-border: #E2E0D8;
  --tc-border-strong: #CFCCC2;
  --tc-input-border: #8A8899;
  --tc-heading: #0E0B3F;
  --tc-heading-rgb: 14, 11, 63;
  --tc-body: #33324A;
  --tc-body-rgb: 51, 50, 74;
  --tc-muted: #5B5A6E;
  --tc-muted-rgb: 91, 90, 110;
  --tc-primary: #D90A26;
  --tc-primary-rgb: 217, 10, 38;
  --tc-primary-contrast: #FFFFFF;
  --tc-accent: #0E0B3F;
  --tc-accent-contrast: #FFFFFF;
  --tc-accent-text: #0E0B3F;
  --tc-accent-ui: #2C2868;
  --tc-info: #2C2868;
  --tc-info-rgb: 44, 40, 104;
  --tc-scrim: #07061F;
  --tc-brand-ink: #0E0B3F;
  --tc-brand-ink-fg: #F3F2EE;
  --tc-shadow-1: 0 1px 2px rgb(14 11 63 / 6%);
  --tc-shadow-2: 0 8px 20px -6px rgb(14 11 63 / 16%), 0 2px 4px rgb(14 11 63 / 4%);
  --tc-shadow-3: 0 24px 48px -12px rgb(14 11 63 / 26%), 0 4px 8px rgb(14 11 63 / 6%);
  --tc-glyph-knob: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%235B5A6E'/%3e%3c/svg%3e");
  --tc-glyph-knob-focus: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23D90A26'/%3e%3c/svg%3e");
  --tc-glyph-select: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%235B5A6E' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

[data-bs-theme=dark] {
  --tc-bg: #0A0827;
  --tc-bg-rgb: 10, 8, 39;
  --tc-surface: #121037;
  --tc-surface-rgb: 18, 16, 55;
  --tc-surface-2: #1A1842;
  --tc-surface-3: #24214F;
  --tc-border: #24214F;
  --tc-border-strong: #36326B;
  --tc-input-border: #6E6A9E;
  --tc-heading: #F3F2EE;
  --tc-heading-rgb: 243, 242, 238;
  --tc-body: #C9C6E6;
  --tc-body-rgb: 201, 198, 230;
  --tc-muted: #9E9BC8;
  --tc-muted-rgb: 158, 155, 200;
  --tc-primary: #FF6B7D;
  --tc-primary-rgb: 255, 107, 125;
  --tc-primary-contrast: #1F0007;
  --tc-accent: #C9C6E6;
  --tc-accent-contrast: #0E0B3F;
  --tc-accent-text: #C9C6E6;
  --tc-accent-ui: #C9C6E6;
  --tc-info: #A9A5F0;
  --tc-info-rgb: 169, 165, 240;
  --tc-brand-ink: #0A0830;
  --tc-brand-ink-fg: #F3F2EE;
  --tc-glyph-check: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%231F0007' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
  --tc-glyph-dash: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%231F0007' stroke-linecap='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e");
  --tc-glyph-radio: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%231F0007'/%3e%3c/svg%3e");
  --tc-glyph-knob: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%239E9BC8'/%3e%3c/svg%3e");
  --tc-glyph-knob-focus: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23FF6B7D'/%3e%3c/svg%3e");
  --tc-glyph-knob-on: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%231F0007'/%3e%3c/svg%3e");
  --tc-glyph-select: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%239E9BC8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

/* Menú lateral en azul marino (los colores del menú se reasignan solo dentro de él) */
.tc-sidebar {
  --tc-surface: #0E0B3F;
  --tc-surface-rgb: 14, 11, 63;
  --tc-border: rgba(255, 255, 255, 0.08);
  --tc-heading: #FFFFFF;
  --tc-heading-rgb: 255, 255, 255;
  --tc-body: #C9C6E6;
  --tc-muted: #9E9BC8;
  --tc-primary: #FF6B7D;
  --tc-primary-text: #FF8A98;
  --tc-active-bg: rgba(217, 10, 38, 0.22);
  --tc-hover: rgba(255, 255, 255, 0.07);
  --tc-pressed: rgba(255, 255, 255, 0.10);
  --tc-accent: #D90A26;
  background: linear-gradient(180deg, #120F4A 0%, #0E0B3F 55%, #0A0830 100%);
  border-color: transparent;
  color: var(--tc-body);
}
[data-bs-theme=dark] .tc-sidebar {
  --tc-surface: #0A0830;
  background: linear-gradient(180deg, #0C0A36 0%, #0A0830 100%);
  border-color: var(--tc-border);
}
.tc-sidebar .tc-brand .text-primary { color: #FF6B7D !important; }
.tc-sidebar .tc-drawer-close { color: #C9C6E6; }
.tc-sidebar .tc-nav-link.active { box-shadow: inset 3px 0 0 #D90A26; }

/* Logotipo: blanco sobre el menú marino, a color en las pantallas claras */
.tc-brand img.hx-logo { width: auto; height: 34px; object-fit: contain; }
.hx-logo-oscuro { display: none !important; }
[data-bs-theme=dark] .hx-logo-claro { display: none !important; }
[data-bs-theme=dark] .hx-logo-oscuro { display: block !important; }
.tc-brand .hx-logo-claro, [data-bs-theme=dark] .tc-brand .hx-logo-oscuro { display: inline !important; }
[data-bs-theme=dark] .tc-brand .hx-logo-claro { display: none !important; }

/* Tipografía de marca (como en el sitio: condensada, mayúsculas) */
.tc-brand { font-family: var(--tc-font-display); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6,
.tc-page-title, .modal-title { font-family: var(--tc-font-display); font-weight: 700; letter-spacing: 0.01em; }
.tc-page-header h1 { text-transform: uppercase; letter-spacing: 0.02em; }
.card-title { text-transform: uppercase; letter-spacing: 0.03em; }
.tc-stat-value { font-family: var(--tc-font-display); font-weight: 700; }
.tc-label, .tc-nav-section, .dropdown-header { font-family: var(--tc-font-mono); font-weight: 500; letter-spacing: 0.12em; }
.btn { font-weight: 500; }
code, kbd, .hx-sku { font-family: var(--tc-font-mono); }
.hx-sku { white-space: nowrap; }

/* Impresión: los documentos salen con la paleta de la marca */
@media print {
  :root, [data-bs-theme] {
    --tc-primary: #D90A26;
    --tc-primary-rgb: 217, 10, 38;
    --tc-heading: #0E0B3F;
  }
}
