/* =========================================================
   NAI HUB · STOCK
   PARTE 1 / 3
   BASE · HEADER · FEEDBACK · KPI · TOOLBAR · TABLA
   ========================================================= */

.stock-location-page {
  width: 100%;
  min-width: 0;
  max-width: 100%;

  --stock-bg: #f5f6f8;

  --stock-surface: #ffffff;
  --stock-surface-soft: #f7f8fa;
  --stock-surface-hover: #f0f2f5;
  --stock-surface-strong: #e9edf2;

  --stock-text: #0b0f14;
  --stock-text-soft: #29313b;
  --stock-muted: #626d7a;

  --stock-border:
    rgba(
      15,
      23,
      42,
      0.10
    );

  --stock-border-strong:
    rgba(
      15,
      23,
      42,
      0.18
    );

  --stock-primary: #111827;
  --stock-primary-hover: #1f2937;
  --stock-primary-contrast: #ffffff;

  --stock-success: #147447;
  --stock-success-soft: #edf8f2;
  --stock-success-border: #c3e4d1;

  --stock-warning: #8b5d11;
  --stock-warning-soft: #fff7e5;
  --stock-warning-border: #ead3a7;

  --stock-danger: #b92f2f;
  --stock-danger-soft: #fdf0f0;
  --stock-danger-border: #edc7c7;

  --stock-info: #35649e;
  --stock-info-soft: #edf4fb;
  --stock-info-border: #c9dbef;

  --stock-shadow:
    0 1px 2px
      rgba(
        15,
        23,
        42,
        0.025
      ),
    0 8px 26px
      rgba(
        15,
        23,
        42,
        0.045
      );

  --stock-shadow-hover:
    0 18px 48px
      rgba(
        15,
        23,
        42,
        0.09
      );

  --stock-modal-shadow:
    0 34px 110px
      rgba(
        15,
        23,
        42,
        0.25
      );

  --stock-radius-xs: 7px;
  --stock-radius-sm: 10px;
  --stock-radius-md: 14px;
  --stock-radius-lg: 18px;
  --stock-radius-xl: 22px;

  --stock-transition:
    200ms
    cubic-bezier(
      0.22,
      1,
      0.36,
      1
    );

  color:
    var(--stock-text);

  font-weight: 680;

  overflow-x: hidden;
}



/* =========================================================
   MODO OSCURO
   ========================================================= */

html[data-theme="dark"]
.stock-location-page,
body[data-theme="dark"]
.stock-location-page {
  --stock-bg: #0b0c0e;

  --stock-surface: #111214;
  --stock-surface-soft: #16181b;
  --stock-surface-hover: #1d1f23;
  --stock-surface-strong: #24272c;

  --stock-text: #ffffff;
  --stock-text-soft: #e6e9ed;
  --stock-muted: #aeb6c1;

  --stock-border:
    rgba(
      255,
      255,
      255,
      0.08
    );

  --stock-border-strong:
    rgba(
      255,
      255,
      255,
      0.15
    );

  --stock-primary: #f4f5f7;
  --stock-primary-hover: #ffffff;
  --stock-primary-contrast: #111214;

  --stock-success: #80c89d;
  --stock-success-soft: #14251b;
  --stock-success-border: #28543a;

  --stock-warning: #e5ba63;
  --stock-warning-soft: #292214;
  --stock-warning-border: #5b4924;

  --stock-danger: #f09595;
  --stock-danger-soft: #291919;
  --stock-danger-border: #5b3030;

  --stock-info: #96b8e7;
  --stock-info-soft: #172330;
  --stock-info-border: #304b69;

  --stock-shadow:
    0 1px 0
      rgba(
        255,
        255,
        255,
        0.02
      ),
    0 10px 30px
      rgba(
        0,
        0,
        0,
        0.20
      );

  --stock-shadow-hover:
    0 20px 56px
      rgba(
        0,
        0,
        0,
        0.34
      );

  --stock-modal-shadow:
    0 34px 110px
      rgba(
        0,
        0,
        0,
        0.62
      );
}



/* =========================================================
   BOX MODEL
   ========================================================= */

.stock-location-page,
.stock-location-page *,
.stock-location-page *::before,
.stock-location-page *::after {
  box-sizing: border-box;
}



/* =========================================================
   HEADER
   ========================================================= */

.stock-location-heading {
  width: 100%;
  min-width: 0;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 22px;

  margin-bottom: 16px;

  animation:
    stockHeaderEnter
    480ms
    cubic-bezier(
      0.22,
      1,
      0.36,
      1
    )
    both;
}



.stock-location-heading
> div:first-child {
  min-width: 0;
}



.stock-location-heading
> div:first-child
> span {
  display: block;

  margin-bottom: 5px;

  color:
    var(--stock-text-soft);

  font-size: 10px;
  font-weight: 900;

  letter-spacing: 0.12em;

  text-transform: uppercase;
}



.stock-location-heading h1 {
  margin: 0;

  color:
    var(--stock-text);

  font-size: 30px;
  font-weight: 900;

  line-height: 1.06;

  letter-spacing:
    -0.045em;
}



.stock-location-heading p {
  max-width: 720px;

  margin:
    7px 0 0;

  color:
    var(--stock-text-soft);

  font-size: 12px;
  font-weight: 730;

  line-height: 1.5;
}



.stock-location-heading
> div:last-child {
  flex: 0 0 auto;

  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;

  gap: 8px;
}



/* =========================================================
   BOTONES GENERALES
   ========================================================= */

.stock-location-heading button,
.stock-button,
.stock-location-modal-footer button {
  min-height: 38px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 7px;

  padding:
    0 12px;

  border:
    1px solid
    transparent;

  border-radius:
    var(--stock-radius-sm);

  outline: none;

  font-family: inherit;
  font-size: 10.5px;
  font-weight: 850;

  line-height: 1;

  white-space: nowrap;

  cursor: pointer;

  transition:
    color
      var(--stock-transition),
    background-color
      var(--stock-transition),
    border-color
      var(--stock-transition),
    transform
      var(--stock-transition),
    box-shadow
      var(--stock-transition),
    opacity
      var(--stock-transition);
}



.stock-location-heading button svg,
.stock-button svg,
.stock-location-modal-footer button svg {
  width: 14px;
  height: 14px;

  stroke-width: 2.2;
}



.stock-location-heading
button:hover:not(:disabled),
.stock-button:hover:not(:disabled),
.stock-location-modal-footer
button:hover:not(:disabled) {
  transform:
    translateY(-2px);
}



.stock-location-heading
button:active:not(:disabled),
.stock-button:active:not(:disabled),
.stock-location-modal-footer
button:active:not(:disabled) {
  transform:
    translateY(0)
    scale(0.98);
}



.stock-location-heading button:disabled,
.stock-button:disabled,
.stock-location-modal-footer button:disabled {
  opacity: 0.48;

  cursor: not-allowed;

  transform: none;
}



.stock-location-heading
button.secondary,
.stock-button-secondary,
.stock-location-modal-footer
button.secondary {
  border-color:
    var(--stock-border);

  background:
    var(--stock-surface);

  color:
    var(--stock-text-soft);
}



.stock-location-heading
button.secondary:hover:not(:disabled),
.stock-button-secondary:hover:not(:disabled),
.stock-location-modal-footer
button.secondary:hover:not(:disabled) {
  border-color:
    var(--stock-border-strong);

  background:
    var(--stock-surface-hover);

  color:
    var(--stock-text);

  box-shadow:
    0 6px 16px
    rgba(
      15,
      23,
      42,
      0.07
    );
}



.stock-location-heading
button.primary,
.stock-button-primary,
.stock-location-modal-footer
button.primary {
  border-color:
    var(--stock-primary);

  background:
    var(--stock-primary);

  color:
    var(--stock-primary-contrast);

  box-shadow:
    0 7px 18px
    rgba(
      15,
      23,
      42,
      0.11
    );
}



.stock-location-heading
button.primary:hover:not(:disabled),
.stock-button-primary:hover:not(:disabled),
.stock-location-modal-footer
button.primary:hover:not(:disabled) {
  border-color:
    var(--stock-primary-hover);

  background:
    var(--stock-primary-hover);

  box-shadow:
    0 11px 24px
    rgba(
      15,
      23,
      42,
      0.16
    );
}



.stock-location-heading
button:focus-visible,
.stock-button:focus-visible,
.stock-location-icon:focus-visible,
.stock-location-actions
button:focus-visible,
.stock-location-pagination
button:focus-visible,
.stock-mobile-actions
button:focus-visible,
.stock-location-modal-header
> button:focus-visible,
.stock-location-modal-footer
button:focus-visible {
  outline: none;

  box-shadow:
    0 0 0 3px
    rgba(
      127,
      127,
      127,
      0.13
    );
}



/* =========================================================
   FEEDBACK
   ========================================================= */

.stock-feedback {
  min-height: 46px;

  display: flex;
  align-items: center;

  gap: 10px;

  margin-bottom: 13px;

  padding:
    8px
    9px
    8px
    11px;

  border:
    1px solid
    transparent;

  border-radius:
    var(--stock-radius-sm);

  font-size: 10.5px;
  font-weight: 800;

  line-height: 1.4;

  box-shadow:
    var(--stock-shadow);

  animation:
    stockFeedbackEnter
    320ms
    cubic-bezier(
      0.22,
      1,
      0.36,
      1
    )
    both;
}



.stock-feedback.is-success {
  border-color:
    var(--stock-success-border);

  background:
    var(--stock-success-soft);

  color:
    var(--stock-success);
}



.stock-feedback.is-error {
  border-color:
    var(--stock-danger-border);

  background:
    var(--stock-danger-soft);

  color:
    var(--stock-danger);
}



.stock-feedback-icon {
  width: 30px;
  height: 30px;

  flex:
    0 0
    30px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 8px;

  background:
    rgba(
      127,
      127,
      127,
      0.09
    );
}



.stock-feedback-icon svg {
  width: 14px;
  height: 14px;

  stroke-width: 2.3;
}



.stock-feedback > span {
  min-width: 0;

  flex: 1;
}



.stock-feedback > button {
  width: 30px;
  height: 30px;

  flex:
    0 0
    30px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;

  border: 0;
  border-radius: 8px;

  background:
    transparent;

  color:
    currentColor;

  opacity: 0.72;

  cursor: pointer;

  transition:
    opacity
      var(--stock-transition),
    background-color
      var(--stock-transition),
    transform
      var(--stock-transition);
}



.stock-feedback > button:hover {
  opacity: 1;

  background:
    rgba(
      127,
      127,
      127,
      0.12
    );

  transform:
    scale(1.04);
}



.stock-feedback > button svg {
  width: 13px;
  height: 13px;
}



/* =========================================================
   KPI
   ========================================================= */

.stock-location-kpis {
  width: 100%;

  display: grid;

  grid-template-columns:
    repeat(
      6,
      minmax(
        0,
        1fr
      )
    );

  gap: 10px;

  margin-bottom: 13px;
}



