:root {
  --navy: #1B2A4A;
  --orange: #E8542F;
  --light: #F2F4F8;
  --grey: #5A6472;
  --line: #C9D0DB;
  --green: #1E8A4C;
}
* { box-sizing: border-box; margin: 0; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--light);
  color: #1a1a1a;
  padding-bottom: 40px;
}
#topbar {
  background: var(--navy);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 4px solid var(--orange);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { cursor: pointer; }
.brand-name { font-weight: 800; letter-spacing: 0.5px; display: block; }
.brand-sub { font-size: 11px; color: #b8c2d6; }
#boardBtn {
  background: var(--orange);
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
}
#app { max-width: 760px; margin: 0 auto; padding: 14px; }
h2 { color: var(--navy); margin: 10px 0; font-size: 18px; }
.search {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 12px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}
.card:active { background: #eef1f6; }
.card .title { font-weight: 700; color: var(--navy); }
.card .meta { font-size: 12px; color: var(--grey); }
.badge {
  background: var(--navy);
  color: #fff;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
}
.badge.done { background: var(--green); }
.badge.nochange { background: var(--grey); }
.pog-row { flex-direction: column; align-items: stretch; gap: 6px; }
.pog-top { display: flex; justify-content: space-between; align-items: center; }
.pog-checks { display: flex; gap: 14px; font-size: 13px; }
.pog-checks label { display: flex; align-items: center; gap: 5px; color: var(--grey); }
.pog-checks input { width: 18px; height: 18px; accent-color: var(--green); }
.section-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--grey);
  margin: 14px 0 6px;
}
.btn {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 11px 16px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}
.btn.orange { background: var(--orange); }
.btn-row { display: flex; gap: 10px; margin: 12px 0; flex-wrap: wrap; }
.prod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.prod {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  text-align: center;
}
.prod img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  background: #fff;
  cursor: zoom-in;
}
.prod .noimg {
  width: 100%;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light);
  color: var(--grey);
  font-size: 12px;
  border-radius: 6px;
}
.prod .pname { font-size: 11.5px; margin-top: 6px; line-height: 1.25; }
.prod .pupc { font-size: 10px; color: var(--grey); margin-top: 3px; }
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 20, 32, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}
#lightbox img { max-width: 100%; max-height: 82vh; object-fit: contain; }
#lightbox .cap { color: #fff; font-size: 14px; text-align: center; }
.progress-wrap { background: var(--line); border-radius: 999px; height: 10px; overflow: hidden; flex: 1; }
.progress-bar { background: var(--green); height: 100%; }
.board-row { display: flex; align-items: center; gap: 10px; }
.board-row .st { width: 120px; font-weight: 700; color: var(--navy); font-size: 14px; }
.board-row .pct { width: 90px; font-size: 12px; color: var(--grey); text-align: right; }
.gate {
  max-width: 340px;
  margin: 60px auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  text-align: center;
}
.gate input {
  width: 100%;
  padding: 12px;
  font-size: 18px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 12px 0;
}
#toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
  z-index: 60;
}
#toast.show { opacity: 1; }
.muted { opacity: 0.55; }
.gate input#nameIn { text-align: center; font-size: 15px; }
.pbadge {
  display: inline-block;
  margin-top: 5px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--light);
  color: var(--grey);
  border: 1px solid var(--line);
}
.pbadge.red { background: #FDEBE5; color: var(--orange); border-color: #F3C1B0; }
.board-row.muted { opacity: 0.5; }
.board-col { display: block; }
.board-last { font-size: 11px; color: var(--grey); margin-top: 5px; }
.board-col.muted { opacity: 0.5; }
.prod.cand { cursor: pointer; }
.prod.cand:active { outline: 3px solid var(--orange); }
.gate-msg {
  font-size: 13px;
  color: var(--orange);
  font-weight: 600;
  margin-top: 6px;
}
