/* ===========================================================
   UniConecta Docs — product surfaces
   Browser, editor and rich-text. Chrome lives in styles.css.
   =========================================================== */

.doc-workspace {
  display: grid;
  grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}
.doc-workspace--flat {
  grid-template-columns: 1fr;
}
.doc-tree {
  position: sticky;
  top: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.65rem 0.45rem;
  max-height: calc(100dvh - 8rem);
  overflow: auto;
}
.doc-tree__label {
  margin: 0.7rem 0.55rem 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.doc-tree__empty {
  margin: 0.25rem 0.55rem 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.doc-tree__item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  padding: 0.4rem 0.45rem;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 550;
  text-align: left;
  text-decoration: none;
  box-sizing: border-box;
}
.doc-tree__item .material-icons {
  font-size: 1.1rem;
  color: #f59e0b;
}
.doc-tree__item:hover {
  background: #f8fafc;
}
.doc-tree__item.is-active {
  background: var(--nav-active);
  color: var(--brand-dark);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--brand-primary);
}
.doc-tree__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.doc-tree__twist,
.doc-tree__twist-spacer {
  width: 1.1rem;
  display: inline-flex;
  justify-content: center;
}
.doc-tree__twist .material-icons {
  font-size: 1rem;
  color: var(--text-muted);
}
.doc-browser {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}
.doc-browser__heading {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--brand-dark);
}
.doc-browser__sort select {
  height: 2.4rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: var(--surface);
  padding: 0 0.85rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}
.doc-browser__breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.doc-browser__crumb {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.15rem 0.3rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
}
.doc-browser__crumb:hover:not(:disabled) {
  color: var(--brand-primary);
  background: #f1f5f9;
}
.doc-browser__crumb:disabled {
  color: var(--brand-dark);
  cursor: default;
  font-weight: 700;
}
.doc-browser__crumb-sep {
  opacity: 0.45;
  margin: 0 0.1rem;
}
.doc-browser__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.doc-browser__search {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1;
  min-width: 12rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: var(--surface);
}
.doc-browser__search .material-icons {
  color: var(--text-muted);
  font-size: 1.15rem;
}
.doc-browser__search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  outline: none;
  font: inherit;
  font-size: 0.9rem;
}
.doc-browser__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.doc-browser__error {
  color: #b91c1c;
  font-size: 0.875rem;
}
.doc-browser__loading {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.doc-browser__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.doc-browser__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}
.doc-browser__row:last-child {
  border-bottom: 0;
}
.doc-browser__row:hover {
  background: #f8fafc;
}
.doc-browser__row-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  font: inherit;
  font-weight: 500;
  flex: 1;
  min-width: 0;
  text-align: left;
}
.doc-browser__row-link .material-icons {
  color: var(--brand-light);
  flex-shrink: 0;
}
.doc-browser__row--folder .doc-browser__row-link > .material-icons:first-child {
  color: #f59e0b;
}
.doc-browser__row-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.doc-browser__row-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.doc-browser__row-chevron {
  color: #cbd5e1 !important;
  font-size: 1.15rem !important;
}
.doc-row-menu {
  position: relative;
  flex-shrink: 0;
}
.doc-row-menu__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 9999px;
  background: none;
  color: var(--text-muted);
}
.doc-row-menu__btn:hover,
.doc-row-menu__btn[aria-expanded="true"] {
  background: #e2e8f0;
  color: var(--brand-dark);
}
.doc-row-menu__list {
  position: absolute;
  top: calc(100% + 0.25rem);
  right: 0;
  z-index: 8;
  min-width: 10rem;
  padding: 0.35rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}
.doc-row-menu__list button {
  display: block;
  width: 100%;
  padding: 0.45rem 0.65rem;
  border: 0;
  border-radius: 6px;
  background: none;
  text-align: left;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}
