:root {
  --accent: #b95b3f;
  --accent-hover: #a34f37;
  --accent-soft: #f5e8e2;
  --bg-app: #f2f4f1;
  --bg-side: #e7ebe7;
  --surface: #ffffff;
  --surface-muted: #f7f8f5;
  --control: #e7ebe6;
  --border: #d9dfd8;
  --border-soft: rgba(48, 43, 36, 0.12);
  --text-strong: #181714;
  --text-main: #34322e;
  --text-muted: #746f66;
  --text-faint: #aaa39a;
  --green: #267052;
  --green-soft: #e7f3ed;
  --amber: #9b6425;
  --amber-soft: #faecd7;
  --red: #a84432;
  --red-soft: #f8e5e0;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg-app);
  color: var(--text-main);
  font-family: MiSans, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.login-shell {
  display: grid;
  place-items: center;
  width: 100vw;
  height: 100vh;
  min-width: 1180px;
  min-height: 720px;
  background: linear-gradient(135deg, #efede8 0%, #f8f6f1 52%, #e9edf0 100%);
}

.login-card {
  width: 420px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 24px 80px rgba(60, 48, 36, 0.14);
  padding: 24px;
}

.login-brand,
.brand-block {
  display: flex;
  align-items: center;
  gap: 10px;
}

.login-brand {
  margin-bottom: 24px;
}

.login-brand img,
.brand-block img {
  width: 32px;
  height: 32px;
}

.login-brand div,
.brand-block div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.login-brand strong,
.brand-block strong {
  color: var(--text-strong);
  font-size: 18px;
  font-weight: 650;
  line-height: 1;
}

.login-brand span,
.brand-block span,
.sidebar-footer span,
.sidebar-footer small,
.login-meta span {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 18px;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-meta {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 6px 10px;
  margin-top: 16px;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-muted);
}

.login-meta strong {
  color: var(--text-main);
  font-size: 12px;
  font-weight: 600;
}

.form-error {
  margin: 0;
  color: var(--red);
  font-size: 13px;
  line-height: 20px;
}

.admin-shell {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  width: 100vw;
  height: 100vh;
  min-width: 1360px;
  min-height: 760px;
  overflow: hidden;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 14px;
  border-right: 1px solid var(--border-soft);
  background: var(--bg-side);
}

.brand-block {
  padding: 4px 8px 12px;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.side-nav button {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 10px 0 8px;
  border-radius: 8px;
  color: var(--text-main);
  text-align: left;
}

.side-nav button:hover,
.side-nav button.active {
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-strong);
}

.side-nav button.active {
  box-shadow: inset 3px 0 0 var(--accent);
}

.nav-icon-shell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  color: var(--text-muted);
  transition: background-color 0.16s ease, color 0.16s ease;
}

.nav-icon-shell svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.9;
}

.side-nav button:hover .nav-icon-shell,
.side-nav button.active .nav-icon-shell {
  background: var(--accent-soft);
  color: var(--accent);
}

.side-nav button:disabled .nav-icon-shell {
  background: transparent;
  color: var(--text-faint);
}

.side-nav .nav-label {
  overflow: hidden;
  font-size: 14px;
  font-weight: 560;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.side-nav button small {
  color: var(--text-faint);
  font-size: 12px;
}

.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: auto;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.sidebar-footer strong {
  color: var(--text-strong);
  font-size: 13px;
}

.sidebar-footer a {
  color: var(--accent);
  font-size: 12px;
  line-height: 18px;
  text-decoration: none;
}

.main-surface {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  min-height: 760px;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 74px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px);
}

.topbar h1,
.panel-heading h2,
.inspector-header h2 {
  margin: 0;
  color: var(--text-strong);
  font-weight: 650;
}

.topbar h1 {
  font-size: 24px;
  line-height: 32px;
}

.eyebrow {
  display: none;
}

.topbar-actions,
.inspector-actions,
.row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.session-pill {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
}

.sync-pill {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f6f1eb;
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
}

.sync-pill.online {
  border-color: rgba(37, 132, 86, 0.24);
  background: #e8f5ef;
  color: #1f7a4f;
}

.sync-pill.error {
  border-color: rgba(210, 70, 54, 0.28);
  background: #fff0ed;
  color: var(--red);
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 560;
  line-height: 18px;
  white-space: nowrap;
}

.primary-button {
  background: var(--accent);
  color: #fff;
}

.primary-button:hover {
  background: var(--accent-hover);
}