.stock-location-kpis article {
  position: relative;

  min-width: 0;
  min-height: 104px;

  display: flex;
  flex-direction: column;
  justify-content: center;

  padding: 14px;

  overflow: hidden;

  border:
    1px solid
    var(--stock-border);

  border-radius:
    var(--stock-radius-md);

  background:
    var(--stock-surface);

  box-shadow:
    var(--stock-shadow);

  transition:
    transform
      var(--stock-transition),
    border-color
      var(--stock-transition),
    box-shadow
      var(--stock-transition),
    background-color
      var(--stock-transition);

  animation:
    stockCardEnter
    430ms
    cubic-bezier(
      0.22,
      1,
      0.36,
      1
    )
    both;
}



.stock-location-kpis article:nth-child(1) {
  animation-delay: 20ms;
}

.stock-location-kpis article:nth-child(2) {
  animation-delay: 55ms;
}

.stock-location-kpis article:nth-child(3) {
  animation-delay: 90ms;
}

.stock-location-kpis article:nth-child(4) {
  animation-delay: 125ms;
}

.stock-location-kpis article:nth-child(5) {
  animation-delay: 160ms;
}

.stock-location-kpis article:nth-child(6) {
  animation-delay: 195ms;
}



.stock-location-kpis article::after {
  content: "";

  position: absolute;

  right: -30px;
  bottom: -38px;

  width: 92px;
  height: 92px;

  border:
    1px solid
    var(--stock-border);

  border-radius: 50%;

  opacity: 0.32;

  pointer-events: none;

  transition:
    transform
      320ms
      cubic-bezier(
        0.22,
        1,
        0.36,
        1
      ),
    opacity
      var(--stock-transition);
}



.stock-location-kpis article:hover {
  transform:
    translateY(-3px);

  border-color:
    var(--stock-border-strong);

  box-shadow:
    var(--stock-shadow-hover);
}



.stock-location-kpis article:hover::after {
  transform:
    scale(1.22);

  opacity: 0.58;
}



.stock-location-kpis article.is-success {
  border-color:
    var(--stock-success-border);

  background:
    var(--stock-success-soft);
}



.stock-location-kpis article.is-danger {
  border-color:
    var(--stock-danger-border);

  background:
    var(--stock-danger-soft);
}



.stock-kpi-head {
  position: relative;
  z-index: 1;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 8px;
}



.stock-kpi-head span {
  min-width: 0;

  overflow: hidden;

  color:
    var(--stock-text-soft);

  font-size: 10px;
  font-weight: 850;

  white-space: nowrap;

  text-overflow: ellipsis;
}



.stock-kpi-head svg {
  width: 16px;
  height: 16px;

  flex:
    0 0
    16px;

  color:
    var(--stock-muted);

  stroke-width: 2.2;
}



.stock-location-kpis
article.is-success
.stock-kpi-head svg,
.stock-location-kpis
article.is-success
> strong {
  color:
    var(--stock-success);
}



.stock-location-kpis
article.is-danger
.stock-kpi-head svg,
.stock-location-kpis
article.is-danger
> strong {
  color:
    var(--stock-danger);
}



.stock-location-kpis article > strong {
  position: relative;
  z-index: 1;

  display: block;

  margin-top: 9px;

  overflow: hidden;

  color:
    var(--stock-text);

  font-size: 20px;
  font-weight: 900;

  line-height: 1;

  letter-spacing:
    -0.04em;

  white-space: nowrap;

  text-overflow: ellipsis;

  font-variant-numeric:
    tabular-nums;
}



/* =========================================================
   TOOLBAR
   ========================================================= */

.stock-location-toolbar {
  width: 100%;
  min-width: 0;

  display: flex;
  align-items: center;

  gap: 8px;

  margin-bottom: 12px;

  padding: 10px;

  border:
    1px solid
    var(--stock-border);

  border-radius:
    var(--stock-radius-md);

  background:
    var(--stock-surface);

  box-shadow:
    var(--stock-shadow);

  animation:
    stockCardEnter
    460ms
    cubic-bezier(
      0.22,
      1,
      0.36,
      1
    )
    120ms
    both;

  transition:
    border-color
      var(--stock-transition),
    box-shadow
      var(--stock-transition);
}



.stock-location-toolbar:hover {
  border-color:
    var(--stock-border-strong);
}



.stock-location-search {
  min-width: 300px;

  flex: 1;

  min-height: 40px;

  display: flex;
  align-items: center;

  gap: 8px;

  padding:
    0 11px;

  border:
    1px solid
    var(--stock-border);

  border-radius:
    var(--stock-radius-sm);

  background:
    var(--stock-surface-soft);

  transition:
    background-color
      var(--stock-transition),
    border-color
      var(--stock-transition),
    box-shadow
      var(--stock-transition);
}



.stock-location-search:focus-within {
  border-color:
    var(--stock-border-strong);

  background:
    var(--stock-surface);

  box-shadow:
    0 0 0 3px
    rgba(
      127,
      127,
      127,
      0.10
    );
}



.stock-location-search > svg {
  width: 15px;
  height: 15px;

  flex:
    0 0
    15px;

  color:
    var(--stock-muted);

  stroke-width: 2.2;
}



.stock-location-search input {
  min-width: 0;

  flex: 1;

  border: 0;
  outline: 0;

  background:
    transparent;

  color:
    var(--stock-text);

  font-family: inherit;
  font-size: 11.5px;
  font-weight: 760;
}



.stock-location-search input::placeholder {
  color:
    var(--stock-muted);

  font-weight: 680;

  opacity: 1;
}



.stock-location-search button {
  width: 28px;
  height: 28px;

  flex:
    0 0
    28px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;

  border: 0;
  border-radius: 8px;

  background:
    transparent;

  color:
    var(--stock-muted);

  cursor: pointer;

  transition:
    color
      var(--stock-transition),
    background-color
      var(--stock-transition),
    transform
      var(--stock-transition);
}



.stock-location-search button:hover {
  color:
    var(--stock-text);

  background:
    var(--stock-surface-hover);

  transform:
    scale(1.04);
}



.stock-location-search button svg {
  width: 13px;
  height: 13px;
}



.stock-location-toolbar select {
  min-height: 40px;

  padding:
    0 10px;

  border:
    1px solid
    var(--stock-border);

  border-radius:
    var(--stock-radius-sm);

  outline: none;

  background:
    var(--stock-surface-soft);

  color:
    var(--stock-text);

  font-family: inherit;
  font-size: 10.5px;
  font-weight: 780;

  cursor: pointer;

  transition:
    background-color
      var(--stock-transition),
    border-color
      var(--stock-transition),
    box-shadow
      var(--stock-transition);
}



.stock-location-toolbar select:hover {
  border-color:
    var(--stock-border-strong);
}



.stock-location-toolbar select:focus {
  border-color:
    var(--stock-border-strong);

  background:
    var(--stock-surface);

  box-shadow:
    0 0 0 3px
    rgba(
      127,
      127,
      127,
      0.10
    );
}



.stock-location-toolbar-actions {
  display: flex;
  align-items: center;

  gap: 6px;
}



.stock-location-icon {
  width: 38px;
  height: 38px;

  flex:
    0 0
    38px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;

  border:
    1px solid
    var(--stock-border);

  border-radius:
    var(--stock-radius-sm);

  background:
    var(--stock-surface-soft);

  color:
    var(--stock-text-soft);

  cursor: pointer;

  transition:
    color
      var(--stock-transition),
    background-color
      var(--stock-transition),
    border-color
      var(--stock-transition),
    transform
      var(--stock-transition),
    box-shadow
      var(--stock-transition);
}



.stock-location-icon:hover {
  transform:
    translateY(-2px);

  border-color:
    var(--stock-border-strong);

  background:
    var(--stock-surface-hover);

  color:
    var(--stock-text);

  box-shadow:
    0 6px 15px
    rgba(
      15,
      23,
      42,
      0.07
    );
}



.stock-location-icon svg {
  width: 15px;
  height: 15px;

  stroke-width: 2.2;
}



.stock-toolbar-counter {
  min-width: 96px;

  display: flex;
  align-items: baseline;
  justify-content: flex-end;

  gap: 5px;

  margin-left: 2px;

  color:
    var(--stock-muted);

  white-space: nowrap;
}



.stock-toolbar-counter strong {
  color:
    var(--stock-text);

  font-size: 15px;
  font-weight: 900;

  font-variant-numeric:
    tabular-nums;
}



.stock-toolbar-counter span {
  font-size: 9px;
  font-weight: 750;
}



.stock-toolbar-counter small {
  margin-left: 3px;

  padding:
    3px 6px;

  border:
    1px solid
    var(--stock-info-border);

  border-radius: 999px;

  background:
    var(--stock-info-soft);

  color:
    var(--stock-info);

  font-size: 8px;
  font-weight: 850;
}



/* =========================================================
   CARD PRINCIPAL
   ========================================================= */

.stock-location-card {
  width: 100%;
  min-width: 0;

  overflow: hidden;

  border:
    1px solid
    var(--stock-border);

  border-radius:
    var(--stock-radius-md);

  background:
    var(--stock-surface);

  box-shadow:
    var(--stock-shadow);

  animation:
    stockCardEnter
    500ms
    cubic-bezier(
      0.22,
      1,
      0.36,
      1
    )
    170ms
    both;

  transition:
    border-color
      var(--stock-transition),
    box-shadow
      var(--stock-transition),
    transform
      var(--stock-transition);
}



.stock-location-card:hover {
  border-color:
    var(--stock-border-strong);

  box-shadow:
    var(--stock-shadow-hover);
}



/* =========================================================
   TABLA
   ========================================================= */

.stock-location-table-wrap {
  width: 100%;
  min-width: 0;

  overflow-x: auto;

  overscroll-behavior-x:
    contain;

  scrollbar-width:
    thin;

  scrollbar-color:
    var(--stock-border-strong)
    transparent;
}



.stock-location-table-wrap::-webkit-scrollbar {
  height: 6px;
}



.stock-location-table-wrap::-webkit-scrollbar-track {
  background:
    transparent;
}



.stock-location-table-wrap::-webkit-scrollbar-thumb {
  background:
    var(--stock-border-strong);

  border-radius: 999px;
}



.stock-location-table {
  width: 100%;

  min-width: 1160px;

  border-collapse: collapse;

  white-space: nowrap;
}



.stock-location-table th {
  height: 45px;

  padding:
    0 11px;

  border-bottom:
    1px solid
    var(--stock-border);

  background:
    var(--stock-surface-soft);

  text-align: left;
}



.stock-location-table th button {
  display: inline-flex;
  align-items: center;

  gap: 6px;

  padding: 0;

  border: 0;

  background:
    transparent;

  color:
    var(--stock-text-soft);

  font-family: inherit;
  font-size: 9.5px;
  font-weight: 900;

  letter-spacing:
    0.04em;

  text-transform:
    uppercase;

  cursor: pointer;

  transition:
    color
      var(--stock-transition),
    transform
      var(--stock-transition);
}



.stock-location-table
th button:hover,
.stock-location-table
th button.is-active {
  color:
    var(--stock-text);
}



.stock-location-table
th button:hover {
  transform:
    translateY(-1px);
}



.stock-location-table th svg {
  width: 12px;
  height: 12px;

  color:
    var(--stock-muted);

  stroke-width: 2.2;
}



.stock-location-table
th button.is-active svg {
  color:
    var(--stock-text);
}



