﻿:root {
  --bg-main: #000000;
  --bg-panel: #0a0a0a;
  --bg-card: #111111;
  --bg-card-soft: #181818;
  --bg-input: #050505;
  --border: #3b3b3b;
  --border-soft: #2a2a2a;
  --text-main: #fbfaf0;
  --text-soft: #d3ccb7;
  --text-muted: #aaa38f;
  --primary: #2bc7ff;
  --primary-dark: #129ed2;
  --secondary: #ffd02a;
  --secondary-dark: #d99c00;
  --success: #20c76a;
  --success-dark: #10994c;
  --danger: #ff5b5b;
  --info: #4dd7ff;
  --shadow: 0 18px 34px rgba(0, 0, 0, 0.72);
  --radius: 10px;
  --mobile-strip-offset: 86px;
  --fs-hero-title: 25px;
  --fs-section-title: 16px;
  --fs-helper-text: 14px;
  --fs-scale-title: 16px;
  --fs-scale-number: 33px;
  --fs-scale-unit: 14px;
  --fs-scale-panel-text: 12px;
  --fs-form-label: 14px;
  --fs-input-number: 15px;
  --fs-button-text: 15px;
  --fs-preview-number: 28px;
  --fs-preview-detail: 16px;
  --fs-truck-title: 15px;
  --fs-truck-label: 12px;
  --fs-truck-number: 16px;
  --fs-truck-table: 13px;
  --fs-truck-table-head: 12px;
  --fs-truck-client-name: 12px;
  --fs-truck-table-id: 13px;
  --fs-truck-table-type: 12px;
  --fs-truck-table-count: 13px;
  --fs-truck-table-weight: 13px;
  --fs-truck-table-meta: 13px;
  --fs-truck-total: 12px;
  --fs-selected-label: 12px;
  --fs-selected-number: 19px;
  --fs-keypad-value: 42px;
  --fs-keypad-number: 29px;
}

/* Instalacion de la PWA */
html:has(body.pwa-install-page) {
  min-height: 100%;
  background: #050b0a;
}

.pwa-install-page {
  min-height: 100vh;
  margin: 0;
  color: var(--text-main);
  background:
    radial-gradient(circle at 12% 0, rgba(43, 199, 255, 0.16), transparent 30rem),
    radial-gradient(circle at 92% 90%, rgba(255, 208, 42, 0.10), transparent 32rem),
    #050b0a;
}

.pwa-install-shell {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.pwa-install-header {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 20px;
}

.pwa-install-header h1,
.pwa-install-card h2,
.pwa-install-info h2 {
  margin: 0;
  color: #fff;
}

.pwa-install-header p:last-child,
.pwa-install-card p,
.pwa-install-info p,
.pwa-install-info li {
  color: var(--text-soft);
  line-height: 1.55;
}

.pwa-install-header p:last-child {
  margin: 7px 0 0;
}

.pwa-install-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.75fr);
  gap: 18px;
}

.pwa-install-card,
.pwa-install-info {
  padding: 28px;
  border-top: 4px solid var(--primary);
}

.pwa-install-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: start;
  gap: 22px;
}