.ghost-button {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-main);
}

.ghost-button:hover {
  background: var(--surface-muted);
}

.full {
  width: 100%;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 24px 0;
}

.summary-strip.five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.metric {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface);
}

.metric span,
.metric small {
  display: block;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric strong {
  display: block;
  margin: 6px 0 2px;
  color: var(--text-strong);
  font-size: 28px;
  font-weight: 650;
  line-height: 34px;
}

.metric.accent strong {
  color: var(--accent);
}

.dashboard-grid,
.list-workbench,
.commerce-layout,
.knowledge-workbench {
  min-height: 0;
  padding: 16px 24px 24px;
  overflow: hidden;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(420px, 0.85fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 14px;
}

.user-activity-panel,
.order-focus-panel {
  min-height: 0;
}

.list-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.commerce-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 14px;
}

.knowledge-workbench {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 14px;
  overflow: visible;
}

.panel,
.inspector {
  min-width: 0;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface);
}

.panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.panel.wide {
  grid-column: 1 / -1;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  border-bottom: 1px solid var(--border-soft);
}

.panel-heading.compact {
  align-items: center;
}

.panel-heading h2 {
  font-size: 18px;
  line-height: 26px;
}

.panel-heading p {
  max-width: 540px;
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 22px;
}

.filters {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
}

.filters.two {
  grid-template-columns: minmax(260px, 1fr) 180px;
}

.filters.three {
  grid-template-columns: minmax(260px, 1fr) 180px 180px;
}

.search-field,
.select-field,
.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.search-field span,
.select-field span,
.form-field span,
.field-label span {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 18px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  background: var(--surface);
  color: var(--text-main);
  font-size: 13px;
}

input,
select {
  height: 34px;
  padding: 0 10px;
}

textarea {
  min-height: 76px;
  resize: vertical;
  padding: 9px 10px;
  line-height: 20px;
}

textarea[data-field="article-body"] {
  min-height: 210px;
  font-family: "SF Mono", ui-monospace, Menlo, Monaco, Consolas, monospace;
}

.rich-editor-shell {
  position: relative;
  min-width: 0;
}

.rich-editor-shell [hidden] {
  display: none !important;
}

.article-doc-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 46px;
  overflow-x: auto;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: var(--surface);
  white-space: nowrap;
}

.article-doc-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 7px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 680;
  line-height: 1;
}

.article-doc-toolbar button:hover,
.article-doc-toolbar button:focus-visible,
.article-doc-toolbar button.is-active {
  background: var(--surface-muted);
  color: var(--text-strong);
  outline: none;
}

.article-doc-toolbar button.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.article-doc-toolbar svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.9;
}

.article-doc-toolbar-divider {
  display: inline-block;
  width: 1px;
  height: 20px;
  margin: 0 4px;
  background: var(--border-soft);
}

.rich-editor-shell[data-editor-mode="markdown"] .article-doc-toolbar [data-editor-command],
.rich-editor-shell[data-editor-mode="markdown"] .article-doc-toolbar-divider {
  display: none;
}

.rich-text-field small {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 18px;
}

.rich-text-field .sun-editor {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 0 0 12px 12px;
  background: var(--surface);
  box-shadow: none;
}

.rich-text-field .sun-editor:focus-within {
  border-color: rgba(185, 91, 63, 0.46);
  box-shadow: 0 0 0 3px rgba(196, 88, 61, 0.1);
}

.rich-text-field .se-toolbar {
  display: none !important;
}

.rich-text-field .se-toolbar,
.rich-text-field .se-btn-tray {
  background: var(--surface);
}

.rich-text-field .se-toolbar {
  border-bottom: 1px solid var(--border-soft);
  outline: 0;
}

.rich-text-field .se-btn-tray {
  display: flex !important;
  align-items: center;
  gap: 4px;
  min-height: 46px;
  overflow-x: auto;
  padding: 7px 156px 7px 10px !important;
  white-space: nowrap;
}

.rich-text-field .se-btn {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  color: var(--text-muted);
}

.rich-text-field .se-btn svg {
  width: 17px;
  height: 17px;
}

.rich-text-field .se-btn:hover,
.rich-text-field .se-btn:focus,
.rich-text-field .se-btn.active {
  background: var(--surface-muted);
  color: var(--text-strong);
}

.rich-text-field .se-wrapper,
.rich-text-field .se-wrapper-inner {
  background: var(--surface);
}

