*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: #0f1419;
  color: #e7e9ea;
}

#app-root {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100vh;
  padding-bottom: 64px;
}

#view-outlet {
  flex: 1;
  overflow: auto;
  padding: 1rem;
}

.app-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.25rem calc(0.5rem + env(safe-area-inset-bottom));
  background: #16181c;
  border-top: 1px solid #2f3336;
  z-index: 100;
}

.app-nav button {
  flex: 1;
  max-width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.25rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #71767b;
  font-size: 0.65rem;
  cursor: pointer;
}

.app-nav button:hover,
.app-nav button:focus-visible {
  background: #1d9bf01a;
  color: #1d9bf0;
  outline: none;
}

.app-nav button.active {
  color: #1d9bf0;
}

.app-nav button svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-nav button.nav-exit {
  color: #f4212e;
}

.app-nav button.nav-exit:hover,
.app-nav button.nav-exit:focus-visible {
  color: #ff6b6b;
}

.view-title {
  margin: 0 0 1rem;
  font-size: 1.35rem;
}

.view-actions {
  margin-bottom: 1rem;
}

.view-actions button {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid #2f3336;
  background: #16181c;
  color: #e7e9ea;
  cursor: pointer;
  font-size: 0.875rem;
}

.view-actions button:hover {
  border-color: #1d9bf0;
  color: #1d9bf0;
}

/* Window manager */
.win-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
}

.win-layer > * {
  pointer-events: auto;
}

.win-box {
  position: fixed;
  min-width: 240px;
  min-height: 120px;
  max-width: min(90vw, 480px);
  background: #16181c;
  border: 1px solid #2f3336;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.win-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  background: #1c2128;
  border-bottom: 1px solid #2f3336;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.win-titlebar:active {
  cursor: grabbing;
}

.win-title {
  font-size: 0.875rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.win-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #71767b;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.win-close:hover {
  background: #f4212e33;
  color: #f4212e;
}

.win-body {
  padding: 0.75rem 1rem;
  overflow: auto;
  flex: 1;
  font-size: 0.875rem;
  color: #c4c7c9;
}

