:root {
  --teal: #1eb89a;
  --teal-deep: #0f9a80;
  --teal-soft: #e6faf4;
  --teal-mid: #3ad0b0;
  --glow: #7ee8c8;
  --bg: #f0f4f3;
  --card: #fff;
  --text: #243038;
  --muted: #7a8794;
  --line: #e6ecea;
  --sidebar-w: 220px;
  --pink: #ff6b8a;
  --yellow: #f5b942;
  --purple: #7c8cff;
  --cyan: #3ec6e0;
  --red: #ef4444;
  --orange: #f59e0b;
  --shadow: 0 10px 28px rgba(15, 80, 70, 0.07);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "DM Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(62, 211, 173, 0.18), transparent 55%),
    radial-gradient(900px 420px at 100% 0%, rgba(124, 140, 255, 0.10), transparent 50%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ===== Login ===== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #f7fffc 0%, #fff 40%, #f3fbf8 100%);
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 16px;
  padding: 36px 32px 28px;
  box-shadow: 0 16px 40px rgba(46, 196, 166, 0.12);
}
.login-card .logo {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
  background: linear-gradient(90deg, #1aa88c, #2ec4a6, #6ee0c8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.login-card .tip {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 28px;
}
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  color: #555;
}
.field input, .field select, .field textarea {
  width: 100%;
  height: 42px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 14px;
  outline: none;
  transition: border-color .15s;
  background: #fff;
}
.field textarea {
  height: 88px;
  padding: 10px 12px;
  resize: vertical;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--teal);
}
.btn-primary {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.btn-primary:hover { background: var(--teal-deep); }
.alert {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}
.alert.error { background: #fef2f2; color: #b91c1c; }
.alert.ok { background: #ecfdf5; color: #047857; }
.alert.info { background: #eff6ff; color: #1d4ed8; }

/* ===== Shell ===== */
.app {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbfa 100%);
  border-right: 1px solid var(--line);
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  z-index: 20;
  box-shadow: 4px 0 24px rgba(15, 80, 70, 0.04);
}
.sidebar .brand {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.4px;
  background: linear-gradient(90deg, #0f9a80, #1eb89a 55%, #5ad6c0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.sidebar nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px 24px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  color: #4b5563;
  font-size: 14px;
  margin-bottom: 2px;
  transition: background .12s, color .12s;
}
.nav-item:hover { background: #f7faf9; color: var(--teal-deep); }
.nav-item.active {
  background: var(--teal-soft);
  color: var(--teal-deep);
  font-weight: 600;
}
.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: .85;
}
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
}
.topbar {
  height: 56px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 24px;
  gap: 16px;
}
.topbar .user {
  font-size: 13px;
  color: var(--muted);
}
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-btn:hover { background: #f3f4f6; color: var(--teal); }
.content {
  padding: 20px 24px 40px;
}
.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(90deg, #3ed3ad, #2ec4a6);
  color: #fff;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 14px;
  margin-bottom: 18px;
  box-shadow: 0 8px 18px rgba(46, 196, 166, 0.22);
}
.banner a { color: #fff; text-decoration: underline; font-weight: 600; }
.toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}
.link {
  color: #3b82f6;
  font-size: 13px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}
.link:hover { text-decoration: underline; }

.section-title {
  font-size: 18px;
  font-weight: 600;
  margin: 8px 0 14px;
  letter-spacing: 0.2px;
}
.section-title .sub {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
  margin-left: 8px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--card);
  border-radius: 14px;
  border: 1px solid #f0f2f5;
  box-shadow: 0 4px 14px rgba(20, 30, 40, 0.04);
  padding: 18px 18px 14px;
}
.stat-card .head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.icon-box.green { background: var(--teal); }
.icon-box.pink { background: var(--pink); }
.icon-box.yellow { background: var(--yellow); }
.icon-box.purple { background: var(--purple); }
.icon-box.cyan { background: var(--cyan); }
.stat-card .head strong { font-size: 14px; }
.stat-rows { display: flex; flex-direction: column; gap: 8px; }
.stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #555;
}
.stat-row b { font-size: 18px; color: #222; font-weight: 700; }
.stat-note {
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

.overview-card .num {
  font-size: 28px;
  font-weight: 700;
  margin: 6px 0 10px;
}
.overview-card .label {
  font-size: 13px;
  color: #555;
}
.spark {
  width: 100%;
  height: 40px;
  margin-top: 4px;
}
.spark polyline {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.panel {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #f0f2f5;
  box-shadow: 0 4px 14px rgba(20, 30, 40, 0.04);
  padding: 20px;
}
.panel h2 {
  font-size: 16px;
  margin-bottom: 16px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 20px;
}
@media (max-width: 800px) {
  .form-grid { grid-template-columns: 1fr; }
}
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.actions-bar {
  margin-top: 20px;
  display: flex;
  gap: 10px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  border: none;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { background: var(--teal-deep); }
.btn-ghost {
  background: #f3f4f6;
  color: #333;
}
.btn-sm {
  height: 30px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: 8px;
}
.btn-danger { background: #fee2e2; color: #b91c1c; }
.btn-ok { background: #d1fae5; color: #047857; }

.table-wrap { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.data th, table.data td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
table.data th {
  color: var(--muted);
  font-weight: 500;
  background: #fafbfc;
}
table.data tr:hover td { background: #fbfdfe; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
}
.badge.green { background: #d1fae5; color: #047857; }
.badge.red { background: #fee2e2; color: #b91c1c; }
.badge.orange { background: #ffedd5; color: #c2410c; }
.badge.gray { background: #f3f4f6; color: #6b7280; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.filters input, .filters select {
  height: 36px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 13px;
}
.pager {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
  font-size: 13px;
}
.pager a, .pager span {
  padding: 6px 10px;
  border-radius: 6px;
  background: #f3f4f6;
}
.pager .current { background: var(--teal); color: #fff; }

.install-wrap {
  max-width: 520px;
  margin: 60px auto;
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 12px 32px rgba(0,0,0,.06);
}
.install-wrap h1 {
  font-size: 22px;
  margin-bottom: 8px;
  color: var(--teal-deep);
}
.install-wrap p { color: var(--muted); font-size: 13px; margin-bottom: 22px; }

/* ===== 有光风格增强 ===== */
.glow-panel,
.panel {
  box-shadow: var(--shadow);
  border: 1px solid rgba(30, 184, 154, 0.08);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.panel-head h2 { margin-bottom: 0; }
.tabs { display: flex; gap: 8px; }
.tab {
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  background: #f3f5f6;
  color: var(--muted);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
}
.tab.active {
  background: linear-gradient(90deg, var(--teal-deep), var(--teal));
  color: #fff;
  font-weight: 600;
}
.alert.warn {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #ffedd5;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  margin-bottom: 16px;
}
table.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.table th, table.table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
table.table th {
  color: var(--muted);
  font-weight: 500;
  background: #f8fbfa;
}
table.table tr:hover td { background: #fbfdfe; }
.strong { font-weight: 600; color: var(--text); }
.muted { color: var(--muted); text-align: center; padding: 24px !important; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(30,184,154,.16), rgba(30,184,154,.06));
  box-shadow: inset 3px 0 0 var(--teal);
}
.banner {
  background: linear-gradient(105deg, #1eb89a 0%, #2ec4a6 45%, #6ee0c8 100%);
}
.topbar {
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,.88);
}
