:root {
  color-scheme: light;
  --bg: #dbe4f0;
  --header: #353535;
  --panel: #ffffff;
  --panel-soft: #f6f7fb;
  --line: #e2e7ef;
  --line-dark: #c9d1dd;
  --text: #283444;
  --muted: #7b8898;
  --nav-hover: rgba(255, 255, 255, 0.08);
  --nav-active: rgba(255, 255, 255, 0.14);
  --table-head: #433c8f;
  --titlebar: #2158bb;
  --titlebar-text: #ffffff;
  --chip: #edf1f7;
  --chip-text: #5a6573;
  --accent: #6c72f6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

body.auth-locked {
  overflow: hidden;
}

body.auth-page {
  display: grid;
  place-items: center;
}

body[data-import-actions-restricted="true"] #csv-button,
body[data-import-actions-restricted="true"] #import-button,
body[data-import-actions-restricted="true"] #import-remisiones-button,
body[data-import-actions-restricted="true"] #backfill-button,
body[data-import-actions-restricted="true"] #backfill-sql-button,
body[data-import-actions-restricted="true"] [data-admin-restricted-action="import"],
body[data-import-actions-restricted="true"] [data-admin-restricted-action="migration"] {
  display: none !important;
}

.auth-page-shell {
  width: 100%;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(180deg, #dce4f1 0%, #cfd8e8 100%);
}

.app-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: 66px;
  display: grid;
  grid-template-columns: max-content 1fr 330px;
  align-items: stretch;
  background: var(--header);
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
}

.brand-logo {
  width: auto;
  height: 58px;
  display: block;
  object-fit: contain;
}

.mobile-nav-toggle {
  display: none;
  width: 54px;
  height: 54px;
  margin: 6px 10px 6px 0;
  align-self: center;
  justify-self: end;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.mobile-nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: #ffffff;
}

.main-nav {
  display: flex;
  align-items: stretch;
  overflow: visible;
  padding: 0 10px;
}

.nav-item {
  position: relative;
  display: flex;
}

.nav-dropdown-item {
  position: relative;
}

.nav-button {
  min-width: 140px;
  height: 100%;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #f5f5f5;
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  border: none;
  cursor: pointer;
}

.nav-accordion-toggle {
  display: none;
}

.nav-button:hover,
.nav-button:focus-visible {
  background: var(--nav-hover);
  outline: none;
}

.nav-button.is-active {
  background: var(--nav-active);
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  display: none;
  background: #ffffff;
  border: 1px solid var(--line-dark);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  z-index: 100;
}

.nav-item-dropdown:hover .nav-dropdown,
.nav-item-dropdown:focus-within .nav-dropdown {
  display: block;
}

.nav-dropdown-link {
  display: block;
  padding: 12px 14px;
  color: var(--text);
  width: 100%;
  text-align: left;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  background: transparent;
  border: none;
  cursor: pointer;
}

.nav-dropdown-link:hover,
.nav-dropdown-link:focus-visible,
.nav-dropdown-link.is-active {
  background: #f1f4f8;
  outline: none;
}

.nav-dropdown-link.has-children::after {
  content: ">";
  float: right;
}

.nav-submenu {
  position: absolute;
  top: -1px;
  left: 100%;
  min-width: 200px;
  display: none;
  background: #ffffff;
  border: 1px solid var(--line-dark);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  z-index: 110;
}

.nav-dropdown-item:hover > .nav-submenu,
.nav-dropdown-item:focus-within > .nav-submenu {
  display: block;
}

.user-panel {
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: transparent;
}

.user-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  background: #ffffff;
  cursor: pointer;
  transition: opacity 0.16s ease, outline-color 0.16s ease;
}

.user-avatar:hover,
.user-avatar:focus {
  outline: 2px solid rgba(255, 255, 255, 0.75);
  outline-offset: 2px;
}

.user-avatar.is-uploading {
  opacity: 0.55;
  pointer-events: none;
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.user-line {
  font-size: 12px;
  color: #f3f3f3;
  white-space: nowrap;
}

.user-line span {
  color: #ffffff;
  font-weight: 700;
}

.app-main {
  padding: 82px 20px 20px;
}

.content-panel {
  min-height: calc(100vh - 102px);
  background: transparent;
  border: none;
  padding: 0;
}

.content-panel[hidden] {
  display: none;
}

.panel-head {
  margin-bottom: 14px;
}

.panel-head h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  color: #243345;
}

.workspace-card {
  min-height: 420px;
  background: transparent;
  border: none;
}

.empty-state {
  padding: 18px;
  color: var(--muted);
  font-size: 15px;
}

.empty-state[hidden] {
  display: none;
}

.empty-state.is-loading {
  position: relative;
  overflow: hidden;
  padding-bottom: 28px;
}

.empty-state.is-loading::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 12px;
  height: 7px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, #1d4ed8 0 45%, transparent 45% 100%),
    #d7e1f1;
  background-size: 180% 100%, 100% 100%;
  animation: loading-bar 0.9s linear infinite;
}

@keyframes loading-bar {
  from {
    background-position: 180% 0, 0 0;
  }
  to {
    background-position: -80% 0, 0 0;
  }
}

