


/* Image Optimizer visual shell and Tool Panel integration. */
.rs-app {
  --rs-bg: #070b14;
  --rs-bg-elevated: #0d1320;
  --rs-panel: #121828;
  --rs-control: #111827;
  --rs-border: rgba(148, 163, 184, 0.18);
  --rs-text: #f7f8fb;
  --rs-text-muted: #9ba5b7;
  --rs-accent-blue: #3f7cff;
  --rs-accent-violet: #7c3ff2;
  --rs-success: #65d38e;
  --rs-radius-panel: 20px;
  --rs-radius-control: 13px;
  --rs-radius-pill: 999px;
  --rs-shadow-panel: 0 18px 60px rgba(0, 0, 0, 0.24);
  width: min(100%, 1720px);
  margin: 0;
  color: var(--rs-text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.rs-stage03-file-input {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.rs-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 72% 32%, rgba(51, 65, 148, 0.16), transparent 32%),
    radial-gradient(circle at 15% 10%, rgba(55, 72, 160, 0.10), transparent 28%),
    linear-gradient(180deg, #0a0f1c 0%, var(--rs-bg) 100%);
}











.rs-workzone {
  position: relative;
  height: auto;
  min-height: 0;
  overflow: visible;
  background: transparent;
}

.rs-workzone::before {
  display: none;
}

.rs-work-container.dp-tool {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  overflow: visible;
}

.rs-workspace {
  display: grid;
  grid-template-columns: 365px minmax(0, 1fr);
  gap: 24px;
}

.rs-tool-panel,
.rs-dropzone,
.rs-info-zone {
  border: 1px solid var(--rs-border);
  background: linear-gradient(180deg, rgba(18, 25, 40, 0.96), rgba(12, 18, 29, 0.96));
  box-shadow: var(--rs-shadow-panel);
}

.rs-tool-panel {
  display: flex;
  flex-direction: column;
  min-height: 780px;
  padding: 28px 24px 24px;
  border-radius: var(--rs-radius-panel);
}

.rs-tool-group {
  margin: 0 0 18px;
  padding: 0 0 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.rs-tool-label {
  display: block;
  margin: 0 0 10px;
  color: #d9deea;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.rs-select-control,
.rs-input-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 0 17px;
  border: 1px solid rgba(148, 163, 184, 0.21);
  border-radius: var(--rs-radius-control);
  background: linear-gradient(180deg, #141b2a, #101724);
  color: #f5f7fa;
  font-size: 15px;
  line-height: 1.4;
}

.rs-select-control select,
.rs-input-control input {
  width: 100%;
  min-width: 0;
  height: 44px;
  min-height: 44px;
  padding-top: 0;
  padding-bottom: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

.rs-select-control select {
  appearance: none;
  cursor: pointer;
}

.rs-select-control select option {
  background: #141b2a;
  color: #f5f7fa;
}

#rsWidthInput::placeholder {
  color: #7d889b;
  opacity: 1;
}

.rs-tool-group--rename {
  display: block;
}

.rs-rename-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 10px;
}

.rs-rename-heading .rs-tool-label {
  margin: 0;
}

.rs-rename-control {
  height: 46px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.21);
  border-radius: var(--rs-radius-control);
  background: linear-gradient(180deg, #141b2a, #101724);
}

.rs-rename-name {
  width: 100%;
  height: 44px;
  min-width: 0;
  padding: 0 17px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f5f7fa;
  font: inherit;
  font-size: 15px;
  line-height: 44px;
}

.rs-rename-control:focus-within {
  outline: 2px solid rgba(90, 124, 255, 0.95);
  outline-offset: 2px;
}

.rs-rename-name:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.rs-rename-enable {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.rs-rename-enable input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #6f7fff;
  cursor: pointer;
}

.rs-rename-enable input:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.rs-select-control:focus-within,
.rs-input-control:focus-within,
.rs-rename-enable input:focus-visible,
.rs-segment:focus-visible,
.rs-browse-button:focus-visible,
.rs-reset-selection:focus-visible,
.rs-thumb-remove:focus-visible {
  outline: 2px solid rgba(90, 124, 255, 0.95);
  outline-offset: 2px;
}

.rs-input-control {
  color: #737e91;
}

.rs-inline-control {
  display: inline-flex;
  flex: 1;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.rs-control-icon,
.rs-chevron {
  color: #d4d9e3;
  font-size: 18px;
}

.rs-control-icon--compression {
  color: #8567ff;
}

.rs-segmented {
  display: grid;
  grid-template-columns: 0.8fr 1.15fr 0.8fr;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--rs-radius-control);
  background: #101622;
}

.rs-segment {
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-right-color: rgba(148, 163, 184, 0.14);
  background: transparent;
  color: #aeb7c7;
  font-size: 12px;
  cursor: pointer;
}

.rs-segment:first-child {
  border-radius: 12px 0 0 12px;
}

.rs-segment:last-child {
  border-right-color: transparent;
  border-radius: 0 12px 12px 0;
}

.rs-segment.is-active {
  color: #fff;
  border-color: #687cff;
  background: rgba(70, 82, 157, 0.56);
  box-shadow: none;
}

.rs-tool-feedback {
  min-height: 48px;
  margin: 12px 2px 0;
  color: var(--rs-text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.rs-state-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #dce2ee;
  white-space: nowrap;
}

.rs-state-line strong {
  font-size: 12px;
  font-weight: 600;
}

.rs-state-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6f7a8e;
}

.rs-tool-feedback[data-workflow-state="ready"] .rs-state-dot,
.rs-tool-feedback[data-workflow-state="completed"] .rs-state-dot {
  background: var(--rs-success);
  box-shadow: 0 0 0 4px rgba(101, 211, 142, 0.1);
}

.rs-tool-feedback[data-workflow-state="uploading"] .rs-state-dot,
.rs-tool-feedback[data-workflow-state="processing"] .rs-state-dot {
  background: #7a8fff;
  box-shadow: 0 0 0 4px rgba(122, 143, 255, 0.12);
}

.rs-tool-feedback[data-workflow-state="partial"] .rs-state-dot {
  background: #f5bd62;
}

.rs-tool-feedback[data-workflow-state="failed"] .rs-state-dot,
.rs-tool-feedback[data-workflow-state="canceled"] .rs-state-dot {
  background: #ff8585;
}

.rs-state-message {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--rs-text-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rs-state-progress {
  overflow: hidden;
  height: 4px;
  margin: 8px 0 0 16px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
}

.rs-state-progress[hidden] {
  display: none;
}

.rs-state-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4d7cff, #8a58ef);
  transition: width 160ms ease;
}

.rs-state-progress.is-indeterminate span {
  width: 38%;
  animation: rs-processing-indeterminate 1.2s ease-in-out infinite;
}

.rs-failure-list {
  max-height: 94px;
  margin: 7px 0 0 30px;
  padding: 0;
  overflow: auto;
  color: #ffc3a1;
}

.rs-failure-list[hidden] {
  display: none;
}

@keyframes rs-processing-indeterminate {
  from { transform: translateX(-115%); }
  to { transform: translateX(265%); }
}

@media (prefers-reduced-motion: reduce) {
  .rs-state-progress span,
  .rs-thumb-remove {
    transition: none;
  }

  .rs-state-progress.is-indeterminate span {
    width: 100%;
    animation: none;
    opacity: 0.68;
  }
}

.rs-main-stage {
  min-width: 0;
}

.rs-dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 570px;
  padding: 42px;
  border-color: rgba(92, 114, 255, 0.78);
  border-radius: 24px;
  border-style: dashed;
  background:
    radial-gradient(circle at center, rgba(73, 88, 188, 0.20), transparent 32%),
    linear-gradient(180deg, rgba(22, 29, 57, 0.92), rgba(13, 19, 31, 0.96));
}

.rs-dropzone-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 94px;
  height: 94px;
  margin-bottom: 24px;
  border: 1px solid rgba(108, 124, 255, 0.5);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, rgba(74, 113, 255, 0.34), rgba(82, 44, 168, 0.26));
  box-shadow: 0 0 42px rgba(69, 88, 210, 0.24);
  color: #fff;
  font-size: 42px;
  line-height: 1;
}