.stock-location-table td {
  height: 64px;

  max-width: 280px;

  padding:
    9px
    11px;

  border-bottom:
    1px solid
    var(--stock-border);

  color:
    var(--stock-text-soft);

  font-size: 10.8px;
  font-weight: 730;

  vertical-align: middle;
}



.stock-location-table
tbody tr:last-child td {
  border-bottom: 0;
}



.stock-location-table tbody tr {
  animation:
    stockRowEnter
    320ms
    ease
    both;

  transition:
    background-color
      var(--stock-transition),
    box-shadow
      var(--stock-transition);
}



.stock-location-table
tbody tr:nth-child(1) {
  animation-delay: 20ms;
}

.stock-location-table
tbody tr:nth-child(2) {
  animation-delay: 35ms;
}

.stock-location-table
tbody tr:nth-child(3) {
  animation-delay: 50ms;
}

.stock-location-table
tbody tr:nth-child(4) {
  animation-delay: 65ms;
}

.stock-location-table
tbody tr:nth-child(5) {
  animation-delay: 80ms;
}

.stock-location-table
tbody tr:nth-child(6) {
  animation-delay: 95ms;
}

.stock-location-table
tbody tr:nth-child(7) {
  animation-delay: 110ms;
}

.stock-location-table
tbody tr:nth-child(8) {
  animation-delay: 125ms;
}

.stock-location-table
tbody tr:nth-child(9) {
  animation-delay: 140ms;
}

.stock-location-table
tbody tr:nth-child(10) {
  animation-delay: 155ms;
}



.stock-location-table
tbody tr:hover {
  background:
    var(--stock-surface-soft);

  box-shadow:
    inset 3px 0 0
    var(--stock-border-strong);
}



/* =========================================================
   SKU
   ========================================================= */

.stock-location-sku {
  color:
    var(--stock-text);

  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    monospace;

  font-size: 9.5px;
  font-weight: 900;

  letter-spacing:
    -0.01em;
}



/* =========================================================
   PRODUCTO
   ========================================================= */

.stock-product-cell {
  min-width: 0;

  display: flex;
  align-items: center;

  gap: 9px;
}



.stock-product-icon {
  width: 32px;
  height: 32px;

  flex:
    0 0
    32px;

  display: flex;
  align-items: center;
  justify-content: center;

  border:
    1px solid
    var(--stock-border);

  border-radius: 9px;

  background:
    var(--stock-surface-soft);

  color:
    var(--stock-muted);

  transition:
    color
      var(--stock-transition),
    background-color
      var(--stock-transition),
    border-color
      var(--stock-transition),
    transform
      var(--stock-transition);
}



.stock-location-table
tbody tr:hover
.stock-product-icon {
  transform:
    scale(1.06)
    rotate(-2deg);

  border-color:
    var(--stock-border-strong);

  background:
    var(--stock-surface-hover);

  color:
    var(--stock-text);
}



.stock-product-icon svg {
  width: 13px;
  height: 13px;

  stroke-width: 2.2;
}



.stock-product-cell strong {
  display: block;

  max-width: 270px;

  overflow: hidden;

  color:
    var(--stock-text);

  font-size: 11px;
  font-weight: 870;

  line-height: 1.3;

  text-overflow: ellipsis;
}



/* =========================================================
   UBICACIÓN
   ========================================================= */

.stock-location-place {
  min-width: 0;

  display: flex;
  align-items: center;

  gap: 8px;
}



.stock-location-place > svg {
  width: 13px;
  height: 13px;

  flex:
    0 0
    13px;

  color:
    var(--stock-muted);

  stroke-width: 2.1;
}



.stock-location-place > div {
  min-width: 0;
}



.stock-location-place strong {
  display: block;

  max-width: 200px;

  overflow: hidden;

  color:
    var(--stock-text);

  font-size: 10px;
  font-weight: 820;

  line-height: 1.3;

  text-overflow: ellipsis;
}



.stock-location-place span {
  display: block;

  max-width: 200px;

  margin-top: 3px;

  overflow: hidden;

  color:
    var(--stock-muted);

  font-size: 8px;
  font-weight: 720;

  text-overflow: ellipsis;
}



/* =========================================================
   CLIENTE
   ========================================================= */

.stock-client-cell {
  min-width: 0;

  display: flex;
  align-items: center;

  gap: 8px;
}



.stock-client-cell > svg {
  width: 13px;
  height: 13px;

  flex:
    0 0
    13px;

  color:
    var(--stock-muted);

  stroke-width: 2.1;
}



.stock-client-cell > div {
  min-width: 0;
}



.stock-client-cell strong {
  display: block;

  max-width: 200px;

  overflow: hidden;

  color:
    var(--stock-text);

  font-size: 10px;
  font-weight: 830;

  text-overflow: ellipsis;

  white-space: nowrap;
}



.stock-client-cell span {
  display: block;

  margin-top: 3px;

  color:
    var(--stock-muted);

  font-size: 8px;
  font-weight: 720;
}



/* =========================================================
   TIPO UBICACIÓN
   ========================================================= */

.stock-location-type {
  display: inline-flex;
  align-items: center;

  min-height: 26px;

  padding:
    0 8px;

  border:
    1px solid
    var(--stock-border);

  border-radius: 999px;

  background:
    var(--stock-surface-soft);

  color:
    var(--stock-text-soft);

  font-size: 8.5px;
  font-weight: 820;
}



/* =========================================================
   NÚMEROS
   ========================================================= */

.stock-location-number {
  color:
    var(--stock-text);

  font-size: 12px;
  font-weight: 900;

  font-variant-numeric:
    tabular-nums;
}



.stock-price {
  color:
    var(--stock-text);

  font-size: 10.5px;
  font-weight: 860;

  font-variant-numeric:
    tabular-nums;
}



.stock-updated-date {
  color:
    var(--stock-text-soft);

  font-size: 9px;
  font-weight: 730;

  line-height: 1.35;
}



.stock-muted {
  color:
    var(--stock-muted);

  font-size: 9px;
  font-weight: 700;
}



/* =========================================================
   FULL / CLIENTES / DEPÓSITOS
   ========================================================= */

.stock-distribution-value {
  min-height: 27px;

  display: inline-flex;
  align-items: center;

  gap: 5px;

  padding:
    0 8px;

  border:
    1px solid
    var(--stock-border);

  border-radius: 999px;

  background:
    var(--stock-surface-soft);

  color:
    var(--stock-text);

  white-space: nowrap;

  transition:
    transform
      var(--stock-transition),
    border-color
      var(--stock-transition),
    background-color
      var(--stock-transition);
}



.stock-distribution-value:hover {
  transform:
    translateY(-1px);

  border-color:
    var(--stock-border-strong);
}



.stock-distribution-value svg {
  width: 11px;
  height: 11px;

  flex:
    0 0
    11px;

  color:
    var(--stock-muted);

  stroke-width: 2.2;
}



.stock-distribution-value strong {
  color: inherit;

  font-size: 10.5px;
  font-weight: 900;

  font-variant-numeric:
    tabular-nums;
}



.stock-distribution-value.is-full {
  border-color:
    var(--stock-info-border);

  background:
    var(--stock-info-soft);

  color:
    var(--stock-info);
}



.stock-distribution-value.is-full svg {
  color:
    var(--stock-info);
}



.stock-distribution-value.is-client {
  border-color:
    var(--stock-success-border);

  background:
    var(--stock-success-soft);

  color:
    var(--stock-success);
}



.stock-distribution-value.is-client svg {
  color:
    var(--stock-success);
}



.stock-client-count {
  display: inline-flex;
  align-items: baseline;

  gap: 5px;

  white-space: nowrap;
}



.stock-client-count strong {
  color:
    var(--stock-text);

  font-size: 11.5px;
  font-weight: 900;

  font-variant-numeric:
    tabular-nums;
}



.stock-client-count span {
  color:
    var(--stock-muted);

  font-size: 8px;
  font-weight: 720;
}



/* =========================================================
   ESTADOS
   ========================================================= */

.stock-location-status {
  min-height: 27px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 5px;

  padding:
    0 8px;

  border:
    1px solid
    var(--stock-border);

  border-radius: 999px;

  background:
    var(--stock-surface-soft);

  color:
    var(--stock-text-soft);

  font-size: 8.5px;
  font-weight: 900;

  line-height: 1;

  white-space: nowrap;

  transition:
    transform
      var(--stock-transition),
    border-color
      var(--stock-transition),
    background-color
      var(--stock-transition);
}



.stock-location-status:hover {
  transform:
    translateY(-1px);
}



.stock-location-status svg {
  width: 10px;
  height: 10px;

  stroke-width: 2.4;
}



.stock-location-status.is-success {
  border-color:
    var(--stock-success-border);

  background:
    var(--stock-success-soft);

  color:
    var(--stock-success);
}



.stock-location-status.is-warning {
  border-color:
    var(--stock-warning-border);

  background:
    var(--stock-warning-soft);

  color:
    var(--stock-warning);
}



.stock-location-status.is-danger {
  border-color:
    var(--stock-danger-border);

  background:
    var(--stock-danger-soft);

  color:
    var(--stock-danger);
}



/* =========================================================
   FILAS DE CLIENTES
   ========================================================= */

.stock-location-table
tr.is-client-location td {
  background:
    color-mix(
      in srgb,
      var(--stock-success-soft)
      34%,
      transparent
    );
}



.stock-location-table
tr.is-client-location:hover td {
  background:
    color-mix(
      in srgb,
      var(--stock-success-soft)
      56%,
      transparent
    );
}



/* =========================================================
   ACCIONES TABLA
   ========================================================= */

.stock-actions-heading,
.stock-actions-cell {
  text-align:
    right !important;
}



.stock-location-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;

  gap: 5px;
}



.stock-location-actions button {
  width: 33px;
  height: 33px;

  flex:
    0 0
    33px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;

  border:
    1px solid
    var(--stock-border);

  border-radius: 9px;

  background:
    var(--stock-surface);

  color:
    var(--stock-muted);

  cursor: pointer;

  transition:
    color
      var(--stock-transition),
    background-color
      var(--stock-transition),
    border-color
      var(--stock-transition),
    transform
      var(--stock-transition),
    box-shadow
      var(--stock-transition);
}



.stock-location-actions button:hover {
  transform:
    translateY(-2px);

  border-color:
    var(--stock-border-strong);

  background:
    var(--stock-surface-hover);

  color:
    var(--stock-text);

  box-shadow:
    0 6px 15px
    rgba(
      15,
      23,
      42,
      0.08
    );
}



.stock-location-actions
button:nth-child(1):hover {
  color:
    var(--stock-info);

  border-color:
    var(--stock-info-border);

  background:
    var(--stock-info-soft);
}



.stock-location-actions
button:nth-child(2):hover {
  color:
    var(--stock-warning);

  border-color:
    var(--stock-warning-border);

  background:
    var(--stock-warning-soft);
}



.stock-location-actions
button:nth-child(3):hover {
  color:
    var(--stock-success);

  border-color:
    var(--stock-success-border);

  background:
    var(--stock-success-soft);
}



.stock-location-actions svg {
  width: 13px;
  height: 13px;

  stroke-width: 2.2;
}