.rich-text-field .se-wrapper-inner {
  box-sizing: border-box;
  width: min(680px, calc(100% - 96px)) !important;
  max-width: 680px;
  min-height: 640px;
  margin: 0 auto;
  padding: 40px 0 72px;
  color: var(--text-main);
  font-size: 18px;
  line-height: 1.8;
}

.rich-text-field .se-wrapper-inner:focus {
  outline: none;
}

.rich-text-field .se-wrapper-inner :first-child {
  margin-top: 0;
}

.rich-text-field .se-wrapper-inner p {
  margin: 0 0 22px;
}

.rich-text-field .se-wrapper-inner:empty::before,
.rich-text-field .se-wrapper-inner .is-editor-empty::before {
  color: var(--text-faint);
  content: attr(data-placeholder);
  pointer-events: none;
}

.rich-text-field .se-wrapper-inner li.is-editor-empty::before,
.rich-text-field .se-wrapper-inner code.is-editor-empty::before {
  display: inline;
}

.rich-text-field .se-wrapper-inner:empty::before {
  display: block;
  content: "输入 / 快速插入";
}

.rich-text-field .se-wrapper-inner h2.is-editor-empty::before,
.rich-text-field .se-wrapper-inner h3.is-editor-empty::before {
  color: rgba(113, 102, 92, 0.48);
}

.rich-text-field .se-wrapper-inner h2 {
  margin: 38px 0 14px;
  color: var(--text-main);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.45;
  scroll-margin-top: 40px;
}

.rich-text-field .se-wrapper-inner h3 {
  margin: 30px 0 12px;
  color: var(--text-main);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.5;
  scroll-margin-top: 40px;
}

.rich-text-field .se-wrapper-inner a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rich-text-field .se-wrapper-inner ul,
.rich-text-field .se-wrapper-inner ol {
  margin: 0 0 24px 1.2em;
  padding: 0;
}

.rich-text-field .se-wrapper-inner .article-task-list {
  display: grid;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.rich-text-field .se-wrapper-inner li {
  margin: 6px 0;
}

.rich-text-field .se-wrapper-inner .article-task-list li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 0;
}

.rich-text-field .se-wrapper-inner .task-check {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-top: 8px;
  border: 1px solid #d8d1c8;
  border-radius: 4px;
  background: var(--surface);
  cursor: pointer;
}

.rich-text-field .se-wrapper-inner .article-task-list li[data-checked="true"] .task-check {
  border-color: var(--accent);
  background: var(--accent);
}

.rich-text-field .se-wrapper-inner .article-task-list li[data-checked="true"] .task-check::after {
  width: 7px;
  height: 4px;
  margin-top: -1px;
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  content: "";
  transform: rotate(-45deg);
}

.rich-text-field .se-wrapper-inner .task-text {
  min-width: 0;
}

.rich-text-field .se-wrapper-inner .article-task-list li[data-checked="true"] .task-text {
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.rich-text-field .se-wrapper-inner blockquote {
  margin: 0 0 28px;
  padding-left: 16px;
  border-left: 4px solid #edebe7;
  color: var(--text-muted);
  font-size: 16px;
}

.rich-text-field .se-wrapper-inner .quote-block {
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr);
  gap: 12px;
  margin: 0 0 28px;
  color: var(--text-muted);
  font-size: 16px;
}

.rich-text-field .se-wrapper-inner .quote-block::before {
  display: block;
  border-radius: 5px;
  background: #edebe7;
  content: "";
}

.rich-text-field .se-wrapper-inner .article-callout {
  position: relative;
  margin: 0 0 28px;
  padding: 16px 18px 16px 44px;
  border: 1px solid rgba(196, 88, 61, 0.18);
  border-radius: 8px;
  background: #fff8f2;
  color: var(--text-main);
  font-size: 16px;
}

.rich-text-field .se-wrapper-inner .article-callout::before {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(196, 88, 61, 0.12);
  content: "";
}

.rich-text-field .se-wrapper-inner .article-callout p {
  margin: 0;
}

.rich-text-field .se-wrapper-inner table {
  width: 100%;
  margin: 28px 0;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  line-height: 20px;
}

.rich-text-field .se-wrapper-inner th,
.rich-text-field .se-wrapper-inner td {
  padding: 12px 20px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: top;
}

.rich-text-field .se-wrapper-inner th {
  background: var(--bg-app);
  color: #6b7280;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06px;
}