/* Login */
.login-view {
  max-width: 400px;
  margin: 2rem auto;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.login-field label {
  font-size: 0.875rem;
  color: #71767b;
}

.login-field input {
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #2f3336;
  background: #00000033;
  color: #e7e9ea;
  font-size: 1rem;
}

.login-field input:focus {
  outline: none;
  border-color: #1d9bf0;
}

.login-error {
  min-height: 1.25rem;
  font-size: 0.875rem;
  color: #f4212e;
}

.login-submit {
  padding: 0.65rem 1rem;
  border-radius: 8px;
  border: none;
  background: #1d9bf0;
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
}

.login-submit:hover:not(:disabled) {
  background: #1a8cd8;
}

.login-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ship-controls {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.ship-search,
.ship-per-page {
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid #2f3336;
  background: #00000033;
  color: #e7e9ea;
}

.ship-search {
  min-width: 320px;
  flex: 1;
}

.ship-status {
  margin-bottom: 0.75rem;
  color: #c4c7c9;
  font-size: 0.875rem;
}

.ship-table-wrap {
  overflow: auto;
  border: 1px solid #2f3336;
  border-radius: 8px;
}

.ship-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1200px;
}

.ship-table th,
.ship-table td {
  border-bottom: 1px solid #2f3336;
  padding: 0.5rem 0.6rem;
  text-align: left;
  font-size: 0.8125rem;
  white-space: nowrap;
}

.ship-table th {
  background: #1c2128;
  position: sticky;
  top: 0;
}

.ship-view-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.ship-view-heading .view-title {
  margin: 0;
}

.ship-create-btn {
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  border: 1px solid #2f3336;
  background: #16181c;
  color: #1d9bf0;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
}

.ship-create-btn:hover {
  border-color: #1d9bf0;
  background: #1a2630;
}

.ship-edit-link {
  color: #1d9bf0;
  text-decoration: underline;
  cursor: pointer;
  white-space: nowrap;
}

.ship-edit-link:hover {
  color: #1a8cd8;
}

.ship-flag-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.ship-table td.ship-table-flags-cell {
  text-align: center;
  vertical-align: middle;
}

.ship-table th.ship-table-flags-head {
  text-align: center;
}

.ship-flag-dot {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  border: 1px solid transparent;
}

.ship-flag-dot--ok {
  background: #1c9b49;
  border-color: #23c15b;
}

.ship-flag-dot--pending {
  background: #b21c28;
  border-color: #df3b48;
}

.ship-flag-dot--warning {
  background: #b98a00;
  border-color: #f3c623;
}

.ship-edit-root {
  flex-direction: column;
  align-items: stretch;
  max-height: min(70vh, 560px);
  overflow: auto;
}

.ship-edit-top-tools {
  display: block;
  position: relative;
  overflow: visible;
  margin-bottom: 0.6rem;
}

.ship-edit-top-tools::after {
  content: '';
  display: table;
  clear: both;
}

.ship-edit-menu {
  position: relative;
  float: right;
  margin-right: 1rem;
}

.ship-edit-menu summary::-webkit-details-marker {
  display: none;
}

.ship-edit-menu summary::marker {
  display: none;
  content: '';
}

.ship-edit-menu-trigger {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 8px;
  border: 1px solid #3d3558;
  background: #221d32;
  color: #d8d3ee;
  cursor: pointer;
  font-size: 1.5rem;
  font-weight: 700;
  user-select: none;
  line-height: 1;
}

.ship-edit-menu-trigger-icon {
  display: inline-block;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
}

.ship-edit-menu[open] .ship-edit-menu-trigger,
.ship-edit-menu-trigger:hover {
  border-color: #e36414;
  color: #fff7f2;
}

.ship-edit-menu-panel {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 0.35rem;
  min-width: 10.5rem;
  z-index: 1200;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.45rem;
  border-radius: 10px;
  border: 1px solid #3d3558;
  background: #1a1628;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.ship-edit-menu[open] .ship-edit-menu-panel {
  display: flex;
}

.ship-edit-menu-item {
  border: 1px solid #4f4a69;
  background: #2a253b;
  color: #e7e9ea;
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  text-align: left;
  font-size: 0.8rem;
  cursor: pointer;
}

.ship-edit-menu-item:hover:not(:disabled) {
  border-color: #e36414;
  color: #fff7f2;
}

.ship-edit-menu-item:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ship-create-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.4rem;
  padding: 0.6rem 0;
  border-top: 1px solid #3d3558;
  background: linear-gradient(180deg, rgba(22, 19, 31, 0.75) 0%, #16131f 42%);
}

.ship-create-status {
  min-height: 1rem;
  font-size: 0.78rem;
  color: #c4c7c9;
}

/* Encabezado envío (creador, correo, fecha, estado) — alineado arriba-izquierda */
.ship-edit-header-wrap {
  align-self: flex-start;
  max-width: min(100%, 22rem);
  margin-bottom: 1rem;
  padding: 0.95rem 1.05rem 1rem;
  border-radius: 10px;
  border: 1px solid #4a4470;
  background: linear-gradient(165deg, #2f2a45 0%, #262140 55%, #221d36 100%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.ship-edit-header-title {
  margin: 0 0 0.7rem;
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.2;
  color: #c8c0e0;
  letter-spacing: 0.01em;
}

.ship-edit-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.45rem;
  margin-bottom: 0.4rem;
  font-size: 0.875rem;
  line-height: 1.4;
}

.ship-edit-header-row:last-child {
  margin-bottom: 0;
}

.ship-edit-header-row--stack {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
}

.ship-edit-header-label {
  font-weight: 600;
  color: #9b94b8;
}

.ship-edit-header-value {
  color: #e7e9ea;
  font-weight: 400;
}

.ship-edit-header-datebox {
  display: inline-block;
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  background: #32304a;
  border: 1px solid #4d4a68;
  color: #e7e9ea;
  font-size: 0.875rem;
  font-weight: 400;
}

/* Resumen remitente / destinatario (ventana de envío) */
.ship-edit-banner {
  margin-bottom: 1.1rem;
  padding: 0.9rem 1rem 1rem;
  border-radius: 10px;
  border: 1px solid #3d3558;
  background: linear-gradient(145deg, #1a1628 0%, #221d32 48%, #1e1a2e 100%);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.ship-edit-banner-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
  align-items: start;
}

@media (max-width: 640px) {
  .ship-edit-banner-inner {
    grid-template-columns: 1fr;
  }
}

.ship-edit-banner-col {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.ship-edit-banner-row {
  display: grid;
  grid-template-columns: minmax(7.5rem, 40%) 1fr;
  gap: 0.35rem 0.65rem;
  align-items: baseline;
  font-size: 0.8125rem;
  line-height: 1.35;
}

.ship-edit-banner-label {
  font-weight: 600;
  color: #a89fc9;
  word-break: break-word;
}

.ship-edit-banner-value {
  color: #e7e9ea;
  word-break: break-word;
  white-space: pre-wrap;
}

.ship-edit-loading,
.ship-edit-empty {
  margin: 0;
  color: #71767b;
  font-size: 0.8125rem;
}

.ship-edit-section {
  margin-bottom: 1.1rem;
}

.ship-edit-section:last-child {
  margin-bottom: 0;
}

.ship-edit-section h3 {
  margin: 0 0 0.45rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #e7e9ea;
}

.ship-edit-sub {
  margin: 0.5rem 0 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #c4c7c9;
}

.ship-edit-dl {
  display: grid;
  grid-template-columns: minmax(7rem, 32%) 1fr;
  gap: 0.2rem 0.65rem;
  font-size: 0.8125rem;
  margin: 0;
}

.ship-edit-dl dt {
  margin: 0;
  color: #71767b;
  word-break: break-word;
}

.ship-edit-dl dd {
  margin: 0;
  color: #c4c7c9;
  word-break: break-word;
  white-space: pre-wrap;
}

/* Factura (ventana envío): barra lateral naranja, fondo lavanda oscuro */
.ship-edit-section--invoice {
  margin-bottom: 1.1rem;
}

.ship-inv-shell {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  border: 1px solid #3d3558;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(165deg, #2a2640 0%, #242038 50%, #1f1c32 100%);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.ship-inv-rail {
  flex: 0 0 2.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.15rem;
  background: linear-gradient(180deg, #e36414 0%, #c2410c 100%);
  color: #1a0f0a;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-transform: uppercase;
  user-select: none;
}

.ship-inv-body {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 0.85rem 0.9rem;
}

.ship-inv-top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.55rem;
}

.ship-inv-headline {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #e7e9ea;
  text-align: right;
}

.ship-inv-headline--muted {
  color: #9b94b8;
  font-weight: 500;
}

.ship-inv-btn {
  border: none;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.4rem 0.75rem;
}

.ship-inv-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ship-inv-btn--add {
  margin-bottom: 0.55rem;
  background: #2f855a;
  color: #fff;
}

.ship-inv-btn--add:hover:not(:disabled) {
  background: #276749;
}

.ship-inv-btn--action {
  background: #2f855a;
  color: #fff;
  padding: 0.38rem 0.55rem;
  font-size: 0.75rem;
}

.ship-inv-btn--action:hover:not(:disabled) {
  background: #276749;
}

.ship-inv-warning {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  color: #fbbf24;
}

.ship-inv-rows {
  margin-bottom: 0.65rem;
}

.ship-inv-line {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.45rem 0.6rem;
  margin-bottom: 0.55rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid #3d3558;
}

.ship-inv-line:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.ship-inv-remove {
  flex: 0 0 auto;
  width: 1.75rem;
  height: 1.75rem;
  margin-bottom: 0.1rem;
  border: 1px solid #5c3d3d;
  border-radius: 6px;
  background: transparent;
  color: #f87171;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  align-self: center;
}

.ship-inv-remove:hover:not(:disabled) {
  background: #f8717122;
}

.ship-inv-remove:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.ship-inv-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.ship-inv-field-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #9b94b8;
}

.ship-inv-field--item {
  flex: 1 1 11rem;
  min-width: 8rem;
}

.ship-inv-field--qty {
  flex: 0 0 4.25rem;
}

.ship-inv-field--unit {
  flex: 0 0 5.25rem;
}

.ship-inv-field--sub {
  flex: 0 0 4.75rem;
}

.ship-inv-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  border: 1px solid #4d4a68;
  background: #16131f;
  color: #e7e9ea;
  font-size: 0.8125rem;
}

.ship-inv-input:focus {
  outline: none;
  border-color: #e36414;
}

.ship-inv-input--readonly {
  background: #2e2c42;
  color: #c4c7c9;
}

select.ship-inv-input {
  cursor: pointer;
}

.ship-inv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.ship-inv-total-row {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
}

.ship-inv-total-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #9b94b8;
}