.table-wrap {
  width: 100%;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 14px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

th {
  background: var(--table-head);
  color: #ffffff;
  text-transform: uppercase;
  font-size: 12px;
}

.content-panel-catalog {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.catalog-shell {
  width: min(100%, 760px);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(66, 78, 97, 0.12);
}

.catalog-shell-wide {
  width: min(100%, 1180px);
}

.catalog-titlebar {
  padding: 20px 18px;
  background: var(--titlebar);
  color: var(--titlebar-text);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.catalog-titlebar-with-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.catalog-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  background: #ffffff;
}

.toolbar-search {
  flex: 1;
}

.toolbar-search input {
  width: 100%;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

.toolbar-button,
.toolbar-icon {
  height: 38px;
  border: 1px solid var(--line);
  background: var(--chip);
  color: var(--chip-text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.toolbar-export {
  position: relative;
}

.toolbar-button {
  min-width: 120px;
  padding: 0 16px;
}

.toolbar-image-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.toolbar-button-image {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  display: block;
  object-fit: contain;
}

.toolbar-button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.export-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 140px;
  display: none;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
  z-index: 30;
}

.export-menu.open {
  display: block;
}

.export-option {
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  text-align: left;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.export-option:last-child {
  border-bottom: none;
}

.export-option:hover {
  background: #f5f7fb;
}

.toolbar-icon {
  width: 42px;
}

.workspace-card-catalog {
  padding: 0 20px 20px;
}

.inventory-workspace {
  padding: 20px;
  display: grid;
  gap: 24px;
}

.inventory-panel {
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(66, 78, 97, 0.08);
}

.inventory-strip {
  height: 56px;
  background: #d8e1ea;
}

.inventory-filters {
  padding: 10px 6px 8px;
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 20px;
  align-items: start;
}

.inventory-zone,
.inventory-types {
  padding: 6px 0;
  color: #6f7f95;
  font-size: 16px;
}

.inventory-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  color: #7185a0;
}

.inventory-type-list {
  display: grid;
  gap: 8px;
}

.inventory-type-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #627690;
  font-size: 15px;
}

.inventory-type-item input {
  width: 18px;
  height: 18px;
}

.inventory-summary {
  padding: 10px 6px 8px;
  display: grid;
  gap: 22px;
}

.inventory-summary-head,
.inventory-summary-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.inventory-summary-head {
  color: #7185a0;
  font-size: 18px;
  font-weight: 700;
}

.inventory-summary-row > span {
  color: #556b86;
  font-size: 17px;
  font-weight: 700;
}

.inventory-summary-row output {
  min-height: 40px;
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgba(19, 31, 53, 0.03), 0 5px 18px rgba(43, 60, 87, 0.04);
  color: #5a718f;
  text-align: right;
  font-size: 15px;
  font-weight: 700;
}

.inventory-table-panel .table-wrap {
  padding: 0 0 6px;
}

.inventory-empty-block {
  min-height: 24px;
  background: #ffffff;
}

.inventory-table-panel .catalog-toolbar {
  justify-content: flex-end;
  padding: 8px 18px 14px 0;
}

.almacenes-select {
  min-width: 210px;
  text-align: left;
}

.almacenes-workspace {
  padding: 20px;
  display: grid;
  gap: 24px;
}

.almacenes-panel {
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(66, 78, 97, 0.08);
}

.almacenes-current {
  padding: 16px 18px 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.almacenes-info {
  display: grid;
  gap: 6px;
  color: #627690;
}

.almacenes-info strong {
  font-size: 18px;
  color: #42546d;
}

.almacenes-message {
  margin: 0;
  padding: 0 18px 18px;
  min-height: 24px;
  font-size: 14px;
  font-weight: 700;
  color: #627690;
}

.almacenes-message[data-state="success"] {
  color: #138a55;
}

.almacenes-message[data-state="error"] {
  color: #c0392b;
}

.almacenes-message[data-state="info"] {
  color: #4b6280;
}

.almacenes-summary {
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.almacenes-card {
  padding: 18px;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  background: linear-gradient(180deg, #f9fbfd 0%, #f1f5fa 100%);
}

.almacenes-card-title {
  color: #6d7f95;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.almacenes-card-value {
  margin-top: 10px;
  color: #33445a;
  font-size: 32px;
  font-weight: 700;
}

.almacenes-card-meta {
  margin-top: 6px;
  color: #61758f;
  font-size: 15px;
  font-weight: 700;
}

.almacenes-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 12px 14px;
}

.almacenes-save-button {
  min-width: 200px;
}

.list-section-title {
  padding: 14px 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #4e6078;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

#pending-count-badge {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  text-transform: none;
}

.titlebar-badges {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

#active-transfer-folio {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  text-transform: none;
}

.movement-cards {
  display: none;
  padding: 12px;
  gap: 12px;
}

.movement-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 14px;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(66, 78, 97, 0.06);
}

.movement-card-empty {
  text-align: center;
  color: #6f7f95;
  font-weight: 700;
}

.movement-card-row {
  display: grid;
  gap: 4px;
}

.movement-card-label {
  color: #789;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.movement-card-row strong {
  color: #33445a;
  font-size: 15px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.pending-action-cell {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

.pending-remove-button {
  border: 1px solid #b84545;
  background: #fff3f1;
  color: #8d2020;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.pending-remove-button:hover,
.pending-remove-button:focus-visible {
  background: #b84545;
  border-color: #b84545;
  color: #ffffff;
  outline: none;
}

.pending-remove-button-card {
  align-self: flex-start;
  margin-top: 6px;
}

.scroll-bottom-button {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 45;
  border: none;
  border-radius: 999px;
  background: #1f57b7;
  color: #ffffff;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(20, 53, 109, 0.26);
  cursor: pointer;
}

.scroll-bottom-button:hover {
  background: #184897;
}

.print-report {
  display: none;
  color: #111111;
  font-family: "Times New Roman", serif;
}

.print-report-head {
  display: grid;
  grid-template-columns: 180px 1fr 220px;
  align-items: start;
  gap: 18px;
  margin-bottom: 16px;
}

.print-report-logo {
  width: 140px;
  height: auto;
}

.print-report-title {
  text-align: center;
}

.print-report-title h1,
.print-report-title h2 {
  margin: 0;
  font-weight: 700;
  text-transform: uppercase;
}

.print-report-title h1 {
  font-size: 18px;
}

.print-report-title h2 {
  margin-top: 6px;
  font-size: 14px;
}

.print-report-meta {
  text-align: left;
  font-size: 12px;
  line-height: 1.4;
}

.print-report-meta-label {
  font-weight: 700;
  text-transform: uppercase;
}

.print-report-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 4px 6px;
  font-size: 12px;
}

.print-report-table th,
.print-report-table td {
  padding: 4px 6px;
  border: 1px solid #333333;
  text-align: right;
  background: #ffffff;
}

.print-report-table th:first-child,
.print-report-table td:first-child {
  text-align: center;
}

.print-report-table thead th,
.print-report-table tfoot th {
  font-weight: 700;
}

.print-group-row th {
  text-align: center !important;
}

.print-report-page {
  margin-bottom: 14mm;
}

.print-report-page-break {
  break-after: page;
  page-break-after: always;
}

.print-report-info,
.print-route-box {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid #333333;
  margin: 10px 0 12px;
  font-size: 12px;
}

.print-route-box {
  grid-template-columns: 1fr 1fr;
}

.print-report-info-transfer {
  grid-template-columns: repeat(5, 1fr);
}

.print-report-info div,
.print-route-box div {
  min-height: 38px;
  padding: 6px 8px;
  border-right: 1px solid #333333;
}

.print-report-info div:last-child,
.print-route-box div:last-child {
  border-right: none;
}

.print-report-info span,
.print-route-box span {
  display: block;
  margin-bottom: 3px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.print-report-info strong,
.print-route-box strong {
  display: block;
  font-size: 12px;
}

.print-type-section {
  margin-top: 12px;
}

.print-type-section h3 {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.print-transfer-table {
  border-collapse: collapse;
  border-spacing: 0;
  margin-bottom: 14px;
}

.print-transfer-table th,
.print-transfer-table td {
  border: none;
  border-bottom: 1px solid #d7d7d7;
  padding: 5px 4px;
}

.print-transfer-table thead th {
  border-bottom: 1px solid #777777;
}

.print-transfer-table tfoot th {
  border-top: 1px solid #777777;
  border-bottom: none;
}

.print-transfer-table th:first-child,
.print-transfer-table td:first-child {
  text-align: left;
}

.print-empty-row {
  padding: 12px 0;
  font-size: 12px;
  text-align: center;
}

.print-signatures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30mm;
  margin-top: 22mm;
}

.print-signature {
  text-align: center;
  font-size: 12px;
}

.print-signature-line {
  border-top: 1px solid #111111;
  margin-bottom: 6px;
}

.print-signature strong,
.print-signature span {
  display: block;
}

.print-signature span {
  margin-top: 4px;
}

.table-wrap-catalog {
  background: #ffffff;
}

@media (min-width: 761px) {
body.page-traslados #summary-view .catalog-toolbar {
  border-bottom: 1px solid #e2e8f2;
}

body.page-traslados #summary-view .new-transfer-image-button {
  width: 76px;
  min-width: 76px;
  height: 58px;
  padding: 0;
  border-color: transparent;
  background: transparent;
}

body.page-traslados #summary-view .new-transfer-image-button .toolbar-button-image {
  width: 46px;
  height: 46px;
}

body.page-traslados #summary-view .new-transfer-image-button:hover {
  border-color: transparent;
  background: transparent;
  filter: brightness(0.96);
}

body.page-traslados #summary-view .table-wrap-catalog {
  border: 1px solid #d9e3ef;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(30, 41, 59, 0.07);
}

body.page-traslados #summary-view .catalog-table {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

body.page-traslados #summary-view .catalog-table th {
  padding: 13px 12px;
  background: #eef3f8;
  color: #334155;
  border-bottom: 1px solid #d9e3ef;
  font-size: 11px;
  letter-spacing: 0;
}

body.page-traslados #summary-view .catalog-table td {
  padding: 13px 12px;
  border-bottom: 1px solid #e6edf5;
  color: #526173;
  vertical-align: middle;
  line-height: 1.3;
}

body.page-traslados #summary-view .catalog-table tbody tr:nth-child(even) td {
  background: #f8fafc;
}

