:root {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-strong: #21284f;
  --surface-soft: #f8fbff;
  --surface-alt: #eef4ff;
  --sidebar: #1f264e;
  --text: #24324a;
  --muted: #718096;
  --line: rgba(31, 38, 78, 0.10);
  --primary: #4fc3f7;
  --primary-strong: #18a8e1;
  --info: #00b4d8;
  --danger: #dc3545;
  --warning: #ffc107;
  --success: #28a745;
  --danger-soft: rgba(220, 53, 69, 0.12);
  --warning-soft: rgba(255, 193, 7, 0.16);
  --success-soft: rgba(40, 167, 69, 0.12);
  --info-soft: rgba(79, 195, 247, 0.16);
  --shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  --radius: 18px;
  --font: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  font-size: 12px;
  line-height: 1.4;
  color: var(--text);
  background: var(--bg);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
textarea { resize: vertical; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

.layout { display: grid; grid-template-columns: 272px 1fr; min-height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, #2a3272 0%, #212968 45%, #181f5a 100%);
  color: #fff;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid rgba(255,255,255,.08);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand__logo {
  width: 112px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
  border: 1px solid rgba(255,255,255,.10);
}
.brand__logo--wordmark {
  background: #ffffff;
}
.brand__goal {
  flex: 1 1 auto;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 8px;
}
.brand__goal-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.brand__goal-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.brand__goal-text {
  font-weight: 900;
  letter-spacing: .05em;
  color: #1d4f91;
  font-size: 14px;
}
.brand__imports {
  width: 40px;
  background: linear-gradient(180deg, #2f66c8, #214b9a);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 9px;
  letter-spacing: .06em;
}
.brand h1 { margin: 0; font-size: 16px; }
.brand p { margin: 4px 0 0; font-size: 11px; color: rgba(255,255,255,.72); }
.sidebar__nav { display: grid; gap: 6px; }
.nav-link {
  padding: 10px 12px;
  border-radius: 12px;
  color: rgba(255,255,255,.82);
  font-weight: 700;
}
.nav-link:hover,
.nav-link.active {
  background: rgba(79, 195, 247, .14);
  color: #fff;
  border: 1px solid rgba(79, 195, 247, .24);
}
.sidebar__info {
  margin-top: auto;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 4px;
}
.sidebar__label { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.62); }

.content {
  padding: 18px;
  display: grid;
  gap: 16px;
}
.topbar, .panel, .master-card, .modal__dialog {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.page-section, .topbar, .stat-card { backdrop-filter: blur(10px); }
.topbar {
  padding: 18px 20px;
  border-radius: var(--radius);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.topbar h2 {
  margin: 0 0 4px;
  font-size: 18px;
  color: var(--text);
  letter-spacing: .02em;
}
.topbar p { margin: 0; color: var(--muted); }
.topbar__actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.user-badge {
  min-width: 160px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--surface-alt);
  border: 1px solid rgba(31, 38, 78, 0.08);
  display: grid;
}
.user-badge small { color: var(--muted); }
.btn {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 9px 14px;
  font-weight: 800;
  letter-spacing: .01em;
}
.btn--primary {
  background: linear-gradient(180deg, var(--primary), var(--primary-strong));
  color: #fff;
  box-shadow: 0 10px 24px rgba(31,124,255,.22);
}
.btn--secondary {
  background: var(--surface-alt);
  border-color: rgba(31, 38, 78, 0.10);
  color: var(--text);
}
.btn--ghost {
  background: #ffffff;
  border-color: rgba(31, 38, 78, 0.10);
  color: var(--muted);
}
.btn--danger {
  background: linear-gradient(180deg, #dc3545, #b92035);
  color: #fff;
}
.btn--toggle { min-width: 154px; }
.btn--sm {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 10px;
}
.panel, .master-card { border-radius: var(--radius); padding: 14px; }
.panel--inner {
  background: var(--surface);
  border: 1px solid rgba(31, 38, 78, 0.08);
}
.stack-panel { display: grid; gap: 14px; }
.panel__header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.panel__header h3, .panel__header h4, .panel__header h5, .master-card__header h4 { margin: 0 0 3px; color: #26356b; }
.panel__header p, .master-card__header p { margin: 0; color: var(--muted); }
.panel__header--split, .align-start { align-items: flex-start; }
.section-gap { margin-top: 14px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat-card {
  border-radius: var(--radius);
  padding: 16px;
  display: grid;
  gap: 6px;
  background: linear-gradient(180deg, #27315f, #1d254b);
  border: 1px solid rgba(31, 38, 78, 0.08);
  box-shadow: var(--shadow);
}
.stat-card__label {
  font-size: 11px;
  color: #d9e7ff;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 800;
}
.stat-card strong { font-size: 22px; color: #fff; }
.stat-card small { color: var(--muted); }

.inventory-highlight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.inventory-highlight-card {
  background: linear-gradient(180deg, #27315f, #1d254b);
  border: 1px solid rgba(31, 38, 78, 0.18);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 6px;
}
.inventory-highlight-card span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #d3e4ff;
}
.inventory-highlight-card strong {
  font-size: 24px;
  font-weight: 900;
  color: #fff;
}
.inventory-highlight-card small { color: var(--muted); }
.inventory-highlight-card.danger { border-color: rgba(220,53,69,.34); }
.inventory-highlight-card.warning { border-color: rgba(255,193,7,.34); }
.inventory-highlight-card.success { border-color: rgba(40,167,69,.28); }
.inventory-highlight-card.info { border-color: rgba(31,124,255,.34); }

.mini-kpis { display: flex; gap: 10px; flex-wrap: wrap; }
.mini-kpi {
  min-width: 88px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  display: grid;
  gap: 3px;
}
.mini-kpi span { font-size: 10px; color: #dce8fb; text-transform: uppercase; font-weight: 800; }
.mini-kpi strong { font-size: 18px; color: #fff; }
.mini-kpi.danger { background: var(--danger-soft); }
.mini-kpi.warning { background: var(--warning-soft); }
.mini-kpi.success { background: var(--success-soft); }
.mini-kpi.info { background: var(--info-soft); }

.dashboard-grid, .stack-list, .master-list { display: grid; gap: 12px; }
.dashboard-grid { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.dashboard-shell { background: linear-gradient(180deg, rgba(255,255,255,.72) 0%, rgba(241,246,255,.96) 100%); }
.dashboard-section { border-radius: 22px; }
.dashboard-circle-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.dashboard-circle-card {
  background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
  border: 1px solid rgba(31,38,78,.08);
  border-radius: 20px;
  padding: 16px 12px;
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(30, 64, 175, .08);
}
.dashboard-circle-card__ring {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.95), rgba(226,238,255,.92));
  border: 8px solid rgba(54, 130, 255, .16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 12px 28px rgba(22, 40, 87, .08);
}
.dashboard-circle-card strong { font-size: 20px; color: #1d2e63; line-height: 1.1; }
.dashboard-circle-card span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 900; color: #38518d; }
.dashboard-circle-card small { color: var(--muted); }
.dashboard-circle-card.danger .dashboard-circle-card__ring { border-color: rgba(220,53,69,.22); }
.dashboard-circle-card.warning .dashboard-circle-card__ring { border-color: rgba(255,193,7,.28); }
.dashboard-circle-card.success .dashboard-circle-card__ring { border-color: rgba(40,167,69,.22); }
.dashboard-circle-card.info .dashboard-circle-card__ring { border-color: rgba(24,168,225,.24); }
.inventory-product-board {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid rgba(31,38,78,.08);
  border-radius: 20px;
  padding: 16px;
}
.inventory-product-board__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.inventory-product-board__header h4 { margin: 0 0 4px; color: #25386f; }
.inventory-product-board__header p { margin: 0; color: var(--muted); }
.inventory-legend { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-weight: 700; }
.legend-dot, .status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  box-shadow: 0 0 0 0 rgba(0,0,0,0);
}
.legend-dot.ok, .status-dot.ok { background: var(--success); }
.legend-dot.info, .status-dot.info { background: var(--info); }
.legend-dot.warning, .status-dot.warning { background: #d8a100; }
.legend-dot.danger, .status-dot.danger { background: var(--danger); }
.status-dot.blink, .legend-dot.blink { animation: dotPulse 1.05s ease-in-out infinite; }
@keyframes dotPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220,53,69,.38); opacity: 1; }
  50% { transform: scale(1.18); box-shadow: 0 0 0 10px rgba(220,53,69,0); opacity: .82; }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220,53,69,0); opacity: 1; }
}
.inventory-product-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.inventory-product-card {
  border-radius: 18px;
  padding: 14px;
  border: 1px solid rgba(31,38,78,.08);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  display: grid;
  gap: 12px;
}
.inventory-product-card.danger { border-color: rgba(220,53,69,.22); background: linear-gradient(180deg, #fff7f8 0%, #fff 100%); }
.inventory-product-card.warning { border-color: rgba(255,193,7,.24); }
.inventory-product-card.info { border-color: rgba(24,168,225,.18); }
.inventory-product-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.inventory-product-card__title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #1f2e5b;
}
.inventory-product-card__title strong { font-size: 15px; }
.inventory-product-card__subtitle { color: var(--muted); font-size: 11px; }
.inventory-product-card__state { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dashboard-detail-list {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}
.dashboard-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid rgba(31,38,78,.08);
}
.dashboard-detail-row:last-child { border-bottom: 0; padding-bottom: 0; }
.dashboard-detail-row span {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #62708d;
}
.dashboard-detail-row strong {
  color: #233469;
  font-size: 14px;
  text-align: right;
}
.dashboard-detail-list--light .dashboard-detail-row strong { color: #233469; }
.dashboard-grid--imports {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}
.import-card {
  border: 1px solid rgba(31, 38, 78, 0.10);
  border-radius: 16px;
  padding: 13px 14px;
  background: linear-gradient(180deg, #27315f 0%, #21284f 100%);
  display: grid;
  gap: 8px;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 14px 30px rgba(0,0,0,.08);
}
.import-card--modern {
  min-height: 100%;
  border-radius: 20px;
  background: linear-gradient(180deg, #23315f 0%, #1a2447 55%, #121938 100%);
  overflow: hidden;
}
.import-entry-card {
  min-height: 100%;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  color: var(--text);
  border: 1px solid rgba(31,38,78,.08);
}
.import-entry-card .inventory-product-card__title,
.import-entry-card .inventory-product-card__subtitle { color: #1f2e5b; }
.import-entry-card .status-pill.neutral { background: rgba(31,38,78,.06); color: #38518d; border: 1px solid rgba(31,38,78,.08); }
.import-card__alert {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 800;
  width: fit-content;
}
.import-card__alert.info { background: rgba(79,195,247,.14); color: #b9ecff; }
.import-card__alert.ok { background: rgba(40,167,69,.14); color: #caffd3; }
.import-card__alert.warning { background: rgba(255,193,7,.16); color: #ffe48a; }
.import-card__alert.danger { background: rgba(220,53,69,.16); color: #ffc0c7; }
.stack-item, .master-item {
  border: 1px solid rgba(31, 38, 78, 0.08);
  border-radius: 16px;
  padding: 13px 14px;
  background: #ffffff;
  display: grid;
  gap: 8px;
  color: var(--text);
}
.import-card__top, .stack-item__row, .master-card__header { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.import-card__top strong {
  color: #fff;
  font-weight: 900;
}
.stack-item strong,
.master-item strong {
  color: var(--text);
  font-weight: 800;
  font-size: 15px;
}
.import-card__meta {
  color: #d3e2f7;
  font-size: 11px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.stack-item__meta, .master-item__meta {
  color: var(--muted);
  font-size: 11px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.import-card__field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}
.import-card__field {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(152, 193, 255, .14);
}
.import-card__label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #b8d2f0;
  font-weight: 800;
  margin-bottom: 4px;
}
.import-card__value {
  font-size: 13px;
  font-weight: 900;
  color: #fff;
}
.stack-item__actions, .master-item__actions, .form-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.action-btn {
  border: 1px solid rgba(31, 38, 78, 0.12);
  background: #f5f8ff;
  color: var(--text);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 800;
}
.action-btn--primary { background: linear-gradient(180deg, #33c5f3, #19a8df); color: #fff; border-color: rgba(25,168,223,.48); }
.action-btn--danger { background: linear-gradient(180deg, #e6495c, #c62839); color: #fff; border-color: rgba(198,40,57,.45); font-weight: 800; }
.action-btn--danger:hover { background: linear-gradient(180deg, #d93a4d, #b0202f); }
.action-btn--soft { background: rgba(31,38,78,.05); color: var(--text); }
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}
.status-pill.ok { background: var(--success-soft); color: #146c2e; }
.status-pill.info { background: var(--info-soft); color: #0d6c9e; }
.status-pill.warning { background: var(--warning-soft); color: #7a5900; }
.status-pill.danger { background: var(--danger-soft); color: #9c1c29; }
.status-pill.neutral { background: rgba(31,38,78,.06); color: #38518d; border: 1px solid var(--line); }
.alert-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 0;
  color: #fff;
  font-weight: 800;
  font-size: 11px;
  box-shadow: 0 0 0 rgba(0,0,0,0);
}
.alert-button.info { background: var(--info); }
.alert-button.ok { background: var(--success); }
.alert-button.warning { background: #d8a100; color: #fff; }
.alert-button.danger { background: var(--danger); }
.alert-button.blink { animation: alertPulse 1.1s ease-in-out infinite; }
@keyframes alertPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220,53,69,.38); opacity: 1; }
  50% { transform: scale(1.04); box-shadow: 0 0 0 8px rgba(220,53,69,0); opacity: .84; }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220,53,69,0); opacity: 1; }
}
.summary-box, .detail-empty, .cost-card {
  padding: 12px;
  border-radius: 14px;
  background: #f9fbff;
  border: 1px dashed rgba(31, 38, 78, 0.16);
  color: var(--text);
}
.stock-state-cell { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cost-card strong { display: block; font-size: 11.5px; font-weight: 900; margin-top: 4px; color: #0B1B2E; }
.cost-card span { color: #8895A6; font-size: 9px; text-transform: uppercase; letter-spacing: .07em; font-weight: 800; }
.costeo-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }

.table-wrapper { overflow: auto; border: 1px solid rgba(31, 38, 78, 0.08); border-radius: 16px; background: #ffffff; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  background: #ffffff;
  color: var(--text);
}
.data-table th, .data-table td {
  padding: 10px 10px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  text-align: left;
  vertical-align: top;
  word-break: normal;
  overflow-wrap: normal;
  white-space: normal;
}
.data-table th {
  background: #f3f7ff;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #5e6a84;
  position: sticky;
  top: 0;
}
.data-table td.nowrap, .data-table th.nowrap { white-space: nowrap; }
.compact-table .data-table th, .compact-table .data-table td { padding: 8px 9px; }
.compact-table { overflow-x: auto; }
.compact-table .data-table { min-width: 640px; table-layout: auto; }
/* Las tablas anidadas (p.ej. gastos dentro del detalle de importación) no deben heredar
   word-break/white-space de una tabla contenedora (como .accordion-table). */
.data-table .data-table th, .data-table .data-table td {
  word-break: normal;
  overflow-wrap: normal;
  white-space: normal;
}

.compras-grid, .importaciones-layout, .detail-flex-grid, .inventory-grid, .master-grid, .security-grid { display: grid; gap: 14px; }
.compras-grid { grid-template-columns: 1fr 1fr 1fr; }
.importaciones-layout { grid-template-columns: 0.95fr 1.05fr; }
.detail-flex-grid { grid-template-columns: 1fr 1fr; }
.inventory-grid { grid-template-columns: 1.1fr 1fr 1fr; }
.master-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.security-grid { grid-template-columns: 1.2fr 1fr 1fr; }

.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; }
.compact-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.din-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; }
.form-group, .master-form { display: grid; gap: 5px; }
.form-group label {
  font-size: 10px;
  color: #5e6a84;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.form-group input,
.form-group select,
.form-group textarea,
.master-form input,
.master-form select,
.master-form textarea,
.auth-form input {
  border: 1px solid rgba(31, 38, 78, 0.12);
  border-radius: 12px;
  padding: 9px 10px;
  background: #ffffff;
  color: var(--text);
}
.form-group input::placeholder,
.form-group textarea::placeholder,
.master-form input::placeholder,
.master-form textarea::placeholder,
.auth-form input::placeholder { color: #98a3b8; }
.form-group select option,
.master-form select option { color: #0e2038; }
.form-group--full { grid-column: 1 / -1; }
.checkbox-cell { display: flex; align-items: flex-end; }
.checkbox-row { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: #fff; }
.compact-control { min-width: 220px; }
.master-form { gap: 8px; margin-bottom: 12px; }
.master-form__actions { display: flex; }
.import-form-actions { align-items: center; justify-content: flex-start; }
.table-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }

.modal { position: fixed; inset: 0; display: grid; place-items: center; z-index: 40; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(3,8,15,.68); }
.modal__dialog { position: relative; z-index: 1; width: min(420px, calc(100vw - 24px)); border-radius: 18px; overflow: hidden; }
.modal__header, .modal__body, .modal__actions { padding: 16px; }
.modal__header { border-bottom: 1px solid var(--line); }
.modal__body { display: grid; gap: 12px; }
.auth-form { display: grid; gap: 12px; }
.field-error { color: #ffb3bc; min-height: 16px; }
.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  min-width: 260px;
  max-width: 420px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #21284f;
  color: #fff;
  box-shadow: var(--shadow);
  z-index: 60;
  border: 1px solid rgba(255,255,255,.1);
}
.toast.toast--error { background: #67151e; }
.toast.toast--success { background: #0e4e2f; }
.toast.toast--warning { background: #6e4a00; }

@media (max-width: 1400px) {
  .compras-grid, .inventory-grid, .importaciones-layout, .detail-flex-grid, .security-grid, .costeo-grid, .inventory-highlight-grid { grid-template-columns: 1fr; }
  .dashboard-grid--imports { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-circle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .stats-grid, .form-grid, .din-grid, .inventory-highlight-grid, .dashboard-circle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid--imports { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .content { padding: 12px; }
  .topbar, .inventory-product-board__header, .inventory-product-card__head, .dashboard-detail-row { flex-direction: column; align-items: stretch; }
  .stats-grid, .form-grid, .compact-form, .din-grid, .inventory-highlight-grid, .import-card__field-grid, .dashboard-circle-grid, .dashboard-grid--imports { grid-template-columns: 1fr; }
  .dashboard-detail-row strong { text-align: left; }
}


/* =========================================================
   Dashboard ejecutivo referencial
   Solo visual para la portada / dashboard
   ========================================================= */
#dashboardStats.exec-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
#dashboardStats.exec-kpis .exec-kpi {
  --exec-kpi-c: var(--brand, #1E6BC6);
  background: #ffffff;
  border: 1px solid rgba(31, 38, 78, 0.08);
  border-radius: 16px;
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 30, 60, .06), 0 1px 3px rgba(15, 30, 60, .04);
}
#dashboardStats.exec-kpis .exec-kpi::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--exec-kpi-c);
}
#dashboardStats.exec-kpis .exec-kpi__label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #61708a;
}
#dashboardStats.exec-kpis .exec-kpi__value {
  display: block;
  margin-top: 6px;
  font-size: 26px;
  line-height: 1.1;
  font-weight: 900;
  color: #15244d;
}
#dashboardStats.exec-kpis .exec-kpi__foot {
  display: block;
  margin-top: 4px;
  color: #7f8ca3;
  font-size: 11.5px;
}
#dashboardStats.exec-kpis .exec-kpi--blue { --exec-kpi-c: #1E6BC6; }
#dashboardStats.exec-kpis .exec-kpi--violet { --exec-kpi-c: #7C3AED; }
#dashboardStats.exec-kpis .exec-kpi--green { --exec-kpi-c: #16A34A; }
#dashboardStats.exec-kpis .exec-kpi--amber { --exec-kpi-c: #F59E0B; }
#dashboardStats.exec-kpis .exec-kpi--red { --exec-kpi-c: #DC2626; }

#dashboard.exec-dashboard-shell {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  gap: 18px;
}
#dashboard.exec-dashboard-shell .exec-section {
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
#dashboard.exec-dashboard-shell .exec-section__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
#dashboard.exec-dashboard-shell .exec-section__title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
#dashboard.exec-dashboard-shell .exec-section__title h3 {
  margin: 0;
  color: #162654;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.02em;
}
#dashboard.exec-dashboard-shell .exec-section__num {
  font-size: 12px;
  font-weight: 800;
  color: #1E6BC6;
  background: rgba(30,107,198,.10);
  padding: 4px 8px;
  border-radius: 8px;
}
#dashboard.exec-dashboard-shell .exec-section__count {
  font-size: 12px;
  font-weight: 700;
  color: #50617f;
  background: #ffffff;
  border: 1px solid rgba(31,38,78,.08);
  padding: 5px 10px;
  border-radius: 999px;
}
#dashboard.exec-dashboard-shell .exec-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: #5b6a84;
  font-size: 12px;
  font-weight: 600;
}
#dashboard.exec-dashboard-shell .exec-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
#dashboard.exec-dashboard-shell .exec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
#dashboard.exec-dashboard-shell .exec-dot--ok { background: #16A34A; }
#dashboard.exec-dashboard-shell .exec-dot--warn { background: #F59E0B; }
#dashboard.exec-dashboard-shell .exec-dot--danger { background: #DC2626; }
#dashboard.exec-dashboard-shell .exec-dot--blink { animation: execBlink 1s infinite; }
@keyframes execBlink {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(220,38,38,.35); }
  50% { opacity: .38; transform: scale(1.34); box-shadow: 0 0 0 10px rgba(220,38,38,0); }
}
#dashboard.exec-dashboard-shell .exec-grid {
  display: grid;
  gap: 16px;
}
#dashboard.exec-dashboard-shell .exec-grid--stock { grid-template-columns: 1fr; }
#dashboard.exec-dashboard-shell .exec-grid--imp { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#dashboard.exec-dashboard-shell .exec-card {
  --exec-card-c: #1E6BC6;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(31,38,78,.08);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 30, 60, .06), 0 1px 3px rgba(15, 30, 60, .04);
  min-height: 320px;
  display: flex;
  flex-direction: column;
}
#dashboard.exec-dashboard-shell .exec-card__ribbon {
  height: 6px;
  background: var(--exec-card-c);
}
#dashboard.exec-dashboard-shell .exec-card__head {
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(31,38,78,.08);
}
#dashboard.exec-dashboard-shell .exec-card__body {
  padding: 12px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
#dashboard.exec-dashboard-shell .exec-stock-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  background: linear-gradient(180deg, rgba(30,107,198,.08) 0%, #fff 100%);
}
#dashboard.exec-dashboard-shell .exec-stock-card__title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#dashboard.exec-dashboard-shell .exec-stock-card__name {
  color: #15244d;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
}
#dashboard.exec-dashboard-shell .exec-stock-card__code {
  color: var(--exec-card-c);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
#dashboard.exec-dashboard-shell .exec-semaforo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}
#dashboard.exec-dashboard-shell .exec-semaforo--ok { background: #DCFCE7; color: #14532D; }
#dashboard.exec-dashboard-shell .exec-semaforo--warn { background: #FEF3C7; color: #78350F; }
#dashboard.exec-dashboard-shell .exec-semaforo--danger { background: #FEE2E2; color: #7F1D1D; }
#dashboard.exec-dashboard-shell .exec-stock-metric {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(31,38,78,.12);
}
#dashboard.exec-dashboard-shell .exec-stock-metric:last-of-type { border-bottom: 0; }
#dashboard.exec-dashboard-shell .exec-stock-metric__lbl {
  color: #62708d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
#dashboard.exec-dashboard-shell .exec-stock-metric__val {
  color: #172753;
  font-size: 14px;
  font-weight: 800;
  text-align: right;
}
#dashboard.exec-dashboard-shell .exec-stock-metric__val--big {
  color: var(--exec-card-c);
  font-size: 22px;
  line-height: 1.15;
}
#dashboard.exec-dashboard-shell .exec-stock-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
#dashboard.exec-dashboard-shell .exec-stock-progress__row {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #7f8ca3;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
#dashboard.exec-dashboard-shell .exec-stock-progress__bar {
  height: 8px;
  background: #edf2fa;
  border-radius: 999px;
  overflow: hidden;
}
#dashboard.exec-dashboard-shell .exec-stock-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--exec-card-c), rgba(30,107,198,.35));
  border-radius: 999px;
}
#dashboard.exec-dashboard-shell .exec-stock-card--warn .exec-stock-progress__fill { background: linear-gradient(90deg, #F59E0B, #FCD34D); }
#dashboard.exec-dashboard-shell .exec-stock-card--danger .exec-stock-progress__fill { background: linear-gradient(90deg, #DC2626, #FCA5A5); }
#dashboard.exec-dashboard-shell .exec-stock-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(31,38,78,.08);
}
#dashboard.exec-dashboard-shell .exec-stock-foot__lbl {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #7f8ca3;
}
#dashboard.exec-dashboard-shell .exec-stock-foot__val {
  color: #243562;
  font-size: 12px;
  font-weight: 800;
}
#dashboard.exec-dashboard-shell .exec-circle-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
#dashboard.exec-dashboard-shell .exec-circle-card {
  border-radius: 18px;
  padding: 14px;
  border: 1px solid rgba(31,38,78,.08);
  background: #ffffff;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 8px;
}
#dashboard.exec-dashboard-shell .exec-circle-card__ring {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 10px solid rgba(30,107,198,.12);
  color: #14224b;
  background: linear-gradient(180deg, #fff 0%, #f4f8ff 100%);
}
#dashboard.exec-dashboard-shell .exec-circle-card__ring strong {
  font-size: 18px;
  line-height: 1.15;
  font-weight: 900;
}
#dashboard.exec-dashboard-shell .exec-circle-card span {
  color: #1d2d5f;
  font-size: 13px;
  font-weight: 800;
}
#dashboard.exec-dashboard-shell .exec-circle-card small {
  color: #7f8ca3;
  font-size: 11px;
}
#dashboard.exec-dashboard-shell .exec-circle-card--danger .exec-circle-card__ring { border-color: rgba(220,38,38,.18); }
#dashboard.exec-dashboard-shell .exec-circle-card--warning .exec-circle-card__ring { border-color: rgba(245,158,11,.18); }
#dashboard.exec-dashboard-shell .exec-circle-card--success .exec-circle-card__ring { border-color: rgba(22,163,74,.18); }
#dashboard.exec-dashboard-shell .exec-circle-card--info .exec-circle-card__ring { border-color: rgba(30,107,198,.18); }
#dashboard.exec-dashboard-shell .exec-circle-card--neutral .exec-circle-card__ring { border-color: rgba(116,132,158,.18); }
#dashboard.exec-dashboard-shell .exec-imp-card {
  min-height: 100%;
}
#dashboard.exec-dashboard-shell .exec-imp-card__head {
  padding: 14px 16px 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--exec-card-c) 0%, color-mix(in oklab, var(--exec-card-c) 70%, #000) 100%);
}
#dashboard.exec-dashboard-shell .exec-imp-card__topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.85);
  margin-bottom: 6px;
}
#dashboard.exec-dashboard-shell .exec-imp-card__ref {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,.16);
}
#dashboard.exec-dashboard-shell .exec-imp-card__prov {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
}
#dashboard.exec-dashboard-shell .exec-imp-card__origin {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  color: rgba(255,255,255,.92);
  font-size: 12px;
  font-weight: 600;
}
#dashboard.exec-dashboard-shell .exec-imp-card__flag {
  width: 22px;
  height: 16px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  background: rgba(255,255,255,.2);
}
#dashboard.exec-dashboard-shell .exec-imp-card__transport { opacity: .88; }
#dashboard.exec-dashboard-shell .exec-imp-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
#dashboard.exec-dashboard-shell .exec-imp-state-chip,
#dashboard.exec-dashboard-shell .exec-imp-days {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}
#dashboard.exec-dashboard-shell .exec-imp-state-chip {
  background: rgba(255,255,255,.20);
  color: #fff;
}
#dashboard.exec-dashboard-shell .exec-imp-days { color: #fff; }
#dashboard.exec-dashboard-shell .exec-imp-days--green { background: #16A34A; }
#dashboard.exec-dashboard-shell .exec-imp-days--amber { background: #F59E0B; color: #3F2A05; }
#dashboard.exec-dashboard-shell .exec-imp-days--red { background: #DC2626; animation: execPillBlink 1s infinite; }
#dashboard.exec-dashboard-shell .exec-imp-days__ico::before { content: '●'; }
@keyframes execPillBlink {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,.8); transform: scale(1); }
  50% { box-shadow: 0 0 0 10px rgba(220,38,38,0); transform: scale(1.05); }
}
#dashboard.exec-dashboard-shell .exec-imp-ship {
  padding: 14px 16px 8px;
  background: #f8fafd;
  border-bottom: 1px solid rgba(31,38,78,.08);
}
#dashboard.exec-dashboard-shell .exec-imp-ship__track {
  position: relative;
  height: 46px;
  border-radius: 8px;
  background: linear-gradient(180deg, #E9F1FB 0%, #DDE8F6 60%, #E9F1FB 100%);
  overflow: hidden;
  border: 1px solid #D9E2EF;
}
#dashboard.exec-dashboard-shell .exec-imp-ship__wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 12px;
  background: radial-gradient(circle at 10% 100%, rgba(30,107,198,.25) 0 6px, transparent 7px), radial-gradient(circle at 30% 100%, rgba(30,107,198,.20) 0 5px, transparent 6px), radial-gradient(circle at 55% 100%, rgba(30,107,198,.24) 0 6px, transparent 7px), radial-gradient(circle at 80% 100%, rgba(30,107,198,.20) 0 5px, transparent 6px);
}
#dashboard.exec-dashboard-shell .exec-imp-ship__ship {
  position: absolute;
  top: 8px;
  transform: translateX(-50%);
}
#dashboard.exec-dashboard-shell .exec-imp-ship__stages {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}
#dashboard.exec-dashboard-shell .exec-imp-ship__stage {
  flex: 1;
  position: relative;
  padding-top: 8px;
  text-align: center;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #7f8ca3;
}
#dashboard.exec-dashboard-shell .exec-imp-ship__stage::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #CFD9E7;
}
#dashboard.exec-dashboard-shell .exec-imp-ship__stage.reached::before,
#dashboard.exec-dashboard-shell .exec-imp-ship__stage.current::before {
  background: var(--exec-card-c);
}
#dashboard.exec-dashboard-shell .exec-imp-ship__stage.current { color: var(--exec-card-c); }
#dashboard.exec-dashboard-shell .exec-imp-data {
  padding: 12px 16px 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
}
#dashboard.exec-dashboard-shell .exec-imp-data__row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
#dashboard.exec-dashboard-shell .exec-imp-data__lbl {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #7f8ca3;
}
#dashboard.exec-dashboard-shell .exec-imp-data__val {
  color: #172753;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.35;
  word-break: break-word;
}
#dashboard.exec-dashboard-shell .exec-imp-data__val--strong { color: var(--exec-card-c); }
#dashboard.exec-dashboard-shell .exec-imp-foot {
  margin-top: auto;
  padding: 10px 16px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: #fafbfd;
  border-top: 1px solid rgba(31,38,78,.08);
}
#dashboard.exec-dashboard-shell .exec-imp-foot__eta {
  color: #596986;
  font-size: 11px;
  font-weight: 700;
}
#dashboard.exec-dashboard-shell .exec-imp-foot__eta strong { color: #172753; }
#dashboard.exec-dashboard-shell .exec-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  background: #fff;
  border: 1px dashed rgba(31,38,78,.16);
  border-radius: 16px;
  color: #5b6a84;
}
#dashboard.exec-dashboard-shell .exec-empty strong {
  display: block;
  color: #14224b;
  font-size: 15px;
  margin-bottom: 4px;
}

