:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --panel: #ffffff;
  --ink: #18202a;
  --muted: #687482;
  --line: #d9e0e6;
  --accent: #1868db;
  --accent-strong: #0f4fb0;
  --success-bg: #e7f6ef;
  --success-ink: #13734b;
  --danger-bg: #fff0ed;
  --danger-ink: #b33824;
  --shadow: 0 18px 50px rgba(18, 31, 46, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.auth-panel {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 32px;
}

.brand-block {
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.16;
}

h2 {
  margin-bottom: 10px;
  font-size: 17px;
}

.login-form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 13px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(24, 104, 219, 0.14);
}

button {
  border: 0;
  border-radius: 6px;
  min-height: 42px;
  padding: 0 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--accent-strong);
}

button:disabled {
  cursor: not-allowed;
  background: #dce3ea;
  color: #66717d;
}

.ghost {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.ghost:hover {
  background: #edf2f6;
}

.alert {
  border: 1px solid #ffd1c8;
  border-radius: 6px;
  padding: 10px 12px;
  background: var(--danger-bg);
  color: var(--danger-ink);
  font-size: 14px;
}

.alert.success {
  border-color: #bee8d2;
  background: var(--success-bg);
  color: var(--success-ink);
}

.auth-links {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.auth-links a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}

.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
}

.topbar div {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.topbar span {
  color: var(--muted);
  font-size: 14px;
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.nav-links a {
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
  background: #edf2f6;
  color: var(--ink);
}

.nav-links b {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  margin-left: 6px;
  border-radius: 999px;
  background: #d9452f;
  color: #fff;
  font-size: 11px;
  line-height: 1;
}

.workspace {
  width: min(1120px, calc(100% - 32px));
  margin: 28px auto 48px;
}

.summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 0;
}

.summary p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.status-pill {
  flex: none;
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--success-bg);
  color: var(--success-ink);
  font-size: 13px;
  font-weight: 700;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.module-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.module-card p {
  color: var(--muted);
  line-height: 1.6;
}

.module-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 2px 0 0;
}

.module-stats div {
  border-radius: 6px;
  padding: 9px 10px;
  background: #f0f4f7;
}

.module-stats dt {
  color: var(--muted);
  font-size: 12px;
}

.module-stats dd {
  margin: 4px 0 0;
  font-size: 16px;
  font-weight: 800;
}

.module-footnote {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.module-card button {
  width: 100%;
  margin-top: auto;
}

.module-card-link {
  border-color: rgba(24, 104, 219, 0.32);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  width: 100%;
  margin-top: auto;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.button-link:hover {
  background: var(--accent-strong);
}

.users-workspace {
  width: min(1180px, calc(100% - 32px));
}

.user-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.user-stats div,
.users-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(18, 31, 46, 0.06);
}

.user-stats div {
  padding: 16px;
}

.user-stats span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.user-stats strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  line-height: 1.1;
}

.users-panel {
  overflow: hidden;
}

.users-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.users-panel-head h2 {
  margin-bottom: 0;
}

.users-panel-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.users-table-shell {
  overflow-x: auto;
}

.users-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
}

.users-table th,
.users-table td {
  border-bottom: 1px solid #edf1f4;
  padding: 14px 18px;
  text-align: left;
  vertical-align: middle;
}

.users-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.users-table td {
  color: var(--ink);
  font-size: 14px;
}

.users-table td strong,
.users-table td small {
  display: block;
}

.users-table td small {
  margin-top: 4px;
  color: var(--muted);
}

.user-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.user-status.pending {
  background: #fff8e8;
  color: #8a5c0a;
}

.user-status.approved {
  background: var(--success-bg);
  color: var(--success-ink);
}

.user-status.rejected {
  background: #eef2f5;
  color: #596473;
}

.role-badge,
.tier-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 6px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
}

.role-badge.admin {
  background: #e7f6ef;
  color: #13734b;
}

.role-badge.member {
  background: #eef2f5;
  color: #596473;
}

.tier-badge.t1 {
  background: #edf2f6;
  color: #41505f;
}

.tier-badge.t2 {
  background: #eaf2ff;
  color: #155db9;
}

.tier-badge.t3 {
  background: #f1ecff;
  color: #6843b5;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.row-actions form {
  margin: 0;
}

.row-actions button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.danger-ghost {
  border-color: #f2c3ba;
  color: var(--danger-ink);
}

.danger-ghost:hover {
  background: var(--danger-bg);
}

.tier-action {
  color: #2d596d;
}

.tier-action:hover {
  background: #eaf3f6;
}

.empty-state {
  padding: 34px 20px;
  color: var(--muted);
  text-align: center;
}

.seed-notes-workspace {
  width: min(1360px, calc(100% - 32px));
}

.seed-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 0 18px;
}

.seed-heading p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.seed-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.notice {
  margin-bottom: 14px;
  border: 1px solid #f2d392;
  border-radius: 8px;
  padding: 11px 13px;
  background: #fff8e8;
  color: #8a5c0a;
  font-size: 13px;
}

.notice strong {
  display: block;
  margin-bottom: 6px;
}

.notice ul {
  margin: 0;
  padding-left: 18px;
}

.notice li + li {
  margin-top: 4px;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.metric-card,
.data-panel,
.table-tools,
.data-table-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(18, 31, 46, 0.06);
}

.metric-card {
  min-height: 110px;
  padding: 16px;
}

.metric-card span,
.metric-card small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.metric-card strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 28px;
  line-height: 1.1;
}

.seed-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 0.85fr;
  gap: 14px;
  margin-bottom: 14px;
}

.seed-grid.business-only {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.data-panel {
  min-height: 190px;
  padding: 18px;
}

.bar-row {
  display: grid;
  grid-template-columns: 112px 1fr 48px;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 13px;
}

.mini-bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eef3;
}

.mini-bar i {
  display: block;
  height: 100%;
  min-width: 3px;
  border-radius: 999px;
  background: var(--accent);
}