.ship-inv-total-input {
  width: 100%;
  max-width: 12rem;
  text-align: right;
  font-weight: 600;
}

/* Vista previa del correo de factura (ventana flotante) */
.ship-inv-preview-root {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 280px;
  max-height: min(72vh, 640px);
}

.ship-inv-preview-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.35rem 0.4rem;
  border-radius: 8px;
  background: #1f1c32;
  border: 1px solid #3d3558;
}

.ship-inv-preview-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: baseline;
  font-size: 0.8125rem;
}

.ship-inv-preview-meta-label {
  color: #9b94b8;
  font-weight: 600;
  min-width: 9rem;
}

.ship-inv-preview-meta-value {
  color: #e7e9ea;
  word-break: break-all;
  flex: 1;
  min-width: 0;
}

.ship-inv-preview-meta-value--muted {
  font-weight: 500;
  color: #c4c7c9;
}

.ship-inv-preview-frame {
  flex: 1;
  width: 100%;
  min-height: 240px;
  height: min(48vh, 420px);
  border: 1px solid #3d3558;
  border-radius: 8px;
  background: #ffffff;
}

.ship-inv-preview-error {
  margin: 0;
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  border: 1px solid #9f1239;
  background: rgba(159, 18, 57, 0.15);
  color: #fecaca;
  font-size: 0.8125rem;
  line-height: 1.35;
}

