:root {
  --bg: #f3f6f8;
  --surface: #ffffff;
  --ink: #15202b;
  --ink-soft: #5b6b76;
  --line: #dde4e9;
  --brand: #009ee0;        /* Kerger blue (logo) */
  --brand-dark: #0a7fb0;   /* darker blue for buttons/links (white-text contrast) */
  --brand-orange: #ff5100; /* Kerger orange */
  --accent: var(--brand-dark);
  --accent-ink: #ffffff;
  --danger: #9a2b1e;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.05);
  --font: "Geist", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* ---- Top bar ---- */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 -3px 0 var(--brand);
}
.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo {
  height: 38px;
  width: auto;
  display: block;
}
.brand-divider {
  width: 1px;
  height: 26px;
  background: var(--line);
}
.brand-sub {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
}
.brand-name {
  font-weight: 600;
  font-size: 16px;
}
.role-badge {
  margin-left: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--brand-orange);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  vertical-align: middle;
}

/* Supervisor manage controls */
.manage {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.manage > summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  list-style: none;
}
.manage > summary::-webkit-details-marker {
  display: none;
}
.manage > summary::before {
  content: "\2699\FE0F";
  margin-right: 6px;
}
.manage-form {
  margin: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.manage-form label {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
}
.manage-form .row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.manage-form input[type="text"],
.manage-form select {
  flex: 1;
  min-width: 120px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 13px;
  background: var(--surface);
}
.manage-form input[type="file"] {
  flex: 1;
  min-width: 160px;
  font-size: 12px;
}
.manage-form input:focus,
.manage-form select:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: transparent;
}
.upload-panel {
  max-width: 560px;
  margin-bottom: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.btn-danger {
  align-self: flex-start;
  padding: 8px 14px;
  border: 1px solid #e3c4be;
  border-radius: var(--radius);
  background: #fbeae7;
  color: var(--danger);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
}
.btn-danger:hover {
  background: #f6d9d3;
}
.file-edit {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.file-edit:last-child {
  border-bottom: none;
}
.file-edit-folder {
  font-size: 11px;
  color: var(--ink-soft);
  flex-basis: 100%;
}
.file-edit-rename {
  display: flex;
  gap: 6px;
  flex: 1;
  min-width: 180px;
  margin: 0;
}
.file-edit-rename input[type="text"] {
  flex: 1;
  min-width: 120px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 12px;
}
.file-edit-rename input:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: transparent;
}
.file-edit-rename .btn,
.file-edit-delete .btn-danger {
  font-size: 12px;
  padding: 7px 11px;
}
.file-edit-delete {
  margin: 0;
}
.logout-form {
  margin: 0;
}
.nav {
  display: flex;
  align-items: center;
  gap: 10px;
}
.notice {
  background: #e3f4fc;
  border: 1px solid #b3e2f6;
  color: var(--brand-dark);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 20px;
}
.notice a {
  color: var(--brand-dark);
  font-weight: 500;
}

/* Flag-a-mistake (on product cards) */
.flag {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.flag summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--ink-soft);
  list-style: none;
}
.flag summary::-webkit-details-marker {
  display: none;
}
.flag summary::before {
  content: "\26A0\FE0F";
  margin-right: 6px;
}
.flag summary:hover {
  color: var(--ink);
}
.flag-form {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.flag-form textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
}
.flag-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: transparent;
}
.flag-form .btn {
  align-self: flex-start;
  font-size: 13px;
  padding: 8px 14px;
}

