:root {
  color-scheme: light;
  --bg: #f6f7f8;
  --ink: #172026;
  --muted: #66727d;
  --line: #dce2e7;
  --panel: #ffffff;
  --accent: #0d7f6f;
  --accent-dark: #075e53;
  --warn: #b65c00;
  --bad: #b42318;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}
[v-cloak] { display: none; }
.top-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: 100%;
  height: 3px;
  overflow: hidden;
  background: rgba(13, 127, 111, 0.12);
}
.top-progress::after {
  content: "";
  display: block;
  width: 38%;
  height: 100%;
  background: var(--accent);
  animation: progress-sweep 1.1s ease-in-out infinite;
}
.loader-dot {
  width: 18px;
  height: 18px;
  border: 2px solid #cfe7e1;
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: spin 0.75s linear infinite;
}
button, input, select, textarea {
  font: inherit;
}
button:not(.button) {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  min-height: 36px;
  padding: 0 12px;
  cursor: pointer;
}
button.primary, .button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
a.button:not(.is-primary):not(.is-danger):not(.is-warning):not(.is-success):not(.is-link) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  min-height: 36px;
  padding: 0 12px;
  text-decoration: none;
}
button:not(.button):hover { border-color: var(--accent); color: var(--accent-dark); }
input:not(.input), select, textarea:not(.textarea) {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  min-height: 38px;
  padding: 8px 10px;
  width: 100%;
}
.select-native {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  min-height: 38px;
  padding: 8px 10px;
}
textarea {
  min-height: 110px;
  resize: vertical;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 248px;
  background: #172026;
  color: #fff;
  padding: 18px;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--accent);
  font-weight: 800;
}
.brand small, .sidebar button span + text { color: #aeb8c2; }
.sidebar .sidebar-button {
  width: 100%;
  justify-content: flex-start;
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 4px 0;
  color: #dfe6ec;
  border-color: transparent;
  background: transparent;
}
.sidebar .sidebar-button.active, .sidebar .sidebar-button:hover {
  background: #24313a;
  color: #fff;
}
.shell {
  margin-left: 248px;
  padding: 28px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 24px;
}
.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 4px; font-size: 28px; }
p, small { color: var(--muted); }
.grid { display: grid; gap: 16px; }
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats article, .panel, .editor {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.stats article {
  padding: 18px;
  display: flex;
  flex-direction: column;
}
.stats strong { font-size: 32px; }
.panel { padding: 18px; }
.box.panel,
.box.editor,
.box.install-card,
.stats article.box {
  box-shadow: none;
}
.notice {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.fade-slide-enter-active,
.fade-slide-leave-active {
  transition: opacity 180ms ease, transform 180ms ease;
}
.fade-slide-enter-from,
.fade-slide-leave-to {
  opacity: 0;
  transform: translateY(8px);
}
.notice.error {
  border-color: #f0b8b2;
  background: #fff8f7;
}
.notice.success {
  border-color: #b8ded5;
  background: #f2fbf8;
}
.notice span {
  color: var(--muted);
  flex: 1;
}
.notice code,
.install-card code {
  word-break: break-all;
  white-space: normal;
}
.totp-qr {
  display: inline-grid;
  place-items: center;
  width: 196px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.totp-qr img,
.totp-qr-small {
  display: block;
}
.totp-qr img {
  width: 180px;
  height: 180px;
}
.totp-qr-small {
  flex: 0 0 auto;
  width: 128px;
  height: 128px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.panel-head .title{
	white-space:nowrap
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.form-grid.wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: 11px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2f5;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.badge.active, .badge.online { background: #e7f6f2; color: var(--accent-dark); }
.badge.published-badge {
  background: #e7f6f2;
  color: var(--accent-dark);
  vertical-align: middle;
}
.badge.source-badge {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #eef2f8;
  color: #31516d;
}
.badge.offline { background: #fff0ed; color: var(--bad); }
.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.listing {
  display: grid;
  grid-template-columns: 96px 1fr;
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}
.listing:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(23, 32, 38, 0.08);
}
.listing.published {
  border-color: #89c9bb;
  box-shadow: inset 4px 0 0 var(--accent);
}
.listing img {
  width: 96px;
  height: 100%;
  object-fit: cover;
  background: #e7ecef;
}
.listing div {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.listing-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}
.editor {
  padding: 16px;
  margin-top: 18px;
  animation: fade-in 200ms ease;
}
.panel-head.compact {
  margin-top: 18px;
  margin-bottom: 10px;
}
.detail-editor {
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 4px;
}
.description-editor {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}
.wysiwyg {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}
.wysiwyg-toolbar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  background: #f6f8fa;
}
.wysiwyg-toolbar .button {
  min-width: 32px;
}
.wysiwyg-surface {
  min-height: 180px;
  padding: 12px;
  outline: none;
  color: var(--ink);
}
.wysiwyg-surface:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
}
.wysiwyg-surface p:last-child,
.wysiwyg-surface ul:last-child,
.wysiwyg-surface ol:last-child {
  margin-bottom: 0;
}
.detail-row {
  display: grid;
  grid-template-columns: minmax(160px, 240px) 1fr auto;
  gap: 10px;
  align-items: start;
  margin-bottom: 10px;
}
.textarea_big {
  min-height: 58px !important;
}
.empty {
  color: var(--muted);
  padding: 10px 0;
}
.install-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.install-shell {
  width: min(900px, 100%);
}
.install-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}
.install-brand {
  color: var(--ink);
}
.installer-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.check-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 10px 0;
  color: var(--muted);
}
.check-row input {
  width: auto;
  min-height: auto;
}
pre {
  overflow: auto;
  background: #f1f4f5;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
}
@keyframes progress-sweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(265%); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 900px) {
  .sidebar {
    position: static;
    width: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .brand { grid-column: 1 / -1; }
  .shell { margin-left: 0; padding: 16px; }
  .topbar, .panel-head, .topbar-actions, .notice { flex-direction: column; align-items: stretch; }
  .stats, .form-grid, .installer-grid, .detail-row { grid-template-columns: 1fr; }
}