.rs-dropzone-icon svg {
  width: 56px;
  height: 56px;
  overflow: visible;
  filter: drop-shadow(0 8px 16px rgba(33, 50, 132, 0.38));
}

.rs-dropzone h2 {
  margin: 0;
  color: var(--rs-text);
  font-size: clamp(28px, 3vw, 39px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.15;
  text-align: center;
}

.rs-dropzone > p {
  margin: 14px 0 26px;
  color: #abb4c7;
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
}

.rs-preview-cluster {
  display: grid;
  grid-template-columns: repeat(10, 42px);
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: min(760px, 100%);
  margin: 0 auto 26px;
}

.rs-preview-cluster:empty {
  display: none;
}

.rs-thumb,
.rs-more-files {
  position: relative;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.14);
  border-radius: 8px;
  background: #101827;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.rs-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rs-thumb-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  background: rgba(7, 11, 20, 0.86);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 140ms ease;
}

.rs-thumb:hover .rs-thumb-remove,
.rs-thumb-remove:focus-visible {
  opacity: 1;
}

.rs-more-files {
  display: grid;
  place-items: center;
  width: 82px;
  grid-column: span 2;
  color: #d7d4ff;
  background: linear-gradient(180deg, rgba(87, 64, 154, 0.76), rgba(48, 39, 90, 0.84));
  font-size: 12px;
  font-weight: 500;
}

