/* ── Folder tree & documents layout ──────────────────────────────────────────── */

/* Two-panel layout container */
.ws-docs-layout {
  display: flex;
  height: 100%;
  overflow: hidden;
}

/* Left: folder tree */
.ws-folder-tree {
  width: 240px;
  flex-shrink: 0;
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: var(--surface-canvas);
}

/* Right: document main area */
.ws-docs-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* Section headings in tree */
.ws-folder-tree__section {
  padding: 0.75rem 0.75rem 0.25rem;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

/* Individual folder row */
.ws-folder-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  margin: 1px 4px;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-secondary);
  position: relative;
  user-select: none;
  transition: background 0.1s;
}

.ws-folder-item:hover {
  background: var(--surface-recessed);
  color: var(--brand-navy);
}

.ws-folder-item.is-active {
  background: var(--brand-navy);
  color: var(--surface-canvas);
}

.ws-folder-item.is-active .ws-folder-menu {
  color: rgba(243, 250, 255, 0.65);
}

.ws-folder-item.is-active .ws-folder-menu:hover {
  color: rgba(243, 250, 255, 1);
}

/* Folder icon */
.ws-folder-icon {
  font-size: 0.875rem;
  flex-shrink: 0;
  line-height: 1;
}

/* Folder name */
.ws-folder-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Contextual more-options button */
.ws-folder-menu {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
  font-size: 1rem;
  opacity: 0;
  transition: opacity 0.1s;
  flex-shrink: 0;
  line-height: 1;
}

.ws-folder-item:hover .ws-folder-menu {
  opacity: 1;
}

/* Indentation levels */
.ws-folder-item--indent-1 { padding-left: 1.5rem; }
.ws-folder-item--indent-2 { padding-left: 2.25rem; }

/* New folder button */
.ws-folder-add-btn {
  margin: 0.5rem 0.75rem 0.75rem;
  padding: 0.5rem;
  background: none;
  border: 1px dashed var(--border-strong);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.8125rem;
  cursor: pointer;
  text-align: center;
  font-family: var(--font-sans);
  transition: border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}

.ws-folder-add-btn:hover {
  border-color: var(--brand-navy);
  color: var(--brand-navy);
}

/* Separator */
.ws-folder-separator {
  height: 1px;
  background: var(--surface-recessed);
  margin: 0.375rem 0.75rem;
  flex-shrink: 0;
}

/* Documents toolbar */
.ws-docs-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface-elevated);
  flex-shrink: 0;
}

/* Breadcrumb */
.ws-docs-breadcrumb {
  font-size: 0.875rem;
  color: var(--text-muted);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-docs-breadcrumb span {
  color: var(--brand-navy);
  font-weight: 600;
}

/* Mobile: hide folder tree unless toggled open */
@media (max-width: 768px) {
  .ws-folder-tree {
    display: none;
  }

  .ws-folder-tree.is-open {
    display: flex;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 300;
    width: 260px;
    box-shadow: 2px 0 16px rgba(10, 37, 54, 0.12);
    background: var(--surface-canvas);
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Documents revamp (dxv) — library rail + stats band + table/grid
═══════════════════════════════════════════════════════════════════════════ */

.dxv {
  display: flex;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: var(--surface-canvas);
}

/* ── Library rail ── */
.dxv-rail {
  width: 264px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, var(--surface-elevated) 0%, rgba(51, 86, 109, 0.04) 100%);
}
.dxv-rail__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0.875rem 0.625rem;
  flex-shrink: 0;
}
.dxv-rail__title {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--text-muted);
}
.dxv-rail__scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  /* Room for the fixed FAB speed-dial that floats over the rail's bottom */
  padding-bottom: 6rem;
}
.dxv-rail__count {
  flex-shrink: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(10, 37, 54, 0.06);
  border-radius: 999px;
  padding: 0.0625rem 0.4375rem;
  font-variant-numeric: tabular-nums;
}
.ws-folder-item.is-active .dxv-rail__count {
  color: var(--surface-recessed);
  background: rgba(243, 250, 255, 0.16);
}
.dxv-rail__empty {
  padding: 0.25rem 0.875rem 0.375rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
}

