.gestta-steps,
.gestta-source,
.gestta-counters,
.gestta-submit,
.gestta-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 14px 0;
}
.gestta-steps button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}
.gestta-steps button span {
  font-size: 0.82rem;
  color: #52647e;
}
.gestta-steps button[aria-current='step'] {
  background: #e6eeff;
  color: #143fba;
  border-color: #a7c1ff;
}
.gestta-source {
  align-items: stretch;
}
.gestta-source > div,
.gestta-source > label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid #dbe3ef;
  border-radius: 9px;
  background: #fff;
}
.gestta-source > div {
  flex: 1 1 290px;
}
.gestta-source > div > strong {
  flex: 1;
  overflow-wrap: anywhere;
}
.gestta-drop {
  display: grid;
  gap: 0.45rem;
  padding: 0.85rem;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.gestta-drop.is-dragging {
  outline: 2px solid #315bce;
  background: #eaf0fe;
}

.gestta-picker {
  position: relative;
  cursor: pointer;
  font-weight: 700;
  color: #214cbd;
}
.gestta-picker input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  cursor: pointer;
}
.gestta-picker:focus-within {
  outline: 2px solid #315bce;
  outline-offset: 4px;
}
.gestta-picker.is-disabled {
  opacity: 0.55;
  cursor: default;
}
.gestta-source[hidden],
.gestta-current[hidden],
.gestta-review [hidden],
.gestta-review[hidden] {
  display: none;
}
.gestta-counters {
  background: #fff;
  border: 1px solid #dbe3ef;
  padding: 12px;
  border-radius: 10px;
}
.gestta-counters button,
.gestta-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
}
.gestta-counters button {
  flex: 1 1 145px;
  justify-content: center;
  font-weight: 650;
}
.gestta-counters button[aria-pressed='true'] {
  border-color: currentColor;
}
.gestta-counters > span {
  padding: 0 10px;
}
.gestta-counters [data-counter='ready'],
.gestta-state[data-state='ready'] {
  background: #e5f5eb;
  color: #15583a;
}
.gestta-counters [data-counter='missing'],
.gestta-state[data-state='missing'] {
  background: #fff1d9;
  color: #814800;
}
.gestta-counters [data-counter='classify'],
.gestta-state[data-state='classify'] {
  background: #eee8ff;
  color: #5025a6;
}
.gestta-section,
.gestta-review-groups,
.gestta-group-detail {
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #fff;
}
.gestta-section {
  margin: 12px 0;
  overflow: hidden;
}
.gestta-section summary {
  padding: 13px 15px;
  background: #f3f6fb;
  cursor: pointer;
  font-weight: 750;
}
.gestta-section summary span {
  font-size: 0.82rem;
  margin-left: 10px;
  color: #52647e;
}
.gestta-section-list {
  padding: 0 10px;
}
.gestta-section-list > p {
  padding: 0 5px;
}
.gestta-lot-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(105px, 0.55fr) auto auto;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #e5ebf4;
  padding: 10px 5px;
}
.gestta-lot-row strong,
.gestta-review-groups strong {
  overflow-wrap: anywhere;
}
.gestta-lot-row small,
.gestta-review-groups small {
  display: block;
  margin-top: 4px;
  color: #52647e;
}
.gestta-file-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.gestta-state {
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 0.8rem;
}
.gestta-state svg {
  width: 14px;
  height: 14px;
}
.gestta-submit {
  justify-content: space-between;
  border: 1px solid #d2dff9;
  border-radius: 10px;
  background: #edf3ff;
  padding: 14px;
  margin-top: 20px;
}
.gestta-submit strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.gestta-submit strong svg {
  color: #177b50;
}
.gestta-submit p {
  margin: 4px 0 0;
}
.gestta-review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 16px;
}
.gestta-review-groups {
  display: grid;
  align-content: start;
  gap: 6px;
  max-height: 520px;
  overflow: auto;
  padding: 8px;
}
.gestta-review-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px;
  background: #f3f6fb;
}
.gestta-review-filter label,
.gestta-apply-all {
  margin: 0;
}
.gestta-review-groups button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  text-align: left;
}
.gestta-review-groups button[aria-pressed='true'] {
  background: #e6eeff;
  color: #1743ae;
  border-color: #8caefd;
}
.gestta-group-detail {
  padding: 12px;
  overflow-wrap: anywhere;
}
.gestta-group-detail h3 {
  margin: 0;
}
.gestta-group-detail select {
  width: 100%;
}
.gestta-group-detail details {
  background: #f3f6fb;
  border-radius: 7px;
  padding: 8px;
  margin: 10px 0;
}
.gestta-group-detail summary {
  cursor: pointer;
  font-weight: 650;
}
.gestta-search {
  align-items: end;
}
.gestta-search label {
  flex: 1 1 200px;
}
.gestta-search input {
  width: 100%;
}
.gestta-batch {
  margin: 14px 0;
}
.gestta-batch .row {
  align-items: end;
  flex-wrap: wrap;
}
.gestta-preview {
  min-width: 1000px;
}
.gestta-preview td {
  vertical-align: top;
  min-width: 175px;
  overflow-wrap: anywhere;
}
.gestta-preview td:first-child {
  min-width: 220px;
}
.gestta-preview label {
  margin-bottom: 8px;
}
.gestta-preview input:not([type='checkbox']),
.gestta-preview select {
  width: 100%;
}
.gestta-review-body .tablewrap {
  overflow: auto;
}
@media (max-width: 1060px) {
  .gestta-lot-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}
