* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #0f172a; }
body.manage-page {
  background: radial-gradient(1000px 500px at 0% -20%, #dbeafe 0%, transparent 60%),
              radial-gradient(1000px 600px at 100% 0%, #e0e7ff 0%, transparent 55%),
              #f6f8fc;
}
body.doc-page {
  background: #f5f6f7;
  color: #1f2937;
}
.hidden { display: none !important; }
.glass { background: rgba(255,255,255,0.75); backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,0.65); box-shadow: 0 10px 36px rgba(15,23,42,0.08); }

.doc-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid #e5e7eb;
  padding: 8px 14px;
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.lark-topbar {
  height: 62px;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
}
.lark-top-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lark-top-right { display: flex; align-items: center; gap: 8px; }
.lark-icon-btn {
  border: 0;
  background: transparent;
  color: #4b5563;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
}
.lark-icon-btn:hover { background: #f3f4f6; }
.lark-breadcrumbs { min-width: 0; }
.lark-crumb-line {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 14px;
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lark-breadcrumbs .sep { color: #9ca3af; }
.lark-subline { font-size: 12px; color: #9ca3af; margin-top: 2px; }
.lark-share-btn {
  border: 0;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  font-size: 13px;
  padding: 7px 14px;
  cursor: pointer;
}
.lark-mode-btn {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font-size: 13px;
  padding: 6px 10px;
  cursor: pointer;
}
.lark-dot {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid #e5e7eb;
  background: radial-gradient(circle at 30% 30%, #f472b6, #8b5cf6);
}
.lark-divider {
  width: 1px;
  height: 20px;
  background: #e5e7eb;
  margin: 0 2px;
}
.lark-canvas-wrap {
  padding: 20px 24px;
}
.lark-canvas {
  width: min(860px, 100%);
  margin: 0 auto;
  min-height: calc(100vh - 120px);
  position: relative;
}
.lark-doc-title {
  width: 100%;
  border: 0;
  background: transparent;
  font-size: 54px;
  font-weight: 700;
  color: #111827;
  letter-spacing: 0.2px;
  outline: none;
  padding: 18px 0 8px;
}
.lark-doc-title::placeholder { color: #c2c6cd; }
.lark-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #6b7280;
  font-size: 15px;
}
.lark-meta-row .avatar {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dbeafe;
}
.lark-editor-hint { margin-top: 8px; color: #9ca3af; font-size: 12px; font-weight: 400; min-height: 8px; }
.lark-doc-editor {
  width: 100%;
  min-height: 420px;
  border: 0;
  background: transparent;
  margin-top: 10px;
  outline: none;
  resize: vertical;
  font-size: 18px;
  line-height: 1.85;
  color: #111827;
  padding: 0;
}
.lark-doc-editor.markdown-editor {
  min-height: 520px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #0f172a;
  font-size: 15px;
  line-height: 1.75;
  padding: 6px 0 0;
  outline: none;
  resize: none;
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
  tab-size: 2;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
.lark-doc-editor.markdown-editor:focus {
  border: 0;
  box-shadow: none;
}
.lark-doc-editor.markdown-editor::placeholder {
  color: #9ca3af;
}
.markdown-preview {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed #e5e7eb;
  color: #111827;
  font-size: 16px;
  line-height: 1.8;
}
.markdown-preview h1,
.markdown-preview h2,
.markdown-preview h3,
.markdown-preview h4,
.markdown-preview h5,
.markdown-preview h6 {
  margin: 14px 0 8px;
  line-height: 1.35;
}
.markdown-preview h1 { font-size: 2rem; }
.markdown-preview h2 { font-size: 1.6rem; }
.markdown-preview h3 { font-size: 1.3rem; }
.markdown-preview p { margin: 6px 0; }
.markdown-preview ul,
.markdown-preview ol { margin: 8px 0 8px 22px; }
.markdown-preview blockquote {
  margin: 10px 0;
  padding: 6px 12px;
  border-left: 3px solid #93c5fd;
  color: #475569;
  background: #f8fbff;
}
.markdown-preview pre {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  overflow: auto;
  margin: 10px 0;
}
.markdown-preview code {
  background: #f3f4f6;
  border-radius: 5px;
  padding: 1px 5px;
}
.markdown-preview a { color: #2563eb; text-decoration: underline; }
.markdown-preview img,
.markdown-preview video {
  max-width: min(720px, 100%);
  border-radius: 8px;
  display: block;
  margin: 10px 0;
}
.markdown-preview .task-item {
  list-style: none;
  margin-left: -18px;
}
.markdown-preview .task-item input[type="checkbox"] {
  pointer-events: none;
  margin-right: 6px;
}
.mode-switch-btn {
  width: auto;
  min-width: 92px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
}
#openShareBtn.mode-switch-btn {
  border-color: transparent;
  background: #2563eb;
  color: #fff;
}
#openShareBtn.mode-switch-btn:hover {
  background: #1d4ed8;
}
.markdown-preview-editor {
  min-height: 520px;
  border: 0;
  outline: none;
  background: transparent;
  margin-top: 10px;
}
.markdown-preview-editor:focus {
  outline: none;
}
.lark-float-save {
  position: fixed;
  right: 20px;
  bottom: 20px;
  border: 0;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  padding: 10px 14px;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(37,99,235,0.3);
}
.doc-top-left, .doc-top-right { display: flex; align-items: center; gap: 8px; }
.doc-top-center { display: flex; justify-content: center; }
.doc-title-input {
  width: min(760px, 100%);
  border: 1px solid #d6deeb;
  border-radius: 10px;
  background: #fff;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  padding: 8px 12px;
  outline: none;
}
.doc-title-input:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(59,130,246,0.12); }
.doc-mode-tag, .doc-save-tag {
  border: 1px solid #d7dfeb;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  background: #fff;
}
.doc-main {
  display: block;
  padding: 14px;
  height: calc(100vh - 64px);
  overflow: auto;
}
.doc-editor-pane, .doc-preview-pane {
  background: #fff;
  border: 1px solid #e5eaf3;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}
.doc-editor-pane {
  width: min(920px, 100%);
  min-height: calc(100vh - 96px);
  margin: 0 auto;
}
.doc-toolbar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid #e8edf5;
  background: #fbfcff;
}
.doc-toolbar-select { width: 96px; }
.doc-tool-btn {
  border: 1px solid #d6e0ee;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  padding: 6px 9px;
  cursor: pointer;
}
.doc-tool-btn:hover { background: #f8fafc; }
.doc-editor-hint {
  padding: 6px 12px 0;
  font-size: 12px;
  color: #6b7280;
}
.doc-editor-hint code {
  background: #f3f4f6;
  border-radius: 5px;
  padding: 1px 5px;
}
.doc-editor {
  flex: 1;
  border: 0;
  outline: none;
  resize: none;
  padding: 14px;
  font-size: 15px;
  line-height: 1.7;
  color: #111827;
}
.slash-menu {
  position: fixed;
  left: 22px;
  top: 140px;
  width: 255px;
  max-height: 520px;
  overflow: auto;
  border: 1px solid #dbe4f2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.14);
  z-index: 20;
}
.slash-menu-search-hint {
  padding: 8px 10px 6px;
  font-size: 12px;
  color: #9ca3af;
}
.slash-menu-cat {
  padding: 5px 10px;
  font-size: 12px;
  color: #6b7280;
  background: #fff;
  border-top: 1px solid #f1f5f9;
}
.slash-menu-cat:first-child { border-top: 0; }
.slash-menu-item {
  padding: 7px 10px;
  border-bottom: 0;
  cursor: pointer;
  border-radius: 6px;
  margin: 1px 6px;
}
.slash-menu-item:last-child { border-bottom: 0; }
.slash-menu-item.active, .slash-menu-item:hover { background: #f3f4f6; }
.slash-menu-item-main { display: flex; align-items: center; gap: 8px; }
.slash-menu-icon { width: 18px; text-align: center; color: #2563eb; font-size: 16px; }
.slash-menu-title { font-size: 13px; color: #111827; }
.slash-menu-pin {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 2px 0;
}
.slash-menu-pin:hover { color: #f59e0b; }
.slash-menu-pin.active { color: #f59e0b; }
.slash-menu-desc {
  font-size: 11px;
  color: #6b7280;
  margin-top: 1px;
  margin-left: 26px;
}
.line-tools {
  position: absolute;
  left: 8px;
  top: 140px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(255,255,255,0.95);
  border: 1px solid #dbe4f2;
  border-radius: 10px;
  padding: 5px;
  box-shadow: 0 8px 18px rgba(15,23,42,0.12);
  z-index: 15;
}
.line-tool-btn {
  width: 26px;
  height: 26px;
  border: 1px solid #d6e0ee;
  border-radius: 7px;
  background: #fff;
  color: #334155;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}
.line-tool-btn:hover { background: #eef4ff; border-color: #bfd2f8; }
.doc-preview-title {
  border-bottom: 1px solid #e8edf5;
  padding: 8px 12px;
  font-size: 13px;
  color: #64748b;
  background: #fbfcff;
}
.doc-preview-box {
  flex: 1;
  overflow: auto;
  padding: 14px;
  line-height: 1.72;
}
.doc-preview-box h1, .doc-preview-box h2, .doc-preview-box h3 { margin: 14px 0 8px; }
.doc-preview-box p { margin: 8px 0; }
.doc-preview-box code { background: #f3f4f6; border-radius: 6px; padding: 1px 5px; }
.doc-preview-box pre { background: #0f172a; color: #e2e8f0; border-radius: 10px; padding: 10px; overflow: auto; }
.doc-preview-box blockquote { border-left: 3px solid #93c5fd; margin: 8px 0; padding: 4px 10px; color: #475569; background: #f8fbff; }

.manage-shell { height: 100vh; display: grid; grid-template-columns: 420px 1fr; gap: 14px; padding: 12px; }
.manage-shell.single-pane { grid-template-columns: 1fr; align-items: start; }
.manage-left, .manage-right { border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }

.manage-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #e8eef7; }
.manage-title { font-size: 20px; font-weight: 700; letter-spacing: 0.1px; }
.manage-subtitle { margin-top: 2px; font-size: 11px; color: #8a94a6; }
.project-quick-actions { display: flex; align-items: center; gap: 6px; }
.project-switch-btn { display: none; }

.project-tabs-wrap { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid #e8eef7; background: rgba(255,255,255,0.5); }
.project-tabs { display: flex; gap: 8px; overflow-x: auto; flex: 1; scrollbar-width: thin; }
.project-tab { border: 1px solid #d6e0ee; border-radius: 999px; background: #fff; color: #334155; font-size: 12px; padding: 6px 10px; white-space: nowrap; cursor: pointer; }
.project-tab.active { background: #eef2ff; border-color: #a5b4fc; color: #3730a3; }
.project-tab-pin { margin-right: 4px; color: #94a3b8; }
.project-tab-pin.clickable { color: #b45309; cursor: pointer; }
.project-tab-pin.pinned { color: #eab308; }
.project-tab.active .project-tab-pin.clickable { color: #b45309; }
.project-new-input { width: 128px; flex: 0 0 auto; }

.toolbar { padding: 10px 12px; border-bottom: 1px solid #e8eef7; background: rgba(255,255,255,0.55); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar-row { display: flex; gap: 8px; align-items: center; }
.inline-tools { padding: 0; border: 0; background: transparent; margin-left: auto; flex-wrap: nowrap; }
.input, .select {
  width: auto;
  border: 1px solid #d6e0ee;
  border-radius: 12px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  padding: 8px 10px;
  outline: none;
}
.toolbar .input { width: 200px; }
.toolbar .select { width: 108px; }
.input:focus, .select:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(59,130,246,0.12); }

.btn {
  border: 1px solid #d6e0ee;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font-size: 11px;
  padding: 7px 11px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(15,23,42,0.1); }
.btn-primary { background: linear-gradient(135deg, #3b82f6, #6366f1); border-color: transparent; color: #fff; }
.btn-warn { background: #fff5f5; border-color: #fecaca; color: #b91c1c; }

.doc-list-wrap { flex: 1; overflow: auto; }
.doc-list { min-height: 100%; }
.doc-item { padding: 10px 12px; border-bottom: 1px solid #edf2f8; border-left: 3px solid transparent; cursor: pointer; min-height: 58px; }
.doc-item:hover { background: #f7faff; }
.doc-item.active { background: #edf3ff; border-left-color: #4f46e5; box-shadow: inset 0 0 0 1px rgba(79,70,229,0.08); }
.doc-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.doc-item-title-wrap { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.doc-item-title { font-size: 13px; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 34vw; }
.doc-item-meta-inline { font-size: 11px; color: #7b8799; white-space: nowrap; }
.doc-item-actions { display: flex; gap: 8px; opacity: 0; visibility: hidden; transform: translateY(2px); transition: opacity .16s ease, transform .16s ease, visibility .16s; }
.doc-item:hover .doc-item-actions, .doc-item:focus-within .doc-item-actions, .doc-item.active .doc-item-actions { opacity: 1; visibility: visible; transform: translateY(0); }
.doc-action-btn { border: 1px solid #d6e0ee; border-radius: 9px; background: #fff; color: #334155; font-size: 12px; line-height: 1; padding: 7px 10px; min-height: 30px; cursor: pointer; }
.doc-action-btn.warn { border-color: #fecaca; color: #b91c1c; background: #fff5f5; }

.actions {
  padding: 10px 12px;
  border-top: 1px solid #e8eef7;
  border-bottom: 1px solid #e8eef7;
  display: flex;
  gap: 8px;
}
.footbar { margin-top: auto; border-top: 1px solid #e8eef7; padding: 10px 12px; display: flex; justify-content: flex-end; }
.footbar .btn { opacity: 0.85; }

.manage-right { padding: 14px; gap: 12px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; }
.panel-title { font-size: 16px; font-weight: 650; }
.status-pill { border: 1px solid #d6e0ee; border-radius: 999px; background: #fff; font-size: 12px; color: #475569; padding: 5px 10px; }

.selected-card { border: 1px solid #e7edf6; border-radius: 16px; background: #fff; padding: 14px; }
.selected-card.empty { background: linear-gradient(180deg, #ffffff, #f8fbff); }
.selected-name { font-size: 18px; font-weight: 650; color: #0f172a; }
.selected-meta { margin-top: 4px; font-size: 12px; color: #64748b; }

.section { border: 1px solid #e7edf6; border-radius: 16px; background: #fff; padding: 12px; }
.section-title { font-size: 13px; font-weight: 650; color: #334155; margin-bottom: 8px; }
.section-list { max-height: 220px; overflow: auto; }
.share-item { border: 1px solid #e7edf5; border-radius: 10px; padding: 8px; margin-bottom: 6px; background: #fff; }
.share-item-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.share-item-meta { display: block; color: #6b7280; font-size: 11px; margin-top: 3px; }
.share-item-actions { display: flex; gap: 6px; margin-left: auto; }
.share-btn { border: 1px solid #d9e2ee; border-radius: 8px; background: #fff; font-size: 11px; padding: 4px 8px; cursor: pointer; }
.share-btn.warn { border-color: #fecaca; color: #b91c1c; background: #fff5f5; }

.audit-filters { display: flex; gap: 6px; margin-bottom: 8px; }
.audit-item { border: 1px dashed #cfd8e6; border-radius: 10px; padding: 7px; background: #fff; margin-bottom: 6px; }
.audit-item-title { font-size: 11px; color: #111827; }
.audit-item-meta { display: block; color: #6b7280; font-size: 10px; margin-top: 2px; }

.msg { display: none; }
.overlay { position: fixed; inset: 0; background: rgba(17, 24, 39, 0.5); display: flex; align-items: center; justify-content: center; z-index: 50; }
.auth-card { width: 360px; background: #fff; border-radius: 12px; border: 1px solid #e5e7eb; padding: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.auth-card h2 { margin-top: 0; margin-bottom: 10px; }
.auth-card label { display: block; font-size: 13px; margin: 8px 0 6px; color: #4b5563; }
.auth-card input { width: 100%; padding: 10px; border: 1px solid #d1d5db; border-radius: 8px; }
.auth-card button { margin-top: 12px; width: 100%; border: 0; border-radius: 8px; padding: 10px 12px; background: #2563eb; color: #fff; cursor: pointer; }
.auth-msg { min-height: 18px; margin: 8px 0 0; font-size: 12px; color: #dc2626; }
.modal-card { width: min(860px, 92vw); max-height: 88vh; overflow: auto; background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; padding: 14px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.modal-head h3 { margin: 0; font-size: 18px; }
.modal-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 10px; }
.modal-form .field { display: flex; flex-direction: column; gap: 4px; min-width: 140px; }
.modal-form label { font-size: 12px; color: #64748b; }
.modal-form .compact { width: 160px; min-width: 160px; }
.modal-form .btn { margin-left: auto; }
.modal-section { border-top: 1px solid #eef2f7; padding-top: 10px; margin-top: 10px; }
.project-sheet-overlay { align-items: flex-end; }
.project-sheet { width: min(720px, 100vw); max-height: 78vh; overflow: auto; background: #fff; border-radius: 16px 16px 0 0; padding: 14px; }
.project-sheet .input { width: 100%; margin-bottom: 10px; }
.project-sheet-new-input { margin-bottom: 8px; }
.project-sheet-list { overflow: auto; }
.project-recent { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 10px; padding-bottom: 4px; }
.project-sheet-item { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.project-sheet-item .project-tab { flex: 1; margin: 0; text-align: left; }
.project-sheet-pin { min-width: 34px; border: 1px solid #d6e0ee; border-radius: 999px; background: #fff; color: #94a3b8; cursor: pointer; padding: 6px 8px; line-height: 1; }
.project-sheet-pin.pinned { color: #eab308; border-color: #fcd34d; background: #fffbeb; }

@media (max-width: 1100px) {
  .lark-canvas-wrap { padding: 14px; }
  .lark-doc-title { font-size: 42px; }
  .lark-editor-hint { font-size: 24px; }
  .doc-main { height: auto; min-height: calc(100vh - 64px); padding: 10px; }
  .doc-editor-pane { min-height: calc(100vh - 94px); }
  .manage-shell { grid-template-columns: 1fr; height: auto; min-height: 100vh; }
  .manage-right { order: -1; }
  .manage-title-row { flex-wrap: wrap; align-items: flex-start; }
  .inline-tools { width: 100%; margin-left: 0; flex-wrap: wrap; gap: 8px; }
  .project-tabs-wrap { display: none; }
  .project-switch-btn { display: inline-flex; }
  .project-quick-actions { width: 100%; }
  .toolbar { display: flex; }
  .toolbar .input { width: 180px; }
  .toolbar .select { width: 108px; flex: 0 0 auto; }
  .modal-form .compact { width: 100%; min-width: 0; }
  .modal-form .field { width: 100%; }
  .modal-form .btn { margin-left: 0; width: 100%; }
}

@media (max-width: 760px) {
  .lark-topbar { height: auto; flex-wrap: wrap; gap: 8px; padding: 8px; }
  .lark-top-right { width: 100%; justify-content: flex-end; flex-wrap: wrap; }
  .lark-canvas-wrap { padding: 10px; }
  .lark-doc-title { font-size: 36px; }
  .lark-editor-hint { font-size: 20px; margin-top: 16px; }
  .lark-doc-editor { font-size: 17px; }
  .doc-topbar {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px;
  }
  .doc-top-center { justify-content: stretch; }
  .doc-title-input { width: 100%; }
  .doc-top-left, .doc-top-right { justify-content: space-between; }
  .doc-main { padding: 8px; gap: 8px; }
  .doc-toolbar-select { width: 92px; }
  .doc-tool-btn { padding: 6px 8px; }
  .line-tools { left: 6px; }
  .manage-shell { padding: 8px; gap: 8px; }
  .manage-left { border-radius: 12px; }
  .doc-list-wrap { flex: 0 0 auto; overflow: visible; }
  .doc-list { min-height: 0; }
  .manage-title-row { padding: 10px 10px; }
  .manage-title { font-size: 18px; }
  .inline-tools { gap: 6px; }
  .toolbar .input { width: calc(100vw - 36px); max-width: 100%; min-width: 0; }
  .toolbar .select { width: calc(50vw - 22px); min-width: 120px; }
  .inline-tools .btn { flex: 1 1 calc(50% - 6px); text-align: center; }
  .project-switch-btn { width: 100%; justify-content: center; }
  .doc-item-title { max-width: 52vw; }
  .doc-item-actions { gap: 6px; }
  .doc-action-btn { padding: 6px 8px; min-height: 28px; font-size: 11px; }
}