/* Active rail item: mint indicator bar */
.dxv .ws-folder-item.is-active {
  position: relative;
}
.dxv .ws-folder-item.is-active::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 3px;
  background: var(--surface-recessed);
}

/* ── Main pane ── */
.dxv-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
}

.dxv-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.375rem 1.75rem 0;
  flex-shrink: 0;
}
.dxv-head__titles { display: flex; align-items: flex-start; gap: 0.625rem; }
.dxv-head__title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
  color: var(--brand-navy);
  margin: 0;
}
.dxv-head__sub {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 0.125rem 0 0;
}
.dxv-head__actions { display: flex; align-items: center; gap: 0.625rem; flex-shrink: 0; }

.dxv-rail-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--brand-navy);
  padding: 0.375rem 0.5rem;
  cursor: pointer;
}

/* View toggle (list / grid) */
.dxv-toggle {
  display: inline-flex;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 2px;
  background: var(--surface-elevated);
}
.dxv-toggle__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 24px;
  border: none;
  background: none;
  border-radius: 999px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.dxv-toggle__btn.is-active {
  background: var(--brand-navy);
  color: var(--surface-recessed);
}

/* ── Stats band ── */
.dxv-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 1.125rem 1.75rem 0;
  flex-shrink: 0;
}
.dxv-stat {
  position: relative;
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem 0.8125rem;
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.dxv-stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--surface-recessed) 0%, rgba(224, 234, 240, 0) 70%);
}
.dxv-stat:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.dxv-stat__top {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-bottom: 0.375rem;
}
.dxv-stat__icon { color: var(--brand-gold); display: inline-flex; }
.dxv-stat__label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-muted);
}
.dxv-stat__value {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: var(--tracking-snug);
  color: var(--brand-navy);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

/* ── Toolbar ── */
.dxv-toolbar {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 1rem 1.75rem 0.875rem;
  flex-shrink: 0;
}
.dxv-search {
  position: relative;
  flex: 1;
  min-width: 160px;
}
.dxv-search__icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  display: inline-flex;
  pointer-events: none;
}
.dxv-search input {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--text-primary);
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 0.5rem 1rem 0.5rem 2.25rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.dxv-search input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(51, 86, 109, 0.14);
}
.dxv-type-filter {
  width: 130px;
  font-size: 0.8125rem;
  border-radius: 999px !important;
}

/* ── Content area ── */
.dxv-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 1.75rem 1.75rem;
}
.dxv-content__head {
  display: flex;
  align-items: baseline;
  gap: 0.625rem;
  margin: 0.25rem 0 0.875rem;
}
.dxv-content__title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--brand-navy);
  margin: 0;
  letter-spacing: var(--tracking-snug);
}
.dxv-content__count {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* Matter groups (All documents) */
.dxv-group {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--surface-elevated);
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.dxv-group__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6875rem 0.875rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  text-align: left;
}
.dxv-group__head:hover { background: rgba(51, 86, 109, 0.05); }
.dxv-group__chev {
  display: inline-flex;
  color: var(--text-muted);
  transform: rotate(90deg);
  transition: transform var(--transition-fast);
}
.dxv-group.is-collapsed .dxv-group__chev { transform: rotate(0deg); }
.dxv-group__title {
  flex: 1;
  min-width: 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--brand-navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dxv-group__count {
  flex-shrink: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--surface-recessed);
  border-radius: 999px;
  padding: 0.125rem 0.5625rem;
  font-variant-numeric: tabular-nums;
}
.dxv-group__body { padding: 0 0.875rem 0.75rem; }
.dxv-group.is-collapsed .dxv-group__body { display: none; }
.dxv-group__empty {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0.375rem 0.125rem 0.25rem;
}

/* ── Table (list view) ── */
.dxv-table { width: 100%; }
.dxv-table__head,
.dxv-table__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px 84px 96px 40px;
  gap: 0.75rem;
  align-items: center;
}
.dxv-table__head--matter,
.dxv-table__row--matter {
  grid-template-columns: minmax(0, 1fr) minmax(110px, 190px) 70px 84px 96px 40px;
}
.dxv-table__head {
  padding: 0.375rem 0.75rem;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}
