:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --panel: #ffffff;
  --text: #1b1f24;
  --muted: #667085;
  --line: #d9dee7;
  --line-soft: #edf0f4;
  --accent: #1677ff;
  --accent-dark: #0b57d0;
  --green: #168a4a;
  --red: #c93535;
  --amber: #b26a00;
  --shadow: 0 10px 26px rgba(18, 28, 45, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.hidden {
  display: none !important;
}

.app {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
}

.brand-hero {
  position: relative;
  min-height: min(720px, calc(100vh - 48px));
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid rgba(21, 45, 78, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(9, 20, 35, 0.92) 0%, rgba(12, 29, 50, 0.72) 45%, rgba(12, 29, 50, 0.2) 100%),
    url("/hero-inventory-radar-1780998546-1.png"),
    linear-gradient(120deg, #081423, #173c62 58%, #d8eef4);
  background-position: center;
  background-size: cover;
  color: #fff;
  box-shadow: 0 20px 50px rgba(18, 28, 45, 0.16);
}

.brand-nav {
  position: absolute;
  top: 22px;
  right: 24px;
  left: 24px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-mark {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: #fff;
  text-decoration: none;
}

.brand-mark span {
  font-size: 22px;
  font-weight: 840;
  letter-spacing: 0;
}

.brand-mark small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.brand-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-nav-actions a {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(2, 12, 24, 0.3);
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.brand-hero::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 28%;
  content: "";
  background: linear-gradient(180deg, rgba(244, 247, 251, 0), var(--bg));
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  width: min(680px, 100%);
  min-height: min(680px, calc(100vh - 88px));
  padding: clamp(36px, 6vw, 78px);
}

.hero-kicker {
  color: #9ee7d4;
  font-size: 15px;
  font-weight: 750;
}

.hero-inner h1 {
  margin-top: 14px;
  font-size: clamp(52px, 8vw, 104px);
  line-height: 0.98;
  font-weight: 830;
}

.hero-subtitle {
  margin-top: 12px;
  color: #fff;
  font-size: clamp(20px, 3vw, 34px);
  font-weight: 760;
  line-height: 1.2;
}

.hero-visitor-meter {
  display: inline-flex;
  gap: 18px;
  align-items: stretch;
  width: fit-content;
  margin-top: 18px;
  padding: 10px 14px;
  border: 1px solid rgba(158, 231, 212, 0.34);
  border-radius: 8px;
  background: rgba(6, 18, 32, 0.58);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
}

.hero-visitor-meter div {
  display: grid;
  gap: 6px;
  min-width: 104px;
}

.hero-visitor-meter div + div {
  padding-left: 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-visitor-meter span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 680;
}

.hero-visitor-meter strong {
  color: #9ee7d4;
  font-size: clamp(22px, 2.8vw, 34px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.hero-summary {
  max-width: 580px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.primary-link,
.secondary-link {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 760;
  text-decoration: none;
}

.primary-link {
  background: #20c997;
  color: #061423;
}

.secondary-link {
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.hero-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 660px;
  margin: 34px 0 0;
}

.hero-proof div {
  min-height: 88px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.hero-proof dt {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.hero-proof dd {
  margin: 9px 0 0;
  color: #fff;
  font-size: 15px;
  font-weight: 760;
  line-height: 1.35;
}

.hero-freshness {
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

.signal-board {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.signal-rail {
  position: absolute;
  right: clamp(18px, 5vw, 80px);
  display: flex;
  gap: 8px;
  max-width: min(620px, 48vw);
  overflow: hidden;
  opacity: 0.9;
}

.rail-one {
  top: 58px;
}

.rail-two {
  bottom: 96px;
}

.signal-rail span {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(2, 12, 24, 0.42);
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  backdrop-filter: blur(10px);
}

.ops-board {
  position: absolute;
  right: clamp(18px, 5vw, 78px);
  top: 50%;
  width: min(460px, 38vw);
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(6, 18, 32, 0.62);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
  transform: translateY(-42%);
  backdrop-filter: blur(18px);
}

.ops-board-head,
.ops-feed div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ops-board-head {
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.ops-board-head strong {
  color: #9ee7d4;
}

.ops-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.ops-grid div {
  min-height: 76px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.ops-grid span {
  display: block;
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
}

.ops-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  line-height: 1;
}

.ops-feed {
  display: grid;
  gap: 8px;
}

.ops-feed div {
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.ops-feed span {
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-feed strong {
  color: #fff;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.positioning {
  display: grid;
  grid-template-columns: minmax(280px, 0.55fr) 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.positioning-copy,
.positioning-grid article {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.positioning-copy {
  padding: 22px;
}

.positioning-copy span {
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 780;
}

.positioning-copy h2 {
  margin-top: 12px;
  font-size: 26px;
  line-height: 1.28;
}

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

.positioning-grid article {
  min-height: 132px;
  padding: 18px;
}

.positioning-grid strong {
  display: block;
  font-size: 16px;
}

.positioning-grid p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.2;
  font-weight: 760;
}

h2 {
  font-size: 16px;
  line-height: 1.2;
}

.dashboard-title {
  font-size: 20px;
  font-weight: 780;
}

.topbar p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.live-pill.ok {
  color: var(--green);
  border-color: rgba(22, 138, 74, 0.24);
  background: #f0faf4;
}

.live-pill.bad {
  color: var(--red);
  border-color: rgba(201, 53, 53, 0.24);
  background: #fff4f4;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
}

.text-button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
}

.icon-button svg,
.search-field svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.stat-block {
  min-height: 86px;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.stat-block span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.stat-block strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
  line-height: 1;
}

.stat-block.warn strong {
  color: var(--amber);
}

.auth-panel {
  display: grid;
  grid-template-columns: minmax(360px, 0.7fr) 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.auth-form {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(110px, 1fr) 72px 72px;
  gap: 8px;
}

.auth-form input,
.auth-form button {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.auth-form input {
  min-width: 0;
  padding: 0 10px;
}

.auth-form button[data-auth-action="login"] {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 650;
}

.auth-note {
  color: var(--muted);
  font-size: 13px;
}

.controls {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 160px minmax(320px, 0.7fr);
  gap: 10px;
  margin-bottom: 14px;
  align-items: start;
}

.search-box {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.search-field,
.controls select,
.add-form input,
.add-form button {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  color: var(--muted);
}

.search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.controls select {
  padding: 0 12px;
  color: var(--text);
}

.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
}

.suggestions button {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: #fbfcfe;
  color: var(--muted);
  font-size: 12px;
}

.suggestions button:hover {
  border-color: rgba(22, 119, 255, 0.28);
  color: var(--accent-dark);
  background: #f2f7ff;
}

.submit-stack {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.add-form {
  display: grid;
  grid-template-columns: 1fr 76px;
  gap: 8px;
}

.add-form input {
  min-width: 0;
  padding: 0 12px;
}

.add-form button {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 650;
}

.shop-url-hint,
.modal-message {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.shop-url-hint.ok,
.modal-message.ok {
  color: var(--green);
}

.shop-url-hint.error,
.modal-message.error {
  color: var(--red);
}

.content {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 14px;
  align-items: start;
  min-width: 0;
}

.shop-list,
.goods-panel {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.shop-list {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.shop-list summary {
  cursor: default;
  list-style: none;
}

.shop-list summary::-webkit-details-marker {
  display: none;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 52px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line-soft);
}

.shop-list .section-head::after {
  display: none;
}

.section-head span {
  color: var(--muted);
  font-size: 13px;
}

.shop-item {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.shop-item:last-child {
  border-bottom: 0;
}

.shop-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.shop-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.shop-link {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.badge.ok {
  color: var(--green);
  border-color: rgba(22, 138, 74, 0.24);
  background: #f0faf4;
}

.badge.out {
  color: var(--red);
  border-color: rgba(201, 53, 53, 0.24);
  background: #fff4f4;
}

.badge.unknown,
.badge.error {
  color: var(--amber);
  border-color: rgba(178, 106, 0, 0.24);
  background: #fff8eb;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fbfcfe;
  color: var(--muted);
  font-weight: 650;
}

.sort-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: inherit;
}

.sort-button span {
  min-width: 12px;
  color: var(--muted);
  font-size: 12px;
}

.sort-button.active {
  color: var(--accent-dark);
}

.sort-button.active span {
  color: var(--accent-dark);
}

tbody tr:hover {
  background: #f8fafc;
}

.goods-name {
  display: grid;
  gap: 4px;
  max-width: 420px;
}

.goods-link {
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.goods-link:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.goods-name strong,
.cell-main {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.goods-name span,
.cell-sub {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}

.delta {
  font-size: 12px;
  font-weight: 700;
}

.delta.up {
  color: var(--green);
}

.delta.down {
  color: var(--red);
}

.empty {
  height: 220px;
  color: var(--muted);
  text-align: center;
}

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

.admin-panel {
  margin-top: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.admin-content {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  padding: 16px;
}

.admin-content h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.permission-grid,
.submission-list,
.user-list {
  display: grid;
  gap: 8px;
}

.permission-item,
.submission-item,
.user-item {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fbfcfe;
}

.permission-item {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 0 10px;
  font-size: 13px;
}

.permission-item small {
  color: var(--muted);
}

.submission-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.user-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px;
  gap: 10px;
  align-items: center;
  padding: 10px;
}

.user-item strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-item select {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.submission-item strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.submission-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.submission-actions button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.submission-actions button[data-action="approve"] {
  border-color: rgba(22, 138, 74, 0.28);
  color: var(--green);
}

.submission-actions button[data-action="reject"] {
  border-color: rgba(201, 53, 53, 0.28);
  color: var(--red);
}

.gate-shell {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
}

.gate-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 16, 28, 0.52);
  backdrop-filter: blur(8px);
}

.gate-modal {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.75fr);
  gap: 18px;
  width: min(880px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  padding: 24px;
  border: 1px solid rgba(16, 33, 58, 0.12);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(10, 20, 34, 0.26);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}

.gate-copy {
  display: grid;
  align-content: start;
  gap: 14px;
  padding-right: 4px;
}

.gate-kicker {
  width: fit-content;
  padding: 5px 9px;
  border: 1px solid rgba(22, 119, 255, 0.22);
  border-radius: 999px;
  background: #f2f7ff;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 760;
}

.gate-copy h2 {
  max-width: 460px;
  font-size: 26px;
  line-height: 1.24;
}

.gate-copy p {
  max-width: 520px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.gate-steps {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.gate-steps div {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fbfcfe;
}

.gate-steps strong {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #eaf3ff;
  color: var(--accent-dark);
  font-size: 13px;
}

.gate-steps span {
  color: #303846;
  font-size: 13px;
}

.gate-actions,
.modal-auth-form,
.modal-submit-form {
  display: grid;
  gap: 12px;
}

.gate-actions {
  align-content: start;
  padding-top: 32px;
}

.modal-auth-form,
.modal-submit-form {
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fbfcfe;
}

.modal-submit-form.locked {
  opacity: 0.7;
}

.modal-auth-form label,
.modal-submit-form label {
  display: grid;
  gap: 6px;
}

.modal-auth-form label span,
.modal-submit-form label span {
  color: var(--muted);
  font-size: 12px;
}

.modal-auth-form input,
.modal-submit-form input {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.modal-auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.modal-auth-actions button,
.modal-submit-form button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 650;
}

.modal-auth-actions button[data-modal-auth-action="login"],
.modal-submit-form button {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.modal-message {
  padding: 0 2px;
}

@media (max-width: 1180px) and (min-width: 981px) {
  .hero-summary {
    max-width: 500px;
  }

  .hero-proof {
    grid-template-columns: 1fr;
    max-width: 360px;
  }

  .ops-board {
    right: 28px;
    width: min(430px, 40vw);
  }
}

@media (max-width: 980px) {
  .app {
    width: min(100% - 20px, 1480px);
    padding: 18px 0;
  }

  .topbar,
  .positioning,
  .auth-panel,
  .controls,
  .content,
  .admin-content,
  .gate-modal {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }

  .brand-hero {
    display: flex;
    flex-direction: column;
    min-height: auto;
    background:
      linear-gradient(180deg, rgba(9, 20, 35, 0.92) 0%, rgba(12, 29, 50, 0.62) 100%),
      url("/hero-inventory-radar-1780998546-1.png"),
      linear-gradient(120deg, #081423, #173c62 58%, #d8eef4);
    background-position: center;
    background-size: cover;
  }

  .brand-nav {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    padding: 18px 20px 0;
  }

  .brand-mark {
    display: grid;
    gap: 2px;
  }

  .brand-nav-actions {
    display: none;
  }

  .hero-inner {
    order: 1;
    z-index: 3;
    min-height: auto;
    padding: 30px 20px 24px;
  }

  .signal-board {
    position: relative;
    inset: auto;
    order: 2;
    z-index: 3;
    width: 100%;
    min-width: 0;
  }

  .ops-board {
    position: relative;
    right: auto;
    top: auto;
    width: calc(100% - 40px);
    max-width: none;
    margin: 0 20px 28px;
    transform: none;
  }

  .signal-rail {
    display: none;
  }

  .hero-proof,
  .positioning-grid {
    grid-template-columns: 1fr;
  }

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

  .shop-list {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .shop-list:not([open]) {
    max-height: 54px;
  }

  .shop-list summary {
    cursor: pointer;
  }

  .shop-list .section-head {
    border-bottom: 0;
  }

  .shop-list[open] .section-head {
    border-bottom: 1px solid var(--line-soft);
  }

  .shop-list .section-head::after {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    min-height: 28px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    content: "展开";
    font-size: 12px;
  }

  .shop-list[open] .section-head::after {
    content: "收起";
  }

  .shop-list-body {
    max-height: 340px;
    overflow: auto;
  }

  .gate-modal {
    gap: 12px;
    padding: 20px;
  }

  .gate-actions {
    padding-top: 0;
  }
}

@media (max-width: 520px) {
  .hero-inner h1 {
    font-size: 48px;
  }

  .hero-subtitle {
    font-size: 22px;
  }

  .hero-visitor-meter {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: min(100%, 320px);
  }

  .hero-visitor-meter div {
    min-width: 0;
  }

  .hero-visitor-meter div + div {
    padding-left: 10px;
  }

  .hero-summary {
    font-size: 16px;
  }

  h1,
  .dashboard-title {
    font-size: 22px;
  }

  .hero-actions {
    display: grid;
  }

  .hero-proof {
    gap: 8px;
    margin-top: 22px;
  }

  .hero-proof div {
    min-height: 64px;
    padding: 12px;
  }

  .hero-proof dd {
    margin-top: 6px;
    font-size: 14px;
  }

  .ops-board {
    padding: 12px;
    margin: 0 20px 22px;
  }

  .ops-board-head {
    margin-bottom: 10px;
  }

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

  .ops-grid div {
    min-height: 64px;
    padding: 10px;
  }

  .ops-grid strong {
    font-size: 23px;
  }

  .ops-feed {
    display: none;
  }

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

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

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

  .gate-shell {
    padding: 10px;
  }

  .gate-modal {
    max-height: calc(100vh - 20px);
    padding: 18px 14px 14px;
  }

  .modal-close {
    top: 8px;
    right: 8px;
  }

  .gate-copy h2 {
    padding-right: 34px;
    font-size: 22px;
  }

  .gate-copy p {
    font-size: 13px;
  }

  .modal-auth-actions {
    grid-template-columns: 1fr;
  }

  .add-form button {
    width: 100%;
  }
}