/* =========================================================
   VACÍO
   ========================================================= */

.stock-location-empty {
  min-height: 270px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 5px;

  padding: 26px;

  color:
    var(--stock-muted);

  text-align: center;
}



.stock-location-empty > svg {
  width: 30px;
  height: 30px;

  margin-bottom: 7px;

  padding: 6px;

  overflow: visible;

  border:
    1px solid
    var(--stock-border);

  border-radius: 10px;

  background:
    var(--stock-surface-soft);

  color:
    var(--stock-muted);
}



.stock-location-empty strong {
  color:
    var(--stock-text);

  font-size: 12.5px;
  font-weight: 880;
}



.stock-location-empty span {
  max-width: 430px;

  color:
    var(--stock-text-soft);

  font-size: 10px;
  font-weight: 720;

  line-height: 1.45;
}



.stock-location-empty
.stock-button {
  margin-top: 10px;
}



/* =========================================================
   PAGINACIÓN
   ========================================================= */

.stock-location-pagination {
  min-height: 56px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 12px;

  padding:
    8px
    11px;

  border-top:
    1px solid
    var(--stock-border);

  background:
    var(--stock-surface);
}



.stock-pagination-summary,
.stock-pagination-controls {
  display: flex;
  align-items: center;

  gap: 7px;
}



.stock-pagination-summary strong {
  color:
    var(--stock-text);

  font-size: 13px;
  font-weight: 900;

  font-variant-numeric:
    tabular-nums;
}



.stock-pagination-summary span {
  color:
    var(--stock-muted);

  font-size: 9px;
  font-weight: 750;
}



.stock-page-size {
  min-height: 34px;

  padding:
    0 9px;

  border:
    1px solid
    var(--stock-border);

  border-radius: 9px;

  outline: none;

  background:
    var(--stock-surface);

  color:
    var(--stock-text);

  font-family: inherit;
  font-size: 9.5px;
  font-weight: 800;

  cursor: pointer;
}



.stock-page-label {
  min-width: 118px;

  color:
    var(--stock-muted);

  text-align: center;

  font-size: 9px;
  font-weight: 730;
}



.stock-page-label strong {
  color:
    var(--stock-text);

  font-size: 9.5px;
  font-weight: 900;
}



.stock-location-pagination button {
  width: 34px;
  height: 34px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;

  border:
    1px solid
    var(--stock-border);

  border-radius: 9px;

  background:
    var(--stock-surface);

  color:
    var(--stock-text-soft);

  cursor: pointer;

  transition:
    color
      var(--stock-transition),
    background-color
      var(--stock-transition),
    border-color
      var(--stock-transition),
    transform
      var(--stock-transition);
}



.stock-location-pagination
button:hover:not(:disabled) {
  transform:
    translateY(-1px);

  border-color:
    var(--stock-border-strong);

  background:
    var(--stock-surface-hover);

  color:
    var(--stock-text);
}



.stock-location-pagination button:disabled {
  opacity: 0.28;

  cursor: not-allowed;
}



.stock-location-pagination button svg {
  width: 13px;
  height: 13px;
}



/* =========================================================
   ANIMACIONES PARTE 1
   ========================================================= */

@keyframes stockHeaderEnter {
  from {
    opacity: 0;

    transform:
      translateY(-9px);
  }

  to {
    opacity: 1;

    transform:
      translateY(0);
  }
}



@keyframes stockFeedbackEnter {
  from {
    opacity: 0;

    transform:
      translateY(-7px)
      scale(0.985);
  }

  to {
    opacity: 1;

    transform:
      translateY(0)
      scale(1);
  }
}



@keyframes stockCardEnter {
  from {
    opacity: 0;

    transform:
      translateY(10px)
      scale(0.992);
  }

  to {
    opacity: 1;

    transform:
      translateY(0)
      scale(1);
  }
}



@keyframes stockRowEnter {
  from {
    opacity: 0;

    transform:
      translateY(5px);
  }

  to {
    opacity: 1;

    transform:
      translateY(0);
  }
}



@keyframes stockSpin {
  to {
    transform:
      rotate(360deg);
  }
}/* =========================================================
   NAI HUB · STOCK
   PARTE 2 / 3
   MOBILE CARDS · MODALES · FORMULARIOS · COLUMNAS
   ========================================================= */

/* =========================================================
   MOBILE LIST
   ========================================================= */

.stock-mobile-list {
  display: none;
}

.stock-mobile-card {
  position: relative;

  min-width: 0;

  padding: 14px;

  overflow: hidden;

  border:
    1px solid
    var(--stock-border);

  border-radius:
    var(--stock-radius-md);

  background:
    var(--stock-surface);

  box-shadow:
    var(--stock-shadow);

  transition:
    transform
      var(--stock-transition),
    border-color
      var(--stock-transition),
    box-shadow
      var(--stock-transition),
    background-color
      var(--stock-transition);

  animation:
    stockMobileEnter
    360ms
    cubic-bezier(
      0.22,
      1,
      0.36,
      1
    )
    both;
}

.stock-mobile-card::after {
  content: "";

  position: absolute;

  right: -28px;
  bottom: -38px;

  width: 86px;
  height: 86px;

  border:
    1px solid
    var(--stock-border);

  border-radius: 50%;

  opacity: 0.25;

  pointer-events: none;
}

.stock-mobile-card:hover {
  transform:
    translateY(-2px);

  border-color:
    var(--stock-border-strong);

  box-shadow:
    var(--stock-shadow-hover);
}

.stock-mobile-card.is-client-location {
  border-color:
    var(--stock-success-border);

  background:
    color-mix(
      in srgb,
      var(--stock-success-soft)
      40%,
      var(--stock-surface)
    );
}

.stock-mobile-head {
  position: relative;
  z-index: 1;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 10px;
}

.stock-mobile-product {
  min-width: 0;

  display: flex;
  align-items: center;

  gap: 9px;
}

.stock-mobile-product
> div:last-child {
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 3px;
}

.stock-mobile-product strong {
  overflow: hidden;

  color:
    var(--stock-text);

  font-size: 11.5px;
  font-weight: 870;

  line-height: 1.3;

  white-space: nowrap;

  text-overflow: ellipsis;
}

.stock-mobile-product span {
  color:
    var(--stock-muted);

  font-size: 8.5px;
  font-weight: 730;
}

.stock-mobile-location {
  position: relative;
  z-index: 1;

  display: flex;
  align-items: center;

  gap: 8px;

  margin-top: 11px;

  padding:
    9px
    10px;

  border:
    1px solid
    var(--stock-border);

  border-radius: 9px;

  background:
    var(--stock-surface-soft);
}

.stock-mobile-location
> svg {
  width: 13px;
  height: 13px;

  flex:
    0 0
    13px;

  color:
    var(--stock-muted);

  stroke-width: 2.1;
}

.stock-mobile-location
> div {
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 3px;
}

.stock-mobile-location span {
  color:
    var(--stock-muted);

  font-size: 8px;
  font-weight: 720;
}

.stock-mobile-location strong {
  overflow: hidden;

  color:
    var(--stock-text);

  font-size: 9.5px;
  font-weight: 830;

  line-height: 1.3;

  white-space: nowrap;

  text-overflow: ellipsis;
}

.stock-mobile-grid {
  position: relative;
  z-index: 1;

  display: grid;

  grid-template-columns:
    repeat(
      3,
      minmax(
        0,
        1fr
      )
    );

  gap: 8px;

  margin-top: 10px;
}

.stock-mobile-grid > div {
  min-width: 0;

  padding:
    9px
    10px;

  border:
    1px solid
    var(--stock-border);

  border-radius: 9px;

  background:
    var(--stock-surface-soft);
}

.stock-mobile-grid span {
  display: block;

  color:
    var(--stock-muted);

  font-size: 8px;
  font-weight: 720;
}

.stock-mobile-grid strong {
  display: block;

  margin-top: 4px;

  overflow-wrap: anywhere;

  color:
    var(--stock-text);

  font-size: 11.5px;
  font-weight: 900;

  line-height: 1.2;

  font-variant-numeric:
    tabular-nums;
}

.stock-mobile-actions {
  position: relative;
  z-index: 1;

  display: grid;

  grid-template-columns:
    repeat(
      3,
      minmax(
        0,
        1fr
      )
    );

  gap: 7px;

  margin-top: 11px;

  padding-top: 11px;

  border-top:
    1px solid
    var(--stock-border);
}

.stock-mobile-actions button {
  min-height: 36px;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 6px;

  padding:
    0 9px;

  border:
    1px solid
    var(--stock-border);

  border-radius: 9px;

  background:
    var(--stock-surface-soft);

  color:
    var(--stock-text-soft);

  font-family: inherit;
  font-size: 9px;
  font-weight: 830;

  cursor: pointer;

  transition:
    color
      var(--stock-transition),
    background-color
      var(--stock-transition),
    border-color
      var(--stock-transition),
    transform
      var(--stock-transition),
    box-shadow
      var(--stock-transition);
}

.stock-mobile-actions button:hover {
  transform:
    translateY(-1px);

  border-color:
    var(--stock-border-strong);

  background:
    var(--stock-surface-hover);

  color:
    var(--stock-text);

  box-shadow:
    0 5px 13px
    rgba(
      15,
      23,
      42,
      0.06
    );
}

.stock-mobile-actions
button:nth-child(1):hover {
  color:
    var(--stock-info);

  border-color:
    var(--stock-info-border);

  background:
    var(--stock-info-soft);
}

.stock-mobile-actions
button:nth-child(2):hover {
  color:
    var(--stock-warning);

  border-color:
    var(--stock-warning-border);

  background:
    var(--stock-warning-soft);
}

.stock-mobile-actions
button:nth-child(3):hover {
  color:
    var(--stock-success);

  border-color:
    var(--stock-success-border);

  background:
    var(--stock-success-soft);
}

.stock-mobile-actions svg {
  width: 12px;
  height: 12px;

  stroke-width: 2.2;
}



/* =========================================================
   BACKDROP
   ========================================================= */

.stock-location-modal-backdrop {
  position: fixed;

  inset: 0;

  z-index: 6000;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 18px;

  overflow-y: auto;

  background:
    rgba(
      0,
      0,
      0,
      0.50
    );

  backdrop-filter:
    blur(7px);

  -webkit-backdrop-filter:
    blur(7px);

  animation:
    stockBackdropEnter
    180ms
    ease
    both;
}



/* =========================================================
   MODAL BASE
   ========================================================= */

.stock-location-modal {
  width:
    min(
      100%,
      700px
    );

  max-height:
    calc(
      100dvh - 36px
    );

  overflow-y: auto;
  overflow-x: hidden;

  overscroll-behavior:
    contain;

  border:
    1px solid
    var(--stock-border-strong);

  border-radius:
    var(--stock-radius-lg);

  background:
    var(--stock-surface);

  box-shadow:
    var(--stock-modal-shadow);

  scrollbar-width:
    thin;

  scrollbar-color:
    var(--stock-border-strong)
    transparent;

  animation:
    stockModalEnter
    260ms
    cubic-bezier(
      0.22,
      1,
      0.36,
      1
    )
    both;
}