.rich-text-field .se-wrapper-inner tr:last-child td {
  border-bottom: 0;
}

.rich-text-field .se-wrapper-inner pre {
  margin: 24px 0;
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfaf8;
  color: var(--text-main);
  font-family: "SF Mono", ui-monospace, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.rich-text-field .se-wrapper-inner code {
  font-family: "SF Mono", ui-monospace, Menlo, Monaco, Consolas, monospace;
}

.rich-text-field .se-wrapper-inner :not(pre) > code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #f5f1ec;
  color: #9a4f35;
  font-size: 0.88em;
}

.rich-text-field .se-wrapper-inner img,
.rich-text-field .se-wrapper-inner iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 28px 0;
  border: 0;
  border-radius: 8px;
}

.rich-text-field .se-wrapper-inner img[data-width="wide"] {
  width: 78%;
  margin-right: auto;
  margin-left: auto;
}

.rich-text-field .se-wrapper-inner img[data-width="narrow"] {
  width: 56%;
  margin-right: auto;
  margin-left: auto;
}

.rich-text-field .se-wrapper-inner iframe {
  aspect-ratio: 16 / 9;
}

.rich-editor-shell.is-image-dropping .se-wrapper-inner {
  outline: 2px dashed rgba(196, 88, 61, 0.38);
  outline-offset: -8px;
  background: linear-gradient(rgba(255, 248, 242, 0.74), rgba(255, 248, 242, 0.74));
}

.article-image-upload {
  display: none;
}

.rich-text-field .se-wrapper-inner hr {
  margin: 32px 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.rich-text-field .se-wrapper-inner .article-block-active {
  border-radius: 8px;
  box-shadow: 0 0 0 2px rgba(196, 88, 61, 0.16), 0 10px 26px rgba(48, 43, 36, 0.06);
}

.rich-text-field .se-wrapper-inner p.article-block-active,
.rich-text-field .se-wrapper-inner h2.article-block-active,
.rich-text-field .se-wrapper-inner h3.article-block-active,
.rich-text-field .se-wrapper-inner blockquote.article-block-active {
  background: rgba(255, 248, 242, 0.72);
}

.rich-text-field .se-wrapper-inner hr.article-block-active {
  box-shadow: 0 0 0 2px rgba(196, 88, 61, 0.16);
}

.rich-text-field .se-wrapper-inner .article-block-dragging {
  border-radius: 8px;
  background: #fffaf6;
  box-shadow: 0 16px 38px rgba(48, 43, 36, 0.16);
  opacity: 0.58;
  transform: scale(0.992);
}

body.article-block-is-dragging,
body.article-block-is-dragging * {
  cursor: grabbing !important;
  user-select: none;
}

.article-selection-toolbar {
  position: absolute;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 3px;
  min-height: 38px;
  padding: 4px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 42px rgba(48, 43, 36, 0.16);
  backdrop-filter: blur(14px);
}

.article-selection-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  border-radius: 7px;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 650;
}

.article-selection-toolbar button:hover {
  background: var(--surface-muted);
  color: var(--text-strong);
}

.article-selection-toolbar button.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.article-selection-toolbar-divider {
  width: 1px;
  height: 20px;
  margin: 0 2px;
  background: var(--border-soft);
}

.selection-toolbar-format {
  min-width: 66px;
  padding: 0 10px;
  gap: 6px;
  color: var(--text-strong);
  font-weight: 680;
}

.selection-toolbar-format svg {
  width: 13px;
  height: 13px;
}

.article-selection-format-menu {
  position: absolute;
  top: 42px;
  left: 4px;
  z-index: 2;
  display: grid;
  width: 220px;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 44px rgba(48, 43, 36, 0.16);
  backdrop-filter: blur(14px);
}

.article-selection-format-menu button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  width: 100%;
  height: auto;
  min-height: 44px;
  padding: 7px 8px;
  border-radius: 8px;
  text-align: left;
}

.article-selection-format-menu button:hover,
.article-selection-format-menu button:focus-visible,
.article-selection-format-menu button.active {
  background: var(--surface-muted);
  outline: none;
}

.format-menu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--text-muted);
}

.format-menu-icon svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.9;
}

.article-selection-format-menu button.active .format-menu-icon {
  background: var(--accent-soft);
  color: var(--accent);
}

.format-menu-label {
  display: block;
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 680;
  line-height: 18px;
}

.article-selection-format-menu small {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 16px;
}

.article-selection-toolbar svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.9;
}

