:root {
  --bg: #f8f9f6;
  --surface: #fff;
  --ink: #20342c;
  --muted: #7a857e;
  --line: #e4e9e1;
  --green: #245b47;
  --lime: #e9f1ce;
  --danger: #a64236;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft Yahei",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 14px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #9dba8d;
  outline-offset: 3px;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
p {
  margin-top: 0;
}
h1 {
  font-size: 30px;
  letter-spacing: -1px;
  font-weight: 650;
  margin-bottom: 12px;
}
h2 {
  font-size: 24px;
  letter-spacing: -0.5px;
}
small,
.help {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -1px;
}
.brand-mark {
  display: grid;
  place-items: center;
  background: var(--green);
  color: #e4f1c9;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  font-size: 25px;
}
.eyebrow {
  display: block;
  color: #83927b;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 2px;
  margin-bottom: 14px;
}
.muted {
  color: var(--muted);
  line-height: 1.8;
}
.primary,
.secondary,
.danger {
  border: 1px solid transparent;
  border-radius: 7px;
  min-height: 41px;
  padding: 10px 18px;
  font-weight: 550;
  white-space: nowrap;
}
.primary {
  background: var(--green);
  color: white;
}
.primary:hover {
  background: #174433;
}
.secondary {
  background: white;
  border-color: var(--line);
  color: var(--ink);
}
.danger {
  background: #fff3f0;
  color: var(--danger);
}
.wide {
  width: 100%;
  display: flex;
  justify-content: space-between;
}
label {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 13px;
  font-weight: 550;
}
input,
select,
textarea {
  width: 100%;
  padding: 11px 13px;
  color: var(--ink);
  background: white;
  border: 1px solid #dbe2d6;
  border-radius: 6px;
  outline: none;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px #245b4710;
}
textarea {
  resize: vertical;
  line-height: 1.6;
}
input::placeholder,
textarea::placeholder {
  color: #a5aca6;
}
label small {
  font-weight: 400;
}
.error {
  color: var(--danger);
  font-size: 13px;
  line-height: 1.7;
  margin: 12px 0;
}
.error:empty {
  display: none;
}
.login-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}
.login-story {
  background: #e9eee2;
  padding: 48px 9%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
}
.login-story h1 {
  font-size: clamp(30px, 3.3vw, 52px);
  line-height: 1.5;
  letter-spacing: -2px;
}
.login-story p {
  color: #6c7b69;
  line-height: 1.8;
}
.login-story > small {
  letter-spacing: 2px;
  font-size: 10px;
}
.route-diagram {
  display: flex;
  gap: 20px;
  align-items: center;
  margin: 45px 0;
  color: #60735d;
  font-size: 12px;
}
.route-diagram strong {
  background: var(--green);
  color: #fff;
  padding: 19px 24px;
  border-radius: 9px;
  box-shadow: 0 6px 18px #245b471b;
}
.route-diagram i {
  font-style: normal;
  color: #9aaa90;
}
.login-panel {
  display: grid;
  place-items: center;
  padding: 35px;
}
.login-panel form {
  width: 100%;
  max-width: 350px;
}
.login-panel h2 {
  margin-bottom: 10px;
}
.login-panel label {
  margin: 32px 0 20px;
}
.login-panel .help {
  margin-top: 24px;
}
.app-layout {
  display: grid;
  grid-template-columns: 236px 1fr;
  min-height: 100vh;
}
aside {
  border-right: 1px solid var(--line);
  background: #f2f5ee;
  padding: 32px 22px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
aside .brand {
  padding: 0 8px;
}
.workspace-label {
  display: flex;
  justify-content: space-between;
  margin: 52px 12px 17px;
  font-size: 11px;
  color: #87917f;
}
.workspace-label span {
  font-size: 9px;
  letter-spacing: 1px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 13px 15px;
  margin: 5px 0;
  text-align: left;
  border: 0;
  background: none;
  color: #788373;
  border-radius: 7px;
  font-size: 13px;
}
.nav span {
  font-size: 19px;
  width: 21px;
  line-height: 20px;
}
.nav:hover {
  background: #e9eee2;
}
.nav.active {
  background: #e1e9d7;
  color: #2d4e31;
  font-weight: 600;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 24px 10px 0;
}
.runtime {
  font-size: 11px;
  color: #7a8772;
  margin-bottom: 22px;
}
.runtime i,
.admin-label i {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #7a9a66;
  border-radius: 50%;
  margin-right: 7px;
}
.text-button {
  border: 0;
  background: transparent;
  padding: 0;
  color: #76816f;
  font-size: 12px;
}
main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
header {
  height: 78px;
  padding: 0 44px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}
.breadcrumb {
  color: #939b90;
}
.slash {
  color: #b8beb3;
  margin: 0 12px;
}
.admin-label {
  font-size: 11px;
  color: #687560;
  background: #eef2e7;
  padding: 7px 11px;
  border-radius: 5px;
}
.main-content {
  padding: 44px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}
.page-heading p {
  margin-bottom: 0;
  font-size: 13px;
}
.page-heading .eyebrow {
  margin-bottom: 12px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 30px;
}
.stat {
  padding: 22px 24px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.stat-label {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}
.stat-value {
  font-size: 30px;
  font-weight: 550;
  letter-spacing: -1px;
  margin: 13px 0 3px;
}
.stat-note {
  font-size: 11px;
  color: #9ca493;
}
.section-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 28px 0 16px;
  font-size: 13px;
}
.section-bar span {
  color: var(--muted);
  font-size: 11px;
}
.mailbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.mail-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 23px;
  min-width: 0;
}
.card-top {
  display: flex;
  gap: 13px;
  align-items: center;
  margin-bottom: 22px;
}
.mail-icon {
  background: #edf1e6;
  color: #6c8260;
  min-width: 43px;
  height: 43px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 22px;
}
.card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.card-email {
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.badge {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 20px;
  background: #edf4e6;
  color: #57734a;
  font-size: 10px;
  white-space: nowrap;
}
.badge.off {
  background: #f0f1ef;
  color: #8b9185;
}
.badge.failed {
  background: #fff0eb;
  color: #a95541;
}
.badge.unknown,
.badge.pending {
  background: #fff6db;
  color: #88732f;
}
.card-top .badge {
  margin-left: auto;
}
.connection {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  color: #7e8874;
  background: #f8f9f6;
  padding: 12px;
  border-radius: 5px;
  overflow-wrap: anywhere;
}
.card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  font-size: 11px;
  color: #99a18f;
}
.card-actions {
  display: flex;
  gap: 14px;
}
.card-actions button {
  background: none;
  border: 0;
  font-size: 12px;
  color: #4c6f49;
  padding: 3px;
}
.card-actions button.delete {
  color: #a17f70;
}
.empty {
  background: white;
  border: 1px dashed #d8e0ce;
  border-radius: 10px;
  text-align: center;
  padding: 55px 20px;
}
.empty-icon {
  font-size: 32px;
  color: #869d76;
  margin-bottom: 15px;
}
.empty h3 {
  font-size: 16px;
  margin: 0 0 10px;
}
.empty p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
}
.info-strip {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding: 16px 20px;
  background: #f0f3e9;
  border-radius: 7px;
  color: #7b886e;
  font-size: 12px;
  line-height: 1.8;
}
.info-strip b {
  font-weight: 500;
  color: #546e47;
}
footer {
  display: flex;
  gap: 16px;
  color: #8c9684;
  font-size: 10px;
  border-top: 1px solid var(--line);
  padding: 22px 44px;
  margin-top: auto;
  letter-spacing: 0.3px;
}
footer span:last-child {
  margin-left: auto;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 19px;
}
.full {
  grid-column: 1/-1;
}
.checkbox {
  flex-direction: row;
  align-items: center;
  font-weight: 400;
}
.checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}
dialog {
  width: min(560px, calc(100% - 32px));
  max-height: 90vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 20px 90px #20342c30;
  color: var(--ink);
}
dialog::backdrop {
  background: #17291d60;
  backdrop-filter: blur(3px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}
.dialog-heading h2 {
  font-size: 21px;
  margin-bottom: 0;
}
.dialog-heading .eyebrow {
  font-size: 9px;
  margin-bottom: 9px;
}
.icon-button {
  border: 0;
  background: none;
  color: #8a9584;
  font-size: 24px;
  padding: 0 3px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 25px;
}
.notice {
  background: #f4f5e7;
  color: #868350;
  font-size: 13px;
  padding: 15px;
  line-height: 1.8;
  border-radius: 6px;
}
#new-secret {
  font-family: monospace;
  font-size: 12px;
}
.table-wrap {
  overflow-x: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 12px;
  white-space: nowrap;
}
th {
  font-size: 11px;
  color: #8a9482;
  background: #fafbf8;
  font-weight: 500;
}
th,
td {
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
}
tr:last-child td {
  border: 0;
}
td small {
  display: block;
}
td button {
  font-size: 11px !important;
}
.mono,
code,
pre {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.mono {
  font-size: 11px;
}
pre {
  background: #1f3026;
  color: #d3dfc5;
  border-radius: 8px;
  padding: 24px;
  line-height: 1.9;
  overflow: auto;
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.docs h3 {
  font-size: 16px;
  margin: 30px 0 15px;
}
.docs p {
  line-height: 1.9;
  color: var(--muted);
  font-size: 13px;
}
.endpoint {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #f0f4e8;
  padding: 16px;
  border-radius: 6px;
}
.endpoint b {
  font-size: 10px;
  color: #587c40;
}
.endpoint code {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.test-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 22px;
}
.test-aside h3 {
  font-size: 15px;
}
.test-aside p {
  font-size: 12px;
  line-height: 2;
  color: var(--muted);
}
#test-result {
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.8;
  margin-top: 20px;
}
#toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  background: #284c37;
  color: white;
  padding: 13px 22px;
  border-radius: 8px;
  box-shadow: 0 4px 25px #0002;
  max-width: 90%;
  line-height: 1.7;
}
#toast.bad {
  background: #963f35;
}
.loading {
  padding: 70px;
  text-align: center;
  color: var(--muted);
}
@media (min-width: 1500px) {
  .mailbox-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 1050px) {
  .app-layout {
    grid-template-columns: 195px 1fr;
  }
  aside {
    padding: 28px 14px;
  }
  .main-content {
    padding: 30px;
  }
  header {
    padding: 0 30px;
  }
  .mailbox-grid {
    grid-template-columns: 1fr;
  }
  .test-grid {
    grid-template-columns: 1fr;
  }
  .stat {
    padding: 17px;
  }
}
@media (max-width: 700px) {
  .app-layout {
    display: block;
  }
  aside {
    height: auto;
    position: static;
    padding: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  aside .brand {
    font-size: 20px;
  }
  .brand-mark {
    width: 30px;
    height: 30px;
  }
  .workspace-label,
  .sidebar-bottom .runtime {
    display: none;
  }
  nav {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    margin-top: 15px;
  }
  .nav {
    white-space: nowrap;
    width: auto;
    font-size: 12px;
    padding: 10px;
  }
  .nav span {
    display: none;
  }
  .sidebar-bottom {
    position: absolute;
    right: 23px;
    top: 29px;
    padding: 0;
  }
  .sidebar-bottom button {
    font-size: 11px;
  }
  header {
    height: 55px;
    padding: 0 20px;
  }
  .main-content {
    padding: 28px 20px;
  }
  .page-heading {
    align-items: flex-start;
  }
  h1 {
    font-size: 25px;
  }
  .page-heading .primary {
    font-size: 12px;
    padding: 10px 12px;
    margin-top: 19px;
  }
  .stats {
    gap: 8px;
  }
  .stat {
    padding: 14px 12px;
  }
  .stat-label {
    font-size: 10px;
  }
  .stat-value {
    font-size: 25px;
  }
  .stat-note {
    font-size: 9px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .full {
    grid-column: auto;
  }
  footer {
    padding: 20px;
    font-size: 9px;
  }
  footer span:nth-child(2) {
    display: none;
  }
  .panel {
    padding: 20px;
  }
  .login-view {
    display: block;
  }
  .login-story {
    min-height: 0;
    padding: 25px;
    background: var(--bg);
  }
  .login-story > div,
  .login-story > small {
    display: none;
  }
  .login-panel {
    padding: 40px 25px 80px;
  }
  .login-panel form {
    max-width: 400px;
  }
  dialog {
    padding: 22px;
  }
  .eyebrow {
    font-size: 9px;
    letter-spacing: 1.5px;
  }
  .page-heading p {
    font-size: 12px;
  }
  .card-top {
    gap: 10px;
  }
}