/* Mistakes page */
.page-title {
  font-size: 22px;
  margin: 8px 0 20px;
}
.archive-intro {
  margin: -12px 0 20px;
  font-size: 14px;
  color: var(--ink-soft);
}
.section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 24px 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.flag-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.flag-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.flag-card.is-solved {
  opacity: 0.72;
}
.flag-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.flag-code {
  font-weight: 600;
  font-size: 16px;
  color: var(--accent);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.flag-code:hover {
  text-decoration: underline;
}
.flag-date {
  font-size: 11px;
  color: var(--ink-soft);
  text-align: right;
}
.flag-comment {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.flag-card form {
  margin: 0;
}
.flag-card .btn,
.flag-card .btn-ghost {
  align-self: flex-start;
  font-size: 13px;
  padding: 8px 14px;
}

/* ---- Container ---- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

/* ---- Toolbar ---- */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  flex: 1;
  min-width: 260px;
}
.search input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 14px;
  font-family: inherit;
}
.search-box {
  position: relative;
  flex: 1;
  display: flex;
  min-width: 0;
}
.search-box input { width: 100%; }
.search-suggest {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(16, 24, 32, 0.12);
  overflow: hidden;
}
.search-suggest a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  color: inherit;
  text-decoration: none;
  font-size: 13px;
  border-top: 1px solid #eef1f3;
}
.search-suggest a:first-child { border-top: none; }
.search-suggest a.active, .search-suggest a:hover { background: rgba(0, 158, 224, 0.08); }
.search-suggest .sg-img {
  width: 34px; height: 34px; flex: none; border-radius: 6px; background: #f4f6f8;
  object-fit: contain; border: 1px solid #eef1f3;
}
.search-suggest .sg-code { font-weight: 700; flex: none; }
.search-suggest .sg-name { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-suggest .sg-all { justify-content: center; color: var(--accent); font-weight: 600; }
.search-suggest mark, .card-name mark {
  background: #fff1b8;
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}
.search-note {
  background: #f2f8fc;
  border: 1px solid #d6eaf6;
  border-radius: var(--radius);
  padding: 8px 12px;
  margin: 0 0 10px;
  font-size: 13px;
}
.search-note .muted { color: var(--ink-soft); }
.search-tips { font-size: 13px; color: var(--ink-soft); margin-top: 6px; }
.search input:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: transparent;
}
.count {
  font-size: 13px;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* ---- Buttons ---- */
.btn,
.btn-download {
  display: inline-block;
  padding: 10px 16px;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
}
.btn:hover,
.btn-download:hover {
  filter: brightness(1.08);
}
.btn-ghost {
  display: inline-block;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink-soft);
  font-size: 14px;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
}
.btn-ghost:hover {
  background: var(--bg);
  color: var(--ink);
}

/* ---- Grid ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.card-img {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #fafbf9;
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--line);
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
}
.img-fallback {
  display: none;
  font-size: 13px;
  color: var(--ink-soft);
}
.card-img.no-img img {
  display: none;
}
.card-img.no-img .img-fallback {
  display: block;
}
.card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.card-id {
  font-weight: 600;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.card-name {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.4;
}
.card-updated {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 2px;
}
.card-loc {
  font-size: 12px;
  color: var(--brand-dark);
  font-weight: 500;
  margin-top: 2px;
}
.files {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.file-row:last-child {
  border-bottom: none;
}
.file-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.file-label {
  font-size: 13px;
  font-weight: 500;
}
.file-sub {
  font-weight: 400;
  color: var(--ink-soft);
  font-size: 12px;
}
.region-flag {
  height: 11px;
  width: auto;
  margin-left: 6px;
  vertical-align: middle;
  border: 0.5px solid var(--line);
  border-radius: 2px;
}

/* Need a new picture */
.newpic-form {
  margin: 10px 0 0;
}
.btn-newpic {
  width: 100%;
  padding: 9px 14px;
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  background: #e3f4fc;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
}
.btn-newpic:hover {
  background: #d2edfa;
}

/* Photographer shoot screen */
.shoot-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.shoot-item {
  text-align: left;
  background: var(--surface);
  border: 0.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: inherit;
}
.shoot-item:hover {
  border-color: var(--brand);
}
.shoot-code {
  font-weight: 600;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}