.ship-inv-preview-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  padding-top: 0.25rem;
}

.ship-inv-preview-btn-exit {
  background: #4a4558 !important;
  color: #e7e9ea !important;
}

.ship-inv-preview-btn-exit:hover:not(:disabled) {
  background: #5e5870 !important;
}

/* Origen (ventana envío): misma idea que factura, rejilla 3 columnas */
.ship-edit-section--origin {
  margin-bottom: 1.1rem;
}

.ship-origin-shell {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  border: 1px solid #3d3558;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(165deg, #2a2640 0%, #242038 50%, #1f1c32 100%);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.ship-origin-rail {
  flex: 0 0 2.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.15rem;
  background: linear-gradient(180deg, #e36414 0%, #c2410c 100%);
  color: #1a0f0a;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-transform: none;
  user-select: none;
}

.ship-origin-body {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 0.85rem 0.9rem;
}

.ship-origin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.55rem 1rem;
  align-items: start;
}

@media (max-width: 720px) {
  .ship-origin-grid {
    grid-template-columns: 1fr;
  }
}

/* Destino: misma rejilla 3×4, celdas planas (sin subcolumnas) */
.ship-dest-form-grid {
  grid-template-columns: 1fr 1fr 1fr;
}

.ship-dest-form-grid .ship-origin-field--wide .ship-origin-input {
  width: 100%;
}

.ship-edit-section--dest {
  margin-bottom: 1.1rem;
}

/* Paquetes (ventana envío) */
.ship-edit-section--pkg {
  margin-bottom: 1.1rem;
}

.ship-pkg-shell {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  border: 1px solid #3d3558;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(165deg, #2a2640 0%, #242038 50%, #1f1c32 100%);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.ship-pkg-rail {
  flex: 0 0 2.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.15rem;
  background: linear-gradient(180deg, #e36414 0%, #c2410c 100%);
  color: #1a0f0a;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-transform: none;
  user-select: none;
}

.ship-pkg-body {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 0.85rem 0.85rem;
}

.ship-pkg-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.45rem;
}

.ship-pkg-toolbar-left {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.ship-pkg-toolbar-right {
  margin-left: auto;
}

.ship-pkg-rate-note {
  font-size: 0.8125rem;
  color: #c4c7c9;
  align-self: center;
}

.ship-pkg-muted {
  color: #71767b;
}

.ship-pkg-fedex-api {
  font-size: 0.8125rem;
  color: #c4c7c9;
  margin-bottom: 0.5rem;
}

.ship-pkg-btn {
  border: none;
  border-radius: 6px;
  padding: 0.38rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  background: #2f855a;
  color: #fff;
}

.ship-pkg-btn:hover:not(:disabled) {
  background: #276749;
}

.ship-pkg-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ship-pkg-block-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: #9b94b8;
  margin: 0.35rem 0 0.2rem;
}