.dxv-table__row {
  padding: 0.5625rem 0.75rem;
  border-bottom: 1px solid rgba(10, 37, 54, 0.05);
  border-left: 2px solid transparent;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.dxv-table__row:hover {
  background: rgba(51, 86, 109, 0.06);
  border-left-color: var(--brand-gold);
}
.dxv-table__row:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: -2px;
  border-radius: var(--radius-sm);
}
.dxv-cell { min-width: 0; font-size: 0.8125rem; color: var(--text-primary); }
.dxv-cell--dim { color: var(--text-secondary); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.dxv-cell--name { display: flex; align-items: center; gap: 0.625rem; }
.dxv-cell__icon { flex-shrink: 0; display: inline-flex; }
.dxv-cell__fname {
  font-weight: 600;
  color: var(--brand-navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dxv-cell--actions { display: flex; justify-content: flex-end; }

.dxv-badge {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  background: var(--surface-recessed);
  border-radius: 4px;
  padding: 0.1875rem 0.375rem;
}
.dxv-chip {
  display: inline-block;
  max-width: 100%;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 0.125rem 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.dxv-iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.dxv-iconbtn:hover {
  background: var(--brand-navy);
  color: var(--surface-recessed);
}

/* ── Grid view ── */
.dxv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
  gap: 0.75rem;
  margin-top: 0.25rem;
}
.dxv-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}
.dxv-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.dxv-card:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.dxv-card__icon { display: flex; justify-content: center; padding: 0.375rem 0; }
.dxv-card__name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand-navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}
.dxv-card__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.6875rem;
  color: var(--text-secondary);
}
.dxv-card__matter { display: flex; justify-content: center; min-width: 0; }
.dxv-card__dl {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.dxv-card:hover .dxv-card__dl { opacity: 1; }
.dxv-card__menu {
  position: absolute;
  top: 0.5rem;
  right: 2.375rem;
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.dxv-card:hover .dxv-card__menu,
.dxv-card:focus-within .dxv-card__menu { opacity: 1; }

/* ── Empty state ── */
.dxv-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
  padding: 3.5rem 2rem;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: rgba(51, 86, 109, 0.04);
}
.dxv-empty__icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-navy);
  background: var(--surface-recessed);
  margin-bottom: 0.25rem;
}
.dxv-empty__title {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--brand-navy);
}
.dxv-empty__sub {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  max-width: 400px;
  line-height: 1.55;
  margin: 0 0 0.625rem;
}

/* ── Drag & drop overlay ── */
.dxv.is-dragover .dxv-main::after {
  content: 'Drop files to upload';
  position: absolute;
  inset: 0.625rem;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--brand-navy);
  background: rgba(224, 234, 240, 0.9);
  border: 2px dashed var(--brand-gold);
  border-radius: var(--radius-lg);
  pointer-events: none;
}

/* ── Uploading indicator ── */
.dxv-uploading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
  padding: 3.5rem 1rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
.dxv-uploading__bar {
  width: 220px;
  height: 4px;
  border-radius: 999px;
  background: var(--surface-recessed);
  overflow: hidden;
}
.dxv-uploading__bar span {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: 999px;
  background: var(--brand-gold);
  animation: dxv-indeterminate 1.1s ease-in-out infinite;
}
@keyframes dxv-indeterminate {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* ── Skeletons ── */
.dxv-skel {
  position: relative;
  overflow: hidden;
  background: rgba(10, 37, 54, 0.06);
  border-radius: var(--radius-sm);
}
.dxv-skel::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(243, 250, 255, 0.7), transparent);
  animation: dxv-shimmer 1.4s infinite;
}
@keyframes dxv-shimmer {
  100% { transform: translateX(100%); }
}
.dxv-skel--rail  { height: 30px; margin: 0.375rem 0.875rem; }
.dxv-skel--row   { height: 44px; margin-bottom: 0.5rem; }
.dxv-skel--num   { height: 22px; width: 56px; margin-bottom: 0.5rem; }
.dxv-skel--label { height: 10px; width: 90px; }