.shoot-loc {
  font-size: 13px;
  color: var(--ink-soft);
}
.shoot-go {
  font-size: 13px;
  color: var(--brand-dark);
  font-weight: 500;
  margin-top: 4px;
}
.capture-panel {
  background: var(--surface);
  border: 0.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  max-width: 560px;
}
.capture-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}
.capture-code {
  font-weight: 600;
  font-size: 18px;
}
.capture-loc {
  font-size: 13px;
  color: var(--ink-soft);
}
.video-wrap {
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
#video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.capture-controls {
  margin-top: 14px;
}
.cc-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.cc-hint {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 6px;
  min-height: 14px;
}
.seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.seg-btn {
  padding: 8px 14px;
  border: none;
  background: var(--surface);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  border-right: 1px solid var(--line);
}
.seg-btn:last-child {
  border-right: none;
}
.seg-btn.active {
  background: var(--brand);
  color: #fff;
}
#ean {
  flex: 1;
  min-width: 120px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
}
.btn-capture {
  margin-top: 16px;
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: var(--radius);
  background: var(--brand-orange);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.btn-capture:hover {
  filter: brightness(1.05);
}

/* Supervisor review */
.review-card {
  background: var(--surface);
  border: 0.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 18px;
  max-width: 760px;
}
.review-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.review-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 14px;
}
.review-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.review-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.review-side img {
  width: 100%;
  border: 0.5px solid var(--line);
  border-radius: var(--radius);
  background: #fafbfc;
}
.review-missing {
  font-size: 13px;
  color: var(--ink-soft);
  padding: 24px 12px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.keep {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.btn-done {
  background: #e3f4fc !important;
  color: var(--brand-dark) !important;
  border-color: var(--brand) !important;
}
.review-progress {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}
.review-actions button {
  flex: 1;
  min-width: 130px;
  padding: 12px 10px;
  font-size: 14px;
}
.review-actions .key {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.12);
  font-size: 12px;
  font-weight: 600;
  margin-right: 6px;
}
.review-side img {
  max-height: 60vh;
  object-fit: contain;
}

/* Phone tweaks: stack pairs, size previews sensibly */
@media (max-width: 640px) {
  .topbar-inner { height: auto; padding: 10px 16px; flex-wrap: wrap; gap: 8px; }
  .brand-logo { height: 30px; }
  .nav { flex-wrap: wrap; gap: 6px; }
  .container { padding: 20px 16px 56px; }
  .review-pair { grid-template-columns: 1fr; }
  .review-side img { max-height: 46vh; }
  .review-card { padding: 14px; }
  .review-actions button { min-width: 0; flex: 1 1 45%; }
  .card-img { aspect-ratio: 1 / 1; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
  .video-wrap { aspect-ratio: 3 / 4; }
}
.file-date {
  font-size: 11px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.file-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}
.link {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.link:hover {
  text-decoration: underline;
}

.empty {
  padding: 48px 0;
  text-align: center;
  color: var(--ink-soft);
}
.cap-note {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--ink-soft);
}

/* ---- Login ---- */
.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 36px 32px;
  text-align: center;
}
.login-logo {
  width: 200px;
  max-width: 80%;
  height: auto;
  margin-bottom: 20px;
}
.login-card h1 {
  margin: 0 0 4px;
  font-size: 20px;
}
.login-sub {
  margin: 0 0 22px;
  font-size: 14px;
  color: var(--ink-soft);
}
.login-card form {
  text-align: left;
}
.login-card label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
}
.login-card input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 16px;
}
.login-card input:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: transparent;
}
.login-card button {
  width: 100%;
  padding: 11px;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
}
.login-card button:hover {
  filter: brightness(1.08);
}
.login-error {
  background: #fbeae7;
  color: var(--danger);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 18px;
}