.doc-row-menu__list button:hover {
  background: #f1f5f9;
}
.doc-row-menu__list button.is-danger {
  color: #dc2626;
}
.app-modal--wide {
  width: min(100%, 36rem);
}
.doc-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 18rem;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.doc-history-list__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--border);
}
.doc-history-list__row:last-child {
  border-bottom: 0;
}
.doc-history-list__row p {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.empty-state--card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.6rem 1.5rem;
}
.empty-state__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
}
.doc-skeleton {
  height: 3.1rem;
  margin: 0.15rem 0.75rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeleton-sweep 1.4s ease infinite;
}
@keyframes skeleton-sweep {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.app-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgb(15 23 42 / 0.5);
  backdrop-filter: blur(2px);
}
.app-modal-backdrop--confirm {
  z-index: 90;
}
.app-modal {
  width: min(100%, 28rem);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 64px rgb(15 23 42 / 0.22), 0 2px 10px rgb(15 23 42 / 0.08);
}
.app-modal-confirm-head {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
}
.app-modal-confirm-icon {
  display: inline-grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: 8px;
  background: rgb(0 43 73 / 0.08);
  color: var(--brand-dark);
  font-size: 1.2rem !important;
}
.app-modal--confirm-danger .app-modal-confirm-icon {
  background: #fef2f2;
  color: #dc2626;
}
.app-modal-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand-dark);
  line-height: 1.3;
}
.app-modal-message {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.app-modal-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.app-modal-field-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
}
.app-modal-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font: inherit;
  font-size: 0.92rem;
}
.app-modal-input:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(0, 191, 154, 0.15);
}
.app-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
@media (max-width: 480px) {
  .app-modal-actions,
  .empty-state__actions {
    flex-direction: column-reverse;
  }
  .app-modal-actions .btn,
  .empty-state__actions .btn {
    width: 100%;
    justify-content: center;
  }
}