.stock-location-modal::-webkit-scrollbar {
  width: 6px;
}

.stock-location-modal::-webkit-scrollbar-thumb {
  background:
    var(--stock-border-strong);

  border-radius: 999px;
}

.stock-location-modal-small {
  width:
    min(
      100%,
      540px
    );
}

.stock-distribution-modal {
  width:
    min(
      96vw,
      880px
    );
}



/* =========================================================
   MODAL HEADER
   ========================================================= */

.stock-location-modal-header {
  position: sticky;

  top: 0;

  z-index: 4;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 16px;

  padding:
    17px
    19px;

  border-bottom:
    1px solid
    var(--stock-border);

  background:
    color-mix(
      in srgb,
      var(--stock-surface)
      95%,
      transparent
    );

  backdrop-filter:
    blur(18px);

  -webkit-backdrop-filter:
    blur(18px);
}

.stock-location-modal-header
> div {
  min-width: 0;
}

.stock-location-modal-header span {
  display: block;

  margin-bottom: 4px;

  color:
    var(--stock-text-soft);

  font-size: 9px;
  font-weight: 900;

  letter-spacing: 0.10em;

  text-transform:
    uppercase;
}

.stock-location-modal-header h2 {
  margin: 0;

  color:
    var(--stock-text);

  font-size: 20px;
  font-weight: 900;

  line-height: 1.15;

  letter-spacing:
    -0.035em;
}

.stock-location-modal-header p {
  margin:
    5px 0 0;

  max-width: 560px;

  color:
    var(--stock-text-soft);

  font-size: 10.5px;
  font-weight: 730;

  line-height: 1.45;
}

.stock-location-modal-header
> button {
  width: 34px;
  height: 34px;

  flex:
    0 0
    34px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;

  border:
    1px solid
    var(--stock-border);

  border-radius: 10px;

  background:
    var(--stock-surface-soft);

  color:
    var(--stock-muted);

  cursor: pointer;

  transition:
    color
      var(--stock-transition),
    background-color
      var(--stock-transition),
    border-color
      var(--stock-transition),
    transform
      var(--stock-transition),
    box-shadow
      var(--stock-transition);
}

.stock-location-modal-header
> button:hover {
  color:
    var(--stock-text);

  background:
    var(--stock-surface-hover);

  border-color:
    var(--stock-border-strong);

  transform:
    rotate(5deg)
    scale(1.03);

  box-shadow:
    0 5px 14px
    rgba(
      15,
      23,
      42,
      0.07
    );
}

.stock-location-modal-header
> button svg {
  width: 14px;
  height: 14px;

  stroke-width: 2.2;
}



/* =========================================================
   FORM
   ========================================================= */

.stock-location-modal form {
  width: 100%;
  min-width: 0;

  padding: 18px;
}

.stock-location-form-grid {
  width: 100%;
  min-width: 0;

  display: grid;

  grid-template-columns:
    repeat(
      2,
      minmax(
        0,
        1fr
      )
    );

  gap:
    13px
    14px;
}

.stock-location-form-grid label {
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 6px;
}

.stock-location-form-grid
label.is-wide {
  grid-column:
    1 / -1;
}

.stock-location-form-grid
label > span {
  color:
    var(--stock-text);

  font-size: 10.5px;
  font-weight: 860;
}

.stock-location-form-grid input,
.stock-location-form-grid select {
  width: 100%;
  min-width: 0;

  min-height: 40px;

  padding:
    0 10px;

  border:
    1px solid
    var(--stock-border);

  border-radius:
    var(--stock-radius-sm);

  outline: none;

  background:
    var(--stock-surface-soft);

  color:
    var(--stock-text);

  font-family: inherit;
  font-size: 11px;
  font-weight: 760;

  transition:
    background-color
      var(--stock-transition),
    border-color
      var(--stock-transition),
    box-shadow
      var(--stock-transition),
    transform
      var(--stock-transition);
}

.stock-location-form-grid input:hover,
.stock-location-form-grid select:hover {
  border-color:
    var(--stock-border-strong);
}

.stock-location-form-grid input:focus,
.stock-location-form-grid select:focus {
  background:
    var(--stock-surface);

  border-color:
    var(--stock-border-strong);

  box-shadow:
    0 0 0 3px
    rgba(
      127,
      127,
      127,
      0.10
    );
}



/* =========================================================
   RESUMEN TRANSFERENCIA / EDICIÓN
   ========================================================= */

.stock-location-transfer-summary {
  width: 100%;
  min-width: 0;

  display: grid;

  grid-template-columns:
    repeat(
      2,
      minmax(
        0,
        1fr
      )
    );

  gap: 9px;

  margin-bottom: 15px;
}

.stock-location-transfer-summary
> div {
  min-width: 0;

  padding: 11px;

  border:
    1px solid
    var(--stock-border);

  border-radius:
    var(--stock-radius-sm);

  background:
    var(--stock-surface-soft);

  transition:
    border-color
      var(--stock-transition),
    background-color
      var(--stock-transition),
    transform
      var(--stock-transition);
}

.stock-location-transfer-summary
> div:hover {
  transform:
    translateY(-1px);

  border-color:
    var(--stock-border-strong);

  background:
    var(--stock-surface-hover);
}

.stock-location-transfer-summary span {
  display: block;

  color:
    var(--stock-muted);

  font-size: 8.5px;
  font-weight: 730;
}

.stock-location-transfer-summary strong {
  display: block;

  margin-top: 4px;

  overflow-wrap: anywhere;

  color:
    var(--stock-text);

  font-size: 12.5px;
  font-weight: 880;

  line-height: 1.3;

  font-variant-numeric:
    tabular-nums;
}



/* =========================================================
   ERROR FORM
   ========================================================= */

.stock-location-error {
  margin-top: 13px;

  padding:
    10px
    11px;

  border:
    1px solid
    var(--stock-danger-border);

  border-radius:
    var(--stock-radius-sm);

  background:
    var(--stock-danger-soft);

  color:
    var(--stock-danger);

  font-size: 9.5px;
  font-weight: 780;

  line-height: 1.45;

  animation:
    stockFeedbackEnter
    260ms
    ease
    both;
}

.stock-location-error[hidden],
.stock-location-page [hidden] {
  display:
    none !important;
}



/* =========================================================
   FOOTER MODAL
   ========================================================= */

.stock-location-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;

  gap: 8px;

  margin-top: 17px;

  padding-top: 14px;

  border-top:
    1px solid
    var(--stock-border);
}



/* =========================================================
   COLUMNAS
   ========================================================= */

.stock-location-columns {
  display: grid;

  gap: 0;

  max-height:
    min(
      60dvh,
      600px
    );

  padding:
    10px
    14px;

  overflow-y: auto;

  scrollbar-width:
    thin;

  scrollbar-color:
    var(--stock-border-strong)
    transparent;
}

.stock-column-option {
  position: relative;

  min-height: 66px !important;

  display: flex !important;
  align-items: flex-start !important;

  gap: 10px !important;

  padding:
    10px
    8px !important;

  border-bottom:
    1px solid
    var(--stock-border);

  cursor: pointer;

  transition:
    background-color
      var(--stock-transition),
    padding-left
      var(--stock-transition);
}

.stock-column-option:last-child {
  border-bottom: 0;
}

.stock-column-option:hover {
  padding-left:
    11px !important;

  background:
    var(--stock-surface-soft);
}

.stock-column-option input {
  width: 17px;
  height: 17px;

  flex:
    0 0
    17px;

  margin-top: 3px;

  accent-color:
    var(--stock-primary);

  cursor: pointer;
}

.stock-column-option-content {
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 4px;
}

.stock-column-option-content strong {
  display: block;

  color:
    var(--stock-text);

  font-size: 10.5px;
  font-weight: 880;

  line-height: 1.25;
}

.stock-column-option-content small {
  display: block;

  max-width: 420px;

  color:
    var(--stock-muted);

  font-size: 8.8px;
  font-weight: 700;

  line-height: 1.45;
}

.stock-location-modal-small
.stock-location-modal-footer {
  margin: 0;

  padding:
    13px
    14px
    15px;

  background:
    var(--stock-surface);
}



/* =========================================================
   DISTRIBUCIÓN · CONTENIDO
   ========================================================= */

.stock-distribution-content {
  display: flex;
  flex-direction: column;

  gap: 15px;

  padding:
    17px
    18px
    19px;
}

.stock-distribution-summary {
  display: grid;

  grid-template-columns:
    repeat(
      4,
      minmax(
        0,
        1fr
      )
    );

  gap: 9px;
}

.stock-distribution-summary article {
  position: relative;

  min-width: 0;

  padding: 12px;

  overflow: hidden;

  border:
    1px solid
    var(--stock-border);

  border-radius:
    var(--stock-radius-sm);

  background:
    var(--stock-surface-soft);

  transition:
    transform
      var(--stock-transition),
    border-color
      var(--stock-transition),
    box-shadow
      var(--stock-transition),
    background-color
      var(--stock-transition);
}

.stock-distribution-summary article::after {
  content: "";

  position: absolute;

  right: -22px;
  bottom: -28px;

  width: 66px;
  height: 66px;

  border:
    1px solid
    var(--stock-border);

  border-radius: 50%;

  opacity: 0.28;
}

.stock-distribution-summary
article:hover {
  transform:
    translateY(-2px);

  border-color:
    var(--stock-border-strong);

  box-shadow:
    var(--stock-shadow);
}

.stock-distribution-summary
article.is-full {
  border-color:
    var(--stock-info-border);

  background:
    var(--stock-info-soft);
}

.stock-distribution-summary
article.is-client {
  border-color:
    var(--stock-success-border);

  background:
    var(--stock-success-soft);
}

.stock-distribution-summary span {
  position: relative;
  z-index: 1;

  display: block;

  overflow: hidden;

  color:
    var(--stock-muted);

  font-size: 8.5px;
  font-weight: 780;

  white-space: nowrap;

  text-overflow: ellipsis;
}

.stock-distribution-summary strong {
  position: relative;
  z-index: 1;

  display: block;

  margin-top: 6px;

  color:
    var(--stock-text);

  font-size: 18px;
  font-weight: 900;

  line-height: 1;

  font-variant-numeric:
    tabular-nums;
}

.stock-distribution-summary
article.is-full
strong {
  color:
    var(--stock-info);
}

.stock-distribution-summary
article.is-client
strong {
  color:
    var(--stock-success);
}



/* =========================================================
   DISTRIBUCIÓN · SECCIONES
   ========================================================= */

.stock-distribution-section {
  overflow: hidden;

  border:
    1px solid
    var(--stock-border);

  border-radius:
    var(--stock-radius-md);

  background:
    var(--stock-surface);

  box-shadow:
    var(--stock-shadow);
}

.stock-distribution-section-head {
  min-height: 56px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 12px;

  padding:
    11px
    13px;

  border-bottom:
    1px solid
    var(--stock-border);

  background:
    var(--stock-surface-soft);
}

.stock-distribution-section-head
> div {
  min-width: 0;
}

.stock-distribution-section-head span {
  display: block;

  color:
    var(--stock-muted);

  font-size: 8px;
  font-weight: 880;

  letter-spacing:
    0.08em;

  text-transform:
    uppercase;
}