@media (max-width: 1500px) {
  #dashboard.exec-dashboard-shell .exec-grid--imp,
  #dashboard.exec-dashboard-shell .exec-circle-grid,
  #dashboardStats.exec-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 980px) {
  #dashboard.exec-dashboard-shell .exec-grid--imp,
  #dashboard.exec-dashboard-shell .exec-circle-grid,
  #dashboardStats.exec-kpis,
  #dashboard.exec-dashboard-shell .exec-imp-data {
    grid-template-columns: 1fr;
  }
  #dashboard.exec-dashboard-shell .exec-imp-status-row,
  #dashboard.exec-dashboard-shell .exec-stock-card__head,
  #dashboard.exec-dashboard-shell .exec-imp-foot {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* =========================================================
   Handoff Control Ejecutivo exacto — dashboard solamente
   ========================================================= */
#dashboardStats.handoff-kpis,
#dashboard.handoff-dashboard {
  --hd-bg: #F4F6FB;
  --hd-surface: #FFFFFF;
  --hd-border: #E3E8F0;
  --hd-border-strong: #CFD6E3;
  --hd-ink-1: #0B1B2E;
  --hd-ink-2: #2A3A4E;
  --hd-ink-3: #5C6B7F;
  --hd-ink-4: #8895A6;
  --hd-brand: #1E6BC6;
  --hd-brand-deep: #124A93;
  --hd-ok: #16A34A;
  --hd-warn: #F59E0B;
  --hd-danger: #DC2626;
  --hd-info: #0891B2;
  --hd-p1: #2563EB;
  --hd-p2: #7C3AED;
  --hd-p3: #EA580C;
  --hd-p4: #0891B2;
  --hd-p5: #DB2777;
  --hd-p6: #059669;
  --hd-r-md: 12px;
  --hd-r-lg: 16px;
  --hd-shadow-1: 0 1px 2px rgba(15, 30, 60, .06), 0 1px 3px rgba(15, 30, 60, .04);
  --hd-shadow-2: 0 4px 12px rgba(15, 30, 60, .08), 0 2px 6px rgba(15, 30, 60, .04);
  --hd-shadow-3: 0 12px 32px rgba(15, 30, 60, .14), 0 4px 10px rgba(15, 30, 60, .06);
}
#dashboardStats.handoff-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
#dashboardStats.handoff-kpis .handoff-kpi {
  --hd-kpi-c: var(--hd-brand);
  background: var(--hd-surface);
  border: 1px solid var(--hd-border);
  border-radius: var(--hd-r-md);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--hd-shadow-1);
  transition: transform .2s ease, box-shadow .2s ease;
}
#dashboardStats.handoff-kpis .handoff-kpi:hover { transform: translateY(-2px); box-shadow: var(--hd-shadow-2); }
#dashboardStats.handoff-kpis .handoff-kpi::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px; background: var(--hd-kpi-c);
}
#dashboardStats.handoff-kpis .handoff-kpi__label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--hd-ink-3);
}
#dashboardStats.handoff-kpis .handoff-kpi__value {
  display: block;
  font-size: 26px;
  font-weight: 800;
  color: var(--hd-ink-1);
  margin: 4px 0 2px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