.ship-pkg-input,
.ship-pkg-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  border: 1px solid #4d4a68;
  background: #16131f;
  color: #e7e9ea;
  font-size: 0.8125rem;
  margin-bottom: 0.35rem;
}

.ship-pkg-input--wide {
  max-width: 100%;
}

.ship-pkg-input--readonly {
  background: #2e2c42;
  color: #a8a8b8;
}

.ship-pkg-input:focus,
.ship-pkg-textarea:focus {
  outline: none;
  border-color: #e36414;
}

.ship-pkg-identical {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.25rem 0 0.45rem;
  font-size: 0.8125rem;
  color: #c4c7c9;
}

.ship-pkg-table-wrap {
  overflow: auto;
  border: 1px solid #3d3558;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.ship-pkg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  min-width: 720px;
}

.ship-pkg-table th,
.ship-pkg-table td {
  border-bottom: 1px solid #3d3558;
  padding: 0.35rem 0.4rem;
  text-align: left;
  vertical-align: middle;
}

.ship-pkg-table th {
  background: #1c2128;
  color: #9b94b8;
  font-weight: 600;
}

.ship-pkg-cell-input {
  width: 100%;
  min-width: 3.25rem;
  box-sizing: border-box;
  padding: 0.28rem 0.35rem;
  border-radius: 4px;
  border: 1px solid #4d4a68;
  background: #16131f;
  color: #e7e9ea;
  font-size: 0.75rem;
}

.ship-pkg-cell-input--disabled {
  background: #2e2c42;
  color: #71767b;
}

.ship-pkg-borrar {
  border: none;
  background: none;
  color: #e36414;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 0.15rem;
}

.ship-pkg-borrar:hover:not(:disabled) {
  color: #f97316;
}

.ship-pkg-borrar:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  text-decoration: none;
}

.ship-pkg-summary {
  padding: 0.45rem 0.55rem;
  border: 1px solid #4d4a68;
  border-radius: 6px;
  background: #1a1828;
  font-size: 0.78rem;
  color: #e7e9ea;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.ship-origin-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.ship-origin-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.ship-origin-field--wide .ship-origin-input {
  width: 100%;
}

.ship-origin-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #9b94b8;
}

.ship-origin-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  border: 1px solid #4d4a68;
  background: #16131f;
  color: #e7e9ea;
  font-size: 0.8125rem;
}

.ship-origin-input:focus {
  outline: none;
  border-color: #e36414;
}

select.ship-origin-input {
  cursor: pointer;
}

.ship-origin-city-wrap {
  position: relative;
}

.ship-origin-ac-list {
  position: absolute;
  z-index: 50;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  max-height: 11rem;
  overflow: auto;
  margin: 0;
  padding: 0.2rem 0;
  list-style: none;
  border-radius: 6px;
  border: 1px solid #4d4a68;
  background: #16131f;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.ship-origin-ac-item {
  padding: 0.35rem 0.55rem;
  font-size: 0.8125rem;
  color: #e7e9ea;
  cursor: pointer;
}

.ship-origin-ac-item:hover {
  background: #2a2640;
}

.ship-delete {
  border: 1px solid #f4212e66;
  color: #f4212e;
  background: transparent;
  border-radius: 6px;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
}

.ship-pager {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.8rem;
}

.ship-pager button {
  border: 1px solid #2f3336;
  color: #e7e9ea;
  background: transparent;
  border-radius: 6px;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
}

.release-edit-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.release-edit-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.release-edit-field:last-child {
  grid-column: 1 / -1;
}

.release-scanner-title {
  margin-bottom: 0.6rem;
}

.release-scanner-top {
  display: grid;
  grid-template-columns: minmax(12rem, 24rem) 1fr;
  gap: 0.6rem 0.75rem;
  align-items: end;
  margin-bottom: 0.5rem;
}

.release-scanner-code-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.release-scanner-right {
  justify-self: end;
  align-self: start;
  color: #c4c7c9;
  font-size: 1.1rem;
  font-weight: 700;
}

.release-scanner-totals {
  margin: 0.4rem 0 0.6rem;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  border: 1px solid #3d3558;
  background: #1a1828;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #e7e9ea;
}

.release-scanner-table td input.ship-pkg-cell-input {
  min-width: 9rem;
}

a.ship-create-btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
