
/* Luna4 v1.6 - procesamiento de varias imagenes */
.v16-mode-tabs {
  display: inline-flex;
  gap: 5px;
  margin: -4px 0 18px;
  padding: 5px;
  border: 1px solid var(--v15-line, #dce4f3);
  border-radius: 14px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 7px 18px rgba(20,35,74,.05);
}

.v16-mode-tabs a {
  min-height: 39px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  border-radius: 10px;
  color: var(--v15-muted, #6d7690);
  font-size: 13px;
  font-weight: 780;
}

.v16-mode-tabs a:hover {
  color: var(--v15-ink, #17223e);
  background: #f5f7fc;
}

.v16-mode-tabs a.is-active {
  color: #fff;
  background: linear-gradient(145deg, var(--v15-accent, #5b7cff), #8878ff);
  box-shadow: 0 7px 17px rgba(91,124,255,.20);
}

.v16-batch-editor {
  display: grid;
  grid-template-columns: minmax(300px, 370px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.v16-batch-dropzone .v15-drop-inner strong::after {
  content: "";
}

.v16-batch-limit {
  margin-top: 8px;
  color: var(--v15-muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.v16-queue-workspace {
  min-width: 0;
}

.v16-queue-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.v16-queue-title strong,
.v16-queue-title span {
  display: block;
}

.v16-queue-title strong {
  font-size: 15px;
}

.v16-queue-title span {
  margin-top: 3px;
  color: var(--v15-muted);
  font-size: 12px;
}

.v16-count-chip {
  min-width: 82px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--v15-line);
  border-radius: 999px;
  background: #f8faff;
  color: var(--v15-muted);
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 780;
  white-space: nowrap;
}

.v16-progress-wrap {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.v16-progress-track {
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: #e9eef8;
}

.v16-progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--v15-accent), #8b7cff);
  transition: width .2s ease;
}

.v16-progress-text {
  min-width: 42px;
  color: var(--v15-muted);
  font-size: 11.5px;
  font-weight: 760;
  text-align: right;
}

.v16-queue-empty {
  min-height: 360px;
  border: 1px dashed var(--v15-line);
  border-radius: 20px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 32px 20px;
  background: #fafbfe;
  color: #949eb3;
}

.v16-queue-empty-inner {
  max-width: 340px;
  display: grid;
  justify-items: center;
  gap: 9px;
}

.v16-queue-empty svg {
  width: 48px;
  height: 48px;
  color: #aab4c8;
}

.v16-queue-empty strong {
  color: #6e7891;
  font-size: 15px;
}

.v16-queue-empty span {
  font-size: 13px;
  line-height: 1.55;
}

.v16-queue-list {
  display: grid;
  gap: 9px;
}

.v16-queue-item {
  display: grid;
  grid-template-columns: 54px minmax(150px, 1fr) minmax(108px, auto) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--v15-line);
  border-radius: 16px;
  background: #fff;
  padding: 10px;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.v16-queue-item:hover {
  border-color: #c9d5eb;
  box-shadow: 0 7px 18px rgba(20,35,74,.06);
}

.v16-queue-item[data-state="processing"] {
  border-color: rgba(91,124,255,.36);
  background: #fbfcff;
}

.v16-queue-item[data-state="error"] {
  border-color: rgba(201,66,85,.28);
}

.v16-thumb-button {
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 13px;
  padding: 0;
  overflow: hidden;
  background: #edf1f9;
  display: grid;
  place-items: center;
}

.v16-thumb-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v16-item-copy {
  min-width: 0;
}

.v16-item-copy strong,
.v16-item-copy span {
  display: block;
}

.v16-item-copy strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--v15-ink);
  font-size: 13px;
}

.v16-item-copy span {
  margin-top: 4px;
  color: var(--v15-muted);
  font-size: 11.5px;
  line-height: 1.35;
}

.v16-item-result {
  min-width: 0;
  text-align: right;
}

.v16-item-result strong,
.v16-item-result span {
  display: block;
}

.v16-item-result strong {
  font-size: 12.5px;
}

.v16-item-result span {
  margin-top: 4px;
  color: var(--v15-muted);
  font-size: 10.8px;
}

.v16-state {
  display: inline-flex !important;
  width: fit-content;
  margin-left: auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: #f0f3f9;
  color: var(--v15-muted) !important;
  font-size: 10px !important;
  font-weight: 820;
}

.v16-state[data-tone="success"] {
  color: var(--v15-success) !important;
  background: rgba(23,139,98,.09);
}

.v16-state[data-tone="error"] {
  color: var(--v15-danger) !important;
  background: rgba(201,66,85,.08);
}

.v16-state[data-tone="processing"] {
  color: var(--v15-accent-dark) !important;
  background: rgba(91,124,255,.10);
}

.v16-item-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.v16-small-button {
  min-width: 34px;
  min-height: 34px;
  border: 1px solid var(--v15-line);
  border-radius: 10px;
  background: #fff;
  color: var(--v15-muted);
  padding: 7px 9px;
  font-size: 11px;
  font-weight: 760;
}

.v16-small-button:hover:not(:disabled) {
  color: var(--v15-ink);
  border-color: #bdcae3;
  background: #f8faff;
}

.v16-small-button[data-action="remove"]:hover:not(:disabled) {
  color: var(--v15-danger);
  border-color: rgba(201,66,85,.35);
  background: rgba(201,66,85,.05);
}

.v16-small-button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.v16-total-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  margin-top: 12px;
}

.v16-total-stat {
  min-width: 0;
  border: 1px solid var(--v15-line);
  border-radius: 14px;
  background: #fbfcff;
  padding: 11px;
}

.v16-total-stat span,
.v16-total-stat strong {
  display: block;
}

.v16-total-stat span {
  color: var(--v15-muted);
  font-size: 10.8px;
  margin-bottom: 5px;
}

.v16-total-stat strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.v16-actions-three {
  grid-template-columns: 1fr 1fr;
}

.v16-actions-three .v16-full {
  grid-column: 1 / -1;
}

.v16-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
}

.v16-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(7,18,43,.58);
  backdrop-filter: blur(5px);
}

.v16-modal-card {
  position: relative;
  z-index: 1;
  width: min(900px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(7,18,43,.28);
  padding: 16px;
}

.v16-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.v16-modal-title {
  min-width: 0;
}

.v16-modal-title strong,
.v16-modal-title span {
  display: block;
}

.v16-modal-title strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 15px;
}

.v16-modal-title span {
  margin-top: 3px;
  color: var(--v15-muted);
  font-size: 11.5px;
}

.v16-modal-preview {
  min-height: 330px;
  max-height: calc(100vh - 190px);
  border: 1px solid var(--v15-line);
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 12px;
  background: #f4f7fd;
}

.v16-modal-preview img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 220px);
  object-fit: contain;
}