.stock-distribution-section-head h3 {
  margin:
    3px 0 0;

  color:
    var(--stock-text);

  font-size: 11.5px;
  font-weight: 880;
}

.stock-distribution-section-head
> strong {
  color:
    var(--stock-text);

  font-size: 15px;
  font-weight: 900;

  font-variant-numeric:
    tabular-nums;
}



/* =========================================================
   DISTRIBUCIÓN · LISTAS
   ========================================================= */

.stock-distribution-list {
  display: flex;
  flex-direction: column;
}

.stock-distribution-list article {
  min-width: 0;

  display: grid;

  grid-template-columns:
    34px
    minmax(
      0,
      1fr
    )
    auto;

  align-items: center;

  gap: 10px;

  padding:
    11px
    13px;

  border-bottom:
    1px solid
    var(--stock-border);

  transition:
    background-color
      var(--stock-transition),
    padding-left
      var(--stock-transition);
}

.stock-distribution-list
article:last-child {
  border-bottom: 0;
}

.stock-distribution-list
article:hover {
  padding-left: 15px;

  background:
    var(--stock-surface-soft);
}

.stock-distribution-list
article.is-client {
  background:
    color-mix(
      in srgb,
      var(--stock-success-soft)
      32%,
      transparent
    );
}

.stock-distribution-location-icon {
  width: 32px;
  height: 32px;

  display: flex;
  align-items: center;
  justify-content: center;

  border:
    1px solid
    var(--stock-border);

  border-radius: 9px;

  background:
    var(--stock-surface-soft);

  color:
    var(--stock-muted);

  transition:
    transform
      var(--stock-transition),
    background-color
      var(--stock-transition);
}

.stock-distribution-list
article:hover
.stock-distribution-location-icon {
  transform:
    scale(1.06);

  background:
    var(--stock-surface-hover);
}

.stock-distribution-location-icon svg {
  width: 13px;
  height: 13px;

  stroke-width: 2.2;
}

.stock-distribution-location-copy {
  min-width: 0;
}

.stock-distribution-location-copy strong {
  display: block;

  overflow: hidden;

  color:
    var(--stock-text);

  font-size: 10.5px;
  font-weight: 850;

  white-space: nowrap;

  text-overflow: ellipsis;
}

.stock-distribution-location-copy span {
  display: block;

  margin-top: 3px;

  overflow: hidden;

  color:
    var(--stock-muted);

  font-size: 8px;
  font-weight: 700;

  white-space: nowrap;

  text-overflow: ellipsis;
}

.stock-distribution-location-values {
  display: flex;
  align-items: center;

  gap: 16px;
}

.stock-distribution-location-values
> div {
  min-width: 60px;

  text-align: right;
}

.stock-distribution-location-values span {
  display: block;

  color:
    var(--stock-muted);

  font-size: 7.5px;
  font-weight: 720;
}

.stock-distribution-location-values strong {
  display: block;

  margin-top: 3px;

  color:
    var(--stock-text);

  font-size: 11.5px;
  font-weight: 900;

  font-variant-numeric:
    tabular-nums;
}

.stock-distribution-empty {
  padding: 20px;

  color:
    var(--stock-muted);

  font-size: 9.5px;
  font-weight: 720;

  text-align: center;
}



/* =========================================================
   FULL
   ========================================================= */

.stock-full-distribution {
  display: grid;

  grid-template-columns:
    34px
    minmax(
      0,
      1fr
    )
    auto;

  align-items: center;

  gap: 10px;

  padding:
    12px
    13px;

  background:
    color-mix(
      in srgb,
      var(--stock-info-soft)
      48%,
      transparent
    );
}

.stock-full-distribution
> div:nth-child(2) {
  min-width: 0;
}

.stock-full-distribution
> div:nth-child(2)
strong {
  display: block;

  color:
    var(--stock-text);

  font-size: 10.5px;
  font-weight: 850;
}

.stock-full-distribution
> div:nth-child(2)
span {
  display: block;

  margin-top: 3px;

  color:
    var(--stock-muted);

  font-size: 8px;
  font-weight: 700;
}

.stock-full-distribution
> strong {
  color:
    var(--stock-info);

  font-size: 16px;
  font-weight: 900;

  font-variant-numeric:
    tabular-nums;
}



/* =========================================================
   CARGA DISTRIBUCIÓN
   ========================================================= */

.stock-detail-loading {
  min-height: 240px;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 9px;

  padding: 22px;

  color:
    var(--stock-text-soft);

  font-size: 10px;
  font-weight: 780;
}

.stock-detail-loading svg {
  width: 16px;
  height: 16px;

  animation:
    stockSpin
    800ms
    linear
    infinite;
}



/* =========================================================
   ESTADO GENERAL
   ========================================================= */

.stock-state {
  min-height: 360px;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 11px;

  padding: 24px;

  color:
    var(--stock-muted);
}

.stock-state-icon {
  width: 46px;
  height: 46px;

  flex:
    0 0
    46px;

  display: flex;
  align-items: center;
  justify-content: center;

  border:
    1px solid
    var(--stock-border);

  border-radius: 13px;

  background:
    var(--stock-surface);

  color:
    var(--stock-text-soft);

  box-shadow:
    var(--stock-shadow);
}

.stock-state-icon svg {
  width: 18px;
  height: 18px;

  stroke-width: 2.1;

  animation:
    stockSpin
    800ms
    linear
    infinite;
}

.stock-state-copy {
  display: flex;
  flex-direction: column;

  align-items: flex-start;

  gap: 4px;
}

.stock-state-copy strong {
  color:
    var(--stock-text);

  font-size: 12px;
  font-weight: 870;
}

.stock-state-copy span {
  max-width: 420px;

  color:
    var(--stock-text-soft);

  font-size: 9.5px;
  font-weight: 720;

  line-height: 1.45;
}

.stock-state-copy
.stock-button {
  margin-top: 8px;
}

.stock-state-error
.stock-state-icon {
  border-color:
    var(--stock-danger-border);

  background:
    var(--stock-danger-soft);

  color:
    var(--stock-danger);
}

.stock-state-error
.stock-state-icon svg {
  animation: none;
}



/* =========================================================
   LOADING BUTTONS
   ========================================================= */

.stock-location-heading
button.is-loading,
.stock-location-modal-footer
button.is-loading {
  pointer-events: none;
}

.stock-location-heading
button.is-loading svg,
.stock-location-modal-footer
button.is-loading svg {
  animation:
    stockSpin
    800ms
    linear
    infinite;
}



/* =========================================================
   COLOR SCHEME INPUTS
   ========================================================= */

html[data-theme="dark"]
.stock-location-search input,
html[data-theme="dark"]
.stock-location-toolbar select,
html[data-theme="dark"]
.stock-page-size,
html[data-theme="dark"]
.stock-location-form-grid input,
html[data-theme="dark"]
.stock-location-form-grid select {
  color-scheme: dark;
}

html[data-theme="light"]
.stock-location-search input,
html[data-theme="light"]
.stock-location-toolbar select,
html[data-theme="light"]
.stock-page-size,
html[data-theme="light"]
.stock-location-form-grid input,
html[data-theme="light"]
.stock-location-form-grid select {
  color-scheme: light;
}



/* =========================================================
   CONTRASTE DARK
   ========================================================= */

html[data-theme="dark"]
.stock-location-heading h1,
body[data-theme="dark"]
.stock-location-heading h1,
html[data-theme="dark"]
.stock-location-table td,
body[data-theme="dark"]
.stock-location-table td,
html[data-theme="dark"]
.stock-product-cell strong,
body[data-theme="dark"]
.stock-product-cell strong,
html[data-theme="dark"]
.stock-location-place strong,
body[data-theme="dark"]
.stock-location-place strong,
html[data-theme="dark"]
.stock-location-number,
body[data-theme="dark"]
.stock-location-number,
html[data-theme="dark"]
.stock-price,
body[data-theme="dark"]
.stock-price,
html[data-theme="dark"]
.stock-mobile-product strong,
body[data-theme="dark"]
.stock-mobile-product strong,
html[data-theme="dark"]
.stock-column-option-content strong,
body[data-theme="dark"]
.stock-column-option-content strong {
  color: #ffffff;
}

html[data-theme="dark"]
.stock-location-heading p,
body[data-theme="dark"]
.stock-location-heading p,
html[data-theme="dark"]
.stock-location-table th button,
body[data-theme="dark"]
.stock-location-table th button,
html[data-theme="dark"]
.stock-updated-date,
body[data-theme="dark"]
.stock-updated-date,
html[data-theme="dark"]
.stock-column-option-content small,
body[data-theme="dark"]
.stock-column-option-content small {
  color: #d9dee5;
}



/* =========================================================
   MODAL OPEN
   ========================================================= */

body.stock-modal-open {
  overflow: hidden;
}



/* =========================================================
   ANIMACIONES PARTE 2
   ========================================================= */

@keyframes stockMobileEnter {
  from {
    opacity: 0;

    transform:
      translateY(9px)
      scale(0.99);
  }

  to {
    opacity: 1;

    transform:
      translateY(0)
      scale(1);
  }
}

