:root {
  --ink: #15211a;
  --muted: #66736b;
  --line: #dfe6e1;
  --paper: #ffffff;
  --wash: #f2f6f3;
  --green: #176b45;
  --green-dark: #0f4f33;
  --green-soft: #e6f3eb;
  --orange: #c66821;
  --red: #a83e38;
  --shadow: 0 16px 50px rgba(23, 52, 35, .09);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #edf4ef 0, #f8faf8 360px, #f8faf8 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input { font: inherit; }
button { cursor: pointer; }
.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding-bottom: 52px; }
.topbar { min-height: 84px; display: flex; align-items: center; gap: 14px; }
.topbar h1 { margin: 1px 0 0; font-size: 20px; letter-spacing: -.02em; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: white; background: var(--green); font-size: 22px; font-weight: 800; box-shadow: 0 8px 20px rgba(23, 107, 69, .22); }
.eyebrow { margin: 0; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.local-badge { margin-left: auto; padding: 8px 12px; border: 1px solid #cde0d4; border-radius: 999px; color: var(--green-dark); background: rgba(255,255,255,.62); font-size: 12px; font-weight: 700; }
.hero { display: grid; grid-template-columns: 1fr 200px; gap: 30px; align-items: end; padding: 54px 56px; border-radius: 28px; color: white; background: radial-gradient(circle at 80% 0, #34885f, transparent 34%), linear-gradient(135deg, #153f2c, #176b45); box-shadow: var(--shadow); }
.hero .eyebrow { color: #a8d7bc; }
.hero h2 { max-width: 720px; margin: 10px 0 14px; font-size: clamp(31px, 4.2vw, 54px); line-height: 1.04; letter-spacing: -.045em; }
.lead { max-width: 760px; margin: 0; color: #d5e8dc; font-size: 16px; line-height: 1.65; }
.hero-stat { padding: 22px; border: 1px solid rgba(255,255,255,.16); border-radius: 20px; background: rgba(255,255,255,.08); backdrop-filter: blur(8px); }
.hero-stat strong { display: block; font-size: 42px; line-height: 1; }
.hero-stat span { display: block; margin-top: 9px; color: #d5e8dc; font-size: 13px; }
.card { margin-top: 22px; border: 1px solid rgba(210,221,214,.85); border-radius: 22px; background: var(--paper); box-shadow: var(--shadow); }
.upload-card { padding: 18px; }
.drop-zone { width: 100%; min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 1.5px dashed #9ab9a6; border-radius: 16px; color: var(--ink); background: #f7faf8; transition: .2s ease; }
.drop-zone:hover, .drop-zone.dragging { border-color: var(--green); background: var(--green-soft); transform: translateY(-1px); }
.drop-zone strong { font-size: 18px; }
.drop-zone span:last-child { color: var(--muted); font-size: 13px; }
.upload-icon { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 4px; border-radius: 50%; color: white; background: var(--green); font-size: 24px; }
.file-info { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 12px 4px; }
.file-info strong, .file-info span { display: block; }
.file-info span { margin-top: 5px; color: var(--muted); font-size: 13px; }
.progress-box { margin: 18px 10px 5px; }
.progress-label { display: flex; justify-content: space-between; margin-bottom: 8px; color: var(--muted); font-size: 13px; }
.progress-track { height: 9px; overflow: hidden; border-radius: 99px; background: #e7ece8; }
.progress-track div { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), #3aa56e); transition: width .18s ease; }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; }
.metric { padding: 22px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.83); }
.metric span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.metric strong { display: block; margin-top: 7px; font-size: 28px; }
.results { padding: 24px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.section-head h3 { margin: 5px 0 0; font-size: 23px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.button { padding: 10px 14px; border: 0; border-radius: 10px; font-size: 13px; font-weight: 750; }
.button.primary { color: white; background: var(--green); }
.button.primary:hover { background: var(--green-dark); }
.button.secondary { color: var(--green-dark); background: var(--green-soft); }
.button.ghost { color: var(--ink); border: 1px solid var(--line); background: white; }
.button.small { padding: 7px 10px; }
.button:disabled { cursor: not-allowed; opacity: .55; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th { padding: 11px 10px; color: var(--muted); background: var(--wash); font-size: 11px; text-align: left; text-transform: uppercase; letter-spacing: .06em; }
td { padding: 14px 10px; border-bottom: 1px solid #edf1ee; font-size: 13px; }
tbody tr:last-child td { border-bottom: 0; }
.check-cell { width: 36px; text-align: center; }
.market-badge, .status-badge { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 7px; font-size: 11px; font-weight: 800; }
.market-badge.shopee { color: #a84412; background: #fff0e8; }
.market-badge.tiktok { color: #30303a; background: #eeeeF2; }
.market-badge.unknown { color: #59605b; background: #edf1ee; }
.status-badge.ok { color: var(--green-dark); background: var(--green-soft); }
.status-badge.warn { color: #8a521e; background: #fff3df; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700; }
.notice { margin: 14px 10px 2px; padding: 13px 14px; border-radius: 10px; font-size: 13px; }
.notice.error { color: #7e2723; background: #fdebea; }
.privacy-note { display: flex; justify-content: center; gap: 7px; padding: 25px 10px 0; color: var(--muted); font-size: 12px; }
.privacy-note strong { color: var(--green-dark); }
.hidden { display: none !important; }

@media (max-width: 780px) {
  .shell { width: min(100% - 20px, 1180px); }
  .hero { grid-template-columns: 1fr; padding: 34px 25px; }
  .hero-stat { display: flex; align-items: center; gap: 10px; }
  .hero-stat span { margin-top: 0; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .section-head { align-items: flex-start; flex-direction: column; }
  .results { padding: 18px 12px; }
  .local-badge { display: none; }
  .privacy-note { flex-direction: column; align-items: center; }
}
