:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --ink: #111827;
  --muted: #667085;
  --line: #d9e2ec;
  --line-strong: #b8c5d6;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --blue: #2563eb;
  --green: #16803c;
  --amber: #b45309;
  --red: #b42318;
  --shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 1080px;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.boot-screen {
  padding: 80px;
  color: var(--muted);
}

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

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 20px;
  border-right: 1px solid var(--line);
  background: #fbfcfe;
}

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  font-weight: 900;
}

.brand-title {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
}

.brand-subtitle {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.app-list {
  display: grid;
  gap: 10px;
}

.app-card {
  width: 100%;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: inherit;
  text-align: left;
}

.app-card.active {
  border-color: var(--primary);
  box-shadow: inset 4px 0 0 var(--primary);
}

.app-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.app-name {
  overflow: hidden;
  font-size: 15px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  word-break: break-all;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.badge.ok {
  background: #dcfce7;
  color: var(--green);
}

.badge.warn {
  background: #fff7ed;
  color: var(--amber);
}

.badge.err {
  background: #fee4e2;
  color: var(--red);
}

.side-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.side-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 900;
}

.main {
  min-width: 0;
  padding: 24px 28px 40px;
}

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

.eyebrow {
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 900;
}

h1 {
  margin: 5px 0 8px;
  font-size: 28px;
  line-height: 1.25;
}

.page-desc {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.top-actions,
.row-actions,
.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.tab {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #475467;
  font-size: 14px;
  font-weight: 800;
}

.tab.active {
  border-color: #99d2cb;
  background: #e6fffb;
  color: var(--primary-dark);
}

.content {
  margin-top: 18px;
}

.grid {
  display: grid;
  gap: 14px;
}

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

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

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

.section {
  padding: 18px;
}

.metric {
  min-height: 112px;
  padding: 18px;
}

.metric-value {
  display: block;
  font-size: 30px;
  font-weight: 950;
}

.metric-label {
  display: block;
  margin-top: 8px;
  color: #475467;
  font-weight: 800;
}

.metric-note {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-title h2,
.section-title h3 {
  margin: 0;
  font-size: 18px;
}

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

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

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

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: #344054;
  font-size: 13px;
  font-weight: 900;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: white;
  color: var(--ink);
  outline: none;
}

.field textarea {
  min-height: 118px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #344054;
  font-weight: 800;
}

.inline-check input {
  width: 16px;
  height: 16px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: white;
  color: #344054;
  font-weight: 900;
}

.button.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.button.blue {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
}

.button.ghost {
  background: transparent;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.alert {
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: #344054;
  line-height: 1.55;
}

.alert.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: var(--green);
}

.alert.err {
  border-color: #fecdca;
  background: #fffbfa;
  color: var(--red);
}

.alert.warn {
  border-color: #fed7aa;
  background: #fff7ed;
  color: var(--amber);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #f8fafc;
  color: #344054;
  font-size: 13px;
}

td {
  color: #1f2937;
  font-size: 13px;
  line-height: 1.45;
}

tr:last-child td {
  border-bottom: 0;
}

.empty {
  padding: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #fbfcfe;
  color: var(--muted);
  text-align: center;
}

.notice-preview {
  min-height: 94px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  white-space: pre-wrap;
}

.notice-preview-image {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.swatches {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.swatch {
  width: 28px;
  height: 28px;
  border: 2px solid white;
  border-radius: 999px;
  box-shadow: 0 0 0 1px var(--line-strong);
}

.swatch.active {
  box-shadow: 0 0 0 3px var(--primary);
}

.stack {
  display: grid;
  gap: 14px;
}

.footer-note {
  margin-top: auto;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

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

.login-card {
  width: min(520px, 100%);
  padding: 28px;
}

.login-desc {
  margin: 18px 0 22px;
  color: var(--muted);
  line-height: 1.65;
}

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

.login-form .alert {
  margin: 0;
}

.login-hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.login-button {
  width: 100%;
  margin-top: 4px;
}
