html,
body {
  height: 100%;
  overflow: hidden;
}



body {
  margin: 0;
  font-family: 'Rubik', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--color-bg, #f5f6f7);
  color: var(--color-text, #111827);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  --hover-weak: color-mix(in srgb, var(--color-primary, #0071e3) 12%, transparent);
  --hover-strong: color-mix(in srgb, var(--color-primary, #0071e3) 18%, #ffffff);
}

a { color: var(--color-primary, #0071e3); text-decoration: none; }
a:hover { text-decoration: underline; }

.app-shell {
  display: flex;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* Sidebar hellgrau */
.sidebar {
  width: 240px;
  background: var(--color-sidebar, #f3f4f6);
  color: var(--color-text, #111827);
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 8px 0;
  border-right: 1px solid #e5e7eb;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 12px;
  font-weight: 600;
  font-size: 18px;
}
.sidebar-logo-img {
  max-height: 28px;
  object-fit: contain;
}
.sidebar-toggle {
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 8px;
  padding: 4px 6px;
  cursor: pointer;
  margin-left: auto;
  min-width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sidebar-org-switcher {
  padding: 0 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-org-switcher-label {
  margin: 0;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #6b7280;
}
.sidebar-org-switcher select {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 13px;
  background: #ffffff;
}

.logo-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(135deg,#6366f1,#ec4899);
}

.sidebar-section-label {
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #6b7280;
  padding: 8px 16px 4px;
}

.sidebar-nav {
  padding: 4px 0;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  color: #111827;
  text-decoration: none;
  font-size: 14px;
  border-radius: 6px;
  margin: 0 8px 2px;
}
.sidebar-nav a:hover {
  background: var(--hover-weak);
}
.sidebar-nav i.sidebar-icon {
  font-size: 14px;
  width: 16px;
  text-align: center;
}
.sidebar-wiki-tree {
  margin: 4px 8px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffffb8;
  max-height: 36vh;
  overflow: auto;
  padding: 6px 4px;
}
.sidebar-wiki-tree-inline {
  margin: 4px 0 6px 22px;
  border: none;
  border-radius: 0;
  background: transparent;
  max-height: none;
  overflow: visible;
  padding: 0;
}
.sidebar-wiki-level {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar-wiki-level[data-wiki-parent="0"] {
  padding-left: 0;
}
.sidebar-wiki-level .sidebar-wiki-level {
  margin-left: 28px;
}
.sidebar-wiki-node {
  margin: 1px 0;
  border-radius: 6px;
}
.sidebar-wiki-node-row {
  display: flex;
  align-items: center;
  gap: 3px;
}
.sidebar-wiki-node.is-drop-over {
  outline: 2px dashed #0ea5e9;
  outline-offset: 1px;
  background: #e0f2fe;
}
.sidebar-wiki-node.is-dragging {
  opacity: 0.5;
}
.sidebar-wiki-link {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  padding: 2px 6px;
  border-radius: 6px;
  color: #111827;
  text-decoration: none;
  font-size: 13px;
  min-height: 22px;
}
.sidebar-wiki-link:hover {
  background: var(--hover-weak);
  text-decoration: none;
}
.sidebar-wiki-node.is-active > .sidebar-wiki-node-row .sidebar-wiki-link,
.sidebar-wiki-node.is-active > .sidebar-wiki-branch > .sidebar-wiki-node-row .sidebar-wiki-link {
  background: color-mix(in srgb, var(--color-primary, #0071e3) 14%, #ffffff);
  color: #111827;
  font-weight: 600;
}

.sidebar-footer {
  padding: 12px 16px 8px;
  border-top: 1px solid #e5e7eb;
  font-size: 13px;
  margin-top: auto;
}
.sidebar-footer a {
  display: block;
  color: #4b5563;
  text-decoration: none;
}
.sidebar-footer a:hover {
  color: #111827;
}

.sidebar-org-label {
  font-size: 11px;
  text-transform: uppercase;
  color: #9ca3af;
}
.sidebar-org-name {
  font-weight: 600;
}

/* Main */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--color-surface, #fafafa);
}

body.sidebar-collapsed .sidebar {
  width: 64px;
}
body.sidebar-collapsed .sidebar-logo span,
body.sidebar-collapsed .sidebar-logo img {
  display: none;
}
body.sidebar-collapsed .sidebar-nav a span,
body.sidebar-collapsed .sidebar-section-label,
body.sidebar-collapsed .sidebar-search,
body.sidebar-collapsed .sidebar-footer,
body.sidebar-collapsed .sidebar-org-switcher,
body.sidebar-collapsed .sidebar-workspace-children,
body.sidebar-collapsed .sidebar-sub-link span {
  display: none;
}
body.sidebar-collapsed .sidebar-nav a {
  justify-content: center;
}
body.sidebar-collapsed .sidebar-workspace summary span {
  display: none;
}
body.sidebar-collapsed .main {
  margin-left: 0;
}

/* Topbar */
.topbar {
  height: 48px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.topbar-title {
  font-weight: 500;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-org-switcher {
  display: inline-flex;
  align-items: center;
}
.topbar-org-switcher select {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 13px;
  background: #ffffff;
  max-width: 220px;
}
.topbar-org-switcher select:disabled {
  opacity: 0.9;
  color: #475569;
}
.topbar-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 6px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #ffffff;
}
.topbar-search input[type="search"] {
  border: none;
  outline: none;
  font-size: 13px;
  padding: 4px 6px;
  min-width: 160px;
  font-family: inherit;
}
.topbar-search button {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--color-primary, #0071e3);
}

.date-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 12px;
}

.date-mode-label {
  font-size: 11px;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #6b7280;
}

.date-mode-switch select {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 12px;
  background: #ffffff;
}

.date-value {
  white-space: nowrap;
}

.date-overdue {
  color: #dc2626;
  font-weight: 600;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
  background: #e5e7eb;
  border: 1px solid #e5e7eb;
  line-height: 1.4;

}
.chip i {
  font-size: 13px;
}
.chip-compact {
  padding: 2px 7px;
  font-size: 12px;
}
.chip.chip-soft {
  background: #f8fafc;
  border-color: #e5e7eb;
  color: #0f172a;
}
.chip.chip-colored {
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

body[data-theme="dark"] .chip {
  color: #e5e7eb;
}

.pill {
  padding: 2px 10px;
  border-radius: 999px;
  background: #e5e7eb;
  font-size: 12px;
}

.table-title-cell {
  vertical-align: middle;
}
.table-title-cell > .vis-badge,
.table-title-cell > span,
.table-title-cell > a,
.table-title-cell > strong {
  vertical-align: middle;
}
.table-title-cell > .vis-badge:not(:last-child),
.table-title-cell > span:not(:last-child),
.table-title-cell > a:not(:last-child),
.table-title-cell > strong:not(:last-child) {
  margin-right: 6px;
}
.page-meta-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.vis-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  font-size: 12px;
  line-height: 1.4;
  background: #f3f4f6;
  color: #111827;
}
.vis-badge i {
  font-size: 12px;
}
.vis-badge.is-compact span {
  display: none;
}
.vis-inline {
  margin-right: 4px;
}
.vis-private {
  background: #fef2f2;
  border-color: #fecdd3;
  color: #b91c1c;
}
.vis-public {
  background: #ecfeff;
  border-color: #bae6fd;
  color: #0369a1;
}
.vis-internal {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #4c1d95;
}
.item-visibility-preview {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
}

/* Add-Menü / zentraler Hinzufügen-Button */
.topbar-add-wrapper {
  position: relative;
}

.add-menu {
  position: absolute;
  right: 0;
  margin-top: 6px;
  min-width: 220px;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 30px rgba(15,23,42,0.18);
  padding: 4px;
  display: none;
  z-index: 40;
}
.add-menu.is-open {
  display: block;
}
.add-menu a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 14px;
  color: #111827;
  text-decoration: none;
}
.add-menu a:hover {
  background: var(--hover-weak);
}

/* User Pill */
.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #111827;
  text-decoration: none;
}
.user-pill .avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  overflow: hidden;
  background: #e5e7eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}
.user-pill .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.user-pill .avatar.initials {
  background: linear-gradient(135deg,#6366f1,#0ea5e9);
  color: #f9fafb;
}
.avatar.avatar-mini {
  width: 22px;
  height: 22px;
  font-size: 11px;
}
.avatar.avatar-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  overflow: hidden;
  background: #e5e7eb;
  font-size: 12px;
  font-weight: 600;
  color: #1f2937;
}
.avatar-inline img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-initials {
  background: linear-gradient(135deg,#0ea5e9,#6366f1);
  color: #f9fafb;
}
.user-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.user-label-name {
  font-size: 13px;
  color: #111827;
}
.user-label-inline {
  gap: 4px;
}
.user-label-inline .user-label-name {
  font-size: 12px;
  color: #374151;
}

/* Content */
.main-content {
  flex: 1;
  min-width: 0;
  min-height: 0;
  padding: 24px 50px;
  overflow-y: auto;
  overflow-x: hidden;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.page-header h1 {
  margin: 0;
  font-size: 22px;
}
.page-subtitle {
  margin-top: 4px;
  color: #6b7280;
  font-size: 14px;
}
.page-actions {
  display: flex;
  gap: 8px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 15px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  font-size: 14px;
  cursor: pointer;
}
.btn:hover {
  background: var(--hover-weak);
}
.btn-primary {
  border-color: var(--color-primary, #0071e3);
  background: var(--color-primary, #0071e3);
  color: #ffffff;
}
.btn-primary:hover {
  background: color-mix(in srgb, var(--color-primary, #0071e3) 85%, #ffffff);
}
.btn-icon.has-chip {
  position: relative;
}
.btn-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #0ea5e9;
  color: #ffffff;
  border-radius: 999px;
  padding: 1px 4px;
  font-size: 10px;
  line-height: 1.1;
  min-width: 16px;
  text-align: center;
  border: 1px solid #ffffff;
}
.btn-badge.is-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  min-width: 0;
}

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface, #fafafa);
  border-radius: 12px;
  overflow: hidden;
  font-size: 14px;
}
.table th,
.table td {
  padding: 8px 12px;
  border-bottom: 1px solid #e5e7eb;
}
.table th {
  text-align: left;
  background: color-mix(in srgb, var(--color-primary, #0071e3) 6%, #f9fafb);
  font-weight: 500;
  font-size: 13px;
}
.table tr:last-child td {
  border-bottom: none;
}
.table tbody tr {
  cursor: pointer;
}
tr.row-link {
  cursor: pointer;
}
tr.row-link:hover {
  background: var(--hover-weak);
}
.table-shell {
  position: relative;
  margin-bottom: 10px;
}
.table-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-bottom: 6px;
}
.table-tool-btn {
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 8px;
  font-size: 12px;
  padding: 4px 10px;
  cursor: pointer;
}
.table-tool-btn:hover {
  background: var(--hover-weak);
}
.table-column-menu {
  position: absolute;
  right: 0;
  top: 32px;
  min-width: 180px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(15,23,42,0.12);
  padding: 6px;
  display: none;
  z-index: 10;
}
.table-column-menu.is-open {
  display: block;
}
.table-column-option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  font-size: 13px;
  border-radius: 8px;
}
.table-column-option:hover {
  background: var(--hover-weak);
}

/* Forms */
label {
  display: block;
  font-size: 14px;
  margin-bottom: 8px;
}
label input:not([type="checkbox"]):not([type="radio"]),
label select,
label textarea {
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  box-sizing: border-box;
}
label textarea {
  resize: vertical;
}
label input[type="checkbox"],
label input[type="radio"] {
  display: inline-block;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  min-width: 16px;
  padding: 0;
  border: none;
  border-radius: 0;
  box-sizing: border-box;
  margin: 0;
  accent-color: var(--color-primary, #0071e3);
  vertical-align: middle;
  align-self: center;
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  line-height: 1.35;
  cursor: pointer;
}
label.checkbox-row {
  margin-bottom: 0;
}
.checkbox-row input[type="checkbox"],
.checkbox-row input[type="radio"] {
  margin-top: 0;
}
.checkbox-row span {
  margin: 0;
  display: inline-block;
}
.card.is-readonly input:not([type="hidden"]),
.card.is-readonly select,
.card.is-readonly textarea {
  border: none;
  background: transparent;
  padding-left: 0;
  pointer-events: none;
  box-shadow: none;
}
.card.is-readonly .meta-link-btn {
  opacity: 0.6;
  pointer-events: none;
}
.card.is-readonly .ql-toolbar {
  display: none;
}
.card.is-readonly .ql-editor {
  border: none;
  background: transparent;
  pointer-events: none;
  padding-left: 0;
  padding-right: 0;
}
.ql-editor {
  font-family: 'Rubik', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  min-height: 65vh;
}
.media-resize-overlay {
  position: absolute;
  display: none;
  z-index: 20;
  gap: 6px;
  align-items: center;
  pointer-events: auto;
}
.media-resize-overlay.is-open {
  display: flex;
}
.media-resize-overlay .media-resize-handle {
  width: 14px;
  height: 14px;
  background: #0ea5e9;
  border: 2px solid #fff;
  border-radius: 4px;
  cursor: nwse-resize;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.media-resize-overlay [data-media-edit] {
  border: none;
  background: #111827;
  color: #fff;
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 12px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.media-resize-overlay [data-media-edit]:hover {
  background: #0ea5e9;
}
.wysiwyg-editor.is-drop-target {
  outline: 2px dashed #0ea5e9;
  outline-offset: 4px;
}
.content-shell.is-drop-target {
  outline: 2px dashed #0ea5e9;
  outline-offset: 6px;
  background: #f0f9ff;
}
.upload-placeholder {
  background: #ecfeff;
  border: 1px dashed #0ea5e9;
  color: #0f172a;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 14px;
}
.ql-bubble .ql-toolbar {
  flex-wrap: wrap;
  gap: 6px;
}
.ql-bubble .ql-toolbar .ql-formats {
  flex-wrap: wrap;
  margin-right: 6px;
}
.ql-bubble .ql-toolbar button.ql-list-dash .ql-icon-dash {
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
}
.ql-editor li[data-list="dash"] {
  list-style: none;
  position: relative;
}
.ql-editor li[data-list="dash"]::before {
  content: '–';
  position: absolute;
  left: -1.2em;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px 16px;
  margin-bottom: 12px;
}

.field-label {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
}
.field-hint {
  font-size: 12px;
  color: #6b7280;
}
.color-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.color-input-row input[type="color"] {
  width: 44px;
  height: 36px;
  padding: 0;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

/* Tag / Badge */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
}
.tag-muted {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #374151;
  font-size: 12px;
}

/* Alerts */
.alert {
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 12px;
  font-size: 14px;
  background: #e5e7eb;
}
.alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

/* Cards / misc */
.card {
  background: #fafafa;
  border-radius: 12px;
  padding: 16px;
  /* border: 1px solid #e5e7eb; */
  margin-bottom: 16px;
}

/* Check / Radio rows */
.check-row,
.radio-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 14px;
}
.check-row input,
.radio-row input {
  width: auto;
}

/* Advanced details */
.advanced-block {
  margin-top: 16px;
  margin-bottom: 12px;
}
.advanced-block > summary {
  cursor: pointer;
  font-size: 14px;
  color: #4b5563;
}

/* Split section (attachments & comments) */
.split-section {
  display: grid;
  grid-template-columns: minmax(0,1.1fr) minmax(0,0.9fr);
  gap: 24px;
  margin-top: 24px;
}
.file-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
}
.file-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
  font-size: 14px;
}
.file-meta {
  color: #6b7280;
  font-size: 12px;
}
.inline-form {
  margin-top: 8px;
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
}
.comment-list li {
  padding: 6px 0;
  border-bottom: 1px solid #e5e7eb;
}
.comment-list li:last-child {
  border-bottom: none;
}
.comment-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #6b7280;
}
.comment-body {
  margin-top: 4px;
  font-size: 14px;
}

/* Wiki layout */
.wiki-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.wiki-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 14px 14px 12px;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wiki-card h2 {
  margin: 0;
  font-size: 16px;
}
.wiki-card p {
  margin: 0;
  font-size: 14px;
  color: #4b5563;
}
.wiki-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.wiki-tree-panel {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  padding: 10px 12px;
}
.wiki-tree-level {
  list-style: none;
  margin: 0;
  padding: 0 0 0 18px;
}
.wiki-tree-level:first-child {
  padding-left: 0;
}
.wiki-tree-node {
  margin: 4px 0;
}
.wiki-tree-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 6px;
  color: #0f172a;
  text-decoration: none;
}
.wiki-tree-link:hover {
  text-decoration: none;
  background: var(--hover-weak);
}

/* Kanban */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.kanban-column {
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 8px;
}
.kanban-column-header {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}
.kanban-card {
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  padding: 8px;
  font-size: 14px;
  margin-bottom: 6px;
  cursor: pointer;
}
.kanban-card-title {
  font-weight: 500;
}

/* Timeline / Projektplan */
.timeline-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #e5e7eb;
}
.timeline-item:last-child {
  border-bottom: none;
}
.timeline-date {
  font-size: 12px;
  color: #6b7280;
  width: 120px;
}
.timeline-main {
  flex: 1;
}
.timeline-bar {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(to right,#0071e3,#0ea5e9);
  margin-top: 4px;
}

/* Neue Timeline / Gantt */
.timeline-board {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15,23,42,0.08);
}
.timeline-board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.timeline-board-title {
  font-weight: 600;
}
.timeline-board-help {
  font-size: 12px;
  color: #6b7280;
}
.timeline-status {
  font-size: 12px;
  color: #6b7280;
  margin-left: auto;
}
.timeline-scroll {
  overflow-x: auto;
  padding-bottom: 6px;
}
.timeline-scale {
  display: grid;
  grid-auto-rows: 30px;
  border: 1px solid #e5e7eb;
  border-radius: 8px 8px 0 0;
  border-bottom: none;
  background: #f9fafb;
}
.timeline-header {
  display: grid;
  grid-template-rows: 30px 26px 28px;
  position: relative;
  top: auto;
  z-index: 1;
  background: #f9fafb;
  width: max-content;
  min-width: 100%;
  border-bottom: 1px solid #e5e7eb;
  gap: 0;
}
.timeline-row {
  display: grid;
  grid-template-columns: repeat(var(--timeline-day-count, 1), var(--timeline-day-width, 28px));
  gap: 0;
  align-items: center;
}
.timeline-month-row {
  font-weight: 600;
  font-size: 13px;
  background: #eef2ff;
}
.timeline-week-row {
  background: #f9fafb;
  font-size: 12px;
}
.timeline-day-row {
  font-size: 11px;
}
.timeline-month-row,
.timeline-week-row,
.timeline-day-row {
  display: grid;
  grid-template-columns: inherit;
  grid-auto-rows: inherit;
}
.timeline-month-cell {
  padding: 6px 8px;
  font-weight: 600;
  font-size: 13px;
  background: #eef2ff;
  border-right: 1px solid #e5e7eb;
}
.timeline-month-cell:last-child { border-right: none; }
.timeline-week-cell {
  padding: 4px 6px;
  font-size: 12px;
  background: #f9fafb;
  border-right: 1px solid #e5e7eb;
}
.timeline-week-cell:last-child { border-right: none; }
.timeline-day-cell {
  text-align: center;
  font-size: 11px;
  border-right: 1px solid #eef2f7;
  padding: 4px 0;
}
.timeline-day-cell:last-child {
  border-right: none;
}
.timeline-day-cell.is-weekend {
  background: #f8fafc;
}
.timeline-day-num {
  font-weight: 600;
}
.timeline-day-week {
  color: #6b7280;
}
.timeline-body {
  position: relative;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-top: none;
  border-radius: 0 0 10px 10px;
  background: #ffffff;
  padding-top: 8px;
}
.timeline-grid {
  position: relative;
  min-height: 140px;
  background-image: repeating-linear-gradient(
    to right,
    transparent,
    transparent calc(var(--timeline-day-width, 30px) - 1px),
    #f3f4f6 calc(var(--timeline-day-width, 30px) - 1px),
    #f3f4f6 var(--timeline-day-width, 30px)
  );
  padding: 6px 0 12px 0;
}
.timeline-today {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #0ea5e9;
  opacity: 0.7;
  pointer-events: none;
}
.timeline-bar-card {
  position: absolute;
  border-radius: 10px;
  padding: 6px 10px 8px;
  color: #0f172a;
  cursor: grab;
  box-shadow: 0 10px 24px rgba(15,23,42,0.12);
  border: 1px solid rgba(15,23,42,0.06);
  backdrop-filter: blur(2px);
  z-index: 1;
}
.timeline-bar-card.is-moving {
  opacity: 0.9;
}
.timeline-handles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.timeline-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 6px;
  background: rgba(255,255,255,0.4);
  box-shadow: inset 0 0 0 1px rgba(15,23,42,0.08);
  pointer-events: auto;
  cursor: ew-resize;
}
.timeline-handle.handle-start { left: -3px; border-radius: 8px 0 0 8px; }
.timeline-handle.handle-end { right: -3px; border-radius: 0 8px 8px 0; }
.timeline-bar-title {
  font-weight: 600;
  font-size: 13px;
}
.timeline-bar-sub {
  font-size: 12px;
  color: #1f2937;
  opacity: 0.9;
  margin-top: 2px;
}
.timeline-bar-sub .timeline-chip {
  margin-right: 6px;
}
.timeline-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 600;
  color: #0f172a;
  background: #e5e7eb;
}
.timeline-chip i {
  font-size: 12px;
}
.timeline-range {
  color: #6b7280;
}
.timeline-bar-sub .timeline-chip {
  margin-right: 6px;
}
.timeline-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 600;
  color: #0f172a;
  background: #e5e7eb;
}
.timeline-chip i {
  font-size: 12px;
}
.timeline-range {
  color: #6b7280;
}
.timeline-avatar-stack {
  display: flex;
  gap: 4px;
  margin-top: 4px;
  align-items: center;
}
.timeline-empty {
  padding: 12px;
  color: #6b7280;
  font-size: 13px;
}

/* Install */
.install-page {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top,#111827,#020617);
  color: #e5e7eb;
}
.install-container {
  width: 420px;
  padding: 24px;
  border-radius: 16px;
  background: rgba(15,23,42,0.96);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.install-container h1 {
  margin-top: 0;
  font-size: 22px;
}
.install-container p {
  font-size: 14px;
  color: #9ca3af;
}
.install-container label {
  margin-bottom: 10px;
}
.install-container input {
  background: #020617;
  color: #e5e7eb;
  border-color: #1f2937;
}
.install-container button {
  margin-top: 12px;
  width: 100%;
}


/* Item edit meta links */
.item-meta-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 16px;
}

.meta-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  background: #eef2ff;
  color: #0071e3;
  cursor: pointer;
}
.meta-link-btn:hover {
  background: #e0e7ff;
}
.meta-link-btn i {
  font-size: 12px;
}

/* Simple modal styles */
.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  align-items: center;
  justify-content: center;
  display: flex;
  padding: 12px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 0s linear 180ms;
}
.modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 180ms ease;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,0.45);
  opacity: 0;
  transition: opacity 180ms ease;
}
.modal-dialog {
  position: relative;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(15,23,42,0.25);
  padding: 16px 20px;
  width: min(440px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  display: flex;
  flex-direction: column;
  transform: translateY(18px) scale(.985);
  opacity: 0;
  transition: transform 200ms ease, opacity 180ms ease;
}
.modal.is-open .modal-backdrop { opacity: 1; }
.modal.is-open .modal-dialog { transform: translateY(0) scale(1); opacity: 1; }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.modal-title {
  font-size: 16px;
  font-weight: 600;
}
.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
}
.modal-body {
  padding: 4px 0;
  overflow-y: auto;
  flex: 1;
}
.modal-body label {
  display: block;
}
.modal-footer {
  margin-top: 10px;
  text-align: right;
}
.my-tasks-filter-dialog {
  max-width: 760px;
  width: min(760px, calc(100vw - 24px));
  max-height: min(calc(100dvh - 24px), 760px);
}
.my-tasks-filter-modal .modal-header {
  margin-bottom: 14px;
}
.my-tasks-filter-modal .modal-body {
  padding: 2px 0 4px;
}
.my-tasks-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.my-tasks-filter-section {
  min-width: 0;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fbfcfe;
  overflow: hidden;
}
.my-tasks-filter-section-head {
  padding: 10px 14px;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
}
.my-tasks-filter-section .field-label {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}
.my-tasks-filter-options {
  display: grid;
  gap: 8px;
  padding: 12px 14px 14px;
}
.my-tasks-filter-option {
  display: flex !important;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}
.my-tasks-filter-option:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}
.my-tasks-filter-option input {
  flex: 0 0 auto;
  margin: 0;
  width: 16px;
  height: 16px;
}
.my-tasks-filter-option span {
  min-width: 0;
  font-size: 15px;
  line-height: 1.3;
  color: #0f172a;
}
.my-tasks-filter-modal .modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}
@media (max-width: 760px) {
  .my-tasks-filter-grid {
    grid-template-columns: 1fr;
  }
}

.offcanvas {
  position: fixed;
  inset: 0;
  display: block;
  z-index: 80;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 0s linear 180ms;
}
.offcanvas.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 180ms ease;
}
.offcanvas .inline-form[data-file-upload-inline] {
  display: none;
}
.offcanvas.is-open .inline-form[data-file-upload-inline] {
  display: block;
}
.offcanvas-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,0.35);
  opacity: 0;
  transition: opacity 180ms ease;
}
.offcanvas-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: clamp(420px, 38vw, 680px);
  max-width: calc(100vw - 8px);
  height: 100%;
  background: #ffffff;
  box-shadow: -8px 0 30px rgba(15,23,42,0.25);
  border-left: 1px solid #e5e7eb;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateX(100%);
  transition: transform 220ms ease;
  will-change: transform;
}
.offcanvas.is-open .offcanvas-backdrop {
  opacity: 1;
}
.offcanvas.is-open .offcanvas-panel {
  transform: translateX(0);
}
.offcanvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.offcanvas-title {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.offcanvas-close {
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  color: #6b7280;
}
.offcanvas-body {
  overflow-y: auto;
  flex: 1;
  padding-right: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 80px;
}
.offcanvas-body .field-group { display: flex; flex-direction: column; gap: 6px; }
.meta-table { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 6px 12px; }
.meta-key { display: inline-block; min-width: 90px; color: #6b7280; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.meta-val { font-weight: 600; font-size: 13px; }
.history-list { margin: 0; padding-left: 16px; color: #374151; font-size: 13px; }
.version-list { display: flex; flex-direction: column; gap: 10px; }
.version-card { border: 1px solid #e5e7eb; border-radius: 10px; padding: 8px 10px; background: #fff; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.01); }
.version-head { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #374151; flex-wrap: wrap; }
.version-badge { display: inline-flex; align-items: center; justify-content: center; padding: 2px 8px; border-radius: 999px; background: #eef2ff; color: #4338ca; font-weight: 700; font-size: 12px; }
.version-meta .user-label-inline { font-weight: 600; }
.version-changes { margin: 6px 0 0 14px; padding: 0; color: #374151; font-size: 13px; list-style: disc; }
.diff-block { background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px 10px; font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 12px; line-height: 1.4; max-height: 280px; overflow: auto; }
.diff-line { display: block; white-space: pre-wrap; }
.diff-line.added { color: #15803d; }
.diff-line.removed { color: #dc2626; }
.diff-line.unchanged { color: #475569; }
.offcanvas-footer {
  margin-top: 8px;
  border-top: 1px solid #e5e7eb;
  padding-top: 8px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.offcanvas-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.floating-actions {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: flex;
  gap: 8px;
  z-index: 95;
}

/* TinyMCE content tweaks inside card */
.tox-tinymce {
  border-radius: 10px;
}


/* WYSIWYG editor wrapper (Quill) */
.wysiwyg-editor {
  border-radius: 10px;
  border: 0px solid #e5e7eb !important;
  min-height: 200px;
  font-size: 14px;
  background: #ffffff;
}

/* Selected meta chips under editor */
.item-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 12px;
}
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.4;
  background: #e5e7eb;
  color: #374151;
}
.meta-chip-topic {
  background: #eff6ff;
  color: #1d4ed8;
}
.meta-chip-category {
  background: #fef3c7;
  color: #92400e;
}
.meta-chip-owner,
.meta-chip-assigned {
  background: #ecfdf3;
  color: #166534;
}
.meta-chip-date {
  background: #f5f3ff;
  color: #5b21b6;
}
.meta-chip .meta-chip-remove {
  border: none;
  background: transparent;
  padding: 0;
  margin-left: 2px;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.meta-chip-remove i { pointer-events: none; }

/* --- Clean Item Layout (Confluence-like) --- */
.wysiwyg-editor.wysiwyg-plain {
  min-height: 420px;
  background: #fff;
  border: 1px solid #e5e7eb;
}
.wysiwyg-editor.wysiwyg-plain .ql-editor {
  font-size: 15px;
  line-height: 1.6;
}
.macro-table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.macro-table th, .macro-table td { border: 1px solid #e5e7eb; padding: 6px 8px; }
.dnd-embed {
  margin: 8px 0;
}
.dnd-embed-media {
  width: 100%;
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}
.dnd-embed-file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 6px 10px;
  color: #0f172a;
  text-decoration: none;
  background: #f8fafc;
}
.dnd-embed-meta {
  margin-top: 6px;
  font-size: 12px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.dnd-embed-meta .name {
  font-weight: 600;
  color: #334155;
}
.dnd-embed-meta .sep {
  color: #94a3b8;
}
.enhanced-table { border: 1px solid #d1d5db; overflow: hidden; width: 100%; table-layout: auto; border-collapse: collapse; border-spacing: 0; }
.enhanced-table td,
.enhanced-table th { border: 1px solid #d1d5db; min-width: 80px; position: relative; vertical-align: top; }
.enhanced-table .table-header-row td,
.enhanced-table .table-header-row th { background: var(--color-primary, #0071e3); color: #ffffff; font-weight: 600; border-radius: 0; }
.enhanced-table.table-ui-ready .table-header-row td,
.enhanced-table.table-ui-ready .table-header-row th { padding-top: 18px; }
.table-ui-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 80;
  display: none;
}
.table-ui-overlay.is-open {
  display: block;
}
.table-overlay-control {
  position: fixed !important;
  pointer-events: auto;
  box-shadow: none;
}
.table-col-handle,
.table-row-handle {
  position: absolute;
  border: none;
  background: rgba(255,255,255,0.98);
  color: rgba(15,23,42,.62);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  cursor: grab;
  z-index: 6;
  opacity: .88;
  transition: opacity .12s ease, color .12s ease, box-shadow .12s ease, transform .12s ease;
  -webkit-user-drag: element;
  user-select: none;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(148, 163, 184, 0.22);
}
.table-col-handle {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}
.table-row-handle {
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}
.table-col-resize-handle {
  position: absolute;
  top: 0;
  right: -6px;
  width: 14px;
  height: 100%;
  cursor: col-resize;
  z-index: 5;
  background: transparent;
}
.table-row-resize-handle {
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 14px;
  cursor: row-resize;
  z-index: 5;
  background: transparent;
}
.table-ui-overlay .table-col-resize-handle,
.table-ui-overlay .table-row-resize-handle {
  background: transparent;
  border-radius: 999px;
}
.table-drop-before {
  box-shadow: inset 3px 0 0 rgba(14, 165, 233, 0.95);
  background: rgba(14, 165, 233, 0.08);
}
.table-drop-after {
  box-shadow: inset -3px 0 0 rgba(14, 165, 233, 0.95);
  background: rgba(14, 165, 233, 0.08);
}
.table-row-drop-before > td,
.table-row-drop-before > th {
  box-shadow: inset 0 3px 0 rgba(14, 165, 233, 0.95);
  background: rgba(14, 165, 233, 0.08);
}
.table-row-drop-after > td,
.table-row-drop-after > th {
  box-shadow: inset 0 -3px 0 rgba(14, 165, 233, 0.95);
  background: rgba(14, 165, 233, 0.08);
}
.table-drag-source-row > td,
.table-drag-source-row > th {
  opacity: 0.08;
}
.table-drag-source-cell {
  opacity: 0.08;
}
.table-drag-ghost {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 95;
  pointer-events: none;
  display: none;
  opacity: 0.82;
  transform: translate3d(0, 0, 0);
}
.table-drag-ghost.is-open {
  display: block;
}
.table-drag-ghost-table {
  border-collapse: collapse;
  border-spacing: 0;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.2);
  border-radius: 10px;
  overflow: hidden;
}
.table-drag-ghost-table td,
.table-drag-ghost-table th {
  border: 1px solid #d1d5db;
  padding: 8px 10px;
  background: rgba(255,255,255,0.96);
}
body.is-table-resizing {
  user-select: none;
}
.macro-divider-line { border: none; border-top: 1px solid #e5e7eb; min-height: 1px; margin: 12px 0; display: block; height: 1px; }
.ql-divider { border-top: 1px solid #e5e7eb; margin: 12px 0; }
.macro-code { background: #0f172a; color: #e2e8f0; padding: 10px; border-radius: 6px; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
.ql-syntax {
  background: #0f172a;
  color: #e2e8f0;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #0b1224;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.5;
  overflow-x: auto;
}

.ql-editor td{
  border: 1px solid #e5e7eb !important;
}
.ql-editor img:not([data-media-width]) {
  max-width: 30% !important;
  height: auto;
}

.ql-syntax code {
  font-family: inherit;
  color: inherit;
  background: transparent;
}
.ql-code-block-container { margin: 10px 0; }
.ql-code-block-container select.ql-ui { margin: 4px 0; border: 1px solid #e5e7eb; border-radius: 6px; padding: 4px; font-size: 12px; }
.macro-quote { border-left: 3px solid #9ca3af; padding: 6px 10px; color: #374151; background: #f9fafb; }
.macro-callout {
  padding: 12px 14px;
  border-radius: 10px;
  margin: 10px 0;
  border: 1px solid transparent;
  position: relative;
}
.macro-callout::before {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}
.macro-callout-info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}
.macro-callout-info::before {
  content: "Info";
}
.macro-callout-hint {
  background: #ecfeff;
  border-color: #a5f3fc;
  color: #0f766e;
}
.macro-callout-hint::before {
  content: "Hinweis";
}
.macro-callout-warning {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}
.macro-callout-warning::before {
  content: "Warnung";
}
.macro-callout-quote {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #334155;
}
.macro-callout-quote::before {
  content: "Zitat";
}
.macro-checklist { list-style: none; padding-left: 0; }
.macro-checklist li::before { content: '☐'; margin-right: 6px; }
.macro-divider { border: none; border-bottom: 1px solid #e5e7eb; margin: 12px 0; }
.macro-diagram {
  border: none;
  border-radius: 0;
  overflow: visible;
  margin: 18px 0 22px;
  display: block;
  max-width: 100%;
  position: relative;
}
.macro-diagram-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.macro-diagram-title {
  padding: 0;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 700;
  color: #1f2937;
}
.macro-diagram-view {
  width: 100%;
  overflow: hidden;
  padding: 0;
  box-sizing: border-box;
}
.macro-diagram-view img,
.macro-diagram-view svg,
.macro-diagram-view canvas {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
}
.macro-diagram-hint { display: none; }
.macro-diagram-menu {
  position: relative;
  flex: 0 0 auto;
}
.macro-diagram-menu summary {
  list-style: none;
  width: 30px;
  height: 30px;
  border: 1px solid #d9e1ea;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  background: #fff;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.macro-diagram-menu summary::-webkit-details-marker { display: none; }
.macro-diagram-menu summary::marker { content: ""; }
.macro-diagram-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 180px;
  background: #fff;
  border: 1px solid #dbe2ea;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(15,23,42,.12);
  padding: 6px;
  display: none;
  z-index: 20;
}
.macro-diagram-menu[open] .macro-diagram-menu-panel {
  display: block;
}
.macro-diagram-menu-panel button {
  width: 100%;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  color: #0f172a;
  cursor: pointer;
}
.macro-diagram-menu-panel button:hover {
  background: #eef2f7;
}
.macro-gliffy {
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  overflow: hidden;
  margin: 10px 0;
  background: #fff;
}
.macro-gliffy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid #edf2f7;
  background: #f8fbff;
}
.macro-gliffy-title {
  font-weight: 600;
  color: #1f2937;
}
.macro-gliffy-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.macro-gliffy-actions a {
  color: #2563eb;
  text-decoration: none;
}
.macro-gliffy-actions a:hover {
  text-decoration: underline;
}
.macro-gliffy-frame-wrap {
  position: relative;
  width: 100%;
  min-height: 320px;
  background: #f8fafc;
}
.macro-gliffy-frame {
  display: block;
  width: 100%;
  height: 360px;
  border: 0;
}
.macro-gliffy-note {
  padding: 6px 10px;
  font-size: 12px;
  color: #64748b;
  border-top: 1px solid #edf2f7;
  background: #f8fafc;
}
.macro-gliffy-preview-shell {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
}
.macro-gliffy-preview-shell iframe {
  display: block;
  width: 100%;
  height: 340px;
  border: 0;
}
.macro-code-block { margin: 12px 0; }
.code-viewer-shell { border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; }
.code-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 12px; border-bottom: 1px solid #e5e7eb; }
.code-lang-select {
  min-width: 140px;
  max-width: 180px;
}
.code-viewer { max-height: 70vh; overflow: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 13px; background: #f9fafb; }
.code-lines { padding: 12px; }
.code-line { display: flex; gap: 8px; align-items: flex-start; padding: 2px 6px; }
.code-line-number { width: 40px; text-align: right; color: #9ca3af; user-select: none; }
.code-line-text { white-space: pre; flex: 1; }
.macro-code-block .code-editor { display: block; width: 100%; min-height: 160px; background: #0f172a; color: #e2e8f0; border: 1px solid #0b1224; border-radius: 0 0 8px 8px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 13px; line-height: 1.5; padding: 12px; white-space: pre; overflow: auto; }
.macro-code-block .code-editor.is-hidden { display: none; }
.macro-code-block .code-toolbar .btn { padding: 4px 8px; }

/* Code-Editor Modal */
#code-edit-modal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 9999; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 180ms ease, visibility 0s linear 180ms; }
#code-edit-modal.is-open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 180ms ease; }
#code-edit-modal .code-edit-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.35); opacity: 0; transition: opacity 180ms ease; }
#code-edit-modal .code-edit-dialog { position: relative; background: #fff; border-radius: 10px; box-shadow: 0 15px 40px rgba(0,0,0,0.15); width: min(900px, 90vw); max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; transform: translateY(16px) scale(.985); opacity: 0; transition: transform 200ms ease, opacity 180ms ease; }
#code-edit-modal.is-open .code-edit-backdrop { opacity: 1; }
#code-edit-modal.is-open .code-edit-dialog { transform: translateY(0) scale(1); opacity: 1; }
#code-edit-modal .code-edit-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid #e5e7eb; }
#code-edit-modal .code-edit-body { padding: 12px 14px; }
#code-edit-modal textarea { width: 100%; min-height: 320px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 13px; line-height: 1.5; border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px; background: #0f172a; color: #e2e8f0; }
#code-edit-modal .code-edit-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 14px; border-top: 1px solid #e5e7eb; }
#code-download-modal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 9999; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 180ms ease, visibility 0s linear 180ms; }
#code-download-modal.is-open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 180ms ease; }
#code-download-modal .code-edit-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.35); opacity: 0; transition: opacity 180ms ease; }
#code-download-modal .code-edit-dialog { position: relative; background: #fff; border-radius: 10px; box-shadow: 0 15px 40px rgba(0,0,0,0.15); width: min(460px, 92vw); max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; transform: translateY(16px) scale(.985); opacity: 0; transition: transform 200ms ease, opacity 180ms ease; }
#code-download-modal.is-open .code-edit-backdrop { opacity: 1; }
#code-download-modal.is-open .code-edit-dialog { transform: translateY(0) scale(1); opacity: 1; }
#code-download-modal .code-edit-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid #e5e7eb; }
#code-download-modal .code-edit-body { padding: 12px 14px; }
#code-download-modal .code-edit-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 14px; border-top: 1px solid #e5e7eb; }
.code-download-dialog {
  width: min(460px, 92vw);
}
.code-download-dialog input[type="text"] {
  width: 100%;
  border: 1px solid #dbe1ea;
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}

/* Mention Dropdown */
.mention-menu { position: absolute; z-index: 9999; background: #fff; border: 1px solid #e5e7eb; box-shadow: 0 10px 30px rgba(0,0,0,0.08); border-radius: 8px; min-width: 220px; max-width: min(320px, calc(100vw - 16px)); max-height: calc(100dvh - 16px); overflow: auto; display: none; }
.mention-menu.is-open { display: block; }
.mention-list { max-height: 260px; overflow-y: auto; padding: 6px; }
.mention-item { width: 100%; text-align: left; border: none; background: transparent; padding: 8px 10px; border-radius: 6px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.mention-item strong { font-weight: 600; color: #111827; }
.mention-item span { font-size: 12px; color: #6b7280; }
.mention-item:hover, .mention-item.is-active { background: #eef2ff; }

.diagram-editor-screen {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: none;
  background: #f4f7fb;
}
.diagram-editor-screen.is-open {
  display: flex;
  flex-direction: column;
}
.diagram-editor-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px 12px;
  border-bottom: 1px solid #dbe2ea;
  background: #fff;
}
.diagram-editor-title-group {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 18px;
}
.diagram-editor-title {
  margin: 2px 0 0;
  font-size: 24px;
  line-height: 1.1;
}
.diagram-editor-name {
  min-width: min(420px, 42vw);
}
.diagram-editor-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.diagram-editor-shell {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
}
.diagram-editor-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #fff;
}
body.diagram-editor-open {
  overflow: hidden;
}

.item-header-inline { display:flex; align-items:center; gap:10px; }
.item-header-clean { align-items: flex-start; }
.item-header-bar { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.item-top-left { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.item-top-right { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.item-meta-bar { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-top:6px; }
.item-meta-left { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.item-meta-right { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.line-top { border-bottom:1px solid #f1f5f9; padding-bottom:6px; }
.line-bottom { border-top:1px solid #f1f5f9; padding-top:6px; }
.item-meta-chips-row { margin-top: 8px; }
.item-meta-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.item-meta-chips.scrollable { overflow-x: auto; padding: 4px 2px; }
.item-meta-chips.scrollable::-webkit-scrollbar { height: 8px; }
.item-meta-chips.scrollable::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 999px; }
.item-meta-add { position: relative; display: flex; align-items: center; }
.meta-add-btn {
  width: 34px;
  height: 34px;
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #111827;
}
.meta-add-btn:hover { background: #f8fafc; }
.meta-add-link {
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 12px;
  cursor: pointer;
  padding: 4px 6px;
  font-weight: bold;
}
.meta-add-link:hover { text-decoration: underline; }
.quick-insert-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 4px 0 8px;
}
.quick-insert-bar .btn.btn-small {
  padding: 4px 8px;
  font-size: 12px;
}
.quick-tip {
  color: #6b7280;
  font-size: 12px;
}
.mini-wysiwyg-menu {
  position: absolute;
  display: none;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(15,23,42,0.12);
  padding: 4px;
  z-index: 80;
  gap: 4px;
  flex-wrap: wrap;
  max-width: 420px;
}
.mini-wysiwyg-menu.is-open { display: inline-flex; }
.mini-wysiwyg-menu button {
  border: none;
  background: transparent;
  padding: 6px;
  cursor: pointer;
  color: #0f172a;
  font-size: 13px;
  border-radius: 6px;
}
.mini-wysiwyg-menu button i { pointer-events: none; }
.mini-wysiwyg-menu button:hover { background: #f1f5f9; }
.slash-command-menu {
  position: absolute;
  z-index: 120;
  display: none;
  min-width: 220px;
  max-width: min(320px, calc(100vw - 16px));
  max-height: min(300px, calc(100vh - 16px));
  overflow: auto;
  background: #ffffff;
  border: 1px solid #dbe1ea;
  border-radius: 10px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
  padding: 6px;
}
.slash-command-menu.is-open {
  display: block;
}
.slash-command-item {
  width: 100%;
  border: none;
  background: transparent;
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  cursor: pointer;
  color: #0f172a;
  font-size: 13px;
}
.slash-command-item:hover,
.slash-command-item.is-active {
  background: #eff6ff;
}
.slash-command-item .hint {
  margin-left: auto;
  color: #64748b;
  font-size: 11px;
}
.ql-block-drag-handle {
  position: absolute;
  z-index: 10;
  width: 22px;
  height: 22px;
  border: 0 solid #d1d5db;
  border-radius: 6px;
  background: #ffffff;
  color: #64748b;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: grab;
  box-shadow: none;
}
.ql-block-drag-handle.is-open {
  display: inline-flex;
}
.block-handle-menu {
  position: fixed;
  z-index: 120;
  min-width: 160px;
  max-width: min(240px, calc(100vw - 16px));
  max-height: calc(100dvh - 16px);
  overflow: auto;
  display: none;
  padding: 6px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(15,23,42,.16);
}
.block-handle-menu.is-open {
  display: block;
}
.block-handle-menu button {
  width: 100%;
  border: none;
  background: transparent;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  color: #b91c1c;
  cursor: pointer;
  text-align: left;
}
.block-handle-menu button:hover {
  background: #fef2f2;
}
.ql-editor .is-block-dragging {
  opacity: 0.6;
}
.ql-editor .ql-block-drop-before {
  box-shadow: inset 0 2px 0 #3b82f6;
}
.ql-editor .ql-block-drop-after {
  box-shadow: inset 0 -2px 0 #3b82f6;
}
body.block-dragging {
  user-select: none;
  cursor: grabbing;
}
.item-meta-menu {
  position: fixed;
  min-width: 180px;
  max-width: min(320px, calc(100vw - 16px));
  max-height: calc(100dvh - 16px);
  overflow: auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  padding: 6px;
  display: none;
  z-index: 20;
}
.item-meta-menu.is-open { display: block; }
.item-meta-menu button {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.item-meta-menu button:hover { background: #f8fafc; }
.item-meta-menu-group { padding: 6px 6px 2px; border-bottom: 1px solid #f1f5f9; }
.item-meta-menu-group:last-child { border-bottom: none; }
.item-meta-menu-title { font-size: 12px; color: #475569; font-weight: 600; padding: 4px 2px; }
.item-meta-menu-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 2px; }
.meta-chip-btn {
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff;
}
.meta-chip-btn.ghost {
  background: #f8fafc;
}
.item-meta-menu-shortcuts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 6px; border-bottom: none; }
.item-visibility-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.item-visibility-preview.vis-clickable { cursor: pointer; }
.item-visibility-preview .vis-badge { box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04); }
.chip-user .user-label { display: inline-flex; align-items: center; gap: 6px; }
.item-header-actions { gap: 6px; }
.btn-icon { padding: 6px; width: 34px; height: 34px; }

.type-inline-btn {
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 20px;
  padding: 2px 4px 2px 0;
  cursor: pointer;
}
.type-inline-btn .caret { font-size: 12px; }
.item-topic-header {
  display: inline-block;
  position: relative;
}
.item-topic-header-chip {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
}
.item-topic-header-menu {
  width: 28px;
  height: 28px;
  padding: 0;
  opacity: 0.78;
}
.item-topic-header-menu:hover {
  opacity: 1;
}
.item-topic-menu {
  position: fixed;
  top: 0;
  left: 0;
  min-width: 240px;
  max-width: min(320px, 70vw);
  max-height: calc(100dvh - 16px);
  overflow: auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
  padding: 6px;
  z-index: 45;
  display: none;
}
.item-topic-menu.is-open {
  display: block;
}
.item-topic-menu-option {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  cursor: pointer;
}
.item-topic-menu-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 52px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #64748b;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .03em;
  white-space: nowrap;
  justify-content: center;
  flex: 0 0 auto;
}
.item-topic-menu-badge i {
  font-size: 10px;
}
.item-topic-menu-badge.is-empty {
  min-width: 32px;
  padding: 4px 8px;
  background: #e5e7eb;
  color: #475569;
}
.item-topic-menu-label {
  min-width: 0;
  flex: 1 1 auto;
}
.item-topic-menu-option:hover {
  background: #f8fafc;
}
.item-topic-menu-option.is-active {
  background: #e2e8f0;
}
.topbar-topic-menu-btn {
  width: 34px;
  height: 34px;
  margin-left: 8px;
  opacity: .78;
}
.topbar-topic-menu-btn:hover {
  opacity: 1;
}
.type-menu {
  position: fixed;
  min-width: 180px;
  max-width: min(320px, calc(100vw - 16px));
  max-height: calc(100dvh - 16px);
  overflow: auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  padding: 6px;
  display: none;
  z-index: 30;
}
.type-menu.is-open { display: block; }
.type-menu-item {
  width: 100%;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}
.type-menu-item:hover { background: #f8fafc; }

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
}
.pill-btn.ghost { background: #fff; }
.pill-btn i:first-child { color: #111827; }
.pill-btn:focus { outline: none; border-color: #c7ccd1; }
.chip-truncate { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.item-title-row.single { margin: 2px 0 2px; }
.item-title-input {
  font-size: 24px;
  border: none;
  border-bottom: 1px solid #e5e7eb;
  padding: 4px 2px 6px;
  width: 100%;
  display: block;
  box-sizing: border-box;
  max-width: 100%;
}
.item-title-input:focus { outline: none; border-bottom-color: #6366f1; }
.ghost-select {
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  border-radius: 8px;
  padding: 8px 10px;
}
.ghost-select.slim { padding: 6px 8px; font-size: 13px; }
.meta-inline-btn.ghost {
  border: 1px solid #e5e7eb;
  background: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.item-meta-helper {
  display: none !important;
}
.btn-inline-state { display: inline-flex; align-items: center; gap: 6px; }
.btn-spinner {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  display: inline-block;
  animation: btnspin 0.8s linear infinite;
}
.btn.is-saving { opacity: 0.9; }
.btn.is-success { background: #10b981; border-color: #10b981; }
.btn.is-error { background: #ef4444; border-color: #ef4444; }
@keyframes btnspin { to { transform: rotate(360deg); } }
.link-hover-tip {
  position: absolute;
  background: #111827;
  color: #ffffff;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 6px;
  box-shadow: 0 8px 18px rgba(15,23,42,0.16);
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
  z-index: 120;
}
.link-hover-tip.is-visible { opacity: 1; }
.secret-block {
  display: inline-block;
  padding: 2px 8px;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  cursor: pointer;
}
.secret-block::before {
  content: "\f084";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-right: 6px;
}
.secret-block.is-masked {
  user-select: none;
}
.secret-block .secret-text { margin-right: 8px; }
.secret-block .secret-action {
  border: none;
  background: transparent;
  color: inherit;
  padding: 2px 4px;
  cursor: pointer;
}
.secret-block .secret-value { margin-right: 6px; }
.secret-block .secret-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  padding: 0 4px;
  margin-left: 2px;
  cursor: pointer;
  color: inherit;
  font-size: 13px;
}
.secret-hover-tip {
  position: absolute;
  background: #111827;
  color: #ffffff;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 6px;
  box-shadow: 0 8px 18px rgba(15,23,42,0.16);
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
  z-index: 120;
}
.secret-hover-tip.is-visible { opacity: 1; }
.secret-inline-overlay {
  position: absolute;
  background: #111827;
  color: #ffffff;
  padding: 6px 8px;
  border-radius: 6px;
  box-shadow: 0 8px 18px rgba(15,23,42,0.2);
  display: none;
  z-index: 220;
    font-size: 12px;
}
.secret-inline-actions,
.secret-inline-tip { display: none;   font-size: 12px; }
.secret-inline-actions button {
  background: transparent;
  border: none;
  color: inherit;
  padding: 4px 6px;
  cursor: pointer;
}
.secret-inline-actions button:hover {
  color: #38bdf8;
}

.secret-chip-overlay {
  position: absolute;
  background: #111827;
  color: #fff;
  padding: 6px 8px;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(15,23,42,0.18);
  font-size: 12px;
  display: none;
  align-items: center;
  gap: 8px;
  z-index: 140;
}
.secret-chip-overlay.is-visible { display: inline-flex; }
.secret-chip-actions {
  display: inline-flex;
  gap: 6px;
}
.secret-chip-actions button {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 4px;
}
.secret-chip-actions button:hover { color: #e5e7eb; }
.secret-chip-actions button i.fa-trash-can { pointer-events: none; }
.secret-tip { white-space: nowrap; }
.secret-block .secret-copy {
  border: none;
  background: transparent;
  padding: 0 4px;
  margin-left: 6px;
  cursor: pointer;
  color: inherit;
  font-size: 13px;
}
.secret-hover-tip {
  position: absolute;
  background: #111827;
  color: #ffffff;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 6px;
  box-shadow: 0 8px 18px rgba(15,23,42,0.16);
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
  z-index: 120;
}
.secret-hover-tip.is-visible { opacity: 1; }

.content-shell {
  position: relative;
  border-radius: 10px;
  background: #fff;

  margin-bottom: 12px;
}
.ql-editor{
padding:20px 5px !important;
}

.content-toolbar {
  display: none !important; 
}
.content-shell-borderless {
  border: none;
  box-shadow: none;
}
.wiki-reader-nav {
  margin: 14px 0 6px;
  padding-top: 14px;
  padding-bottom: 50px;
  border-top: 1px solid #edf1f5;
}
.wiki-reader-nav-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.wiki-reader-nav-linkline {
  min-width: 0;
  max-width: calc(50% - 9px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 600;
  color: #0f172a;
  text-decoration: none;
}
.wiki-reader-nav-linkline-prev {
  justify-content: flex-start;
}
.wiki-reader-nav-linkline-next {
  justify-content: flex-end;
  margin-left: auto;
  text-align: right;
}
.wiki-reader-nav-linkline:hover {
  text-decoration: underline;
}
.wiki-reader-nav-linkline-empty {
  visibility: hidden;
}
.wiki-reader-nav-linktitle {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wiki-reader-nav-arrow {
  flex: 0 0 auto;
  color: #64748b;
}
@media (max-width: 900px) {
  .wiki-reader-nav-grid {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .wiki-reader-nav-linkline,
  .wiki-reader-nav-linkline-next {
    max-width: none;
    margin-left: 0;
    justify-content: flex-start;
    text-align: left;
  }
  .wiki-reader-nav-linkline-empty {
    display: none;
  }
}
.content-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 6px;
}
.macro-menu {
  display: none;
  position: absolute;
  right: 12px;
  top: 42px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(15,23,42,0.12);
  padding: 8px;
  z-index: 20;
  width: 220px;
}
.macro-menu.is-open { display: grid; gap: 6px; }
.macro-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  border-radius: 6px;
  padding: 6px 10px;
  text-align: left;
  font-size: 13px;
}

.addon-menu { position: relative; }
.topbar-item-actions-host {
  position: relative;
  display: flex;
  align-items: center;
}
.addon-menu-topbar {
  position: relative;
}
.addon-menu-panel {
  display: none;
  position: absolute;
  right: 0;
  top: 38px;
  max-width: min(420px, calc(100vw - 16px));
  max-height: calc(100dvh - 16px);
  overflow-y: auto;
  overflow-x: hidden;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15,23,42,0.12);
  min-width: 320px;
  padding: 10px;
  z-index: 30;
}
.addon-menu-panel.is-open { display: block; }
.addon-menu-title { font-weight: 600; margin-bottom: 8px; }
.addon-menu-action {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  border: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 8px;
  padding: 10px 12px;
  color: #334155;
  text-decoration: none;
  text-align: left;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
}
.addon-menu-action i {
  width: 28px;
  min-width: 28px;
  text-align: center;
  font-size: 21px;
}
.addon-menu-action span {
  flex: 1 1 auto;
  min-width: 0;
}
.addon-menu-action:hover {
  background: #eef2f7;
  color: #0f172a;
  text-decoration: none;
}
.addon-menu-action[disabled] {
  opacity: .45;
  cursor: default;
}
.addon-menu-action-danger {
  color: #b91c1c;
}
.addon-menu-action-danger:hover {
  background: #fef2f2;
  color: #991b1b;
}
.addon-menu-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.addon-menu-divider { height: 1px; background: #e5e7eb; margin: 8px 0; }
.addon-section.is-hidden { display: none !important; }

.meta-inline-btn { cursor: pointer; }
.meta-inline-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 6px;
  margin-bottom: 6px;
}
.meta-inline-field:last-child { margin-right: 0; }
.meta-row-chips { flex-wrap: wrap; margin-top: 6px; }
.meta-chip-list {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.chip-ghost i {
  padding-left: 8px;
}

.meta-chip-label {
  font-size: 11px;
  color: #6b7280;
  margin-right: 4px;
}
.meta-chip-clickable { cursor: pointer; }
.meta-chip-remove {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 13px;
  margin-left: 4px;
  color: inherit;
}
.chip-user .user-label-inline { display: inline-flex; align-items: center; gap: 6px; }
.chip-user .avatar-inline { width: 18px; height: 18px; font-size: 10px; }

.btn-vis { min-width: 34px; width: 34px; height: 34px; padding: 0; gap: 0; justify-content: center; }
.btn-vis i { margin: 0; display: flex; align-items: center; justify-content: center; font-size: 14px; line-height: 1; color: inherit; }
.btn-vis-internal { background: #fff; border-color: #e5e7eb; color: #0f172a; }
.btn-vis-public { background: var(--color-primary, #0071e3); border-color: var(--color-primary, #0071e3); color: #fff; }
.btn-vis-private { background: #fef2f2; border-color: #fecdd3; color: #b91c1c; }
.btn-vis span { display: none; }

/* Files list cards */
.file-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  width: 100%;
}
.file-list li {
  margin-bottom: 6px;
  width: 100%;
}
.file-chip-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
.file-chip {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  cursor: pointer;
  text-align: left;
}
.file-chip:hover {
  background: #f3f4f6;
}
.file-chip-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}
.file-chip-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef2ff;
}
.file-chip-icon i {
  font-size: 16px;
}
.file-chip-text {
  min-width: 0;
  flex: 1 1 auto;
}
.file-chip-name {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-chip-meta {
  color: #6b7280;
  font-size: 12px;
}
.file-chip-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding-left: 0;
}
.file-chip-actions form {
  margin: 0;
}
.file-chip-actions .btn {
  padding: 4px 8px;
}
.file-chip-actions .btn,
.file-chip-actions form {
  flex: 0 0 auto;
}
.file-chip-thumb img {
  width: 56px;
  height: 42px;
  object-fit: cover;
  border-radius: 8px;
}
.macro-file-link {
  margin: 10px 0;
}
.macro-file-link .file-chip-inline {
  text-decoration: none;
  color: inherit;
}
.macro-file-link .file-chip-inline:hover {
  background: #f3f4f6;
}

.macro-download-list {
  margin: 14px 0;
  border: 1px solid #dbe1ea;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.macro-download-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
}
.macro-download-list-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.macro-download-list-title {
  font-weight: 700;
  color: #0f172a;
}
.macro-download-list-summary {
  padding: 8px 12px 0;
  font-size: 12px;
  color: #64748b;
}
.macro-download-list-items {
  list-style: none;
  margin: 0;
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.macro-download-list-inner.is-drop-target {
  outline: 2px dashed #38bdf8;
  outline-offset: -6px;
  background: #f0f9ff;
}
.macro-download-list-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
}
.macro-download-list-item-main {
  min-width: 0;
  flex: 1 1 auto;
}
.macro-download-list-item a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0f172a;
  text-decoration: none;
  font-weight: 600;
}
.macro-download-list-item-meta {
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
}
.macro-download-list-item-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 0 0 auto;
}
.macro-download-list-empty {
  padding: 10px 12px 12px;
  font-size: 13px;
  color: #64748b;
}

/* File preview modal sizing */
.file-modal {
  z-index: 200;
}
.modal-dialog-file {
  max-width: 900px;
  width: calc(100% - 40px);
  height:90%
}
.file-modal-body {
  max-height: 70vh;
  overflow: auto;
  height: 100%;
}
.file-preview-image,
.file-preview-video,
.file-preview-frame {
width: 100%;
  height: 100%;
  border: none;
}
.file-preview-audio {
  width: 100%;
  margin-top: 4px;
}



/* ==== Multi-Widget Views ==== */
.widget-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}
.widget-tab {
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 10px 10px 0 0;
  text-decoration: none;
  color: #374151;
}
.widget-tab.is-active {
  background: var(--hover-strong);
  color: #374151;
  font-weight: bold;
}
.widget-section {
  margin-bottom: 24px;
}
.widget-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 14px;
  padding: 8px 10px;
  background: #ffffff;
}
.widget-card-summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  cursor: pointer;
}
.widget-card-body {
  margin-top: 10px;
}
.filter-panel summary {
  cursor: pointer;
  font-weight: 500;
  margin-bottom: 6px;
}
.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
  gap: 10px;
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  font-size: 11px;
}
.todo-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.todo-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}
.todo-title {
  cursor: pointer;
}
.todo-meta {
  margin-left: auto;
  font-size: 11px;
  color: #6b7280;
}
.sidebar-workspace summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  margin: 0 8px 2px;
  border-radius: 6px;
  font-size: 14px;
  color: #111827;
}
.sidebar-workspace summary::-webkit-details-marker {
  display: none;
}

.sidebar-workspace[open] summary::after {
  transform: rotate(180deg);
}
.sidebar-workspace summary:hover {
  background: var(--hover-weak);
}
.sidebar-workspace-children {
  margin: 2px 0 8px;
  padding-left: 5px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-sub-link {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  color: #374151;
  border-radius: 6px;
  text-decoration: none;
}
.sidebar-sub-link:hover {
  background: var(--hover-weak);
  color: #111827;
}
.sidebar-sub-bullet {
  width: 10px;
  font-size: 12px;
  color: #6b7280;
  display: inline-block;
}


.nav-icon-preview {
  margin-top: 4px;
  font-size: 16px;
  color: #4b5563;
}
.icon-picker {
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-preview {
  width: 34px;
  height: 34px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  background: #ffffff;
  flex: 0 0 auto;
}

/* Hauptbereich optisch absetzen */
.main {
  background: #f3f4f6;
}
.main-content {
  background: #ffffff;

}

/* Wiki-Ansicht wie Dokumentliste statt Kacheln */
.wiki-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wiki-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  cursor: pointer;
}
.wiki-card-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 2px;
}
.wiki-card-meta {
  font-size: 12px;
  color: #6b7280;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}


/* Wiki-Widget: listenartige Darstellung */
.wiki-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wiki-card {
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  padding: 8px 10px;
  background: #ffffff;
  cursor: pointer;
}
.wiki-card-title {
  font-weight: 500;
  margin-bottom: 2px;
}
.wiki-card-meta {
  font-size: 12px;
  color: #6b7280;
}
.icon-picker-popover {
  position: absolute;
  z-index: 1000;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(15,23,42,0.16);
  padding: 8px;
  width: min(420px, calc(100vw - 16px));
  max-width: calc(100vw - 16px);
  max-height: calc(100dvh - 16px);
  overflow: auto;
}
.icon-picker-popover input[type="search"] {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  margin-bottom: 8px;
  font-family: inherit;
}
.icon-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 6px;
  max-height: 320px;
  overflow: auto;
}
.icon-picker-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 6px 8px;
  cursor: pointer;
  background: #fff;
  font-size: 12px;
  text-align: left;
}
.icon-picker-btn:hover {
  background: var(--hover-weak);
}

.live-search-popover {
  position: absolute;
  z-index: 999;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(15,23,42,0.16);
  padding: 6px;
  display: none;
  max-height: min(460px, calc(100dvh - 16px));
  overflow: auto;
  min-width: min(420px, calc(100vw - 24px));
  max-width: min(760px, calc(100vw - 24px));
}
.live-search-popover.is-open {
  display: block;
}
.search-section {
  margin-bottom: 6px;
}
.search-section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #6b7280;
  margin: 6px 4px;
}
.search-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  text-decoration: none;
  color: #111827;
}
.search-row:hover {
  background: var(--hover-weak);
}
.search-row.is-active {
  background: var(--hover-strong);
  outline: 1px solid var(--color-primary, #0071e3);
}
.search-row-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.search-row-title {
  font-weight: 600;
}
.search-row span {
  font-size: 12px;
  color: #6b7280;
}
.search-row-side {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 1px;
}
.search-row-badges {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.search-row .search-app-badge,
.search-app-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 18px;
  padding: 0 6px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .03em;
  color: #fff !important;
  background: #64748b;
}
.search-snippet {
  font-size: 12px;
  color: #6b7280;
}
.search-highlight {
  background: #fef08a;
  color: #111827;
  padding: 0 2px;
  border-radius: 4px;
}
.search-empty {
  padding: 8px;
  color: #6b7280;
  font-size: 13px;
}

.parent-suggestions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.parent-suggestion {
  text-align: left;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 6px 8px;
  background: #ffffff;
  cursor: pointer;
}
.parent-suggestion:hover {
  background: var(--hover-weak);
}
.parent-search-input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-family: inherit;
}

/* Auth/Login */
body.auth-body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Rubik', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(900px 520px at -8% -14%, color-mix(in srgb, var(--auth-primary, #0071e3) 18%, #ffffff) 0%, transparent 62%),
    radial-gradient(780px 460px at 115% 120%, color-mix(in srgb, var(--auth-primary, #0071e3) 16%, #ffffff) 0%, transparent 64%),
    var(--auth-bg, #f3f4f6);
  color: var(--auth-text, #0f172a);
}
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}
.auth-card {
  width: 100%;
  max-width: 430px;
  background: color-mix(in srgb, var(--auth-surface, #fff) 94%, #f8fafc);
  border: 1px solid color-mix(in srgb, var(--auth-primary, #0071e3) 18%, #d1d5db);
  border-radius: 18px;
  box-shadow: 0 22px 52px rgba(15, 23, 42, 0.16);
  padding: 24px 22px 20px;
}
.auth-org-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.auth-org-logo {
  width: 48px;
  height: 48px;
  border-radius: 11px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #e5e7eb;
  padding: 4px;
}
.auth-org-logo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--auth-primary, #0071e3);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
}
.auth-org-copy {
  min-width: 0;
}
.auth-org-label {
  margin: 0 0 2px;
  font-size: 12px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.auth-org-name {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
  font-weight: 700;
  color: var(--auth-text, #0f172a);
}
.auth-title {
  margin: 10px 0 12px;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -.01em;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 500;
  color: color-mix(in srgb, var(--auth-text, #0f172a) 78%, #334155);
}
.auth-field input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 17px;
  color: #0f172a;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-field input:focus {
  border-color: color-mix(in srgb, var(--auth-primary, #0071e3) 52%, #111);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--auth-primary, #0071e3) 24%, transparent);
}
.auth-submit {
  width: 100%;
  margin-top: 6px;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: .01em;
}
.auth-links {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
}
.auth-links a {
  color: color-mix(in srgb, var(--auth-primary, #0071e3) 78%, #fff);
  font-weight: 500;
}
.auth-links a:hover {
  text-decoration: underline;
}
.auth-stepper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.auth-stepper span {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}
.auth-stepper span.is-active {
  border-color: var(--auth-primary, #0071e3);
  background: color-mix(in srgb, var(--auth-primary, #0071e3) 20%, #ffffff);
  color: #0f172a;
}
.auth-context-note {
  margin: 6px 0 4px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid #dbe3ea;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  line-height: 1.5;
}
.auth-context-note.is-success {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}
.auth-context-note.is-info {
  border-color: #dbe3ea;
  background: #f8fafc;
  color: #475569;
}
@media (max-width: 520px) {
  .auth-page {
    padding: 14px;
  }
  .auth-card {
    border-radius: 14px;
    padding: 18px 16px;
  }
  .auth-org-name {
    font-size: 18px;
  }
  .auth-title {
    font-size: 30px;
  }
}


.ql-tooltip {
  display:none !important;
}
.secret-action {
  border: none;
  background: transparent;
  color: inherit;
  padding: 2px 4px;
  cursor: pointer;
}

/* --- Outline-like Cleanup Layer --- */
.sidebar {
  --sidebar-bg: var(--color-sidebar, #f1f1f1);
  --sidebar-text: var(--color-text, #1e293b);
  --sidebar-muted: color-mix(in srgb, var(--sidebar-text) 62%, var(--sidebar-bg));
  --sidebar-border: color-mix(in srgb, var(--sidebar-text) 16%, var(--sidebar-bg));
  --sidebar-hover-bg: color-mix(in srgb, var(--color-primary, #0071e3) 12%, var(--sidebar-bg));
  --sidebar-active-bg: color-mix(in srgb, var(--color-primary, #f2f2f2) 26%, var(--sidebar-bg));

  width: 300px;
  min-width: 220px;
  max-width: 540px;
  flex: 0 0 auto;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  padding-top: 12px;
}
.sidebar::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.sidebar-logo {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px 10px 18px;
  font-size: 18px;
  font-weight: 600;
}
.sidebar-logo.has-logo {
  padding-right: 36px;
}
.sidebar-brand-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.sidebar-brand-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sidebar-brand-copy {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
}
.sidebar-logo-img {
  display: block;
  width: auto;
  max-width: 208px;
  height: auto;
  max-height: 36px;
  object-fit: contain;
  object-position: left center;
}
.sidebar-brand-title {
  display: block;
  min-width: 0;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-toggle {
  position: absolute;
  top: 8px;
  right: 10px;
  border-color: #cdd6e2;
  background: #ffffff;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  transform: translateY(-1px);
}
.sidebar:hover .sidebar-toggle,
.sidebar:focus-within .sidebar-toggle {
  opacity: 1;
  pointer-events: auto;
}
body.sidebar-collapsed .sidebar {
  width: 58px !important;
  min-width: 58px !important;
  max-width: 58px !important;
  padding-top: 6px;
}
body.sidebar-collapsed .sidebar-logo {
  min-height: 0;
  padding: 0 0 6px;
  justify-content: center;
}
body.sidebar-collapsed .sidebar-logo.has-logo {
  padding-right: 0;
}
body.sidebar-collapsed .sidebar-brand-copy {
  display: none;
}
body.sidebar-collapsed .sidebar-brand-icon {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  border-radius: 10px;
}
body.sidebar-collapsed .sidebar-toggle {
  position: static;
  margin: 0 auto;
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
body.sidebar-collapsed .sidebar-nav {
  padding-top: 0;
}
body.sidebar-collapsed .sidebar-nav a,
body.sidebar-collapsed .sidebar-workspace summary {
  margin-left: 8px;
  margin-right: 8px;
  padding-left: 0;
  padding-right: 0;
  justify-content: center;
}
body.sidebar-collapsed .sidebar-nav a,
body.sidebar-collapsed .sidebar-workspace summary,
body.sidebar-collapsed .sidebar-user-link {
  min-height: 40px;
}
body.sidebar-collapsed .sidebar-nav a i.sidebar-icon,
body.sidebar-collapsed .sidebar-workspace summary i.sidebar-icon {
  width: auto;
  margin: 0;
}
body.sidebar-collapsed .sidebar-org-row,
body.sidebar-collapsed .sidebar-org,
body.sidebar-collapsed .sidebar-user-link,
body.sidebar-collapsed .sidebar-mini-menu,
body.sidebar-collapsed .sidebar-group,
body.sidebar-collapsed .sidebar-workspaces-list {
  display: none !important;
}
.sidebar-section-label {
  text-transform: none;
  letter-spacing: .01em;
  font-size: 13px;
  font-weight: 700;
  color: var(--sidebar-muted);
  padding: 14px 16px 6px;
}
.sidebar-nav a {
  margin: 0 12px 3px;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  color: var(--sidebar-text);
  font-weight: 620;
}
.sidebar-nav a:hover {
  background: transparent;
}
.sidebar-nav a.is-active {
  background: #0000000f;
  color: var(--sidebar-text);
  font-weight: 700;
  width: 100%;
}
.sidebar-workspace-list-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.sidebar-workspace-list-row > a {
  flex: 1 1 auto;
  min-width: 0;
}
.sidebar-workspace-visibility-btn {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--sidebar-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  margin-right: 10px;
  transition: opacity .16s ease, background-color .16s ease, color .16s ease;
}
.sidebar-workspace-list-row:hover .sidebar-workspace-visibility-btn,
.sidebar-workspace-list-row:focus-within .sidebar-workspace-visibility-btn {
  opacity: .72;
  pointer-events: auto;
}
.sidebar-workspace-visibility-btn:hover {
  background: var(--hover-weak);
  color: var(--sidebar-text);
  opacity: 1;
}
.sidebar-hidden-workspaces {
  margin: 4px 10px 6px;
}
.sidebar-hidden-workspaces summary {
  list-style: none;
  cursor: pointer;
  color: var(--sidebar-muted);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 2px;
}
.sidebar-hidden-workspaces summary::-webkit-details-marker {
  display: none;
}
.sidebar-hidden-workspaces-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
}
.sidebar-workspace-list-row.is-hidden-workspace > a {
  opacity: .78;
}
.sidebar-workspace summary {
  border-radius: 12px;
  padding: 7px 12px;
  margin: 0 10px 4px;
  color: var(--sidebar-text);
  font-size: 14px;
  font-weight: 700;
}
.sidebar-workspace summary:hover {
  background: transparent;
}
.sidebar-workspace summary.is-active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-text);
  font-weight: 700;
}
.sidebar-workspace-children {

  padding: 0 2px 0 2px;
  border-left: 2px solid color-mix(in srgb, var(--sidebar-border) 70%, transparent);
  background: color-mix(in srgb, var(--color-surface, #fafafa) 74%, var(--sidebar-bg));
  border-radius: 0 10px 10px 0;
  gap: 0;
}
.sidebar-sub-link {
  font-size: 12px;
  color: var(--sidebar-text);
  padding: 1px 4px;
  font-weight: 620;
  border-radius: 7px;
  min-height: 18px;
}
.sidebar-sub-link:hover {
  background: transparent;
  color: var(--sidebar-text);
}
.sidebar-sub-link.is-active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-text);
  font-weight: 700;
}
.sidebar-wiki-root-row {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 0;
}
.sidebar-widget-row {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 0;
}
.sidebar-mini-menu {
  position: relative;
  align-self: flex-start;
  margin: 0;
}
.sidebar-mini-menu-inline {
  margin: 2px 0 4px 22px;
}
.sidebar-mini-menu-node {
  margin: 0 0 0 auto;
  align-self: center;
}
.sidebar-mini-menu summary {
  list-style: none;
  width: 16px;
  height: 16px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--sidebar-muted);
}
.sidebar-mini-menu summary:hover {
  background: transparent;
}
.sidebar-mini-menu summary::-webkit-details-marker {
  display: none;
}
.sidebar-mini-menu summary::marker {
  content: "";
}
.sidebar-mini-menu-node summary {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
}
.sidebar-wiki-branch:hover > .sidebar-mini-menu-node summary,
.sidebar-wiki-branch:focus-within > .sidebar-mini-menu-node summary,
.sidebar-wiki-node:hover > .sidebar-wiki-node-row .sidebar-mini-menu-node summary,
.sidebar-wiki-node:focus-within > .sidebar-wiki-node-row .sidebar-mini-menu-node summary,
.sidebar-mini-menu-node[open] summary,
.sidebar-wiki-node.is-active > .sidebar-wiki-node-row .sidebar-mini-menu-node summary {
  opacity: 1;
  pointer-events: auto;
}
.sidebar-wiki-root-row:hover .sidebar-mini-menu-node summary,
.sidebar-wiki-root-row:focus-within .sidebar-mini-menu-node summary {
  opacity: 1;
  pointer-events: auto;
}
.sidebar-widget-row:hover .sidebar-mini-menu-node summary,
.sidebar-widget-row:focus-within .sidebar-mini-menu-node summary {
  opacity: 1;
  pointer-events: auto;
}
.sidebar-mini-menu-panel {
  position: absolute;
  left: 28px;
  top: -2px;
  min-width: 250px;
  max-width: min(320px, calc(100vw - 16px));
  max-height: calc(100dvh - 16px);
  overflow: auto;
  background: color-mix(in srgb, var(--color-surface, #fafafa) 96%, var(--sidebar-bg));
  border: 1px solid var(--sidebar-border);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  padding: 6px;
  display: none;
  z-index: 40;
}
.sidebar-mini-menu[open] .sidebar-mini-menu-panel {
  display: block;
}
.sidebar-mini-menu-node .sidebar-mini-menu-panel {
  left: auto;
  right: 0;
  top: 22px;
}
.sidebar-mini-menu-panel a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.sidebar-mini-menu-panel a:hover {
  background: var(--sidebar-hover-bg);
}
.sidebar-wiki-tree-inline {
  /* margin: 0;
  padding-left: 20px; */
}
.sidebar-wiki-level {
  padding-left: 0;
  margin: 0;
}
.sidebar-wiki-level .sidebar-wiki-level {
  margin-left: 16px;
}
.sidebar-wiki-node {
  margin: 0;
  list-style: none;
}
.sidebar-wiki-node-row {
  display: flex;
  align-items: center;
  gap: 1px;
  position: relative;
}
.sidebar-wiki-branch {
  display: block;
  margin: 0;
  padding: 0;
  position: relative;
}
.sidebar-wiki-branch > summary {
  list-style: none;
  margin: 0;
  padding: 0 16px 0 0;
  display: flex;
  align-items: center;
  gap: 1px;
}
.sidebar-wiki-branch > summary::-webkit-details-marker {
  display: none;
}
.sidebar-wiki-branch > summary::marker {
  content: "";
}
.sidebar-wiki-toggle {
  width: 14px;
  min-width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sidebar-muted);
  cursor: pointer;
  flex: 0 0 14px;
}
.sidebar-wiki-toggle i {
  font-size: 9px;
  transition: transform .14s ease;
}
.sidebar-wiki-branch[open] > summary .sidebar-wiki-toggle i {
  transform: rotate(90deg);
}
.sidebar-wiki-branch > .sidebar-wiki-level {
  margin-top: 0;
  padding-top: 0;
}
.sidebar-wiki-branch > .sidebar-mini-menu-node {
  position: absolute;
  top: 0;
  right: 0;
  margin: 0;
}
.sidebar-wiki-toggle-placeholder {
  visibility: hidden;
}
.sidebar-wiki-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 2px;
  font-size: 12px;
  color: var(--sidebar-text);
  font-weight: 620;
  line-height: 1;
  border-radius: 6px;
  min-height: 14px;
}
.sidebar-wiki-branch > summary .sidebar-wiki-link {
  flex: 1 1 auto;
}
.sidebar-wiki-link:hover {
  background: transparent;
  color: var(--sidebar-text);
}
.sidebar-wiki-link .sidebar-icon {
  font-size: 10px;
  width: 12px;
}
.sidebar-wiki-node.is-active > .sidebar-wiki-node-row .sidebar-wiki-link,
.sidebar-wiki-node.is-active > .sidebar-wiki-branch > .sidebar-wiki-node-row .sidebar-wiki-link {
  background: #0000000f;
  color: var(--sidebar-text);
  font-weight: 700;
}
.sidebar-footer {
  border-top: none;
  padding: 10px 14px 12px;
}
.topbar {
  height: 62px;
  border-bottom: 1px solid #edf1f5;
  padding: 0 18px;
  justify-content: space-between;
}
.topbar-title {
  font-weight: 600;
  font-size: 22px;
}
.topbar-right {
  gap: 10px;
  position: relative;
}
.notification-bell-wrap {
  position: relative;
}
.notification-bell {
  position: relative;
}
.notification-bell .btn-badge {
  top: -5px;
  right: -5px;
  min-width: 18px;
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.notification-bell.is-shaking {
  animation: notificationBellShake 0.9s ease-in-out 3;
}
.notification-popover {
  position: absolute;
  z-index: 130;
  right: 0;
  top: calc(100% + 10px);
  width: min(380px, calc(100vw - 24px));
  max-height: min(62vh, 520px);
  overflow: hidden;
  display: none;
  border: 1px solid #dfe5ec;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.16);
}
.notification-popover.is-open {
  display: block;
}
.notification-popover-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid #eef2f7;
  background: #f8fafc;
}
.notification-popover-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}
.notification-popover-subtitle {
  margin-top: 2px;
  font-size: 12px;
  color: #64748b;
}
.notification-popover-body {
  max-height: min(48vh, 400px);
  overflow: auto;
}
.notification-list {
  display: flex;
  flex-direction: column;
}
.notification-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
}
.notification-row:hover {
  background: #f8fafc;
}
.notification-row.is-unread {
  background: #f8fbff;
}
.notification-row-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.notification-row-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}
.notification-row-item {
  font-size: 12px;
  font-weight: 700;
  color: #0071e3;
}
.notification-row-text {
  font-size: 13px;
  line-height: 1.5;
  color: #475569;
}
.notification-row-excerpt {
  font-size: 12px;
  line-height: 1.5;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  padding: 8px 10px;
}
.notification-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: #94a3b8;
}
.notification-row-link {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-primary, #0071e3);
}
.notification-empty {
  padding: 18px 16px;
  font-size: 13px;
  color: #64748b;
}
.notification-target-highlight {
  animation: notificationTargetPulse 2s ease;
  outline: 2px solid rgba(0, 113, 227, 0.22);
  outline-offset: 4px;
  border-radius: 12px;
}
@keyframes notificationBellShake {
  0%, 100% { transform: rotate(0deg); }
  15% { transform: rotate(-12deg); }
  30% { transform: rotate(10deg); }
  45% { transform: rotate(-8deg); }
  60% { transform: rotate(6deg); }
  75% { transform: rotate(-3deg); }
}
@keyframes notificationTargetPulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 113, 227, 0.24); }
  100% { box-shadow: 0 0 0 16px rgba(0, 113, 227, 0); }
}
.topbar-org-switcher select,
.topbar-search,
.date-mode-switch {
  border-color: #e4eaf2;
  background: #ffffff;
}
.topbar-search input[type="search"] {
  min-width: 220px;
}
.sidebar-search {
  display: flex;
  width: calc(100% - 35px);
  margin: 8px 12px 12px;
}
.sidebar-search input[type="search"] {
  flex: 1;
  min-width: 0;
}
.topbar-search-only .topbar-search {
  width: min(640px, 100%);
}
.topbar-search-only .topbar-search input[type="search"] {
  flex: 1;
  min-width: 0;
}
.topbar-contextual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 16px;
  align-items: start;
  padding: 24px 50px 0;
}
.topbar-contextual > .topbar-context {
  grid-column: 1;
  grid-row: 1;
}
.topbar-contextual > .topbar-right {
  grid-column: 2;
  grid-row: 1;
}
.topbar-context {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.topbar-context-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em;
}
.topbar-context-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.topbar-context-kind {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: .04em;
}
.topbar-context-title {
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-add-menu {
  position: fixed;
  right: auto;
  top: auto;
  min-width: 220px;
  max-width: min(320px, calc(100vw - 16px));
  max-height: calc(100dvh - 16px);
  overflow: auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(15,23,42,.16);
  padding: 8px;
  display: none;
  z-index: 1000;
}
.topbar-add-menu.is-open {
  display: block;
}
.topbar-add-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #334155;
  text-decoration: none;
  font-size: 14px;
  font-weight: 560;
}
.topbar-add-menu a:hover {
  background: #eef2f7;
  color: #0f172a;
}
.main-content {
  padding: 24px 50px;
}
.item-content-stage {
  position: relative;
}
.item-meta-float-host {
  position: fixed;
  top: 52px;
  right: 28px;
  left: auto;
  z-index: 1400;
  width: min(440px, calc(100vw - 16px));
  height: auto;
  max-width: none;
  display: none;
  pointer-events: auto;
}
.item-meta-float-host.is-visible {
  display: block;
}
.item-meta-float-panel {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,.96);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(15,23,42,.12);
  backdrop-filter: blur(10px);
  overflow: hidden;
  min-width: 0;
}
.item-meta-float-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid #eef2f7;
  cursor: move;
  user-select: none;
  background: rgba(248,250,252,.96);
}
.item-meta-float-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.item-meta-float-title {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.item-meta-float-add,
.item-meta-float-close {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.item-meta-float-add:hover,
.item-meta-float-close:hover {
  background: #eef2f7;
  color: #0f172a;
}
.item-meta-float-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 14px 16px 18px;
}
.item-meta-float-host .meta-row-chips.is-in-floating-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}
.item-meta-float-host .meta-inline-field {
  width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: stretch;
}
.item-meta-float-host .meta-chip-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  min-width: 0;
  width: 100%;
}
.item-meta-float-host .meta-chip-label {
  margin: 0;
  min-width: 0;
  font-size: 11px;
  line-height: 1.3;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.item-meta-float-host .chip,
.item-meta-float-host .chip.chip-ghost {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 8px;
  row-gap: 2px;
  min-height: 0;
  padding: 0;
  font-size: 14px;
  line-height: 1.35;
  box-shadow: none;
  max-width: 100%;
  border: none !important;
  background: transparent !important;
  border-radius: 0;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  width: 100%;
}
.item-meta-float-host .chip-user {
  align-items: center;
}
.item-meta-float-host .chip-ghost i {
  padding-left: 0;
  margin-right: 0;
  margin-top: 2px;
}
.item-meta-float-host .meta-chip-text {
  min-width: 0;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.item-meta-float-host .chip-user .avatar-inline {
  width: 18px;
  height: 18px;
  font-size: 10px;
}
.item-meta-float-host .meta-chip-remove {
  font-size: 12px;
  opacity: .55;
  margin-left: 0;
  flex: 0 0 auto;
  padding: 0;
  align-self: start;
}
.item-meta-float-resize {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  background:
    linear-gradient(135deg, transparent 0 48%, rgba(100,116,139,.35) 48% 54%, transparent 54% 100%);
}
.item-meta-float-resize::before,
.item-meta-float-resize::after {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 8px;
  height: 1px;
  background: rgba(100,116,139,.45);
  transform: rotate(-45deg);
  transform-origin: right center;
}
.item-meta-float-resize::after {
  right: 6px;
  bottom: 6px;
}
.item-meta-menu-anchor {
  position: absolute;
  inset: 0;
  width: 0;
  height: 0;
  overflow: hidden;
}
.main-content > * {

  margin-left: 0;
  margin-right: auto;
}
.page-header,
.card,
.table-wrap,
.items-table,
.views-grid,
.wiki-grid,
.content-shell,
.item-title-row {
  max-width: 1180px;
}
.page-header h1 {
  font-size: 44px;
  font-weight: 600;
}
.item-title-input {
  font-size: 30px;
  font-weight: 800;
  border-bottom-color: #eef2f7;
}
.item-clean-form {
  max-width: none;
}
.item-clean-form .page-header,
.item-clean-form .item-title-row,
.item-clean-form .content-shell,
.item-clean-form .wiki-reader-nav,
.item-clean-form .page-actions {
  max-width: 1320px;
}
.content-shell,
.wysiwyg-editor.wysiwyg-plain {
  border-color: #e9edf3 !important;
  border-radius: 12px;
}
.floating-actions {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.sidebar-group {
  margin-top: 8px;
  padding-bottom: 2px;
}
.sidebar-group summary {
  list-style: none;
  margin: 0 10px 4px;
  padding: 9px 12px;
  border-radius: 8px;
  color: #1e293b;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.sidebar-group summary::-webkit-details-marker {
  display: none;
}
.sidebar-group summary::after {
  content: "\f107";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-left: auto;
  font-size: 12px;
  color: #5f6e83;
  transition: transform .15s ease;
}
.sidebar-group[open] summary::after {
  transform: rotate(180deg);
}
.sidebar-group summary:hover {
  background: #c8d2df;
}
.sidebar-nav-group {
  margin-bottom: 6px;
}

.sidebar-org-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.sidebar-org-menu {
  position: relative;
}
.sidebar-org-menu summary {
  list-style: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--sidebar-muted);
}
.sidebar-org-menu summary:hover {
  background: var(--sidebar-hover-bg);
}
.sidebar-org-menu summary::-webkit-details-marker {
  display: none;
}
.sidebar-org-menu-panel {
  position: fixed;
  left: 0;
  top: 0;
  width: min(360px, 100vw);
  min-width: 280px;
  height: 100dvh;
  max-height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--sidebar-bg);
  border: 0;
  border-right: 1px solid var(--sidebar-border);
  border-radius: 0;
  box-shadow: none;
  padding: 12px 14px 12px;
  display: none;
  z-index: 160;
  scrollbar-width: none;
}
.sidebar-org-menu-panel::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.sidebar-org-menu[open] .sidebar-org-menu-panel {
  display: block;
}
.sidebar-org-menu-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 4px 14px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--sidebar-border);
}
.sidebar-org-menu-head-copy {
  min-width: 0;
}
.sidebar-org-menu-head-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--sidebar-muted);
  font-weight: 700;
}
.sidebar-org-menu-head-title {
  margin-top: 6px;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
  color: var(--sidebar-text);
  word-break: break-word;
}
.sidebar-org-menu-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--sidebar-border);
  background: color-mix(in srgb, var(--color-surface, #fafafa) 88%, var(--sidebar-bg));
  color: var(--sidebar-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
}
.sidebar-org-menu-close:hover {
  background: var(--sidebar-hover-bg);
  color: var(--sidebar-text);
}
.sidebar-org-menu-group {
  padding: 6px 0;
  border-bottom: 1px solid var(--sidebar-border);
}
.sidebar-org-menu-group:last-child {
  border-bottom: none;
}
.sidebar-org-menu-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--sidebar-muted);
  font-weight: 700;
  padding: 4px 8px 6px;
}
.sidebar-org-menu-panel a,
.sidebar-org-menu-panel form button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}
.sidebar-org-menu-panel a i,
.sidebar-org-menu-panel form button i {
  width: 18px;
  text-align: center;
}
.sidebar-org-menu-panel a:hover,
.sidebar-org-menu-panel form button:hover {
  background: var(--sidebar-hover-bg);
}
.sidebar-org-menu-panel [data-open-downloads-modal] {
  font-family: inherit;
}
.sidebar-org-menu-panel a.is-active,
.sidebar-org-menu-panel form button.is-active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-text);
  font-weight: 620;
}
.sidebar-org-menu-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 8px 8px;
}
.sidebar-org-menu-select span {
  font-size: 13px;
  color: var(--sidebar-muted);
}
.sidebar-org-menu-select select {
  border: 1px solid var(--sidebar-border);
  border-radius: 8px;
  background: var(--color-surface, #fafafa);
  padding: 4px 8px;
  font-size: 12px;
  font-family: inherit;
}
body.sidebar-org-menu-open .sidebar-org-menu summary {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-text);
}
.flow-builder-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1.15fr) minmax(340px, 0.85fr);
  gap: 18px;
  align-items: start;
}
.flow-builder-canvas-wrap {
  min-width: 0;
}
.flow-builder-sidebar {
  display: grid;
  gap: 14px;
}
.flow-builder-canvas {
  min-height: 520px;
  border: 1px solid #d8dee8;
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(59,130,246,0.08), transparent 30%),
    linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
  overflow: hidden;
}
.flow-builder-actions {
  display: flex;
  gap: 8px;
}
.flow-node {
  min-width: 180px;
}
.flow-node-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}
.flow-node-body {
  font-size: 12px;
  line-height: 1.45;
  color: #475569;
}
.flow-builder-form .card-flat {
  border: 1px solid #e5e7eb;
  box-shadow: none;
}
.flow-builder-form .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}
.flow-builder-form .form-grid label.full,
.flow-builder-form .form-grid label.checkbox-row.full {
  grid-column: 1 / -1;
}
.flow-builder-form .form-grid label span {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: #475569;
}
.flow-builder-form .form-grid input,
.flow-builder-form .form-grid select,
.flow-builder-form .form-grid textarea {
  width: 100%;
}
.flow-builder-form .checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.flow-builder-form .checkbox-row span {
  margin: 0;
}
.flow-board-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: stretch;
}
.flow-board-hero-main {
  min-width: 0;
}
.flow-board-hero-main h2 {
  margin: 6px 0 8px;
  font-size: 28px;
}
.flow-board-hero-side {
  display: grid;
  gap: 10px;
  min-width: 220px;
}
.flow-board-stat {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px 16px;
  background: #f8fafc;
}
.flow-board-stat-label,
.flow-summary-label,
.flow-kv span,
.flow-board-chip span,
.flow-index-card-meta span {
  display: block;
  font-size: 12px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 4px;
}
.flow-board-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.flow-board-chip {
  border: 1px solid #dbe4ee;
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px;
}
.flow-board-chip strong,
.flow-summary-card strong,
.flow-kv strong,
.flow-index-card-meta strong {
  font-size: 15px;
  color: #0f172a;
}
.flow-tile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.flow-tile {
  border: 1px solid #e5e7eb;
  box-shadow: none;
}
.flow-tile-wide {
  grid-column: 1 / -1;
}
.flow-tile-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}
.flow-tile-form label.full,
.flow-tile-form .flow-kv.full,
.flow-tile-form label.checkbox-row.full {
  grid-column: 1 / -1;
}
.flow-kv {
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 12px 14px;
  background: #f8fafc;
}
.flow-board-footer {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}
.flow-board-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.flow-board-preview-step {
  min-width: 180px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 14px;
  background: #f8fafc;
}
.flow-board-preview-step strong {
  display: block;
  margin-bottom: 4px;
}
.flow-board-preview-arrow {
  color: #94a3b8;
  font-size: 22px;
  font-weight: 700;
}
.flow-board-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.flow-wizard {
  display: grid;
  gap: 18px;
}
.flow-wizard-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}
.flow-wizard-hero h2 {
  margin: 6px 0 8px;
  font-size: 28px;
}
.flow-wizard-hero-meta {
  display: grid;
  gap: 10px;
  min-width: 220px;
}
.flow-stepper {
  display: grid;
  gap: 14px;
}
.flow-step-shell {
  border: 1px solid #dbe4ee;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .06);
  overflow: hidden;
}
.flow-step-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px;
}
.flow-step-head h3 {
  margin: 4px 0 6px;
  font-size: 22px;
}
.flow-step-no {
  font-size: 12px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.flow-step-panel {
  padding: 0 20px 20px;
}
.flow-wizard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}
.flow-wizard-grid label.full,
.flow-wizard-grid .flow-kv.full,
.flow-wizard-grid label.checkbox-row.full {
  grid-column: 1 / -1;
}
.flow-wizard-grid label span {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: #475569;
}
.flow-wizard-grid input,
.flow-wizard-grid select,
.flow-wizard-grid textarea {
  width: 100%;
}
.flow-edit-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}
.flow-wizard-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
}
.flow-step-modal .modal-dialog {
  width: min(980px, calc(100vw - 36px));
}
.flow-step-modal-dialog {
  max-height: calc(100vh - 44px);
}
.flow-step-modal .modal-body {
  max-height: calc(100vh - 180px);
  overflow: auto;
}
.flow-step-modal .flow-step-panel {
  padding: 0;
}
.flow-wizard.is-edit-mode .flow-step-head {
  cursor: pointer;
}
.flow-wizard.is-edit-mode .flow-step-head:hover {
  background: #f8fafc;
}
.flow-wizard.is-edit-mode .flow-step-panel {
  display: none;
}
.flow-wizard[data-flow-mode="create"] .flow-step-shell {
  display: none;
}
.flow-wizard[data-flow-mode="create"] .flow-step-shell.is-active {
  display: block;
}
.flow-wizard[data-flow-mode="create"] .flow-step-head {
  padding-bottom: 8px;
}
.flow-summary-card {
  border: 1px solid #e5e7eb;
  box-shadow: none;
}
.flow-index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.flow-index-card {
  border: 1px solid #e5e7eb;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.flow-index-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.flow-index-card-head h3 {
  margin: 0 0 4px;
}
.flow-index-card-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.flow-index-card-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 8px 12px;
  align-self: flex-start;
}
.flow-index-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.flow-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.flow-pill.is-active {
  background: #dcfce7;
  color: #166534;
}
.flow-pill.is-inactive {
  background: #e5e7eb;
  color: #4b5563;
}
.table-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.table-actions form {
  margin: 0;
}
.empty-state {
  padding: 22px 0;
  color: #64748b;
}
@media (max-width: 1180px) {
  .flow-builder-layout {
    grid-template-columns: 1fr;
  }
  .flow-board-summary,
  .flow-board-summary-grid,
  .flow-tile-grid,
  .flow-tile-form,
  .flow-wizard-grid {
    grid-template-columns: 1fr;
  }
  .flow-board-hero,
  .flow-board-footer,
  .flow-wizard-hero,
  .flow-edit-footer {
    flex-direction: column;
    align-items: stretch;
  }
}
.sidebar-user-link {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-weight: 600;
  padding: 6px 4px;
  border-radius: 8px;
}
.sidebar-user-link:hover {
  background: var(--sidebar-hover-bg);
  text-decoration: none;
}
.desktop-downloads-dialog {
  width: min(760px, calc(100vw - 24px));
}
.desktop-downloads-intro {
  margin: 0 0 14px;
  color: #6b7280;
}
.desktop-downloads-list {
  display: grid;
  gap: 12px;
}
.desktop-download-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
  padding: 14px;
}
.desktop-download-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.desktop-download-head i {
  width: 18px;
  text-align: center;
  color: #4b5563;
}
.desktop-download-title {
  font-weight: 700;
  color: #111827;
}
.desktop-download-meta,
.desktop-download-howto {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
}
.desktop-download-howto {
  margin-top: 8px;
}
.desktop-download-actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.desktop-download-empty {
  padding: 14px;
  border: 1px dashed #d1d5db;
  border-radius: 12px;
  color: #6b7280;
  background: #f9fafb;
}
.sidebar-resizer {
  width: 4px;
  margin-left: -4px;
  cursor: col-resize;
  z-index: 30;
  position: relative;
}
.sidebar-resizer::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 3px;
  width: 2px;
  background: transparent;
  transition: background .12s ease;
}
.sidebar-resizer:hover::before {
  background: color-mix(in srgb, var(--color-primary, #0071e3) 34%, var(--sidebar-bg));
}
body.sidebar-resizing {
  user-select: none;
  cursor: col-resize;
}
body.sidebar-collapsed .sidebar-resizer {
  display: none;
}

/* View Widget: Code-Repos */
.code-repo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
}
.code-repo-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid #dbe2ea;
  border-radius: 12px;
  background: #ffffff;
  padding: 12px;
  color: #0f172a;
  text-decoration: none;
}
.code-repo-card:hover {
  text-decoration: none;
  border-color: #c2cfde;
  box-shadow: 0 8px 20px rgba(15,23,42,0.08);
}
.code-repo-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.code-repo-title {
  font-size: 16px;
  font-weight: 700;
}
.code-repo-slug {
  font-size: 12px;
  color: #64748b;
}
.code-repo-desc {
  font-size: 13px;
  color: #334155;
}
.code-repo-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #475569;
}
.code-repo-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

button>i{
padding-right: 3px;
}
.item-content-stage {
  position: relative;
}

.realtime-collab {
  position: fixed;
  right: 16px;
  bottom: 72px;
  z-index: 96;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  pointer-events: none;
}

.realtime-collab-status {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(420px, calc(100vw - 48px));
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.92);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(10px);
  pointer-events: auto;
}

.realtime-collab-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #16a34a;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.10);
  flex: 0 0 auto;
}

.realtime-collab-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.realtime-collab-copy strong {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}

.realtime-collab-copy span {
  font-size: 11px;
  color: #64748b;
}

.realtime-collab-avatars {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.realtime-avatar {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  overflow: hidden;
  margin-left: -5px;
  border: 1px solid #fff;
  background: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: #0f172a;
}

.realtime-avatar:first-child {
  margin-left: 0;
}

.realtime-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.realtime-collab-toast-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  pointer-events: none;
  order: 1;
}

.realtime-collab-toast {
  transform: translateY(2px);
  opacity: 0;
  transition: opacity .18s ease, transform .18s ease;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #475569;
  font-size: 11px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.realtime-collab-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.realtime-collab-status {
  order: 2;
}

.realtime-cursor-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 12;
  overflow: hidden;
}

.content-shell {
  position: relative;
}

.realtime-remote-cursor,
.realtime-title-cursor {
  position: absolute;
  pointer-events: none;
  z-index: 1201;
}

.realtime-title-cursor {
  position: fixed;
}

.realtime-remote-caret,
.realtime-title-caret {
  width: 2px;
  background: #2563eb;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.realtime-remote-label,
.realtime-title-label {
  display: inline-block;
  margin-top: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .realtime-collab {
    right: 12px;
    left: 12px;
    bottom: 72px;
    align-items: stretch;
  }

  .realtime-collab-status {
    max-width: none;
  }

  .realtime-collab-toast-stack {
    align-items: stretch;
  }
}




a.btn > i {
  padding-right: 5px;
}

.sidebar-wiki-link {
  padding: 5px !important;
  margin: 0px !important;

}

.orbitone-read-only-banner {
  margin: 12px 0;
  border-left: 4px solid #f59e0b;
}

.card-soft {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.is-disabled-row {
  opacity: 0.58;
}

.billing-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 12px;
  align-items: start;
}

.billing-sidebar {
  display: grid;
  gap: 12px;
}

.billing-headline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.billing-plan-name {
  font-size: 28px;
  font-weight: 800;
}

.billing-plan-status {
  font-size: 20px;
  font-weight: 700;
}

.billing-usage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.billing-stat-number {
  font-size: 22px;
  font-weight: 800;
}

.billing-section-title {
  margin-top: 16px;
  font-size: 16px;
  font-weight: 700;
}

.billing-addon-form {
  display: grid;
  gap: 10px;
}

.billing-addon-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 140px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid #e5e7eb;
}

.billing-addon-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.billing-addon-name {
  font-weight: 700;
  margin-bottom: 4px;
}

.billing-addon-input input {
  width: 100%;
}

.billing-addon-meta {
  display: grid;
  gap: 4px;
  font-size: 13px;
  color: #475569;
}

@media (max-width: 960px) {
  .billing-grid {
    grid-template-columns: 1fr;
  }

  .billing-usage-grid {
    grid-template-columns: 1fr;
  }

  .billing-addon-row {
    grid-template-columns: 1fr;
  }
}

.sidebar-org-menu-panel a.is-disabled,
.btn.is-disabled {
  opacity: .5;
  pointer-events: none;
}

.ticket-detail-grid,
.ticket-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.ticket-thread-card {
  margin-bottom: 16px;
}

.ticket-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.ticket-meta-grid .meta-key {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
}

.ticket-meta-grid .meta-val {
  font-weight: 600;
}

.ticket-thread-list,
.ticket-activity-list,
.ticket-attachment-list {
  display: grid;
  gap: 12px;
}

.ticket-thread-item {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 16px;
  background: #fff;
}

.ticket-thread-item.is-internal {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.ticket-thread-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.ticket-thread-body {
  color: #0f172a;
  line-height: 1.6;
}

.ticket-thread-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.ticket-toolbar,
.ticket-inline-form,
.ticket-system-form .page-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

@media (max-width: 960px) {
  .ticket-detail-grid,
  .ticket-editor-grid {
    grid-template-columns: 1fr;
  }
}