.v16-modal-preview.is-checker {
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #edf1f8 25%, transparent 25%),
    linear-gradient(-45deg, #edf1f8 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #edf1f8 75%),
    linear-gradient(-45deg, transparent 75%, #edf1f8 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}

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

@media (max-width: 980px) {
  .v16-batch-editor {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .v16-mode-tabs {
    width: 100%;
  }

  .v16-mode-tabs a {
    flex: 1;
  }

  .v16-queue-item {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 9px;
  }

  .v16-thumb-button {
    width: 48px;
    height: 48px;
  }

  .v16-item-result {
    grid-column: 2 / 3;
    text-align: left;
  }

  .v16-state {
    margin-left: 0;
  }

  .v16-item-actions {
    grid-column: 3;
    grid-row: 1 / span 2;
    flex-direction: column;
  }

  .v16-small-button {
    min-width: 40px;
  }

  .v16-total-stats {
    grid-template-columns: 1fr 1fr;
  }

  .v16-queue-empty {
    min-height: 260px;
  }

  .v16-modal {
    padding: 8px;
  }

  .v16-modal-card {
    max-height: calc(100vh - 16px);
    border-radius: 18px;
    padding: 11px;
  }

  .v16-modal-head {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .v16-progress-bar,
  .v16-queue-item,
  .v16-mode-tabs a {
    transition: none;
  }
}
