:root {
  --ink: #10212d;
  --muted: #62707c;
  --line: rgba(16, 33, 45, 0.1);
  --panel: rgba(255, 255, 255, 0.88);
  --panel-solid: #ffffff;
  --accent: #0f766e;
  --accent-dark: #0b4f4a;
  --accent-soft: rgba(15, 118, 110, 0.12);
  --warn: #9a3412;
  --warn-soft: rgba(154, 52, 18, 0.12);
  --shadow: 0 20px 60px rgba(16, 33, 45, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.16), transparent 24%),
    radial-gradient(circle at top right, rgba(234, 179, 8, 0.12), transparent 22%),
    linear-gradient(180deg, #fbfaf5 0%, #efeade 100%);
}

code {
  font-family: "IBM Plex Mono", monospace;
}

.shell {
  width: min(1380px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 14px 0 18px;
}

.hero {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 10px;
}

.hero-copy {
  min-width: 0;
}

.eyebrow,
.kicker {
  margin: 0 0 6px;
  color: var(--accent-dark);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.panel h2 {
  margin: 0;
  line-height: 1;
}

.hero h1 {
  font-size: clamp(1.45rem, 2.8vw, 2.8rem);
}

.hero-text,
.copy {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.89rem;
  line-height: 1.45;
  max-width: 68ch;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.chip {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(10px);
  font-size: 0.8rem;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: 12px;
  align-items: start;
}

.panel {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

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

.dropzone {
  display: block;
  margin-top: 12px;
  padding: 16px;
  border: 1.5px dashed rgba(15, 118, 110, 0.32);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.08), rgba(255, 255, 255, 0.97)),
    var(--panel-solid);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.dropzone:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow: 0 14px 28px rgba(15, 118, 110, 0.12);
}

.dropzone.drag-over {
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow: 0 16px 34px rgba(15, 118, 110, 0.18);
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.14), rgba(255, 255, 255, 0.98)),
    var(--panel-solid);
}

.dropzone-title {
  display: block;
  font-size: 0.96rem;
  font-weight: 700;
}

.dropzone-copy {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.88rem;
}

.file-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.file-empty {
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(16, 33, 45, 0.04);
  color: var(--muted);
  font-size: 0.86rem;
}

.file-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid rgba(16, 33, 45, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.file-item-meta {
  min-width: 0;
}

.file-item-name {
  font-size: 0.89rem;
  font-weight: 700;
  word-break: break-word;
}

.file-item-details {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
}

.file-remove,
.primary-button,
.ghost-button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

.file-remove {
  padding: 8px 10px;
  background: rgba(16, 33, 45, 0.06);
  color: var(--ink);
  font-size: 0.8rem;
  white-space: nowrap;
}

.primary-button {
  width: 100%;
  margin-top: 12px;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
  font-weight: 700;
}

.primary-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ghost-button {
  padding: 8px 12px;
  background: rgba(16, 33, 45, 0.06);
  color: var(--ink);
  font-size: 0.88rem;
}

.primary-button:hover:not(:disabled),
.ghost-button:hover,
.file-remove:hover {
  transform: translateY(-1px);
}

.status {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 13px;
  background: rgba(16, 33, 45, 0.05);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.status-ready {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.status-error {
  background: var(--warn-soft);
  color: var(--warn);
}

.summary,
.log,
.empty-state,
.preview-meta {
  border-radius: 15px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.summary {
  margin-top: 12px;
  padding: 13px 15px;
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.08), rgba(255, 255, 255, 0.92));
  white-space: pre-wrap;
}

.log {
  margin-top: 12px;
  padding: 13px 15px;
  background: rgba(16, 33, 45, 0.05);
  white-space: pre-wrap;
}

.preview-block {
  margin-top: 16px;
}

.preview-head {
  margin-bottom: 0;
}

.preview {
  margin-top: 12px;
}

.preview-meta {
  margin-bottom: 8px;
  padding: 9px 11px;
  background: rgba(16, 33, 45, 0.04);
  color: var(--muted);
}

.preview-content {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: auto;
  background: #fff;
  max-height: 320px;
}

.preview-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
}

.preview-table th,
.preview-table td {
  padding: 7px 9px;
  border-bottom: 1px solid rgba(16, 33, 45, 0.08);
  text-align: left;
  font-size: 0.78rem;
  white-space: nowrap;
}

.preview-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f5fbfa;
}

.preview-table tbody tr:nth-child(even) {
  background: rgba(16, 33, 45, 0.02);
}

.empty-state {
  margin-top: 12px;
  padding: 18px;
  color: var(--muted);
  background: rgba(16, 33, 45, 0.04);
}

.hidden {
  display: none;
}

@media (max-width: 1140px) {
  .workspace-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .hero {
    display: grid;
    gap: 12px;
  }

  .hero-chips {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100vw - 18px, 1380px);
    padding-top: 14px;
  }

  .panel {
    padding: 12px;
    border-radius: 16px;
  }

  .panel-head {
    flex-direction: column;
  }

  .hero h1 {
    line-height: 0.95;
  }

  .file-item {
    flex-direction: column;
  }
}