/* ---- Nav dropdown menu ---- */
.nav-menu {
  position: relative;
}
.nav-menu summary {
  list-style: none;
  user-select: none;
}
.nav-menu summary::-webkit-details-marker {
  display: none;
}
.nav-menu[open] summary {
  background: var(--bg);
  color: var(--ink);
}
.nav-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 50;
  display: flex;
  flex-direction: column;
}
.nav-menu-list a {
  display: block;
  padding: 9px 12px;
  border-radius: 7px;
  color: var(--ink-soft);
  font-size: 14px;
  text-decoration: none;
}
.nav-menu-list a:hover {
  background: var(--bg);
  color: var(--ink);
}

/* ---- Supplier search ---- */
.sup-drop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px 16px;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 14px;
  margin-bottom: 16px;
}
.sup-drop.is-over {
  border-color: var(--brand);
  background: #e3f4fc;
}
.sup-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 14px;
  margin-top: 16px;
}
.sup-table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--brand-dark);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
}
.sup-table td {
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  vertical-align: top;
}
.sup-table .sup-info {
  color: var(--ink-soft);
  font-size: 13px;
}
.sup-sep {
  color: var(--line);
}
.sup-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sup-list-row .flag-head {
  margin: 0;
}
.sup-table .sup-info {
  word-break: break-word;
}
.sup-chip {
  display: inline-block;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 7px;
  margin: 2px 4px 2px 0;
  font-size: 12px;
  color: var(--ink-soft);
  max-width: 100%;
}
.sup-chip b {
  color: var(--ink);
  font-weight: 500;
}
@media (max-width: 700px) {
  .sup-table thead { display: none; }
  .sup-table tr { display: block; border-top: 1px solid var(--line); padding: 6px 0; }
  .sup-table td { display: block; border-top: none; padding: 4px 12px; }
}
.sup-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sup-rename-form {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.sup-rename-form input {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  width: 160px;
}
.sup-group {
  margin: 22px 0 0;
  font-size: 16px;
  color: var(--ink);
}
.sup-group-count {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-soft);
}

/* ---- Improvement idea panel ---- */
.idea-panel {
  margin-bottom: 20px;
}
.idea-panel textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  margin-bottom: 8px;
}
.idea-panel > summary::before {
  content: none; /* the summary text carries its own lightbulb */
}

/* ---- Returns ---- */
.return-panel { max-width: 720px; }
.return-panel > summary::before { content: none; }
.return-form label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
}
.return-form input[type="text"],
.return-form textarea {
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 13px;
  background: var(--surface);
  resize: vertical;
}
.return-form input:focus,
.return-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: transparent;
}
.return-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.return-reasons {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 2px 0 4px;
}
.return-reason {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.return-reason input {
  margin: 0;
  width: auto;
}
.return-reason-other {
  margin-top: 4px;
  max-width: 420px;
}
.return-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 13px;
  color: var(--ink-soft);
}
.return-fields strong {
  color: var(--ink);
  font-weight: 500;
}
.role-houston {
  background: #1f5f8b; /* distinguish the Houston account from the orange supervisor badge */
}

/* ---- Returns: header, actions, thumbnails ---- */
.returns-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.return-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.return-actions form { margin: 0; }
.return-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.return-thumbs img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: block;
}
.return-thumbs-edit {
  gap: 12px;
  margin-bottom: 16px;
}
.return-thumb {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.return-thumb img {
  width: 110px;
  height: 110px;
}
.return-thumb .btn-danger {
  font-size: 12px;
  padding: 5px 10px;
}

/* ---- Returns: header actions & filter bar ---- */
.returns-header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.returns-filter {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 0 0 20px;
}
.returns-filter input[type="search"] {
  flex: 1;
  min-width: 180px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  background: var(--surface);
}
.returns-filter select {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 13px;
  background: var(--surface);
}

/* Admin to-do counts in the menu (open reported mistakes, photos to review). */
.nav-badge {
  display: inline-block;
  min-width: 18px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #e5484d;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  vertical-align: 1px;
}
.nav-menu summary { white-space: nowrap; }
