:root {
  color-scheme: light;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  background: #f4f8fb;
  color: #18242d;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }

.shell { width: min(1180px, calc(100% - 32px)); margin: 40px auto 72px; }
.hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
}
.brand-mark {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(135deg, #28d7bd, #36aeea 55%, #8d63f3);
  color: white;
  font-size: 27px;
  font-weight: 800;
  box-shadow: 0 16px 36px rgb(40 174 214 / 24%);
}
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: clamp(30px, 5vw, 48px); letter-spacing: -0.04em; }
h2 { margin-bottom: 0; font-size: 22px; }
.hero p:not(.eyebrow) { margin-bottom: 0; color: #60717d; }
.eyebrow { margin-bottom: 6px; color: #347b8b; font-size: 12px; font-weight: 800; letter-spacing: .14em; }

.panel {
  background: rgb(255 255 255 / 92%);
  border: 1px solid #dce8ee;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 16px 50px rgb(36 72 91 / 7%);
}
.login-panel { margin-bottom: 22px; }
.dashboard { display: grid; gap: 22px; min-width: 0; }
.dashboard > * { min-width: 0; }
.section-title { margin-bottom: 18px; }
.row-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.state { padding: 8px 13px; border-radius: 999px; font-weight: 700; font-size: 13px; }
.state-off { background: #edf1f3; color: #6c7a83; }
.state-on { background: #d9fbf1; color: #08785e; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
label { display: grid; gap: 7px; color: #4d626f; font-size: 13px; font-weight: 700; }
.wide { grid-column: 1 / -1; }
input, select, textarea {
  width: 100%;
  border: 1px solid #cddce3;
  border-radius: 12px;
  background: #fbfdfe;
  color: #17242c;
  padding: 11px 12px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: #2bbca8; box-shadow: 0 0 0 3px rgb(43 188 168 / 14%); }
textarea { resize: vertical; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
button { border: 0; border-radius: 12px; padding: 10px 16px; font-weight: 800; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
.primary { background: linear-gradient(135deg, #16b89d, #318fe8); color: white; }
.secondary { background: #edf5f8; color: #31505f; }
.notice, .hint { margin: 14px 0 0; color: #657681; font-size: 13px; line-height: 1.7; }
.notice.error { color: #b13f42; }

.metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; min-width: 0; }
.metrics article { min-width: 0; background: #fff; border: 1px solid #dfe9ee; border-radius: 18px; padding: 18px; }
.metrics span { display: block; color: #70808a; font-size: 12px; }
.metrics strong { display: block; margin-top: 8px; font-size: 28px; }
.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 13px 10px; text-align: left; border-bottom: 1px solid #e6eef2; font-size: 13px; }
th { color: #647681; font-size: 12px; }
.empty { text-align: center; color: #83919a; padding: 32px; }

@media (max-width: 900px) {
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .shell { width: min(100% - 20px, 1180px); margin-top: 20px; }
  .hero { grid-template-columns: auto 1fr; }
  .hero .state { grid-column: 1 / -1; justify-self: start; }
  .form-grid { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel { padding: 18px; border-radius: 18px; }
}