.doc-page {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - var(--header-offset));
  background: #fff;
}
.doc-chrome {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 3rem;
  padding: 0.35rem 0.85rem;
  border-bottom: 1px solid var(--border);
  background: rgb(255 255 255 / 0.96);
  backdrop-filter: blur(10px);
}
.doc-chrome__back {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.25rem 0.35rem;
  border-radius: 8px;
}
.doc-chrome__back .material-icons {
  font-size: 1.1rem;
}
.doc-chrome__back:hover {
  color: var(--brand-dark);
  background: #f1f5f9;
}
.doc-chrome__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.15rem;
}
.doc-chrome__icon {
  position: relative;
  width: 2.15rem;
  height: 2.15rem;
  border: 0;
  border-radius: 8px;
  background: none;
  color: #475569;
}
.doc-chrome__icon:hover,
.doc-chrome__icon.is-active {
  background: #f1f5f9;
  color: var(--brand-dark);
}
.doc-chrome__icon.is-active .material-icons {
  color: #0f766e;
}
.doc-chrome__icon .material-icons {
  font-size: 1.2rem;
}
.doc-chrome__badge {
  position: absolute;
  top: 0.15rem;
  right: 0.1rem;
  min-width: 0.95rem;
  height: 0.95rem;
  padding: 0 0.2rem;
  border-radius: 9999px;
  background: var(--brand-primary);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.doc-chrome__more {
  position: relative;
}
.doc-chrome__menu {
  right: 0;
  left: auto;
  min-width: 12rem;
}
.doc-chrome__save {
  margin-left: 0.35rem;
  height: 2.15rem;
  padding: 0 0.9rem;
}
.doc-page__workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  flex: 1;
  min-height: 0;
}
.doc-page--comments .doc-page__workspace {
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 22rem);
}
.doc-page__canvas {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}
.doc-page__canvas:has(.doc-toc) {
  grid-template-columns: 12rem minmax(0, 1fr);
}
.doc-page__sheet {
  background: #fff;
  min-width: 0;
}
.doc-page__head {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.1rem 1.5rem 0.35rem;
}
.doc-page__title {
  width: 100%;
  border: 0;
  background: none;
  font-size: clamp(1.85rem, 3.2vw, 2.55rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.12;
  color: var(--brand-dark);
  padding: 0;
}
.doc-page__title:focus {
  outline: none;
}
.doc-page__title::placeholder {
  color: #94a3b8;
}
.doc-editor__save-state {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.rich-editor {
  background: var(--surface);
}
.rich-editor--disabled {
  opacity: 0.78;
}
.rich-editor__toolbar {
  position: sticky;
  top: 3rem;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem;
  padding: 0.3rem 0.85rem;
  border-bottom: 1px solid var(--border);
  background: rgb(255 255 255 / 0.96);
  backdrop-filter: blur(8px);
}
.rich-editor__group {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0;
  border-radius: 0;
  background: none;
  border: 0;
  border-right: 1px solid #eef2f6;
  padding-right: 0.25rem;
  margin-right: 0.25rem;
}
.rich-editor__group:last-child {
  border-right: 0;
  margin-right: 0;
  padding-right: 0;
}
.rich-editor__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.05rem;
  height: 2.05rem;
  border: none;
  background: none;
  border-radius: 8px;
  cursor: pointer;
  color: #334155;
}
.rich-editor__button .material-icons {
  font-size: 1.15rem;
}
.rich-editor__button:hover:not(:disabled) {
  background: #eef2f7;
  color: var(--brand-dark);
}
.rich-editor__button--active {
  background: color-mix(in srgb, var(--brand-primary) 16%, #fff);
  color: #0f766e;
}
.rich-editor__button:disabled {
  opacity: 0.35;
  cursor: default;
}
.rich-editor__select {
  height: 2.05rem;
  border: 0;
  background: transparent;
  padding: 0 0.55rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand-dark);
}
.rich-editor__surface {
  padding: 0.85rem 1.5rem 3rem;
}
.rich-editor__content {
  min-height: max(calc(var(--rich-editor-min-lines, 16) * 1.55em), calc(100dvh - 16rem));
  outline: none;
  color: #1e293b;
  font-size: 1.08rem;
  line-height: 1.7;
}
.rich-editor__content > * + * {
  margin-top: 0.85em;
}
.rich-editor__content h1,
.rich-editor__content h2,
.rich-editor__content h3 {
  color: var(--brand-dark);
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin-top: 1.4em;
}
.rich-editor__content h1 {
  font-size: 1.85rem;
  font-weight: 800;
}
.rich-editor__content h2 {
  font-size: 1.4rem;
  font-weight: 750;
}
.rich-editor__content h3 {
  font-size: 1.15rem;
  font-weight: 700;
}
.rich-editor__content ul,
.rich-editor__content ol {
  padding-left: 1.35rem;
}
.rich-editor__content li + li {
  margin-top: 0.25rem;
}
.rich-editor__content blockquote {
  margin: 0;
  padding: 0.15rem 0 0.15rem 1rem;
  border-left: 3px solid var(--brand-primary);
  color: #475569;
  font-style: italic;
}
.rich-editor__content a {
  color: #0e7490;
  font-weight: 600;
}
.rich-editor__content hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1.4rem 0;
}
.rich-editor__content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: #f1f5f9;
  border-radius: 5px;
  padding: 0.1em 0.35em;
}
.rich-editor__content pre {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 12px;
  padding: 0.95rem 1.1rem;
  overflow-x: auto;
}
.rich-editor__content pre code {
  background: none;
  color: inherit;
  padding: 0;
}
.rich-editor__content img:not(.ProseMirror-separator) {
  max-width: 100%;
  border-radius: 10px;
  margin: 0.4rem 0;
}
.rich-editor__content mark {
  background: #fef08a;
  border-radius: 3px;
  padding: 0 0.15em;
}
.rich-editor__content ul[data-type="taskList"] {
  list-style: none;
  padding-left: 0;
}
.rich-editor__content ul[data-type="taskList"] li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}
.rich-editor__content ul[data-type="taskList"] input {
  margin-top: 0.4rem;
  accent-color: var(--brand-primary);
}
.rich-editor__content table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.95rem;
}
.rich-editor__content th,
.rich-editor__content td {
  border: 1px solid #dbe3ee;
  padding: 0.55rem 0.7rem;
  vertical-align: top;
}
.rich-editor__content th {
  background: #f8fafc;
  font-weight: 700;
  color: var(--brand-dark);
}
.rich-editor__content .selectedCell {
  background: color-mix(in srgb, var(--brand-light) 12%, #fff);
}
.rich-editor__content p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  float: left;
  color: rgb(100 116 139 / 0.55);
  pointer-events: none;
  height: 0;
}
.rich-editor__footer {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 1.5rem 0.7rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .doc-workspace {
    grid-template-columns: 1fr;
  }
  .doc-tree {
    position: static;
    max-height: 14rem;
  }
  .doc-page__head,
  .rich-editor__surface {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }
  .doc-page__title {
    font-size: 1.55rem;
  }
  .doc-page--comments .doc-page__workspace,
  .doc-page__canvas:has(.doc-toc) {
    grid-template-columns: 1fr;
  }
  .doc-comments {
    border-left: 0;
    border-top: 1px solid var(--border);
    max-height: 22rem;
  }
  .doc-browser__toolbar,
  .doc-browser__actions {
    width: 100%;
  }
  .doc-browser__actions .btn {
    flex: 1;
    justify-content: center;
  }
}

