/* === Documents List (Right Sidebar) === */
.docs-search {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--font-family);
  outline: none;
  background: var(--color-surface);
  color: var(--color-on-surface);
  transition: border-color 0.2s;
  margin: 12px 0 8px;
}
.docs-search:focus {
  border-color: var(--color-primary);
}

.docs-search-wrap {
  padding: 0 16px 8px;
  position: sticky;
  top: 48px;
  background: var(--color-surface);
  z-index: 4;
}
.docs-search-wrap .search-count {
  display: block;
  margin-top: 4px;
  padding: 0 2px;
}
.docs-search-wrap .search-count:empty {
  display: none;
}

.docs-list {
  list-style: none;
  padding: 0 0 16px;
}

.doc-item {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(128,128,128,0.08);
  cursor: pointer;
  transition: background 0.15s;
}
.doc-item:hover {
  background: var(--color-hover);
}

.doc-item__short {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-on-surface);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-item__short-collapsed {
  display: none;
}

.doc-item__full {
  font-size: 12px;
  color: var(--color-on-surface-secondary);
  line-height: 1.4;
  margin-top: 6px;
  display: none;
}

.doc-item--expanded .doc-item__full {
  display: block;
}

.doc-item--active,
.doc-item--active:hover {
  background: var(--color-bg);
  box-shadow: inset -3px 0 0 var(--color-primary);
}
.doc-item--active .doc-item__short {
  color: var(--color-primary);
  font-weight: 700;
}

.doc-item__open-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 12px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.doc-item__open-btn:hover {
  opacity: 0.9;
}
[data-theme="dark"] .doc-item__open-btn {
  color: #000;
}


/* === Doc Sections (Right Sidebar — Новые документы / Обязанности) === */
.doc-sections {
  list-style: none;
  padding: 4px 0;
  border-bottom: 1px solid var(--color-border);
}

.doc-section-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  min-height: 51px;
  box-sizing: border-box;
  cursor: pointer;
  border-bottom: 1px solid rgba(128,128,128,0.08);
  transition: background 0.15s;
}
.doc-section-item:last-child {
  border-bottom: none;
}
.doc-section-item:hover {
  background: var(--color-hover);
}

.doc-section-item--active,
.doc-section-item--active:hover {
  background: var(--color-bg);
  box-shadow: inset -3px 0 0 var(--color-primary);
}

.doc-section-item__icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-on-surface-secondary);
}
.doc-section-item__icon svg {
  width: 100%;
  height: 100%;
}
.doc-section-item--active .doc-section-item__icon {
  color: var(--color-primary);
}

.doc-section-item__info {
  flex: 1;
  min-width: 0;
}

.doc-section-item__title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-on-surface);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.doc-section-item__subtitle {
  font-size: 11px;
  color: var(--color-on-surface-secondary);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.doc-section-item--active .doc-section-item__title {
  color: var(--color-primary);
}