body.page-traslados #summary-view .catalog-table tbody tr:hover td {
  background: #edf5ff;
  color: #243345;
}

body.page-traslados #summary-view .catalog-table tbody tr:last-child td {
  border-bottom: 0;
}

body.page-traslados #summary-view .catalog-table th:nth-child(1),
body.page-traslados #summary-view .catalog-table td:nth-child(1),
body.page-traslados #summary-view .catalog-table th:nth-child(7),
body.page-traslados #summary-view .catalog-table td:nth-child(7) {
  width: 58px;
}

body.page-traslados #summary-view .catalog-table th:nth-child(2),
body.page-traslados #summary-view .catalog-table td:nth-child(2) {
  width: 84px;
  font-weight: 700;
  color: #334155;
}

body.page-traslados #summary-view .catalog-table th:nth-child(3),
body.page-traslados #summary-view .catalog-table td:nth-child(3) {
  width: 180px;
}

body.page-traslados #summary-view .catalog-table th:nth-child(4),
body.page-traslados #summary-view .catalog-table td:nth-child(4) {
  width: 230px;
}

body.page-traslados #summary-view .catalog-table th:nth-child(6),
body.page-traslados #summary-view .catalog-table td:nth-child(6) {
  width: 112px;
  font-weight: 700;
  color: #1f4f8f;
}

body.page-traslados #summary-view .row-action {
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
}

body.page-traslados #summary-view .row-action:hover {
  border-color: transparent;
  background: transparent;
  filter: brightness(0.96);
}
}

.catalog-table th:first-child,
.catalog-table td:first-child {
  width: 56px;
}

.catalog-table td {
  color: #8090a6;
  background: #ffffff;
}

.catalog-table .text-left {
  text-align: left;
}

.reprint-table th:first-child,
.reprint-table td:first-child {
  width: auto;
}

.reprint-table tbody tr {
  cursor: pointer;
}

.reprint-table tbody tr.selected-row td {
  background: #e7eefb;
  color: #22314d;
  font-weight: 700;
}

.col-action {
  width: 56px;
}

body.page-traslados .col-action {
  width: 56px;
}

.col-print-action {
  width: 56px;
  text-align: center;
}

.row-action {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: #8394ae;
  font-size: 16px;
  cursor: pointer;
}

.row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.row-action:hover {
  color: #4d5dc8;
}

.row-action:disabled {
  opacity: 0.45;
  cursor: wait;
}

.print-image-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.print-button-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: block;
  object-fit: contain;
}

.row-print-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.row-print-action .print-button-icon {
  width: 21px;
  height: 21px;
}

.row-detail-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.detail-button-icon {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  display: block;
  object-fit: contain;
}

.catalog-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 18px 0 0;
}

.catalog-footer-left,
.catalog-footer-center,
.catalog-footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #7f8ba0;
  font-size: 14px;
}

.footer-chip {
  min-width: 42px;
  height: 36px;
  border: 1px solid var(--line);
  background: var(--chip);
  color: var(--chip-text);
  font: inherit;
  cursor: pointer;
}

.footer-chip.muted {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

.footer-label {
  margin-left: 4px;
}

.footer-input,
.footer-select {
  width: 56px;
  height: 36px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--chip-text);
  font: inherit;
  text-align: center;
}

.pager-arrow {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #b3bccb;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.pager-arrow:disabled {
  opacity: 0.45;
  cursor: default;
}

.pager-current {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
}

body.page-contracts-tabaco {
  background: #d4dfeb;
}

body.page-contracts-tabaco .app-main {
  padding: 84px 0 12px;
}

body.page-contracts-tabaco .content-panel-catalog {
  width: 100%;
}

body.page-contracts-tabaco .catalog-shell {
  width: min(calc(100vw - 352px), 1545px);
  min-width: 980px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(39, 56, 80, 0.08);
}

body.page-contracts-tabaco .catalog-titlebar {
  height: 49px;
  display: flex;
  align-items: center;
  padding: 0 15px;
  background: #1858c7;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

body.page-contracts-tabaco .catalog-toolbar {
  min-height: 92px;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) auto minmax(170px, 1fr);
  align-items: start;
  gap: 20px;
  padding: 19px 18px 18px;
  background: #ffffff;
}

body.page-contracts-tabaco .toolbar-left,
body.page-contracts-tabaco .toolbar-center,
body.page-contracts-tabaco .toolbar-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

body.page-contracts-tabaco .toolbar-center {
  justify-content: center;
  gap: 3px;
}

body.page-contracts-tabaco .toolbar-right {
  justify-content: flex-end;
}

body.page-contracts-tabaco .toolbar-search {
  position: relative;
  flex: 0 0 315px;
  max-width: 315px;
}

body.page-contracts-tabaco .toolbar-search input {
  height: 34px;
  padding: 0 47px 0 13px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  color: #42546d;
  font-size: 12px;
  box-shadow: 0 1px 2px rgba(47, 62, 83, 0.03);
}

body.page-contracts-tabaco .toolbar-search input::placeholder {
  color: #6f7b8b;
  opacity: 0.95;
}

body.page-contracts-tabaco .search-select-icon,
body.page-contracts-tabaco .search-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

body.page-contracts-tabaco .search-select-icon {
  right: 30px;
  color: #17263a;
  font-size: 12px;
}

body.page-contracts-tabaco .search-icon {
  right: 11px;
  color: #9aabc0;
  font-size: 17px;
  line-height: 1;
}

