:root {
  --bg: #f5f6f8;
  --surface: #fff;
  --ink: #1b2834;
  --muted: #72808c;
  --line: #e4e8ed;
  --green: #167957;
  --green-light: #e6f5ee;
  --dark: #14252b;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.55;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a {
  color: var(--green);
  text-decoration: none;
}
a:hover {
  color: #104f3a;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 18px;
  color: white;
  background: var(--green);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s;
}
button:hover,
.button:hover {
  color: white;
  background: #116345;
}
button.secondary,
.button.secondary {
  background: #f5f7f8;
  border-color: var(--line);
  color: var(--ink);
}
button.secondary:hover {
  background: #e9eef0;
}
.button.ghost {
  background: transparent;
  color: #adbdc4;
  border-color: #3c4c51;
}
.button.danger {
  background: #fff1f0;
  color: #a33a32;
}
.button.danger:hover {
  background: #ffe5e3;
}
.small {
  font-size: 12px;
  padding: 7px 12px;
}
:focus-visible {
  outline: 3px solid #7dbea5;
  outline-offset: 3px;
}
.topbar {
  background: var(--dark);
  color: #fff;
}
.topbar-inner {
  max-width: 1240px;
  margin: auto;
  padding: 0 28px;
  display: flex;
  min-height: 76px;
  gap: 42px;
  align-items: center;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.5px;
  color: #fff;
  white-space: nowrap;
}
.brand:hover {
  color: #fff;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #b5efcf;
  color: var(--dark);
  font-size: 20px;
}
.private {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 1px;
  border: 1px solid #415158;
  border-radius: 4px;
  padding: 2px 5px;
  color: #b1bdc1;
  margin-left: 5px;
}
nav {
  display: flex;
  gap: 28px;
  align-self: stretch;
  flex: 1;
}
nav a {
  display: flex;
  align-items: center;
  border-bottom: 3px solid transparent;
  padding-top: 3px;
  color: #b7c5cb;
  font-size: 14px;
}
nav a:hover,
nav a[aria-current] {
  color: #fff;
}
nav a[aria-current] {
  border-bottom-color: #a6e8c5;
}
.topbar form {
  margin-left: auto;
}
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 28px 60px;
  flex: 1;
}
.footer {
  text-align: center;
  padding: 20px;
  color: #95a0a8;
  font-size: 12px;
}
.footer span {
  margin: 0 8px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(25px, 3vw, 32px);
  font-weight: 650;
  letter-spacing: -1px;
  line-height: 1.3;
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}
h2 {
  font-size: 18px;
  letter-spacing: -0.3px;
  margin-bottom: 16px;
}
h3 {
  font-size: 16px;
  margin-bottom: 0;
}
p {
  margin-bottom: 18px;
}
.muted {
  color: var(--muted);
}
.small-text {
  font-size: 12px;
}
.mono {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}
.eyebrow {
  display: block;
  font-size: 10px;
  letter-spacing: 1.8px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 12px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 30px;
}
.page-heading p {
  margin: 0;
  font-size: 14px;
}
.page-heading .button {
  flex-shrink: 0;
}
.counter {
  display: inline-block;
  vertical-align: middle;
  background: #e7ebee;
  border-radius: 7px;
  padding: 2px 9px;
  color: #6f7c87;
  font-size: 13px;
  letter-spacing: 0;
  font-weight: 500;
  margin-left: 8px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 2px 3px #182b3703;
  min-width: 0;
}
.padded {
  padding: 24px;
}
.config-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.config-card {
  padding: 24px;
  color: var(--ink);
  transition:
    border-color 0.15s,
    transform 0.15s;
}
.config-card:hover {
  color: var(--ink);
  border-color: #94baa8;
  transform: translateY(-2px);
}
.card-top,
.card-bottom,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.card-top {
  margin-bottom: 22px;
}
.config-card h2 {
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}
.description {
  font-size: 13px;
  min-height: 40px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-bottom {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  font-size: 12px;
  color: var(--muted);
}
.card-bottom strong {
  color: var(--ink);
}
.card-bottom > :last-child {
  color: var(--green);
  font-size: 18px;
}
.timestamp {
  font-size: 10px;
  color: #929ba3;
  margin-top: 7px;
}
.badge {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 5px;
  color: #5e6a78;
  background: #f0f2f6;
  font-size: 11px;
  white-space: nowrap;
  font-weight: 600;
}
.badge.active {
  color: var(--green);
  background: var(--green-light);
}
.empty-state {
  text-align: center;
  padding: 62px 24px;
}
.empty-state p {
  max-width: 410px;
  margin: 0 auto 22px;
  font-size: 14px;
}
.empty-icon {
  display: inline-grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: var(--green-light);
  color: var(--green);
  font: 22px monospace;
  margin-bottom: 22px;
}
.note-strip {
  margin: 24px 0;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #47a980;
  flex-shrink: 0;
}
.back-link {
  display: inline-block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 24px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}
.stack > h2 {
  margin-bottom: 0;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
}
input,
select,
textarea {
  border: 1px solid #dce2e7;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  width: 100%;
  min-width: 0;
  font-size: 14px;
  font-weight: 400;
}
input::placeholder,
textarea::placeholder {
  color: #a0a9b2;
}
textarea {
  resize: vertical;
}
input[readonly] {
  background: #f7f9fa;
}
.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: start;
  gap: 24px;
}
.editor-card {
  overflow: hidden;
}
.editor-card .section-heading {
  padding: 16px 20px;
}
.code-editor {
  display: block;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 22px;
  background: #17272e;
  color: #d1e9df;
  font:
    13px/1.8 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  min-height: 540px;
  tab-size: 2;
}
.editor-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 20px;
  font-size: 10px;
  color: var(--muted);
}
.config-settings {
  padding: 24px;
}
.subtle-panel {
  background: #f5f8f6;
  padding: 14px;
  border-radius: 8px;
  font-size: 12px;
}
.subtle-panel p {
  font-size: 11px;
  color: var(--muted);
  margin: 7px 0 0;
}
.history {
  margin-top: 28px;
  overflow: hidden;
}
.history .section-heading {
  padding: 20px 24px;
}
.section-heading h2 {
  margin: 0;
}
.section-heading > .muted {
  font-size: 12px;
}
.table-scroll {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
th {
  padding: 12px 24px;
  background: #fafbfc;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
}
td {
  padding: 17px 24px;
  border-bottom: 1px solid #edf0f3;
  max-width: 400px;
  overflow-wrap: anywhere;
}
tr:last-child td {
  border-bottom: 0;
}
td:last-child {
  white-space: nowrap;
  text-align: right;
}
.nowrap {
  white-space: nowrap;
}
.code-view {
  padding: 26px;
  overflow-x: auto;
  background: #17272e;
  color: #d1e9df;
  font:
    13px/1.8 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
}
.users-layout,
.user-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 24px;
  align-items: start;
}
.search-form {
  padding: 20px 24px;
  display: flex;
  gap: 10px;
}
.user-name {
  font-weight: 600;
}
.note-preview {
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
  white-space: nowrap;
}
.copy-field {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}
.copy-field input {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}
.copy-field button {
  flex-shrink: 0;
}
.connection-card > p {
  margin-top: 8px;
}
details {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
summary {
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}
.connection-settings {
  margin-top: 18px;
}
.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}
.rotate-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.user-layout aside > p {
  margin: 22px 0 0;
}
.notice {
  border: 1px solid;
  padding: 14px 18px;
  margin-bottom: 24px;
  border-radius: 8px;
  font-size: 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.notice.error {
  color: #a13d39;
  background: #fff0ef;
  border-color: #f2d6d2;
}
.notice.success {
  color: var(--green);
  background: var(--green-light);
  border-color: #c6e8d7;
}
.text-error {
  color: #be4540;
}
.login-container {
  max-width: 490px;
  padding-top: 80px;
}
.login-card {
  padding: 36px;
}
.login-card h1 {
  margin-top: 15px;
}
.login-card > p {
  font-size: 14px;
  margin-bottom: 28px;
}
.login-card button {
  margin-top: 8px;
}
@media (max-width: 980px) {
  .config-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .editor-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 18px;
  }
  .topbar-inner {
    gap: 26px;
  }
  .private {
    display: none;
  }
}
@media (max-width: 760px) {
  .topbar-inner {
    padding: 14px 20px 0;
    flex-wrap: wrap;
    gap: 16px;
  }
  .topbar form {
    order: 1;
  }
  nav {
    order: 2;
    width: 100%;
    flex: auto;
    gap: 28px;
  }
  nav a {
    padding: 10px 0 12px;
  }
  .container {
    padding: 28px 18px 40px;
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }
  .config-grid,
  .users-layout,
  .user-layout,
  .editor-layout {
    grid-template-columns: 1fr;
  }
  .code-editor {
    min-height: 360px;
  }
  .editor-footer {
    flex-direction: column;
    gap: 4px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .padded {
    padding: 20px;
  }
  .login-container {
    padding-top: 50px;
  }
  .login-card {
    padding: 28px;
  }
  .copy-field {
    flex-direction: column;
  }
  .copy-field button {
    align-self: flex-start;
  }
}
