:root {
  --navy: #17344b;
  --blue: #265a7b;
  --teal: #147a70;
  --paper: #f3f6f8;
  --ink: #1e3341;
  --muted: #657785;
  --line: #dbe4e9;
  --white: #fff;
  --amber: #94631e;
  --red: #ad3d38;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 15px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 32px;
  letter-spacing: -1px;
  line-height: 1.3;
}
h2 {
  font-size: 19px;
}
h3 {
  font-size: 15px;
}
p {
  line-height: 1.8;
}
button {
  border: 0;
  border-radius: 6px;
  padding: 11px 17px;
  transition: background 0.15s;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #70c8bd;
  outline-offset: 3px;
}
input,
textarea,
select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #bfcdd6;
  border-radius: 5px;
  background: white;
  color: var(--ink);
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #73b9b0;
  outline-offset: 1px;
}
textarea {
  resize: vertical;
  line-height: 1.7;
}
label {
  font-weight: 600;
  font-size: 14px;
}
.primary {
  background: var(--teal);
  color: white;
}
.primary:hover {
  background: #0d645b;
}
.secondary {
  background: #edf3f6;
  color: var(--blue);
  border: 1px solid #cbdbe4;
}
.quiet {
  background: transparent;
  color: var(--blue);
  padding: 8px 12px;
}
.subtle,
small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.error {
  color: var(--red);
  font-size: 14px;
}
.brand {
  display: block;
  font-weight: 750;
  font-size: 27px;
  letter-spacing: 1px;
}
.brand span {
  display: block;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  margin-top: 5px;
}
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
}
.login-story {
  background: var(--navy);
  color: white;
  padding: 64px clamp(30px, 7vw, 110px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 34px;
}
.login-story .brand {
  margin-bottom: 30px;
}
.login-story h1 {
  font-size: clamp(34px, 3.4vw, 50px);
  line-height: 1.4;
}
.login-story p,
.login-story small {
  color: #bed2df;
}
.route-art {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 30px;
  font-size: 13px;
}
.route-art span {
  border: 1px solid #56798e;
  padding: 12px 10px;
  border-radius: 6px;
  white-space: nowrap;
}
.route-art i {
  height: 1px;
  background: #7496a9;
  flex: 1;
  max-width: 40px;
}
.login-form {
  width: min(350px, 80%);
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.login-form h2 {
  font-size: 28px;
  margin-bottom: 12px;
}
.login-form button {
  margin-top: 8px;
}
.workspace {
  display: grid;
  grid-template-columns: 218px 1fr;
  min-height: 100vh;
}
aside {
  background: var(--navy);
  color: #c4d5df;
  position: fixed;
  inset: 0 auto 0 0;
  width: 218px;
  padding: 35px 22px;
  display: flex;
  flex-direction: column;
}
aside .brand {
  color: white;
  padding: 0 14px;
  margin-bottom: 48px;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
nav button {
  text-align: left;
  color: #c4d5df;
  background: transparent;
  padding: 13px 16px;
}
nav button.active {
  background: #284d65;
  color: white;
  border-left: 3px solid #76cbbc;
  padding-left: 13px;
}
nav button:hover {
  background: #24465d;
}
.aside-foot {
  margin-top: auto;
  font-size: 12px;
  line-height: 1.8;
}
.aside-foot .quiet {
  display: block;
  color: #c4d5df;
  margin-top: 20px;
  padding-left: 0;
}
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #7ecaba;
  border-radius: 50%;
  margin-right: 8px;
}
main {
  grid-column: 2;
  min-width: 0;
}
.topbar {
  height: 72px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 38px;
  background: white;
  font-size: 13px;
}
.topbar > div {
  display: flex;
  align-items: center;
  gap: 14px;
}
.page {
  max-width: 1320px;
  margin: auto;
  padding: 36px 38px 60px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}
.page-heading .subtle {
  margin-bottom: 7px;
}
.banner {
  border-left: 4px solid #b4d8d1;
  background: #e8f2f0;
  padding: 16px 19px;
  line-height: 1.8;
  font-size: 14px;
  margin-bottom: 26px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: white;
  border: 1px solid var(--line);
  margin-bottom: 28px;
  border-radius: 8px;
}
.metrics article {
  padding: 24px 28px;
  border-right: 1px solid var(--line);
}
.metrics article:last-child {
  border: 0;
}
.metrics span,
.metrics small {
  display: block;
}
.metrics span {
  font-size: 14px;
  color: var(--muted);
}
.metrics strong {
  font-size: 36px;
  font-weight: 600;
  display: block;
  margin: 10px 0;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}
.overview-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}
.section-title .subtle {
  font-size: 12px;
}
.connection {
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  gap: 15px;
}
.connection:last-child {
  border: 0;
  padding-bottom: 0;
}
.connection p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}
.badge {
  background: #edf2f5;
  color: #5a6e7c;
  border-radius: 4px;
  display: inline-block;
  padding: 5px 9px;
  font-size: 12px;
  white-space: nowrap;
}
.badge.good {
  color: #0d7164;
  background: #e3f3ed;
}
.badge.warn {
  color: #8c6025;
  background: #fff1d9;
}
.badge.bad {
  color: #a13b36;
  background: #fcecea;
}
.getting-started ul {
  list-style: none;
  padding: 0;
  margin: 22px 0;
}
.getting-started li {
  padding: 0 0 20px 18px;
  border-left: 2px solid #d4e7e2;
}
.getting-started li:last-child {
  padding-bottom: 0;
}
.getting-started b {
  font-weight: 600;
  font-size: 14px;
}
.getting-started li span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
  margin-top: 5px;
}
.channel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  gap: 20px;
}
.channel-row:first-child {
  padding-top: 0;
}
.channel-row:last-child {
  border: 0;
  padding-bottom: 0;
}
.channel-row h3 {
  font-size: 16px;
  margin-bottom: 8px;
}
.channel-row .actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.empty {
  text-align: center;
  padding: 55px 25px;
  color: var(--muted);
}
.empty h3 {
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 12px;
}
.empty p {
  max-width: 430px;
  margin: auto;
  font-size: 14px;
}
.table-wrap {
  overflow-x: auto;
  padding: 0;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
}
th {
  background: #f8fafb;
  font-weight: 500;
  color: var(--muted);
  font-size: 12px;
  padding: 17px 22px;
}
td {
  padding: 17px 22px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.preview-grid,
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.form-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.form-panel h2 {
  margin-bottom: 8px;
}
.form-panel .primary {
  align-self: flex-start;
  margin-top: 8px;
}
.answer-panel {
  min-height: 380px;
}
.answer-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.9;
  font-size: 15px;
}
.answer-panel .answer-text {
  padding: 20px 0 30px;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 400;
  margin: 4px 0;
}
.check input {
  width: 17px;
  height: 17px;
  accent-color: var(--teal);
}
.setup-panel h2 {
  margin-bottom: 18px;
}
.setup-panel h3 {
  margin-bottom: 10px;
}
.setup-panel p {
  font-size: 14px;
}
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 25px 0;
}
.setup-panel textarea {
  margin-top: 16px;
}
details {
  border-top: 1px solid var(--line);
  padding-top: 15px;
}
summary {
  cursor: pointer;
  color: var(--blue);
  font-size: 14px;
}
details label {
  display: block;
  margin: 12px 0 6px;
}
details p {
  margin-top: 12px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  width: min(600px, 94vw);
  max-height: 92vh;
  padding: 28px;
  color: var(--ink);
}
dialog::backdrop {
  background: #17344b66;
}
dialog .section-title {
  margin-bottom: 4px;
}
#notice {
  position: fixed;
  right: 24px;
  top: 18px;
  z-index: 20;
  max-width: min(430px, 90vw);
  background: var(--navy);
  color: white;
  padding: 14px 20px;
  border-radius: 7px;
  box-shadow: 0 5px 18px #17344b22;
}
[hidden] {
  display: none !important;
}
@media (max-width: 1050px) {
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .workspace {
    grid-template-columns: 180px 1fr;
  }
  aside {
    width: 180px;
    padding: 30px 14px;
  }
  .page {
    padding: 28px 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .metrics article {
    padding: 20px;
  }
  .preview-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .login-story {
    padding: 45px 35px;
  }
}
@media (max-width: 650px) {
  .login-shell {
    display: flex;
    flex-direction: column;
  }
  .login-story {
    padding: 30px;
  }
  .login-story .brand {
    margin: 0;
  }
  .login-story h1 {
    font-size: 30px;
  }
  .login-story p,
  .login-story .route-art,
  .login-story small {
    display: none;
  }
  .login-form {
    padding: 35px 0;
  }
  .workspace {
    display: block;
  }
  aside {
    position: static;
    width: auto;
    padding: 18px;
  }
  .brand {
    font-size: 23px;
  }
  aside .brand {
    margin: 0 0 18px;
    padding: 0;
  }
  aside .brand span {
    display: inline-block;
    margin-left: 12px;
  }
  nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 4px;
  }
  nav button {
    white-space: nowrap;
    padding: 10px;
    font-size: 13px;
  }
  nav button.active {
    border: 0;
    padding: 10px;
  }
  .aside-foot {
    display: none;
  }
  .topbar {
    height: 58px;
    padding: 0 18px;
  }
  .topbar > div {
    gap: 2px;
  }
  .page {
    padding: 25px 18px;
  }
  .page-heading {
    align-items: flex-start;
  }
  h1 {
    font-size: 27px;
  }
  .metrics {
    grid-template-columns: 1fr;
  }
  .metrics article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 5px 15px;
  }
  .metrics strong {
    grid-column: 2;
    grid-row: 1/3;
    margin: 0;
    font-size: 30px;
  }
  .metrics small {
    grid-column: 1;
  }
  .panel {
    padding: 20px;
  }
  .table-wrap {
    padding: 0;
  }
  .section-title {
    align-items: flex-start;
  }
  .section-title .subtle {
    display: none;
  }
  .channel-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .channel-row .actions {
    width: 100%;
    justify-content: space-between;
  }
  .page-heading .badge {
    white-space: normal;
    max-width: 140px;
  }
  .route-art {
    gap: 5px;
  }
  dialog {
    padding: 20px;
  }
  .topbar .badge {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