body.page-contracts-tabaco .toolbar-button,
body.page-contracts-tabaco .toolbar-icon {
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 4px;
  background: #e5edf6;
  color: #16324d;
  font-size: 12px;
  font-weight: 400;
  box-shadow: none;
}

body.page-contracts-tabaco .toolbar-button.compact {
  min-width: auto;
  padding: 0 12px;
  gap: 8px;
}

body.page-contracts-tabaco .toolbar-button-icon {
  color: #16324d;
  font-size: 13px;
  line-height: 1;
}

body.page-contracts-tabaco .toolbar-caret {
  margin-left: 1px;
  color: #16324d;
  font-size: 11px;
}

body.page-contracts-tabaco .toolbar-icon {
  width: 37px;
  padding: 0;
  font-size: 15px;
}

body.page-contracts-tabaco .toolbar-divider {
  width: 1px;
  height: 18px;
  margin-left: 9px;
  background: #b9c0cb;
}

body.page-contracts-tabaco .export-menu {
  left: auto;
  right: 0;
  border-color: #dce4ee;
  border-radius: 4px;
}

body.page-contracts-tabaco .workspace-card-catalog {
  padding: 0 20px 19px;
  background: #ffffff;
  box-shadow: none;
}

body.page-contracts-tabaco .table-wrap-catalog {
  overflow-x: hidden;
  background: #ffffff;
}

body.page-contracts-tabaco .catalog-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

body.page-contracts-tabaco .catalog-table th {
  height: 37px;
  padding: 9px 9px;
  border-right: 1px solid rgba(255, 255, 255, 0.55);
  border-bottom: 0;
  background: #38327f;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  text-transform: none;
  white-space: normal;
  line-height: 1.15;
}

body.page-contracts-tabaco .catalog-table th:first-child,
body.page-contracts-tabaco .catalog-table td:first-child {
  width: 42px;
  min-width: 42px;
}

body.page-contracts-tabaco .catalog-table th:nth-child(2),
body.page-contracts-tabaco .catalog-table td:nth-child(2) {
  width: 9.5%;
}

body.page-contracts-tabaco .catalog-table th:nth-child(3),
body.page-contracts-tabaco .catalog-table td:nth-child(3) {
  width: 16%;
}

body.page-contracts-tabaco .catalog-table th:nth-child(4),
body.page-contracts-tabaco .catalog-table td:nth-child(4) {
  width: 7.5%;
}

body.page-contracts-tabaco .catalog-table th:nth-child(5),
body.page-contracts-tabaco .catalog-table td:nth-child(5) {
  width: 7.5%;
}

body.page-contracts-tabaco .catalog-table th:nth-child(6),
body.page-contracts-tabaco .catalog-table td:nth-child(6) {
  width: 6%;
}

body.page-contracts-tabaco .catalog-table th:nth-child(7),
body.page-contracts-tabaco .catalog-table td:nth-child(7) {
  width: 11%;
}

body.page-contracts-tabaco .catalog-table th:nth-child(8),
body.page-contracts-tabaco .catalog-table td:nth-child(8) {
  width: 11%;
}

body.page-contracts-tabaco .catalog-table th:nth-child(9),
body.page-contracts-tabaco .catalog-table td:nth-child(9) {
  width: 5.5%;
}

body.page-contracts-tabaco .catalog-table th:nth-child(10),
body.page-contracts-tabaco .catalog-table td:nth-child(10) {
  width: 8%;
}

body.page-contracts-tabaco .catalog-table th:nth-child(11),
body.page-contracts-tabaco .catalog-table td:nth-child(11) {
  width: 13%;
}

body.page-contracts-tabaco .catalog-table td {
  height: 49px;
  padding: 10px 9px;
  border-bottom: 1px solid #e8edf3;
  color: #526b86;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.page-contracts-tabaco .catalog-table td:nth-child(4),
body.page-contracts-tabaco .catalog-table td:nth-child(2),
body.page-contracts-tabaco .catalog-table td:nth-child(7),
body.page-contracts-tabaco .catalog-table td:nth-child(8),
body.page-contracts-tabaco .catalog-table td:nth-child(10),
body.page-contracts-tabaco .catalog-table td:nth-child(11) {
  text-align: left;
}

body.page-contracts-tabaco .catalog-table .col-action {
  text-align: center;
}

body.page-contracts-tabaco .row-action {
  width: 24px;
  height: 24px;
  color: #7c95b1;
  font-size: 16px;
}

body.page-contracts-tabaco .contract-editor-shell {
  width: min(calc(100vw - 100px), 1665px);
  min-width: 980px;
  background: #ffffff;
}

body.page-contracts-tabaco .contract-editor-form {
  padding: 25px 40px 48px;
  background: #ffffff;
}

body.page-contracts-tabaco .contract-editor-form.saving {
  opacity: 0.75;
  pointer-events: none;
}

body.page-contracts-tabaco .contract-editor-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 37px;
}

body.page-contracts-tabaco .editor-actions-center,
body.page-contracts-tabaco .editor-actions-right {
  display: flex;
  align-items: center;
  gap: 5px;
}

body.page-contracts-tabaco .editor-actions-center {
  justify-content: center;
}

body.page-contracts-tabaco .editor-actions-right {
  justify-content: flex-end;
}

body.page-contracts-tabaco .editor-button,
body.page-contracts-tabaco .editor-inline-button {
  height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 4px;
  background: #e5edf6;
  color: #14314d;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(42, 62, 88, 0.08);
}

body.page-contracts-tabaco .editor-button {
  min-width: 99px;
  padding: 0 17px;
}

body.page-contracts-tabaco .editor-button:disabled {
  opacity: 0.55;
  cursor: default;
}

body.page-contracts-tabaco .editor-button-new {
  min-width: 108px;
  background: #04d38b;
  color: #ffffff;
}

body.page-contracts-tabaco .editor-button-danger {
  background: #ff4e7f;
  color: #ffffff;
}

body.page-contracts-tabaco .editor-button-wide {
  min-width: 267px;
}

body.page-contracts-tabaco .editor-button-square {
  min-width: 48px;
  width: 48px;
  padding: 0;
}

body.page-contracts-tabaco .contract-editor-card {
  display: grid;
  gap: 25px;
}

body.page-contracts-tabaco .editor-row {
  display: grid;
  align-items: end;
  gap: 10px;
  padding: 13px 6px;
  background: #ffffff;
}

body.page-contracts-tabaco .editor-row-top {
  grid-template-columns: 1fr 1fr 1fr;
}

body.page-contracts-tabaco .editor-row-crop {
  grid-template-columns: 1.2fr 1.2fr 1fr 1fr 1fr;
}

body.page-contracts-tabaco .editor-row-location {
  grid-template-columns: minmax(160px, 1fr) auto minmax(160px, 1fr) auto minmax(160px, 1fr) auto;
  row-gap: 18px;
}

