/* Mesper Docs: visual refinement of the existing workspace and editor. */
.docs-app-shell .docs-topbar {
  min-height: 60px;
  padding: 9px 24px !important;
  gap: 16px !important;
  position: relative;
  z-index: 50;
}
.docs-app-shell .docs-header-identity,
.docs-app-shell .docs-header-tools { min-width: 0; }
.docs-app-shell .docs-header-tools { gap: 10px !important; }
.docs-app-shell .docs-sidebar-toggle {
  width: 34px !important;
  height: 34px !important;
  border-color: var(--line) !important;
  color: var(--ink-3) !important;
  border-radius: 6px !important;
}
.docs-app-shell .docs-global-search {
  width: clamp(150px, 18vw, 250px) !important;
  max-width: 250px !important;
  border-color: var(--line) !important;
  background: var(--surface-2) !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  min-height: 34px;
}
.docs-app-shell .docs-main {
  padding: 24px 24px 48px !important;
  background: var(--paper);
  scroll-padding-top: 24px;
}
.docs-app-shell .docs-sidebar {
  width: 224px !important;
  max-width: calc(100vw - 64px);
  background: var(--surface-2) !important;
  padding: 20px 12px 32px !important;
  gap: 6px !important;
  min-height: 0;
  overflow: hidden !important;
}
.docs-sidebar-scroll { display: flex; flex-direction: column; gap: 6px; scrollbar-gutter: stable; }
.docs-app-shell .docs-sidebar-nav {
  display: grid;
  gap: 4px;
  padding-bottom: 14px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.docs-app-shell .docs-sidebar-home {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 7px 10px;
  color: var(--ink-3);
  background: transparent;
  border: 0;
  border-radius: 6px;
  text-align: left;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
}
.docs-app-shell .docs-sidebar-home:hover,
.docs-app-shell .doc-treerow:hover { background: var(--paper-2); }
.docs-app-shell .doc-treerow.is-active { background: var(--accent-soft); }
.docs-app-shell .doc-treerow.is-active > button {
  background: transparent !important;
  box-shadow: none !important;
  color: var(--accent-ink) !important;
}
.docs-app-shell .doc-treerow {
  border-radius: 6px !important;
  min-height: 32px;
}
.docs-app-shell .doc-treerow button {
  font-size: 12px !important;
  line-height: 1.45;
}
.docs-app-shell .doc-treeadd:focus-visible,
.docs-app-shell .doc-treerow:focus-within .doc-treeadd { opacity: 1 !important; }
.docs-app-shell .docs-page-view,
.docs-app-shell .docs-editor-view {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  min-width: 0;
}
.docs-app-shell .docs-page-chrome {
  align-items: flex-start !important;
  gap: 12px !important;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px !important;
}
.docs-app-shell .docs-breadcrumb {
  flex: 1 1 100% !important;
  gap: 5px !important;
  font-size: 11px !important;
  overflow-wrap: anywhere;
}
.docs-app-shell .docs-page-actions {
  flex: 1 1 100% !important;
  flex-wrap: wrap;
  gap: 8px !important;
}
.docs-app-shell .docs-page-updated { margin-right: auto; font-size: 11px !important; }
.docs-app-shell .docs-document-heading { align-items: center !important; gap: 10px !important; }
.docs-app-shell .docs-document-heading h1,
.docs-app-shell .docs-editor-heading > input {
  font-size: 26px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
  min-width: 0;
}
.docs-app-shell .docs-document-heading > span { color: var(--ink-3); display: flex; align-items: center; }
.docs-app-shell .docs-document-byline { margin: 10px 0 20px !important; }
.docs-app-shell .docs-document-byline > span { font-size: 11px !important; }
.docs-app-shell .docs-document-content { min-width: 0; }
.docs-app-shell .doc-body { padding: 0 !important; border: 0 !important; }
.docs-app-shell .doc-rt {
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink);
}
.docs-app-shell .doc-rt h2 { font-size: 18px; line-height: 1.45; font-weight: 600; margin-top: 26px; }
.docs-app-shell .doc-rt h3 { font-size: 15px; line-height: 1.45; font-weight: 600; }
.docs-app-shell .doc-rt h4,
.docs-app-shell .doc-rt h5 { font-weight: 600; line-height: 1.4; }
.docs-app-shell .doc-rt table { font-size: 12px; }
.docs-app-shell .doc-rt th { background: var(--surface-2); color: var(--ink); }
.docs-app-shell .doc-rt th,
.docs-app-shell .doc-rt td { padding: 10px 12px; }
.docs-app-shell .doc-rt blockquote {
  border-left-width: 1px;
  padding: 12px 16px;
  border-radius: 6px;
}
.docs-app-shell .doc-tasks li { gap: 10px; margin: 8px 0; }
.docs-app-shell .doc-date { border-radius: 5px; background: var(--surface-2); }
.docs-app-shell .docs-page-comments { padding-top: 24px !important; margin-top: 32px !important; }
.docs-app-shell .docs-page-comments > h2 { font-size: 17px !important; font-weight: 600; }
.docs-app-shell .docs-editor-actions { flex-wrap: wrap; gap: 8px !important; min-width: 0; }
.docs-app-shell .docs-editor-actions > span { font-size: 11px !important; }
.docs-app-shell .docs-editor-heading { padding-top: 6px; }
.docs-app-shell .docs-editor-toolbar { border-radius: 6px !important; gap: 2px !important; }
.docs-app-shell .docs-editor-toolbar .fmt-btn { min-width: 30px; min-height: 30px; border-radius: 5px; }
.docs-app-shell .doc-editor { border-radius: 8px !important; padding: 18px !important; }
.docs-app-shell .docs-editor-chrome { padding-top: 10px; }
.docs-app-shell .docs-versions-panel { border-radius: 8px !important; padding: 16px !important; }
.docs-app-shell .docs-home-view,
.docs-app-shell .docs-library-view,
.docs-app-shell .docs-folder-view { min-width: 0; }
.docs-app-shell .docs-home-view > div:first-child { margin-bottom: 28px !important; }
.docs-app-shell .docs-home-view h1,
.docs-app-shell .docs-library-heading h1,
.docs-app-shell .docs-folder-view h1 { font-size: 26px !important; font-weight: 600; line-height: 1.3; }
.docs-app-shell .docs-library-actions { flex-wrap: wrap; }
.docs-app-shell .docs-space-card,
.docs-app-shell .docs-folder-card {
  border-radius: 10px !important;
  box-shadow: none !important;
  padding: 18px !important;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.docs-app-shell .docs-space-card:hover,
.docs-app-shell .docs-folder-card:hover { border-color: var(--accent) !important; box-shadow: var(--sh-sm) !important; }
.docs-app-shell .docs-document-row { border-radius: 6px; }
.docs-app-shell .docs-document-row:hover { background: var(--accent-soft) !important; }
.docs-app-shell .doc-review-live {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  margin: 24px 0;
}
.docs-app-shell .doc-review-eyebrow {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}
.docs-app-shell .doc-review-items { gap: 12px; }
.docs-app-shell .doc-review-item { padding: 16px; box-shadow: none; }
.docs-app-shell .doc-review-item-guest { background: var(--surface); border-color: var(--line); box-shadow: none; }
.docs-app-shell .doc-review-item-head { align-items: flex-start; flex-wrap: wrap; }
.docs-app-shell .doc-review-actions { flex-wrap: wrap; margin-left: auto; }
.docs-app-shell .doc-review-number { min-width: 16px; font-weight: 600; }
.docs-app-shell .doc-review-pill { border-radius: 5px; font-weight: 500; padding: 4px 8px; }
.docs-app-shell .doc-review-pill-open { background: var(--surface-2); color: var(--ink-3); }
.docs-app-shell .doc-review-pill-approved { background: #EAF5EF; color: #236A4E; }
.docs-app-shell .doc-review-pill-rework { background: #FFF4DF; color: #855713; }
.docs-app-shell .doc-review-status-btn { min-height: 32px; font-size: 11px; font-weight: 500; padding: 5px 9px; }
.docs-app-shell .doc-review-status-btn.is-active { border-color: var(--line-2); background: var(--surface); color: var(--ink); font-weight: 600; }
.docs-app-shell .doc-review-title,
.docs-app-shell .doc-review-title-input { font-size: 14px; line-height: 1.45; font-weight: 600; }
.docs-app-shell .doc-review-title-input,
.docs-app-shell .doc-review-description-input { border-color: transparent; padding-left: 0; padding-right: 0; }
.docs-app-shell .doc-review-title-input:hover,
.docs-app-shell .doc-review-description-input:hover { border-color: var(--line); padding-left: 8px; padding-right: 8px; }
.docs-app-shell .doc-review-title-input:focus,
.docs-app-shell .doc-review-description-input:focus { border-color: var(--accent); padding-left: 8px; padding-right: 8px; }
.docs-app-shell .doc-review-description,
.docs-app-shell .doc-review-description-input { font-size: 12px; line-height: 1.6; color: var(--ink-3); }
.docs-app-shell .doc-review-comments { margin-top: 16px; padding-top: 16px; gap: 10px; }
.docs-app-shell .doc-review-comment { border-radius: 7px; padding: 12px; }
.docs-app-shell .doc-review-comment-head { flex-wrap: wrap; gap: 6px; }
.docs-app-shell .doc-review-comment-body { line-height: 1.6; }
.docs-app-shell .doc-review-source { border-radius: 5px; color: #855713; background: #FFF4DF; font-weight: 500; }
.docs-app-shell .doc-review-add { border-radius: 6px; font-weight: 600; }
.docs-access-hint { margin: 0 0 14px; font-size: 12px; line-height: 1.6; color: var(--ink-3); }

@media (max-width: 1100px) {
  .docs-app-shell .docs-topbar { padding-left: 16px !important; padding-right: 16px !important; gap: 10px !important; }
  .docs-app-shell .docs-header-tools { gap: 8px !important; }
  .docs-app-shell .docs-page-actions { gap: 6px !important; }
}
@media (max-width: 820px) {
  .docs-app-shell .docs-topbar { padding: 8px 16px !important; min-height: 56px; flex-wrap: wrap; }
  .docs-app-shell .docs-header-identity { gap: 8px !important; }
  .docs-app-shell .docs-header-tools { margin-left: auto; }
  .docs-app-shell .docs-main { padding: 16px 16px 32px !important; }
  .docs-app-shell .docs-sidebar { padding-top: 12px !important; width: min(280px, calc(100vw - 64px)) !important; }
  .docs-app-shell .docs-page-view,
  .docs-app-shell .docs-editor-view { padding: 16px; border-radius: 10px; }
  .docs-app-shell .docs-page-chrome { gap: 10px !important; margin-bottom: 20px !important; }
  .docs-app-shell .docs-page-updated { flex: 1 1 100%; }
  .docs-app-shell .docs-page-actions { flex-wrap: wrap; }
  .docs-app-shell .docs-document-heading h1,
  .docs-app-shell .docs-editor-heading > input { font-size: 22px !important; }
  .docs-app-shell .doc-review-live { padding: 12px; margin: 20px 0; }
  .docs-app-shell .doc-review-item { padding: 14px; }
  .docs-app-shell .doc-review-head { flex-wrap: wrap; }
  .docs-app-shell .doc-review-status-btn { min-height: 40px; }
  .docs-app-shell .doc-review-comment-toggle { min-height: 36px; }
  .docs-app-shell .doc-treeadd { opacity: 1 !important; }
  .docs-app-shell .doc-rt { font-size: 13px; }
  .docs-app-shell .doc-rt th,
  .docs-app-shell .doc-rt td { padding: 8px; }
  .docs-app-shell .docs-editor-toolbar .fmt-btn { min-width: 34px; min-height: 34px; }
  .docs-app-shell .doc-editor { padding: 12px !important; }
  .docs-app-shell .docs-editor-actions { gap: 6px !important; }
  .docs-app-shell .docs-editor-actions > span { max-width: 100%; }
}
@media (max-width: 480px) {
  .docs-app-shell .docs-topbar { padding-left: 12px !important; padding-right: 12px !important; }
  .docs-app-shell .docs-header-tools .lang-toggle button { padding: 6px 8px !important; }
  .docs-app-shell .docs-main { padding-left: 12px !important; padding-right: 12px !important; }
  .docs-app-shell .docs-page-view,
  .docs-app-shell .docs-editor-view { padding: 14px; }
}
@media print {
  .docs-app-shell .docs-page-view,
  .docs-app-shell .docs-editor-view { padding: 0; border: 0; border-radius: 0; }
  .docs-app-shell .docs-main { background: #fff !important; padding: 0 !important; }
}
