:root {
  color-scheme: dark;
  --bg: #070707;
  --bg-2: #121214;
  --text: #f5f5f5;
  --muted: #a7a7ad;
  --stroke: rgba(255, 255, 255, 0.12);
  --card: rgba(255, 255, 255, 0.08);
  --card-strong: rgba(255, 255, 255, 0.12);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

body[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f4f5;
  --bg-2: #ffffff;
  --text: #101012;
  --muted: #5b5b63;
  --stroke: rgba(16, 16, 18, 0.1);
  --card: rgba(255, 255, 255, 0.7);
  --card-strong: rgba(255, 255, 255, 0.86);
  --shadow: 0 20px 60px rgba(40, 40, 48, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "SF Pro Display", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 24%),
    linear-gradient(135deg, var(--bg), var(--bg-2));
}

.shell {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  padding: 24px;
}

.card {
  background: linear-gradient(180deg, var(--card-strong), var(--card));
  border: 1px solid var(--stroke);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.sidebar {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: calc(100vh - 48px);
}

.content {
  display: grid;
  gap: 24px;
}

.hero,
.stat-card,
.content-grid > .card {
  padding: 24px;
}

.hero {
  display: grid;
  grid-template-columns: 1.4fr 280px;
  gap: 24px;
  align-items: end;
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 40px;
  line-height: 1;
}

h2 {
  font-size: clamp(32px, 5vw, 56px);
  line-height: 0.95;
  margin-bottom: 12px;
}

.muted {
  color: var(--muted);
}

.nav {
  display: grid;
  gap: 10px;
  margin: 24px 0;
}

.nav-item,
.ghost-button,
.capture-button {
  border: 1px solid var(--stroke);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 14px 16px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.nav-item.active,
.capture-button {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(140, 140, 145, 0.08));
}

.nav-item:hover,
.ghost-button:hover,
.capture-button:hover {
  transform: translateY(-1px);
}

.capture-button {
  display: grid;
  gap: 6px;
  min-height: 132px;
  place-content: center;
  text-align: left;
}

.stats-grid,
.content-grid {
  display: grid;
  gap: 18px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.content-grid {
  grid-template-columns: 1.2fr 0.8fr;
}

.stat-card span {
  display: block;
  color: var(--muted);
  margin-bottom: 10px;
}

.stat-card strong {
  font-size: 28px;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
}

.badge.warn {
  background: rgba(255, 184, 77, 0.12);
}

.ocr-result {
  margin-top: 20px;
  display: grid;
  gap: 12px;
}

.ocr-preview {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid var(--stroke);
}

.ocr-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ocr-metrics div,
.integration-item {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.05);
}

.integration-list {
  margin-top: 20px;
  display: grid;
  gap: 12px;
}

.theme-switch {
  display: grid;
  gap: 10px;
}

@media (max-width: 1080px) {
  .shell,
  .hero,
  .content-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
  }
}