body.page-contracts-tabaco .contract-code-preview {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

body.page-contracts-tabaco .editor-row-location .editor-field:nth-of-type(4),
body.page-contracts-tabaco .editor-row-location .editor-field:nth-of-type(5),
body.page-contracts-tabaco .editor-row-location .editor-field:nth-of-type(6),
body.page-contracts-tabaco .editor-row-location .editor-active-field {
  grid-row: 2;
}

body.page-contracts-tabaco .editor-row-location .editor-field:nth-of-type(4) {
  grid-column: 1 / 2;
}

body.page-contracts-tabaco .editor-row-location .editor-field:nth-of-type(5) {
  grid-column: 3 / 4;
}

body.page-contracts-tabaco .editor-row-location .editor-inline-button:nth-of-type(4) {
  grid-row: 2;
  grid-column: 4 / 5;
}

body.page-contracts-tabaco .editor-row-location .editor-field:nth-of-type(6) {
  grid-column: 5 / 6;
}

body.page-contracts-tabaco .editor-row-location .editor-active-field {
  grid-column: 6 / 7;
}

body.page-contracts-tabaco .editor-field {
  display: grid;
  gap: 6px;
  color: #7890ad;
  font-size: 16px;
}

body.page-contracts-tabaco .editor-field-small {
  max-width: 160px;
}

body.page-contracts-tabaco .editor-field input,
body.page-contracts-tabaco .editor-field select {
  width: 100%;
  height: 42px;
  padding: 0 18px;
  border: 1px solid #e3e8ef;
  border-radius: 4px;
  background: #ffffff;
  color: #15304c;
  font: inherit;
  font-size: 16px;
  box-shadow: 0 6px 16px rgba(41, 57, 78, 0.04);
}

body.page-contracts-tabaco .editor-field input[readonly] {
  border-color: transparent;
  box-shadow: none;
  background: #ffffff;
  padding-left: 0;
}

body.page-contracts-tabaco .editor-inline-button {
  min-width: 103px;
  padding: 0 17px;
}

body.page-contracts-tabaco .editor-active-field {
  min-width: 170px;
  display: grid;
  grid-template-columns: auto auto;
  align-items: end;
  gap: 7px;
  padding: 0;
  border: 0;
  color: #7890ad;
}

body.page-contracts-tabaco .editor-active-field legend {
  width: 100%;
  grid-column: 1 / -1;
  margin-bottom: 8px;
}

body.page-contracts-tabaco .editor-active-field label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #526b86;
  font-size: 15px;
}

body.page-contracts-tabaco .editor-required-note {
  margin: 13px 0 0;
  color: #a82929;
  font-weight: 700;
}

body.page-contracts-tabaco .catalog-footer {
  min-height: 71px;
  padding: 21px 4px 0 0;
  gap: 18px;
}

body.page-contracts-tabaco .catalog-footer-left,
body.page-contracts-tabaco .catalog-footer-center,
body.page-contracts-tabaco .catalog-footer-right {
  color: #22314d;
  font-size: 12px;
}

body.page-contracts-tabaco .footer-chip,
body.page-contracts-tabaco .footer-input,
body.page-contracts-tabaco .footer-select {
  height: 34px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: #ffffff;
  color: #0f2542;
  font-size: 12px;
}

body.page-contracts-tabaco .footer-chip {
  min-width: 42px;
  background: #e5edf6;
}

body.page-contracts-tabaco .footer-input {
  width: 45px;
}

body.page-contracts-tabaco .footer-select {
  width: 57px;
}

body.page-contracts-tabaco .catalog-footer-center {
  gap: 8px;
}