#dashboardStats.handoff-kpis .handoff-kpi__foot { font-size: 11.5px; color: var(--hd-ink-4); }
#dashboardStats.handoff-kpis .handoff-kpi--blue { --hd-kpi-c: var(--hd-brand); }
#dashboardStats.handoff-kpis .handoff-kpi--red { --hd-kpi-c: var(--hd-danger); }
#dashboardStats.handoff-kpis .handoff-kpi--amber { --hd-kpi-c: var(--hd-warn); }
#dashboardStats.handoff-kpis .handoff-kpi--green { --hd-kpi-c: var(--hd-ok); }
#dashboardStats.handoff-kpis .handoff-kpi--violet { --hd-kpi-c: var(--hd-p2); }

#dashboard.handoff-dashboard {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
#dashboard.handoff-dashboard .handoff-section { display: flex; flex-direction: column; gap: 14px; }
#dashboard.handoff-dashboard .handoff-section__head {
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
}
#dashboard.handoff-dashboard .handoff-section__title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
#dashboard.handoff-dashboard .handoff-section__num {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; font-weight: 700; color: var(--hd-brand);
  background: rgba(30,107,198,.10); padding: 4px 8px; border-radius: 6px;
}
#dashboard.handoff-dashboard .handoff-section__title h3 {
  margin: 0; font-size: 20px; font-weight: 800; color: var(--hd-ink-1); letter-spacing: -0.01em;
}
#dashboard.handoff-dashboard .handoff-section__count {
  font-size: 12px; font-weight: 600; color: var(--hd-ink-3);
  background: var(--hd-surface); border: 1px solid var(--hd-border);
  padding: 3px 10px; border-radius: 999px;
}
#dashboard.handoff-dashboard .handoff-legend {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: 12px; color: var(--hd-ink-3); font-weight: 500;
}
#dashboard.handoff-dashboard .handoff-legend__item { display: inline-flex; align-items: center; gap: 6px; }
#dashboard.handoff-dashboard .handoff-legend__sep { width: 1px; height: 14px; background: var(--hd-border-strong); }
#dashboard.handoff-dashboard .handoff-legend__note { font-size: 11.5px; }
#dashboard.handoff-dashboard .handoff-legend__note b { color: var(--hd-ink-2); }
#dashboard.handoff-dashboard .handoff-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
#dashboard.handoff-dashboard .handoff-dot--ok { background: var(--hd-ok); }
#dashboard.handoff-dashboard .handoff-dot--warn { background: var(--hd-warn); }
#dashboard.handoff-dashboard .handoff-dot--danger { background: var(--hd-danger); }
#dashboard.handoff-dashboard .handoff-dot--blink { animation: handoffBlink 1s infinite; }
@keyframes handoffBlink {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(220,38,38,.35); }
  50% { opacity: .35; transform: scale(1.35); }
}
#dashboard.handoff-dashboard .handoff-grid { display: grid; gap: 16px; }
#dashboard.handoff-dashboard .handoff-grid--stock,
#dashboard.handoff-dashboard .handoff-grid--imports { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#dashboard.handoff-dashboard .handoff-card {
  --hd-card-c: var(--hd-brand);
  background: #fff; border-radius: var(--hd-r-lg); padding: 0; overflow: hidden;
  border: 1px solid var(--hd-border); box-shadow: var(--hd-shadow-1);
  min-height: 320px; display: flex; flex-direction: column;
  animation: handoffCardIn .5s cubic-bezier(.2,.7,.2,1) both;
  transition: transform .2s ease, box-shadow .2s ease;
}
#dashboard.handoff-dashboard .handoff-card:hover { transform: translateY(-4px); box-shadow: var(--hd-shadow-3); }
@keyframes handoffCardIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
#dashboard.handoff-dashboard .handoff-card__ribbon {
  height: 6px; background: var(--hd-card-c); position: relative; overflow: hidden;
}
#dashboard.handoff-dashboard .handoff-card__ribbon::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 25%, rgba(255,255,255,.55) 50%, transparent 75%);
  transform: translateX(-120%); animation: handoffShimmer 3.6s linear infinite;
}
@keyframes handoffShimmer { to { transform: translateX(120%); } }
#dashboard.handoff-dashboard .handoff-stock-card__head {
  padding: 14px 16px 10px; display: flex; justify-content: space-between; gap: 12px; align-items: flex-start;
  background: linear-gradient(180deg, color-mix(in oklab, var(--hd-card-c) 10%, white) 0%, #fff 100%);
}
#dashboard.handoff-dashboard .handoff-stock-card__title-wrap { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
#dashboard.handoff-dashboard .handoff-stock-card__title {
  font-size: 15px; font-weight: 700; color: var(--hd-ink-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#dashboard.handoff-dashboard .handoff-stock-card__code {
  width: fit-content; padding: 4px 8px; border-radius: 999px;
  background: color-mix(in oklab, var(--hd-card-c) 10%, white);
  color: var(--hd-card-c); font-size: 11px; font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
#dashboard.handoff-dashboard .handoff-semaforo {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap;
}
#dashboard.handoff-dashboard .handoff-semaforo--ok { background: #DCFCE7; color: #14532D; }
#dashboard.handoff-dashboard .handoff-semaforo--warn { background: #FEF3C7; color: #78350F; }
#dashboard.handoff-dashboard .handoff-semaforo--danger {
  background: #FEE2E2; color: #7F1D1D; animation: handoffPulseBg 1.4s ease-in-out infinite;
}
@keyframes handoffPulseBg {
  0%, 100% { background: #FEE2E2; }
  50% { background: #FCA5A5; }
}
#dashboard.handoff-dashboard .handoff-stock-card__body {
  padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 10px; flex: 1;
}
#dashboard.handoff-dashboard .handoff-stock-metric {
  display: flex; justify-content: space-between; gap: 12px; align-items: flex-start;
  padding-bottom: 10px; border-bottom: 1px dashed var(--hd-border);
}
#dashboard.handoff-dashboard .handoff-stock-metric:last-of-type { border-bottom: 0; padding-bottom: 0; }
#dashboard.handoff-dashboard .handoff-stock-metric__label {
  font-size: 11.5px; color: var(--hd-ink-3); font-weight: 600;
}
#dashboard.handoff-dashboard .handoff-stock-metric__value {
  display: inline-flex; align-items: baseline; gap: 6px; font-size: 15px; font-weight: 700;
  color: var(--hd-ink-1); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-align: right;
}
#dashboard.handoff-dashboard .handoff-stock-metric__value small {
  font-size: 11px; color: var(--hd-ink-4); font-weight: 600; font-family: inherit;
}
#dashboard.handoff-dashboard .handoff-stock-metric__value--big { color: var(--hd-card-c); font-size: 22px; font-weight: 800; }
#dashboard.handoff-dashboard .handoff-stock-progress {
  margin-top: 4px; display: flex; flex-direction: column; gap: 5px;
}
#dashboard.handoff-dashboard .handoff-stock-progress__row {
  display: flex; justify-content: space-between; font-size: 10.5px; color: var(--hd-ink-4);
  font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
}
#dashboard.handoff-dashboard .handoff-stock-progress__bar {
  height: 8px; background: #EEF2F8; border-radius: 999px; overflow: hidden; position: relative;
}
#dashboard.handoff-dashboard .handoff-stock-progress__fill {
  height: 100%; border-radius: 999px; width: 0;
  background: linear-gradient(90deg, var(--hd-card-c), color-mix(in oklab, var(--hd-card-c) 60%, white));
  transition: width 1s cubic-bezier(.2,.7,.2,1); position: relative;
}
#dashboard.handoff-dashboard .handoff-stock-progress__fill::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent);
  animation: handoffShimmerFill 2.2s linear infinite;
}
@keyframes handoffShimmerFill { to { transform: translateX(120%); } }
#dashboard.handoff-dashboard .handoff-stock-card--warn .handoff-stock-progress__fill { background: linear-gradient(90deg, var(--hd-warn), #FCD34D); }
#dashboard.handoff-dashboard .handoff-stock-card--danger .handoff-stock-progress__fill { background: linear-gradient(90deg, var(--hd-danger), #FCA5A5); }
#dashboard.handoff-dashboard .handoff-stock-foot {
  margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding-top: 8px;
}
#dashboard.handoff-dashboard .handoff-stock-foot__label {
  font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--hd-ink-4); font-weight: 700;
}
#dashboard.handoff-dashboard .handoff-stock-foot__value {
  font-size: 12px; font-weight: 700; color: var(--hd-ink-2); text-align: right;
}
#dashboard.handoff-dashboard .handoff-imp-card__head {
  padding: 14px 16px 12px; color: #fff;
  background: linear-gradient(180deg, color-mix(in oklab, var(--hd-card-c) 88%, #0A2749) 0%, color-mix(in oklab, var(--hd-card-c) 58%, #0A2749) 100%);
}
#dashboard.handoff-dashboard .handoff-imp-card__topline {
  display: flex; justify-content: space-between; gap: 10px; align-items: center;
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; font-weight: 800;
  color: rgba(255,255,255,.82);
}
#dashboard.handoff-dashboard .handoff-imp-card__ref {
  padding: 3px 8px; border-radius: 8px; background: rgba(255,255,255,.12); font-size: 11px;
}
#dashboard.handoff-dashboard .handoff-imp-card__prov {
  margin-top: 6px; font-size: 18px; font-weight: 800; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#dashboard.handoff-dashboard .handoff-imp-card__origin {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; color: rgba(255,255,255,.92);
}
#dashboard.handoff-dashboard .handoff-imp-card__flag {
  width: 20px; height: 16px; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.16); color: #fff; font-size: 10px; font-weight: 800;
}
#dashboard.handoff-dashboard .handoff-imp-card__bullet { opacity: .6; margin: 0 4px; }
#dashboard.handoff-dashboard .handoff-imp-status-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px;
}
#dashboard.handoff-dashboard .handoff-imp-state-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 800; background: rgba(255,255,255,.18); color: #fff;
}
#dashboard.handoff-dashboard .handoff-imp-days {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 800;
}
#dashboard.handoff-dashboard .handoff-imp-days__ico::before { content: '●'; }
#dashboard.handoff-dashboard .handoff-imp-days--ok { background: rgba(22,163,74,.16); color: #DCFCE7; }
#dashboard.handoff-dashboard .handoff-imp-days--warn { background: rgba(245,158,11,.20); color: #FEF3C7; }
#dashboard.handoff-dashboard .handoff-imp-days--danger { background: rgba(220,38,38,.18); color: #FECACA; animation: handoffEtaPulse 1s infinite; }
@keyframes handoffEtaPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220,38,38,.45); }
  50% { transform: scale(1.04); box-shadow: 0 0 0 8px rgba(220,38,38,0); }
}
#dashboard.handoff-dashboard .handoff-imp-ship {
  padding: 12px 16px 10px; background: #fff; border-bottom: 1px solid var(--hd-border);
}
#dashboard.handoff-dashboard .handoff-imp-ship__track {
  position: relative; height: 44px; border-radius: 12px; overflow: hidden;
  background: linear-gradient(180deg, #EFF6FF 0%, #DBEAFE 70%, #E0F2FE 100%);
  border: 1px solid #D8E3F0;
}
#dashboard.handoff-dashboard .handoff-imp-ship__wave {
  position: absolute; left: 0; right: 0; bottom: 0; height: 12px;
  background: radial-gradient(circle at 10% 100%, rgba(30,107,198,.22) 0 6px, transparent 7px), radial-gradient(circle at 30% 100%, rgba(30,107,198,.18) 0 5px, transparent 6px), radial-gradient(circle at 55% 100%, rgba(30,107,198,.22) 0 6px, transparent 7px), radial-gradient(circle at 80% 100%, rgba(30,107,198,.18) 0 5px, transparent 6px);
}
#dashboard.handoff-dashboard .handoff-imp-ship__ship {
  position: absolute; top: 7px; transform: translateX(-50%); transition: left .5s ease;
}
#dashboard.handoff-dashboard .handoff-imp-ship__stages {
  display: flex; justify-content: space-between; gap: 8px; margin-top: 8px;
}
#dashboard.handoff-dashboard .handoff-ship-stage {
  position: relative; flex: 1; padding-top: 8px; text-align: center;
  font-size: 9px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; color: var(--hd-ink-4);
}
#dashboard.handoff-dashboard .handoff-ship-stage::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 6px; height: 6px; border-radius: 50%; background: #CFD9E7;
}
#dashboard.handoff-dashboard .handoff-ship-stage.reached::before,
#dashboard.handoff-dashboard .handoff-ship-stage.current::before { background: var(--hd-card-c); }
#dashboard.handoff-dashboard .handoff-ship-stage.current { color: var(--hd-card-c); }
#dashboard.handoff-dashboard .handoff-imp-data {
  padding: 12px 16px 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px;
}
#dashboard.handoff-dashboard .handoff-imp-data__row {
  padding: 10px 12px; border-radius: 12px; background: #F8FAFC; border: 1px solid #E5ECF5;
}
#dashboard.handoff-dashboard .handoff-imp-data__lbl {
  display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--hd-ink-4); font-weight: 800; margin-bottom: 4px;
}
#dashboard.handoff-dashboard .handoff-imp-data__val {
  font-size: 13px; font-weight: 900; color: var(--hd-ink-1); word-break: break-word;
}
#dashboard.handoff-dashboard .handoff-imp-data__val--strong { color: var(--hd-card-c); }
#dashboard.handoff-dashboard .handoff-imp-foot {
  margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 16px 14px; border-top: 1px solid var(--hd-border); background: #fff;
}
#dashboard.handoff-dashboard .handoff-imp-foot__eta { font-size: 12px; color: var(--hd-ink-3); }
#dashboard.handoff-dashboard .handoff-imp-foot__eta strong { color: var(--hd-ink-1); }
#dashboard.handoff-dashboard .handoff-empty {
  grid-column: 1 / -1; padding: 24px; border-radius: 16px; background: #fff;
  border: 1px dashed var(--hd-border-strong); color: var(--hd-ink-3); text-align: center;
}
#dashboard.handoff-dashboard .handoff-empty strong { display: block; color: var(--hd-ink-1); margin-bottom: 4px; }
#dashboard.handoff-dashboard .stack-item__actions { display: flex; gap: 8px; flex-wrap: wrap; }
button#refreshAllBtn.handoff-refreshing::before {
  content: '⟳'; display: inline-block; margin-right: 6px; animation: handoffSpin .8s linear infinite;
}
@keyframes handoffSpin { to { transform: rotate(360deg); } }