@media (max-width: 840px) {
  .gestta-review-layout {
    grid-template-columns: 1fr;
  }
  .gestta-review-groups {
    max-height: 210px;
  }
}
@media (max-width: 520px) {
  .gestta-lot-row {
    grid-template-columns: 1fr;
  }
  .gestta-lot-row button {
    justify-self: start;
  }
}
.gestta-local { display: inline-block; padding: 4px 10px; border-radius: 7px; background: #e9eef6; color: #354259; font-size: 13px; }
.gestta-setup { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.gestta-setup > div, .gestta-setup-state { display: flex; align-items: center; gap: 8px; }
.gestta-setup-state { font-weight: 650; }
.gestta-setup-state svg { width: 18px; height: 18px; color: #a25a20; }
.gestta-setup-state[data-ready="true"] svg { color: #21894e; }
.gestta-setup button, .gestta-setup .gestta-picker { border: 0; background: transparent; padding: 4px; font-size: 12px; color: #2855bb; }
.gestta-options { margin-left: auto; position: relative; }
.gestta-options summary { cursor: pointer; }
.gestta-options-panel { position: absolute; z-index: 2; right: 0; top: 26px; width: min(360px, 85vw); padding: 16px; display: grid; gap: 12px; background: white; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px #172e5420; }
.gestta-upload { display: grid; justify-items: center; align-content: center; gap: 12px; min-height: 248px; margin: 24px auto 14px; padding: 20px; max-width: 880px; border: 1px dashed #aebbd1; border-radius: 12px; background: #fff; }
.gestta-upload h2 { margin: 0; font-size: clamp(20px, 3vw, 26px); text-align: center; }
.gestta-upload-icon { display: grid; place-items: center; width: 50px; height: 50px; color: #253750; border-radius: 12px; background: #e7eefb; }
.gestta-upload-icon svg { width: 26px; height: 26px; }
.gestta-upload .primary { color: white; padding: 11px 30px; border-radius: 8px; background: #2455e6; }
.gestta-upload.has-zip { min-height: 0; max-width: none; padding: 10px 16px; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; justify-items: start; border: 0; background: #eaf0fb; }
.gestta-upload.has-zip strong { overflow-wrap: anywhere; }
.gestta-upload.has-zip .gestta-upload-icon { width: 32px; height: 32px; }
.gestta-upload.has-zip label:last-child { grid-column: 2 / -1; font-size: 12px; }
.gestta-upload.is-dragging, .gestta-setup .is-dragging { outline: 2px solid #315bce; background: #eaf0fe; }
#gestta-notice.gestta-analysis { padding: 8px 12px; border-left: 3px solid #4d70d4; background: #eaf0fb; }
#gestta-notice:empty { display: none; }
#gestta-notice { color: #465873; font-size: 13px; margin: 8px 0; }
.gestta-counters { background: transparent; border: 0; padding: 0; }
.gestta-counters button { background: transparent; }
.gestta-submit { justify-content: space-between; border: 0; background: transparent; padding-inline: 0; }
.gestta-catalog-exceptions:empty { display: none; }
.gestta-pending-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0; }
.gestta-pending-head h2 { margin: 0; }
.gestta-section { margin-block: 8px; }
.gestta-lot-row { padding-block: 8px; }
.gestta-upload.has-zip label:last-child { grid-column: auto; }
.gestta-upload.has-zip { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.gestta-submit { margin-top: 10px; }
.gestta-submit p { max-width: 60ch; }
@media (max-width: 640px) {
  .gestta-options { margin-left: 0; }
  .gestta-options-panel { left: 0; right: auto; }
  .gestta-upload.has-zip { grid-template-columns: auto minmax(0, 1fr); }
  .gestta-upload.has-zip label { grid-column: 2; }
}

