:root {
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #1c3042;
  background: #f4f7fa;
  font-synthesis: none;
  font-size: 14px;
  line-height: 1.65;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
a {
  color: #087f8c;
  text-decoration: none;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #57bac4;
  outline-offset: 3px;
}
button {
  border: 1px solid #d5dfe6;
  background: white;
  color: #243d50;
  border-radius: 8px;
  padding: 9px 15px;
  white-space: nowrap;
}
.primary {
  background: #087f8c;
  border-color: #087f8c;
  color: white;
}
.danger {
  color: #a62d37;
  border-color: #ecc7cc;
}
.subtle {
  background: transparent;
  border-color: transparent;
  color: #607184;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 27px;
  line-height: 1.3;
  letter-spacing: -0.6px;
  margin-bottom: 9px;
}
h2 {
  font-size: 20px;
  margin-bottom: 14px;
}
h3 {
  font-size: 15px;
}
p {
  margin-bottom: 14px;
}
.muted,
.help {
  color: #6d7d8b;
}
.help {
  font-size: 12px;
  margin: 6px 0 0;
}
.layout {
  display: grid;
  grid-template-columns: 225px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: #132a36;
  color: #d0dde4;
  padding: 30px 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.brand {
  font-size: 19px;
  color: white;
  font-weight: 750;
  letter-spacing: 1px;
  margin-bottom: 5px;
}
.brand small {
  font-size: 10px;
  letter-spacing: 2px;
  color: #7fc7cc;
  display: block;
}
.sidebar nav {
  display: grid;
  gap: 7px;
  margin-top: 40px;
}
.sidebar nav button {
  text-align: left;
  border: 0;
  background: none;
  color: #b6c7d1;
  padding: 12px 15px;
}
.sidebar nav button.active {
  color: white;
  background: #234652;
  border-left: 3px solid #57c6c6;
}
.account {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid #31505e;
}
.account .username {
  color: white;
  font-weight: 650;
}
.account button {
  font-size: 12px;
  padding: 6px 7px;
  margin-top: 12px;
  background: #213c49;
  color: #d0dde4;
  border-color: #355460;
}
.workspace {
  min-width: 0;
}
.topbar {
  height: 76px;
  border-bottom: 1px solid #e1e7ec;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  color: #61778b;
  font-size: 12px;
}
.topbar b {
  color: #30475a;
  font-weight: 600;
}
.content {
  max-width: 1380px;
  margin: auto;
  padding: 34px 40px 60px;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.page-head p {
  margin: 0;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.card,
.panel {
  background: #fff;
  border: 1px solid #e0e7ed;
  border-radius: 12px;
  padding: 23px;
  box-shadow: 0 2px 4px #20364603;
}
.card .number {
  font-size: 31px;
  font-weight: 750;
  margin: 6px 0;
  color: #183f50;
}
.card .eyebrow {
  font-size: 12px;
  color: #647d8f;
}
.panel {
  margin-top: 22px;
}
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.table-wrap {
  overflow: auto;
  background: #fff;
  border: 1px solid #e0e7ed;
  border-radius: 12px;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
th {
  font-size: 12px;
  font-weight: 600;
  color: #6d8090;
  background: #f9fbfc;
  padding: 14px 18px;
  border-bottom: 1px solid #e7edf1;
}
td {
  padding: 17px 18px;
  border-bottom: 1px solid #edf1f4;
  vertical-align: top;
}
tr:last-child td {
  border-bottom: 0;
}
td .secondary {
  display: block;
  color: #7b8a98;
  font-size: 12px;
  margin-top: 4px;
}
.badge {
  display: inline-block;
  font-size: 11px;
  border-radius: 5px;
  padding: 3px 8px;
  background: #e7f5ef;
  color: #217d5c;
  white-space: nowrap;
}
.badge.hidden-mode {
  background: #fff2d8;
  color: #986a0b;
}
.badge.off {
  background: #edf1f5;
  color: #6e7882;
}
.badge.warn {
  background: #ffeded;
  color: #b03945;
}
.actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.actions button {
  font-size: 12px;
  padding: 6px 10px;
}
.empty {
  padding: 55px 25px;
  text-align: center;
  color: #718494;
}
.empty strong {
  display: block;
  color: #304e60;
  font-size: 17px;
  margin-bottom: 8px;
}
.template-card {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.template-card .source {
  font-size: 11px;
  font-family: ui-monospace, monospace;
  overflow-wrap: anywhere;
  color: #78909c;
}
.template-card h3 {
  margin: 0;
  font-size: 15px;
}
.template-card .actions {
  margin-top: auto;
}
.languages {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.languages span {
  background: #f1f5f8;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 10px;
  color: #5c7483;
}
.notice {
  background: #edf6f8;
  border: 1px solid #cbe5e9;
  color: #386371;
  border-radius: 9px;
  padding: 14px 17px;
  margin: 16px 0;
  font-size: 13px;
}
.notice.warn {
  background: #fff7e8;
  border-color: #efdfbc;
  color: #886a35;
}
.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-intro {
  background: #132e3b;
  color: white;
  padding: 12vh 11%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-intro h1 {
  font-size: 45px;
  max-width: 500px;
  line-height: 1.35;
  letter-spacing: -1px;
  margin: 26px 0;
}
.login-intro p {
  color: #a8c4cf;
  max-width: 400px;
}
.login-mark {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #188c98;
  display: grid;
  place-items: center;
  font-size: 23px;
  font-weight: bold;
}
.login-form {
  display: grid;
  place-items: center;
  padding: 40px;
}
.login-form form {
  width: 100%;
  max-width: 360px;
}
.login-form .primary {
  width: 100%;
  margin-top: 12px;
}
.login-form h2 {
  font-size: 26px;
  margin-bottom: 6px;
}
.login-form p {
  margin-bottom: 30px;
}
.field {
  margin-bottom: 18px;
}
.field > label {
  display: block;
  color: #334c5e;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 7px;
}
.required {
  color: #af3e47;
}
input:not([type="checkbox"]),
select,
textarea {
  width: 100%;
  border: 1px solid #cfdce4;
  border-radius: 7px;
  padding: 10px 12px;
  background: #fff;
  color: #1c3448;
  min-height: 43px;
}
textarea {
  resize: vertical;
  min-height: 170px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  line-height: 1.65;
  tab-size: 2;
}
input[type="checkbox"] {
  accent-color: #087f8c;
  width: 16px;
  height: 16px;
  vertical-align: middle;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.error {
  color: #b13a46;
  background: #fff0f1;
  border: 1px solid #f5d5d9;
  padding: 11px 14px;
  border-radius: 7px;
  margin: 15px 0;
  overflow-wrap: anywhere;
}
.error:empty {
  display: none;
}
dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: 90dvh;
  padding: 0;
  border: 1px solid #d5e0e7;
  border-radius: 13px;
  box-shadow: 0 25px 100px #0e293844;
  color: #1c3042;
}
dialog::backdrop {
  background: #071e2d8a;
  backdrop-filter: blur(2px);
}
.dialog-head {
  padding: 23px 27px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e8edf1;
}
.dialog-head h2 {
  margin: 0;
}
.dialog-body {
  padding: 24px 27px;
}
.dialog-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 18px;
  margin-top: 14px;
  border-top: 1px solid #e8edf1;
}
.dialog-head button {
  font-size: 22px;
  line-height: 1;
  padding: 5px 10px;
  border: 0;
}
.check-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  padding: 12px;
  border: 1px solid #dce5eb;
  border-radius: 8px;
}
.check-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 3px;
}
.check-item input {
  flex-shrink: 0;
}
.event-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 95px 70px 38px;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}
.event-row button {
  padding: 8px;
}
.event-row label {
  display: flex;
  gap: 4px;
  align-items: center;
  font-size: 11px;
}
.section-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 22px 0 12px;
  font-weight: 650;
}
.section-label button {
  font-size: 12px;
  padding: 5px 10px;
}
.toggle-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px;
  background: #f6f9fb;
  border-radius: 8px;
}
.toggle-row label {
  cursor: pointer;
}
.credentials {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f3f7fa;
  border: 1px solid #d9e3eb;
  padding: 20px;
  border-radius: 8px;
  font-family: ui-monospace, monospace;
}
.quota .number {
  font-size: 27px;
}
.progress {
  height: 7px;
  background: #edf2f6;
  border-radius: 10px;
  margin: 15px 0;
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  background: #0d969c;
  border-radius: 10px;
}
.progress.warning span {
  background: #e4a433;
}
.progress.danger span {
  background: #c64552;
}
.quota small {
  color: #82929d;
}
.loading {
  text-align: center;
  padding: 80px;
  color: #5a7487;
}
#toast {
  position: fixed;
  bottom: 27px;
  left: 50%;
  transform: translateX(-50%);
  background: #163b45;
  color: white;
  padding: 13px 23px;
  border-radius: 9px;
  box-shadow: 0 6px 25px #102a3d33;
  z-index: 1000;
  max-width: 90vw;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.code-summary {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: #738695;
  overflow-wrap: anywhere;
  max-width: 470px;
}
.filter {
  max-width: 270px;
  margin-bottom: 17px;
}
.metric-note {
  font-size: 12px;
  color: #7b8d9b;
}
.mobile-nav {
  display: none;
}
@media (max-width: 1000px) {
  .layout {
    grid-template-columns: 190px 1fr;
  }
  .content {
    padding: 28px 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .login-intro {
    padding: 10vh 9%;
  }
  .login-intro h1 {
    font-size: 35px;
  }
}
@media (max-width: 700px) {
  .layout {
    display: block;
  }
  .sidebar {
    height: auto;
    position: relative;
    padding: 18px 20px;
  }
  .brand small {
    display: none;
  }
  .sidebar nav {
    display: flex;
    gap: 4px;
    overflow: auto;
    margin-top: 16px;
  }
  .sidebar nav button {
    padding: 8px 11px;
    font-size: 12px;
    flex-shrink: 0;
  }
  .sidebar nav button.active {
    border-left: 0;
    border-bottom: 2px solid #57c6c6;
  }
  .account {
    display: none;
  }
  .topbar {
    height: 55px;
    padding: 0 20px;
  }
  .content {
    padding: 25px 17px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .page-head {
    align-items: flex-start;
    gap: 12px;
  }
  h1 {
    font-size: 23px;
  }
  .page-head .primary {
    font-size: 12px;
    padding: 9px 11px;
  }
  .two-col {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .login-screen {
    display: block;
  }
  .login-intro {
    padding: 30px 25px;
  }
  .login-intro h1 {
    font-size: 25px;
    margin: 15px 0;
  }
  .login-intro p {
    display: none;
  }
  .login-form {
    padding: 35px 25px;
  }
  .login-mark {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }
  .dialog-head,
  .dialog-body {
    padding: 18px;
  }
  .event-row {
    grid-template-columns: minmax(0, 1fr) 70px 55px 32px;
    gap: 5px;
  }
  .event-row input,
  .event-row select {
    padding: 7px 6px;
    font-size: 12px;
  }
  .event-row label {
    font-size: 10px;
  }
  .mobile-nav {
    display: flex;
    gap: 8px;
  }
  .mobile-nav button {
    font-size: 11px;
    padding: 5px 8px;
  }
  td,
  th {
    padding: 13px 14px;
  }
  .card,
  .panel {
    padding: 20px;
  }
}