@media (max-width: 1450px) {
  #dashboardStats.handoff-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #dashboard.handoff-dashboard .handoff-grid--stock,
  #dashboard.handoff-dashboard .handoff-grid--imports { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 920px) {
  #dashboardStats.handoff-kpis,
  #dashboard.handoff-dashboard .handoff-grid--stock,
  #dashboard.handoff-dashboard .handoff-grid--imports,
  #dashboard.handoff-dashboard .handoff-imp-data { grid-template-columns: 1fr; }
  #dashboard.handoff-dashboard .handoff-imp-status-row,
  #dashboard.handoff-dashboard .handoff-imp-foot,
  #dashboard.handoff-dashboard .handoff-stock-card__head { align-items: flex-start; flex-direction: column; }
}


/* r14 - corrige alineación del módulo Importaciones sin tocar dashboard */
#importaciones .importaciones-layout {
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
  align-items: start;
}
#importaciones #importacionForm {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}
#importaciones #importacionForm .form-group,
#importaciones #importacionForm .checkbox-cell,
#importaciones #importacionForm .form-actions {
  min-width: 0;
}
#importaciones #importacionForm label {
  display: block;
  margin-bottom: 6px;
  line-height: 1.2;
  white-space: normal;
}
#importaciones #importacionForm input,
#importaciones #importacionForm select,
#importaciones #importacionForm textarea {
  width: 100%;
}
#importaciones #importacionForm .form-group--full,
#importaciones #importacionForm .import-form-actions {
  grid-column: 1 / -1;
}
#importaciones .table-toolbar {
  align-self: flex-start;
}
@media (max-width: 1400px) {
  #importaciones .importaciones-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  #importaciones #importacionForm {
    grid-template-columns: 1fr;
  }
}