/* ── Context menu ── */
.dxv-ctx-menu {
  position: fixed;
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 500;
  min-width: 160px;
  overflow: hidden;
}

.dxv-error {
  color: var(--status-danger);
  font-size: 0.875rem;
  padding: 1rem 0;
}

/* ── Vault browsing: breadcrumbs ── */
.dxv-crumbs {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin: 0.25rem 0 0.875rem;
}
.dxv-crumbs__trail {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.dxv-crumb {
  border: none;
  background: none;
  padding: 0.125rem 0.3125rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: var(--tracking-snug);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
}
button.dxv-crumb { cursor: pointer; }
button.dxv-crumb:hover { background: rgba(51, 86, 109, 0.08); color: var(--brand-navy); }
.dxv-crumb.is-current { color: var(--brand-navy); font-weight: 800; }
.dxv-crumbs__trail > .dxv-crumb:first-child:last-child { color: var(--brand-navy); font-weight: 800; }
.dxv-crumb__sep { color: var(--text-muted); font-size: 0.875rem; }

/* ── Vault browsing: folder tiles (grid mode) ── */
.dxv-folders {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.625rem;
  margin-bottom: 1rem;
}
.dxv-folder-tile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}
.dxv-folder-tile:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.dxv-folder-tile:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.dxv-folder-tile__icon { color: var(--brand-gold); display: inline-flex; flex-shrink: 0; }
.dxv-folder-tile__name {
  flex: 1;
  min-width: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand-navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dxv-folder-tile .ws-folder-menu { opacity: 0; }
.dxv-folder-tile:hover .ws-folder-menu,
.dxv-folder-tile:focus-within .ws-folder-menu { opacity: 1; }

/* ── Vault browsing: folder rows (list mode) ── */
.dxv-folder-list { margin-bottom: 1rem; }
.dxv-folder-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5625rem 0.75rem;
  border-bottom: 1px solid rgba(10, 37, 54, 0.05);
  border-left: 2px solid transparent;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.dxv-folder-row:hover {
  background: rgba(51, 86, 109, 0.06);
  border-left-color: var(--brand-gold);
}
.dxv-folder-row:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: -2px;
  border-radius: var(--radius-sm);
}
.dxv-folder-row__icon { color: var(--brand-gold); display: inline-flex; flex-shrink: 0; }
.dxv-folder-row__name {
  flex: 1;
  min-width: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand-navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dxv-folder-row .ws-folder-menu { opacity: 0; }
.dxv-folder-row:hover .ws-folder-menu,
.dxv-folder-row:focus-within .ws-folder-menu { opacity: 1; }

/* ── Folder drag & drop (move to matter) ── */
.ws-folder-item.is-dragging,
.dxv-folder-tile.is-dragging,
.dxv-folder-row.is-dragging { opacity: 0.45; }
.ws-folder-item.is-drop-target {
  outline: 2px dashed var(--brand-gold);
  outline-offset: -2px;
  background: var(--brand-gold-soft);
  color: var(--brand-navy);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .dxv-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dxv-table__head--matter,
  .dxv-table__row--matter { grid-template-columns: minmax(0, 1fr) 70px 84px 96px 40px; }
  .dxv-cell--matter { display: none; }
}
@media (max-width: 768px) {
  .dxv-rail {
    display: none;
  }
  .dxv-rail.is-open {
    display: flex;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 300;
    width: 272px;
    box-shadow: 2px 0 16px rgba(10, 37, 54, 0.12);
  }
  .dxv-rail-toggle { display: inline-flex; }
  .dxv-head, .dxv-stats, .dxv-toolbar { padding-left: 1rem; padding-right: 1rem; }
  .dxv-content { padding: 0 1rem 1rem; }
  .dxv-table__head { display: none; }
  .dxv-table__row,
  .dxv-table__row--matter { grid-template-columns: minmax(0, 1fr) 40px; }
  .dxv-table__row .dxv-cell--dim,
  .dxv-table__row .dxv-cell--type { display: none; }
}
