:root {
  --bg: #f4f6f3;
  --panel: #ffffff;
  --ink: #17201b;
  --muted: #66736b;
  --line: #dfe6df;
  --brand: #2f6f5e;
  --brand-dark: #204f44;
  --soft: #e8f1ec;
  --warn: #f4e4d9;
  --good: #dcece5;
  --shadow: 0 18px 50px rgba(25, 39, 31, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.platform-shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}

.platform-sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 24px;
  color: #f4faf6;
  background: #14231d;
}

.platform-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #e8c8b6;
  color: #14231d;
  font-weight: 800;
}

.platform-brand strong,
.platform-brand span,
.metric span,
.metric strong,
.store-name,
.store-meta,
.plan-card strong,
.plan-card span,
.plan-card em,
.account-card strong,
.account-card span {
  display: block;
}

.platform-brand span {
  color: #b9c9c0;
  font-size: 13px;
}

.platform-nav {
  display: grid;
  gap: 8px;
}

.platform-nav button,
.store-link {
  border: 0;
  border-radius: 8px;
  color: #d9e5df;
  background: transparent;
  padding: 12px 14px;
  text-align: left;
  text-decoration: none;
}

.platform-nav button.is-active,
.platform-nav button:hover,
.store-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.store-link {
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.platform-main {
  min-width: 0;
  padding: 22px;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}

.login-screen.is-hidden {
  display: none;
}

.login-card {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: 28px;
}

.login-card h1 {
  margin-bottom: 6px;
}

.login-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.login-card input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
}

.platform-topbar,
.panel-header,
.toolbar,
.store-row,
.store-actions,
.form-actions {
  display: flex;
  align-items: center;
}

.platform-topbar {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

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

.eyebrow {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

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

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

h2 {
  margin-bottom: 0;
  font-size: 18px;
}

.primary-button,
.secondary-button,
.icon-button,
.tiny-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.primary-button {
  border-color: var(--brand);
  background: var(--brand);
  color: #ffffff;
  padding: 0 16px;
  font-weight: 800;
}

.secondary-button,
.tiny-button,
.icon-button {
  background: #ffffff;
  color: var(--brand-dark);
}

.secondary-button {
  padding: 0 14px;
}

.tiny-button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 13px;
}

.icon-button {
  width: 40px;
  font-size: 18px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

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

.metric {
  padding: 18px;
}

.metric span,
.store-meta,
.plan-card span,
.account-card span,
.form-message {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.metric strong {
  margin: 8px 0 4px;
  font-size: 28px;
}

.panel {
  min-width: 0;
  padding: 16px;
}

.panel-header {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.toolbar {
  gap: 10px;
}

.toolbar input,
.toolbar select,
.store-form input,
.store-form select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
}

.toolbar input {
  width: 240px;
}

.store-table {
  display: grid;
  gap: 10px;
}

.store-row {
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.store-main {
  min-width: 0;
}

.store-name {
  margin-bottom: 5px;
  color: var(--ink);
  font-weight: 800;
}

.store-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 999px;
  color: var(--brand-dark);
  background: var(--good);
  padding: 0 10px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill.warn {
  color: #7a3928;
  background: var(--warn);
}

.store-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.plan-list,
.account-card {
  display: grid;
  gap: 10px;
}

.plan-card,
.account-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.plan-card em {
  margin-top: 8px;
  color: var(--brand-dark);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.modal {
  width: min(720px, calc(100vw - 32px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 30px 90px rgba(20, 35, 29, 0.24);
}

.modal::backdrop {
  background: rgba(20, 35, 29, 0.35);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 18px;
}

.store-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
}

.store-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.store-form .full,
.form-actions {
  grid-column: 1 / -1;
}

.form-actions {
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 900px) {
  .platform-shell,
  .metric-grid,
  .two-col,
  .store-form {
    grid-template-columns: 1fr;
  }

  .platform-topbar,
  .panel-header,
  .store-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar input {
    width: 100%;
  }
}
[hidden] {
  display: none !important;
}

