.workspace {
  position: relative;
  z-index: 3;
  margin-top: -25px;
}

.panel {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.panel-head {
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--ink-100);
}

.search-wrap {
  position: relative;
  min-width: 0;
}

.search-wrap svg {
  position: absolute;
  top: 50%;
  right: 17px;
  width: 20px;
  height: 20px;
  color: var(--ink-400);
  transform: translateY(-50%);
  pointer-events: none;
}

.search-input {
  width: 100%;
  min-height: 54px;
  padding: 0 50px 0 100px;
  color: var(--ink-900);
  background: var(--paper);
  border: 1px solid var(--ink-100);
  border-radius: 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.search-input::placeholder { color: var(--ink-400); }

.search-input:focus {
  background: var(--white);
  border-color: var(--red-400);
  box-shadow: 0 0 0 4px rgba(227, 22, 18, 0.09);
}

.clear-search {
  position: absolute;
  top: 50%;
  left: 11px;
  min-height: 34px;
  padding: 0 11px;
  color: var(--ink-500);
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  transform: translateY(-50%);
  transition: 0.2s ease;
}

.clear-search:hover {
  color: var(--red-600);
  border-color: var(--red-300);
}

.upload-button,
.secondary-button {
  min-height: 54px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 16px;
  font-weight: 800;
  white-space: nowrap;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.upload-button {
  color: var(--white);
  background: var(--red-500);
  border: 0;
  box-shadow: 0 13px 30px rgba(227, 22, 18, 0.25);
}

.upload-button:hover {
  background: var(--red-400);
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(227, 22, 18, 0.31);
}

.secondary-button {
  color: var(--ink-700);
  background: var(--white);
  border: 1px solid var(--ink-200);
}

.secondary-button:hover {
  color: var(--red-600);
  border-color: var(--red-300);
}

.upload-button svg,
.secondary-button svg {
  width: 20px;
  height: 20px;
}

.file-input { display: none; }

.status-bar[hidden],
.result-meta[hidden] {
  display: none !important;
}

.status-bar {
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink-500);
  background: #fcfcfd;
  border-bottom: 1px solid var(--ink-100);
  font-size: 12px;
}

.file-meta,
.result-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.file-meta strong,
.result-meta strong {
  color: var(--ink-900);
  font-weight: 800;
}

.file-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ink-300);
}

.file-dot.loaded {
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(49, 212, 124, 0.12);
}

.file-list {
  display: flex;
  gap: 8px;
  padding: 12px 22px;
  overflow-x: auto;
  background: var(--paper);
  border-bottom: 1px solid var(--ink-100);
}

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

.file-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  color: var(--ink-600);
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-pill);
  font-size: 11px;
  cursor: pointer;
}

.file-chip:hover {
  color: var(--red-600);
  border-color: var(--red-300);
}

.file-chip.selected,
.file-chip:has(.file-selector:checked) {
  color: var(--red-700);
  background: var(--red-50);
  border-color: var(--red-300);
}

.file-selector {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--red-500);
}
