.upload-panel {
  min-height: 86px;
  padding: 14px;
  border: 1px dashed #b7c7d1;
  border-radius: 8px;
  background: #f7fbff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.upload-panel strong,
.upload-panel span {
  display: block;
}

.upload-panel span {
  margin-top: 4px;
  color: #607083;
  font-size: 12px;
}

.upload-button {
  min-height: 42px;
  border-radius: 8px;
  background: #214ee5;
  color: #ffffff;
  display: inline-grid;
  place-items: center;
  padding: 0 16px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 680px) {
.upload-panel {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Standard upload control: replaces browser-native "No File Chosen" wording. */
.file-upload-control {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 4px;
  border: 1px solid var(--brand-border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand-panel) 82%, #ffffff);
  color: var(--brand-text);
  overflow: hidden;
}

.file-upload-control input[type="file"] {
  position: absolute !important;
  inset: 0 !important;
  z-index: 2 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  cursor: pointer !important;
}

.file-upload-button,
.file-upload-status {
  min-height: 32px;
  display: inline-grid;
  align-items: center;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.2;
  text-transform: none;
}

.file-upload-button {
  justify-content: center;
  padding: 0 12px;
  background: var(--brand-primary);
  color: var(--brand-on-primary);
  font-weight: 950;
  white-space: nowrap;
}

#root .workspace .file-upload-control .file-upload-button {
  border: 1px solid var(--brand-primary) !important;
  background: var(--brand-command-active-gradient) !important;
  color: var(--brand-on-primary) !important;
}

.file-upload-status {
  min-width: 0;
  justify-content: start;
  padding: 0 8px;
  color: var(--brand-text);
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#root .workspace .file-upload-control .file-upload-status {
  color: var(--brand-text) !important;
}

.file-upload-control input[type="file"]::file-selector-button {
  border: 0 !important;
  background: var(--brand-primary) !important;
  color: var(--brand-on-primary) !important;
}

@media (max-width: 640px) {
.file-upload-control {
    grid-template-columns: minmax(0, 1fr);
  }

.file-upload-button,
.file-upload-status {
    width: 100%;
  }
}
