:root {
  --forest:#123c2f;
  --forest-2:#1d5a45;
  --lime:#b9d94a;
  --cream:#f7f3e9;
  --paper:#fffdf8;
  --ink:#17211d;
  --muted:#6f7b75;
  --line:#dfe6df;
  --danger:#b42318;
}

* { box-sizing:border-box; }

body {
  margin:0;
  color:var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(185,217,74,.16), transparent 28%),
    linear-gradient(180deg,#0d3025 0 430px,var(--cream) 430px);
  font-family:"Alexandria",Tahoma,Arial,sans-serif;
}

button,input { font:inherit; }
button { cursor:pointer; }

.topbar {
  width:min(1240px,calc(100% - 40px));
  margin:auto;
  padding:22px 0;
  display:flex;
  justify-content:space-between;
  align-items:center;
  color:#fff;
}

.back-link {
  display:inline-flex;
  align-items:center;
  gap:9px;
  color:#d9e9df;
  text-decoration:none;
  font-size:13px;
}
.back-link span { font-size:20px; }
.back-link:hover { color:#fff; }

.brand-mark { font-family:"DM Sans",sans-serif; font-weight:700; letter-spacing:2px; }
.brand-mark span { color:var(--lime); }

main { width:min(1240px,calc(100% - 40px)); margin:auto; padding-bottom:70px; }

.hero {
  min-height:310px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 390px;
  align-items:center;
  gap:54px;
  color:#fff;
}

.eyebrow,.section-kicker,.report-label {
  color:var(--lime);
  font-family:"DM Sans",sans-serif;
  font-size:12px;
  font-weight:700;
  letter-spacing:2.2px;
}

.hero h1 { margin:10px 0 12px; font-size:58px; line-height:1.1; }
.hero h1 span { color:var(--lime); }
.hero p { max-width:680px; margin:0; color:#cbded4; font-size:15px; line-height:1.9; }
.feature-pills { display:flex; flex-wrap:wrap; gap:9px; margin-top:24px; }
.feature-pills span {
  padding:8px 13px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:999px;
  background:rgba(255,255,255,.06);
  color:#eaf4ee;
  font-size:11px;
}

.hero-visual {
  position:relative;
  height:230px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:34px;
  background:linear-gradient(145deg,rgba(255,255,255,.08),rgba(255,255,255,.02));
  overflow:hidden;
}
.hero-visual svg { position:absolute; inset:20px; width:calc(100% - 40px); height:calc(100% - 40px); }
.hero-visual .board { fill:#d7a863; }
.hero-visual .board-hole { fill:#9c713a; }
.hero-visual .knife { fill:#e7efeb; stroke:#fff; stroke-width:2; }
.hero-visual .handle { fill:#25352e; }
.hero-visual .veg-sticks rect { fill:var(--lime); }
.board-lines { position:absolute; inset:0; opacity:.16; background:repeating-linear-gradient(25deg,transparent 0 19px,#fff 20px); }

.upload-card {
  position:relative;
  padding:34px;
  border-radius:28px;
  background:var(--paper);
  box-shadow:0 24px 60px rgba(25,45,36,.15);
}
.step-number {
  position:absolute;
  top:-20px;
  right:34px;
  width:54px;
  height:54px;
  display:grid;
  place-items:center;
  border-radius:17px;
  color:var(--forest);
  background:var(--lime);
  font-family:"DM Sans",sans-serif;
  font-weight:700;
  box-shadow:0 10px 22px rgba(92,119,23,.28);
}
.upload-heading { display:flex; justify-content:space-between; align-items:end; gap:20px; padding-right:74px; }
.section-kicker { color:var(--forest-2); }
.upload-heading h2 { margin:6px 0 0; font-size:27px; }
.privacy-note { color:var(--muted); font-size:11px; }

.dropzone {
  position:relative;
  min-height:190px;
  margin-top:24px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:2px dashed #a9bdb2;
  border-radius:22px;
  background:#f5f9f5;
  transition:.2s ease;
  cursor:pointer;
}
.dropzone:hover,.dropzone.dragging { border-color:var(--forest-2); background:#edf6ef; transform:translateY(-2px); }
.dropzone input { position:absolute; inset:0; width:100%; opacity:0; cursor:pointer; }
.dropzone strong { font-size:17px; }
.dropzone > span:last-child { color:var(--muted); font-size:12px; }
.drop-icon {
  width:52px;
  height:52px;
  display:grid;
  place-items:center;
  border-radius:16px;
  color:#fff;
  background:var(--forest);
}
.drop-icon svg,.extract-button svg,.search-box svg { fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.drop-icon svg { width:26px; }

.selected-files { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:15px; }
.file-chip {
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
  padding:13px 15px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
}
.file-chip .file-type { flex:0 0 auto; padding:5px 7px; border-radius:7px; background:#e8f3ea; color:var(--forest-2); font:700 10px "DM Sans",sans-serif; }
.file-chip div { min-width:0; }
.file-chip strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }
.file-chip small { color:var(--muted); font-size:10px; }

.extract-button {
  width:100%;
  min-height:58px;
  margin-top:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:13px;
  border:0;
  border-radius:16px;
  color:#fff;
  background:linear-gradient(135deg,var(--forest),var(--forest-2));
  font-weight:800;
  box-shadow:0 14px 26px rgba(18,60,47,.18);
}
.extract-button svg { width:20px; }
.extract-button:disabled { cursor:not-allowed; opacity:.42; box-shadow:none; }
.extract-button.loading { pointer-events:none; }
.extract-button.loading svg { animation:moveArrow .8s ease-in-out infinite alternate; }
@keyframes moveArrow { to { transform:translateX(-7px); } }

.status { min-height:22px; margin-top:12px; text-align:center; color:var(--muted); font-size:12px; }
.status.error { color:var(--danger); font-weight:700; }
.status.ok { color:var(--forest-2); font-weight:700; }

.results { margin-top:30px; }
.result-toolbar { display:flex; justify-content:space-between; gap:16px; margin-bottom:14px; }
.search-box {
  flex:1;
  max-width:560px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 15px;
  border:1px solid #d5ded7;
  border-radius:14px;
  background:#fff;
}
.search-box svg { flex:0 0 auto; width:19px; color:var(--muted); }
.search-box input { width:100%; height:48px; border:0; outline:0; background:transparent; }
.toolbar-actions { display:flex; gap:9px; }
.toolbar-actions button { min-height:48px; padding:0 18px; border-radius:13px; font-weight:700; }
.secondary-button { border:1px solid #cbd7cf; color:var(--forest); background:#fff; }
.primary-button { border:1px solid var(--forest); color:#fff; background:var(--forest); }
.toolbar-actions button:disabled { cursor:wait; opacity:.65; }

.report-sheet { overflow:hidden; border-radius:26px; background:#fff; box-shadow:0 20px 52px rgba(30,55,43,.12); }
.report-header {
  display:flex;
  justify-content:space-between;
  gap:24px;
  align-items:center;
  padding:29px 32px;
  color:#fff;
  background:
    radial-gradient(circle at 15% 20%,rgba(185,217,74,.18),transparent 30%),
    linear-gradient(135deg,#123c2f,#1e5d47);
}
.report-label { display:block; margin-bottom:7px; }
.report-header h2 { margin:0; font-size:34px; }
.report-header h2 small { margin-right:10px; color:#bcd3c7; font:700 14px "DM Sans",sans-serif; }
.report-header p { margin:9px 0 0; color:#c9ddd2; font-size:11px; }
.report-kpis { display:flex; gap:10px; }
.report-kpis div { min-width:116px; padding:13px 16px; border:1px solid rgba(255,255,255,.12); border-radius:16px; background:rgba(255,255,255,.08); text-align:center; }
.report-kpis strong { display:block; color:var(--lime); font:700 24px "DM Sans",sans-serif; }
.report-kpis span { color:#d7e7de; font-size:10px; }

.table-wrap { overflow-x:auto; }
table { width:100%; border-collapse:collapse; min-width:760px; }
thead { background:#e3eccf; }
th { padding:16px 18px; color:#244535; font-size:12px; text-align:right; white-space:nowrap; }
td { padding:13px 18px; border-bottom:1px solid #edf0ed; vertical-align:middle; }
tbody tr { transition:.15s; }
tbody tr:nth-child(even) { background:#fbfcfa; }
tbody tr:hover { background:#f1f7ef; }
.ingredient-name { font-size:15px; font-weight:700; }
.cutting-details-column { width:360px; }
.cutting-details { display:flex; flex-direction:column; gap:8px; }
.cutting-detail-line {
  display:grid;
  grid-template-columns:64px minmax(125px,1fr) 82px;
  align-items:center;
  gap:12px;
}
.cutting-method-label {
  color:#214c3a;
  font-size:14px;
  font-weight:800;
  line-height:1.45;
}
.cutting-method-weight {
  direction:ltr;
  flex:0 0 auto;
  padding:5px 8px;
  border-radius:8px;
  color:#647169;
  background:#eef2ed;
  font:700 11px "DM Sans",Tahoma,sans-serif;
  text-align:center;
}
.weight-value { direction:ltr; text-align:right; font:700 18px "DM Sans",Tahoma,sans-serif; color:#183e30; white-space:nowrap; }
.weight-column { width:165px; }
.cut-visual { width:76px; height:54px; margin:auto; display:grid; place-items:center; border-radius:14px; color:var(--forest-2); background:#eef5e8; }
.cut-visual svg { width:62px; height:42px; overflow:visible; }
.cut-visual svg * { vector-effect:non-scaling-stroke; }
.cutting-detail-line .cut-visual { width:62px; height:42px; margin:0; border-radius:11px; }
.cutting-detail-line .cut-visual svg { width:51px; height:33px; }
.empty-filter { padding:40px; text-align:center; color:var(--muted); }
.report-footer { display:flex; justify-content:space-between; padding:17px 24px; color:#87938c; background:#f7f9f6; font:700 9px "DM Sans",sans-serif; letter-spacing:1px; }

@media (max-width:800px) {
  body { background:linear-gradient(180deg,#0d3025 0 510px,var(--cream) 510px); }
  main,.topbar { width:min(100% - 24px,1240px); }
  .hero { grid-template-columns:1fr; gap:20px; padding:25px 0 40px; }
  .hero h1 { font-size:43px; }
  .hero-visual { display:none; }
  .upload-card { padding:28px 17px 20px; }
  .upload-heading { display:block; padding-right:58px; }
  .privacy-note { display:block; margin-top:8px; }
  .selected-files { grid-template-columns:1fr; }
  .result-toolbar,.report-header { align-items:stretch; flex-direction:column; }
  .search-box { max-width:none; }
  .toolbar-actions button { flex:1; }
  .report-header { padding:24px 19px; }
  .report-kpis div { flex:1; min-width:0; }
}

@media print {
  @page { size:A4 landscape; margin:10mm; }
  body { background:#fff; }
  .topbar,.hero,.upload-card,.no-print { display:none !important; }
  main { width:100%; padding:0; }
  .results { margin:0; }
  .report-sheet { box-shadow:none; border-radius:0; }
  .report-header { print-color-adjust:exact; -webkit-print-color-adjust:exact; }
  thead,.cut-visual { print-color-adjust:exact; -webkit-print-color-adjust:exact; }
  tr { break-inside:avoid; }
  td { padding:9px 13px; }
  .cut-visual { width:66px; height:44px; }
}