.mini-bar.hot i { background: #c84d3b; }
.mini-bar.quiet i { background: #19745b; }
.mini-bar.review i { background: #b97912; }
.mini-bar.up i { background: #19745b; }
.mini-bar.mid i { background: #2d639e; }
.mini-bar.down i { background: #b97912; }
.mini-bar.insufficient i { background: #697382; }

.status-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.status-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #edf1f4;
  padding-bottom: 10px;
}

.status-list dt {
  color: var(--muted);
  font-size: 13px;
}

.status-list dd {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.latest-section {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(18, 31, 46, 0.06);
}

.latest-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px 8px;
}

.latest-heading h2 {
  margin-bottom: 0;
}

.latest-heading > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.latest-empty {
  padding: 18px;
  color: var(--muted);
  font-size: 13px;
}

.latest-table-shell {
  overflow-x: auto;
}

.latest-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  table-layout: fixed;
}

.latest-table th,
.latest-table td {
  border-top: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.latest-table th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
}

.latest-table th:first-child,
.latest-table td:first-child {
  width: 104px;
}

.latest-table th:nth-child(2),
.latest-table td:nth-child(2) {
  width: auto;
}

.latest-table th:nth-child(3),
.latest-table th:nth-child(4),
.latest-table th:nth-child(5),
.latest-table td:nth-child(3),
.latest-table td:nth-child(4),
.latest-table td:nth-child(5) {
  width: 76px;
  font-variant-numeric: tabular-nums;
}

.latest-table th:nth-child(6),
.latest-table td:nth-child(6),
.latest-table th:nth-child(7),
.latest-table td:nth-child(7) {
  width: 140px;
}

.table-tools {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 13px;
}

.filters {
  display: grid;
  gap: 9px;
}

.filter-group {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

.filter-group-label {
  padding-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: #f2f5f8;
  color: var(--ink);
}

.filter-btn span:first-child {
  white-space: nowrap;
}

.filter-count {
  min-width: 20px;
  border-radius: 999px;
  padding: 1px 6px;
  background: rgba(24, 32, 42, 0.08);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}

.data-tag.category {
  border-color: #d8e4f2;
  background: #eef5fb;
  color: #255276;
}

.data-tag.category-boy,
.filter-btn.category-boy {
  border-color: #bdd4ea;
  background: #edf5fc;
  color: #255276;
}

.data-tag.category-girl,
.filter-btn.category-girl {
  border-color: #e9c4d1;
  background: #fbf0f4;
  color: #81415a;
}

.data-tag.category-baby,
.filter-btn.category-baby {
  border-color: #d7cced;
  background: #f4f0fb;
  color: #5c4d87;
}

.data-tag.category-family,
.filter-btn.category-family {
  border-color: #c5dfd6;
  background: #edf8f3;
  color: #25644e;
}

.filter-btn.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.filter-btn.active .filter-count {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.filter-btn:disabled {
  border-color: #e1e5e8;
  background: #f5f6f6;
  color: #9ca5ad;
}

.filter-btn:disabled .filter-count {
  color: #a8b0b7;
}

.category-cell {
  min-width: 96px;
}

.category-cell .data-tag {
  margin: 2px 4px 2px 0;
}

.mini-bar.category-boy i { background: #2f6f9f; }
.mini-bar.category-girl i { background: #b85a7e; }
.mini-bar.category-baby i { background: #7b63bd; }
.mini-bar.category-family i { background: #2f7f5f; }

.table-search {
  width: min(340px, 35vw);
  min-height: 36px;
  padding: 8px 10px;
}

.data-table-shell {
  overflow: hidden;
}

.table-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.table-pager button {
  min-height: 34px;
  padding: 0 13px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--line);
  padding: 13px 14px;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
}

.data-table td {
  font-size: 13px;
}

.data-table th:first-child,
.data-table td:first-child {
  width: 34%;
}

.data-table th:nth-child(2),
.data-table th:nth-child(3),
.data-table th:nth-child(4),
.data-table td:nth-child(2),
.data-table td:nth-child(3),
.data-table td:nth-child(4) {
  width: 84px;
  font-variant-numeric: tabular-nums;
}

.data-table th:nth-child(5),
.data-table td:nth-child(5) {
  width: 150px;
}

.data-table th:nth-child(6),
.data-table td:nth-child(6) {
  width: 280px;
}

.note-title {
  margin-bottom: 7px;
  font-weight: 800;
}

.row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.data-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.data-tag.hot { border-color: #f2beb4; background: #fff0ed; color: #b33824; }
.data-tag.quiet { border-color: #bfe5d6; background: #e7f6ef; color: #13734b; }
.data-tag.review { border-color: #efd295; background: #fff8e8; color: #8a5c0a; }
.data-tag.up { border-color: #bfe5d6; background: #e7f6ef; color: #13734b; }
.data-tag.mid { border-color: #c5d9f0; background: #eaf3ff; color: #245b9a; }
.data-tag.down { border-color: #efd295; background: #fff8e8; color: #8a5c0a; }
.data-tag.insufficient { border-color: #d3d9df; background: #f0f3f6; color: #596574; }

.table-hint {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.empty-table {
  display: none;
  padding: 30px;
  text-align: center;
  color: var(--muted);
}

.archive-section {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(18, 31, 46, 0.05);
}

.archive-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 18px 8px;
}

.archive-heading h2 {
  margin-bottom: 0;
}

.archive-heading > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.archive-empty {
  padding: 18px;
  color: var(--muted);
  font-size: 13px;
}

.archive-month {
  border-top: 1px solid var(--line);
}

.archive-month summary {
  display: grid;
  grid-template-columns: 24px minmax(140px, 1fr) repeat(4, max-content);
  align-items: center;
  gap: 16px;
  min-height: 54px;
  padding: 0 18px;
  cursor: pointer;
  list-style: none;
}

.archive-month summary::-webkit-details-marker {
  display: none;
}

.archive-month summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-weight: 800;
}

.archive-month[open] summary::before {
  content: "-";
}

.archive-month summary strong {
  margin-left: 0;
}

.archive-month summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.archive-table-shell {
  overflow-x: auto;
  border-top: 1px solid var(--line);
  background: #fbfcfd;
}

.archive-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  table-layout: fixed;
}

.archive-table th,
.archive-table td {
  border-bottom: 1px solid #e5ebf0;
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.archive-table th {
  color: var(--muted);
  font-size: 12px;
}

.archive-table th:first-child,
.archive-table td:first-child {
  width: 44%;
}

.archive-table th:nth-child(2),
.archive-table td:nth-child(2) {
  width: 90px;
  font-variant-numeric: tabular-nums;
}

.archive-table th:nth-child(3),
.archive-table td:nth-child(3) {
  width: 150px;
}

.archive-table th:nth-child(4),
.archive-table td:nth-child(4) {
  width: 300px;
}

.state-page {
  min-height: 100vh;
  display: grid;
  place-content: center;
  padding: 24px;
  text-align: center;
}

.state-page a {
  color: var(--accent);
}

.operation-fault {
  gap: 12px;
}

.operation-fault h1 {
  font-size: 34px;
}

.operation-fault p {
  margin-bottom: 0;
  color: var(--muted);
}

.fault-code {
  display: inline-flex;
  justify-content: center;
  justify-self: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink) !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.fault-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1000;
  width: min(360px, calc(100vw - 36px));
  border: 1px solid #ffd1c8;
  border-radius: 8px;
  padding: 14px 16px;
  background: #fff7f5;
  color: #9f2d1b;
  box-shadow: 0 18px 50px rgba(18, 31, 46, 0.16);
  font-size: 14px;
  font-weight: 800;
}

.source-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 6px;
  padding: 0 9px;
  background: #eef2f5;
  color: #596473;
  font-size: 12px;
  font-weight: 800;
}

.source-badge.client {
  background: #eaf2ff;
  color: #155db9;
}

.source-badge.server {
  background: #fff0ed;
  color: #b33824;
}

.source-badge.permission,
.source-badge.csrf {
  background: #fff8e8;
  color: #8a5c0a;
}

.error-log-table {
  min-width: 1040px;
}

.error-log-table th:first-child,
.error-log-table td:first-child {
  width: 210px;
}

.error-log-table th:nth-child(2),
.error-log-table td:nth-child(2) {
  width: 96px;
}

.error-log-table th:nth-child(3),
.error-log-table td:nth-child(3) {
  width: 170px;
}

.error-log-table th:nth-child(4),
.error-log-table td:nth-child(4) {
  width: 210px;
}

.error-log-table td:last-child strong {
  max-width: 420px;
  overflow-wrap: anywhere;
}

.error-stack {
  margin-top: 8px;
}

.error-stack summary {
  color: var(--accent);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.error-stack pre {
  max-height: 240px;
  overflow: auto;
  margin: 8px 0 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #f7f9fb;
  color: #2f3a46;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
}

/* Seed notes visual refresh */
body {
  background:
    linear-gradient(180deg, #eef1ef 0, #f3f4f2 280px),
    #f3f4f2;
}

.topbar {
  border-bottom-color: rgba(255, 255, 255, 0.08);
  background: #141820;
  color: #fff;
}

.topbar strong {
  color: #fff;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.64);
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
}

.topbar .ghost {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.topbar .ghost:hover {
  background: rgba(255, 255, 255, 0.14);
}

.seed-notes-workspace {
  width: min(1400px, calc(100% - 32px));
  margin-top: 22px;
}

.seed-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 500px);
  align-items: stretch;
  min-height: 148px;
  margin-bottom: 14px;
  border: 1px solid rgba(21, 24, 29, 0.08);
  border-radius: 8px;
  padding: 26px 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(250, 249, 244, 0.92)),
    #fff;
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.07);
}

.seed-heading-copy {
  min-width: 0;
  align-self: center;
}

.seed-heading h1 {
  margin-bottom: 9px;
  color: #15181d;
  font-size: 30px;
  letter-spacing: 0;
}

.seed-heading .eyebrow,
.table-toolbar-title .eyebrow {
  color: #157c72;
}

.seed-heading p:last-child {
  max-width: 720px;
  line-height: 1.7;
}

.seed-heading-side {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.seed-actions {
  justify-content: flex-end;
}

.seed-hero-gallery {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 8px;
  height: 148px;
  min-height: 148px;
}

.hero-thumb {
  position: relative;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(21, 24, 29, 0.10);
  border-radius: 8px;
  background: #ece9df;
}

.hero-thumb.primary {
  grid-row: 1 / span 3;
}

.hero-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.hero-thumb span {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  gap: 3px;
  padding: 20px 10px 9px;
  color: #fff;
  background: linear-gradient(180deg, rgba(20, 24, 32, 0), rgba(20, 24, 32, 0.76));
}

.hero-thumb:not(.primary) span {
  padding-top: 28px;
}

.hero-thumb strong,
.hero-thumb small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-thumb strong {
  font-size: 12px;
  line-height: 1.25;
}

.hero-thumb small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 10px;
  font-weight: 700;
}

.status-pill {
  border: 1px solid rgba(20, 112, 75, 0.18);
}

.status-pill.running {
  border-color: rgba(44, 107, 237, 0.18);
  background: #edf3ff;
  color: #2456bd;
}

.status-pill.warning {
  border-color: rgba(184, 121, 18, 0.22);
  background: #fff8e8;
  color: #8a5c0a;
}

.metric-strip {
  gap: 14px;
}

.metric-card,
.data-panel,
.table-tools,
.data-table-shell,
.latest-section,
.archive-section {
  border-color: #dfe3e6;
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.07);
}

.metric-card {
  position: relative;
  min-height: 118px;
  overflow: hidden;
  padding: 16px 16px 15px;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #9aa3ad;
}

.metric-card::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 13px;
  width: 58px;
  height: 24px;
  border-bottom: 2px solid rgba(44, 107, 237, 0.24);
  border-left: 2px solid rgba(44, 107, 237, 0.10);
  transform: skewX(-18deg);
}

.metric-card-primary::before { background: #2c6bed; }
.metric-card-hot::before { background: #d95a43; }
.metric-card-engage::before { background: #7657b6; }
.metric-card-mid::before { background: #157c72; }
.metric-card-compare::before { background: #b87912; }

.metric-card strong {
  color: #15181d;
  font-size: 30px;
}

.data-panel {
  min-height: 202px;
  padding: 18px 18px 16px;
}

.data-panel h2,
.latest-heading h2,
.archive-heading h2,
.table-toolbar-title h2 {
  color: #20242b;
  font-size: 16px;
  letter-spacing: 0;
}

.bar-row {
  grid-template-columns: 118px 1fr 52px;
}

.mini-bar {
  height: 9px;
  background: #ebeee9;
}

.latest-section,
.archive-section {
  overflow: hidden;
}

.latest-heading {
  padding: 18px 18px 10px;
}

.latest-table th,
.data-table th {
  background: #f8f8f5;
}

.table-tools {
  padding: 14px 16px;
}

.table-toolbar-title {
  min-width: 190px;
}

.table-toolbar-title .eyebrow,
.table-toolbar-title h2 {
  margin-bottom: 0;
}

.table-toolbar-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.filter-btn {
  background: #f6f7f7;
}

.filter-btn.active {
  border-color: #20242b;
  background: #20242b;
}

.data-table tr:hover td,
.latest-table tr:hover td,
.archive-table tr:hover td {
  background: #fcfbf8;
}

.note-title {
  line-height: 1.42;
}

.note-cell {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.note-cell.compact {
  grid-template-columns: 46px minmax(0, 1fr);
}

.note-cover {
  width: 58px;
  aspect-ratio: 4 / 5;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(21, 24, 29, 0.08);
  border-radius: 8px;
  background: #ece9df;
  color: #7c7464;
  font-size: 20px;
  font-weight: 900;
  flex: none;
}

.note-cell.compact .note-cover {
  width: 46px;
}

.note-cover img,
.avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.note-cover.placeholder {
  background:
    linear-gradient(135deg, rgba(44, 107, 237, 0.10), rgba(217, 90, 67, 0.10)),
    #efede6;
}

.row-meta {
  align-items: center;
}

.blogger-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.avatar {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #e7ecea;
  color: #157c72;
  font-size: 11px;
  font-weight: 900;
  flex: none;
}

.data-tag {
  min-height: 22px;
  padding: 2px 8px;
}

.data-tag.hot { border-color: #f0beb5; color: #a93625; }
.data-tag.quiet,
.data-tag.up { border-color: #bfe5d6; background: #e8f5ef; color: #14704b; }

.ops-workspace {
  width: min(1320px, calc(100% - 32px));
  max-width: 100%;
  overflow-x: clip;
}

.ops-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 0 16px;
}

.ops-heading p:last-child,
.ops-freshness span {
  margin-bottom: 0;
  color: var(--muted);
}

.ops-freshness {
  min-width: 210px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(18, 31, 46, 0.05);
}

.ops-freshness span,
.ops-freshness strong {
  display: block;
}

.ops-freshness span {
  font-size: 12px;
  font-weight: 800;
}

.ops-freshness strong {
  margin-top: 5px;
  font-size: 15px;
}

.ops-filters {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) minmax(180px, 1fr) max-content;
  align-items: end;
  gap: 10px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(18, 31, 46, 0.05);
}

.ops-filters button {
  min-width: 88px;
}

.ops-metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.ops-metric-card {
  min-height: 104px;
}

.ops-metric-card strong {
  font-size: 24px;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.ops-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
  gap: 14px;
  margin-bottom: 14px;
}

.ops-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(18, 31, 46, 0.06);
}

.ops-panel-wide {
  min-width: 0;
}

.ops-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px 11px;
  border-bottom: 1px solid var(--line);
}

.ops-panel-head h2 {
  margin-bottom: 0;
  min-width: 0;
}

.ops-panel-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.ops-table-shell {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ops-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
}

.ops-table th,
.ops-table td {
  border-bottom: 1px solid #edf1f4;
  padding: 11px 13px;
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.ops-table th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ops-table td strong,
.ops-table td small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.ops-table td small {
  margin-top: 4px;
  color: var(--muted);
}

.ops-channel-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 50%;
  background: #64748b;
}

.ops-channel-dot.tmall { background: #2563eb; }
.ops-channel-dot.xhs { background: #e11d48; }
.ops-channel-dot.douyin { background: #111827; }
.ops-channel-dot.ktt { background: #059669; }

.ops-trend-cell {
  display: grid;
  grid-template-columns: minmax(86px, 1fr) max-content;
  align-items: center;
  gap: 9px;
}

.ops-trend-cell .mini-bar {
  margin: 0;
}

.mini-bar.w-5 i { width: 5%; }
.mini-bar.w-10 i { width: 10%; }
.mini-bar.w-15 i { width: 15%; }
.mini-bar.w-20 i { width: 20%; }
.mini-bar.w-25 i { width: 25%; }
.mini-bar.w-30 i { width: 30%; }
.mini-bar.w-35 i { width: 35%; }
.mini-bar.w-40 i { width: 40%; }
.mini-bar.w-45 i { width: 45%; }
.mini-bar.w-50 i { width: 50%; }
.mini-bar.w-55 i { width: 55%; }
.mini-bar.w-60 i { width: 60%; }
.mini-bar.w-65 i { width: 65%; }
.mini-bar.w-70 i { width: 70%; }
.mini-bar.w-75 i { width: 75%; }
.mini-bar.w-80 i { width: 80%; }
.mini-bar.w-85 i { width: 85%; }
.mini-bar.w-90 i { width: 90%; }
.mini-bar.w-95 i { width: 95%; }
.mini-bar.w-100 i { width: 100%; }

.ops-trend-table {
  min-width: 500px;
}

.ops-product-table {
  min-width: 620px;
}

.ops-product-table th:first-child,
.ops-product-table td:first-child {
  min-width: 220px;
  max-width: 320px;
  white-space: normal;
}

.ops-product-table td:first-child strong {
  line-height: 1.35;
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .seed-heading {
    grid-template-columns: 1fr;
  }

  .seed-actions {
    justify-content: flex-start;
  }

  .metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .user-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .seed-grid {
    grid-template-columns: 1fr;
  }

  .seed-grid.business-only {
    grid-template-columns: 1fr;
  }

  .ops-heading {
    flex-direction: column;
  }

  .ops-freshness {
    width: 100%;
  }

  .ops-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr)) max-content;
  }

  .ops-metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ops-grid {
    grid-template-columns: 1fr;
  }

  .table-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .table-toolbar-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .table-search {
    width: 100%;
  }

  .data-table-shell {
    overflow-x: auto;
  }

  .data-table {
    min-width: 980px;
  }

  .table-pager {
    align-items: stretch;
    flex-direction: column;
  }

  .table-pager button {
    width: 100%;
  }

  .archive-month summary {
    grid-template-columns: 1fr 1fr;
  }

  .archive-month summary::before {
    display: none;
  }

  .archive-month summary strong {
    margin-left: 0;
  }
}

@media (max-width: 700px) {
  .table-tools {
    position: static;
    padding: 16px;
  }

  .table-toolbar-title {
    min-width: 0;
  }

  .filters,
  .filter-group,
  .filter-options {
    width: 100%;
  }

  .filter-group {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .filter-group-label {
    padding-top: 0;
  }

  .category-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-options .filter-btn {
    justify-content: space-between;
    width: 100%;
  }

  .data-table-shell {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .data-table {
    display: block;
    width: 100%;
    min-width: 0;
    border-collapse: separate;
  }

  .data-table thead {
    display: none;
  }

  .data-table tbody {
    display: grid;
    width: 100%;
    gap: 10px;
  }

  .data-table tr {
    display: grid;
    width: 100%;
    min-width: 0;
    gap: 10px;
    border: 1px solid #dfe3e6;
    border-radius: 8px;
    padding: 12px;
    background: var(--panel);
    box-shadow: 0 10px 24px rgba(16, 24, 40, 0.06);
  }

  .data-table td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-width: 0;
    border: 0;
    padding: 0;
    text-align: right;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
  }

  .data-table th:first-child,
  .data-table td:first-child,
  .data-table th:nth-child(2),
  .data-table th:nth-child(3),
  .data-table th:nth-child(4),
  .data-table td:nth-child(2),
  .data-table td:nth-child(3),
  .data-table td:nth-child(4),
  .data-table th:nth-child(5),
  .data-table td:nth-child(5),
  .data-table th:nth-child(6),
  .data-table td:nth-child(6) {
    width: auto;
  }

  .data-table td::before {
    content: attr(data-label);
    flex: none;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-align: left;
  }

  .data-table .note-main-cell {
    display: block;
    width: 100%;
    min-width: 0;
    text-align: left;
  }

  .data-table td.note-main-cell:first-child {
    width: 100%;
  }

  .data-table .note-main-cell::before {
    display: none;
  }

  .data-table .note-cell {
    width: 100%;
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
  }

  .data-table .note-cover {
    width: 64px;
  }

  .data-table .row-meta {
    gap: 5px 8px;
  }

  .data-table .category-cell {
    min-width: 0;
  }

  .data-table .category-cell .data-tag {
    margin: 0 0 0 6px;
  }

  .data-table td[data-label="询单"],
  .data-table td[data-label="近期表现"] {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: start;
    text-align: left;
  }

  .data-table td[data-label="询单"]::before,
  .data-table td[data-label="近期表现"]::before {
    grid-row: 1 / span 2;
  }

  .data-table td[data-label="询单"] .table-hint,
  .data-table td[data-label="近期表现"] .table-hint {
    min-width: 0;
    margin-top: 4px;
  }
}

@media (max-width: 560px) {
  .auth-panel {
    padding: 24px;
  }

  .topbar {
    height: auto;
    min-height: 64px;
    padding: 14px 16px;
  }

  .topbar div,
  .summary {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar div {
    gap: 10px;
  }

  .seed-heading,
  .seed-actions {
    align-items: flex-start;
  }

  .seed-heading {
    padding: 20px;
  }

  .seed-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .seed-hero-gallery {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, 92px);
    height: auto;
  }

  .hero-thumb.primary {
    grid-row: auto;
  }

  .metric-strip {
    grid-template-columns: 1fr;
  }

  .user-stats {
    grid-template-columns: 1fr;
  }

  .users-panel-head {
    flex-direction: column;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .ops-filters,
  .ops-metric-strip {
    grid-template-columns: 1fr;
  }

  .ops-workspace {
    width: min(100%, calc(100% - 20px));
  }

  .ops-heading {
    padding: 18px 0 12px;
  }

  .ops-heading h1 {
    font-size: 24px;
  }

  .ops-filters button {
    width: 100%;
  }

  .ops-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .ops-panel-head span {
    white-space: normal;
  }

  .ops-table {
    min-width: 0;
    table-layout: fixed;
  }

  .ops-trend-table {
    min-width: 0;
  }

  .ops-product-table {
    min-width: 0;
  }

  .ops-table th,
  .ops-table td {
    padding: 9px 8px;
    font-size: 12px;
    overflow-wrap: anywhere;
  }

  .ops-channel-table th:nth-child(2),
  .ops-channel-table td:nth-child(2),
  .ops-channel-table th:nth-child(8),
  .ops-channel-table td:nth-child(8),
  .ops-top-product-table th:nth-child(3),
  .ops-top-product-table td:nth-child(3),
  .ops-top-product-table th:nth-child(5),
  .ops-top-product-table td:nth-child(5),
  .ops-refund-product-table th:nth-child(4),
  .ops-refund-product-table td:nth-child(4) {
    display: none;
  }

  .ops-channel-table th:first-child,
  .ops-channel-table td:first-child {
    width: 78px;
  }

  .ops-channel-dot {
    margin-right: 5px;
  }

  .ops-trend-cell {
    display: block;
  }

  .ops-trend-cell .mini-bar {
    display: none;
  }

  .ops-product-table th:first-child,
  .ops-product-table td:first-child {
    min-width: 0;
    max-width: none;
    width: 52%;
  }

  .ops-product-table td:first-child strong {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}

.product-feedback-shell {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  min-height: calc(100vh - 64px);
}

.product-feedback-sidebar {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  min-height: calc(100vh - 64px);
  border-right: 1px solid var(--line);
  background: #eef2f4;
}

.product-feedback-brand {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 18px 14px;
}

.product-feedback-brand p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  word-break: break-all;
}

.count {
  display: inline-grid;
  min-width: 40px;
  min-height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.product-feedback-search {
  display: grid;
  gap: 8px;
  padding: 0 18px 10px;
}

.product-feedback-meta {
  margin: 0;
  padding: 0 18px 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.product-feedback-list {
  overflow: auto;
  padding: 4px 10px 18px;
}

.product-feedback-item {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 9px 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.product-feedback-item:hover,
.product-feedback-item.active {
  border-color: #cfd8df;
  background: #fff;
}

.product-feedback-item.active {
  box-shadow: 0 6px 18px rgba(18, 31, 46, 0.08);
}

.product-feedback-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.product-feedback-badges {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 12px;
}

.badge {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 3px 6px;
}

.badge.saved {
  border-color: #bee8d2;
  background: var(--success-bg);
  color: var(--success-ink);
}

.empty-list {
  padding: 16px 10px;
  color: var(--muted);
  font-size: 13px;
}

.product-feedback-workarea {
  min-width: 0;
  min-height: calc(100vh - 64px);
  overflow: auto;
  background: var(--bg);
}

.product-feedback-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 28px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
}

.product-feedback-header h2,
.product-feedback-editor-head h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.28;
}

.product-feedback-image-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.product-feedback-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.product-feedback-actions button {
  min-height: 36px;
}

.product-feedback-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  align-items: start;
  padding: 20px 28px 18px;
}

.product-feedback-images.empty {
  min-height: 300px;
  display: grid;
  place-items: center;
  margin: 20px 28px 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.product-feedback-image-tile {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(18, 31, 46, 0.06);
}

.product-feedback-image-frame {
  height: min(50vh, 520px);
  display: grid;
  place-items: center;
  background: #edf1f3;
}

.product-feedback-image-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.product-feedback-image-caption {
  min-height: 40px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  word-break: break-all;
}

.product-feedback-editor {
  margin: 0 28px 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(18, 31, 46, 0.06);
  padding: 16px;
}

.product-feedback-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.save-state {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  white-space: nowrap;
}

.save-state.ok {
  color: var(--success-ink);
}

.save-state.error {
  color: var(--danger-ink);
}

textarea {
  width: 100%;
  min-height: 138px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  outline: none;
  color: var(--ink);
  background: #fff;
  font: inherit;
  line-height: 1.65;
}

textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(24, 104, 219, 0.14);
}

.product-feedback-save-actions {
  justify-content: flex-end;
  margin-top: 12px;
}

@media (max-width: 900px) {
  .product-feedback-shell {
    grid-template-columns: 1fr;
  }

  .product-feedback-sidebar {
    min-height: auto;
    max-height: 42vh;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .product-feedback-workarea {
    min-height: 58vh;
  }

  .product-feedback-header {
    position: static;
    flex-direction: column;
  }

  .product-feedback-header,
  .product-feedback-images {
    padding-left: 16px;
    padding-right: 16px;
  }

  .product-feedback-images {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .product-feedback-images.empty,
  .product-feedback-editor {
    margin-left: 16px;
    margin-right: 16px;
  }

  .product-feedback-image-frame {
    height: min(42vh, 360px);
  }
}

@media (max-width: 700px) {
  .topbar {
    height: auto;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand logout"
      "nav nav";
    align-items: center;
    gap: 10px 12px;
    padding: 12px 16px 10px;
  }

  .topbar > div {
    display: contents;
  }

  .topbar strong {
    grid-area: brand;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar > form {
    grid-area: logout;
    justify-self: end;
  }

  .topbar .ghost {
    min-height: 36px;
    padding: 0 12px;
    white-space: nowrap;
  }

  .topbar .nav-links {
    grid-area: nav;
    flex-wrap: nowrap;
    gap: 8px;
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .topbar .nav-links::-webkit-scrollbar {
    display: none;
  }

  .topbar .nav-links a {
    flex: none;
    white-space: nowrap;
  }

  .latest-table-shell {
    overflow: visible;
  }

  .latest-table {
    display: block;
    width: 100%;
    min-width: 0;
    border-collapse: separate;
  }

  .latest-table thead {
    display: none;
  }

  .latest-table tbody {
    display: grid;
    gap: 10px;
    padding: 0 12px 12px;
  }

  .latest-table tr {
    display: grid;
    gap: 8px;
    min-width: 0;
    border: 1px solid #dfe3e6;
    border-radius: 8px;
    padding: 12px;
    background: var(--panel);
    box-shadow: 0 10px 24px rgba(16, 24, 40, 0.06);
  }

  .latest-table td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-width: 0;
    border: 0;
    padding: 0;
    text-align: right;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
  }

  .latest-table th:first-child,
  .latest-table td:first-child,
  .latest-table th:nth-child(2),
  .latest-table td:nth-child(2),
  .latest-table th:nth-child(3),
  .latest-table th:nth-child(4),
  .latest-table th:nth-child(5),
  .latest-table td:nth-child(3),
  .latest-table td:nth-child(4),
  .latest-table td:nth-child(5),
  .latest-table th:nth-child(6),
  .latest-table td:nth-child(6),
  .latest-table th:nth-child(7),
  .latest-table td:nth-child(7) {
    width: auto;
  }

  .latest-table td::before {
    content: attr(data-label);
    flex: none;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-align: left;
  }

  .latest-table .latest-note-main-cell {
    order: -1;
    display: block;
    width: 100%;
    text-align: left;
  }

  .latest-table .latest-note-main-cell::before {
    display: none;
  }

  .latest-table .note-cell.compact {
    width: 100%;
    grid-template-columns: 56px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
  }

  .latest-table .note-cell.compact .note-cover {
    width: 56px;
  }

  .latest-table .row-meta {
    gap: 5px 8px;
  }
}

/* Clean Ops direction */
:root {
  --bg: #f4f7f6;
  --panel: #ffffff;
  --ink: #182129;
  --muted: #667482;
  --line: #dbe3e7;
  --accent: #245fd6;
  --accent-strong: #17469f;
  --success-bg: #e7f6ef;
  --success-ink: #13734b;
  --danger-bg: #fff0ed;
  --danger-ink: #b33824;
  --shadow: 0 14px 34px rgba(16, 24, 40, 0.07);
}

body {
  background:
    linear-gradient(180deg, #eef2f2 0, #f4f7f6 280px),
    #f4f7f6;
}

.topbar {
  height: 64px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  backdrop-filter: blur(12px);
}

.topbar strong {
  color: var(--ink);
  font-weight: 900;
}

.topbar span {
  color: var(--muted);
}

.nav-links a {
  color: var(--muted);
}

.nav-links a:hover,
.nav-links a.active {
  background: #edf2f6;
  color: var(--ink);
}

.topbar .ghost {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.topbar .ghost:hover {
  background: #edf2f6;
}

.dashboard-workspace {
  width: min(1400px, calc(100% - 32px));
  margin-top: 22px;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
  margin-bottom: 14px;
}

.dashboard-hero-copy,
.dashboard-access-card,
.dashboard-metric,
.dashboard-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.dashboard-hero-copy {
  padding: 26px 28px;
  background:
    linear-gradient(120deg, rgba(36, 95, 214, 0.08), rgba(23, 135, 100, 0.07)),
    var(--panel);
}

.dashboard-hero-copy h1 {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: 0;
}

.dashboard-hero-copy p:last-child {
  max-width: 780px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.dashboard-access-card {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 20px;
}

.dashboard-access-card strong {
  font-size: 20px;
}

.dashboard-access-card small {
  color: var(--muted);
  font-size: 13px;
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.dashboard-metric {
  min-height: 108px;
  padding: 16px;
}

.dashboard-metric span,
.dashboard-metric small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.dashboard-metric strong {
  display: block;
  margin: 8px 0 6px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: 0;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 14px;
  align-items: start;
}

.dashboard-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-side {
  display: grid;
  gap: 14px;
}

.dashboard-panel {
  padding: 16px;
}

.dashboard-panel-head {
  margin-bottom: 12px;
}

.dashboard-panel-head h2 {
  margin: 0;
  font-size: 17px;
}

.dashboard-task {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--ink);
  text-decoration: none;
}

.dashboard-task + .dashboard-task {
  margin-top: 8px;
}

.dashboard-task:hover {
  background: #f8fafc;
}

.dashboard-task-icon,
.module-icon {
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #edf3ff;
  color: var(--accent);
  font-weight: 900;
}

.dashboard-task-icon {
  width: 38px;
  height: 38px;
}

.dashboard-task strong,
.dashboard-task small {
  display: block;
  min-width: 0;
}

.dashboard-task strong {
  font-size: 13px;
}

.dashboard-task small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-task b {
  color: var(--success-ink);
  font-size: 12px;
}

.dashboard-status-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.dashboard-status-list div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid #edf1f4;
  padding-bottom: 10px;
}

.dashboard-status-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.dashboard-status-list dt {
  color: var(--muted);
  font-size: 13px;
}

.dashboard-status-list dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  text-align: right;
}

.empty-state.compact {
  padding: 14px;
  font-size: 13px;
}

.module-card {
  min-height: 196px;
  border-color: var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.module-card-link {
  border-color: var(--line);
  background: var(--panel);
}

.module-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.module-card-head h2 {
  margin-bottom: 0;
}

.module-kicker {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.module-icon {
  width: 42px;
  height: 42px;
  flex: none;
  font-size: 18px;
}

.button-link,
button {
  background: var(--accent);
}

.button-link:hover,
button:hover {
  background: var(--accent-strong);
}

.module-stats div {
  background: #f0f4f7;
}

.seed-notes-workspace {
  width: min(1400px, calc(100% - 32px));
  margin-top: 22px;
}

.seed-heading {
  border-color: var(--line);
  background:
    linear-gradient(120deg, rgba(36, 95, 214, 0.07), rgba(23, 135, 100, 0.06)),
    var(--panel);
  box-shadow: var(--shadow);
}

.seed-heading h1 {
  color: var(--ink);
}

.seed-heading .eyebrow,
.table-toolbar-title .eyebrow {
  color: var(--success-ink);
}

.metric-card,
.data-panel,
.table-tools,
.data-table-shell,
.latest-section,
.archive-section {
  border-color: var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.metric-card::after {
  border-bottom-color: rgba(36, 95, 214, 0.20);
  border-left-color: rgba(36, 95, 214, 0.08);
}

.metric-card-primary::before { background: var(--accent); }
.metric-card-hot::before { background: #d45b45; }
.metric-card-engage::before { background: #7457b7; }
.metric-card-mid::before { background: var(--success-ink); }
.metric-card-compare::before { background: #b87912; }

.latest-table th,
.data-table th {
  background: #f8fafc;
}

.filter-btn {
  background: #f6f8fa;
}

.filter-btn.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.filter-btn.active .filter-count {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.table-search {
  border-color: var(--line);
}

.competitor-workspace {
  width: min(1400px, calc(100% - 32px));
  margin-top: 22px;
}

.competitor-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px 28px;
  background:
    linear-gradient(120deg, rgba(30, 83, 133, 0.10), rgba(210, 91, 69, 0.08)),
    var(--panel);
  box-shadow: var(--shadow);
}

.competitor-hero h1 {
  margin-bottom: 9px;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: 0;
}

.competitor-hero p:last-child {
  max-width: 820px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.competitor-status {
  min-width: 0;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 8px;
  border: 1px solid rgba(20, 24, 32, 0.08);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.74);
}

.competitor-status strong {
  color: var(--ink);
  font-size: 19px;
}

.competitor-status small {
  color: var(--muted);
  font-size: 13px;
}

.status-pill.ok {
  border-color: rgba(20, 112, 75, 0.18);
  background: var(--success-bg);
  color: var(--success-ink);
}

.competitor-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 14px;
}

.competitor-metrics .metric-card:nth-child(1)::before { background: #1e5385; }
.competitor-metrics .metric-card:nth-child(2)::before { background: #d25b45; }
.competitor-metrics .metric-card:nth-child(3)::before { background: #157c72; }
.competitor-metrics .metric-card:nth-child(4)::before { background: #7457b7; }
.competitor-metrics .metric-card:nth-child(5)::before { background: #b87912; }

.competitor-feature,
.competitor-brand {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.competitor-feature {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: 0;
  overflow: hidden;
  margin-bottom: 14px;
}

.competitor-feature figure {
  min-height: 360px;
  margin: 0;
  background: #ece9df;
}

.competitor-feature img,
.competitor-note-images img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.competitor-feature > div {
  display: grid;
  align-content: center;
  gap: 14px;
  padding: 28px;
}

.competitor-feature h2 {
  margin: 0;
  color: var(--ink);
  font-size: 30px;
  letter-spacing: 0;
}

.competitor-feature p {
  max-width: 760px;
  margin: 0;
  color: #3b4651;
  font-size: 16px;
  line-height: 1.75;
}

.competitor-verdict {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 4px 0 0;
}

.competitor-verdict div,
.competitor-summary div,
.note-metrics div {
  min-width: 0;
  border: 1px solid #e4e9ee;
  border-radius: 8px;
  padding: 11px 12px;
  background: #f7f9fb;
}

.competitor-verdict dt,
.competitor-summary strong,
.note-metrics dt {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.competitor-verdict dd,
.note-metrics dd {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.competitor-board {
  display: grid;
  gap: 14px;
}

.competitor-history {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.competitor-history-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}

.competitor-history-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
}

.competitor-history-head > span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #d8dfe6;
  border-radius: 999px;
  padding: 0 11px;
  background: #f3f6f8;
  color: #42505d;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.competitor-report-day {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.competitor-report-day summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 68px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
}

.competitor-report-day summary::-webkit-details-marker {
  display: none;
}

.competitor-report-day summary span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.competitor-report-day summary strong {
  color: var(--ink);
  font-size: 18px;
}

.competitor-report-day summary small,
.competitor-report-day summary b {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.competitor-report-day summary b {
  white-space: nowrap;
}

.competitor-report-day summary::after {
  content: "展开";
  flex: none;
  border: 1px solid #d8dfe6;
  border-radius: 999px;
  padding: 5px 10px;
  background: #f7f9fb;
  color: #42505d;
  font-size: 12px;
  font-weight: 900;
}

.competitor-report-day[open] summary::after {
  content: "收起";
}

.competitor-report-body {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding: 14px;
  background: #fbfcfd;
}

.competitor-report-body .competitor-brand {
  box-shadow: none;
}

.competitor-brand {
  overflow: hidden;
}

.competitor-brand > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px 14px;
}

.competitor-brand h2 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: 0;
}

.watch-pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d8dfe6;
  border-radius: 999px;
  padding: 0 11px;
  background: #f3f6f8;
  color: #42505d;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.watch-pill.high {
  border-color: #f0beb5;
  background: #fff0ed;
  color: #a93625;
}

.watch-pill.mid {
  border-color: #c5d9f0;
  background: #eaf3ff;
  color: #245b9a;
}

.watch-pill.low {
  border-color: #bfe5d6;
  background: #e8f5ef;
  color: #14704b;
}

.competitor-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 22px 18px;
}

.competitor-summary span {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.45;
}

.competitor-notes {
  border-top: 1px solid var(--line);
}

.competitor-note {
  display: grid;
  grid-template-columns: minmax(280px, 0.48fr) minmax(360px, 0.52fr);
  gap: 18px;
  padding: 18px 22px;
}

.competitor-note + .competitor-note {
  border-top: 1px solid #ebeff2;
}

.competitor-note.no-images {
  grid-template-columns: 1fr;
}

.competitor-note-copy {
  min-width: 0;
}

.note-title-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.note-title-line h3 {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: 0;
}

.competitor-note-copy > p:not(.row-meta) {
  margin: 10px 0 12px;
  color: #3b4651;
  line-height: 1.7;
}

.note-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 12px;
}

.note-metrics div {
  min-height: 66px;
  padding: 9px 10px;
}

.note-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.note-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid #dde5eb;
  border-radius: 999px;
  padding: 4px 9px;
  background: #f7f9fb;
  color: #43515e;
  font-size: 12px;
  font-weight: 780;
}

.competitor-note-images {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 128px;
  gap: 8px;
}

.competitor-note-images figure {
  position: relative;
  min-height: 128px;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(21, 24, 29, 0.08);
  border-radius: 8px;
  background: #ece9df;
}

.competitor-note-images figure.lead {
  grid-column: span 2;
  grid-row: span 2;
}

.competitor-note-images figure.solo {
  grid-column: 1 / -1;
  min-height: 280px;
}

.competitor-note-images figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 18px 8px 7px;
  background: linear-gradient(180deg, rgba(20, 24, 29, 0), rgba(20, 24, 29, 0.72));
  color: #fff;
  font-size: 11px;
  font-weight: 780;
}

@media (max-width: 1180px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .competitor-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .competitor-feature {
    grid-template-columns: 1fr;
  }

  .competitor-feature figure {
    min-height: 300px;
  }
}

@media (max-width: 900px) {
  .dashboard-hero,
  .dashboard-metrics,
  .dashboard-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-hero-copy {
    grid-column: 1 / -1;
  }

  .dashboard-access-card {
    grid-column: 1 / -1;
  }

  .competitor-hero,
  .competitor-note {
    grid-template-columns: 1fr;
  }

  .competitor-summary,
  .competitor-verdict {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  body {
    background: #f4f7f6;
  }

  .topbar {
    height: auto;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand logout"
      "nav nav";
    align-items: center;
    gap: 10px 12px;
    padding: 12px 16px 10px;
    border-bottom-color: var(--line);
    background: rgba(255, 255, 255, 0.96);
    color: var(--ink);
  }

  .topbar > div {
    display: contents;
  }

  .topbar strong {
    grid-area: brand;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--ink);
  }

  .topbar > form {
    grid-area: logout;
    justify-self: end;
  }

  .topbar .ghost {
    min-height: 36px;
    padding: 0 12px;
    white-space: nowrap;
    border-color: var(--line);
    background: #fff;
    color: var(--ink);
  }

  .topbar .nav-links {
    grid-area: nav;
    flex-wrap: nowrap;
    gap: 8px;
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .topbar .nav-links::-webkit-scrollbar {
    display: none;
  }

  .topbar .nav-links a {
    flex: none;
    white-space: nowrap;
    color: var(--muted);
  }

  .topbar .nav-links a.active,
  .topbar .nav-links a:hover {
    background: var(--ink);
    color: #fff;
  }

  .dashboard-workspace,
  .seed-notes-workspace,
  .competitor-workspace {
    width: min(100%, calc(100% - 24px));
    margin-top: 14px;
  }

  .dashboard-hero,
  .dashboard-metrics,
  .dashboard-layout,
  .dashboard-module-grid,
  .dashboard-side {
    grid-template-columns: 1fr;
  }

  .dashboard-hero-copy {
    padding: 20px;
  }

  .dashboard-hero-copy h1 {
    font-size: 26px;
  }

  .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-metric {
    min-height: 96px;
    padding: 13px;
  }

  .dashboard-metric strong {
    font-size: 24px;
  }

  .module-card {
    min-height: 0;
    padding: 16px;
  }

  .seed-heading {
    padding: 20px;
  }

  .competitor-hero {
    padding: 20px;
  }

  .competitor-hero h1,
  .competitor-feature h2 {
    font-size: 26px;
  }

  .competitor-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .competitor-brand > header,
  .competitor-summary,
  .competitor-note {
    padding-left: 16px;
    padding-right: 16px;
  }

  .note-title-line {
    display: grid;
    gap: 8px;
  }

  .note-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .competitor-note-images {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(104px, 1fr);
  }

  .seed-heading h1 {
    font-size: 26px;
  }

  .seed-heading-side {
    gap: 12px;
  }

  .seed-hero-gallery {
    grid-template-rows: repeat(2, 86px);
  }

  .metric-card {
    min-height: 104px;
  }

  .category-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .latest-table tr,
  .data-table tr {
    box-shadow: var(--shadow);
  }
}