/* r16 - Importaciones como hoja única con filas colapsables (acordeón) */
#importaciones .table-wrapper {
  overflow-x: auto;
}
#importaciones .accordion-table {
  min-width: 720px;
  width: 100%;
  table-layout: auto;
}
#importaciones .accordion-table th,
#importaciones .accordion-table td {
  word-break: normal;
  overflow-wrap: break-word;
}
#importaciones .accordion-table td.nowrap,
#importaciones .accordion-table th.nowrap {
  white-space: nowrap;
}
#importaciones .stack-item__actions {
  flex-wrap: wrap;
}

.import-row {
  cursor: pointer;
  transition: background-color .15s ease;
}
.import-row:hover {
  background: rgba(51, 197, 243, .07);
}
.import-row.is-selected {
  background: rgba(51, 197, 243, .12);
}
.import-row--new {
  background: rgba(40, 167, 69, .08);
}
.import-row td button.accordion-toggle,
.import-row td button.action-btn {
  cursor: pointer;
}

.accordion-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  border: 1px solid rgba(31, 38, 78, 0.14);
  background: #f5f8ff;
  color: #38518d;
  vertical-align: middle;
  margin-right: 6px;
}
.accordion-toggle__chevron {
  transition: transform .18s ease;
}
.accordion-toggle__chevron.is-open {
  transform: rotate(90deg);
}

