:root {
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #18263a;
  background: #f3f6fa;
  font-synthesis: none;
  font-size: 16px;
  --ink: #112439;
  --muted: #617187;
  --line: #e2e8f0;
  --accent: #087f8c;
  --nav: #10273a;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  outline-offset: 4px;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
button,
.button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 9px;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
button:hover,
.button:hover {
  background: #f1f6fa;
}
button.primary,
.button.primary {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
button.primary:hover {
  background: #086e78;
}
button.danger {
  color: #a63240;
  border-color: #f0ced4;
  background: #fff8f9;
}
button.small {
  padding: 7px 10px;
  font-size: 0.875rem;
}
a {
  color: var(--accent);
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 1.85rem;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}
h2 {
  font-size: 1.1rem;
  margin-bottom: 5px;
}
p {
  line-height: 1.7;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
}
.mono {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}
.shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--nav);
  color: #c3d1dd;
  padding: 29px 18px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 1.2rem;
  font-weight: 750;
  color: inherit;
  text-decoration: none;
  padding: 0 12px;
}
.mark {
  display: inline-grid;
  place-items: center;
  background: #10a6af;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  font-size: 1.3rem;
}
.brand-sub {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: #8ba2b6;
  margin: 12px 0 39px 60px;
}
.nav {
  display: grid;
  gap: 7px;
}
.nav button {
  justify-content: flex-start;
  background: none;
  border: 0;
  color: #afc3d3;
  padding: 13px 15px;
  font-weight: 500;
}
.nav button.active {
  background: #234255;
  color: #fff;
}
.nav svg {
  width: 19px;
  height: 19px;
}
.side-bottom {
  margin-top: auto;
  border-top: 1px solid #294354;
  padding: 21px 12px 0;
  font-size: 0.875rem;
  line-height: 1.7;
}
.side-bottom strong {
  color: #e5eef5;
}
.main {
  padding: 0 40px 44px;
  max-width: 1600px;
  width: 100%;
  margin: auto;
}
.topbar {
  height: 85px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 0.875rem;
}
.topbar-right {
  display: flex;
  gap: 14px;
  align-items: center;
}
.chip {
  background: #e6f2f2;
  border: 1px solid #cbe5e5;
  color: #237579;
  padding: 5px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  white-space: nowrap;
}
.heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}
.heading p {
  color: var(--muted);
  margin: 0;
  font-size: 0.95rem;
}
.banner {
  border: 1px solid #efd9a7;
  background: #fff8e9;
  color: #80632e;
  padding: 14px 18px;
  border-radius: 10px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.875rem;
  line-height: 1.65;
  margin-bottom: 26px;
}
.banner strong {
  color: #6c5025;
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 0 0 26px;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 22px;
  box-shadow: 0 2px 3px #15263c03;
}
.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.875rem;
}
.stat-icon {
  padding: 9px;
  background: #edf6f6;
  border-radius: 10px;
  color: var(--accent);
}
.stat-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}
.stat-value {
  font-size: 2.1rem;
  font-weight: 650;
  letter-spacing: -0.04em;
  margin: 13px 0 7px;
}
.stat-note {
  font-size: 0.8rem;
  color: var(--muted);
}
.split {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 22px;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
  margin-bottom: 23px;
}
.panel-head {
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}
.panel-head p {
  font-size: 0.875rem;
  margin: 0;
  color: var(--muted);
}
.panel-body {
  padding: 24px;
}
.empty {
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
}
.empty .empty-icon {
  background: #f0f6f8;
  border-radius: 15px;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  color: #5a8998;
}
.empty h3 {
  font-size: 1rem;
  color: #2d4358;
  margin-bottom: 9px;
}
.empty p {
  font-size: 0.875rem;
  max-width: 360px;
  margin: 0 auto 18px;
}
.empty svg {
  width: 27px;
  height: 27px;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}
