:root {
  --ink: #312d40;
  --muted: #8d879d;
  --line: #e9e5f0;
  --paper: #fff;
  --wash: #faf9fc;
  --purple: #7452dc;
  --purple-dark: #6040be;
  --purple-wash: #f0ebfc;
  --red: #ad424f;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
button:disabled { cursor: wait; opacity: .55; }
input, select, textarea { color: var(--ink); border: 1px solid var(--line); background: var(--paper); border-radius: 6px; }
input, select { min-height: 42px; padding: 10px 12px; }
input::placeholder, textarea::placeholder { color: #aaa4b5; }
input:focus, select:focus, textarea:focus { outline: 2px solid #c9b9f4; outline-offset: 1px; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--purple); outline-offset: 4px; }
button { transition: background .15s ease, border-color .15s ease, color .15s ease; }
label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 9px; }
h1, h2, p { margin-top: 0; }
.mono { font-family: var(--mono); }
.sr-only { position: absolute; height: 1px; width: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-height: 41px; padding: 10px 17px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; }
.button:hover { border-color: #cbbdee; background: var(--wash); }
.button.primary { background: var(--purple); border-color: var(--purple); color: #fff; }
.button.primary:hover { background: var(--purple-dark); border-color: var(--purple-dark); }
.text-button { border: 0; padding: 6px 0; background: transparent; color: var(--muted); font-size: 12px; white-space: nowrap; }
.text-button:hover { color: var(--purple); }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 2px; color: var(--muted); line-height: 1.6; }
.brand-mark { width: 39px; height: 39px; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.brand-mark i { background: var(--purple); border-radius: 3px; }
.brand-mark i:nth-child(2) { opacity: .42; }
.brand-mark i:nth-child(3) { opacity: .68; }
.brand-mark.small { width: 24px; height: 24px; gap: 3px; }
.brand-mark.small i { border-radius: 2px; }
.boot-state { display: grid; place-items: center; min-height: 100vh; color: var(--muted); }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 32px 20px; background: var(--wash); }
.login-card { width: 100%; max-width: 405px; }
.login-card .brand-mark { margin-bottom: 34px; }
.login-card .eyebrow { margin-bottom: 14px; }
.login-card h1 { font-size: 30px; font-weight: 600; letter-spacing: -1px; margin-bottom: 11px; }
.login-intro { color: var(--muted); font-size: 14px; margin-bottom: 38px; }
.login-card input { width: 100%; height: 46px; margin-bottom: 21px; }
.login-button { width: 100%; height: 47px; margin-top: 8px; justify-content: space-between; }
.login-footer { font-family: var(--mono); letter-spacing: 1.8px; color: #aaa4b5; font-size: 10px; margin-top: 40px; }
.workspace { min-height: 100vh; }
.topbar { height: 73px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 32px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-size: 18px; font-weight: 600; letter-spacing: -.5px; }
.brand-divider { color: #d2cddc; margin: 0 11px; font-weight: 400; }
.brand-label { font-size: 14px; font-weight: 500; letter-spacing: 0; }
.topbar-actions { display: flex; align-items: center; gap: 17px; }
.environment-label { margin: 0; font-size: 11px; color: var(--muted); font-weight: 400; }
#environment { min-height: 33px; padding: 6px 26px 6px 10px; font-size: 11px; background: var(--wash); border-color: var(--line); border-radius: 5px; }
#environment.production { background: #fff7ed; border-color: #f0d8bc; color: #976523; }
.topbar-divider { height: 20px; width: 1px; background: var(--line); margin: 0 3px; }
.account-name { color: var(--muted); font-size: 12px; }
.workspace-body { display: grid; grid-template-columns: 286px minmax(0, 1fr); min-height: calc(100vh - 73px); }
.sidebar { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; padding-top: 27px; position: sticky; top: 0; height: calc(100vh - 73px); }
.sidebar-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 23px; gap: 12px; }
.sidebar-heading h2 { margin: 0; display: flex; align-items: center; gap: 11px; font-size: 15px; font-weight: 600; }
.count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; border-radius: 5px; background: #f1eef6; color: var(--muted); font-size: 11px; font-weight: 500; font-family: var(--mono); }
.new-button { min-height: 32px; gap: 4px; padding: 6px 9px; color: var(--purple); font-size: 12px; }
.new-button span { font-size: 19px; line-height: 1; }
.search-wrap { display: flex; align-items: center; margin: 23px 19px 22px; position: relative; }
.search-wrap span { position: absolute; left: 12px; top: 9px; font-size: 19px; color: #aca4bd; pointer-events: none; }
.search-wrap input { width: 100%; padding-left: 34px; height: 39px; min-height: 39px; font-size: 12px; background: var(--wash); }
.config-list { overflow: auto; padding: 0 12px 20px; flex: 1; }
.config-item { display: block; width: 100%; border: 1px solid transparent; border-radius: 7px; background: transparent; padding: 18px 14px; text-align: left; margin-bottom: 7px; }
.config-item:hover { background: var(--wash); }
.config-item.selected { background: var(--purple-wash); border-color: #e0d7f9; }
.config-item .item-key { font-family: var(--mono); font-size: 13px; line-height: 1.5; font-weight: 600; overflow-wrap: anywhere; }
.config-item.selected .item-key { color: var(--purple); }
.item-description { color: var(--muted); font-size: 12px; line-height: 1.6; margin-top: 7px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.item-meta { display: flex; align-items: center; justify-content: space-between; font-family: var(--mono); font-size: 10px; color: #aaa4b7; margin-top: 19px; }
.item-state { font-family: var(--sans); font-size: 10px; }
.sidebar-footer { padding: 19px 23px; border-top: 1px solid var(--line); font-size: 10px; color: #9f97ae; line-height: 1.5; display: flex; align-items: center; gap: 7px; }
.footer-dot { width: 5px; height: 5px; border-radius: 50%; background: #b3a6cf; flex: 0 0 auto; }
.list-message { color: var(--muted); padding: 24px 12px; font-size: 12px; line-height: 1.7; }
.list-message .text-button { display: block; color: var(--purple); }
.detail-pane { padding: 53px clamp(30px, 5.8vw, 88px) 40px; min-width: 0; }
.editor-form { max-width: 1120px; margin: 0 auto; }
.detail-heading { padding-bottom: 36px; }
.detail-heading .eyebrow { margin-bottom: 17px; font-size: 11px; }
.title-row { display: flex; align-items: center; gap: 17px; flex-wrap: wrap; margin-bottom: 12px; }
.detail-heading h1 { font-family: var(--mono); font-size: clamp(24px, 2.5vw, 36px); line-height: 1.3; font-weight: 600; letter-spacing: -.9px; margin: 0; overflow-wrap: anywhere; }
.status-badge { font-size: 10px; padding: 5px 8px; border-radius: 4px; color: var(--purple); background: var(--purple-wash); white-space: nowrap; }
.status-badge.local { background: #f0eff2; color: #8b8398; }
.detail-description { color: var(--muted); font-size: 15px; line-height: 1.7; margin: 0; overflow-wrap: anywhere; }
.editor-toolbar { min-height: 48px; border: 1px solid var(--line); background: #f8f6fb; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 20px; font-size: 12px; color: var(--muted); border-radius: 6px 6px 0 0; }
.editor-toolbar-actions { display: flex; align-items: center; gap: 18px; }
.kind-label { font-family: var(--mono); font-size: 10px; letter-spacing: 1px; }
.unsaved-label { color: #af8440; font-size: 11px; }
.unsaved-label::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: middle; }
.content-editor { display: block; width: 100%; min-height: 370px; height: min(52vh, 660px); resize: vertical; background: #fcfbfe; border-top: 0; border-radius: 0 0 6px 6px; padding: 25px 25px; font-family: var(--mono); font-size: 13px; line-height: 1.95; tab-size: 2; color: #51406f; }
.content-editor:focus { outline-offset: -1px; }
.editor-meta { display: flex; justify-content: space-between; gap: 20px; color: #a49daf; font-size: 10px; line-height: 1.6; margin-top: 12px; }
#character-count { font-family: var(--mono); white-space: nowrap; }
.description-field { margin-top: 27px; }
.description-field label { font-size: 11px; color: var(--muted); font-weight: 400; }
.description-field input { width: 100%; font-size: 12px; min-height: 39px; }
.save-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); padding-top: 24px; margin-top: 29px; }
.update-info { color: #a59db1; font-size: 10px; line-height: 1.6; display: flex; flex-direction: column; gap: 2px; }
.save-actions { display: flex; align-items: center; gap: 26px; }
.reset-button { font-size: 11px; }
.save-actions .primary { padding-left: 21px; padding-right: 20px; }
.form-error { background: #fff4f4; color: var(--red); padding: 12px 14px; line-height: 1.6; font-size: 12px; border-radius: 5px; border: 1px solid #f5dce0; overflow-wrap: anywhere; }
#save-error { margin-top: 17px; margin-bottom: 0; }
.notice { max-width: 1120px; margin: -22px auto 26px; padding: 12px 15px; background: #f2f7f4; border: 1px solid #dfebe3; color: #597264; font-size: 12px; line-height: 1.7; border-radius: 6px; }
.notice.error { background: #fff4f4; border-color: #f5dce0; color: var(--red); }
.disabled-note { color: #947a43; background: #fbf8f0; padding: 12px 14px; border-radius: 5px; margin-top: 16px; font-size: 12px; line-height: 1.6; }
.empty-state { min-height: 55vh; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; color: var(--muted); }
.empty-symbol { font-family: var(--mono); color: #b5a9ce; font-size: 33px; margin-bottom: 25px; }
.empty-state h1 { font-size: 18px; color: #797086; font-weight: 500; margin-bottom: 12px; }
.empty-state p { font-size: 12px; line-height: 1.8; }
.create-dialog { border: 1px solid var(--line); padding: 30px; width: 510px; max-width: calc(100vw - 32px); max-height: calc(100vh - 40px); border-radius: 10px; color: var(--ink); box-shadow: 0 20px 80px #34284520; }
.create-dialog::backdrop { background: #342d4c40; backdrop-filter: blur(3px); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 27px; }
.dialog-heading .eyebrow { margin-bottom: 9px; font-size: 10px; }
.dialog-heading h2 { font-size: 22px; margin: 0; font-weight: 600; }
.icon-button { font-family: var(--sans); font-size: 24px; width: 30px; height: 30px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); }
.icon-button:hover { background: var(--wash); }
.create-dialog input, .create-dialog select, .create-dialog textarea { width: 100%; margin-bottom: 21px; font-size: 12px; }
.create-dialog label { font-size: 12px; }
.new-content { min-height: 140px; resize: vertical; padding: 12px; line-height: 1.8; background: var(--wash); }
.dialog-hint { font-size: 11px; line-height: 1.7; color: var(--muted); margin-top: -5px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
@media (min-width: 1600px) { .workspace-body { grid-template-columns: 320px minmax(0, 1fr); } .sidebar-heading { padding-inline: 27px; } .search-wrap { margin-inline: 23px; } .config-list { padding-inline: 16px; } .config-item { padding: 21px 15px; } .item-key { font-size: 14px; } .detail-pane { padding-top: 63px; } }
@media (max-width: 960px) { .topbar { padding: 0 22px; } .environment-label, .account-name { display: none; } .topbar-actions { gap: 13px; } .workspace-body { grid-template-columns: 236px minmax(0, 1fr); } .sidebar-heading { padding: 0 17px; } .search-wrap { margin-inline: 13px; } .config-list { padding-inline: 8px; } .config-item { padding: 16px 12px; } .detail-pane { padding: 37px 28px; } .save-bar { align-items: flex-start; } .save-actions { gap: 16px; } .update-info { max-width: 140px; } }
@media (max-width: 690px) { .topbar { min-height: 68px; height: auto; padding: 17px 18px; flex-wrap: wrap; gap: 16px; } .brand { font-size: 16px; } .brand-label { font-size: 12px; } .brand-divider { margin-inline: 6px; } .brand-mark.small { width: 21px; height: 21px; } .topbar-divider { display: none; } .topbar-actions { gap: 12px; } #environment { font-size: 10px; padding-right: 7px; } .workspace-body { display: block; } .sidebar { position: static; width: 100%; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding-top: 21px; } .sidebar-heading { padding-inline: 20px; } .search-wrap { margin: 17px 20px 15px; } .config-list { display: flex; gap: 8px; padding: 0 20px 17px; overflow-x: auto; } .config-item { flex: 0 0 205px; margin: 0; padding: 13px; border-color: var(--line); } .config-item .item-key { font-size: 11px; } .item-description { font-size: 10px; } .item-meta { margin-top: 12px; } .sidebar-footer { display: none; } .detail-pane { padding: 31px 20px; } .detail-heading { padding-bottom: 26px; } .detail-heading h1 { font-size: 25px; } .detail-description { font-size: 13px; } .content-editor { min-height: 340px; padding: 18px; font-size: 12px; } .editor-toolbar { padding-inline: 16px; } .editor-toolbar-actions { gap: 12px; } .editor-meta { font-size: 9px; gap: 8px; } .save-bar { flex-wrap: wrap; gap: 17px; } .update-info { max-width: none; } .save-actions { margin-left: auto; } .notice { margin: 0 0 23px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