.pwa-install-card > img {
  border-radius: 24px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.pwa-install-card .eyebrow {
  margin-top: 0;
}

.pwa-install-button,
.pwa-install-status,
.pwa-install-notice {
  grid-column: 1 / -1;
}

.pwa-install-button {
  min-height: 58px;
  padding: 13px 22px;
  border: 1px solid #68dcff;
  border-radius: 10px;
  color: #001117;
  background: linear-gradient(180deg, #5bd8ff, #2bb8eb);
  box-shadow: 0 10px 24px rgba(43, 199, 255, 0.18);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 900;
  cursor: pointer;
}

.pwa-install-button:hover:not(:disabled),
.pwa-install-button:focus-visible:not(:disabled) {
  background: #82e4ff;
  outline: 3px solid rgba(91, 216, 255, 0.26);
  outline-offset: 3px;
}

.pwa-install-button:disabled {
  border-color: #454b4c;
  color: #92999a;
  background: #202526;
  box-shadow: none;
  cursor: wait;
}

.pwa-install-status {
  min-height: 24px;
  margin: -8px 0 0;
  color: #b9edff;
  font-weight: 700;
}

.pwa-install-status.is-error {
  color: #ff9a9a;
}

.pwa-install-notice {
  padding: 14px 16px;
  border: 1px solid #705f28;
  border-radius: 9px;
  color: #f7e3a1;
  background: #1b1709;
  line-height: 1.5;
}

.pwa-install-notice.is-success {
  border-color: #247f4c;
  color: #b5f3cf;
  background: #081d12;
}

.pwa-install-info {
  border-top-color: var(--secondary);
}

.pwa-install-info > a {
  display: inline-block;
  margin-top: 14px;
  color: #8ae4ff;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.pwa-install-info ol {
  margin: 22px 0;
  padding-left: 22px;
}

.pwa-install-info li + li {
  margin-top: 9px;
}

.pwa-printer-setup {
  margin-top: 18px;
  padding: 28px;
  border-top: 4px solid #55e494;
}

.pwa-printer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.pwa-printer-header h2,
.pwa-printer-steps h3 {
  margin: 0;
  color: #fff;
}

.pwa-printer-header p:last-child {
  margin: 7px 0 0;
  color: var(--text-soft);
  line-height: 1.55;
}

.pwa-printer-header a {
  color: #8ae4ff;
  font-weight: 800;
}

.pwa-printer-platform {
  flex: 0 0 auto;
  padding: 7px 10px;
  color: #b5f3cf;
  border: 1px solid #247f4c;
  border-radius: 999px;
  background: #081d12;
  font-weight: 800;
}

.pwa-printer-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 18px;
}

.pwa-printer-guide,
.pwa-printer-steps {
  min-width: 0;
  padding: 18px;
  border: 1px solid #2d4941;
  border-radius: 10px;
  background: rgba(5, 17, 14, 0.7);
}

.pwa-printer-limit strong {
  color: #fff;
}

.pwa-printer-limit p,
.pwa-printer-action-help,
.pwa-printer-steps li,
.pwa-printer-fallback p {
  color: var(--text-soft);
  line-height: 1.55;
}

.pwa-printer-limit p {
  margin: 7px 0 0;
}

.pwa-printer-actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pwa-printer-action {
  min-height: 46px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #d8e5f5;
  border: 1px solid #485b73;
  border-radius: 9px;
  background: #1c2938;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.pwa-printer-action.is-primary {
  color: #001117;
  border-color: #68dcff;
  background: linear-gradient(180deg, #5bd8ff, #2bb8eb);
}

.pwa-printer-action:hover,
.pwa-printer-action:focus-visible {
  outline: 3px solid rgba(91, 216, 255, 0.26);
  outline-offset: 3px;
}

.pwa-printer-action-help {
  margin: 14px 0 0;
}

.pwa-printer-command {
  margin-top: 14px;
  padding: 12px;
  display: grid;
  gap: 7px;
  color: var(--text-soft);
  border: 1px solid #354359;
  border-radius: 8px;
  background: #070b10;
}

.pwa-printer-command code {
  color: #ffe681;
  overflow-wrap: anywhere;
  user-select: all;
}

.pwa-printer-steps ol {
  margin: 14px 0 0;
  padding-left: 22px;
}

.pwa-printer-steps li + li {
  margin-top: 8px;
}

.pwa-printer-steps code {
  color: #ffe681;
}

.pwa-printer-fallback {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid #705f28;
  border-radius: 9px;
  color: #f7e3a1;
  background: #1b1709;
}

.pwa-printer-fallback p {
  margin: 5px 0 0;
}

.menu-tile-install {
  border-color: #247f4c;
  background: linear-gradient(180deg, #102b20, #080b09);
}

.menu-tile-install .menu-tile-icon {
  border-color: #247f4c;
  color: #55e494;
}

.menu-tile-install .menu-status {
  border-color: #247f4c;
  color: #b5f3cf;
  background: #081d12;
}

@media (max-width: 760px) {
  .pwa-install-shell {
    width: min(100% - 20px, 680px);
    padding-top: 16px;
  }

  .pwa-install-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .pwa-install-grid {
    grid-template-columns: 1fr;
  }

  .pwa-install-card,
  .pwa-install-info,
  .pwa-printer-setup {
    padding: 20px;
  }

  .pwa-install-card {
    grid-template-columns: 1fr;
  }

  .pwa-install-button,
  .pwa-install-status,
  .pwa-install-notice {
    grid-column: 1;
  }

  .pwa-printer-header {
    flex-direction: column;
  }

  .pwa-printer-grid {
    grid-template-columns: 1fr;
  }

  .pwa-printer-actions,
  .pwa-printer-action {
    width: 100%;
  }
}

/* Despacho minorista con bandejas */
html.retail-dispatch-root,
body.retail-dispatch-page {
  min-height: 100%;
  height: auto;
  overflow: auto;
}

.retail-dispatch-page {
  margin: 0;
  color: #f4f8ff;
  color-scheme: dark;
  background:
    radial-gradient(circle at 15% 0, rgba(27, 157, 218, .18), transparent 28rem),
    radial-gradient(circle at 90% 90%, rgba(238, 174, 32, .12), transparent 30rem),
    #06090f;
}

.retail-shell {
  width: min(1580px, calc(100% - 28px));
  margin: 0 auto;
  padding: 14px 0 40px;
}

.retail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 22px;
  border-top: 4px solid #f0ae20;
}

.retail-header h1,
.retail-last-ticket h2 {
  margin: 0;
  color: #fff;
}

.retail-header p:last-child {
  margin: 7px 0 0;
  color: #9db0ca;
}

.retail-capture-grid {
  display: grid;
  grid-template-columns: minmax(360px, .78fr) minmax(620px, 1.45fr);
  gap: 12px;
  margin-top: 12px;
}

.retail-weight-card,
.retail-form-card {
  padding: 18px;
}

.retail-weight-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 275px;
  border: 1px solid #33425a;
  background: linear-gradient(145deg, #0b111d, #111c2c);
}

.retail-card-label,
.retail-weight-meta,
.retail-form-top,
.retail-sale-toolbar,
.retail-list-card header,
.retail-list-card footer,
.retail-last-ticket {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.retail-card-label > span {
  color: #aabbd1;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.retail-card-label small {
  padding: 5px 9px;
  color: #81dfff;
  border: 1px solid rgba(43, 199, 255, .35);
  border-radius: 999px;
  background: rgba(43, 199, 255, .08);
}

.retail-weight-input {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
}

.retail-weight-input input {
  width: min(100%, 390px);
  padding: 0;
  color: #f7da35;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: clamp(54px, 7vw, 96px);
  font-weight: 900;
  line-height: 1;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.retail-weight-input input:focus { color: #fff176; }
.retail-weight-input strong { color: #d8e2f1; font-size: 24px; }

.retail-weight-meta {
  padding-top: 13px;
  border-top: 1px solid #2c3a4f;
}

.retail-weight-meta span {
  display: grid;
  gap: 3px;
  color: #8194af;
  font-size: 12px;
  text-transform: uppercase;
}

.retail-weight-meta strong { color: #ecf5ff; font-size: 18px; }
.retail-weight-meta strong.is-invalid { color: #ff7373; }

.retail-form-card {
  border: 1px solid #2c3b50;
  background: #0d131d;
}

.retail-form-top { align-items: stretch; }

.retail-switch,
.retail-sex-switch {
  display: flex;
  gap: 7px;
}

.retail-switch { flex: 1; }

.retail-switch button,
.retail-sex-switch button,
.retail-quick-trays button,
.retail-list-tabs button {
  min-height: 42px;
  padding: 8px 13px;
  color: #cbd7e8;
  border: 1px solid #38465b;
  border-radius: 8px;
  background: #151e2b;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.retail-switch button { flex: 1; }
.retail-switch button.is-active { color: #06121a; border-color: #32ccff; background: #32ccff; }
.retail-sex-switch button.is-active { color: #1b1300; border-color: #f4c72e; background: #f4c72e; }

.retail-form-fields {
  display: grid;
  grid-template-columns: 1.35fr .65fr .8fr 1fr;
  gap: 10px;
  margin-top: 13px;
}

.retail-form-fields .field,
.retail-client-field {
  display: grid;
  gap: 6px;
  color: #aebcd0;
  font-size: 13px;
  font-weight: 800;
}

.retail-form-fields input,
.retail-form-fields select,
.retail-client-field select {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  color: #f8fbff;
  border: 1px solid #3b4a5f;
  border-radius: 8px;
  background: #080c12;
  font: inherit;
  font-size: 15px;
}

.retail-quick-trays {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 13px;
}

.retail-quick-trays > span { color: #91a3bc; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.retail-quick-trays > div { display: grid; flex: 1; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.retail-quick-trays button { min-height: 48px; color: #fff; font-size: 19px; }
.retail-quick-trays button:hover { border-color: #f0ae20; background: #3b300e; }

.retail-add-button,
.retail-save-button {
  min-height: 50px;
  font-weight: 900;
}

.retail-add-button {
  width: 100%;
  margin-top: 13px;
  color: #02150a;
  border-color: #25d976;
  background: #25d976;
}

.retail-lists-section { margin-top: 12px; }

.retail-list-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.retail-list-tabs button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  border-radius: 9px 9px 0 0;
  font-size: 15px;
}

.retail-list-tabs button strong {
  display: grid;
  min-width: 25px;
  min-height: 25px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
}

.retail-list-tabs button.is-active { color: #0d1117; border-color: #f0ae20; background: #f0ae20; }

.retail-sale-toolbar {
  padding: 14px 16px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.retail-client-field { flex: 1; max-width: 430px; }

.retail-active-totals,
.retail-ticket-totals {
  display: flex;
  align-items: center;
  gap: 20px;
}

.retail-active-totals span,
.retail-ticket-totals span {
  display: grid;
  gap: 2px;
  min-width: 65px;
}

.retail-active-totals small,
.retail-ticket-totals small { color: #899bb4; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.retail-active-totals strong,
.retail-ticket-totals strong { color: #fff; font-size: 17px; }

.retail-save-button {
  min-width: 180px;
  color: #fff;
  border-color: #1689ea;
  background: #1689ea;
}

.retail-save-button:disabled { opacity: .42; cursor: not-allowed; }

.retail-lists-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 9px;
}

.retail-list-card {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #303c50;
  cursor: pointer;
}

.retail-list-card.is-active { outline: 2px solid #f0ae20; outline-offset: 1px; }
.retail-list-card.is-yellow { --list-accent: #f4cf31; }
.retail-list-card.is-blue { --list-accent: #39aefa; }
.retail-list-card.is-purple { --list-accent: #bb78f2; }
.retail-list-card.is-green { --list-accent: #4bd28c; }

.retail-list-card header {
  padding: 12px 13px;
  border-top: 4px solid var(--list-accent);
  background: #111925;
}

.retail-list-card header > div { display: grid; min-width: 0; gap: 3px; }
.retail-list-card header span { color: var(--list-accent); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.retail-list-card header strong { overflow: hidden; color: #fff; text-overflow: ellipsis; white-space: nowrap; }
.retail-list-card header .retail-list-count { display: grid; min-width: 30px; min-height: 30px; place-items: center; color: #091018; border-radius: 50%; background: var(--list-accent); font-size: 15px; }

.retail-list-body {
  min-height: 230px;
  max-height: 330px;
  overflow: auto;
  background: #090e16;
}

.retail-list-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px 9px;
  border-bottom: 1px solid #222e3f;
}

.retail-list-row > button {
  width: 26px;
  height: 26px;
  padding: 0;
  color: #ff8a8a;
  border: 1px solid #5f3136;
  border-radius: 6px;
  background: #291318;
  font-size: 19px;
  cursor: pointer;
}

.retail-list-row > div,
.retail-list-row > span { display: grid; gap: 3px; }
.retail-list-row > span { text-align: right; }
.retail-list-row strong { color: #edf5ff; font-size: 12px; }
.retail-list-row small { color: #879ab3; font-size: 10px; }

.retail-empty-list {
  display: grid;
  min-height: 230px;
  margin: 0;
  padding: 20px;
  place-items: center;
  color: #687b95;
  text-align: center;
}

.retail-list-card footer {
  padding: 10px 12px;
  color: #a9b8cc;
  border-top: 1px solid #2d3a4d;
  background: #131b27;
  font-size: 12px;
}

.retail-list-card footer strong { color: var(--list-accent); font-size: 15px; }

.retail-message {
  min-height: 22px;
  margin: 10px 2px 0;
  color: #74dea6;
  font-weight: 700;
}

.retail-message.is-error { color: #ff8383; }

.retail-last-ticket {
  margin-top: 8px;
  padding: 16px 18px;
  border-left: 5px solid #20c76a;
}

.retail-last-ticket[hidden] { display: none; }
.retail-last-ticket p { margin: 0 0 3px; }
.retail-last-ticket span { color: #a7b8ce; }

.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;
}

@media (max-width: 1120px) {
  .retail-capture-grid { grid-template-columns: 1fr; }
  .retail-lists-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .retail-sale-toolbar { flex-wrap: wrap; }
  .retail-client-field { max-width: none; flex-basis: 100%; }
  .retail-active-totals { flex: 1; }
}

@media (max-width: 700px) {
  .retail-shell { width: min(100% - 16px, 1580px); padding-top: 8px; }
  .retail-header { align-items: flex-start; padding: 15px; }
  .retail-header p:last-child { display: none; }
  .retail-header .menu-return-btn span { display: none; }
  .retail-weight-card { min-height: 215px; }
  .retail-weight-input input { font-size: 58px; }
  .retail-form-top { display: grid; }
  .retail-switch { overflow-x: auto; }
  .retail-switch button { min-width: 130px; }
  .retail-sex-switch button { flex: 1; }
  .retail-form-fields { grid-template-columns: 1fr 1fr; }
  .retail-form-fields .field:first-child { grid-column: 1 / -1; }
  .retail-quick-trays { align-items: stretch; flex-direction: column; }
  .retail-list-tabs { grid-template-columns: repeat(2, 1fr); }
  .retail-lists-grid { grid-template-columns: 1fr; }
  .retail-list-card:not(.is-active) { display: none; }
  .retail-active-totals { display: grid; width: 100%; grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .retail-save-button { width: 100%; }
  .retail-last-ticket { align-items: flex-start; flex-direction: column; }
  .retail-ticket-totals { display: grid; width: 100%; grid-template-columns: repeat(2, 1fr); }
}

/* Control de javas */
html.java-control-root,
body.java-control-page {
  height: auto;
  min-height: 100%;
  overflow: auto;
}

.java-control-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(37, 154, 99, 0.14), transparent 34rem),
    radial-gradient(circle at bottom left, rgba(39, 125, 205, 0.1), transparent 30rem),
    #070b12;
  color: #eef5ff;
  color-scheme: dark;
}

.java-control-shell {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 48px;
}

.java-control-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 22px;
  border-top: 4px solid #f0ae20;
}

.java-control-header h1,
.java-section-head h2 {
  margin: 0;
  color: #ffffff;
}

.java-control-header p:last-child {
  margin: 8px 0 0;
  color: #a9bdd8;
  font-weight: 700;
}

.java-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.java-current-summary-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 14px 2px -4px;
  color: #91a9c8;
  font-size: 13px;
}

.java-current-summary-head strong {
  color: #f8dd5a;
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.java-journey-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 14px;
  padding: 16px 18px;
  border-left: 5px solid #4f9ae8;
}

.java-journey-toolbar strong,
.java-journey-toolbar small {
  display: block;
}

.java-journey-toolbar strong {
  color: #fff;
  font-size: 18px;
}

.java-journey-toolbar small {
  margin-top: 5px;
  color: #91a9c8;
}

.java-journey-filter { min-width: 330px; }
.java-summary.java-summary-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.java-summary.java-company-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.java-summary.java-daily-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.java-inventory-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 14px;
  padding: 17px 20px;
  border-left: 5px solid #f0ae20;
}

.java-inventory-head h2 { margin: 0; color: #fff; }
.java-inventory-head p:last-child { margin: 6px 0 0; color: #91a9c8; }
.java-inventory-open { min-height: 42px; white-space: nowrap; }
.java-summary-card strong.is-negative-stock { color: #ff7d7d; }
.java-summary-card strong.is-positive-stock { color: #82dfaa; }
.java-daily-head { border-left-color: #4f9ae8; }

.java-inventory-modal {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, .78);
  backdrop-filter: blur(5px);
}

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

.java-inventory-modal-card {
  width: min(520px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 20px;
  border-top: 4px solid #f0ae20;
}

.java-balance-edit-modal-card {
  width: min(600px, 100%);
  border-top-color: #9b7ded;
}

.java-inventory-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.java-inventory-modal-head h2 { margin: 0; color: #fff; }

.java-inventory-close {
  width: 38px;
  height: 38px;
  border: 1px solid #49698f;
  border-radius: 9px;
  background: #101a29;
  color: #fff;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.java-inventory-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.java-inventory-actions .btn,
.java-inventory-actions .java-receive-btn { min-height: 42px; }
body.java-inventory-modal-open { overflow: hidden; }

.java-summary-card {
  position: relative;
  overflow: hidden;
  min-height: 92px;
  padding: 16px 18px;
}

.java-summary-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: #f0ae20;
  content: "";
}

.java-summary-card:nth-child(2)::before { background: #4f9ae8; }
.java-summary-card:nth-child(3)::before { background: #2ab66e; }
.java-summary-card:nth-child(4)::before { background: #9b7ded; }

.java-summary-card span,
.java-summary-card small {
  display: block;
  color: #91a9c8;
}

.java-summary-card strong {
  display: block;
  margin: 4px 0;
  color: #ffffff;
  font-size: 34px;
  line-height: 1;
}

.java-summary-card strong.java-summary-debt.has-balance {
  color: #ff6b6b;
  text-shadow: 0 0 18px rgba(255, 91, 91, 0.18);
}

.java-summary-card strong.java-summary-debt.is-clear {
  color: #82dfaa;
  text-shadow: 0 0 18px rgba(42, 182, 110, 0.16);
}

.java-summary-card .java-asset-values {
  margin: 8px 0 6px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.java-summary-card .java-asset-values > span {
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid #293e5d;
  border-radius: 8px;
  background: rgba(7, 13, 23, 0.72);
}

.java-summary-card .java-asset-values small {
  color: #91a9c8;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.java-summary-card .java-asset-values strong {
  margin: 3px 0 0;
  font-size: 25px;
}

.java-control-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(360px, .8fr);
  align-items: start;
  gap: 14px;
}

.java-balance-panel,
.java-receipt-panel,
.java-history-panel {
  padding: 18px;
}

.java-history-panel { margin-top: 14px; }

.java-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.java-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 270px;
  padding: 0 12px;
  border: 1px solid #354c6c;
  border-radius: 10px;
  background: #080e18;
}

.java-search svg {
  width: 19px;
  fill: none;
  stroke: #7691b5;
  stroke-width: 1.8;
}

.java-search input {
  width: 100%;
  padding: 11px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ffffff;
}

.java-table-wrap {
  overflow-x: auto;
  border: 1px solid #293e5d;
  border-radius: 12px;
}

.java-table {
  width: 100%;
  border-collapse: collapse;
  background: #090f1a;
}

.java-table th,
.java-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #293e5d;
  color: #dce7f5;
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.java-table th {
  background: #0d192a;
  color: #91a9c8;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.java-table tbody tr:last-child td { border-bottom: 0; }
.java-table tbody tr:hover { background: #101b2b; }

.java-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  margin-top: 12px;
  color: #91a9c8;
  font-size: 13px;
  font-weight: 700;
}

.java-pagination-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.java-pagination button {
  padding: 8px 12px;
  border: 1px solid #49698f;
  border-radius: 8px;
  background: linear-gradient(180deg, #17263a, #0b1320);
  color: #eef5ff;
  font: inherit;
  cursor: pointer;
}

.java-pagination button:hover:not(:disabled) {
  border-color: #f0ae20;
  color: #f8dd5a;
}

.java-pagination button:disabled {
  opacity: .38;
  cursor: not-allowed;
}

.java-balance,
.java-movement-badge,
.java-entry-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.java-balance.has-balance {
  border: 1px solid rgba(255, 91, 91, 0.5);
  background: rgba(255, 91, 91, 0.14);
  color: #ff7d7d;
}

.java-balance.is-clear {
  border: 1px solid rgba(42, 182, 110, 0.42);
  background: rgba(42, 182, 110, 0.12);
  color: #82dfaa;
}

.java-action-cell { text-align: right !important; }

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

.java-receive-btn {
  padding: 8px 11px;
  border: 1px solid #49698f;
  border-radius: 8px;
  background: linear-gradient(180deg, #17263a, #0b1320);
  color: #eef5ff;
  font-weight: 750;
  cursor: pointer;
}

.java-receive-btn:hover:not(:disabled) {
  border-color: #f0ae20;
  background: linear-gradient(180deg, #2d2814, #151207);
  color: #f8dd5a;
}

.java-receive-btn:disabled {
  opacity: .42;
  cursor: not-allowed;
}

.java-edit-balance-btn {
  padding: 8px 11px;
  border: 1px solid rgba(155, 125, 237, .6);
  border-radius: 8px;
  background: rgba(155, 125, 237, .12);
  color: #d7caff;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}

.java-edit-balance-btn:hover {
  border-color: #bca8f6;
  background: rgba(155, 125, 237, .22);
  color: #fff;
}

.java-entry-badge {
  border: 1px solid rgba(42, 182, 110, 0.42);
  background: rgba(42, 182, 110, 0.12);
  color: #82dfaa;
}

.java-receipt-form {
  display: grid;
  gap: 14px;
}

.java-receipt-form .field {
  display: grid;
  gap: 7px;
  margin: 0;
  color: #c8d7eb;
  font-weight: 700;
}

.java-receipt-form input,
.java-receipt-form select,
.java-receipt-form textarea,
.java-history-filter select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #354c6c;
  border-radius: 9px;
  background: #080e18;
  color: #ffffff;
  font: inherit;
}

.java-receipt-form textarea { resize: vertical; }

.java-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.java-required { color: #ff8f8f; }

.java-balance-hint {
  margin: -6px 0 0;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid #293e5d;
  background: #0d192a;
  color: #9eb4d1;
  font-size: 13px;
}

.java-balance-edit-client {
  display: grid;
  gap: 3px;
  padding: 11px 13px;
  border: 1px solid #354c6c;
  border-radius: 9px;
  background: #0d192a;
}

.java-balance-edit-client strong { color: #fff; }
.java-balance-edit-client small { color: #91a9c8; }

.java-balance-edit-current {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.java-balance-edit-current > span {
  padding: 11px 13px;
  border: 1px solid rgba(155, 125, 237, .35);
  border-radius: 9px;
  background: rgba(155, 125, 237, .08);
}

.java-balance-edit-current small,
.java-balance-edit-current strong { display: block; }
.java-balance-edit-current small { color: #a9bdd8; }
.java-balance-edit-current strong { margin-top: 4px; color: #fff; font-size: 24px; }

.java-balance-edit-note {
  margin: -2px 0 0;
  padding: 10px 12px;
  border-left: 3px solid #9b7ded;
  border-radius: 7px;
  background: rgba(155, 125, 237, .08);
  color: #a9bdd8;
  font-size: 12px;
  line-height: 1.5;
}

.java-balance-edit-note a { color: #d7caff; font-weight: 800; }

.java-resource-hint {
  margin: -4px 0 0;
  color: #91a9c8;
  font-size: 12px;
}

.java-resource-hint a {
  color: #f8dd5a;
  font-weight: 800;
}

.java-submit-btn {
  width: 100%;
  min-height: 44px;
  justify-content: center;
}

.java-message {
  min-height: 20px;
  margin: 8px 0 0;
  color: #82dfaa;
  font-size: 13px;
  font-weight: 700;
}

.java-message.is-error { color: #ff9b9b; }

.java-history-filter {
  display: grid;
  gap: 5px;
  min-width: 240px;
  color: #b9cce5;
  font-size: 12px;
  font-weight: 750;
}

.java-section-note {
  margin: 6px 0 0;
  color: #91a9c8;
  font-size: 13px;
}

.java-section-note strong { color: #fff; }

.java-movement-badge.is-dispatch {
  border: 1px solid rgba(240, 174, 32, 0.45);
  background: rgba(240, 174, 32, 0.12);
  color: #f8dd5a;
}

.java-movement-badge.is-receipt {
  border: 1px solid rgba(42, 182, 110, 0.42);
  background: rgba(42, 182, 110, 0.12);
  color: #82dfaa;
}

.java-movement-badge.is-adjustment {
  border: 1px solid rgba(155, 125, 237, .5);
  background: rgba(155, 125, 237, .14);
  color: #d7caff;
}

.java-asset-stack.is-adjustment strong { color: #d7caff; }

.java-quantity.is-positive { color: #f8dd5a; }
.java-quantity.is-negative { color: #82dfaa; }
.java-empty-cell { padding: 28px !important; text-align: center !important; color: #91a9c8; }

.java-dashboard-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-content: start;
  gap: 14px;
}

.java-dashboard-shell .java-summary,
.java-subview-shell .java-summary {
  margin: 0;
}

.java-dashboard-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.java-module-section {
  display: grid;
  gap: 14px;
}

.java-module-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 4px 2px 0;
}

.java-module-heading h2 {
  margin: 0;
  color: #fff;
  font-size: 22px;
}

.java-module-heading > p {
  max-width: 560px;
  margin: 0;
  color: #91a9c8;
  text-align: right;
}

.java-module-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.java-module-card {
  min-width: 0;
  min-height: 190px;
  padding: 20px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  border: 1px solid #293e5d;
  color: inherit;
  text-decoration: none;
  transition: border-color .16s ease, transform .16s ease, background .16s ease;
}

.java-module-card:hover,
.java-module-card:focus-visible {
  border-color: #f0ae20;
  background: #111a27;
  transform: translateY(-2px);
}

.java-module-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid #6b5420;
  border-radius: 12px;
  background: #211b0b;
  color: #f8dd5a;
}

.java-module-icon.is-returns {
  border-color: #276948;
  background: #092016;
  color: #82dfaa;
}

.java-module-icon.is-trace {
  border-color: #315d8f;
  background: #0a192b;
  color: #79b9ff;
}

.java-module-icon svg {
  width: 29px;
  height: 29px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.java-module-copy {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 7px;
}

.java-module-copy strong {
  color: #fff;
  font-size: 18px;
}

.java-module-copy small {
  color: #9eb4d1;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.java-module-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #f8dd5a;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.java-back-btn {
  border-color: #315d8f;
  color: #a9d4ff;
}

.java-subview-shell {
  display: grid;
  align-content: start;
  gap: 14px;
}

.java-inventory-workspace {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.java-inventory-task {
  min-height: 250px;
  padding: 20px;
  display: grid;
  align-content: space-between;
  gap: 14px;
  border-top: 4px solid #f0ae20;
}

.java-inventory-task h2 {
  margin: 0;
  color: #fff;
}

.java-inventory-task p:not(.eyebrow) {
  margin: 7px 0 0;
  color: #91a9c8;
}

.java-daily-task { border-top-color: #4f9ae8; }

.java-daily-assets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.java-daily-asset {
  min-width: 0;
  padding: 10px;
  border: 1px solid #3b5f89;
  border-radius: 11px;
  background: rgba(12, 29, 49, 0.5);
}

.java-daily-asset.is-tray {
  border-color: #6e5731;
  background: rgba(89, 61, 19, 0.16);
}

.java-daily-asset > span {
  display: block;
  margin-bottom: 7px;
  color: #e2ebf6;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.java-daily-result {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.java-daily-result > span {
  padding: 11px 13px;
  border: 1px solid #293e5d;
  border-radius: 10px;
  background: #090f1a;
}

.java-daily-result small,
.java-daily-result strong { display: block; }
.java-daily-result small { color: #91a9c8; }
.java-daily-result strong { margin-top: 4px; color: #fff; font-size: 27px; }
.java-daily-result strong.is-negative-stock { color: #ff7d7d; }
.java-daily-result strong.is-positive-stock { color: #82dfaa; }
.java-daily-expected { font-size: 12px; }

.java-inventory-outside-hints {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.java-inventory-outside-hints .java-balance-hint {
  margin: 0;
}

.java-asset-stack {
  min-width: 118px;
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(54px, 1fr));
  gap: 5px;
}

.java-asset-stack > span {
  padding: 4px 6px;
  border: 1px solid #334a69;
  border-radius: 7px;
  background: #0a1422;
  text-align: center;
}

.java-asset-stack small,
.java-asset-stack strong {
  display: block;
}

.java-asset-stack small {
  color: #8298b5;
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.java-asset-stack strong {
  margin-top: 2px;
  color: #f8dd5a;
}

.java-asset-stack.is-receipt strong,
.java-asset-stack.is-clear strong { color: #82dfaa; }

.java-asset-stack.has-balance strong { color: #ff8f8f; }

.java-returns-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.java-returns-grid { min-height: 0; }
.java-compact-form { gap: 10px; }
.java-compact-form .java-message { margin-top: 0; }

.java-table-viewport {
  max-height: min(52vh, 440px);
  overflow: auto;
  scrollbar-color: #49698f #090f1a;
}

.java-table-viewport .java-table th {
  position: sticky;
  z-index: 2;
  top: 0;
}

.java-trace-summary .java-summary-card {
  min-height: 82px;
  padding-block: 13px;
}

.java-trace-summary .java-summary-card strong { font-size: 30px; }
.java-trace-panel { margin-top: 0; }

.java-trace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.java-trace-head h2 { margin: 0; color: #fff; }

.java-trace-filters {
  display: flex;
  align-items: end;
  gap: 12px;
}

.java-trace-tabs {
  display: inline-flex;
  padding: 4px;
  border: 1px solid #354c6c;
  border-radius: 10px;
  background: #080e18;
}

.java-trace-tabs button {
  padding: 9px 13px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #91a9c8;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.java-trace-tabs button[aria-selected="true"] {
  background: #17304f;
  color: #fff;
}

.java-trace-table-viewport { max-height: min(47vh, 390px); }

@media (max-width: 1050px) {
  .java-control-grid { grid-template-columns: 1fr; }
  .java-receipt-panel { order: -1; }
  .java-summary.java-summary-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .java-dashboard-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .java-module-nav { grid-template-columns: 1fr; }
  .java-module-card {
    min-height: 0;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto;
    align-items: center;
  }
  .java-module-action { gap: 12px; }
}

@media (max-width: 720px) {
  .java-control-shell { width: min(100% - 20px, 1480px); padding-top: 10px; }
  .java-control-header,
  .java-section-head,
  .java-journey-toolbar { align-items: flex-start; flex-direction: column; }
  .java-summary { grid-template-columns: 1fr; }
  .java-current-summary-head { align-items: flex-start; flex-direction: column; gap: 3px; }
  .java-summary.java-summary-four { grid-template-columns: 1fr; }
  .java-summary.java-company-summary { grid-template-columns: 1fr; }
  .java-summary.java-daily-summary { grid-template-columns: 1fr; }
  .java-dashboard-summary,
  .java-returns-summary { grid-template-columns: 1fr; }
  .java-module-heading,
  .java-trace-head,
  .java-trace-filters { align-items: stretch; flex-direction: column; }
  .java-module-heading > p { text-align: left; }
  .java-module-card {
    grid-template-columns: auto 1fr;
    padding: 16px;
  }
  .java-module-action { grid-column: 1 / -1; }
  .java-inventory-workspace { grid-template-columns: 1fr; }
  .java-inventory-task { min-height: 0; }
  .java-daily-assets,
  .java-inventory-outside-hints { grid-template-columns: 1fr; }
  .java-trace-tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .java-inventory-head { align-items: stretch; flex-direction: column; }
  .java-inventory-open { width: 100%; justify-content: center; }
  .java-inventory-modal { padding: 10px; }
  .java-inventory-modal-card { max-height: calc(100vh - 20px); padding: 16px; }
  .java-inventory-actions { flex-direction: column-reverse; }
  .java-inventory-actions .btn,
  .java-inventory-actions .java-receive-btn { width: 100%; justify-content: center; }
  .java-summary-card { padding: 16px 20px; }
  .java-summary-card strong { font-size: 28px; }
  .java-balance-panel,
  .java-receipt-panel,
  .java-history-panel { padding: 16px; }
  .java-search,
  .java-history-filter,
  .java-journey-filter { width: 100%; min-width: 0; }
  .java-form-row { grid-template-columns: 1fr; }
  .java-balance-edit-current { grid-template-columns: 1fr; }
  .java-table-wrap { border: 0; overflow: visible; }
  .java-table-viewport { max-height: none; }
  .java-table thead { display: none; }
  .java-table,
  .java-table tbody,
  .java-table tr,
  .java-table td { display: block; width: 100%; }
  .java-table tr {
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid #293e5d;
    border-radius: 10px;
    background: #090f1a;
  }
  .java-table td {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 10px;
    padding: 7px 0;
    border: 0;
  }
  .java-table td::before {
    color: #91a9c8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
    content: attr(data-label);
  }
  .java-action-cell { display: block !important; text-align: left !important; }
  .java-action-cell::before,
  .java-empty-cell::before { display: none; }
  .java-row-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .java-receive-btn,
  .java-edit-balance-btn { width: 100%; }
  .java-pagination { align-items: stretch; flex-direction: column; }
  .java-pagination-actions { justify-content: space-between; }
}

html {
  font-size: 16px;
}

html[data-font-size="compact"] {
  font-size: 15px;
}

html[data-font-size="large"] {
  font-size: 18px;
}

html[data-font-size="xlarge"] {
  font-size: 20px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Arial", sans-serif;
  font-size: 1rem;
  line-height: 1.35;
  color: var(--text-main);
  background: var(--bg-main);
  text-rendering: geometricPrecision;
}

.scale-strip-mobile,
.mobile-tabs {
  display: none;
}

.scale-strip-mobile {
  margin: 8px 10px 0;
  padding: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  position: sticky;
  top: 0;
  z-index: 60;
}

.scale-strip-item {
  border: 1px solid #304769;
  background: linear-gradient(180deg, #111e34, #0d1728);
  border-radius: 10px;
  padding: 8px 10px;
  display: grid;
  gap: 2px;
}

.scale-strip-item span {
  font-size: 0.7rem;
  color: #9bb3d3;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.scale-strip-item strong {
  font-family: "Consolas", "Courier New", monospace;
  color: #f8dd5a;
  font-size: 1.32rem;
  line-height: 1;
}

.scale-strip-item strong small {
  font-size: 0.72rem;
  color: #c5d5ec;
  font-weight: 700;
}

.mobile-tabs {
  margin: 8px 10px 0;
  padding: 6px;
  border: 1px solid #2e4464;
  border-radius: 12px;
  background: #0f1c31;
  position: sticky;
  top: var(--mobile-strip-offset);
  z-index: 55;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.mobile-tab {
  border: 1px solid #3a5478;
  border-radius: 10px;
  background: #13233a;
  color: #d6e7ff;
  min-height: 42px;
  padding: 8px 10px;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
}

.mobile-tab.is-active {
  border-color: #66c9ff;
  background: linear-gradient(180deg, #2f95c8, #2178a4);
  color: #f2fbff;
}

.app-shell {
  width: 100%;
  height: 100%;
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(360px, 34vw) 1fr;
  gap: 10px;
  overflow: hidden;
}

.control-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 10px;
}

.card {
  background: linear-gradient(160deg, rgba(28, 40, 60, 0.92), rgba(18, 27, 42, 0.92));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  padding: 14px;
  padding-left: 70px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: flex-start;
  align-content: start;
  gap: 12px;
}

.admin-config {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 70;
}

.config-menu-btn,
.config-close-btn {
  border: 1px solid #4e4e4e;
  border-radius: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  background: #0b0b0b;
  color: var(--text-main);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.config-menu-btn {
  font-size: 1.28rem;
  color: var(--secondary);
}

.config-menu-btn:hover,
.config-menu-btn:focus-visible,
.config-close-btn:hover,
.config-close-btn:focus-visible {
  border-color: var(--secondary);
  background: #191919;
}

.config-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: min(320px, calc(100vw - 24px));
  width: min(320px, calc(100dvw - 24px));
  padding: 10px;
  border: 1px solid #4e4e4e;
  border-radius: 10px;
  background: #080808;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.78);
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 76px);
  max-height: calc(100dvh - 76px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.config-menu[hidden] {
  display: none;
}

.config-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.config-menu-head strong {
  color: var(--text-main);
  font-size: 0.95rem;
  line-height: 1.15;
}

.config-close-btn {
  min-width: 36px;
  min-height: 36px;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.config-menu-actions {
  display: grid;
  gap: 8px;
}

.config-menu-actions .btn {
  width: 100%;
}

.eyebrow {
  margin: 0 0 4px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7ec0ff;
  font-size: 0.72rem;
}

.hero h1 {
  margin: 0;
  font-size: 1.55rem;
  color: #f1f5ff;
}

.hero-copy {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.hero-actions {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
  width: 100%;
}

.scale-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.scale-card {
  padding: 10px;
  border-top: 5px solid #37c4ff;
  display: grid;
  gap: 8px;
  align-content: start;
}

.scale-card:nth-child(2) {
  border-top-color: #f0ae20;
}

.scale-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.scale-card h2 {
  margin: 0;
  font-size: 1rem;
  color: #dfe9f7;
}

.scale-settings-btn {
  border: 1px solid #4e4e4e;
  border-radius: 8px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  display: grid;
  place-items: center;
  background: #0b0b0b;
  color: var(--secondary);
  font: inherit;
  font-size: 1.12rem;
  font-weight: 900;
  cursor: pointer;
}

.scale-settings-btn:hover,
.scale-settings-btn:focus-visible {
  border-color: var(--secondary);
  background: #191919;
}

.scale-display {
  margin: 7px 0 8px;
  font-size: 2.05rem;
  font-family: "Consolas", "Courier New", monospace;
  line-height: 1;
  font-weight: 800;
  color: #f6df57;
  text-shadow: 0 0 10px rgba(246, 223, 87, 0.16);
}

.scale-display span {
  font-size: 0.9rem;
  color: #bfd0e7;
}

.scale-settings-card {
  width: min(720px, calc(100vw - 16px));
  width: min(720px, calc(100dvw - 16px));
  max-height: calc(100vh - 16px);
  max-height: calc(100dvh - 16px);
  padding: 14px;
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}

.scale-settings-content {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 10px;
}

.scale-settings-panel {
  border: 1px solid #3d3d3d;
  border-radius: 10px;
  background: #070707;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.scale-settings-panel h3 {
  margin: 0;
  color: var(--text-main);
  font-size: 0.95rem;
  line-height: 1.15;
}

.scale-settings-panel .scale-connection {
  margin: 0;
}

.scale-connection {
  margin: 0 0 8px;
  border: 1px solid #304769;
  border-radius: 10px;
  background: #0d1728;
  padding: 6px;
  display: grid;
  gap: 6px;
}

.scale-status-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.scale-status {
  min-width: 0;
  border: 1px solid #3f5477;
  border-radius: 8px;
  padding: 5px 7px;
  background: #0a1220;
  color: #d7e7ff;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.scale-status-offline {
  border-color: #4a4a4a;
  color: #bfb7a0;
}

.scale-status-connecting {
  border-color: #ffd02a;
  color: #ffe68a;
}

.scale-status-connected {
  border-color: #20c76a;
  color: #a7f7c8;
}

.scale-status-error {
  border-color: #ff5b5b;
  color: #ffbaba;
}

.scale-status-row small,
.scale-raw {
  min-width: 0;
  color: #9eb2cf;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
}

.scale-connect-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.scale-connect-actions .btn {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 0.76rem;
}

.scale-connect-actions .btn:last-child {
  grid-column: 1 / -1;
}

.scale-connect-actions .btn:disabled {
  display: none;
}

.scale-raw {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entry-section {
  padding: 12px;
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}

#cageForm {
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.section-head h2 {
  margin: 0;
  font-size: 1rem;
  color: #f0f5ff;
}

.return-ticket-btn {
  border: 1px solid #ff5b5b;
  border-radius: 8px;
  width: 100%;
  min-height: 58px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #e43b3b, #9d1515);
  color: #ffffff;
  font: inherit;
  font-size: 1.25rem;
  font-weight: 900;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0;
}

.return-ticket-btn:hover,
.return-ticket-btn:focus-visible {
  border-color: #ff8d8d;
  background: linear-gradient(180deg, #ff5b5b, #b91f1f);
}

.return-ticket-btn.is-dispatch-action {
  border-color: #3ddc84;
  background: linear-gradient(180deg, #24b866, #11733f);
}

.return-ticket-btn.is-dispatch-action:hover,
.return-ticket-btn.is-dispatch-action:focus-visible {
  border-color: #76f0ab;
  background: linear-gradient(180deg, #35d47b, #16894c);
}

.return-ticket-btn:disabled {
  cursor: not-allowed;
  filter: grayscale(0.35);
  opacity: 0.62;
}

.global-stats {
  margin: 0;
  color: #a8b8d1;
  font-size: 0.88rem;
  font-weight: 700;
}

.type-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.type-btn {
  border: 1px solid #415778;
  background: linear-gradient(180deg, #1f2b40, #172236);
  color: #dbe7f8;
  border-radius: 10px;
  font-weight: 700;
  min-height: 44px;
  padding: 8px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.type-btn:hover {
  border-color: #7e97bb;
}

.type-btn.is-active {
  color: #fff;
  border-color: #b83a3a;
  background: linear-gradient(180deg, #8f2a2a, #6f2020);
  box-shadow: inset 0 0 0 1px rgba(255, 160, 160, 0.28);
}

#cageForm.is-return-mode .type-btn {
  border-color: #8c2f2f;
  background: linear-gradient(180deg, #2b1111, #140707);
  color: #ffd2d2;
}

#cageForm.is-return-mode .type-btn.is-active {
  border-color: #ff5b5b;
  background: linear-gradient(180deg, #cf2d2d, #8f1717);
  color: #ffffff;
  box-shadow: inset 0 0 0 2px rgba(255, 196, 196, 0.22), 0 0 0 1px rgba(255, 91, 91, 0.32);
}

#cageForm.is-return-mode .weight-preview-gross {
  border-color: #ff5b5b;
  background: linear-gradient(180deg, #2a0909, #0c0202);
  box-shadow: inset 0 0 0 1px rgba(255, 91, 91, 0.22);
}

#cageForm.is-return-mode .weight-preview-gross span {
  color: #ffd2d2;
}

#cageForm.is-return-mode .weight-preview-gross strong {
  color: #ff5b5b;
  text-shadow: 0 0 18px rgba(255, 91, 91, 0.26);
}

.form-grid {
  align-content: start;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.form-grid > [hidden] {
  display: none;
}

.dispatch-truck-field {
  grid-column: 1 / -1;
}

.dispatch-primary-row {
  --dispatch-control-height: 60px;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns:
    minmax(0, 1.3fr)
    minmax(0, 1.5fr)
    minmax(50px, 0.5fr)
    minmax(50px, 0.45fr)
    minmax(84px, 0.8fr);
  gap: 8px;
  align-items: end;
}

.dispatch-primary-row .dispatch-truck-field,
.dispatch-primary-row .selected-origin-summary {
  grid-column: auto;
}

.dispatch-primary-row .selected-origin-summary span,
.dispatch-primary-row .selected-origin-summary strong,
.dispatch-primary-row .selected-origin-summary small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dispatch-quantity-field input {
  min-height: var(--dispatch-control-height);
  padding-inline: 6px;
  text-align: center;
}

.dispatch-sex-selector .sex-btn {
  min-height: var(--dispatch-control-height);
  padding-inline: 6px;
}

.dispatch-sex-selector .sex-selector-buttons {
  gap: 4px;
}

@media (max-width: 480px) {
  .dispatch-primary-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dispatch-primary-row .dispatch-truck-field,
  .dispatch-primary-row .selected-origin-summary {
    grid-column: span 2;
  }

  .dispatch-primary-row .dispatch-sex-selector {
    grid-column: span 2;
  }
}

.entry-count-sex-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(180px, 0.9fr);
  gap: 10px;
  align-items: end;
}

.sex-selector {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.sex-selector legend {
  margin-bottom: 6px;
  padding: 0;
  color: #ceddf2;
  font-size: 0.86rem;
  font-weight: 700;
}

.sex-selector-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.sex-btn {
  min-height: 44px;
  border: 1px solid #555555;
  border-radius: 10px;
  padding: 6px 9px;
  background: linear-gradient(180deg, #191919, #0b0b0b);
  color: var(--text-main);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 850;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.sex-btn-male.is-active {
  border-color: #55a7ff;
  background: linear-gradient(180deg, #2385e6, #14579f);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.sex-btn-female.is-active {
  border-color: #ff75bd;
  background: linear-gradient(180deg, #e84c9e, #9e2869);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.sex-btn:active {
  transform: translateY(1px);
  filter: brightness(1.12);
}

.chicken-sex-badge {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  min-height: 30px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1;
}

.chicken-sex-macho {
  border-color: #55a7ff;
  background: linear-gradient(180deg, #2385e6, #14579f);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.chicken-sex-hembra {
  border-color: #ff75bd;
  background: linear-gradient(180deg, #e84c9e, #9e2869);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.truck-cell-sex,
.truck-head-sex {
  width: 48px;
  text-align: center !important;
}

.field {
  display: grid;
  gap: 6px;
  color: #ceddf2;
  font-size: 0.86rem;
  font-weight: 700;
}

input,
select {
  width: 100%;
  border: 1px solid var(--border);
  color: var(--text-main);
  background: var(--bg-input);
  border-radius: 10px;
  min-height: 44px;
  padding: 0 12px;
  font: inherit;
}

input::placeholder {
  color: #7186a9;
}

input:focus,
select:focus,
button:focus-visible {
  outline: 2px solid rgba(58, 198, 255, 0.38);
  outline-offset: 1px;
}

.inline-control {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.weight-preview {
  grid-column: 1 / -1;
  border: 1px dashed #3f5477;
  border-radius: 10px;
  background: #111a2b;
  min-height: 104px;
  padding: 14px 16px;
  display: grid;
  align-content: center;
  gap: 6px;
  min-width: 0;
}

.weight-preview span {
  color: #8fa8c9;
  font-weight: 700;
  line-height: 1.15;
}

.weight-preview strong {
  color: #f8dd5a;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.weight-preview small {
  color: #98b1d2;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.weight-preview-gross {
  min-height: 112px;
  border-width: 2px;
  border-style: solid;
  border-color: #665a29;
  background: linear-gradient(180deg, #171407, #080806);
  place-content: center;
  text-align: center;
}

.weight-preview-gross span {
  color: var(--text-soft);
  font-size: clamp(0.9rem, 1.1vw, 1.08rem);
  text-transform: uppercase;
}

.weight-preview-gross strong {
  color: var(--secondary);
  font-family: "Consolas", "Courier New", monospace;
  font-size: clamp(2.5rem, 4vw, 4.4rem);
  line-height: 1;
  text-shadow: 0 0 18px rgba(255, 208, 42, 0.2);
}

.form-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.weighing-submit-button {
  width: 100%;
}

.form-message {
  margin: 0;
  color: #8ad5ff;
  font-size: 0.88rem;
  font-weight: 700;
}

.btn {
  border: 0;
  border-radius: 10px;
  min-height: 44px;
  padding: 10px 14px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(180deg, var(--primary), #1cb6f2);
  color: #042132;
}

.btn-primary:hover {
  background: linear-gradient(180deg, #58d1ff, var(--primary-dark));
}

.btn-secondary {
  background: linear-gradient(180deg, var(--secondary), #d99f18);
  color: #352200;
}

.btn-secondary:hover {
  background: linear-gradient(180deg, #ffd258, var(--secondary-dark));
}

.btn-success {
  background: linear-gradient(180deg, var(--success), #1aa658);
  color: #f2fff8;
}

.btn-success:hover {
  background: linear-gradient(180deg, #28d173, var(--success-dark));
}

.btn-ghost {
  background: #162338;
  border: 1px solid #2e4464;
  color: #c8ddfb;
}

.btn-ghost:hover {
  background: #1a2b45;
}

.columns-section {
  padding: 12px;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
}

.truck-grid {
  min-height: 0;
  height: 100%;
  display: grid;
  overflow-x: auto;
  grid-template-columns: repeat(10, minmax(300px, 1fr));
  gap: 8px;
}

.truck-card {
  border: 1px solid var(--border-soft);
  background: linear-gradient(180deg, #111a2b, #0e1625);
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
}

.truck-card.active {
  border-color: #39c2ff;
  box-shadow: 0 0 0 1px rgba(57, 194, 255, 0.25);
}

.truck-card.is-return {
  border-color: rgba(255, 208, 42, 0.62);
}

.truck-card.is-return.active {
  border-color: #ffd02a;
  box-shadow: 0 0 0 1px rgba(255, 208, 42, 0.28);
}

.truck-head {
  padding: 8px 10px;
  background: linear-gradient(135deg, #1b2f4f, #172742);
  border-bottom: 1px solid #274268;
  color: #dce9ff;
  min-width: 0;
}

.truck-head h3 {
  margin: 0;
  font-size: 0.93rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.truck-metrics {
  padding: 8px 10px;
  border-bottom: 1px solid #1f3048;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  background: #0f1a2c;
  min-width: 0;
}

.metric {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.metric span {
  font-size: 0.67rem;
  color: #7691b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric strong {
  color: #e7efff;
  font-size: 0.9rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

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

.truck-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.truck-table th,
.truck-table td {
  border-bottom: 1px solid #1b2d45;
  padding: 6px;
  text-align: left;
  color: #d8e5fb;
}

.truck-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #1a2c48;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #aaccf5;
}

.tag {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 0.65rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.tag-pollo-vivo {
  background: rgba(90, 190, 255, 0.16);
  color: #9ad9ff;
  border-color: rgba(90, 190, 255, 0.3);
}

.tag-pollo-pelado {
  background: rgba(110, 231, 183, 0.16);
  color: #b8f8dc;
  border-color: rgba(110, 231, 183, 0.3);
}

.tag-pollo-muerto {
  background: rgba(255, 91, 91, 0.16);
  color: #ffb3b3;
  border-color: rgba(255, 91, 91, 0.36);
}

.truck-footer {
  border-top: 1px solid #1f3048;
  background: #0d1524;
  padding: 8px;
  display: grid;
  gap: 6px;
}

.truck-total-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.truck-total-line span {
  font-size: 0.68rem;
  color: #92a8c7;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.truck-total-line strong {
  font-size: 0.7rem;
  color: #f2f7ff;
  text-align: right;
}

.truck-total-line-price span {
  color: #f3cd5f;
}

.truck-total-line-price strong {
  color: #f9e489;
}

.type-total-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.type-total-item {
  border: 1px solid #2a3c59;
  border-radius: 8px;
  background: #121d31;
  padding: 5px 6px;
  display: grid;
  gap: 1px;
}

.type-total-item span {
  font-size: 0.64rem;
  color: #a6bad7;
}

.type-total-item small {
  font-size: 0.6rem;
  color: #7f97bc;
}

.type-total-item strong {
  font-size: 0.66rem;
  color: #edf4ff;
}

.type-total-pollo-vivo {
  border-color: rgba(90, 190, 255, 0.35);
}

.type-total-pollo-pelado {
  border-color: rgba(110, 231, 183, 0.35);
}

.empty {
  margin: 0;
  padding: 18px 10px;
  text-align: center;
  color: #7d95b8;
  font-weight: 700;
  font-size: 0.84rem;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(8px, 2.2vw, 20px);
  background: rgba(4, 7, 14, 0.75);
  overflow: auto;
}

.modal[hidden] {
  display: none;
}

.modal-card {
  width: min(1100px, calc(100vw - 16px));
  width: min(1100px, calc(100dvw - 16px));
  max-height: calc(100vh - 16px);
  max-height: calc(100dvh - 16px);
  height: min(86vh, 760px);
  height: min(86dvh, 760px);
  padding: 14px;
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}

.error-modal-card {
  width: min(620px, calc(100vw - 16px));
  width: min(620px, calc(100dvw - 16px));
  max-height: calc(100vh - 16px);
  max-height: calc(100dvh - 16px);
  padding: 18px;
  display: grid;
  gap: 14px;
  border: 1px solid rgba(255, 91, 91, 0.62);
  border-radius: 12px;
  background: linear-gradient(180deg, #211010, #090606);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.78);
}

.error-modal {
  z-index: 300;
}

.error-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.error-modal-caption {
  margin: 0 0 4px;
  color: #ffb3b3;
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.error-modal-head h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1.35rem;
  line-height: 1.1;
}

.error-modal-message {
  margin: 0;
  border: 1px solid rgba(255, 91, 91, 0.46);
  border-radius: 10px;
  background: rgba(255, 91, 91, 0.1);
  padding: 12px;
  color: #ffe1e1;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
}

.error-modal-details {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.error-modal-detail {
  border: 1px solid #4a4a4a;
  border-radius: 10px;
  background: #080808;
  padding: 10px;
  min-width: 0;
}

.error-modal-detail dt {
  margin: 0 0 5px;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.error-modal-detail dd {
  margin: 0;
  color: #ffffff;
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.modal-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.json-output {
  margin: 0;
  min-height: 0;
  height: 100%;
  overflow: auto;
  padding: 12px;
  border-radius: 10px;
  background: #090d17;
  border: 1px solid #1f314f;
  color: #cfe2ff;
  font-size: 0.82rem;
  line-height: 1.45;
}

@media (max-width: 1450px) {
  .app-shell {
    grid-template-columns: minmax(350px, 40vw) 1fr;
  }

  .truck-grid {
    grid-template-columns: repeat(10, minmax(300px, 1fr));
  }
}

@media (max-height: 820px) and (min-width: 981px) {
  .control-panel {
    grid-template-rows: auto auto auto;
    overflow: auto;
    padding-right: 4px;
    scrollbar-color: var(--secondary) #080808;
  }

  .entry-section {
    min-height: 390px;
  }
}

@media (max-width: 980px) {
  html,
  body {
    overflow: auto;
  }

  .scale-strip-mobile,
  .mobile-tabs {
    display: grid;
  }

  .app-shell {
    height: auto;
    min-height: 100%;
    grid-template-columns: 1fr;
    padding: 8px 10px 10px;
    gap: 8px;
  }

  .control-panel {
    grid-template-rows: auto;
  }

  #appShell[data-mobile-panel="registro"] [data-mobile-panel="camiones"],
  #appShell[data-mobile-panel="camiones"] [data-mobile-panel="registro"] {
    display: none;
  }

  .scale-section,
  .form-grid,
  .truck-grid,
  .type-total-grid {
    grid-template-columns: 1fr;
  }

  .scale-connect-actions {
    grid-template-columns: 1fr;
  }

  .hero {
    flex-direction: column;
  }

  .hero-actions {
    min-width: 0;
  }

  .truck-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .truck-table {
    min-width: 760px;
  }

  .btn {
    min-height: 46px;
  }
}

@media (max-width: 640px) {
  :root {
    --mobile-strip-offset: 80px;
  }

  .scale-strip-mobile {
    margin: 6px 8px 0;
    padding: 6px;
    gap: 6px;
  }

  .scale-strip-item {
    padding: 7px 8px;
  }

  .scale-strip-item strong {
    font-size: 1.16rem;
  }

  .mobile-tabs {
    margin: 6px 8px 0;
    padding: 5px;
  }

  .mobile-tab {
    min-height: 40px;
    font-size: 0.8rem;
  }

  .app-shell {
    padding: 8px;
  }

  .hero h1 {
    font-size: 1.2rem;
  }

  .hero-copy {
    font-size: 0.84rem;
  }

  .section-head h2 {
    font-size: 0.96rem;
  }
}

/* Superficie del control de javas alineada con el tema oscuro operativo. */
.java-control-page .card {
  border: 1px solid #3b4658;
  background: linear-gradient(180deg, #151b25, #090e16);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.38);
}

.java-control-page input,
.java-control-page select,
.java-control-page textarea {
  border-color: #354c6c;
  background: #080e18;
  color: #ffffff;
}

.java-control-page .eyebrow { color: #f8dd5a; }

/* Flota propia de la empresa */
html.fleet-root,
body.fleet-page {
  height: auto;
  min-height: 100%;
  overflow: auto;
}

.fleet-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(37, 154, 99, 0.16), transparent 34rem),
    radial-gradient(circle at bottom left, rgba(39, 125, 205, 0.12), transparent 30rem),
    #070b12;
}

.fleet-shell {
  width: min(1480px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 14px;
}

.fleet-header {
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.fleet-header h1,
.fleet-section-head h2,
.fleet-list-head h2 {
  margin: 0;
  color: #ffffff;
}

.fleet-header h1 {
  font-size: 1.65rem;
}

.fleet-header p:last-child {
  max-width: 720px;
  margin: 6px 0 0;
  color: #a9bdd8;
  font-weight: 700;
}

.fleet-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.fleet-summary-card {
  min-height: 92px;
  padding: 14px 16px;
  border-top: 4px solid #2ab66e;
  display: grid;
  align-content: center;
  gap: 5px;
}

.fleet-summary-card:nth-child(2) {
  border-top-color: #4f9ae8;
}

.fleet-summary-card span {
  color: #91a9c8;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fleet-summary-card strong {
  color: #ffffff;
  font-size: 1.7rem;
}

.fleet-summary-note {
  border-top-color: #f0ae20;
}

.fleet-summary-note strong {
  color: #f8dd5a;
  font-size: 1rem;
}

.fleet-tabs {
  width: fit-content;
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(2, minmax(190px, 1fr));
  gap: 6px;
}

.fleet-tab {
  min-height: 48px;
  border: 1px solid #344c6e;
  border-radius: 10px;
  padding: 9px 14px;
  background: #0d192a;
  color: #b9cce5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.fleet-tab svg,
.fleet-save-btn svg,
.fleet-record-icon svg,
.fleet-action svg,
.fleet-search svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fleet-tab:hover,
.fleet-tab:focus-visible {
  border-color: #6c9bd2;
  color: #ffffff;
}

.fleet-tab.is-active {
  border-color: #39d484;
  background: linear-gradient(180deg, #238e59, #17683f);
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(23, 104, 63, 0.26);
}

body[data-fleet-view="choferes"] .fleet-tab.is-active {
  border-color: #65aeff;
  background: linear-gradient(180deg, #347fc8, #245b96);
  box-shadow: 0 8px 22px rgba(36, 91, 150, 0.26);
}

.fleet-workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(330px, 0.75fr) minmax(520px, 1.25fr);
  gap: 14px;
  align-items: start;
}

.fleet-form-panel,
.fleet-list-panel {
  min-width: 0;
  padding: 16px;
}

.fleet-section-head,
.fleet-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.fleet-section-head {
  margin-bottom: 14px;
}

.fleet-section-head h2,
.fleet-list-head h2 {
  font-size: 1.18rem;
}

.fleet-edit-badge {
  border: 1px solid #f0ae20;
  border-radius: 999px;
  padding: 5px 9px;
  color: #f8dd5a;
  background: rgba(240, 174, 32, 0.1);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.fleet-form,
.fleet-form-grid {
  display: grid;
  gap: 12px;
}

.fleet-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fleet-form-grid[hidden] {
  display: none;
}

.fleet-field-wide {
  grid-column: 1 / -1;
}

.fleet-form .field {
  min-width: 0;
  color: #c8d7eb;
  font-size: 0.8rem;
  font-weight: 900;
}

.fleet-form input,
.fleet-form select,
.fleet-search input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #354c6c;
  border-radius: 9px;
  background: #080e18;
  color: #ffffff;
  font: inherit;
  font-weight: 700;
}

.fleet-form input:focus,
.fleet-form select:focus,
.fleet-search input:focus {
  border-color: #59b6ff;
  outline: 2px solid rgba(89, 182, 255, 0.16);
}

.fleet-required {
  color: #ff8f8f;
}

.fleet-optional {
  margin-left: 5px;
  color: #7892b6;
  font-size: 0.66rem;
  text-transform: uppercase;
}

.fleet-form-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
}

.fleet-form-actions .btn {
  min-height: 46px;
}

.fleet-save-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.fleet-save-btn svg {
  width: 20px;
  height: 20px;
}

.fleet-form button:disabled,
.fleet-tab:disabled {
  opacity: 0.55;
  cursor: wait;
}

.fleet-message {
  min-height: 20px;
  margin: 0;
  color: #82dfaa;
  font-size: 0.82rem;
  font-weight: 800;
}

.fleet-message.is-error {
  color: #ff9b9b;
}

.fleet-list-panel {
  display: grid;
  grid-template-rows: auto auto minmax(180px, 1fr);
  gap: 12px;
}

.fleet-search {
  width: min(360px, 100%);
  position: relative;
}

.fleet-search svg {
  width: 19px;
  height: 19px;
  position: absolute;
  top: 50%;
  left: 12px;
  color: #7691b5;
  transform: translateY(-50%);
  pointer-events: none;
}

.fleet-search input {
  padding-left: 40px;
}

.fleet-list {
  min-height: 180px;
  max-height: calc(100vh - 360px);
  overflow: auto;
  padding-right: 3px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
}

.fleet-record {
  min-width: 0;
  border: 1px solid #293e5d;
  border-radius: 11px;
  padding: 12px;
  background: linear-gradient(155deg, #0e1929, #090f1a);
  display: grid;
  gap: 11px;
}

.fleet-record:hover {
  border-color: #45658e;
}

.fleet-record.is-editing {
  border-color: #f0ae20;
  box-shadow: inset 3px 0 #f0ae20;
}

.fleet-record-main {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.fleet-record-main > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.fleet-record-icon {
  width: 46px;
  height: 46px;
  border: 1px solid #347254;
  border-radius: 11px;
  background: #0d2b1d;
  color: #65dfa0;
  display: grid;
  place-items: center;
}

.fleet-driver-icon {
  border-color: #385f8a;
  background: #10243c;
  color: #78b8ff;
}

.fleet-record strong {
  color: #ffffff;
  font-size: 0.94rem;
  overflow-wrap: anywhere;
}

.fleet-record .fleet-plate {
  color: #f8dd5a;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 1.08rem;
  letter-spacing: 0.08em;
}

.fleet-record-main span:not(.fleet-record-icon),
.fleet-record p {
  color: #91a9c8;
  font-size: 0.76rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.fleet-provider {
  min-width: 0;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid #3b4d67;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(47, 65, 89, 0.22);
}

.fleet-provider span {
  min-width: 0;
  color: #b8c7da;
  font-size: 0.76rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.fleet-provider small {
  flex: 0 0 auto;
  color: #8fa3be;
  font-size: 0.68rem;
  font-weight: 750;
}

.fleet-provider.is-assigned {
  border-color: #2f7754;
  background: rgba(39, 132, 83, 0.14);
}

.fleet-provider.is-assigned span {
  color: #79e3aa;
}

.fleet-provider.is-unassigned {
  border-color: #705e2f;
  background: rgba(158, 121, 35, 0.1);
}

.fleet-provider.is-unassigned span {
  color: #efd77b;
}

.fleet-record p {
  min-height: 34px;
  margin: 0;
  border: 1px solid #22344e;
  border-radius: 8px;
  padding: 7px 8px;
  background: #080e18;
}

.fleet-record-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.fleet-action {
  min-height: 38px;
  border: 1px solid #3a567c;
  border-radius: 9px;
  padding: 7px 9px;
  background: #10243f;
  color: #c8defc;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 900;
  cursor: pointer;
}

.fleet-action svg {
  width: 17px;
  height: 17px;
}

.fleet-action:hover,
.fleet-action:focus-visible {
  border-color: #67a7ff;
  background: #173258;
}

.fleet-action-danger {
  border-color: rgba(255, 91, 91, 0.44);
  background: #2a1010;
  color: #ffb3b3;
}

.fleet-action-danger:hover,
.fleet-action-danger:focus-visible,
.fleet-action-danger.is-confirming {
  border-color: #ff8f8f;
  background: #491818;
  color: #ffe2e2;
}

.fleet-empty {
  grid-column: 1 / -1;
  min-height: 180px;
  border: 1px dashed #3f5477;
  border-radius: 11px;
  background: #0b1422;
  color: #93acce;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  padding: 20px;
  text-align: center;
}

.fleet-empty strong {
  color: #ffffff;
}

.fleet-empty span {
  font-size: 0.84rem;
  font-weight: 700;
}

@media (max-width: 1040px) {
  .fleet-workspace {
    grid-template-columns: 1fr;
  }

  .fleet-list {
    max-height: none;
  }
}

@media (max-width: 720px) {
  .fleet-shell {
    padding: 10px;
  }

  .fleet-header,
  .fleet-list-head {
    align-items: stretch;
    flex-direction: column;
  }

  .fleet-summary,
  .fleet-list {
    grid-template-columns: 1fr;
  }

  .fleet-header .menu-return-btn,
  .fleet-search,
  .fleet-tabs {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .fleet-tabs,
  .fleet-form-grid,
  .fleet-form-actions,
  .fleet-record-actions {
    grid-template-columns: 1fr;
  }

  .fleet-field-wide {
    grid-column: auto;
  }
}

/* Interaccion de filas */
.cage-row {
  cursor: pointer;
}

.cage-row:hover {
  background: rgba(57, 194, 255, 0.12);
}

.cage-row:focus {
  outline: 2px solid rgba(57, 194, 255, 0.6);
  outline-offset: -2px;
  background: rgba(57, 194, 255, 0.14);
}

/* Boton peligro */
.btn-danger {
  background: linear-gradient(180deg, #ff5e5e, #dc3030);
  color: #fff;
}

.btn-danger:hover {
  background: linear-gradient(180deg, #ff8484, #be2222);
}

/* Resumen de jornada, impresión y administración de tickets */
.daily-summary-screen-head {
  align-items: center;
}

.daily-summary-screen-head h1 {
  margin: 3px 0 0;
}

.daily-summary-meta {
  margin: 7px 0 0;
  color: var(--text-muted);
}

.daily-summary-window {
  margin: 4px 0 0;
  color: #c8d7e9;
  font-weight: 700;
}

.daily-journey-filter {
  display: grid;
  grid-template-columns: minmax(220px, 360px) auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  margin-bottom: 14px;
}

.daily-journey-filter label {
  display: grid;
  gap: 7px;
  color: #c8d7e9;
  font-size: .84rem;
  font-weight: 800;
}

.daily-journey-filter input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #415979;
  border-radius: 9px;
  background: #080d16;
  color: #fff;
  padding: 10px 12px;
}

.daily-journey-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.daily-ticket-admin-copy {
  max-width: 820px;
  margin: 7px 0 0;
  color: #9eb2cf;
}

.daily-ticket-filters {
  display: grid;
  grid-template-columns: minmax(230px, 1.3fr) minmax(160px, .7fr) auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
}

.daily-ticket-filters label,
.daily-ticket-void-card label {
  display: grid;
  gap: 7px;
  color: #c8d7e9;
  font-size: .84rem;
  font-weight: 800;
}

.daily-ticket-filters input,
.daily-ticket-filters select,
.daily-ticket-void-card textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #415979;
  border-radius: 9px;
  background: #080d16;
  color: #fff;
  padding: 10px 12px;
}

.daily-ticket-feedback {
  min-height: 22px;
  margin: 4px 0;
  color: #a9c1df;
  font-weight: 700;
}

.daily-ticket-table tr.is-voided {
  background: rgba(255, 91, 91, .07);
}

.daily-ticket-table tr.is-voided td {
  color: #b8a8a8;
}

.daily-ticket-status {
  display: inline-flex;
  padding: 5px 9px;
  border: 1px solid;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.daily-ticket-status.is-active {
  border-color: #247f4c;
  background: rgba(32, 199, 106, .1);
  color: #82dfaa;
}

.daily-ticket-status.is-voided {
  border-color: #944747;
  background: rgba(255, 91, 91, .1);
  color: #ffabab;
}

.daily-ticket-void-details {
  display: block;
  max-width: 300px;
  margin-top: 6px;
  color: #c89595;
  line-height: 1.3;
}

.daily-ticket-readonly {
  color: #8193aa;
  font-size: .8rem;
  font-weight: 700;
}

.daily-ticket-void-button {
  min-height: 36px;
  padding: 7px 12px;
}

.daily-ticket-void-modal {
  position: fixed;
  z-index: 1100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, .8);
  backdrop-filter: blur(5px);
}

.daily-ticket-void-modal[hidden] {
  display: none;
}

.daily-ticket-void-card {
  width: min(600px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 22px;
  border-top: 4px solid var(--danger);
}

.daily-ticket-void-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.daily-ticket-void-head h2 {
  margin: 0;
}

.daily-ticket-void-close {
  width: 38px;
  height: 38px;
  border: 1px solid #694848;
  border-radius: 50%;
  background: #251010;
  color: #ffb5b5;
  font-size: 1.5rem;
  cursor: pointer;
}

.daily-ticket-void-warning {
  margin: 16px 0;
  border: 1px solid rgba(255, 91, 91, .45);
  border-radius: 10px;
  background: rgba(255, 91, 91, .09);
  color: #ffd0d0;
  padding: 12px;
  line-height: 1.45;
}

.daily-ticket-void-card textarea {
  min-height: 110px;
  resize: vertical;
}

.daily-ticket-void-error {
  min-height: 22px;
  margin: 10px 0 0;
  color: #ff9a9a;
  font-weight: 800;
}

.daily-ticket-void-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

body.daily-ticket-modal-open {
  overflow: hidden;
}

@media (max-width: 820px) {
  .daily-summary-screen-head {
    align-items: stretch;
    flex-direction: column;
  }

  .daily-summary-screen-head .menu-return-btn {
    width: 100%;
  }

  .daily-journey-filter {
    grid-template-columns: 1fr;
  }

  .daily-journey-filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .daily-journey-filter-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .daily-ticket-filters {
    grid-template-columns: 1fr;
  }

  .daily-ticket-filters .btn {
    width: 100%;
    justify-content: center;
  }

  .daily-ticket-void-modal {
    padding: 10px;
  }

  .daily-ticket-void-card {
    max-height: calc(100vh - 20px);
    padding: 16px;
  }

  .daily-ticket-void-actions {
    flex-direction: column-reverse;
  }
}

@media (max-width: 520px) {
  .daily-journey-filter-actions {
    grid-template-columns: 1fr;
  }
}

/* Popup de edicion de jaula */
.item-modal-card {
  width: min(900px, calc(100vw - 16px));
  width: min(900px, calc(100dvw - 16px));
  max-height: calc(100vh - 16px);
  max-height: calc(100dvh - 16px);
  height: min(84vh, 720px);
  height: min(84dvh, 720px);
  padding: 16px;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 12px;
  overflow: hidden;
}

.item-highlight {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.item-pill {
  border: 1px solid #2f4464;
  background: #111a2b;
  border-radius: 11px;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
}

.item-pill span {
  font-size: 0.78rem;
  color: #8ea6c6;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.item-pill strong {
  font-size: 1.32rem;
  color: #f4f8ff;
  line-height: 1.05;
}

.item-form {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 10px;
}

.item-form-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.item-form-message {
  margin: 0;
  min-height: 20px;
  color: #8ad5ff;
  font-size: 0.9rem;
  font-weight: 700;
}

.item-form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 980px) {
  .item-highlight,
  .item-form-grid {
    grid-template-columns: 1fr;
  }

  .entry-count-sex-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .entry-count-sex-row .sex-selector {
    grid-column: 1 / -1;
  }

  .item-modal-card {
    width: min(98vw, 900px);
    width: min(98dvw, 900px);
    max-height: calc(100dvh - 12px);
    height: min(92dvh, 780px);
    padding: 12px;
    gap: 10px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .item-highlight {
    gap: 6px;
  }

  .item-pill {
    padding: 8px 10px;
  }

  .item-pill strong {
    font-size: 1.08rem;
  }

  .item-form {
    gap: 8px;
  }

  .item-form-message {
    min-height: 18px;
    font-size: 0.84rem;
  }

  .item-form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .item-form-actions .btn {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .item-modal-card {
    width: min(99vw, 900px);
    width: min(99dvw, 900px);
    max-height: calc(100dvh - 8px);
    height: min(96dvh, 780px);
    padding: 10px;
    gap: 8px;
  }

  .item-pill strong {
    font-size: 0.96rem;
  }
}

/* Cliente por camión */
.truck-head-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.assign-client-btn {
  border: 1px solid #3a567c;
  background: #10243f;
  color: #c8defc;
  border-radius: 8px;
  min-height: 30px;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  flex: 0 1 auto;
  max-width: 100%;
  margin-left: auto;
  overflow-wrap: anywhere;
  white-space: normal;
}

.assign-client-btn:hover {
  background: #173258;
  border-color: #5e89c2;
}

.assign-client-btn:disabled {
  border-color: #3b4655;
  background: #202832;
  color: #758398;
  cursor: not-allowed;
}

.clear-column-btn {
  border: 1px solid #d9aa16;
  background: #ffd02a;
  color: #171000;
  border-radius: 8px;
  min-height: 30px;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 850;
  cursor: pointer;
  flex: 0 1 auto;
  max-width: 100%;
  margin-left: auto;
  overflow-wrap: anywhere;
  white-space: normal;
}

.clear-column-btn:hover {
  background: #ffe273;
  border-color: #f3c433;
}

.register-ticket-btn {
  border: 1px solid #1fb96a;
  background: #22c875;
  color: #03180d;
  border-radius: 8px;
  min-height: 30px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 850;
  cursor: pointer;
}

.register-ticket-btn:hover {
  background: #60e49d;
}

.register-ticket-btn:disabled {
  border-color: #405047;
  background: #26332c;
  color: #74877c;
  cursor: not-allowed;
}

.print-ticket-btn {
  border: 1px solid #d9aa16;
  background: #ffd02a;
  color: #171000;
  border-radius: 8px;
  min-height: 30px;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  white-space: normal;
}

.print-ticket-btn:hover {
  background: #ffe273;
}

.print-ticket-btn:disabled {
  border-color: #4a4a4a;
  background: #242424;
  color: #777;
  cursor: not-allowed;
}

.ticket-print-frame {
  position: fixed;
  right: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.truck-client-name {
  margin: 6px 0 0;
  color: #8fb0d7;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
}

.truck-operation-line {
  margin: 5px 0 0;
  color: #f8dd5a;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Popup de clientes */
.client-modal-card {
  width: min(760px, calc(100vw - 16px));
  width: min(760px, calc(100dvw - 16px));
  max-height: calc(100vh - 16px);
  max-height: calc(100dvh - 16px);
  height: min(80vh, 680px);
  height: min(80dvh, 680px);
  padding: 16px;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 10px;
}

.client-modal-truck {
  margin: 0;
  border: 1px solid #2f4464;
  background: #111a2b;
  border-radius: 10px;
  padding: 10px 12px;
  color: #dce9ff;
  font-size: 0.95rem;
  font-weight: 700;
}

.client-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 8px;
}

.client-search {
  display: grid;
  gap: 5px;
  color: #a9c1e2;
  font-size: 0.78rem;
  font-weight: 700;
}

.client-search input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #3a567c;
  border-radius: 10px;
  background: #0c1627;
  color: #eef5ff;
  padding: 8px 12px;
  font: inherit;
  outline: none;
}

.client-search input:focus {
  border-color: #67a7ff;
  box-shadow: 0 0 0 3px rgba(103, 167, 255, 0.14);
}

.delivery-fleet-modal {
  z-index: 190;
}

.delivery-fleet-card {
  width: min(700px, calc(100dvw - 16px));
  height: min(78dvh, 640px);
  max-height: calc(100dvh - 16px);
  padding: 16px;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 10px;
}

.delivery-fleet-caption {
  margin: 0 0 3px;
  color: var(--secondary);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.delivery-fleet-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 8px;
}

.delivery-fleet-option {
  min-height: 62px;
  border: 1px solid #444444;
  border-radius: 10px;
  background: #090909;
  color: var(--text-main);
  padding: 10px 12px;
  text-align: left;
  display: grid;
  gap: 4px;
  cursor: pointer;
}

.delivery-fleet-option:hover,
.delivery-fleet-option:focus-visible {
  border-color: var(--secondary);
  background: #171717;
}

.delivery-fleet-option-name {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 900;
}

.delivery-fleet-option-detail {
  color: #aebed3;
  font-size: 0.82rem;
  font-weight: 650;
}

.client-option {
  border: 1px solid #2f4464;
  background: #0f1a2c;
  color: #d5e4fb;
  border-radius: 10px;
  min-height: 54px;
  padding: 8px 12px;
  text-align: left;
  display: grid;
  gap: 2px;
  cursor: pointer;
}

.client-option-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.client-option-name {
  font-size: 0.92rem;
  font-weight: 700;
}

.client-option-kind {
  flex: 0 0 auto;
  border: 1px solid #405c82;
  border-radius: 999px;
  padding: 2px 7px;
  color: #aac7ed;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.client-option-detail {
  font-size: 0.74rem;
  color: #97b3d9;
  font-weight: 600;
}

.client-option.is-warehouse {
  border-color: #8b6b2d;
  background: #29200f;
}

.client-option.is-warehouse:hover {
  border-color: #e3b64e;
  background: #342914;
}

.client-option.is-warehouse .client-option-kind {
  border-color: #ad8435;
  color: #f2ce76;
}

.client-option:hover {
  border-color: #67a7ff;
  background: #132542;
}

.client-option.is-active {
  border-color: #2fd37e;
  background: #123125;
  color: #b9ffd9;
}

.client-option.is-active .client-option-detail {
  color: #86efb5;
}

.client-empty {
  border: 1px dashed #3a567c;
  border-radius: 10px;
  padding: 18px;
  color: #9fb5d3;
  text-align: center;
}

.field-help {
  color: #8fa8c9;
  font-size: 0.74em;
  font-weight: 650;
  line-height: 1.25;
}

.entry-origin-controls {
  display: none;
}

.selected-origin-summary {
  min-width: 0;
  min-height: 52px;
  border: 1px solid #5b522b;
  border-radius: 10px;
  background: #151207;
  padding: 8px 10px;
  display: grid;
  align-content: center;
  gap: 2px;
}

.selected-origin-summary span,
.selected-origin-summary small {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1.15;
}

.selected-origin-summary strong {
  color: var(--secondary);
  font-size: 0.92rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.daily-provider-panel {
  min-width: 0;
  min-height: 0;
  padding: 10px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

.daily-provider-head {
  display: grid;
  gap: 8px;
}

.daily-provider-count {
  width: 48px;
  min-width: 48px;
  min-height: 46px;
  border: 1px solid #665a29;
  border-radius: 8px;
  background: #090909;
  color: var(--secondary);
  display: grid;
  place-items: center;
  font-size: 1rem;
}

.daily-provider-list {
  min-height: 0;
  overflow-y: auto;
  border: 1px solid #404040;
  background: #050505;
  scrollbar-color: var(--secondary) #080808;
}

.daily-provider-row {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-bottom: 1px solid #343434;
  background: #090909;
  color: var(--text-main);
  padding: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 108px;
  align-items: stretch;
  text-align: left;
  cursor: pointer;
}

.daily-provider-row:last-child {
  border-bottom: 0;
}

.daily-provider-row:hover,
.daily-provider-row:focus-visible {
  background: #1a180d;
}

.daily-provider-row.is-active {
  background: #292308;
  box-shadow: inset 4px 0 0 var(--secondary);
}

.daily-provider-row.is-warehouse {
  background: #071923;
}

.daily-provider-row.is-warehouse.is-active {
  background: #0d2a38;
}

.daily-provider-row.is-disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

.daily-provider-index {
  border-right: 1px solid #343434;
  color: #77705d;
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 800;
}

.daily-provider-name,
.daily-provider-plate {
  min-width: 0;
  padding: 8px;
  display: grid;
  align-content: center;
}

.daily-provider-name strong,
.daily-provider-plate strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-provider-name strong {
  color: #ffffff;
  font-size: 0.9rem;
}

.daily-provider-name small,
.daily-provider-plate small {
  color: var(--text-muted);
  font-size: 0.66rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-provider-plate {
  border-left: 1px solid #343434;
}

.daily-provider-plate strong {
  color: var(--secondary);
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.98rem;
}

.daily-provider-empty {
  min-height: 120px;
  padding: 16px;
  color: var(--text-muted);
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
}

.provider-select-btn {
  width: 100%;
  min-height: 52px;
  align-self: start;
  border: 1px solid #3a567c;
  border-radius: 10px;
  background: #10243f;
  color: #dce9ff;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
}

.provider-select-btn:hover,
.provider-select-btn:focus-visible {
  border-color: #67a7ff;
  background: #173258;
}

.provider-select-btn.is-empty {
  border-color: #9a6d26;
  background: #2d210d;
}

.provider-select-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.provider-select-copy small {
  color: #8fa8c9;
  font-size: 0.72rem;
  font-weight: 700;
}

.provider-select-copy strong {
  color: #ffffff;
  font-size: 0.9rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.provider-select-action {
  border-radius: 8px;
  background: var(--secondary);
  color: #352200;
  padding: 7px 9px;
  font-size: 0.78rem;
  font-weight: 850;
}

.provider-modal {
  z-index: 180;
}

.provider-modal-card {
  width: min(760px, calc(100vw - 16px));
  width: min(760px, calc(100dvw - 16px));
  max-height: calc(100vh - 16px);
  max-height: calc(100dvh - 16px);
  height: min(82vh, 700px);
  height: min(82dvh, 700px);
  padding: 16px;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 10px;
}

.provider-modal-caption {
  margin: 0 0 3px;
  color: #9eb2cf;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.provider-search input {
  min-height: 46px;
}

.provider-modal-selection {
  margin: 0;
  border: 1px solid #2f4464;
  background: #111a2b;
  border-radius: 10px;
  padding: 9px 11px;
  color: #dce9ff;
  font-size: 0.86rem;
  font-weight: 700;
}

.provider-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 8px;
}

.provider-option {
  border: 1px solid #444444;
  background: #090909;
  color: var(--text-main);
  border-radius: 10px;
  min-height: 58px;
  padding: 9px 12px;
  text-align: left;
  display: grid;
  gap: 3px;
  cursor: pointer;
}

.provider-option:hover,
.provider-option:focus-visible {
  border-color: var(--secondary);
  background: #171717;
}

.provider-option.is-active {
  border-color: var(--success);
  background: #102217;
  color: #bcffd8;
}

.provider-option.is-warehouse {
  border-color: #2e6d9d;
  background: #0d2031;
}

.provider-option.is-warehouse:hover,
.provider-option.is-warehouse:focus-visible {
  border-color: #67b7ee;
  background: #12304a;
}

.provider-option.is-warehouse.is-active {
  border-color: var(--success);
  background: #102f27;
}

.provider-option-name {
  font-size: 0.94rem;
  font-weight: 800;
}

.provider-option-meta {
  color: #97b3d9;
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.25;
}

.provider-empty {
  border: 1px dashed #705329;
  border-radius: 10px;
  background: #20180b;
  padding: 16px;
  display: grid;
  gap: 10px;
  color: #f2d49b;
  text-align: center;
}

.provider-empty p {
  margin: 0;
  font-weight: 750;
}

.provider-empty a {
  justify-self: center;
  text-decoration: none;
}

@media (max-width: 980px) {
  .client-modal-card {
    width: min(98vw, 760px);
    width: min(98dvw, 760px);
    max-height: calc(100dvh - 12px);
    height: min(92dvh, 760px);
    padding: 12px;
  }

  .provider-modal-card {
    width: min(98vw, 760px);
    width: min(98dvw, 760px);
    max-height: calc(100dvh - 12px);
    height: min(92dvh, 760px);
    padding: 12px;
  }
}

/* Teclado numerico tactil */
body.numeric-pad-open {
  overflow: hidden;
}

input[type="number"][readonly] {
  cursor: pointer;
}

.numeric-pad-modal {
  z-index: 220;
  padding: clamp(8px, 2.2vw, 20px);
  place-items: center;
  overflow: auto;
}

.numeric-pad-card {
  width: min(620px, calc(100vw - 16px));
  width: min(620px, calc(100dvw - 16px));
  max-height: calc(100vh - 16px);
  max-height: calc(100dvh - 16px);
  height: auto;
  padding: 16px;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 10px;
}

.numeric-pad-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.numeric-pad-caption {
  margin: 0 0 4px;
  color: #8ea7c8;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.numeric-pad-head h2 {
  margin: 0;
  color: #eef4ff;
  font-size: 1.15rem;
}

.numeric-pad-value {
  margin: 0;
  min-height: 76px;
  border: 1px solid #2f4464;
  background: #111a2b;
  border-radius: 12px;
  padding: 10px 14px;
  color: #f8dd5a;
  font-size: 2.6rem;
  font-family: "Consolas", "Courier New", monospace;
  font-weight: 800;
  text-align: right;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.numeric-pad-message {
  min-height: 20px;
  margin: 0;
  color: #ff9b9b;
  font-size: 0.88rem;
  font-weight: 850;
  text-align: center;
}

.numeric-pad-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.numeric-key {
  border: 1px solid #3b547b;
  border-radius: 12px;
  background: linear-gradient(180deg, #1a2b44, #142339);
  color: #eef4ff;
  min-height: 72px;
  font-size: 1.8rem;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}

.numeric-key:hover {
  border-color: #6caeff;
  background: linear-gradient(180deg, #22406a, #18325a);
}

.numeric-key:active,
.numeric-pad-actions .btn:active {
  transform: translateY(1px);
  filter: brightness(1.16);
}

.numeric-key:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.numeric-pad-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.numeric-pad-actions .btn {
  min-height: 58px;
  font-size: 1.02rem;
}

@media (max-width: 980px) {
  .numeric-pad-card {
    width: min(98vw, 700px);
    width: min(98dvw, 700px);
    max-height: calc(100dvh - 12px);
    padding: 12px;
    gap: 8px;
  }

  .numeric-pad-grid {
    gap: 8px;
  }

  .numeric-key {
    min-height: clamp(48px, 8dvh, 66px);
  }

  .numeric-pad-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .numeric-pad-actions .btn {
    min-height: 50px;
    font-size: 0.96rem;
  }
}

@media (max-height: 680px) {
  .numeric-pad-card {
    padding: 10px;
    gap: 6px;
  }

  .numeric-pad-caption {
    display: none;
  }

  .numeric-pad-value {
    min-height: 52px;
    padding: 6px 12px;
    font-size: 2rem;
  }

  .numeric-pad-message {
    min-height: 18px;
    font-size: 0.78rem;
  }

  .numeric-pad-grid,
  .numeric-pad-actions {
    gap: 6px;
  }

  .numeric-key {
    min-height: 44px;
    font-size: 1.45rem;
  }

  .numeric-pad-actions .btn {
    min-height: 46px;
  }
}

/* Tema negro de alto contraste y lectura ajustable */
* {
  letter-spacing: 0 !important;
}

.card {
  background: linear-gradient(180deg, rgba(20, 20, 20, 0.98), rgba(9, 9, 9, 0.98));
  border-color: var(--border);
}

.hero,
.columns-section,
.entry-section,
.scale-card,
.scale-settings-card,
.modal-card,
.item-modal-card,
.client-modal-card,
.delivery-fleet-card,
.error-modal-card,
.numeric-pad-card {
  background: linear-gradient(180deg, #151515, #090909);
}

.error-modal-card {
  background: linear-gradient(180deg, #211010, #090606);
}

.entry-section {
  overflow: auto;
}

.eyebrow,
.section-head h2,
.scale-card h2,
.truck-head h3,
.numeric-pad-head h2,
.item-pill strong,
.client-modal-truck {
  color: var(--text-main);
}

.eyebrow {
  color: var(--secondary);
  font-size: 0.78rem;
}

.hero h1 {
  color: #ffffff;
  font-size: 1.55rem;
  line-height: 1.12;
}

.hero-copy,
.global-stats,
.field,
.client-option-detail,
.truck-client-name,
.item-pill span,
.numeric-pad-caption {
  color: var(--text-soft);
}

.section-head {
  align-items: flex-start;
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: 1.02rem;
}

.global-stats,
.form-message,
.item-form-message {
  font-size: 0.9rem;
  line-height: 1.25;
}

.view-zoom-tools,
.font-tools {
  border: 1px solid #4a4633;
  border-radius: 10px;
  background: #0a0a0a;
  padding: 8px;
  display: grid;
  gap: 6px;
}

.view-zoom-heading > span,
.font-tools > span {
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.view-zoom-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.view-zoom-heading small,
.view-zoom-help {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.view-zoom-heading small {
  text-align: right;
}

.view-zoom-actions {
  display: grid;
  grid-template-columns: 48px minmax(74px, 1fr) 48px 58px;
  gap: 6px;
  align-items: center;
}

.view-zoom-actions output {
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #5b522b;
  border-radius: 8px;
  color: var(--secondary);
  background: #050505;
  display: grid;
  place-items: center;
  font-size: 0.94rem;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

.view-zoom-btn {
  min-width: 44px;
  min-height: 44px;
  padding: 6px 8px;
  border: 1px solid #6a5d27;
  border-radius: 8px;
  background: linear-gradient(180deg, #2d2814, #151207);
  color: var(--secondary);
  font: inherit;
  font-size: 1.1rem;
  font-weight: 900;
  cursor: pointer;
  touch-action: manipulation;
}

.view-zoom-btn:hover:not(:disabled),
.view-zoom-btn:focus-visible {
  border-color: var(--secondary);
  background: linear-gradient(180deg, #463915, #211a09);
}

.view-zoom-btn:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.view-zoom-reset {
  border-color: #4d4d4d;
  background: #171717;
  color: #ffffff;
  font-size: 0.74rem;
}

.font-tools-actions {
  display: grid;
  grid-template-columns: auto minmax(72px, 1fr) auto auto;
  gap: 6px;
  align-items: center;
}

.font-tools-actions strong {
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid #5b522b;
  border-radius: 8px;
  color: var(--secondary);
  background: #050505;
  display: grid;
  place-items: center;
  font-size: 0.86rem;
}

.font-size-btn {
  border: 1px solid #6a5d27;
  border-radius: 8px;
  min-width: 42px;
  min-height: 36px;
  padding: 6px 8px;
  background: linear-gradient(180deg, #2d2814, #151207);
  color: var(--secondary);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.font-size-btn:hover:not(:disabled),
.font-size-btn:focus-visible {
  border-color: var(--secondary);
  background: linear-gradient(180deg, #463915, #211a09);
}

.font-size-btn:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.font-size-reset {
  color: #ffffff;
  border-color: #4d4d4d;
  background: #171717;
}

.scale-strip-item,
.mobile-tabs,
.weight-preview,
.scale-connection,
.item-pill,
.client-modal-truck,
.numeric-pad-value {
  background: #070707;
  border-color: #4a4a4a;
}

.scale-strip-item span,
.metric span,
.truck-total-line span,
.type-total-item span,
.type-total-item small,
.truck-table th {
  color: var(--text-muted);
}

.scale-strip-item strong,
.scale-display,
.weight-preview strong,
.truck-total-line-price span,
.truck-total-line-price strong,
.numeric-pad-value {
  color: var(--secondary);
}

.scale-display {
  font-size: 2.05rem;
  text-shadow: 0 0 12px rgba(255, 208, 42, 0.18);
}

.scale-display span,
.scale-strip-item strong small,
.weight-preview small {
  color: var(--text-soft);
}

.scale-status {
  background: #050505;
  border-color: #4a4a4a;
}

.scale-status-offline {
  color: var(--text-muted);
}

.scale-status-connecting {
  border-color: var(--secondary);
  color: var(--secondary);
}

.scale-status-connected {
  border-color: var(--success);
  color: #a8f6c8;
}

.scale-status-error {
  border-color: var(--danger);
  color: #ffb9b9;
}

.scale-status-row small,
.scale-raw {
  color: var(--text-soft);
}

input,
select {
  min-height: 46px;
  background: var(--bg-input);
  border-color: #4b4b4b;
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 750;
}

input::placeholder {
  color: #8c846d;
}

input:focus,
select:focus,
button:focus-visible {
  outline: 3px solid rgba(255, 208, 42, 0.48);
  outline-offset: 2px;
}

.btn,
.type-btn,
.mobile-tab,
.return-ticket-btn,
.assign-client-btn,
.clear-column-btn,
.print-ticket-btn,
.client-option,
.numeric-key {
  font-family: inherit;
  font-weight: 850;
}

.btn {
  border-radius: 8px;
  font-size: 0.95rem;
}

.btn-primary {
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  color: #00151d;
}

.btn-primary:hover {
  background: linear-gradient(180deg, #6addff, #1bb4ea);
}

.btn-secondary {
  background: linear-gradient(180deg, var(--secondary), var(--secondary-dark));
  color: #171000;
}

.btn-secondary:hover {
  background: linear-gradient(180deg, #ffe176, #e3aa09);
}

.btn-success {
  background: linear-gradient(180deg, var(--success), var(--success-dark));
  color: #04170b;
}

.btn-success:hover {
  background: linear-gradient(180deg, #40dd83, #17ab57);
}

.btn-ghost {
  background: #0b0b0b;
  border: 1px solid #4e4e4e;
  color: #f6f0d9;
}

.btn-ghost:hover {
  background: #191919;
  border-color: var(--secondary);
}

.btn-danger {
  background: linear-gradient(180deg, #ff6a6a, #d83232);
  color: #ffffff;
}

.type-btn {
  border-color: #555555;
  background: linear-gradient(180deg, #191919, #0b0b0b);
  color: var(--text-main);
}

.type-btn.is-active {
  color: #171000;
  border-color: var(--secondary);
  background: linear-gradient(180deg, #ffe070, var(--secondary));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.mobile-tabs {
  background: #060606;
  border-color: #4a4a4a;
}

.mobile-tab {
  background: #151515;
  border-color: #525252;
  color: var(--text-main);
}

.mobile-tab.is-active {
  background: linear-gradient(180deg, #ffe070, var(--secondary));
  border-color: var(--secondary);
  color: #171000;
}

.truck-grid {
  overflow-x: auto;
  grid-template-columns: repeat(10, minmax(300px, 1fr));
  scrollbar-color: var(--secondary) #080808;
}

.truck-card {
  background: linear-gradient(180deg, #101010, #060606);
  border-color: #3d3d3d;
  border-radius: 10px;
}

.truck-card.active {
  border-color: var(--secondary);
  box-shadow: 0 0 0 2px rgba(255, 208, 42, 0.22);
  border-width: 8px;
}

.truck-head {
  background: linear-gradient(180deg, #1a1a1a, #0d0d0d);
  border-bottom-color: #3e3e3e;
  color: var(--text-main);
}

.assign-client-btn {
  background: #080808;
  border-color: #5a5a5a;
  color: #f7f0d0;
}

.assign-client-btn:hover {
  background: #191919;
  border-color: var(--secondary);
}

.clear-column-btn {
  background: linear-gradient(180deg, #ffe070, var(--secondary));
  border-color: var(--secondary);
  color: #171000;
}

.clear-column-btn:hover {
  background: linear-gradient(180deg, #fff0a6, #f1c23a);
}

.truck-client-name {
  overflow-wrap: anywhere;
}

.truck-metrics {
  background: #080808;
  border-bottom-color: #313131;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric span {
  font-size: 0.72rem;
  line-height: 1.1;
}

.metric strong {
  color: #ffffff;
  font-size: 0.98rem;
  line-height: 1.12;
}

.truck-table {
  font-size: 0.84rem;
}

.truck-table th,
.truck-table td {
  border-bottom-color: #2d2d2d;
  color: #f2eedf;
  line-height: 1.2;
}

.truck-table th {
  background: #171717;
  font-size: 0.72rem;
  color: #e8dcad;
}

.tag {
  border-radius: 7px;
  font-size: 0.72rem;
}

.tag-pollo-vivo {
  background: rgba(255, 208, 42, 0.14);
  color: #ffe27c;
  border-color: rgba(255, 208, 42, 0.44);
}

.tag-pollo-pelado {
  background: rgba(32, 199, 106, 0.14);
  color: #87f0b4;
  border-color: rgba(32, 199, 106, 0.42);
}

.truck-footer {
  background: #070707;
  border-top-color: #313131;
}

.truck-total-line {
  align-items: flex-start;
}

.truck-total-line span {
  font-size: 0.72rem;
  line-height: 1.15;
}

.truck-total-line strong {
  color: #ffffff;
  font-size: 0.74rem;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.type-total-item {
  background: #0b0b0b;
  border-color: #3f3f3f;
}

.type-total-item span {
  font-size: 0.72rem;
}

.type-total-item small {
  font-size: 0.7rem;
}

.type-total-item strong {
  color: #ffffff;
  font-size: 0.72rem;
  line-height: 1.18;
}

.type-total-pollo-vivo {
  border-color: rgba(255, 208, 42, 0.44);
}

.type-total-pollo-pelado {
  border-color: rgba(32, 199, 106, 0.44);
}

.empty {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.modal {
  background: rgba(0, 0, 0, 0.82);
}

.json-output {
  background: #050505;
  border-color: #3d3d3d;
  color: #f5edd1;
  font-size: 0.9rem;
}

.client-option {
  background: #090909;
  border-color: #444444;
  color: var(--text-main);
}

.client-option:hover {
  background: #171717;
  border-color: var(--secondary);
}

.client-option.is-active {
  background: #102217;
  border-color: var(--success);
  color: #bcffd8;
}

.numeric-key {
  background: linear-gradient(180deg, #1a1a1a, #090909);
  border-color: #4f4f4f;
  color: #ffffff;
  font-size: 1.8rem;
}

.numeric-key:hover {
  background: linear-gradient(180deg, #2a2a2a, #111111);
  border-color: var(--secondary);
}

.numeric-pad-value {
  font-size: 2.6rem;
}

.cage-row:hover,
.cage-row:focus {
  background: rgba(255, 208, 42, 0.14);
}

.selected-truck-details {
  border: 1px solid #5d542d;
  border-radius: 10px;
  background: linear-gradient(180deg, #15130b, #080806);
  box-shadow: 0 -8px 22px rgba(0, 0, 0, 0.36);
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(210px, 0.8fr) minmax(0, 1.7fr) minmax(240px, 0.9fr);
  gap: 10px;
  align-items: stretch;
}

.selected-truck-bar-head {
  border: 1px solid #4c462c;
  border-radius: 8px;
  background: #090909;
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  min-width: 0;
}

.selected-truck-bar-head span,
.selected-truck-stat span,
.selected-truck-type span,
.selected-truck-empty {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.selected-truck-bar-head strong {
  color: #ffffff;
  font-size: 1.15rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.selected-truck-bar-head small,
.selected-truck-type small {
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.selected-truck-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.selected-truck-stat {
  border: 1px solid #454545;
  border-radius: 8px;
  background: #090909;
  padding: 9px 8px;
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
}

.selected-truck-stat strong {
  color: #ffffff;
  font-size: 1.18rem;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.selected-truck-sex-counts {
  color: var(--secondary);
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.selected-truck-types {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.selected-truck-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 2px;
}

.selected-truck-actions .print-ticket-btn,
.selected-truck-actions .register-ticket-btn {
  min-width: 180px;
  min-height: 42px;
  padding: 8px 16px;
}

.ticket-registration-status {
  margin-right: auto;
  color: #72e5a7;
  font-size: 0.82rem;
  font-weight: 800;
}

.truck-card.is-registered {
  border-color: rgba(47, 211, 126, 0.65);
}

.truck-registration-line {
  margin: 4px 0 0;
  color: #72e5a7;
  font-size: 0.72rem;
  font-weight: 800;
}

.selected-truck-type {
  border: 1px solid #454545;
  border-radius: 8px;
  background: #090909;
  padding: 9px;
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
}

.selected-truck-type strong {
  color: #ffffff;
  font-size: 0.95rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.selected-truck-type small {
  display: block;
}

.selected-truck-empty {
  grid-column: 1 / -1;
  min-height: 72px;
  display: grid;
  place-items: center;
}

@media (max-width: 1450px) {
  .truck-grid {
    grid-template-columns: repeat(10, minmax(300px, 1fr));
  }

  .selected-truck-details {
    grid-template-columns: minmax(240px, 0.85fr) minmax(0, 1.15fr);
  }

  .selected-truck-types {
    grid-column: 1 / -1;
  }

  .selected-truck-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  html {
    font-size: 16px;
  }

  html[data-font-size="compact"] {
    font-size: 15px;
  }

  html[data-font-size="large"] {
    font-size: 18px;
  }

  html[data-font-size="xlarge"] {
    font-size: 20px;
  }

  .hero h1 {
    font-size: 1.35rem;
  }

  .font-tools-actions {
    grid-template-columns: auto minmax(64px, 1fr) auto auto;
  }

  .truck-grid {
    grid-template-columns: 1fr;
    overflow-x: visible;
  }

  .selected-truck-details {
    grid-template-columns: 1fr;
  }

  .selected-truck-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .selected-truck-types {
    grid-template-columns: 1fr;
  }

  .error-modal-details {
    grid-template-columns: 1fr;
  }

  .truck-table {
    min-width: 860px;
  }
}

@media (max-width: 640px) {
  html {
    font-size: 15px;
  }

  html[data-font-size="large"] {
    font-size: 17px;
  }

  html[data-font-size="xlarge"] {
    font-size: 19px;
  }

  .hero h1 {
    font-size: 1.28rem;
  }

  .scale-display {
    font-size: 2rem;
  }

  .font-tools-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .font-tools-actions strong {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  #fontDecreaseBtn {
    grid-column: 1;
    grid-row: 2;
  }

  #fontIncreaseBtn {
    grid-column: 2;
    grid-row: 2;
  }

  #fontResetBtn {
    grid-column: 3;
    grid-row: 2;
  }
}

.font-sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: flex;
  justify-content: flex-end;
  background: rgba(0, 0, 0, 0.58);
}

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

.font-size-sidebar {
  width: min(430px, 100vw);
  width: min(430px, 100dvw);
  height: 100vh;
  height: 100dvh;
  border-radius: 0;
  border-width: 0 0 0 1px;
  padding: 14px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, #151515, #070707);
}

.font-sidebar-head,
.font-sidebar-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.font-sidebar-caption {
  margin: 0 0 4px;
  color: var(--secondary);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.font-sidebar-head h2 {
  margin: 0;
  color: var(--text-main);
  font-size: 20px;
  line-height: 1.1;
}

.font-size-controls {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 12px;
  padding-right: 4px;
  scrollbar-color: var(--secondary) #080808;
}

.font-size-group {
  display: grid;
  gap: 8px;
}

.font-size-group h3 {
  margin: 0;
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.15;
}

.font-size-control {
  border: 1px solid #3e3e3e;
  border-radius: 8px;
  background: #090909;
  padding: 9px;
  display: grid;
  gap: 8px;
}

.font-size-control-main {
  display: grid;
  gap: 3px;
}

.font-size-control-kind {
  width: max-content;
  border: 1px solid #4c4426;
  border-radius: 999px;
  padding: 2px 7px;
  color: var(--secondary);
  background: #171304;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.font-size-control strong {
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.15;
}

.font-size-control small {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.2;
}

.font-size-stepper {
  display: grid;
  grid-template-columns: 42px minmax(72px, 1fr) 42px 42px;
  gap: 6px;
  align-items: center;
}

.font-size-stepper button {
  border: 1px solid #555555;
  border-radius: 8px;
  min-width: 42px;
  min-height: 38px;
  background: #111111;
  color: var(--text-main);
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

.font-size-stepper button:hover,
.font-size-stepper button:focus-visible {
  border-color: var(--secondary);
  background: #1b1b1b;
}

.font-size-stepper button:disabled {
  opacity: 0.44;
  cursor: not-allowed;
}

.font-size-stepper output {
  min-height: 38px;
  border: 1px solid #5b522b;
  border-radius: 8px;
  background: #050505;
  color: var(--secondary);
  display: grid;
  place-items: center;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 16px;
  font-weight: 900;
}

.font-sidebar-footer .btn {
  width: 100%;
}

@media (max-width: 640px) {
  .font-size-sidebar {
    width: 100vw;
    width: 100dvw;
    padding: 10px;
  }

  .font-size-stepper {
    grid-template-columns: 40px minmax(62px, 1fr) 40px 40px;
  }
}

.hero h1 {
  font-size: var(--fs-hero-title);
}

.section-head h2,
.numeric-pad-head h2 {
  font-size: var(--fs-section-title);
}

.global-stats,
.form-message,
.item-form-message,
.empty {
  font-size: var(--fs-helper-text);
}

.scale-card h2 {
  font-size: var(--fs-scale-title);
}

.scale-display,
.scale-strip-item strong {
  font-size: var(--fs-scale-number);
}

.scale-display span,
.scale-strip-item strong small {
  font-size: var(--fs-scale-unit);
}

.scale-status,
.scale-status-row small,
.scale-raw,
.scale-connect-actions .btn,
.scale-settings-panel h3 {
  font-size: var(--fs-scale-panel-text);
}

.field,
.numeric-pad-caption {
  font-size: var(--fs-form-label);
}

input,
select {
  font-size: var(--fs-input-number);
}

.btn,
.type-btn,
.mobile-tab,
.return-ticket-btn,
.assign-client-btn,
.clear-column-btn,
.client-option,
.numeric-pad-actions .btn {
  font-size: var(--fs-button-text);
}

.weight-preview strong {
  font-size: var(--fs-preview-number);
}

.weight-preview span {
  font-size: calc(var(--fs-form-label) + 2px);
}

.weight-preview small {
  font-size: var(--fs-preview-detail);
}

.truck-head h3 {
  font-size: var(--fs-truck-title);
}

.metric span,
.truck-total-line span,
.type-total-item span,
.type-total-item small,
.selected-truck-bar-head span,
.selected-truck-stat span,
.selected-truck-type span,
.selected-truck-empty {
  font-size: var(--fs-truck-label);
}

.truck-client-name {
  font-size: var(--fs-truck-client-name);
}

.metric strong {
  font-size: var(--fs-truck-number);
}

.truck-table,
.truck-table td {
  font-size: var(--fs-truck-table-count);
}

.truck-table th {
  font-size: var(--fs-truck-table-head);
}

.truck-cell-id {
  font-size: var(--fs-truck-table-id);
}

.truck-cell-type,
.tag {
  font-size: var(--fs-truck-table-type);
}

.truck-cell-count {
  font-size: var(--fs-truck-table-count);
}

.truck-cell-weight {
  font-size: var(--fs-truck-table-weight);
}

.truck-head-gross-weight,
.truck-cell-gross-weight {
  color: var(--secondary);
  font-weight: 800;
  white-space: nowrap;
}

.truck-cell-meta {
  font-size: var(--fs-truck-table-meta);
}

.truck-total-line strong,
.type-total-item strong {
  font-size: var(--fs-truck-total);
}

.selected-truck-bar-head span,
.selected-truck-stat span,
.selected-truck-type span,
.selected-truck-empty {
  font-size: var(--fs-selected-label);
}

.selected-truck-bar-head strong,
.selected-truck-stat strong,
.selected-truck-type strong {
  font-size: var(--fs-selected-number);
}

.numeric-pad-value {
  font-size: var(--fs-keypad-value);
}

.numeric-key {
  font-size: var(--fs-keypad-number);
}

html.menu-root,
body.menu-page {
  min-height: 100%;
  overflow: auto;
}

.main-menu-view {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.86)),
    #000000;
}

.menu-shell {
  width: min(1120px, 100%);
  min-height: calc(100vh - 32px);
  min-height: calc(100dvh - 32px);
  margin: 0 auto;
  display: grid;
  align-content: center;
  gap: 14px;
}

.menu-hero {
  position: relative;
  padding: 18px;
  padding-right: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  background: linear-gradient(180deg, #151515, #090909);
}

.menu-user-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.menu-user-summary {
  min-width: 150px;
  display: grid;
  gap: 2px;
  text-align: right;
}

.menu-user-summary span,
.menu-user-summary small {
  color: var(--text-muted);
  font-size: .72rem;
  font-weight: 700;
}

.menu-user-summary strong {
  color: #fff;
  font-size: .94rem;
}

.menu-account-link,
.menu-logout-button {
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #3f526a;
  border-radius: 9px;
  color: #d9e7f8;
  background: #0b121c;
  font: inherit;
  font-size: .82rem;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.menu-logout-button {
  border-color: #714141;
  color: #ffb9b9;
}

.menu-user-actions form { margin: 0; }

.menu-user-actions .menu-fullscreen-button {
  position: static;
  min-width: 178px;
  min-height: 44px;
}

.menu-tile-access {
  border-color: #7f6721;
  background: linear-gradient(180deg, #302811, #080808);
}

.menu-fullscreen-button {
  position: absolute;
  top: 18px;
  right: 18px;
  min-width: 194px;
  min-height: 54px;
  padding: 10px 14px;
  border: 1px solid #2f82a8;
  border-radius: 10px;
  color: #d8f4ff;
  background: linear-gradient(180deg, #16354a, #08131b);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
  font: inherit;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.menu-fullscreen-button:hover,
.menu-fullscreen-button:focus-visible {
  border-color: #6cdbff;
  background: linear-gradient(180deg, #1c4965, #0a1c27);
  outline: 3px solid rgba(72, 205, 252, 0.25);
  outline-offset: 2px;
}

.menu-fullscreen-button:active {
  transform: scale(0.97);
}

.menu-fullscreen-button.is-active {
  border-color: var(--secondary);
  color: #fff2a8;
  background: linear-gradient(180deg, #4b4116, #171304);
}

.menu-fullscreen-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.menu-fullscreen-icon {
  position: relative;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
}

.menu-fullscreen-icon > span {
  position: absolute;
  width: 9px;
  height: 9px;
  border-color: currentColor;
  border-style: solid;
  transition: inset 0.18s ease, border-width 0.18s ease;
}

.menu-fullscreen-icon > span:nth-child(1) {
  top: 0;
  left: 0;
  border-width: 2px 0 0 2px;
}

.menu-fullscreen-icon > span:nth-child(2) {
  top: 0;
  right: 0;
  border-width: 2px 2px 0 0;
}

.menu-fullscreen-icon > span:nth-child(3) {
  right: 0;
  bottom: 0;
  border-width: 0 2px 2px 0;
}

.menu-fullscreen-icon > span:nth-child(4) {
  bottom: 0;
  left: 0;
  border-width: 0 0 2px 2px;
}

.menu-fullscreen-button.is-active .menu-fullscreen-icon > span:nth-child(1) {
  top: 2px;
  left: 2px;
  border-width: 0 2px 2px 0;
}

.menu-fullscreen-button.is-active .menu-fullscreen-icon > span:nth-child(2) {
  top: 2px;
  right: 2px;
  border-width: 0 0 2px 2px;
}

.menu-fullscreen-button.is-active .menu-fullscreen-icon > span:nth-child(3) {
  right: 2px;
  bottom: 2px;
  border-width: 2px 0 0 2px;
}

.menu-fullscreen-button.is-active .menu-fullscreen-icon > span:nth-child(4) {
  bottom: 2px;
  left: 2px;
  border-width: 2px 2px 0 0;
}

.menu-fullscreen-label {
  white-space: nowrap;
}

.menu-hero h1 {
  margin: 0;
  color: #ffffff;
  font-size: 2rem;
  line-height: 1.05;
}

.menu-copy {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 1rem;
  font-weight: 650;
}

.menu-notice {
  min-height: 22px;
  margin: 0;
  color: var(--secondary);
  font-size: 0.92rem;
  font-weight: 800;
  text-align: right;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.menu-empty-state {
  grid-column: 1 / -1;
  min-height: 180px;
  padding: 28px;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
}

.menu-empty-state strong { color: #fff; font-size: 1.2rem; }
.menu-empty-state span { color: var(--text-soft); }

.menu-tile {
  min-width: 0;
  min-height: 180px;
  aspect-ratio: 1 / 1;
  padding: 14px;
  border: 1px solid #424242;
  border-radius: var(--radius);
  color: var(--text-main);
  background: linear-gradient(180deg, #151515, #080808);
  box-shadow: var(--shadow);
  text-decoration: none;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.menu-tile:hover,
.menu-tile:focus-visible {
  border-color: var(--secondary);
  background: linear-gradient(180deg, #1f1b10, #090909);
  transform: translateY(-2px);
  outline: none;
}

.menu-tile-primary {
  border-color: #2f82a8;
  background: linear-gradient(180deg, #132231, #080808);
}

.menu-tile-primary:hover,
.menu-tile-primary:focus-visible {
  border-color: #48cdfc;
  background: linear-gradient(180deg, #153044, #080808);
}

.menu-tile-icon {
  width: 52px;
  height: 52px;
  border: 1px solid #5b522b;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--secondary);
  background: #050505;
}

.menu-tile-primary .menu-tile-icon {
  border-color: #2f82a8;
  color: var(--primary);
}

.menu-tile-icon svg,
.menu-return-btn svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-tile-text {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 6px;
}

.menu-tile-text strong {
  color: #ffffff;
  font-size: 1.16rem;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.menu-tile-text small {
  color: var(--text-soft);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.25;
}

.menu-status {
  width: fit-content;
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid #286f93;
  border-radius: 8px;
  color: #aee7ff;
  background: #071723;
  font-size: 0.76rem;
  font-weight: 900;
}

.menu-status-soon {
  border-color: #5b522b;
  color: var(--secondary);
  background: #151207;
}

.hero-menu-row {
  display: flex;
  justify-content: flex-end;
}

.menu-return-btn {
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid #5b522b;
  border-radius: 8px;
  color: var(--secondary);
  background: #050505;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.menu-return-btn:hover,
.menu-return-btn:focus-visible {
  border-color: var(--secondary);
  background: #17140a;
}

.menu-return-btn svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 760px) {
  .main-menu-view {
    padding: 10px;
  }

  .menu-shell {
    min-height: calc(100vh - 20px);
    min-height: calc(100dvh - 20px);
    align-content: start;
  }

  .menu-hero {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .menu-user-actions .menu-fullscreen-button {
    min-width: 52px;
    min-height: 52px;
    padding: 10px;
  }

  .menu-user-actions {
    justify-content: flex-start;
  }

  .menu-user-summary {
    flex: 1 1 100%;
    text-align: left;
  }

  .menu-fullscreen-label {
    display: none;
  }

  .menu-hero h1 {
    font-size: 1.5rem;
  }

  .menu-copy {
    font-size: 0.92rem;
  }

  .menu-notice {
    text-align: left;
  }

  .menu-grid {
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
    gap: 8px;
  }

  .menu-tile {
    min-height: 148px;
    padding: 10px;
    gap: 8px;
  }

  .menu-tile-icon {
    width: 44px;
    height: 44px;
  }

  .menu-tile-icon svg {
    width: 24px;
    height: 24px;
  }

  .menu-tile-text strong {
    font-size: 0.98rem;
  }

  .menu-tile-text small {
    font-size: 0.78rem;
  }

  .menu-status {
    min-height: 28px;
    font-size: 0.7rem;
  }
}

.type-switch {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tag-pollo-beneficiado {
  background: rgba(77, 215, 255, 0.14);
  color: #9feaff;
  border-color: rgba(77, 215, 255, 0.42);
}

.type-total-grid,
.selected-truck-types {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.type-total-pollo-beneficiado {
  border-color: rgba(77, 215, 255, 0.44);
}

/* Controles táctiles de números y listas */
.touch-number-control,
.touch-select-control {
  appearance: none;
  min-height: 60px;
  border: 2px solid #5c542d;
  border-radius: 12px;
  background: linear-gradient(180deg, #171717, #080808);
  color: var(--secondary);
  box-shadow: inset 0 0 0 1px rgba(255, 208, 42, 0.08);
  font-family: "Consolas", "Courier New", monospace;
  font-size: clamp(1.08rem, 1.3vw, 1.38rem);
  font-weight: 900;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.touch-text-control {
  min-height: 60px !important;
  border-width: 2px !important;
  border-color: #5c542d !important;
  background: linear-gradient(180deg, #171717, #080808) !important;
  color: #ffffff !important;
  font-size: clamp(1rem, 1.2vw, 1.25rem) !important;
  font-weight: 800 !important;
  cursor: pointer;
  caret-color: transparent;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.touch-text-control:hover,
.touch-text-control:focus-visible {
  border-color: var(--secondary) !important;
  box-shadow: 0 0 0 3px rgba(255, 208, 42, 0.14) !important;
}

.touch-text-control::placeholder {
  color: #99917a;
}

.touch-number-control:hover,
.touch-select-control:hover,
.touch-number-control:focus-visible,
.touch-select-control:focus-visible {
  border-color: var(--secondary);
  background: linear-gradient(180deg, #28230e, #100e07);
}

.touch-number-control::placeholder {
  color: #8f876b;
  font-size: 0.82em;
}

.touch-select-control:disabled,
.touch-number-control:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.touch-select-modal {
  z-index: 230;
  padding: clamp(8px, 2vw, 20px);
  place-items: center;
  overflow: auto;
}

.touch-select-card {
  width: min(760px, calc(100dvw - 20px));
  max-height: calc(100dvh - 20px);
  padding: 16px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
}

.touch-select-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.touch-select-caption {
  margin: 0 0 4px;
  color: var(--secondary);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.touch-select-head h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  line-height: 1.1;
}

.touch-select-current {
  min-height: 76px;
  border: 2px solid #665a29;
  border-radius: 12px;
  background: #0b0b08;
  padding: 10px 14px;
  display: grid;
  align-content: center;
  gap: 3px;
}

.touch-select-current span {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.touch-select-current strong {
  color: var(--secondary);
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.touch-select-options {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 10px;
  scrollbar-color: var(--secondary) #080808;
}

.touch-select-option {
  min-height: 88px;
  border: 2px solid #4a4a4a;
  border-radius: 12px;
  background: linear-gradient(180deg, #181818, #090909);
  color: #ffffff;
  padding: 10px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 8px;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}

.touch-select-option:hover,
.touch-select-option:focus-visible {
  border-color: var(--secondary);
  background: linear-gradient(180deg, #28230e, #100e07);
}

.touch-select-option.is-active {
  border-color: var(--secondary);
  background: linear-gradient(180deg, #41360b, #201b07);
  box-shadow: inset 0 0 0 2px rgba(255, 208, 42, 0.18);
}

.touch-select-option:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.touch-select-option-index {
  color: var(--text-muted);
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.78rem;
  font-weight: 850;
}

.touch-select-option strong {
  color: inherit;
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.touch-select-option-check {
  color: var(--secondary);
  font-size: 1.6rem;
  font-weight: 900;
  text-align: center;
}

.numeric-pad-card {
  width: min(680px, calc(100dvw - 20px));
  border-color: #625725;
}

.numeric-pad-value {
  min-height: 92px;
  border: 2px solid #665a29;
  background: #080806;
  color: var(--secondary);
  font-size: clamp(3rem, 7vw, 4.5rem);
}

.numeric-key {
  min-height: 82px;
  border-width: 2px;
  border-color: #4d4d4d;
  font-size: clamp(2rem, 4vw, 2.8rem);
  touch-action: manipulation;
}

.numeric-key:hover,
.numeric-key:focus-visible {
  border-color: var(--secondary);
  background: linear-gradient(180deg, #30280d, #151105);
}

/* Teclado alfabético táctil para buscadores de la operación mayorista */
.text-touch-keyboard[hidden] {
  display: none;
}

.text-touch-keyboard {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 280;
  padding: 8px;
  pointer-events: none;
}

.text-touch-keyboard-card {
  width: min(1120px, 100%);
  max-height: calc(100vh - 16px);
  max-height: calc(100dvh - 16px);
  margin: 0 auto;
  padding: 10px;
  overflow-y: auto;
  border: 2px solid #665a29;
  border-radius: 14px;
  background: linear-gradient(160deg, #1d1b12, #090909 68%);
  box-shadow: 0 -12px 42px rgba(0, 0, 0, 0.72);
  pointer-events: auto;
}

.text-touch-keyboard-head {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(220px, 1.5fr) 52px;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.text-touch-keyboard-head > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.text-touch-keyboard-head span {
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.text-touch-keyboard-head strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 1.08rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-touch-keyboard-head output {
  min-width: 0;
  min-height: 48px;
  padding: 9px 12px;
  overflow: hidden;
  border: 2px solid #665a29;
  border-radius: 9px;
  background: #050505;
  color: var(--secondary);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-touch-keyboard-head > button,
.text-touch-keyboard-keys button,
.text-touch-keyboard-actions button {
  min-height: 48px;
  border: 2px solid #4d4d4d;
  border-radius: 9px;
  background: linear-gradient(180deg, #242424, #101010);
  color: #ffffff;
  padding: 6px;
  font: inherit;
  font-size: clamp(1rem, 1.65vw, 1.3rem);
  font-weight: 900;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.text-touch-keyboard-head > button {
  min-width: 52px;
  border-color: #6b4b4b;
  color: #ffd4d4;
  font-size: 2rem;
}

.text-touch-keyboard-keys {
  display: grid;
  gap: 5px;
}

.text-touch-keyboard-row {
  display: flex;
  justify-content: center;
  gap: 5px;
}

.text-touch-keyboard-row button {
  min-width: 0;
  max-width: 96px;
  flex: 1 1 0;
}

.text-touch-keyboard-row button.is-shift {
  max-width: 122px;
  flex: 1.35 1 0;
  border-color: #665a29;
  font-size: clamp(0.8rem, 1.25vw, 1rem);
}

.text-touch-keyboard-row button.is-shift.is-active {
  border-color: var(--secondary);
  background: linear-gradient(180deg, #5b4a13, #2b240b);
  color: #fff2a8;
}

.text-touch-keyboard-row button.is-space {
  max-width: 520px;
  flex-basis: 50%;
}

.text-touch-keyboard-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 8px;
  margin-top: 8px;
}

.text-touch-keyboard-actions button {
  min-height: 56px;
}

.text-touch-keyboard-actions button.is-accept {
  border-color: #258457;
  background: linear-gradient(180deg, #258457, #17613f);
}

.text-touch-keyboard button:hover,
.text-touch-keyboard button:focus-visible {
  border-color: var(--secondary);
  background: linear-gradient(180deg, #30280d, #151105);
  outline: none;
}

.text-touch-keyboard button:active {
  transform: translateY(1px);
  filter: brightness(1.2);
}

/* Recepción en escritorio: controles arriba y tickets a todo el ancho */
@media (min-width: 981px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }

  .control-panel {
    grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr) minmax(280px, 0.8fr);
    grid-template-rows: auto auto;
    overflow: visible;
    padding-right: 0;
  }

  .hero,
  .scale-section,
  .entry-section,
  .return-ticket-btn,
  .daily-provider-panel {
    min-width: 0;
  }

  .hero {
    grid-column: 1;
    grid-row: 1;
    align-content: space-between;
  }

  .scale-section {
    grid-column: 2;
    grid-row: 1;
  }

  .entry-section {
    grid-column: 1 / 3;
    grid-row: 2;
    min-height: 0;
    overflow: hidden;
  }

  .return-ticket-btn {
    grid-column: 3;
    grid-row: 1;
    align-self: start;
    position: relative;
    z-index: 2;
  }

  .daily-provider-panel {
    grid-column: 3;
    grid-row: 1 / 3;
    padding-top: 76px;
  }

  #cageForm {
    grid-template-rows: auto auto auto;
  }

  .type-switch {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 8px;
  }

  .type-btn {
    min-height: 40px;
    padding-block: 6px;
  }

  .form-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .dispatch-truck-field {
    grid-column: span 2;
  }

  .selected-origin-summary {
    grid-column: span 2;
  }

  .weight-preview {
    min-height: 82px;
    padding: 10px 12px;
  }

  .entry-section .weight-preview-gross {
    grid-column: span 3;
  }

  .entry-section .weighing-submit-button {
    grid-column: span 1;
    align-self: stretch;
    min-height: 82px;
    border: 1px solid #2fd37e;
    font-size: clamp(1rem, 1.2vw, 1.2rem);
  }

  .form-actions {
    margin-top: 8px;
  }

  .columns-section {
    width: 100%;
  }
}

@media (min-width: 1280px) {
  .control-panel {
    grid-template-columns:
      minmax(180px, 0.6fr)
      minmax(220px, 0.75fr)
      minmax(500px, 2fr)
      minmax(280px, 340px);
    grid-template-rows: auto;
    align-items: stretch;
  }

  .hero {
    grid-column: 1;
    grid-row: 1;
  }

  .scale-section {
    grid-column: 2;
    grid-row: 1;
  }

  .entry-section {
    grid-column: 3;
    grid-row: 1;
  }

  .return-ticket-btn {
    grid-column: 4;
    grid-row: 1;
  }

  .daily-provider-panel {
    grid-column: 4;
    grid-row: 1;
  }

  .form-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .form-grid > .field:nth-child(6),
  .form-grid > .field:nth-child(7) {
    grid-column: span 2;
  }

  .weight-preview {
    grid-column: span 2;
  }

  .entry-section .weight-preview-gross,
  .entry-section .weighing-submit-button {
    grid-column: span 2;
  }

  .selected-truck-details {
    grid-template-columns:
      minmax(210px, 0.8fr)
      minmax(390px, 1.5fr)
      minmax(250px, 1fr)
      minmax(180px, 0.65fr);
    gap: 8px;
    padding: 8px;
    align-items: stretch;
  }

  .selected-truck-summary {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
  }

  .selected-truck-types {
    grid-column: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .selected-truck-actions {
    grid-column: auto;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    padding-top: 0;
  }

  .selected-truck-actions .print-ticket-btn,
  .selected-truck-actions .register-ticket-btn {
    width: 100%;
    min-width: 0;
    min-height: 36px;
  }

  .ticket-registration-status {
    margin-right: 0;
  }
}

@media (min-width: 1280px) and (max-width: 1500px) {
  .control-panel {
    grid-template-columns:
      minmax(205px, 0.7fr)
      minmax(190px, 0.65fr)
      minmax(500px, 2fr)
      minmax(290px, 320px);
  }

  .scale-section {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 1280px) and (max-height: 820px) {
  .entry-section {
    padding: 8px;
  }

  .entry-section .dispatch-primary-row {
    --dispatch-control-height: 52px;
  }

  .entry-section .section-head {
    margin-bottom: 6px;
  }

  .entry-section .type-switch {
    margin-bottom: 6px;
  }

  .entry-section .type-btn {
    min-height: 36px;
    padding-block: 4px;
  }

  .entry-section .field {
    gap: 3px;
  }

  .entry-section input,
  .entry-section select {
    min-height: 52px;
  }

  .entry-section .weight-preview {
    min-height: 64px;
    padding: 6px 10px;
  }

  .entry-section .form-actions {
    margin-top: 6px;
  }

  .entry-section .btn-success {
    min-height: 40px;
    padding-block: 8px;
  }
}

@media (max-width: 980px) {
  .touch-number-control,
  .touch-select-control {
    min-height: 64px;
    font-size: 1.35rem;
  }

  .touch-text-control {
    min-height: 64px;
    font-size: 1.15rem !important;
  }

  .touch-select-card {
    width: min(98dvw, 720px);
    max-height: calc(100dvh - 12px);
    padding: 12px;
    gap: 9px;
  }

  .touch-select-options {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .touch-select-option {
    min-height: 76px;
  }
}

@media (max-width: 640px) {
  .touch-select-head .btn {
    min-width: 88px;
  }

  .touch-select-current {
    min-height: 68px;
  }

  .touch-select-option {
    min-height: 70px;
  }

  .numeric-pad-card {
    width: calc(100dvw - 12px);
    padding: 10px;
  }

  .numeric-pad-value {
    min-height: 72px;
  }

  .numeric-key {
    min-height: 62px;
  }

  .text-touch-keyboard {
    padding: 4px;
  }

  .text-touch-keyboard-card {
    padding: 7px;
    border-radius: 10px;
  }

  .text-touch-keyboard-head {
    grid-template-columns: minmax(0, 1fr) 46px;
    gap: 5px;
  }

  .text-touch-keyboard-head > div {
    display: none;
  }

  .text-touch-keyboard-row,
  .text-touch-keyboard-keys {
    gap: 3px;
  }

  .text-touch-keyboard-keys button {
    min-height: 44px;
    padding: 4px 2px;
    font-size: clamp(0.82rem, 3vw, 1rem);
  }

  .text-touch-keyboard-row button.is-shift {
    font-size: 0.72rem;
  }

  .text-touch-keyboard-actions {
    gap: 5px;
    margin-top: 5px;
  }

  .text-touch-keyboard-actions button {
    min-height: 48px;
    padding-inline: 3px;
    font-size: 0.9rem;
  }
}

@media (max-height: 650px) {
  .text-touch-keyboard-card {
    padding: 6px;
  }

  .text-touch-keyboard-head {
    margin-bottom: 4px;
  }

  .text-touch-keyboard-head > div {
    display: none;
  }

  .text-touch-keyboard-head {
    grid-template-columns: minmax(0, 1fr) 46px;
  }

  .text-touch-keyboard-head output,
  .text-touch-keyboard-head > button,
  .text-touch-keyboard-keys button {
    min-height: 44px;
  }

  .text-touch-keyboard-keys,
  .text-touch-keyboard-row {
    gap: 3px;
  }

  .text-touch-keyboard-actions {
    gap: 5px;
    margin-top: 5px;
  }

  .text-touch-keyboard-actions button {
    min-height: 44px;
  }
}

@media (min-width: 981px) and (max-height: 650px) {
  .operation-touch-page .columns-section {
    grid-template-rows: auto minmax(220px, 1fr) auto;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .operation-touch-page .truck-grid {
    min-height: 220px;
  }
}

/* Objetivos mínimos para operación completa con dedos o lápiz táctil */
.operation-touch-page button,
.operation-touch-page input,
.operation-touch-page select,
.operation-touch-page a {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.operation-touch-page .config-menu-btn,
.operation-touch-page .config-close-btn,
.operation-touch-page .scale-settings-btn,
.operation-touch-page .scale-connect-actions .btn,
.operation-touch-page .view-zoom-btn,
.operation-touch-page .font-size-stepper button,
.operation-touch-page .assign-client-btn,
.operation-touch-page .clear-column-btn,
.operation-touch-page .register-ticket-btn,
.operation-touch-page .print-ticket-btn,
.operation-touch-page .type-btn,
.operation-touch-page .sex-btn,
.operation-touch-page .mobile-tab,
.operation-touch-page .menu-return-btn {
  min-width: 44px;
  min-height: 44px;
}

.operation-touch-page .entry-section .weighing-submit-button {
  min-height: 64px;
}

.operation-touch-page .cage-row {
  min-height: 44px;
}

.operation-touch-page .cage-row > td {
  height: 44px;
}

/* Totales del ticket seleccionado: lectura ampliada para pantallas táctiles */
@media (min-width: 981px) {
  .selected-truck-details {
    min-height: 132px;
    border-width: 2px;
    padding: 10px;
    gap: 10px;
    background: linear-gradient(180deg, #17150b, #070705);
  }

  .selected-truck-bar-head,
  .selected-truck-stat,
  .selected-truck-type {
    border-width: 2px;
    border-radius: 11px;
    background: linear-gradient(180deg, #141414, #070707);
  }

  .selected-truck-bar-head {
    padding: 13px;
  }

  .selected-truck-bar-head > div {
    display: grid;
    align-content: center;
    gap: 6px;
  }

  .selected-truck-bar-head span,
  .selected-truck-stat span,
  .selected-truck-type span {
    font-size: max(var(--fs-selected-label), 12px);
    line-height: 1;
  }

  .selected-truck-bar-head strong {
    color: var(--secondary);
    font-family: "Consolas", "Courier New", monospace;
    font-size: max(var(--fs-selected-number), 25px);
    line-height: 1.05;
  }

  .selected-truck-bar-head small {
    color: #ffffff;
    font-size: 17px;
    line-height: 1.15;
  }

  .selected-truck-summary {
    gap: 8px;
  }

  .selected-truck-stat {
    padding: 12px 9px;
    gap: 8px;
  }

  .selected-truck-stat strong {
    color: var(--secondary);
    font-family: "Consolas", "Courier New", monospace;
    font-size: max(var(--fs-selected-number), 26px);
    line-height: 1;
  }

  .selected-truck-types {
    gap: 8px;
  }

  .selected-truck-type {
    padding: 11px;
    gap: 7px;
  }

  .selected-truck-type strong {
    color: #ffffff;
    font-size: 17px;
    line-height: 1.18;
  }

  .selected-truck-type small {
    color: var(--secondary);
    font-size: 15px;
    line-height: 1.1;
  }

  .ticket-registration-status {
    font-size: 15px;
    line-height: 1.15;
  }
}

@media (min-width: 1280px) and (max-width: 1500px) {
  .selected-truck-details {
    min-height: 124px;
    padding: 8px;
    gap: 7px;
  }

  .selected-truck-bar-head {
    padding: 10px;
  }

  .selected-truck-bar-head strong {
    font-size: max(var(--fs-selected-number), 21px);
  }

  .selected-truck-bar-head small {
    font-size: 15px;
  }

  .selected-truck-stat {
    padding: 9px 6px;
    gap: 5px;
  }

  .selected-truck-stat strong {
    font-size: max(var(--fs-selected-number), 22px);
  }

  .selected-truck-type {
    padding: 8px;
    gap: 4px;
  }

  .selected-truck-type strong {
    font-size: 15px;
  }

  .selected-truck-type small,
  .ticket-registration-status {
    font-size: 13px;
  }
}

/* Resultado principal de la pesada: solo lectura bruta */
.entry-section .weight-preview-gross {
  min-height: 112px;
  border: 2px solid #665a29;
  background: linear-gradient(180deg, #171407, #080806);
  place-content: center;
  text-align: center;
}

.entry-section .weight-preview-gross span {
  color: var(--text-soft);
  font-size: clamp(0.9rem, 1.1vw, 1.08rem);
  text-transform: uppercase;
}

.entry-section .weight-preview-gross strong {
  color: var(--secondary);
  font-family: "Consolas", "Courier New", monospace;
  font-size: clamp(2.2rem, 3.2vw, 3.6rem);
  line-height: 1;
  white-space: nowrap;
  overflow-wrap: normal;
  text-shadow: 0 0 18px rgba(255, 208, 42, 0.2);
}

@media (min-width: 1280px) and (max-height: 820px) {
  .entry-section .weight-preview-gross {
    min-height: 92px;
  }

  .entry-section .weight-preview-gross strong {
    font-size: clamp(2.05rem, 2.75vw, 2.75rem);
  }
}

.form-message.is-error {
  color: #ffb6b6;
}

html.directory-root,
body.directory-page {
  min-height: 100%;
  overflow: auto;
}

html.customer-history-root,
body.customer-history-page {
  min-height: 100%;
  overflow: auto;
}

body.customer-history-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(43, 199, 255, 0.08), transparent 34rem),
    var(--bg-main);
  color: var(--text-main);
}

.customer-history-view {
  width: min(1500px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.customer-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
}

.customer-history-header h1 {
  margin: 4px 0 6px;
}

.customer-history-meta {
  margin: 0;
  color: var(--text-muted);
}

.customer-history-message {
  min-height: 24px;
  margin: 10px 0;
}

.customer-history-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.customer-history-stats .directory-stat strong {
  font-size: clamp(18px, 2vw, 26px);
}

.customer-history-filters {
  padding: 22px;
  margin-bottom: 28px;
}

.customer-history-filter-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(2, minmax(170px, 0.75fr)) auto;
  gap: 14px;
  align-items: end;
}

.customer-history-filter-actions {
  display: flex;
  gap: 8px;
}

.customer-history-section {
  margin-top: 28px;
}

.customer-history-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.customer-history-section-head h2 {
  margin: 3px 0 0;
}

.customer-ticket-list {
  display: grid;
  gap: 16px;
}

.customer-ticket-list.is-loading {
  opacity: 0.65;
  pointer-events: none;
}

.customer-ticket {
  padding: 0;
  overflow: hidden;
}

.customer-ticket-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.customer-ticket-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
}

.customer-ticket-head h3 {
  margin: 9px 0 4px;
  font-size: 20px;
}

.customer-ticket-head p,
.customer-ticket-total span {
  margin: 0;
  color: var(--text-muted);
}

.customer-ticket-total {
  display: flex;
  flex-direction: column;
  align-items: end;
  justify-content: center;
}

.customer-ticket-total strong {
  margin-top: 4px;
  color: var(--success);
  font-size: 24px;
}

.customer-ticket-summary,
.customer-ticket-prices {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 13px 22px;
  border-bottom: 1px solid var(--border);
}

.customer-ticket-summary span,
.customer-ticket-prices span {
  color: var(--text-muted);
}

.customer-ticket-summary strong,
.customer-ticket-prices strong {
  color: var(--text-main);
}

.customer-ticket-prices {
  background: rgba(76, 175, 80, 0.06);
}

.customer-operation-tag,
.customer-chicken-condition {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.customer-operation-tag {
  padding: 5px 8px;
  background: #0e1727;
  color: #c9daf2;
}

.customer-operation-return {
  border-color: rgba(255, 91, 91, 0.5);
  background: rgba(255, 91, 91, 0.14);
  color: #ffb3b3;
}

.customer-ticket-total strong.customer-return-value,
.customer-return-value {
  color: #ff8f8f;
}

.customer-operation-dispatch {
  border-color: rgba(43, 199, 255, 0.35);
  background: rgba(43, 199, 255, 0.1);
  color: var(--primary);
}

.customer-record-type {
  display: inline-grid;
  gap: 5px;
  min-width: 110px;
}

.customer-record-type strong {
  color: var(--text-main);
}

.customer-chicken-condition {
  padding: 4px 7px;
  color: #c9daf2;
  background: #0e1727;
}

.customer-chicken-condition-muerto {
  border-color: rgba(255, 91, 91, 0.46);
  background: rgba(255, 91, 91, 0.14);
  color: #ffb3b3;
}

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

.customer-history-section > .customer-history-table-wrap {
  padding: 0;
}

.customer-history-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

.customer-history-table th,
.customer-history-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.customer-history-table th {
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.customer-history-table tbody tr:last-child td {
  border-bottom: 0;
}

.customer-history-table tr.is-inactive {
  opacity: 0.55;
}

.customer-history-empty-cell {
  padding: 28px !important;
  text-align: center !important;
  color: var(--text-muted);
}

.customer-status {
  display: inline-flex;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.customer-status-current,
.customer-status-activa {
  border-color: rgba(76, 175, 80, 0.45);
  background: rgba(76, 175, 80, 0.12);
  color: var(--success);
}

.customer-history-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}

.provider-history-stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.provider-vehicle-panel {
  margin-bottom: 16px;
  padding: 22px;
}

.provider-vehicle-form {
  display: grid;
  grid-template-columns: minmax(220px, 420px) auto;
  gap: 12px;
  align-items: end;
}

.provider-vehicle-search-field {
  position: relative;
  min-width: 0;
}

.provider-vehicle-search-results {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg-card);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.35);
}

.provider-vehicle-search-option {
  display: grid;
  width: 100%;
  gap: 3px;
  padding: 11px 12px;
  border: 0;
  border-radius: 7px;
  color: var(--text-main);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.provider-vehicle-search-option:hover,
.provider-vehicle-search-option:focus-visible {
  outline: none;
  background: rgba(255, 208, 42, 0.12);
}

.provider-vehicle-search-option strong {
  color: var(--secondary);
  font-size: 16px;
  letter-spacing: 0.06em;
}

.provider-vehicle-search-option span,
.provider-vehicle-search-empty {
  color: var(--text-muted);
  font-size: 12px;
}

.provider-vehicle-search-empty {
  padding: 12px;
}

.provider-vehicle-search-empty.is-error {
  color: var(--danger);
}

.provider-vehicle-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.provider-vehicle-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg-card-soft);
}

.provider-vehicle-card > div {
  display: grid;
  min-width: 0;
}

.provider-vehicle-card strong {
  color: var(--text-main);
  font-size: 18px;
  letter-spacing: 0.08em;
}

.provider-vehicle-card span {
  color: var(--text-muted);
  font-size: 12px;
}

.provider-vehicle-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: var(--secondary);
  background: rgba(255, 208, 42, 0.1);
}

.provider-vehicle-icon svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.provider-history-filter-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr repeat(2, minmax(160px, 0.75fr)) auto;
  gap: 12px;
  align-items: end;
}

.provider-history-table {
  min-width: 1320px;
}

.provider-history-table td:nth-child(2) {
  display: grid;
}

.provider-history-table td:nth-child(2) small {
  color: var(--text-muted);
}

.provider-destination-cliente {
  border-color: rgba(43, 199, 255, 0.45);
  background: rgba(43, 199, 255, 0.1);
  color: var(--primary);
}

.provider-destination-almacen {
  border-color: rgba(255, 208, 42, 0.45);
  background: rgba(255, 208, 42, 0.1);
  color: var(--secondary);
}

.daily-tickets-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: end;
}

.daily-tickets-filter-grid {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(120px, 0.55fr) minmax(150px, 0.8fr) minmax(120px, 0.55fr) minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.daily-tickets-stats {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.daily-ticket-total strong {
  color: var(--primary);
}

.daily-operation-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.daily-operation-card {
  padding: 18px;
  border-left: 4px solid var(--primary);
}

.daily-operation-return {
  border-left-color: #ff7676;
}

.daily-operation-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.daily-operation-card-head span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.daily-operation-card-head strong {
  color: var(--text-main);
  font-size: 24px;
}

.daily-operation-dispatch .daily-operation-card-head strong {
  color: var(--primary);
}

.daily-operation-return .daily-operation-card-head strong {
  color: #ffb3b3;
}

.daily-operation-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 12px;
  color: var(--text-muted);
}

.daily-operation-metrics strong {
  color: var(--text-main);
}

.daily-ticket-type-summary {
  background: rgba(43, 199, 255, 0.06);
}

.daily-type-table {
  min-width: 900px;
}

.daily-client-table {
  min-width: 1080px;
}

.daily-client-table th:not(:first-child),
.daily-client-table td:not(:first-child) {
  text-align: right;
}

.daily-client-table th:nth-child(2),
.daily-client-table td:nth-child(2) {
  text-align: left;
}

.daily-client-name {
  min-width: 230px;
}

.daily-client-types {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 84px;
}

.daily-client-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 26px;
  padding: 4px 7px;
  border: 1px solid rgba(43, 199, 255, 0.3);
  border-radius: 6px;
  background: rgba(43, 199, 255, 0.08);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.daily-client-return strong {
  color: #ff8f8f;
}

.daily-client-net strong {
  color: var(--primary);
}

.daily-client-table tfoot td {
  border-top: 2px solid rgba(43, 199, 255, 0.5);
  border-bottom: 0;
  background: rgba(43, 199, 255, 0.08);
  font-weight: 800;
}

.daily-client-table .daily-summary-total td:first-child {
  text-align: left;
}

.daily-client-table .daily-summary-total td:not(:first-child) {
  text-align: right;
}

.daily-ticket-records {
  min-width: 1380px;
}

.daily-ticket-records td:nth-child(4) {
  display: grid;
  gap: 3px;
}

.daily-ticket-records td:nth-child(4) small {
  color: var(--text-muted);
}

@media (max-width: 1100px) {
  .customer-history-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .customer-history-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .provider-history-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .provider-history-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .daily-tickets-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .daily-tickets-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .daily-operation-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .customer-history-view {
    width: min(100% - 20px, 1500px);
    padding-top: 10px;
  }

  .customer-history-header,
  .customer-ticket-head {
    align-items: stretch;
    flex-direction: column;
  }

  .customer-ticket-total {
    align-items: start;
  }

  .customer-history-stats,
  .customer-history-filter-grid {
    grid-template-columns: 1fr;
  }

  .provider-history-stats,
  .provider-history-filter-grid,
  .daily-tickets-stats,
  .daily-tickets-filter-grid,
  .provider-vehicle-form {
    grid-template-columns: 1fr;
  }

  .customer-history-filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

/* Gestión de pesadas registradas */
.weighing-management-view {
  width: min(1700px, calc(100% - 28px));
  padding-top: 14px;
}

.weighing-search-card {
  padding: 12px 14px;
  margin-bottom: 14px;
}

.weighing-search-form {
  display: grid;
  grid-template-columns: auto minmax(300px, 1fr) auto auto auto;
  grid-template-areas: "title search submit clear menu";
  gap: 10px;
  align-items: end;
}

.weighing-search-form h1 {
  grid-area: title;
  min-height: 42px;
  margin: 0;
  display: flex;
  align-items: center;
  color: var(--text-main);
  font-size: 1.15rem;
  white-space: nowrap;
}

.weighing-search-form .field {
  grid-area: search;
}

.weighing-search-form > .btn-primary {
  grid-area: submit;
}

.weighing-search-form > .btn-ghost {
  grid-area: clear;
}

.weighing-search-form input,
.weighing-search-form > .btn,
.weighing-menu-btn {
  min-height: 42px;
}

.weighing-menu-btn {
  grid-area: menu;
  padding: 8px 12px;
}

.weighing-search-message {
  min-height: 0;
  margin: 9px 0 0;
}

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

.weighing-management-layout {
  display: grid;
  grid-template-columns: minmax(270px, 340px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.weighing-ticket-results {
  position: sticky;
  top: 14px;
  padding: 18px;
}

.weighing-panel-head,
.weighing-ticket-detail-head,
.weighing-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.weighing-panel-head h2,
.weighing-ticket-detail-head h2,
.weighing-modal-head h2 {
  margin: 2px 0 0;
}

.weighing-ticket-list {
  max-height: calc(100vh - 280px);
  margin-top: 14px;
  overflow-y: auto;
  display: grid;
  gap: 9px;
  scrollbar-color: var(--secondary) #080808;
}

.weighing-ticket-list.is-loading,
.weighing-selected-panel.is-loading {
  opacity: 0.58;
  pointer-events: none;
}

.weighing-ticket-option {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 12px;
  background: var(--bg-card-soft);
  color: var(--text-main);
  display: grid;
  gap: 6px;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.weighing-ticket-option:hover,
.weighing-ticket-option:focus-visible {
  border-color: var(--primary);
  background: rgba(43, 199, 255, 0.09);
}

.weighing-ticket-option.is-active {
  border-color: var(--secondary);
  box-shadow: inset 4px 0 0 var(--secondary);
  background: rgba(255, 208, 42, 0.08);
}

.weighing-ticket-option.is-retail {
  border-left-color: var(--success);
}

.weighing-ticket-option.is-retail.is-active {
  box-shadow: inset 4px 0 0 var(--success);
}

.weighing-ticket-option.is-readonly:not(.is-active) {
  opacity: 0.78;
}

.weighing-ticket-option > span:not(.weighing-ticket-option-head),
.weighing-ticket-option > small,
.weighing-ticket-option-head small {
  color: var(--text-muted);
}

.weighing-ticket-option-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.weighing-ticket-option-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 6px;
}

.weighing-ticket-option-head strong {
  color: var(--secondary);
}

.weighing-results-empty {
  padding: 26px 12px;
  display: grid;
  gap: 5px;
  color: var(--text-muted);
  text-align: center;
}

.weighing-results-empty strong {
  color: var(--text-main);
}

.weighing-ticket-detail {
  overflow: hidden;
}

.weighing-ticket-detail-head {
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
}

.weighing-ticket-detail-head p {
  margin: 5px 0 0;
  color: var(--text-muted);
}

.weighing-ticket-detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.weighing-ticket-detail-actions .btn {
  min-height: 42px;
}

.weighing-readonly-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 7px;
  border: 1px solid rgba(255, 208, 42, 0.48);
  border-radius: 999px;
  background: rgba(255, 208, 42, 0.1);
  color: var(--secondary);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  text-transform: uppercase;
}

.weighing-channel-badge,
.weighing-customer-badge,
.weighing-delivery-pending-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 7px;
  border: 1px solid rgba(65, 219, 141, 0.5);
  border-radius: 999px;
  background: rgba(65, 219, 141, 0.1);
  color: var(--success);
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  text-transform: uppercase;
}

.weighing-customer-badge {
  border-color: rgba(43, 199, 255, 0.5);
  background: rgba(43, 199, 255, 0.1);
  color: var(--primary);
}

.weighing-customer-badge.is-external {
  border-color: rgba(255, 162, 43, 0.55);
  background: rgba(255, 162, 43, 0.1);
  color: #ffbd69;
}

.weighing-delivery-pending-badge {
  border-color: rgba(255, 162, 43, 0.65);
  background: rgba(255, 162, 43, 0.14);
  color: #ffd09a;
}

.weighing-readonly-notice {
  padding: 10px 22px;
  border-bottom: 1px solid rgba(255, 208, 42, 0.3);
  background: rgba(255, 208, 42, 0.08);
  color: #f5dc87;
  font-size: 13px;
  font-weight: 700;
}

.weighing-ticket-delivery {
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr)) auto;
  gap: 14px;
  align-items: center;
  background: rgba(43, 199, 255, 0.05);
}

.weighing-ticket-delivery > span {
  display: grid;
  gap: 4px;
}

.weighing-ticket-delivery small {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.weighing-ticket-delivery strong {
  color: var(--text-main);
}

.weighing-ticket-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.weighing-ticket-stats.is-retail {
  grid-template-columns: repeat(7, minmax(120px, 1fr));
}

.weighing-ticket-stats > span {
  min-width: 120px;
  padding: 14px 16px;
  border-right: 1px solid var(--border);
  display: grid;
  gap: 4px;
}

.weighing-ticket-stats > span:last-child {
  border-right: 0;
}

.weighing-ticket-stats small {
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
}

.weighing-ticket-stats strong {
  font-size: 18px;
}

.weighing-ticket-stats .is-accent strong {
  color: var(--success);
}

.weighing-ticket-stats .is-sale-total {
  background: rgba(65, 219, 141, 0.08);
}

.weighing-ticket-stats .is-sale-total strong {
  color: var(--success);
}

.weighing-ticket-prices {
  padding: 12px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  background: rgba(65, 219, 141, 0.04);
}

.weighing-ticket-prices > div {
  min-width: 180px;
  padding: 10px 12px;
  border: 1px solid rgba(65, 219, 141, 0.24);
  border-radius: 8px;
  display: grid;
  gap: 3px;
  background: var(--bg-input);
}

.weighing-ticket-prices small {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.weighing-ticket-prices strong {
  color: var(--success);
  font-size: 17px;
}

.weighing-ticket-prices span {
  color: var(--text-soft);
  font-size: 11px;
}

.weighing-table-wrap {
  border-radius: 0;
  scrollbar-color: var(--secondary) #080808;
}

.weighing-table-wrap .weighing-records-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-card);
}

.weighing-records-table {
  min-width: 1450px;
}

.weighing-records-table.is-retail {
  min-width: 1680px;
}

.weighing-row-actions {
  display: flex;
  gap: 7px;
}

.weighing-row-actions .btn {
  min-height: 36px;
  padding: 7px 10px;
}

.weighing-modal[hidden],
.weighing-edit-form > [hidden] {
  display: none;
}

.weighing-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  padding: 18px;
  background: rgba(0, 0, 0, 0.82);
  display: grid;
  place-items: center;
}

.weighing-modal-card {
  width: min(900px, 100%);
  max-height: calc(100vh - 36px);
  padding: 22px;
  overflow-y: auto;
  scrollbar-color: var(--secondary) #080808;
}

.weighing-edit-form {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.management-sex-selector {
  align-self: end;
}

.weighing-edit-preview {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.weighing-edit-preview span {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  background: var(--bg-input);
  display: grid;
  gap: 4px;
}

.weighing-edit-preview small {
  color: var(--text-muted);
}

.weighing-edit-preview strong {
  color: var(--secondary);
  font-size: 20px;
}

.weighing-edit-preview .is-invalid strong {
  color: var(--danger);
}

.weighing-edit-form > .form-message,
.weighing-modal-actions {
  grid-column: 1 / -1;
}

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

.weighing-delete-card {
  width: min(580px, 100%);
}

.weighing-void-ticket-card {
  width: min(620px, 100%);
  border-top: 4px solid var(--danger);
}

.weighing-delivery-card {
  width: min(720px, 100%);
}

.weighing-delivery-ticket {
  margin: 14px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-soft);
  background: var(--bg-input);
  font-weight: 750;
}

.weighing-delivery-form {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.weighing-delivery-form > .form-message,
.weighing-delivery-form > .weighing-modal-actions {
  grid-column: 1 / -1;
}

.weighing-delete-copy {
  color: var(--text-soft);
}

.weighing-delete-card textarea,
.weighing-void-ticket-card textarea {
  width: 100%;
  min-height: 110px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-input);
  color: var(--text-main);
  padding: 10px 12px;
  font: inherit;
  resize: vertical;
}

.weighing-void-ticket-card .form-message {
  min-height: 22px;
  margin: 10px 0;
}

@media (min-width: 1001px) {
  html.weighing-management-root,
  body.weighing-management-page {
    height: 100%;
    overflow: hidden;
  }

  body.weighing-management-page {
    height: 100vh;
    height: 100dvh;
  }

  .weighing-management-view {
    height: 100vh;
    height: 100dvh;
    padding-bottom: 14px;
    box-sizing: border-box;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .weighing-management-layout,
  .weighing-ticket-results,
  .weighing-selected-panel,
  .weighing-ticket-detail,
  .weighing-table-wrap {
    min-height: 0;
  }

  .weighing-management-layout {
    align-items: stretch;
    overflow: hidden;
  }

  .weighing-ticket-results {
    position: static;
    height: 100%;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .weighing-ticket-list {
    max-height: none;
    min-height: 0;
    align-content: start;
  }

  .weighing-selected-panel,
  .weighing-ticket-detail {
    height: 100%;
  }

  .weighing-ticket-detail {
    display: flex;
    flex-direction: column;
  }

  .weighing-ticket-detail > :not(.weighing-table-wrap) {
    flex: 0 0 auto;
  }

  .weighing-table-wrap {
    flex: 1 1 auto;
    overflow: auto;
  }
}

@media (max-width: 1000px) {
  .weighing-search-form {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    grid-template-areas:
      "title title title menu"
      "search search submit clear";
  }

  .weighing-management-layout {
    grid-template-columns: 1fr;
  }

  .weighing-ticket-results {
    position: static;
  }

  .weighing-ticket-list {
    max-height: 340px;
  }
}

@media (max-width: 700px) {
  .weighing-management-view {
    width: min(100% - 20px, 1700px);
  }

  .weighing-ticket-delivery,
  .weighing-delivery-form {
    grid-template-columns: 1fr;
  }

  .weighing-ticket-delivery .btn {
    width: 100%;
  }

  .weighing-search-form {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "title menu"
      "search search"
      "submit clear";
  }

  .weighing-search-form > .btn {
    width: 100%;
  }

  .weighing-ticket-detail-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .weighing-ticket-detail-actions,
  .weighing-ticket-detail-actions .btn {
    width: 100%;
  }

  .weighing-edit-form,
  .weighing-edit-preview {
    grid-template-columns: 1fr;
  }

  .weighing-edit-form > .form-message,
  .weighing-edit-preview,
  .weighing-modal-actions {
    grid-column: 1;
  }

  .weighing-modal {
    padding: 8px;
  }

  .weighing-modal-card {
    max-height: calc(100vh - 16px);
    padding: 16px;
  }
}

.directory-page {
  background:
    radial-gradient(circle at top left, rgba(43, 199, 255, 0.08), transparent 34rem),
    #000000;
}

.directory-view {
  width: min(1180px, 100%);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 14px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 12px;
}

.directory-header {
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  background: linear-gradient(180deg, #151515, #090909);
}

.directory-title {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.directory-title h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  line-height: 1.05;
}

.directory-header-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.global-price-open-btn {
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid #286f93;
  border-radius: 8px;
  color: #aee7ff;
  background: #071723;
  font: inherit;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.global-price-open-btn:hover,
.global-price-open-btn:focus-visible {
  border-color: var(--primary);
  background: #0b2232;
}

.global-price-open-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.directory-tabs {
  width: min(440px, 100%);
  padding: 6px;
  border: 1px solid #2e4464;
  border-radius: 12px;
  background: #0f1c31;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.directory-tab {
  min-width: 0;
  min-height: 46px;
  border: 1px solid #3a5478;
  border-radius: 10px;
  background: #13233a;
  color: #d6e7ff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.directory-tab svg,
.directory-btn svg,
.directory-search svg,
.directory-record-icon svg,
.directory-record-action svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.directory-tab.is-active {
  border-color: #66c9ff;
  background: linear-gradient(180deg, #2f95c8, #2178a4);
  color: #f2fbff;
}

.directory-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.directory-stat {
  min-height: 82px;
  padding: 12px;
  display: grid;
  align-content: center;
  gap: 4px;
  background: linear-gradient(180deg, #111a2b, #0b101c);
}

.directory-stat span {
  color: #9eb8dc;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.directory-stat strong {
  color: #ffffff;
  font-size: 2rem;
  line-height: 1;
}

.directory-stat-accent {
  border-color: rgba(255, 208, 42, 0.5);
  background: linear-gradient(180deg, #171304, #090909);
}

.directory-stat-accent strong {
  color: var(--secondary);
}

.directory-workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 12px;
}

.directory-form-panel {
  padding: 14px;
  align-self: start;
  display: grid;
  gap: 10px;
}

.directory-edit-badge {
  border: 1px solid rgba(255, 208, 42, 0.52);
  border-radius: 8px;
  padding: 5px 8px;
  color: var(--secondary);
  background: #171304;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.directory-form {
  display: grid;
  gap: 12px;
}

.directory-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.directory-field-wide {
  grid-column: 1 / -1;
}

.directory-form-grid > [hidden] {
  display: none !important;
}

.directory-checkbox-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 44px;
  padding: 0.65rem 0.8rem;
  border: 1px solid #3a5478;
  border-radius: 10px;
  color: #d6e7ff;
  background: #0b101c;
  font-weight: 700;
  cursor: pointer;
}

.directory-checkbox-option input {
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
  accent-color: #2f95c8;
}

.directory-form-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, auto)) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.directory-global-modal {
  z-index: 180;
}

.directory-global-modal-card {
  width: min(560px, calc(100vw - 16px));
  width: min(560px, calc(100dvw - 16px));
  max-height: calc(100vh - 16px);
  max-height: calc(100dvh - 16px);
  border: 1px solid #2f4464;
  border-radius: 10px;
  background: linear-gradient(180deg, #0f1a2c, #090f19);
  padding: 16px;
  display: grid;
  gap: 12px;
  overflow: auto;
}

.directory-global-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.directory-global-head h2,
.directory-global-head h3 {
  margin: 0;
  color: #f0f5ff;
  font-size: 1.15rem;
  line-height: 1.15;
}

.directory-modal-close {
  width: 40px;
  height: 40px;
  border: 1px solid #4e4e4e;
  border-radius: 8px;
  background: #0b0b0b;
  color: var(--text-main);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.directory-modal-close:hover,
.directory-modal-close:focus-visible {
  border-color: var(--secondary);
  background: #191919;
}

.directory-global-grid,
.directory-global-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.directory-global-actions .btn {
  min-width: 0;
}

.directory-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: normal;
}

.directory-list-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
}

.directory-list-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
  gap: 10px;
  align-items: end;
}

.directory-list-toolbar h2 {
  margin: 0;
  color: #f0f5ff;
  font-size: 1.2rem;
}

.directory-search {
  position: relative;
  display: grid;
  align-items: center;
}

.directory-search svg {
  position: absolute;
  left: 12px;
  color: #7ec0ff;
  pointer-events: none;
}

.directory-search input {
  padding-left: 42px;
}

.directory-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  align-content: start;
  gap: 10px;
  padding-right: 2px;
}

.directory-record {
  position: relative;
  min-width: 0;
  padding: 12px;
  display: grid;
  gap: 10px;
  background: linear-gradient(180deg, #111a2b, #090f19);
}

.directory-record-head {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.directory-record-icon {
  width: 42px;
  height: 42px;
  border: 1px solid #2f82a8;
  border-radius: 10px;
  color: var(--primary);
  background: #061018;
  display: grid;
  place-items: center;
}

.directory-record-head strong {
  display: block;
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.directory-record-head small {
  display: block;
  margin-top: 3px;
  color: #9eb8dc;
  font-size: 0.78rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.directory-record-tag {
  border: 1px solid #5b522b;
  border-radius: 8px;
  color: var(--secondary);
  background: #151207;
  padding: 5px 8px;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.directory-address {
  min-height: 38px;
  margin: 0;
  border: 1px solid #263b5a;
  border-radius: 8px;
  background: #0e1727;
  color: #c9daf2;
  padding: 8px 10px;
  font-size: 0.86rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.directory-prices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.directory-price {
  min-width: 0;
  border: 1px solid #343f54;
  border-radius: 8px;
  background: #070b12;
  padding: 8px;
  display: grid;
  gap: 3px;
}

.directory-price span {
  color: #8fa8c9;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.directory-price strong {
  color: #f8dd5a;
  font-size: 0.92rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.directory-record-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.directory-record-action {
  width: 42px;
  height: 42px;
  border: 1px solid #3a567c;
  border-radius: 10px;
  background: #10243f;
  color: #c8defc;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.directory-record-action:hover,
.directory-record-action:focus-visible {
  border-color: #67a7ff;
  background: #173258;
}

.directory-record-action-danger {
  border-color: rgba(255, 91, 91, 0.44);
  color: #ffb3b3;
  background: #2a1010;
}

.directory-record-action-danger:hover,
.directory-record-action-danger:focus-visible {
  border-color: #ff8f8f;
  background: #421616;
}

.directory-record-action-danger.is-confirming {
  border-color: #ffb1b1;
  color: #ffe2e2;
  background: #5c1d1d;
  box-shadow: inset 0 0 0 1px rgba(255, 177, 177, 0.22);
}

.directory-empty {
  min-height: 180px;
  border: 1px dashed #3f5477;
  border-radius: 10px;
  background: #0e1727;
  color: #9eb8dc;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  padding: 18px;
  text-align: center;
}

.directory-empty strong {
  color: #ffffff;
  font-size: 1rem;
}

.directory-empty span {
  font-size: 0.88rem;
  font-weight: 700;
}

body[data-directory-view="proveedores"] .directory-tab.is-active,
.directory-view[data-directory-view="proveedores"] .directory-tab.is-active {
  border-color: rgba(255, 208, 42, 0.75);
  background: linear-gradient(180deg, #bd8b17, #815d10);
}

.directory-view[data-directory-view="proveedores"] .directory-record-icon {
  border-color: #5b522b;
  color: var(--secondary);
}

@media (max-width: 920px) {
  .directory-workspace,
  .directory-header,
  .directory-list-toolbar {
    grid-template-columns: 1fr;
  }

  .directory-header-actions {
    justify-content: flex-start;
  }

  .directory-header .menu-return-btn {
    justify-self: start;
  }

  .directory-list {
    overflow: visible;
  }
}

@media (max-width: 640px) {
  .directory-view {
    padding: 10px;
  }

  .directory-stats,
  .directory-form-grid,
  .directory-form-actions,
  .directory-global-grid,
  .directory-global-actions,
  .directory-prices {
    grid-template-columns: 1fr;
  }

  .directory-tabs {
    width: 100%;
  }

  .directory-header-actions,
  .global-price-open-btn,
  .directory-header .menu-return-btn {
    width: 100%;
  }

  .directory-list {
    grid-template-columns: 1fr;
  }

  .type-switch {
    grid-template-columns: 1fr;
  }
}

.daily-provider-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.daily-provider-actions .btn {
  width: 100%;
  min-height: 46px;
  display: grid;
  place-items: center;
  text-align: center;
}

html.journey-root,
body.journey-page {
  height: auto;
  min-height: 100%;
  overflow: auto;
}

.journey-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(23, 123, 195, 0.16), transparent 34rem),
    #070b12;
}

.journey-shell {
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 18px;
  display: grid;
  gap: 14px;
}

.journey-hero {
  padding: 18px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.journey-hero h1 {
  margin: 2px 0 6px;
  color: #ffffff;
}

.journey-hero p:last-child {
  margin: 0;
  color: #a9bdd8;
  font-weight: 700;
}

.journey-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.journey-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.journey-summary-card {
  padding: 14px;
  display: grid;
  gap: 6px;
}

.journey-summary-card span {
  color: #8fa8c9;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.journey-summary-card strong {
  color: #ffffff;
  font-size: 1rem;
}

.journey-workspace {
  min-width: 0;
  padding: 14px;
}

.journey-global-prices {
  padding: 16px;
  display: grid;
  gap: 14px;
}

.journey-global-prices-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

.journey-global-prices-head h2 {
  margin: 2px 0 0;
  color: #ffffff;
}

.journey-global-prices-head > p {
  max-width: 620px;
  margin: 0;
  color: #a9bdd8;
  font-size: 0.84rem;
  font-weight: 700;
  text-align: right;
}

.journey-global-price-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.journey-global-price-grid input {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 900;
}

.journey-ticket-settings input {
  color: #ffffff;
}

.journey-ticket-setting {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.journey-ticket-setting + .journey-ticket-setting {
  padding-top: 14px;
  border-top: 1px solid rgba(169, 189, 216, 0.22);
}

.journey-price-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.journey-price-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
}

.journey-price-actions .journey-message {
  flex: 1;
  margin: 0;
}

.journey-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  align-items: end;
  gap: 12px;
}

.journey-search {
  display: grid;
  gap: 6px;
  color: #c8d7eb;
  font-size: 0.82rem;
  font-weight: 900;
}

.journey-search input {
  width: 100%;
}

.journey-select-all {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #d9e7f8;
  font-weight: 800;
}

.journey-select-all input,
.journey-truck-check {
  width: 22px;
  height: 22px;
  accent-color: #29b765;
  cursor: pointer;
}

.journey-message {
  min-height: 22px;
  margin: 10px 0;
  color: #8ed9ae;
  font-weight: 800;
}

.journey-message.is-error {
  color: #ff9b9b;
}

.journey-table-wrap {
  max-height: calc(100vh - 310px);
  min-height: 280px;
  overflow: auto;
  border: 1px solid #263b5a;
  border-radius: 12px;
}

.journey-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #09111d;
}

.journey-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 11px;
  border-bottom: 1px solid #365176;
  background: #111e31;
  color: #d9e7f8;
  text-align: left;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.journey-table th small {
  display: block;
  margin-top: 2px;
  color: #88a3c7;
  font-size: 0.66rem;
}

.journey-table td {
  padding: 10px 11px;
  border-bottom: 1px solid #1e2d43;
  color: #dce8f7;
  vertical-align: middle;
}

.journey-table tr:last-child td {
  border-bottom: 0;
}

.journey-truck-row {
  transition: background 120ms ease, box-shadow 120ms ease;
}

.journey-truck-row:hover {
  background: #0f1c2e;
}

.journey-truck-row.is-selected {
  background: rgba(31, 135, 79, 0.14);
  box-shadow: inset 4px 0 #29b765;
}

.journey-table td small {
  display: block;
  margin-top: 3px;
  color: #91a9c8;
  font-size: 0.74rem;
  font-weight: 700;
}

.journey-provider-name {
  display: block;
  min-width: 220px;
  color: #ffffff;
}

.journey-plate {
  display: inline-block;
  border: 1px solid #49698f;
  border-radius: 7px;
  padding: 5px 8px;
  background: #070b12;
  color: #f8dd5a;
  letter-spacing: 0.08em;
}

.journey-check-cell {
  width: 70px;
  text-align: center;
}

.journey-loading {
  height: 220px;
  color: #9eb8dc !important;
  text-align: center;
  font-weight: 800;
}

@media (max-width: 980px) {
  .journey-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .journey-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .journey-global-price-grid {
    grid-template-columns: 1fr;
  }

  .journey-search {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .journey-shell {
    padding: 10px;
  }

  .journey-hero,
  .journey-header-actions,
  .journey-global-prices-head {
    align-items: stretch;
    flex-direction: column;
  }

  .journey-summary,
  .journey-toolbar {
    grid-template-columns: 1fr;
  }

  .journey-header-actions .btn,
  .journey-header-actions .menu-return-btn,
  .journey-toolbar .btn {
    width: 100%;
  }

  .journey-global-prices-head > p {
    text-align: left;
  }

  .journey-table-wrap {
    max-height: none;
  }

  .daily-provider-head,
  .daily-provider-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

.java-control-page .java-receipt-form input,
.java-control-page .java-receipt-form select,
.java-control-page .java-receipt-form textarea,
.java-control-page .java-history-filter select {
  border-color: #354c6c;
  background: #080e18;
  color: #ffffff;
}

/* Informe diario de javas y bandejas por ubicación */
.java-summary.java-company-summary.java-summary-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.java-count-journey,
.java-inventory-settings,
.java-daily-control-head,
.java-daily-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.java-count-journey {
  padding: 16px 18px;
  border-left: 5px solid #4f9ae8;
}

.java-count-journey > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.java-count-journey-controls {
  display: flex;
  flex: 0 1 auto;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 12px;
}

.java-count-journey-controls .java-journey-filter {
  min-width: min(330px, 40vw);
}

.java-count-journey strong,
.java-count-journey small {
  display: block;
}

.java-count-journey > div > strong {
  color: #fff;
  font-size: 18px;
}

.java-count-journey small {
  margin-top: 5px;
  color: #91a9c8;
}

.java-count-state {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid #5e6370;
  border-radius: 999px;
  background: rgba(120, 126, 139, .12);
  color: #c8d0dc;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.java-count-state.is-counted {
  border-color: #278b5a;
  background: rgba(42, 182, 110, .12);
  color: #82dfaa;
}

.java-count-state.is-stale {
  border-color: #b47c24;
  background: rgba(240, 174, 32, .12);
  color: #f8dd5a;
}

.java-inventory-open:disabled,
.java-daily-actions .btn:disabled {
  opacity: .52;
  cursor: not-allowed;
}

.java-summary-card .java-inline-number {
  display: inline;
  margin: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

.java-inventory-settings {
  padding: 18px 20px;
  border-top: 4px solid #f0ae20;
}

.java-inventory-settings h2,
.java-holder-heading h2,
.java-daily-control h2,
.java-reconciliation h3 {
  margin: 0;
  color: #fff;
}

.java-inventory-settings p:not(.eyebrow),
.java-holder-heading > p,
.java-daily-control-head p:not(.eyebrow) {
  margin: 7px 0 0;
  color: #91a9c8;
}

.java-holder-section,
.java-daily-control {
  padding: 20px;
}

.java-holder-heading {
  align-items: flex-end;
}

.java-holder-heading > p {
  max-width: 520px;
  text-align: right;
}

.java-holder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.java-holder-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #335577;
  border-radius: 12px;
  background: rgba(9, 18, 31, .72);
}

.java-holder-panel.is-internal {
  border-color: #5f5433;
  background: rgba(55, 42, 15, .15);
}

.java-holder-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #293e5d;
}

.java-holder-panel > header strong,
.java-holder-panel > header span {
  display: block;
}

.java-holder-panel > header strong {
  margin-top: 3px;
  color: #fff;
}

.java-holder-kind {
  color: #72baff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.java-holder-panel.is-internal .java-holder-kind { color: #f8dd5a; }

.java-holder-count {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: #15263c;
  color: #cfe6ff;
  font-size: 11px;
  font-weight: 900;
}

.java-holder-totals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 16px;
}

.java-holder-totals > span {
  padding: 9px 11px;
  border: 1px solid #2a405e;
  border-radius: 9px;
  background: #080f1a;
}

.java-holder-totals small,
.java-holder-totals strong,
.java-holder-asset small,
.java-holder-asset strong {
  display: block;
}

.java-holder-totals small,
.java-holder-asset small {
  color: #8298b5;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.java-holder-totals strong {
  margin-top: 3px;
  color: #fff;
  font-size: 22px;
}

.java-holder-list {
  max-height: 300px;
  overflow: auto;
  border-top: 1px solid #293e5d;
}

.java-holder-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px 82px;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid rgba(41, 62, 93, .72);
}

.java-holder-row:last-child { border-bottom: 0; }
.java-holder-client { min-width: 0; }

.java-holder-client strong,
.java-holder-client small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.java-holder-client strong { color: #eef5ff; }
.java-holder-client small { margin-top: 3px; color: #8298b5; font-size: 11px; }
.java-holder-client em { color: #ffb26f; font-style: normal; font-weight: 800; }
.java-holder-asset { text-align: right; }
.java-holder-asset strong { margin-top: 2px; color: #f8dd5a; font-size: 17px; }

.java-holder-empty {
  margin: 0;
  padding: 24px 16px;
  color: #8298b5;
  text-align: center;
}

.java-daily-control {
  border-top: 4px solid #4f9ae8;
}

.java-daily-control-head {
  align-items: flex-start;
}

.java-daily-form {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.java-daily-entry-grid {
  display: grid;
  grid-template-columns: minmax(280px, .72fr) minmax(0, 1.55fr);
  gap: 14px;
}

.java-daily-local-panel,
.java-daily-truck-panel {
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid #304d70;
  border-radius: 12px;
  background: rgba(10, 20, 34, .78);
}

.java-daily-local-panel legend,
.java-daily-truck-panel legend {
  padding: 0 7px;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.java-daily-local-panel > p,
.java-daily-truck-panel > p {
  min-height: 38px;
  margin: 0 0 14px;
  color: #91a9c8;
  font-size: 12px;
  line-height: 1.5;
}

.java-control-page .java-daily-form input {
  width: 100%;
  border: 1px solid #354c6c;
  border-radius: 8px;
  background: #080e18;
  color: #fff;
}

.java-control-page .java-daily-form input:focus {
  outline: 2px solid rgba(79, 154, 232, .45);
  border-color: #65b1ff;
}

.java-control-page .java-daily-form input:disabled {
  opacity: .52;
  cursor: not-allowed;
}

.java-daily-truck-viewport {
  max-height: 340px;
  overflow: auto;
}

.java-daily-truck-table th,
.java-daily-truck-table td {
  vertical-align: middle;
}

.java-daily-truck-table th:first-child { min-width: 140px; }
.java-daily-truck-table th:nth-child(2),
.java-daily-truck-table th:nth-child(3) { min-width: 150px; }
.java-truck-count-input { min-width: 105px; padding: 9px 10px; }

.java-truck-company-label {
  display: block;
  margin-top: 3px;
  color: #8298b5;
  font-size: 10px;
}

.java-truck-count-state {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(125, 135, 150, .13);
  color: #aeb9c9;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.java-truck-count-state.is-recorded {
  background: rgba(42, 182, 110, .13);
  color: #82dfaa;
}

.java-reconciliation {
  overflow: hidden;
  border: 1px solid #3a5678;
  border-radius: 12px;
  background: #080f19;
}

.java-reconciliation-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 17px;
  border-bottom: 1px solid #293e5d;
  background: rgba(30, 56, 86, .28);
}

.java-reconciliation-head > p {
  max-width: 560px;
  margin: 0;
  color: #a9bdd8;
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.java-reconciliation-rows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.java-reconciliation-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 11px 16px;
  border-right: 1px solid #253a56;
  border-bottom: 1px solid #253a56;
}

.java-reconciliation-row:nth-child(2n) { border-right: 0; }
.java-reconciliation-row > span:first-child strong,
.java-reconciliation-row > span:first-child small { display: block; }
.java-reconciliation-row > span:first-child strong { color: #eef5ff; }
.java-reconciliation-row > span:first-child small { margin-top: 3px; color: #8298b5; font-size: 10px; }

.java-reconciliation-assets {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(58px, 1fr));
  gap: 6px;
}

.java-reconciliation-assets > span {
  min-width: 64px;
  padding: 6px 8px;
  border: 1px solid #2b4260;
  border-radius: 8px;
  background: #060b13;
  text-align: right;
}

.java-reconciliation-assets small,
.java-reconciliation-assets strong { display: block; }
.java-reconciliation-assets small { color: #8298b5; font-size: 9px; font-weight: 850; text-transform: uppercase; }
.java-reconciliation-assets strong { margin-top: 2px; color: #fff; font-size: 18px; }
.java-reconciliation-assets strong.is-negative-stock { color: #ff7d7d; }
.java-reconciliation-assets strong.is-positive-stock { color: #82dfaa; }

.java-reconciliation-row.is-primary {
  background: rgba(79, 154, 232, .09);
}

.java-reconciliation-row.is-difference {
  background: rgba(240, 174, 32, .08);
}

.java-reconciliation-row.is-accounted {
  background: rgba(42, 182, 110, .09);
}

.java-daily-actions {
  padding-top: 2px;
}

.java-daily-actions p {
  margin: 0;
  color: #91a9c8;
  font-size: 12px;
}

.java-daily-actions .btn {
  flex: 0 0 auto;
  min-height: 44px;
}

@media (max-width: 1050px) {
  .java-count-journey {
    align-items: stretch;
    flex-direction: column;
  }

  .java-count-journey-controls {
    width: 100%;
    justify-content: space-between;
  }

  .java-count-journey-controls .java-journey-filter {
    flex: 1 1 auto;
    min-width: 0;
  }

  .java-summary.java-company-summary.java-summary-four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .java-daily-entry-grid,
  .java-holder-grid {
    grid-template-columns: 1fr;
  }

  .java-daily-local-panel > p,
  .java-daily-truck-panel > p {
    min-height: 0;
  }
}

@media (max-width: 720px) {
  .java-summary.java-company-summary.java-summary-four {
    grid-template-columns: 1fr;
  }

  .java-count-journey,
  .java-inventory-settings,
  .java-daily-control-head,
  .java-daily-actions,
  .java-holder-heading,
  .java-reconciliation-head {
    align-items: stretch;
    flex-direction: column;
  }

  .java-holder-heading > p,
  .java-reconciliation-head > p {
    max-width: none;
    text-align: left;
  }

  .java-count-state {
    align-self: flex-start;
  }

  .java-count-journey-controls {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .java-count-journey-controls .java-journey-filter {
    width: 100%;
    min-width: 0;
  }

  .java-holder-section,
  .java-daily-control {
    padding: 16px;
  }

  .java-holder-row {
    grid-template-columns: minmax(0, 1fr) 58px 68px;
    padding-inline: 12px;
  }

  .java-daily-local-panel,
  .java-daily-truck-panel {
    padding: 13px;
  }

  .java-daily-truck-viewport {
    max-height: none;
  }

  .java-daily-truck-table .java-truck-count-input {
    min-width: 0;
  }

  .java-reconciliation-rows {
    grid-template-columns: 1fr;
  }

  .java-reconciliation-row,
  .java-reconciliation-row:nth-child(2n) {
    border-right: 0;
  }

  .java-reconciliation-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .java-reconciliation-assets {
    width: 100%;
  }

  .java-reconciliation-assets > span {
    text-align: left;
  }

  .java-daily-actions .btn {
    width: 100%;
  }
}