th {
  font-weight: 500;
  color: var(--muted);
  background: #fafbfd;
  font-size: 0.8rem;
  white-space: nowrap;
}
th,
td {
  padding: 15px 20px;
  border-bottom: 1px solid #edf0f5;
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: 0;
}
td strong {
  font-weight: 600;
}
td .sub {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 6px;
}
.actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.badge {
  display: inline-flex;
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 0.75rem;
  background: #e8f5ef;
  color: #287759;
  white-space: nowrap;
}
.badge.expired,
.badge.revoked {
  background: #fbecef;
  color: #a84c59;
}
.badge.paused {
  background: #f0f2f5;
  color: #647387;
}
.setup-item {
  display: flex;
  gap: 15px;
  padding: 17px 0;
  border-bottom: 1px solid #edf0f5;
}
.setup-item:first-child {
  padding-top: 0;
}
.setup-item:last-child {
  border: 0;
  padding-bottom: 0;
}
.setup-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #edf5f6;
  color: var(--accent);
}
.setup-icon svg {
  width: 18px;
  height: 18px;
}
.setup-item strong {
  font-size: 0.9rem;
}
.setup-item p {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 5px 0 0;
}
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-aside {
  background: var(--nav);
  color: #fff;
  padding: 48px 10%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-aside .brand {
  padding: 0;
}
.login-story {
  max-width: 440px;
  padding: 55px 0;
}
.login-story h1 {
  font-size: 2.8rem;
  line-height: 1.3;
  letter-spacing: -0.04em;
}
.login-story p {
  color: #adc1d0;
  font-size: 1rem;
}
.login-points {
  display: grid;
  gap: 17px;
  margin-top: 34px;
}
.login-points div {
  display: flex;
  gap: 13px;
  align-items: center;
  color: #d5e1ea;
  font-size: 0.9rem;
}
.login-points svg {
  width: 20px;
  height: 20px;
  color: #5bd0d2;
}
.login-foot {
  font-size: 0.8rem;
  color: #86a0b4;
}
.login-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 28px;
}
.login-box {
  width: 100%;
  max-width: 400px;
}
.login-box h1 {
  font-size: 1.75rem;
}
.login-box > p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 29px;
}
.form {
  display: grid;
  gap: 18px;
}
.field {
  display: grid;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 500;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #cfd9e4;
  border-radius: 8px;
  background: white;
  padding: 11px 12px;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
  min-height: 44px;
}
.field input:focus,
.field select:focus {
  border-color: var(--accent);
  outline: 2px solid #087f8c20;
}
.field textarea {
  min-height: 85px;
  resize: vertical;
}
.field small {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.6;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.form-error {
  color: #ae3449;
  font-size: 0.875rem;
  min-height: 1em;
  margin: 0;
  line-height: 1.6;
}
.login-switch {
  display: flex;
  gap: 20px;
  margin-top: 24px;
  justify-content: center;
  font-size: 0.875rem;
}
.login-switch button {
  border: 0;
  background: none;
  padding: 0;
  color: var(--accent);
  font-weight: 400;
}
.security-note {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.7;
}
.audit-list {
  padding: 0 24px;
}
.audit-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 0;
  border-bottom: 1px solid #edf0f5;
  font-size: 0.875rem;
}
.audit-row:last-child {
  border: 0;
}
.audit-row small {
  color: var(--muted);
  font-size: 0.75rem;
  display: block;
  margin-top: 5px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 0;
  width: min(570px, calc(100vw - 32px));
  max-height: 88vh;
  color: var(--ink);
  box-shadow: 0 24px 90px #0c1e3c35;
}
dialog::backdrop {
  background: #12213570;
  backdrop-filter: blur(3px);
}
.dialog-head {
  padding: 24px 26px 19px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dialog-head h2 {
  margin: 0;
  font-size: 1.2rem;
}
.dialog-head button {
  padding: 4px 8px;
  border: 0;
  background: transparent;
  font-size: 1.4rem;
}
.dialog-body {
  padding: 24px 26px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}
.secret {
  padding: 18px;
  border: 1px solid #cae1e4;
  background: #f1f8f8;
  border-radius: 9px;
  overflow-wrap: anywhere;
  line-height: 1.7;
  user-select: all;
}
.notice {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--muted);
}
.detail-list {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 15px;
  font-size: 0.875rem;
}
.detail-list dt {
  color: var(--muted);
}
.detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.user-shell {
  max-width: 930px;
  margin: auto;
  padding: 32px 24px;
}
.user-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}
.user-header .brand {
  padding: 0;
}
.user-shell .cards {
  grid-template-columns: 1fr 1fr;
}
.config {
  white-space: pre-wrap;
  font-size: 0.8rem;
  line-height: 1.7;
  max-height: 360px;
  overflow: auto;
  background: #f3f6fa;
  padding: 20px;
  border-radius: 10px;
}
#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: #173449;
  color: white;
  padding: 13px 22px;
  border-radius: 10px;
  box-shadow: 0 5px 30px #102a3f30;
  display: none;
  z-index: 10;
  font-size: 0.9rem;
  max-width: 90vw;
}
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
}
.search {
  border: 1px solid var(--line);
  padding: 9px 12px;
  border-radius: 8px;
  max-width: 230px;
  font-size: 0.875rem;
}
.footer-note {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 14px;
}
@media (min-width: 1500px) {
  .main {
    padding-left: 55px;
    padding-right: 55px;
  }
}
@media (max-width: 1100px) {
  .main {
    padding: 0 24px 30px;
  }
  .shell {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .cards {
    gap: 12px;
  }
  .card {
    padding: 18px;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .sidebar {
    padding-left: 12px;
    padding-right: 12px;
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: relative;
    height: auto;
    padding: 18px;
  }
  .brand-sub,
  .side-bottom {
    display: none;
  }
  .nav {
    display: flex;
    overflow-x: auto;
    margin-top: 18px;
    gap: 4px;
  }
  .nav button {
    white-space: nowrap;
    padding: 10px;
  }
  .nav svg {
    display: none;
  }
  .main {
    padding: 0 17px 28px;
  }
  .topbar {
    height: 68px;
    margin-bottom: 24px;
  }
  .cards {
    grid-template-columns: 1fr 1fr;
  }
  .heading {
    align-items: flex-start;
  }
  .heading h1 {
    font-size: 1.55rem;
  }
  .heading p {
    font-size: 0.85rem;
  }
  .heading > button {
    white-space: nowrap;
  }
  .login-page {
    grid-template-columns: 1fr;
  }
  .login-aside {
    padding: 24px;
  }
  .login-story,
  .login-foot {
    display: none;
  }
  .login-main {
    padding: 40px 24px;
  }
  .panel-head {
    padding: 18px;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .search {
    width: 100%;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .user-shell .cards {
    grid-template-columns: 1fr;
  }
  .user-header {
    gap: 20px;
  }
  .topbar-right .chip {
    display: none;
  }
}
