:root {
  --bg: #0a1812;
  --panel: rgba(11, 31, 22, 0.92);
  --line: rgba(124, 255, 181, 0.18);
  --text: #eef7f0;
  --muted: #99b5a3;
  --accent: #ffd447;
  --accent-2: #4cff9a;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(76, 255, 154, 0.18), transparent 28%),
    radial-gradient(circle at top left, rgba(255, 212, 71, 0.14), transparent 22%),
    linear-gradient(180deg, #08120d 0%, #0a1812 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.38), transparent 95%);
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  padding: 18px 22px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(16, 37, 28, 0.92), rgba(7, 20, 15, 0.94));
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-badge,
.section-kicker {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 78px;
  height: 64px;
  border-radius: 18px;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: #162413;
  background: linear-gradient(135deg, var(--accent), #fff2a6);
}

.brand h1,
.panel-heading h2,
.report-header h3 {
  margin: 0;
  font-family: "Barlow Condensed", sans-serif;
  line-height: 0.95;
}

.brand h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.78rem;
}

.dashboard {
  display: grid;
  grid-template-columns: 1.02fr 1.04fr 1.12fr;
  gap: 20px;
  align-items: start;
}

.panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(18, 44, 31, 0.72) 0%, rgba(7, 19, 14, 0.88) 100%);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel::after {
  content: "";
  position: absolute;
  inset: auto -20% -45% auto;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(76, 255, 154, 0.15), transparent 68%);
}

.panel-heading {
  position: relative;
  z-index: 1;
  margin-bottom: 18px;
}

.panel-heading.compact {
  margin-bottom: 10px;
}

.panel-heading h2 {
  font-size: 2rem;
}

.panel-heading h3,
.stat-section h4 {
  margin: 0;
  font-family: "Barlow Condensed", sans-serif;
}

.section-kicker {
  margin: 0 0 6px;
  color: var(--accent);
}

.dropzone {
  position: relative;
  display: block;
  margin-bottom: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.025);
  transition: 180ms ease;
  cursor: pointer;
}

.dropzone:hover {
  border-color: rgba(255, 212, 71, 0.58);
  background: rgba(255, 255, 255, 0.04);
}

.dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzone-content {
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  text-align: left;
}

.dropzone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  font-size: 2rem;
  color: #162413;
  background: linear-gradient(135deg, var(--accent), #ffe98e);
}

.dropzone strong,
.report-header h3 {
  font-size: 1.35rem;
}

.dropzone p,
.report-status,
.analysis-copy,
textarea,
input,
select {
  color: var(--muted);
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.preview-tile {
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #08120d;
}

.preview-tile img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.preview-tile span {
  display: block;
  padding: 10px 12px;
  font-size: 0.9rem;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.btn {
  border: 0;
  border-radius: 16px;
  min-height: 48px;
  padding: 0 18px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  color: #0d1b13;
  background: linear-gradient(135deg, var(--accent), #ffea93);
}

.btn-secondary {
  color: var(--text);
  background: linear-gradient(135deg, rgba(76, 255, 154, 0.18), rgba(76, 255, 154, 0.1));
  border: 1px solid rgba(76, 255, 154, 0.24);
}

.btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.progress-block {
  margin-bottom: 18px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.92rem;
}

.progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.progress-track span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.ocr-output textarea,
.results-grid textarea {
  min-height: 168px;
}

.ocr-output {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  padding: 14px;
}

.ocr-output summary {
  cursor: pointer;
  list-style: none;
}

.ocr-output summary::-webkit-details-marker {
  display: none;
}

.form-grid,
.results-grid {
  display: grid;
  gap: 14px;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 16px;
}

.results-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 16px;
}

label {
  display: block;
}

label span {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  padding: 14px 16px;
  outline: none;
  transition: border-color 140ms ease, background 140ms ease;
}

textarea:focus,
input:focus,
select:focus {
  border-color: rgba(255, 212, 71, 0.55);
  background: rgba(255, 255, 255, 0.06);
}

textarea {
  resize: vertical;
  min-height: 124px;
}

.report-status {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.report {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.report-header {
  padding: 16px 18px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 212, 71, 0.18), rgba(76, 255, 154, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-section {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.metric-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.metric strong {
  color: var(--text);
}

.metric span:last-child {
  color: var(--accent);
  font-weight: 700;
}

.analysis-copy {
  margin: 14px 0 0;
  line-height: 1.7;
}

.bet-cards {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.bet-card {
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 212, 71, 0.12), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 212, 71, 0.22);
}

.bet-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

.hidden {
  display: none !important;
}

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

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 18px, 1480px);
    padding-top: 14px;
  }

  .topbar {
    padding: 16px;
    border-radius: 20px;
  }

  .brand {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-grid,
  .results-grid {
    grid-template-columns: 1fr;
  }

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

  .dropzone-content {
    flex-direction: column;
    text-align: center;
  }
}