.rs-browse-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 24px;
  border: 1px solid rgba(92, 112, 248, 0.58);
  border-radius: var(--rs-radius-pill);
  background: rgba(10, 17, 30, 0.34);
  color: #8397ff;
  font-size: 15px;
  cursor: pointer;
}

.rs-browse-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.rs-browse-button--secondary {
  color: #b1b9cc;
  border-color: rgba(148, 163, 184, 0.3);
}

.rs-selection-summary {
  min-height: 22px;
  margin: -12px 0 18px;
  color: #aeb7c7;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.rs-reset-selection {
  margin-left: 8px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: #91a3ff;
  font: inherit;
  cursor: pointer;
}

.rs-dropzone.is-dragging {
  border-color: #91a3ff;
  background:
    radial-gradient(circle at center, rgba(82, 100, 226, 0.3), transparent 36%),
    linear-gradient(180deg, rgba(25, 34, 69, 0.96), rgba(13, 19, 31, 0.98));
  box-shadow: inset 0 0 0 2px rgba(105, 126, 255, 0.18), var(--rs-shadow-panel);
}

.rs-rename-preview {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: calc(100% - 40px);
  padding: 8px 14px;
  border: 1px solid rgba(101, 211, 142, 0.42);
  border-radius: 999px;
  background: rgba(21, 72, 53, 0.72);
  box-shadow: 0 10px 28px rgba(4, 24, 17, 0.28);
  color: #a9ebbf;
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
  transform: translateX(-50%);
}

.rs-rename-preview[hidden] {
  display: none;
}

.rs-rename-preview-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.rs-info-zone {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
  padding: 14px;
  border-radius: var(--rs-radius-panel);
}

.rs-metric-card {
  min-width: 0;
  min-height: 142px;
  padding: 20px 18px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(20, 27, 43, 0.8), rgba(15, 21, 34, 0.68));
}

.rs-metric-icon {
  display: block;
  margin-bottom: 15px;
  width: 24px;
  height: 24px;
  line-height: 0;
}

.rs-metric-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.rs-metric-icon--blue { color: #557dff; }
.rs-metric-icon--cyan { color: #42a6ff; }
.rs-metric-icon--purple { color: #c15cff; }
.rs-metric-icon--violet { color: #9a6dff; }
.rs-metric-icon--green { color: var(--rs-success); }

.rs-metric-label {
  display: block;
  min-height: 34px;
  color: #b6bfce;
  font-size: 13px;
  line-height: 1.4;
}

.rs-metric-card strong {
  display: block;
  margin-top: 5px;
  color: var(--rs-text);
  font-size: clamp(21px, 2vw, 28px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.rs-metric-card small {
  display: block;
  margin-top: 6px;
  color: var(--rs-text-muted);
  font-size: 13px;
  line-height: 1.4;
}

.rs-metric-card.is-estimate strong {
  color: #d9d3ff;
}

.rs-metric-card.is-actual {
  border-color: rgba(101, 211, 142, 0.24);
}

.rs-legacy-app[hidden] {
  display: none !important;
}

@media (max-width: 1120px) {
  .rs-workspace {
    grid-template-columns: 320px minmax(0, 1fr);
  }

  

  .rs-info-zone {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}



@media (max-width: 820px) {
  

  

  .rs-workspace {
    grid-template-columns: 1fr;
  }

  .rs-tool-panel {
    min-height: auto;
  }

  .rs-dropzone {
    min-height: 480px;
    padding: 32px 20px;
  }

  .rs-info-zone {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .rs-info-zone {
    grid-template-columns: 1fr;
  }

  .rs-segmented {
    grid-template-columns: 1fr;
  }

  .rs-segment {
    border-right: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  }

  .rs-segment:last-child {
    border-bottom: 0;
  }

  .rs-preview-cluster {
    grid-template-columns: repeat(5, 42px);
  }
}