@keyframes stockBackdropEnter {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes stockModalEnter {
  from {
    opacity: 0;

    transform:
      translateY(14px)
      scale(0.975);
  }

  to {
    opacity: 1;

    transform:
      translateY(0)
      scale(1);
  }
}/* =========================================================
   NAI HUB · STOCK
   PARTE 3 / 3
   RESPONSIVE · SCROLL · REDUCED MOTION · AJUSTES FINALES
   ========================================================= */

/* =========================================================
   ENTER GENERAL
   ========================================================= */

.stock-enter {
  opacity: 0;

  transform:
    translateY(8px)
    scale(0.995);

  animation:
    stockEnter
    430ms
    cubic-bezier(
      0.22,
      1,
      0.36,
      1
    )
    var(
      --stock-delay,
      0ms
    )
    forwards;
}

@keyframes stockEnter {
  from {
    opacity: 0;

    transform:
      translateY(8px)
      scale(0.995);
  }

  to {
    opacity: 1;

    transform:
      translateY(0)
      scale(1);
  }
}



/* =========================================================
   SCROLL GLOBAL DEL MÓDULO
   ========================================================= */

.stock-location-page * {
  scrollbar-width: thin;

  scrollbar-color:
    var(--stock-border-strong)
    transparent;
}

.stock-location-page *::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.stock-location-page *::-webkit-scrollbar-track {
  background:
    transparent;
}

.stock-location-page *::-webkit-scrollbar-thumb {
  background:
    var(--stock-border-strong);

  border-radius: 999px;
}



/* =========================================================
   SELECCIÓN DE TEXTO
   ========================================================= */

.stock-location-page ::selection {
  background:
    var(--stock-primary);

  color:
    var(--stock-primary-contrast);
}



/* =========================================================
   LEGIBILIDAD GENERAL
   ========================================================= */

.stock-location-page button,
.stock-location-page input,
.stock-location-page select {
  -webkit-font-smoothing:
    antialiased;

  text-rendering:
    optimizeLegibility;
}

.stock-location-page strong,
.stock-location-page th,
.stock-location-page h1,
.stock-location-page h2,
.stock-location-page h3 {
  text-rendering:
    geometricPrecision;
}

html[data-theme="dark"]
.stock-location-page {
  font-weight: 690;
}



/* =========================================================
   PLACEHOLDERS
   ========================================================= */

.stock-location-page
input::placeholder {
  color:
    var(--stock-muted);

  font-weight: 700;

  opacity: 1;
}



/* =========================================================
   EVITAR DESBORDES
   ========================================================= */

.stock-location-page,
.stock-location-heading,
.stock-location-kpis,
.stock-location-toolbar,
.stock-location-card,
.stock-location-pagination,
.stock-mobile-card,
.stock-location-modal,
.stock-distribution-content,
.stock-distribution-summary,
.stock-distribution-section {
  max-width: 100%;
}

.stock-location-heading *,
.stock-location-toolbar *,
.stock-location-card *,
.stock-mobile-card *,
.stock-location-modal *,
.stock-distribution-content * {
  min-width: 0;
}



/* =========================================================
   RESPONSIVE 1400
   ========================================================= */

@media (
  max-width: 1400px
) {
  .stock-location-kpis {
    grid-template-columns:
      repeat(
        3,
        minmax(
          0,
          1fr
        )
      );
  }

  .stock-location-table {
    min-width: 1080px;
  }

  .stock-location-heading h1 {
    font-size: 29px;
  }
}



/* =========================================================
   RESPONSIVE 1180
   ========================================================= */

@media (
  max-width: 1180px
) {
  .stock-location-heading {
    gap: 16px;
  }

  .stock-location-heading h1 {
    font-size: 28px;
  }

  .stock-location-toolbar {
    flex-wrap: wrap;
  }

  .stock-location-search {
    min-width: 100%;
  }

  .stock-location-toolbar-actions {
    flex: 1;

    justify-content: flex-start;
  }

  .stock-toolbar-counter {
    margin-left: auto;
  }

  .stock-distribution-summary {
    grid-template-columns:
      repeat(
        2,
        minmax(
          0,
          1fr
        )
      );
  }
}



/* =========================================================
   RESPONSIVE 980
   TABLA -> CARDS
   ========================================================= */

@media (
  max-width: 980px
) {
  .stock-location-table-wrap {
    display: none;
  }

  .stock-mobile-list {
    display: grid;

    gap: 9px;

    padding: 10px;
  }

  .stock-location-card:hover {
    transform: none;

    box-shadow:
      var(--stock-shadow);
  }

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

  .stock-distribution-modal {
    width:
      min(
        96vw,
        820px
      );
  }

  .stock-distribution-list article {
    grid-template-columns:
      32px
      minmax(
        0,
        1fr
      );
  }

  .stock-distribution-location-values {
    grid-column:
      1 / -1;

    justify-content: flex-end;

    padding-left: 42px;
  }
}



/* =========================================================
   RESPONSIVE 820
   ========================================================= */

@media (
  max-width: 820px
) {
  .stock-location-heading {
    flex-direction: column;

    gap: 12px;
  }

  .stock-location-heading
  > div:last-child {
    width: 100%;

    justify-content: flex-start;
  }

  .stock-location-heading
  > div:last-child
  button {
    flex: 1;
  }

  .stock-location-toolbar {
    align-items: stretch;

    flex-direction: column;
  }

  .stock-location-toolbar select {
    width: 100%;
  }

  .stock-location-toolbar-actions {
    width: 100%;

    justify-content: flex-start;
  }

  .stock-toolbar-counter {
    width: 100%;

    justify-content: flex-start;

    margin-left: 0;
  }

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

  .stock-location-pagination {
    align-items: stretch;

    flex-direction: column;
  }

  .stock-pagination-summary {
    justify-content: space-between;
  }

  .stock-pagination-controls {
    width: 100%;

    justify-content: space-between;
  }

  .stock-location-modal-backdrop {
    align-items: flex-start;

    padding: 10px;
  }

  .stock-location-modal {
    max-height:
      calc(
        100dvh - 20px
      );

    border-radius: 14px;
  }

  .stock-location-modal-header {
    padding: 15px;
  }

  .stock-location-modal form {
    padding: 15px;
  }

  .stock-location-form-grid {
    grid-template-columns:
      1fr;
  }

  .stock-location-form-grid
  label.is-wide {
    grid-column: auto;
  }

  .stock-location-transfer-summary {
    grid-template-columns:
      1fr;
  }

  .stock-distribution-content {
    padding: 13px;
  }

  .stock-full-distribution {
    grid-template-columns:
      32px
      minmax(
        0,
        1fr
      )
      auto;
  }
}



/* =========================================================
   RESPONSIVE 680
   ========================================================= */

@media (
  max-width: 680px
) {
  .stock-location-heading h1 {
    font-size: 26px;
  }

  .stock-location-heading p {
    font-size: 11px;
  }

  .stock-location-heading
  > div:last-child {
    display: grid;

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

  .stock-location-heading
  > div:last-child
  button {
    width: 100%;
  }

  .stock-location-kpis {
    grid-template-columns:
      repeat(
        2,
        minmax(
          0,
          1fr
        )
      );
  }

  .stock-location-kpis article {
    min-height: 96px;

    padding: 12px;
  }

  .stock-location-kpis
  article > strong {
    font-size: 18px;
  }

  .stock-kpi-head span {
    font-size: 9.5px;
  }

  .stock-mobile-actions {
    grid-template-columns:
      1fr;
  }

  .stock-pagination-controls {
    flex-wrap: wrap;
  }

  .stock-page-size {
    width: 100%;
  }

  .stock-page-label {
    flex: 1;

    min-width: 0;
  }

  .stock-location-modal-footer {
    flex-direction:
      column-reverse;
  }

  .stock-location-modal-footer
  button {
    width: 100%;
  }

  .stock-distribution-location-values {
    justify-content: space-between;

    padding-left: 0;
  }

  .stock-distribution-location-values
  > div {
    flex: 1;

    text-align: left;
  }

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



/* =========================================================
   RESPONSIVE 560
   ========================================================= */

@media (
  max-width: 560px
) {
  .stock-location-heading {
    margin-bottom: 12px;
  }

  .stock-location-heading
  > div:first-child
  > span {
    font-size: 9px;
  }

  .stock-location-heading h1 {
    font-size: 24px;
  }

  .stock-location-heading p {
    font-size: 10.5px;
  }

  .stock-location-heading
  > div:last-child {
    grid-template-columns: 1fr;
  }

  .stock-location-kpis {
    grid-template-columns:
      1fr;
  }

  .stock-location-kpis article {
    min-height: 88px;
  }

  .stock-location-kpis
  article > strong {
    font-size: 19px;
  }

  .stock-location-toolbar {
    padding: 8px;
  }

  .stock-location-search {
    min-height: 39px;
  }

  .stock-location-toolbar select {
    min-height: 39px;
  }

  .stock-location-toolbar-actions {
    display: grid;

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

  .stock-location-icon {
    width: 100%;

    min-height: 37px;

    flex-basis: auto;
  }

  .stock-mobile-list {
    padding: 8px;
  }

  .stock-mobile-card {
    padding: 12px;
  }

  .stock-mobile-head {
    flex-direction: column;
  }

  .stock-mobile-head
  .stock-location-status {
    align-self: flex-start;
  }

  .stock-mobile-grid {
    grid-template-columns:
      1fr;
  }

  .stock-mobile-location {
    align-items: flex-start;
  }

  .stock-location-modal-header {
    gap: 10px;
  }

  .stock-location-modal-header h2 {
    font-size: 18px;
  }

  .stock-location-modal-header p {
    font-size: 9.5px;
  }

  .stock-location-form-grid
  label > span {
    font-size: 10px;
  }

  .stock-location-form-grid input,
  .stock-location-form-grid select {
    font-size: 10.5px;
  }

  .stock-location-transfer-summary
  > div {
    padding: 10px;
  }

  .stock-column-option {
    min-height: 62px !important;
  }

  .stock-column-option-content
  strong {
    font-size: 10px;
  }

  .stock-column-option-content
  small {
    font-size: 8.3px;
  }

  .stock-distribution-summary {
    grid-template-columns:
      1fr
      1fr;
  }

  .stock-distribution-summary strong {
    font-size: 16px;
  }

  .stock-full-distribution {
    grid-template-columns:
      30px
      minmax(
        0,
        1fr
      );
  }

  .stock-full-distribution
  > strong {
    grid-column: 2;

    margin-top: 3px;
  }
}



/* =========================================================
   RESPONSIVE 420
   ========================================================= */

@media (
  max-width: 420px
) {
  .stock-location-heading h1 {
    font-size: 22px;
  }

  .stock-location-heading p {
    font-size: 10px;
  }

  .stock-location-heading button,
  .stock-button,
  .stock-location-modal-footer
  button {
    min-height: 37px;

    font-size: 10px;
  }

  .stock-location-kpis article {
    padding: 11px;
  }

  .stock-location-kpis
  article > strong {
    font-size: 18px;
  }

  .stock-mobile-product strong {
    white-space: normal;
  }

  .stock-mobile-location strong {
    white-space: normal;
  }

  .stock-pagination-summary {
    align-items: flex-start;

    flex-direction: column;

    gap: 2px;
  }

  .stock-pagination-controls {
    display: grid;

    grid-template-columns:
      34px
      minmax(
        0,
        1fr
      )
      34px;

    gap: 6px;
  }

  .stock-page-size {
    grid-column:
      1 / -1;
  }

  .stock-page-label {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .stock-location-modal-header {
    padding: 13px;
  }

  .stock-location-modal form {
    padding: 13px;
  }

  .stock-distribution-content {
    padding: 10px;
  }

  .stock-distribution-summary {
    grid-template-columns:
      1fr;
  }

  .stock-distribution-summary
  article {
    min-height: 72px;
  }

  .stock-distribution-section-head {
    flex-direction: column;
  }

  .stock-distribution-section-head
  > strong {
    align-self: flex-start;
  }

  .stock-distribution-list
  article {
    grid-template-columns:
      30px
      minmax(
        0,
        1fr
      );
  }

  .stock-distribution-location-values {
    grid-column:
      1 / -1;

    display: grid;

    grid-template-columns:
      repeat(
        2,
        minmax(
          0,
          1fr
        )
      );

    gap: 8px;

    padding-top: 7px;

    border-top:
      1px solid
      var(--stock-border);
  }

  .stock-distribution-location-values
  > div {
    min-width: 0;
  }
}



/* =========================================================
   DARK · LEGIBILIDAD EXTRA
   ========================================================= */

html[data-theme="dark"]
.stock-location-page
.stock-muted,
body[data-theme="dark"]
.stock-location-page
.stock-muted {
  color:
    #b7bec8;
}

html[data-theme="dark"]
.stock-location-page
small,
body[data-theme="dark"]
.stock-location-page
small {
  opacity: 0.97;
}

html[data-theme="dark"]
.stock-location-toolbar select,
body[data-theme="dark"]
.stock-location-toolbar select,
html[data-theme="dark"]
.stock-location-form-grid input,
body[data-theme="dark"]
.stock-location-form-grid input,
html[data-theme="dark"]
.stock-location-form-grid select,
body[data-theme="dark"]
.stock-location-form-grid select {
  border-color:
    rgba(
      255,
      255,
      255,
      0.10
    );
}



/* =========================================================
   HOVER SOLO DONDE EXISTE PUNTERO
   ========================================================= */

@media (
  hover: hover
) {
  .stock-location-kpis
  article:hover {
    transform:
      translateY(-3px);
  }

  .stock-mobile-card:hover {
    transform:
      translateY(-2px);
  }

  .stock-location-actions
  button:hover {
    transform:
      translateY(-2px);
  }
}



/* =========================================================
   DISPOSITIVOS SIN HOVER
   ========================================================= */

@media (
  hover: none
) {
  .stock-location-kpis
  article:hover,
  .stock-location-heading
  button:hover:not(:disabled),
  .stock-button:hover:not(:disabled),
  .stock-location-icon:hover,
  .stock-location-actions
  button:hover,
  .stock-mobile-card:hover,
  .stock-distribution-summary
  article:hover,
  .stock-location-transfer-summary
  > div:hover {
    transform: none;
  }

  .stock-location-card:hover,
  .stock-mobile-card:hover {
    box-shadow:
      var(--stock-shadow);
  }
}



/* =========================================================
   REDUCIR MOVIMIENTO
   ========================================================= */

@media (
  prefers-reduced-motion:
  reduce
) {
  .stock-location-page *,
  .stock-location-page *::before,
  .stock-location-page *::after {
    scroll-behavior:
      auto !important;

    animation-duration:
      0.001ms !important;

    animation-iteration-count:
      1 !important;

    transition-duration:
      0.001ms !important;
  }

  .stock-enter {
    opacity: 1;

    transform: none;
  }
}



/* =========================================================
   PROTECCIONES FINALES
   ========================================================= */

.stock-location-modal,
.stock-location-modal * {
  box-sizing: border-box;
}

.stock-location-modal form,
.stock-location-form-grid,
.stock-location-transfer-summary {
  width: 100%;
  min-width: 0;
}

.stock-location-form-grid label,
.stock-location-form-grid input,
.stock-location-form-grid select {
  min-width: 0;
}

.stock-location-error[hidden] {
  display:
    none !important;
}

.stock-location-card,
.stock-location-toolbar,
.stock-location-kpis,
.stock-location-heading,
.stock-mobile-card {
  max-width: 100%;
}



/* =========================================================
   CARGANDO
   ========================================================= */

.stock-table-loading {
  min-height: 240px;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 9px;

  padding: 20px;

  color:
    var(--stock-text-soft);

  font-size: 10.5px;
  font-weight: 800;
}

.stock-table-loading svg {
  width: 16px;
  height: 16px;

  animation:
    stockSpin
    800ms
    linear
    infinite;
}



/* =========================================================
   AJUSTE VISUAL FINAL
   ========================================================= */

.stock-location-table td,
.stock-location-table th,
.stock-location-search input,
.stock-location-toolbar select,
.stock-location-form-grid input,
.stock-location-form-grid select,
.stock-mobile-card,
.stock-location-modal {
  -webkit-font-smoothing:
    antialiased;
}

.stock-location-table
tbody tr:hover
.stock-location-sku,
.stock-location-table
tbody tr:hover
.stock-product-cell strong,
.stock-location-table
tbody tr:hover
.stock-location-place strong {
  color:
    var(--stock-text);
}

.stock-location-card,
.stock-location-toolbar,
.stock-location-kpis article,
.stock-mobile-card,
.stock-location-modal,
.stock-distribution-section {
  isolation: isolate;
}/* =========================================================
   STOCK · BOTONES HEADER · EVITAR CORTE AL HACER HOVER
   AGREGAR AL FINAL DE stock.css
   ========================================================= */

.stock-location-heading {
  overflow: visible !important;
}



.stock-location-heading
> div:last-child {
  overflow: visible !important;

  padding-top: 3px;
  padding-bottom: 3px;
}



.stock-location-heading
button {
  position: relative;

  overflow: visible !important;

  transform-origin: center;
}



.stock-location-heading
button:hover:not(:disabled) {
  transform:
    scale(1.025) !important;
}



.stock-location-heading
button:active:not(:disabled) {
  transform:
    scale(0.98) !important;
}/* =========================================================
   STOCK · BOTONES HEADER · EVITAR CORTE AL HACER HOVER
   AGREGAR AL FINAL DE stock.css
   ========================================================= */

.stock-location-heading {
  overflow: visible !important;
}



.stock-location-heading
> div:last-child {
  overflow: visible !important;

  padding-top: 3px;
  padding-bottom: 3px;
}



.stock-location-heading
button {
  position: relative;

  overflow: visible !important;

  transform-origin: center;
}



.stock-location-heading
button:hover:not(:disabled) {
  transform:
    scale(1.025) !important;
}



.stock-location-heading
button:active:not(:disabled) {
  transform:
    scale(0.98) !important;
}/* =========================================================
   STOCK · MODAL ELIMINAR PRODUCTO
   AGREGAR AL FINAL DE stock.css
   ========================================================= */

.stock-delete-product-content {
  display: flex;
  flex-direction: column;

  gap: 14px;

  padding:
    18px;
}



.stock-delete-product-warning {
  display: flex;
  align-items: flex-start;

  gap: 12px;

  padding:
    13px;

  border:
    1px solid
    var(--stock-danger-border);

  border-radius:
    var(--stock-radius-sm);

  background:
    var(--stock-danger-soft);
}



.stock-delete-product-icon {
  width: 36px;
  height: 36px;

  flex:
    0 0
    36px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 10px;

  background:
    rgba(
      185,
      47,
      47,
      0.10
    );

  color:
    var(--stock-danger);
}



.stock-delete-product-icon svg {
  width: 16px;
  height: 16px;

  stroke-width: 2.2;
}



.stock-delete-product-warning
> div:last-child {
  min-width: 0;
}



.stock-delete-product-warning strong {
  display: block;

  color:
    var(--stock-danger);

  font-size: 11px;
  font-weight: 900;

  line-height: 1.3;
}



.stock-delete-product-warning span {
  display: block;

  margin-top: 4px;

  color:
    var(--stock-text-soft);

  font-size: 9px;
  font-weight: 700;

  line-height: 1.45;
}



.stock-delete-product-summary {
  display: grid;

  grid-template-columns:
    repeat(
      3,
      minmax(
        0,
        1fr
      )
    );

  gap: 9px;
}



.stock-delete-product-summary
> div {
  min-width: 0;

  padding:
    11px;

  border:
    1px solid
    var(--stock-border);

  border-radius:
    var(--stock-radius-sm);

  background:
    var(--stock-surface-soft);
}



.stock-delete-product-summary span {
  display: block;

  color:
    var(--stock-muted);

  font-size: 8px;
  font-weight: 780;

  line-height: 1.2;

  text-transform: uppercase;

  letter-spacing:
    0.05em;
}



.stock-delete-product-summary strong {
  display: block;

  margin-top: 5px;

  overflow: hidden;

  color:
    var(--stock-text);

  font-size: 11px;
  font-weight: 900;

  line-height: 1.35;

  text-overflow: ellipsis;

  white-space: nowrap;
}



.stock-delete-product-footer {
  margin-top: 0;

  padding:
    14px 18px 17px;

  border-top:
    1px solid
    var(--stock-border);

  background:
    var(--stock-surface);
}



.stock-delete-product-footer
.stock-delete-confirm {
  min-height: 38px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 7px;

  padding:
    0 13px;

  border:
    1px solid
    var(--stock-danger);

  border-radius:
    var(--stock-radius-sm);

  background:
    var(--stock-danger);

  color: #ffffff;

  font-family: inherit;
  font-size: 10px;
  font-weight: 900;

  cursor: pointer;

  transition:
    transform
      var(--stock-transition),
    background-color
      var(--stock-transition),
    border-color
      var(--stock-transition),
    box-shadow
      var(--stock-transition),
    opacity
      var(--stock-transition);
}



.stock-delete-product-footer
.stock-delete-confirm:hover:not(:disabled) {
  transform:
    translateY(-1px);

  filter:
    brightness(1.05);

  box-shadow:
    0 7px 18px
    rgba(
      185,
      47,
      47,
      0.18
    );
}



.stock-delete-product-footer
.stock-delete-confirm:active:not(:disabled) {
  transform:
    translateY(0)
    scale(0.98);
}



.stock-delete-product-footer
.stock-delete-confirm:disabled {
  opacity: 0.48;

  cursor: not-allowed;

  transform: none;
}



.stock-delete-product-footer
.stock-delete-confirm svg {
  width: 14px;
  height: 14px;

  stroke-width: 2.2;
}



.stock-action-danger:hover {
  color:
    var(--stock-danger) !important;

  border-color:
    var(--stock-danger-border) !important;

  background:
    var(--stock-danger-soft) !important;
}



.stock-mobile-danger:hover {
  color:
    var(--stock-danger) !important;

  border-color:
    var(--stock-danger-border) !important;

  background:
    var(--stock-danger-soft) !important;
}



@media (
  max-width: 560px
) {
  .stock-delete-product-content {
    padding:
      14px;
  }



  .stock-delete-product-summary {
    grid-template-columns:
      1fr;
  }



  .stock-delete-product-summary strong {
    white-space: normal;
  }



  .stock-delete-product-footer {
    padding:
      12px 14px 14px;
  }



  .stock-delete-product-footer
  .stock-delete-confirm {
    width: 100%;
  }
}/* =========================================================
   STOCK · NUEVO PRODUCTO · OPCIONES
   AGREGAR AL FINAL DE stock.css
   ========================================================= */

.stock-product-options {
  grid-column:
    1 / -1;

  display: grid;

  grid-template-columns:
    repeat(
      2,
      minmax(
        0,
        1fr
      )
    );

  gap: 9px;

  margin-top: 2px;
}



.stock-product-checkbox {
  min-width: 0;

  min-height: 44px;

  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;

  gap: 9px !important;

  padding:
    9px
    11px;

  border:
    1px solid
    var(--stock-border);

  border-radius:
    var(--stock-radius-sm);

  background:
    var(--stock-surface-soft);

  cursor: pointer;

  transition:
    border-color
      var(--stock-transition),
    background-color
      var(--stock-transition),
    transform
      var(--stock-transition);
}



.stock-product-checkbox:hover {
  border-color:
    var(--stock-border-strong);

  background:
    var(--stock-surface-hover);

  transform:
    translateY(-1px);
}



.stock-product-checkbox input {
  width: 16px !important;
  height: 16px !important;

  min-width: 16px !important;
  min-height: 16px !important;

  flex:
    0 0
    16px !important;

  margin: 0 !important;
  padding: 0 !important;

  accent-color:
    var(--stock-primary);

  cursor: pointer;
}



.stock-product-checkbox span {
  display: block;

  color:
    var(--stock-text);

  font-size: 10px;
  font-weight: 820;

  line-height: 1.25;

  cursor: pointer;
}



html[data-theme="dark"]
.stock-product-checkbox input,
body[data-theme="dark"]
.stock-product-checkbox input {
  color-scheme: dark;
}



@media (
  max-width: 680px
) {
  .stock-product-options {
    grid-template-columns:
      1fr;
  }
}