:root {
  --green: #84BD00;
  --green-dark: #5e8800;
  --gray: #54585A;
  --gray-dark: #2f3133;
  --bg: #f5f7f2;
  --panel: #ffffff;
  --line: #dfe5d9;
  --text: #1f2424;
  --muted: #697174;
  --danger: #b42318;
  --warn: #9a6700;
  --ok: #0f7a2a;
  --shadow: 0 14px 35px rgba(47, 49, 51, 0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top left, rgba(132, 189, 0, .18), transparent 32rem), var(--bg);
}
button, input, textarea { font: inherit; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px clamp(14px, 4vw, 36px);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.brand-logo {
  width: 74px;
  height: 52px;
  object-fit: contain;
  background: #fff;
  border-radius: 10px;
  padding: 3px;
  border: 1px solid var(--line);
}
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 0; font-size: clamp(1.15rem, 2.2vw, 1.65rem); letter-spacing: -.02em; }
.brand-block p { margin: 2px 0 0; color: var(--green-dark); font-weight: 700; font-size: .86rem; text-transform: uppercase; letter-spacing: .04em; }

.container { width: min(1180px, calc(100vw - 24px)); margin: 24px auto 64px; }
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: clamp(18px, 3vw, 28px);
  margin: 18px 0;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  overflow: hidden;
  border-top: 7px solid var(--green);
}
.hero h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); letter-spacing: -.04em; margin-bottom: 10px; }
.hero p { color: var(--muted); max-width: 76ch; line-height: 1.5; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.eyebrow { color: var(--green-dark); font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-title h2 { margin: 4px 0 0; font-size: clamp(1.25rem, 2.5vw, 1.7rem); }
.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: grid; gap: 7px; }
.field span { color: var(--gray-dark); font-size: .9rem; font-weight: 700; }
input, textarea {
  width: 100%;
  border: 1px solid #cad4c2;
  border-radius: 14px;
  padding: 12px 13px;
  background: #fff;
  color: var(--text);
  outline: none;
}
textarea { resize: vertical; }
input:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(132, 189, 0, .18); }
.locked-brand {
  margin-top: 14px;
  color: var(--gray);
  padding: 12px 14px;
  border: 1px solid rgba(132,189,0,.35);
  background: rgba(132, 189, 0, .08);
  border-radius: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 16px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 800;
  white-space: nowrap;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--green); color: #1e260d; box-shadow: 0 8px 18px rgba(132,189,0,.25); }
.btn.ghost { background: #fff; color: var(--gray-dark); border-color: var(--line); }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.button-row { display: flex; gap: 10px; margin-top: 16px; }
.button-row.wrap { flex-wrap: wrap; }
.hidden { display: none !important; }

.drop-zone {
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
  min-height: 180px;
  padding: 22px;
  border: 2px dashed #b8c5ae;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(132,189,0,.08), rgba(84,88,90,.04));
  cursor: pointer;
}
.drop-zone.dragging { border-color: var(--green); background: rgba(132,189,0,.15); }
.drop-zone input { display: none; }
.drop-title { font-size: 1.15rem; font-weight: 900; }
.drop-subtitle { color: var(--muted); font-size: .92rem; }
.manual-form { margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: #fbfcfa; }
.manual-form h3 { margin-bottom: 14px; }

.summary-pills { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.summary-pills span, .status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 900;
  background: #eef3ea;
  color: var(--gray-dark);
}
.status-ok { background: rgba(15, 122, 42, .12); color: var(--ok); }
.status-warn { background: rgba(154, 103, 0, .12); color: var(--warn); }
.status-error { background: rgba(180, 35, 24, .12); color: var(--danger); }
.status-visual { background: rgba(84, 88, 90, .12); color: var(--gray-dark); }
.alerts {
  padding: 12px 14px;
  margin: 8px 0 16px;
  border-radius: 14px;
  background: rgba(154, 103, 0, .10);
  border: 1px solid rgba(154, 103, 0, .35);
  color: #684600;
  line-height: 1.45;
}
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; }
table { border-collapse: collapse; width: 100%; min-width: 1050px; background: #fff; }
th, td { padding: 10px 9px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; font-size: .88rem; }
th { background: var(--gray-dark); color: #fff; position: sticky; top: 0; z-index: 1; }
tbody tr:hover { background: #fbfcfa; }
td .mini-input, td .mini-textarea {
  border-radius: 10px;
  padding: 8px;
  font-size: .86rem;
}
td .mini-textarea { min-height: 52px; }
.empty { text-align: center; color: var(--muted); padding: 26px; }
.thumb { width: 74px; height: 52px; object-fit: cover; border-radius: 8px; border: 1px solid #c8c8c8; background: #f5f5f5; }
.confirm-line { display: flex; align-items: flex-start; gap: 9px; margin-top: 14px; color: var(--gray); font-weight: 700; }
.confirm-line input { width: auto; margin-top: 2px; }
.small-note { margin: 14px 0 0; color: var(--muted); line-height: 1.45; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  background: var(--gray-dark);
  color: #fff;
  padding: 12px 16px;
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0,0,0,.20);
  z-index: 30;
  font-weight: 800;
}

@media (max-width: 760px) {
  .app-header { align-items: flex-start; gap: 10px; }
  .brand-logo { width: 62px; height: 44px; }
  .hero, .grid.two { grid-template-columns: 1fr; }
  .hero-actions, .button-row, .section-title { align-items: stretch; flex-direction: column; }
  .btn { width: 100%; }
  .summary-pills { justify-content: flex-start; }
  .container { width: min(100% - 16px, 1180px); margin-top: 14px; }
  .panel { border-radius: 18px; }
  table { min-width: 980px; }
}

.selected-files {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid #dfe6d8;
  border-radius: 14px;
  background: #fbfcfa;
  color: var(--gray-dark);
  font-size: 13px;
}
.selected-files ul {
  margin: 8px 0 0 18px;
  padding: 0;
  max-height: 160px;
  overflow: auto;
}
.selected-files li {
  margin: 3px 0;
}