.doc-toc {
  position: sticky;
  top: 6.4rem;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 1.1rem 0.6rem 1rem 0.85rem;
  background: transparent;
}
.doc-toc p {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.doc-toc__item {
  border: 0;
  background: none;
  text-align: left;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  padding: 0.25rem 0.2rem;
  border-radius: 6px;
}
.doc-toc__item--h2 { padding-left: 0.7rem; }
.doc-toc__item--h3 { padding-left: 1.2rem; }
.doc-toc__item:hover { background: #f1f5f9; }
.doc-page__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.doc-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--chip, #0d9488) 35%, #fff);
  background: color-mix(in srgb, var(--chip, #0d9488) 12%, #fff);
  color: #0f766e;
  border-radius: 9999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
}
.doc-chip.is-active {
  background: var(--chip, #0d9488);
  color: #fff;
  border-color: transparent;
}
.btn.is-starred {
  color: #b45309;
}
.doc-comments {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-height: 0;
  padding: 0.85rem 0.9rem 1rem;
  background: #f8fafc;
  border-left: 1px solid var(--border);
}
.doc-comments__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}
.doc-comments h2 {
  margin: 0;
  font-size: 0.92rem;
  color: var(--brand-dark);
}
.doc-comments__head span {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 700;
}
.doc-comments__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow: auto;
  flex: 1;
  min-height: 0;
}
.doc-comments__item {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.doc-comments__item strong { margin-right: 0.5rem; }
.doc-comments__item span,
.doc-comments__empty {
  color: var(--text-muted);
  font-size: 0.78rem;
}
.doc-comments__item p { margin: 0.35rem 0 0; }
.doc-comments__remove {
  border: 0;
  background: none;
  color: #dc2626;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0;
  margin-top: 0.35rem;
}
.doc-comments__compose textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  font: inherit;
  font-size: 0.88rem;
  resize: vertical;
  background: #fff;
}
.doc-comments .btn {
  align-self: flex-start;
}
.doc-comments__mentions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.doc-bell { position: relative; }
.doc-bell__btn {
  position: relative;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 9999px;
  background: none;
  color: #fff;
}
.doc-bell__dot {
  position: absolute;
  top: 0.15rem;
  right: 0.15rem;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.25rem;
  border-radius: 9999px;
  background: #f43f5e;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.doc-bell__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  width: min(22rem, 80vw);
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 0.75rem;
  z-index: 40;
}
.doc-bell__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.doc-bell__head button {
  border: 0;
  background: none;
  color: var(--brand-primary);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
}
.doc-bell__panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 16rem;
  overflow: auto;
}
.doc-bell__panel li {
  padding: 0.45rem 0.2rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
}
.doc-bell__panel li.is-unread { font-weight: 700; }
.doc-bell__panel a { color: inherit; text-decoration: none; }
.share-page {
  min-height: 100vh;
  background: #f8fafc;
  padding: 1.25rem 1rem 3rem;
}
.share-page__bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  max-width: 58rem;
  margin: 0 auto 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.share-page__sheet {
  max-width: 58rem;
  margin: 0 auto;
}
.share-page__card {
  max-width: 28rem;
  margin: 15vh auto 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
}

@media print {
  .app-top-header,
  .app-sidebar,
  .app-nav-backdrop,
  .mobile-tabbar,
  .view-head,
  .crumbs,
  .doc-chrome,
  .doc-page__actions,
  .doc-page__meta,
  .doc-toc,
  .doc-comments,
  .rich-editor__toolbar,
  .rich-editor__footer,
  .doc-bell {
    display: none !important;
  }
  .app-shell,
  .app-below-header,
  .app-main-wrap,
  .view,
  .doc-page,
  .doc-page__sheet {
    display: block !important;
    box-shadow: none !important;
    border: 0 !important;
  }
}