.import-detail-row > td {
  padding: 0;
  border-bottom: 1px solid rgba(31, 38, 78, 0.1);
  background: #f9fbff;
}
.import-detail-mount {
  padding: 16px;
  display: block;
}
.import-detail-panel {
  animation: importDetailIn .18s ease both;
}
@keyframes importDetailIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.import-detail-panel.is-new-mode .import-detail-panel__existing-only {
  display: none;
}

/* =============== Inventario: acordeón de materias primas =============== */
.mp-item__header {
  cursor: pointer;
  user-select: none;
  border-radius: 10px;
  transition: background .15s ease;
}
.mp-item__header:hover {
  background: rgba(31, 38, 78, .04);
}
.mp-item__header:focus-visible {
  outline: 2px solid #33c5f3;
  outline-offset: 2px;
}
.mp-item__title {
  display: flex;
  align-items: center;
  gap: 4px;
}
.mp-item.is-open {
  border-color: rgba(51, 197, 243, .35);
  box-shadow: 0 4px 14px rgba(31, 38, 78, .08);
}
.mp-detail {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px dashed rgba(31, 38, 78, .12);
  animation: importDetailIn .18s ease both;
}
.mp-detail__summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.mp-summary-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f5f8ff;
  border: 1px solid rgba(31, 38, 78, .08);
}
.mp-summary-card span {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  font-weight: 800;
}
.mp-summary-card strong {
  font-size: 13px;
  color: var(--text);
  font-weight: 900;
}
.mp-summary-card--in strong { color: #146c2e; }
.mp-summary-card--out strong { color: #9c1c29; }
.mp-detail__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}
.mp-mov-row {
  display: grid;
  grid-template-columns: 78px 64px 96px 1fr 1fr;
  gap: 8px;
  align-items: center;
  padding: 7px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(31, 38, 78, .08);
  font-size: 11px;
}
.mp-mov-row__date { color: var(--muted); font-weight: 600; }
.mp-mov-row__type { font-weight: 800; text-transform: uppercase; font-size: 9.5px; letter-spacing: .04em; }
.mp-mov-row__qty { font-weight: 900; font-variant-numeric: tabular-nums; }
.mp-mov-row__origin, .mp-mov-row__ref { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-mov-row--in { border-left: 3px solid #16a34a; }
.mp-mov-row--in .mp-mov-row__type, .mp-mov-row--in .mp-mov-row__qty { color: #146c2e; }
.mp-mov-row--out { border-left: 3px solid #dc2626; }
.mp-mov-row--out .mp-mov-row__type, .mp-mov-row--out .mp-mov-row__qty { color: #9c1c29; }
.mp-mov-row--adj { border-left: 3px solid #d8a100; }
.mp-mov-row--adj .mp-mov-row__type, .mp-mov-row--adj .mp-mov-row__qty { color: #7a5900; }

@media (max-width: 720px) {
  .mp-detail__summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mp-mov-row { grid-template-columns: 1fr 1fr; grid-template-areas: "date type" "qty qty" "origin ref"; }
  .mp-mov-row__date { grid-area: date; }
  .mp-mov-row__type { grid-area: type; text-align: right; }
  .mp-mov-row__qty { grid-area: qty; }
  .mp-mov-row__origin { grid-area: origin; }
  .mp-mov-row__ref { grid-area: ref; text-align: right; }
}

.import-historial-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) {
  .import-historial-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.link-button {
  border: none;
  background: none;
  padding: 0;
  color: #19a8df;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}
.link-button:hover { color: #33c5f3; }

#importaciones #importacionForm {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}
#importaciones #importacionForm .form-group--full,
#importaciones #importacionForm .form-actions {
  grid-column: 1 / -1;
}
#importaciones #importacionForm label {
  display: block;
  margin-bottom: 6px;
  white-space: normal;
  line-height: 1.2;
}
#importaciones #importacionForm input,
#importaciones #importacionForm select,
#importaciones #importacionForm textarea {
  width: 100%;
}
@media (max-width: 900px) {
  #importaciones .accordion-table {
    min-width: 900px;
  }
}
@media (max-width: 760px) {
  #importaciones #importacionForm {
    grid-template-columns: 1fr;
  }
  .import-historial-grid { grid-template-columns: 1fr; }
}