.article-selection-format-menu .format-menu-icon svg {
  width: 15px;
  height: 15px;
}

.article-slash-menu {
  position: absolute;
  z-index: 12;
  display: grid;
  gap: 6px;
  width: 292px;
  max-height: 372px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 50px rgba(48, 43, 36, 0.18);
  backdrop-filter: blur(16px);
}

.article-slash-menu button {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  min-height: 44px;
  padding: 7px 10px;
  border-radius: 8px;
  text-align: left;
}

.article-slash-menu button:hover,
.article-slash-menu button:focus-visible,
.article-slash-menu button.active {
  background: var(--surface-muted);
  outline: none;
}

.article-slash-menu span {
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 650;
  line-height: 18px;
}

.article-slash-menu small {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 16px;
}

.article-block-handle {
  position: absolute;
  z-index: 11;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 30px;
  padding: 2px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 30px rgba(48, 43, 36, 0.12);
  backdrop-filter: blur(12px);
}

.article-block-handle button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: var(--text-muted);
}

.article-block-handle button:hover {
  background: var(--surface-muted);
  color: var(--text-strong);
}

.article-block-handle button[data-editor-block-menu] {
  cursor: grab;
}

.article-block-handle button[data-editor-block-menu]:active {
  cursor: grabbing;
}

.article-block-handle.is-dragging {
  border-color: rgba(196, 88, 61, 0.36);
  box-shadow: 0 14px 34px rgba(48, 43, 36, 0.16);
}

.article-block-handle.is-dragging button[data-editor-block-menu] {
  background: var(--accent-soft);
  color: var(--accent);
}

.article-block-handle svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.9;
}

.article-block-drop-marker {
  position: absolute;
  z-index: 14;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(196, 88, 61, 0.12);
  pointer-events: none;
}

.article-block-drop-marker::before,
.article-block-drop-marker::after {
  position: absolute;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
}

.article-block-drop-marker::before {
  left: -2px;
}

.article-block-drop-marker::after {
  right: -2px;
}

.article-media-toolbar {
  position: absolute;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 40px rgba(48, 43, 36, 0.14);
  backdrop-filter: blur(16px);
}

.article-media-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 28px;
  padding: 0 9px;
  border-radius: 7px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 650;
}

.article-media-toolbar button:hover,
.article-media-toolbar button:focus-visible,
.article-media-toolbar button.is-active {
  background: var(--surface-muted);
  color: var(--text-strong);
  outline: none;
}

.article-media-toolbar button.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.article-media-toolbar .danger-media-action {
  color: #c2413b;
}

.article-media-toolbar .danger-media-action:hover,
.article-media-toolbar .danger-media-action:focus-visible {
  background: rgba(194, 65, 59, 0.1);
  color: #b42318;
}

.article-media-toolbar svg {
  width: 14px;
  height: 14px;
  stroke-width: 1.9;
}

.article-media-toolbar-divider {
  width: 1px;
  height: 18px;
  background: var(--border-soft);
}

.article-block-menu {
  position: absolute;
  z-index: 13;
  display: grid;
  width: 292px;
  max-height: 336px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 50px rgba(48, 43, 36, 0.18);
  backdrop-filter: blur(16px);
}

.article-block-menu[data-mode="insert"] .block-menu-transform,
.article-block-menu[data-mode="insert"] .block-menu-actions,
.article-block-menu[data-mode="actions"] .block-menu-insert {
  display: none;
}

.block-menu-section + .block-menu-section {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border-soft);
}

.block-menu-title {
  padding: 6px 10px 7px;
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 650;
  line-height: 16px;
}

.article-block-menu button {
  display: grid;
  gap: 2px;
  min-height: 44px;
  padding: 7px 10px;
  border-radius: 8px;
  text-align: left;
}

.article-block-menu button:hover,
.article-block-menu button:focus-visible,
.article-block-menu button.active {
  background: var(--surface-muted);
  outline: none;
}

.article-block-menu .danger-block-action span {
  color: var(--red);
}

.article-block-menu .danger-block-action:hover,
.article-block-menu .danger-block-action:focus-visible,
.article-block-menu .danger-block-action.active {
  background: rgba(180, 68, 49, 0.08);
}

.article-block-menu span {
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 650;
  line-height: 18px;
}

.article-block-menu small {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 16px;
}

.command-menu-group + .command-menu-group {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border-soft);
}

.command-menu-group-title {
  padding: 5px 9px 7px;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 700;
  line-height: 14px;
}