body.page-contracts-tabaco .pager-numbers {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

body.page-contracts-tabaco .pager-page,
body.page-contracts-tabaco .pager-arrow {
  width: 24px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #6d7891;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

body.page-contracts-tabaco .pager-arrow {
  color: #6f7c90;
  font-size: 19px;
  font-weight: 400;
}

body.page-contracts-tabaco .pager-arrow:disabled {
  color: #c5ccd7;
  opacity: 1;
  cursor: default;
}

body.page-contracts-tabaco .pager-page.active {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #7585f1;
  color: #ffffff;
}

body.page-contracts-tabaco .pager-current[hidden] {
  display: none;
}

body.page-contracts-tabaco .catalog-footer-right {
  position: relative;
  justify-content: flex-end;
  min-width: 124px;
  padding-right: 8px;
  color: #111f35;
}

body.page-contracts-tabaco .catalog-footer-right::after {
  content: "";
  position: absolute;
  right: 0;
  top: 2px;
  width: 7px;
  height: 32px;
  border-right: 4px solid #2c63d8;
  border-bottom: 4px solid #2c63d8;
}

@media (max-width: 1180px) {
  body.page-contracts-tabaco .catalog-shell {
    width: calc(100vw - 24px);
    min-width: 0;
  }

  body.page-contracts-tabaco .catalog-toolbar {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  body.page-contracts-tabaco .toolbar-left,
  body.page-contracts-tabaco .toolbar-center,
  body.page-contracts-tabaco .toolbar-right {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  body.page-contracts-tabaco .toolbar-search {
    flex: 1 1 315px;
    max-width: 100%;
  }

  body.page-contracts-tabaco .catalog-footer {
    flex-wrap: wrap;
  }

  body.page-contracts-tabaco .contract-editor-form {
    padding: 20px 16px 32px;
  }

  body.page-contracts-tabaco .contract-editor-actions,
  body.page-contracts-tabaco .editor-row-top,
  body.page-contracts-tabaco .editor-row-crop,
  body.page-contracts-tabaco .editor-row-location {
    grid-template-columns: 1fr;
  }

  body.page-contracts-tabaco .editor-actions-center,
  body.page-contracts-tabaco .editor-actions-right {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  body.page-contracts-tabaco .editor-row-location .editor-field,
  body.page-contracts-tabaco .editor-row-location .editor-inline-button,
  body.page-contracts-tabaco .editor-row-location .editor-active-field {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  body.page-contracts-tabaco .editor-inline-button,
  body.page-contracts-tabaco .editor-button,
  body.page-contracts-tabaco .editor-button-wide {
    width: 100%;
    min-width: 0;
  }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(33, 42, 56, 0.36);
  z-index: 200;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: min(92vw, 460px);
  background: #ffffff;
  box-shadow: 0 20px 48px rgba(35, 43, 55, 0.2);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  font-size: 20px;
}

.modal-close {
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
}

.modal-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.modal-field {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.modal-field input,
.modal-field select {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 18px 18px;
}

.modal-button {
  min-width: 110px;
  height: 40px;
  border: 1px solid var(--line);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.modal-button.secondary {
  background: #ffffff;
  color: var(--text);
}

.modal-button.primary {
  background: var(--titlebar);
  border-color: var(--titlebar);
  color: #ffffff;
}

body.page-inventario .modal-backdrop {
  padding: 24px;
  background: rgba(17, 28, 45, 0.56);
  backdrop-filter: blur(3px);
}

body.page-inventario .inventario-editor {
  width: min(94vw, 720px);
  max-height: min(90vh, 760px);
  overflow: hidden;
  border: 1px solid rgba(112, 132, 160, 0.2);
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(13, 30, 52, 0.28);
}

body.page-inventario .inventario-editor .modal-head {
  padding: 22px 26px 18px;
  background: linear-gradient(135deg, #f7faff 0%, #eef4fb 100%);
}

body.page-inventario .inventario-editor .modal-head h2 {
  color: #182b45;
  font-size: 22px;
}

body.page-inventario .inventario-editor .modal-head p {
  margin: 5px 0 0;
  color: #6b7d96;
  font-size: 13px;
}

body.page-inventario .inventario-editor .modal-close {
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 3px 12px rgba(30, 55, 88, 0.12);
}

body.page-inventario .inventario-editor .modal-body {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
  max-height: calc(90vh - 170px);
  overflow-y: auto;
  padding: 24px 26px;
}

body.page-inventario .inventario-editor .modal-field-descripcion,
body.page-inventario .inventario-editor .modal-field-imagen {
  grid-column: 1 / -1;
}

body.page-inventario .inventario-editor .modal-field span {
  color: #52657e;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

body.page-inventario .inventario-editor .modal-field input,
body.page-inventario .inventario-editor .modal-field select {
  height: 46px;
  border: 1px solid #ced9e7;
  border-radius: 9px;
  background: #f9fbfd;
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

body.page-inventario .inventario-editor .modal-field input:focus,
body.page-inventario .inventario-editor .modal-field select:focus {
  outline: none;
  border-color: #4778b8;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(71, 120, 184, 0.14);
}

body.page-inventario .inventario-editor .modal-field input:disabled {
  color: #7d8da2;
  background: #edf1f6;
}

body.page-inventario .inventario-editor .modal-actions {
  padding: 17px 26px 22px;
  border-top: 1px solid #e2e9f2;
  background: #fbfcfe;
}

body.page-inventario .inventario-editor .modal-button {
  height: 44px;
  border-radius: 9px;
}

body.page-inventario .catalog-table tbody tr {
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

body.page-inventario .inventory-summary {
  margin: 0;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: #f6f8fb;
}

body.page-inventario .inventory-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}

body.page-inventario .inventory-summary-card {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

body.page-inventario .inventory-summary-card:last-child {
  border-right: 0;
}

body.page-inventario .inventory-summary-card strong {
  color: var(--titlebar);
  font-size: 21px;
  white-space: nowrap;
  text-transform: none;
}

@media (max-width: 700px) {
  body.page-inventario .inventory-summary { padding: 0 12px; }
  body.page-inventario .inventory-summary-grid { grid-template-columns: 1fr; }
  body.page-inventario .inventory-summary-card { min-height: 54px; padding: 10px 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  body.page-inventario .inventory-summary-card:last-child { border-bottom: 0; }
}

body.page-inventario .catalog-table tbody tr.is-selected {
  background: #dcecff;
  box-shadow: inset 5px 0 #2563a8, inset 0 0 0 2px #73a4dc;
  color: #163f70;
  font-weight: 700;
}

body.page-inventario .inventory-export-button {
  width: 46px;
  min-width: 46px;
  padding: 6px;
}

body.page-inventario .inventory-export-button img {
  width: 30px;
  height: 30px;
  display: block;
  object-fit: contain;
}

body.page-inventario .selected-product-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -4px 0 14px;
  padding: 10px 14px;
  border: 1px solid #9bc1eb;
  border-radius: 9px;
  background: #eaf4ff;
  color: #315d94;
  font-size: 13px;
}

body.page-inventario .selected-product-indicator[hidden] {
  display: none;
}

body.page-inventario .selected-product-check {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #2f72b9;
  color: #ffffff;
  font-weight: 800;
}

body.page-inventario .inventory-product-image {
  width: 54px;
  height: 44px;
  display: block;
  margin: auto;
  border: 1px solid #dce4ee;
  border-radius: 8px;
  background: #f5f7fa;
  object-fit: contain;
}

body.page-inventario .inventory-image-button {
  display: block;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: zoom-in;
}

body.page-inventario .inventory-image-viewer {
  position: relative;
  display: grid;
  gap: 14px;
  width: min(92vw, 760px);
  max-height: 90vh;
  padding: 22px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(13, 30, 52, 0.35);
  text-align: center;
}

body.page-inventario .inventory-image-viewer > img {
  width: 100%;
  height: min(68vh, 620px);
  border-radius: 12px;
  background: #f5f7fa;
  object-fit: contain;
}

body.page-inventario .inventory-image-viewer > strong {
  color: #273e5b;
  font-size: 16px;
}

body.page-inventario .inventory-image-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 3px 14px rgba(20, 40, 65, 0.2);
}

body.page-inventario .row-edit-button {
  width: 38px;
  height: 38px;
  padding: 5px;
  border: 1px solid #b9c9dd;
  border-radius: 8px;
  background: #ffffff;
  color: #315d94;
  font-weight: 700;
  cursor: pointer;
}

body.page-inventario .row-edit-button img {
  width: 26px;
  height: 26px;
  display: block;
  object-fit: contain;
}

body.page-inventario .row-edit-button:hover {
  border-color: #4778b8;
  background: #edf4fc;
}

body.page-inventario .toolbar-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

body.page-inventario .inventory-movement-summary {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border: 1px solid #d9e3ef;
  border-radius: 12px;
  background: #f4f8fd;
  color: #52657e;
}

body.page-inventario .inventory-movement-summary strong {
  color: #183a64;
  font-size: 24px;
}

body.page-inventario .denied-card {
  width: min(90vw, 420px);
  padding: 28px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(13, 30, 52, 0.3);
  text-align: center;
}

body.page-inventario .denied-card img {
  width: 132px;
  height: 132px;
  object-fit: contain;
}

body.page-inventario .denied-card h2 {
  margin: 18px 0 24px;
  color: #b42318;
  font-size: 20px;
  line-height: 1.35;
}

@media (max-width: 620px) {
  body.page-inventario .modal-backdrop { padding: 12px; }
  body.page-inventario .inventario-editor .modal-body { grid-template-columns: 1fr; padding: 20px; }
  body.page-inventario .inventario-editor .modal-field-descripcion,
  body.page-inventario .inventario-editor .modal-field-imagen { grid-column: auto; }
  body.page-inventario .inventario-editor .modal-actions { padding: 14px 20px 18px; }
}

body.page-traslados .toolbar-image-button,
body.page-traslados .print-image-button,
body.page-traslados .modal-button.primary.print-image-button {
  border-color: transparent;
  background: transparent;
  color: #1f4f8f;
  box-shadow: none;
}

body.page-traslados .toolbar-image-button:hover,
body.page-traslados .print-image-button:hover,
body.page-traslados .modal-button.primary.print-image-button:hover {
  border-color: transparent;
  background: transparent;
  filter: brightness(0.96);
}

.usuarios-modal-card {
  width: min(96vw, 840px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.usuarios-modal-card .modal-body {
  overflow: auto;
}

@media (min-width: 720px) {
  .usuarios-modal-card .modal-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
  }
}

body.page-security-groups .catalog-shell {
  width: min(100%, 860px);
}

.security-shell {
  background: rgba(255, 255, 255, 0.96);
}

.security-toolbar {
  align-items: center;
  flex-wrap: wrap;
}

.security-primary-button {
  min-width: 108px;
  border: none;
  background: #19d39b;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(25, 211, 155, 0.28);
}

.security-primary-button:hover,
.security-primary-button:focus-visible {
  background: #12be8b;
  outline: none;
}

.security-search {
  min-width: 180px;
  max-width: 280px;
}

.security-search input {
  border-radius: 4px;
}

.security-workspace-card {
  padding-top: 8px;
}

.security-status {
  min-height: 24px;
  margin: 0 0 12px;
  color: #627690;
  font-size: 14px;
  font-weight: 700;
}

.security-status[data-state="success"] {
  color: #138a55;
}

.security-status[data-state="error"] {
  color: #c0392b;
}

.security-status[data-state="info"] {
  color: #4b6280;
}

.security-table th:nth-child(2),
.security-table td:nth-child(2) {
  width: 160px;
}

.security-table td {
  height: 52px;
}

.security-footer {
  justify-content: center;
  gap: 18px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(220, 229, 242, 0.88);
  backdrop-filter: blur(4px);
  z-index: 300;
}

.auth-overlay[hidden] {
  display: none;
}

.auth-card {
  width: min(100%, 480px);
  background: #ffffff;
  border: 1px solid rgba(33, 88, 187, 0.08);
  box-shadow: 0 24px 50px rgba(68, 84, 112, 0.2);
}

.auth-card-head {
  padding: 28px 22px 24px;
  background: #2158bb;
  color: #ffffff;
  font-size: 15px;
  font-weight: 400;
  text-transform: uppercase;
}

.auth-card-body {
  padding: 20px 16px 22px;
  display: grid;
  gap: 14px;
}

.auth-field {
  display: block;
}

.auth-field input,
.auth-field select {
  width: 100%;
  height: 42px;
  padding: 0 16px;
  border: 1px solid #dfe5ee;
  border-radius: 4px;
  background: #ffffff;
  color: #27364a;
  font: inherit;
  box-shadow: inset 0 1px 2px rgba(19, 31, 53, 0.03), 0 5px 18px rgba(43, 60, 87, 0.06);
}

.auth-field input:focus,
.auth-field select:focus {
  outline: none;
  border-color: #9bb8ea;
  box-shadow: 0 0 0 3px rgba(33, 88, 187, 0.12);
}

.auth-password {
  position: relative;
}

.auth-password input {
  padding-right: 52px;
}

.auth-toggle {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 46px;
  height: 40px;
  border: none;
  border-left: 1px solid #e3e8f0;
  background: #ffffff;
  color: #64748b;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.auth-message {
  margin: 0;
  min-height: 18px;
  color: #c0392b;
  font-size: 13px;
}

.auth-message[hidden] {
  display: none;
}

.auth-avatar-picker {
  display: grid;
  gap: 10px;
}

.auth-avatar-label {
  font-size: 13px;
  font-weight: 700;
  color: #516072;
}

.auth-avatar-upload {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 14px 12px;
  border: 1px dashed #9db7e3;
  border-radius: 16px;
  background: #f7faff;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-avatar-upload:hover {
  border-color: #2158bb;
  box-shadow: 0 0 0 3px rgba(33, 88, 187, 0.08);
  transform: translateY(-1px);
}

.auth-avatar-upload img {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #d7e4f8;
  background: #eef3fb;
}

.auth-avatar-upload span {
  font-size: 12px;
  font-weight: 700;
  color: #425066;
  text-align: center;
}

.auth-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 18px;
}

.auth-submit {
  min-width: 108px;
  height: 46px;
  padding: 0 22px;
  border: none;
  border-radius: 6px;
  background: linear-gradient(180deg, #22e0c2 0%, #12caa8 100%);
  color: #ffffff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(18, 202, 168, 0.3);
  cursor: pointer;
}

.auth-submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

@media print {
  .app-header,
  .app-main,
  .catalog-toolbar,
  .catalog-footer,
  .col-action,
  .modal-backdrop,
  .auth-overlay {
    display: none !important;
  }

  body {
    background: #ffffff;
  }

  .catalog-shell {
    box-shadow: none;
    width: 100%;
  }

  .inventory-panel {
    box-shadow: none;
  }

  .print-report {
    display: block;
    padding: 12mm 10mm;
  }
}

@media (max-width: 1000px) {
  .app-header {
    --mobile-header-height: 58px;
    --mobile-panel-width: min(92vw, 380px);
    height: var(--mobile-header-height);
    position: fixed;
    grid-template-columns: 1fr auto;
    align-items: center;
    box-shadow: 0 8px 22px rgba(31, 41, 55, 0.18);
  }

  .brand {
    justify-content: flex-start;
    min-width: 0;
    padding-left: 10px;
  }

  .brand-logo {
    height: 50px;
  }

  .mobile-nav-toggle {
    display: grid;
    place-content: center;
    flex: 0 0 auto;
    width: 54px;
    height: 46px;
    margin: 6px 8px 6px 0;
    border-radius: 8px;
  }

  .main-nav {
    position: fixed;
    top: calc(var(--mobile-header-height) + 86px);
    right: 0;
    bottom: 0;
    width: var(--mobile-panel-width);
    max-width: 100vw;
    max-height: calc(100vh - var(--mobile-header-height) - 86px);
    max-height: calc(100dvh - var(--mobile-header-height) - 86px);
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 12px calc(28px + env(safe-area-inset-bottom));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #f3f6fa;
    border-left: 1px solid #aeb9c9;
    box-shadow: -18px 0 36px rgba(20, 30, 45, 0.2);
    transform: translateX(102%);
    transition: transform 0.18s ease;
    z-index: 120;
  }

  .app-header.nav-open .main-nav {
    transform: translateX(0);
  }

  .nav-item,
  .nav-button {
    width: 100%;
    min-height: 50px;
    flex: 0 0 auto;
  }

  .main-nav > .nav-button,
  .nav-item {
    border: 1px solid #c1cad8;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(31, 41, 55, 0.08);
    overflow: hidden;
  }

  .nav-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 46px;
    align-items: stretch;
  }

  .nav-button {
    min-width: 0;
    justify-content: flex-start;
    height: auto;
    padding: 0 14px;
    border: 0;
    color: #263548;
    text-align: left;
    white-space: normal;
    line-height: 1.25;
  }

  .nav-item > .nav-button {
    grid-column: 1 / 2;
  }

  .nav-button:hover,
  .nav-button:focus-visible {
    background: #eef4ff;
    color: #1f4fa8;
  }

  .nav-button.is-active {
    background: #edf7f3;
    color: #0f684f;
    box-shadow: inset 4px 0 0 #188566;
  }

  .nav-accordion-toggle {
    display: grid;
    grid-column: 2 / 3;
    place-items: center;
    width: 46px;
    min-height: 50px;
    border: 0;
    border-left: 1px solid #cbd5e1;
    background: #edf3f8;
    color: #365069;
    font: inherit;
    font-size: 22px;
    font-weight: 800;
    cursor: pointer;
  }

  .nav-accordion-toggle:hover,
  .nav-accordion-toggle:focus-visible {
    background: #dfeaf4;
    color: #1f4fa8;
    outline: none;
  }

  .nav-accordion-toggle::before {
    content: "+";
    line-height: 1;
  }

  .nav-item-dropdown.is-open > .nav-accordion-toggle::before,
  .nav-dropdown-item-parent.is-open > .nav-accordion-toggle::before {
    content: "-";
  }

  .nav-dropdown,
  .nav-submenu {
    grid-column: 1 / -1;
    position: static;
    display: none;
    width: 100%;
    min-width: 0;
    border: none;
    box-shadow: none;
    background: transparent;
  }

  .nav-dropdown {
    border-top: 1px solid #d5dde8;
  }

  .nav-submenu {
    border-top: 1px solid #cbd5e1;
  }

  .nav-item-dropdown:not(.is-open) > .nav-dropdown,
  .nav-dropdown-item-parent:not(.is-open) > .nav-submenu {
    display: none;
  }

  .nav-item-dropdown.is-open > .nav-dropdown,
  .nav-dropdown-item-parent.is-open > .nav-submenu {
    display: block;
  }

  .nav-dropdown-item-parent {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    background: #f8fafc;
  }

  .nav-dropdown-item-parent > .nav-dropdown-link {
    grid-column: 1 / 2;
  }

  .nav-dropdown-item-parent > .nav-accordion-toggle {
    grid-column: 2 / 3;
    width: 42px;
    min-height: 44px;
    border-left-color: #cbd5e1;
    background: #e8eef6;
    font-size: 20px;
  }

  .nav-dropdown-item-parent > .nav-submenu {
    grid-column: 1 / -1;
  }

  .nav-dropdown-link {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 11px 16px;
    color: #344357;
    border-top: 1px solid #d5dde8;
    background: #ffffff;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.25;
  }

  .nav-dropdown > .nav-dropdown-link:first-child,
  .nav-dropdown > .nav-dropdown-item-parent:first-child > .nav-dropdown-link,
  .nav-dropdown > .nav-dropdown-item-parent:first-child > .nav-accordion-toggle {
    border-top: 0;
  }

  .nav-dropdown-link:hover,
  .nav-dropdown-link:focus-visible,
  .nav-dropdown-link.is-active {
    background: #eaf3ff;
    color: #1f4fa8;
  }

  .nav-submenu .nav-dropdown-link {
    padding-left: 32px;
    border-color: #cbd5e1;
    background: #f2f6fb;
  }

  .nav-submenu .nav-submenu .nav-dropdown-link {
    padding-left: 42px;
    background: #eef4f8;
  }

  .nav-dropdown-link.has-children::after {
    content: "";
  }

  .user-panel {
    position: fixed;
    top: var(--mobile-header-height);
    right: 0;
    width: var(--mobile-panel-width);
    max-width: 100vw;
    min-height: 86px;
    height: 86px;
    display: flex;
    justify-content: flex-start;
    padding: 12px 14px;
    background: #353535;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: -18px 0 36px rgba(20, 30, 45, 0.2);
    transform: translateX(102%);
    transition: transform 0.18s ease;
    z-index: 121;
  }

  .app-header.nav-open .user-panel {
    transform: translateX(0);
  }

  .user-avatar {
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
  }

  .user-info {
    min-width: 0;
  }

  .user-line {
    white-space: normal;
    line-height: 1.25;
  }

  .app-main {
    padding-top: 74px;
  }
}

@media (max-width: 760px) {
  .catalog-toolbar,
  .catalog-footer {
    flex-wrap: wrap;
  }

  .security-toolbar {
    gap: 10px;
  }

  .security-search {
    min-width: 100%;
    max-width: none;
    order: 4;
  }

  .security-footer {
    flex-wrap: wrap;
  }

  .inventory-filters,
  .inventory-summary-head,
  .inventory-summary-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .almacenes-current {
    grid-template-columns: 1fr;
  }

  body.page-traslados .catalog-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
  }

  body.page-traslados .toolbar-search input,
  body.page-traslados .almacenes-select,
  body.page-traslados .toolbar-button,
  body.page-traslados .toolbar-icon {
    width: 100%;
    min-width: 0;
    height: 50px;
    font-size: 16px;
  }

  body.page-traslados .toolbar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  body.page-traslados .catalog-titlebar {
    padding: 16px 14px;
    font-size: 15px;
  }

  body.page-traslados .catalog-titlebar-with-badge {
    align-items: flex-start;
    flex-direction: column;
  }

  body.page-traslados .almacenes-current {
    padding: 14px;
    gap: 14px;
  }

  body.page-traslados .almacenes-info strong {
    font-size: 16px;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  body.page-traslados .inventory-label {
    font-size: 12px;
    margin-bottom: 4px;
  }

  body.page-traslados .almacenes-message {
    padding: 0 14px 14px;
    font-size: 15px;
  }

  body.page-traslados .almacenes-actions {
    padding: 0 12px 12px;
  }

  body.page-traslados .almacenes-save-button {
    width: 100%;
    min-width: 0;
    height: 52px;
    font-size: 16px;
  }

  body.page-traslados .list-section-title {
    padding: 14px 14px 4px;
    font-size: 13px;
  }

  body.page-traslados #pending-count-badge {
    font-size: 14px;
    padding: 6px 10px;
  }

  body.page-traslados #active-transfer-folio {
    font-size: 14px;
    padding: 6px 10px;
  }

  body.page-traslados .titlebar-badges {
    justify-content: flex-start;
  }

  body.page-traslados .table-wrap {
    display: none;
  }

  body.page-traslados .movement-cards {
    display: grid;
  }

  body.page-traslados .scroll-bottom-button {
    right: 12px;
    bottom: 12px;
    width: calc(100% - 24px);
    padding: 14px 18px;
    font-size: 15px;
  }
}

@media (max-width: 520px) {
  .auth-card-head {
    padding: 22px 18px 20px;
  }

  .auth-card-body {
    padding: 16px 14px 18px;
  }

  .auth-avatar-upload img {
    width: 84px;
    height: 84px;
  }

  .auth-actions {
    justify-content: stretch;
  }

  .auth-submit {
    width: 100%;
  }

  body.page-traslados .app-main {
    padding: 10px;
  }

  body.page-traslados .workspace-card {
    min-height: 0;
  }

  body.page-traslados .catalog-shell {
    width: 100%;
  }

  body.page-traslados .inventory-strip {
    height: 42px;
  }

  body.page-traslados .almacenes-current {
    gap: 10px;
  }

  body.page-traslados .almacenes-info strong {
    font-size: 14px;
  }

  body.page-traslados .inventory-label {
    font-size: 11px;
  }

  body.page-traslados .scroll-bottom-button {
    font-size: 14px;
    padding: 12px 16px;
  }
}
