:root {
  --bg: #f4f1ec;
  --ink: #141414;
  --accent: #ff6b3d;
  --accent-dark: #c6431f;
  --card: #ffffff;
  --muted: #5c5c5c;
  --outline: #e2ddd5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, #fff5e9 0%, var(--bg) 45%, #efe7db 100%);
  min-height: 100vh;
}

.shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.4em;
  font-size: 12px;
  color: var(--accent-dark);
  margin: 0 0 8px;
}

h1 {
  font-size: clamp(2.4rem, 3vw, 3.4rem);
  margin: 0 0 12px;
}

.subtitle {
  color: var(--muted);
  font-size: 1rem;
  max-width: 460px;
  margin: 0;
}

.status-card {
  background: var(--card);
  border: 1px solid var(--outline);
  border-radius: 16px;
  padding: 16px 20px;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 12px 30px rgba(17, 16, 12, 0.08);
}

.status-card strong {
  font-size: 1.1rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--outline);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 16px 30px rgba(17, 16, 12, 0.06);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.panel::after {
  content: "";
  position: absolute;
  top: 0;
  right: -40px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(255, 107, 61, 0.25), transparent 70%);
  pointer-events: none;
}

.panel h2 {
  margin: 0;
  font-size: 1.2rem;
}

.panel p {
  margin: 0;
  color: var(--muted);
}

.ingest-controls {
  width: 100%;
  margin-top: 8px;
}

.ingest-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.modal-body {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.modal-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

.modal-body select {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1.5px solid var(--outline);
  background: white;
  font-family: inherit;
}

.status-row {
  font-size: 0.9rem;
  color: var(--muted);
}

.action {
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  padding: 12px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  align-self: flex-start;
  font-weight: 600;
  text-decoration: none;
}

.action:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(255, 107, 61, 0.25);
}

.action.ghost {
  background: var(--accent);
  border: none;
  color: #fff;
}

.ghost.small {
  padding: 6px 12px;
  font-size: 0.85rem;
}

.log-panel {
  min-height: 240px;
}

.log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.log {
  background: #0f0f10;
  color: #f7f7f7;
  font-family: "DM Mono", monospace;
  font-size: 0.85rem;
  border-radius: 12px;
  padding: 16px;
  min-height: 160px;
  overflow-y: auto;
  white-space: pre-wrap;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}

.modal.open {
  display: flex;
}

.modal-card {
  background: #fff;
  border-radius: 18px;
  padding: 18px;
  max-width: 720px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-card pre {
  margin: 12px 0 0;
  font-family: "DM Mono", monospace;
  font-size: 0.85rem;
  background: #f6f3ef;
  border-radius: 12px;
  padding: 12px;
  max-height: 50vh;
  overflow-y: auto;
  white-space: pre-wrap;
}

@media (max-width: 600px) {
  .shell {
    padding: 32px 18px 60px;
  }

  .status-card {
    width: 100%;
  }
}