.article-slash-menu .command-menu-group button,
.article-block-menu .block-menu-insert .command-menu-group button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 7px 9px;
}

.command-menu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--text-muted);
}

.command-menu-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.9;
}

.command-menu-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.article-slash-menu .command-menu-label,
.article-block-menu .command-menu-label {
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 680;
  line-height: 18px;
}

.article-slash-menu .command-menu-group button:hover .command-menu-icon,
.article-slash-menu .command-menu-group button:focus-visible .command-menu-icon,
.article-slash-menu .command-menu-group button.active .command-menu-icon,
.article-block-menu .block-menu-insert .command-menu-group button:hover .command-menu-icon,
.article-block-menu .block-menu-insert .command-menu-group button:focus-visible .command-menu-icon,
.article-block-menu .block-menu-insert .command-menu-group button.active .command-menu-icon {
  background: var(--accent-soft);
  color: var(--accent);
}

.editor-mode-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 620;
  line-height: 18px;
  box-shadow: inset 0 0 0 1px var(--border);
}

.editor-mode-toggle:hover {
  background: var(--surface-muted);
  color: var(--text-strong);
}

.rich-editor-shell[data-editor-mode="markdown"] {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.rich-editor-shell[data-editor-mode="markdown"]::before {
  content: none;
}

.rich-editor-shell[data-editor-mode="markdown"] textarea[data-field="article-body"] {
  display: block !important;
  width: 100%;
  min-height: 640px;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  background: var(--surface);
  font-family: "SF Mono", ui-monospace, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.8;
  box-shadow: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(196, 88, 61, 0.14);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-grid.dense {
  padding: 0 16px 16px;
}

.form-field.span-2 {
  grid-column: 1 / -1;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
  line-height: 20px;
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  background: var(--surface-muted);
  color: var(--text-muted);
  font-weight: 560;
}

.data-table th:last-child,
.data-table td:last-child {
  width: 92px;
}

.data-table tbody {
  overflow: auto;
}

.data-table tr:hover td,
.data-table tr.selected td {
  background: #fff8f4;
}

.data-table td strong,
.mini-row strong {
  display: block;
  overflow: hidden;
  max-width: 360px;
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 620;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-table td span,
.mini-row span {
  display: block;
  overflow: hidden;
  max-width: 360px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-panel .data-table,
.code-table-panel .data-table,
.list-workbench .data-table {
  display: block;
  min-height: 0;
  overflow: auto;
}

.article-panel .data-table thead,
.article-panel .data-table tbody,
.code-table-panel .data-table thead,
.code-table-panel .data-table tbody,
.list-workbench .data-table thead,
.list-workbench .data-table tbody {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.article-table th:nth-child(1),
.article-table td:nth-child(1) {
  width: 36%;
}

.article-table th:nth-child(2),
.article-table td:nth-child(2) {
  width: 18%;
}

.article-table th:nth-child(3),
.article-table td:nth-child(3),
.article-table th:nth-child(4),
.article-table td:nth-child(4) {
  width: 92px;
}

.article-table th:nth-child(5),
.article-table td:nth-child(5) {
  width: 108px;
}

.article-title-cell {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.article-title-cell strong {
  max-width: none;
  font-size: 14px;
  line-height: 20px;
}

.article-title-cell span {
  max-width: none;
  color: var(--text-muted);
}

.article-category,
.article-date {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  color: var(--text-main);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pill,
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 18px;
  white-space: nowrap;
}

.status-badge {
  min-width: 76px;
  height: 30px;
  background: var(--surface-muted);
  color: var(--text-main);
}

.article-draft-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  min-height: 28px;
  margin: -6px 0 12px;
  padding: 0 10px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 12px;
  line-height: 18px;
}

.article-draft-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--text-faint);
}

.article-draft-state[data-state="saving"] .article-draft-dot {
  background: var(--amber);
}

.article-draft-state[data-state="saved"] .article-draft-dot {
  background: var(--green);
}

.article-draft-state button {
  margin-left: 2px;
  color: var(--accent);
  font-weight: 650;
}

.article-draft-state button:hover {
  color: var(--accent-hover);
}

.pill.free {
  background: var(--green-soft);
  color: var(--green);
}

.pill.locked {
  background: var(--accent-soft);
  color: var(--accent);
}

.pill.warning {
  background: var(--amber-soft);
  color: var(--amber);
}

.pill.neutral {
  background: #eceff1;
  color: var(--text-muted);
}

.data-table td .pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: none;
  overflow: visible;
  line-height: 1;
  vertical-align: middle;
}

.inspector {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 16px;
  overflow: auto;
}

.inspector-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.inspector-header h2 {
  max-width: 290px;
  overflow: hidden;
  font-size: 18px;
  line-height: 26px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.permission-box,
.log-list,
.related-list {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}

.field-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.field-label small {
  color: var(--text-faint);
  font-size: 12px;
}

.permission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.check-card {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--text-main);
  font-size: 12px;
}

.check-card input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--accent);
}

