:root {
  color-scheme: light;
  --bg: #f4f6f3;
  --surface: #ffffff;
  --surface-muted: #eef2ed;
  --text: #17201c;
  --muted: #5f6b64;
  --line: #d8ded8;
  --accent: #176c63;
  --accent-dark: #0f4d47;
  --warning: #8a5a13;
  --shadow: 0 18px 50px rgba(25, 38, 33, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.workspace {
  display: grid;
  gap: 18px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: 0;
}

.topbar p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.privacy {
  flex: 0 0 auto;
  border: 1px solid #aac9c4;
  color: var(--accent-dark);
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 700;
  background: #e7f3f0;
}

.drop-zone,
.queue-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.drop-zone {
  position: relative;
  min-height: 138px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px;
  cursor: pointer;
  outline: none;
}

.drop-zone:focus-visible,
.drop-zone.dragging {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(23, 108, 99, 0.14), var(--shadow);
}

.drop-zone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.drop-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-muted);
  color: var(--accent);
  font-size: 34px;
  line-height: 1;
}

.drop-zone strong,
.drop-zone span {
  display: block;
}

.drop-zone strong {
  font-size: 18px;
}

.drop-zone span {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 180px));
  gap: 12px;
  align-items: end;
}

button {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.queue-panel {
  min-width: 0;
  padding: 16px;
}

.file-list {
  display: grid;
  gap: 8px;
  max-height: 300px;
  overflow: auto;
}

.file-row {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  height: auto;
  padding: 10px 12px;
  text-align: left;
  border-color: var(--line);
  background: #fbfcfb;
}

.file-row.done .badge {
  background: #e7f3f0;
  color: var(--accent-dark);
}

.file-row.cleaning .badge {
  background: #fff3d8;
  color: var(--warning);
}

.file-row.error .badge {
  background: #fde8e5;
  color: #9b2c1f;
}

.file-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.file-main strong,
.file-main small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-main strong {
  color: var(--text);
  font-size: 14px;
}

.file-main small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.badge {
  display: inline-grid;
  place-items: center;
  min-width: 72px;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

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

h2 {
  font-size: 16px;
  letter-spacing: 0;
}

.panel-head span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.save-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding: 18px 0;
  }

  .topbar,
  .drop-zone {
    align-items: stretch;
    flex-direction: column;
  }

  .privacy {
    width: fit-content;
  }

  .controls {
    grid-template-columns: 1fr;
  }

  .drop-zone {
    min-height: 170px;
  }
}
