@charset "UTF-8";
:root {
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --control-accent: #5dc6cb;
  --control-accent-hover: #49aaaf;
  --overlay-backdrop: rgba(15, 23, 42, 0.55);
  --shadow-modal: 0 20px 40px -10px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

:root,
:root[data-theme=light] {
  --color-bg: #f5f6fa;
  --color-bg-muted: #f0f1f7;
  --color-bg-hover: #eef0f8;
  --color-surface: #ffffff;
  --color-input-bg: #ffffff;
  --color-border: #e2e4ea;
  --color-border-muted: #eceef4;
  --color-text: #1f2230;
  --color-text-muted: #6b7280;
  --color-fg-default: #1f2230;
  --color-fg-muted: #6b7280;
  --text-primary: #1f2230;
  --text-secondary: #6b7280;
  --text-muted: #6b7280;
  --color-primary: #5dc6cb;
  --color-primary-hover: #49aaaf;
  --color-primary-strong: #26777c;
  --color-primary-strong-hover: #1e6266;
  --color-primary-light: rgba(93, 198, 203, 0.14);
  --color-primary-tint: #eef8f8;
  --color-sidebar-bg: #f4f7f8;
  --color-success: #16a34a;
  --color-warning: #d97706;
  --color-danger: #dc2626;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 2px 8px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 8px 24px rgba(16, 24, 40, 0.12);
  --shadow-soft: 0 4px 16px rgba(16, 24, 40, 0.04);
  --shadow-hover: 0 6px 24px rgba(16, 24, 40, 0.08);
}

:root[data-theme=purple] {
  --color-bg: #f5f6fa;
  --color-bg-muted: #f0f1f7;
  --color-bg-hover: #eef0f8;
  --color-surface: #ffffff;
  --color-input-bg: #ffffff;
  --color-border: #e2e4ea;
  --color-border-muted: #eceef4;
  --color-text: #1f2230;
  --color-text-muted: #6b7280;
  --color-fg-default: #1f2230;
  --color-fg-muted: #6b7280;
  --text-primary: #1f2230;
  --text-secondary: #6b7280;
  --text-muted: #6b7280;
  --color-primary: #7c3aed;
  --color-primary-hover: #6d28d9;
  --color-primary-light: rgba(124, 58, 237, 0.12);
  --color-primary-tint: #f3e8ff;
  --color-primary-strong: #7c3aed;
  --color-primary-strong-hover: #6d28d9;
  --color-sidebar-bg: #f5f3ff;
  --color-success: #16a34a;
  --color-warning: #d97706;
  --color-danger: #dc2626;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 2px 8px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 8px 24px rgba(16, 24, 40, 0.12);
  --shadow-soft: 0 4px 16px rgba(16, 24, 40, 0.04);
  --shadow-hover: 0 6px 24px rgba(16, 24, 40, 0.08);
}

:root[data-theme=blue] {
  --color-bg: #f4f7fb;
  --color-bg-muted: #ebf1f8;
  --color-bg-hover: #e1ebf7;
  --color-surface: #ffffff;
  --color-input-bg: #ffffff;
  --color-border: #dbe4f0;
  --color-border-muted: #e6edf5;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-primary-strong: #2563eb;
  --color-primary-strong-hover: #1d4ed8;
  --color-primary-light: rgba(37, 99, 235, 0.12);
  --color-primary-tint: #eff6ff;
  --color-sidebar-bg: #f0f7ff;
  --color-success: #16a34a;
  --color-warning: #d97706;
  --color-danger: #dc2626;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 2px 8px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 4px 16px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 6px 24px rgba(15, 23, 42, 0.08);
}

:root[data-theme=green] {
  --color-bg: #f3f9f6;
  --color-bg-muted: #e6f4ed;
  --color-bg-hover: #d8eee3;
  --color-surface: #ffffff;
  --color-input-bg: #ffffff;
  --color-border: #d1e7dd;
  --color-border-muted: #e2f0e9;
  --color-text: #132a1e;
  --color-text-muted: #52796f;
  --color-primary: #059669;
  --color-primary-hover: #047857;
  --color-primary-strong: #059669;
  --color-primary-strong-hover: #047857;
  --color-primary-light: rgba(5, 150, 105, 0.12);
  --color-primary-tint: #ecfdf5;
  --color-sidebar-bg: #f0fdf4;
  --color-success: #16a34a;
  --color-warning: #d97706;
  --color-danger: #dc2626;
  --shadow-sm: 0 1px 2px rgba(19, 42, 30, 0.06);
  --shadow-md: 0 2px 8px rgba(19, 42, 30, 0.08);
  --shadow-lg: 0 8px 24px rgba(19, 42, 30, 0.12);
  --shadow-soft: 0 4px 16px rgba(19, 42, 30, 0.04);
  --shadow-hover: 0 6px 24px rgba(19, 42, 30, 0.08);
}

:root[data-theme=pink] {
  --color-bg: #faf4f7;
  --color-bg-muted: #f7e8ef;
  --color-bg-hover: #f3dce6;
  --color-surface: #ffffff;
  --color-input-bg: #ffffff;
  --color-border: #f0d2e0;
  --color-border-muted: #f7e4ed;
  --color-text: #2c1622;
  --color-text-muted: #835269;
  --color-primary: #db2777;
  --color-primary-hover: #be185d;
  --color-primary-strong: #db2777;
  --color-primary-strong-hover: #be185d;
  --color-primary-light: rgba(219, 39, 119, 0.12);
  --color-primary-tint: #fdf2f8;
  --color-sidebar-bg: #fff1f2;
  --color-success: #16a34a;
  --color-warning: #d97706;
  --color-danger: #dc2626;
  --shadow-sm: 0 1px 2px rgba(44, 22, 34, 0.06);
  --shadow-md: 0 2px 8px rgba(44, 22, 34, 0.08);
  --shadow-lg: 0 8px 24px rgba(44, 22, 34, 0.12);
  --shadow-soft: 0 4px 16px rgba(44, 22, 34, 0.04);
  --shadow-hover: 0 6px 24px rgba(44, 22, 34, 0.08);
}

:root[data-theme=bronze] {
  --color-bg: #faf7f2;
  --color-bg-muted: #f5ede2;
  --color-bg-hover: #efe2d1;
  --color-surface: #ffffff;
  --color-input-bg: #ffffff;
  --color-border: #e6d6c2;
  --color-border-muted: #f0e6d8;
  --color-text: #2a2218;
  --color-text-muted: #786650;
  --color-primary: #d97706;
  --color-primary-hover: #b45309;
  --color-primary-strong: #d97706;
  --color-primary-strong-hover: #b45309;
  --color-primary-light: rgba(217, 119, 6, 0.12);
  --color-primary-tint: #fffbeb;
  --color-sidebar-bg: #fdf8f0;
  --color-success: #16a34a;
  --color-warning: #d97706;
  --color-danger: #dc2626;
  --shadow-sm: 0 1px 2px rgba(42, 34, 24, 0.06);
  --shadow-md: 0 2px 8px rgba(42, 34, 24, 0.08);
  --shadow-lg: 0 8px 24px rgba(42, 34, 24, 0.12);
  --shadow-soft: 0 4px 16px rgba(42, 34, 24, 0.04);
  --shadow-hover: 0 6px 24px rgba(42, 34, 24, 0.08);
}

:root[data-theme=teal] {
  --color-bg: #f7f8fa;
  --color-bg-muted: #eef0f3;
  --color-bg-hover: #e7eaef;
  --color-surface: #ffffff;
  --color-input-bg: #ffffff;
  --color-border: #e2e4ea;
  --color-border-muted: #ebedf1;
  --color-text: #10141c;
  --color-text-muted: #5b6270;
  --color-primary: #0d9488;
  --color-primary-hover: #0f766e;
  --color-primary-strong: #0d9488;
  --color-primary-strong-hover: #0f766e;
  --color-primary-light: rgba(13, 148, 136, 0.12);
  --color-primary-tint: #ecfdf9;
  --color-sidebar-bg: #f5f7f8;
  --color-success: #16a34a;
  --color-warning: #d97706;
  --color-danger: #dc2626;
  --shadow-sm: 0 1px 2px rgba(16, 20, 28, 0.06);
  --shadow-md: 0 2px 8px rgba(16, 20, 28, 0.08);
  --shadow-lg: 0 8px 24px rgba(16, 20, 28, 0.12);
  --shadow-soft: 0 4px 16px rgba(16, 20, 28, 0.04);
  --shadow-hover: 0 6px 24px rgba(16, 20, 28, 0.08);
}

:root[data-theme=dark] {
  --color-bg: #0d1117;
  --color-bg-muted: #161b22;
  --color-bg-hover: #21262d;
  --color-surface: #161b22;
  --color-input-bg: #0d1117;
  --color-border: #30363d;
  --color-border-muted: #21262d;
  --color-text: #e6edf3;
  --color-text-muted: #8d96a0;
  --color-fg-default: #e6edf3;
  --color-fg-muted: #8d96a0;
  --text-primary: #e6edf3;
  --text-secondary: #8d96a0;
  --text-muted: #8d96a0;
  --color-primary: #4493f8;
  --color-primary-hover: #1f6feb;
  --color-primary-strong: #4493f8;
  --color-primary-strong-hover: #1f6feb;
  --color-primary-light: rgba(56, 139, 253, 0.15);
  --color-primary-tint: #1f2a44;
  --color-sidebar-bg: #12141c;
  --color-success: #3fb950;
  --color-warning: #d29922;
  --color-danger: #f85149;
  --shadow-sm: 0 1px 2px rgba(1, 4, 9, 0.5);
  --shadow-md: 0 3px 10px rgba(1, 4, 9, 0.6);
  --shadow-lg: 0 8px 24px rgba(1, 4, 9, 0.7);
  --shadow-soft: 0 4px 16px rgba(1, 4, 9, 0.35);
  --shadow-hover: 0 6px 24px rgba(1, 4, 9, 0.5);
}

:root[data-ui-version=modern] {
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

:root[data-ui-version=modern]:not([data-theme=dark]) {
  --color-bg: #f7f8fa;
  --color-bg-muted: #eef0f3;
  --color-bg-hover: #e7eaef;
  --color-surface: #ffffff;
  --color-input-bg: #ffffff;
  --color-border: #e2e4ea;
  --color-border-muted: #ebedf1;
  --color-sidebar-bg: #f4f7f8;
  --color-text: #1c2230;
  --color-text-muted: #5b6270;
  --color-text-subtle: #8a919e;
  --shadow-sm: 0 3px 5px rgba(16, 20, 28, 0.05);
  --shadow-md: 0 4px 12px rgba(16, 20, 28, 0.09);
  --shadow-lg: 0 12px 32px rgba(16, 20, 28, 0.14);
  --shadow-soft: 0 6px 20px rgba(16, 20, 28, 0.06);
  --shadow-hover: 0 10px 30px rgba(16, 20, 28, 0.12);
  --color-success-bg: #eff7f2;
  --color-success-border: #cfe6d9;
  --color-success-text: #1d7f4b;
  --color-warning-bg: #fbf6ea;
  --color-warning-border: #ecdcb8;
  --color-warning-text: #9a661a;
  --color-danger-bg: #fdf3f2;
  --color-danger-border: #f2d4d0;
  --color-danger-text: #991b1b;
  --color-info-bg: #eff4fb;
  --color-info-border: #cddef2;
  --color-info-text: #2f6fb5;
  --color-info: #2f6fb5;
}

:root[data-ui-version=modern][data-theme=dark] {
  --color-text-subtle: #6e7681;
  --control-accent-hover: color-mix(in srgb, var(--color-primary) 60%, #ffffff);
  --color-success-bg: rgba(63, 185, 80, 0.12);
  --color-success-border: rgba(63, 185, 80, 0.35);
  --color-success-text: #3fb950;
  --color-warning-bg: rgba(210, 153, 34, 0.12);
  --color-warning-border: rgba(210, 153, 34, 0.35);
  --color-warning-text: #d29922;
  --color-danger-bg: rgba(248, 81, 73, 0.12);
  --color-danger-border: rgba(248, 81, 73, 0.35);
  --color-danger-text: #f85149;
  --color-info-bg: rgba(56, 139, 253, 0.12);
  --color-info-border: rgba(56, 139, 253, 0.35);
  --color-info-text: #4493f8;
  --color-info: #4493f8;
  --shadow-xs: 0 1px 2px rgba(1, 4, 9, 0.4);
  --shadow-modal: 0 20px 40px -10px rgba(1, 4, 9, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

:root[data-ui-version=modern] {
  --control-accent: var(--color-primary);
  --control-accent-hover: var(--color-primary-hover);
}
:root[data-ui-version=modern] .btn {
  background: var(--color-bg-muted);
  border-color: var(--color-border-muted);
  font-weight: 600;
  box-shadow: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
:root[data-ui-version=modern] .btn:hover {
  background: var(--color-primary-tint);
  border-color: color-mix(in srgb, var(--color-primary) 35%, transparent);
  color: var(--color-primary);
  box-shadow: 0 2px 6px color-mix(in srgb, var(--color-primary) 12%, transparent);
  transform: translateY(-0.5px);
}
:root[data-ui-version=modern] .btn:active {
  background: color-mix(in srgb, var(--color-primary) 18%, var(--color-surface));
  box-shadow: none;
  transform: translateY(0);
}
:root[data-ui-version=modern] .btn:focus-visible {
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
:root[data-ui-version=modern] .btn--primary {
  background: var(--color-primary-strong);
  border-color: transparent;
  box-shadow: var(--shadow-sm);
}
:root[data-ui-version=modern] .btn--primary:hover {
  background: var(--color-primary-strong-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}
:root[data-ui-version=modern] .btn--primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}
:root[data-ui-version=modern] .btn--success {
  background: var(--color-success);
  border-color: transparent;
}
:root[data-ui-version=modern] .btn--success:hover {
  background: color-mix(in srgb, var(--color-success) 80%, #000);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
:root[data-ui-version=modern] .btn--success:active {
  transform: translateY(0);
  box-shadow: var(--shadow-xs);
}
:root[data-ui-version=modern] .btn--warning {
  background: var(--color-warning);
  border-color: transparent;
}
:root[data-ui-version=modern] .btn--warning:hover {
  background: color-mix(in srgb, var(--color-warning) 80%, #000);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
:root[data-ui-version=modern] .btn--warning:active {
  transform: translateY(0);
  box-shadow: var(--shadow-xs);
}
:root[data-ui-version=modern] .btn--danger {
  background: var(--color-danger);
  border-color: transparent;
}
:root[data-ui-version=modern] .btn--danger:hover {
  background: color-mix(in srgb, var(--color-danger) 80%, #000);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
:root[data-ui-version=modern] .btn--danger:active {
  transform: translateY(0);
  box-shadow: var(--shadow-xs);
}
:root[data-ui-version=modern] .btn--ink {
  background: var(--color-text);
  border-color: transparent;
}
:root[data-ui-version=modern] .btn--ink:hover {
  background: color-mix(in srgb, var(--color-text) 85%, var(--color-surface));
  color: var(--color-surface);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
:root[data-ui-version=modern] .btn--ink:active {
  transform: translateY(0);
  box-shadow: var(--shadow-xs);
}
:root[data-ui-version=modern] .btn--outline {
  background: var(--color-surface);
  border-color: var(--color-primary);
  box-shadow: none;
}
:root[data-ui-version=modern] .btn--outline:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: none;
}
:root[data-ui-version=modern] .btn--ghost {
  background: transparent;
  border-color: transparent;
}
:root[data-ui-version=modern] .btn--ghost:hover {
  background: var(--color-primary-light);
  border-color: transparent;
}
:root[data-ui-version=modern] .btn--ghost.btn--danger {
  background: transparent;
  border-color: transparent;
}
:root[data-ui-version=modern] .btn--ghost.btn--danger:hover {
  background: color-mix(in srgb, var(--color-danger) 12%, transparent);
  border-color: transparent;
  box-shadow: none;
  transform: none;
}
:root[data-ui-version=modern] .form-input:focus,
:root[data-ui-version=modern] .form-select:focus {
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
:root[data-ui-version=modern] input[type=checkbox],
:root[data-ui-version=modern] .custom-checkbox {
  border-radius: var(--radius-sm);
}
:root[data-ui-version=modern] .card {
  border: 0;
  border-radius: var(--radius-lg);
}
:root[data-ui-version=modern] .panel {
  border-color: transparent;
}
:root[data-ui-version=modern] .modal__close {
  border-radius: var(--radius-sm);
}
:root[data-ui-version=modern] .data-table {
  border-color: transparent;
  box-shadow: var(--shadow-soft);
}
:root[data-ui-version=modern] .data-table th, :root[data-ui-version=modern] .data-table td {
  border-bottom-color: var(--color-border-muted);
}
:root[data-ui-version=modern] .data-table tbody tr:hover td {
  background: var(--color-bg-hover);
}
:root[data-ui-version=modern] .panel .data-table {
  box-shadow: none;
}
:root[data-ui-version=modern] .badge--active, :root[data-ui-version=modern] .badge--green {
  background: var(--color-success-bg);
  color: var(--color-success-text);
}
:root[data-ui-version=modern] .badge--pending, :root[data-ui-version=modern] .badge--yellow {
  background: var(--color-warning-bg);
  color: var(--color-warning-text);
}
:root[data-ui-version=modern] .badge--inactive, :root[data-ui-version=modern] .badge--gray {
  background: var(--color-bg-muted);
  color: var(--color-text-muted);
}
:root[data-ui-version=modern] .badge--blue {
  background: var(--color-info-bg);
  color: var(--color-info-text);
}
:root[data-ui-version=modern] .badge--red {
  background: var(--color-danger-bg);
  color: var(--color-danger-text);
}
:root[data-ui-version=modern] .badge--purple {
  background: var(--color-primary-tint);
  color: var(--color-primary);
}
:root[data-ui-version=modern] .empty-state {
  font-style: normal;
}
:root[data-ui-version=modern] .smart-table-header {
  border-bottom-color: transparent;
}
:root[data-ui-version=modern] .smart-table-header__title-input:hover {
  background: var(--color-bg-hover);
  border-color: var(--color-border-muted);
}
:root[data-ui-version=modern] .smart-table-header__title-input:focus {
  background: var(--color-input-bg);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
:root[data-ui-version=modern] .smart-grid-wrapper {
  border-color: transparent;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}
:root[data-ui-version=modern] .smart-grid__th {
  background: var(--color-bg);
  border-bottom-color: var(--color-border-muted);
  border-right-color: var(--color-border-muted);
  color: var(--color-text-muted);
}
:root[data-ui-version=modern] .smart-grid__th--pinned {
  background: var(--color-bg);
}
:root[data-ui-version=modern] .smart-grid__td {
  border-right-color: var(--color-border-muted);
}
:root[data-ui-version=modern] .smart-grid__td--pinned {
  background: var(--color-surface);
}
:root[data-ui-version=modern] .smart-grid__tr {
  border-bottom-color: var(--color-border-muted);
}
:root[data-ui-version=modern] .smart-grid__tr:hover {
  background: var(--color-bg-hover);
}
:root[data-ui-version=modern] .smart-grid__cell-empty {
  color: var(--color-text-subtle);
}
:root[data-ui-version=modern] .smart-grid__empty-cell {
  font-style: normal;
  color: var(--color-text-muted);
}
:root[data-ui-version=modern] .smart-grid__add-col-btn:hover {
  background: var(--color-bg-hover);
}
:root[data-ui-version=modern] .smart-table-add-row-bar__btn:hover {
  background: var(--color-bg-hover);
}
:root[data-ui-version=modern] .smart-table-switch__slider {
  background-color: var(--color-border);
}
:root[data-ui-version=modern] .smart-table-cols-menu__footer {
  border-top-style: solid;
  border-top-color: var(--color-border-muted);
}

:root[data-theme=dark] .data-table th,
:root[data-theme=dark] .data-table td {
  border-bottom-color: var(--color-border);
}
:root[data-theme=dark] .sd-tiles .sd-tile {
  border-color: var(--color-border);
}
:root[data-theme=dark] .sd-tiles .sd-tile:hover, :root[data-theme=dark] .sd-tiles .sd-tile:focus-visible {
  border-color: color-mix(in srgb, var(--color-primary) 45%, var(--color-border));
}
:root[data-theme=dark] .ql-editor table td,
:root[data-theme=dark] .ql-editor table th,
:root[data-theme=dark] .doc-article table td,
:root[data-theme=dark] .doc-article table th {
  border-color: var(--color-border) !important;
}
:root[data-theme=dark] .ql-editor table td[style*=background],
:root[data-theme=dark] .ql-editor table th[style*=background],
:root[data-theme=dark] .doc-article table td[style*=background],
:root[data-theme=dark] .doc-article table th[style*=background] {
  background-image: linear-gradient(rgba(13, 17, 23, 0.8), rgba(13, 17, 23, 0.8));
}
:root[data-theme=dark] .ql-editor table td[style*="background-color: #ffffff" i],
:root[data-theme=dark] .ql-editor table th[style*="background-color: #ffffff" i],
:root[data-theme=dark] .ql-editor table td[style*="background-color: #fff;" i],
:root[data-theme=dark] .ql-editor table th[style*="background-color: #fff;" i],
:root[data-theme=dark] .ql-editor table td[style$="background-color: #fff" i],
:root[data-theme=dark] .ql-editor table th[style$="background-color: #fff" i],
:root[data-theme=dark] .ql-editor table td[style*="background-color: rgb(255, 255, 255)"],
:root[data-theme=dark] .ql-editor table th[style*="background-color: rgb(255, 255, 255)"],
:root[data-theme=dark] .ql-editor table td[style*="background-color:#ffffff" i],
:root[data-theme=dark] .ql-editor table th[style*="background-color:#ffffff" i],
:root[data-theme=dark] .doc-article table td[style*="background-color: #ffffff" i],
:root[data-theme=dark] .doc-article table th[style*="background-color: #ffffff" i],
:root[data-theme=dark] .doc-article table td[style*="background-color: #fff;" i],
:root[data-theme=dark] .doc-article table th[style*="background-color: #fff;" i],
:root[data-theme=dark] .doc-article table td[style$="background-color: #fff" i],
:root[data-theme=dark] .doc-article table th[style$="background-color: #fff" i],
:root[data-theme=dark] .doc-article table td[style*="background-color: rgb(255, 255, 255)"],
:root[data-theme=dark] .doc-article table th[style*="background-color: rgb(255, 255, 255)"],
:root[data-theme=dark] .doc-article table td[style*="background-color:#ffffff" i],
:root[data-theme=dark] .doc-article table th[style*="background-color:#ffffff" i] {
  background-color: transparent !important;
  background-image: none;
}

:root[data-theme=dark] .ql-editor [style*="color: #000000" i]:not([style*=background-color]),
:root[data-theme=dark] .ql-editor [style*="color: #000000" i][style*="background-color: transparent"],
:root[data-theme=dark] .doc-article [style*="color: #000000" i]:not([style*=background-color]),
:root[data-theme=dark] .doc-article [style*="color: #000000" i][style*="background-color: transparent"] {
  color: inherit !important;
}
:root[data-theme=dark] .ql-editor [style*="color:#000000" i]:not([style*=background-color]),
:root[data-theme=dark] .ql-editor [style*="color:#000000" i][style*="background-color: transparent"],
:root[data-theme=dark] .doc-article [style*="color:#000000" i]:not([style*=background-color]),
:root[data-theme=dark] .doc-article [style*="color:#000000" i][style*="background-color: transparent"] {
  color: inherit !important;
}
:root[data-theme=dark] .ql-editor [style*="color: #000;" i]:not([style*=background-color]),
:root[data-theme=dark] .ql-editor [style*="color: #000;" i][style*="background-color: transparent"],
:root[data-theme=dark] .doc-article [style*="color: #000;" i]:not([style*=background-color]),
:root[data-theme=dark] .doc-article [style*="color: #000;" i][style*="background-color: transparent"] {
  color: inherit !important;
}
:root[data-theme=dark] .ql-editor [style*="color: rgb(0, 0, 0)" i]:not([style*=background-color]),
:root[data-theme=dark] .ql-editor [style*="color: rgb(0, 0, 0)" i][style*="background-color: transparent"],
:root[data-theme=dark] .doc-article [style*="color: rgb(0, 0, 0)" i]:not([style*=background-color]),
:root[data-theme=dark] .doc-article [style*="color: rgb(0, 0, 0)" i][style*="background-color: transparent"] {
  color: inherit !important;
}
:root[data-theme=dark] .ql-editor [style*="color: #212121" i]:not([style*=background-color]),
:root[data-theme=dark] .ql-editor [style*="color: #212121" i][style*="background-color: transparent"],
:root[data-theme=dark] .doc-article [style*="color: #212121" i]:not([style*=background-color]),
:root[data-theme=dark] .doc-article [style*="color: #212121" i][style*="background-color: transparent"] {
  color: inherit !important;
}
:root[data-theme=dark] .ql-editor [style*="color: rgb(33, 33, 33)" i]:not([style*=background-color]),
:root[data-theme=dark] .ql-editor [style*="color: rgb(33, 33, 33)" i][style*="background-color: transparent"],
:root[data-theme=dark] .doc-article [style*="color: rgb(33, 33, 33)" i]:not([style*=background-color]),
:root[data-theme=dark] .doc-article [style*="color: rgb(33, 33, 33)" i][style*="background-color: transparent"] {
  color: inherit !important;
}
:root[data-theme=dark] .ql-editor [style*="color: #222222" i]:not([style*=background-color]),
:root[data-theme=dark] .ql-editor [style*="color: #222222" i][style*="background-color: transparent"],
:root[data-theme=dark] .doc-article [style*="color: #222222" i]:not([style*=background-color]),
:root[data-theme=dark] .doc-article [style*="color: #222222" i][style*="background-color: transparent"] {
  color: inherit !important;
}
:root[data-theme=dark] .ql-editor [style*="color: #1f2328" i]:not([style*=background-color]),
:root[data-theme=dark] .ql-editor [style*="color: #1f2328" i][style*="background-color: transparent"],
:root[data-theme=dark] .doc-article [style*="color: #1f2328" i]:not([style*=background-color]),
:root[data-theme=dark] .doc-article [style*="color: #1f2328" i][style*="background-color: transparent"] {
  color: inherit !important;
}
:root[data-theme=dark] .ql-editor [style*="color: windowtext" i]:not([style*=background-color]),
:root[data-theme=dark] .ql-editor [style*="color: windowtext" i][style*="background-color: transparent"],
:root[data-theme=dark] .doc-article [style*="color: windowtext" i]:not([style*=background-color]),
:root[data-theme=dark] .doc-article [style*="color: windowtext" i][style*="background-color: transparent"] {
  color: inherit !important;
}

*, *::before, *::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html, body {
  margin: 0;
  padding: 0;
}

html {
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Helvetica Neue", Roboto, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  font-size: 14px;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1, h2, h3 {
  margin: 0 0 12px;
  font-weight: 600;
}

:focus-visible {
  outline: 2px solid var(--color-primary) !important;
  outline-offset: 2px !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-weight: 500;
  font-size: 13px;
  line-height: 1.2;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.btn:hover {
  background: var(--color-bg);
}
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.btn--primary {
  background: var(--color-primary-strong);
  border-color: var(--color-primary-strong);
  color: #fff;
}
.btn--primary:hover {
  background: var(--color-primary-strong-hover);
  border-color: var(--color-primary-strong-hover);
}
.btn--ghost {
  background: transparent;
  border: 1px dashed var(--color-border);
}
.btn--outline {
  background: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary-strong);
}
.btn--outline:hover {
  background: var(--color-primary-light, color-mix(in srgb, var(--color-primary) 12%, transparent));
}
.btn--success {
  background: var(--color-success);
  border-color: var(--color-success);
  color: #fff;
}
.btn--success:hover {
  background: color-mix(in srgb, var(--color-success) 80%, #000);
  border-color: color-mix(in srgb, var(--color-success) 80%, #000);
}
.btn--warning {
  background: var(--color-warning);
  border-color: var(--color-warning);
  color: #fff;
}
.btn--warning:hover {
  background: color-mix(in srgb, var(--color-warning) 80%, #000);
  border-color: color-mix(in srgb, var(--color-warning) 80%, #000);
}
.btn--ink {
  background: var(--color-text);
  border-color: var(--color-text);
  color: var(--color-surface);
}
.btn--ink:hover {
  background: color-mix(in srgb, var(--color-text) 85%, var(--color-surface));
  border-color: color-mix(in srgb, var(--color-text) 85%, var(--color-surface));
}
.btn--sm {
  padding: 5px 10px;
  font-size: 12.5px;
}
.btn--block {
  width: 100%;
  justify-content: center;
}

.ui-flex-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.ui-flex-header > .field__label,
.ui-flex-header > .task-section__title {
  margin-bottom: 0;
}

.ui-flex-fill {
  flex: 1;
}

.stt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.stt-btn:hover:not(:disabled) {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-primary-strong);
}
.stt-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.stt-btn:disabled {
  cursor: not-allowed;
}
.stt-btn--recording {
  background: color-mix(in srgb, var(--color-danger) 12%, transparent);
  border-color: var(--color-danger);
  color: var(--color-danger);
  animation: stt-pulse 1.4s ease-in-out infinite;
}
.stt-btn--busy {
  color: var(--color-primary-strong);
  cursor: wait;
}
.stt-btn--blocked, .stt-btn--unsupported {
  opacity: 0.45;
  cursor: not-allowed;
}
.stt-btn__spinner {
  animation: stt-spin 0.8s linear infinite;
}

@keyframes stt-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-danger) 35%, transparent);
  }
  50% {
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--color-danger) 0%, transparent);
  }
}
@keyframes stt-spin {
  to {
    transform: rotate(360deg);
  }
}
select {
  appearance: none;
  -webkit-appearance: none;
  padding: 8px 30px 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-input-bg, var(--color-surface)) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5l3.5 3.5 3.5-3.5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  background-size: 10px;
  color: var(--color-text);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
select:hover {
  border-color: color-mix(in srgb, var(--color-text-muted) 60%, var(--color-border));
}
select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

select:not([multiple]):not([size]):not(.users-filter-pill__select, .user-role-select, .user-modal__role-pill-select, .user-modal__dept-select, .month-item-name, .month-item-year) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5l3.5 3.5 3.5-3.5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px;
  padding-right: 28px;
}
select:not([multiple]):not([size]):not(.users-filter-pill__select, .user-role-select, .user-modal__role-pill-select, .user-modal__dept-select, .month-item-name, .month-item-year).is-open {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 7.5l3.5-3.5 3.5 3.5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

select:not([multiple]):not([size]):not(.users-filter-pill__select, .user-role-select, .user-modal__role-pill-select, .user-modal__dept-select, .month-item-name, .month-item-year):open {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 7.5l3.5-3.5 3.5 3.5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.field {
  display: block;
  margin-bottom: 14px;
}
.field__label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}
.field input:not([type=checkbox]):not([type=radio]):not([type=color]), .field textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-input-bg, var(--color-surface));
  color: var(--color-text);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.field input:not([type=checkbox]):not([type=radio]):not([type=color])::placeholder, .field textarea::placeholder {
  color: var(--color-text-muted);
  opacity: 0.8;
}
.field input:not([type=checkbox]):not([type=radio]):not([type=color]):focus, .field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.field input[type=color] {
  width: 56px;
  height: 36px;
  padding: 2px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-input-bg, var(--color-surface));
  cursor: pointer;
}
.field input[type=color]:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.field select {
  width: 100%;
}
.field textarea {
  min-height: 80px;
  resize: vertical;
}
.field--fill {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.field--checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text);
}

input[type=checkbox],
.custom-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  margin: 0;
  cursor: pointer;
  vertical-align: middle;
  background-color: var(--color-surface, #ffffff);
  border: 1.5px solid var(--color-border, #d0d7de);
  border-radius: 5px;
  display: inline-grid;
  place-content: center;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  outline: none;
  transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}
input[type=checkbox]::before,
.custom-checkbox::before {
  content: "";
  width: 11px;
  height: 11px;
  transform: scale(0);
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  background-color: #ffffff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z'/%3E%3C/svg%3E") no-repeat center/contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z'/%3E%3C/svg%3E") no-repeat center/contain;
}
input[type=checkbox]:hover:not(:disabled),
.custom-checkbox:hover:not(:disabled) {
  border-color: var(--color-primary, #6366f1);
  background-color: var(--color-bg-hover, #f8f9fc);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--control-accent, #6366f1) 12%, transparent);
}
input[type=checkbox]:focus-visible,
.custom-checkbox:focus-visible {
  border-color: var(--color-primary, #6366f1);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--control-accent, #6366f1) 28%, transparent);
}
input[type=checkbox]:active:not(:disabled),
.custom-checkbox:active:not(:disabled) {
  transform: scale(0.9);
}
input[type=checkbox]:checked,
.custom-checkbox:checked {
  background-color: var(--color-primary, #6366f1);
  border-color: var(--color-primary, #6366f1);
  box-shadow: 0 1px 3px color-mix(in srgb, var(--control-accent, #6366f1) 35%, transparent);
}
input[type=checkbox]:checked::before,
.custom-checkbox:checked::before {
  transform: scale(1);
}
input[type=checkbox]:checked:hover:not(:disabled),
.custom-checkbox:checked:hover:not(:disabled) {
  background-color: var(--color-primary-hover, #4f46e5);
  border-color: var(--color-primary-hover, #4f46e5);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--control-accent, #6366f1) 20%, transparent), 0 2px 4px color-mix(in srgb, var(--control-accent, #6366f1) 40%, transparent);
}
input[type=checkbox]:indeterminate,
.custom-checkbox:indeterminate {
  background-color: var(--color-primary, #6366f1);
  border-color: var(--color-primary, #6366f1);
}
input[type=checkbox]:indeterminate::before,
.custom-checkbox:indeterminate::before {
  transform: scale(1);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M2 8a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 8Z'/%3E%3C/svg%3E") no-repeat center/contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M2 8a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 8Z'/%3E%3C/svg%3E") no-repeat center/contain;
}
input[type=checkbox]:disabled,
.custom-checkbox:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background-color: var(--color-bg-subtle, #f1f3f5);
  border-color: var(--color-border, #d0d7de);
  box-shadow: none;
}

input[type=radio],
.custom-radio {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  margin: 0;
  cursor: pointer;
  vertical-align: middle;
  background-color: var(--color-surface, #ffffff);
  border: 1.5px solid var(--color-border, #d0d7de);
  border-radius: 50%;
  display: inline-grid;
  place-content: center;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  outline: none;
  transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}
input[type=radio]::before,
.custom-radio::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  background-color: #ffffff;
}
input[type=radio]:hover:not(:disabled),
.custom-radio:hover:not(:disabled) {
  border-color: var(--color-primary, #6366f1);
  background-color: var(--color-bg-hover, #f8f9fc);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--control-accent, #6366f1) 12%, transparent);
}
input[type=radio]:focus-visible,
.custom-radio:focus-visible {
  border-color: var(--color-primary, #6366f1);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--control-accent, #6366f1) 28%, transparent);
}
input[type=radio]:active:not(:disabled),
.custom-radio:active:not(:disabled) {
  transform: scale(0.9);
}
input[type=radio]:checked,
.custom-radio:checked {
  background-color: var(--color-primary, #6366f1);
  border-color: var(--color-primary, #6366f1);
  box-shadow: 0 1px 3px color-mix(in srgb, var(--control-accent, #6366f1) 35%, transparent);
}
input[type=radio]:checked::before,
.custom-radio:checked::before {
  transform: scale(1);
}
input[type=radio]:checked:hover:not(:disabled),
.custom-radio:checked:hover:not(:disabled) {
  background-color: var(--color-primary-hover, #4f46e5);
  border-color: var(--color-primary-hover, #4f46e5);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--control-accent, #6366f1) 20%, transparent), 0 2px 4px color-mix(in srgb, var(--control-accent, #6366f1) 40%, transparent);
}
input[type=radio]:disabled,
.custom-radio:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background-color: var(--color-bg-subtle, #f1f3f5);
  border-color: var(--color-border, #d0d7de);
  box-shadow: none;
}

[data-theme=dark] input[type=checkbox],
[data-theme=dark] .custom-checkbox,
[data-theme=dark] input[type=radio],
[data-theme=dark] .custom-radio {
  background-color: var(--color-surface, #161b22);
  border-color: var(--color-border, #30363d);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
[data-theme=dark] input[type=checkbox]:hover:not(:disabled),
[data-theme=dark] .custom-checkbox:hover:not(:disabled),
[data-theme=dark] input[type=radio]:hover:not(:disabled),
[data-theme=dark] .custom-radio:hover:not(:disabled) {
  border-color: var(--control-accent-hover, #818cf8);
  background-color: color-mix(in srgb, var(--control-accent-hover, #818cf8) 8%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--control-accent-hover, #818cf8) 18%, transparent);
}
[data-theme=dark] input[type=checkbox]:focus-visible,
[data-theme=dark] .custom-checkbox:focus-visible,
[data-theme=dark] input[type=radio]:focus-visible,
[data-theme=dark] .custom-radio:focus-visible {
  border-color: var(--control-accent-hover, #818cf8);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--control-accent-hover, #818cf8) 30%, transparent);
}
[data-theme=dark] input[type=checkbox]:checked, [data-theme=dark] input[type=checkbox]:indeterminate,
[data-theme=dark] .custom-checkbox:checked,
[data-theme=dark] .custom-checkbox:indeterminate,
[data-theme=dark] input[type=radio]:checked,
[data-theme=dark] input[type=radio]:indeterminate,
[data-theme=dark] .custom-radio:checked,
[data-theme=dark] .custom-radio:indeterminate {
  background-color: var(--control-accent, #6366f1);
  border-color: var(--control-accent, #6366f1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4), 0 0 8px color-mix(in srgb, var(--control-accent, #6366f1) 40%, transparent);
}
[data-theme=dark] input[type=checkbox]:checked:hover:not(:disabled), [data-theme=dark] input[type=checkbox]:indeterminate:hover:not(:disabled),
[data-theme=dark] .custom-checkbox:checked:hover:not(:disabled),
[data-theme=dark] .custom-checkbox:indeterminate:hover:not(:disabled),
[data-theme=dark] input[type=radio]:checked:hover:not(:disabled),
[data-theme=dark] input[type=radio]:indeterminate:hover:not(:disabled),
[data-theme=dark] .custom-radio:checked:hover:not(:disabled),
[data-theme=dark] .custom-radio:indeterminate:hover:not(:disabled) {
  background-color: var(--control-accent-hover, #818cf8);
  border-color: var(--control-accent-hover, #818cf8);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--control-accent-hover, #818cf8) 25%, transparent), 0 0 12px color-mix(in srgb, var(--control-accent-hover, #818cf8) 50%, transparent);
}
[data-theme=dark] input[type=checkbox]:disabled,
[data-theme=dark] .custom-checkbox:disabled,
[data-theme=dark] input[type=radio]:disabled,
[data-theme=dark] .custom-radio:disabled {
  background-color: rgba(255, 255, 255, 0.04);
  border-color: #30363d;
}

.password-input-row {
  display: flex;
  gap: 8px;
}
.password-input-row input {
  flex: 1;
  min-width: 0;
}
@media (max-width: 640px) {
  .password-input-row {
    flex-wrap: wrap;
  }
  .password-input-row input {
    flex: 1 1 100%;
  }
  .password-input-row #js-generate-password {
    flex: 1;
    justify-content: center;
  }
}

.field-row--2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

input[type=date],
input[type=datetime-local],
input[type=time] {
  color-scheme: light dark;
  color: var(--color-text);
  background: var(--color-surface);
}
input[type=date]::-webkit-datetime-edit,
input[type=datetime-local]::-webkit-datetime-edit,
input[type=time]::-webkit-datetime-edit {
  color: var(--color-text);
}
input[type=date]::-webkit-datetime-edit-fields-wrapper,
input[type=datetime-local]::-webkit-datetime-edit-fields-wrapper,
input[type=time]::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
}
input[type=date]::-webkit-datetime-edit-text, input[type=date]::-webkit-datetime-edit-month-field, input[type=date]::-webkit-datetime-edit-day-field, input[type=date]::-webkit-datetime-edit-year-field, input[type=date]::-webkit-datetime-edit-hour-field, input[type=date]::-webkit-datetime-edit-minute-field,
input[type=datetime-local]::-webkit-datetime-edit-text,
input[type=datetime-local]::-webkit-datetime-edit-month-field,
input[type=datetime-local]::-webkit-datetime-edit-day-field,
input[type=datetime-local]::-webkit-datetime-edit-year-field,
input[type=datetime-local]::-webkit-datetime-edit-hour-field,
input[type=datetime-local]::-webkit-datetime-edit-minute-field,
input[type=time]::-webkit-datetime-edit-text,
input[type=time]::-webkit-datetime-edit-month-field,
input[type=time]::-webkit-datetime-edit-day-field,
input[type=time]::-webkit-datetime-edit-year-field,
input[type=time]::-webkit-datetime-edit-hour-field,
input[type=time]::-webkit-datetime-edit-minute-field {
  color: var(--color-text);
}
input[type=date]::-webkit-datetime-edit-text:focus, input[type=date]::-webkit-datetime-edit-month-field:focus, input[type=date]::-webkit-datetime-edit-day-field:focus, input[type=date]::-webkit-datetime-edit-year-field:focus, input[type=date]::-webkit-datetime-edit-hour-field:focus, input[type=date]::-webkit-datetime-edit-minute-field:focus,
input[type=datetime-local]::-webkit-datetime-edit-text:focus,
input[type=datetime-local]::-webkit-datetime-edit-month-field:focus,
input[type=datetime-local]::-webkit-datetime-edit-day-field:focus,
input[type=datetime-local]::-webkit-datetime-edit-year-field:focus,
input[type=datetime-local]::-webkit-datetime-edit-hour-field:focus,
input[type=datetime-local]::-webkit-datetime-edit-minute-field:focus,
input[type=time]::-webkit-datetime-edit-text:focus,
input[type=time]::-webkit-datetime-edit-month-field:focus,
input[type=time]::-webkit-datetime-edit-day-field:focus,
input[type=time]::-webkit-datetime-edit-year-field:focus,
input[type=time]::-webkit-datetime-edit-hour-field:focus,
input[type=time]::-webkit-datetime-edit-minute-field:focus {
  background: color-mix(in srgb, var(--color-primary) 20%, transparent);
  color: var(--color-text);
  border-radius: 2px;
}
input[type=date]::-webkit-calendar-picker-indicator,
input[type=datetime-local]::-webkit-calendar-picker-indicator,
input[type=time]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.6;
  border-radius: 3px;
  padding: 2px;
  transition: opacity 0.12s, background 0.12s;
}
input[type=date]::-webkit-calendar-picker-indicator:hover,
input[type=datetime-local]::-webkit-calendar-picker-indicator:hover,
input[type=time]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
  background: var(--color-bg);
}

[data-theme=dark] input[type=date]::-webkit-calendar-picker-indicator,
[data-theme=dark] input[type=datetime-local]::-webkit-calendar-picker-indicator,
[data-theme=dark] input[type=time]::-webkit-calendar-picker-indicator {
  filter: invert(0.8);
}

.alert {
  display: block;
  position: relative;
  padding: 13px 16px 13px 44px;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-text-muted);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 13px;
  line-height: 1.55;
}
.alert::before {
  position: absolute;
  left: 14px;
  top: 14px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}
.alert--info {
  border-left-color: var(--color-primary);
  background: var(--color-primary-tint, rgba(124, 58, 237, 0.06));
}
.alert--info::before {
  content: "i";
  background: var(--color-primary);
}
.alert--error {
  border-left-color: var(--color-danger);
  background: color-mix(in srgb, var(--color-danger) 8%, var(--color-surface));
}
.alert--error::before {
  content: "✕";
  background: var(--color-danger);
}
.alert--success {
  border-left-color: var(--color-success);
  background: color-mix(in srgb, var(--color-success) 8%, var(--color-surface));
}
.alert--success::before {
  content: "✓";
  background: var(--color-success);
}

.dialog {
  border: 0;
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-hover);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 420px;
  max-width: 90vw;
}
.dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
}
.dialog__form h2 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}
.dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}
.dialog--wide {
  width: 80vw;
  max-width: 1000px;
  height: 80vh;
  display: none;
}
.dialog--wide[open] {
  display: flex;
  flex-direction: column;
}
.dialog--wide .dialog__form {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.dialog--wide .dialog__body {
  flex-grow: 1;
  overflow-y: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding-right: 8px; /* for scrollbar */
}

.empty-state {
  color: var(--color-text-muted);
  font-style: italic;
}

.empty-state--panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 48px 20px;
  font-style: normal;
  text-align: center;
}
.empty-state--panel .empty-state__icon {
  font-size: 26px;
  opacity: 0.55;
}
.empty-state--panel .empty-state__text {
  font-size: 13px;
  color: var(--color-text-muted);
}

.panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border-muted);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 22px;
  margin-bottom: 20px;
}
.panel__title {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
}
.panel--danger {
  border-color: color-mix(in srgb, var(--color-danger) 30%, var(--color-border));
  box-shadow: none;
}

.danger-zone__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.danger-zone__row p {
  margin: 4px 0 0;
}

.doc-icon {
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
  vertical-align: -0.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn--danger {
  background: var(--color-danger);
  color: #fff;
  border-color: var(--color-danger);
}
.btn--danger:hover {
  background: color-mix(in srgb, var(--color-danger) 80%, #000);
  border-color: color-mix(in srgb, var(--color-danger) 80%, #000);
}
.btn--danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn--ghost.btn--danger {
  background: transparent;
  color: var(--color-danger);
  border: 1px dashed var(--color-danger);
}
.btn--ghost.btn--danger:hover {
  background: color-mix(in srgb, var(--color-danger) 12%, transparent);
  border-style: solid;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
}
.data-table th, .data-table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
  font-size: 13.5px;
}
.data-table th {
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.03em;
}
.data-table tr:last-child td {
  border-bottom: none;
}
.data-table select {
  padding: 4px 8px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-bg);
  color: var(--color-text);
}

.data-table__empty {
  padding: 24px 14px !important;
  text-align: center;
  color: var(--color-text-muted);
}

.text-muted {
  color: var(--color-text-muted);
}

.task-list-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.task-list-filters__select, .task-list-filters__date {
  padding: 7px 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 13px;
}
.task-list-filters__search {
  flex: 1;
  min-width: 160px;
  padding: 7px 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 13px;
}
.task-list-filters__checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-muted);
  cursor: pointer;
}

.task-list-wrap {
  overflow-x: auto;
}

.task-list-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border: 1px solid var(--color-border-muted);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  font-size: 13px;
}
.task-list-table th, .task-list-table td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
.task-list-table th {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--color-bg);
}
.task-list-table tr:last-child td {
  border-bottom: none;
}
.task-list-table__col-unread {
  width: 28px;
  padding-left: 10px;
  padding-right: 10px;
}
.task-list-table__col-priority {
  width: 132px;
  padding-right: 4px;
}
.task-list-table__th-title {
  display: flex;
  align-items: center;
  gap: 4px;
}
.task-list-table#js-task-list-table {
  table-layout: fixed;
  min-width: 1000px;
}
.task-list-table#js-task-list-table th, .task-list-table#js-task-list-table td {
  overflow: hidden;
}
.task-list-table#js-task-list-table .task-list-table__col-category {
  width: 150px;
}
.task-list-table#js-task-list-table .task-list-table__col-importance {
  width: 92px;
}
.task-list-table#js-task-list-table .task-list-table__col-assignee {
  width: 170px;
}
.task-list-table#js-task-list-table .task-list-table__col-due {
  width: 110px;
}
.task-list-table#js-task-list-table .task-list-table__col-status {
  width: 165px;
}

@media (max-width: 768px) {
  .task-list-table th, .task-list-table td {
    padding: 12px 14px;
  }
  .task-list-table th[data-col=project], .task-list-table td[data-col=project],
  .task-list-table th[data-col=status], .task-list-table td[data-col=status],
  .task-list-table th[data-col=priority], .task-list-table td[data-col=priority],
  .task-list-table th[data-col=created], .task-list-table td[data-col=created],
  .task-list-table .task-list-table__col-priority {
    display: none !important;
  }
}
.task-list-row {
  transition: background 0.1s ease;
}
.task-list-row:hover {
  background: var(--color-bg);
}
.task-list-row--done td {
  opacity: 0.55;
}
.task-list-row--priority-low > td:first-child {
  box-shadow: inset 3px 0 0 0 #94a3b8;
}
.task-list-row--priority-medium > td:first-child {
  box-shadow: inset 3px 0 0 0 #60a5fa;
}
.task-list-row--priority-high > td:first-child {
  box-shadow: inset 3px 0 0 0 #fbbf24;
}
.task-list-row--priority-urgent > td:first-child {
  box-shadow: inset 3px 0 0 0 #f87171;
}
.task-list-row__title {
  color: var(--color-text);
  font-weight: 600;
}
.task-list-row__title:hover {
  color: var(--color-primary-strong);
}

.tl-category-header td {
  padding: 8px 14px;
  background: var(--color-bg);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}
.tl-category-header__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.tl-category-header__name {
  vertical-align: middle;
}
.tl-category-header__count {
  margin-left: 6px;
  color: var(--color-text-muted);
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
}

.task-overdue {
  color: #ef4444;
  font-weight: 600;
}

.task-list-row__title-input {
  width: 100%;
  border: 1px solid var(--color-primary);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 13px;
  font-weight: 500;
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary) 20%, transparent);
}
.task-list-row__title-input:focus {
  outline: none;
}

.task-list-row__open {
  display: inline;
  font-size: 11px;
  color: transparent;
  margin-left: 4px;
  text-decoration: none;
  transition: color 0.15s;
}
.task-list-row__open:hover {
  color: var(--color-primary-strong);
}
.task-list-row:hover .task-list-row__open {
  color: var(--color-text-muted);
}

.tl-editable {
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}
.tl-editable .tl-cell-hint {
  opacity: 0;
  font-size: 10px;
  color: var(--color-text-muted);
  margin-left: 4px;
  transition: opacity 0.1s;
}
.tl-editable:hover .tl-cell-hint {
  opacity: 1;
}
.tl-editable .tl-cell-value--empty {
  color: var(--color-text-muted);
}
.tl-editable:hover .tl-cell-value--empty {
  color: var(--color-primary-strong);
}

.tl-avatar {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary-strong);
  font-size: 11px;
  font-weight: bold;
}

.ui-icon {
  flex-shrink: 0;
  vertical-align: -0.125em;
}

.tl-avatar--empty {
  background: transparent;
  border: 1px dashed var(--color-text-muted);
  color: var(--color-text-muted);
  opacity: 0.6;
}

.tl-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  font-size: 11px;
  color: var(--color-text-muted);
  background: var(--color-bg);
  padding: 3px 7px;
  border-radius: 12px;
  white-space: nowrap;
}

.tl-status-checkbox {
  margin: 0;
  cursor: pointer;
  width: 16px;
  height: 16px;
}

.tl-subtasks-row td {
  padding: 8px 24px 12px 40px !important;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.tl-subtasks-row td:nth-child(1) {
  padding-left: 24px !important;
}
.tl-subtasks-row td:nth-child(2) {
  padding-left: 24px !important;
}

.tl-popup {
  position: absolute;
  z-index: 1200;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  min-width: 180px;
  max-height: 260px;
  overflow-y: auto;
}
.tl-popup__item {
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  color: var(--color-text);
}
.tl-popup__item:hover {
  background: var(--color-bg);
}
.tl-popup__item--active {
  font-weight: 600;
  color: var(--color-primary-strong);
}
.tl-popup__date-wrap {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 220px;
}
.tl-popup__date-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}
.tl-popup__date-input {
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 13px;
  background: var(--color-bg);
  color: var(--color-text);
}
.tl-popup__date-input:focus {
  outline: none;
  border-color: var(--color-primary);
}
.tl-popup__date-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.tl-popup__date-clear {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  color: var(--color-text-muted);
  padding: 4px 6px;
  border-radius: 4px;
}
.tl-popup__date-clear:hover {
  color: var(--color-danger);
  background: color-mix(in srgb, var(--color-danger) 10%, transparent);
}

.tl-checkbox {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.tl-checkbox__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.tl-checkbox__box {
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-border);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s;
}
.tl-checkbox__box::after {
  content: "";
  display: none;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
}
.tl-checkbox__input:checked + .tl-checkbox__box {
  background: #22c55e;
  border-color: #22c55e;
}
.tl-checkbox__input:checked + .tl-checkbox__box::after {
  display: block;
}
.tl-checkbox:hover .tl-checkbox__box {
  border-color: #22c55e;
}

.task-list-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge--active, .badge--green {
  background: #dcfce7;
  color: #166534;
}
.badge--pending, .badge--yellow {
  background: #fef9c3;
  color: #854d0e;
}
.badge--inactive, .badge--gray {
  background: #f3f4f6;
  color: #6b7280;
}
.badge--blue {
  background: #dbeafe;
  color: #1d4ed8;
}
.badge--red {
  background: #fee2e2;
  color: #991b1b;
}
.badge--purple {
  background: #ede9fe;
  color: #6d28d9;
}
[data-theme=dark] .badge--active, [data-theme=dark] .badge--green {
  background: rgba(22, 163, 74, 0.2);
  color: #4ade80;
}
[data-theme=dark] .badge--inactive, [data-theme=dark] .badge--gray {
  background: rgba(107, 114, 128, 0.2);
  color: #9ca3af;
}
[data-theme=dark] .badge--blue {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}
[data-theme=dark] .badge--red {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}
[data-theme=dark] .badge--yellow {
  background: rgba(234, 179, 8, 0.2);
  color: #fbbf24;
}

/* Custom uploaded app logo (replaces text wordmark when set) */
.app-logo-image {
  max-height: 32px;
  width: auto;
  display: block;
}

.auth-card__logo .app-logo-image {
  max-height: 48px;
  margin: 0 auto;
}

/* Performer badge */
.performer-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 6px;
  border-radius: 8px;
  background: var(--color-bg-muted);
  color: var(--color-text-muted);
  font-size: 11px;
}

/* ── Convert-to-recurring dialog hint ───────────────────────────── */
.dialog__hint {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.field__hint {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--color-text-muted);
}
.field__hint code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--color-bg-muted);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 11px;
}

.field input:not([type=checkbox]):not([type=radio]):not([type=color]).is-invalid,
.field textarea.is-invalid,
.field select.is-invalid,
input.is-invalid,
textarea.is-invalid,
select.is-invalid {
  border-color: var(--color-danger);
}
.field input:not([type=checkbox]):not([type=radio]):not([type=color]).is-invalid:focus,
.field textarea.is-invalid:focus,
.field select.is-invalid:focus,
input.is-invalid:focus,
textarea.is-invalid:focus,
select.is-invalid:focus {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-danger) 20%, transparent);
}

.field__error {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-danger);
  animation: field-error-in 0.15s ease-out;
}
.field__error::before {
  content: "✕";
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 700;
  color: #fff;
  background: var(--color-danger);
}

@keyframes field-error-in {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ── UI/UX: Иконка повторяющейся задачи (Канбан, списки) ──────── */
.recurring-icon {
  width: 14px;
  height: 14px;
  margin-right: 6px;
  vertical-align: text-bottom;
  color: var(--indigo, #8b5cf6); /* Primer / GitHub Style fallback */
  flex-shrink: 0;
  /* Приглушенный золотой для темной темы или по желанию (альтернатива) */
}
:root[data-theme=dark] .recurring-icon {
  color: var(--gold, #d29922);
}

.badge--indigo {
  background-color: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 2px 6px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}
:root[data-theme=dark] .badge--indigo {
  background-color: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
  border-color: rgba(139, 92, 246, 0.4);
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 5px;
}

.form-hint {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--color-text-muted);
}

.form-input,
.form-select {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-input-bg, var(--color-surface));
  color: var(--color-text);
  font-size: 13.5px;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-light);
}

textarea.form-input {
  min-height: 80px;
  resize: vertical;
}

.inbox-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inbox-day-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 2px 2px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.inbox-day-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-border-muted);
}
.inbox-day-divider:first-child {
  margin-top: 0;
}

.inbox-item {
  --accent: var(--color-text-muted);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid color-mix(in srgb, var(--color-border) 70%, transparent);
  border-left: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
  transition: background 0.12s ease, border-color 0.12s ease;
}
.inbox-item:hover {
  background: var(--color-bg-hover);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--color-border));
}
.inbox-item:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}
.inbox-item--moved {
  --accent: var(--color-success);
}
.inbox-item--comment_added {
  --accent: #60a5fa;
}
.inbox-item--assignees_changed {
  --accent: var(--color-primary);
}
.inbox-item--assignees_changed .inbox-item__type-badge {
  background: color-mix(in srgb, var(--accent) 28%, transparent);
}
.inbox-item__avatar {
  width: 28px;
  height: 28px;
  margin-top: 1px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}
.inbox-item__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.inbox-item__row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.inbox-item__type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  padding: 3px 7px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
  white-space: nowrap;
}
.inbox-item__text {
  min-width: 0;
  font-size: 13px;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inbox-item__text code {
  font-size: 11px;
  padding: 1px 4px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--color-text-muted) 14%, transparent);
}
.inbox-item__project {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.inbox-item__time {
  flex-shrink: 0;
  padding-top: 2px;
  font-size: 11px;
  color: var(--color-text-muted);
  white-space: nowrap;
}

@media (max-width: 768px) {
  .inbox-item {
    flex-wrap: wrap;
  }
  .inbox-item__row {
    flex-wrap: wrap;
    row-gap: 4px;
  }
  .inbox-item__text {
    white-space: normal;
  }
  .inbox-item__time {
    margin-left: 40px;
  }
}
.all-tasks-table .at-col-dot {
  width: 132px;
  padding-right: 4px;
}
.all-tasks-table .at-col-project {
  width: 160px;
  color: var(--color-text-muted);
  font-size: 12px;
}
.all-tasks-table .at-col-category {
  width: 130px;
}
.all-tasks-table .at-col-assignee {
  width: 160px;
}
.all-tasks-table .at-col-creator {
  width: 160px;
}
.all-tasks-table .at-col-due {
  width: 110px;
}
.all-tasks-table .at-col-status {
  width: 36px;
  text-align: center;
}
.all-tasks-table .at-col-del {
  width: 36px;
  text-align: right;
  padding-right: 8px;
}

.cat-chip__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cat-color, var(--color-text-muted));
  margin-right: 6px;
  vertical-align: baseline;
}
.cat-chip.btn--ghost {
  border-style: solid;
  border-color: color-mix(in srgb, var(--cat-color) 30%, var(--color-border));
}
.cat-chip.btn--ghost:hover {
  background: color-mix(in srgb, var(--cat-color) 10%, transparent);
  border-color: color-mix(in srgb, var(--cat-color) 50%, var(--color-border));
}
.cat-chip.btn--primary {
  background: color-mix(in srgb, var(--cat-color) 16%, transparent);
  border-color: color-mix(in srgb, var(--cat-color) 45%, transparent);
  color: var(--cat-color);
  font-weight: 600;
}
.cat-chip.btn--primary:hover {
  background: color-mix(in srgb, var(--cat-color) 24%, transparent);
}
.cat-chip.btn--primary .cat-chip__dot {
  background: var(--cat-color);
}

.at-title-link {
  color: var(--color-text);
  font-weight: 600;
  text-decoration: none;
}
.at-title-link:hover {
  color: var(--color-primary-strong);
}

.at-row--done td {
  opacity: 0.5;
}
.at-row--priority-low > td:first-child {
  box-shadow: inset 3px 0 0 0 #94a3b8;
}
.at-row--priority-medium > td:first-child {
  box-shadow: inset 3px 0 0 0 #60a5fa;
}
.at-row--priority-high > td:first-child {
  box-shadow: inset 3px 0 0 0 #fbbf24;
}
.at-row--priority-urgent > td:first-child {
  box-shadow: inset 3px 0 0 0 #f87171;
}
.at-row .at-del-btn {
  opacity: 0;
  background: none;
  border: none;
  color: var(--color-danger);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  transition: opacity 0.1s, background 0.1s;
}
.at-row .at-del-btn:hover {
  background: color-mix(in srgb, var(--color-danger) 12%, transparent);
}
.at-row:hover .at-del-btn {
  opacity: 1;
}

.at-inline-view {
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 13px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.at-inline-view:hover {
  background: var(--color-bg);
}

.tl-date-icon {
  display: inline-block;
  margin-right: 2px;
}

.at-inline-input,
.at-inline-select {
  font-size: 12px;
  padding: 3px 6px;
  border: 1px solid var(--color-primary);
  border-radius: 4px;
  background: var(--color-surface);
  color: var(--color-text);
  width: 100%;
  outline: none;
}

.at-overdue {
  color: #ef4444;
  font-weight: 600;
}

.at-done-badge {
  font-size: 14px;
  color: #22c55e;
}

.sla-tile:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.at-view-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  margin-bottom: 16px;
  background: var(--color-primary-tint);
  border: 1px solid color-mix(in srgb, var(--color-primary) 30%, transparent);
  border-radius: 8px;
  font-size: 13px;
  color: var(--color-text);
}
.at-view-banner strong {
  color: var(--color-primary-strong);
}

.at-group {
  margin-bottom: 28px;
}
.at-group__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 2px 12px;
  margin-bottom: 10px;
  border-bottom: 2px solid var(--proj-color, var(--color-primary));
}
.at-group__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--proj-color, var(--color-primary));
  flex-shrink: 0;
}
.at-group__name {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.at-group__name:hover {
  color: var(--proj-color, var(--color-primary));
}
.at-group__count {
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 500;
}
.at-group__table {
  margin-bottom: 8px;
}
.at-group__add {
  font-size: 13px;
}

.fm-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.fm-type-tabs {
  display: flex;
  gap: 4px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 3px;
}

.fm-type-tab {
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: background 0.1s, color 0.1s;
}
.fm-type-tab:hover {
  color: var(--color-text);
}
.fm-type-tab--active {
  background: var(--color-surface);
  color: var(--color-text);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.fm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.fm-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.1s;
}
.fm-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.fm-item__thumb {
  height: 140px;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}
.fm-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}
.fm-item__thumb img:hover {
  transform: scale(1.03);
}
.fm-item__icon {
  font-size: 40px;
}
.fm-item__info {
  padding: 10px 12px 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}
.fm-item__name {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fm-item__meta {
  font-size: 11px;
  color: var(--color-text-muted);
}
.fm-item__date {
  font-size: 11px;
  color: var(--color-text-muted);
}
.fm-item__task-link {
  color: var(--color-primary-strong);
  text-decoration: none;
}
.fm-item__task-link:hover {
  text-decoration: underline;
}
.fm-item__actions {
  padding: 6px 12px 10px;
  display: flex;
  justify-content: flex-end;
}

.fm-lightbox {
  border: none;
  border-radius: 0;
  padding: 0;
  max-width: 100vw;
  max-height: 100vh;
  width: 100vw;
  height: 100vh;
  background: transparent;
}
.fm-lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
}
.fm-lightbox::backdrop {
  background: transparent;
}
.fm-lightbox__close {
  position: fixed;
  top: 16px;
  right: 20px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fm-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.toggle__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle__input:checked + .toggle__track {
  background: var(--color-primary);
}
.toggle__input:checked + .toggle__track::after {
  transform: translateX(20px);
}
.toggle__track {
  width: 44px;
  height: 24px;
  background: var(--color-border);
  border-radius: 12px;
  transition: background 0.2s;
  position: relative;
}
.toggle__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s;
}

.feature-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
}
.feature-row:last-child {
  border-bottom: none;
}
.feature-row__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.feature-row__label {
  font-size: 14px;
  font-weight: 600;
}
.feature-row__desc {
  font-size: 12px;
  color: var(--color-text-muted);
}

.settings-layout {
  display: flex;
  align-items: flex-start;
  gap: 32px;
}

.settings-sidebar {
  flex: 0 0 180px;
  position: sticky;
  top: 28px;
}

.settings-content {
  flex: 1;
  min-width: 0;
}

.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.settings-nav__tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13.5px;
  color: var(--color-text-muted);
  white-space: nowrap;
  transition: background 0.1s ease, color 0.1s ease;
}
.settings-nav__tab svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  flex-shrink: 0;
  opacity: 0.7;
}
.settings-nav__tab:hover {
  background: var(--color-bg-hover, var(--color-bg));
  color: var(--color-text);
}
.settings-nav__tab:hover svg {
  opacity: 1;
}
.settings-nav__tab--active {
  background: color-mix(in srgb, var(--color-primary) 12%, transparent);
  color: var(--color-primary-strong);
  font-weight: 600;
}
.settings-nav__tab--active svg {
  opacity: 1;
}

.roles-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.roles-list__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
}
.roles-list__swatch {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
}
.roles-list__label {
  font-weight: 600;
  font-size: 14px;
  min-width: 120px;
}
.roles-list__key {
  font-size: 12px;
  color: var(--color-text-muted);
  background: var(--color-border);
  padding: 2px 6px;
  border-radius: 4px;
  min-width: 70px;
}
.roles-list__color-input {
  width: 38px;
  height: 32px;
  padding: 2px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
}
.roles-list__label-input {
  flex: 1;
  max-width: 200px;
}

.tl-cell-value {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.tl-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
  background: var(--color-bg);
  border: 1px solid color-mix(in srgb, currentColor 28%, var(--color-border));
}
.tl-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: currentColor;
}

[data-theme=dark] .tl-badge {
  border-color: color-mix(in srgb, currentColor 38%, var(--color-border));
}

.tl-badge--gray {
  color: var(--color-text-muted);
}

.tl-badge--blue {
  color: #3b82f6;
}

.tl-badge--orange {
  color: #f59e0b;
}

.tl-badge--purple {
  color: #8b5cf6;
}

.tl-badge--green {
  color: #10b981;
}

.tl-badge--red {
  color: #ef4444;
}

.tl-badge--project::before {
  display: none;
}

.tl-badge--category {
  max-width: calc(100% - 14px);
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.task-list-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}
.task-list-tabs__btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.12s ease, border-color 0.12s ease;
}
.task-list-tabs__btn:hover {
  color: var(--color-text);
}
.task-list-tabs__btn--active {
  color: var(--color-primary-strong);
  border-bottom-color: var(--color-primary);
}

.tl-dropdown {
  position: relative;
  display: inline-block;
}
.tl-dropdown__panel {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 50;
  min-width: 200px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
}
.tl-dropdown__title {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 8px 8px;
}
.tl-dropdown__item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 8px;
  font-size: 13px;
  color: var(--color-text);
  background: transparent;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
.tl-dropdown__item:hover {
  background: var(--color-bg);
}
.tl-dropdown__item--active {
  background: var(--color-primary-light);
  color: var(--color-primary-strong);
  font-weight: 500;
}
.tl-dropdown__toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  font-size: 13px;
  color: var(--color-text);
  cursor: pointer;
  border-radius: 5px;
}
.tl-dropdown__toggle:hover {
  background: var(--color-bg);
}
.tl-dropdown__toggle input[type=checkbox] {
  width: 15px;
  height: 15px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

@keyframes pulse {
  0% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.6;
  }
}
.unread-mention-indicator {
  display: inline-block;
  color: var(--color-danger, #f85149);
  animation: pulse 2s infinite ease-in-out;
  font-size: 14px;
  vertical-align: middle;
}

.trash-list {
  display: flex;
  flex-direction: column;
}

.trash-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 6px;
  border-bottom: 1px solid var(--color-border-muted);
  transition: background 0.12s ease;
}
.trash-row:last-child {
  border-bottom: none;
}
.trash-row:hover {
  background: var(--color-bg-hover);
}
.trash-row__type {
  flex-shrink: 0;
}
.trash-row__title {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.trash-row__name {
  font-weight: 500;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trash-row__parent {
  font-size: 12px;
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trash-row__time {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--color-text-muted);
  text-align: right;
  white-space: nowrap;
}
.trash-row__actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 640px) {
  .trash-row {
    flex-wrap: wrap;
  }
  .trash-row__time {
    order: 3;
    margin-left: 40px;
    text-align: left;
  }
  .trash-row__actions {
    order: 4;
    margin-left: auto;
  }
}
.logs-list {
  display: flex;
  flex-direction: column;
}

.log-entry {
  padding: 10px 6px;
  border-bottom: 1px solid var(--color-border-muted);
}
.log-entry:last-child {
  border-bottom: none;
}
.log-entry__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}
.log-entry__time {
  font-size: 12px;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.log-entry__message {
  font-size: 13px;
  color: var(--color-text);
  overflow-wrap: anywhere;
}
.log-entry__trace {
  margin: 6px 0 0;
  padding: 8px 10px;
  background: var(--color-bg-hover);
  border-radius: 6px;
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-text-muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 320px;
  overflow-y: auto;
}

.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(360px, 100vw - 32px);
  pointer-events: none;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(16px);
  }
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-text-muted);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  padding: 12px 12px 12px 14px;
  font-size: 13px;
  color: var(--color-text);
  animation: toast-in 0.18s ease-out;
}
.toast--leaving {
  animation: toast-out 0.15s ease-in forwards;
}
.toast--success {
  border-left-color: var(--color-success);
}
.toast--error {
  border-left-color: var(--color-danger);
}
.toast--info {
  border-left-color: var(--color-primary);
}
.toast--warning {
  border-left-color: #9a6700;
}
.toast__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}
.toast--success .toast__icon {
  background: var(--color-success);
}
.toast--error .toast__icon {
  background: var(--color-danger);
}
.toast--info .toast__icon {
  background: var(--color-primary);
}
.toast--warning .toast__icon {
  background: #9a6700;
}
.toast__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.toast__text {
  line-height: 1.4;
  word-break: break-word;
}
.toast__action {
  align-self: flex-start;
  background: none;
  border: 1px solid currentColor;
  color: inherit;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  opacity: 0.9;
}
.toast__action:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.06);
}
@media (max-width: 640px) {
  .toast__action {
    min-height: 40px;
    padding: 8px 14px;
    font-size: 13px;
  }
}
.toast__close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.toast__close:hover {
  color: var(--color-text);
}

[data-theme=dark] .toast--warning {
  border-left-color: #d29922;
}
[data-theme=dark] .toast--warning .toast__icon {
  background: #d29922;
}

.confirm-dialog {
  width: 380px;
}
.confirm-dialog__message {
  color: var(--color-text-muted);
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 4px;
  white-space: pre-line;
}

@media (max-width: 640px) {
  .toast-container {
    top: auto;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    left: 16px;
    right: 16px;
    max-width: none;
  }
}
.task-404 {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 64px 20px;
  max-width: 420px;
  margin: 0 auto;
}
.task-404__illustration {
  margin-bottom: 8px;
  animation: task-404-float 3.2s ease-in-out infinite;
}
.task-404__paper {
  fill: var(--color-bg);
  stroke: var(--color-border);
  stroke-width: 2;
}
.task-404__line {
  stroke: var(--color-border);
  stroke-width: 3;
  stroke-linecap: round;
}
.task-404__glass {
  fill: color-mix(in srgb, var(--color-primary) 10%, transparent);
  stroke: var(--color-primary);
  stroke-width: 3;
}
.task-404__handle {
  stroke: var(--color-primary);
  stroke-width: 4;
  stroke-linecap: round;
}
.task-404__mark {
  stroke: var(--color-danger);
  stroke-width: 2.5;
  stroke-linecap: round;
}
.task-404__title {
  font-size: 20px;
  font-weight: 700;
  margin: 8px 0 4px;
  color: var(--color-text);
}
.task-404__text {
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 24px;
}
.task-404__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

@keyframes task-404-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}
.theme-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.15s ease;
}
.theme-option__swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.theme-option:hover {
  border-color: var(--color-primary);
  background: var(--color-bg-hover);
}
.theme-option.is-active {
  border-color: var(--color-primary);
  background: var(--color-primary-tint);
  color: var(--color-primary-strong);
  font-weight: 600;
  box-shadow: 0 0 0 2px var(--color-primary-light);
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  background: var(--overlay-backdrop, rgba(15, 23, 42, 0.55));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalBackdropFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalBackdropFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes modalScaleIn {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.modal {
  background: var(--color-surface);
  color: var(--color-text);
  border: 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal--sm {
  max-width: 420px;
}
.modal--md {
  max-width: 540px;
}
.modal--lg {
  max-width: 720px;
}
.modal__header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--color-border-muted);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  position: relative;
}
.modal__header-content {
  display: flex;
  align-items: center;
  gap: 14px;
}
.modal__icon-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-primary) 12%, var(--color-surface));
  color: var(--color-primary-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.modal__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text, #0f172a);
  margin: 0;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.modal__subtitle {
  font-size: 13px;
  color: var(--color-text-muted, #64748b);
  margin: 3px 0 0;
  line-height: 1.4;
}
.modal__close {
  background: transparent;
  border: none;
  color: var(--color-text-muted, #94a3b8);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}
.modal__close:hover {
  background: var(--color-bg-hover, #f1f5f9);
  color: var(--color-text, #0f172a);
}
.modal__body {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.modal__footer {
  padding: 16px 24px;
  border-top: 1px solid var(--color-border-muted);
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.space-slug-preview {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-border, #cbd5e1);
  border-radius: 10px;
  overflow: hidden;
  background: var(--color-surface, #ffffff);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.space-slug-preview:focus-within {
  border-color: var(--color-primary, #6366f1);
  box-shadow: 0 0 0 3px var(--color-primary-light, rgba(99, 102, 241, 0.15));
}
.space-slug-preview__prefix {
  padding: 9px 12px;
  background: var(--color-bg, #f8fafc);
  color: var(--color-text-muted, #64748b);
  font-size: 13px;
  font-weight: 500;
  border-right: 1px solid var(--color-border, #e2e8f0);
  user-select: none;
}
.space-slug-preview__input {
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 9px 12px !important;
  flex: 1;
}

.space-icon-selector__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.space-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--color-border, #cbd5e1);
  background: var(--color-surface, #ffffff);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}
.space-icon-btn:hover {
  border-color: var(--color-primary, #6366f1);
  background: var(--color-primary-tint, #eeedfe);
  transform: translateY(-1px);
}
.space-icon-btn.is-selected {
  border-color: var(--color-primary, #6366f1);
  background: var(--color-primary-tint, #eeedfe);
  box-shadow: 0 0 0 3px var(--color-primary-light, rgba(99, 102, 241, 0.15));
}

.scroll-top-btn {
  position: fixed;
  right: 29px;
  bottom: 152px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border, #d0d7de);
  background: var(--color-surface, #ffffff);
  color: var(--color-text-muted, #64748b);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.05);
  z-index: 9998;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.scroll-top-btn:hover {
  color: var(--color-primary-strong);
  border-color: var(--color-primary, #0969da);
  background: var(--color-surface, #ffffff);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(9, 105, 218, 0.25), 0 2px 6px rgba(0, 0, 0, 0.08);
}
.scroll-top-btn:active {
  transform: scale(0.95);
}

/* ─── Панель Telegram-интеграции (журнал ошибок, каналы заявок) ─────────── */
.tg-panel {
  margin-bottom: 20px;
}

.tg-panel__head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tg-panel__intro {
  margin: 6px 0 14px;
  max-width: 640px;
}

.tg-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: normal;
}

.tg-check input {
  margin: 0;
}

.tg-link-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--color-bg-muted);
}

.tg-bound-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tg-link-code {
  font-size: 0.95rem;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  user-select: all;
}

.tg-link-box--pending {
  flex-direction: column;
  align-items: flex-start;
}

.tg-qr {
  align-self: center;
  padding: 8px;
  background: #fff;
  border-radius: var(--radius-md);
}
.tg-qr img, .tg-qr canvas, .tg-qr table {
  display: block;
}

:root[data-ui-version=modern] .inbox-item {
  border-color: transparent;
  border-left: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}
:root[data-ui-version=modern] .inbox-item:hover {
  background: var(--color-surface);
  border-color: transparent;
  border-left-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: var(--shadow-hover);
}
:root[data-ui-version=modern] .inbox-item__type-badge {
  border-radius: var(--radius-sm);
}

.smart-table-header__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.smart-table-header__title-row .smart-table-header__title-input {
  flex: 1 1 220px;
  min-width: 0;
}

.smart-table-header__title-actions {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
}
.smart-table-header__title-actions[hidden] {
  display: none;
}
.smart-table-header__title-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.smart-table-header__title-actions .btn .doc-icon {
  width: 16px;
  height: 16px;
}
@media (max-width: 768px) {
  .smart-table-header__title-actions .btn {
    min-height: 40px;
  }
}

body .ql-toolbar.ql-snow {
  position: sticky;
  top: 52px;
  z-index: 100;
  border: 1px solid var(--color-border);
  border-radius: 8px 8px 0 0;
  background: var(--color-surface);
  padding: 6px 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Helvetica Neue", Roboto, sans-serif;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
body .ql-container.ql-snow {
  border: 1px solid var(--color-border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  background: var(--color-input-bg);
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Helvetica Neue", Roboto, sans-serif;
  font-size: 14px;
}
body .ql-editor {
  min-height: 80px;
  line-height: 1.6;
  padding: 10px 12px;
}
body .ql-editor.ql-blank::before {
  color: var(--color-text-muted);
  opacity: 0.75;
  font-style: normal;
  left: 12px;
  right: 12px;
}
body .ql-snow a {
  color: var(--color-primary-strong);
}
body .ql-snow .ql-stroke {
  stroke: var(--color-text-muted);
}
body .ql-snow .ql-stroke-miter {
  stroke: var(--color-text-muted);
}
body .ql-snow .ql-fill,
body .ql-snow .ql-stroke.ql-fill {
  fill: var(--color-text-muted);
}
body .ql-snow .ql-picker {
  color: var(--color-text-muted);
}
body .ql-snow.ql-toolbar button,
body .ql-snow .ql-toolbar button {
  border-radius: 5px;
  color: var(--color-text);
  transition: background 0.1s ease, color 0.1s ease;
}
body .ql-snow.ql-toolbar button:hover,
body .ql-snow .ql-toolbar button:hover {
  background: var(--color-bg-hover);
  color: var(--color-primary-strong);
}
body .ql-snow.ql-toolbar button.ql-active,
body .ql-snow .ql-toolbar button.ql-active {
  background: var(--color-primary-light);
  color: var(--color-primary-strong);
}
body .ql-snow.ql-toolbar button:hover .ql-stroke,
body .ql-snow.ql-toolbar button:focus .ql-stroke,
body .ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke {
  stroke: var(--color-text);
}
body .ql-snow.ql-toolbar button:hover .ql-fill,
body .ql-snow.ql-toolbar button:focus .ql-fill,
body .ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill {
  fill: var(--color-text);
}
body .ql-snow.ql-toolbar button.ql-active .ql-stroke,
body .ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,
body .ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke {
  stroke: var(--color-primary);
}
body .ql-snow.ql-toolbar button.ql-active .ql-fill,
body .ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill,
body .ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill {
  fill: var(--color-primary);
}
body .ql-snow.ql-toolbar .ql-picker-label:hover,
body .ql-snow.ql-toolbar .ql-picker-label.ql-active,
body .ql-snow.ql-toolbar .ql-picker-item:hover,
body .ql-snow.ql-toolbar .ql-picker-item.ql-selected {
  color: var(--color-primary-strong);
}
body .ql-toolbar.ql-snow .ql-picker-options {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  padding: 4px;
}
body .ql-snow .ql-picker.ql-expanded .ql-picker-label {
  border-color: var(--color-border);
  border-radius: 5px;
  color: var(--color-text);
}
body .ql-snow .ql-picker.ql-expanded .ql-picker-options {
  border-color: var(--color-border);
}
body .ql-snow .ql-picker-item {
  border-radius: 5px;
  padding: 3px 6px;
}
body .ql-snow .ql-picker-item:hover {
  background: var(--color-bg-hover);
}
body .ql-snow .ql-tooltip {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  color: var(--color-text);
  z-index: 30;
}
body .ql-snow .ql-tooltip::before {
  content: "Перейти:" !important;
  font-weight: 500;
}
body .ql-snow .ql-tooltip.ql-editing[data-mode=link]::before {
  content: "Ссылка:" !important;
  font-weight: 500;
}
body .ql-snow .ql-tooltip.ql-editing[data-mode=formula]::before {
  content: "Формула:" !important;
}
body .ql-snow .ql-tooltip.ql-editing[data-mode=video]::before {
  content: "Видео:" !important;
}
body .ql-snow .ql-tooltip input[type=text] {
  background: var(--color-input-bg);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  color: var(--color-text);
  min-width: 200px;
}
body .ql-snow .ql-tooltip input[type=text]:focus {
  outline: none;
  border-color: var(--color-primary);
}
body .ql-snow .ql-tooltip a.ql-action::after {
  content: "Изменить" !important;
}
body .ql-snow .ql-tooltip.ql-editing a.ql-action::after {
  content: "Сохранить" !important;
  font-weight: 600;
}
body .ql-snow .ql-tooltip a.ql-remove::after {
  content: "Удалить" !important;
}
body .ql-snow .ql-tooltip .ql-action,
body .ql-snow .ql-tooltip .ql-remove {
  color: var(--color-primary-strong);
}
body .ql-snow .ql-tooltip .ql-tooltip__autocomplete {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  width: 380px;
  max-width: 90vw;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  white-space: normal;
  z-index: 100;
  max-height: 280px;
  overflow-y: auto;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
body .ql-snow .ql-tooltip .ql-tooltip__autocomplete-header {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
  padding: 6px 10px 4px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2px;
}
body .ql-snow .ql-tooltip .ql-tooltip__autocomplete-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 6px;
  border: none;
  background: transparent;
  text-align: left;
  width: 100%;
  cursor: pointer;
  font-size: 13px;
  color: var(--color-text);
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
}
body .ql-snow .ql-tooltip .ql-tooltip__autocomplete-item:hover, body .ql-snow .ql-tooltip .ql-tooltip__autocomplete-item.is-active {
  background: var(--color-bg-hover);
  color: var(--color-primary-strong);
}
body .ql-snow .ql-tooltip .ql-tooltip__autocomplete-item .ql-tooltip__autocomplete-icon {
  font-size: 14px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
body .ql-snow .ql-tooltip .ql-tooltip__autocomplete-item .ql-tooltip__autocomplete-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
body .ql-snow .ql-tooltip .ql-tooltip__autocomplete-item .ql-tooltip__autocomplete-title {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body .ql-snow .ql-tooltip .ql-tooltip__autocomplete-item .ql-tooltip__autocomplete-space {
  font-size: 11px;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body .ql-snow .ql-tooltip .ql-tooltip__autocomplete-empty {
  padding: 12px 10px;
  text-align: center;
  font-size: 12px;
  color: var(--color-text-muted);
}
body .ql-snow .ql-tooltip .ql-tooltip__autocomplete-loading {
  padding: 10px;
  text-align: center;
  font-size: 12px;
  color: var(--color-text-muted);
}

body .ql-editor iframe.ql-video {
  display: block;
  width: 100%;
  max-width: 720px;
  aspect-ratio: 16/9;
  height: auto;
  border-radius: var(--radius-md, 8px);
  border: none;
  background-color: var(--color-bg-subtle, #f6f8fa);
  box-shadow: var(--shadow-soft, 0 2px 8px rgba(0, 0, 0, 0.06));
  margin: 1.5rem auto;
}

@media (max-width: 820px) {
  body .ql-editor iframe.ql-video {
    max-width: 100%;
    margin: 1rem auto;
  }
}
#js-task-quill {
  flex-grow: 1;
  min-height: 150px;
}

.task-desc-wrap .ql-editor {
  min-height: 96px;
}

.ql-image-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
  padding: 8px;
  background: var(--color-bg-muted);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}
.ql-image-gallery__thumb {
  width: 180px !important;
  height: 120px !important;
  object-fit: cover !important;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  cursor: zoom-in;
  transition: opacity 0.12s;
}
.ql-image-gallery__thumb:hover {
  opacity: 0.85;
}

.slash-menu,
.mention-menu {
  position: absolute;
  z-index: 1000;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  width: 250px;
  max-height: 320px;
  overflow-y: auto;
  padding: 4px;
}

.slash-menu__item,
.mention-menu__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 6px;
  font-size: 13px;
  color: var(--color-text);
  transition: background 0.1s ease;
}
.slash-menu__item:hover, .slash-menu__item.is-active,
.mention-menu__item:hover,
.mention-menu__item.is-active {
  background: var(--color-bg-hover);
}

.slash-menu__hint {
  color: var(--color-text-muted);
  font-size: 12px;
  font-family: monospace;
}

.mention-menu__avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-border);
  flex-shrink: 0;
}

.mention-node {
  color: var(--color-primary-strong);
  font-weight: 500;
  background: rgba(99, 102, 241, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

.source-view-panel {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-input-bg);
  overflow: hidden;
}
.source-view-panel__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: var(--color-bg-muted);
  border-bottom: 1px solid var(--color-border);
}
.source-view-panel__hint {
  font-size: 13px;
  color: var(--color-text-muted);
}
.source-view-panel__actions {
  display: flex;
  gap: 8px;
}
.source-view-panel__apply, .source-view-panel__cancel {
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 13px;
  padding: 4px 10px;
  cursor: pointer;
}
.source-view-panel__apply:hover, .source-view-panel__cancel:hover {
  background: var(--color-bg-hover);
}
.source-view-panel__apply:disabled, .source-view-panel__cancel:disabled {
  opacity: 0.6;
  cursor: default;
}
.source-view-panel__apply {
  color: var(--color-primary-strong);
}
.source-view-panel__textarea {
  display: block;
  width: 100%;
  min-height: 400px;
  border: none;
  outline: none;
  resize: vertical;
  padding: 12px;
  background: transparent;
  color: var(--color-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
}

.img-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.88);
  align-items: center;
  justify-content: center;
}
.img-lightbox--open {
  display: flex;
}
.img-lightbox__img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
}
.img-lightbox__close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 6px;
}
.img-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  font-size: 32px;
  line-height: 1;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.12s;
}
.img-lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.25);
}
.img-lightbox__nav--prev {
  left: 16px;
}
.img-lightbox__nav--next {
  right: 16px;
}

body .doc-article,
body .doc-page__content,
body .doc-content,
body .markdown-body,
body #js-doc-readonly,
body #js-doc-readonly.ql-editor,
body #js-doc-editor-wrap .ql-editor,
body #js-doc-editor .ql-editor {
  padding: 28px 44px 36px;
  box-sizing: border-box;
  font-size: 15.5px;
  line-height: 1.75;
}
@media (max-width: 1200px) {
  body .doc-article,
  body .doc-page__content,
  body .doc-content,
  body .markdown-body,
  body #js-doc-readonly,
  body #js-doc-readonly.ql-editor,
  body #js-doc-editor-wrap .ql-editor,
  body #js-doc-editor .ql-editor {
    padding: 20px 34px 28px;
  }
}
@media (max-width: 768px) {
  body .doc-article,
  body .doc-page__content,
  body .doc-content,
  body .markdown-body,
  body #js-doc-readonly,
  body #js-doc-readonly.ql-editor,
  body #js-doc-editor-wrap .ql-editor,
  body #js-doc-editor .ql-editor {
    padding: 12px 14px;
  }
}
body .doc-article > :first-child,
body .doc-page__content > :first-child,
body .doc-content > :first-child,
body .markdown-body > :first-child,
body #js-doc-readonly > :first-child,
body #js-doc-readonly.ql-editor > :first-child,
body #js-doc-editor-wrap .ql-editor > :first-child,
body #js-doc-editor .ql-editor > :first-child {
  margin-top: 0 !important;
}
body .doc-article p,
body .doc-page__content p,
body .doc-content p,
body .markdown-body p,
body #js-doc-readonly p,
body #js-doc-readonly.ql-editor p,
body #js-doc-editor-wrap .ql-editor p,
body #js-doc-editor .ql-editor p {
  margin: 0 0 14px;
}
body .doc-article h1, body .doc-article h2, body .doc-article h3, body .doc-article h4, body .doc-article h5, body .doc-article h6,
body .doc-page__content h1,
body .doc-page__content h2,
body .doc-page__content h3,
body .doc-page__content h4,
body .doc-page__content h5,
body .doc-page__content h6,
body .doc-content h1,
body .doc-content h2,
body .doc-content h3,
body .doc-content h4,
body .doc-content h5,
body .doc-content h6,
body .markdown-body h1,
body .markdown-body h2,
body .markdown-body h3,
body .markdown-body h4,
body .markdown-body h5,
body .markdown-body h6,
body #js-doc-readonly h1,
body #js-doc-readonly h2,
body #js-doc-readonly h3,
body #js-doc-readonly h4,
body #js-doc-readonly h5,
body #js-doc-readonly h6,
body #js-doc-readonly.ql-editor h1,
body #js-doc-readonly.ql-editor h2,
body #js-doc-readonly.ql-editor h3,
body #js-doc-readonly.ql-editor h4,
body #js-doc-readonly.ql-editor h5,
body #js-doc-readonly.ql-editor h6,
body #js-doc-editor-wrap .ql-editor h1,
body #js-doc-editor-wrap .ql-editor h2,
body #js-doc-editor-wrap .ql-editor h3,
body #js-doc-editor-wrap .ql-editor h4,
body #js-doc-editor-wrap .ql-editor h5,
body #js-doc-editor-wrap .ql-editor h6,
body #js-doc-editor .ql-editor h1,
body #js-doc-editor .ql-editor h2,
body #js-doc-editor .ql-editor h3,
body #js-doc-editor .ql-editor h4,
body #js-doc-editor .ql-editor h5,
body #js-doc-editor .ql-editor h6 {
  margin: 30px 0 12px;
  line-height: 1.3;
  font-weight: 700;
}
body .doc-article h1:first-child, body .doc-article h2:first-child, body .doc-article h3:first-child, body .doc-article h4:first-child, body .doc-article h5:first-child, body .doc-article h6:first-child,
body .doc-page__content h1:first-child,
body .doc-page__content h2:first-child,
body .doc-page__content h3:first-child,
body .doc-page__content h4:first-child,
body .doc-page__content h5:first-child,
body .doc-page__content h6:first-child,
body .doc-content h1:first-child,
body .doc-content h2:first-child,
body .doc-content h3:first-child,
body .doc-content h4:first-child,
body .doc-content h5:first-child,
body .doc-content h6:first-child,
body .markdown-body h1:first-child,
body .markdown-body h2:first-child,
body .markdown-body h3:first-child,
body .markdown-body h4:first-child,
body .markdown-body h5:first-child,
body .markdown-body h6:first-child,
body #js-doc-readonly h1:first-child,
body #js-doc-readonly h2:first-child,
body #js-doc-readonly h3:first-child,
body #js-doc-readonly h4:first-child,
body #js-doc-readonly h5:first-child,
body #js-doc-readonly h6:first-child,
body #js-doc-readonly.ql-editor h1:first-child,
body #js-doc-readonly.ql-editor h2:first-child,
body #js-doc-readonly.ql-editor h3:first-child,
body #js-doc-readonly.ql-editor h4:first-child,
body #js-doc-readonly.ql-editor h5:first-child,
body #js-doc-readonly.ql-editor h6:first-child,
body #js-doc-editor-wrap .ql-editor h1:first-child,
body #js-doc-editor-wrap .ql-editor h2:first-child,
body #js-doc-editor-wrap .ql-editor h3:first-child,
body #js-doc-editor-wrap .ql-editor h4:first-child,
body #js-doc-editor-wrap .ql-editor h5:first-child,
body #js-doc-editor-wrap .ql-editor h6:first-child,
body #js-doc-editor .ql-editor h1:first-child,
body #js-doc-editor .ql-editor h2:first-child,
body #js-doc-editor .ql-editor h3:first-child,
body #js-doc-editor .ql-editor h4:first-child,
body #js-doc-editor .ql-editor h5:first-child,
body #js-doc-editor .ql-editor h6:first-child {
  margin-top: 0;
}
body .doc-article h1,
body .doc-page__content h1,
body .doc-content h1,
body .markdown-body h1,
body #js-doc-readonly h1,
body #js-doc-readonly.ql-editor h1,
body #js-doc-editor-wrap .ql-editor h1,
body #js-doc-editor .ql-editor h1 {
  font-size: 1.85em;
}
body .doc-article h2,
body .doc-page__content h2,
body .doc-content h2,
body .markdown-body h2,
body #js-doc-readonly h2,
body #js-doc-readonly.ql-editor h2,
body #js-doc-editor-wrap .ql-editor h2,
body #js-doc-editor .ql-editor h2 {
  font-size: 1.45em;
  border-bottom: none;
  padding-bottom: 0;
}
body .doc-article h3,
body .doc-page__content h3,
body .doc-content h3,
body .markdown-body h3,
body #js-doc-readonly h3,
body #js-doc-readonly.ql-editor h3,
body #js-doc-editor-wrap .ql-editor h3,
body #js-doc-editor .ql-editor h3 {
  font-size: 1.2em;
}
body .doc-article h4, body .doc-article h5, body .doc-article h6,
body .doc-page__content h4,
body .doc-page__content h5,
body .doc-page__content h6,
body .doc-content h4,
body .doc-content h5,
body .doc-content h6,
body .markdown-body h4,
body .markdown-body h5,
body .markdown-body h6,
body #js-doc-readonly h4,
body #js-doc-readonly h5,
body #js-doc-readonly h6,
body #js-doc-readonly.ql-editor h4,
body #js-doc-readonly.ql-editor h5,
body #js-doc-readonly.ql-editor h6,
body #js-doc-editor-wrap .ql-editor h4,
body #js-doc-editor-wrap .ql-editor h5,
body #js-doc-editor-wrap .ql-editor h6,
body #js-doc-editor .ql-editor h4,
body #js-doc-editor .ql-editor h5,
body #js-doc-editor .ql-editor h6 {
  font-size: 1.05em;
}
body .doc-article ol, body .doc-article ul,
body .doc-page__content ol,
body .doc-page__content ul,
body .doc-content ol,
body .doc-content ul,
body .markdown-body ol,
body .markdown-body ul,
body #js-doc-readonly ol,
body #js-doc-readonly ul,
body #js-doc-readonly.ql-editor ol,
body #js-doc-readonly.ql-editor ul,
body #js-doc-editor-wrap .ql-editor ol,
body #js-doc-editor-wrap .ql-editor ul,
body #js-doc-editor .ql-editor ol,
body #js-doc-editor .ql-editor ul {
  margin: 0 0 20px;
  padding-left: 0;
}
body .doc-article ol + ul:not([class*=ql-indent-]),
body .doc-article ul + ol:not([class*=ql-indent-]),
body .doc-page__content ol + ul:not([class*=ql-indent-]),
body .doc-page__content ul + ol:not([class*=ql-indent-]),
body .doc-content ol + ul:not([class*=ql-indent-]),
body .doc-content ul + ol:not([class*=ql-indent-]),
body .markdown-body ol + ul:not([class*=ql-indent-]),
body .markdown-body ul + ol:not([class*=ql-indent-]),
body #js-doc-readonly ol + ul:not([class*=ql-indent-]),
body #js-doc-readonly ul + ol:not([class*=ql-indent-]),
body #js-doc-readonly.ql-editor ol + ul:not([class*=ql-indent-]),
body #js-doc-readonly.ql-editor ul + ol:not([class*=ql-indent-]),
body #js-doc-editor-wrap .ql-editor ol + ul:not([class*=ql-indent-]),
body #js-doc-editor-wrap .ql-editor ul + ol:not([class*=ql-indent-]),
body #js-doc-editor .ql-editor ol + ul:not([class*=ql-indent-]),
body #js-doc-editor .ql-editor ul + ol:not([class*=ql-indent-]) {
  margin-top: 24px;
}
body .doc-article li[data-list=ordered]:not([class*=ql-indent-]) + li[data-list=bullet]:not([class*=ql-indent-]),
body .doc-article li[data-list=bullet]:not([class*=ql-indent-]) + li[data-list=ordered]:not([class*=ql-indent-]),
body .doc-page__content li[data-list=ordered]:not([class*=ql-indent-]) + li[data-list=bullet]:not([class*=ql-indent-]),
body .doc-page__content li[data-list=bullet]:not([class*=ql-indent-]) + li[data-list=ordered]:not([class*=ql-indent-]),
body .doc-content li[data-list=ordered]:not([class*=ql-indent-]) + li[data-list=bullet]:not([class*=ql-indent-]),
body .doc-content li[data-list=bullet]:not([class*=ql-indent-]) + li[data-list=ordered]:not([class*=ql-indent-]),
body .markdown-body li[data-list=ordered]:not([class*=ql-indent-]) + li[data-list=bullet]:not([class*=ql-indent-]),
body .markdown-body li[data-list=bullet]:not([class*=ql-indent-]) + li[data-list=ordered]:not([class*=ql-indent-]),
body #js-doc-readonly li[data-list=ordered]:not([class*=ql-indent-]) + li[data-list=bullet]:not([class*=ql-indent-]),
body #js-doc-readonly li[data-list=bullet]:not([class*=ql-indent-]) + li[data-list=ordered]:not([class*=ql-indent-]),
body #js-doc-readonly.ql-editor li[data-list=ordered]:not([class*=ql-indent-]) + li[data-list=bullet]:not([class*=ql-indent-]),
body #js-doc-readonly.ql-editor li[data-list=bullet]:not([class*=ql-indent-]) + li[data-list=ordered]:not([class*=ql-indent-]),
body #js-doc-editor-wrap .ql-editor li[data-list=ordered]:not([class*=ql-indent-]) + li[data-list=bullet]:not([class*=ql-indent-]),
body #js-doc-editor-wrap .ql-editor li[data-list=bullet]:not([class*=ql-indent-]) + li[data-list=ordered]:not([class*=ql-indent-]),
body #js-doc-editor .ql-editor li[data-list=ordered]:not([class*=ql-indent-]) + li[data-list=bullet]:not([class*=ql-indent-]),
body #js-doc-editor .ql-editor li[data-list=bullet]:not([class*=ql-indent-]) + li[data-list=ordered]:not([class*=ql-indent-]) {
  margin-top: 24px;
}
body .doc-article ul:not(:has(li[data-list])),
body .doc-article ol:not(:has(li[data-list])),
body .doc-page__content ul:not(:has(li[data-list])),
body .doc-page__content ol:not(:has(li[data-list])),
body .doc-content ul:not(:has(li[data-list])),
body .doc-content ol:not(:has(li[data-list])),
body .markdown-body ul:not(:has(li[data-list])),
body .markdown-body ol:not(:has(li[data-list])),
body #js-doc-readonly ul:not(:has(li[data-list])),
body #js-doc-readonly ol:not(:has(li[data-list])),
body #js-doc-readonly.ql-editor ul:not(:has(li[data-list])),
body #js-doc-readonly.ql-editor ol:not(:has(li[data-list])),
body #js-doc-editor-wrap .ql-editor ul:not(:has(li[data-list])),
body #js-doc-editor-wrap .ql-editor ol:not(:has(li[data-list])),
body #js-doc-editor .ql-editor ul:not(:has(li[data-list])),
body #js-doc-editor .ql-editor ol:not(:has(li[data-list])) {
  padding-left: 1.85em;
}
body .doc-article ul:not(:has(li[data-list])) > li::marker,
body .doc-page__content ul:not(:has(li[data-list])) > li::marker,
body .doc-content ul:not(:has(li[data-list])) > li::marker,
body .markdown-body ul:not(:has(li[data-list])) > li::marker,
body #js-doc-readonly ul:not(:has(li[data-list])) > li::marker,
body #js-doc-readonly.ql-editor ul:not(:has(li[data-list])) > li::marker,
body #js-doc-editor-wrap .ql-editor ul:not(:has(li[data-list])) > li::marker,
body #js-doc-editor .ql-editor ul:not(:has(li[data-list])) > li::marker {
  color: var(--color-primary-strong);
  font-size: 1.1em;
}
body .doc-article ol:not(:has(li[data-list])) > li::marker,
body .doc-page__content ol:not(:has(li[data-list])) > li::marker,
body .doc-content ol:not(:has(li[data-list])) > li::marker,
body .markdown-body ol:not(:has(li[data-list])) > li::marker,
body #js-doc-readonly ol:not(:has(li[data-list])) > li::marker,
body #js-doc-readonly.ql-editor ol:not(:has(li[data-list])) > li::marker,
body #js-doc-editor-wrap .ql-editor ol:not(:has(li[data-list])) > li::marker,
body #js-doc-editor .ql-editor ol:not(:has(li[data-list])) > li::marker {
  color: var(--color-primary-strong);
  font-weight: 600;
  font-feature-settings: "tnum" 1;
  font-variant-numeric: tabular-nums;
}
body .doc-article li,
body .doc-page__content li,
body .doc-content li,
body .markdown-body li,
body #js-doc-readonly li,
body #js-doc-readonly.ql-editor li,
body #js-doc-editor-wrap .ql-editor li,
body #js-doc-editor .ql-editor li {
  padding-left: 1.85em;
  margin-bottom: 8px;
  line-height: 1.7;
}
body .doc-article li + li[class*=ql-indent-],
body .doc-page__content li + li[class*=ql-indent-],
body .doc-content li + li[class*=ql-indent-],
body .markdown-body li + li[class*=ql-indent-],
body #js-doc-readonly li + li[class*=ql-indent-],
body #js-doc-readonly.ql-editor li + li[class*=ql-indent-],
body #js-doc-editor-wrap .ql-editor li + li[class*=ql-indent-],
body #js-doc-editor .ql-editor li + li[class*=ql-indent-] {
  margin-top: -2px;
}
body .doc-article blockquote,
body .doc-page__content blockquote,
body .doc-content blockquote,
body .markdown-body blockquote,
body #js-doc-readonly blockquote,
body #js-doc-readonly.ql-editor blockquote,
body #js-doc-editor-wrap .ql-editor blockquote,
body #js-doc-editor .ql-editor blockquote {
  --quote-accent: var(--color-primary, #5dc6cb);
  --quote-bg: color-mix(in srgb, var(--quote-accent) 9%, var(--color-surface, #fff));
  --quote-glyph-bg: color-mix(in srgb, var(--quote-accent) 18%, var(--color-surface, #fff));
  --quote-shadow: 0 10px 24px -12px color-mix(in srgb, var(--quote-accent) 55%, transparent);
  margin: 24px 0;
  padding: 22px 28px 22px 76px;
  border: none;
  border-radius: var(--radius-lg, 12px);
  background: var(--quote-bg);
  box-shadow: var(--quote-shadow);
  color: var(--color-text, #1f2230);
  font-size: 1.08em;
  font-style: italic;
  font-weight: 500;
  line-height: 1.65;
  letter-spacing: -0.005em;
  position: relative;
  min-height: 84px;
}
body .doc-article blockquote::before,
body .doc-page__content blockquote::before,
body .doc-content blockquote::before,
body .markdown-body blockquote::before,
body #js-doc-readonly blockquote::before,
body #js-doc-readonly.ql-editor blockquote::before,
body #js-doc-editor-wrap .ql-editor blockquote::before,
body #js-doc-editor .ql-editor blockquote::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 20px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill, 999px);
  background: var(--quote-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z'/%3E%3Cpath d='M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z'/%3E%3C/svg%3E") no-repeat center/20px 20px;
  box-shadow: 0 0 0 6px var(--quote-glyph-bg);
  pointer-events: none;
  z-index: 1;
}
body .doc-article blockquote::after,
body .doc-page__content blockquote::after,
body .doc-content blockquote::after,
body .markdown-body blockquote::after,
body #js-doc-readonly blockquote::after,
body #js-doc-readonly.ql-editor blockquote::after,
body #js-doc-editor-wrap .ql-editor blockquote::after,
body #js-doc-editor .ql-editor blockquote::after {
  content: "”";
  position: absolute;
  right: 20px;
  bottom: 0;
  height: 56px;
  overflow: hidden;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 120px;
  font-style: normal;
  line-height: 1;
  color: var(--quote-accent);
  opacity: 0.12;
  pointer-events: none;
  user-select: none;
}
body .doc-article blockquote p,
body .doc-page__content blockquote p,
body .doc-content blockquote p,
body .markdown-body blockquote p,
body #js-doc-readonly blockquote p,
body #js-doc-readonly.ql-editor blockquote p,
body #js-doc-editor-wrap .ql-editor blockquote p,
body #js-doc-editor .ql-editor blockquote p {
  margin: 0 0 8px;
  font-style: italic;
}
body .doc-article blockquote p:last-child,
body .doc-page__content blockquote p:last-child,
body .doc-content blockquote p:last-child,
body .markdown-body blockquote p:last-child,
body #js-doc-readonly blockquote p:last-child,
body #js-doc-readonly.ql-editor blockquote p:last-child,
body #js-doc-editor-wrap .ql-editor blockquote p:last-child,
body #js-doc-editor .ql-editor blockquote p:last-child {
  margin-bottom: 0;
}
body .doc-article blockquote strong,
body .doc-article blockquote b,
body .doc-page__content blockquote strong,
body .doc-page__content blockquote b,
body .doc-content blockquote strong,
body .doc-content blockquote b,
body .markdown-body blockquote strong,
body .markdown-body blockquote b,
body #js-doc-readonly blockquote strong,
body #js-doc-readonly blockquote b,
body #js-doc-readonly.ql-editor blockquote strong,
body #js-doc-readonly.ql-editor blockquote b,
body #js-doc-editor-wrap .ql-editor blockquote strong,
body #js-doc-editor-wrap .ql-editor blockquote b,
body #js-doc-editor .ql-editor blockquote strong,
body #js-doc-editor .ql-editor blockquote b {
  font-weight: 700;
}
@media (max-width: 640px) {
  body .doc-article blockquote,
  body .doc-page__content blockquote,
  body .doc-content blockquote,
  body .markdown-body blockquote,
  body #js-doc-readonly blockquote,
  body #js-doc-readonly.ql-editor blockquote,
  body #js-doc-editor-wrap .ql-editor blockquote,
  body #js-doc-editor .ql-editor blockquote {
    padding: 64px 18px 18px 18px;
    min-height: 0;
    font-size: 1.04em;
  }
  body .doc-article blockquote::before,
  body .doc-page__content blockquote::before,
  body .doc-content blockquote::before,
  body .markdown-body blockquote::before,
  body #js-doc-readonly blockquote::before,
  body #js-doc-readonly.ql-editor blockquote::before,
  body #js-doc-editor-wrap .ql-editor blockquote::before,
  body #js-doc-editor .ql-editor blockquote::before {
    left: 18px;
    top: 18px;
    width: 34px;
    height: 34px;
    background-size: 17px 17px;
    box-shadow: 0 0 0 5px var(--quote-glyph-bg);
  }
  body .doc-article blockquote::after,
  body .doc-page__content blockquote::after,
  body .doc-content blockquote::after,
  body .markdown-body blockquote::after,
  body #js-doc-readonly blockquote::after,
  body #js-doc-readonly.ql-editor blockquote::after,
  body #js-doc-editor-wrap .ql-editor blockquote::after,
  body #js-doc-editor .ql-editor blockquote::after {
    right: 14px;
    height: 44px;
    font-size: 96px;
  }
}
body .doc-article blockquote:has(+ blockquote),
body .doc-page__content blockquote:has(+ blockquote),
body .doc-content blockquote:has(+ blockquote),
body .markdown-body blockquote:has(+ blockquote),
body #js-doc-readonly blockquote:has(+ blockquote),
body #js-doc-readonly.ql-editor blockquote:has(+ blockquote),
body #js-doc-editor-wrap .ql-editor blockquote:has(+ blockquote),
body #js-doc-editor .ql-editor blockquote:has(+ blockquote) {
  margin-bottom: 0;
  padding-bottom: 4px;
  min-height: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
body .doc-article blockquote:has(+ blockquote)::after,
body .doc-page__content blockquote:has(+ blockquote)::after,
body .doc-content blockquote:has(+ blockquote)::after,
body .markdown-body blockquote:has(+ blockquote)::after,
body #js-doc-readonly blockquote:has(+ blockquote)::after,
body #js-doc-readonly.ql-editor blockquote:has(+ blockquote)::after,
body #js-doc-editor-wrap .ql-editor blockquote:has(+ blockquote)::after,
body #js-doc-editor .ql-editor blockquote:has(+ blockquote)::after {
  display: none;
}
body .doc-article blockquote + blockquote,
body .doc-page__content blockquote + blockquote,
body .doc-content blockquote + blockquote,
body .markdown-body blockquote + blockquote,
body #js-doc-readonly blockquote + blockquote,
body #js-doc-readonly.ql-editor blockquote + blockquote,
body #js-doc-editor-wrap .ql-editor blockquote + blockquote,
body #js-doc-editor .ql-editor blockquote + blockquote {
  margin-top: 0;
  padding-top: 4px;
  min-height: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
body .doc-article blockquote + blockquote::before,
body .doc-page__content blockquote + blockquote::before,
body .doc-content blockquote + blockquote::before,
body .markdown-body blockquote + blockquote::before,
body #js-doc-readonly blockquote + blockquote::before,
body #js-doc-readonly.ql-editor blockquote + blockquote::before,
body #js-doc-editor-wrap .ql-editor blockquote + blockquote::before,
body #js-doc-editor .ql-editor blockquote + blockquote::before {
  display: none;
}
body .doc-article pre.ql-syntax,
body .doc-page__content pre.ql-syntax,
body .doc-content pre.ql-syntax,
body .markdown-body pre.ql-syntax,
body #js-doc-readonly pre.ql-syntax,
body #js-doc-readonly.ql-editor pre.ql-syntax,
body #js-doc-editor-wrap .ql-editor pre.ql-syntax,
body #js-doc-editor .ql-editor pre.ql-syntax {
  margin: 16px 0;
  padding: 12px 14px;
  line-height: 1.5;
  border-radius: 8px;
  overflow-x: auto;
  background-color: #23241f;
  color: #f8f8f2;
}
body .doc-article .ql-code-block-container,
body .doc-page__content .ql-code-block-container,
body .doc-content .ql-code-block-container,
body .markdown-body .ql-code-block-container,
body #js-doc-readonly .ql-code-block-container,
body #js-doc-readonly.ql-editor .ql-code-block-container,
body #js-doc-editor-wrap .ql-editor .ql-code-block-container,
body #js-doc-editor .ql-editor .ql-code-block-container {
  margin: 16px 0;
  padding: 12px 14px;
  border-radius: 8px;
  background-color: #23241f;
  overflow: auto;
}
body .doc-article .ql-code-block-container .ql-code-block,
body .doc-page__content .ql-code-block-container .ql-code-block,
body .doc-content .ql-code-block-container .ql-code-block,
body .markdown-body .ql-code-block-container .ql-code-block,
body #js-doc-readonly .ql-code-block-container .ql-code-block,
body #js-doc-readonly.ql-editor .ql-code-block-container .ql-code-block,
body #js-doc-editor-wrap .ql-editor .ql-code-block-container .ql-code-block,
body #js-doc-editor .ql-editor .ql-code-block-container .ql-code-block {
  color: #f8f8f2;
  font-family: Monaco, "Courier New", monospace;
  white-space: pre;
}
body .doc-article hr,
body .doc-page__content hr,
body .doc-content hr,
body .markdown-body hr,
body #js-doc-readonly hr,
body #js-doc-readonly.ql-editor hr,
body #js-doc-editor-wrap .ql-editor hr,
body #js-doc-editor .ql-editor hr {
  margin: 26px 0;
  border: none;
  border-top: 1px solid var(--color-border);
}
body .doc-article img,
body .doc-page__content img,
body .doc-content img,
body .markdown-body img,
body #js-doc-readonly img,
body #js-doc-readonly.ql-editor img,
body #js-doc-editor-wrap .ql-editor img,
body #js-doc-editor .ql-editor img {
  margin: 16px 0;
  max-width: min(100%, 800px);
  cursor: zoom-in;
  border-radius: 6px;
  transition: opacity 0.12s ease;
}
body .doc-article img:hover,
body .doc-page__content img:hover,
body .doc-content img:hover,
body .markdown-body img:hover,
body #js-doc-readonly img:hover,
body #js-doc-readonly.ql-editor img:hover,
body #js-doc-editor-wrap .ql-editor img:hover,
body #js-doc-editor .ql-editor img:hover {
  opacity: 0.9;
}
body .doc-article a:not(.btn):not(.doc-link-card),
body .doc-page__content a:not(.btn):not(.doc-link-card),
body .doc-content a:not(.btn):not(.doc-link-card),
body .markdown-body a:not(.btn):not(.doc-link-card),
body #js-doc-readonly a:not(.btn):not(.doc-link-card),
body #js-doc-readonly.ql-editor a:not(.btn):not(.doc-link-card),
body #js-doc-editor-wrap .ql-editor a:not(.btn):not(.doc-link-card),
body #js-doc-editor .ql-editor a:not(.btn):not(.doc-link-card) {
  color: var(--color-link, var(--color-primary, #0969da));
  text-decoration: underline;
  text-decoration-color: rgba(9, 105, 218, 0.45);
  text-underline-offset: 3px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease, text-decoration-color 0.15s ease;
}
body .doc-article a:not(.btn):not(.doc-link-card):hover,
body .doc-page__content a:not(.btn):not(.doc-link-card):hover,
body .doc-content a:not(.btn):not(.doc-link-card):hover,
body .markdown-body a:not(.btn):not(.doc-link-card):hover,
body #js-doc-readonly a:not(.btn):not(.doc-link-card):hover,
body #js-doc-readonly.ql-editor a:not(.btn):not(.doc-link-card):hover,
body #js-doc-editor-wrap .ql-editor a:not(.btn):not(.doc-link-card):hover,
body #js-doc-editor .ql-editor a:not(.btn):not(.doc-link-card):hover {
  color: var(--color-link-hover, #0550ae);
  text-decoration-color: currentColor;
  background-color: rgba(9, 105, 218, 0.08);
  border-radius: 3px;
}
body .doc-article table,
body .doc-page__content table,
body .doc-content table,
body .markdown-body table,
body #js-doc-readonly table,
body #js-doc-readonly.ql-editor table,
body #js-doc-editor-wrap .ql-editor table,
body #js-doc-editor .ql-editor table {
  margin: 16px 0 24px;
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
body .doc-article table td, body .doc-article table th,
body .doc-page__content table td,
body .doc-page__content table th,
body .doc-content table td,
body .doc-content table th,
body .markdown-body table td,
body .markdown-body table th,
body #js-doc-readonly table td,
body #js-doc-readonly table th,
body #js-doc-readonly.ql-editor table td,
body #js-doc-readonly.ql-editor table th,
body #js-doc-editor-wrap .ql-editor table td,
body #js-doc-editor-wrap .ql-editor table th,
body #js-doc-editor .ql-editor table td,
body #js-doc-editor .ql-editor table th {
  word-break: break-word;
  overflow-wrap: break-word;
}
body .doc-article table td a, body .doc-article table th a,
body .doc-page__content table td a,
body .doc-page__content table th a,
body .doc-content table td a,
body .doc-content table th a,
body .markdown-body table td a,
body .markdown-body table th a,
body #js-doc-readonly table td a,
body #js-doc-readonly table th a,
body #js-doc-readonly.ql-editor table td a,
body #js-doc-readonly.ql-editor table th a,
body #js-doc-editor-wrap .ql-editor table td a,
body #js-doc-editor-wrap .ql-editor table th a,
body #js-doc-editor .ql-editor table td a,
body #js-doc-editor .ql-editor table th a {
  color: var(--color-link, var(--color-primary, #0969da));
  text-decoration: underline;
  text-decoration-color: rgba(9, 105, 218, 0.45);
}
body .doc-article table td a:hover, body .doc-article table th a:hover,
body .doc-page__content table td a:hover,
body .doc-page__content table th a:hover,
body .doc-content table td a:hover,
body .doc-content table th a:hover,
body .markdown-body table td a:hover,
body .markdown-body table th a:hover,
body #js-doc-readonly table td a:hover,
body #js-doc-readonly table th a:hover,
body #js-doc-readonly.ql-editor table td a:hover,
body #js-doc-readonly.ql-editor table th a:hover,
body #js-doc-editor-wrap .ql-editor table td a:hover,
body #js-doc-editor-wrap .ql-editor table th a:hover,
body #js-doc-editor .ql-editor table td a:hover,
body #js-doc-editor .ql-editor table th a:hover {
  color: var(--color-link-hover, #0550ae);
  text-decoration-color: currentColor;
  background-color: rgba(9, 105, 218, 0.1);
}
body .doc-article details,
body .doc-article details.doc-toggle,
body .doc-article details.toggle-blot,
body .doc-article details[data-toggle],
body .doc-page__content details,
body .doc-page__content details.doc-toggle,
body .doc-page__content details.toggle-blot,
body .doc-page__content details[data-toggle],
body .doc-content details,
body .doc-content details.doc-toggle,
body .doc-content details.toggle-blot,
body .doc-content details[data-toggle],
body .markdown-body details,
body .markdown-body details.doc-toggle,
body .markdown-body details.toggle-blot,
body .markdown-body details[data-toggle],
body #js-doc-readonly details,
body #js-doc-readonly details.doc-toggle,
body #js-doc-readonly details.toggle-blot,
body #js-doc-readonly details[data-toggle],
body #js-doc-readonly.ql-editor details,
body #js-doc-readonly.ql-editor details.doc-toggle,
body #js-doc-readonly.ql-editor details.toggle-blot,
body #js-doc-readonly.ql-editor details[data-toggle],
body #js-doc-editor-wrap .ql-editor details,
body #js-doc-editor-wrap .ql-editor details.doc-toggle,
body #js-doc-editor-wrap .ql-editor details.toggle-blot,
body #js-doc-editor-wrap .ql-editor details[data-toggle],
body #js-doc-editor .ql-editor details,
body #js-doc-editor .ql-editor details.doc-toggle,
body #js-doc-editor .ql-editor details.toggle-blot,
body #js-doc-editor .ql-editor details[data-toggle] {
  margin: 16px 0;
  border: 1px solid var(--color-border, #d0d7de);
  border-radius: 10px;
  background: var(--color-surface, #ffffff);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
body .doc-article details:hover,
body .doc-article details.doc-toggle:hover,
body .doc-article details.toggle-blot:hover,
body .doc-article details[data-toggle]:hover,
body .doc-page__content details:hover,
body .doc-page__content details.doc-toggle:hover,
body .doc-page__content details.toggle-blot:hover,
body .doc-page__content details[data-toggle]:hover,
body .doc-content details:hover,
body .doc-content details.doc-toggle:hover,
body .doc-content details.toggle-blot:hover,
body .doc-content details[data-toggle]:hover,
body .markdown-body details:hover,
body .markdown-body details.doc-toggle:hover,
body .markdown-body details.toggle-blot:hover,
body .markdown-body details[data-toggle]:hover,
body #js-doc-readonly details:hover,
body #js-doc-readonly details.doc-toggle:hover,
body #js-doc-readonly details.toggle-blot:hover,
body #js-doc-readonly details[data-toggle]:hover,
body #js-doc-readonly.ql-editor details:hover,
body #js-doc-readonly.ql-editor details.doc-toggle:hover,
body #js-doc-readonly.ql-editor details.toggle-blot:hover,
body #js-doc-readonly.ql-editor details[data-toggle]:hover,
body #js-doc-editor-wrap .ql-editor details:hover,
body #js-doc-editor-wrap .ql-editor details.doc-toggle:hover,
body #js-doc-editor-wrap .ql-editor details.toggle-blot:hover,
body #js-doc-editor-wrap .ql-editor details[data-toggle]:hover,
body #js-doc-editor .ql-editor details:hover,
body #js-doc-editor .ql-editor details.doc-toggle:hover,
body #js-doc-editor .ql-editor details.toggle-blot:hover,
body #js-doc-editor .ql-editor details[data-toggle]:hover {
  border-color: rgba(9, 105, 218, 0.4);
}
body .doc-article details summary,
body .doc-article details summary.doc-toggle__summary,
body .doc-article details.doc-toggle summary,
body .doc-article details.doc-toggle summary.doc-toggle__summary,
body .doc-article details.toggle-blot summary,
body .doc-article details.toggle-blot summary.doc-toggle__summary,
body .doc-article details[data-toggle] summary,
body .doc-article details[data-toggle] summary.doc-toggle__summary,
body .doc-page__content details summary,
body .doc-page__content details summary.doc-toggle__summary,
body .doc-page__content details.doc-toggle summary,
body .doc-page__content details.doc-toggle summary.doc-toggle__summary,
body .doc-page__content details.toggle-blot summary,
body .doc-page__content details.toggle-blot summary.doc-toggle__summary,
body .doc-page__content details[data-toggle] summary,
body .doc-page__content details[data-toggle] summary.doc-toggle__summary,
body .doc-content details summary,
body .doc-content details summary.doc-toggle__summary,
body .doc-content details.doc-toggle summary,
body .doc-content details.doc-toggle summary.doc-toggle__summary,
body .doc-content details.toggle-blot summary,
body .doc-content details.toggle-blot summary.doc-toggle__summary,
body .doc-content details[data-toggle] summary,
body .doc-content details[data-toggle] summary.doc-toggle__summary,
body .markdown-body details summary,
body .markdown-body details summary.doc-toggle__summary,
body .markdown-body details.doc-toggle summary,
body .markdown-body details.doc-toggle summary.doc-toggle__summary,
body .markdown-body details.toggle-blot summary,
body .markdown-body details.toggle-blot summary.doc-toggle__summary,
body .markdown-body details[data-toggle] summary,
body .markdown-body details[data-toggle] summary.doc-toggle__summary,
body #js-doc-readonly details summary,
body #js-doc-readonly details summary.doc-toggle__summary,
body #js-doc-readonly details.doc-toggle summary,
body #js-doc-readonly details.doc-toggle summary.doc-toggle__summary,
body #js-doc-readonly details.toggle-blot summary,
body #js-doc-readonly details.toggle-blot summary.doc-toggle__summary,
body #js-doc-readonly details[data-toggle] summary,
body #js-doc-readonly details[data-toggle] summary.doc-toggle__summary,
body #js-doc-readonly.ql-editor details summary,
body #js-doc-readonly.ql-editor details summary.doc-toggle__summary,
body #js-doc-readonly.ql-editor details.doc-toggle summary,
body #js-doc-readonly.ql-editor details.doc-toggle summary.doc-toggle__summary,
body #js-doc-readonly.ql-editor details.toggle-blot summary,
body #js-doc-readonly.ql-editor details.toggle-blot summary.doc-toggle__summary,
body #js-doc-readonly.ql-editor details[data-toggle] summary,
body #js-doc-readonly.ql-editor details[data-toggle] summary.doc-toggle__summary,
body #js-doc-editor-wrap .ql-editor details summary,
body #js-doc-editor-wrap .ql-editor details summary.doc-toggle__summary,
body #js-doc-editor-wrap .ql-editor details.doc-toggle summary,
body #js-doc-editor-wrap .ql-editor details.doc-toggle summary.doc-toggle__summary,
body #js-doc-editor-wrap .ql-editor details.toggle-blot summary,
body #js-doc-editor-wrap .ql-editor details.toggle-blot summary.doc-toggle__summary,
body #js-doc-editor-wrap .ql-editor details[data-toggle] summary,
body #js-doc-editor-wrap .ql-editor details[data-toggle] summary.doc-toggle__summary,
body #js-doc-editor .ql-editor details summary,
body #js-doc-editor .ql-editor details summary.doc-toggle__summary,
body #js-doc-editor .ql-editor details.doc-toggle summary,
body #js-doc-editor .ql-editor details.doc-toggle summary.doc-toggle__summary,
body #js-doc-editor .ql-editor details.toggle-blot summary,
body #js-doc-editor .ql-editor details.toggle-blot summary.doc-toggle__summary,
body #js-doc-editor .ql-editor details[data-toggle] summary,
body #js-doc-editor .ql-editor details[data-toggle] summary.doc-toggle__summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--color-text, #24292f);
  background: var(--color-bg-subtle, #f6f8fa);
  cursor: pointer;
  user-select: none;
  outline: none;
  list-style: none;
  position: relative;
  transition: background 0.15s ease, color 0.15s ease;
}
body .doc-article details summary::-webkit-details-marker,
body .doc-article details summary.doc-toggle__summary::-webkit-details-marker,
body .doc-article details.doc-toggle summary::-webkit-details-marker,
body .doc-article details.doc-toggle summary.doc-toggle__summary::-webkit-details-marker,
body .doc-article details.toggle-blot summary::-webkit-details-marker,
body .doc-article details.toggle-blot summary.doc-toggle__summary::-webkit-details-marker,
body .doc-article details[data-toggle] summary::-webkit-details-marker,
body .doc-article details[data-toggle] summary.doc-toggle__summary::-webkit-details-marker,
body .doc-page__content details summary::-webkit-details-marker,
body .doc-page__content details summary.doc-toggle__summary::-webkit-details-marker,
body .doc-page__content details.doc-toggle summary::-webkit-details-marker,
body .doc-page__content details.doc-toggle summary.doc-toggle__summary::-webkit-details-marker,
body .doc-page__content details.toggle-blot summary::-webkit-details-marker,
body .doc-page__content details.toggle-blot summary.doc-toggle__summary::-webkit-details-marker,
body .doc-page__content details[data-toggle] summary::-webkit-details-marker,
body .doc-page__content details[data-toggle] summary.doc-toggle__summary::-webkit-details-marker,
body .doc-content details summary::-webkit-details-marker,
body .doc-content details summary.doc-toggle__summary::-webkit-details-marker,
body .doc-content details.doc-toggle summary::-webkit-details-marker,
body .doc-content details.doc-toggle summary.doc-toggle__summary::-webkit-details-marker,
body .doc-content details.toggle-blot summary::-webkit-details-marker,
body .doc-content details.toggle-blot summary.doc-toggle__summary::-webkit-details-marker,
body .doc-content details[data-toggle] summary::-webkit-details-marker,
body .doc-content details[data-toggle] summary.doc-toggle__summary::-webkit-details-marker,
body .markdown-body details summary::-webkit-details-marker,
body .markdown-body details summary.doc-toggle__summary::-webkit-details-marker,
body .markdown-body details.doc-toggle summary::-webkit-details-marker,
body .markdown-body details.doc-toggle summary.doc-toggle__summary::-webkit-details-marker,
body .markdown-body details.toggle-blot summary::-webkit-details-marker,
body .markdown-body details.toggle-blot summary.doc-toggle__summary::-webkit-details-marker,
body .markdown-body details[data-toggle] summary::-webkit-details-marker,
body .markdown-body details[data-toggle] summary.doc-toggle__summary::-webkit-details-marker,
body #js-doc-readonly details summary::-webkit-details-marker,
body #js-doc-readonly details summary.doc-toggle__summary::-webkit-details-marker,
body #js-doc-readonly details.doc-toggle summary::-webkit-details-marker,
body #js-doc-readonly details.doc-toggle summary.doc-toggle__summary::-webkit-details-marker,
body #js-doc-readonly details.toggle-blot summary::-webkit-details-marker,
body #js-doc-readonly details.toggle-blot summary.doc-toggle__summary::-webkit-details-marker,
body #js-doc-readonly details[data-toggle] summary::-webkit-details-marker,
body #js-doc-readonly details[data-toggle] summary.doc-toggle__summary::-webkit-details-marker,
body #js-doc-readonly.ql-editor details summary::-webkit-details-marker,
body #js-doc-readonly.ql-editor details summary.doc-toggle__summary::-webkit-details-marker,
body #js-doc-readonly.ql-editor details.doc-toggle summary::-webkit-details-marker,
body #js-doc-readonly.ql-editor details.doc-toggle summary.doc-toggle__summary::-webkit-details-marker,
body #js-doc-readonly.ql-editor details.toggle-blot summary::-webkit-details-marker,
body #js-doc-readonly.ql-editor details.toggle-blot summary.doc-toggle__summary::-webkit-details-marker,
body #js-doc-readonly.ql-editor details[data-toggle] summary::-webkit-details-marker,
body #js-doc-readonly.ql-editor details[data-toggle] summary.doc-toggle__summary::-webkit-details-marker,
body #js-doc-editor-wrap .ql-editor details summary::-webkit-details-marker,
body #js-doc-editor-wrap .ql-editor details summary.doc-toggle__summary::-webkit-details-marker,
body #js-doc-editor-wrap .ql-editor details.doc-toggle summary::-webkit-details-marker,
body #js-doc-editor-wrap .ql-editor details.doc-toggle summary.doc-toggle__summary::-webkit-details-marker,
body #js-doc-editor-wrap .ql-editor details.toggle-blot summary::-webkit-details-marker,
body #js-doc-editor-wrap .ql-editor details.toggle-blot summary.doc-toggle__summary::-webkit-details-marker,
body #js-doc-editor-wrap .ql-editor details[data-toggle] summary::-webkit-details-marker,
body #js-doc-editor-wrap .ql-editor details[data-toggle] summary.doc-toggle__summary::-webkit-details-marker,
body #js-doc-editor .ql-editor details summary::-webkit-details-marker,
body #js-doc-editor .ql-editor details summary.doc-toggle__summary::-webkit-details-marker,
body #js-doc-editor .ql-editor details.doc-toggle summary::-webkit-details-marker,
body #js-doc-editor .ql-editor details.doc-toggle summary.doc-toggle__summary::-webkit-details-marker,
body #js-doc-editor .ql-editor details.toggle-blot summary::-webkit-details-marker,
body #js-doc-editor .ql-editor details.toggle-blot summary.doc-toggle__summary::-webkit-details-marker,
body #js-doc-editor .ql-editor details[data-toggle] summary::-webkit-details-marker,
body #js-doc-editor .ql-editor details[data-toggle] summary.doc-toggle__summary::-webkit-details-marker {
  display: none !important;
}
body .doc-article details summary::marker,
body .doc-article details summary.doc-toggle__summary::marker,
body .doc-article details.doc-toggle summary::marker,
body .doc-article details.doc-toggle summary.doc-toggle__summary::marker,
body .doc-article details.toggle-blot summary::marker,
body .doc-article details.toggle-blot summary.doc-toggle__summary::marker,
body .doc-article details[data-toggle] summary::marker,
body .doc-article details[data-toggle] summary.doc-toggle__summary::marker,
body .doc-page__content details summary::marker,
body .doc-page__content details summary.doc-toggle__summary::marker,
body .doc-page__content details.doc-toggle summary::marker,
body .doc-page__content details.doc-toggle summary.doc-toggle__summary::marker,
body .doc-page__content details.toggle-blot summary::marker,
body .doc-page__content details.toggle-blot summary.doc-toggle__summary::marker,
body .doc-page__content details[data-toggle] summary::marker,
body .doc-page__content details[data-toggle] summary.doc-toggle__summary::marker,
body .doc-content details summary::marker,
body .doc-content details summary.doc-toggle__summary::marker,
body .doc-content details.doc-toggle summary::marker,
body .doc-content details.doc-toggle summary.doc-toggle__summary::marker,
body .doc-content details.toggle-blot summary::marker,
body .doc-content details.toggle-blot summary.doc-toggle__summary::marker,
body .doc-content details[data-toggle] summary::marker,
body .doc-content details[data-toggle] summary.doc-toggle__summary::marker,
body .markdown-body details summary::marker,
body .markdown-body details summary.doc-toggle__summary::marker,
body .markdown-body details.doc-toggle summary::marker,
body .markdown-body details.doc-toggle summary.doc-toggle__summary::marker,
body .markdown-body details.toggle-blot summary::marker,
body .markdown-body details.toggle-blot summary.doc-toggle__summary::marker,
body .markdown-body details[data-toggle] summary::marker,
body .markdown-body details[data-toggle] summary.doc-toggle__summary::marker,
body #js-doc-readonly details summary::marker,
body #js-doc-readonly details summary.doc-toggle__summary::marker,
body #js-doc-readonly details.doc-toggle summary::marker,
body #js-doc-readonly details.doc-toggle summary.doc-toggle__summary::marker,
body #js-doc-readonly details.toggle-blot summary::marker,
body #js-doc-readonly details.toggle-blot summary.doc-toggle__summary::marker,
body #js-doc-readonly details[data-toggle] summary::marker,
body #js-doc-readonly details[data-toggle] summary.doc-toggle__summary::marker,
body #js-doc-readonly.ql-editor details summary::marker,
body #js-doc-readonly.ql-editor details summary.doc-toggle__summary::marker,
body #js-doc-readonly.ql-editor details.doc-toggle summary::marker,
body #js-doc-readonly.ql-editor details.doc-toggle summary.doc-toggle__summary::marker,
body #js-doc-readonly.ql-editor details.toggle-blot summary::marker,
body #js-doc-readonly.ql-editor details.toggle-blot summary.doc-toggle__summary::marker,
body #js-doc-readonly.ql-editor details[data-toggle] summary::marker,
body #js-doc-readonly.ql-editor details[data-toggle] summary.doc-toggle__summary::marker,
body #js-doc-editor-wrap .ql-editor details summary::marker,
body #js-doc-editor-wrap .ql-editor details summary.doc-toggle__summary::marker,
body #js-doc-editor-wrap .ql-editor details.doc-toggle summary::marker,
body #js-doc-editor-wrap .ql-editor details.doc-toggle summary.doc-toggle__summary::marker,
body #js-doc-editor-wrap .ql-editor details.toggle-blot summary::marker,
body #js-doc-editor-wrap .ql-editor details.toggle-blot summary.doc-toggle__summary::marker,
body #js-doc-editor-wrap .ql-editor details[data-toggle] summary::marker,
body #js-doc-editor-wrap .ql-editor details[data-toggle] summary.doc-toggle__summary::marker,
body #js-doc-editor .ql-editor details summary::marker,
body #js-doc-editor .ql-editor details summary.doc-toggle__summary::marker,
body #js-doc-editor .ql-editor details.doc-toggle summary::marker,
body #js-doc-editor .ql-editor details.doc-toggle summary.doc-toggle__summary::marker,
body #js-doc-editor .ql-editor details.toggle-blot summary::marker,
body #js-doc-editor .ql-editor details.toggle-blot summary.doc-toggle__summary::marker,
body #js-doc-editor .ql-editor details[data-toggle] summary::marker,
body #js-doc-editor .ql-editor details[data-toggle] summary.doc-toggle__summary::marker {
  display: none !important;
}
body .doc-article details summary::before,
body .doc-article details summary.doc-toggle__summary::before,
body .doc-article details.doc-toggle summary::before,
body .doc-article details.doc-toggle summary.doc-toggle__summary::before,
body .doc-article details.toggle-blot summary::before,
body .doc-article details.toggle-blot summary.doc-toggle__summary::before,
body .doc-article details[data-toggle] summary::before,
body .doc-article details[data-toggle] summary.doc-toggle__summary::before,
body .doc-page__content details summary::before,
body .doc-page__content details summary.doc-toggle__summary::before,
body .doc-page__content details.doc-toggle summary::before,
body .doc-page__content details.doc-toggle summary.doc-toggle__summary::before,
body .doc-page__content details.toggle-blot summary::before,
body .doc-page__content details.toggle-blot summary.doc-toggle__summary::before,
body .doc-page__content details[data-toggle] summary::before,
body .doc-page__content details[data-toggle] summary.doc-toggle__summary::before,
body .doc-content details summary::before,
body .doc-content details summary.doc-toggle__summary::before,
body .doc-content details.doc-toggle summary::before,
body .doc-content details.doc-toggle summary.doc-toggle__summary::before,
body .doc-content details.toggle-blot summary::before,
body .doc-content details.toggle-blot summary.doc-toggle__summary::before,
body .doc-content details[data-toggle] summary::before,
body .doc-content details[data-toggle] summary.doc-toggle__summary::before,
body .markdown-body details summary::before,
body .markdown-body details summary.doc-toggle__summary::before,
body .markdown-body details.doc-toggle summary::before,
body .markdown-body details.doc-toggle summary.doc-toggle__summary::before,
body .markdown-body details.toggle-blot summary::before,
body .markdown-body details.toggle-blot summary.doc-toggle__summary::before,
body .markdown-body details[data-toggle] summary::before,
body .markdown-body details[data-toggle] summary.doc-toggle__summary::before,
body #js-doc-readonly details summary::before,
body #js-doc-readonly details summary.doc-toggle__summary::before,
body #js-doc-readonly details.doc-toggle summary::before,
body #js-doc-readonly details.doc-toggle summary.doc-toggle__summary::before,
body #js-doc-readonly details.toggle-blot summary::before,
body #js-doc-readonly details.toggle-blot summary.doc-toggle__summary::before,
body #js-doc-readonly details[data-toggle] summary::before,
body #js-doc-readonly details[data-toggle] summary.doc-toggle__summary::before,
body #js-doc-readonly.ql-editor details summary::before,
body #js-doc-readonly.ql-editor details summary.doc-toggle__summary::before,
body #js-doc-readonly.ql-editor details.doc-toggle summary::before,
body #js-doc-readonly.ql-editor details.doc-toggle summary.doc-toggle__summary::before,
body #js-doc-readonly.ql-editor details.toggle-blot summary::before,
body #js-doc-readonly.ql-editor details.toggle-blot summary.doc-toggle__summary::before,
body #js-doc-readonly.ql-editor details[data-toggle] summary::before,
body #js-doc-readonly.ql-editor details[data-toggle] summary.doc-toggle__summary::before,
body #js-doc-editor-wrap .ql-editor details summary::before,
body #js-doc-editor-wrap .ql-editor details summary.doc-toggle__summary::before,
body #js-doc-editor-wrap .ql-editor details.doc-toggle summary::before,
body #js-doc-editor-wrap .ql-editor details.doc-toggle summary.doc-toggle__summary::before,
body #js-doc-editor-wrap .ql-editor details.toggle-blot summary::before,
body #js-doc-editor-wrap .ql-editor details.toggle-blot summary.doc-toggle__summary::before,
body #js-doc-editor-wrap .ql-editor details[data-toggle] summary::before,
body #js-doc-editor-wrap .ql-editor details[data-toggle] summary.doc-toggle__summary::before,
body #js-doc-editor .ql-editor details summary::before,
body #js-doc-editor .ql-editor details summary.doc-toggle__summary::before,
body #js-doc-editor .ql-editor details.doc-toggle summary::before,
body #js-doc-editor .ql-editor details.doc-toggle summary.doc-toggle__summary::before,
body #js-doc-editor .ql-editor details.toggle-blot summary::before,
body #js-doc-editor .ql-editor details.toggle-blot summary.doc-toggle__summary::before,
body #js-doc-editor .ql-editor details[data-toggle] summary::before,
body #js-doc-editor .ql-editor details[data-toggle] summary.doc-toggle__summary::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--color-text-muted, #57606a);
  border-bottom: 2px solid var(--color-text-muted, #57606a);
  transform: rotate(-45deg);
  transform-origin: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
  margin-left: 2px;
  margin-right: 4px;
}
body .doc-article details summary:hover,
body .doc-article details summary.doc-toggle__summary:hover,
body .doc-article details.doc-toggle summary:hover,
body .doc-article details.doc-toggle summary.doc-toggle__summary:hover,
body .doc-article details.toggle-blot summary:hover,
body .doc-article details.toggle-blot summary.doc-toggle__summary:hover,
body .doc-article details[data-toggle] summary:hover,
body .doc-article details[data-toggle] summary.doc-toggle__summary:hover,
body .doc-page__content details summary:hover,
body .doc-page__content details summary.doc-toggle__summary:hover,
body .doc-page__content details.doc-toggle summary:hover,
body .doc-page__content details.doc-toggle summary.doc-toggle__summary:hover,
body .doc-page__content details.toggle-blot summary:hover,
body .doc-page__content details.toggle-blot summary.doc-toggle__summary:hover,
body .doc-page__content details[data-toggle] summary:hover,
body .doc-page__content details[data-toggle] summary.doc-toggle__summary:hover,
body .doc-content details summary:hover,
body .doc-content details summary.doc-toggle__summary:hover,
body .doc-content details.doc-toggle summary:hover,
body .doc-content details.doc-toggle summary.doc-toggle__summary:hover,
body .doc-content details.toggle-blot summary:hover,
body .doc-content details.toggle-blot summary.doc-toggle__summary:hover,
body .doc-content details[data-toggle] summary:hover,
body .doc-content details[data-toggle] summary.doc-toggle__summary:hover,
body .markdown-body details summary:hover,
body .markdown-body details summary.doc-toggle__summary:hover,
body .markdown-body details.doc-toggle summary:hover,
body .markdown-body details.doc-toggle summary.doc-toggle__summary:hover,
body .markdown-body details.toggle-blot summary:hover,
body .markdown-body details.toggle-blot summary.doc-toggle__summary:hover,
body .markdown-body details[data-toggle] summary:hover,
body .markdown-body details[data-toggle] summary.doc-toggle__summary:hover,
body #js-doc-readonly details summary:hover,
body #js-doc-readonly details summary.doc-toggle__summary:hover,
body #js-doc-readonly details.doc-toggle summary:hover,
body #js-doc-readonly details.doc-toggle summary.doc-toggle__summary:hover,
body #js-doc-readonly details.toggle-blot summary:hover,
body #js-doc-readonly details.toggle-blot summary.doc-toggle__summary:hover,
body #js-doc-readonly details[data-toggle] summary:hover,
body #js-doc-readonly details[data-toggle] summary.doc-toggle__summary:hover,
body #js-doc-readonly.ql-editor details summary:hover,
body #js-doc-readonly.ql-editor details summary.doc-toggle__summary:hover,
body #js-doc-readonly.ql-editor details.doc-toggle summary:hover,
body #js-doc-readonly.ql-editor details.doc-toggle summary.doc-toggle__summary:hover,
body #js-doc-readonly.ql-editor details.toggle-blot summary:hover,
body #js-doc-readonly.ql-editor details.toggle-blot summary.doc-toggle__summary:hover,
body #js-doc-readonly.ql-editor details[data-toggle] summary:hover,
body #js-doc-readonly.ql-editor details[data-toggle] summary.doc-toggle__summary:hover,
body #js-doc-editor-wrap .ql-editor details summary:hover,
body #js-doc-editor-wrap .ql-editor details summary.doc-toggle__summary:hover,
body #js-doc-editor-wrap .ql-editor details.doc-toggle summary:hover,
body #js-doc-editor-wrap .ql-editor details.doc-toggle summary.doc-toggle__summary:hover,
body #js-doc-editor-wrap .ql-editor details.toggle-blot summary:hover,
body #js-doc-editor-wrap .ql-editor details.toggle-blot summary.doc-toggle__summary:hover,
body #js-doc-editor-wrap .ql-editor details[data-toggle] summary:hover,
body #js-doc-editor-wrap .ql-editor details[data-toggle] summary.doc-toggle__summary:hover,
body #js-doc-editor .ql-editor details summary:hover,
body #js-doc-editor .ql-editor details summary.doc-toggle__summary:hover,
body #js-doc-editor .ql-editor details.doc-toggle summary:hover,
body #js-doc-editor .ql-editor details.doc-toggle summary.doc-toggle__summary:hover,
body #js-doc-editor .ql-editor details.toggle-blot summary:hover,
body #js-doc-editor .ql-editor details.toggle-blot summary.doc-toggle__summary:hover,
body #js-doc-editor .ql-editor details[data-toggle] summary:hover,
body #js-doc-editor .ql-editor details[data-toggle] summary.doc-toggle__summary:hover {
  background: var(--color-bg-hover, rgba(0, 0, 0, 0.05));
  color: var(--color-primary-strong);
}
body .doc-article details summary:hover::before,
body .doc-article details summary.doc-toggle__summary:hover::before,
body .doc-article details.doc-toggle summary:hover::before,
body .doc-article details.doc-toggle summary.doc-toggle__summary:hover::before,
body .doc-article details.toggle-blot summary:hover::before,
body .doc-article details.toggle-blot summary.doc-toggle__summary:hover::before,
body .doc-article details[data-toggle] summary:hover::before,
body .doc-article details[data-toggle] summary.doc-toggle__summary:hover::before,
body .doc-page__content details summary:hover::before,
body .doc-page__content details summary.doc-toggle__summary:hover::before,
body .doc-page__content details.doc-toggle summary:hover::before,
body .doc-page__content details.doc-toggle summary.doc-toggle__summary:hover::before,
body .doc-page__content details.toggle-blot summary:hover::before,
body .doc-page__content details.toggle-blot summary.doc-toggle__summary:hover::before,
body .doc-page__content details[data-toggle] summary:hover::before,
body .doc-page__content details[data-toggle] summary.doc-toggle__summary:hover::before,
body .doc-content details summary:hover::before,
body .doc-content details summary.doc-toggle__summary:hover::before,
body .doc-content details.doc-toggle summary:hover::before,
body .doc-content details.doc-toggle summary.doc-toggle__summary:hover::before,
body .doc-content details.toggle-blot summary:hover::before,
body .doc-content details.toggle-blot summary.doc-toggle__summary:hover::before,
body .doc-content details[data-toggle] summary:hover::before,
body .doc-content details[data-toggle] summary.doc-toggle__summary:hover::before,
body .markdown-body details summary:hover::before,
body .markdown-body details summary.doc-toggle__summary:hover::before,
body .markdown-body details.doc-toggle summary:hover::before,
body .markdown-body details.doc-toggle summary.doc-toggle__summary:hover::before,
body .markdown-body details.toggle-blot summary:hover::before,
body .markdown-body details.toggle-blot summary.doc-toggle__summary:hover::before,
body .markdown-body details[data-toggle] summary:hover::before,
body .markdown-body details[data-toggle] summary.doc-toggle__summary:hover::before,
body #js-doc-readonly details summary:hover::before,
body #js-doc-readonly details summary.doc-toggle__summary:hover::before,
body #js-doc-readonly details.doc-toggle summary:hover::before,
body #js-doc-readonly details.doc-toggle summary.doc-toggle__summary:hover::before,
body #js-doc-readonly details.toggle-blot summary:hover::before,
body #js-doc-readonly details.toggle-blot summary.doc-toggle__summary:hover::before,
body #js-doc-readonly details[data-toggle] summary:hover::before,
body #js-doc-readonly details[data-toggle] summary.doc-toggle__summary:hover::before,
body #js-doc-readonly.ql-editor details summary:hover::before,
body #js-doc-readonly.ql-editor details summary.doc-toggle__summary:hover::before,
body #js-doc-readonly.ql-editor details.doc-toggle summary:hover::before,
body #js-doc-readonly.ql-editor details.doc-toggle summary.doc-toggle__summary:hover::before,
body #js-doc-readonly.ql-editor details.toggle-blot summary:hover::before,
body #js-doc-readonly.ql-editor details.toggle-blot summary.doc-toggle__summary:hover::before,
body #js-doc-readonly.ql-editor details[data-toggle] summary:hover::before,
body #js-doc-readonly.ql-editor details[data-toggle] summary.doc-toggle__summary:hover::before,
body #js-doc-editor-wrap .ql-editor details summary:hover::before,
body #js-doc-editor-wrap .ql-editor details summary.doc-toggle__summary:hover::before,
body #js-doc-editor-wrap .ql-editor details.doc-toggle summary:hover::before,
body #js-doc-editor-wrap .ql-editor details.doc-toggle summary.doc-toggle__summary:hover::before,
body #js-doc-editor-wrap .ql-editor details.toggle-blot summary:hover::before,
body #js-doc-editor-wrap .ql-editor details.toggle-blot summary.doc-toggle__summary:hover::before,
body #js-doc-editor-wrap .ql-editor details[data-toggle] summary:hover::before,
body #js-doc-editor-wrap .ql-editor details[data-toggle] summary.doc-toggle__summary:hover::before,
body #js-doc-editor .ql-editor details summary:hover::before,
body #js-doc-editor .ql-editor details summary.doc-toggle__summary:hover::before,
body #js-doc-editor .ql-editor details.doc-toggle summary:hover::before,
body #js-doc-editor .ql-editor details.doc-toggle summary.doc-toggle__summary:hover::before,
body #js-doc-editor .ql-editor details.toggle-blot summary:hover::before,
body #js-doc-editor .ql-editor details.toggle-blot summary.doc-toggle__summary:hover::before,
body #js-doc-editor .ql-editor details[data-toggle] summary:hover::before,
body #js-doc-editor .ql-editor details[data-toggle] summary.doc-toggle__summary:hover::before {
  border-color: var(--color-primary, #0969da);
}
body .doc-article details[open],
body .doc-article details.doc-toggle[open],
body .doc-article details.toggle-blot[open],
body .doc-article details[data-toggle][open],
body .doc-page__content details[open],
body .doc-page__content details.doc-toggle[open],
body .doc-page__content details.toggle-blot[open],
body .doc-page__content details[data-toggle][open],
body .doc-content details[open],
body .doc-content details.doc-toggle[open],
body .doc-content details.toggle-blot[open],
body .doc-content details[data-toggle][open],
body .markdown-body details[open],
body .markdown-body details.doc-toggle[open],
body .markdown-body details.toggle-blot[open],
body .markdown-body details[data-toggle][open],
body #js-doc-readonly details[open],
body #js-doc-readonly details.doc-toggle[open],
body #js-doc-readonly details.toggle-blot[open],
body #js-doc-readonly details[data-toggle][open],
body #js-doc-readonly.ql-editor details[open],
body #js-doc-readonly.ql-editor details.doc-toggle[open],
body #js-doc-readonly.ql-editor details.toggle-blot[open],
body #js-doc-readonly.ql-editor details[data-toggle][open],
body #js-doc-editor-wrap .ql-editor details[open],
body #js-doc-editor-wrap .ql-editor details.doc-toggle[open],
body #js-doc-editor-wrap .ql-editor details.toggle-blot[open],
body #js-doc-editor-wrap .ql-editor details[data-toggle][open],
body #js-doc-editor .ql-editor details[open],
body #js-doc-editor .ql-editor details.doc-toggle[open],
body #js-doc-editor .ql-editor details.toggle-blot[open],
body #js-doc-editor .ql-editor details[data-toggle][open] {
  border-color: var(--color-border, #d0d7de);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
body .doc-article details[open] > summary, body .doc-article details[open] > summary.doc-toggle__summary,
body .doc-article details.doc-toggle[open] > summary,
body .doc-article details.doc-toggle[open] > summary.doc-toggle__summary,
body .doc-article details.toggle-blot[open] > summary,
body .doc-article details.toggle-blot[open] > summary.doc-toggle__summary,
body .doc-article details[data-toggle][open] > summary,
body .doc-article details[data-toggle][open] > summary.doc-toggle__summary,
body .doc-page__content details[open] > summary,
body .doc-page__content details[open] > summary.doc-toggle__summary,
body .doc-page__content details.doc-toggle[open] > summary,
body .doc-page__content details.doc-toggle[open] > summary.doc-toggle__summary,
body .doc-page__content details.toggle-blot[open] > summary,
body .doc-page__content details.toggle-blot[open] > summary.doc-toggle__summary,
body .doc-page__content details[data-toggle][open] > summary,
body .doc-page__content details[data-toggle][open] > summary.doc-toggle__summary,
body .doc-content details[open] > summary,
body .doc-content details[open] > summary.doc-toggle__summary,
body .doc-content details.doc-toggle[open] > summary,
body .doc-content details.doc-toggle[open] > summary.doc-toggle__summary,
body .doc-content details.toggle-blot[open] > summary,
body .doc-content details.toggle-blot[open] > summary.doc-toggle__summary,
body .doc-content details[data-toggle][open] > summary,
body .doc-content details[data-toggle][open] > summary.doc-toggle__summary,
body .markdown-body details[open] > summary,
body .markdown-body details[open] > summary.doc-toggle__summary,
body .markdown-body details.doc-toggle[open] > summary,
body .markdown-body details.doc-toggle[open] > summary.doc-toggle__summary,
body .markdown-body details.toggle-blot[open] > summary,
body .markdown-body details.toggle-blot[open] > summary.doc-toggle__summary,
body .markdown-body details[data-toggle][open] > summary,
body .markdown-body details[data-toggle][open] > summary.doc-toggle__summary,
body #js-doc-readonly details[open] > summary,
body #js-doc-readonly details[open] > summary.doc-toggle__summary,
body #js-doc-readonly details.doc-toggle[open] > summary,
body #js-doc-readonly details.doc-toggle[open] > summary.doc-toggle__summary,
body #js-doc-readonly details.toggle-blot[open] > summary,
body #js-doc-readonly details.toggle-blot[open] > summary.doc-toggle__summary,
body #js-doc-readonly details[data-toggle][open] > summary,
body #js-doc-readonly details[data-toggle][open] > summary.doc-toggle__summary,
body #js-doc-readonly.ql-editor details[open] > summary,
body #js-doc-readonly.ql-editor details[open] > summary.doc-toggle__summary,
body #js-doc-readonly.ql-editor details.doc-toggle[open] > summary,
body #js-doc-readonly.ql-editor details.doc-toggle[open] > summary.doc-toggle__summary,
body #js-doc-readonly.ql-editor details.toggle-blot[open] > summary,
body #js-doc-readonly.ql-editor details.toggle-blot[open] > summary.doc-toggle__summary,
body #js-doc-readonly.ql-editor details[data-toggle][open] > summary,
body #js-doc-readonly.ql-editor details[data-toggle][open] > summary.doc-toggle__summary,
body #js-doc-editor-wrap .ql-editor details[open] > summary,
body #js-doc-editor-wrap .ql-editor details[open] > summary.doc-toggle__summary,
body #js-doc-editor-wrap .ql-editor details.doc-toggle[open] > summary,
body #js-doc-editor-wrap .ql-editor details.doc-toggle[open] > summary.doc-toggle__summary,
body #js-doc-editor-wrap .ql-editor details.toggle-blot[open] > summary,
body #js-doc-editor-wrap .ql-editor details.toggle-blot[open] > summary.doc-toggle__summary,
body #js-doc-editor-wrap .ql-editor details[data-toggle][open] > summary,
body #js-doc-editor-wrap .ql-editor details[data-toggle][open] > summary.doc-toggle__summary,
body #js-doc-editor .ql-editor details[open] > summary,
body #js-doc-editor .ql-editor details[open] > summary.doc-toggle__summary,
body #js-doc-editor .ql-editor details.doc-toggle[open] > summary,
body #js-doc-editor .ql-editor details.doc-toggle[open] > summary.doc-toggle__summary,
body #js-doc-editor .ql-editor details.toggle-blot[open] > summary,
body #js-doc-editor .ql-editor details.toggle-blot[open] > summary.doc-toggle__summary,
body #js-doc-editor .ql-editor details[data-toggle][open] > summary,
body #js-doc-editor .ql-editor details[data-toggle][open] > summary.doc-toggle__summary {
  border-bottom: 1px solid var(--color-border, #d0d7de);
  background: var(--color-bg-subtle, #f6f8fa);
  color: var(--color-text, #24292f);
}
body .doc-article details[open] > summary::before, body .doc-article details[open] > summary.doc-toggle__summary::before,
body .doc-article details.doc-toggle[open] > summary::before,
body .doc-article details.doc-toggle[open] > summary.doc-toggle__summary::before,
body .doc-article details.toggle-blot[open] > summary::before,
body .doc-article details.toggle-blot[open] > summary.doc-toggle__summary::before,
body .doc-article details[data-toggle][open] > summary::before,
body .doc-article details[data-toggle][open] > summary.doc-toggle__summary::before,
body .doc-page__content details[open] > summary::before,
body .doc-page__content details[open] > summary.doc-toggle__summary::before,
body .doc-page__content details.doc-toggle[open] > summary::before,
body .doc-page__content details.doc-toggle[open] > summary.doc-toggle__summary::before,
body .doc-page__content details.toggle-blot[open] > summary::before,
body .doc-page__content details.toggle-blot[open] > summary.doc-toggle__summary::before,
body .doc-page__content details[data-toggle][open] > summary::before,
body .doc-page__content details[data-toggle][open] > summary.doc-toggle__summary::before,
body .doc-content details[open] > summary::before,
body .doc-content details[open] > summary.doc-toggle__summary::before,
body .doc-content details.doc-toggle[open] > summary::before,
body .doc-content details.doc-toggle[open] > summary.doc-toggle__summary::before,
body .doc-content details.toggle-blot[open] > summary::before,
body .doc-content details.toggle-blot[open] > summary.doc-toggle__summary::before,
body .doc-content details[data-toggle][open] > summary::before,
body .doc-content details[data-toggle][open] > summary.doc-toggle__summary::before,
body .markdown-body details[open] > summary::before,
body .markdown-body details[open] > summary.doc-toggle__summary::before,
body .markdown-body details.doc-toggle[open] > summary::before,
body .markdown-body details.doc-toggle[open] > summary.doc-toggle__summary::before,
body .markdown-body details.toggle-blot[open] > summary::before,
body .markdown-body details.toggle-blot[open] > summary.doc-toggle__summary::before,
body .markdown-body details[data-toggle][open] > summary::before,
body .markdown-body details[data-toggle][open] > summary.doc-toggle__summary::before,
body #js-doc-readonly details[open] > summary::before,
body #js-doc-readonly details[open] > summary.doc-toggle__summary::before,
body #js-doc-readonly details.doc-toggle[open] > summary::before,
body #js-doc-readonly details.doc-toggle[open] > summary.doc-toggle__summary::before,
body #js-doc-readonly details.toggle-blot[open] > summary::before,
body #js-doc-readonly details.toggle-blot[open] > summary.doc-toggle__summary::before,
body #js-doc-readonly details[data-toggle][open] > summary::before,
body #js-doc-readonly details[data-toggle][open] > summary.doc-toggle__summary::before,
body #js-doc-readonly.ql-editor details[open] > summary::before,
body #js-doc-readonly.ql-editor details[open] > summary.doc-toggle__summary::before,
body #js-doc-readonly.ql-editor details.doc-toggle[open] > summary::before,
body #js-doc-readonly.ql-editor details.doc-toggle[open] > summary.doc-toggle__summary::before,
body #js-doc-readonly.ql-editor details.toggle-blot[open] > summary::before,
body #js-doc-readonly.ql-editor details.toggle-blot[open] > summary.doc-toggle__summary::before,
body #js-doc-readonly.ql-editor details[data-toggle][open] > summary::before,
body #js-doc-readonly.ql-editor details[data-toggle][open] > summary.doc-toggle__summary::before,
body #js-doc-editor-wrap .ql-editor details[open] > summary::before,
body #js-doc-editor-wrap .ql-editor details[open] > summary.doc-toggle__summary::before,
body #js-doc-editor-wrap .ql-editor details.doc-toggle[open] > summary::before,
body #js-doc-editor-wrap .ql-editor details.doc-toggle[open] > summary.doc-toggle__summary::before,
body #js-doc-editor-wrap .ql-editor details.toggle-blot[open] > summary::before,
body #js-doc-editor-wrap .ql-editor details.toggle-blot[open] > summary.doc-toggle__summary::before,
body #js-doc-editor-wrap .ql-editor details[data-toggle][open] > summary::before,
body #js-doc-editor-wrap .ql-editor details[data-toggle][open] > summary.doc-toggle__summary::before,
body #js-doc-editor .ql-editor details[open] > summary::before,
body #js-doc-editor .ql-editor details[open] > summary.doc-toggle__summary::before,
body #js-doc-editor .ql-editor details.doc-toggle[open] > summary::before,
body #js-doc-editor .ql-editor details.doc-toggle[open] > summary.doc-toggle__summary::before,
body #js-doc-editor .ql-editor details.toggle-blot[open] > summary::before,
body #js-doc-editor .ql-editor details.toggle-blot[open] > summary.doc-toggle__summary::before,
body #js-doc-editor .ql-editor details[data-toggle][open] > summary::before,
body #js-doc-editor .ql-editor details[data-toggle][open] > summary.doc-toggle__summary::before {
  transform: rotate(45deg);
  border-color: var(--color-primary, #0969da);
}
body .doc-article details .doc-toggle__content, body .doc-article details > p, body .doc-article details > div, body .doc-article details > ul, body .doc-article details > ol, body .doc-article details > table, body .doc-article details > blockquote, body .doc-article details > .callout,
body .doc-article details.doc-toggle .doc-toggle__content,
body .doc-article details.doc-toggle > p,
body .doc-article details.doc-toggle > div,
body .doc-article details.doc-toggle > ul,
body .doc-article details.doc-toggle > ol,
body .doc-article details.doc-toggle > table,
body .doc-article details.doc-toggle > blockquote,
body .doc-article details.doc-toggle > .callout,
body .doc-article details.toggle-blot .doc-toggle__content,
body .doc-article details.toggle-blot > p,
body .doc-article details.toggle-blot > div,
body .doc-article details.toggle-blot > ul,
body .doc-article details.toggle-blot > ol,
body .doc-article details.toggle-blot > table,
body .doc-article details.toggle-blot > blockquote,
body .doc-article details.toggle-blot > .callout,
body .doc-article details[data-toggle] .doc-toggle__content,
body .doc-article details[data-toggle] > p,
body .doc-article details[data-toggle] > div,
body .doc-article details[data-toggle] > ul,
body .doc-article details[data-toggle] > ol,
body .doc-article details[data-toggle] > table,
body .doc-article details[data-toggle] > blockquote,
body .doc-article details[data-toggle] > .callout,
body .doc-page__content details .doc-toggle__content,
body .doc-page__content details > p,
body .doc-page__content details > div,
body .doc-page__content details > ul,
body .doc-page__content details > ol,
body .doc-page__content details > table,
body .doc-page__content details > blockquote,
body .doc-page__content details > .callout,
body .doc-page__content details.doc-toggle .doc-toggle__content,
body .doc-page__content details.doc-toggle > p,
body .doc-page__content details.doc-toggle > div,
body .doc-page__content details.doc-toggle > ul,
body .doc-page__content details.doc-toggle > ol,
body .doc-page__content details.doc-toggle > table,
body .doc-page__content details.doc-toggle > blockquote,
body .doc-page__content details.doc-toggle > .callout,
body .doc-page__content details.toggle-blot .doc-toggle__content,
body .doc-page__content details.toggle-blot > p,
body .doc-page__content details.toggle-blot > div,
body .doc-page__content details.toggle-blot > ul,
body .doc-page__content details.toggle-blot > ol,
body .doc-page__content details.toggle-blot > table,
body .doc-page__content details.toggle-blot > blockquote,
body .doc-page__content details.toggle-blot > .callout,
body .doc-page__content details[data-toggle] .doc-toggle__content,
body .doc-page__content details[data-toggle] > p,
body .doc-page__content details[data-toggle] > div,
body .doc-page__content details[data-toggle] > ul,
body .doc-page__content details[data-toggle] > ol,
body .doc-page__content details[data-toggle] > table,
body .doc-page__content details[data-toggle] > blockquote,
body .doc-page__content details[data-toggle] > .callout,
body .doc-content details .doc-toggle__content,
body .doc-content details > p,
body .doc-content details > div,
body .doc-content details > ul,
body .doc-content details > ol,
body .doc-content details > table,
body .doc-content details > blockquote,
body .doc-content details > .callout,
body .doc-content details.doc-toggle .doc-toggle__content,
body .doc-content details.doc-toggle > p,
body .doc-content details.doc-toggle > div,
body .doc-content details.doc-toggle > ul,
body .doc-content details.doc-toggle > ol,
body .doc-content details.doc-toggle > table,
body .doc-content details.doc-toggle > blockquote,
body .doc-content details.doc-toggle > .callout,
body .doc-content details.toggle-blot .doc-toggle__content,
body .doc-content details.toggle-blot > p,
body .doc-content details.toggle-blot > div,
body .doc-content details.toggle-blot > ul,
body .doc-content details.toggle-blot > ol,
body .doc-content details.toggle-blot > table,
body .doc-content details.toggle-blot > blockquote,
body .doc-content details.toggle-blot > .callout,
body .doc-content details[data-toggle] .doc-toggle__content,
body .doc-content details[data-toggle] > p,
body .doc-content details[data-toggle] > div,
body .doc-content details[data-toggle] > ul,
body .doc-content details[data-toggle] > ol,
body .doc-content details[data-toggle] > table,
body .doc-content details[data-toggle] > blockquote,
body .doc-content details[data-toggle] > .callout,
body .markdown-body details .doc-toggle__content,
body .markdown-body details > p,
body .markdown-body details > div,
body .markdown-body details > ul,
body .markdown-body details > ol,
body .markdown-body details > table,
body .markdown-body details > blockquote,
body .markdown-body details > .callout,
body .markdown-body details.doc-toggle .doc-toggle__content,
body .markdown-body details.doc-toggle > p,
body .markdown-body details.doc-toggle > div,
body .markdown-body details.doc-toggle > ul,
body .markdown-body details.doc-toggle > ol,
body .markdown-body details.doc-toggle > table,
body .markdown-body details.doc-toggle > blockquote,
body .markdown-body details.doc-toggle > .callout,
body .markdown-body details.toggle-blot .doc-toggle__content,
body .markdown-body details.toggle-blot > p,
body .markdown-body details.toggle-blot > div,
body .markdown-body details.toggle-blot > ul,
body .markdown-body details.toggle-blot > ol,
body .markdown-body details.toggle-blot > table,
body .markdown-body details.toggle-blot > blockquote,
body .markdown-body details.toggle-blot > .callout,
body .markdown-body details[data-toggle] .doc-toggle__content,
body .markdown-body details[data-toggle] > p,
body .markdown-body details[data-toggle] > div,
body .markdown-body details[data-toggle] > ul,
body .markdown-body details[data-toggle] > ol,
body .markdown-body details[data-toggle] > table,
body .markdown-body details[data-toggle] > blockquote,
body .markdown-body details[data-toggle] > .callout,
body #js-doc-readonly details .doc-toggle__content,
body #js-doc-readonly details > p,
body #js-doc-readonly details > div,
body #js-doc-readonly details > ul,
body #js-doc-readonly details > ol,
body #js-doc-readonly details > table,
body #js-doc-readonly details > blockquote,
body #js-doc-readonly details > .callout,
body #js-doc-readonly details.doc-toggle .doc-toggle__content,
body #js-doc-readonly details.doc-toggle > p,
body #js-doc-readonly details.doc-toggle > div,
body #js-doc-readonly details.doc-toggle > ul,
body #js-doc-readonly details.doc-toggle > ol,
body #js-doc-readonly details.doc-toggle > table,
body #js-doc-readonly details.doc-toggle > blockquote,
body #js-doc-readonly details.doc-toggle > .callout,
body #js-doc-readonly details.toggle-blot .doc-toggle__content,
body #js-doc-readonly details.toggle-blot > p,
body #js-doc-readonly details.toggle-blot > div,
body #js-doc-readonly details.toggle-blot > ul,
body #js-doc-readonly details.toggle-blot > ol,
body #js-doc-readonly details.toggle-blot > table,
body #js-doc-readonly details.toggle-blot > blockquote,
body #js-doc-readonly details.toggle-blot > .callout,
body #js-doc-readonly details[data-toggle] .doc-toggle__content,
body #js-doc-readonly details[data-toggle] > p,
body #js-doc-readonly details[data-toggle] > div,
body #js-doc-readonly details[data-toggle] > ul,
body #js-doc-readonly details[data-toggle] > ol,
body #js-doc-readonly details[data-toggle] > table,
body #js-doc-readonly details[data-toggle] > blockquote,
body #js-doc-readonly details[data-toggle] > .callout,
body #js-doc-readonly.ql-editor details .doc-toggle__content,
body #js-doc-readonly.ql-editor details > p,
body #js-doc-readonly.ql-editor details > div,
body #js-doc-readonly.ql-editor details > ul,
body #js-doc-readonly.ql-editor details > ol,
body #js-doc-readonly.ql-editor details > table,
body #js-doc-readonly.ql-editor details > blockquote,
body #js-doc-readonly.ql-editor details > .callout,
body #js-doc-readonly.ql-editor details.doc-toggle .doc-toggle__content,
body #js-doc-readonly.ql-editor details.doc-toggle > p,
body #js-doc-readonly.ql-editor details.doc-toggle > div,
body #js-doc-readonly.ql-editor details.doc-toggle > ul,
body #js-doc-readonly.ql-editor details.doc-toggle > ol,
body #js-doc-readonly.ql-editor details.doc-toggle > table,
body #js-doc-readonly.ql-editor details.doc-toggle > blockquote,
body #js-doc-readonly.ql-editor details.doc-toggle > .callout,
body #js-doc-readonly.ql-editor details.toggle-blot .doc-toggle__content,
body #js-doc-readonly.ql-editor details.toggle-blot > p,
body #js-doc-readonly.ql-editor details.toggle-blot > div,
body #js-doc-readonly.ql-editor details.toggle-blot > ul,
body #js-doc-readonly.ql-editor details.toggle-blot > ol,
body #js-doc-readonly.ql-editor details.toggle-blot > table,
body #js-doc-readonly.ql-editor details.toggle-blot > blockquote,
body #js-doc-readonly.ql-editor details.toggle-blot > .callout,
body #js-doc-readonly.ql-editor details[data-toggle] .doc-toggle__content,
body #js-doc-readonly.ql-editor details[data-toggle] > p,
body #js-doc-readonly.ql-editor details[data-toggle] > div,
body #js-doc-readonly.ql-editor details[data-toggle] > ul,
body #js-doc-readonly.ql-editor details[data-toggle] > ol,
body #js-doc-readonly.ql-editor details[data-toggle] > table,
body #js-doc-readonly.ql-editor details[data-toggle] > blockquote,
body #js-doc-readonly.ql-editor details[data-toggle] > .callout,
body #js-doc-editor-wrap .ql-editor details .doc-toggle__content,
body #js-doc-editor-wrap .ql-editor details > p,
body #js-doc-editor-wrap .ql-editor details > div,
body #js-doc-editor-wrap .ql-editor details > ul,
body #js-doc-editor-wrap .ql-editor details > ol,
body #js-doc-editor-wrap .ql-editor details > table,
body #js-doc-editor-wrap .ql-editor details > blockquote,
body #js-doc-editor-wrap .ql-editor details > .callout,
body #js-doc-editor-wrap .ql-editor details.doc-toggle .doc-toggle__content,
body #js-doc-editor-wrap .ql-editor details.doc-toggle > p,
body #js-doc-editor-wrap .ql-editor details.doc-toggle > div,
body #js-doc-editor-wrap .ql-editor details.doc-toggle > ul,
body #js-doc-editor-wrap .ql-editor details.doc-toggle > ol,
body #js-doc-editor-wrap .ql-editor details.doc-toggle > table,
body #js-doc-editor-wrap .ql-editor details.doc-toggle > blockquote,
body #js-doc-editor-wrap .ql-editor details.doc-toggle > .callout,
body #js-doc-editor-wrap .ql-editor details.toggle-blot .doc-toggle__content,
body #js-doc-editor-wrap .ql-editor details.toggle-blot > p,
body #js-doc-editor-wrap .ql-editor details.toggle-blot > div,
body #js-doc-editor-wrap .ql-editor details.toggle-blot > ul,
body #js-doc-editor-wrap .ql-editor details.toggle-blot > ol,
body #js-doc-editor-wrap .ql-editor details.toggle-blot > table,
body #js-doc-editor-wrap .ql-editor details.toggle-blot > blockquote,
body #js-doc-editor-wrap .ql-editor details.toggle-blot > .callout,
body #js-doc-editor-wrap .ql-editor details[data-toggle] .doc-toggle__content,
body #js-doc-editor-wrap .ql-editor details[data-toggle] > p,
body #js-doc-editor-wrap .ql-editor details[data-toggle] > div,
body #js-doc-editor-wrap .ql-editor details[data-toggle] > ul,
body #js-doc-editor-wrap .ql-editor details[data-toggle] > ol,
body #js-doc-editor-wrap .ql-editor details[data-toggle] > table,
body #js-doc-editor-wrap .ql-editor details[data-toggle] > blockquote,
body #js-doc-editor-wrap .ql-editor details[data-toggle] > .callout,
body #js-doc-editor .ql-editor details .doc-toggle__content,
body #js-doc-editor .ql-editor details > p,
body #js-doc-editor .ql-editor details > div,
body #js-doc-editor .ql-editor details > ul,
body #js-doc-editor .ql-editor details > ol,
body #js-doc-editor .ql-editor details > table,
body #js-doc-editor .ql-editor details > blockquote,
body #js-doc-editor .ql-editor details > .callout,
body #js-doc-editor .ql-editor details.doc-toggle .doc-toggle__content,
body #js-doc-editor .ql-editor details.doc-toggle > p,
body #js-doc-editor .ql-editor details.doc-toggle > div,
body #js-doc-editor .ql-editor details.doc-toggle > ul,
body #js-doc-editor .ql-editor details.doc-toggle > ol,
body #js-doc-editor .ql-editor details.doc-toggle > table,
body #js-doc-editor .ql-editor details.doc-toggle > blockquote,
body #js-doc-editor .ql-editor details.doc-toggle > .callout,
body #js-doc-editor .ql-editor details.toggle-blot .doc-toggle__content,
body #js-doc-editor .ql-editor details.toggle-blot > p,
body #js-doc-editor .ql-editor details.toggle-blot > div,
body #js-doc-editor .ql-editor details.toggle-blot > ul,
body #js-doc-editor .ql-editor details.toggle-blot > ol,
body #js-doc-editor .ql-editor details.toggle-blot > table,
body #js-doc-editor .ql-editor details.toggle-blot > blockquote,
body #js-doc-editor .ql-editor details.toggle-blot > .callout,
body #js-doc-editor .ql-editor details[data-toggle] .doc-toggle__content,
body #js-doc-editor .ql-editor details[data-toggle] > p,
body #js-doc-editor .ql-editor details[data-toggle] > div,
body #js-doc-editor .ql-editor details[data-toggle] > ul,
body #js-doc-editor .ql-editor details[data-toggle] > ol,
body #js-doc-editor .ql-editor details[data-toggle] > table,
body #js-doc-editor .ql-editor details[data-toggle] > blockquote,
body #js-doc-editor .ql-editor details[data-toggle] > .callout {
  padding: 12px 16px 14px 16px;
  margin: 0;
  line-height: 1.65;
  color: var(--color-text, #24292f);
  background: transparent;
  border: none;
}
body .doc-article details > p + p, body .doc-article details > div + div,
body .doc-article details .doc-toggle__content + .doc-toggle__content, body .doc-article details > p + div, body .doc-article details > div + p,
body .doc-article details.doc-toggle > p + p,
body .doc-article details.doc-toggle > div + div,
body .doc-article details.doc-toggle .doc-toggle__content + .doc-toggle__content,
body .doc-article details.doc-toggle > p + div,
body .doc-article details.doc-toggle > div + p,
body .doc-article details.toggle-blot > p + p,
body .doc-article details.toggle-blot > div + div,
body .doc-article details.toggle-blot .doc-toggle__content + .doc-toggle__content,
body .doc-article details.toggle-blot > p + div,
body .doc-article details.toggle-blot > div + p,
body .doc-article details[data-toggle] > p + p,
body .doc-article details[data-toggle] > div + div,
body .doc-article details[data-toggle] .doc-toggle__content + .doc-toggle__content,
body .doc-article details[data-toggle] > p + div,
body .doc-article details[data-toggle] > div + p,
body .doc-page__content details > p + p,
body .doc-page__content details > div + div,
body .doc-page__content details .doc-toggle__content + .doc-toggle__content,
body .doc-page__content details > p + div,
body .doc-page__content details > div + p,
body .doc-page__content details.doc-toggle > p + p,
body .doc-page__content details.doc-toggle > div + div,
body .doc-page__content details.doc-toggle .doc-toggle__content + .doc-toggle__content,
body .doc-page__content details.doc-toggle > p + div,
body .doc-page__content details.doc-toggle > div + p,
body .doc-page__content details.toggle-blot > p + p,
body .doc-page__content details.toggle-blot > div + div,
body .doc-page__content details.toggle-blot .doc-toggle__content + .doc-toggle__content,
body .doc-page__content details.toggle-blot > p + div,
body .doc-page__content details.toggle-blot > div + p,
body .doc-page__content details[data-toggle] > p + p,
body .doc-page__content details[data-toggle] > div + div,
body .doc-page__content details[data-toggle] .doc-toggle__content + .doc-toggle__content,
body .doc-page__content details[data-toggle] > p + div,
body .doc-page__content details[data-toggle] > div + p,
body .doc-content details > p + p,
body .doc-content details > div + div,
body .doc-content details .doc-toggle__content + .doc-toggle__content,
body .doc-content details > p + div,
body .doc-content details > div + p,
body .doc-content details.doc-toggle > p + p,
body .doc-content details.doc-toggle > div + div,
body .doc-content details.doc-toggle .doc-toggle__content + .doc-toggle__content,
body .doc-content details.doc-toggle > p + div,
body .doc-content details.doc-toggle > div + p,
body .doc-content details.toggle-blot > p + p,
body .doc-content details.toggle-blot > div + div,
body .doc-content details.toggle-blot .doc-toggle__content + .doc-toggle__content,
body .doc-content details.toggle-blot > p + div,
body .doc-content details.toggle-blot > div + p,
body .doc-content details[data-toggle] > p + p,
body .doc-content details[data-toggle] > div + div,
body .doc-content details[data-toggle] .doc-toggle__content + .doc-toggle__content,
body .doc-content details[data-toggle] > p + div,
body .doc-content details[data-toggle] > div + p,
body .markdown-body details > p + p,
body .markdown-body details > div + div,
body .markdown-body details .doc-toggle__content + .doc-toggle__content,
body .markdown-body details > p + div,
body .markdown-body details > div + p,
body .markdown-body details.doc-toggle > p + p,
body .markdown-body details.doc-toggle > div + div,
body .markdown-body details.doc-toggle .doc-toggle__content + .doc-toggle__content,
body .markdown-body details.doc-toggle > p + div,
body .markdown-body details.doc-toggle > div + p,
body .markdown-body details.toggle-blot > p + p,
body .markdown-body details.toggle-blot > div + div,
body .markdown-body details.toggle-blot .doc-toggle__content + .doc-toggle__content,
body .markdown-body details.toggle-blot > p + div,
body .markdown-body details.toggle-blot > div + p,
body .markdown-body details[data-toggle] > p + p,
body .markdown-body details[data-toggle] > div + div,
body .markdown-body details[data-toggle] .doc-toggle__content + .doc-toggle__content,
body .markdown-body details[data-toggle] > p + div,
body .markdown-body details[data-toggle] > div + p,
body #js-doc-readonly details > p + p,
body #js-doc-readonly details > div + div,
body #js-doc-readonly details .doc-toggle__content + .doc-toggle__content,
body #js-doc-readonly details > p + div,
body #js-doc-readonly details > div + p,
body #js-doc-readonly details.doc-toggle > p + p,
body #js-doc-readonly details.doc-toggle > div + div,
body #js-doc-readonly details.doc-toggle .doc-toggle__content + .doc-toggle__content,
body #js-doc-readonly details.doc-toggle > p + div,
body #js-doc-readonly details.doc-toggle > div + p,
body #js-doc-readonly details.toggle-blot > p + p,
body #js-doc-readonly details.toggle-blot > div + div,
body #js-doc-readonly details.toggle-blot .doc-toggle__content + .doc-toggle__content,
body #js-doc-readonly details.toggle-blot > p + div,
body #js-doc-readonly details.toggle-blot > div + p,
body #js-doc-readonly details[data-toggle] > p + p,
body #js-doc-readonly details[data-toggle] > div + div,
body #js-doc-readonly details[data-toggle] .doc-toggle__content + .doc-toggle__content,
body #js-doc-readonly details[data-toggle] > p + div,
body #js-doc-readonly details[data-toggle] > div + p,
body #js-doc-readonly.ql-editor details > p + p,
body #js-doc-readonly.ql-editor details > div + div,
body #js-doc-readonly.ql-editor details .doc-toggle__content + .doc-toggle__content,
body #js-doc-readonly.ql-editor details > p + div,
body #js-doc-readonly.ql-editor details > div + p,
body #js-doc-readonly.ql-editor details.doc-toggle > p + p,
body #js-doc-readonly.ql-editor details.doc-toggle > div + div,
body #js-doc-readonly.ql-editor details.doc-toggle .doc-toggle__content + .doc-toggle__content,
body #js-doc-readonly.ql-editor details.doc-toggle > p + div,
body #js-doc-readonly.ql-editor details.doc-toggle > div + p,
body #js-doc-readonly.ql-editor details.toggle-blot > p + p,
body #js-doc-readonly.ql-editor details.toggle-blot > div + div,
body #js-doc-readonly.ql-editor details.toggle-blot .doc-toggle__content + .doc-toggle__content,
body #js-doc-readonly.ql-editor details.toggle-blot > p + div,
body #js-doc-readonly.ql-editor details.toggle-blot > div + p,
body #js-doc-readonly.ql-editor details[data-toggle] > p + p,
body #js-doc-readonly.ql-editor details[data-toggle] > div + div,
body #js-doc-readonly.ql-editor details[data-toggle] .doc-toggle__content + .doc-toggle__content,
body #js-doc-readonly.ql-editor details[data-toggle] > p + div,
body #js-doc-readonly.ql-editor details[data-toggle] > div + p,
body #js-doc-editor-wrap .ql-editor details > p + p,
body #js-doc-editor-wrap .ql-editor details > div + div,
body #js-doc-editor-wrap .ql-editor details .doc-toggle__content + .doc-toggle__content,
body #js-doc-editor-wrap .ql-editor details > p + div,
body #js-doc-editor-wrap .ql-editor details > div + p,
body #js-doc-editor-wrap .ql-editor details.doc-toggle > p + p,
body #js-doc-editor-wrap .ql-editor details.doc-toggle > div + div,
body #js-doc-editor-wrap .ql-editor details.doc-toggle .doc-toggle__content + .doc-toggle__content,
body #js-doc-editor-wrap .ql-editor details.doc-toggle > p + div,
body #js-doc-editor-wrap .ql-editor details.doc-toggle > div + p,
body #js-doc-editor-wrap .ql-editor details.toggle-blot > p + p,
body #js-doc-editor-wrap .ql-editor details.toggle-blot > div + div,
body #js-doc-editor-wrap .ql-editor details.toggle-blot .doc-toggle__content + .doc-toggle__content,
body #js-doc-editor-wrap .ql-editor details.toggle-blot > p + div,
body #js-doc-editor-wrap .ql-editor details.toggle-blot > div + p,
body #js-doc-editor-wrap .ql-editor details[data-toggle] > p + p,
body #js-doc-editor-wrap .ql-editor details[data-toggle] > div + div,
body #js-doc-editor-wrap .ql-editor details[data-toggle] .doc-toggle__content + .doc-toggle__content,
body #js-doc-editor-wrap .ql-editor details[data-toggle] > p + div,
body #js-doc-editor-wrap .ql-editor details[data-toggle] > div + p,
body #js-doc-editor .ql-editor details > p + p,
body #js-doc-editor .ql-editor details > div + div,
body #js-doc-editor .ql-editor details .doc-toggle__content + .doc-toggle__content,
body #js-doc-editor .ql-editor details > p + div,
body #js-doc-editor .ql-editor details > div + p,
body #js-doc-editor .ql-editor details.doc-toggle > p + p,
body #js-doc-editor .ql-editor details.doc-toggle > div + div,
body #js-doc-editor .ql-editor details.doc-toggle .doc-toggle__content + .doc-toggle__content,
body #js-doc-editor .ql-editor details.doc-toggle > p + div,
body #js-doc-editor .ql-editor details.doc-toggle > div + p,
body #js-doc-editor .ql-editor details.toggle-blot > p + p,
body #js-doc-editor .ql-editor details.toggle-blot > div + div,
body #js-doc-editor .ql-editor details.toggle-blot .doc-toggle__content + .doc-toggle__content,
body #js-doc-editor .ql-editor details.toggle-blot > p + div,
body #js-doc-editor .ql-editor details.toggle-blot > div + p,
body #js-doc-editor .ql-editor details[data-toggle] > p + p,
body #js-doc-editor .ql-editor details[data-toggle] > div + div,
body #js-doc-editor .ql-editor details[data-toggle] .doc-toggle__content + .doc-toggle__content,
body #js-doc-editor .ql-editor details[data-toggle] > p + div,
body #js-doc-editor .ql-editor details[data-toggle] > div + p {
  padding-top: 4px;
}
body .doc-article code,
body .doc-page__content code,
body .doc-content code,
body .markdown-body code,
body #js-doc-readonly code,
body #js-doc-readonly.ql-editor code,
body #js-doc-editor-wrap .ql-editor code,
body #js-doc-editor .ql-editor code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  color: var(--color-code-inline, #0a7a3d);
  background: none;
  padding: 0;
}
body .doc-article pre code,
body .doc-page__content pre code,
body .doc-content pre code,
body .markdown-body pre code,
body #js-doc-readonly pre code,
body #js-doc-readonly.ql-editor pre code,
body #js-doc-editor-wrap .ql-editor pre code,
body #js-doc-editor .ql-editor pre code {
  color: inherit;
}
body .doc-article li > .ql-ui::before,
body #js-doc-readonly li > .ql-ui::before,
body #js-doc-readonly.ql-editor li > .ql-ui::before,
body #js-doc-editor-wrap .ql-editor li > .ql-ui::before,
body .ql-editor li > .ql-ui::before {
  display: inline-block;
  margin-left: -1.85em;
  width: 1.45em;
  margin-right: 0.4em;
  text-align: right;
  white-space: nowrap;
  font-feature-settings: "tnum" 1;
  font-variant-numeric: tabular-nums;
}
body .doc-article ul:not(:has(li[data-list])),
body .doc-article ol:not(:has(li[data-list])),
body #js-doc-readonly ul:not(:has(li[data-list])),
body #js-doc-readonly ol:not(:has(li[data-list])),
body #js-doc-readonly.ql-editor ul:not(:has(li[data-list])),
body #js-doc-readonly.ql-editor ol:not(:has(li[data-list])),
body #js-doc-editor-wrap .ql-editor ul:not(:has(li[data-list])),
body #js-doc-editor-wrap .ql-editor ol:not(:has(li[data-list])),
body .ql-editor ul:not(:has(li[data-list])),
body .ql-editor ol:not(:has(li[data-list])) {
  padding-left: 1.85em;
}
body .doc-article ul:not(:has(li[data-list])) > li,
body .doc-article ol:not(:has(li[data-list])) > li,
body #js-doc-readonly ul:not(:has(li[data-list])) > li,
body #js-doc-readonly ol:not(:has(li[data-list])) > li,
body #js-doc-readonly.ql-editor ul:not(:has(li[data-list])) > li,
body #js-doc-readonly.ql-editor ol:not(:has(li[data-list])) > li,
body #js-doc-editor-wrap .ql-editor ul:not(:has(li[data-list])) > li,
body #js-doc-editor-wrap .ql-editor ol:not(:has(li[data-list])) > li,
body .ql-editor ul:not(:has(li[data-list])) > li,
body .ql-editor ol:not(:has(li[data-list])) > li {
  padding-left: 0;
}
body .doc-article ul:not(:has(li[data-list])) > li,
body #js-doc-readonly ul:not(:has(li[data-list])) > li,
body #js-doc-readonly.ql-editor ul:not(:has(li[data-list])) > li,
body #js-doc-editor-wrap .ql-editor ul:not(:has(li[data-list])) > li,
body .ql-editor ul:not(:has(li[data-list])) > li {
  list-style-type: disc;
}
body .doc-article ol:not(:has(li[data-list])) > li,
body #js-doc-readonly ol:not(:has(li[data-list])) > li,
body #js-doc-readonly.ql-editor ol:not(:has(li[data-list])) > li,
body #js-doc-editor-wrap .ql-editor ol:not(:has(li[data-list])) > li,
body .ql-editor ol:not(:has(li[data-list])) > li {
  list-style-type: decimal;
}
body .doc-article ul:not(:has(li[data-list])) > li::marker,
body #js-doc-readonly ul:not(:has(li[data-list])) > li::marker,
body #js-doc-readonly.ql-editor ul:not(:has(li[data-list])) > li::marker,
body #js-doc-editor-wrap .ql-editor ul:not(:has(li[data-list])) > li::marker,
body .ql-editor ul:not(:has(li[data-list])) > li::marker {
  color: var(--color-primary-strong);
  font-size: 1.1em;
}
body .doc-article ol:not(:has(li[data-list])) > li::marker,
body #js-doc-readonly ol:not(:has(li[data-list])) > li::marker,
body #js-doc-readonly.ql-editor ol:not(:has(li[data-list])) > li::marker,
body #js-doc-editor-wrap .ql-editor ol:not(:has(li[data-list])) > li::marker,
body .ql-editor ol:not(:has(li[data-list])) > li::marker {
  color: var(--color-primary-strong);
  font-weight: 600;
  font-feature-settings: "tnum" 1;
  font-variant-numeric: tabular-nums;
}
body .doc-article li[data-list=bullet] > .ql-ui::before,
body #js-doc-readonly li[data-list=bullet] > .ql-ui::before,
body #js-doc-readonly.ql-editor li[data-list=bullet] > .ql-ui::before,
body #js-doc-editor-wrap .ql-editor li[data-list=bullet] > .ql-ui::before,
body .ql-editor li[data-list=bullet] > .ql-ui::before {
  color: var(--color-primary-strong);
  font-size: 1.15em;
  vertical-align: -0.05em;
  transition: transform 0.15s ease, color 0.15s ease;
}
body .doc-article li[data-list=bullet]:hover > .ql-ui::before,
body #js-doc-readonly li[data-list=bullet]:hover > .ql-ui::before,
body #js-doc-readonly.ql-editor li[data-list=bullet]:hover > .ql-ui::before,
body #js-doc-editor-wrap .ql-editor li[data-list=bullet]:hover > .ql-ui::before,
body .ql-editor li[data-list=bullet]:hover > .ql-ui::before {
  transform: scale(1.25);
  color: var(--color-primary-hover, #0550ae);
}
body .doc-article li[data-list=bullet].ql-indent-1 > .ql-ui::before,
body .doc-article li[data-list=bullet].ql-indent-4 > .ql-ui::before,
body .doc-article li[data-list=bullet].ql-indent-7 > .ql-ui::before,
body #js-doc-readonly li[data-list=bullet].ql-indent-1 > .ql-ui::before,
body #js-doc-readonly li[data-list=bullet].ql-indent-4 > .ql-ui::before,
body #js-doc-readonly li[data-list=bullet].ql-indent-7 > .ql-ui::before,
body #js-doc-readonly.ql-editor li[data-list=bullet].ql-indent-1 > .ql-ui::before,
body #js-doc-readonly.ql-editor li[data-list=bullet].ql-indent-4 > .ql-ui::before,
body #js-doc-readonly.ql-editor li[data-list=bullet].ql-indent-7 > .ql-ui::before,
body #js-doc-editor-wrap .ql-editor li[data-list=bullet].ql-indent-1 > .ql-ui::before,
body #js-doc-editor-wrap .ql-editor li[data-list=bullet].ql-indent-4 > .ql-ui::before,
body #js-doc-editor-wrap .ql-editor li[data-list=bullet].ql-indent-7 > .ql-ui::before,
body .ql-editor li[data-list=bullet].ql-indent-1 > .ql-ui::before,
body .ql-editor li[data-list=bullet].ql-indent-4 > .ql-ui::before,
body .ql-editor li[data-list=bullet].ql-indent-7 > .ql-ui::before {
  content: "◦";
  font-weight: 700;
  font-size: 1.1em;
}
body .doc-article li[data-list=bullet].ql-indent-2 > .ql-ui::before,
body .doc-article li[data-list=bullet].ql-indent-5 > .ql-ui::before,
body .doc-article li[data-list=bullet].ql-indent-8 > .ql-ui::before,
body #js-doc-readonly li[data-list=bullet].ql-indent-2 > .ql-ui::before,
body #js-doc-readonly li[data-list=bullet].ql-indent-5 > .ql-ui::before,
body #js-doc-readonly li[data-list=bullet].ql-indent-8 > .ql-ui::before,
body #js-doc-readonly.ql-editor li[data-list=bullet].ql-indent-2 > .ql-ui::before,
body #js-doc-readonly.ql-editor li[data-list=bullet].ql-indent-5 > .ql-ui::before,
body #js-doc-readonly.ql-editor li[data-list=bullet].ql-indent-8 > .ql-ui::before,
body #js-doc-editor-wrap .ql-editor li[data-list=bullet].ql-indent-2 > .ql-ui::before,
body #js-doc-editor-wrap .ql-editor li[data-list=bullet].ql-indent-5 > .ql-ui::before,
body #js-doc-editor-wrap .ql-editor li[data-list=bullet].ql-indent-8 > .ql-ui::before,
body .ql-editor li[data-list=bullet].ql-indent-2 > .ql-ui::before,
body .ql-editor li[data-list=bullet].ql-indent-5 > .ql-ui::before,
body .ql-editor li[data-list=bullet].ql-indent-8 > .ql-ui::before {
  content: "▪";
  font-size: 0.95em;
}
body .doc-article li[data-list=ordered] > .ql-ui::before,
body #js-doc-readonly li[data-list=ordered] > .ql-ui::before,
body #js-doc-readonly.ql-editor li[data-list=ordered] > .ql-ui::before,
body #js-doc-editor-wrap .ql-editor li[data-list=ordered] > .ql-ui::before,
body .ql-editor li[data-list=ordered] > .ql-ui::before {
  color: var(--color-primary-strong);
  font-weight: 600;
  transition: color 0.15s ease;
}
body .doc-article li[data-list=ordered]:hover > .ql-ui::before,
body #js-doc-readonly li[data-list=ordered]:hover > .ql-ui::before,
body #js-doc-readonly.ql-editor li[data-list=ordered]:hover > .ql-ui::before,
body #js-doc-editor-wrap .ql-editor li[data-list=ordered]:hover > .ql-ui::before,
body .ql-editor li[data-list=ordered]:hover > .ql-ui::before {
  color: var(--color-primary-hover, #0550ae);
}
body .doc-article li[data-list=checked] > .ql-ui::before,
body #js-doc-readonly li[data-list=checked] > .ql-ui::before,
body #js-doc-readonly.ql-editor li[data-list=checked] > .ql-ui::before,
body #js-doc-editor-wrap .ql-editor li[data-list=checked] > .ql-ui::before,
body .ql-editor li[data-list=checked] > .ql-ui::before {
  color: var(--color-success, #2da44e);
  font-weight: 700;
}
body .doc-article li[data-list=checked],
body #js-doc-readonly li[data-list=checked],
body #js-doc-readonly.ql-editor li[data-list=checked],
body #js-doc-editor-wrap .ql-editor li[data-list=checked],
body .ql-editor li[data-list=checked] {
  color: var(--color-text-muted, #57606a);
  text-decoration: line-through;
  text-decoration-color: rgba(0, 0, 0, 0.25);
}
body .doc-article li[data-list=unchecked] > .ql-ui::before,
body #js-doc-readonly li[data-list=unchecked] > .ql-ui::before,
body #js-doc-readonly.ql-editor li[data-list=unchecked] > .ql-ui::before,
body #js-doc-editor-wrap .ql-editor li[data-list=unchecked] > .ql-ui::before,
body .ql-editor li[data-list=unchecked] > .ql-ui::before {
  color: var(--color-text-muted, #8c959f);
}
body .doc-article .ql-indent-1:not(.ql-direction-rtl),
body #js-doc-readonly .ql-indent-1:not(.ql-direction-rtl),
body #js-doc-readonly.ql-editor .ql-indent-1:not(.ql-direction-rtl),
body #js-doc-editor-wrap .ql-editor .ql-indent-1:not(.ql-direction-rtl),
body .ql-editor .ql-indent-1:not(.ql-direction-rtl) {
  padding-left: 1.8em;
}
body .doc-article li.ql-indent-1:not(.ql-direction-rtl),
body #js-doc-readonly li.ql-indent-1:not(.ql-direction-rtl),
body #js-doc-readonly.ql-editor li.ql-indent-1:not(.ql-direction-rtl),
body #js-doc-editor-wrap .ql-editor li.ql-indent-1:not(.ql-direction-rtl),
body .ql-editor li.ql-indent-1:not(.ql-direction-rtl) {
  padding-left: 3.65em;
}
body .doc-article .ql-indent-2:not(.ql-direction-rtl),
body #js-doc-readonly .ql-indent-2:not(.ql-direction-rtl),
body #js-doc-readonly.ql-editor .ql-indent-2:not(.ql-direction-rtl),
body #js-doc-editor-wrap .ql-editor .ql-indent-2:not(.ql-direction-rtl),
body .ql-editor .ql-indent-2:not(.ql-direction-rtl) {
  padding-left: 3.6em;
}
body .doc-article li.ql-indent-2:not(.ql-direction-rtl),
body #js-doc-readonly li.ql-indent-2:not(.ql-direction-rtl),
body #js-doc-readonly.ql-editor li.ql-indent-2:not(.ql-direction-rtl),
body #js-doc-editor-wrap .ql-editor li.ql-indent-2:not(.ql-direction-rtl),
body .ql-editor li.ql-indent-2:not(.ql-direction-rtl) {
  padding-left: 5.45em;
}
body .doc-article .ql-indent-3:not(.ql-direction-rtl),
body #js-doc-readonly .ql-indent-3:not(.ql-direction-rtl),
body #js-doc-readonly.ql-editor .ql-indent-3:not(.ql-direction-rtl),
body #js-doc-editor-wrap .ql-editor .ql-indent-3:not(.ql-direction-rtl),
body .ql-editor .ql-indent-3:not(.ql-direction-rtl) {
  padding-left: 5.4em;
}
body .doc-article li.ql-indent-3:not(.ql-direction-rtl),
body #js-doc-readonly li.ql-indent-3:not(.ql-direction-rtl),
body #js-doc-readonly.ql-editor li.ql-indent-3:not(.ql-direction-rtl),
body #js-doc-editor-wrap .ql-editor li.ql-indent-3:not(.ql-direction-rtl),
body .ql-editor li.ql-indent-3:not(.ql-direction-rtl) {
  padding-left: 7.25em;
}
body .doc-article .ql-indent-4:not(.ql-direction-rtl),
body #js-doc-readonly .ql-indent-4:not(.ql-direction-rtl),
body #js-doc-readonly.ql-editor .ql-indent-4:not(.ql-direction-rtl),
body #js-doc-editor-wrap .ql-editor .ql-indent-4:not(.ql-direction-rtl),
body .ql-editor .ql-indent-4:not(.ql-direction-rtl) {
  padding-left: 7.2em;
}
body .doc-article li.ql-indent-4:not(.ql-direction-rtl),
body #js-doc-readonly li.ql-indent-4:not(.ql-direction-rtl),
body #js-doc-readonly.ql-editor li.ql-indent-4:not(.ql-direction-rtl),
body #js-doc-editor-wrap .ql-editor li.ql-indent-4:not(.ql-direction-rtl),
body .ql-editor li.ql-indent-4:not(.ql-direction-rtl) {
  padding-left: 9.05em;
}
body .doc-article .ql-indent-5:not(.ql-direction-rtl),
body #js-doc-readonly .ql-indent-5:not(.ql-direction-rtl),
body #js-doc-readonly.ql-editor .ql-indent-5:not(.ql-direction-rtl),
body #js-doc-editor-wrap .ql-editor .ql-indent-5:not(.ql-direction-rtl),
body .ql-editor .ql-indent-5:not(.ql-direction-rtl) {
  padding-left: 9em;
}
body .doc-article li.ql-indent-5:not(.ql-direction-rtl),
body #js-doc-readonly li.ql-indent-5:not(.ql-direction-rtl),
body #js-doc-readonly.ql-editor li.ql-indent-5:not(.ql-direction-rtl),
body #js-doc-editor-wrap .ql-editor li.ql-indent-5:not(.ql-direction-rtl),
body .ql-editor li.ql-indent-5:not(.ql-direction-rtl) {
  padding-left: 10.85em;
}
body .doc-article .ql-indent-6:not(.ql-direction-rtl),
body #js-doc-readonly .ql-indent-6:not(.ql-direction-rtl),
body #js-doc-readonly.ql-editor .ql-indent-6:not(.ql-direction-rtl),
body #js-doc-editor-wrap .ql-editor .ql-indent-6:not(.ql-direction-rtl),
body .ql-editor .ql-indent-6:not(.ql-direction-rtl) {
  padding-left: 10.8em;
}
body .doc-article li.ql-indent-6:not(.ql-direction-rtl),
body #js-doc-readonly li.ql-indent-6:not(.ql-direction-rtl),
body #js-doc-readonly.ql-editor li.ql-indent-6:not(.ql-direction-rtl),
body #js-doc-editor-wrap .ql-editor li.ql-indent-6:not(.ql-direction-rtl),
body .ql-editor li.ql-indent-6:not(.ql-direction-rtl) {
  padding-left: 12.65em;
}
body .doc-article .ql-indent-7:not(.ql-direction-rtl),
body #js-doc-readonly .ql-indent-7:not(.ql-direction-rtl),
body #js-doc-readonly.ql-editor .ql-indent-7:not(.ql-direction-rtl),
body #js-doc-editor-wrap .ql-editor .ql-indent-7:not(.ql-direction-rtl),
body .ql-editor .ql-indent-7:not(.ql-direction-rtl) {
  padding-left: 12.6em;
}
body .doc-article li.ql-indent-7:not(.ql-direction-rtl),
body #js-doc-readonly li.ql-indent-7:not(.ql-direction-rtl),
body #js-doc-readonly.ql-editor li.ql-indent-7:not(.ql-direction-rtl),
body #js-doc-editor-wrap .ql-editor li.ql-indent-7:not(.ql-direction-rtl),
body .ql-editor li.ql-indent-7:not(.ql-direction-rtl) {
  padding-left: 14.45em;
}
body .doc-article .ql-indent-8:not(.ql-direction-rtl),
body #js-doc-readonly .ql-indent-8:not(.ql-direction-rtl),
body #js-doc-readonly.ql-editor .ql-indent-8:not(.ql-direction-rtl),
body #js-doc-editor-wrap .ql-editor .ql-indent-8:not(.ql-direction-rtl),
body .ql-editor .ql-indent-8:not(.ql-direction-rtl) {
  padding-left: 14.4em;
}
body .doc-article li.ql-indent-8:not(.ql-direction-rtl),
body #js-doc-readonly li.ql-indent-8:not(.ql-direction-rtl),
body #js-doc-readonly.ql-editor li.ql-indent-8:not(.ql-direction-rtl),
body #js-doc-editor-wrap .ql-editor li.ql-indent-8:not(.ql-direction-rtl),
body .ql-editor li.ql-indent-8:not(.ql-direction-rtl) {
  padding-left: 16.25em;
}

[data-theme=dark] body .doc-article a,
[data-theme=dark] body .doc-article table td a,
[data-theme=dark] body .doc-article table th a,
[data-theme=dark] body #js-doc-readonly a,
[data-theme=dark] body #js-doc-readonly table td a,
[data-theme=dark] body #js-doc-readonly table th a,
[data-theme=dark] body #js-doc-readonly.ql-editor a,
[data-theme=dark] body #js-doc-readonly.ql-editor table td a,
[data-theme=dark] body #js-doc-readonly.ql-editor table th a,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor a,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor table td a,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor table th a,
[data-theme=dark] body .ql-editor a,
[data-theme=dark] body .ql-editor table td a,
[data-theme=dark] body .ql-editor table th a {
  color: #58a6ff;
  text-decoration-color: rgba(88, 166, 255, 0.45);
}
[data-theme=dark] body .doc-article a:hover,
[data-theme=dark] body .doc-article table td a:hover,
[data-theme=dark] body .doc-article table th a:hover,
[data-theme=dark] body #js-doc-readonly a:hover,
[data-theme=dark] body #js-doc-readonly table td a:hover,
[data-theme=dark] body #js-doc-readonly table th a:hover,
[data-theme=dark] body #js-doc-readonly.ql-editor a:hover,
[data-theme=dark] body #js-doc-readonly.ql-editor table td a:hover,
[data-theme=dark] body #js-doc-readonly.ql-editor table th a:hover,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor a:hover,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor table td a:hover,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor table th a:hover,
[data-theme=dark] body .ql-editor a:hover,
[data-theme=dark] body .ql-editor table td a:hover,
[data-theme=dark] body .ql-editor table th a:hover {
  color: #79c0ff;
  text-decoration-color: currentColor;
  background-color: rgba(56, 139, 253, 0.15);
}
[data-theme=dark] body .doc-article blockquote,
[data-theme=dark] body #js-doc-readonly blockquote,
[data-theme=dark] body #js-doc-readonly.ql-editor blockquote,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor blockquote,
[data-theme=dark] body .ql-editor blockquote {
  --quote-bg: color-mix(in srgb, var(--quote-accent) 14%, var(--color-surface, #161b22));
  --quote-glyph-bg: color-mix(in srgb, var(--quote-accent) 24%, var(--color-surface, #161b22));
  --quote-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.6);
  color: var(--color-text, #e6edf3);
}
[data-theme=dark] body .doc-article blockquote::after,
[data-theme=dark] body #js-doc-readonly blockquote::after,
[data-theme=dark] body #js-doc-readonly.ql-editor blockquote::after,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor blockquote::after,
[data-theme=dark] body .ql-editor blockquote::after {
  opacity: 0.16;
}
[data-theme=dark] body .doc-article details,
[data-theme=dark] body .doc-article details.doc-toggle,
[data-theme=dark] body .doc-article details.toggle-blot,
[data-theme=dark] body .doc-article details[data-toggle],
[data-theme=dark] body #js-doc-readonly details,
[data-theme=dark] body #js-doc-readonly details.doc-toggle,
[data-theme=dark] body #js-doc-readonly details.toggle-blot,
[data-theme=dark] body #js-doc-readonly details[data-toggle],
[data-theme=dark] body #js-doc-readonly.ql-editor details,
[data-theme=dark] body #js-doc-readonly.ql-editor details.doc-toggle,
[data-theme=dark] body #js-doc-readonly.ql-editor details.toggle-blot,
[data-theme=dark] body #js-doc-readonly.ql-editor details[data-toggle],
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details.doc-toggle,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details.toggle-blot,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details[data-toggle],
[data-theme=dark] body .ql-editor details,
[data-theme=dark] body .ql-editor details.doc-toggle,
[data-theme=dark] body .ql-editor details.toggle-blot,
[data-theme=dark] body .ql-editor details[data-toggle] {
  background: var(--color-surface, #161b22);
  border-color: var(--color-border, #30363d);
}
[data-theme=dark] body .doc-article details:hover,
[data-theme=dark] body .doc-article details.doc-toggle:hover,
[data-theme=dark] body .doc-article details.toggle-blot:hover,
[data-theme=dark] body .doc-article details[data-toggle]:hover,
[data-theme=dark] body #js-doc-readonly details:hover,
[data-theme=dark] body #js-doc-readonly details.doc-toggle:hover,
[data-theme=dark] body #js-doc-readonly details.toggle-blot:hover,
[data-theme=dark] body #js-doc-readonly details[data-toggle]:hover,
[data-theme=dark] body #js-doc-readonly.ql-editor details:hover,
[data-theme=dark] body #js-doc-readonly.ql-editor details.doc-toggle:hover,
[data-theme=dark] body #js-doc-readonly.ql-editor details.toggle-blot:hover,
[data-theme=dark] body #js-doc-readonly.ql-editor details[data-toggle]:hover,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details:hover,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details.doc-toggle:hover,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details.toggle-blot:hover,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details[data-toggle]:hover,
[data-theme=dark] body .ql-editor details:hover,
[data-theme=dark] body .ql-editor details.doc-toggle:hover,
[data-theme=dark] body .ql-editor details.toggle-blot:hover,
[data-theme=dark] body .ql-editor details[data-toggle]:hover {
  border-color: rgba(88, 166, 255, 0.5);
}
[data-theme=dark] body .doc-article details summary,
[data-theme=dark] body .doc-article details summary.doc-toggle__summary,
[data-theme=dark] body .doc-article details.doc-toggle summary,
[data-theme=dark] body .doc-article details.doc-toggle summary.doc-toggle__summary,
[data-theme=dark] body .doc-article details.toggle-blot summary,
[data-theme=dark] body .doc-article details.toggle-blot summary.doc-toggle__summary,
[data-theme=dark] body .doc-article details[data-toggle] summary,
[data-theme=dark] body .doc-article details[data-toggle] summary.doc-toggle__summary,
[data-theme=dark] body #js-doc-readonly details summary,
[data-theme=dark] body #js-doc-readonly details summary.doc-toggle__summary,
[data-theme=dark] body #js-doc-readonly details.doc-toggle summary,
[data-theme=dark] body #js-doc-readonly details.doc-toggle summary.doc-toggle__summary,
[data-theme=dark] body #js-doc-readonly details.toggle-blot summary,
[data-theme=dark] body #js-doc-readonly details.toggle-blot summary.doc-toggle__summary,
[data-theme=dark] body #js-doc-readonly details[data-toggle] summary,
[data-theme=dark] body #js-doc-readonly details[data-toggle] summary.doc-toggle__summary,
[data-theme=dark] body #js-doc-readonly.ql-editor details summary,
[data-theme=dark] body #js-doc-readonly.ql-editor details summary.doc-toggle__summary,
[data-theme=dark] body #js-doc-readonly.ql-editor details.doc-toggle summary,
[data-theme=dark] body #js-doc-readonly.ql-editor details.doc-toggle summary.doc-toggle__summary,
[data-theme=dark] body #js-doc-readonly.ql-editor details.toggle-blot summary,
[data-theme=dark] body #js-doc-readonly.ql-editor details.toggle-blot summary.doc-toggle__summary,
[data-theme=dark] body #js-doc-readonly.ql-editor details[data-toggle] summary,
[data-theme=dark] body #js-doc-readonly.ql-editor details[data-toggle] summary.doc-toggle__summary,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details summary,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details summary.doc-toggle__summary,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details.doc-toggle summary,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details.doc-toggle summary.doc-toggle__summary,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details.toggle-blot summary,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details.toggle-blot summary.doc-toggle__summary,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details[data-toggle] summary,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details[data-toggle] summary.doc-toggle__summary,
[data-theme=dark] body .ql-editor details summary,
[data-theme=dark] body .ql-editor details summary.doc-toggle__summary,
[data-theme=dark] body .ql-editor details.doc-toggle summary,
[data-theme=dark] body .ql-editor details.doc-toggle summary.doc-toggle__summary,
[data-theme=dark] body .ql-editor details.toggle-blot summary,
[data-theme=dark] body .ql-editor details.toggle-blot summary.doc-toggle__summary,
[data-theme=dark] body .ql-editor details[data-toggle] summary,
[data-theme=dark] body .ql-editor details[data-toggle] summary.doc-toggle__summary {
  background: rgba(255, 255, 255, 0.03);
  color: var(--color-text, #e6edf3);
}
[data-theme=dark] body .doc-article details summary::before,
[data-theme=dark] body .doc-article details summary.doc-toggle__summary::before,
[data-theme=dark] body .doc-article details.doc-toggle summary::before,
[data-theme=dark] body .doc-article details.doc-toggle summary.doc-toggle__summary::before,
[data-theme=dark] body .doc-article details.toggle-blot summary::before,
[data-theme=dark] body .doc-article details.toggle-blot summary.doc-toggle__summary::before,
[data-theme=dark] body .doc-article details[data-toggle] summary::before,
[data-theme=dark] body .doc-article details[data-toggle] summary.doc-toggle__summary::before,
[data-theme=dark] body #js-doc-readonly details summary::before,
[data-theme=dark] body #js-doc-readonly details summary.doc-toggle__summary::before,
[data-theme=dark] body #js-doc-readonly details.doc-toggle summary::before,
[data-theme=dark] body #js-doc-readonly details.doc-toggle summary.doc-toggle__summary::before,
[data-theme=dark] body #js-doc-readonly details.toggle-blot summary::before,
[data-theme=dark] body #js-doc-readonly details.toggle-blot summary.doc-toggle__summary::before,
[data-theme=dark] body #js-doc-readonly details[data-toggle] summary::before,
[data-theme=dark] body #js-doc-readonly details[data-toggle] summary.doc-toggle__summary::before,
[data-theme=dark] body #js-doc-readonly.ql-editor details summary::before,
[data-theme=dark] body #js-doc-readonly.ql-editor details summary.doc-toggle__summary::before,
[data-theme=dark] body #js-doc-readonly.ql-editor details.doc-toggle summary::before,
[data-theme=dark] body #js-doc-readonly.ql-editor details.doc-toggle summary.doc-toggle__summary::before,
[data-theme=dark] body #js-doc-readonly.ql-editor details.toggle-blot summary::before,
[data-theme=dark] body #js-doc-readonly.ql-editor details.toggle-blot summary.doc-toggle__summary::before,
[data-theme=dark] body #js-doc-readonly.ql-editor details[data-toggle] summary::before,
[data-theme=dark] body #js-doc-readonly.ql-editor details[data-toggle] summary.doc-toggle__summary::before,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details summary::before,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details summary.doc-toggle__summary::before,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details.doc-toggle summary::before,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details.doc-toggle summary.doc-toggle__summary::before,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details.toggle-blot summary::before,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details.toggle-blot summary.doc-toggle__summary::before,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details[data-toggle] summary::before,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details[data-toggle] summary.doc-toggle__summary::before,
[data-theme=dark] body .ql-editor details summary::before,
[data-theme=dark] body .ql-editor details summary.doc-toggle__summary::before,
[data-theme=dark] body .ql-editor details.doc-toggle summary::before,
[data-theme=dark] body .ql-editor details.doc-toggle summary.doc-toggle__summary::before,
[data-theme=dark] body .ql-editor details.toggle-blot summary::before,
[data-theme=dark] body .ql-editor details.toggle-blot summary.doc-toggle__summary::before,
[data-theme=dark] body .ql-editor details[data-toggle] summary::before,
[data-theme=dark] body .ql-editor details[data-toggle] summary.doc-toggle__summary::before {
  border-color: var(--color-text-muted, #8b949e);
}
[data-theme=dark] body .doc-article details summary:hover,
[data-theme=dark] body .doc-article details summary.doc-toggle__summary:hover,
[data-theme=dark] body .doc-article details.doc-toggle summary:hover,
[data-theme=dark] body .doc-article details.doc-toggle summary.doc-toggle__summary:hover,
[data-theme=dark] body .doc-article details.toggle-blot summary:hover,
[data-theme=dark] body .doc-article details.toggle-blot summary.doc-toggle__summary:hover,
[data-theme=dark] body .doc-article details[data-toggle] summary:hover,
[data-theme=dark] body .doc-article details[data-toggle] summary.doc-toggle__summary:hover,
[data-theme=dark] body #js-doc-readonly details summary:hover,
[data-theme=dark] body #js-doc-readonly details summary.doc-toggle__summary:hover,
[data-theme=dark] body #js-doc-readonly details.doc-toggle summary:hover,
[data-theme=dark] body #js-doc-readonly details.doc-toggle summary.doc-toggle__summary:hover,
[data-theme=dark] body #js-doc-readonly details.toggle-blot summary:hover,
[data-theme=dark] body #js-doc-readonly details.toggle-blot summary.doc-toggle__summary:hover,
[data-theme=dark] body #js-doc-readonly details[data-toggle] summary:hover,
[data-theme=dark] body #js-doc-readonly details[data-toggle] summary.doc-toggle__summary:hover,
[data-theme=dark] body #js-doc-readonly.ql-editor details summary:hover,
[data-theme=dark] body #js-doc-readonly.ql-editor details summary.doc-toggle__summary:hover,
[data-theme=dark] body #js-doc-readonly.ql-editor details.doc-toggle summary:hover,
[data-theme=dark] body #js-doc-readonly.ql-editor details.doc-toggle summary.doc-toggle__summary:hover,
[data-theme=dark] body #js-doc-readonly.ql-editor details.toggle-blot summary:hover,
[data-theme=dark] body #js-doc-readonly.ql-editor details.toggle-blot summary.doc-toggle__summary:hover,
[data-theme=dark] body #js-doc-readonly.ql-editor details[data-toggle] summary:hover,
[data-theme=dark] body #js-doc-readonly.ql-editor details[data-toggle] summary.doc-toggle__summary:hover,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details summary:hover,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details summary.doc-toggle__summary:hover,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details.doc-toggle summary:hover,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details.doc-toggle summary.doc-toggle__summary:hover,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details.toggle-blot summary:hover,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details.toggle-blot summary.doc-toggle__summary:hover,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details[data-toggle] summary:hover,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details[data-toggle] summary.doc-toggle__summary:hover,
[data-theme=dark] body .ql-editor details summary:hover,
[data-theme=dark] body .ql-editor details summary.doc-toggle__summary:hover,
[data-theme=dark] body .ql-editor details.doc-toggle summary:hover,
[data-theme=dark] body .ql-editor details.doc-toggle summary.doc-toggle__summary:hover,
[data-theme=dark] body .ql-editor details.toggle-blot summary:hover,
[data-theme=dark] body .ql-editor details.toggle-blot summary.doc-toggle__summary:hover,
[data-theme=dark] body .ql-editor details[data-toggle] summary:hover,
[data-theme=dark] body .ql-editor details[data-toggle] summary.doc-toggle__summary:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #58a6ff;
}
[data-theme=dark] body .doc-article details summary:hover::before,
[data-theme=dark] body .doc-article details summary.doc-toggle__summary:hover::before,
[data-theme=dark] body .doc-article details.doc-toggle summary:hover::before,
[data-theme=dark] body .doc-article details.doc-toggle summary.doc-toggle__summary:hover::before,
[data-theme=dark] body .doc-article details.toggle-blot summary:hover::before,
[data-theme=dark] body .doc-article details.toggle-blot summary.doc-toggle__summary:hover::before,
[data-theme=dark] body .doc-article details[data-toggle] summary:hover::before,
[data-theme=dark] body .doc-article details[data-toggle] summary.doc-toggle__summary:hover::before,
[data-theme=dark] body #js-doc-readonly details summary:hover::before,
[data-theme=dark] body #js-doc-readonly details summary.doc-toggle__summary:hover::before,
[data-theme=dark] body #js-doc-readonly details.doc-toggle summary:hover::before,
[data-theme=dark] body #js-doc-readonly details.doc-toggle summary.doc-toggle__summary:hover::before,
[data-theme=dark] body #js-doc-readonly details.toggle-blot summary:hover::before,
[data-theme=dark] body #js-doc-readonly details.toggle-blot summary.doc-toggle__summary:hover::before,
[data-theme=dark] body #js-doc-readonly details[data-toggle] summary:hover::before,
[data-theme=dark] body #js-doc-readonly details[data-toggle] summary.doc-toggle__summary:hover::before,
[data-theme=dark] body #js-doc-readonly.ql-editor details summary:hover::before,
[data-theme=dark] body #js-doc-readonly.ql-editor details summary.doc-toggle__summary:hover::before,
[data-theme=dark] body #js-doc-readonly.ql-editor details.doc-toggle summary:hover::before,
[data-theme=dark] body #js-doc-readonly.ql-editor details.doc-toggle summary.doc-toggle__summary:hover::before,
[data-theme=dark] body #js-doc-readonly.ql-editor details.toggle-blot summary:hover::before,
[data-theme=dark] body #js-doc-readonly.ql-editor details.toggle-blot summary.doc-toggle__summary:hover::before,
[data-theme=dark] body #js-doc-readonly.ql-editor details[data-toggle] summary:hover::before,
[data-theme=dark] body #js-doc-readonly.ql-editor details[data-toggle] summary.doc-toggle__summary:hover::before,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details summary:hover::before,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details summary.doc-toggle__summary:hover::before,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details.doc-toggle summary:hover::before,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details.doc-toggle summary.doc-toggle__summary:hover::before,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details.toggle-blot summary:hover::before,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details.toggle-blot summary.doc-toggle__summary:hover::before,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details[data-toggle] summary:hover::before,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details[data-toggle] summary.doc-toggle__summary:hover::before,
[data-theme=dark] body .ql-editor details summary:hover::before,
[data-theme=dark] body .ql-editor details summary.doc-toggle__summary:hover::before,
[data-theme=dark] body .ql-editor details.doc-toggle summary:hover::before,
[data-theme=dark] body .ql-editor details.doc-toggle summary.doc-toggle__summary:hover::before,
[data-theme=dark] body .ql-editor details.toggle-blot summary:hover::before,
[data-theme=dark] body .ql-editor details.toggle-blot summary.doc-toggle__summary:hover::before,
[data-theme=dark] body .ql-editor details[data-toggle] summary:hover::before,
[data-theme=dark] body .ql-editor details[data-toggle] summary.doc-toggle__summary:hover::before {
  border-color: #58a6ff;
}
[data-theme=dark] body .doc-article details[open],
[data-theme=dark] body .doc-article details.doc-toggle[open],
[data-theme=dark] body .doc-article details.toggle-blot[open],
[data-theme=dark] body .doc-article details[data-toggle][open],
[data-theme=dark] body #js-doc-readonly details[open],
[data-theme=dark] body #js-doc-readonly details.doc-toggle[open],
[data-theme=dark] body #js-doc-readonly details.toggle-blot[open],
[data-theme=dark] body #js-doc-readonly details[data-toggle][open],
[data-theme=dark] body #js-doc-readonly.ql-editor details[open],
[data-theme=dark] body #js-doc-readonly.ql-editor details.doc-toggle[open],
[data-theme=dark] body #js-doc-readonly.ql-editor details.toggle-blot[open],
[data-theme=dark] body #js-doc-readonly.ql-editor details[data-toggle][open],
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details[open],
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details.doc-toggle[open],
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details.toggle-blot[open],
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details[data-toggle][open],
[data-theme=dark] body .ql-editor details[open],
[data-theme=dark] body .ql-editor details.doc-toggle[open],
[data-theme=dark] body .ql-editor details.toggle-blot[open],
[data-theme=dark] body .ql-editor details[data-toggle][open] {
  border-color: var(--color-border, #30363d);
}
[data-theme=dark] body .doc-article details[open] > summary, [data-theme=dark] body .doc-article details[open] > summary.doc-toggle__summary,
[data-theme=dark] body .doc-article details.doc-toggle[open] > summary,
[data-theme=dark] body .doc-article details.doc-toggle[open] > summary.doc-toggle__summary,
[data-theme=dark] body .doc-article details.toggle-blot[open] > summary,
[data-theme=dark] body .doc-article details.toggle-blot[open] > summary.doc-toggle__summary,
[data-theme=dark] body .doc-article details[data-toggle][open] > summary,
[data-theme=dark] body .doc-article details[data-toggle][open] > summary.doc-toggle__summary,
[data-theme=dark] body #js-doc-readonly details[open] > summary,
[data-theme=dark] body #js-doc-readonly details[open] > summary.doc-toggle__summary,
[data-theme=dark] body #js-doc-readonly details.doc-toggle[open] > summary,
[data-theme=dark] body #js-doc-readonly details.doc-toggle[open] > summary.doc-toggle__summary,
[data-theme=dark] body #js-doc-readonly details.toggle-blot[open] > summary,
[data-theme=dark] body #js-doc-readonly details.toggle-blot[open] > summary.doc-toggle__summary,
[data-theme=dark] body #js-doc-readonly details[data-toggle][open] > summary,
[data-theme=dark] body #js-doc-readonly details[data-toggle][open] > summary.doc-toggle__summary,
[data-theme=dark] body #js-doc-readonly.ql-editor details[open] > summary,
[data-theme=dark] body #js-doc-readonly.ql-editor details[open] > summary.doc-toggle__summary,
[data-theme=dark] body #js-doc-readonly.ql-editor details.doc-toggle[open] > summary,
[data-theme=dark] body #js-doc-readonly.ql-editor details.doc-toggle[open] > summary.doc-toggle__summary,
[data-theme=dark] body #js-doc-readonly.ql-editor details.toggle-blot[open] > summary,
[data-theme=dark] body #js-doc-readonly.ql-editor details.toggle-blot[open] > summary.doc-toggle__summary,
[data-theme=dark] body #js-doc-readonly.ql-editor details[data-toggle][open] > summary,
[data-theme=dark] body #js-doc-readonly.ql-editor details[data-toggle][open] > summary.doc-toggle__summary,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details[open] > summary,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details[open] > summary.doc-toggle__summary,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details.doc-toggle[open] > summary,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details.doc-toggle[open] > summary.doc-toggle__summary,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details.toggle-blot[open] > summary,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details.toggle-blot[open] > summary.doc-toggle__summary,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details[data-toggle][open] > summary,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details[data-toggle][open] > summary.doc-toggle__summary,
[data-theme=dark] body .ql-editor details[open] > summary,
[data-theme=dark] body .ql-editor details[open] > summary.doc-toggle__summary,
[data-theme=dark] body .ql-editor details.doc-toggle[open] > summary,
[data-theme=dark] body .ql-editor details.doc-toggle[open] > summary.doc-toggle__summary,
[data-theme=dark] body .ql-editor details.toggle-blot[open] > summary,
[data-theme=dark] body .ql-editor details.toggle-blot[open] > summary.doc-toggle__summary,
[data-theme=dark] body .ql-editor details[data-toggle][open] > summary,
[data-theme=dark] body .ql-editor details[data-toggle][open] > summary.doc-toggle__summary {
  border-bottom-color: var(--color-border, #30363d);
  background: rgba(255, 255, 255, 0.04);
}
[data-theme=dark] body .doc-article details[open] > summary::before, [data-theme=dark] body .doc-article details[open] > summary.doc-toggle__summary::before,
[data-theme=dark] body .doc-article details.doc-toggle[open] > summary::before,
[data-theme=dark] body .doc-article details.doc-toggle[open] > summary.doc-toggle__summary::before,
[data-theme=dark] body .doc-article details.toggle-blot[open] > summary::before,
[data-theme=dark] body .doc-article details.toggle-blot[open] > summary.doc-toggle__summary::before,
[data-theme=dark] body .doc-article details[data-toggle][open] > summary::before,
[data-theme=dark] body .doc-article details[data-toggle][open] > summary.doc-toggle__summary::before,
[data-theme=dark] body #js-doc-readonly details[open] > summary::before,
[data-theme=dark] body #js-doc-readonly details[open] > summary.doc-toggle__summary::before,
[data-theme=dark] body #js-doc-readonly details.doc-toggle[open] > summary::before,
[data-theme=dark] body #js-doc-readonly details.doc-toggle[open] > summary.doc-toggle__summary::before,
[data-theme=dark] body #js-doc-readonly details.toggle-blot[open] > summary::before,
[data-theme=dark] body #js-doc-readonly details.toggle-blot[open] > summary.doc-toggle__summary::before,
[data-theme=dark] body #js-doc-readonly details[data-toggle][open] > summary::before,
[data-theme=dark] body #js-doc-readonly details[data-toggle][open] > summary.doc-toggle__summary::before,
[data-theme=dark] body #js-doc-readonly.ql-editor details[open] > summary::before,
[data-theme=dark] body #js-doc-readonly.ql-editor details[open] > summary.doc-toggle__summary::before,
[data-theme=dark] body #js-doc-readonly.ql-editor details.doc-toggle[open] > summary::before,
[data-theme=dark] body #js-doc-readonly.ql-editor details.doc-toggle[open] > summary.doc-toggle__summary::before,
[data-theme=dark] body #js-doc-readonly.ql-editor details.toggle-blot[open] > summary::before,
[data-theme=dark] body #js-doc-readonly.ql-editor details.toggle-blot[open] > summary.doc-toggle__summary::before,
[data-theme=dark] body #js-doc-readonly.ql-editor details[data-toggle][open] > summary::before,
[data-theme=dark] body #js-doc-readonly.ql-editor details[data-toggle][open] > summary.doc-toggle__summary::before,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details[open] > summary::before,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details[open] > summary.doc-toggle__summary::before,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details.doc-toggle[open] > summary::before,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details.doc-toggle[open] > summary.doc-toggle__summary::before,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details.toggle-blot[open] > summary::before,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details.toggle-blot[open] > summary.doc-toggle__summary::before,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details[data-toggle][open] > summary::before,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details[data-toggle][open] > summary.doc-toggle__summary::before,
[data-theme=dark] body .ql-editor details[open] > summary::before,
[data-theme=dark] body .ql-editor details[open] > summary.doc-toggle__summary::before,
[data-theme=dark] body .ql-editor details.doc-toggle[open] > summary::before,
[data-theme=dark] body .ql-editor details.doc-toggle[open] > summary.doc-toggle__summary::before,
[data-theme=dark] body .ql-editor details.toggle-blot[open] > summary::before,
[data-theme=dark] body .ql-editor details.toggle-blot[open] > summary.doc-toggle__summary::before,
[data-theme=dark] body .ql-editor details[data-toggle][open] > summary::before,
[data-theme=dark] body .ql-editor details[data-toggle][open] > summary.doc-toggle__summary::before {
  border-color: #58a6ff;
}
[data-theme=dark] body .doc-article details .doc-toggle__content, [data-theme=dark] body .doc-article details > p, [data-theme=dark] body .doc-article details > div,
[data-theme=dark] body .doc-article details.doc-toggle .doc-toggle__content,
[data-theme=dark] body .doc-article details.doc-toggle > p,
[data-theme=dark] body .doc-article details.doc-toggle > div,
[data-theme=dark] body .doc-article details.toggle-blot .doc-toggle__content,
[data-theme=dark] body .doc-article details.toggle-blot > p,
[data-theme=dark] body .doc-article details.toggle-blot > div,
[data-theme=dark] body .doc-article details[data-toggle] .doc-toggle__content,
[data-theme=dark] body .doc-article details[data-toggle] > p,
[data-theme=dark] body .doc-article details[data-toggle] > div,
[data-theme=dark] body #js-doc-readonly details .doc-toggle__content,
[data-theme=dark] body #js-doc-readonly details > p,
[data-theme=dark] body #js-doc-readonly details > div,
[data-theme=dark] body #js-doc-readonly details.doc-toggle .doc-toggle__content,
[data-theme=dark] body #js-doc-readonly details.doc-toggle > p,
[data-theme=dark] body #js-doc-readonly details.doc-toggle > div,
[data-theme=dark] body #js-doc-readonly details.toggle-blot .doc-toggle__content,
[data-theme=dark] body #js-doc-readonly details.toggle-blot > p,
[data-theme=dark] body #js-doc-readonly details.toggle-blot > div,
[data-theme=dark] body #js-doc-readonly details[data-toggle] .doc-toggle__content,
[data-theme=dark] body #js-doc-readonly details[data-toggle] > p,
[data-theme=dark] body #js-doc-readonly details[data-toggle] > div,
[data-theme=dark] body #js-doc-readonly.ql-editor details .doc-toggle__content,
[data-theme=dark] body #js-doc-readonly.ql-editor details > p,
[data-theme=dark] body #js-doc-readonly.ql-editor details > div,
[data-theme=dark] body #js-doc-readonly.ql-editor details.doc-toggle .doc-toggle__content,
[data-theme=dark] body #js-doc-readonly.ql-editor details.doc-toggle > p,
[data-theme=dark] body #js-doc-readonly.ql-editor details.doc-toggle > div,
[data-theme=dark] body #js-doc-readonly.ql-editor details.toggle-blot .doc-toggle__content,
[data-theme=dark] body #js-doc-readonly.ql-editor details.toggle-blot > p,
[data-theme=dark] body #js-doc-readonly.ql-editor details.toggle-blot > div,
[data-theme=dark] body #js-doc-readonly.ql-editor details[data-toggle] .doc-toggle__content,
[data-theme=dark] body #js-doc-readonly.ql-editor details[data-toggle] > p,
[data-theme=dark] body #js-doc-readonly.ql-editor details[data-toggle] > div,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details .doc-toggle__content,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details > p,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details > div,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details.doc-toggle .doc-toggle__content,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details.doc-toggle > p,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details.doc-toggle > div,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details.toggle-blot .doc-toggle__content,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details.toggle-blot > p,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details.toggle-blot > div,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details[data-toggle] .doc-toggle__content,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details[data-toggle] > p,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor details[data-toggle] > div,
[data-theme=dark] body .ql-editor details .doc-toggle__content,
[data-theme=dark] body .ql-editor details > p,
[data-theme=dark] body .ql-editor details > div,
[data-theme=dark] body .ql-editor details.doc-toggle .doc-toggle__content,
[data-theme=dark] body .ql-editor details.doc-toggle > p,
[data-theme=dark] body .ql-editor details.doc-toggle > div,
[data-theme=dark] body .ql-editor details.toggle-blot .doc-toggle__content,
[data-theme=dark] body .ql-editor details.toggle-blot > p,
[data-theme=dark] body .ql-editor details.toggle-blot > div,
[data-theme=dark] body .ql-editor details[data-toggle] .doc-toggle__content,
[data-theme=dark] body .ql-editor details[data-toggle] > p,
[data-theme=dark] body .ql-editor details[data-toggle] > div {
  color: var(--color-text, #e6edf3);
}
[data-theme=dark] body .doc-article li[data-list=bullet] > .ql-ui::before,
[data-theme=dark] body .doc-article li[data-list=ordered] > .ql-ui::before,
[data-theme=dark] body .doc-article ul:not(:has(li[data-list])) > li::marker,
[data-theme=dark] body .doc-article ol:not(:has(li[data-list])) > li::marker,
[data-theme=dark] body #js-doc-readonly li[data-list=bullet] > .ql-ui::before,
[data-theme=dark] body #js-doc-readonly li[data-list=ordered] > .ql-ui::before,
[data-theme=dark] body #js-doc-readonly ul:not(:has(li[data-list])) > li::marker,
[data-theme=dark] body #js-doc-readonly ol:not(:has(li[data-list])) > li::marker,
[data-theme=dark] body #js-doc-readonly.ql-editor li[data-list=bullet] > .ql-ui::before,
[data-theme=dark] body #js-doc-readonly.ql-editor li[data-list=ordered] > .ql-ui::before,
[data-theme=dark] body #js-doc-readonly.ql-editor ul:not(:has(li[data-list])) > li::marker,
[data-theme=dark] body #js-doc-readonly.ql-editor ol:not(:has(li[data-list])) > li::marker,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor li[data-list=bullet] > .ql-ui::before,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor li[data-list=ordered] > .ql-ui::before,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor ul:not(:has(li[data-list])) > li::marker,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor ol:not(:has(li[data-list])) > li::marker,
[data-theme=dark] body .ql-editor li[data-list=bullet] > .ql-ui::before,
[data-theme=dark] body .ql-editor li[data-list=ordered] > .ql-ui::before,
[data-theme=dark] body .ql-editor ul:not(:has(li[data-list])) > li::marker,
[data-theme=dark] body .ql-editor ol:not(:has(li[data-list])) > li::marker {
  color: #58a6ff;
}
[data-theme=dark] body .doc-article li[data-list=bullet]:hover > .ql-ui::before,
[data-theme=dark] body .doc-article li[data-list=ordered]:hover > .ql-ui::before,
[data-theme=dark] body #js-doc-readonly li[data-list=bullet]:hover > .ql-ui::before,
[data-theme=dark] body #js-doc-readonly li[data-list=ordered]:hover > .ql-ui::before,
[data-theme=dark] body #js-doc-readonly.ql-editor li[data-list=bullet]:hover > .ql-ui::before,
[data-theme=dark] body #js-doc-readonly.ql-editor li[data-list=ordered]:hover > .ql-ui::before,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor li[data-list=bullet]:hover > .ql-ui::before,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor li[data-list=ordered]:hover > .ql-ui::before,
[data-theme=dark] body .ql-editor li[data-list=bullet]:hover > .ql-ui::before,
[data-theme=dark] body .ql-editor li[data-list=ordered]:hover > .ql-ui::before {
  color: #79c0ff;
}
[data-theme=dark] body .doc-article li[data-list=checked],
[data-theme=dark] body #js-doc-readonly li[data-list=checked],
[data-theme=dark] body #js-doc-readonly.ql-editor li[data-list=checked],
[data-theme=dark] body #js-doc-editor-wrap .ql-editor li[data-list=checked],
[data-theme=dark] body .ql-editor li[data-list=checked] {
  text-decoration-color: rgba(255, 255, 255, 0.25);
}

.btn-block {
  margin: 12px 0;
  text-align: center;
}
.btn-block--left {
  text-align: left;
}
.btn-block--right {
  text-align: right;
}
.btn-block a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none !important;
  background-image: none;
  cursor: pointer;
}
.btn-block a.btn:hover, .btn-block a.btn:focus-visible {
  border-radius: var(--radius-md);
  text-decoration: none !important;
}
.btn-block a.btn--primary {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff !important;
}
.btn-block a.btn--outline {
  background-color: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary-strong) !important;
}
.btn-block a.btn--danger {
  background-color: var(--color-danger);
  border-color: var(--color-danger);
  color: #fff !important;
}
.btn-block a.btn--success {
  background-color: var(--color-success);
  border-color: var(--color-success);
  color: #fff !important;
}
.btn-block a.btn--warning {
  background-color: var(--color-warning);
  border-color: var(--color-warning);
  color: #fff !important;
}
.btn-block a.btn--ink {
  background-color: var(--color-text);
  border-color: var(--color-text);
  color: var(--color-surface) !important;
}
.btn-block a.btn--primary:hover {
  background-color: var(--color-primary-hover);
  color: #fff !important;
}
.btn-block a.btn--outline:hover {
  background-color: color-mix(in srgb, var(--color-primary) 12%, transparent);
  color: var(--color-primary-strong) !important;
}
.btn-block a.btn--danger:hover {
  background-color: color-mix(in srgb, var(--color-danger) 80%, #000);
  color: #fff !important;
}
.btn-block a.btn--success:hover {
  background-color: color-mix(in srgb, var(--color-success) 80%, #000);
  color: #fff !important;
}
.btn-block a.btn--warning:hover {
  background-color: color-mix(in srgb, var(--color-warning) 80%, #000);
  color: #fff !important;
}
.btn-block a.btn--ink:hover {
  background-color: color-mix(in srgb, var(--color-text) 85%, var(--color-surface));
  color: var(--color-surface) !important;
}

.ql-editor .btn-block {
  user-select: none;
}
.ql-editor .btn-block a.btn {
  cursor: pointer;
}

.btn-format-popup {
  position: fixed;
  z-index: 1000;
  width: 320px;
  max-width: calc(100vw - 24px);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 12px);
  box-shadow: var(--shadow-hover);
  font-size: 13px;
  color: var(--color-text);
}
.btn-format-popup[hidden] {
  display: none;
}
.btn-format-popup__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  font-weight: 600;
}
.btn-format-popup__close {
  border: 0;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text-muted);
}
.btn-format-popup__close:hover {
  color: var(--color-text);
}
.btn-format-popup__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 14px 14px;
}
.btn-format-popup__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.btn-format-popup__field > span {
  color: var(--color-text-muted);
  font-size: 12px;
}
.btn-format-popup__field input[type=text] {
  padding: 7px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  font: inherit;
}
.btn-format-popup__field input[type=text]:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.btn-format-popup__check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.btn-format-popup__variants {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.btn-format-popup__variant {
  cursor: pointer;
}
.btn-format-popup__variant input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.btn-format-popup__variant .btn {
  padding: 5px 10px;
  font-size: 13px;
  opacity: 0.6;
}
.btn-format-popup__variant input:checked + .btn {
  opacity: 1;
  box-shadow: 0 0 0 2px var(--color-surface), 0 0 0 4px var(--color-primary);
}
.btn-format-popup__variant input:focus-visible + .btn {
  box-shadow: 0 0 0 2px var(--color-surface), 0 0 0 4px var(--color-primary);
}
.btn-format-popup__align {
  display: inline-flex;
  gap: 2px;
  width: max-content;
  padding: 2px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
}
.btn-format-popup__align-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 28px;
  border-radius: calc(var(--radius-md) - 2px);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.btn-format-popup__align-item:hover {
  color: var(--color-text);
}
.btn-format-popup__align-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.btn-format-popup__align-item input:checked + svg,
.btn-format-popup__align-item input:focus-visible + svg {
  background: var(--color-primary-light);
  color: var(--color-primary-strong);
}
.btn-format-popup__error {
  color: var(--color-danger);
  font-size: 12px;
}
.btn-format-popup__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

body .doc-article .doc-dialog,
body .doc-page__content .doc-dialog,
body .doc-content .doc-dialog,
body .markdown-body .doc-dialog,
body #js-doc-readonly .doc-dialog,
body #js-doc-readonly.ql-editor .doc-dialog,
body #js-doc-editor-wrap .ql-editor .doc-dialog,
body #js-doc-editor .ql-editor .doc-dialog {
  --dlg-staff-bg: color-mix(in srgb, var(--color-primary, #5dc6cb) 13%, var(--color-surface, #fff));
  --dlg-staff-label: var(--color-primary-strong, #26777c);
  --dlg-client-bg: var(--color-surface, #fff);
  --dlg-client-label: var(--color-text-muted, #6b7280);
  --dlg-screen-bg: color-mix(in srgb, var(--color-text, #1f2230) 4%, var(--color-surface, #fff));
  --dlg-bezel: color-mix(in srgb, var(--color-text, #1f2230) 9%, var(--color-surface, #fff));
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 480px;
  margin: 28px auto;
  padding: 34px 14px 18px;
  border-radius: 32px;
  background: var(--dlg-screen-bg);
  box-shadow: 0 0 0 8px var(--dlg-bezel), 0 18px 36px -18px rgba(16, 24, 40, 0.28);
}
body .doc-article .doc-dialog::before,
body .doc-page__content .doc-dialog::before,
body .doc-content .doc-dialog::before,
body .markdown-body .doc-dialog::before,
body #js-doc-readonly .doc-dialog::before,
body #js-doc-readonly.ql-editor .doc-dialog::before,
body #js-doc-editor-wrap .ql-editor .doc-dialog::before,
body #js-doc-editor .ql-editor .doc-dialog::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  width: 64px;
  height: 6px;
  margin-left: -32px;
  border-radius: var(--radius-pill, 999px);
  background: var(--dlg-bezel);
  pointer-events: none;
}
@media (max-width: 640px) {
  body .doc-article .doc-dialog,
  body .doc-page__content .doc-dialog,
  body .doc-content .doc-dialog,
  body .markdown-body .doc-dialog,
  body #js-doc-readonly .doc-dialog,
  body #js-doc-readonly.ql-editor .doc-dialog,
  body #js-doc-editor-wrap .ql-editor .doc-dialog,
  body #js-doc-editor .ql-editor .doc-dialog {
    margin: 24px 6px;
    padding: 30px 10px 14px;
    border-radius: 26px;
    box-shadow: 0 0 0 5px var(--dlg-bezel), 0 14px 28px -16px rgba(16, 24, 40, 0.28);
  }
}
body .doc-article .doc-dialog__line,
body .doc-page__content .doc-dialog__line,
body .doc-content .doc-dialog__line,
body .markdown-body .doc-dialog__line,
body #js-doc-readonly .doc-dialog__line,
body #js-doc-readonly.ql-editor .doc-dialog__line,
body #js-doc-editor-wrap .ql-editor .doc-dialog__line,
body #js-doc-editor .ql-editor .doc-dialog__line {
  position: relative;
  box-sizing: border-box;
  max-width: 85%;
  margin: 0;
  padding: 8px 14px 10px;
  line-height: 1.55;
  color: var(--color-text, #1f2230);
  background: var(--dlg-staff-bg);
  border-radius: 16px 16px 16px 4px;
  align-self: flex-start;
}
body .doc-article .doc-dialog__line::before,
body .doc-page__content .doc-dialog__line::before,
body .doc-content .doc-dialog__line::before,
body .markdown-body .doc-dialog__line::before,
body #js-doc-readonly .doc-dialog__line::before,
body #js-doc-readonly.ql-editor .doc-dialog__line::before,
body #js-doc-editor-wrap .ql-editor .doc-dialog__line::before,
body #js-doc-editor .ql-editor .doc-dialog__line::before {
  content: "Сотрудник";
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--dlg-staff-label);
  user-select: none;
}
body .doc-article .doc-dialog__line[data-variant=client],
body .doc-page__content .doc-dialog__line[data-variant=client],
body .doc-content .doc-dialog__line[data-variant=client],
body .markdown-body .doc-dialog__line[data-variant=client],
body #js-doc-readonly .doc-dialog__line[data-variant=client],
body #js-doc-readonly.ql-editor .doc-dialog__line[data-variant=client],
body #js-doc-editor-wrap .ql-editor .doc-dialog__line[data-variant=client],
body #js-doc-editor .ql-editor .doc-dialog__line[data-variant=client] {
  align-self: flex-end;
  margin-left: auto;
  background: var(--dlg-client-bg);
  border-radius: 16px 16px 4px 16px;
  box-shadow: var(--shadow-xs, 0 1px 2px rgba(0, 0, 0, 0.05));
}
body .doc-article .doc-dialog__line[data-variant=client]::before,
body .doc-page__content .doc-dialog__line[data-variant=client]::before,
body .doc-content .doc-dialog__line[data-variant=client]::before,
body .markdown-body .doc-dialog__line[data-variant=client]::before,
body #js-doc-readonly .doc-dialog__line[data-variant=client]::before,
body #js-doc-readonly.ql-editor .doc-dialog__line[data-variant=client]::before,
body #js-doc-editor-wrap .ql-editor .doc-dialog__line[data-variant=client]::before,
body #js-doc-editor .ql-editor .doc-dialog__line[data-variant=client]::before {
  content: "Пациент";
  color: var(--dlg-client-label);
}
@media (max-width: 640px) {
  body .doc-article .doc-dialog__line,
  body .doc-page__content .doc-dialog__line,
  body .doc-content .doc-dialog__line,
  body .markdown-body .doc-dialog__line,
  body #js-doc-readonly .doc-dialog__line,
  body #js-doc-readonly.ql-editor .doc-dialog__line,
  body #js-doc-editor-wrap .ql-editor .doc-dialog__line,
  body #js-doc-editor .ql-editor .doc-dialog__line {
    max-width: 92%;
  }
}
body .doc-article .doc-dialog__line[data-variant=staff] + .doc-dialog__line[data-variant=staff],
body .doc-article .doc-dialog__line[data-variant=client] + .doc-dialog__line[data-variant=client],
body .doc-page__content .doc-dialog__line[data-variant=staff] + .doc-dialog__line[data-variant=staff],
body .doc-page__content .doc-dialog__line[data-variant=client] + .doc-dialog__line[data-variant=client],
body .doc-content .doc-dialog__line[data-variant=staff] + .doc-dialog__line[data-variant=staff],
body .doc-content .doc-dialog__line[data-variant=client] + .doc-dialog__line[data-variant=client],
body .markdown-body .doc-dialog__line[data-variant=staff] + .doc-dialog__line[data-variant=staff],
body .markdown-body .doc-dialog__line[data-variant=client] + .doc-dialog__line[data-variant=client],
body #js-doc-readonly .doc-dialog__line[data-variant=staff] + .doc-dialog__line[data-variant=staff],
body #js-doc-readonly .doc-dialog__line[data-variant=client] + .doc-dialog__line[data-variant=client],
body #js-doc-readonly.ql-editor .doc-dialog__line[data-variant=staff] + .doc-dialog__line[data-variant=staff],
body #js-doc-readonly.ql-editor .doc-dialog__line[data-variant=client] + .doc-dialog__line[data-variant=client],
body #js-doc-editor-wrap .ql-editor .doc-dialog__line[data-variant=staff] + .doc-dialog__line[data-variant=staff],
body #js-doc-editor-wrap .ql-editor .doc-dialog__line[data-variant=client] + .doc-dialog__line[data-variant=client],
body #js-doc-editor .ql-editor .doc-dialog__line[data-variant=staff] + .doc-dialog__line[data-variant=staff],
body #js-doc-editor .ql-editor .doc-dialog__line[data-variant=client] + .doc-dialog__line[data-variant=client] {
  margin-top: -5px;
}
body .doc-article .doc-dialog__line[data-variant=staff] + .doc-dialog__line[data-variant=staff]::before,
body .doc-article .doc-dialog__line[data-variant=client] + .doc-dialog__line[data-variant=client]::before,
body .doc-page__content .doc-dialog__line[data-variant=staff] + .doc-dialog__line[data-variant=staff]::before,
body .doc-page__content .doc-dialog__line[data-variant=client] + .doc-dialog__line[data-variant=client]::before,
body .doc-content .doc-dialog__line[data-variant=staff] + .doc-dialog__line[data-variant=staff]::before,
body .doc-content .doc-dialog__line[data-variant=client] + .doc-dialog__line[data-variant=client]::before,
body .markdown-body .doc-dialog__line[data-variant=staff] + .doc-dialog__line[data-variant=staff]::before,
body .markdown-body .doc-dialog__line[data-variant=client] + .doc-dialog__line[data-variant=client]::before,
body #js-doc-readonly .doc-dialog__line[data-variant=staff] + .doc-dialog__line[data-variant=staff]::before,
body #js-doc-readonly .doc-dialog__line[data-variant=client] + .doc-dialog__line[data-variant=client]::before,
body #js-doc-readonly.ql-editor .doc-dialog__line[data-variant=staff] + .doc-dialog__line[data-variant=staff]::before,
body #js-doc-readonly.ql-editor .doc-dialog__line[data-variant=client] + .doc-dialog__line[data-variant=client]::before,
body #js-doc-editor-wrap .ql-editor .doc-dialog__line[data-variant=staff] + .doc-dialog__line[data-variant=staff]::before,
body #js-doc-editor-wrap .ql-editor .doc-dialog__line[data-variant=client] + .doc-dialog__line[data-variant=client]::before,
body #js-doc-editor .ql-editor .doc-dialog__line[data-variant=staff] + .doc-dialog__line[data-variant=staff]::before,
body #js-doc-editor .ql-editor .doc-dialog__line[data-variant=client] + .doc-dialog__line[data-variant=client]::before {
  display: none;
}

#js-doc-editor .ql-editor .doc-dialog__line::before,
#js-doc-editor-wrap .ql-editor .doc-dialog__line::before {
  cursor: pointer;
}

[data-theme=dark] body .doc-article .doc-dialog,
[data-theme=dark] body .doc-page__content .doc-dialog,
[data-theme=dark] body .doc-content .doc-dialog,
[data-theme=dark] body .markdown-body .doc-dialog,
[data-theme=dark] body #js-doc-readonly .doc-dialog,
[data-theme=dark] body #js-doc-readonly.ql-editor .doc-dialog,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor .doc-dialog,
[data-theme=dark] body #js-doc-editor .ql-editor .doc-dialog {
  --dlg-staff-bg: color-mix(in srgb, var(--color-primary, #5dc6cb) 20%, var(--color-surface, #161b22));
  --dlg-staff-label: color-mix(in srgb, var(--color-primary, #5dc6cb) 70%, #fff);
  --dlg-client-bg: color-mix(in srgb, var(--color-text, #e6edf3) 12%, var(--color-surface, #161b22));
  --dlg-screen-bg: color-mix(in srgb, var(--color-text, #e6edf3) 4%, var(--color-surface, #161b22));
  --dlg-bezel: color-mix(in srgb, var(--color-text, #e6edf3) 14%, var(--color-surface, #161b22));
}
[data-theme=dark] body .doc-article .doc-message,
[data-theme=dark] body .doc-page__content .doc-message,
[data-theme=dark] body .doc-content .doc-message,
[data-theme=dark] body .markdown-body .doc-message,
[data-theme=dark] body #js-doc-readonly .doc-message,
[data-theme=dark] body #js-doc-readonly.ql-editor .doc-message,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor .doc-message,
[data-theme=dark] body #js-doc-editor .ql-editor .doc-message {
  background: color-mix(in srgb, var(--color-text, #e6edf3) 8%, var(--color-surface, #161b22));
}

body .doc-article .doc-message,
body .doc-page__content .doc-message,
body .doc-content .doc-message,
body .markdown-body .doc-message,
body #js-doc-readonly .doc-message,
body #js-doc-readonly.ql-editor .doc-message,
body #js-doc-editor-wrap .ql-editor .doc-message,
body #js-doc-editor .ql-editor .doc-message {
  position: relative;
  margin: 20px 0;
  padding: 40px 18px 14px;
  border-radius: var(--radius-lg, 12px);
  background: var(--color-bg-muted, #f0f1f7);
}
body .doc-article .doc-message::before,
body .doc-page__content .doc-message::before,
body .doc-content .doc-message::before,
body .markdown-body .doc-message::before,
body #js-doc-readonly .doc-message::before,
body #js-doc-readonly.ql-editor .doc-message::before,
body #js-doc-editor-wrap .ql-editor .doc-message::before,
body #js-doc-editor .ql-editor .doc-message::before {
  content: "Шаблон сообщения";
  position: absolute;
  top: 12px;
  left: 18px;
  padding-left: 22px;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  color: var(--color-text-muted, #6b7280);
  user-select: none;
  pointer-events: none;
}
body .doc-article .doc-message::after,
body .doc-page__content .doc-message::after,
body .doc-content .doc-message::after,
body .markdown-body .doc-message::after,
body #js-doc-readonly .doc-message::after,
body #js-doc-readonly.ql-editor .doc-message::after,
body #js-doc-editor-wrap .ql-editor .doc-message::after,
body #js-doc-editor .ql-editor .doc-message::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 18px;
  width: 16px;
  height: 16px;
  background-color: var(--color-text-muted, #6b7280);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z'/%3E%3C/svg%3E") no-repeat center/16px 16px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z'/%3E%3C/svg%3E") no-repeat center/16px 16px;
  pointer-events: none;
}
body .doc-article .doc-message__p,
body .doc-page__content .doc-message__p,
body .doc-content .doc-message__p,
body .markdown-body .doc-message__p,
body #js-doc-readonly .doc-message__p,
body #js-doc-readonly.ql-editor .doc-message__p,
body #js-doc-editor-wrap .ql-editor .doc-message__p,
body #js-doc-editor .ql-editor .doc-message__p {
  margin: 0 0 6px;
}
body .doc-article .doc-message__p:last-of-type,
body .doc-page__content .doc-message__p:last-of-type,
body .doc-content .doc-message__p:last-of-type,
body .markdown-body .doc-message__p:last-of-type,
body #js-doc-readonly .doc-message__p:last-of-type,
body #js-doc-readonly.ql-editor .doc-message__p:last-of-type,
body #js-doc-editor-wrap .ql-editor .doc-message__p:last-of-type,
body #js-doc-editor .ql-editor .doc-message__p:last-of-type {
  margin-bottom: 0;
}
body .doc-article .doc-message__ph,
body .doc-page__content .doc-message__ph,
body .doc-content .doc-message__ph,
body .markdown-body .doc-message__ph,
body #js-doc-readonly .doc-message__ph,
body #js-doc-readonly.ql-editor .doc-message__ph,
body #js-doc-editor-wrap .ql-editor .doc-message__ph,
body #js-doc-editor .ql-editor .doc-message__ph {
  padding: 0 2px;
  margin: 0 -1px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--color-primary, #5dc6cb) 18%, transparent);
}
body .doc-article .doc-message__copy,
body .doc-page__content .doc-message__copy,
body .doc-content .doc-message__copy,
body .markdown-body .doc-message__copy,
body #js-doc-readonly .doc-message__copy,
body #js-doc-readonly.ql-editor .doc-message__copy,
body #js-doc-editor-wrap .ql-editor .doc-message__copy,
body #js-doc-editor .ql-editor .doc-message__copy {
  position: absolute;
  top: 6px;
  right: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  z-index: 1;
}
body .doc-article .doc-message__copy .doc-icon,
body .doc-page__content .doc-message__copy .doc-icon,
body .doc-content .doc-message__copy .doc-icon,
body .markdown-body .doc-message__copy .doc-icon,
body #js-doc-readonly .doc-message__copy .doc-icon,
body #js-doc-readonly.ql-editor .doc-message__copy .doc-icon,
body #js-doc-editor-wrap .ql-editor .doc-message__copy .doc-icon,
body #js-doc-editor .ql-editor .doc-message__copy .doc-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
body .doc-article .doc-message__copy.is-copied,
body .doc-page__content .doc-message__copy.is-copied,
body .doc-content .doc-message__copy.is-copied,
body .markdown-body .doc-message__copy.is-copied,
body #js-doc-readonly .doc-message__copy.is-copied,
body #js-doc-readonly.ql-editor .doc-message__copy.is-copied,
body #js-doc-editor-wrap .ql-editor .doc-message__copy.is-copied,
body #js-doc-editor .ql-editor .doc-message__copy.is-copied {
  color: var(--color-success, #1a7f37);
}
@media (pointer: coarse) {
  body .doc-article .doc-message__copy,
  body .doc-page__content .doc-message__copy,
  body .doc-content .doc-message__copy,
  body .markdown-body .doc-message__copy,
  body #js-doc-readonly .doc-message__copy,
  body #js-doc-readonly.ql-editor .doc-message__copy,
  body #js-doc-editor-wrap .ql-editor .doc-message__copy,
  body #js-doc-editor .ql-editor .doc-message__copy {
    min-width: 40px;
    min-height: 40px;
    justify-content: center;
  }
}
@media (max-width: 640px) {
  body .doc-article .doc-message__copy,
  body .doc-page__content .doc-message__copy,
  body .doc-content .doc-message__copy,
  body .markdown-body .doc-message__copy,
  body #js-doc-readonly .doc-message__copy,
  body #js-doc-readonly.ql-editor .doc-message__copy,
  body #js-doc-editor-wrap .ql-editor .doc-message__copy,
  body #js-doc-editor .ql-editor .doc-message__copy {
    min-width: 40px;
    min-height: 40px;
    justify-content: center;
  }
  body .doc-article .doc-message__copy span,
  body .doc-page__content .doc-message__copy span,
  body .doc-content .doc-message__copy span,
  body .markdown-body .doc-message__copy span,
  body #js-doc-readonly .doc-message__copy span,
  body #js-doc-readonly.ql-editor .doc-message__copy span,
  body #js-doc-editor-wrap .ql-editor .doc-message__copy span,
  body #js-doc-editor .ql-editor .doc-message__copy span {
    display: none;
  }
}

body .doc-article .doc-compare,
body .doc-page__content .doc-compare,
body .doc-content .doc-compare,
body .markdown-body .doc-compare,
body #js-doc-readonly .doc-compare,
body #js-doc-readonly.ql-editor .doc-compare,
body #js-doc-editor-wrap .ql-editor .doc-compare,
body #js-doc-editor .ql-editor .doc-compare {
  --cmp-do: #1a7f37;
  --cmp-dont: #cf222e;
  --cmp-do-bg: color-mix(in srgb, var(--cmp-do) 8%, var(--color-surface, #fff));
  --cmp-dont-bg: color-mix(in srgb, var(--cmp-dont) 8%, var(--color-surface, #fff));
  --cmp-divider: color-mix(in srgb, var(--color-text, #1f2230) 8%, transparent);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-flow: row dense;
  column-gap: 0;
  margin: 20px 0;
  padding-bottom: 12px;
  overflow: hidden;
  border-radius: var(--radius-lg, 12px);
  background: linear-gradient(90deg, transparent calc(50% - 0.5px), var(--cmp-divider) calc(50% - 0.5px) calc(50% + 0.5px), transparent calc(50% + 0.5px)), linear-gradient(90deg, var(--cmp-do-bg) 0 50%, var(--cmp-dont-bg) 50% 100%);
}
body .doc-article .doc-compare::before, body .doc-article .doc-compare::after,
body .doc-page__content .doc-compare::before,
body .doc-page__content .doc-compare::after,
body .doc-content .doc-compare::before,
body .doc-content .doc-compare::after,
body .markdown-body .doc-compare::before,
body .markdown-body .doc-compare::after,
body #js-doc-readonly .doc-compare::before,
body #js-doc-readonly .doc-compare::after,
body #js-doc-readonly.ql-editor .doc-compare::before,
body #js-doc-readonly.ql-editor .doc-compare::after,
body #js-doc-editor-wrap .ql-editor .doc-compare::before,
body #js-doc-editor-wrap .ql-editor .doc-compare::after,
body #js-doc-editor .ql-editor .doc-compare::before,
body #js-doc-editor .ql-editor .doc-compare::after {
  padding: 14px 18px 6px 42px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  user-select: none;
  pointer-events: none;
}
body .doc-article .doc-compare::before,
body .doc-page__content .doc-compare::before,
body .doc-content .doc-compare::before,
body .markdown-body .doc-compare::before,
body #js-doc-readonly .doc-compare::before,
body #js-doc-readonly.ql-editor .doc-compare::before,
body #js-doc-editor-wrap .ql-editor .doc-compare::before,
body #js-doc-editor .ql-editor .doc-compare::before {
  content: "Правильно";
  grid-column: 1;
  grid-row: 1;
  color: var(--cmp-do);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a7f37' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") no-repeat 18px 15px/16px 16px;
}
body .doc-article .doc-compare::after,
body .doc-page__content .doc-compare::after,
body .doc-content .doc-compare::after,
body .markdown-body .doc-compare::after,
body #js-doc-readonly .doc-compare::after,
body #js-doc-readonly.ql-editor .doc-compare::after,
body #js-doc-editor-wrap .ql-editor .doc-compare::after,
body #js-doc-editor .ql-editor .doc-compare::after {
  content: "Неправильно";
  grid-column: 2;
  grid-row: 1;
  color: var(--cmp-dont);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cf222e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18'/%3E%3Cpath d='m6 6 12 12'/%3E%3C/svg%3E") no-repeat 18px 15px/16px 16px;
}
body .doc-article .doc-compare__p,
body .doc-page__content .doc-compare__p,
body .doc-content .doc-compare__p,
body .markdown-body .doc-compare__p,
body #js-doc-readonly .doc-compare__p,
body #js-doc-readonly.ql-editor .doc-compare__p,
body #js-doc-editor-wrap .ql-editor .doc-compare__p,
body #js-doc-editor .ql-editor .doc-compare__p {
  position: relative;
  margin: 0;
  padding: 4px 18px 4px 42px;
}
body .doc-article .doc-compare__p::before,
body .doc-page__content .doc-compare__p::before,
body .doc-content .doc-compare__p::before,
body .markdown-body .doc-compare__p::before,
body #js-doc-readonly .doc-compare__p::before,
body #js-doc-readonly.ql-editor .doc-compare__p::before,
body #js-doc-editor-wrap .ql-editor .doc-compare__p::before,
body #js-doc-editor .ql-editor .doc-compare__p::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 0.55em;
  width: 14px;
  height: 14px;
}
body .doc-article .doc-compare__p[data-variant=do],
body .doc-page__content .doc-compare__p[data-variant=do],
body .doc-content .doc-compare__p[data-variant=do],
body .markdown-body .doc-compare__p[data-variant=do],
body #js-doc-readonly .doc-compare__p[data-variant=do],
body #js-doc-readonly.ql-editor .doc-compare__p[data-variant=do],
body #js-doc-editor-wrap .ql-editor .doc-compare__p[data-variant=do],
body #js-doc-editor .ql-editor .doc-compare__p[data-variant=do] {
  grid-column: 1;
}
body .doc-article .doc-compare__p[data-variant=do]::before,
body .doc-page__content .doc-compare__p[data-variant=do]::before,
body .doc-content .doc-compare__p[data-variant=do]::before,
body .markdown-body .doc-compare__p[data-variant=do]::before,
body #js-doc-readonly .doc-compare__p[data-variant=do]::before,
body #js-doc-readonly.ql-editor .doc-compare__p[data-variant=do]::before,
body #js-doc-editor-wrap .ql-editor .doc-compare__p[data-variant=do]::before,
body #js-doc-editor .ql-editor .doc-compare__p[data-variant=do]::before {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a7f37' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") no-repeat center/14px 14px;
}
body .doc-article .doc-compare__p[data-variant=dont],
body .doc-page__content .doc-compare__p[data-variant=dont],
body .doc-content .doc-compare__p[data-variant=dont],
body .markdown-body .doc-compare__p[data-variant=dont],
body #js-doc-readonly .doc-compare__p[data-variant=dont],
body #js-doc-readonly.ql-editor .doc-compare__p[data-variant=dont],
body #js-doc-editor-wrap .ql-editor .doc-compare__p[data-variant=dont],
body #js-doc-editor .ql-editor .doc-compare__p[data-variant=dont] {
  grid-column: 2;
}
body .doc-article .doc-compare__p[data-variant=dont]::before,
body .doc-page__content .doc-compare__p[data-variant=dont]::before,
body .doc-content .doc-compare__p[data-variant=dont]::before,
body .markdown-body .doc-compare__p[data-variant=dont]::before,
body #js-doc-readonly .doc-compare__p[data-variant=dont]::before,
body #js-doc-readonly.ql-editor .doc-compare__p[data-variant=dont]::before,
body #js-doc-editor-wrap .ql-editor .doc-compare__p[data-variant=dont]::before,
body #js-doc-editor .ql-editor .doc-compare__p[data-variant=dont]::before {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cf222e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18'/%3E%3Cpath d='m6 6 12 12'/%3E%3C/svg%3E") no-repeat center/14px 14px;
}
@media (max-width: 768px) {
  body .doc-article .doc-compare,
  body .doc-page__content .doc-compare,
  body .doc-content .doc-compare,
  body .markdown-body .doc-compare,
  body #js-doc-readonly .doc-compare,
  body #js-doc-readonly.ql-editor .doc-compare,
  body #js-doc-editor-wrap .ql-editor .doc-compare,
  body #js-doc-editor .ql-editor .doc-compare {
    grid-template-columns: 1fr;
    padding-bottom: 0;
    background: none;
  }
  body .doc-article .doc-compare::before, body .doc-article .doc-compare::after,
  body .doc-page__content .doc-compare::before,
  body .doc-page__content .doc-compare::after,
  body .doc-content .doc-compare::before,
  body .doc-content .doc-compare::after,
  body .markdown-body .doc-compare::before,
  body .markdown-body .doc-compare::after,
  body #js-doc-readonly .doc-compare::before,
  body #js-doc-readonly .doc-compare::after,
  body #js-doc-readonly.ql-editor .doc-compare::before,
  body #js-doc-readonly.ql-editor .doc-compare::after,
  body #js-doc-editor-wrap .ql-editor .doc-compare::before,
  body #js-doc-editor-wrap .ql-editor .doc-compare::after,
  body #js-doc-editor .ql-editor .doc-compare::before,
  body #js-doc-editor .ql-editor .doc-compare::after {
    grid-column: 1;
    grid-row: auto;
  }
  body .doc-article .doc-compare::before,
  body .doc-page__content .doc-compare::before,
  body .doc-content .doc-compare::before,
  body .markdown-body .doc-compare::before,
  body #js-doc-readonly .doc-compare::before,
  body #js-doc-readonly.ql-editor .doc-compare::before,
  body #js-doc-editor-wrap .ql-editor .doc-compare::before,
  body #js-doc-editor .ql-editor .doc-compare::before {
    order: 0;
    background-color: var(--cmp-do-bg);
  }
  body .doc-article .doc-compare::after,
  body .doc-page__content .doc-compare::after,
  body .doc-content .doc-compare::after,
  body .markdown-body .doc-compare::after,
  body #js-doc-readonly .doc-compare::after,
  body #js-doc-readonly.ql-editor .doc-compare::after,
  body #js-doc-editor-wrap .ql-editor .doc-compare::after,
  body #js-doc-editor .ql-editor .doc-compare::after {
    order: 2;
    margin-top: 8px;
    background-color: var(--cmp-dont-bg);
  }
  body .doc-article .doc-compare__p,
  body .doc-page__content .doc-compare__p,
  body .doc-content .doc-compare__p,
  body .markdown-body .doc-compare__p,
  body #js-doc-readonly .doc-compare__p,
  body #js-doc-readonly.ql-editor .doc-compare__p,
  body #js-doc-editor-wrap .ql-editor .doc-compare__p,
  body #js-doc-editor .ql-editor .doc-compare__p {
    grid-column: 1;
    padding-top: 5px;
    padding-bottom: 5px;
  }
  body .doc-article .doc-compare__p[data-variant=do],
  body .doc-page__content .doc-compare__p[data-variant=do],
  body .doc-content .doc-compare__p[data-variant=do],
  body .markdown-body .doc-compare__p[data-variant=do],
  body #js-doc-readonly .doc-compare__p[data-variant=do],
  body #js-doc-readonly.ql-editor .doc-compare__p[data-variant=do],
  body #js-doc-editor-wrap .ql-editor .doc-compare__p[data-variant=do],
  body #js-doc-editor .ql-editor .doc-compare__p[data-variant=do] {
    grid-column: 1;
    order: 1;
    background: var(--cmp-do-bg);
  }
  body .doc-article .doc-compare__p[data-variant=dont],
  body .doc-page__content .doc-compare__p[data-variant=dont],
  body .doc-content .doc-compare__p[data-variant=dont],
  body .markdown-body .doc-compare__p[data-variant=dont],
  body #js-doc-readonly .doc-compare__p[data-variant=dont],
  body #js-doc-readonly.ql-editor .doc-compare__p[data-variant=dont],
  body #js-doc-editor-wrap .ql-editor .doc-compare__p[data-variant=dont],
  body #js-doc-editor .ql-editor .doc-compare__p[data-variant=dont] {
    grid-column: 1;
    order: 3;
    background: var(--cmp-dont-bg);
  }
}

[data-theme=dark] body .doc-article .doc-compare,
[data-theme=dark] body .doc-page__content .doc-compare,
[data-theme=dark] body .doc-content .doc-compare,
[data-theme=dark] body .markdown-body .doc-compare,
[data-theme=dark] body #js-doc-readonly .doc-compare,
[data-theme=dark] body #js-doc-readonly.ql-editor .doc-compare,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor .doc-compare,
[data-theme=dark] body #js-doc-editor .ql-editor .doc-compare {
  --cmp-do: #3fb950;
  --cmp-dont: #f85149;
  --cmp-do-bg: color-mix(in srgb, var(--cmp-do) 14%, var(--color-surface, #161b22));
  --cmp-dont-bg: color-mix(in srgb, var(--cmp-dont) 14%, var(--color-surface, #161b22));
}
[data-theme=dark] body .doc-article .doc-compare::before,
[data-theme=dark] body .doc-page__content .doc-compare::before,
[data-theme=dark] body .doc-content .doc-compare::before,
[data-theme=dark] body .markdown-body .doc-compare::before,
[data-theme=dark] body #js-doc-readonly .doc-compare::before,
[data-theme=dark] body #js-doc-readonly.ql-editor .doc-compare::before,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor .doc-compare::before,
[data-theme=dark] body #js-doc-editor .ql-editor .doc-compare::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233fb950' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
[data-theme=dark] body .doc-article .doc-compare::after,
[data-theme=dark] body .doc-page__content .doc-compare::after,
[data-theme=dark] body .doc-content .doc-compare::after,
[data-theme=dark] body .markdown-body .doc-compare::after,
[data-theme=dark] body #js-doc-readonly .doc-compare::after,
[data-theme=dark] body #js-doc-readonly.ql-editor .doc-compare::after,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor .doc-compare::after,
[data-theme=dark] body #js-doc-editor .ql-editor .doc-compare::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f85149' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18'/%3E%3Cpath d='m6 6 12 12'/%3E%3C/svg%3E");
}
[data-theme=dark] body .doc-article .doc-compare__p[data-variant=do]::before,
[data-theme=dark] body .doc-page__content .doc-compare__p[data-variant=do]::before,
[data-theme=dark] body .doc-content .doc-compare__p[data-variant=do]::before,
[data-theme=dark] body .markdown-body .doc-compare__p[data-variant=do]::before,
[data-theme=dark] body #js-doc-readonly .doc-compare__p[data-variant=do]::before,
[data-theme=dark] body #js-doc-readonly.ql-editor .doc-compare__p[data-variant=do]::before,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor .doc-compare__p[data-variant=do]::before,
[data-theme=dark] body #js-doc-editor .ql-editor .doc-compare__p[data-variant=do]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233fb950' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
[data-theme=dark] body .doc-article .doc-compare__p[data-variant=dont]::before,
[data-theme=dark] body .doc-page__content .doc-compare__p[data-variant=dont]::before,
[data-theme=dark] body .doc-content .doc-compare__p[data-variant=dont]::before,
[data-theme=dark] body .markdown-body .doc-compare__p[data-variant=dont]::before,
[data-theme=dark] body #js-doc-readonly .doc-compare__p[data-variant=dont]::before,
[data-theme=dark] body #js-doc-readonly.ql-editor .doc-compare__p[data-variant=dont]::before,
[data-theme=dark] body #js-doc-editor-wrap .ql-editor .doc-compare__p[data-variant=dont]::before,
[data-theme=dark] body #js-doc-editor .ql-editor .doc-compare__p[data-variant=dont]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f85149' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18'/%3E%3Cpath d='m6 6 12 12'/%3E%3C/svg%3E");
}

body .doc-article .doc-steps,
body .doc-page__content .doc-steps,
body .doc-content .doc-steps,
body .markdown-body .doc-steps,
body #js-doc-readonly .doc-steps,
body #js-doc-readonly.ql-editor .doc-steps,
body #js-doc-editor-wrap .ql-editor .doc-steps,
body #js-doc-editor .ql-editor .doc-steps {
  counter-reset: doc-step;
  margin: 20px 0;
  padding-left: 0;
}
body .doc-article .doc-steps__p,
body .doc-page__content .doc-steps__p,
body .doc-content .doc-steps__p,
body .markdown-body .doc-steps__p,
body #js-doc-readonly .doc-steps__p,
body #js-doc-readonly.ql-editor .doc-steps__p,
body #js-doc-editor-wrap .ql-editor .doc-steps__p,
body #js-doc-editor .ql-editor .doc-steps__p {
  position: relative;
  margin: 4px 0 0;
  padding-left: 52px;
  color: var(--color-text, #1f2230);
}
body .doc-article .doc-steps__p:first-child,
body .doc-page__content .doc-steps__p:first-child,
body .doc-content .doc-steps__p:first-child,
body .markdown-body .doc-steps__p:first-child,
body #js-doc-readonly .doc-steps__p:first-child,
body #js-doc-readonly.ql-editor .doc-steps__p:first-child,
body #js-doc-editor-wrap .ql-editor .doc-steps__p:first-child,
body #js-doc-editor .ql-editor .doc-steps__p:first-child {
  margin-top: 0;
}
body .doc-article .doc-steps__p:not(:last-child)::after,
body .doc-page__content .doc-steps__p:not(:last-child)::after,
body .doc-content .doc-steps__p:not(:last-child)::after,
body .markdown-body .doc-steps__p:not(:last-child)::after,
body #js-doc-readonly .doc-steps__p:not(:last-child)::after,
body #js-doc-readonly.ql-editor .doc-steps__p:not(:last-child)::after,
body #js-doc-editor-wrap .ql-editor .doc-steps__p:not(:last-child)::after,
body #js-doc-editor .ql-editor .doc-steps__p:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 0;
  bottom: -14px;
  width: 2px;
  background: color-mix(in srgb, var(--color-primary, #5dc6cb) 28%, transparent);
}
body .doc-article .doc-steps__p[data-variant=step],
body .doc-page__content .doc-steps__p[data-variant=step],
body .doc-content .doc-steps__p[data-variant=step],
body .markdown-body .doc-steps__p[data-variant=step],
body #js-doc-readonly .doc-steps__p[data-variant=step],
body #js-doc-readonly.ql-editor .doc-steps__p[data-variant=step],
body #js-doc-editor-wrap .ql-editor .doc-steps__p[data-variant=step],
body #js-doc-editor .ql-editor .doc-steps__p[data-variant=step] {
  counter-increment: doc-step;
  margin-top: 14px;
  min-height: 32px;
  padding-top: 4px;
  font-size: 1.04em;
  font-weight: 600;
}
body .doc-article .doc-steps__p[data-variant=step]:first-child,
body .doc-page__content .doc-steps__p[data-variant=step]:first-child,
body .doc-content .doc-steps__p[data-variant=step]:first-child,
body .markdown-body .doc-steps__p[data-variant=step]:first-child,
body #js-doc-readonly .doc-steps__p[data-variant=step]:first-child,
body #js-doc-readonly.ql-editor .doc-steps__p[data-variant=step]:first-child,
body #js-doc-editor-wrap .ql-editor .doc-steps__p[data-variant=step]:first-child,
body #js-doc-editor .ql-editor .doc-steps__p[data-variant=step]:first-child {
  margin-top: 0;
}
body .doc-article .doc-steps__p[data-variant=step]:not(:last-child)::after,
body .doc-page__content .doc-steps__p[data-variant=step]:not(:last-child)::after,
body .doc-content .doc-steps__p[data-variant=step]:not(:last-child)::after,
body .markdown-body .doc-steps__p[data-variant=step]:not(:last-child)::after,
body #js-doc-readonly .doc-steps__p[data-variant=step]:not(:last-child)::after,
body #js-doc-readonly.ql-editor .doc-steps__p[data-variant=step]:not(:last-child)::after,
body #js-doc-editor-wrap .ql-editor .doc-steps__p[data-variant=step]:not(:last-child)::after,
body #js-doc-editor .ql-editor .doc-steps__p[data-variant=step]:not(:last-child)::after {
  top: 32px;
}
body .doc-article .doc-steps__p[data-variant=step]::before,
body .doc-page__content .doc-steps__p[data-variant=step]::before,
body .doc-content .doc-steps__p[data-variant=step]::before,
body .markdown-body .doc-steps__p[data-variant=step]::before,
body #js-doc-readonly .doc-steps__p[data-variant=step]::before,
body #js-doc-readonly.ql-editor .doc-steps__p[data-variant=step]::before,
body #js-doc-editor-wrap .ql-editor .doc-steps__p[data-variant=step]::before,
body #js-doc-editor .ql-editor .doc-steps__p[data-variant=step]::before {
  content: counter(doc-step);
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-primary, #5dc6cb);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 0 0 4px var(--color-surface, #fff);
  user-select: none;
}
body .doc-article .doc-steps__p img,
body .doc-page__content .doc-steps__p img,
body .doc-content .doc-steps__p img,
body .markdown-body .doc-steps__p img,
body #js-doc-readonly .doc-steps__p img,
body #js-doc-readonly.ql-editor .doc-steps__p img,
body #js-doc-editor-wrap .ql-editor .doc-steps__p img,
body #js-doc-editor .ql-editor .doc-steps__p img {
  max-width: 100%;
  margin-top: 6px;
  border-radius: var(--radius-md, 8px);
}
@media (max-width: 640px) {
  body .doc-article .doc-steps__p,
  body .doc-page__content .doc-steps__p,
  body .doc-content .doc-steps__p,
  body .markdown-body .doc-steps__p,
  body #js-doc-readonly .doc-steps__p,
  body #js-doc-readonly.ql-editor .doc-steps__p,
  body #js-doc-editor-wrap .ql-editor .doc-steps__p,
  body #js-doc-editor .ql-editor .doc-steps__p {
    padding-left: 44px;
  }
  body .doc-article .doc-steps__p:not(:last-child)::after,
  body .doc-page__content .doc-steps__p:not(:last-child)::after,
  body .doc-content .doc-steps__p:not(:last-child)::after,
  body .markdown-body .doc-steps__p:not(:last-child)::after,
  body #js-doc-readonly .doc-steps__p:not(:last-child)::after,
  body #js-doc-readonly.ql-editor .doc-steps__p:not(:last-child)::after,
  body #js-doc-editor-wrap .ql-editor .doc-steps__p:not(:last-child)::after,
  body #js-doc-editor .ql-editor .doc-steps__p:not(:last-child)::after {
    left: 13px;
  }
  body .doc-article .doc-steps__p[data-variant=step],
  body .doc-page__content .doc-steps__p[data-variant=step],
  body .doc-content .doc-steps__p[data-variant=step],
  body .markdown-body .doc-steps__p[data-variant=step],
  body #js-doc-readonly .doc-steps__p[data-variant=step],
  body #js-doc-readonly.ql-editor .doc-steps__p[data-variant=step],
  body #js-doc-editor-wrap .ql-editor .doc-steps__p[data-variant=step],
  body #js-doc-editor .ql-editor .doc-steps__p[data-variant=step] {
    min-height: 28px;
    padding-top: 3px;
  }
  body .doc-article .doc-steps__p[data-variant=step]:not(:last-child)::after,
  body .doc-page__content .doc-steps__p[data-variant=step]:not(:last-child)::after,
  body .doc-content .doc-steps__p[data-variant=step]:not(:last-child)::after,
  body .markdown-body .doc-steps__p[data-variant=step]:not(:last-child)::after,
  body #js-doc-readonly .doc-steps__p[data-variant=step]:not(:last-child)::after,
  body #js-doc-readonly.ql-editor .doc-steps__p[data-variant=step]:not(:last-child)::after,
  body #js-doc-editor-wrap .ql-editor .doc-steps__p[data-variant=step]:not(:last-child)::after,
  body #js-doc-editor .ql-editor .doc-steps__p[data-variant=step]:not(:last-child)::after {
    top: 28px;
  }
  body .doc-article .doc-steps__p[data-variant=step]::before,
  body .doc-page__content .doc-steps__p[data-variant=step]::before,
  body .doc-content .doc-steps__p[data-variant=step]::before,
  body .markdown-body .doc-steps__p[data-variant=step]::before,
  body #js-doc-readonly .doc-steps__p[data-variant=step]::before,
  body #js-doc-readonly.ql-editor .doc-steps__p[data-variant=step]::before,
  body #js-doc-editor-wrap .ql-editor .doc-steps__p[data-variant=step]::before,
  body #js-doc-editor .ql-editor .doc-steps__p[data-variant=step]::before {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }
}

.doc-term {
  text-decoration: underline dotted;
  text-decoration-color: var(--color-primary, #5dc6cb);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  cursor: help;
}
.doc-term:focus-visible {
  outline: 2px solid var(--color-primary, #5dc6cb);
  outline-offset: 2px;
  border-radius: 2px;
}

.doc-term-pop {
  position: fixed;
  z-index: 1300;
  max-width: 320px;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: var(--radius-md, 8px);
  background: var(--color-surface, #fff);
  color: var(--color-text, #1f2230);
  box-shadow: var(--shadow-lg, 0 8px 24px rgba(16, 24, 40, 0.12));
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-line;
}
.doc-term-pop[hidden] {
  display: none;
}
.doc-term-pop__term {
  margin-bottom: 2px;
  font-weight: 700;
}
@media (max-width: 640px) {
  .doc-term-pop {
    max-width: calc(100vw - 32px);
  }
}

.doc-term-dialog__word {
  margin: 0 0 12px;
  font-weight: 600;
  word-break: break-word;
}
.doc-term-dialog .field textarea {
  width: 100%;
  box-sizing: border-box;
}
.doc-term-dialog__counter {
  align-self: flex-end;
  margin-top: 4px;
  font-size: 12px;
  color: var(--color-text-muted, #6b7280);
}
.doc-term-dialog__actions .js-term-remove {
  margin-right: auto;
}

.selection-floating-toolbar {
  position: absolute;
  z-index: 1000;
  display: none;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: var(--radius-md, 8px);
  background: var(--color-surface, #fff);
  box-shadow: var(--shadow-lg, 0 8px 24px rgba(16, 24, 40, 0.12));
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}
.selection-floating-toolbar.is-visible {
  opacity: 1;
  transform: none;
}
.selection-floating-toolbar__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 10px;
  border: 0;
  border-radius: var(--radius-sm, 6px);
  background: transparent;
  color: var(--color-text, #1f2230);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}
.selection-floating-toolbar__btn:hover {
  background: var(--color-bg-muted, #f0f1f7);
}
.selection-floating-toolbar__btn .doc-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
@media (pointer: coarse) {
  .selection-floating-toolbar__btn {
    min-height: 40px;
  }
}

.slash-menu__item .doc-icon {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  vertical-align: -3px;
}

body .ql-container {
  position: relative;
}
body .table-indicator-line {
  position: absolute;
  background-color: var(--color-primary, #3b82f6);
  opacity: 0;
  transition: opacity 0.15s ease-in-out;
  pointer-events: none;
  z-index: 25;
  visibility: hidden;
}
body .table-indicator-line.visible {
  opacity: 1;
  visibility: visible;
}
body .table-indicator-line.horizontal {
  height: 2px;
  transform: translateY(-1px);
}
body .table-indicator-line.vertical {
  width: 2px;
  transform: translateX(-1px);
}
body .table-add-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--color-primary, #3b82f6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease, background 0.1s ease;
}
body .table-add-btn:hover {
  transform: translate(-50%, -50%) scale(1.15);
  background: var(--color-primary-hover, #2563eb);
}
body .table-add-btn svg {
  width: 12px;
  height: 12px;
}
body .table-row-handle {
  position: absolute;
  width: 22px;
  height: 22px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 4px;
  color: var(--color-text-muted, #94a3b8);
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
  z-index: 25;
  transition: opacity 0.15s ease, color 0.15s ease, background 0.15s ease;
}
body .table-row-handle.visible {
  opacity: 1;
  visibility: visible;
}
body .table-row-handle:hover {
  color: var(--color-text, #1e293b);
  background: var(--color-bg-hover, #f1f5f9);
}
body .table-row-handle svg {
  width: 14px;
  height: 14px;
}

:root[data-theme=dark] body .table-add-btn {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}
:root[data-theme=dark] body .table-row-handle {
  color: var(--color-text-muted, #94a3b8);
}
:root[data-theme=dark] body .table-row-handle:hover {
  background: var(--color-bg-hover, #1e293b);
  color: var(--color-text, #e2e8f0);
}

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--color-bg);
}

.auth-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 32px;
  width: 360px;
}
.auth-card__title {
  text-align: center;
  margin-bottom: 20px;
}
.auth-card__logo {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -1px;
  color: var(--color-text);
}
.auth-card__logo span {
  background: linear-gradient(135deg, var(--color-primary-strong) 0%, var(--color-primary-strong-hover) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.branding-preview {
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg);
  display: inline-flex;
  align-items: center;
}

.proj-icon-upload {
  display: flex;
  align-items: center;
  gap: 20px;
}
.proj-icon-upload__preview {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--color-border);
}
.proj-icon-upload__placeholder {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 16px;
  color: var(--color-text-muted);
  font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.auth-oauth {
  display: flex;
  gap: 8px;
}
.auth-oauth__btn {
  flex: 1;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}
.auth-oauth__btn svg {
  flex-shrink: 0;
}
.auth-oauth__btn--github {
  color: var(--color-text);
}

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.header {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}
@media (max-width: 480px) {
  .header {
    padding: 0 12px;
    gap: 8px;
  }
  .header__search {
    max-width: 160px;
  }
}
.header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header__logo {
  display: flex;
  align-items: baseline;
  gap: 1px;
  text-decoration: none;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.8px;
  color: var(--color-text);
  white-space: nowrap;
  margin-right: 20px;
  flex-shrink: 0;
}
.header__logo span {
  background: linear-gradient(135deg, var(--color-primary-strong) 0%, var(--color-primary-strong-hover) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.header__logo:hover {
  opacity: 0.8;
}
.header__search {
  flex: 1;
  max-width: 360px;
}
.header__search input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.header__search input::placeholder {
  color: var(--color-text-muted);
  opacity: 0.8;
}
.header__search input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.header__theme-toggle, .header__notif-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.header__theme-toggle svg, .header__notif-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.header__theme-toggle:hover, .header__notif-btn:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}
.header__notifications {
  position: relative;
}
.header__notif-btn {
  position: relative;
}
.header__notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 15px;
  height: 15px;
  border-radius: 99px;
  background: var(--color-danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
  padding: 0 3px;
  box-shadow: 0 0 0 2px var(--color-surface);
}
.header__notif-dropdown {
  position: absolute;
  right: 0;
  top: 40px;
  width: 340px;
  max-height: 420px;
  overflow-y: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  z-index: 20;
}
.header__notif-dropdown.is-open {
  display: flex;
}
@media (max-width: 480px) {
  .header__notif-dropdown {
    width: calc(100vw - 24px);
    right: -8px;
  }
}
.header__notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 8px;
  border-bottom: 1px solid var(--color-border);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  flex-shrink: 0;
}
.header__notif-read-all {
  background: none;
  border: none;
  color: var(--color-primary-strong);
  font-size: 12px;
  cursor: pointer;
}
.header__notif-read-all:hover {
  text-decoration: underline;
}
.header__notif-list {
  list-style: none;
  padding: 4px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.header__notif-empty {
  padding: 16px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 13px;
}
.header__notif-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.1s ease;
}
.header__notif-item:hover {
  background: var(--color-bg);
}
.header__notif-item--unread {
  background: color-mix(in srgb, var(--color-primary) 6%, transparent);
}
.header__notif-item-icon {
  flex-shrink: 0;
  font-size: 16px;
  color: var(--color-text-muted);
  margin-top: 1px;
}
.header__notif-item-icon svg {
  width: 16px;
  height: 16px;
}
.header__notif-item-body {
  flex: 1;
  min-width: 0;
}
.header__notif-item-body strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 2px;
}
.header__notif-item-body span {
  font-size: 12px;
  color: var(--color-text-muted);
}
.header__user-menu {
  position: relative;
  margin-left: 4px;
  padding-left: 12px;
  border-left: 1px solid var(--color-border);
}
.header__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  border: none;
  cursor: pointer;
  transition: box-shadow 0.12s ease;
}
.header__avatar:hover {
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.header__dropdown {
  position: absolute;
  right: 0;
  top: 40px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  min-width: 180px;
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  padding: 6px;
}
.header__dropdown.is-open {
  display: flex;
}
.header__dropdown a, .header__dropdown button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--color-text);
  font-size: 13px;
}
.header__dropdown a svg, .header__dropdown button svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.7;
  color: var(--color-text-muted);
}
.header__dropdown a:hover, .header__dropdown button:hover {
  background: var(--color-bg);
}

.app-body {
  display: flex;
  flex: 1;
  min-height: calc(100vh - 56px);
}
@media (max-width: 768px) {
  .app-body {
    flex-direction: column;
  }
}

.app-main {
  flex: 1;
  padding: 28px 32px;
  max-width: none;
  min-width: 0;
}
@media (max-width: 768px) {
  .app-main {
    padding: 16px;
  }
}
@media (max-width: 480px) {
  .app-main {
    padding: 12px;
  }
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.page-header h1 {
  font-size: clamp(18px, 4vw, 20px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.page-header__controls {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.page-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
@media (max-width: 480px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 4px 8px 8px;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13.5px;
  color: var(--color-text);
  text-decoration: none;
  transition: background 0.1s;
  position: relative;
}
.sidebar__link:hover {
  background: var(--color-bg-hover, var(--color-bg));
}
.sidebar__link--active {
  background: color-mix(in srgb, var(--color-primary) 12%, transparent);
  color: var(--color-primary-strong);
  font-weight: 600;
}
.sidebar__link--sm {
  font-size: 13px;
}
.sidebar__link--settings {
  margin-top: 4px;
  color: var(--color-text-muted);
}

.sidebar__link-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.7;
}
.sidebar__link--active .sidebar__link-icon {
  opacity: 1;
}

.sidebar__badge {
  margin-left: auto;
  background: var(--color-danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar__section {
  margin: 4px 0 8px;
}

.sidebar__section-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 18px 2px 18px;
  margin-bottom: 2px;
}
.sidebar__section-hd:hover .sidebar__section-add {
  opacity: 1;
}

.sidebar__section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.sidebar__section-add {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.1s, background 0.1s, color 0.1s;
}
.sidebar__section-add:hover {
  background: var(--color-bg-hover, var(--color-bg));
  color: var(--color-text);
  opacity: 1;
}

.sidebar__proj-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sidebar__proj-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 10px 5px 14px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--color-text);
  text-decoration: none;
  transition: background 0.1s;
  margin: 0 8px;
}
.sidebar__proj-item:hover {
  background: var(--color-bg-hover, var(--color-bg));
}
.sidebar__proj-item--active {
  background: color-mix(in srgb, var(--color-primary) 12%, transparent);
  color: var(--color-primary-strong);
  font-weight: 600;
}

.sidebar__proj-icon {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  text-transform: uppercase;
}

.sidebar__proj-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar__proj-empty {
  padding: 6px 22px;
  font-size: 12px;
  color: var(--color-text-muted);
  font-style: italic;
}

.sidebar__all-link {
  display: block;
  padding: 4px 22px;
  font-size: 12px;
  color: var(--color-text-muted);
  text-decoration: none;
  margin-top: 2px;
}
.sidebar__all-link:hover {
  color: var(--color-primary-strong);
}

.sidebar__project-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 0 8px 8px;
  padding-top: 4px;
  border-top: 1px solid var(--color-border);
}
.sidebar__project-nav:empty {
  display: none;
}

.sidebar__link--sub {
  font-size: 12.5px;
  padding-left: 22px;
  color: var(--color-text-muted);
}
.sidebar__link--sub.sidebar__link--active {
  color: var(--color-primary-strong);
}
.sidebar__link--sub:hover {
  color: var(--color-text);
  background: var(--color-bg-hover, var(--color-bg));
}

.view-switcher {
  display: flex;
  gap: 4px;
}
.view-switcher__btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  transition: background 0.1s, color 0.1s;
}
.view-switcher__btn:hover {
  background: var(--color-bg);
  color: var(--color-text);
}
.view-switcher__btn--active {
  background: color-mix(in srgb, var(--color-primary) 10%, var(--color-surface));
  border-color: color-mix(in srgb, var(--color-primary) 40%, var(--color-border));
  color: var(--color-primary-strong);
  font-weight: 600;
}

.header__timer {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 4px 0 12px;
  border-radius: 99px;
  border: 1px solid color-mix(in srgb, var(--color-primary) 30%, var(--color-border));
  background: var(--color-primary-light);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-primary-strong);
  flex-shrink: 0;
}
.header__timer > span {
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  font-variant-numeric: tabular-nums;
  animation: timer-pulse 2s ease-in-out infinite;
}
.header__timer-stop {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  font-size: 12px;
  line-height: 1;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--color-primary-strong);
}
.header__timer-stop:hover {
  background: color-mix(in srgb, var(--color-primary) 18%, transparent);
}

@keyframes timer-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.65;
  }
}
.space-nav__bottom-icon .doc-icon {
  width: 18px;
  height: 18px;
}

.space-description {
  color: var(--color-text-muted);
  margin-bottom: 16px;
  max-width: 70ch;
}

.space-toc {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.space-toc__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  text-decoration: none;
}
.space-toc__link:hover {
  border-color: var(--color-primary);
}
.space-toc__title {
  font-weight: 500;
}
.space-toc__count {
  margin-left: auto;
  font-size: 12px;
  color: var(--color-text-muted);
}

.doc-tree {
  list-style: none;
  margin: 0;
  padding: 0;
}
.doc-tree.doc-tree--move-mode .doc-tree__row {
  cursor: grab;
  user-select: none;
}
.doc-tree.doc-tree--move-mode .doc-tree__row--dragging {
  cursor: grabbing;
}
.doc-tree__children {
  list-style: none;
  margin: 0;
  padding: 0;
}
.doc-tree__row {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 6px 10px 6px calc(8px + var(--depth, 0) * 18px);
  border-radius: var(--radius-md);
  color: var(--color-text);
  background-repeat: no-repeat;
  background-image: repeating-linear-gradient(to right, var(--color-border) 0, var(--color-border) 1px, transparent 1px, transparent 18px);
  background-size: calc(var(--depth, 0) * 18px) 100%;
  background-position: 8px 0;
}
.doc-tree__row:hover {
  background-color: var(--color-bg-hover);
}
.doc-tree__row:hover .doc-tree__add {
  opacity: 1;
}
.doc-tree__row:hover .doc-tree__reorder-actions {
  opacity: 1;
  pointer-events: auto;
}
.doc-tree__row--active {
  background-color: var(--color-primary-tint);
  font-weight: 600;
}
.doc-tree__row--dragging {
  opacity: 0.35;
  background: var(--color-bg-muted);
}
.doc-tree__row--drop-into {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
  background-color: var(--color-primary-tint) !important;
}
.doc-tree__row--drop-before {
  position: relative;
  box-shadow: inset 0 3px 0 0 var(--color-primary);
  background-color: var(--color-bg-hover);
}
.doc-tree__row--drop-before::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
}
.doc-tree__row--drop-after {
  position: relative;
  box-shadow: inset 0 -3px 0 0 var(--color-primary);
  background-color: var(--color-bg-hover);
}
.doc-tree__row--drop-after::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
}
.doc-tree__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--color-text-muted);
  cursor: pointer;
  transform: rotate(90deg);
  transition: transform 0.12s ease;
}
.doc-tree__toggle svg {
  width: 13px;
  height: 13px;
}
.doc-tree__toggle--collapsed {
  transform: rotate(0deg);
}
.doc-tree__toggle--leaf {
  cursor: default;
}
.doc-tree__link {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 1;
  padding: 2px 0;
  color: inherit;
  text-decoration: none;
  font-size: 14px;
}
.doc-tree__icon {
  flex-shrink: 0;
  font-size: 14px;
}
.doc-tree__icon svg {
  width: 14px;
  height: 14px;
}
.doc-tree__title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.doc-tree__reorder-actions {
  display: none;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}
.doc-tree.doc-tree--move-mode .doc-tree__reorder-actions {
  display: flex;
}
.doc-tree__reorder-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: none;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.12s ease;
}
.doc-tree__reorder-btn:hover {
  background: var(--color-bg);
  color: var(--color-primary-strong);
}
.doc-tree__reorder-btn svg {
  width: 10px;
  height: 10px;
}
.doc-tree__add, .doc-tree__menu-btn {
  flex-shrink: 0;
  width: 19px;
  height: 19px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: none;
  color: var(--color-text-muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
}
.doc-tree__add svg, .doc-tree__menu-btn svg {
  width: 13px;
  height: 13px;
}
.doc-tree__add, .doc-tree__menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.12s ease;
}
.doc-tree__add:hover, .doc-tree__menu-btn:hover {
  background: var(--color-bg);
  color: var(--color-text);
}
@media (hover: none) {
  .doc-tree__add, .doc-tree__menu-btn {
    opacity: 1;
  }
}
.doc-tree__row:hover .doc-tree__add, .doc-tree__row:hover .doc-tree__menu-btn {
  opacity: 1;
}

.doc-tree-context-menu {
  position: fixed;
  z-index: 2000;
  min-width: 220px;
  max-width: 280px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: contextMenuFadeIn 0.12s ease-out;
}
.doc-tree-context-menu__header {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 10px 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.doc-tree-context-menu__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  font-size: 13px;
  color: var(--color-text);
  background: none;
  border: none;
  border-radius: 6px;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.doc-tree-context-menu__item svg {
  flex-shrink: 0;
  color: var(--color-text-muted);
}
.doc-tree-context-menu__item:hover {
  background: var(--color-bg-hover, #f3f4f6);
  color: var(--color-primary-strong);
}
.doc-tree-context-menu__item:hover svg {
  color: var(--color-primary-strong);
}
.doc-tree-context-menu__item--danger {
  color: var(--color-danger, #ef4444);
}
.doc-tree-context-menu__item--danger svg {
  color: var(--color-danger, #ef4444);
}
.doc-tree-context-menu__item--danger:hover {
  background: color-mix(in srgb, var(--color-danger) 12%, transparent);
  color: var(--color-danger, #ef4444);
}
.doc-tree-context-menu__item--danger:hover svg {
  color: var(--color-danger, #ef4444);
}
.doc-tree-context-menu__divider {
  height: 1px;
  background: var(--color-border);
  margin: 4px 0;
}

@keyframes contextMenuFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
details,
details.doc-toggle,
details.toggle-blot,
details[data-toggle] {
  margin: 16px 0;
  border: 1px solid var(--color-border, #d0d7de);
  border-radius: 10px;
  background: var(--color-surface, #ffffff);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
details:hover,
details.doc-toggle:hover,
details.toggle-blot:hover,
details[data-toggle]:hover {
  border-color: rgba(9, 105, 218, 0.4);
}
details summary,
details summary.doc-toggle__summary,
details.doc-toggle summary,
details.doc-toggle summary.doc-toggle__summary,
details.toggle-blot summary,
details.toggle-blot summary.doc-toggle__summary,
details[data-toggle] summary,
details[data-toggle] summary.doc-toggle__summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--color-text, #24292f);
  background: var(--color-bg-subtle, #f6f8fa);
  cursor: pointer;
  user-select: none;
  outline: none;
  list-style: none;
  position: relative;
  transition: background 0.15s ease, color 0.15s ease;
}
details summary::-webkit-details-marker,
details summary.doc-toggle__summary::-webkit-details-marker,
details.doc-toggle summary::-webkit-details-marker,
details.doc-toggle summary.doc-toggle__summary::-webkit-details-marker,
details.toggle-blot summary::-webkit-details-marker,
details.toggle-blot summary.doc-toggle__summary::-webkit-details-marker,
details[data-toggle] summary::-webkit-details-marker,
details[data-toggle] summary.doc-toggle__summary::-webkit-details-marker {
  display: none !important;
}
details summary::marker,
details summary.doc-toggle__summary::marker,
details.doc-toggle summary::marker,
details.doc-toggle summary.doc-toggle__summary::marker,
details.toggle-blot summary::marker,
details.toggle-blot summary.doc-toggle__summary::marker,
details[data-toggle] summary::marker,
details[data-toggle] summary.doc-toggle__summary::marker {
  display: none !important;
}
details summary::before,
details summary.doc-toggle__summary::before,
details.doc-toggle summary::before,
details.doc-toggle summary.doc-toggle__summary::before,
details.toggle-blot summary::before,
details.toggle-blot summary.doc-toggle__summary::before,
details[data-toggle] summary::before,
details[data-toggle] summary.doc-toggle__summary::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--color-text-muted, #57606a);
  border-bottom: 2px solid var(--color-text-muted, #57606a);
  transform: rotate(-45deg);
  transform-origin: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
  margin-left: 2px;
  margin-right: 4px;
}
details summary:hover,
details summary.doc-toggle__summary:hover,
details.doc-toggle summary:hover,
details.doc-toggle summary.doc-toggle__summary:hover,
details.toggle-blot summary:hover,
details.toggle-blot summary.doc-toggle__summary:hover,
details[data-toggle] summary:hover,
details[data-toggle] summary.doc-toggle__summary:hover {
  background: var(--color-bg-hover, rgba(0, 0, 0, 0.05));
  color: var(--color-primary-strong);
}
details summary:hover::before,
details summary.doc-toggle__summary:hover::before,
details.doc-toggle summary:hover::before,
details.doc-toggle summary.doc-toggle__summary:hover::before,
details.toggle-blot summary:hover::before,
details.toggle-blot summary.doc-toggle__summary:hover::before,
details[data-toggle] summary:hover::before,
details[data-toggle] summary.doc-toggle__summary:hover::before {
  border-color: var(--color-primary, #0969da);
}
details[open],
details.doc-toggle[open],
details.toggle-blot[open],
details[data-toggle][open] {
  border-color: var(--color-border, #d0d7de);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
details[open] > summary, details[open] > summary.doc-toggle__summary,
details.doc-toggle[open] > summary,
details.doc-toggle[open] > summary.doc-toggle__summary,
details.toggle-blot[open] > summary,
details.toggle-blot[open] > summary.doc-toggle__summary,
details[data-toggle][open] > summary,
details[data-toggle][open] > summary.doc-toggle__summary {
  border-bottom: 1px solid var(--color-border, #d0d7de);
  background: var(--color-bg-subtle, #f6f8fa);
  color: var(--color-text, #24292f);
}
details[open] > summary::before, details[open] > summary.doc-toggle__summary::before,
details.doc-toggle[open] > summary::before,
details.doc-toggle[open] > summary.doc-toggle__summary::before,
details.toggle-blot[open] > summary::before,
details.toggle-blot[open] > summary.doc-toggle__summary::before,
details[data-toggle][open] > summary::before,
details[data-toggle][open] > summary.doc-toggle__summary::before {
  transform: rotate(45deg);
  border-color: var(--color-primary, #0969da);
}
details .doc-toggle__content, details > p, details > div, details > ul, details > ol, details > table, details > blockquote, details > .callout,
details.doc-toggle .doc-toggle__content,
details.doc-toggle > p,
details.doc-toggle > div,
details.doc-toggle > ul,
details.doc-toggle > ol,
details.doc-toggle > table,
details.doc-toggle > blockquote,
details.doc-toggle > .callout,
details.toggle-blot .doc-toggle__content,
details.toggle-blot > p,
details.toggle-blot > div,
details.toggle-blot > ul,
details.toggle-blot > ol,
details.toggle-blot > table,
details.toggle-blot > blockquote,
details.toggle-blot > .callout,
details[data-toggle] .doc-toggle__content,
details[data-toggle] > p,
details[data-toggle] > div,
details[data-toggle] > ul,
details[data-toggle] > ol,
details[data-toggle] > table,
details[data-toggle] > blockquote,
details[data-toggle] > .callout {
  padding: 12px 16px 14px 16px;
  margin: 0;
  line-height: 1.65;
  color: var(--color-text, #24292f);
  background: transparent;
  border: none;
}
details > p + p, details > div + div,
details .doc-toggle__content + .doc-toggle__content, details > p + div, details > div + p,
details.doc-toggle > p + p,
details.doc-toggle > div + div,
details.doc-toggle .doc-toggle__content + .doc-toggle__content,
details.doc-toggle > p + div,
details.doc-toggle > div + p,
details.toggle-blot > p + p,
details.toggle-blot > div + div,
details.toggle-blot .doc-toggle__content + .doc-toggle__content,
details.toggle-blot > p + div,
details.toggle-blot > div + p,
details[data-toggle] > p + p,
details[data-toggle] > div + div,
details[data-toggle] .doc-toggle__content + .doc-toggle__content,
details[data-toggle] > p + div,
details[data-toggle] > div + p {
  padding-top: 4px;
}

.doc-link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 12px 0;
  padding: 12px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none !important;
  color: inherit !important;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.doc-link-card::before {
  content: "";
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  background-color: var(--color-primary);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'/%3E%3C/svg%3E") center/22px 22px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'/%3E%3C/svg%3E") center/22px 22px no-repeat;
}
.doc-link-card:hover {
  background: var(--color-bg-hover, #f1f3f5);
  box-shadow: var(--shadow-hover);
}
.doc-link-card__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.doc-link-card__title {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.doc-link-card__desc {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.doc-link-card__domain {
  font-size: 12px;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.doc-link-card__domain svg {
  display: none;
}

.doc-date-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: var(--color-bg-hover, #f1f3f5);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--color-text);
  margin: 0 2px;
  vertical-align: middle;
}

.doc-toc-embed {
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--color-bg, #f8f9fa);
  border: 1px solid var(--color-border, #d0d7de);
  border-radius: 12px;
  white-space: normal !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.doc-toc-embed__header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted, #57606a);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border, #e1e4e8);
}
.doc-toc-embed__header svg {
  color: var(--color-primary-strong);
  flex-shrink: 0;
}
.doc-toc-embed__hint, .doc-toc-embed__empty {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0;
  padding: 4px 2px;
}
.doc-toc-embed__list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.doc-toc-embed__item {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.4 !important;
}
.doc-toc-embed__item::before,
.doc-toc-embed__item > .ql-ui,
.doc-toc-embed__item > .ql-ui::before {
  display: none !important;
}

body .doc-article .doc-toc-embed,
body .ql-editor .doc-toc-embed,
.doc-article .doc-toc-embed,
.ql-editor .doc-toc-embed {
  white-space: normal !important;
}
body .doc-article .doc-toc-embed .doc-toc-embed__list,
body .ql-editor .doc-toc-embed .doc-toc-embed__list,
.doc-article .doc-toc-embed .doc-toc-embed__list,
.ql-editor .doc-toc-embed .doc-toc-embed__list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
body .doc-article .doc-toc-embed .doc-toc-embed__item,
body .ql-editor .doc-toc-embed .doc-toc-embed__item,
.doc-article .doc-toc-embed .doc-toc-embed__item,
.ql-editor .doc-toc-embed .doc-toc-embed__item {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
body .doc-article .doc-toc-embed .doc-toc-embed__item::before,
body .doc-article .doc-toc-embed .doc-toc-embed__item > .ql-ui,
body .doc-article .doc-toc-embed .doc-toc-embed__item > .ql-ui::before,
body .ql-editor .doc-toc-embed .doc-toc-embed__item::before,
body .ql-editor .doc-toc-embed .doc-toc-embed__item > .ql-ui,
body .ql-editor .doc-toc-embed .doc-toc-embed__item > .ql-ui::before,
.doc-article .doc-toc-embed .doc-toc-embed__item::before,
.doc-article .doc-toc-embed .doc-toc-embed__item > .ql-ui,
.doc-article .doc-toc-embed .doc-toc-embed__item > .ql-ui::before,
.ql-editor .doc-toc-embed .doc-toc-embed__item::before,
.ql-editor .doc-toc-embed .doc-toc-embed__item > .ql-ui,
.ql-editor .doc-toc-embed .doc-toc-embed__item > .ql-ui::before {
  display: none !important;
}
body .doc-article .doc-toc-embed .doc-toc-embed__item a,
body .ql-editor .doc-toc-embed .doc-toc-embed__item a,
.doc-article .doc-toc-embed .doc-toc-embed__item a,
.ql-editor .doc-toc-embed .doc-toc-embed__item a {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 6px 12px !important;
  border-radius: 6px !important;
  color: var(--color-text, #24292f) !important;
  text-decoration: none !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
  background: none !important;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.1s ease !important;
}
body .doc-article .doc-toc-embed .doc-toc-embed__item a:hover,
body .ql-editor .doc-toc-embed .doc-toc-embed__item a:hover,
.doc-article .doc-toc-embed .doc-toc-embed__item a:hover,
.ql-editor .doc-toc-embed .doc-toc-embed__item a:hover {
  background: var(--color-bg-hover, rgba(9, 105, 218, 0.08)) !important;
  color: var(--color-primary-strong) !important;
  text-decoration: none !important;
  transform: translateX(2px);
}
body .doc-article .doc-toc-embed .doc-toc-embed__item--h1 a,
body .ql-editor .doc-toc-embed .doc-toc-embed__item--h1 a,
.doc-article .doc-toc-embed .doc-toc-embed__item--h1 a,
.ql-editor .doc-toc-embed .doc-toc-embed__item--h1 a {
  font-weight: 600 !important;
  font-size: 14px !important;
  padding-left: 12px !important;
}
body .doc-article .doc-toc-embed .doc-toc-embed__item--h2 a,
body .ql-editor .doc-toc-embed .doc-toc-embed__item--h2 a,
.doc-article .doc-toc-embed .doc-toc-embed__item--h2 a,
.ql-editor .doc-toc-embed .doc-toc-embed__item--h2 a {
  padding-left: 28px !important;
  font-size: 13.5px !important;
  color: var(--color-text, #24292f) !important;
  position: relative !important;
}
body .doc-article .doc-toc-embed .doc-toc-embed__item--h2 a::before,
body .ql-editor .doc-toc-embed .doc-toc-embed__item--h2 a::before,
.doc-article .doc-toc-embed .doc-toc-embed__item--h2 a::before,
.ql-editor .doc-toc-embed .doc-toc-embed__item--h2 a::before {
  content: "•";
  position: absolute;
  left: 14px;
  color: var(--color-primary-strong);
  font-size: 13px;
  opacity: 0.75;
}
body .doc-article .doc-toc-embed .doc-toc-embed__item--h3 a,
body .ql-editor .doc-toc-embed .doc-toc-embed__item--h3 a,
.doc-article .doc-toc-embed .doc-toc-embed__item--h3 a,
.ql-editor .doc-toc-embed .doc-toc-embed__item--h3 a {
  padding-left: 44px !important;
  font-size: 13px !important;
  color: var(--color-text-muted, #57606a) !important;
  position: relative !important;
}
body .doc-article .doc-toc-embed .doc-toc-embed__item--h3 a::before,
body .ql-editor .doc-toc-embed .doc-toc-embed__item--h3 a::before,
.doc-article .doc-toc-embed .doc-toc-embed__item--h3 a::before,
.ql-editor .doc-toc-embed .doc-toc-embed__item--h3 a::before {
  content: "◦";
  position: absolute;
  left: 28px;
  color: var(--color-primary-strong);
  font-size: 12px;
  font-weight: 700;
  opacity: 0.75;
}
body .doc-article .doc-toc-embed .doc-toc-embed__item--h4 a,
body .ql-editor .doc-toc-embed .doc-toc-embed__item--h4 a,
.doc-article .doc-toc-embed .doc-toc-embed__item--h4 a,
.ql-editor .doc-toc-embed .doc-toc-embed__item--h4 a {
  padding-left: 58px !important;
  font-size: 12.5px !important;
  color: var(--color-text-muted, #57606a) !important;
  position: relative !important;
}
body .doc-article .doc-toc-embed .doc-toc-embed__item--h4 a::before,
body .ql-editor .doc-toc-embed .doc-toc-embed__item--h4 a::before,
.doc-article .doc-toc-embed .doc-toc-embed__item--h4 a::before,
.ql-editor .doc-toc-embed .doc-toc-embed__item--h4 a::before {
  content: "▪";
  position: absolute;
  left: 42px;
  color: var(--color-primary-strong);
  font-size: 9px;
  opacity: 0.65;
}

[data-theme=dark] body .doc-article .doc-toc-embed,
[data-theme=dark] body .ql-editor .doc-toc-embed {
  background: var(--color-bg, #161b22) !important;
  border-color: var(--color-border, #30363d) !important;
}
[data-theme=dark] body .doc-article .doc-toc-embed__header,
[data-theme=dark] body .ql-editor .doc-toc-embed__header {
  border-bottom-color: var(--color-border, #30363d) !important;
  color: var(--color-text-muted, #8b949e) !important;
}
[data-theme=dark] body .doc-article .doc-toc-embed__header svg,
[data-theme=dark] body .ql-editor .doc-toc-embed__header svg {
  color: #58a6ff !important;
}
[data-theme=dark] body .doc-article .doc-toc-embed .doc-toc-embed__item a,
[data-theme=dark] body .ql-editor .doc-toc-embed .doc-toc-embed__item a {
  color: var(--color-text, #c9d1d9) !important;
}
[data-theme=dark] body .doc-article .doc-toc-embed .doc-toc-embed__item a:hover,
[data-theme=dark] body .ql-editor .doc-toc-embed .doc-toc-embed__item a:hover {
  background: rgba(56, 139, 253, 0.12) !important;
  color: #79c0ff !important;
}
[data-theme=dark] body .doc-article .doc-toc-embed .doc-toc-embed__item--h2 a::before, [data-theme=dark] body .doc-article .doc-toc-embed .doc-toc-embed__item--h3 a::before, [data-theme=dark] body .doc-article .doc-toc-embed .doc-toc-embed__item--h4 a::before,
[data-theme=dark] body .ql-editor .doc-toc-embed .doc-toc-embed__item--h2 a::before,
[data-theme=dark] body .ql-editor .doc-toc-embed .doc-toc-embed__item--h3 a::before,
[data-theme=dark] body .ql-editor .doc-toc-embed .doc-toc-embed__item--h4 a::before {
  color: #58a6ff !important;
}

.doc-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--color-text-muted);
}
.doc-breadcrumbs a {
  color: inherit;
  text-decoration: none;
}
.doc-breadcrumbs a:hover {
  color: var(--color-primary-strong);
}
.doc-breadcrumbs__sep {
  opacity: 0.5;
}
.doc-breadcrumbs__current {
  color: var(--color-text);
  font-weight: 500;
}

.doc-page {
  max-width: 1400px;
}
.doc-page__header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.doc-page__icon-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background-color 0.15s ease;
}
.doc-page__icon-wrap:hover {
  background-color: var(--color-bg-hover);
}
.doc-page__icon-input {
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  border: 1px solid transparent;
  background: transparent;
  font-size: 28px;
  line-height: 44px;
  text-align: center;
  cursor: pointer;
  border-radius: 8px;
  outline: none;
  box-shadow: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.doc-page__icon-input[readonly] {
  caret-color: transparent;
  cursor: pointer;
}
.doc-page__icon-input:hover {
  background-color: var(--color-bg-hover);
  border-color: var(--color-border);
}
.doc-page__icon-input:focus {
  background-color: var(--color-surface);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-tint);
}
.doc-page__icon-static {
  width: 44px;
  height: 44px;
  font-size: 28px;
  line-height: 44px;
  text-align: center;
  user-select: none;
}
.doc-page__title-wrap {
  flex: 1;
  min-width: 250px;
  display: flex;
  align-items: center;
}
.doc-page__title {
  width: 100%;
  border: none;
  background: none;
  color: var(--color-text);
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 700;
  line-height: 1.25;
  padding: 4px 0;
  margin: 0;
}
.doc-page__title:focus {
  outline: none;
}
.doc-page__title::placeholder {
  color: var(--color-text-muted);
  opacity: 0.6;
}
.doc-page__title--static {
  margin: 0;
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 700;
  line-height: 1.25;
}
.doc-page input.doc-page__title {
  box-sizing: border-box;
  width: calc(100% + 13px);
  margin-left: -13px;
  padding: 2px 12px;
  font-family: inherit;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.doc-page input.doc-page__title:hover {
  border-color: color-mix(in srgb, var(--color-primary) 45%, var(--color-border));
}
.doc-page input.doc-page__title:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.doc-page__byline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0;
  color: var(--color-text-muted);
  font-size: 13px;
  text-decoration: none;
}
.doc-page__byline:hover .doc-page__byline-name {
  text-decoration: underline;
}
.doc-page__byline-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}
.doc-page__byline-avatar--initial {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
}
.doc-page__byline-name {
  color: var(--color-text);
  font-weight: 500;
}
.doc-page__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
  margin-top: 4px;
}
.doc-page__status {
  font-size: 12px;
  color: var(--color-text-muted);
}
.doc-page__status--ok {
  color: var(--color-success);
}
.doc-page__status--error {
  color: var(--color-danger);
  font-weight: 600;
}
.doc-page__meta {
  margin: 8px 0 16px;
  font-size: 12px;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.doc-page__editor {
  min-height: 60vh;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0 0 8px 8px;
  display: flex;
  flex-direction: column;
}
.doc-page__editor > .ql-editor {
  flex: 1 1 auto;
}
.doc-page__content {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 20px;
  min-height: 40vh;
}
.doc-page__empty {
  color: var(--color-text-muted);
}

.callout {
  position: relative;
  padding: 14px 18px 14px 44px;
  margin: 16px 0;
  border-radius: 8px;
  border-left: 4px solid var(--callout-border, #0969da);
  background-color: var(--callout-bg, rgba(9, 105, 218, 0.08));
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.6;
  transition: background-color 0.2s, border-color 0.2s;
}
.callout::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 15px;
  width: 20px;
  height: 20px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
.callout--info {
  --callout-border: #0969da;
  --callout-bg: rgba(9, 105, 218, 0.08);
}
.callout--info::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230969da'%3E%3Cpath d='M8 1.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13zM0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8zm6.5-.25A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75zM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2z'/%3E%3C/svg%3E");
}
.callout--warning {
  --callout-border: #9a6700;
  --callout-bg: rgba(212, 167, 44, 0.12);
}
.callout--warning::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%239a6700'%3E%3Cpath d='M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575L6.457 1.047zM8 5a.75.75 0 0 0-.75.75v3.5a.75.75 0 0 0 1.5 0v-3.5A.75.75 0 0 0 8 5zm0 8a1 1 0 1 0 0-2 1 1 0 0 0 0 2z'/%3E%3C/svg%3E");
}
.callout--success {
  --callout-border: #1a7f37;
  --callout-bg: rgba(46, 160, 67, 0.1);
}
.callout--success::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%231a7f37'%3E%3Cpath d='M8 16A8 8 0 1 1 8 0a8 8 0 0 1 0 16zm3.78-9.72a.75.75 0 0 0-1.06-1.06L6.75 9.19 5.28 7.72a.75.75 0 0 0-1.06 1.06l2 2a.75.75 0 0 0 1.06 0l4.5-4.5z'/%3E%3C/svg%3E");
}
.callout--danger {
  --callout-border: #cf222e;
  --callout-bg: rgba(207, 34, 46, 0.1);
}
.callout--danger::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23cf222e'%3E%3Cpath d='M2.343 13.657A8 8 0 1 1 13.657 2.343 8 8 0 0 1 2.343 13.657zM6.03 4.97a.75.75 0 0 0-1.06 1.06L6.94 8 4.97 9.97a.75.75 0 1 0 1.06 1.06L8 9.06l1.97 1.97a.75.75 0 0 0 1.06-1.06L9.06 8l1.97-1.97a.75.75 0 1 0-1.06-1.06L8 6.94 6.03 4.97z'/%3E%3C/svg%3E");
}
.callout--idea {
  --callout-border: #8250df;
  --callout-bg: rgba(130, 80, 223, 0.08);
}
.callout--idea::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%238250df'%3E%3Cpath d='M8 1a5 5 0 0 0-3 9v1.5a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1V10a5 5 0 0 0-3-9z'/%3E%3Crect x='6' y='13.4' width='4' height='1.3' rx='0.6'/%3E%3C/svg%3E");
}
.callout--example {
  --callout-border: #0f8794;
  --callout-bg: rgba(15, 135, 148, 0.08);
}
.callout--example::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Ccircle cx='6.5' cy='6.5' r='4.5' stroke='%230f8794' stroke-width='1.6'/%3E%3Cline x1='9.8' y1='9.8' x2='14' y2='14' stroke='%230f8794' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}
.callout--summary {
  --callout-border: #57606a;
  --callout-bg: rgba(87, 96, 106, 0.05);
  border: 1.5px solid var(--callout-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.callout--summary::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2357606a'%3E%3Crect x='2' y='3' width='12' height='1.6' rx='0.8'/%3E%3Crect x='2' y='7.2' width='12' height='1.6' rx='0.8'/%3E%3Crect x='2' y='11.4' width='8' height='1.6' rx='0.8'/%3E%3C/svg%3E");
}

[data-theme=dark] .callout--info {
  --callout-border: #2f81f7;
  --callout-bg: rgba(56, 139, 253, 0.15);
}
[data-theme=dark] .callout--warning {
  --callout-border: #d29922;
  --callout-bg: rgba(187, 128, 9, 0.18);
}
[data-theme=dark] .callout--success {
  --callout-border: #3fb950;
  --callout-bg: rgba(46, 160, 67, 0.18);
}
[data-theme=dark] .callout--danger {
  --callout-border: #f85149;
  --callout-bg: rgba(248, 81, 73, 0.18);
}
[data-theme=dark] .callout--idea {
  --callout-border: #a371f7;
  --callout-bg: rgba(163, 113, 247, 0.16);
}
[data-theme=dark] .callout--example {
  --callout-border: #39c5cf;
  --callout-bg: rgba(57, 197, 207, 0.14);
}
[data-theme=dark] .callout--summary {
  --callout-border: #768390;
  --callout-bg: rgba(118, 131, 144, 0.12);
}

.doc-link-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  margin: 0 2px;
  border-radius: 6px;
  background-color: var(--color-bg-hover);
  border: 1px solid var(--color-border);
  color: var(--color-primary-strong);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92em;
  vertical-align: baseline;
  transition: all 0.15s ease;
}
.doc-link-chip:hover {
  background-color: var(--color-primary-tint);
  border-color: var(--color-primary);
  text-decoration: none;
}
.doc-link-chip__icon {
  font-size: 1.05em;
  line-height: 1;
}

.doc-link-picker {
  position: absolute;
  z-index: 1000;
  width: 320px;
  max-height: 280px;
  overflow-y: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
}
.doc-link-picker__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  color: var(--color-text);
  transition: background 0.1s;
}
.doc-link-picker__item:hover, .doc-link-picker__item.is-selected {
  background: var(--color-primary-tint);
  color: var(--color-primary-strong);
}
.doc-link-picker__title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.doc-link-picker__space {
  font-size: 12px;
  color: var(--color-text-muted);
}

.doc-hover-card {
  position: absolute;
  z-index: 1200;
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px) scale(0.98);
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.18s;
}
.doc-hover-card.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.doc-hover-card[data-placement=bottom] {
  transform: translateY(-6px) scale(0.98);
}
.doc-hover-card[data-placement=bottom].is-visible {
  transform: translateY(0) scale(1);
}
.doc-hover-card__inner {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 10px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.doc-hover-card__inner--error {
  padding: 12px 14px;
}
.doc-hover-card__header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.35;
  transition: color 0.15s ease;
}
.doc-hover-card__header:hover {
  color: var(--color-primary-strong);
}
.doc-hover-card__icon {
  font-size: 16px;
  line-height: 1.2;
  flex-shrink: 0;
}
.doc-hover-card__title {
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}
.doc-hover-card__space {
  margin-top: -4px;
}
.doc-hover-card__excerpt {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--color-text-muted);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  word-break: break-word;
}
.doc-hover-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--color-border);
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--color-text-muted);
}
.doc-hover-card__author {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.doc-hover-card__author-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.doc-hover-card__date {
  flex-shrink: 0;
  opacity: 0.85;
}
.doc-hover-card__skeleton {
  background: linear-gradient(90deg, var(--color-bg-hover) 25%, var(--color-border) 50%, var(--color-bg-hover) 75%);
  background-size: 200% 100%;
  animation: doc-skeleton-pulse 1.4s ease-in-out infinite;
  border-radius: 4px;
}
.doc-hover-card__skeleton--icon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  flex-shrink: 0;
}
.doc-hover-card__skeleton--title {
  height: 16px;
  flex: 1;
}
.doc-hover-card__skeleton--text {
  height: 12px;
  width: 100%;
  margin-bottom: 6px;
}
.doc-hover-card__skeleton--short {
  width: 65%;
  margin-bottom: 0;
}

@keyframes doc-skeleton-pulse {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
.code-copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  font-size: 12px;
  font-family: inherit;
  font-weight: 500;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background-color 0.15s ease, color 0.15s ease;
  z-index: 10;
}
pre:hover .code-copy-btn, .ql-syntax:hover .code-copy-btn {
  opacity: 1;
}
.code-copy-btn:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}
.code-copy-btn.is-copied {
  opacity: 1;
  color: var(--color-success);
  border-color: var(--color-success);
  background: rgba(46, 160, 67, 0.1);
}

.doc-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}
.doc-status-badge--published {
  background: rgba(46, 160, 67, 0.12);
  color: #1a7f37;
  border: 1px solid rgba(46, 160, 67, 0.25);
}
.doc-status-badge--draft {
  background: rgba(101, 109, 118, 0.12);
  color: #656d76;
  border: 1px solid rgba(101, 109, 118, 0.25);
}
.doc-status-badge--review {
  background: rgba(212, 167, 44, 0.15);
  color: #9a6700;
  border: 1px solid rgba(212, 167, 44, 0.3);
}
.doc-status-badge--outdated {
  background: rgba(207, 34, 46, 0.12);
  color: #cf222e;
  border: 1px solid rgba(207, 34, 46, 0.25);
}

.doc-review-date-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  background: var(--color-bg-muted, rgba(101, 109, 118, 0.12));
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  transition: all 0.15s ease;
}
.doc-review-date-badge--verified {
  background: rgba(46, 160, 67, 0.12);
  color: #1a7f37;
  border-color: rgba(46, 160, 67, 0.25);
}
.doc-review-date-badge--overdue {
  background: rgba(207, 34, 46, 0.12);
  color: #cf222e;
  border-color: rgba(207, 34, 46, 0.25);
}

.doc-verify-freshness-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
  border: 1px dashed var(--color-border);
  background: transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}
.doc-verify-freshness-btn:hover {
  background: rgba(46, 160, 67, 0.1);
  color: #1a7f37;
  border-color: rgba(46, 160, 67, 0.3);
  border-style: solid;
}

.doc-freshness-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 10px;
}
.doc-freshness-banner--overdue {
  background: rgba(207, 34, 46, 0.08);
  border: 1px solid rgba(207, 34, 46, 0.25);
  color: #cf222e;
}
.doc-freshness-banner__icon {
  flex-shrink: 0;
  margin-top: 1px;
}
.doc-freshness-banner__title {
  font-weight: 600;
  font-size: 13.5px;
  margin-bottom: 2px;
}
.doc-freshness-banner__sub {
  font-size: 12.5px;
  color: var(--color-text-muted);
}

.doc-meta-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 8px 0 18px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--color-text-muted);
}
.doc-meta-strip__group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.doc-meta-strip__divider {
  display: inline-block;
  width: 1px;
  height: 14px;
  background: var(--color-border);
  flex-shrink: 0;
  opacity: 0.8;
}
@media (max-width: 640px) {
  .doc-meta-strip__divider {
    display: none;
  }
}

.doc-meta-author {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.15s ease;
}
.doc-meta-author:hover {
  color: var(--color-primary-strong);
  text-decoration: underline;
}
.doc-meta-author__avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-bg-hover);
  flex-shrink: 0;
}
.doc-meta-author__avatar--initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #5865F2;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.doc-meta-author__name {
  font-weight: 600;
  font-size: 13px;
  color: var(--color-text);
}

.doc-meta-date {
  color: var(--color-text-muted);
  font-size: 12.5px;
}

.doc-meta-version {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
  padding: 1px 7px;
  background: var(--color-bg, #f6f8fa);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
}
.doc-meta-version svg {
  opacity: 0.7;
}
.doc-meta-version:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
  border-color: var(--color-border-hover, var(--color-border));
  text-decoration: none;
}

.doc-private-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: #cf222e;
  background: rgba(207, 34, 46, 0.08);
  border: 1px solid rgba(207, 34, 46, 0.2);
  border-radius: 6px;
  padding: 1px 6px;
}

.doc-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 8px 0 16px 0;
}

.doc-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.doc-tag-chip:hover {
  background: var(--color-primary-tint);
  color: var(--color-primary-strong);
  border-color: var(--color-primary);
}
.doc-tag-chip__remove {
  cursor: pointer;
  font-size: 12px;
  margin-left: 2px;
  opacity: 0.6;
}
.doc-tag-chip__remove:hover {
  opacity: 1;
  color: var(--color-danger);
}

.doc-tag-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--color-text-muted);
  border: 1px dashed var(--color-border);
  background: transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}
.doc-tag-add-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-strong);
}

.doc-verification-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  margin: 16px 0 20px 0;
  border-radius: 8px;
  border: 1px solid transparent;
}
.doc-verification-banner--pending {
  background-color: rgba(212, 167, 44, 0.12);
  border-color: rgba(212, 167, 44, 0.35);
  color: #7a5200;
}
.doc-verification-banner--acknowledged {
  background-color: rgba(46, 160, 67, 0.1);
  border-color: rgba(46, 160, 67, 0.25);
  color: #1a7f37;
}
.doc-verification-banner__title {
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.doc-verification-banner__sub {
  font-size: 13px;
  opacity: 0.85;
  margin-top: 2px;
}

.history-layout {
  display: flex;
  align-items: stretch;
  gap: 16px;
  height: calc(100vh - 150px);
  margin-top: 20px;
}

.history-sidebar {
  width: 350px;
  flex-shrink: 0;
  overflow-y: auto;
  padding: 2px 10px 16px 2px;
}

.history-content {
  flex: 1;
  min-width: 0;
  display: flex;
}

.diff-viewer {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border-muted);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.diff-viewer__header {
  flex-shrink: 0;
  padding: 14px 20px;
  font-weight: 500;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border-muted);
}
.diff-viewer__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 5px 20px;
}
.diff-viewer .diff-ins {
  background-color: color-mix(in srgb, var(--color-success) 16%, transparent);
  color: inherit;
  text-decoration: none;
}
.diff-viewer .diff-del {
  background-color: color-mix(in srgb, var(--color-danger) 14%, transparent);
  color: var(--color-danger);
  text-decoration: line-through;
}

.version-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.version-list__item {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color 0.12s ease;
}
.version-list__item:hover {
  background-color: var(--color-bg-hover);
}
.version-list__item.is-active {
  background-color: var(--color-primary-tint);
}
.version-list__top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.version-list__number {
  font-weight: 600;
  font-size: 13.5px;
  white-space: nowrap;
}
.version-list__chip {
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  background: var(--color-primary-tint);
  color: var(--color-primary-strong);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.version-list__title {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.version-list__meta {
  margin-top: 3px;
  font-size: 12px;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.version-list__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.version-list__action {
  padding: 4px 8px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.version-list__action:hover {
  background-color: var(--color-bg);
  color: var(--color-text);
}
.version-list__action:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

@media (hover: hover) and (pointer: fine) {
  .version-list__actions {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.12s ease, visibility 0.12s ease;
  }
  .version-list__item:hover .version-list__actions,
  .version-list__item:focus-within .version-list__actions,
  .version-list__item.is-active .version-list__actions {
    opacity: 1;
    visibility: visible;
  }
}
.search-form {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  max-width: 640px;
}
.search-form .form-input {
  flex: 1;
}

.search-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -8px 0 18px;
  max-width: 640px;
}
.search-filters .form-input {
  flex: 1;
  min-width: 140px;
}

.search-results {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 760px;
}
.search-results__count {
  color: var(--color-text-muted);
  font-size: 13px;
  margin-bottom: 10px;
}
.search-results__item {
  padding: 14px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}
.search-results__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-primary-strong);
  text-decoration: none;
}
.search-results__title:hover {
  text-decoration: underline;
}
.search-results__space {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 2px;
}
.search-results__snippet {
  margin: 8px 0 6px;
  line-height: 1.5;
}
.search-results__snippet mark {
  background: var(--color-primary-light);
  color: inherit;
  padding: 0 2px;
  border-radius: 3px;
}
.search-results__meta {
  font-size: 12px;
  color: var(--color-text-muted);
}

.perm-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0;
}
.perm-list__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
}
.perm-list__name {
  font-weight: 500;
}
.perm-list__source {
  margin-left: auto;
  font-size: 12px;
  color: var(--color-text-muted);
}
.perm-list__empty {
  color: var(--color-text-muted);
  font-size: 13px;
}

.perm-dialog {
  width: 620px;
  max-height: 90vh;
  overflow-y: auto;
}
.perm-dialog .perm-list {
  max-height: 40vh;
  overflow-y: auto;
  margin: 0 0 12px;
}
.perm-dialog .perm-list__item {
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--color-bg);
}
.perm-dialog .perm-list__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 10px;
  border-radius: var(--radius-md);
  background: var(--color-bg);
}
.perm-dialog .space-perm-role-select {
  flex: none;
}
.perm-dialog .perm-row__act {
  flex: none;
}

.perm-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.perm-head__badge {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--color-primary-tint);
  color: var(--color-primary-strong);
}
.perm-head__badge .doc-icon {
  width: 20px;
  height: 20px;
}
.perm-head h2 {
  margin: 0;
}
.perm-head__sub {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--color-text-muted);
}

.perm-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.perm-block__title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 2px;
  font-size: 13px;
  font-weight: 600;
}
.perm-block__title .doc-icon {
  width: 15px;
  height: 15px;
  color: var(--color-text-muted);
}

.perm-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--color-bg);
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
.perm-card:hover {
  background: var(--color-bg-hover);
}
.perm-card__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.perm-card__switch {
  flex: none;
  position: relative;
  width: 34px;
  height: 20px;
  margin-top: 1px;
  border-radius: var(--radius-pill);
  background: var(--color-border);
  transition: background-color 0.15s ease;
}
.perm-card__switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
}
.perm-card__input:checked + .perm-card__switch {
  background: var(--color-primary);
}
.perm-card__input:checked + .perm-card__switch::after {
  transform: translateX(14px);
}
.perm-card__input:focus-visible + .perm-card__switch {
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.perm-card__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.perm-card__title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
}
.perm-card__title .doc-icon {
  width: 15px;
  height: 15px;
  color: var(--color-text-muted);
}
.perm-card__hint {
  margin: 0;
  font-size: 12px;
}

.perm-linkbar {
  gap: 8px;
}
.perm-linkbar .form-input {
  flex: 1;
  font-size: 13px;
}

.perm-linkset {
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--color-bg);
}
.perm-linkset__row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.perm-linkset__label {
  flex: none;
  font-size: 13px;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.perm-linkset .form-select {
  flex: 1;
}
.perm-linkset__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.perm-row__avatar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1px solid var(--color-border-muted);
  color: var(--color-text-muted);
}
.perm-row__avatar .doc-icon {
  width: 15px;
  height: 15px;
}
.perm-row__avatar--denied {
  color: var(--color-danger);
  border-color: color-mix(in srgb, var(--color-danger) 30%, transparent);
}

.perm-row__main {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}

.perm-row__name {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 500;
}

.perm-row__kind {
  flex: none;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: var(--color-bg-muted);
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-muted);
}

.perm-row__source {
  font-size: 12px;
  color: var(--color-text-muted);
}

.perm-list__role {
  flex: none;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--color-primary-tint);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-primary-strong);
  white-space: nowrap;
}

.perm-denials {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-danger) 5%, var(--color-surface));
}
.perm-denials__title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-danger);
}
.perm-denials__title .doc-icon {
  width: 15px;
  height: 15px;
}
.perm-denials .perm-list {
  margin: 0 0 10px;
  max-height: 30vh;
}
.perm-denials .perm-list__item {
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--color-surface);
}
.perm-denials .perm-list__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 10px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.perm-form--deny {
  align-items: center;
}

.perm-form__scope {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--color-text);
  white-space: nowrap;
  cursor: pointer;
}
.perm-form__scope input {
  margin: 0;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.doc-breadcrumbs__restricted {
  color: var(--color-text-muted);
  cursor: default;
}

.space-perm-role-select {
  width: auto;
  min-width: 135px;
  height: 32px;
  font-size: 13px;
  font-weight: 500;
  padding: 2px 28px 2px 10px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  background-color: var(--color-bg-hover);
  color: var(--color-text);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.space-perm-role-select:hover {
  border-color: var(--color-primary);
  background-color: var(--color-surface);
}
.space-perm-role-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(9, 105, 218, 0.15);
  outline: none;
}
.space-perm-role-select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.perm-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.perm-form .form-select {
  flex: 1;
  min-width: 130px;
}
.perm-form .form-input {
  flex: 1;
  min-width: 180px;
}

.perm-form__subject {
  flex: 2;
  min-width: 200px;
}

.subject-picker {
  position: relative;
}
.subject-picker__icon {
  position: absolute;
  top: 50%;
  left: 10px;
  display: flex;
  color: var(--color-text-muted);
  transform: translateY(-50%);
  pointer-events: none;
}
.subject-picker__icon .doc-icon {
  width: 16px;
  height: 16px;
}
.subject-picker .subject-picker__input {
  padding-left: 34px;
  padding-right: 32px;
}
.subject-picker.has-value .subject-picker__input {
  font-weight: 500;
}
.subject-picker__clear {
  position: absolute;
  top: 50%;
  right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--color-text-muted);
  transform: translateY(-50%);
  cursor: pointer;
}
.subject-picker__clear:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}
.subject-picker__clear[hidden] {
  display: none;
}
.subject-picker__clear .doc-icon {
  width: 14px;
  height: 14px;
}
.subject-picker__list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  min-width: min(340px, 100vw - 48px);
  max-height: 280px;
  overflow-y: auto;
  padding: 4px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(16, 24, 40, 0.04);
}
.subject-picker__list[hidden] {
  display: none;
}
.subject-picker__section {
  padding: 8px 8px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.subject-picker__option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.subject-picker__option.is-active {
  background: var(--color-bg-hover);
}
.subject-picker__option.is-selected .subject-picker__label {
  color: var(--color-primary);
}
.subject-picker__avatar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-primary-tint);
  color: var(--color-primary);
  font-size: 11px;
  font-weight: 600;
}
.subject-picker__avatar--group {
  background: var(--color-bg-hover);
  color: var(--color-text-muted);
}
.subject-picker__avatar .doc-icon {
  width: 15px;
  height: 15px;
}
.subject-picker__text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.subject-picker__label, .subject-picker__hint {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.subject-picker__label {
  font-size: 13.5px;
  color: var(--color-text);
}
.subject-picker__hint {
  min-width: 0;
  font-size: 12px;
  color: var(--color-text-muted);
}
.subject-picker__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.subject-picker__note {
  flex: none;
  padding: 0 7px;
  border-radius: var(--radius-pill);
  background: var(--color-primary-tint);
  font-size: 11.5px;
  color: var(--color-primary);
}
.subject-picker__empty {
  padding: 14px 10px;
  font-size: 13px;
  text-align: center;
  color: var(--color-text-muted);
}

.emoji-picker {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 2px;
  margin-bottom: 8px;
}
@media (max-width: 520px) {
  .emoji-picker {
    grid-template-columns: repeat(8, 1fr);
  }
}
.emoji-picker__item {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: none;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.emoji-picker__item:hover {
  background: var(--color-bg-hover);
}
.emoji-picker__item.is-selected {
  border-color: var(--color-primary);
  background: var(--color-primary-tint);
}

.space-dialog {
  width: 480px;
}

.doc-private-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--color-primary-tint);
  color: var(--color-primary-strong);
  font-size: 11px;
  font-weight: 600;
}

.doc-tree__lock {
  display: inline-flex;
  flex-shrink: 0;
  margin-left: 2px;
  color: var(--color-text-muted);
}
.doc-tree__lock svg {
  width: 11px;
  height: 11px;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 520px;
}
.settings-form .btn {
  align-self: flex-start;
}

.role-perms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin: 12px 0 16px;
}
.role-perms__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  cursor: pointer;
}
.role-perms__item:hover {
  border-color: var(--color-primary);
}

.log-view {
  max-height: 60vh;
  overflow: auto;
  padding: 14px 16px;
  background: var(--color-bg-muted);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.audit__changes code {
  font-size: 11px;
  color: var(--color-text-muted);
  word-break: break-all;
}

.data-table__actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  white-space: nowrap;
}

.comment-mark {
  background: var(--color-primary-light);
  border-bottom: 2px solid var(--color-primary);
  cursor: pointer;
}

.comment-bubble {
  position: absolute;
  z-index: 800;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border: none;
  border-radius: 8px;
  background: var(--color-text);
  color: var(--color-surface);
  font-size: 12px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}
.comment-bubble[hidden] {
  display: none;
}

.comments-count {
  display: inline-block;
  min-width: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-size: 11px;
}
.comments-count:empty {
  display: none;
}

body.has-comments .workspace__main {
  padding-right: 356px;
}
@media (max-width: 900px) {
  body.has-comments .workspace__main {
    padding-right: 28px;
  }
}

.comments-panel {
  position: fixed;
  top: 52px;
  right: -340px;
  bottom: 0;
  z-index: 400;
  width: 340px;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border-left: 1px solid var(--color-border);
  transition: right 0.2s ease;
}
.comments-panel.is-open {
  right: 0;
}
@media (max-width: 640px) {
  .comments-panel {
    width: 100%;
    right: -100%;
  }
}
.comments-panel__head {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--color-border);
}
.comments-panel__head h2 {
  font-size: 15px;
}
.comments-panel__head .field__hint {
  margin: 4px 0 0;
}
.comments-panel__list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comments__empty {
  color: var(--color-text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.comment {
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg);
  cursor: pointer;
}
.comment:hover {
  border-color: var(--color-primary);
}
.comment.is-active {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.comment__quote {
  margin: 0 0 8px;
  padding-left: 8px;
  border-left: 2px solid var(--color-primary);
  color: var(--color-text-muted);
  font-size: 12px;
  line-height: 1.4;
}
.comment__lost {
  margin: 0 0 8px;
  font-size: 11px;
  color: var(--color-danger);
}
.comment__head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.comment__author {
  font-size: 12px;
  font-weight: 600;
}
.comment__date {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-left: auto;
}
.comment__body {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.comment__reply {
  margin-top: 10px;
  padding-top: 8px;
  padding-left: 10px;
  border-top: 1px solid var(--color-border-muted);
  border-left: 2px solid var(--color-border);
}
.comment__actions {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.header__user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header__user-name {
  font-size: 13px;
  color: var(--color-text-muted);
  text-decoration: none;
}
.header__user-name:hover {
  color: var(--color-text);
}
@media (max-width: 640px) {
  .header__user-name {
    display: none;
  }
}

body.no-text-select .doc-article,
body.no-text-select .doc-article * {
  -webkit-user-select: none;
  user-select: none;
}

.code-copy-btn .doc-icon {
  width: 12px;
  height: 12px;
}

.comment-bubble .doc-icon {
  width: 14px;
  height: 14px;
}

.doc-toc-embed__header .doc-icon {
  width: 14px;
  height: 14px;
}

:root[data-ui-version=modern] .doc-tree__row {
  transition: background-color 0.12s ease;
  background-image: repeating-linear-gradient(to right, var(--color-border-muted) 0, var(--color-border-muted) 1px, transparent 1px, transparent 18px);
}
:root[data-ui-version=modern] .doc-tree__mention-badge {
  border-radius: var(--radius-pill);
  background: var(--color-primary);
  box-shadow: none;
}
:root[data-ui-version=modern] .doc-tree__lock {
  color: var(--color-text-subtle);
}
:root[data-ui-version=modern] .doc-tree-context-menu {
  border-color: transparent;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hover);
}
:root[data-ui-version=modern] .space-toc__link {
  border-color: transparent;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}
:root[data-ui-version=modern] .space-toc__link:hover {
  border-color: transparent;
  background: var(--color-bg-hover);
}
:root[data-ui-version=modern] .search-results__item {
  border-color: transparent;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.15s ease;
}
:root[data-ui-version=modern] .search-results__item:hover {
  box-shadow: var(--shadow-hover);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 14px;
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}
.topbar__burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 7px;
  background: none;
  color: var(--color-text-muted);
  cursor: pointer;
}
@media (max-width: 1023px) {
  .topbar__burger {
    display: flex;
  }
}
.topbar__logo {
  display: flex;
  align-items: baseline;
  gap: 1px;
  margin-right: 6px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
}
.topbar__logo span {
  background: linear-gradient(135deg, var(--color-primary-strong) 0%, var(--color-primary-strong-hover) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.topbar__search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 200px;
  max-width: 380px;
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg);
  color: var(--color-text-muted);
  font-size: 13px;
  cursor: pointer;
}
.topbar__search:hover {
  border-color: var(--color-primary);
}
.topbar__search-text {
  flex: 1;
  text-align: left;
}
.topbar__search-kbd {
  padding: 1px 5px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 11px;
}
.topbar__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.topbar__smileforce-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  margin-right: 4px;
  border-radius: 8px;
  border: 1px solid rgba(59, 130, 246, 0.25);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, color-mix(in srgb, var(--color-primary) 12%, transparent) 100%);
  color: var(--color-text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}
.topbar__smileforce-btn svg {
  color: var(--color-primary-strong);
  transition: transform 0.15s ease;
}
.topbar__smileforce-btn:hover {
  border-color: var(--color-primary, #3b82f6);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.16) 0%, color-mix(in srgb, var(--color-primary) 22%, transparent) 100%);
  transform: translateY(-1px);
  color: var(--color-primary-strong);
}
.topbar__smileforce-btn:hover svg {
  transform: translate(1px, -1px);
}
.topbar__requests-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  margin-right: 4px;
  border-radius: var(--radius-pill);
  background: var(--color-primary-strong);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.topbar__requests-btn .doc-icon {
  width: 16px;
  height: 16px;
}
.topbar__requests-btn:hover {
  background: var(--color-primary-strong-hover);
  box-shadow: var(--shadow-hover);
  color: #fff;
  transform: translateY(-1px);
}
.topbar__requests-btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}
.topbar__requests-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.topbar__requests-btn.is-active {
  box-shadow: 0 0 0 3px var(--color-primary-light), var(--shadow-sm);
}
.topbar__requests-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--color-primary-strong);
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.topbar__icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  padding: 0;
  border: none;
  border-radius: 7px;
  background: none;
  color: var(--color-text-muted);
  cursor: pointer;
}
.topbar__icon-btn:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}
.topbar__icon-btn.is-active {
  background: var(--color-primary-tint);
  color: var(--color-primary-strong);
}
.topbar__notifications-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.topbar__badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 10px;
  background: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  box-shadow: 0 0 0 2px var(--color-surface);
}
.topbar__user {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 8px 4px 2px;
  border-radius: 7px;
  color: inherit;
  text-decoration: none;
  transition: background-color 0.12s ease;
}
.topbar__user:hover {
  background: var(--color-bg-hover);
}
.topbar__user-name {
  font-size: 13px;
  color: var(--color-text);
}

.notifications-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 350px;
  max-height: 460px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.notifications-popover__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}
.notifications-popover__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}
.notifications-popover__read-all {
  background: none;
  border: none;
  color: var(--color-primary-strong);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}
.notifications-popover__read-all:hover {
  text-decoration: underline;
}
.notifications-popover__list {
  overflow-y: auto;
  max-height: 380px;
  display: flex;
  flex-direction: column;
}
.notifications-popover__empty {
  padding: 24px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 13px;
}
.notifications-popover__foot {
  flex-shrink: 0;
  border-top: 1px solid var(--color-border);
  padding: 9px 14px;
  text-align: center;
  background: var(--color-surface);
}
.notifications-popover__foot a {
  font-size: 12px;
  color: var(--color-primary-strong);
  text-decoration: none;
}
.notifications-popover__foot a:hover {
  text-decoration: underline;
}

.notifications-item {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border-subtle, rgba(0, 0, 0, 0.05));
  transition: background 0.12s;
}
.notifications-item:hover {
  background: var(--color-bg-hover);
}
.notifications-item.is-unread {
  background: var(--color-primary-tint, color-mix(in srgb, var(--color-primary) 8%, transparent));
}
.notifications-item__icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}
.notifications-item__content {
  flex: 1;
  min-width: 0;
}
.notifications-item__text {
  font-size: 13px;
  line-height: 1.4;
  word-break: break-word;
}
.notifications-item__snippet {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--color-bg);
  padding: 2px 6px;
  border-radius: 4px;
  border-left: 2px solid var(--color-primary);
}
.notifications-item__time {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 4px;
}
.notifications-item__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary-strong);
  flex-shrink: 0;
  align-self: center;
}

.doc-tree__mention-badge {
  margin-left: auto;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--color-primary-strong);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 3px color-mix(in srgb, var(--color-primary) 40%, transparent);
  user-select: none;
}

.workspace {
  display: flex;
  min-height: calc(100vh - 52px);
}

.space-nav {
  width: var(--sidebar-width, 280px);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 12px 10px 12px;
  background: var(--color-surface);
  height: calc(100vh - 52px - var(--impersonation-offset, 0px));
  position: sticky;
  top: 52px;
  overflow-y: auto;
  overflow-x: hidden;
}
@media (max-width: 1023px) {
  .space-nav {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1100;
    width: min(320px, 86vw);
    height: 100dvh;
    padding-top: calc(12px + env(safe-area-inset-top));
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    padding-left: calc(10px + env(safe-area-inset-left));
    transform: translateX(-105%);
    visibility: hidden;
    transition: transform 0.2s ease, visibility 0s linear 0.2s;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
  }
  .space-nav.is-open {
    transform: none;
    visibility: visible;
    transition: transform 0.2s ease, visibility 0s;
  }
}
@media (max-width: 1023px) and (prefers-reduced-motion: reduce) {
  .space-nav {
    transition: none;
  }
  .space-nav.is-open {
    transition: none;
  }
}
.space-nav .sidebar-resizer {
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  z-index: 10;
  touch-action: none;
}
.space-nav .sidebar-resizer::after {
  content: "";
  position: absolute;
  top: 0;
  right: 1px;
  width: 2px;
  height: 100%;
  background: transparent;
  transition: background-color 0.15s ease;
}
.space-nav .sidebar-resizer:hover::after, .space-nav .sidebar-resizer.is-resizing::after {
  background: var(--color-primary);
}
@media (max-width: 1023px) {
  .space-nav .sidebar-resizer {
    display: none;
  }
}
.space-nav__head {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 6px 10px;
}
.space-nav__title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
}
.space-nav__title-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 7px;
  background: var(--color-bg-muted);
  color: var(--color-text-muted);
  font-size: 14px;
}
.space-nav__title-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.space-nav__icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
}
.space-nav__icon-btn:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}
.space-nav__icon-btn.is-active {
  background: var(--color-primary-tint);
  color: var(--color-primary-strong);
  box-shadow: inset 0 0 0 1.5px var(--color-primary);
}
.space-nav__section-hd--drop-target {
  outline: 2px dashed var(--color-primary);
  outline-offset: -2px;
  border-radius: 6px;
  background: var(--color-primary-tint);
}
.space-nav__footer {
  flex-shrink: 0;
}
.space-nav__quick {
  padding: 0 6px;
}
.space-nav__quick summary {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
  color: var(--color-primary-strong);
  font-size: 12px;
  cursor: pointer;
  list-style: none;
}
.space-nav__quick summary::-webkit-details-marker {
  display: none;
}
.space-nav__quick summary::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}
.space-nav__quick-empty {
  padding: 4px 0;
  font-size: 12px;
  color: var(--color-text-muted);
}
.space-nav__quick-list {
  list-style: none;
  margin: 4px 0 8px;
  padding: 0;
}
.space-nav__quick-list a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 6px;
  color: var(--color-text);
  text-decoration: none;
  font-size: 13px;
}
.space-nav__quick-list a:hover {
  background: var(--color-bg-hover);
}
.space-nav__head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 6px 8px;
}
.space-nav__back {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 6px 4px;
  padding: 5px 6px;
  border-radius: 6px;
  color: var(--color-text-muted);
  font-size: 12.5px;
  text-decoration: none;
}
.space-nav__back:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}
.space-nav__section-hd {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 6px 4px;
  font-size: 12px;
  color: var(--color-text-muted);
}
.space-nav__section-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}
.space-nav__icon-expand {
  display: none;
}
.space-nav__icon-collapse {
  display: block;
}
.space-nav #js-tree-toggle-all[data-state=collapsed] .space-nav__icon-expand {
  display: block;
}
.space-nav #js-tree-toggle-all[data-state=collapsed] .space-nav__icon-collapse {
  display: none;
}
.space-nav__tree {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 4px 8px 2px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}
.space-nav__tree::-webkit-scrollbar {
  width: 5px;
}
.space-nav__tree::-webkit-scrollbar-track {
  background: transparent;
}
.space-nav__tree::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}
.space-nav__tree::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}
.space-nav__footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 8px 4px 4px;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  z-index: 2;
}
.space-nav__footer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}
.space-nav__create {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px dashed var(--color-border);
  border-radius: 8px;
  background: var(--color-bg);
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.space-nav__create:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-strong);
  border-style: solid;
  background: var(--color-primary-tint);
}
.space-nav__move-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg);
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.space-nav__move-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-strong);
  background: var(--color-primary-tint);
}
.space-nav__move-btn.is-active, .space-nav__move-btn[data-active="1"] {
  background: var(--color-primary-tint);
  color: var(--color-primary-strong);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
  font-weight: 600;
}
.space-nav__spaces {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  list-style: none;
  margin: 0;
  padding: 2px 4px 8px 2px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}
.space-nav__spaces::-webkit-scrollbar {
  width: 5px;
}
.space-nav__spaces::-webkit-scrollbar-track {
  background: transparent;
}
.space-nav__spaces::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}
.space-nav__spaces::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}
.space-nav__spaces a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--color-text);
  text-decoration: none;
  font-size: 13px;
}
.space-nav__spaces a:hover {
  background: var(--color-bg-hover);
}

body.is-sidebar-resizing {
  cursor: col-resize;
  user-select: none;
}

.space-nav-backdrop {
  display: none;
}
@media (max-width: 1023px) {
  .space-nav-backdrop.is-visible {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1090;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(0, 0, 0, 0.4);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
}

.space-menu {
  position: relative;
}
.space-menu.is-open {
  z-index: 10001;
}
.space-menu__dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 30px;
  z-index: 1000;
  min-width: 210px;
  padding: 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.space-menu.is-open .space-menu__dropdown {
  display: block;
}
.space-menu__item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 7px 10px;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--color-text);
  font-size: 13px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.space-menu__item:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}
.space-menu__item:hover .space-menu__item-icon {
  opacity: 1;
  transform: scale(1.05);
}
.space-menu__item-icon {
  flex-shrink: 0;
  display: inline-flex;
  width: 15px;
  height: 15px;
  opacity: 0.75;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.space-menu__item-icon svg {
  width: 100%;
  height: 100%;
}
.space-menu__item-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-tree__root {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}

.workspace__main {
  flex: 1;
  min-width: 0;
  padding: 22px 28px 60px;
  background: var(--color-bg);
  transition: opacity 0.12s ease-out;
}
.workspace__main.is-loading {
  opacity: 0.55;
  pointer-events: none;
}
@media (max-width: 640px) {
  .workspace__main {
    padding: 16px 14px 40px;
  }
}

.settings-layout .settings-sidebar {
  top: calc(52px + 16px);
}
@media (max-width: 1100px) {
  .settings-layout {
    display: block;
  }
  .settings-layout .settings-sidebar {
    position: static;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--color-border);
  }
  .settings-layout .settings-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2px;
  }
}

.data-table .form-select {
  min-width: 150px;
}

.spaces-page {
  max-width: 760px;
}
.spaces-page__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.spaces-page__head h1 {
  font-size: 20px;
}
.spaces-page__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
}
.icon-btn:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}
.icon-btn--primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.icon-btn--primary:hover {
  background: var(--color-primary-hover);
  color: #fff;
}

.spaces-search {
  position: relative;
  margin-bottom: 14px;
}
.spaces-search__icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}
.spaces-search input {
  width: 100%;
  padding: 9px 12px 9px 32px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-surface);
  color: var(--color-text);
}
.spaces-search input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.space-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.space-list__item {
  display: flex;
  align-items: center;
  gap: 8px;
  border-left: 4px solid transparent;
  border-bottom: 1px solid var(--color-border-muted);
  padding: 8px 6px 8px 8px;
  transition: background-color 0.12s ease;
}
.space-list__item:hover {
  background: var(--color-bg-hover);
}
.space-list__item--pinned {
  background: var(--color-primary-tint);
  border-left-color: var(--color-primary);
}
.space-list__item--pinned:hover {
  background: var(--color-primary-tint);
}
.space-list__item--pinned:not(:has(+ .space-list__item--pinned)) {
  margin-bottom: 10px;
  border-bottom-color: var(--color-border);
}
.space-list__link {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  text-decoration: none;
}
.space-list__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 9px;
  background: var(--color-bg-muted);
  color: var(--color-text-muted);
  font-size: 17px;
}
.space-list__item--pinned .space-list__icon {
  background: var(--color-surface);
  box-shadow: inset 0 0 0 1px var(--color-primary-light);
}
.space-list__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.space-list__name {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.space-list__desc {
  font-size: 12px;
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.space-list__pin {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: none;
  color: var(--color-text-muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s ease, color 0.12s ease, background-color 0.12s ease;
}
.space-list__pin:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}
.space-list__pin:focus-visible {
  opacity: 1;
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}
.space-list__pin-off, .space-list__pin-on {
  grid-area: 1/1;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.space-list__pin-off {
  transform: rotate(45deg);
}
.space-list__pin-on {
  opacity: 0;
  transform: scale(0.6) rotate(-20deg);
}
.space-list__pin--on {
  opacity: 1;
  color: var(--color-primary-strong);
  background: var(--color-surface);
  box-shadow: inset 0 0 0 1px var(--color-primary);
}
.space-list__pin--on .space-list__pin-off {
  opacity: 0;
  transform: scale(0.6) rotate(90deg);
}
.space-list__pin--on .space-list__pin-on {
  opacity: 1;
  transform: none;
}
.space-list__pin--on:hover {
  background: var(--color-surface);
  color: var(--color-primary-hover);
}
.space-list__item:hover .space-list__pin, .space-list__item:focus-within .space-list__pin {
  opacity: 1;
}
@media (hover: none) {
  .space-list__pin {
    opacity: 1;
  }
}

.feed-page__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.feed-page__head h1 {
  font-size: 19px;
}

.feed {
  margin: 0 auto;
  width: 100%;
}

.doc-table-header {
  display: none;
}

.feed--stream {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 700px;
}
.feed--stream .feed-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
}
.feed--stream .feed-card__cover {
  display: block;
  max-height: 150px;
  overflow: hidden;
}
.feed--stream .feed-card__cover img {
  width: 100%;
  object-fit: cover;
  display: block;
}
.feed--stream .feed-card__body {
  padding: 16px 18px 12px;
}
.feed--stream .feed-card .col--name {
  display: block;
}
.feed--stream .feed-card__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
}
.feed--stream .feed-card__title:hover {
  color: var(--color-primary-strong);
}
.feed--stream .feed-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.feed--stream .feed-card .col--author {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.feed--stream .feed-card__author {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.feed--stream .feed-card__author-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
}
.feed--stream .feed-card .col--updated {
  display: flex;
}
.feed--stream .feed-card__date {
  font-size: 12px;
  color: var(--color-primary-strong);
}
.feed--stream .feed-card__counters {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.feed--stream .feed-card__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--color-border-muted);
}

.feed--grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  max-width: 100%;
}
.feed--grid .feed-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.feed--grid .feed-card__cover {
  display: block;
  height: 140px;
  overflow: hidden;
  flex-shrink: 0;
}
.feed--grid .feed-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.feed--grid .feed-card__body {
  padding: 16px 18px 12px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.feed--grid .feed-card .col--name {
  display: block;
}
.feed--grid .feed-card__title {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  line-height: 1.3;
}
.feed--grid .feed-card__title:hover {
  color: var(--color-primary-strong);
}
.feed--grid .feed-card__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
}
.feed--grid .feed-card .col--author {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.feed--grid .feed-card__author {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.feed--grid .feed-card__author-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}
.feed--grid .feed-card .col--updated {
  display: flex;
  align-items: center;
}
.feed--grid .feed-card__date {
  font-size: 12px;
  color: var(--color-text-muted);
}
.feed--grid .feed-card__counters {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  width: 100%;
}
.feed--grid .feed-card__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--color-border-subtle);
}

.feed--table {
  width: 100%;
  max-width: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.feed--table .doc-table-header {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  background: var(--color-bg-hover);
  border-bottom: 1px solid var(--color-border);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
}
.feed--table .feed-card {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--color-border-subtle);
  transition: background 0.15s ease;
  font-size: 14px;
  margin: 0;
  border-radius: 0;
  background: none;
}
.feed--table .feed-card:hover {
  background: var(--color-bg-hover);
}
.feed--table .feed-card:last-child {
  border-bottom: none;
}
.feed--table .feed-card__cover {
  display: none;
}
.feed--table .feed-card__body {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 16px;
  gap: 16px;
}
.feed--table .feed-card__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.feed--table .feed-card__title:hover {
  color: var(--color-primary-strong);
}
.feed--table .feed-card__icon {
  font-size: 16px;
  flex-shrink: 0;
}
.feed--table .feed-card__title-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.feed--table .feed-card__meta {
  display: contents;
}
.feed--table .feed-card__counters {
  display: none;
}
.feed--table .feed-card__author {
  display: contents;
}
.feed--table .feed-card .avatar-initial {
  display: none;
}
.feed--table .feed-card__author-name {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.feed--table .feed-card__date {
  font-size: 13px;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.feed--table .feed-card__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin: 0;
  padding: 0;
  border: none;
}
.feed--table .col--name {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}
.feed--table .col--author {
  width: 160px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.feed--table .col--updated {
  width: 140px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.feed--table .col--actions {
  width: 80px;
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
}

.feed-card__counter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--color-text-muted);
  font-size: 12px;
  cursor: pointer;
}
.feed-card__counter:hover {
  background: var(--color-bg-hover);
}
.feed-card__counter--static {
  cursor: default;
}
.feed-card__counter--static:hover {
  background: none;
}
.feed-card__counter.is-on {
  color: var(--color-primary-strong);
}

.feed-card__action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color 0.12s ease;
}
.feed-card__action:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}
.feed-card__action.is-on {
  color: var(--color-primary-strong);
}
.feed-card__action[data-action=favorite].is-on svg path {
  fill: currentColor;
}

.avatar-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--color-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}
.avatar-initial--sm {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-size: 11px;
}

.doc-page__engagement {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: 6px;
}

.search-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
}
.search-modal[hidden] {
  display: none;
}
.search-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 18, 30, 0.35);
}
.search-modal__box {
  position: relative;
  width: min(830px, 92vw);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border-radius: 12px;
  box-shadow: var(--shadow-modal);
  overflow: hidden;
}
.search-modal__query {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px 10px;
}
.search-modal__input {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-input-bg);
  color: var(--color-text);
}
.search-modal__input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.search-modal__query .btn:disabled {
  background: var(--color-bg-muted);
  border-color: var(--color-border);
  color: var(--color-text-muted);
  cursor: not-allowed;
}
.search-modal__tabs {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 20px;
  border-bottom: 1px solid var(--color-border);
}
.search-modal__tab {
  padding: 8px 2px 10px;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--color-text-muted);
  font-size: 13px;
  cursor: pointer;
}
.search-modal__tab--active {
  color: var(--color-primary-strong);
  border-bottom-color: var(--color-primary);
}
.search-modal__results {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px 16px;
}
.search-modal__group {
  padding: 8px 10px 4px;
  font-size: 12px;
  color: var(--color-text-muted);
}
.search-modal__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
}
.search-modal__item:hover {
  background: var(--color-bg-hover);
}
.search-modal__item-title {
  color: var(--color-text);
  font-weight: 500;
}
.search-modal__item-sub {
  font-size: 12px;
  color: var(--color-text-muted);
}
.search-modal__item-sub mark {
  background: var(--color-primary-light);
  color: inherit;
}
.search-modal__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 48px 20px;
  color: var(--color-text-muted);
}
.search-modal__empty-icon {
  opacity: 0.35;
  font-size: 26px;
}
.search-modal__empty-title {
  font-weight: 600;
  color: var(--color-text);
}
.search-modal__empty-hint {
  font-size: 13px;
}

.topbar__ai-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid color-mix(in srgb, var(--color-primary) 30%, transparent);
  border-radius: 8px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--color-primary) 8%, transparent) 0%, color-mix(in srgb, var(--color-primary) 12%, transparent) 100%);
  color: var(--color-text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.topbar__ai-btn:hover {
  border-color: var(--color-primary);
  background: linear-gradient(135deg, color-mix(in srgb, var(--color-primary) 15%, transparent) 0%, color-mix(in srgb, var(--color-primary) 22%, transparent) 100%);
  transform: translateY(-1px);
}

.topbar__ai-icon {
  font-size: 15px;
}

.topbar__ai-kbd {
  padding: 1px 5px;
  border: 1px solid color-mix(in srgb, var(--color-primary) 25%, transparent);
  border-radius: 4px;
  font-size: 10px;
  color: var(--color-primary-strong);
  background: var(--color-surface);
}

.ai-drawer {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0.25s;
}
.ai-drawer.ai-drawer--open {
  pointer-events: auto;
  visibility: visible;
}
.ai-drawer.ai-drawer--open .ai-drawer__backdrop {
  opacity: 1;
}
.ai-drawer.ai-drawer--open .ai-drawer__panel {
  transform: translateX(0);
}
.ai-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.ai-drawer__panel {
  position: relative;
  width: 440px;
  max-width: 100vw;
  height: 100%;
  background: var(--color-surface);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}
.ai-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}
.ai-drawer__title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ai-drawer__icon {
  font-size: 24px;
}
.ai-drawer__sub {
  display: block;
  font-size: 11px;
  color: var(--color-text-muted);
}
.ai-drawer__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ai-drawer__close {
  background: none;
  border: none;
  font-size: 16px;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.ai-drawer__close:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}
.ai-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ai-drawer__suggestions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.ai-drawer__footer {
  padding: 12px 16px;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ai-drawer__context-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  padding: 4px 8px;
  background: color-mix(in srgb, var(--color-primary) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-primary) 20%, transparent);
  border-radius: 6px;
  color: var(--color-text);
}
.ai-drawer__context-badge button {
  background: none;
  border: none;
  color: var(--color-primary-strong);
  font-size: 11px;
  cursor: pointer;
  font-weight: 600;
}
.ai-drawer__form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 6px 10px;
}
.ai-drawer__form:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary) 15%, transparent);
}
.ai-drawer__input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  resize: none;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--color-text);
  max-height: 120px;
  line-height: 1.4;
  padding: 2px 0;
}
.ai-drawer__send-btn {
  background: var(--color-primary-strong);
  color: #ffffff;
  border: none;
  border-radius: 7px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.12s;
}
.ai-drawer__send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ai-msg {
  display: flex;
  gap: 10px;
  max-width: 92%;
}
.ai-msg--user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.ai-msg--user .ai-msg__bubble {
  background: var(--color-primary-strong);
  color: #ffffff;
  border-bottom-right-radius: 2px;
}
.ai-msg--assistant {
  align-self: flex-start;
}
.ai-msg--assistant .ai-msg__bubble {
  background: var(--color-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-bottom-left-radius: 2px;
}
.ai-msg--error .ai-msg__bubble {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}
.ai-msg__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary-strong) 0%, var(--color-primary-strong-hover) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  color: #fff;
}
.ai-msg__avatar--busy {
  animation: aiAvatarPulse 1.6s ease-in-out infinite;
}
.ai-msg__bubble--typing {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.ai-msg .ai-typing-dots {
  padding: 0;
  gap: 5px;
}
.ai-msg .ai-typing-dots span {
  width: 8px;
  height: 8px;
  background: var(--color-primary-strong);
}
.ai-msg__content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ai-msg__bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  word-break: break-word;
}
.ai-msg__stats {
  font-size: 11.5px;
  color: var(--color-text-muted);
  padding-left: 4px;
  user-select: none;
}

.ai-typing-label {
  font-size: 12.5px;
  color: var(--color-text-muted);
  user-select: none;
}

.ai-msg .ai-msg__bubble.is-streaming::after {
  content: "▍";
  color: var(--color-primary-strong);
  animation: aiCaret 1s steps(2, start) infinite;
}

@keyframes aiCaret {
  50% {
    opacity: 0;
  }
}
@keyframes aiAvatarPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-primary) 25%, transparent);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 0 7px color-mix(in srgb, var(--color-primary) 0%, transparent);
  }
}
.ai-suggestion-btn {
  text-align: left;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.12s;
}
.ai-suggestion-btn:hover {
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 5%, transparent);
  color: var(--color-primary-strong);
}

.ai-sources {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed var(--color-border);
}
.ai-sources__title {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
}
.ai-sources__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-source-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  text-decoration: none;
  color: var(--color-text);
  transition: all 0.12s;
}
.ai-source-card:hover {
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 4%, transparent);
}
.ai-source-card__title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-primary-strong);
  display: block;
}
.ai-source-card__space {
  font-size: 11px;
  color: var(--color-text-muted);
  display: block;
}

.ai-typing__bubble {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
}
.ai-typing__bubble span {
  width: 6px;
  height: 6px;
  background: var(--color-primary-strong);
  border-radius: 50%;
  animation: typingJump 1.2s infinite ease-in-out;
}
.ai-typing__bubble span:nth-child(2) {
  animation-delay: 0.2s;
}
.ai-typing__bubble span:nth-child(3) {
  animation-delay: 0.4s;
}

.doc-presence-container {
  display: flex;
  align-items: center;
  margin-right: 8px;
}

.doc-presence-group {
  display: flex;
  align-items: center;
  margin-left: 6px;
}

.doc-presence-avatar {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  margin-left: -6px;
  border: 2px solid var(--color-surface);
  background: var(--color-primary-strong);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  cursor: default;
  transition: transform 0.15s ease, z-index 0.15s ease;
}
.doc-presence-avatar:hover {
  transform: scale(1.15) translateY(-2px);
  z-index: 10;
}
.doc-presence-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.doc-presence-avatar .doc-presence-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--color-surface);
  background: #94a3b8;
}
.doc-presence-avatar--editing .doc-presence-dot {
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: presencePulse 1.8s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes presencePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}
.doc-conflict-modal-backdrop {
  z-index: 1000;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}

.doc-conflict-modal {
  max-width: 520px;
  width: 95%;
}
.doc-conflict-modal__header {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 14px;
}
.doc-conflict-modal__subtitle {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--color-text-muted);
  line-height: 1.45;
}
.doc-conflict-modal__body {
  padding: 16px 0;
}
.doc-conflict-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--color-border);
  padding-top: 14px;
}

.doc-conflict-choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 12px 16px;
  text-align: left;
  white-space: normal;
}
.doc-conflict-choice__title {
  font-size: 14.5px;
  font-weight: 600;
}
.doc-conflict-choice__hint {
  font-size: 12.5px;
  font-weight: 400;
  opacity: 0.85;
  line-height: 1.4;
}

.doc-conflict-modal__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.doc-conflict-link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--color-text-muted);
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}
.doc-conflict-link:hover {
  color: var(--color-text);
}

.btn--danger-accent {
  background: #e11d48 !important;
  border-color: #e11d48 !important;
  color: #fff !important;
}
.btn--danger-accent:hover {
  background: #be123c !important;
  border-color: #be123c !important;
}

.topbar__burger .doc-icon {
  width: 18px;
  height: 18px;
}

.topbar__search .doc-icon {
  width: 14px;
  height: 14px;
}

.topbar__smileforce-btn .doc-icon {
  width: 12px;
  height: 12px;
}

.topbar__icon-btn .doc-icon {
  width: 16px;
  height: 16px;
}

.space-nav__back .doc-icon {
  width: 12px;
  height: 12px;
}

.space-nav__icon-btn .doc-icon {
  width: 14px;
  height: 14px;
}

.space-nav__create .doc-icon {
  width: 14px;
  height: 14px;
}

.space-nav__title-icon .doc-icon {
  width: 15px;
  height: 15px;
}

.doc-freshness-banner__icon .doc-icon {
  width: 20px;
  height: 20px;
}

.feed-card__counter .doc-icon {
  width: 13px;
  height: 13px;
}

.feed-card__action .doc-icon {
  width: 16px;
  height: 16px;
}

.doc-meta-version .doc-icon {
  width: 11px;
  height: 11px;
}

.doc-private-badge .doc-icon {
  width: 11px;
  height: 11px;
}

.doc-status-badge .doc-icon {
  width: 10px;
  height: 10px;
}

.doc-review-date-badge .doc-icon {
  width: 12px;
  height: 12px;
}

.doc-verification-banner__title .doc-icon {
  width: 16px;
  height: 16px;
}

.doc-view-mode-btn .doc-icon {
  width: 14px;
  height: 14px;
}

.doc-backlinks-accordion__icon .doc-icon {
  width: 14px;
  height: 14px;
}

.doc-backlinks-accordion__arrow .doc-icon {
  width: 12px;
  height: 12px;
}

.doc-comment-editor__tool-btn .doc-icon {
  width: 15px;
  height: 15px;
}

.doc-dropzone__icon .doc-icon {
  width: 20px;
  height: 20px;
}

.doc-audit-trail__arrow .doc-icon {
  width: 12px;
  height: 12px;
}

.widget-card__icon .doc-icon {
  width: 14px;
  height: 14px;
}

.widget-item__icon .doc-icon {
  width: 16px;
  height: 16px;
}

.widget-item__star .doc-icon {
  width: 12px;
  height: 12px;
}

.dashboard-feed__head h3 .doc-icon {
  width: 16px;
  height: 16px;
}

.view-btn .doc-icon {
  width: 14px;
  height: 14px;
}

.author-page__stats .doc-icon {
  width: 13px;
  height: 13px;
}

.author-page__space-link .doc-icon {
  width: 13px;
  height: 13px;
}

:root[data-ui-version=modern] .topbar__burger,
:root[data-ui-version=modern] .topbar__icon-btn,
:root[data-ui-version=modern] .topbar__search {
  border-color: transparent;
  border-radius: var(--radius-md);
  background: var(--color-bg);
}
:root[data-ui-version=modern] .topbar__burger:hover,
:root[data-ui-version=modern] .topbar__icon-btn:hover,
:root[data-ui-version=modern] .topbar__search:hover {
  border-color: transparent;
  background: var(--color-bg-hover);
}
:root[data-ui-version=modern] .topbar__burger-kbd,
:root[data-ui-version=modern] .topbar__icon-btn-kbd,
:root[data-ui-version=modern] .topbar__search-kbd {
  border-color: transparent;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}
:root[data-ui-version=modern] .topbar__smileforce-btn {
  border-color: transparent;
  border-radius: var(--radius-md);
  background: var(--color-bg);
}
:root[data-ui-version=modern] .topbar__smileforce-btn:hover {
  border-color: transparent;
  background: var(--color-bg-hover);
  color: var(--color-text);
  transform: none;
}
:root[data-ui-version=modern] .topbar__ai-btn {
  border-color: transparent;
  border-radius: var(--radius-md);
  background: var(--color-primary-light);
  color: var(--color-primary-strong);
}
:root[data-ui-version=modern] .topbar__ai-btn:hover {
  border-color: transparent;
  background: var(--color-primary-light);
  color: var(--color-primary-hover);
}
:root[data-ui-version=modern] .topbar__ai-kbd {
  border-color: transparent;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-primary-strong);
}
:root[data-ui-version=modern] .topbar__badge {
  background: var(--color-danger);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 0 0 2px var(--color-surface);
}
:root[data-ui-version=modern] .notifications-popover {
  border-color: transparent;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
}
:root[data-ui-version=modern] .notifications-popover__head, :root[data-ui-version=modern] .notifications-popover__foot {
  border-color: var(--color-border-muted);
}
:root[data-ui-version=modern] .notifications-item {
  border-bottom-color: var(--color-border-muted);
}
:root[data-ui-version=modern] .notifications-item__snippet {
  background: var(--color-bg);
  border-radius: var(--radius-sm);
}
:root[data-ui-version=modern] .notifications-item__dot {
  background: var(--color-primary);
}
:root[data-ui-version=modern] .space-nav__footer {
  border-top-color: var(--color-border-muted);
}
:root[data-ui-version=modern] .space-nav__title-icon {
  border-radius: var(--radius-sm);
}
:root[data-ui-version=modern] .space-nav__create,
:root[data-ui-version=modern] .space-nav__move-btn {
  border-color: transparent;
  border-radius: var(--radius-md);
  background: var(--color-bg);
}
:root[data-ui-version=modern] .space-nav__create:hover,
:root[data-ui-version=modern] .space-nav__move-btn:hover {
  border-color: transparent;
  background: var(--color-primary-tint);
  color: var(--color-primary-strong);
}
:root[data-ui-version=modern] .space-nav__create:hover {
  border-style: solid;
}
:root[data-ui-version=modern] .space-nav__move-btn.is-active, :root[data-ui-version=modern] .space-nav__move-btn[data-active="1"] {
  border-color: transparent;
  background: var(--color-primary-tint);
  color: var(--color-primary-strong);
  box-shadow: none;
}
:root[data-ui-version=modern] .space-nav__bottom-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--color-border-muted);
}
:root[data-ui-version=modern] .space-nav__bottom-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-size: 13px;
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
}
:root[data-ui-version=modern] .space-nav__bottom-link:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}
:root[data-ui-version=modern] .space-nav__bottom-link.is-active {
  background: var(--color-primary-tint);
  color: var(--color-primary-strong);
  font-weight: 600;
}
:root[data-ui-version=modern] .space-nav__version {
  padding: 6px 10px 2px;
  color: var(--color-text-muted);
  font-size: 11px;
  line-height: 1.3;
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
  user-select: all;
}
:root[data-ui-version=modern] .space-menu__dropdown {
  border-color: transparent;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hover);
}
:root[data-ui-version=modern] .search-modal__box {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
}
:root[data-ui-version=modern] .search-modal__input {
  border-color: var(--color-border-muted);
  border-radius: var(--radius-md);
}
:root[data-ui-version=modern] .search-modal__input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
:root[data-ui-version=modern] .search-modal__tabs {
  border-bottom-color: transparent;
}
:root[data-ui-version=modern] .search-modal__tab {
  padding: 5px 12px;
  border-bottom-color: transparent;
  border-radius: var(--radius-pill);
  transition: background 0.12s ease, color 0.12s ease;
}
:root[data-ui-version=modern] .search-modal__tab:hover {
  color: var(--color-text);
}
:root[data-ui-version=modern] .search-modal__tab--active {
  border-bottom-color: transparent;
  background: var(--color-primary-tint);
  color: var(--color-primary-strong);
}
:root[data-ui-version=modern] .search-modal__item {
  border-radius: var(--radius-md);
}

.roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
  max-width: 1100px;
}
.roles-grid__loading {
  color: var(--color-text-muted);
  font-size: 13px;
  padding: 20px 0;
}

.role-card {
  display: flex;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.role-card:hover {
  border-color: color-mix(in srgb, var(--role-color) 45%, var(--color-border));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.role-card__accent {
  width: 4px;
  flex-shrink: 0;
  background: var(--role-color);
}
.role-card__body {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.role-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.role-card__swatch {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--role-color);
  border: 2px solid color-mix(in srgb, var(--role-color) 40%, var(--color-border));
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.1s;
}
.role-card__swatch:hover {
  transform: scale(1.1);
}
.role-card__swatch input[type=color] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.role-card__label-input {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 4px 8px;
  transition: border-color 0.12s, background 0.12s;
}
.role-card__label-input:hover {
  background: var(--color-bg);
}
.role-card__label-input:focus {
  outline: none;
  background: var(--color-bg);
  border-color: var(--color-primary);
}
.role-card__saved {
  color: #22c55e;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.role-card__key {
  font-size: 11px;
  color: var(--color-text-muted);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 5px;
  padding: 2px 7px;
  flex-shrink: 0;
}
.role-card__perms {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.role-card__perm {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 20px;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  opacity: 0.55;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.1s, border-color 0.1s, background 0.1s;
}
.role-card__perm:hover:not(:disabled) {
  opacity: 0.85;
  border-color: color-mix(in srgb, var(--role-color) 40%, var(--color-border));
}
.role-card__perm--on {
  opacity: 1;
  color: var(--color-text);
  border-color: color-mix(in srgb, var(--role-color) 50%, var(--color-border));
  background: color-mix(in srgb, var(--role-color) 10%, transparent);
}
.role-card__perm--on:hover:not(:disabled) {
  opacity: 1;
}
.role-card__perm--locked {
  cursor: not-allowed;
}
.role-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--color-border);
}
.role-card__users {
  font-size: 12px;
  color: var(--color-text-muted);
  text-decoration: none;
}
.role-card__users:hover {
  color: var(--color-primary-strong);
  text-decoration: underline;
}

:root[data-ui-version=modern] .role-card {
  border-color: transparent;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
:root[data-ui-version=modern] .role-card:hover {
  border-color: transparent;
  box-shadow: var(--shadow-hover);
}
:root[data-ui-version=modern] .role-card__saved {
  color: var(--color-success);
}
:root[data-ui-version=modern] .role-card__key {
  background: var(--color-bg-muted);
  border-color: var(--color-border-muted);
  color: var(--color-text-subtle);
}
:root[data-ui-version=modern] .role-card__meta {
  border-top-color: var(--color-border-muted);
}

.role-card__actions {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
}
.role-card__actions[hidden] {
  display: none;
}
.role-card__actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.role-card__actions .btn .doc-icon {
  width: 16px;
  height: 16px;
}
@media (max-width: 768px) {
  .role-card__actions .btn {
    min-height: 40px;
  }
}

.search-bar {
  margin-bottom: 14px;
}
.search-bar__input {
  width: 100%;
  font-size: 16px;
  padding: 12px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  color: var(--color-text);
  transition: border-color 0.12s, box-shadow 0.12s;
}
.search-bar__input::placeholder {
  color: var(--color-text-muted);
}
.search-bar__input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary) 15%, transparent);
}

.search-results mark {
  background: color-mix(in srgb, var(--color-primary) 25%, transparent);
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}

.search-section {
  margin-bottom: 24px;
}
.search-section__title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}
.search-section__count {
  font-weight: 400;
  opacity: 0.7;
}

.search-hit {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  margin-bottom: 6px;
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.12s;
}
.search-hit:hover {
  border-color: color-mix(in srgb, var(--color-primary) 40%, var(--color-border));
}
.search-hit__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}
.search-hit__proj-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
}
.search-hit__proj-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.search-hit__comment-icon {
  font-size: 16px;
  margin-top: 2px;
  flex-shrink: 0;
}
.search-hit__body {
  flex: 1;
  min-width: 0;
}
.search-hit__title {
  font-size: 14px;
  line-height: 1.4;
  color: var(--color-text);
}
.search-hit__key {
  font-size: 11px;
  color: var(--color-text-muted);
  background: var(--color-bg);
  border-radius: 4px;
  padding: 1px 6px;
  margin-right: 4px;
}
.search-hit__meta {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 2px;
}
.search-hit__subtask {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 2px;
  font-style: italic;
}
.search-hit__done {
  font-size: 11px;
  color: #22c55e;
  font-weight: 600;
}
.search-hit__archived {
  font-size: 11px;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 0 6px;
  display: inline-block;
}

.header-search-drop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  z-index: 300;
  overflow: hidden;
}
.header-search-drop__item {
  display: block;
  padding: 9px 14px;
  font-size: 13px;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.12s;
}
.header-search-drop__item:hover {
  background: var(--color-bg);
}
.header-search-drop__type {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-right: 8px;
}
.header-search-drop__all {
  display: block;
  padding: 9px 14px;
  font-size: 12px;
  color: var(--color-primary-strong);
  text-decoration: none;
  border-top: 1px solid var(--color-border);
  transition: background 0.12s;
}
.header-search-drop__all:hover {
  background: var(--color-bg);
}
.header-search-drop__empty {
  padding: 12px 14px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.quick-answer {
  margin: 8px 12px 12px;
  padding: 12px 14px;
  border: 1px solid var(--color-primary);
  border-radius: 8px;
  background: var(--color-bg-muted);
}
.quick-answer__badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 11px;
}
.quick-answer__text {
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-line;
}
.quick-answer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.quick-answer__link {
  padding: 4px 10px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
  color: var(--color-primary-strong);
  font-size: 13px;
  text-decoration: none;
}
.quick-answer__link:hover {
  background: var(--color-bg-hover);
}
.quick-answer__link--file::before {
  content: "📎 ";
}

.qa-tags,
.qa-chosen {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.qa-tag,
.qa-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-bg-muted);
  color: var(--color-text);
  font-size: 13px;
}
.qa-tag--add,
.qa-chip--add {
  border-style: dashed;
  color: var(--color-text-muted);
  cursor: pointer;
}
.qa-tag--add:hover,
.qa-chip--add:hover {
  background: var(--color-bg-hover);
}
.qa-tag__x,
.qa-chip__x {
  border: 0;
  background: none;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}
.qa-tag__x:hover,
.qa-chip__x:hover {
  color: var(--color-danger, #d33);
}

.qa-picker {
  flex-shrink: 0;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  margin-bottom: 8px;
}
.qa-picker__item {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  background: none;
  color: var(--color-text);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.qa-picker__item:hover {
  background: var(--color-bg-hover);
}

:root[data-ui-version=modern] .search-bar__input {
  border-color: var(--color-border-muted);
  border-radius: var(--radius-md);
}
:root[data-ui-version=modern] .search-bar__input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
:root[data-ui-version=modern] .search-hit {
  border-color: transparent;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  transition: background 0.12s ease, box-shadow 0.15s ease;
}
:root[data-ui-version=modern] .search-hit:hover {
  border-color: transparent;
  background: var(--color-bg-hover);
  box-shadow: var(--shadow-hover);
}
:root[data-ui-version=modern] .header-search-drop {
  border-color: transparent;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hover);
}
:root[data-ui-version=modern] .header-search-drop__all {
  border-top-color: var(--color-border-muted);
}
:root[data-ui-version=modern] .quick-answer {
  border-color: transparent;
  border-radius: var(--radius-md);
  background: var(--color-primary-tint);
}
:root[data-ui-version=modern] .quick-answer__badge {
  border-color: transparent;
  background: var(--color-surface);
}
:root[data-ui-version=modern] .quick-answer__link {
  border-color: transparent;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  box-shadow: var(--shadow-xs);
}

.account-page {
  max-width: 860px;
  margin: 0;
}
.account-page__title {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 24px;
  letter-spacing: -0.01em;
}

.account-card {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
}
@media (max-width: 640px) {
  .account-card {
    flex-direction: column;
    align-items: center;
  }
}
.account-card__fields {
  flex: 1;
  min-width: 0;
  width: 100%;
}
.account-card__hint {
  font-size: 12px;
  color: var(--color-text-muted, #94a3b8);
  line-height: 1.45;
  margin: 10px 0 16px;
}
.account-card__actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.account-avatar {
  width: 124px;
  height: 124px;
  border-radius: 18px;
  background: #4361ee;
  background: linear-gradient(135deg, #4361ee, #3a0ca3);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(67, 97, 238, 0.22);
  user-select: none;
}
.account-avatar__text {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1;
}
.account-avatar__img {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  object-fit: cover;
}

.account-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 540px) {
  .account-form__row {
    grid-template-columns: 1fr;
  }
}

.account-field__label {
  display: block;
  font-size: 12px;
  color: var(--color-text-muted, #94a3b8);
  margin-bottom: 6px;
  font-weight: 400;
}
.account-field__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.account-field__input {
  width: 100%;
  height: 40px;
  padding: 0 60px 0 14px;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 8px;
  background: var(--color-surface, #fff);
  color: var(--color-text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.account-field__input:focus {
  outline: none;
  border-color: #4361ee;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}
.account-field__counter {
  position: absolute;
  right: 12px;
  font-size: 12px;
  color: var(--color-text-muted, #94a3b8);
  pointer-events: none;
  user-select: none;
}

.account-btn-ghost {
  background: none;
  border: none;
  color: var(--color-text-muted, #94a3b8);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 6px;
  transition: color 0.15s ease;
}
.account-btn-ghost:hover:not(:disabled) {
  color: var(--color-text);
}
.account-btn-ghost:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.account-btn-apply {
  background: var(--color-bg-hover, #e2e8f0);
  color: var(--color-text-muted, #94a3b8);
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 20px;
  border-radius: 8px;
  border: none;
  cursor: not-allowed;
  transition: all 0.15s ease;
}
.account-btn-apply.is-active, .account-btn-apply:not(:disabled) {
  background: #4361ee;
  color: #fff;
  cursor: pointer;
}
.account-btn-apply.is-active:hover, .account-btn-apply:not(:disabled):hover {
  background: #3b50d9;
}

.account-list {
  border-top: 1px solid var(--color-border, #e2e8f0);
}

.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border, #e2e8f0);
  gap: 16px;
}
.account-row__info {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.account-row__icon {
  color: var(--color-text-muted, #64748b);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
}
.account-row__texts {
  min-width: 0;
}
.account-row__title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.35;
}
.account-row__subtitle {
  font-size: 12.5px;
  color: var(--color-text-muted, #64748b);
  margin-top: 2px;
  line-height: 1.35;
}

.account-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--color-border, #cbd5e1);
  border-radius: 8px;
  background: var(--color-surface, #fff);
  color: var(--color-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s ease;
  white-space: nowrap;
  font-family: inherit;
}
.account-action-btn .doc-icon {
  width: 14px;
  height: 14px;
}
.account-action-btn:hover {
  background: var(--color-bg-hover, #f8fafc);
  border-color: var(--color-primary, #4361ee);
}
.account-action-btn--danger:hover {
  color: #ef4444;
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.04);
}

.user-profile {
  max-width: 560px;
}
.user-profile__header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.user-profile__avatar, .user-profile__avatar-img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  flex-shrink: 0;
}
.user-profile__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 22px;
}
.user-profile__avatar-img {
  object-fit: cover;
}
.user-profile__identity {
  min-width: 0;
}
.user-profile__name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.user-profile__role-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--badge-color, #94a3b8);
  background: color-mix(in srgb, var(--badge-color, #94a3b8) 14%, transparent);
  border-radius: 20px;
  padding: 2px 10px;
}

.account-row--theme {
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 14px;
}
@media (max-width: 640px) {
  .account-row--theme {
    flex-direction: column;
    align-items: stretch;
  }
}

.account-theme-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  width: 100%;
}
@media (max-width: 640px) {
  .account-theme-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
  }
}

.account-theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--color-border, #cbd5e1);
  background: var(--color-surface, #ffffff);
  color: var(--color-text, #1e293b);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
  outline: none;
  touch-action: manipulation;
}
@media (max-width: 640px) {
  .account-theme-btn {
    width: 100%;
    padding: 9px 8px;
    font-size: 12.5px;
  }
}
.account-theme-btn__swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.account-theme-btn:hover {
  border-color: var(--color-primary, #6366f1);
  background: var(--color-bg-hover, #f8fafc);
  transform: translateY(-1px);
}
.account-theme-btn.is-active {
  border-color: var(--color-primary, #6366f1);
  background: var(--color-primary-tint, #eeedfe);
  color: var(--color-primary-strong);
  font-weight: 600;
  box-shadow: 0 0 0 3px var(--color-primary-light, color-mix(in srgb, var(--color-primary) 15%, transparent));
}
.account-theme-btn--dark.is-active {
  border-color: #60a5fa;
  background: #1f2a44;
  color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

.pwd-gen-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid var(--color-primary-light, color-mix(in srgb, var(--color-primary) 20%, transparent));
  background: var(--color-primary-tint, #f3e8ff);
  color: var(--color-primary-strong);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}
.pwd-gen-btn:hover {
  background: var(--color-primary, #7c3aed);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px var(--color-primary-light, color-mix(in srgb, var(--color-primary) 25%, transparent));
}

.pwd-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.pwd-input-wrap input {
  width: 100%;
  padding-right: 40px !important;
}

.pwd-toggle-btn {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  opacity: 0.6;
  padding: 4px;
  border-radius: 6px;
  transition: opacity 0.15s ease;
}
.pwd-toggle-btn:hover {
  opacity: 1;
  background: var(--color-bg-hover);
}

.pwd-strength {
  margin-top: 8px;
}
.pwd-strength__bar {
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 4px;
}
.pwd-strength__fill {
  height: 100%;
  width: 0%;
  transition: all 0.25s ease;
  border-radius: 2px;
}
.pwd-strength__text {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
}
.pwd-strength--weak .pwd-strength__fill {
  width: 25%;
  background: #dc2626;
}
.pwd-strength--weak .pwd-strength__text {
  color: #dc2626;
}
.pwd-strength--medium .pwd-strength__fill {
  width: 50%;
  background: #d97706;
}
.pwd-strength--medium .pwd-strength__text {
  color: #d97706;
}
.pwd-strength--strong .pwd-strength__fill {
  width: 75%;
  background: #059669;
}
.pwd-strength--strong .pwd-strength__text {
  color: #059669;
}
.pwd-strength--maximum .pwd-strength__fill {
  width: 100%;
  background: var(--color-primary-strong);
}
.pwd-strength--maximum .pwd-strength__text {
  color: var(--color-primary-strong);
}

.users-mgmt-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 40px;
}

/* 1. Header Tabs */
.users-mgmt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--color-border-default, #e2e8f0);
  padding-bottom: 0px;
  margin-bottom: 4px;
}

[data-theme=dark] .users-mgmt-header {
  border-bottom-color: #334155;
}

.users-mgmt-tabs {
  display: flex;
  align-items: center;
  gap: 24px;
}

.users-mgmt-tab {
  background: transparent;
  border: none;
  padding: 10px 4px 12px 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-fg-muted, #64748b);
  cursor: pointer;
  position: relative;
  text-decoration: none;
  transition: color 0.15s;
}

.users-mgmt-tab:hover {
  color: var(--color-fg-default, #1e293b);
}

.users-mgmt-tab.is-active {
  color: var(--color-primary-strong);
  font-weight: 600;
}

.users-mgmt-tab.is-active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--color-primary, #3b82f6);
}

.users-mgmt-invite-btn {
  border-radius: 6px;
  font-weight: 500;
  padding: 8px 16px;
  font-size: 13.5px;
}

/* 2. Filter Bar */
.users-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.users-search-box {
  position: relative;
  width: 100%;
}

.users-search-box__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.users-search-box__input {
  width: 100%;
  height: 42px;
  padding: 8px 16px 8px 38px;
  border-radius: 24px;
  border: 1px solid var(--color-border-default, #cbd5e1);
  background: var(--color-canvas-default, #ffffff);
  font-size: 13.5px;
  color: var(--color-fg-default, #1e293b);
  outline: none;
  transition: all 0.15s ease;
}

[data-theme=dark] .users-search-box__input {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}

.users-search-box__input:focus {
  border-color: var(--color-primary, #3b82f6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.users-filter-pills {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.users-filter-pill {
  position: relative;
}

.users-filter-pill__select {
  appearance: none;
  background: var(--color-canvas-default, #ffffff);
  border: 1px solid var(--color-border-default, #cbd5e1);
  border-radius: 20px;
  padding: 6px 28px 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-fg-default, #334155);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' width='10' height='10' fill='%2364748b'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: all 0.15s ease;
}

[data-theme=dark] .users-filter-pill__select {
  background-color: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}

.users-filter-pill__select:hover {
  border-color: var(--color-primary, #3b82f6);
}

/* 3. Table Card */
.users-table-card {
  background: var(--color-canvas-default, #ffffff);
  border: 1px solid var(--color-border-default, #e2e8f0);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

[data-theme=dark] .users-table-card {
  background: #0f172a;
  border-color: #334155;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}

.users-table th {
  padding: 12px 16px;
  font-weight: 500;
  font-size: 12.5px;
  color: var(--color-fg-muted, #64748b);
  border-bottom: 1px solid var(--color-border-default, #e2e8f0);
  user-select: none;
  background: var(--color-canvas-subtle, #f8fafc);
}

[data-theme=dark] .users-table th {
  background: #1e293b;
  border-bottom-color: #334155;
  color: #94a3b8;
}

.users-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border-default, #f1f5f9);
  vertical-align: middle;
}

[data-theme=dark] .users-table td {
  border-bottom-color: #1e293b;
}

.users-table__row:hover {
  background-color: rgba(59, 130, 246, 0.02);
}

[data-theme=dark] .users-table__row:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

/* User Cell */
.user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-cell__avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
  overflow: hidden;
}

.user-cell__avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-cell__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-cell__name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-cell__name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-fg-default, #1e293b);
}

[data-theme=dark] .user-cell__name {
  color: #f1f5f9;
}

.user-cell__verified-icon {
  display: flex;
  align-items: center;
}

.user-cell__email-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-cell__email {
  font-size: 12px;
  color: var(--color-fg-muted, #64748b);
}

.user-cell__reinvite-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 1px 3px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  transition: all 0.15s;
}

.user-cell__reinvite-btn:hover {
  color: var(--color-primary-strong);
  background: rgba(59, 130, 246, 0.1);
}

/* Switch */
.user-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
}

.user-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.user-switch__slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.2s;
  border-radius: 22px;
}

[data-theme=dark] .user-switch__slider {
  background-color: #475569;
}

.user-switch__slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.user-switch input:checked + .user-switch__slider {
  background-color: #10b981;
}

.user-switch input:checked + .user-switch__slider:before {
  transform: translateX(16px);
}

.user-switch input:disabled + .user-switch__slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* User Type & Role Selects */
.user-select-field {
  border: 1px solid transparent;
  background: transparent;
  font-size: 13px;
  color: var(--color-fg-default, #334155);
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
}

.user-select-field:hover {
  background: var(--color-canvas-subtle, #f8fafc);
  border-color: var(--color-border-default, #cbd5e1);
}

[data-theme=dark] .user-select-field {
  color: #f1f5f9;
}

.user-role-select {
  border: 1px solid var(--color-primary, #3b82f6);
  background: transparent;
  color: var(--color-primary-strong);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 24px 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' width='10' height='10' fill='%233b82f6'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: all 0.15s;
}

.user-role-select:hover {
  background-color: rgba(59, 130, 246, 0.05);
}

/* Department Badge */
.user-dept-badge {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--color-fg-muted, #64748b);
}

.user-dept-badge--empty {
  color: #cbd5e1;
}

.user-date-text {
  font-size: 12.5px;
  color: var(--color-fg-muted, #64748b);
}

/* Sortable column headers */
.users-table__sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.15s;
}

.users-table__sort:hover {
  color: var(--color-fg-default, #1e293b);
}

[data-theme=dark] .users-table__sort:hover {
  color: #f1f5f9;
}

.users-table__sort-icon {
  display: inline-flex;
  align-items: center;
  color: #cbd5e1;
  transition: color 0.15s;
}

[data-theme=dark] .users-table__sort-icon {
  color: #475569;
}

.users-table__sort:hover .users-table__sort-icon {
  color: #94a3b8;
}

.users-table__sort .doc-icon {
  width: 12px;
  height: 12px;
}

.users-table__sort.is-sorted {
  color: var(--color-primary-strong);
  font-weight: 600;
}

.users-table__sort.is-sorted .users-table__sort-icon {
  color: var(--color-primary-strong);
}

/* Row Actions with Hover Settings Button */
.user-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.user-row-settings-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 5px 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.users-table__row:hover .user-row-settings-btn,
.user-row-settings-btn:focus-visible {
  opacity: 1;
}

.user-row-settings-btn:hover {
  color: var(--color-primary-strong-hover);
  background: rgba(79, 70, 229, 0.1);
  transform: scale(1.1);
}

[data-theme=dark] .user-row-settings-btn:hover {
  color: var(--color-primary-strong);
  background: rgba(129, 140, 248, 0.15);
}

/* Actions Menu */
.user-actions-menu {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.user-actions-btn {
  background: transparent;
  border: none;
  font-size: 18px;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1;
}

.user-actions-btn:hover {
  color: var(--color-fg-default, #1e293b);
  background: rgba(0, 0, 0, 0.05);
}

.user-actions-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 100;
  background: var(--color-canvas-default, #ffffff);
  border: 1px solid var(--color-border-default, #e2e8f0);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  min-width: 190px;
  padding: 4px;
}

[data-theme=dark] .user-actions-dropdown {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.user-actions-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--color-fg-default, #1e293b);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.1s;
}

[data-theme=dark] .user-actions-item {
  color: #f1f5f9;
}

.user-actions-item:hover {
  background: var(--color-canvas-subtle, #f1f5f9);
}

[data-theme=dark] .user-actions-item:hover {
  background: #334155;
}

.user-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: userModalFadeIn 0.15s ease-out;
}

@keyframes userModalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.user-modal {
  width: 680px;
  max-width: 95vw;
  max-height: 90vh;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: var(--shadow-modal);
  border: 1px solid var(--color-border-default, #e2e8f0);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: userModalZoomIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes userModalZoomIn {
  from {
    transform: scale(0.96);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
[data-theme=dark] .user-modal {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.user-modal__header {
  padding: 20px 24px 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-modal__title {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

[data-theme=dark] .user-modal__title {
  color: #f8fafc;
}

.user-modal__close {
  background: transparent;
  border: none;
  font-size: 18px;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
  transition: all 0.15s;
}

.user-modal__close:hover {
  color: #1e293b;
  background: rgba(0, 0, 0, 0.05);
}

[data-theme=dark] .user-modal__close:hover {
  color: #f1f5f9;
  background: #334155;
}

.user-modal__form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.user-modal__body {
  display: flex;
  flex: 1;
  min-height: 0;
  padding: 4px 24px 16px 24px;
  gap: 24px;
}

.user-modal__sidebar {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 4px;
}

.user-modal__nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  background: transparent;
  font-size: 13.5px;
  font-weight: 500;
  color: #475569;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

[data-theme=dark] .user-modal__nav-item {
  color: #94a3b8;
}

.user-modal__nav-item:hover:not(.is-active) {
  background: #f8fafc;
  color: #1e293b;
}

[data-theme=dark] .user-modal__nav-item:hover:not(.is-active) {
  background: #334155;
  color: #f1f5f9;
}

.user-modal__nav-item.is-active {
  background: #eef2ff;
  color: var(--color-primary-strong-hover);
  font-weight: 600;
}

[data-theme=dark] .user-modal__nav-item.is-active {
  background: color-mix(in srgb, var(--color-primary) 20%, transparent);
  color: var(--color-primary-strong);
}

.user-modal__content {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding-left: 18px;
  border-left: 1px solid #f1f5f9;
}

[data-theme=dark] .user-modal__content {
  border-left-color: #334155;
}

@media (max-width: 640px) {
  .user-modal {
    width: 100%;
    max-width: 100vw;
    max-height: 100dvh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
  .user-modal__body {
    flex-direction: column;
    gap: 12px;
    padding: 4px 16px 12px;
  }
  .user-modal__sidebar {
    width: auto;
    flex-direction: row;
    overflow-x: auto;
    padding-top: 0;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }
  .user-modal__nav-item {
    flex-shrink: 0;
    min-height: 40px;
    white-space: nowrap;
  }
  .user-modal__content {
    padding-left: 0;
    border-left: 0;
  }
}
.user-modal__tab-pane {
  display: none;
}

.user-modal__tab-pane.is-active {
  display: block;
}

.user-modal__section-title {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 14px 0;
}

[data-theme=dark] .user-modal__section-title {
  color: #f8fafc;
}

.user-modal__section-desc {
  font-size: 12.5px;
  color: #64748b;
  margin: -8px 0 16px 0;
}

/* Top Row: Switch + Role Pill */
.user-modal__top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
}

.user-modal__active-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-modal__toggle-label {
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  user-select: none;
}

[data-theme=dark] .user-modal__toggle-label {
  color: #cbd5e1;
}

.user-modal__role-select-wrap {
  position: relative;
}

.user-modal__role-pill-select {
  appearance: none;
  border: 1.5px solid var(--color-primary);
  background: transparent;
  color: var(--color-primary-strong-hover);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 30px 7px 16px;
  border-radius: 12px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' width='10' height='10' fill='%234f46e5'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: all 0.15s ease;
}

[data-theme=dark] .user-modal__role-pill-select {
  border-color: var(--color-primary);
  color: var(--color-primary-strong);
}

/* Fields & Character Counters */
.user-modal__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.user-modal__label {
  font-size: 11.5px;
  font-weight: 500;
  color: #64748b;
  text-transform: lowercase;
}

[data-theme=dark] .user-modal__label {
  color: #94a3b8;
}

.user-modal__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.user-modal__input {
  width: 100%;
  height: 40px;
  padding: 8px 65px 8px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 13.5px;
  color: #1e293b;
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

[data-theme=dark] .user-modal__input {
  background: #0f172a;
  border-color: #334155;
  color: #f1f5f9;
}

.user-modal__input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 15%, transparent);
}

.user-modal__input--readonly {
  background: #f8fafc;
  color: #64748b;
  cursor: not-allowed;
  padding-right: 14px;
}

[data-theme=dark] .user-modal__input--readonly {
  background: #1e293b;
  color: #94a3b8;
}

.user-modal__counter {
  position: absolute;
  right: 14px;
  font-size: 11.5px;
  color: #94a3b8;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}

/* Department Select (Lavender background) */
.user-modal__dept-select-wrap {
  position: relative;
}

.user-modal__dept-select {
  width: 100%;
  height: 40px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  padding: 8px 32px 8px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: #3730a3;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' width='10' height='10' fill='%234f46e5'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
  outline: none;
  box-sizing: border-box;
}

[data-theme=dark] .user-modal__dept-select {
  background: color-mix(in srgb, var(--color-primary) 15%, transparent);
  border-color: var(--color-primary-hover);
  color: #a5b4fc;
}

/* Permissions Radio Cards */
.user-modal__permissions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.user-modal__perm-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

[data-theme=dark] .user-modal__perm-card {
  border-color: #334155;
  background: #0f172a;
}

.user-modal__perm-card:hover {
  border-color: var(--color-primary);
  background: #fafafa;
}

[data-theme=dark] .user-modal__perm-card:hover {
  background: #1e293b;
}

.user-modal__perm-radio {
  margin-top: 3px;
  accent-color: var(--color-primary-hover);
  cursor: pointer;
}

.user-modal__perm-info strong {
  display: block;
  font-size: 13.5px;
  color: #1e293b;
  margin-bottom: 2px;
}

[data-theme=dark] .user-modal__perm-info strong {
  color: #f1f5f9;
}

.user-modal__perm-info p {
  margin: 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.35;
}

/* Exclusion Danger Banner */
.user-modal__danger-banner {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
}

[data-theme=dark] .user-modal__danger-banner {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
}

/* Footer Buttons */
.user-modal__footer {
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid #f1f5f9;
}

[data-theme=dark] .user-modal__footer {
  border-top-color: #334155;
}

.user-modal__btn-cancel {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.user-modal__btn-cancel:hover {
  background: #f1f5f9;
  color: #1e293b;
}

[data-theme=dark] .user-modal__btn-cancel:hover {
  background: #334155;
  color: #f1f5f9;
}

.user-modal__btn-save {
  background: #3b82f6;
  color: #ffffff;
  border: none;
  font-size: 13.5px;
  font-weight: 500;
  padding: 9px 26px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
  transition: all 0.15s ease;
}

.user-modal__btn-save:hover {
  background: #2563eb;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.user-modal__btn-save:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.users-mgmt-invite-btn .doc-icon {
  width: 14px;
  height: 14px;
  margin-right: 6px;
}

.users-search-box__icon {
  display: inline-flex;
}

.users-search-box__icon .doc-icon {
  width: 15px;
  height: 15px;
}

.user-cell__verified-icon .doc-icon {
  width: 13px;
  height: 13px;
  color: #10b981;
  stroke-width: 2;
}

.user-cell__reinvite-btn .doc-icon {
  width: 12px;
  height: 12px;
}

.user-row-settings-btn .doc-icon {
  width: 15px;
  height: 15px;
}

.user-actions-item .doc-icon {
  width: 14px;
  height: 14px;
  margin-right: 7px;
}

.user-modal__close .doc-icon {
  width: 16px;
  height: 16px;
}

.user-modal__nav-item .doc-icon {
  width: 16px;
  height: 16px;
  opacity: 0.85;
}

.user-modal__danger-banner > .doc-icon {
  width: 22px;
  height: 22px;
  color: #ef4444;
  flex-shrink: 0;
}

:root[data-ui-version=modern] .users-mgmt-header {
  border-bottom-color: transparent;
}
:root[data-ui-version=modern] .users-mgmt-tab {
  color: var(--color-text-muted);
}
:root[data-ui-version=modern] .users-mgmt-tab:hover {
  color: var(--color-text);
}
:root[data-ui-version=modern] .users-mgmt-tab.is-active {
  color: var(--color-primary-strong);
}
:root[data-ui-version=modern] .users-search-box__icon {
  color: var(--color-text-subtle);
}
:root[data-ui-version=modern] .users-search-box__input {
  border-color: var(--color-border-muted);
  background: var(--color-input-bg);
  color: var(--color-text);
}
:root[data-ui-version=modern] .users-search-box__input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
:root[data-ui-version=modern] .users-filter-pill__select {
  border: 1px solid var(--color-border-muted);
  border-radius: var(--radius-sm);
  background-color: var(--color-input-bg);
  color: var(--color-text);
}
:root[data-ui-version=modern] .users-filter-pill__select:hover {
  border-color: var(--color-border);
}
:root[data-ui-version=modern] .users-table-card {
  background: var(--color-surface);
  border-color: transparent;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
:root[data-ui-version=modern] .users-table th {
  background: transparent;
  border-bottom-color: var(--color-border-muted);
  color: var(--color-text-muted);
}
:root[data-ui-version=modern] .users-table td {
  border-bottom-color: var(--color-border-muted);
}
:root[data-ui-version=modern] .users-table__row:hover {
  background-color: var(--color-bg-hover);
}
:root[data-ui-version=modern] .user-cell__avatar {
  border-radius: var(--radius-sm);
}
:root[data-ui-version=modern] .user-cell__name {
  color: var(--color-text);
}
:root[data-ui-version=modern] .user-cell__email {
  color: var(--color-text-subtle);
}
:root[data-ui-version=modern] .user-cell__verified-icon .doc-icon {
  color: var(--color-success);
}
:root[data-ui-version=modern] .user-cell__reinvite-btn {
  color: var(--color-text-subtle);
}
:root[data-ui-version=modern] .user-cell__reinvite-btn:hover {
  color: var(--color-primary-strong);
  background: var(--color-primary-light);
}
:root[data-ui-version=modern] .user-switch__slider {
  background-color: var(--color-border);
}
:root[data-ui-version=modern] .user-switch__slider:before {
  box-shadow: var(--shadow-xs);
}
:root[data-ui-version=modern] .user-switch input:checked + .user-switch__slider {
  background-color: var(--color-success);
}
:root[data-ui-version=modern] .user-select-field {
  color: var(--color-text);
}
:root[data-ui-version=modern] .user-select-field:hover {
  background: var(--color-bg-hover);
  border-color: var(--color-border-muted);
}
:root[data-ui-version=modern] .user-role-select {
  border-color: color-mix(in srgb, var(--color-primary) 45%, transparent);
  color: var(--color-primary-strong);
}
:root[data-ui-version=modern] .user-role-select:hover {
  background-color: var(--color-primary-light);
}
:root[data-ui-version=modern] .user-dept-badge {
  color: var(--color-text-muted);
}
:root[data-ui-version=modern] .user-dept-badge--empty {
  color: var(--color-text-subtle);
}
:root[data-ui-version=modern] .user-date-text {
  color: var(--color-text-subtle);
}
:root[data-ui-version=modern] .users-table__sort {
  border-radius: var(--radius-sm);
}
:root[data-ui-version=modern] .users-table__sort:hover {
  color: var(--color-text);
}
:root[data-ui-version=modern] .users-table__sort:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
:root[data-ui-version=modern] .users-table__sort-icon {
  color: var(--color-text-subtle);
}
.users-table__sort:hover :root[data-ui-version=modern] .users-table__sort-icon {
  color: var(--color-text-muted);
}
:root[data-ui-version=modern] .users-table__sort.is-sorted,
:root[data-ui-version=modern] .users-table__sort.is-sorted .users-table__sort-icon {
  color: var(--color-primary-strong);
}
:root[data-ui-version=modern] .user-row-settings-btn {
  color: var(--color-text-muted);
}
:root[data-ui-version=modern] .user-row-settings-btn:hover {
  color: var(--color-primary-strong);
  background: var(--color-primary-light);
}
:root[data-ui-version=modern] .user-actions-btn {
  color: var(--color-text-muted);
}
:root[data-ui-version=modern] .user-actions-btn:hover {
  color: var(--color-text);
  background: var(--color-bg-hover);
}
:root[data-ui-version=modern] .user-actions-dropdown {
  background: var(--color-surface);
  border-color: var(--color-border-muted);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hover);
}
:root[data-ui-version=modern] .user-actions-item {
  color: var(--color-text);
}
:root[data-ui-version=modern] .user-actions-item:hover {
  background: var(--color-bg-hover);
}
:root[data-ui-version=modern] .user-modal {
  background: var(--color-surface);
  border-color: transparent;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
}
:root[data-ui-version=modern] .user-modal__title {
  color: var(--color-text);
}
:root[data-ui-version=modern] .user-modal__close {
  color: var(--color-text-muted);
}
:root[data-ui-version=modern] .user-modal__close:hover {
  color: var(--color-text);
  background: var(--color-bg-hover);
}
:root[data-ui-version=modern] .user-modal__nav-item {
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
}
:root[data-ui-version=modern] .user-modal__nav-item:hover:not(.is-active) {
  background: var(--color-bg-hover);
  color: var(--color-text);
}
:root[data-ui-version=modern] .user-modal__nav-item.is-active {
  background: var(--color-primary-tint);
  color: var(--color-primary-strong);
}
:root[data-ui-version=modern] .user-modal__content {
  border-left-color: var(--color-border-muted);
}
:root[data-ui-version=modern] .user-modal__section-title {
  color: var(--color-text);
}
:root[data-ui-version=modern] .user-modal__section-desc {
  color: var(--color-text-muted);
}
:root[data-ui-version=modern] .user-modal__toggle-label {
  color: var(--color-text);
}
:root[data-ui-version=modern] .user-modal__role-pill-select {
  border-color: color-mix(in srgb, var(--color-primary) 55%, transparent);
  color: var(--color-primary-strong);
}
:root[data-ui-version=modern] .user-modal__label {
  color: var(--color-text-muted);
}
:root[data-ui-version=modern] .user-modal__input {
  border-color: var(--color-border-muted);
  background: var(--color-input-bg);
  color: var(--color-text);
}
:root[data-ui-version=modern] .user-modal__input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
:root[data-ui-version=modern] .user-modal__input--readonly {
  background: var(--color-bg-muted);
  color: var(--color-text-subtle);
}
:root[data-ui-version=modern] .user-modal__counter {
  color: var(--color-text-subtle);
}
:root[data-ui-version=modern] .user-modal__dept-select {
  background: var(--color-primary-tint);
  border-color: color-mix(in srgb, var(--color-primary) 30%, transparent);
  color: var(--color-primary-strong);
}
:root[data-ui-version=modern] .user-modal__perm-card {
  border-color: var(--color-border-muted);
  border-radius: var(--radius-md);
}
:root[data-ui-version=modern] .user-modal__perm-card:hover {
  border-color: color-mix(in srgb, var(--color-primary) 45%, transparent);
  background: var(--color-bg-hover);
}
:root[data-ui-version=modern] .user-modal__perm-radio {
  accent-color: var(--color-primary);
}
:root[data-ui-version=modern] .user-modal__perm-info strong {
  color: var(--color-text);
}
:root[data-ui-version=modern] .user-modal__perm-info p {
  color: var(--color-text-muted);
}
:root[data-ui-version=modern] .user-modal__danger-banner {
  background: var(--color-danger-bg);
  border-color: var(--color-danger-border);
}
:root[data-ui-version=modern] .user-modal__danger-banner > .doc-icon {
  color: var(--color-danger-text);
}
:root[data-ui-version=modern] .user-modal__btn-cancel {
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
}
:root[data-ui-version=modern] .user-modal__btn-cancel:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}
:root[data-ui-version=modern] .user-modal__btn-save {
  background: var(--color-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}
:root[data-ui-version=modern] .user-modal__btn-save:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-sm);
}

.dashboard-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.dashboard-hero {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
  background-color: var(--color-surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.dashboard-hero__bg {
  height: 100px;
  background: linear-gradient(135deg, #FF6B6B 0%, #FFD93D 25%, #4ECDC4 50%, #6BCB77 75%, #4D96FF 100%);
  background-size: 200% 200%;
  animation: gradient-shift 10s ease infinite;
}
.dashboard-hero__content {
  padding: 0 24px 24px;
  display: flex;
  align-items: flex-end;
  margin-top: -32px;
}
.dashboard-hero__content h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: var(--color-text);
  padding-bottom: 4px;
}

@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
.dashboard-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.widget-card {
  background: var(--color-surface);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}
.widget-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.widget-card__head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text);
}
.widget-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
}
.widget-card__more {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 20px;
  line-height: 1;
  padding: 0 4px;
  border-radius: 4px;
}
.widget-card__more:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}
.widget-card__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.widget-card__empty {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0;
  text-align: center;
  padding: 16px 0;
}

.widget-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--color-text);
  transition: background-color 0.2s;
}
.widget-item:hover {
  background-color: var(--color-bg-hover);
}
.widget-item__icon {
  font-size: 16px;
  flex-shrink: 0;
}
.widget-item__text {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.widget-item__title {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.widget-item__space {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-left: 6px;
  flex-shrink: 0;
}
.widget-item__star {
  color: var(--color-primary-strong);
  flex-shrink: 0;
}
.widget-item__time {
  font-size: 11px;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.dashboard-feed {
  background: var(--color-surface);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.dashboard-feed__head {
  margin-bottom: 24px;
}

.feed-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}
.feed-filters__pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.feed-filter-pill {
  padding: 6px 12px;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--color-text);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s;
}
.feed-filter-pill:hover {
  background-color: var(--color-bg-hover);
}
.feed-filter-pill.is-active {
  background-color: var(--color-primary-tint);
  color: var(--color-primary-strong);
  border-color: var(--color-primary);
}

.feed-filter-reset {
  background: none;
  border: none;
  font-size: 13px;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 6px 12px;
}
.feed-filter-reset:hover {
  color: var(--color-text);
  text-decoration: underline;
}

.author-page {
  display: flex;
  gap: 32px;
  padding: 24px 32px 60px;
  max-width: 1400px;
  margin: 0 auto;
}
@media (max-width: 720px) {
  .author-page {
    flex-direction: column;
  }
}
.author-page__sidebar {
  width: 220px;
  flex-shrink: 0;
}
.author-page__identity {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.author-page__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}
.author-page__avatar--initial {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
}
.author-page__name {
  font-weight: 600;
  color: var(--color-text);
}
.author-page__role {
  font-size: 12px;
  color: var(--color-text-muted);
}
.author-page__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 22px;
}
.author-page__stats svg {
  vertical-align: -2px;
  margin-right: 3px;
}
.author-page__spaces-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}
.author-page__space-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 0;
  color: var(--color-text);
  text-decoration: none;
  font-size: 13px;
}
.author-page__space-link svg {
  flex-shrink: 0;
  color: var(--color-text-muted);
}
.author-page__space-link:hover {
  color: var(--color-primary-strong);
}
.author-page__main {
  flex: 1;
  min-width: 0;
}
.author-page__toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}
.author-page__tabs {
  display: flex;
  gap: 4px;
}
.author-page__tab {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--color-text-muted);
  text-decoration: none;
}
.author-page__tab:hover {
  background: var(--color-bg-hover);
}
.author-page__tab.is-active {
  background: var(--color-primary-tint);
  color: var(--color-primary-strong);
  font-weight: 600;
}
.author-page__search input {
  min-width: 240px;
}

:root[data-ui-version=modern] .dashboard-hero,
:root[data-ui-version=modern] .widget-card,
:root[data-ui-version=modern] .dashboard-feed {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
:root[data-ui-version=modern] .feed-filter-pill {
  border-radius: var(--radius-pill);
}

:root[data-ui-version=modern] .widget-card {
  border: 1px solid var(--color-border-muted);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
:root[data-ui-version=modern] .widget-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}
:root[data-ui-version=modern] .widget-card__head h3 {
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
}
:root[data-ui-version=modern] .widget-item {
  transition: background-color 0.15s ease;
}

.doc-discussion-section {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  max-width: 900px;
}

.doc-children-section {
  margin-top: 40px;
  max-width: 900px;
}
.doc-children-section__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 12px;
}

.doc-backlinks-section {
  margin-top: 28px;
  max-width: 900px;
}

.doc-backlinks-accordion {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-surface);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.doc-backlinks-accordion[open] {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}
.doc-backlinks-accordion__summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text);
  background: var(--color-bg);
  transition: background 0.15s ease;
}
.doc-backlinks-accordion__summary::-webkit-details-marker {
  display: none;
}
.doc-backlinks-accordion__summary:hover {
  background: var(--color-bg-hover);
}
.doc-backlinks-accordion__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary-strong);
  opacity: 0.9;
}
.doc-backlinks-accordion__title {
  flex: 1;
  letter-spacing: -0.01em;
}
.doc-backlinks-accordion__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  background: var(--color-primary-tint);
  color: var(--color-primary-strong);
}
.doc-backlinks-accordion__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: transform 0.2s ease;
}
.doc-backlinks-accordion[open] .doc-backlinks-accordion__arrow {
  transform: rotate(180deg);
}
.doc-backlinks-accordion .doc-backlinks-list {
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--color-border);
}

.doc-audit-section {
  margin-top: 28px;
  max-width: 900px;
}

.doc-audit-trail {
  background: var(--color-bg-subtle, var(--color-surface));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.doc-audit-trail__summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text);
  background: transparent;
}
.doc-audit-trail__summary::before {
  display: none;
}
.doc-audit-trail__summary::-webkit-details-marker {
  display: none;
}
.doc-audit-trail__summary:hover {
  background: var(--color-bg-hover);
}
.doc-audit-trail__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary-strong);
  opacity: 0.9;
}
.doc-audit-trail__title {
  flex: 1;
  letter-spacing: -0.01em;
}
.doc-audit-trail__badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
}
.doc-audit-trail__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  background: var(--color-primary-tint);
  color: var(--color-primary-strong);
}
.doc-audit-trail__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: transform 0.2s ease;
}
.doc-audit-trail[open] .doc-audit-trail__arrow {
  transform: rotate(180deg);
}
.doc-audit-trail[open] > .doc-audit-trail__summary {
  background: transparent;
  border-bottom: none;
}
.doc-audit-trail__body {
  padding: 4px 18px 16px;
}
.doc-audit-trail__table {
  width: 100%;
  font-size: 13px;
}
.doc-audit-trail__table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.doc-audit-trail__table td {
  vertical-align: top;
  padding: 9px 12px 9px 0;
}
.doc-audit-trail__table tr:last-child td {
  border-bottom: none;
}
.doc-audit-trail__when {
  white-space: nowrap;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}
.doc-audit-trail__ip {
  font-variant-numeric: tabular-nums;
}
.doc-audit-trail__noip {
  color: var(--color-text-muted);
  font-style: italic;
}
.doc-audit-trail__action {
  font-weight: 600;
}
.doc-audit-trail__detail {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 400;
  color: var(--color-text-muted);
}
.doc-audit-trail__footnote {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--color-text-muted);
}

.doc-discussion-tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 24px;
}
.doc-discussion-tabs__item {
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-muted);
  padding: 0 0 12px 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.doc-discussion-tabs__item:hover {
  color: var(--color-text);
}
.doc-discussion-tabs__item.is-active {
  color: var(--color-primary-strong);
  border-bottom-color: var(--color-primary);
}
.doc-discussion-tabs__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 10px;
  background: var(--color-bg-hover);
  color: var(--color-text-muted);
}
.is-active .doc-discussion-tabs__badge {
  background: var(--color-primary-tint);
  color: var(--color-primary-strong);
}

.doc-comments-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.doc-comments-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.discussion-msg {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.discussion-msg--reply {
  margin-left: 44px;
  position: relative;
}
.discussion-msg--reply::before {
  content: "";
  position: absolute;
  left: -22px;
  top: -10px;
  bottom: 14px;
  width: 2px;
  background: var(--color-border);
  border-radius: 2px;
}
.discussion-msg__avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  color: #fff;
  background: var(--color-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.discussion-msg__card {
  flex: 1;
  min-width: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: border-color 0.15s ease;
}
.discussion-msg__card:hover {
  border-color: color-mix(in srgb, var(--color-primary) 30%, var(--color-border));
}
.discussion-msg__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.discussion-msg__author {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}
.discussion-msg__date {
  font-size: 11px;
  color: var(--color-text-muted);
}
.discussion-msg__text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text);
  white-space: pre-wrap;
  word-break: break-word;
}
.discussion-msg__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--color-border-muted, rgba(0, 0, 0, 0.04));
}
.discussion-msg__action-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s ease;
}
.discussion-msg__action-btn:hover {
  color: var(--color-primary-strong);
}
.discussion-msg__action-btn--danger:hover {
  color: var(--color-danger, #ef4444);
}

.doc-comment-editor {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 10px;
}
.doc-comment-editor__box {
  flex: 1;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.doc-comment-editor__box:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-tint, rgba(59, 130, 246, 0.1));
}
.doc-comment-editor__textarea {
  width: 100%;
  border: none;
  background: transparent;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--color-text);
  min-height: 52px;
  max-height: 200px;
  resize: none;
  outline: none;
  font-family: inherit;
}
.doc-comment-editor__textarea::placeholder {
  color: var(--color-text-muted);
}
.doc-comment-editor__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--color-bg, #f8fafc);
  border-top: 1px solid var(--color-border);
}
.doc-comment-editor__tools {
  display: flex;
  align-items: center;
  gap: 6px;
}
.doc-comment-editor__tool-btn {
  background: none;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.doc-comment-editor__tool-btn:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}

.doc-reply-box {
  margin-top: 10px;
  background: var(--color-bg, #f8fafc);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.doc-reply-box__textarea {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--color-text);
  min-height: 38px;
  resize: vertical;
  outline: none;
  font-family: inherit;
}
.doc-reply-box__textarea:focus {
  border-color: var(--color-primary);
}
.doc-reply-box__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.doc-attachments-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.doc-dropzone {
  border: 2px dashed var(--color-border);
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  background: var(--color-bg, #f8fafc);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.doc-dropzone:hover, .doc-dropzone.is-dragover {
  border-color: var(--color-primary);
  background: var(--color-primary-tint, rgba(59, 130, 246, 0.05));
}
.doc-dropzone__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-primary-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.doc-dropzone__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}
.doc-dropzone__hint {
  font-size: 12px;
  color: var(--color-text-muted);
}

.doc-attachments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.doc-file-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 12px;
  text-decoration: none;
  color: var(--color-text);
  position: relative;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.15s ease;
}
.doc-file-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}
.doc-file-card__icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--color-bg, #f1f5f9);
  color: var(--color-primary-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
}
.doc-file-card__info {
  flex: 1;
  min-width: 0;
}
.doc-file-card__name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  color: var(--color-text);
  margin-bottom: 2px;
}
.doc-file-card__meta {
  font-size: 11px;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.doc-file-card__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.doc-file-card__btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.doc-file-card__btn:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}
.doc-file-card__btn--delete:hover {
  color: var(--color-danger, #ef4444);
  background: rgba(239, 68, 68, 0.1);
}

.discussion-msg__action-btn .doc-icon {
  width: 12px;
  height: 12px;
}

.doc-file-card__btn .doc-icon {
  width: 14px;
  height: 14px;
}

.whiteboard-container {
  position: relative;
  width: 100%;
  height: calc(100vh - var(--header-height, 60px) - 180px);
  min-height: 650px;
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  margin: 16px 0 24px;
  user-select: none;
}
.whiteboard-container.is-fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  border-radius: 0;
  margin: 0;
  border: none;
}

.whiteboard-top-actions {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--color-border, #e2e8f0);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
[data-theme=dark] .whiteboard-top-actions {
  background: rgba(30, 41, 59, 0.88);
  border-color: #334155;
}

.whiteboard-status-badge {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted, #64748b);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-right: 6px;
  border-right: 1px solid var(--color-border, #e2e8f0);
}
.whiteboard-status-badge::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  transition: background 0.2s ease;
}
.whiteboard-status-badge.is-saving {
  color: var(--color-primary-strong);
}
.whiteboard-status-badge.is-saving::before {
  background: #eab308;
  animation: wbPulse 1s infinite alternate;
}
.whiteboard-status-badge.is-error {
  color: #ef4444;
}
.whiteboard-status-badge.is-error::before {
  background: #ef4444;
}

@keyframes wbPulse {
  from {
    opacity: 0.4;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1.15);
  }
}
.whiteboard-viewport {
  flex: 1;
  width: 100%;
  height: 100%;
  position: relative;
  cursor: default;
  touch-action: none;
  background-color: var(--color-surface, #ffffff);
  background-image: radial-gradient(var(--color-border, #e2e8f0) 1px, transparent 1px);
  background-size: 24px 24px;
  overflow: hidden;
}
[data-theme=dark] .whiteboard-viewport {
  background-color: #0f172a;
  background-image: radial-gradient(#334155 1px, transparent 1px);
}
.whiteboard-viewport.is-panning {
  cursor: grab;
}
.whiteboard-viewport.is-grabbing {
  cursor: grabbing;
}
.whiteboard-viewport.is-drawing {
  cursor: crosshair;
}

.whiteboard-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

.whiteboard-toolbar {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  padding: 6px 8px;
  border-radius: 12px;
  border: 1px solid var(--color-border, #e2e8f0);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
[data-theme=dark] .whiteboard-toolbar {
  background: rgba(30, 41, 59, 0.92);
  border-color: #334155;
}
.whiteboard-toolbar .wb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-text, #334155);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}
.whiteboard-toolbar .wb-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--color-primary-strong);
}
[data-theme=dark] .whiteboard-toolbar .wb-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}
.whiteboard-toolbar .wb-btn.is-active {
  background: var(--color-primary, #0969da);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(9, 105, 218, 0.3);
}
.whiteboard-toolbar .wb-btn svg {
  width: 18px;
  height: 18px;
}
.whiteboard-toolbar .wb-divider {
  width: 1px;
  height: 24px;
  background: var(--color-border, #e2e8f0);
  margin: 0 4px;
}
[data-theme=dark] .whiteboard-toolbar .wb-divider {
  background: #334155;
}

.whiteboard-props-bar {
  position: absolute;
  bottom: 74px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 28;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid var(--color-border, #e2e8f0);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  transition: opacity 0.2s, transform 0.2s;
}
[data-theme=dark] .whiteboard-props-bar {
  background: rgba(30, 41, 59, 0.94);
  border-color: #334155;
}
.whiteboard-props-bar .wb-color-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}
.whiteboard-props-bar .wb-color-dot:hover {
  transform: scale(1.15);
}
.whiteboard-props-bar .wb-color-dot.is-active {
  border-color: var(--color-text, #0f172a);
  transform: scale(1.2);
}
.whiteboard-props-bar .wb-stroke-select {
  height: 28px;
  font-size: 12px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid var(--color-border, #e2e8f0);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
}

.whiteboard-zoom-controls {
  position: absolute;
  bottom: 18px;
  left: 18px;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid var(--color-border, #e2e8f0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
[data-theme=dark] .whiteboard-zoom-controls {
  background: rgba(30, 41, 59, 0.88);
  border-color: #334155;
}
.whiteboard-zoom-controls button {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 600;
}
.whiteboard-zoom-controls button:hover {
  background: rgba(0, 0, 0, 0.05);
}
[data-theme=dark] .whiteboard-zoom-controls button:hover {
  background: rgba(255, 255, 255, 0.08);
}
.whiteboard-zoom-controls .wb-zoom-label {
  font-size: 12px;
  font-weight: 500;
  min-width: 44px;
  text-align: center;
  color: var(--color-text-muted);
}

.ai-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--color-primary-strong) 0%, var(--color-primary-strong-hover) 50%, var(--color-primary-strong-hover) 100%);
  color: #fff;
  box-shadow: 0 6px 20px color-mix(in srgb, var(--color-primary) 45%, transparent), 0 2px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, background 0.2s ease;
  user-select: none;
  outline: none;
}
.ai-fab__icon-sparkle {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.ai-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 26px color-mix(in srgb, var(--color-primary) 55%, transparent), 0 3px 8px rgba(0, 0, 0, 0.14);
}
.ai-fab:active {
  transform: scale(0.96);
}

.ai-msg {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.ai-msg__avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
  background: #f1f5f9;
}
.ai-msg__content {
  flex: 1;
  min-width: 0;
}
.ai-msg__bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg, #f8fafc);
  border: 1px solid var(--color-border, #e2e8f0);
  word-break: break-word;
}
.ai-msg__bubble p {
  margin: 0 0 6px;
}
.ai-msg__bubble p:last-child {
  margin-bottom: 0;
}
.ai-msg__bubble ul, .ai-msg__bubble ol {
  margin: 4px 0 4px 16px;
  padding: 0;
}
.ai-msg__bubble li {
  margin-bottom: 3px;
}
.ai-msg--user {
  flex-direction: row-reverse;
}
.ai-msg--user .ai-msg__avatar {
  background: var(--color-primary-tint);
  color: var(--color-primary-strong);
}
.ai-msg--user .ai-msg__bubble {
  background: var(--color-primary-strong);
  color: #fff;
  border-color: var(--color-primary);
  border-bottom-right-radius: 4px;
}
.ai-msg--assistant .ai-msg__avatar {
  background: var(--color-primary-tint);
  color: var(--color-primary-strong);
}
.ai-msg--assistant .ai-msg__bubble {
  background: var(--color-surface, #fff);
  border-bottom-left-radius: 4px;
}
.ai-msg__sources {
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--color-bg, #f8fafc);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 8px;
}
.ai-msg__sources-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted, #64748b);
  margin-bottom: 4px;
  text-transform: uppercase;
}
.ai-msg__sources-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.ai-msg__model {
  font-size: 11px;
  color: var(--color-text-muted, #94a3b8);
  margin-top: 4px;
}

.ai-citation-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-primary-strong);
  background: var(--color-primary-tint);
  padding: 1px 6px;
  border-radius: 5px;
  text-decoration: none;
  margin: 0 3px;
  vertical-align: baseline;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ai-citation-badge:hover {
  background: var(--color-primary-strong);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px color-mix(in srgb, var(--color-primary) 25%, transparent);
}

.ai-citation-unverified {
  border-bottom: 2px dashed #f59e0b;
  cursor: help;
}

.ai-sources-shelf {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--color-bg, #f8fafc);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 10px;
}
.ai-sources-shelf__label {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-muted, #64748b);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ai-sources-shelf__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ai-source-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 420px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #cbd5e1);
  color: var(--color-text);
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.ai-source-card__head {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.ai-source-card__index {
  flex-shrink: 0;
  font-weight: 700;
  color: var(--color-primary-strong);
}
.ai-source-card__title {
  font-weight: 600;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.ai-source-card__quote {
  margin: 0;
  padding-left: 8px;
  border-left: 2px solid var(--color-border, #cbd5e1);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--color-text-muted, #64748b);
  font-style: italic;
}
.ai-source-card__link {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-primary-strong);
}
.ai-source-card:hover {
  border-color: var(--color-primary, #7c3aed);
  box-shadow: 0 2px 6px color-mix(in srgb, var(--color-primary) 12%, transparent);
  transform: translateY(-1px);
}
.ai-source-card:hover .ai-source-card__quote {
  border-left-color: var(--color-primary, #7c3aed);
}

.ai-depth-limit {
  margin-bottom: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--color-danger, #dc2626) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-danger, #dc2626) 35%, transparent);
  color: var(--color-danger, #dc2626);
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
}

.ai-page-input-card__textarea:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.ai-scope-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: var(--color-text);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s ease;
  font-family: inherit;
}
.ai-scope-tag__badge {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #3b82f6;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.ai-scope-tag__text {
  font-size: 12px;
  color: var(--color-text-muted, #64748b);
}
.ai-scope-tag:hover {
  background: var(--color-bg-hover, #f1f5f9);
}

.ai-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
}
.ai-typing-dots span {
  width: 5px;
  height: 5px;
  background: var(--color-primary-strong);
  border-radius: 50%;
  animation: aiBounce 1.4s infinite ease-in-out both;
}
.ai-typing-dots span:nth-child(1) {
  animation-delay: -0.32s;
}
.ai-typing-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes aiBounce {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}
.quick-notes-fab {
  position: fixed;
  bottom: 88px;
  right: 24px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.4), 0 2px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9997;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, background 0.2s ease;
  user-select: none;
  outline: none;
}
.quick-notes-fab__icon-open {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.quick-notes-fab__icon-close {
  display: none;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  transition: transform 0.25s ease;
}
.quick-notes-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 26px rgba(234, 88, 12, 0.5), 0 3px 8px rgba(0, 0, 0, 0.14);
}
.quick-notes-fab:active {
  transform: scale(0.96);
}
.quick-notes-fab.is-open {
  background: linear-gradient(135deg, #d97706, #c2410c);
}
.quick-notes-fab.is-open .quick-notes-fab__icon-open {
  display: none;
}
.quick-notes-fab.is-open .quick-notes-fab__icon-close {
  display: block;
}

.quick-notes-widget {
  position: fixed;
  bottom: 152px;
  right: 24px;
  width: 340px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 110px);
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #d0d7de);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  pointer-events: none;
  z-index: 9996;
  transition: opacity 0.2s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.quick-notes-widget.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.quick-notes-widget__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border, #d0d7de);
  flex-shrink: 0;
}
.quick-notes-widget__title {
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text, #24292f);
}
.quick-notes-widget__status {
  font-size: 12px;
  color: var(--color-text-muted, #57606a);
}
.quick-notes-widget__status.is-error {
  color: var(--color-danger, #cf222e);
}
.quick-notes-widget__textarea {
  flex: 1;
  min-height: 180px;
  resize: vertical;
  border: none;
  outline: none;
  padding: 14px;
  font: inherit;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--color-text, #24292f);
  background: transparent;
}
.quick-notes-widget__textarea::placeholder {
  color: var(--color-text-muted, #8b949e);
}
.quick-notes-widget__convert-box {
  padding: 12px 14px;
  border-top: 1px solid var(--color-border, #d0d7de);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}
.quick-notes-widget__convert-box .field {
  margin: 0;
}
.quick-notes-widget__convert-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.quick-notes-widget__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--color-border, #d0d7de);
  flex-shrink: 0;
}
.quick-notes-widget__save {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.quick-notes-widget__save .doc-icon {
  width: 16px;
  height: 16px;
}
@media (max-width: 768px) {
  .quick-notes-widget__save {
    min-height: 40px;
  }
}

body.ai-chat-body {
  overflow: hidden;
  height: 100vh;
}
body.ai-chat-body .topbar, body.ai-chat-body .space-nav, body.ai-chat-body .space-nav-backdrop {
  display: none !important;
}
body.ai-chat-body .workspace__main {
  padding: 0 !important;
  margin: 0 !important;
  height: 100vh;
  max-width: 100vw;
}

.ai-page {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background: var(--color-surface, #fff);
}
.ai-page__sidebar {
  width: 280px;
  min-width: 280px;
  height: 100%;
  border-right: 1px solid var(--color-border, #e2e8f0);
  background: var(--color-bg, #f8fafc);
  display: flex;
  flex-direction: column;
  transition: width 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s ease, min-width 0.22s ease;
  z-index: 10;
}
.ai-page__sidebar.is-collapsed {
  width: 0;
  min-width: 0;
  overflow: hidden;
  border-right: none;
  transform: translateX(-100%);
}
.ai-page__sidebar-head {
  padding: 18px 20px 14px;
  display: flex;
  align-items: center;
}
.ai-page__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--color-text);
  font-size: 16px;
  font-weight: 700;
}
.ai-page__logo-icon {
  font-size: 18px;
  color: var(--color-primary-strong);
}
.ai-page__new-wrap {
  padding: 0 16px 14px;
}
.ai-page__new-btn {
  width: 100%;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--color-primary-tint);
  color: var(--color-primary-strong);
  border: 1px solid color-mix(in srgb, var(--color-primary) 20%, transparent);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s ease;
}
.ai-page__new-btn:hover {
  background: #ddd6fe;
  transform: translateY(-1px);
}
.ai-page__history {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ai-page__empty-sidebar {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: var(--color-text-muted, #94a3b8);
  font-size: 13.5px;
}
.ai-page__sidebar-foot {
  padding: 12px 16px;
  border-top: 1px solid var(--color-border, #e2e8f0);
  margin-top: auto;
}
.ai-page__sidebar-back-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--color-text-muted, #64748b);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
}
.ai-page__sidebar-back-link svg {
  transition: transform 0.15s ease;
}
.ai-page__sidebar-back-link:hover {
  background: var(--color-bg-hover, #f1f5f9);
  color: var(--color-text, #1e293b);
}
.ai-page__sidebar-back-link:hover svg {
  transform: translateX(-2px);
}
.ai-page__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  background: var(--color-surface, #fff);
}
.ai-page__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-bottom: 1px solid var(--color-border, #e2e8f0);
  height: 56px;
  flex-shrink: 0;
}
.ai-page__topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ai-page__topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ai-page__back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--color-border, #cbd5e1);
  background: var(--color-surface, #fff);
  color: var(--color-text, #334155);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
}
.ai-page__back-btn svg {
  transition: transform 0.15s ease;
}
.ai-page__back-btn:hover {
  background: #f8fafc;
  color: var(--color-primary-strong);
  border-color: #93c5fd;
}
.ai-page__back-btn:hover svg {
  transform: translateX(-2px);
}
.ai-page__icon-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--color-text-muted, #64748b);
  cursor: pointer;
  transition: all 0.15s ease;
}
.ai-page__icon-btn:hover {
  background: var(--color-bg-hover, #f1f5f9);
  color: var(--color-text);
}
.ai-page__chat-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  color: var(--color-text);
  max-width: 400px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ai-page__content {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.ai-page__welcome {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.ai-page__hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 760px;
  width: 100%;
}
.ai-page__chat-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.ai-page__messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20% 24px 20%;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
@media (max-width: 1024px) {
  .ai-page__messages {
    padding: 20px 24px;
  }
}
.ai-page__chat-footer {
  padding: 16px 20% 24px 20%;
  background: var(--color-surface, #fff);
  border-top: 1px solid var(--color-border, #e2e8f0);
  flex-shrink: 0;
}
@media (max-width: 1024px) {
  .ai-page__chat-footer {
    padding: 14px 24px 18px;
  }
}
.ai-page__chat-footer .ai-page-input-card {
  width: 100%;
  max-width: 100%;
}

.ai-history-group__title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--color-text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 8px 6px;
}
.ai-history-group__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ai-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 10px;
  transition: background 0.15s ease;
}
.ai-history-item__link {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--color-text);
  font-size: 13.5px;
  min-width: 0;
}
.ai-history-item__title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ai-history-item__actions {
  display: none;
  align-items: center;
  gap: 4px;
}
.ai-history-item:hover {
  background: var(--color-bg-hover, #e2e8f0);
}
.ai-history-item:hover .ai-history-item__actions {
  display: flex;
}
.ai-history-item.is-active {
  background: var(--color-primary-tint);
  color: var(--color-primary-strong);
}
.ai-history-item.is-active .ai-history-item__link {
  color: var(--color-primary-strong);
  font-weight: 600;
}

.ai-item-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  padding: 2px 4px;
  border-radius: 4px;
  opacity: 0.65;
  transition: opacity 0.15s ease;
}
.ai-item-btn:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.06);
}

.ai-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--color-border, #cbd5e1);
  background: var(--color-surface, #fff);
  color: var(--color-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ai-share-btn:hover {
  background: #faf5ff;
  border-color: var(--color-primary);
  color: var(--color-primary-strong);
}

.ai-hero-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--color-text);
  margin-bottom: 32px;
}
.ai-hero-logo__icon {
  font-size: 32px;
  color: var(--color-primary-strong);
}

.ai-page-input-card {
  width: 680px;
  max-width: 90vw;
  border: 1.5px solid #cbd5e1;
  border-radius: 18px;
  background: var(--color-surface, #fff);
  padding: 14px 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.ai-page-input-card:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 15%, transparent);
}
.ai-page-input-card__textarea {
  border: none;
  outline: none;
  background: transparent;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--color-text);
  width: 100%;
  resize: none;
  font-family: inherit;
  max-height: 160px;
}
.ai-page-input-card__textarea::placeholder {
  color: var(--color-text-muted, #94a3b8);
}
.ai-page-input-card__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
}

.ai-page-send-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: #f1f5f9;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ai-page-send-btn:hover {
  background: var(--color-primary-strong);
  color: #fff;
  transform: scale(1.05);
}

.ai-page-prompts-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  width: 680px;
  max-width: 90vw;
  margin-top: 40px;
  text-align: left;
}
@media (max-width: 640px) {
  .ai-page-prompts-columns {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.ai-page-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ai-page-col__title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-text-muted, #94a3b8);
  margin-bottom: 4px;
}

.ai-page-prompts-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ai-page-prompt-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
  font-family: inherit;
  width: 100%;
  text-align: left;
}
.ai-page-prompt-item__icon {
  font-size: 15px;
  flex-shrink: 0;
}
.ai-page-prompt-item__text {
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.3;
}
.ai-page-prompt-item:hover {
  background: #faf5ff;
  color: var(--color-primary-strong);
}

.ai-scope-tag--static {
  cursor: default;
}
.ai-scope-tag--static:hover {
  background: transparent;
}

.modal--ai-share {
  max-width: 480px;
  width: 100%;
}

.share-add-row {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}
.share-add-row .share-role-select {
  width: 130px;
  flex-shrink: 0;
}

.share-list-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.share-list-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted, #64748b);
  text-transform: uppercase;
}

.share-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
}

.share-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--color-bg, #f8fafc);
  border: 1px solid var(--color-border, #e2e8f0);
}
.share-row__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.share-row__info strong {
  font-size: 13px;
}
.share-row__info small {
  font-size: 11.5px;
  color: var(--color-text-muted, #64748b);
}

.btn-remove-share {
  border: none;
  background: transparent;
  color: #ef4444;
  cursor: pointer;
  font-size: 14px;
  padding: 4px 6px;
  border-radius: 4px;
}
.btn-remove-share:hover {
  background: #fee2e2;
}

.share-empty {
  font-size: 13px;
  color: var(--color-text-muted, #94a3b8);
  font-style: italic;
  padding: 8px 0;
}

.ai-page__new-btn .doc-icon {
  width: 16px;
  height: 16px;
}

.ai-page__sidebar-back-link .doc-icon,
.ai-page__back-btn .doc-icon {
  width: 14px;
  height: 14px;
}

.ai-page__icon-btn .doc-icon {
  width: 15px;
  height: 15px;
}

.ai-page__topbar .ai-page__icon-btn .doc-icon {
  width: 16px;
  height: 16px;
}

.ai-share-btn .doc-icon {
  width: 14px;
  height: 14px;
}

.ai-item-btn .doc-icon {
  width: 13px;
  height: 13px;
}

.ai-history-item__actions .ai-item-btn .doc-icon {
  width: 14px;
  height: 14px;
}

.btn-remove-share .doc-icon {
  width: 14px;
  height: 14px;
}

.ai-page--space .ai-page__sidebar {
  display: none;
}

.ai-sources-col {
  width: 260px;
  min-width: 260px;
  height: 100%;
  border-right: 1px solid var(--color-border, #e2e8f0);
  background: var(--color-bg, #f8fafc);
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.ai-sources-col__head {
  padding: 16px 16px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ai-sources-col__space {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--color-text);
  min-width: 0;
}
.ai-sources-col__space-icon {
  font-size: 18px;
  flex-shrink: 0;
}
.ai-sources-col__space-name {
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ai-sources-col__label {
  padding: 0 16px 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--color-text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ai-sources-col__tree {
  flex: 1;
  overflow-y: auto;
  padding: 0 8px 12px;
}
.ai-sources-col__head-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.ai-sources-col-rail {
  width: 28px;
  min-width: 28px;
  height: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 16px;
  border: none;
  border-right: 1px solid var(--color-border, #e2e8f0);
  background: var(--color-bg, #f8fafc);
  color: var(--color-text-muted, #94a3b8);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.ai-sources-col-rail:hover {
  background: var(--color-surface, #fff);
  color: var(--color-primary-strong);
}

.ai-source-tree {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ai-source-tree__children {
  list-style: none;
  margin: 0;
  padding-left: 14px;
}
.ai-source-tree__link {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: none;
  background: transparent;
  border-radius: 8px;
  color: var(--color-text);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease;
}
.ai-source-tree__link:hover {
  background: var(--color-bg-hover, #e2e8f0);
}
.ai-source-tree__icon {
  flex-shrink: 0;
  font-size: 13px;
}
.ai-source-tree__title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.ai-scope-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: var(--color-bg, #f1f5f9);
  border: 1px solid var(--color-border, #e2e8f0);
}
.ai-scope-toggle__opt {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  color: var(--color-text-muted, #64748b);
  transition: all 0.15s ease;
}
.ai-scope-toggle__opt.is-active {
  background: var(--color-surface, #fff);
  color: var(--color-primary-strong);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.ai-scope-toggle__opt:not(.is-active):hover {
  color: var(--color-text);
}

.ai-history-drawer {
  position: fixed;
  inset: 0;
  z-index: 40;
}
.ai-history-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.ai-history-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 320px;
  max-width: 88vw;
  background: var(--color-surface, #fff);
  border-left: 1px solid var(--color-border, #e2e8f0);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.ai-history-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--color-border, #e2e8f0);
  font-size: 14px;
}
.ai-history-drawer.is-open .ai-history-drawer__backdrop {
  opacity: 1;
}
.ai-history-drawer.is-open .ai-history-drawer__panel {
  transform: translateX(0);
}

.ai-doc-reader {
  position: fixed;
  inset: 0;
  z-index: 50;
}
.ai-doc-reader__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.ai-doc-reader__panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 720px;
  max-width: 92vw;
  background: var(--color-surface, #fff);
  border-left: 1px solid var(--color-border, #e2e8f0);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.08);
}
.ai-doc-reader__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-border, #e2e8f0);
  flex-shrink: 0;
}
.ai-doc-reader__title {
  flex: 1;
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.ai-doc-reader__open-link {
  font-size: 12.5px;
  color: var(--color-primary-strong);
  text-decoration: none;
  white-space: nowrap;
}
.ai-doc-reader__open-link:hover {
  text-decoration: underline;
}
.ai-doc-reader__body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
}
.ai-doc-reader.is-open .ai-doc-reader__backdrop {
  opacity: 1;
}
.ai-doc-reader.is-open .ai-doc-reader__panel {
  transform: translateX(0);
}

.ai-page--space-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  width: 100vw;
  padding: 24px;
}

.ai-empty-state {
  max-width: 420px;
  text-align: center;
}
.ai-empty-state__icon {
  font-size: 40px;
  margin-bottom: 16px;
}
.ai-empty-state__title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--color-text);
}
.ai-empty-state__text {
  font-size: 13.5px;
  color: var(--color-text-muted, #64748b);
  line-height: 1.5;
  margin: 0 0 20px;
}

.ai-assist-toolbar-btn {
  width: auto !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 8px !important;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 6px;
  color: var(--color-text) !important;
  background: transparent;
}
.ai-assist-toolbar-btn:hover {
  background: var(--color-bg-hover) !important;
  color: var(--color-primary-strong) !important;
}

.ai-assist-selection-btn {
  position: absolute;
  z-index: 999;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}
.ai-assist-selection-btn:hover {
  filter: brightness(1.08);
}

.ai-assist-popup {
  position: absolute;
  z-index: 1000;
  width: 320px;
  max-width: calc(100vw - 24px);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  font-size: 13px;
  color: var(--color-text);
}
.ai-assist-popup__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
  font-weight: 600;
  cursor: grab;
  user-select: none;
}
.ai-assist-popup__head:active {
  cursor: grabbing;
}
.ai-assist-popup__close {
  background: none;
  border: none;
  font-size: 18px;
  line-height: 1;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 0 4px;
}
.ai-assist-popup__close:hover {
  color: var(--color-text);
}
.ai-assist-popup__body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ai-assist-popup__templates {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ai-assist-popup__chip {
  background: var(--color-bg-hover);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  color: var(--color-text);
}
.ai-assist-popup__chip:hover {
  background: var(--color-border);
}
.ai-assist-popup__kb-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--color-text-muted);
  cursor: pointer;
  user-select: none;
}
.ai-assist-popup__edit-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.ai-assist-popup__input-row {
  display: flex;
  gap: 6px;
}
.ai-assist-popup__input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 13px;
  background: var(--color-bg);
  color: var(--color-text);
}
.ai-assist-popup__preview {
  max-height: 220px;
  overflow-y: auto;
  white-space: pre-wrap;
  background: var(--color-bg-hover);
  border-radius: 6px;
  padding: 8px 10px;
  line-height: 1.5;
}
.ai-assist-popup__preview.is-streaming::after {
  content: "▍";
  color: var(--color-primary-strong);
  animation: ai-assist-caret 1s steps(2, start) infinite;
}
.ai-assist-popup__status {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--color-text-muted);
  user-select: none;
}
.ai-assist-popup__dots::after {
  content: "…";
  display: inline-block;
  width: 1.1em;
  text-align: left;
  animation: ai-assist-dots 1.4s steps(4, end) infinite;
}
.ai-assist-popup__regen {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.ai-assist-popup__regen:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-strong);
}
.ai-assist-popup__regen:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.ai-assist-popup__note {
  font-size: 12px;
  color: var(--color-text-muted);
  background: var(--color-bg-hover);
  border-radius: 6px;
  padding: 6px 8px;
  line-height: 1.4;
}
.ai-assist-popup__result-actions {
  display: flex;
  gap: 6px;
}
.ai-assist-popup__error {
  color: #e5484d;
  font-size: 12px;
}

@keyframes ai-assist-dots {
  0% {
    content: "";
  }
  25% {
    content: ".";
  }
  50% {
    content: "..";
  }
  75% {
    content: "...";
  }
  100% {
    content: "";
  }
}
@keyframes ai-assist-caret {
  50% {
    opacity: 0;
  }
}
.auto-format-toolbar-btn,
.cheatsheet-toolbar-btn,
.source-view-toolbar-btn {
  width: auto !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 8px !important;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 6px;
  color: var(--color-text) !important;
  background: transparent;
}
.auto-format-toolbar-btn:hover,
.cheatsheet-toolbar-btn:hover,
.source-view-toolbar-btn:hover {
  background: var(--color-bg-hover) !important;
  color: var(--color-primary-strong) !important;
}

.auto-format-toolbar-btn.is-loading {
  opacity: 0.75;
  cursor: wait;
}

.source-view-toolbar-btn {
  border-radius: 6px;
}

.markup-cheatsheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  z-index: 1400;
}

.markup-cheatsheet {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1401;
  width: 380px;
  max-width: calc(100vw - 24px);
  background: var(--color-surface);
  border-left: 1px solid var(--color-border);
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.2s ease-out;
}
.markup-cheatsheet.is-open {
  transform: translateX(0);
}
.markup-cheatsheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}
.markup-cheatsheet__title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 14px;
  color: var(--color-text);
}
.markup-cheatsheet__close {
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 0 4px;
}
.markup-cheatsheet__close:hover {
  color: var(--color-text);
}
.markup-cheatsheet__body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 24px;
}
.markup-cheatsheet__loading {
  color: var(--color-text-muted);
  font-size: 13px;
  padding: 24px 0;
  text-align: center;
}
.markup-cheatsheet__section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin: 18px 0 8px;
}
.markup-cheatsheet__section-title:first-child {
  margin-top: 4px;
}
.markup-cheatsheet__card {
  background: var(--color-bg-hover);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.markup-cheatsheet__card-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.markup-cheatsheet__icon {
  font-size: 14px;
}
.markup-cheatsheet__card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  flex: 1;
}
.markup-cheatsheet__slash {
  font-size: 11px;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 1px 5px;
}
.markup-cheatsheet__desc {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 6px;
  line-height: 1.4;
}
.markup-cheatsheet__example {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 8px 10px;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--color-text);
  margin: 0 0 6px;
}
.markup-cheatsheet__copy {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-primary-strong);
  background: none;
  border: 1px solid var(--color-primary);
  border-radius: 999px;
  padding: 3px 10px;
  cursor: pointer;
}
.markup-cheatsheet__copy:hover {
  background: var(--color-primary);
  color: #fff;
}

@media (max-width: 640px) {
  .markup-cheatsheet {
    width: 100vw;
    max-width: none;
  }
}
.lms-scope {
  zoom: 1.05;
}
.lms-scope .btn--sm {
  padding: 5px 10px;
  font-size: 12.5px;
}
.lms-scope .btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.lms-scope .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.lms-scope .panel {
  padding: 20px;
}

.lms-form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.lms-lede {
  margin: -12px 0 18px;
  max-width: 78ch;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-muted);
}
.lms-lede a {
  color: var(--color-primary-strong);
}
.lms-lede--chip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.lms-lede__text {
  min-width: 0;
}

.lms-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.lms-head__icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: color-mix(in srgb, var(--color-primary) 12%, transparent);
  color: var(--color-primary-strong);
}
.lms-head__icon svg {
  width: 17px;
  height: 17px;
}
.lms-head__text {
  flex: 1;
  min-width: 0;
}
.lms-head__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.lms-head__desc {
  margin: 3px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--color-text-muted);
}
.lms-head__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lms-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.lms-stat {
  --lms-accent: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--color-border-muted);
  border-radius: 10px;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
.lms-stat__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: color-mix(in srgb, var(--lms-accent) 13%, transparent);
  color: var(--lms-accent);
}
.lms-stat__icon svg {
  width: 18px;
  height: 18px;
}
.lms-stat__body {
  min-width: 0;
}
.lms-stat__value {
  font-size: 23px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.lms-stat__label {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--color-text-muted);
}
.lms-stat--success {
  --lms-accent: var(--color-success);
}
.lms-stat--warning {
  --lms-accent: var(--color-warning);
}
.lms-stat--danger {
  --lms-accent: var(--color-danger);
}
.lms-stat--muted {
  --lms-accent: var(--color-text-muted);
}

.lms-chip, .lms-status {
  --lms-accent: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--lms-accent) 13%, transparent);
  color: var(--lms-accent);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.lms-chip svg, .lms-status svg {
  width: 12px;
  height: 12px;
}
.lms-chip--primary {
  --lms-accent: var(--color-primary);
}
.lms-chip--success {
  --lms-accent: var(--color-success);
}
.lms-chip--warning {
  --lms-accent: var(--color-warning);
}
.lms-chip--danger {
  --lms-accent: var(--color-danger);
}
.lms-chip--ghost {
  background: transparent;
  color: var(--color-text-muted);
  padding-left: 0;
  padding-right: 0;
}

.lms-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.lms-status--passed {
  --lms-accent: var(--color-success);
}
.lms-status--progress {
  --lms-accent: var(--color-warning);
}
.lms-status--assigned {
  --lms-accent: var(--color-text-muted);
}
.lms-status--failed {
  --lms-accent: var(--color-danger);
}

.lms-table-wrap {
  overflow-x: auto;
  margin: 0 -20px -20px;
  padding: 0 6px;
}

.data-table.lms-table {
  border: none;
  border-radius: 0;
  background: transparent;
}
.data-table.lms-table th {
  padding: 8px 14px;
  border-bottom: 1px solid var(--color-border);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.data-table.lms-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--color-border-muted);
  vertical-align: middle;
}
.data-table.lms-table tbody tr {
  transition: background 0.12s ease;
}
.data-table.lms-table tbody tr:hover {
  background: var(--color-bg-hover, var(--color-bg));
}
.data-table.lms-table tbody tr:last-child td {
  border-bottom: none;
}
.data-table.lms-table__title {
  width: 100%;
}
.data-table.lms-table__num {
  width: 1%;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.data-table.lms-table__nowrap {
  width: 1%;
  white-space: nowrap;
}
.data-table.lms-table__meter {
  width: 200px;
}
.data-table.lms-table__actions {
  width: 1%;
  text-align: right;
  white-space: nowrap;
}

.lms-sort-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.lms-sort-link:hover {
  text-decoration: underline;
}
.lms-sort-link--active {
  color: var(--color-primary-strong);
}

.lms-view-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--color-border);
}

.lms-view-tab {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.lms-view-tab:hover {
  color: var(--color-text);
}
.lms-view-tab--active {
  color: var(--color-primary-strong);
  border-bottom-color: var(--color-primary);
}

.lms-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.lms-toolbar__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 500;
}
.lms-toolbar__label svg {
  width: 14px;
  height: 14px;
}
.lms-toolbar .form-select {
  max-width: 260px;
}

.lms-cell-title {
  display: inline-block;
  font-weight: 600;
  color: var(--color-text);
}
.lms-cell-title:hover {
  color: var(--color-primary-strong);
  text-decoration: underline;
}

.lms-cell-sub {
  margin-top: 3px;
  color: var(--color-text-muted);
}

.lms-cell-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lms-cell-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.lms-cell-meta__text {
  color: var(--color-text-muted);
  font-size: 12px;
}

.lms-metric {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
}
.lms-metric svg {
  width: 14px;
  height: 14px;
  color: var(--color-text-muted);
  opacity: 0.75;
  flex-shrink: 0;
}
.lms-metric--muted {
  color: var(--color-text-muted);
}

.lms-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.lms-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.lms-icon-btn svg {
  width: 15px;
  height: 15px;
}
.lms-icon-btn:hover {
  background: var(--color-bg-hover, var(--color-bg));
  border-color: var(--color-border);
  color: var(--color-text);
}
.lms-icon-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.lms-icon-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: transparent;
  border-color: transparent;
}
.lms-icon-btn--danger:hover:not(:disabled) {
  background: color-mix(in srgb, var(--color-danger) 10%, transparent);
  border-color: color-mix(in srgb, var(--color-danger) 35%, transparent);
  color: var(--color-danger);
}

.lms-meter {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.lms-meter__bar {
  flex: 1;
  min-width: 48px;
  height: 6px;
  border-radius: 999px;
  background: var(--color-border);
  overflow: hidden;
}
.lms-meter__fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--color-primary) 80%, var(--color-surface)), var(--color-primary));
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.lms-meter__value {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.lms-meter--done .lms-meter__fill {
  background: var(--color-success);
}
.lms-meter--done .lms-meter__value {
  color: var(--color-success);
}

.lms-empty__icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--color-bg-muted);
  color: var(--color-text-muted);
}
.lms-empty__icon svg {
  width: 22px;
  height: 22px;
}
.lms-empty__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}
.lms-empty__text {
  max-width: 46ch;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.learning-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin: 0 0 15px;
}
.learning-progress__bar {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--color-border);
  overflow: hidden;
}
.learning-progress__fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--color-primary) 80%, var(--color-surface)), var(--color-primary));
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.learning-progress__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.learning-progress--done .learning-progress__fill {
  background: var(--color-success);
}

.learning-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.learning-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.learning-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--color-primary) 35%, var(--color-border-muted));
}
.learning-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.learning-card__title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.learning-card__desc {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--color-text-muted);
}
.learning-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--color-border-muted);
  font-size: 12.5px;
  color: var(--color-text-muted);
}
.learning-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--color-primary-strong);
}
.learning-card__cta svg {
  width: 14px;
  height: 14px;
  transition: transform 0.15s ease;
}
.learning-card:hover .learning-card__cta svg {
  transform: translateX(3px);
}

.learning-tests {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.learning-tests__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--color-border-muted);
  border-radius: 10px;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.learning-tests__item:hover {
  border-color: color-mix(in srgb, var(--color-primary) 30%, var(--color-border-muted));
  box-shadow: var(--shadow-md);
}
.learning-tests__item--passed {
  background: color-mix(in srgb, var(--color-success) 5%, var(--color-surface));
  border-color: color-mix(in srgb, var(--color-success) 25%, var(--color-border-muted));
}
.learning-tests__num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary-strong);
  font-weight: 700;
  font-size: 13px;
}
.learning-tests__body {
  flex: 1;
  min-width: 0;
}
.learning-tests__title {
  font-size: 16px;
  font-weight: 600;
}
.learning-tests__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-top: 4px;
  color: var(--color-text-muted);
}
.learning-tests__status {
  white-space: nowrap;
  font-size: 13px;
}

@keyframes lms-quiz-question-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes lms-quiz-option-in {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes lms-quiz-feedback-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes lms-quiz-ring-in {
  from {
    stroke-dashoffset: var(--ring-circumference);
  }
  to {
    stroke-dashoffset: var(--ring-offset);
  }
}
@keyframes lms-quiz-pop-in {
  0% {
    opacity: 0;
    transform: scale(0.7);
  }
  60% {
    opacity: 1;
    transform: scale(1.06);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes lms-confetti-fall {
  from {
    transform: translateY(-20px) rotate(0deg);
    opacity: 1;
  }
  to {
    transform: translateY(220px) rotate(360deg);
    opacity: 0;
  }
}
.lms-quiz {
  max-width: 720px;
  position: relative;
  overflow: hidden;
}
.lms-quiz__progress {
  margin-bottom: 18px;
}
.lms-quiz__question {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: lms-quiz-question-in 0.32s ease both;
}
.lms-quiz__num {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--color-primary-light);
  color: var(--color-primary-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.lms-quiz__title {
  font-size: 19px;
  line-height: 1.4;
  margin: 0;
}
.lms-quiz__options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lms-quiz__option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  transition: border-color 0.12s ease, background 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
  animation: lms-quiz-option-in 0.3s ease both;
}
.lms-quiz__option:nth-child(1) {
  animation-delay: 0.04s;
}
.lms-quiz__option:nth-child(2) {
  animation-delay: 0.08s;
}
.lms-quiz__option:nth-child(3) {
  animation-delay: 0.12s;
}
.lms-quiz__option:nth-child(4) {
  animation-delay: 0.16s;
}
.lms-quiz__option:nth-child(5) {
  animation-delay: 0.2s;
}
.lms-quiz__option:nth-child(6) {
  animation-delay: 0.24s;
}
.lms-quiz__option:hover {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary-light);
}
.lms-quiz__option:has(input:checked) {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  transform: translateX(2px);
}
.lms-quiz__option input[type=checkbox] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.lms-quiz__option-letter {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-muted);
  transition: inherit;
}
.lms-quiz__option:has(input:checked) .lms-quiz__option-letter {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
}
.lms-quiz__option-text {
  flex: 1;
}
.lms-quiz__option--correct {
  border-color: var(--color-success);
  background: color-mix(in srgb, var(--color-success) 10%, transparent);
}
.lms-quiz__option--correct .lms-quiz__option-letter {
  border-color: var(--color-success);
  background: var(--color-success);
  color: #fff;
}
.lms-quiz__option--wrong {
  border-color: var(--color-danger);
  background: color-mix(in srgb, var(--color-danger) 10%, transparent);
}
.lms-quiz__option--wrong .lms-quiz__option-letter {
  border-color: var(--color-danger);
  background: var(--color-danger);
  color: #fff;
}
.lms-quiz__option--missed {
  border-style: dashed;
  border-color: var(--color-success);
}
.lms-quiz__feedback {
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: lms-quiz-feedback-in 0.25s ease both;
}
.lms-quiz__feedback p {
  margin: 4px 0 0;
  color: var(--color-text-muted);
}
.lms-quiz__feedback-icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 700;
  animation: lms-quiz-pop-in 0.35s ease;
}
.lms-quiz__feedback--ok {
  background: color-mix(in srgb, var(--color-success) 12%, transparent);
}
.lms-quiz__feedback--ok .lms-quiz__feedback-icon {
  background: var(--color-success);
  color: #fff;
}
.lms-quiz__feedback--fail {
  background: color-mix(in srgb, var(--color-danger) 12%, transparent);
}
.lms-quiz__feedback--fail .lms-quiz__feedback-icon {
  background: var(--color-danger);
  color: #fff;
}
.lms-quiz__actions {
  display: flex;
  gap: 8px;
}
.lms-quiz-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lms-quiz-progress__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-muted);
}
.lms-quiz-progress__pct {
  color: var(--color-primary-strong);
}
.lms-quiz-progress__bar {
  height: 8px;
  border-radius: 999px;
  background: var(--color-border);
  overflow: hidden;
}
.lms-quiz-progress__fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-primary), color-mix(in srgb, var(--color-primary) 60%, #22d3ee));
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.lms-quiz__result {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: lms-quiz-question-in 0.35s ease both;
}
.lms-quiz__ring {
  position: relative;
  width: 148px;
  height: 148px;
  margin-bottom: 6px;
}
.lms-quiz__ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.lms-quiz__ring circle {
  fill: none;
  stroke-width: 10;
}
.lms-quiz__ring-track {
  stroke: var(--color-border);
}
.lms-quiz__ring-value {
  stroke: var(--color-success);
  stroke-linecap: round;
  animation: lms-quiz-ring-in 0.8s cubic-bezier(0.4, 0, 0.2, 1) both 0.1s;
}
.lms-quiz__ring--fail .lms-quiz__ring-value {
  stroke: var(--color-danger);
}
.lms-quiz__score {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 800;
}
.lms-quiz__score--ok {
  color: var(--color-success);
}
.lms-quiz__score--fail {
  color: var(--color-danger);
}
.lms-quiz__verdict {
  text-align: center;
  margin: 4px 0 8px;
  font-size: 16px;
}
.lms-quiz__review {
  margin-top: 12px;
  border-top: 1px solid var(--color-border);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--color-text-muted);
  align-self: stretch;
}

.lms-confetti {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  pointer-events: none;
  overflow: visible;
  z-index: 1;
}
.lms-confetti__piece {
  position: absolute;
  top: 0;
  width: 7px;
  height: 12px;
  border-radius: 2px;
  animation: lms-confetti-fall linear forwards;
}

.lms-builder {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.lms-builder__actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: -4px;
  padding: 12px 0;
  background: linear-gradient(to top, var(--color-bg) 72%, transparent);
}
.lms-builder__actions-hint {
  margin-left: auto;
  font-size: 12px;
  color: var(--color-text-muted);
}

.lms-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0 16px;
}

.lms-picker {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--color-surface);
}
.lms-picker__toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border-muted);
  background: var(--color-bg-muted);
}
.lms-picker__actions {
  display: flex;
  gap: 6px;
}
.lms-picker__tree {
  max-height: 340px;
  overflow: auto;
  padding: 6px;
}

.lms-picker__counter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-primary) 12%, transparent);
  color: var(--color-primary-strong);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.lms-tree,
.lms-tree__children {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lms-tree__children {
  margin-left: 20px;
  border-left: 1px solid var(--color-border-muted);
  padding-left: 6px;
}

.lms-tree__row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border-radius: 7px;
  transition: background 0.1s ease;
}
.lms-tree__row:hover {
  background: var(--color-bg-hover, var(--color-bg));
}
.lms-tree__row:has(> .lms-tree__label > .lms-tree__checkbox:checked) {
  background: color-mix(in srgb, var(--color-primary) 9%, transparent);
}

.lms-tree__toggle {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border: none;
  border-radius: 5px;
  background: none;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 11px;
  line-height: 1;
  transition: background 0.1s ease, color 0.1s ease;
}
.lms-tree__toggle:hover {
  background: color-mix(in srgb, var(--color-text-muted) 15%, transparent);
  color: var(--color-text);
}
.lms-tree__toggle--leaf {
  cursor: default;
}
.lms-tree__toggle--leaf:hover {
  background: none;
}

.lms-tree__label {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  min-width: 0;
  flex: 1;
  font-size: 13px;
}
.lms-tree__label input[type=checkbox] {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  accent-color: var(--color-primary);
  cursor: pointer;
}
.lms-tree__label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lms-generator {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--color-primary) 22%, var(--color-border-muted));
  border-radius: 10px;
  background: color-mix(in srgb, var(--color-primary) 5%, var(--color-surface));
}
.lms-generator__text {
  flex: 1;
  min-width: 180px;
}
.lms-generator__title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 600;
}
.lms-generator__title svg {
  width: 15px;
  height: 15px;
  color: var(--color-primary-strong);
}
.lms-generator__status {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--color-text-muted);
}
.lms-generator__controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.lms-generator .form-select {
  width: auto;
}

.lms-questions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}
.lms-questions:empty {
  margin-top: 0;
}

.lms-questions-actions {
  margin-top: 14px;
}

.lms-prompt-field {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.55;
  resize: vertical;
}

.lms-question {
  border: 1px solid var(--color-border-muted);
  border-radius: 10px;
  padding: 14px;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lms-question__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.lms-question__head .badge {
  padding: 4px 10px;
  background: var(--color-primary-light);
  color: var(--color-primary-strong);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.lms-question__head .btn--danger {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text-muted);
}
.lms-question__head .btn--danger:hover {
  background: color-mix(in srgb, var(--color-danger) 10%, transparent);
  border-color: color-mix(in srgb, var(--color-danger) 35%, transparent);
  color: var(--color-danger);
}
.lms-question__text {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.45;
  resize: vertical;
}
.lms-question__options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  counter-reset: lms-option;
}
.lms-question__option {
  display: flex;
  align-items: center;
  gap: 8px;
  counter-increment: lms-option;
}
.lms-question__option::before {
  content: counter(lms-option, upper-alpha);
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-muted);
}
.lms-question__option:has(.lms-question__correct input:checked)::before {
  border-color: var(--color-success);
  background: var(--color-success);
  color: #fff;
}
.lms-question__option-text {
  flex: 1;
  min-width: 0;
}
.lms-question__option-remove {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  background: none;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 13px;
  padding: 0;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.lms-question__option-remove:hover:not(:disabled) {
  background: color-mix(in srgb, var(--color-danger) 10%, transparent);
  border-color: color-mix(in srgb, var(--color-danger) 35%, transparent);
  color: var(--color-danger);
}
.lms-question__option-remove:disabled {
  color: var(--color-border);
  cursor: default;
}
.lms-question__correct {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-text-muted);
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.lms-question__correct input {
  accent-color: var(--color-success);
  cursor: pointer;
}
.lms-question__correct:has(input:checked) {
  background: color-mix(in srgb, var(--color-success) 12%, transparent);
  color: var(--color-success);
}
.lms-question__explanation {
  font-size: 13px;
}
.lms-question__add-option {
  align-self: flex-start;
}

.lms-course-tests {
  display: flex;
  flex-direction: column;
  gap: 8px;
  counter-reset: lms-course-test;
}
.lms-course-tests__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--color-border-muted);
  border-radius: 10px;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  counter-increment: lms-course-test;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.lms-course-tests__item:hover {
  border-color: color-mix(in srgb, var(--color-primary) 30%, var(--color-border-muted));
  box-shadow: var(--shadow-md);
}
.lms-course-tests__order {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary-strong);
  font-size: 12px;
  font-weight: 700;
  user-select: none;
}
.lms-course-tests__order::before {
  content: counter(lms-course-test);
}
.lms-course-tests__actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.lms-course-tests__body {
  flex: 1;
  min-width: 0;
}
.lms-course-tests__body strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
}

.lms-course-add {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.lms-course-add .form-select {
  flex: 1;
  min-width: 220px;
  max-width: 380px;
}

.lms-assign-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.lms-assign-list {
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 6px;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lms-assign-row__name {
  flex: 1 1 auto;
  min-width: 0;
}

.lms-assign-row__meta {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.lms-assign-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.1s ease;
}
.lms-assign-row:hover {
  background: var(--color-bg-hover, var(--color-bg));
}
.lms-assign-row:has(input:checked) {
  background: color-mix(in srgb, var(--color-primary) 9%, transparent);
}
.lms-assign-row input {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.lms-switch-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--color-border-muted);
  border-radius: 10px;
  background: var(--color-bg-muted);
}
.lms-switch-row__text {
  flex: 1;
  min-width: 0;
}
.lms-switch-row__label {
  font-size: 13.5px;
  font-weight: 600;
}
.lms-switch-row__hint {
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--color-text-muted);
}
.lms-switch-row .toggle {
  margin-top: 2px;
}

.lms-nav__divider {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  padding: 14px 12px 4px;
}

@media (max-width: 860px) {
  .lms-assign-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .lms-stats {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
  }
  .lms-stat {
    padding: 12px;
  }
  .lms-stat__value {
    font-size: 20px;
  }
  .lms-table-wrap {
    margin: 0 -20px -20px;
    padding: 0 8px;
  }
  .lms-head {
    flex-wrap: wrap;
  }
  .lms-head__actions {
    width: 100%;
  }
  .learning-tests__item {
    flex-wrap: wrap;
  }
  .learning-tests__item .btn {
    width: 100%;
    justify-content: center;
  }
  .lms-course-tests__item {
    flex-wrap: wrap;
  }
  .lms-builder__actions {
    flex-wrap: wrap;
  }
  .lms-builder__actions-hint {
    margin-left: 0;
  }
}
.lms-table__check {
  width: 48px;
  padding-left: 8px;
  padding-right: 0;
}

.lms-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: -8px 0;
  cursor: pointer;
}
.lms-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.lms-row--selected > td {
  background: color-mix(in srgb, var(--color-primary) 7%, transparent);
}

.lms-link-btn {
  padding: 4px 2px;
  border: 0;
  background: none;
  color: var(--color-primary-strong, var(--color-primary));
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.lms-link-btn:hover {
  text-decoration: underline;
}

.lms-chip--small {
  padding: 1px 7px;
  margin-left: 4px;
  font-size: 11px;
  font-weight: 500;
}

.lms-bulkbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-primary) 9%, var(--color-surface, var(--color-bg)));
  box-shadow: var(--shadow-sm);
}
.lms-bulkbar[hidden] {
  display: none;
}
.lms-bulkbar__count {
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
}
.lms-bulkbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.lms-bulkbar__actions .btn {
  min-height: 40px;
}
@media (max-width: 640px) {
  .lms-bulkbar {
    position: sticky;
    top: calc(56px + 8px);
    z-index: 20;
    margin-left: -4px;
    margin-right: -4px;
    padding: 8px 10px;
    gap: 6px;
    box-shadow: var(--shadow-md);
  }
  .lms-bulkbar__actions {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }
  .lms-bulkbar__actions .btn {
    justify-content: center;
    min-width: 0;
    padding-left: 6px;
    padding-right: 6px;
    grid-column: span 2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .lms-bulkbar__actions .btn--primary,
  .lms-bulkbar__actions .btn--outline {
    grid-column: span 3;
  }
}

@media (max-width: 640px) {
  .data-table.lms-table--courses thead {
    display: none;
  }
  .data-table.lms-table--courses tbody tr {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto auto auto;
    grid-template-areas: "check title  title  title  title" "check meter  meter  meter  meter" "check num    .      active actions";
    align-items: center;
    column-gap: 8px;
    padding: 10px 4px;
    border-bottom: 1px solid var(--color-border);
  }
  .data-table.lms-table--courses tbody td {
    display: block;
    width: auto;
    padding: 2px 0;
    border: 0;
  }
  .data-table.lms-table--courses .lms-table__check {
    grid-area: check;
    align-self: start;
    padding-top: 0;
  }
  .data-table.lms-table--courses .lms-table__title {
    grid-area: title;
  }
  .data-table.lms-table--courses .lms-table__meter {
    grid-area: meter;
    padding-top: 6px;
  }
  .data-table.lms-table--courses .lms-table__num {
    grid-area: num;
  }
  .data-table.lms-table--courses .lms-table__nowrap {
    grid-area: active;
  }
  .data-table.lms-table--courses .lms-table__actions {
    grid-area: actions;
  }
  .data-table.lms-table--courses .lms-icon-btn {
    width: 40px;
    height: 40px;
  }
  .data-table.lms-table--courses .toggle {
    padding: 8px 0;
  }
}
.lms-groups-block {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--color-bg-muted);
}
.lms-groups-block__title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
}
.lms-groups-block p {
  margin: 0;
}

.lms-chip--removable {
  padding-right: 4px;
}

.lms-chip__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  position: relative;
}
.lms-chip__remove::after {
  content: "";
  position: absolute;
  inset: -8px;
}
.lms-chip__remove:hover {
  background: color-mix(in srgb, currentColor 16%, transparent);
}

.lms-toolbar {
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .lms-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .lms-toolbar .form-select {
    max-width: none;
    width: 100%;
  }
}

.lms-groups-dialog .lms-groups-dialog__list {
  max-height: 50vh;
  margin-top: 10px;
}
@media (max-width: 640px) {
  .lms-groups-dialog {
    width: calc(100vw - 16px);
    max-width: none;
    max-height: calc(100dvh - 16px);
    margin: 8px;
  }
  .lms-groups-dialog .dialog__form {
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - 16px);
  }
  .lms-groups-dialog .lms-groups-dialog__list {
    flex: 1;
    max-height: none;
    min-height: 120px;
  }
  .lms-groups-dialog .lms-assign-row {
    min-height: 40px;
  }
  .lms-groups-dialog .dialog__actions {
    position: sticky;
    bottom: 0;
  }
}

.feedback-dialog__intro {
  margin: -8px 0 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.feedback-dialog {
  width: 520px;
}

.fb-attach__row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.fb-attach__hint {
  font-size: 12px;
  color: var(--color-text-muted);
}

.fb-attach__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.fb-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--color-bg-muted);
  font-size: 12.5px;
  max-width: 240px;
  overflow: hidden;
}
.fb-chip__remove {
  border: 0;
  background: none;
  cursor: pointer;
  padding: 0 4px;
  font-size: 14px;
  line-height: 1;
  color: var(--color-text-muted);
}
.fb-chip__remove:hover {
  color: var(--color-danger);
}

.fb-thread__files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.fb-thread__files a {
  text-decoration: none;
}

.fb-thread__img {
  max-width: 200px;
  max-height: 140px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-muted);
  display: block;
}
.fb-thread__img:hover {
  border-color: var(--color-primary);
}

.fb-thread__file {
  font-size: 13px;
  color: var(--color-primary-strong);
}

.fb-lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  border-radius: 0;
  overflow: visible;
}
.fb-lightbox::backdrop {
  background: rgba(8, 10, 14, 0.92);
}
.fb-lightbox__img {
  display: block;
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: 92vw;
  max-height: 86vh;
  border-radius: var(--radius-md);
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.55);
}
.fb-lightbox__nav, .fb-lightbox__close {
  position: absolute;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  transition: background 0.15s ease;
}
.fb-lightbox__nav:hover, .fb-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.28);
}
.fb-lightbox__nav {
  top: 50%;
  width: 48px;
  height: 48px;
  font-size: 30px;
  line-height: 1;
  transform: translateY(-50%);
  user-select: none;
}
.fb-lightbox__nav[hidden] {
  display: none;
}
.fb-lightbox__nav--prev {
  left: 18px;
}
.fb-lightbox__nav--next {
  right: 18px;
}
.fb-lightbox__close {
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  font-size: 22px;
  line-height: 1;
}
.fb-lightbox__counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.feedback-dialog__mine-link {
  display: block;
  margin: 14px auto 0;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  color: var(--color-primary-strong);
}
.feedback-dialog__mine-link:hover {
  text-decoration: underline;
}

.fb-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 260px;
  overflow-y: auto;
  margin-bottom: 14px;
  padding: 2px;
}
.fb-thread__empty {
  padding: 12px 0;
  font-size: 13px;
  color: var(--color-text-muted);
  text-align: center;
}
.fb-thread__msg {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--color-bg-muted);
  font-size: 13.5px;
  line-height: 1.5;
}
.fb-thread__msg--support {
  background: color-mix(in srgb, var(--color-primary) 8%, var(--color-surface));
}
.fb-thread__meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 11.5px;
  color: var(--color-text-muted);
}
.fb-thread__meta b {
  color: var(--color-text);
  font-weight: 600;
}
.fb-thread__text {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
}

.fb-mine__item {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  padding: 10px 12px;
  text-align: left;
  font-family: inherit;
  border: 1px solid var(--color-border-muted);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.fb-mine__item:hover {
  border-color: var(--color-primary);
}
.fb-mine__item .fb-mine__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.fb-mine__item .fb-mine__date {
  font-size: 11.5px;
  color: var(--color-text-muted);
}
.fb-mine__item .fb-mine__category {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}
.fb-mine__item .fb-mine__excerpt {
  display: block;
  font-size: 12.5px;
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

button.space-nav__bottom-link {
  width: 100%;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.fb-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}
.fb-tabs__tab {
  padding: 6px 14px;
  border: 1px solid var(--color-border-muted);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  background: var(--color-surface);
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.fb-tabs__tab:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}
.fb-tabs__tab--active, .fb-tabs__tab--active:hover {
  background: var(--color-primary-tint);
  border-color: transparent;
  color: var(--color-text);
  font-weight: 600;
}

.fb-filter {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
}
.fb-filter__link {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.fb-filter__link:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}
.fb-filter__link.is-active {
  background: var(--color-primary-tint);
  color: var(--color-text);
  font-weight: 600;
}
.fb-filter__count {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--color-text-muted);
}

.fb-table .is-muted td {
  opacity: 0.55;
}
.fb-table__nowrap {
  width: 1%;
  white-space: nowrap;
}
.fb-table__message {
  width: 100%;
  max-width: 0;
}
.fb-table__message-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fb-table__author {
  font-weight: 500;
}
.fb-table__email {
  font-size: 11.5px;
  color: var(--color-text-muted);
}

.fb-admin-dialog {
  width: 560px;
}

.fb-admin__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--color-bg-muted);
}

.fb-admin__meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.fb-admin__meta-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.fb-admin__message {
  margin-bottom: 16px;
  padding: 14px;
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--color-primary) 5%, var(--color-surface));
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14px;
  line-height: 1.55;
}

.fb-admin__resolved {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-left: 3px solid var(--color-success);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--color-success) 6%, var(--color-surface));
}

.fb-admin__resolved-head {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-success);
}

.fb-admin__resolved-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.fb-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.fb-switch__info {
  min-width: 0;
}
.fb-switch__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
}
.fb-switch__title svg {
  flex-shrink: 0;
}
.fb-switch .field__hint {
  margin: 0;
  max-width: 640px;
}
.fb-switch .toggle {
  padding: 8px 0 8px 8px;
}

.fb-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text-muted);
  font-size: 13px;
}
.fb-banner[hidden] {
  display: none;
}
.fb-banner svg {
  flex-shrink: 0;
  margin-top: 1px;
}
.fb-banner a {
  font-weight: 600;
  white-space: nowrap;
}

.sd-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.sd-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 16px;
  border: 1px solid var(--color-border-muted);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.08);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.sd-tile:hover, .sd-tile:focus-visible {
  border-color: color-mix(in srgb, var(--color-primary) 45%, transparent);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.14);
  transform: translateY(-3px);
}
.sd-tile:active {
  transform: translateY(-1px);
}

.sd-tile__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 8px;
  border-radius: var(--radius-md);
  background: var(--color-primary-tint);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-primary) 14%, transparent);
  font-size: 23px;
}

.sd-tile__name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--color-text);
}

.sd-tile__hint {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.sd-dialog {
  width: 588px;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
}

@media (max-width: 640px) {
  .sd-dialog {
    width: 100vw;
    max-width: 100vw;
    max-height: calc(100dvh - 24px);
  }
}
.sd-dialog__intro {
  margin: -8px 0 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.sd-attach-label {
  display: block;
  margin-bottom: 8px;
}

.sd-attach-btn {
  display: inline-flex;
  cursor: pointer;
}
.sd-attach-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.sd-attach-btn[aria-invalid=true] {
  color: var(--color-danger);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-danger) 35%, transparent);
}

.sd-files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.sd-files:empty {
  display: none;
}

.sd-table .is-muted td {
  opacity: 0.55;
}
.sd-table .is-muted td.sd-table__status {
  opacity: 1;
}
.sd-table__nowrap {
  width: 1%;
  white-space: nowrap;
}
.sd-table__message {
  width: 100%;
  max-width: 0;
}
.sd-table__message-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sd-table__time {
  font-size: 12px;
  color: var(--color-text-muted);
}
.sd-table__author {
  font-weight: 500;
}
.sd-table .sd-exec__state {
  font-weight: 500;
  color: var(--color-text-muted);
}
.sd-table .sd-exec__waits {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  color: var(--color-text-muted);
}
.sd-table__email {
  font-size: 11.5px;
  color: var(--color-text-muted);
}

.sd-cat-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  background: color-mix(in srgb, var(--cat-color) 12%, transparent);
  color: var(--cat-color);
  border: 1px solid color-mix(in srgb, var(--cat-color) 25%, transparent);
}

.sd-tabs {
  display: flex;
  gap: 22px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--color-border-muted);
}
.sd-tabs__tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 2px 9px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.sd-tabs__tab:hover {
  color: var(--color-text);
}
.sd-tabs__tab--active {
  color: var(--color-primary-strong);
  border-bottom-color: var(--color-primary);
  font-weight: 600;
}
.sd-tabs__tab .doc-icon {
  width: 16px;
  height: 16px;
}
.sd-tabs__count {
  min-width: 18px;
  height: 18px;
  padding: 0 7px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--color-warning) 18%, transparent);
  color: var(--color-warning);
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  white-space: nowrap;
}

body.is-requests .ai-fab,
body.is-requests .quick-notes-fab,
body.is-requests .quick-notes-widget {
  display: none !important;
}

.sd-table-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-top: 14px;
}

.sd-perpage {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-muted);
}
.sd-perpage select {
  width: auto;
  padding: 4px 8px;
  font-size: 13px;
}

.sd-pager {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sd-pager__page,
.sd-pager__arrow,
.sd-pager__dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.sd-pager__page {
  color: var(--color-text);
  text-decoration: none;
}
.sd-pager__page:hover {
  background: var(--color-bg-hover);
}
.sd-pager__page--active {
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
}
.sd-pager__page--active:hover {
  background: var(--color-primary);
}

.sd-pager__arrow {
  color: var(--color-text-muted);
  text-decoration: none;
}
.sd-pager__arrow:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}

.sd-pager__dots {
  color: var(--color-text-muted);
}

.sd-perpage__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.sd-perpage__item:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}
.sd-perpage__item.is-active {
  background: var(--color-primary-tint);
  color: var(--color-text);
  font-weight: 700;
}

.sd-pager__arrow.is-disabled {
  opacity: 0.35;
  cursor: default;
}

.sd-table-footer__spacer {
  width: 140px;
}

.sd-table__marker {
  text-align: center;
  font-size: 15px;
}

.sd-table tr.is-new > td {
  background: color-mix(in srgb, var(--color-primary) 5%, var(--color-surface));
}

.sd-table--click tr.is-new:hover > td {
  background: color-mix(in srgb, var(--color-primary) 8%, var(--color-surface));
}

.sd-perpage label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.sd-gallery__thumbs {
  display: flex;
  gap: 8px;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 4px;
}

.sd-gallery__thumb {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  padding: 0;
  border: 1px solid var(--color-border-muted);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: zoom-in;
  background: var(--color-bg-muted);
}
.sd-gallery__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sd-gallery__thumb:hover {
  border-color: color-mix(in srgb, var(--color-primary) 45%, transparent);
  box-shadow: var(--shadow-hover);
}

.sd-lightbox {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  border: 0;
  padding: 0;
  background: rgba(10, 12, 18, 0.92);
}
.sd-lightbox::backdrop {
  background: rgba(10, 12, 18, 0.92);
}

.sd-lightbox__img {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: 90vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.sd-lightbox__close,
.sd-lightbox__nav {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.sd-lightbox__close:hover,
.sd-lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.28);
}

.sd-lightbox__close {
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  font-size: 16px;
}

.sd-lightbox__nav {
  top: 50%;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  font-size: 26px;
  line-height: 1;
}
.sd-lightbox__nav--prev {
  left: 24px;
}
.sd-lightbox__nav--next {
  right: 24px;
}

.sd-lightbox__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
}

.sd-lightbox__name {
  max-width: 60vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sd-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.sd-toolbar__row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.sd-segment {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}
.sd-segment__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: calc(var(--radius-md) - 2px);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.sd-segment__item:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}
.sd-segment__item.is-active {
  background: var(--color-primary-tint);
  color: var(--color-text);
  font-weight: 600;
}
.sd-segment__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--color-bg-hover);
  color: var(--color-text-muted);
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.sd-segment__count--attn {
  background: color-mix(in srgb, var(--color-warning) 18%, transparent);
  color: var(--color-warning);
}
.sd-segment__item.is-active .sd-segment__count:not(.sd-segment__count--attn) {
  background: var(--color-surface);
  color: var(--color-text);
}

.sd-catbar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
}
.sd-catbar.is-fitted .sd-catchips {
  flex-wrap: nowrap;
  overflow: hidden;
}

.sd-catchips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.sd-catchip {
  --cat-color: var(--color-text-muted);
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 32px;
  padding: 5px 12px 5px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.sd-catchip::before {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cat-color);
}
.sd-catchip:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}
.sd-catchip[hidden] {
  display: none;
}
.sd-catchip__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sd-catchip__count {
  font-weight: 500;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}
.sd-catchip--empty {
  opacity: 0.55;
}
.sd-catchip--more {
  padding: 5px 10px 5px 12px;
  background: var(--color-bg-hover);
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.sd-catchip--more::-webkit-details-marker {
  display: none;
}
.sd-catchip--more::before {
  display: none;
}
.sd-catchip--more svg {
  width: 14px;
  height: 14px;
  transition: transform 0.15s ease;
}
.sd-catchip--more:hover {
  background: var(--color-primary-tint);
}
.sd-catchip.is-active {
  opacity: 1;
  background: color-mix(in srgb, var(--cat-color) 14%, var(--color-surface));
  border-color: color-mix(in srgb, var(--cat-color) 30%, transparent);
  color: var(--cat-color);
  font-weight: 600;
}
.sd-catchip.is-active .sd-catchip__count {
  color: inherit;
  opacity: 0.75;
}
.sd-catchip--all {
  padding-left: 12px;
}
.sd-catchip--all::before {
  display: none;
}
.sd-catchip--all.is-active {
  background: color-mix(in srgb, var(--color-primary) 16%, var(--color-surface));
  border-color: color-mix(in srgb, var(--color-primary) 45%, transparent);
  color: var(--color-primary-strong);
  font-weight: 600;
}
.sd-catchip--all.is-active .sd-catchip__count {
  color: inherit;
  opacity: 0.8;
}
.sd-catchip:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

details.sd-catmenu,
details.sd-catmenu[open] {
  position: relative;
  flex-shrink: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
details.sd-catmenu:hover,
details.sd-catmenu[open]:hover {
  border-color: transparent;
}

details.sd-catmenu[open] > summary.sd-catchip--more {
  border-color: transparent;
  background: var(--color-primary-tint);
  color: var(--color-text);
}
details.sd-catmenu[open] > summary.sd-catchip--more svg {
  transform: rotate(180deg);
}

.sd-catmenu__panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 300px;
  max-height: min(420px, 60vh);
  padding: 8px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
}
.sd-catmenu.is-align-end .sd-catmenu__panel {
  right: 0;
  left: auto;
}
.sd-catmenu__search {
  position: relative;
  display: block;
  flex-shrink: 0;
}
.sd-catmenu__search[hidden] {
  display: none;
}
.sd-catmenu__search svg {
  position: absolute;
  top: 50%;
  left: 10px;
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
  transform: translateY(-50%);
  pointer-events: none;
}
.sd-catmenu__search .form-input {
  width: 100%;
  min-height: 36px;
  padding-left: 34px;
}
.sd-catmenu__list {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}
.sd-catmenu__list li[hidden] {
  display: none;
}
.sd-catmenu__item {
  --cat-color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  color: var(--color-text);
  text-decoration: none;
}
.sd-catmenu__item::before {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cat-color);
}
.sd-catmenu__item:hover, .sd-catmenu__item:focus-visible {
  background: var(--color-bg-hover);
  outline: none;
}
.sd-catmenu__item.is-empty {
  color: var(--color-text-muted);
}
.sd-catmenu__item.is-active {
  background: color-mix(in srgb, var(--cat-color) 12%, var(--color-surface));
  font-weight: 600;
}
.sd-catmenu__label {
  flex: 1 1 auto;
  min-width: 0;
}
.sd-catmenu__count {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
}
.sd-catmenu__none {
  margin: 0;
  padding: 12px 10px;
  font-size: 13px;
  color: var(--color-text-muted);
  text-align: center;
}

@media (max-width: 640px) {
  .sd-catchip__long {
    display: none;
  }
  details.sd-catmenu,
  details.sd-catmenu[open] {
    position: static;
  }
  .sd-catmenu__panel, .sd-catmenu.is-align-end .sd-catmenu__panel {
    right: 0;
    left: 0;
    width: auto;
  }
}
:root[data-theme=dark] .sd-catchip.is-active:not(.sd-catchip--all),
:root[data-theme=dark] .sd-cat-badge {
  color: color-mix(in srgb, var(--cat-color) 60%, #fff);
}

.panel.sd-list {
  padding: 0;
  overflow: hidden;
}
.panel.sd-list > .panel__title {
  padding: 16px 20px 14px;
}
.panel.sd-list > .empty-state--panel {
  padding: 24px 20px 28px;
}

.sd-list__scroll {
  overflow-x: auto;
}

.sd-list .data-table.lms-table th:first-child,
.sd-list .data-table.lms-table td:first-child {
  padding-left: 20px;
}
.sd-list .data-table.lms-table th:last-child,
.sd-list .data-table.lms-table td:last-child {
  padding-right: 14px;
}

.sd-list .sd-table-footer {
  margin-top: 0;
  padding: 10px 16px 10px 20px;
  border-top: 1px solid var(--color-border-muted);
}

.sd-table-footer__range {
  min-width: 140px;
  text-align: right;
  white-space: nowrap;
  font-size: 12.5px;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.sd-table__main {
  width: 100%;
  max-width: 0;
}
.sd-table__status {
  width: 1%;
  white-space: nowrap;
}
.sd-table__go {
  width: 1%;
  text-align: right;
}
.sd-table__date {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.sd-table--click tbody tr {
  cursor: pointer;
}

.sd-row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.sd-row-title__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--color-text);
}

.sd-unread-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 20%, transparent);
}

.sd-table tr.is-new > td:first-child {
  box-shadow: inset 3px 0 0 var(--color-primary);
}
.sd-table tr.is-new .sd-row-title__text,
.sd-table tr.is-new .sd-table__date {
  font-weight: 600;
}

.sd-cat-badge--sm {
  padding: 1px 8px;
  font-size: 11.5px;
}

.sd-meta-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-bg-hover);
  color: var(--color-text-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  cursor: zoom-in;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.sd-meta-btn svg {
  width: 12px;
  height: 12px;
}
.sd-meta-btn:hover, .sd-meta-btn:focus-visible {
  background: color-mix(in srgb, var(--color-primary) 14%, transparent);
  color: var(--color-primary-strong);
}

.sd-resolution-note {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
  color: var(--color-text-muted);
  font-size: 12px;
  line-height: 1.5;
}
.sd-resolution-note svg {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
}
.sd-resolution-note__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sd-resolution-note--rejected {
  color: var(--color-danger);
}

.sd-source-mark {
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  background: var(--color-bg-hover);
  color: var(--color-text-muted);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

@keyframes sd-row-flash {
  from {
    background-color: color-mix(in srgb, var(--color-primary) 16%, transparent);
  }
  to {
    background-color: transparent;
  }
}
.sd-table tr.is-flash > td {
  animation: sd-row-flash 2s ease-out;
}
@media (prefers-reduced-motion: reduce) {
  .sd-table tr.is-flash > td {
    animation: none;
    background-color: color-mix(in srgb, var(--color-primary) 10%, transparent);
  }
}

.sd-go-btn {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.sd-go-btn svg {
  width: 16px;
  height: 16px;
}

.sd-table tbody tr:hover .sd-go-btn,
.sd-go-btn:focus-visible {
  background: var(--color-surface);
  color: var(--color-primary-strong);
  box-shadow: var(--shadow-soft);
}

.sd-person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.sd-person__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.35;
}
.sd-person__name {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
}
.sd-person__email {
  font-size: 11.5px;
  color: var(--color-text-muted);
  white-space: nowrap;
}

:root {
  --sd-waiting: #6d4bc4;
}

:root[data-theme=dark] {
  --sd-waiting: #b9a3f5;
}

.sd-status {
  --sd-accent: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--sd-accent) 13%, transparent);
  color: var(--sd-accent);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}
.sd-status::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.sd-status--pending {
  --sd-accent: var(--color-warning);
}
.sd-status--approved {
  --sd-accent: var(--color-primary);
}
.sd-status--rejected {
  --sd-accent: var(--color-danger);
}
.sd-status--completed {
  --sd-accent: var(--color-success);
}
.sd-status--waiting {
  --sd-accent: var(--sd-waiting);
}

.dialog.sd-card {
  width: min(1600px, 94vw);
  max-width: 94vw;
  height: max(min(720px, 88vh), 70vh);
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
}
.dialog.sd-card[open] {
  display: flex;
  flex-direction: column;
}
.dialog.sd-card .sd-dialog__close {
  top: 16px;
  right: 16px;
}

.sd-card__head {
  --cat-color: var(--color-primary);
  flex: 0 0 auto;
  padding: 22px 64px 16px 24px;
  box-shadow: inset 0 4px 0 var(--cat-color);
}

.sd-card__title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.sd-card__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--color-text);
}
.sd-card__title::before {
  content: "";
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cat-color);
}

.sd-card__byline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--color-text-muted);
}
.sd-card__byline b {
  font-weight: 600;
  color: var(--color-text);
}
.sd-card__byline a {
  color: inherit;
  text-decoration: none;
}
.sd-card__byline a:hover {
  color: var(--color-primary-strong);
  text-decoration: underline;
}

.sd-card__sep {
  opacity: 0.5;
}

.sr-assignees {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 12px;
}
.sr-assignees[hidden] {
  display: none;
}
.sr-assignees__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
}
.sr-assignees__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sr-assignee {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 4px 12px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-bg);
  color: var(--color-text);
  font: inherit;
  font-size: 13px;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.sr-assignee .doc-icon {
  width: 14px;
  height: 14px;
  color: var(--color-text-muted);
}
@media (hover: hover) {
  .sr-assignee:not(.is-current):hover {
    background: var(--color-bg-hover);
    color: var(--color-primary-strong);
  }
  .sr-assignee:not(.is-current):hover .doc-icon {
    color: currentColor;
  }
}
.sr-assignee:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.sr-assignee:disabled {
  opacity: 0.6;
  cursor: progress;
}
.sr-assignee.is-current {
  background: var(--color-primary-tint);
  color: var(--color-primary-strong);
  font-weight: 600;
  cursor: default;
}
.sr-assignee.is-current .doc-icon {
  color: currentColor;
}
@media (max-width: 768px) {
  .sr-assignee {
    min-height: 40px;
  }
}

.sd-card__body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 60%) minmax(0, 40%);
  grid-template-rows: minmax(0, 1fr);
}

.sd-card__details {
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 8px 24px 24px;
  background: var(--color-surface);
}

.sd-card__thread {
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
}

.sd-section__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.sd-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--color-bg-hover);
  color: var(--color-text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  font-variant-numeric: tabular-nums;
}
.sd-count[hidden] {
  display: none;
}

.sd-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px 20px;
}
.sd-fields__empty {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-muted);
}

.sd-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.sd-field__label {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
}
.sd-field__value {
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.sd-field--wide {
  grid-column: 1/-1;
}
.sd-field--wide .sd-field__value {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--color-bg);
}

.sd-resolution {
  --sd-accent: var(--color-success);
  padding: 12px 14px 12px 16px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--sd-accent) 8%, var(--color-surface));
  box-shadow: inset 3px 0 0 var(--sd-accent);
}
.sd-resolution--rejected {
  --sd-accent: var(--color-danger);
}
.sd-resolution__head {
  margin: 0 0 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sd-accent);
}
.sd-resolution__meta {
  font-weight: 500;
  color: var(--color-text-muted);
}
.sd-resolution__text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--color-text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.sd-card .sd-gallery__thumbs {
  flex-wrap: wrap;
  gap: 10px;
  overflow: visible;
  padding-bottom: 0;
}

.sd-card .sd-gallery__thumb {
  width: 96px;
  height: 96px;
  border-color: transparent;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.sd-card .sd-gallery__thumb:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--color-primary) 45%, transparent);
  box-shadow: var(--shadow-hover);
}

.sd-filelist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sd-gallery__thumbs + .sd-filelist {
  margin-top: 10px;
}

.sd-file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 7px 12px 7px 8px;
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 13px;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.sd-file:hover {
  background: var(--color-bg-hover);
}
.sd-file__ext {
  flex-shrink: 0;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--color-primary) 14%, transparent);
  color: var(--color-primary-strong);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.sd-file__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sd-card__foot {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 12px 24px;
  border-top: 1px solid var(--color-border-muted);
  background: var(--color-surface);
}
.sd-card__foot[data-mode=closed] {
  display: none;
}

.sd-card__resolve {
  display: none;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}
.sd-card__resolve textarea {
  min-height: 60px;
  resize: vertical;
}

.sd-card__resolve-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-text);
}

.sd-card__req {
  color: var(--color-danger);
}

.sd-card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sd-card__actions--main {
  flex: 1 1 auto;
  justify-content: flex-end;
}
.sd-card__actions--confirm {
  display: none;
}

.sd-card__reject {
  margin-right: auto;
}

.sd-card__foot[data-mode=reject] .sd-card__resolve,
.sd-card__foot[data-mode=complete] .sd-card__resolve,
.sd-card__foot[data-mode=return] .sd-card__resolve,
.sd-card__foot[data-mode=clarify] .sd-card__resolve {
  display: block;
}
.sd-card__foot[data-mode=reject] .sd-card__actions--main,
.sd-card__foot[data-mode=complete] .sd-card__actions--main,
.sd-card__foot[data-mode=return] .sd-card__actions--main,
.sd-card__foot[data-mode=clarify] .sd-card__actions--main {
  display: none;
}
.sd-card__foot[data-mode=reject] .sd-card__actions--confirm,
.sd-card__foot[data-mode=complete] .sd-card__actions--confirm,
.sd-card__foot[data-mode=return] .sd-card__actions--confirm,
.sd-card__foot[data-mode=clarify] .sd-card__actions--confirm {
  display: flex;
}

@media (max-width: 768px) {
  .dialog.sd-card {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
  .sd-card__head {
    padding: 18px 56px 12px 16px;
  }
  .sd-card__body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    overflow-y: auto;
  }
  .sd-card__details {
    overflow: visible;
    padding: 4px 16px 20px;
  }
  .sd-card__thread {
    min-height: 360px;
  }
  .sd-card__foot {
    flex-wrap: wrap;
    padding: 10px 16px;
  }
  .sd-card__actions {
    flex-wrap: wrap;
  }
  .sd-person__email {
    display: none;
  }
}
.sd-dialog__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-bg-muted);
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.sd-dialog__close:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}

:root[data-ui-version=modern] .sd-status--pending {
  background: var(--color-warning-bg);
  color: var(--color-warning-text);
  box-shadow: inset 0 0 0 1px var(--color-warning-border);
}
:root[data-ui-version=modern] .sd-status--approved {
  background: var(--color-info-bg);
  color: var(--color-info-text);
  box-shadow: inset 0 0 0 1px var(--color-info-border);
}
:root[data-ui-version=modern] .sd-status--rejected {
  background: var(--color-danger-bg);
  color: var(--color-danger-text);
  box-shadow: inset 0 0 0 1px var(--color-danger-border);
}
:root[data-ui-version=modern] .sd-status--completed {
  background: var(--color-success-bg);
  color: var(--color-success-text);
  box-shadow: inset 0 0 0 1px var(--color-success-border);
}
:root[data-ui-version=modern] .sd-status--waiting {
  background: color-mix(in srgb, var(--sd-waiting) 14%, transparent);
  color: var(--sd-waiting);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sd-waiting) 35%, transparent);
}
:root[data-ui-version=modern] .sd-tile {
  border-color: transparent;
  box-shadow: var(--shadow-soft);
}
:root[data-ui-version=modern] .sd-tile:hover, :root[data-ui-version=modern] .sd-tile:focus-visible {
  border-color: transparent;
  box-shadow: var(--shadow-hover);
}
:root[data-ui-version=modern] .sd-catchip.is-active:not(.sd-catchip--all) {
  border-color: transparent;
  background: color-mix(in srgb, var(--cat-color) 12%, var(--color-surface));
}
:root[data-ui-version=modern] .sd-gallery__thumb {
  border-color: transparent;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}
:root[data-ui-version=modern] .sd-gallery__thumb:hover {
  border-color: transparent;
  box-shadow: var(--shadow-hover);
}
:root[data-ui-version=modern] .sd-tabs {
  gap: 6px;
  border-bottom: 0;
}
:root[data-ui-version=modern] .sd-tabs__tab {
  padding: 7px 14px;
  border-radius: var(--radius-md);
  border-bottom: 0;
  margin-bottom: 0;
}
:root[data-ui-version=modern] .sd-tabs__tab:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}
:root[data-ui-version=modern] .sd-tabs__tab--active {
  background: var(--color-primary-tint);
  border-bottom-color: transparent;
  color: var(--color-primary-strong);
}
:root[data-ui-version=modern] .sd-tabs__tab--active:hover {
  background: var(--color-primary-tint);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

button.sd-segment__item {
  border: 0;
  background: none;
  font-family: inherit;
  cursor: pointer;
}
button.sd-segment__item.is-active {
  background: var(--color-primary-tint);
}
button.sd-segment__item:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.sd-list .empty-state__icon,
#js-srr-root .empty-state__icon {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-primary-tint);
  color: var(--color-primary-strong);
}
.sd-list .empty-state__icon .doc-icon,
#js-srr-root .empty-state__icon .doc-icon {
  width: 26px;
  height: 26px;
}

.sd-card__byline .sr-id {
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  background: var(--color-bg-muted);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.sd-fields.sr-tiles {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.sd-fields.sr-tiles .sd-field {
  gap: 5px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--color-bg);
}
.sd-fields.sr-tiles .sd-field__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.sd-fields.sr-tiles .sd-field--wide .sd-field__value {
  padding: 0;
  background: none;
}

.sr-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
}
.sr-info__row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  padding: 7px 0;
  font-size: 13.5px;
  border-bottom: 1px solid var(--color-border-muted);
}
.sr-info__row:last-child {
  border-bottom: 0;
}
.sr-info dt {
  margin: 0;
  color: var(--color-text-muted);
}
.sr-info dd {
  margin: 0;
  color: var(--color-text);
  overflow-wrap: anywhere;
}
.sr-info__muted {
  color: var(--color-text-muted);
  font-size: 12.5px;
}
.sr-info__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 8px;
  color: var(--color-primary-strong);
  font-weight: 600;
  text-decoration: none;
}
.sr-info__link .doc-icon {
  width: 14px;
  height: 14px;
}
.sr-info__link:hover {
  text-decoration: underline;
}

.sr-timeline__head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
}
.sr-timeline__list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 16px 16px;
}

.sr-compose {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 16px 8px;
  padding: 12px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}
.sr-compose[hidden] {
  display: none;
}
.sr-compose__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
}
.sr-compose .sr-compose__input {
  width: 100%;
  min-height: 56px;
  max-height: 160px;
  margin: 0;
  padding: 8px 10px;
  resize: none;
  overflow-y: auto;
  border: 1px solid var(--color-border-muted);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  font: inherit;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--color-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.sr-compose .sr-compose__input::placeholder {
  color: var(--color-text-muted);
  opacity: 0.8;
}
.sr-compose .sr-compose__input:focus {
  outline: none;
  background: var(--color-surface);
  border-color: color-mix(in srgb, var(--color-primary) 60%, transparent);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.sr-compose__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.sr-compose__hint {
  font-size: 11.5px;
  color: var(--color-text-muted);
}
.sr-compose__closed {
  flex: 0 0 auto;
  margin: 4px 16px 8px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-text-muted) 8%, transparent);
  font-size: 12.5px;
  color: var(--color-text-muted);
  text-align: center;
}
.sr-compose__closed[hidden] {
  display: none;
}

.sr-chrono {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sr-chrono__item {
  --sr-kind: var(--color-border);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft), inset 3px 0 0 var(--sr-kind);
}
.sr-chrono__item--created {
  --sr-kind: var(--color-border);
}
.sr-chrono__item--taken {
  --sr-kind: var(--color-primary);
}
.sr-chrono__item--returned {
  --sr-kind: var(--color-warning);
}
.sr-chrono__item--rejected {
  --sr-kind: var(--color-danger);
}
.sr-chrono__item--completed {
  --sr-kind: var(--color-success);
}
.sr-chrono__item--comment {
  --sr-kind: #3b82f6;
}
.sr-chrono__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin-bottom: 4px;
  font-size: 12.5px;
}
.sr-chrono__kind {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px 2px 7px;
  border-radius: var(--radius-pill);
  background: var(--color-bg-muted);
  color: var(--color-text);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}
.sr-chrono__kind .doc-icon {
  width: 14px;
  height: 14px;
}
.sr-chrono__kind--taken {
  background: var(--color-primary-tint);
  color: var(--color-primary-strong);
}
.sr-chrono__kind--returned {
  background: var(--color-warning-bg);
  color: var(--color-warning-text);
}
.sr-chrono__kind--rejected {
  background: var(--color-danger-bg);
  color: var(--color-danger-text);
}
.sr-chrono__kind--completed {
  background: var(--color-success-bg);
  color: var(--color-success-text);
}
.sr-chrono__kind--comment {
  background: var(--color-info-bg);
  color: var(--color-info-text);
}
.sr-chrono__author {
  font-weight: 600;
  color: var(--color-text);
}
.sr-chrono__you {
  font-weight: 400;
  color: var(--color-text-muted);
}
.sr-chrono__edited {
  font-size: 12px;
  color: var(--color-text-muted);
  cursor: help;
}
.sr-chrono__edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
}
.sr-chrono__edit-btn .doc-icon {
  width: 16px;
  height: 16px;
}
.sr-chrono__edit-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}
@media (hover: hover) {
  .sr-chrono__edit-btn:hover {
    background: var(--color-bg-muted);
    color: var(--color-text);
  }
}
@media (max-width: 768px) {
  .sr-chrono__edit-btn {
    width: 40px;
    height: 40px;
  }
}
.sr-chrono__editor {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.sr-chrono__edit-input {
  width: 100%;
  min-height: 64px;
  max-height: 160px;
  margin: 0;
  padding: 8px 10px;
  resize: none;
  overflow-y: auto;
  border: 1px solid color-mix(in srgb, var(--color-primary) 60%, transparent);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font: inherit;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--color-text);
}
.sr-chrono__edit-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.sr-chrono__edit-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.sr-chrono__edit-foot .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sr-chrono__edit-foot .btn .doc-icon {
  width: 16px;
  height: 16px;
}
@media (max-width: 768px) {
  .sr-chrono__edit-foot .btn {
    min-height: 40px;
  }
}
.sr-chrono__edit-hint {
  margin-right: auto;
  font-size: 11.5px;
  color: var(--color-text-muted);
}
@media (max-width: 768px) {
  .sr-chrono__edit-hint {
    display: none;
  }
}
.sr-chrono__date {
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}
.sr-chrono__text {
  margin-top: 4px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--color-text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.sr-chrono__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 24px 12px;
  text-align: center;
  font-size: 13px;
  color: var(--color-text-muted);
  list-style: none;
}
.sr-chrono__empty p {
  margin: 0;
}
.sr-chrono__empty .doc-icon {
  width: 24px;
  height: 24px;
  opacity: 0.6;
}

@media (max-width: 768px) {
  .sr-info__row {
    grid-template-columns: 120px minmax(0, 1fr);
  }
  .sr-timeline__list {
    overflow: visible;
  }
  .dialog.sd-card .sd-card__details,
  .dialog.sd-card .sd-card__thread {
    min-height: auto;
    min-width: 0;
  }
  .dialog.sd-card .sd-card__body {
    overflow-x: hidden;
  }
  .dialog.sd-card .sd-card__foot {
    position: sticky;
    bottom: 0;
    box-shadow: 0 -4px 16px rgba(16, 20, 28, 0.06);
  }
}
.srs-loading,
.srs-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--color-bg-muted);
  font-size: 13px;
  color: var(--color-text-muted);
}
.srs-loading .doc-icon,
.srs-empty .doc-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.srs-loading.is-error,
.srs-empty.is-error {
  background: var(--color-danger-bg);
  color: var(--color-danger-text);
}

.srs-muted {
  font-size: 12.5px;
  color: var(--color-text-muted);
}

.srs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.srs-card {
  --cat-color: var(--color-primary);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 20px 20px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}
.srs-card--wide {
  max-width: 760px;
  margin-bottom: 24px;
}
.srs-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.srs-card__dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cat-color);
}
.srs-card__icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-md);
  background: var(--color-primary-tint);
  color: var(--color-primary-strong);
}
.srs-card__icon .doc-icon {
  width: 16px;
  height: 16px;
}
.srs-card__title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

.srs-state {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: var(--color-bg-muted);
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 600;
}
.srs-state.is-ok {
  background: var(--color-success-bg);
  color: var(--color-success-text);
}
.srs-state .doc-icon {
  width: 13px;
  height: 13px;
}

.srs-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.srs-block__title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
}
.srs-block__hint {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.srs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.srs-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 4px 4px 11px;
  border-radius: var(--radius-pill);
  background: var(--color-primary-tint);
  color: var(--color-primary-strong);
  font-size: 13px;
  font-weight: 600;
}
.srs-chip__remove {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background-color 0.12s ease;
}
.srs-chip__remove .doc-icon {
  width: 12px;
  height: 12px;
}
.srs-chip__remove:hover {
  background: color-mix(in srgb, var(--color-primary-strong) 16%, transparent);
}
.srs-chip__remove:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--color-primary-light);
}

.srs-add {
  display: flex;
  align-items: center;
  min-height: 32px;
}

.srs-rules {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.srs-rule {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 12px;
  border-radius: var(--radius-md);
  background: var(--color-bg);
}

.srs-who {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.srs-who__name {
  font-size: 13.5px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.srs-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.srs-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  box-shadow: inset 0 0 0 1px var(--color-border);
  color: var(--color-text-muted);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}
.srs-toggle .doc-icon {
  width: 14px;
  height: 14px;
}
.srs-toggle:hover:not(:disabled) {
  color: var(--color-text);
  box-shadow: inset 0 0 0 1px var(--color-primary);
}
.srs-toggle.is-on {
  background: var(--color-primary-strong);
  color: #fff;
  box-shadow: none;
}
.srs-toggle.is-on:hover:not(:disabled) {
  background: var(--color-primary-strong-hover);
  color: #fff;
}
.srs-toggle:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.srs-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.srs-rule__warn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-warning-text);
}
.srs-rule__warn .doc-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.srs-callback {
  padding-top: 4px;
}
.srs-callback__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.srs-callback__url {
  flex: 1 1 280px;
  min-width: 0;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 12.5px;
}

.srs-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
}
.srs-icon-btn .doc-icon {
  width: 16px;
  height: 16px;
}
.srs-icon-btn:hover {
  background: var(--color-danger-bg);
  color: var(--color-danger-text);
}
.srs-icon-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.srs-picker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 380px;
}
.srs-picker__input {
  flex: 1 1 auto;
  min-width: 0;
}
.srs-picker__list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  max-height: 240px;
  margin: 0;
  padding: 4px;
  overflow-y: auto;
  list-style: none;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
}
.srs-picker__list[hidden] {
  display: none;
}
.srs-picker__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
}
.srs-picker__item:hover {
  background: var(--color-primary-tint);
}
.srs-picker__item .doc-icon {
  width: 14px;
  height: 14px;
  color: var(--color-primary-strong);
}
.srs-picker__name {
  font-weight: 600;
}
.srs-picker__email {
  margin-left: auto;
  font-size: 12px;
  color: var(--color-text-muted);
}
.srs-picker__empty {
  padding: 8px 10px;
  font-size: 12.5px;
  color: var(--color-text-muted);
}

.srs-form {
  display: grid;
  gap: 12px;
  max-width: 560px;
}
.srs-form .field {
  margin: 0;
}
.srs-form__actions {
  display: flex;
  gap: 8px;
}

@media (max-width: 640px) {
  .srs-rule {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .srs-toggles {
    grid-column: 1/-1;
    order: 3;
  }
}
.srr-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 16px;
}
.srr-filter__dates {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.srr-filter__dates[hidden] {
  display: none;
}
.srr-filter__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-muted);
}
.srr-filter__cat {
  margin-left: auto;
}

#js-srr-root.is-loading {
  opacity: 0.55;
  transition: opacity 0.15s ease;
}

.srr-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.srr-kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}
.srr-kpi__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.srr-kpi__value {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
}
.srr-kpi__sub {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--color-text-muted);
}
.srr-kpi__sub .doc-icon {
  width: 13px;
  height: 13px;
}
.srr-kpi--ok .srr-kpi__value {
  color: var(--color-success);
}
.srr-kpi--warn {
  background: color-mix(in srgb, var(--color-warning) 8%, var(--color-surface));
}
.srr-kpi--warn .srr-kpi__sub {
  color: var(--color-warning-text);
  font-weight: 600;
}

.srr-panel {
  margin-bottom: 16px;
  padding: 16px 18px 18px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}
.srr-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.srr-panel__title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text);
}
.srr-panel--collapsible {
  padding-bottom: 16px;
}
.srr-panel--collapsible .srr-panel__title {
  margin: 0;
  margin-right: auto;
}
.srr-panel--collapsible .srr-legend {
  margin: 0;
}
.srr-panel--collapsible.is-open .srr-panel__head {
  margin-bottom: 12px;
}

.srr-chart-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.srr-chart-toggle .doc-icon {
  width: 16px;
  height: 16px;
}
@media (max-width: 768px) {
  .srr-chart-toggle {
    min-height: 40px;
  }
}

.srr-legend {
  display: flex;
  gap: 14px;
  margin-bottom: 12px;
  font-size: 12.5px;
  color: var(--color-text-muted);
}
.srr-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.srr-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.srr-swatch--created {
  background: var(--color-primary);
}
.srr-swatch--completed {
  background: var(--color-success);
}

.srr-chart {
  overflow-x: auto;
}
.srr-chart svg {
  display: block;
  width: 100%;
  min-width: 640px;
  height: auto;
}
.srr-chart .srr-grid {
  stroke: var(--color-border-muted);
  stroke-width: 1;
}
.srr-chart .srr-axis {
  fill: var(--color-text-muted);
  font-size: 11px;
}
.srr-chart .srr-hit {
  fill: transparent;
}
.srr-chart .srr-bar--created {
  fill: var(--color-primary);
}
.srr-chart .srr-bar--completed {
  fill: var(--color-success);
}
.srr-chart .srr-bar.is-zero {
  fill: var(--color-border);
}
.srr-chart .srr-day:hover .srr-hit {
  fill: color-mix(in srgb, var(--color-primary) 8%, transparent);
}

.srr-table td, .srr-table th {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.srr-table td.srr-name {
  white-space: normal;
  font-weight: 600;
}

.srr-share {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 170px;
}
.srr-share__num {
  min-width: 22px;
  font-weight: 600;
}
.srr-share__bar {
  flex: 1 1 auto;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--color-bg-muted);
  overflow: hidden;
}
.srr-share__bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
}
.srr-share__pct {
  min-width: 34px;
  font-size: 12px;
  color: var(--color-text-muted);
  text-align: right;
}

.srr-warn {
  color: var(--color-warning-text);
  font-weight: 700;
}
.srr-warn .doc-icon {
  width: 14px;
  height: 14px;
  margin-right: 4px;
  vertical-align: -2px;
}

.srr-muted {
  color: var(--color-text-muted);
  text-align: center;
}

.sd-filters {
  align-items: center;
}
.sd-filters .form-input,
.sd-filters .form-select {
  height: 36px;
  font-size: 13px;
}
.sd-filters .form-select {
  width: auto;
  max-width: 220px;
}
.sd-filters > label {
  display: inline-flex;
}

.sd-filters__period {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.sd-search {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 1 1 240px;
  max-width: 360px;
  min-width: 200px;
}
.sd-search .doc-icon {
  position: absolute;
  left: 11px;
  color: var(--color-text-muted);
  pointer-events: none;
}
.sd-search .form-input {
  width: 100%;
  padding-left: 34px;
}

.sd-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.sd-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.sd-toggle:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}
.sd-toggle:has(input:focus-visible) {
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.sd-toggle.is-active {
  background: color-mix(in srgb, var(--color-warning) 14%, var(--color-surface));
  color: var(--color-text);
  font-weight: 600;
}

.sd-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  text-decoration: none;
}
.sd-sort:hover {
  color: var(--color-text);
}
.sd-sort.is-active {
  color: var(--color-text);
  font-weight: 700;
}

.sd-wait {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}
.sd-wait--overdue {
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--color-warning) 16%, transparent);
  color: var(--color-warning);
  font-weight: 600;
}
.sd-wait--author {
  color: var(--sd-waiting);
  font-weight: 600;
}

.sd-table tr.is-awaiting-you > td:first-child {
  box-shadow: inset 3px 0 0 var(--sd-waiting);
}

@media (max-width: 768px) {
  .sd-card__actions--main {
    justify-content: stretch;
  }
  .sd-card__actions--main .btn {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
    min-height: 40px;
  }
  .sd-card__actions--main .sd-card__reject {
    margin-right: 0;
  }
}
.sr-waiting {
  display: flex;
  gap: 12px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--sd-waiting) 12%, var(--color-surface));
  color: var(--color-text);
}
.sr-waiting[hidden] {
  display: none;
}
.sr-waiting__icon {
  flex: 0 0 auto;
  display: flex;
  margin-top: 1px;
  color: var(--sd-waiting);
}
.sr-waiting__icon .doc-icon {
  width: 18px;
  height: 18px;
}
.sr-waiting__body {
  min-width: 0;
  flex: 1 1 auto;
}
.sr-waiting__title, .sr-waiting__text, .sr-waiting__note {
  margin: 0;
}
.sr-waiting__title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--sd-waiting);
}
.sr-waiting__text {
  margin-top: 4px;
  font-size: 13.5px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.sr-waiting__text[hidden] {
  display: none;
}
.sr-waiting__note {
  margin-top: 6px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.sd-muted {
  color: var(--color-text-muted);
}

.sd-row-title__text mark,
.sd-person mark {
  padding: 0 2px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--color-warning) 28%, transparent);
  color: inherit;
}

@media (max-width: 768px) {
  .sd-filters {
    flex-direction: column;
    align-items: stretch;
  }
  .sd-filters .form-select {
    width: 100%;
    max-width: none;
  }
  .sd-search {
    flex: 0 0 auto;
    max-width: none;
    min-width: 0;
  }
  .sd-filters__period {
    display: flex;
  }
  .sd-filters__period > label {
    flex: 1 1 140px;
  }
  .sd-toggle {
    justify-content: center;
  }
  .drp {
    flex: 0 0 auto;
  }
}
.srs-tabs {
  margin-bottom: 16px;
}
.srs-tabs .sd-segment__item {
  border: 0;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}
.srs-tabs .sd-segment__item.is-active {
  background: var(--color-primary-tint);
}
.srs-tabs .sd-segment__item .doc-icon {
  width: 15px;
  height: 15px;
}
.srs-tabs .sd-segment__item:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.srs-split {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
@media (max-width: 768px) {
  .srs-split {
    grid-template-columns: minmax(0, 1fr);
  }
}

.srs-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}
.srs-list__items {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.srs-list__add {
  align-self: stretch;
  justify-content: center;
}

.srs-svc {
  --cat-color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 2px;
  border-radius: var(--radius-md);
  transition: background-color 0.12s ease;
}
.srs-svc:hover {
  background: var(--color-bg-hover);
}
.srs-svc.is-active {
  background: var(--color-primary-tint);
}
.srs-svc__main {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 6px 8px 8px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.srs-svc__main:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.srs-svc__icon {
  display: inline-grid;
  flex-shrink: 0;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background: var(--color-bg-muted);
  font-size: 17px;
  line-height: 1;
}
.srs-svc__icon .doc-icon {
  width: 18px;
  height: 18px;
}
.srs-svc__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.srs-svc__name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-text);
  overflow-wrap: anywhere;
}
.srs-svc__meta {
  font-size: 12px;
  color: var(--color-text-muted);
}
.srs-svc__move {
  display: flex;
  flex-shrink: 0;
  flex-direction: column;
  padding-right: 4px;
}

.srs-icon-btn--plain {
  width: 24px;
  height: 24px;
}
.srs-icon-btn--plain .doc-icon {
  width: 14px;
  height: 14px;
}
.srs-icon-btn--plain:hover:not(:disabled) {
  background: var(--color-bg-hover);
  color: var(--color-text);
}
.srs-icon-btn--plain:disabled {
  opacity: 0.3;
  cursor: default;
}

.srs-archive {
  padding-top: 4px;
}
.srs-archive__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.srs-archive__toggle .doc-icon {
  width: 14px;
  height: 14px;
}
.srs-archive__toggle:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}
.srs-archive__toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.srs-archive__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}
.srs-archive__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius-md);
  background: var(--color-bg);
}
.srs-archive__name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.srs-detail {
  min-width: 0;
}

.srs-card__save {
  margin-left: auto;
}

.srs-form--svc {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.srs-grid-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}
.srs-grid-fields .field {
  margin: 0;
}
.srs-grid-fields .srs-field--wide {
  grid-column: 1/-1;
}
@media (max-width: 640px) {
  .srs-grid-fields {
    grid-template-columns: minmax(0, 1fr);
  }
}

.srs-iconpick {
  display: flex;
  align-items: center;
  gap: 8px;
}
.srs-iconpick__badge {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--color-bg-muted);
  box-shadow: inset 0 0 0 1px var(--color-border-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.srs-iconpick__badge .doc-icon {
  width: 20px;
  height: 20px;
}
.srs-iconpick__badge:hover {
  box-shadow: inset 0 0 0 1px var(--color-primary);
}
.srs-iconpick__badge:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.srs-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.srs-swatch {
  position: relative;
  display: inline-grid;
  cursor: pointer;
}
.srs-swatch input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.srs-swatch span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--sw);
  color: #fff;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.srs-swatch span .doc-icon {
  width: 14px;
  height: 14px;
  opacity: 0;
}
.srs-swatch:hover span {
  transform: scale(1.08);
}
.srs-swatch input:checked + span {
  box-shadow: 0 0 0 2px var(--color-surface), 0 0 0 4px var(--sw);
}
.srs-swatch input:checked + span .doc-icon {
  opacity: 1;
}
.srs-swatch input:focus-visible + span {
  box-shadow: 0 0 0 2px var(--color-surface), 0 0 0 4px var(--color-primary-light);
}

.srs-radios {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.srs-radio,
.srs-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  cursor: pointer;
}
.srs-radio input,
.srs-check input {
  margin: 0;
  accent-color: var(--color-primary-strong);
}

.srs-check {
  display: flex;
}

.srs-topic-label {
  max-width: 360px;
  margin: 0;
}

.srs-topics {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.srs-topic {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--color-bg);
}
.srs-topic--row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}
.srs-topic__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.srs-topic__name {
  min-width: 0;
  font-size: 13.5px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.srs-topic__tools {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 2px;
}
.srs-topic__execs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.srs-topic__add {
  display: inline-flex;
}

.srs-inline-input {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 360px;
}

.srs-topic__head.is-editing,
.srs-topic--row.is-editing {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.srs-inline-actions {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
}
.srs-inline-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.srs-inline-actions .btn .doc-icon {
  width: 16px;
  height: 16px;
}
@media (max-width: 768px) {
  .srs-inline-actions .btn {
    min-height: 40px;
  }
}

.srs-addrow {
  display: flex;
  gap: 8px;
  align-items: center;
}
.srs-addrow input {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 420px;
}

.srs-danger {
  display: flex;
  padding-top: 4px;
}

.srs-dialog {
  width: min(480px, 100vw - 32px);
}

@media (max-width: 768px) {
  .sd-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .sd-tabs::-webkit-scrollbar {
    display: none;
  }
  .sd-tabs__tab {
    flex: 0 0 auto;
    white-space: nowrap;
    min-height: 40px;
  }
}
@media (max-width: 640px) {
  :root[data-ui-version=modern] .sd-tabs {
    gap: 2px;
  }
  :root[data-ui-version=modern] .sd-tabs__tab {
    padding: 7px 8px;
    font-size: 13px;
  }
  .sd-tabs__tab .doc-icon {
    display: none;
  }
  .sd-attach-btn {
    min-height: 40px;
  }
}
@media (max-width: 1024px) {
  .sd-list__scroll {
    overflow-x: visible;
  }
  .data-table.lms-table.sd-table--click, .data-table.lms-table.sd-table--click tbody {
    display: block;
  }
  .data-table.lms-table.sd-table--click thead {
    display: none;
  }
  .data-table.lms-table.sd-table--click tbody tr {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--color-border-muted);
  }
  .data-table.lms-table.sd-table--click tbody tr > td {
    display: block;
    width: auto;
    max-width: none;
    padding: 0;
    border: 0;
  }
  .data-table.lms-table.sd-table--click tbody tr.is-new {
    background: color-mix(in srgb, var(--color-primary) 5%, var(--color-surface));
  }
  .data-table.lms-table.sd-table--click tbody tr.is-new > td,
  .data-table.lms-table.sd-table--click tbody tr.is-new:hover > td {
    background: transparent;
  }
  .data-table.lms-table.sd-table--click tbody tr > td.sd-table__main {
    flex: 0 0 100%;
    padding-right: 44px;
  }
  .data-table.lms-table.sd-table--click .sd-row-title__text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .data-table.lms-table.sd-table--click tbody tr > td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--color-text-muted);
  }
  .data-table.lms-table.sd-table--click tbody tr > td.sd-table__cell--person {
    flex: 0 0 100%;
  }
  .data-table.lms-table.sd-table--click tbody tr > td.sd-table__cell--person::before {
    display: none;
  }
  .data-table.lms-table.sd-table--click .sd-person__body {
    min-width: 0;
  }
  .data-table.lms-table.sd-table--click .sd-person__name, .data-table.lms-table.sd-table--click .sd-person__email {
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .data-table.lms-table.sd-table--click .sd-person__email {
    display: block;
  }
  .data-table.lms-table.sd-table--click tbody tr > td.sd-table__status {
    margin-left: auto;
    width: auto;
  }
  .data-table.lms-table.sd-table--click tbody tr > td.sd-table__go {
    position: absolute;
    top: 8px;
    right: 8px;
    width: auto;
  }
}
.sd-list .data-table.lms-table td.sd-table__main {
  min-width: 240px;
}

@media (max-width: 1280px) {
  .sd-table--click .sd-person__email {
    display: none;
  }
}
.sd-list .data-table.lms-table td.sd-table__main .sd-row-title__text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  overflow: hidden;
  overflow-wrap: anywhere;
}

@media (min-width: 1025px) and (max-width: 1280px) {
  .sd-table--click th:last-child,
  .sd-table--click td.sd-table__go {
    display: none;
  }
}
@media (pointer: coarse) {
  .sd-go-btn,
  .srs-icon-btn,
  .srs-icon-btn--plain {
    width: 40px;
    height: 40px;
  }
  .sd-chip__remove {
    min-width: 40px;
    min-height: 40px;
  }
  .srs-topic__tools {
    gap: 0;
  }
}
.srs-detail {
  scroll-margin-top: 68px;
}

.sr-dept-hint {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0 0 12px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: var(--color-bg-muted);
}
.sr-dept-hint .doc-icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 1px;
}
.sr-dept-hint a {
  color: inherit;
  text-decoration: underline;
}
.sr-dept-hint[hidden] {
  display: none;
}

.srs-block > .btn {
  align-self: flex-start;
}

.sd-segment__item--archive {
  margin-left: 6px;
}
.sd-segment__item--archive .doc-icon {
  width: 14px;
  height: 14px;
}

.sd-archived-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--color-bg-muted);
  color: var(--color-text);
}
.sd-archived-pill .doc-icon {
  width: 12px;
  height: 12px;
}

.sd-archived-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--color-bg-muted);
  color: var(--color-text);
  font-size: 13px;
  line-height: 1.5;
}
.sd-archived-note .doc-icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--color-text-muted);
}
.sd-archived-note p {
  margin: 0;
}

.sd-card__actions--admin {
  flex: 0 0 auto;
}

.sd-card__foot[data-mode=admin] .sd-card__actions--main,
.sd-card__foot[data-mode=archived] .sd-card__actions--main {
  display: none;
}
.sd-card__foot[data-mode=admin] .sd-card__actions--admin,
.sd-card__foot[data-mode=archived] .sd-card__actions--admin {
  margin-left: auto;
}

.sd-card__foot[data-mode=reject] .sd-card__actions--admin,
.sd-card__foot[data-mode=complete] .sd-card__actions--admin,
.sd-card__foot[data-mode=return] .sd-card__actions--admin,
.sd-card__foot[data-mode=clarify] .sd-card__actions--admin {
  display: none;
}

.sd-archive-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 768px) {
  .data-table.lms-table.sd-table--click tbody tr > td.sd-table__go--archive {
    position: static;
    flex: 0 0 100%;
  }
  .data-table.lms-table.sd-table--click tbody tr > td.sd-table__go--archive .sd-archive-actions {
    width: 100%;
    justify-content: space-between;
  }
}
.sr-id-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 20px;
  padding: 1px 8px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-bg-muted);
  color: var(--color-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.sr-id-pill__icon {
  display: inline-flex;
  color: var(--color-text-muted);
  transition: opacity 0.15s ease;
}
.sr-id-pill__icon .doc-icon {
  width: 12px;
  height: 12px;
}
.sr-id-pill:hover {
  background: var(--color-bg-hover);
}
.sr-id-pill:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.sr-id-pill.is-copied .sr-id-pill__icon {
  color: var(--color-success);
}
@media (hover: hover) {
  .sr-id-pill__icon {
    opacity: 0;
  }
  .sr-id-pill:hover .sr-id-pill__icon, .sr-id-pill:focus-visible .sr-id-pill__icon, .sr-id-pill.is-copied .sr-id-pill__icon {
    opacity: 1;
  }
}

@media (pointer: coarse) {
  .sr-id-pill {
    position: relative;
  }
  .sr-id-pill::after {
    content: "";
    position: absolute;
    inset: -10px -4px;
  }
}
.sd-card__thread .sr-compose {
  margin: 14px 16px 4px;
  padding: 14px;
  box-shadow: var(--shadow-hover);
  transition: box-shadow 0.15s ease;
}
.sd-card__thread .sr-compose:focus-within {
  box-shadow: var(--shadow-hover), 0 0 0 2px var(--color-primary-light);
}
.sd-card__thread .sr-compose .sr-compose__label {
  font-size: 13px;
  color: var(--color-text);
}

.sd-card__thread .sr-timeline__head {
  padding: 16px 20px 8px;
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.sd-card__thread .sr-timeline__head::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--color-border-muted);
}

.sd-card__thread .sr-chrono {
  position: relative;
  gap: 4px;
  padding-left: 22px;
}
.sd-card__thread .sr-chrono::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 7px;
  width: 2px;
  border-radius: 1px;
  background: var(--color-border-muted);
}
.sd-card__thread .sr-chrono .sr-chrono__item {
  position: relative;
  padding: 6px 2px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.sd-card__thread .sr-chrono .sr-chrono__item::before {
  content: "";
  position: absolute;
  top: 12px;
  left: -20px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sr-kind);
  box-shadow: 0 0 0 3px var(--color-bg);
}
.sd-card__thread .sr-chrono .sr-chrono__item--created::before {
  background: var(--color-text-muted);
}
.sd-card__thread .sr-chrono .sr-chrono__item--participant_added, .sd-card__thread .sr-chrono .sr-chrono__item--executor_added {
  --sr-kind: var(--color-primary);
}
.sd-card__thread .sr-chrono .sr-chrono__item--executor_removed, .sd-card__thread .sr-chrono .sr-chrono__item--participant_removed {
  --sr-kind: var(--color-text-muted);
}
.sd-card__thread .sr-chrono .sr-chrono__item--archived, .sd-card__thread .sr-chrono .sr-chrono__item--restored {
  --sr-kind: var(--color-warning);
}
.sd-card__thread .sr-chrono .sr-chrono__item--comment {
  margin: 2px 0;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
}
.sd-card__thread .sr-chrono .sr-chrono__item--comment::before {
  top: 16px;
}
.sd-card__thread .sr-chrono .sr-chrono__item:not(.sr-chrono__item--comment) .sr-chrono__text {
  margin-top: 2px;
  font-size: 13px;
  color: var(--color-text-muted);
}
.sd-card__thread .sr-chrono .sr-chrono__empty {
  margin-left: -22px;
}

.sd-link-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: var(--color-warning-bg);
  box-shadow: var(--shadow-soft);
}
.sd-link-notice__icon {
  display: inline-flex;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--color-warning);
}
.sd-link-notice__icon svg {
  width: 18px;
  height: 18px;
}
.sd-link-notice__body {
  flex: 1 1 auto;
  min-width: 0;
}
.sd-link-notice__title {
  font-weight: 600;
  color: var(--color-text);
}
.sd-link-notice__text {
  margin-top: 2px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--color-text-muted);
}
.sd-link-notice__close {
  flex-shrink: 0;
  min-height: 40px;
}
@media (max-width: 640px) {
  .sd-link-notice {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 10px;
    row-gap: 8px;
  }
  .sd-link-notice__close {
    grid-column: 2;
    justify-self: start;
  }
}

.srs-test-pill {
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--color-warning) 18%, transparent);
  color: var(--color-warning);
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
}

.srs-card__head {
  flex-wrap: wrap;
  min-width: 0;
}

.srs-card__title {
  min-width: 0;
  overflow-wrap: anywhere;
}

.srs-card__save[hidden] {
  display: none;
}

.srs-subtabs {
  display: flex;
  flex-wrap: nowrap;
  align-self: flex-start;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--color-bg-muted);
  box-shadow: none;
}
.srs-subtabs::-webkit-scrollbar {
  display: none;
}
.srs-subtabs .sd-segment__item {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}
.srs-subtabs .sd-segment__item.is-active {
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}
.srs-subtabs .sd-segment__item:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.srs-subtab__short {
  display: none;
}

.srs-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.srs-panel[hidden] {
  display: none;
}

@media (max-width: 640px) {
  .srs-subtabs {
    align-self: stretch;
  }
  .srs-subtabs .sd-segment__item {
    min-height: 40px;
    padding: 6px 12px;
  }
  .srs-subtab__full {
    display: none;
  }
  .srs-subtab__short {
    display: inline;
  }
}
.srs-card__save:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.sd-segment .sd-segment__item .sd-segment__count.sd-segment__count--alert {
  background: var(--color-danger-bg);
  color: var(--color-danger-text);
}

.srd-health {
  gap: 14px;
}

.srd-level.is-warn {
  background: var(--color-warning-bg);
  color: var(--color-warning-text);
}
.srd-level.is-bad {
  background: var(--color-danger-bg);
  color: var(--color-danger-text);
}

.srd-facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
  gap: 10px;
  margin: 0;
}

.srd-fact {
  min-width: 0;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--color-bg-muted);
}
.srd-fact dt {
  margin: 0 0 2px;
  font-size: 12px;
  color: var(--color-text-muted);
}
.srd-fact dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  overflow-wrap: anywhere;
}
.srd-fact.is-warn {
  background: var(--color-warning-bg);
}
.srd-fact.is-warn dd {
  color: var(--color-warning-text);
}
.srd-fact.is-bad {
  background: var(--color-danger-bg);
}
.srd-fact.is-bad dd {
  color: var(--color-danger-text);
}

.srd-alerts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.srd-alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.5;
}
.srd-alert .doc-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
}
.srd-alert.is-warn {
  background: var(--color-warning-bg);
  color: var(--color-warning-text);
}
.srd-alert.is-bad {
  background: var(--color-danger-bg);
  color: var(--color-danger-text);
}

.srs-section:has(.srd-journal) {
  min-width: 0;
}

.srd-health,
.srd-journal {
  max-width: none;
  min-width: 0;
}

.srd-journal {
  margin-top: 16px;
}

.srd-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.srd-filters .form-select,
.srd-filters .form-input {
  height: 36px;
  font-size: 13px;
}
.srd-filters .form-select {
  width: auto;
  max-width: 220px;
}
@media (max-width: 640px) {
  .srd-filters .form-select,
  .srd-filters .form-input {
    width: 100%;
    max-width: none;
    font-size: 16px;
  }
  .srd-filters .srd-retry-all {
    width: 100%;
    justify-content: center;
  }
}

.srd-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  background: var(--color-bg-muted);
  color: var(--color-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.srd-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.srd-switch__box {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--color-surface);
  box-shadow: inset 0 0 0 1.5px var(--color-border);
  color: transparent;
}
.srd-switch__box .doc-icon {
  width: 12px;
  height: 12px;
}
input:checked + .srd-switch__box {
  background: var(--color-primary);
  box-shadow: none;
  color: #fff;
}
input:focus-visible + .srd-switch__box {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
@media (max-width: 640px) {
  .srd-switch {
    width: 100%;
    min-height: 40px;
  }
}

.srd-search {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 1 1 220px;
  max-width: 320px;
}
.srd-search .doc-icon {
  position: absolute;
  left: 11px;
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
  pointer-events: none;
}
.srd-search .form-input {
  width: 100%;
  padding-left: 34px;
}
@media (max-width: 640px) {
  .srd-search {
    flex-basis: 100%;
    max-width: none;
  }
}

.srd-retry-all {
  margin-left: auto;
}
@media (max-width: 640px) {
  .srd-retry-all {
    margin-left: 0;
  }
}

.srd-scope {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: var(--color-primary-tint);
  color: var(--color-primary-strong);
  font-size: 13px;
}
.srd-scope .doc-icon {
  width: 16px;
  height: 16px;
}

.srd-scroll {
  position: relative;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
}

.srd-table {
  width: 100%;
}
.srd-table td, .srd-table th {
  vertical-align: top;
}
.srd-table tr.is-problem td:first-child {
  box-shadow: inset 3px 0 0 var(--color-danger);
}

.srd-nowrap {
  white-space: nowrap;
}

.srd-req, .srd-rcpt {
  min-width: 130px;
  max-width: 260px;
}

.srd-why {
  min-width: 140px;
  max-width: 320px;
}

.srd-act {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

@media (min-width: 1281px) {
  .srd-act .btn {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
  }
  .srd-act .btn .btn__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}
.srd-cell {
  min-width: 0;
}

.srd-link {
  font-weight: 600;
  color: var(--color-primary-strong);
  text-decoration: none;
}
.srd-link:hover {
  text-decoration: underline;
}

.srd-who,
.srd-sub,
.srd-reason {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.srd-who {
  font-weight: 600;
  color: var(--color-text);
}

.srd-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.srd-reason {
  font-size: 13px;
  color: var(--color-text);
}

.srd-channel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.srd-channel .doc-icon {
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
}

.srd-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: var(--color-bg-muted);
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.srd-status .doc-icon {
  width: 13px;
  height: 13px;
}
.srd-status.is-ok {
  background: var(--color-success-bg);
  color: var(--color-success-text);
}
.srd-status.is-warn {
  background: var(--color-warning-bg);
  color: var(--color-warning-text);
}
.srd-status.is-bad {
  background: var(--color-danger-bg);
  color: var(--color-danger-text);
}

.srd-total {
  margin: 0;
  font-size: 12.5px;
  color: var(--color-text-muted);
}

.srd-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.srd-pager__info {
  font-size: 13px;
  color: var(--color-text-muted);
}

.srd-empty {
  justify-content: center;
  text-align: center;
  padding: 28px 16px;
}

@media (max-width: 1280px) {
  .srd-table thead {
    display: none;
  }
  .srd-table tbody, .srd-table tr, .srd-table td {
    display: block;
    width: 100%;
  }
  .srd-table tr {
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: var(--color-bg-muted);
  }
  .srd-table tr.is-problem {
    box-shadow: inset 3px 0 0 var(--color-danger);
  }
  .srd-table tr.is-problem td:first-child {
    box-shadow: none;
  }
  .srd-table td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
    border: 0;
    min-width: 0;
    max-width: none;
    white-space: normal;
    text-align: right;
  }
  .srd-table td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--color-text-muted);
    text-align: left;
  }
  .srd-table td > * {
    min-width: 0;
    max-width: 100%;
  }
  .srd-table td .srd-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
  }
  .srd-table td .srd-link {
    white-space: nowrap;
  }
  .srd-table td .srd-who, .srd-table td .srd-sub, .srd-table td .srd-reason {
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .srd-table td:not([data-label])::before {
    content: none;
  }
  .srd-table .srd-act {
    width: 100%;
    padding-top: 8px;
  }
  .srd-table .srd-act:empty {
    display: none;
  }
  .srd-table .srd-act .btn {
    width: 100%;
    min-height: 40px;
    justify-content: center;
  }
}
.srd-test {
  margin-top: 16px;
  gap: 12px;
  min-width: 0;
  max-width: none;
}

.srd-test__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

.srd-test__field {
  display: flex;
  flex: 1 1 260px;
  flex-direction: column;
  gap: 4px;
  max-width: 380px;
  font-size: 12.5px;
  color: var(--color-text-muted);
}
.srd-test__field .form-input {
  height: 38px;
  font-size: 14px;
}

.srd-test__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.srd-test__result {
  min-height: 24px;
}
.srd-test__result .srd-status {
  white-space: normal;
  border-radius: var(--radius-md);
  padding: 6px 12px;
  overflow-wrap: anywhere;
}
.srd-test__result .srd-status.is-wait {
  background: var(--color-bg-muted);
  color: var(--color-text-muted);
}

@media (max-width: 640px) {
  .srd-test__field {
    max-width: none;
    flex-basis: 100%;
  }
  .srd-test__field .form-input {
    font-size: 16px;
  }
  .srd-test__actions {
    width: 100%;
  }
  .srd-test__actions .btn {
    flex: 1 1 100%;
    min-height: 40px;
    justify-content: center;
  }
}
.srd-card-line {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.srd-card-line a {
  color: var(--color-primary-strong);
  font-weight: 600;
  text-decoration: none;
}
.srd-card-line a:hover {
  text-decoration: underline;
}
.srd-card-line.is-bad a {
  color: var(--color-danger-text);
}

.sr-compose {
  position: relative;
}

.sr-mention {
  position: absolute;
  z-index: 20;
  max-height: 264px;
  margin: 0;
  padding: 4px;
  overflow-y: auto;
  list-style: none;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-hover);
}
.sr-mention[hidden] {
  display: none;
}
.sr-mention__item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--color-text);
}
.sr-mention__item.is-active {
  background: var(--color-primary-tint);
}
@media (hover: hover) {
  .sr-mention__item:hover {
    background: var(--color-bg-muted);
  }
  .sr-mention__item.is-active:hover {
    background: var(--color-primary-tint);
  }
}
.sr-mention__avatar {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-primary-tint);
  color: var(--color-primary-strong);
  font-size: 11px;
  font-weight: 700;
}
.sr-mention__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.sr-mention__name {
  font-size: 13.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sr-mention__email {
  font-size: 12px;
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sr-mention__empty {
  padding: 10px 12px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.sr-mention-tag {
  padding: 0 3px;
  border-radius: 4px;
  background: var(--color-primary-tint);
  color: var(--color-primary-strong);
  font-weight: 600;
}

.sr-people {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sr-people__item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: var(--color-bg-muted);
}
.sr-people__avatar {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-primary-strong);
  font-size: 12px;
  font-weight: 700;
}
.sr-people__main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  flex: 1 1 160px;
  min-width: 0;
}
.sr-people__name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-text);
  overflow-wrap: anywhere;
}
.sr-people__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.sr-people__actions .btn {
  min-height: 36px;
}
.sr-people__remove {
  width: 36px;
  padding: 0;
  justify-content: center;
}
.sr-people__hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--color-primary-tint);
  color: var(--color-text);
  font-size: 13px;
  line-height: 1.45;
}
.sr-people__hint[hidden] {
  display: none;
}
.sr-people__hint-icon {
  flex: none;
  display: inline-flex;
  margin-top: 1px;
  color: var(--color-primary-strong);
}
.sr-people__hint-icon svg {
  width: 16px;
  height: 16px;
}
.sr-people__empty {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--color-bg-muted);
  font-size: 13px;
  color: var(--color-text-muted);
}
@media (max-width: 640px) {
  .sr-people__actions {
    width: 100%;
    margin-left: 0;
  }
  .sr-people__actions .btn {
    flex: 1 1 auto;
    min-height: 40px;
    justify-content: center;
  }
  .sr-people__remove {
    flex: 0 0 40px !important;
    width: 40px;
  }
}

.role-pill.sd-participant-pill {
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 11.5px;
}
.role-pill.sd-participant-pill.is-executor {
  background: var(--color-primary-tint);
  color: var(--color-primary-strong);
}

.sr-people__item .role-pill.sd-participant-pill:not(.is-executor) {
  background: var(--color-surface);
}

.lms-cell-meta .role-pill.sd-participant-pill:not(.is-executor) {
  background: var(--color-bg-muted);
}

.panel.sd-list > .sd-list__hint {
  margin: -6px 0 0;
  padding: 0 20px 12px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.notifications-item__ref {
  display: inline-block;
  padding: 0 5px;
  border-radius: 4px;
  background: var(--color-bg-muted);
  color: var(--color-text-muted);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.notifications-item__about {
  display: block;
  margin-top: 2px;
  color: var(--color-text-muted);
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .sd-dialog__close {
    width: 40px;
    height: 40px;
  }
  .sd-card__foot .btn,
  .sd-dialog .dialog__actions .btn,
  .sr-compose__foot .btn {
    min-height: 40px;
  }
  .sd-segment .sd-segment__item,
  .sd-chips .sd-chip {
    min-height: 40px;
  }
  .sd-go-btn,
  .srs-icon-btn,
  .srs-icon-btn--plain {
    width: 40px;
    height: 40px;
  }
  .sd-chip__remove {
    min-width: 40px;
    min-height: 40px;
  }
  .richtext-mini .ql-toolbar.ql-snow button {
    width: 40px;
    height: 40px;
  }
  .sr-compose .btn-voice-mic {
    width: 40px;
    height: 40px;
  }
  .sr-people__remove {
    width: 40px;
    min-height: 40px;
  }
}
.workspace__main:has(.sd-tabs) {
  padding-bottom: 96px;
}

.btn-voice-mic {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 50%;
  background: var(--color-primary-strong);
  color: var(--color-surface);
  box-shadow: 0 0 0 3px var(--color-primary-tint), var(--shadow-sm);
  cursor: pointer;
  line-height: 0;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.btn-voice-mic .voice-mic-btn__mic,
.btn-voice-mic .voice-mic-btn__stop {
  display: inline-flex;
}
.btn-voice-mic .voice-mic-btn__stop {
  display: none;
}
.btn-voice-mic .doc-icon {
  display: block;
  width: 16px;
  height: 16px;
  margin: 0;
  vertical-align: baseline;
}
.btn-voice-mic:hover {
  background: var(--color-primary-strong-hover);
  transform: scale(1.06);
}
.btn-voice-mic:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-surface), 0 0 0 5px var(--color-primary-strong);
}
.btn-voice-mic.is-recording {
  background: var(--color-danger);
  color: var(--color-surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-danger) 25%, transparent);
  transform: none;
}
.btn-voice-mic.is-recording .voice-mic-btn__mic {
  display: none;
}
.btn-voice-mic.is-recording .voice-mic-btn__stop {
  display: inline-flex;
}
.btn-voice-mic.is-recording .voice-mic-btn__stop .doc-icon {
  fill: currentColor;
}
.btn-voice-mic.is-recording::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--color-danger) 35%, transparent);
  animation: voiceMicRing 1.6s ease-out infinite;
  pointer-events: none;
}
.btn-voice-mic.is-recording:hover {
  background: var(--color-danger);
}
.btn-voice-mic.is-paused {
  background: color-mix(in srgb, var(--color-warning) 22%, var(--color-surface));
  color: var(--color-warning-text);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-warning) 22%, transparent);
}
.btn-voice-mic.is-paused::after {
  display: none;
}

@keyframes voiceMicRing {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}
.voice-field {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}
.voice-field--grow {
  flex: 1 1 auto;
}
.voice-field > textarea {
  width: 100%;
  padding-right: 48px;
}
.voice-field .voice-field__mic {
  position: absolute;
  right: 9px;
  bottom: 9px;
  z-index: 2;
}

.ql-toolbar .ql-formats--voice {
  margin-left: 4px;
  margin-right: 0;
  vertical-align: middle;
}

.ql-snow.ql-toolbar .ql-formats--voice .ql-toolbar__voice,
.ql-toolbar .ql-formats--voice .ql-toolbar__voice {
  display: inline-flex;
  float: none;
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  margin: 0;
  background: var(--color-primary-strong);
  color: var(--color-surface);
  border: none;
  border-radius: 50%;
  line-height: 0;
  vertical-align: middle;
}
.ql-snow.ql-toolbar .ql-formats--voice .ql-toolbar__voice svg,
.ql-snow.ql-toolbar .ql-formats--voice .ql-toolbar__voice .doc-icon,
.ql-toolbar .ql-formats--voice .ql-toolbar__voice svg,
.ql-toolbar .ql-formats--voice .ql-toolbar__voice .doc-icon {
  display: block;
  float: none;
  width: 16px;
  height: 16px;
  margin: 0;
}
.ql-snow.ql-toolbar .ql-formats--voice .ql-toolbar__voice .voice-mic-btn__stop,
.ql-toolbar .ql-formats--voice .ql-toolbar__voice .voice-mic-btn__stop {
  display: none;
}
.ql-snow.ql-toolbar .ql-formats--voice .ql-toolbar__voice:hover, .ql-snow.ql-toolbar .ql-formats--voice .ql-toolbar__voice:focus, .ql-snow.ql-toolbar .ql-formats--voice .ql-toolbar__voice:focus-visible,
.ql-toolbar .ql-formats--voice .ql-toolbar__voice:hover,
.ql-toolbar .ql-formats--voice .ql-toolbar__voice:focus,
.ql-toolbar .ql-formats--voice .ql-toolbar__voice:focus-visible {
  background: var(--color-primary-strong-hover);
  color: var(--color-surface);
}
.ql-snow.ql-toolbar .ql-formats--voice .ql-toolbar__voice.is-recording,
.ql-toolbar .ql-formats--voice .ql-toolbar__voice.is-recording {
  background: var(--color-danger);
  color: var(--color-surface);
}
.ql-snow.ql-toolbar .ql-formats--voice .ql-toolbar__voice.is-recording .voice-mic-btn__mic,
.ql-toolbar .ql-formats--voice .ql-toolbar__voice.is-recording .voice-mic-btn__mic {
  display: none;
}
.ql-snow.ql-toolbar .ql-formats--voice .ql-toolbar__voice.is-recording .voice-mic-btn__stop,
.ql-toolbar .ql-formats--voice .ql-toolbar__voice.is-recording .voice-mic-btn__stop {
  display: inline-flex;
}
.ql-snow.ql-toolbar .ql-formats--voice .ql-toolbar__voice.is-paused,
.ql-toolbar .ql-formats--voice .ql-toolbar__voice.is-paused {
  background: color-mix(in srgb, var(--color-warning) 22%, var(--color-surface));
  color: var(--color-warning-text);
}

.voice-wave {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 0;
  padding: 0 12px;
  overflow: hidden;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--color-primary-tint);
  color: var(--color-text);
  transition: height 0.25s ease, padding 0.25s ease;
}
.voice-wave.is-open {
  height: 36px;
}
.voice-wave__dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-danger);
  animation: voiceWaveBlink 1s ease infinite;
}
.voice-wave__bars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.voice-wave__bar {
  width: 3px;
  height: 3px;
  min-height: 3px;
  border-radius: 3px;
  background: var(--color-primary-strong);
  opacity: 0.55;
  animation: voiceWaveDance var(--spd, 0.7s) ease-in-out infinite alternate;
}
.voice-wave__status {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-danger);
  white-space: nowrap;
}
.voice-wave[data-state=paused] .voice-wave__bar {
  animation-play-state: paused;
  background: var(--color-warning);
}
.voice-wave[data-state=paused] .voice-wave__dot {
  background: var(--color-warning);
  animation-play-state: paused;
}
.voice-wave[data-state=paused] .voice-wave__status {
  color: var(--color-warning-text);
}
.voice-wave__pause {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: background 0.15s ease;
}
.voice-wave__pause .doc-icon {
  width: 14px;
  height: 14px;
  margin: 0;
  vertical-align: baseline;
}
.voice-wave__pause:hover {
  background: var(--color-bg-hover);
}
.voice-wave__pause:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--color-primary-strong);
}

@keyframes voiceWaveDance {
  from {
    height: 3px;
  }
  to {
    height: var(--mh, 22px);
  }
}
@keyframes voiceWaveBlink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.25;
  }
}
@media (max-width: 640px) {
  .btn-voice-mic::before {
    content: "";
    position: absolute;
    inset: -5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .btn-voice-mic.is-recording::after,
  .voice-wave__dot,
  .voice-wave__bar {
    animation: none;
  }
}
.push-panel [hidden], .push-panel[hidden],
.push-hint [hidden],
.push-hint[hidden] {
  display: none !important;
}

.push-panel__lead {
  margin: 6px 0 16px;
  max-width: 68ch;
  color: var(--color-text-muted);
  line-height: 1.5;
}
.push-panel__status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--color-bg-muted);
  font-weight: 600;
}
.push-panel__status svg {
  flex: none;
}
.push-panel[data-push-state=on] .push-panel__status {
  background: var(--color-primary-tint);
}
.push-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.push-panel__actions .btn {
  min-height: 40px;
}
@media (max-width: 640px) {
  .push-panel__actions {
    flex-direction: column;
  }
  .push-panel__actions .btn {
    width: 100%;
    justify-content: center;
  }
}
.push-panel__subtitle {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
}
.push-panel__empty {
  margin: 0;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--color-bg-muted);
  color: var(--color-text-muted);
}
.push-panel.is-busy .btn {
  opacity: 0.6;
  pointer-events: none;
}

.push-devices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}

.push-device {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--color-bg-muted);
}
.push-device__info {
  min-width: 0;
  flex: 1;
}
.push-device__name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.push-device__badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--color-primary-tint);
  color: var(--color-text);
  font-size: 12px;
  font-weight: 600;
}
.push-device__meta, .push-device__error {
  margin-top: 2px;
  font-size: 13px;
  color: var(--color-text-muted);
  overflow-wrap: anywhere;
}
.push-device__error {
  color: var(--color-danger);
}
.push-device__remove {
  flex: none;
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  justify-content: center;
}

.push-hint {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  background: var(--color-primary-tint);
  box-shadow: var(--shadow-soft);
}
.push-hint__icon {
  display: inline-flex;
  flex: none;
}
.push-hint__text {
  flex: 1;
  min-width: 0;
  font-weight: 600;
}
.push-hint__actions {
  display: flex;
  gap: 8px;
  flex: none;
}
.push-hint__actions .btn {
  min-height: 40px;
}
@media (max-width: 640px) {
  .push-hint {
    flex-wrap: wrap;
  }
  .push-hint__text {
    flex-basis: calc(100% - 40px);
  }
  .push-hint__actions {
    width: 100%;
  }
  .push-hint__actions .btn {
    flex: 1;
    justify-content: center;
  }
}

.utg-panel [hidden] {
  display: none !important;
}

.utg-pending {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0 0 20px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--color-primary-tint);
}
.utg-pending__qr {
  flex: none;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: #fff;
}
.utg-pending__qr img, .utg-pending__qr canvas {
  display: block;
}
.utg-pending__body {
  min-width: 0;
}
.utg-pending__title {
  margin: 0 0 6px;
  font-weight: 700;
}
.utg-pending__text {
  margin: 0 0 12px;
  color: var(--color-text-muted);
  line-height: 1.5;
}
.utg-pending__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.utg-pending__actions .btn {
  min-height: 40px;
}
@media (max-width: 640px) {
  .utg-pending__qr {
    display: none;
  }
  .utg-pending__actions .btn {
    width: 100%;
    justify-content: center;
  }
}

.utg-admin {
  max-width: 560px;
  margin-top: 8px;
  padding-top: 16px;
  box-shadow: inset 0 1px 0 var(--color-border-muted);
}
.utg-admin .btn {
  min-height: 40px;
}
.utg-admin__note {
  margin-left: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
}

.nprefs [hidden] {
  display: none !important;
}
.nprefs__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.nprefs__saved {
  font-size: 13px;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.nprefs__block {
  margin-top: 24px;
}
.nprefs__hint {
  margin: 6px 0 12px;
  max-width: 68ch;
  color: var(--color-text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.nprefs-grid {
  --nprefs-col: 104px;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  background: var(--color-bg-muted);
  overflow: hidden;
}
.nprefs-grid__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(3, var(--nprefs-col));
  align-items: center;
  padding: 0 8px 0 14px;
}
.nprefs-grid__row + .nprefs-grid__row {
  box-shadow: inset 0 1px 0 var(--color-border-muted);
}
.nprefs-grid__row--head {
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-muted);
}
.nprefs-grid__label {
  padding: 10px 8px 10px 0;
  line-height: 1.35;
}
.nprefs-grid__ch {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  line-height: 1.25;
}
.nprefs-grid__state {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 500;
  color: var(--color-success, var(--color-text-muted));
  overflow-wrap: anywhere;
}
.nprefs-grid__state.is-off {
  color: var(--color-text-muted);
}
.nprefs-grid__cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  cursor: pointer;
}
.nprefs-grid__cell input {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--color-primary);
}
@media (max-width: 640px) {
  .nprefs-grid {
    --nprefs-col: 64px;
  }
  .nprefs-grid__row {
    padding-left: 12px;
    padding-right: 4px;
  }
  .nprefs-grid__label {
    font-size: 13px;
  }
  .nprefs-grid__state {
    display: none;
  }
}

.nprefs-quiet__times {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: 4px 0 4px 26px;
}
@media (max-width: 640px) {
  .nprefs-quiet__times {
    margin-left: 0;
  }
}
.nprefs-quiet__time {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nprefs-quiet__time input {
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
}

.richtext-mini {
  position: relative;
  display: block;
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-input-bg, var(--color-surface));
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.richtext-mini:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.richtext-mini--invalid, .richtext-mini--invalid:focus-within {
  border-color: var(--color-danger);
}
.richtext-mini--invalid:focus-within {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-danger) 20%, transparent);
}
.richtext-mini .richtext-mini__source,
.richtext-mini textarea.richtext-mini__source {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  opacity: 0;
  pointer-events: none;
}
.richtext-mini .ql-toolbar.ql-snow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 0;
  border: 0;
  border-bottom: 1px solid var(--color-border-muted);
  border-radius: 8px 8px 0 0;
  background: var(--color-bg-muted);
  padding: 6px 8px;
}
.richtext-mini .ql-toolbar.ql-snow .ql-formats {
  margin-right: 10px;
}
.richtext-mini .ql-toolbar.ql-snow button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-light);
  border-radius: var(--radius-sm);
}
.richtext-mini .ql-container.ql-snow {
  height: auto;
  border: 0;
  font-family: inherit;
  font-size: 14px;
}
.richtext-mini .ql-editor {
  height: auto;
  min-height: 220px;
  max-height: 50vh;
  overflow-y: auto;
  padding: 12px 14px;
  line-height: 1.55;
  color: var(--color-text);
}
.richtext-mini .ql-editor:focus, .richtext-mini .ql-editor:focus-visible {
  outline: none;
}
.richtext-mini .ql-editor.ql-blank::before {
  color: var(--color-text-muted);
  font-style: normal;
  left: 14px;
  right: 14px;
}
.richtext-mini .ql-editor p {
  margin: 0;
}

@media (max-width: 640px) {
  .richtext-mini .ql-editor {
    font-size: 16px;
    min-height: 180px;
  }
  .richtext-mini .ql-toolbar.ql-snow {
    padding: 6px;
  }
  .richtext-mini .ql-toolbar.ql-snow button {
    width: 34px;
    height: 34px;
  }
  .richtext-mini .ql-toolbar.ql-snow .ql-formats {
    margin-right: 6px;
  }
}
.confirm-dialog {
  max-width: calc(100vw - 24px);
}

.rich-text {
  overflow-wrap: anywhere;
  line-height: 1.55;
}
.rich-text p {
  margin: 0 0 6px;
}
.rich-text p:last-child {
  margin-bottom: 0;
}
.rich-text ul,
.rich-text ol {
  margin: 4px 0 6px;
  padding-left: 1.4em;
}
.rich-text ul {
  list-style: disc;
}
.rich-text ol {
  list-style: decimal;
}
.rich-text li {
  margin: 0;
}
.rich-text a {
  color: var(--color-primary-strong);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.rich-text .ql-indent-1 {
  padding-left: 1.5em;
}
.rich-text .ql-indent-2 {
  padding-left: 3em;
}
.rich-text .ql-indent-3 {
  padding-left: 4.5em;
}
.rich-text .ql-indent-4 {
  padding-left: 6em;
}

.srr-filter__select {
  min-width: 0;
}

.srr-filter__dept {
  margin-left: 0;
}

@media (max-width: 640px) {
  .srr-filter {
    flex-direction: column;
    align-items: stretch;
  }
  .srr-filter__cat, .srr-filter__dept {
    margin-left: 0;
    width: 100%;
  }
  .srr-filter .form-select {
    width: 100%;
    font-size: 16px;
  }
}
.srr-group-row th {
  text-align: left;
  background: var(--color-bg-muted);
  font-weight: 700;
  white-space: normal;
}

.srr-group-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.srr-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cat-color, var(--color-primary));
}

.srr-cat-link {
  position: relative;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.srr-cat-link::after {
  content: "";
  position: absolute;
  inset: -12px -6px;
}
@media (hover: hover) {
  .srr-cat-link:hover {
    background: color-mix(in srgb, var(--cat-color) 22%, transparent);
    border-color: color-mix(in srgb, var(--cat-color) 45%, transparent);
    text-decoration: none;
  }
}
.srr-cat-link:focus-visible {
  outline: 2px solid var(--cat-color);
  outline-offset: 2px;
}

.srr-table--split td.srr-name {
  white-space: normal;
  overflow-wrap: anywhere;
}

.srr-empty-block {
  padding: 20px 12px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 14px;
}

@media (max-width: 640px) {
  .srr-table--cards thead {
    display: none;
  }
  .srr-table--cards tbody,
  .srr-table--cards tr,
  .srr-table--cards td,
  .srr-table--cards th {
    display: block;
    width: 100%;
  }
  .srr-table--cards .srr-group-row {
    margin-top: 12px;
  }
  .srr-table--cards .srr-group-row th {
    border-radius: var(--radius-md);
    padding: 8px 12px;
  }
  .srr-table--cards tr:not(.srr-group-row) {
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: var(--color-bg-muted);
  }
  .srr-table--cards td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
    border: 0;
    white-space: normal;
    text-align: right;
  }
  .srr-table--cards td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    color: var(--color-text-muted);
    font-size: 12px;
    text-align: left;
  }
  .srr-table--cards td.srr-name {
    display: block;
    padding-bottom: 6px;
    text-align: left;
  }
  .srr-table--cards td.srr-name::before {
    content: none;
  }
}
.drp {
  position: relative;
  display: inline-flex;
  min-width: 0;
}

.drp__trigger {
  padding: 7px 12px;
  max-width: 300px;
}
.drp__trigger .drp__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 210px;
  font-variant-numeric: tabular-nums;
}
.drp__trigger > .doc-icon:last-child {
  flex-shrink: 0;
  color: var(--color-text-muted);
  transition: transform 0.15s ease;
}
.drp__trigger[aria-expanded=true] > .doc-icon:last-child {
  transform: rotate(180deg);
}

.drp--active .drp__label {
  color: var(--color-text);
  font-weight: 600;
}

.drp-picker {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 120;
  display: flex;
  overflow: hidden auto;
  width: max-content;
  background: var(--color-surface);
  border: 1px solid var(--color-border-muted);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: drpAnimIn 0.14s ease both;
}
.drp-picker[hidden] {
  display: none;
}
@media (prefers-reduced-motion: reduce) {
  .drp-picker {
    animation: none;
  }
}
.drp-picker__presets {
  width: 160px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 0;
  background: var(--color-bg);
  border-right: 1px solid var(--color-border-muted);
}
.drp-picker__preset {
  appearance: none;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  padding: 8px 16px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--color-text);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
@media (hover: hover) {
  .drp-picker__preset:hover {
    background: var(--color-bg-hover);
  }
}
.drp-picker__preset:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.drp-picker__preset.is-active {
  background: var(--color-primary-tint);
  color: var(--color-primary-strong);
  font-weight: 600;
  box-shadow: inset 3px 0 0 0 var(--color-primary-strong);
}
.drp-picker__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.drp-picker__calendar {
  padding: 10px 12px 8px;
}
.drp-picker__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 12px;
  padding: 12px 14px;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border-muted);
}
.drp-picker__fields {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.drp-picker__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.drp-picker__field-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}
.drp-picker__input {
  width: 118px;
  height: 34px;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
  background: var(--color-surface);
  border: 1px solid var(--color-border-muted);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.drp-picker__input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.drp-picker__sep {
  padding-bottom: 9px;
  color: var(--color-text-muted);
}
.drp-picker__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.drp-picker .litepicker {
  font-family: inherit;
  font-size: 13px;
  --litepicker-day-width: 36px;
  --litepicker-container-months-color-bg: var(--color-surface);
  --litepicker-container-months-box-shadow-color: transparent;
  --litepicker-month-header-color: var(--color-text);
  --litepicker-month-weekday-color: var(--color-text-muted);
  --litepicker-day-color: var(--color-text);
  --litepicker-day-color-hover: var(--color-primary-strong);
  --litepicker-is-today-color: var(--color-primary-strong);
  --litepicker-is-in-range-color: var(--color-primary-tint);
  --litepicker-is-locked-color: var(--color-text-muted);
  --litepicker-is-start-color: #fff;
  --litepicker-is-start-color-bg: var(--color-primary-strong);
  --litepicker-is-end-color: #fff;
  --litepicker-is-end-color-bg: var(--color-primary-strong);
  --litepicker-button-prev-month-color: var(--color-text-muted);
  --litepicker-button-next-month-color: var(--color-text-muted);
  --litepicker-button-prev-month-color-hover: var(--color-primary-strong);
  --litepicker-button-next-month-color-hover: var(--color-primary-strong);
}
.drp-picker .litepicker .container__months {
  border-radius: var(--radius-md);
  background: var(--color-surface);
}
.drp-picker .litepicker .month-item-header {
  font-weight: 600;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drp-picker .litepicker .month-item-header select.month-item-name,
.drp-picker .litepicker .month-item-header select.month-item-year {
  appearance: none;
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 4px 22px 4px 10px;
  height: 30px;
  line-height: 20px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.15s ease;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%235dc6cb" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
  background-repeat: no-repeat;
  background-position: right 6px center;
  margin: 0 3px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
@media (hover: hover) {
  .drp-picker .litepicker .month-item-header select.month-item-name:hover,
  .drp-picker .litepicker .month-item-header select.month-item-year:hover {
    background-color: var(--color-surface);
    border-color: var(--color-primary);
    color: var(--color-primary-strong);
    box-shadow: 0 2px 6px color-mix(in srgb, var(--color-primary) 15%, transparent);
    transform: translateY(-0.5px);
  }
}
.drp-picker .litepicker .month-item-header select.month-item-name:focus-visible,
.drp-picker .litepicker .month-item-header select.month-item-year:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-light);
  border-color: var(--color-primary);
}
.drp-picker .litepicker .month-item-header select.month-item-name option,
.drp-picker .litepicker .month-item-header select.month-item-year option {
  font-weight: 500;
  color: var(--color-text);
  background-color: var(--color-surface);
}
.drp-picker .litepicker .month-item-header .button-previous-month,
.drp-picker .litepicker .month-item-header .button-next-month {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition: all 0.15s ease;
}
.drp-picker .litepicker .month-item-header .button-previous-month svg,
.drp-picker .litepicker .month-item-header .button-next-month svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  flex-shrink: 0;
}
@media (hover: hover) {
  .drp-picker .litepicker .month-item-header .button-previous-month:hover,
  .drp-picker .litepicker .month-item-header .button-next-month:hover {
    background: var(--color-primary-tint);
    border-color: color-mix(in srgb, var(--color-primary) 40%, transparent);
    color: var(--color-primary-strong);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px color-mix(in srgb, var(--color-primary) 18%, transparent);
  }
}
.drp-picker .litepicker .month-item-header .button-previous-month:active,
.drp-picker .litepicker .month-item-header .button-next-month:active {
  transform: translateY(0);
}
.drp-picker .litepicker .month-item-header .button-previous-month:focus-visible,
.drp-picker .litepicker .month-item-header .button-next-month:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.drp-picker .litepicker .container__days .day-item {
  border-radius: var(--radius-sm);
  font-variant-numeric: tabular-nums;
}
.drp-picker .litepicker .container__days .day-item:hover {
  box-shadow: none;
  cursor: pointer;
  background: var(--color-bg-hover);
}
.drp-picker .litepicker .container__days .day-item.is-in-range {
  color: var(--color-text);
}
.drp-picker .litepicker .container__days .day-item.is-in-range:hover {
  background: var(--color-primary-tint);
}
.drp-picker .litepicker .container__days .day-item.is-start-date, .drp-picker .litepicker .container__days .day-item.is-end-date {
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: #fff !important;
}
.drp-picker .litepicker .container__days .day-item.is-start-date:hover, .drp-picker .litepicker .container__days .day-item.is-end-date:hover {
  background: var(--color-primary-strong);
  color: #fff !important;
}
.drp-picker .litepicker .container__days .day-item.is-locked:hover {
  background: transparent;
}
.drp-picker .litepicker .container__footer,
.drp-picker .litepicker .container__tooltip {
  display: none;
}

@keyframes drpAnimIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 768px) {
  .drp-picker {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 940;
    flex-direction: column;
    width: 100%;
    max-width: none;
    max-height: 92vh;
    overflow-y: auto;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    animation: drpAnimSheetIn 0.18s ease both;
  }
  .drp-picker__presets {
    flex-direction: row;
    gap: 6px;
    width: auto;
    overflow-x: auto;
    padding: 10px 12px;
    border-right: none;
    border-bottom: 1px solid var(--color-border-muted);
    -webkit-overflow-scrolling: touch;
  }
  .drp-picker__preset {
    width: auto;
    white-space: nowrap;
    padding: 7px 12px;
    border-radius: var(--radius-pill);
  }
  .drp-picker__preset.is-active {
    box-shadow: none;
  }
  .drp-picker__main {
    display: block;
  }
  .drp-picker .litepicker .container__months,
  .drp-picker .litepicker .container__months.columns-2 {
    flex-direction: column;
    align-items: center;
    width: auto;
  }
  .drp-picker__footer {
    position: sticky;
    bottom: 0;
    z-index: 1;
    background: var(--color-surface);
  }
  .drp-picker__input {
    flex: 1;
    width: auto;
    min-width: 0;
  }
}
@keyframes drpAnimSheetIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: transparent;
}

.tour-ring {
  position: fixed;
  z-index: 3001;
  pointer-events: none;
  border-radius: 10px;
  box-shadow: 0 0 0 9999px rgba(13, 17, 23, 0.55);
  outline: 2px solid var(--color-primary);
  transition: top 0.25s ease, left 0.25s ease, width 0.25s ease, height 0.25s ease;
}
:root[data-theme=dark] .tour-ring {
  box-shadow: 0 0 0 9999px rgba(1, 4, 9, 0.78);
}

.tour-popover {
  position: fixed;
  z-index: 3002;
  width: 320px;
  max-width: calc(100vw - 24px);
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border-muted);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
  padding: 14px 16px 16px;
  transition: top 0.25s ease, left 0.25s ease;
}
.tour-popover__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.tour-popover__counter {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}
.tour-popover__skip {
  background: none;
  border: none;
  padding: 2px 0;
  font-size: 12.5px;
  color: var(--color-text-muted);
  cursor: pointer;
  text-decoration: underline;
}
.tour-popover__skip:hover {
  color: var(--color-text);
}
.tour-popover__title {
  margin: 0 0 6px;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.tour-popover__text {
  margin: 0 0 12px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--color-text);
}
.tour-popover__dots {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.tour-popover__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-border);
}
.tour-popover__dot.is-active {
  background: var(--color-primary);
}
.tour-popover__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tour-popover::before {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--color-surface);
  border-color: var(--color-border-muted);
  border-style: solid;
  transform: rotate(45deg);
}
.tour-popover[data-side=bottom]::before {
  top: -6px;
  left: 22px;
  border-width: 1px 0 0 1px;
  border-top-left-radius: 3px;
}
.tour-popover[data-side=top]::before {
  bottom: -6px;
  left: 22px;
  border-width: 0 1px 1px 0;
  border-bottom-right-radius: 3px;
}
.tour-popover[data-side=right]::before {
  left: -6px;
  top: 20px;
  border-width: 1px 0 0 1px;
  border-top-left-radius: 3px;
}
.tour-popover[data-side=center]::before {
  content: none;
}

.onb-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 18px 20px 16px;
  margin-bottom: 24px;
}
.onb-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.onb-card__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  flex: 1;
}
.onb-card__close {
  background: none;
  border: none;
  padding: 4px;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.onb-card__close:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}
.onb-card__tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}
.onb-card__tile {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--color-bg);
  border: none;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}
.onb-card__tile:hover {
  background: var(--color-bg-hover);
}
.onb-card__tile-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  font-size: 18px;
  border-radius: var(--radius-md);
  background: var(--color-primary-tint);
  flex-shrink: 0;
}
.onb-card__tile-title {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 2px;
}
.onb-card__tile-sub {
  display: block;
  font-size: 12px;
  line-height: 1.4;
  color: var(--color-text-muted);
}
.onb-card__foot {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
}
.onb-card__tour-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 12.5px;
  color: var(--color-primary-strong);
  cursor: pointer;
  text-decoration: underline;
}
.onb-card__tour-link:hover {
  opacity: 0.8;
}

.onb-welcome {
  text-align: center;
}
.onb-welcome__emoji {
  font-size: 40px;
  line-height: 1;
  margin-bottom: 12px;
}
.onb-welcome__title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.onb-welcome__text {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--color-text-muted);
}
.onb-welcome__facts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  text-align: left;
}
.onb-welcome__facts li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13.5px;
  color: var(--color-text);
}
.onb-welcome__facts li::before {
  content: "→";
  color: var(--color-primary-strong);
  font-weight: 700;
}
.onb-welcome__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.onb-welcome__actions .btn {
  width: 100%;
}

:root[data-ui-version=modern] .onb-card {
  border: 1px solid var(--color-border-muted);
}
:root[data-ui-version=modern] .onb-card__title {
  font-weight: 700;
  letter-spacing: -0.01em;
}
:root[data-ui-version=modern] .onb-card__tile {
  background: var(--color-bg-muted);
  border: 1px solid var(--color-border-muted);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
:root[data-ui-version=modern] .onb-card__tile:hover {
  background: var(--color-surface);
  border-color: color-mix(in srgb, var(--color-primary) 35%, transparent);
  box-shadow: 0 4px 14px -2px color-mix(in srgb, var(--color-primary) 18%, transparent), 0 2px 6px -1px rgba(16, 24, 40, 0.06);
  transform: translateY(-1.5px);
}
:root[data-ui-version=modern] .onb-card__tile:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
:root[data-ui-version=modern] .onb-card__tile:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
:root[data-ui-version=modern] .onb-card__tile-icon {
  color: var(--color-primary-strong);
  transition: transform 0.15s ease;
}
:root[data-ui-version=modern] .onb-card__tile:hover .onb-card__tile-icon {
  transform: scale(1.06);
}
:root[data-ui-version=modern] .onb-card__tile-title {
  font-weight: 700;
  transition: color 0.15s ease;
}
:root[data-ui-version=modern] .onb-card__tile:hover .onb-card__tile-title {
  color: var(--color-primary-strong);
}

.news-header {
  align-items: flex-start;
  gap: 14px 20px;
}
.news-header .page-header__title {
  margin: 0 0 4px;
}
.news-header .page-header__sub {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 14px;
}
.news-header .page-header__actions {
  flex-wrap: wrap;
}
.news-header .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.news-header .btn .doc-icon {
  width: 16px;
  height: 16px;
}

.news-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  padding: 48px 20px;
}
.news-empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-primary-tint);
  color: var(--color-primary-strong);
}
.news-empty__icon .doc-icon {
  width: 26px;
  height: 26px;
}
.news-empty__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text);
}
.news-empty__text {
  max-width: 460px;
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-text-muted);
}
.news-empty .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.news-empty .btn .doc-icon {
  width: 16px;
  height: 16px;
}

.news-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: var(--radius-pill, 999px);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.news-status .doc-icon {
  width: 13px;
  height: 13px;
}
.news-status--published {
  background: color-mix(in srgb, var(--color-success) 14%, var(--color-surface));
  color: var(--color-success);
}
.news-status--draft {
  background: var(--color-bg-muted);
  color: var(--color-text-muted);
}
.news-status--scheduled {
  background: color-mix(in srgb, var(--color-warning) 16%, var(--color-surface));
  color: var(--color-warning);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.news-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border-muted);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.news-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.news-card:focus-within {
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.news-card__cover {
  display: block;
  aspect-ratio: 16/9;
  background: var(--color-bg-muted);
  overflow: hidden;
}
.news-card__cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.news-card:hover .news-card__cover img {
  transform: scale(1.03);
}
.news-card__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--color-text-muted);
  opacity: 0.6;
}
.news-card__placeholder .doc-icon {
  width: 40px;
  height: 40px;
}
.news-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  padding: 16px 18px 18px;
}
.news-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
}
.news-card__date {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-text-muted);
}
.news-card__date .doc-icon {
  width: 14px;
  height: 14px;
}
.news-card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.news-card__title a {
  color: var(--color-text);
  text-decoration: none;
}
.news-card__title a:hover {
  color: var(--color-primary-strong);
}
.news-card__title a:focus-visible {
  outline: none;
  border-radius: 4px;
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.news-card__excerpt {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 4px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-primary-strong);
  text-decoration: none;
}
.news-card__more .doc-icon {
  width: 15px;
  height: 15px;
  transition: transform 0.15s ease;
}
.news-card__more:hover .doc-icon {
  transform: translateX(3px);
}
.news-card__more:focus-visible {
  outline: none;
  border-radius: 4px;
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.news-grid--compact {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.dashboard-news {
  margin-bottom: 28px;
}
.dashboard-news__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.dashboard-news__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
}
.dashboard-news__title .doc-icon {
  width: 18px;
  height: 18px;
}
.dashboard-news .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dashboard-news .btn .doc-icon {
  width: 15px;
  height: 15px;
}
.dashboard-news .news-grid {
  margin-bottom: 0;
}

.news-grid--dashboard {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 1100px) {
  .news-grid--dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .news-grid--dashboard {
    grid-template-columns: 1fr;
  }
}

.news-pager {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-bottom: 28px;
  font-size: 13.5px;
  color: var(--color-text-muted);
}
.news-pager__rows, .news-pager__pages {
  display: flex;
  align-items: center;
  gap: 6px;
}
.news-pager__rows-item, .news-pager__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: var(--radius-md);
  background: var(--color-bg-muted);
  color: var(--color-text);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.news-pager__rows-item .doc-icon, .news-pager__btn .doc-icon {
  width: 16px;
  height: 16px;
}
.news-pager__rows-item:hover, .news-pager__btn:hover {
  background: var(--color-bg-hover);
}
.news-pager__rows-item:focus-visible, .news-pager__btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.news-pager__rows-item.is-active, .news-pager__btn.is-active {
  background: var(--color-primary);
  color: var(--color-surface);
}
.news-pager__pages {
  margin-left: auto;
  margin-right: 72px;
}
.news-pager__gap {
  min-width: 20px;
  text-align: center;
  color: var(--color-text-muted);
  user-select: none;
}
.news-pager__btn.is-disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}
@media (max-width: 560px) {
  .news-pager__pages {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    justify-content: center;
  }
}

.news-article {
  max-width: 880px;
  margin: 0 auto 36px;
}
.news-article__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.news-article__nav .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.news-article__nav .btn .doc-icon {
  width: 15px;
  height: 15px;
}
.news-article__tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.news-article__header {
  margin-bottom: 18px;
}
.news-article__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 10px;
}
.news-article__title {
  margin: 0;
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-text);
  overflow-wrap: anywhere;
}
.news-article__cover {
  margin: 0 0 22px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  background: var(--color-bg-muted);
}
.news-article__cover img {
  display: block;
  width: 100%;
  max-height: 460px;
  object-fit: cover;
}

body .news-article__body,
body .news-article__lead {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 4px 0 12px;
  color: var(--color-text);
  overflow: visible;
  height: auto;
}
@media (max-width: 768px) {
  body .news-article__body,
  body .news-article__lead {
    padding: 2px 0 8px;
  }
}
body .news-article__body h1, body .news-article__body h2, body .news-article__body h3, body .news-article__body h4,
body .news-article__lead h1,
body .news-article__lead h2,
body .news-article__lead h3,
body .news-article__lead h4 {
  color: var(--color-text);
}
body .news-article__body img,
body .news-article__lead img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 12px 0;
}
body .news-article__body table,
body .news-article__lead table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
  border: 1px solid var(--color-border);
}
body .news-article__body th, body .news-article__body td,
body .news-article__lead th,
body .news-article__lead td {
  border: 1px solid var(--color-border);
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}
body .news-article__body th,
body .news-article__lead th {
  background: var(--color-bg-muted);
  font-weight: 600;
}
body .news-article__body a:not(.btn),
body .news-article__lead a:not(.btn) {
  color: var(--color-primary-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
body .news-article__body iframe, body .news-article__body video,
body .news-article__lead iframe,
body .news-article__lead video {
  max-width: 100%;
  border-radius: var(--radius-md);
}

body .news-article__lead {
  font-size: 17px;
  font-weight: 500;
  color: var(--color-text-muted);
}

.news-related {
  max-width: 880px;
  margin: 0 auto 36px;
}
.news-related__title {
  margin: 0 0 14px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

.news-manage {
  padding: 0;
  overflow: hidden;
}
.news-manage__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 14px 18px;
  background: var(--color-bg-muted);
}
.news-manage__count {
  font-size: 13px;
  color: var(--color-text-muted);
}

.news-search {
  position: relative;
  display: block;
  flex: 1 1 260px;
  max-width: 420px;
}
.news-search__icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}
.news-search__icon .doc-icon {
  width: 16px;
  height: 16px;
}
.news-search__input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--color-border-muted);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.news-search__input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.news-table-wrap {
  overflow-x: auto;
}

.news-table {
  width: 100%;
}
.news-table__title {
  width: 100%;
  min-width: 220px;
}
.news-table__nowrap {
  width: 1%;
  white-space: nowrap;
}
.news-table__actions {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}
.news-table__link {
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
}
.news-table__link:hover {
  color: var(--color-primary-strong);
}
.news-table tr[hidden] {
  display: none;
}
.news-table__item {
  display: flex;
  align-items: center;
  gap: 14px;
}
.news-table__thumb {
  flex: none;
  display: block;
  width: 128px;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--color-bg-muted);
}
.news-table__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.news-table__thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--color-text-muted);
  opacity: 0.6;
}
.news-table__thumb-placeholder .doc-icon {
  width: 24px;
  height: 24px;
}

.news-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-left: 4px;
  padding: 0;
  border: none;
  border-radius: var(--radius-md);
  background: var(--color-bg-muted);
  color: var(--color-text);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.news-icon-btn .doc-icon {
  width: 16px;
  height: 16px;
}
.news-icon-btn:hover {
  background: var(--color-bg-hover);
  color: var(--color-primary-strong);
  transform: translateY(-1px);
}
.news-icon-btn:active {
  transform: translateY(0);
}
.news-icon-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.news-icon-btn--danger:hover {
  background: color-mix(in srgb, var(--color-danger) 14%, var(--color-surface));
  color: var(--color-danger);
}

.news-nomatch {
  padding: 36px 20px;
  text-align: center;
}

.news-form {
  max-width: 980px;
}
.news-form__panel {
  margin-bottom: 16px;
}
.news-form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
}
@media (max-width: 768px) {
  .news-form__row {
    grid-template-columns: 1fr;
  }
}
.news-form__hint {
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.news-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.news-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.news-switch__track {
  position: relative;
  flex: none;
  width: 40px;
  height: 22px;
  border-radius: 99px;
  background: var(--color-border);
  transition: background 0.15s ease;
}
.news-switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease;
}
input:checked + .news-switch__track {
  background: var(--color-primary);
}
input:checked + .news-switch__track::after {
  transform: translateX(18px);
}
input:focus-visible + .news-switch__track {
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.news-switch__text {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.news-cover {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px 20px;
}
.news-cover__preview {
  flex: none;
  width: 280px;
  max-width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--color-bg-muted);
}
.news-cover__preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.news-cover__preview img[hidden] {
  display: none;
}
.news-cover__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 100%;
  font-size: 13px;
  color: var(--color-text-muted);
}
.news-cover__placeholder .doc-icon {
  width: 28px;
  height: 28px;
  opacity: 0.7;
}
.news-cover__placeholder[hidden] {
  display: none;
}
.news-cover__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  flex: 1 1 220px;
}
.news-cover__actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.news-cover__actions .btn .doc-icon {
  width: 15px;
  height: 15px;
}
.news-cover__file {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
}

.news-editor {
  margin-top: 8px;
  border: 1px solid var(--color-border-muted);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}
.news-editor:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.news-editor .ql-toolbar.ql-snow {
  border: none;
  border-bottom: 1px solid var(--color-border-muted);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--color-bg-muted);
  position: sticky;
  top: 52px;
  z-index: 5;
}
.news-editor .ql-container.ql-snow {
  border: none;
  font-family: inherit;
  font-size: 15.5px;
  color: var(--color-text);
}
.news-editor .ql-editor {
  min-height: 110px;
  padding: 14px 16px;
  line-height: 1.65;
}
.news-editor .ql-editor.ql-blank::before {
  color: var(--color-text-muted);
  font-style: normal;
}
.news-editor .ql-editor img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}
.news-editor--brief .ql-editor {
  min-height: 84px;
}
.news-editor__area--body .ql-editor {
  min-height: 320px;
}
.news-editor__area {
  min-height: 84px;
}
.news-editor__area--body {
  min-height: 360px;
}

.news-toolbar:not(.ql-toolbar) {
  min-height: 42px;
  background: var(--color-bg-muted);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.groups-filter {
  display: inline-flex;
  gap: 4px;
  margin: 0 0 16px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: var(--color-bg-muted);
}

.groups-filter__btn {
  padding: 6px 14px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}
.groups-filter__btn:hover:not(:disabled) {
  background: var(--color-bg-hover);
}
.groups-filter__btn.is-active {
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
.groups-filter__btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.groups-filter__btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-light, var(--color-primary-tint));
}

.group-sso-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--color-warning, #f59e0b) 18%, var(--color-surface));
  color: var(--color-text-dark, var(--color-text));
  font-size: 12px;
  font-weight: 600;
}
.group-sso-badge svg {
  flex-shrink: 0;
}
.group-sso-badge--muted {
  background: var(--color-bg-muted);
  color: var(--color-text);
  font-weight: 500;
}

[data-groups-filter-empty][hidden],
section.panel[hidden] {
  display: none;
}

.sso-alert {
  margin-bottom: 16px;
}
.sso-alert--lead {
  margin-bottom: 20px;
}

.sso-panel {
  margin-bottom: 24px;
}

.sso-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sso-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border-muted);
}
.sso-toggle-row__title {
  font-size: 15px;
}
.sso-toggle-row__controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sso-input-row {
  display: flex;
  gap: 8px;
}

.sso-input-mono {
  font-family: monospace;
  font-size: 13px;
  background: var(--color-bg-muted);
  color: var(--color-text);
  border: 1px solid var(--color-border-muted);
}
.sso-input-mono--secret {
  letter-spacing: 1px;
}

.sso-actions-end {
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
  border-top: 1px solid var(--color-border-muted);
}

.sso-smileforce-form {
  margin-bottom: 20px;
}

.sso-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.sso-stat__value {
  font-size: 20px;
}

.sso-lead {
  margin-bottom: 16px;
  color: var(--color-text-muted);
}
.sso-lead--tight {
  margin-bottom: 8px;
}

.sso-subtitle {
  margin-bottom: 8px;
  font-size: 14px;
}
.sso-subtitle--spaced {
  margin-top: 16px;
}

.sso-table {
  margin-bottom: 20px;
}

.sso-th--field {
  width: 140px;
}
.sso-th--type {
  width: 100px;
}
.sso-th--endpoint {
  width: 260px;
}

.sso-code {
  padding: 14px;
  overflow-x: auto;
  border-radius: var(--radius-md);
  background: var(--color-bg-muted);
  color: var(--color-text);
  font-family: monospace;
  font-size: 13px;
}

.auth-oauth--primary {
  margin-bottom: 16px;
}

.auth-admin-login {
  margin-top: 4px;
  padding: 4px 14px 10px;
  border-radius: var(--radius-md);
  background: var(--color-bg-muted);
}
.auth-admin-login__summary {
  padding: 10px 0;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.auth-admin-login__summary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.auth-admin-login__hint {
  margin: 12px 0 0;
}

.user-modal__sso {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.user-modal__sso-status {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--color-bg-muted);
  color: var(--color-text);
  font-size: 13px;
}
.user-modal__sso-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.am-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--color-bg-muted);
  color: var(--color-text);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.am-pill .doc-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}
.am-pill--personal {
  background: var(--color-primary-light);
  color: var(--color-primary-strong);
}
.am-pill--group {
  background: color-mix(in srgb, var(--color-success) 14%, transparent);
  color: var(--color-success);
}
.am-pill--public {
  background: color-mix(in srgb, var(--color-warning) 16%, transparent);
  color: var(--color-warning);
}
.am-pill--admin {
  background: color-mix(in srgb, var(--color-danger) 12%, transparent);
  color: var(--color-danger);
}

.am-dialog {
  width: min(1280px, 100vw - 32px);
  height: min(860px, 100vh - 32px);
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: none;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-modal);
  overflow: hidden;
}
.am-dialog[open] {
  display: flex;
  flex-direction: column;
}
.am-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
}
@media (max-width: 640px) {
  .am-dialog {
    width: 100vw;
    height: 100dvh;
    max-width: 100vw;
    border-radius: 0;
  }
}
.am-dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--color-bg-muted);
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .am-dialog__head {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 14px;
  }
}
.am-dialog__titles {
  min-width: 0;
  flex: 1;
}
.am-dialog__title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.am-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex-shrink: 0;
}
.am-dialog__actions .btn {
  min-height: 40px;
  min-width: 40px;
}
.am-dialog__actions .btn[hidden] {
  display: none;
}
.am-dialog__body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
}
@media (max-width: 768px) {
  .am-dialog__body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
  }
}
.am-dialog .doc-icon {
  width: 16px;
  height: 16px;
}

.am-route {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  font-size: 13px;
}
.am-route__item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 2px 8px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text-muted);
  font: inherit;
  cursor: pointer;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.am-route__item:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}
.am-route__item.is-current {
  background: var(--color-primary-light);
  color: var(--color-primary-strong);
  font-weight: 600;
  cursor: default;
}
.am-route__item .doc-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.am-route__sep {
  display: inline-flex;
  color: var(--color-text-muted);
}
.am-route__sep .doc-icon {
  width: 12px;
  height: 12px;
}

.am-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  background: var(--color-surface);
}
.am-stage .am-graph {
  position: absolute;
  inset: 0;
  outline-offset: -3px;
}
.am-stage .am-graph:focus-visible {
  outline: 2px solid var(--color-primary);
}
.am-stage .am-list {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 16px 18px;
  display: none;
}
.am-stage .am-status {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: color-mix(in srgb, var(--color-surface) 78%, transparent);
  color: var(--color-text-muted);
  font-size: 14px;
  z-index: 2;
}
.am-stage .am-status[hidden] {
  display: none;
}
.am-stage__error, .am-stage .am-status__error {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
}

@media (max-width: 768px) {
  .am-dialog.is-list .am-side {
    display: none;
  }
}
.am-dialog.is-list .am-stage .am-graph {
  display: none;
}
.am-dialog.is-list .am-stage .am-list {
  display: block;
}

.am-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-primary);
  animation: am-spin 0.8s linear infinite;
}

@keyframes am-spin {
  to {
    transform: rotate(360deg);
  }
}
.am-side {
  padding: 16px;
  background: var(--color-bg-muted);
  overflow-y: auto;
  min-width: 0;
}
@media (max-width: 768px) {
  .am-side {
    max-height: 34vh;
  }
}
.am-side__title {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.am-side__text, .am-side__note, .am-side__hint {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.45;
}
.am-side__note, .am-side__hint {
  color: var(--color-text-muted);
}
.am-side__list {
  margin: 0 0 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 12px;
  font-size: 13px;
}
.am-side__list dt {
  color: var(--color-text-muted);
}
.am-side__list dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.am-side__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.am-side__actions .btn {
  min-height: 40px;
}

.am-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding: 10px 18px;
  background: var(--color-bg-muted);
  color: var(--color-text-muted);
  font-size: 12px;
  flex-shrink: 0;
}
.am-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.am-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 3px solid var(--color-border);
  background: var(--color-surface);
  flex-shrink: 0;
}
.am-dot--personal {
  border-color: var(--color-primary-strong);
}
.am-dot--group {
  border-color: var(--color-success);
}
.am-dot--public {
  border-color: var(--color-warning);
}
.am-dot--admin {
  border-color: var(--color-danger);
}
.am-dot--none {
  border-color: var(--color-text-muted);
}

.am-dash {
  width: 22px;
  height: 0;
  border-top: 2px dashed var(--color-primary-strong);
}

.am-list__section {
  margin-bottom: 20px;
}
.am-list__title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
}
.am-list__count {
  margin-left: 4px;
  color: var(--color-text-muted);
  font-weight: 500;
}
.am-list__ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.am-list__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: var(--color-bg-muted);
}
@media (max-width: 640px) {
  .am-list__row {
    flex-direction: column;
    align-items: stretch;
  }
}
.am-list__row .btn {
  min-height: 40px;
  flex-shrink: 0;
}
.am-list__main {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.am-list__level {
  color: var(--color-text-muted);
  font-size: 13px;
}
.am-list__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.am-list__empty {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 13px;
}
.am-list__members {
  flex-basis: 100%;
  font-size: 13px;
}
.am-list__members summary {
  cursor: pointer;
  color: var(--color-text-muted);
  min-height: 28px;
}
.am-list__members ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.user-spaces__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}
.user-spaces__search {
  flex: 1;
  min-width: 180px;
}
.user-spaces__notice {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-warning) 14%, transparent);
  font-size: 13px;
}
.user-spaces__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.user-spaces__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--color-bg-muted);
}
.user-spaces__row.is-none {
  opacity: 0.85;
}
.user-spaces__icon {
  flex-shrink: 0;
  width: 28px;
  text-align: center;
  font-size: 20px;
  line-height: 1;
}
.user-spaces__icon .doc-icon {
  width: 20px;
  height: 20px;
}
.user-spaces__main {
  flex: 1;
  min-width: 0;
}
.user-spaces__name {
  font-weight: 600;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.user-spaces__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin-top: 4px;
}
.user-spaces__level {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
}
.user-spaces__level--none {
  font-weight: 500;
}
.user-spaces__hint {
  margin-top: 4px;
  font-size: 12px;
  color: var(--color-text-muted);
}
.user-spaces__switch {
  flex-shrink: 0;
}
.user-spaces__switch::after {
  content: "";
  position: absolute;
  inset: -9px -4px;
}
.user-spaces__state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 16px;
  text-align: center;
  color: var(--color-text-muted);
  border-radius: var(--radius-md);
  background: var(--color-bg-muted);
}
.user-spaces__state p {
  margin: 0;
}
.user-spaces__state .doc-icon {
  width: 24px;
  height: 24px;
}
@media (max-width: 640px) {
  .user-spaces__row {
    flex-wrap: wrap;
  }
  .user-spaces__main {
    flex-basis: calc(100% - 100px);
  }
}

.topbar {
  min-width: 0;
  flex-wrap: nowrap;
}
@media (max-width: 1023px) {
  .topbar {
    padding-left: calc(8px + env(safe-area-inset-left));
    padding-right: calc(8px + env(safe-area-inset-right));
    gap: 6px;
  }
}
.topbar {
  padding-top: env(safe-area-inset-top);
  height: calc(52px + env(safe-area-inset-top));
}
.topbar > * {
  min-width: 0;
}
.topbar > .topbar__burger,
.topbar > .topbar__logo,
.topbar > .topbar__actions {
  flex-shrink: 0;
}
.topbar__logo {
  margin-right: 2px;
}
.topbar__logo .app-logo-image {
  display: block;
  max-height: 28px;
  width: auto;
  max-width: 140px;
}
@media (max-width: 480px) {
  .topbar__logo {
    font-size: 17px;
    margin-right: 0;
    letter-spacing: -0.4px;
  }
}
@media (max-width: 400px) {
  .topbar__logo {
    font-size: 16px;
  }
}
.topbar__burger {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--radius-md, 10px);
}
.topbar__burger .doc-icon {
  width: 20px;
  height: 20px;
}
.topbar__burger .doc-icon + .doc-icon {
  display: none;
}
.topbar__burger[aria-expanded=true] {
  color: var(--color-primary-strong);
}
.topbar__burger[aria-expanded=true] .doc-icon {
  display: none;
}
.topbar__burger[aria-expanded=true] .doc-icon + .doc-icon {
  display: block;
}
.topbar__burger:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}
.topbar__search {
  flex: 1 1 auto;
  min-width: 200px;
  max-width: 380px;
  height: 40px;
  padding: 0 12px;
  white-space: nowrap;
}
.topbar__search-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar__search-kbd {
  flex-shrink: 0;
}
@media (max-width: 1279px) {
  .topbar__search {
    min-width: 160px;
  }
  .topbar__search .topbar__search-kbd {
    display: none;
  }
}
@media (max-width: 1023px) {
  .topbar__search {
    min-width: 140px;
  }
}
@media (max-width: 767px) {
  .topbar__search {
    flex: 0 0 40px;
    width: 40px;
    min-width: 40px;
    justify-content: center;
    padding: 0;
    border-radius: var(--radius-md, 10px);
  }
  .topbar__search .topbar__search-text {
    display: none;
  }
  .topbar__search .doc-icon {
    width: 18px;
    height: 18px;
  }
}
.topbar .topbar__ai-btn {
  flex-shrink: 0;
  height: 40px;
  padding: 0 12px;
  white-space: nowrap;
}
.topbar .topbar__ai-btn .topbar__ai-icon {
  display: inline-flex;
  align-items: center;
  font-size: inherit;
}
.topbar .topbar__ai-btn .topbar__ai-icon .doc-icon {
  width: 18px;
  height: 18px;
}
@media (max-width: 1279px) {
  .topbar .topbar__ai-btn .topbar__ai-kbd {
    display: none;
  }
}
@media (max-width: 1023px) {
  .topbar .topbar__ai-btn {
    width: 40px;
    padding: 0;
    justify-content: center;
  }
  .topbar .topbar__ai-btn .topbar__ai-text {
    display: none;
  }
}
@media (max-width: 767px) {
  .topbar .topbar__ai-btn {
    display: none;
  }
}
.topbar__actions {
  gap: 4px;
  min-width: 0;
}
@media (min-width: 1024px) {
  .topbar__actions {
    gap: 6px;
  }
}
.topbar__save-sticky {
  height: 40px;
  flex-shrink: 0;
}
.topbar__save-sticky .doc-icon {
  width: 16px;
  height: 16px;
}
@media (max-width: 767px) {
  .topbar__save-sticky {
    width: 40px;
    padding: 0;
    justify-content: center;
    margin-right: 0 !important;
  }
  .topbar__save-text {
    display: none;
  }
}
.topbar__requests-btn {
  position: relative;
  flex-shrink: 0;
  height: 40px;
  padding: 0 14px;
  margin-right: 0;
}
@media (max-width: 1023px) {
  .topbar__requests-btn {
    width: 40px;
    padding: 0;
    justify-content: center;
  }
  .topbar__requests-btn .topbar__requests-text {
    display: none;
  }
}
.topbar__requests-badge {
  flex-shrink: 0;
}
@media (max-width: 1023px) {
  .topbar__requests-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 10px;
    line-height: 16px;
    box-shadow: 0 0 0 2px var(--color-surface);
    background: var(--color-danger);
    color: #fff;
  }
}
.topbar__smileforce-btn {
  flex-shrink: 0;
  height: 40px;
  margin-right: 0;
  padding: 0 12px;
  white-space: nowrap;
}
.topbar__smileforce-btn .topbar__smileforce-icon {
  display: inline-flex;
}
.topbar__smileforce-btn .topbar__smileforce-icon .doc-icon {
  width: 16px;
  height: 16px;
}
@media (max-width: 1279px) {
  .topbar__smileforce-btn {
    width: 40px;
    padding: 0;
    justify-content: center;
  }
  .topbar__smileforce-btn .topbar__smileforce-text,
  .topbar__smileforce-btn > .doc-icon {
    display: none;
  }
}
@media (max-width: 1023px) {
  .topbar__smileforce-btn {
    display: none;
  }
}
.topbar__icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md, 10px);
}
.topbar__icon-btn .doc-icon {
  width: 18px;
  height: 18px;
}
.topbar__badge {
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}
.topbar__user {
  height: 40px;
  min-width: 40px;
  padding: 0 6px;
  gap: 6px;
  border: 0;
  border-radius: var(--radius-md, 10px);
  background: none;
  color: var(--color-text);
  font: inherit;
  cursor: pointer;
  justify-content: center;
}
.topbar__user.is-active {
  background: var(--color-primary-tint);
}
.topbar__user[aria-expanded=true] {
  background: var(--color-bg-hover);
}
.topbar__user-name {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 1279px) {
  .topbar__user-name {
    display: none;
  }
}
.topbar__user-caret {
  display: inline-flex;
  color: var(--color-text-muted);
}
.topbar__user-caret .doc-icon {
  width: 14px;
  height: 14px;
  transition: transform 0.15s ease;
}
@media (max-width: 1023px) {
  .topbar__user-caret {
    display: none;
  }
}
.topbar__user[aria-expanded=true] .topbar__user-caret .doc-icon {
  transform: rotate(180deg);
}

.topbar :where(a, button):focus-visible,
.user-menu__panel :where(a, button):focus-visible,
.space-nav__drawer-close:focus-visible,
.space-nav__drawer-ai:focus-visible {
  outline: 2px solid var(--color-primary-strong);
  outline-offset: 2px;
}

.topbar__notifications-wrap {
  flex-shrink: 0;
}

.notifications-popover {
  width: min(350px, 100vw - 16px);
  max-height: calc(100dvh - 52px - 24px);
}
.notifications-popover__list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}
@media (max-width: 767px) {
  .notifications-popover {
    position: fixed;
    top: calc(52px + env(safe-area-inset-top) + 6px + var(--impersonation-offset, 0px));
    left: 8px;
    right: 8px;
    width: auto;
    max-height: calc(100dvh - 52px - env(safe-area-inset-top) - var(--impersonation-offset, 0px) - 16px);
  }
}

.user-menu {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.user-menu__panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 1000;
  width: 260px;
  max-width: calc(100vw - 16px);
  max-height: calc(100dvh - 52px - 24px);
  overflow-y: auto;
  padding: 6px;
  border-radius: var(--radius-lg, 14px);
  background: var(--color-surface);
  box-shadow: var(--shadow-hover);
}
.user-menu__panel[hidden] {
  display: none;
}
@media (max-width: 767px) {
  .user-menu__panel {
    position: fixed;
    top: calc(52px + env(safe-area-inset-top) + 6px + var(--impersonation-offset, 0px));
    right: 8px;
    left: auto;
    width: min(300px, 100vw - 16px);
  }
}
.user-menu__who {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px 10px;
  min-width: 0;
}
.user-menu__who-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-menu__who-email {
  font-size: 12px;
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-menu__form {
  margin: 0;
  padding: 0;
}
.user-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-md, 10px);
  background: none;
  color: var(--color-text);
  font: inherit;
  font-size: 14px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.user-menu__item .doc-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--color-text-muted);
}
.user-menu__item:hover, .user-menu__item:focus-visible {
  background: var(--color-bg-hover);
}
.user-menu__item.is-active {
  background: var(--color-primary-tint);
  color: var(--color-primary-strong);
}
.user-menu__item.is-active .doc-icon {
  color: inherit;
}
.user-menu__item--danger {
  color: var(--color-danger-text, var(--color-danger));
}
.user-menu__item--danger .doc-icon {
  color: inherit;
}
.user-menu__item--smileforce {
  display: none;
}
@media (max-width: 1023px) {
  .user-menu__item--smileforce {
    display: flex;
  }
}
.user-menu__item--smileforce .doc-icon:last-child {
  margin-left: auto;
  width: 13px;
  height: 13px;
}
.user-menu__label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-menu__theme-icon {
  display: inline-flex;
  flex-shrink: 0;
}
.user-menu__theme-icon .doc-icon {
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
}
.user-menu__sep {
  height: 1px;
  margin: 6px 4px;
  background: var(--color-border-muted, var(--color-border));
}

.space-nav__drawer-head, .space-nav__drawer-ai {
  display: none;
}
@media (max-width: 1023px) {
  .space-nav {
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .space-nav__drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px 8px 8px;
    flex-shrink: 0;
  }
  .space-nav__drawer-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
  }
  .space-nav__drawer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-md, 10px);
    background: none;
    color: var(--color-text-muted);
    cursor: pointer;
  }
  .space-nav__drawer-close .doc-icon {
    width: 20px;
    height: 20px;
  }
  .space-nav__drawer-close:hover {
    background: var(--color-bg-hover);
    color: var(--color-text);
  }
}
@media (max-width: 767px) {
  .space-nav__drawer-ai {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    min-height: 44px;
    margin: 0 4px 8px;
    padding: 0 12px;
    border: 0;
    border-radius: var(--radius-md, 10px);
    background: var(--color-primary-light);
    color: var(--color-primary-strong);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
  }
  .space-nav__drawer-ai .doc-icon {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 1023px) {
  .space-nav > * {
    flex-shrink: 0;
  }
  .space-nav > .doc-tree,
  .space-nav > [class*=space-nav__tree] {
    min-height: 0;
  }
  html[data-nav-open] {
    overflow: hidden;
  }
  html[data-nav-open] body {
    overflow: hidden;
  }
  html[data-nav-open] .ai-fab,
  html[data-nav-open] .quick-notes-fab,
  html[data-nav-open] .quick-notes-widget,
  html[data-nav-open] .scroll-top-btn {
    visibility: hidden;
  }
  .space-nav .space-quick-add__dropdown,
  .space-nav .space-menu__dropdown {
    max-width: calc(min(320px, 86vw) - 24px);
  }
}
@media (max-width: 767px) {
  html:has(#js-notifications-popover:not([hidden])) :is(.ai-fab, .quick-notes-fab, .scroll-top-btn),
  html:has(#js-user-menu-panel:not([hidden])) :is(.ai-fab, .quick-notes-fab, .scroll-top-btn) {
    visibility: hidden;
  }
}
@media (max-width: 1023px) {
  .ai-fab {
    bottom: calc(24px + env(safe-area-inset-bottom));
  }
  .quick-notes-fab {
    bottom: calc(88px + env(safe-area-inset-bottom));
  }
  .scroll-top-btn {
    bottom: calc(152px + env(safe-area-inset-bottom));
  }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  .space-nav {
    width: var(--sidebar-width, 248px);
  }
}
.topbar__collapse {
  display: none;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md, 10px);
  background: none;
  color: var(--color-text-muted);
  cursor: pointer;
}
.topbar__collapse .doc-icon {
  width: 18px;
  height: 18px;
}
.topbar__collapse:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}
.topbar__collapse:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.topbar__collapse[aria-expanded=false] {
  color: var(--color-primary-strong);
}
@media (min-width: 1024px) {
  .topbar__collapse {
    display: inline-flex;
  }
}

.space-nav__rail {
  display: none;
}

@media (min-width: 1024px) {
  :root {
    --sidebar-rail-width: 60px;
  }
  .space-nav {
    transition: width 0.18s ease;
  }
}
@media (min-width: 1024px) and (prefers-reduced-motion: reduce) {
  .space-nav {
    transition: none;
  }
}
@media (min-width: 1024px) {
  .is-sidebar-resizing .space-nav {
    transition: none;
  }
  :root[data-nav-collapsed] .space-nav {
    width: var(--sidebar-rail-width);
  }
  :root[data-nav-collapsed] .space-nav > :not(.space-nav__rail):not(.space-nav__footer) {
    display: none;
  }
  :root[data-nav-collapsed] .space-nav__rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
  }
  :root[data-nav-collapsed] .space-nav__rail-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-md, 10px);
    background: none;
    color: var(--color-text-muted);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.12s ease, color 0.12s ease;
  }
  :root[data-nav-collapsed] .space-nav__rail-btn .doc-icon {
    width: 18px;
    height: 18px;
  }
  :root[data-nav-collapsed] .space-nav__rail-btn:hover {
    background: var(--color-bg-hover);
    color: var(--color-text);
  }
  :root[data-nav-collapsed] .space-nav__rail-btn.is-active {
    background: var(--color-primary-tint);
    color: var(--color-primary-strong);
  }
  :root[data-nav-collapsed] .space-nav__rail-btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
  }
  :root[data-nav-collapsed] .space-nav__footer {
    margin-top: auto;
  }
  :root[data-nav-collapsed] .space-nav__footer > :not(.space-nav__bottom-links) {
    display: none;
  }
  :root[data-nav-collapsed] .space-nav__bottom-links {
    align-items: center;
    padding-top: 8px;
  }
  :root[data-nav-collapsed] .space-nav__bottom-link {
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    gap: 0;
    border-radius: var(--radius-md, 10px);
  }
  :root[data-nav-collapsed] .space-nav__bottom-link .space-nav__bottom-text {
    display: none;
  }
  :root[data-nav-collapsed] .space-nav__bottom-link:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
  }
}
.header {
  padding-top: env(safe-area-inset-top);
  height: calc(56px + env(safe-area-inset-top));
}

.header__search-btn {
  display: none;
}

@media (max-width: 768px) {
  .header {
    padding-left: 12px;
    padding-right: 12px;
    gap: 8px;
  }
  .header__logo {
    font-size: 22px;
    margin-right: 4px;
  }
  .header__search {
    max-width: none;
  }
  .header__search input {
    font-size: 16px;
    padding: 8px 12px;
  }
  .header__user-menu {
    margin-left: 0;
    padding-left: 8px;
  }
}
@media (max-width: 768px) and (max-width: 640px) {
  .header__search {
    display: none;
  }
  .header__search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 8px;
    color: var(--color-text-muted);
  }
  .header__search-btn:active {
    background: var(--color-bg-hover);
  }
}
@media (max-width: 768px) {
  .header__timer {
    padding: 0 4px 0 10px;
    font-size: 11.5px;
  }
  .sidebar {
    width: min(300px, 85vw);
    height: 100dvh;
    padding-top: calc(8px + env(safe-area-inset-top));
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }
  .app-main {
    padding: 16px 16px calc(76px + env(safe-area-inset-bottom));
  }
  .header__notif-dropdown {
    position: fixed;
    left: 12px;
    right: 12px;
    top: calc(56px + env(safe-area-inset-top) + 6px);
    width: auto;
    max-height: 65dvh;
  }
  .data-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .all-tasks-table {
    display: block;
    background: transparent;
    border: none;
    overflow: visible;
  }
  .all-tasks-table tbody {
    display: block;
  }
  .all-tasks-table tr {
    display: flex;
    flex-wrap: wrap;
  }
  .all-tasks-table td {
    display: flex;
    align-items: center;
    padding: 0;
    border: none;
    text-align: left;
  }
  .all-tasks-table .at-row {
    column-gap: 8px;
    row-gap: 8px;
    align-items: flex-start;
    background: var(--color-surface);
    border: none;
    border-left: 3px solid transparent;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    padding: 15px 40px 15px 15px;
    margin-bottom: 10px;
    position: relative;
  }
  .all-tasks-table .at-row:last-child {
    margin-bottom: 0;
  }
  .all-tasks-table .at-row--priority-low {
    border-left-color: #94a3b8;
  }
  .all-tasks-table .at-row--priority-medium {
    border-left-color: #60a5fa;
  }
  .all-tasks-table .at-row--priority-high {
    border-left-color: #fbbf24;
  }
  .all-tasks-table .at-row--priority-urgent {
    border-left-color: #f87171;
  }
  .all-tasks-table .at-row > td:first-child {
    box-shadow: none;
  }
  .all-tasks-table .at-col-dot {
    order: 1;
    flex: 0 0 auto;
    width: auto;
  }
  .all-tasks-table .at-col-title {
    order: 2;
    flex: 0 1 100%;
    width: auto;
    min-width: 0;
  }
  .all-tasks-table .at-col-title .at-title-link {
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
  }
  .all-tasks-table .at-col-category {
    order: 3;
    flex: 0 0 auto;
    width: auto;
  }
  .all-tasks-table .at-col-assignee {
    order: 4;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }
  .all-tasks-table .at-col-assignee .at-inline-view {
    white-space: normal;
    max-width: 100%;
  }
  .all-tasks-table .at-col-assignee .assignee-pill__name {
    overflow-wrap: break-word;
  }
  .all-tasks-table .at-col-creator {
    order: 5;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }
  .all-tasks-table .at-col-creator .assignee-pill__name {
    overflow-wrap: break-word;
  }
  .all-tasks-table .at-col-due {
    order: 6;
    flex: 0 0 auto;
    width: auto;
  }
  .all-tasks-table .at-col-status {
    order: 7;
    flex: 0 0 auto;
    width: auto;
    text-align: left;
  }
  .all-tasks-table .at-col-del {
    order: 8;
    position: absolute;
    top: 8px;
    right: 8px;
    flex: 0 0 auto;
    width: auto;
  }
  .all-tasks-table .at-col-del .at-del-btn {
    opacity: 1;
  }
  .all-tasks-table .at-inline-select,
  .all-tasks-table .at-inline-input {
    width: auto;
    min-width: 130px;
  }
  .task-list-tabs,
  .view-switcher {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .task-list-tabs::-webkit-scrollbar,
  .view-switcher::-webkit-scrollbar {
    display: none;
  }
  .page-header__controls {
    width: 100%;
    flex-wrap: nowrap;
  }
  .view-switcher {
    min-width: 0;
    flex: 1 1 auto;
  }
  .page-header__action {
    padding: 0;
    width: 34px;
    height: 34px;
    justify-content: center;
    flex-shrink: 0;
  }
  .page-header__action-text {
    display: none;
  }
  .settings-layout {
    flex-direction: column;
    gap: 16px;
  }
  .settings-sidebar {
    flex: none;
    width: 100%;
    position: static;
  }
  .settings-nav {
    flex-direction: row;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-border);
  }
  .settings-nav::-webkit-scrollbar {
    display: none;
  }
  .settings-nav__tab {
    flex-shrink: 0;
  }
  .task-list-tabs__btn,
  .view-switcher__btn {
    white-space: nowrap;
    flex-shrink: 0;
  }
  .comment-list__item--reply {
    margin-left: 10px;
  }
  .field input:not([type=checkbox]):not([type=radio]),
  .field select,
  .field textarea,
  .form-input,
  .form-select,
  .task-list-filters__select,
  .task-list-filters__date,
  .task-list-filters__search,
  .comment-form textarea,
  .ai-chat__input {
    font-size: 16px;
  }
}
@media (max-width: 640px) {
  .dialog {
    width: 100vw;
    max-width: 100vw;
    margin: auto 0 0;
    border-radius: 16px 16px 0 0;
    border-bottom: none;
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  }
  .dialog--wide {
    height: auto;
    max-height: calc(100dvh - 24px);
  }
  .field-row--2 {
    grid-template-columns: 1fr;
  }
  .danger-zone__row,
  .fm-toolbar,
  .roles-list__row {
    flex-wrap: wrap;
  }
  .feature-row {
    gap: 12px;
  }
  .feature-row__info {
    min-width: 0;
  }
  .data-table--stack {
    display: block;
    border: none;
    background: transparent;
    overflow: visible;
  }
  .data-table--stack thead {
    display: none;
  }
  .data-table--stack tbody {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .data-table--stack tr {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 12px 14px;
  }
  .data-table--stack td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0;
    border: none;
    font-size: 13px;
  }
  .data-table--stack td[data-label]::before {
    content: attr(data-label);
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
  }
  .fm-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  .auth-page {
    padding: 16px;
  }
  .auth-card {
    width: 100%;
    max-width: 360px;
    padding: 24px 20px;
  }
}
@media (pointer: coarse) {
  .btn {
    min-height: 42px;
  }
  .sidebar__link {
    padding: 10px 12px;
  }
  .sidebar__proj-item {
    padding: 8px 10px 8px 14px;
  }
  .sidebar__section-add {
    opacity: 1;
  }
  .at-row .at-del-btn,
  .comment-list__reply-btn,
  .attachment-card__remove,
  .relation-list__remove {
    opacity: 1;
  }
  .task-list-row__open {
    color: var(--color-text-muted);
  }
  .item-list__drag {
    display: block;
  }
}