.log-list {
  display: grid;
  gap: 8px;
}

.log-row,
.related-list button,
.mini-row {
  display: grid;
  gap: 4px;
  width: 100%;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-muted);
  text-align: left;
}

.log-row strong,
.related-list strong {
  color: var(--text-strong);
  font-size: 12px;
  line-height: 18px;
}

.log-row span,
.related-list span {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 18px;
}

.inspector-actions {
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 16px;
}

.article-actions {
  justify-content: space-between;
}

.article-save-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.danger-text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(168, 68, 50, 0.24);
  border-radius: 8px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 13px;
  font-weight: 560;
  line-height: 18px;
  white-space: nowrap;
}

.danger-text-button:hover {
  border-color: rgba(168, 68, 50, 0.36);
  background: #f5d6cd;
}

.bar-list,
.mini-table {
  display: grid;
  gap: 10px;
  padding: 16px;
  overflow: auto;
}

.bar-row {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 88px;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-muted);
}

.bar-row strong {
  display: block;
  color: var(--text-strong);
  font-size: 13px;
  line-height: 20px;
}

.bar-row span {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 18px;
}

.bar-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--control);
}

.bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.bar-row b {
  color: var(--accent);
  font-size: 13px;
  text-align: right;
}

.mini-row {
  grid-template-columns: minmax(0, 1fr) 104px 78px;
  align-items: center;
  min-height: 52px;
}

.state-dot {
  display: inline-flex;
  justify-content: center;
  color: var(--text-muted);
  font-size: 12px;
  font-style: normal;
}

.state-dot.ok {
  color: var(--green);
}

.state-dot.bad {
  color: var(--red);
}

.directory-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.directory-stat {
  position: relative;
  overflow: hidden;
  min-height: 78px;
  padding: 13px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-muted);
}

.directory-stat i {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
}

.generator-panel {
  align-self: start;
}

.generator-panel .primary-button {
  margin: 0 16px 16px;
  width: calc(100% - 32px);
}

.row-actions {
  gap: 6px;
}

.row-actions button {
  height: 26px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-main);
  font-size: 12px;
  white-space: nowrap;
}

.article-row-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.article-row-actions svg {
  width: 14px;
  height: 14px;
}

.table-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  min-width: 52px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-main);
  font-size: 12px;
  white-space: nowrap;
}

.table-action:hover {
  border-color: rgba(185, 91, 63, 0.42);
  background: var(--accent-soft);
  color: var(--accent);
}

.edit-action {
  border-color: rgba(185, 91, 63, 0.22);
  color: var(--accent);
}

.drawer-layer {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 23, 20, 0.18);
  cursor: default;
  pointer-events: auto;
}

.inspector.detail-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 520px;
  border-width: 0 0 0 1px;
  border-radius: 0;
  box-shadow: -18px 0 50px rgba(40, 33, 24, 0.16);
  pointer-events: auto;
}

.inspector.detail-drawer.article-inspector {
  width: min(960px, calc(100vw - 292px));
}

.article-inspector .inspector-header h2 {
  max-width: 720px;
}

.drawer-close {
  align-self: flex-end;
  height: 28px;
  margin: -4px 0 8px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 12px;
}

.drawer-close:hover {
  color: var(--text-strong);
  background: var(--control);
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: grid;
  place-items: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 23, 20, 0.24);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: 460px;
  max-height: min(640px, calc(100vh - 80px));
  overflow: auto;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(40, 33, 24, 0.22);
  padding: 18px;
}

.modal-header,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-header h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: 20px;
  line-height: 28px;
}

.modal-close {
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 12px;
}

.modal-copy {
  margin: 12px 0 16px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 22px;
}

.modal-form {
  grid-template-columns: 1fr;
  margin-bottom: 16px;
}

.delete-summary {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-muted);
}

.delete-summary strong {
  color: var(--text-strong);
  font-size: 14px;
  line-height: 22px;
}

.delete-summary span {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 18px;
}

.primary-button.danger {
  background: var(--red);
}

.primary-button.danger:hover {
  background: #92392a;
}

.directory-panel {
  padding-bottom: 0;
  overflow: visible;
}

.directory-list {
  display: grid;
  gap: 8px;
  padding: 10px;
  overflow: visible;
}

.directory-row {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 54px;
  padding: 9px 10px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-muted);
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease, opacity 0.12s ease;
}

.directory-row.active,
.directory-row:hover {
  border-color: rgba(196, 88, 61, 0.34);
  background: #fff8f4;
}

.directory-row.dragging {
  border-color: rgba(185, 91, 63, 0.42);
  background: #fffaf6;
  box-shadow: 0 14px 34px rgba(40, 33, 24, 0.18);
  opacity: 0.72;
  transform: scale(0.985);
}

.directory-row.drop-before::before,
.directory-row.drop-after::after {
  position: absolute;
  left: 8px;
  right: 8px;
  z-index: 3;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
  pointer-events: none;
}

.directory-row.drop-before::before {
  top: -6px;
}

.directory-row.drop-after::after {
  bottom: -6px;
}

.directory-row.drop-before .drag-handle::before,
.directory-row.drop-after .drag-handle::after {
  position: absolute;
  left: 2px;
  z-index: 4;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
  pointer-events: none;
}

.directory-row.drop-before .drag-handle::before {
  top: -8px;
}

.directory-row.drop-after .drag-handle::after {
  bottom: -8px;
}

.drag-handle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 24px;
  border-radius: 6px;
  color: var(--text-muted);
  cursor: grab;
  user-select: none;
}

.drag-handle:hover {
  background: var(--control);
  color: var(--text-strong);
}

.drag-icon {
  width: 10px;
  height: 14px;
  background-image: radial-gradient(currentColor 1.1px, transparent 1.2px);
  background-position: 0 0;
  background-size: 5px 5px;
}

.directory-main {
  min-width: 0;
}

.directory-main strong {
  display: block;
  overflow: hidden;
  color: var(--text-strong);
  font-size: 13px;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-main span {
  display: block;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-action-cell {
  position: relative;
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

.directory-row:hover .directory-action-cell,
.directory-action-cell.open {
  opacity: 1;
  pointer-events: auto;
}

.icon-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-muted);
}

.icon-menu-button:hover {
  border-color: rgba(185, 91, 63, 0.36);
  background: var(--accent-soft);
  color: var(--accent);
}

.more-icon,
.more-icon::before,
.more-icon::after {
  display: block;
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
}

.more-icon {
  position: relative;
}

.more-icon::before,
.more-icon::after {
  position: absolute;
  left: 0;
  content: "";
}

.more-icon::before {
  top: -7px;
}

.more-icon::after {
  top: 7px;
}

.directory-menu {
  position: absolute;
  top: 36px;
  right: 0;
  z-index: 8;
  display: grid;
  min-width: 118px;
  padding: 6px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(40, 33, 24, 0.16);
}

.directory-menu button {
  height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  color: var(--text-main);
  font-size: 12px;
  text-align: left;
  white-space: nowrap;
}

.directory-menu button:hover {
  background: var(--surface-muted);
  color: var(--text-strong);
}

.directory-menu .danger-menu-item {
  color: var(--red);
}

.directory-menu .danger-menu-item:hover {
  background: var(--red-soft);
  color: var(--red);
}

.directory-menu button:disabled {
  color: var(--text-faint);
  cursor: not-allowed;
}

.directory-menu button:disabled:hover {
  background: transparent;
  color: var(--text-faint);
}

.article-inspector .form-grid {
  grid-template-columns: 1fr 1fr;
}

.article-meta-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.15fr) 140px minmax(220px, 1fr);
  gap: 12px;
}

.article-meta-row .form-field {
  min-width: 0;
}

.article-inspector textarea[data-field="article-description"],
.article-inspector textarea[data-field="article-body"] {
  grid-column: 1 / -1;
}

.article-inspector textarea[data-field="article-body"] {
  min-height: 560px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 120px;
  color: var(--text-muted);
  font-size: 13px;
}

.empty-state.small {
  min-height: 54px;
  border: 1px dashed var(--border);
  border-radius: 8px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  padding: 10px 14px;
  border-radius: 8px;
  background: #191714;
  color: #fff;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}
