/* ===== v2 visual polish ===== */

/* Compact filters bar */
.filters-bar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 0 0 12px; padding: 10px 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
}
.filters-bar .filter-item { margin: 0; }
.filters-bar .filter-item > span { display: none; }
.filters-bar .c-select-btn-label {
  display: block !important;
  color: var(--text);
  opacity: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.filters-bar .c-select-btn {
  color: var(--text);
  background: var(--input);
  border: 1px solid var(--line-strong);
  width: 100%;
}
.filters-bar .c-select-list button { color: var(--text); }
.filters-extra .c-select-btn-label { display: block !important; color: var(--text); }

.filters-bar select, .filters-bar .c-select { min-width: 120px; max-width: 180px; }
.filters-bar .switch-field { margin: 0; height: auto; }
.filters-more-btn {
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 10px; padding: 8px 12px; font: inherit; font-size: 13px; font-weight: 650;
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
}
.filters-more-btn:hover { background: var(--hover); }
.filters-more-btn .n {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 11px;
  display: none; align-items: center; justify-content: center;
}
.filters-more-btn.has-active .n { display: inline-flex; }
.filters.extra {
  display: none; margin: -4px 0 12px; padding: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
}
.filters.extra.open { display: flex; }

.dash-chips {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; align-items: center;
}
.dash-chip {
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 650;
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  transition: background .15s, border-color .15s, color .15s;
}
.dash-chip:hover { background: var(--hover); }
.dash-chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-2); }
.dash-chip .n {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center;
}
.dash-chip.on .n { background: var(--accent); color: #fff; }
.dash-chip.is-over .n { background: var(--danger-soft); color: var(--danger); }
.dash-chip.is-over.on .n { background: var(--danger); color: #fff; }
.dash-chip.is-today .n { background: var(--warn-soft); color: var(--warn-text); }
.dash-chip.is-today.on .n { background: var(--warn-text); color: #fff; }
.view-group-toggle {
  margin-left: auto; border: 1px solid var(--line); background: var(--card); color: var(--muted);
  border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 12px; font-weight: 650; cursor: pointer;
}
.view-group-toggle.on { color: var(--accent-2); border-color: var(--accent); background: var(--accent-soft); }

.quick-add {
  display: flex; gap: 8px; align-items: center; margin: 0 0 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px;
  box-shadow: var(--shadow);
}
.quick-add i { color: var(--muted); margin-left: 4px; }
.quick-add input {
  flex: 1; border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px;
  color: var(--text); min-width: 0; padding: 6px 4px;
}
.quick-add .btn { flex-shrink: 0; }
.quick-add-hint { color: var(--muted); font-size: 11px; margin: -6px 0 12px 4px; }

/* List hierarchy */
.task-name {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.35; max-width: 42vw;
}
.pri-dot {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 8px; vertical-align: middle;
  background: #94a3b8; flex-shrink: 0;
}
.pri-dot.pr-high { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.pri-dot.pr-medium { background: #f59e0b; }
.pri-dot.pr-low { background: #94a3b8; }
.task-meta .chip.pr-low,
.task-meta .chip.pr-medium,
.task-meta .chip.pr-high { display: none; } /* desktop: dot only */
.chip.dl-today { background: var(--warn-soft); color: var(--warn-text); font-weight: 700; }
.chip.dl-rel { letter-spacing: 0; }

tr.task-row td { padding: 12px 12px; }
tr.task-row:hover { background: var(--hover); }
.table-card thead th {
  position: sticky; top: 0; z-index: 3;
  background: color-mix(in srgb, var(--surface) 92%, var(--card));
  backdrop-filter: blur(6px);
  box-shadow: 0 1px 0 var(--line);
}

.group-head td {
  padding: 10px 12px 6px !important; border-bottom: 0 !important;
  background: transparent !important; cursor: default;
}
.group-head .group-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); padding: 4px 0;
}
.group-head .group-label .n {
  background: var(--surface-2); color: var(--muted); border-radius: 999px;
  min-width: 20px; height: 18px; padding: 0 6px; font-size: 11px;
  display: inline-flex; align-items: center; justify-content: center;
}
.group-head.is-over .group-label { color: var(--danger); }
.group-head.is-today .group-label { color: var(--warn-text); }
.group-head.is-soon .group-label { color: var(--accent-2); }

.row-actions {
  display: none; gap: 4px; margin-top: 6px; flex-wrap: wrap; align-items: center;
}
.row-act {
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  border-radius: 8px; padding: 3px 8px; font: inherit; font-size: 11px; font-weight: 650;
  cursor: pointer; line-height: 1.4;
}
.row-act:hover { color: var(--text); border-color: var(--line-strong); background: var(--card); }
.row-menu {
  position: absolute; z-index: 40; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow); padding: 6px; min-width: 180px;
  display: flex; flex-direction: column; gap: 2px;
}
.row-menu button {
  border: 0; background: transparent; text-align: left; padding: 7px 10px; border-radius: 8px;
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text);
}
.row-menu button:hover { background: var(--hover); }
.row-menu .sep { height: 1px; background: var(--line); margin: 4px 0; }

/* Empty / loading */
.empty {
  text-align: center; color: var(--muted); padding: 48px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 600;
}
.empty i { font-size: 28px; opacity: .55; color: var(--accent); }
.empty .empty-sub { font-weight: 500; font-size: 13px; max-width: 280px; line-height: 1.4; }
.skel {
  background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2));
  background-size: 200% 100%; animation: skel 1.1s ease infinite; border-radius: 8px; height: 14px;
}
@keyframes skel { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* Project detail */
.proj-stats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.proj-stats .chip { font-size: 11px; }
.proj-tg { color: var(--accent); font-size: 12px; text-decoration: none; font-weight: 650; }
.proj-tg:hover { text-decoration: underline; }
.proj-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
tr.proj-row { cursor: pointer; }
tr.proj-row:hover { background: var(--hover); }
tr.proj-row.is-open { background: var(--accent-soft); }
#project_detail {
  display: none; margin-top: 14px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow); overflow: hidden;
}
#project_detail.open { display: block; }
.proj-detail-head {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--line); background: var(--surface);
}
.proj-detail-head h3 { font-size: 18px; font-weight: 750; margin: 0 0 6px; }
.proj-detail-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.proj-detail-body { padding: 14px 18px 18px; display: grid; gap: 16px; }
@media (min-width: 961px) {
  .proj-detail-body { grid-template-columns: 1.4fr 1fr; align-items: start; }
}
.proj-panel h4 {
  font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
  margin: 0 0 10px; font-weight: 800;
}
.proj-task {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 0;
  border-bottom: 1px solid var(--line); cursor: pointer;
}
.proj-task:last-child { border-bottom: 0; }
.proj-task:hover { background: var(--hover); margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 8px; }
.proj-task .t { font-weight: 650; flex: 1; min-width: 0; }
.proj-task .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

/* ===== Task slider / card ===== */
.slider {
  /* reinforce over base */
}
.slider-head { padding: 14px 18px 10px !important; gap: 10px !important; align-items: flex-start !important; }
.slider-head-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.slider-kicker {
  display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-weight: 650;
}
.slider-title-input {
  width: 100%; border: 0; outline: 0; background: transparent; font: inherit;
  font-size: 20px; font-weight: 750; color: var(--text); line-height: 1.3; padding: 0;
  border-radius: 0; white-space: normal;
}
.slider-head-actions { position: sticky; top: 0; z-index: 6; }
.slider-title-input:focus { box-shadow: none; }
.slider-title-input::placeholder { color: var(--muted); font-weight: 600; }
#slider_title_view { display: none !important; } /* use input as header title */
/* Wider task card on desktop */
.slider {
  width: min(860px, 100%) !important;
  right: -900px;
}
.slider.open { right: 0; }

.slider-meta {
  display: flex; flex-direction: column; gap: 10px;
}
.slider-meta .meta-block {
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.slider-meta .meta-label {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
}
.slider-meta .meta-status { width: 100%; }
.slider-meta .meta-row-2 {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(168px, 0.9fr); gap: 10px; align-items: end;
}
.slider-meta .pipe {
  margin: 0; display: flex; width: 100%; gap: 0;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; overflow: hidden;
}
.slider-meta .pipe button {
  flex: 1 1 0; min-width: 0; padding: 8px 6px; font-size: 13px; font-weight: 650;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border: 0; border-radius: 8px; background: transparent; color: var(--muted); line-height: 1.2;
}
.slider-meta .pipe button.on {
  background: var(--card); color: var(--accent-2); box-shadow: 0 1px 2px rgba(15,23,42,.08);
  border: 0; font-weight: 750;
}
html[data-theme="dark"] .slider-meta .pipe button.on,
html.dark .slider-meta .pipe button.on {
  background: var(--surface); color: var(--accent-2);
  box-shadow: 0 0 0 1px var(--line-strong);
}
.slider-meta .c-select, .slider-meta select, .slider-meta input {
  width: 100% !important; max-width: 100% !important; min-width: 0 !important;
}
.slider-meta .c-select-btn {
  width: 100%; color: var(--text); background: var(--input);
}
.slider-meta .c-select-btn-label {
  display: block !important; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.slider-meta .meta-deadline input[type=date],
.slider-meta .meta-deadline input[type=datetime-local] {
  min-height: 38px; color: var(--text); background: var(--input);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 0 10px; width: 100%;
  color-scheme: light;
}
html[data-theme="dark"] .slider-meta .meta-deadline input,
html.dark .slider-meta .meta-deadline input { color-scheme: dark; }
.slider-tabs { padding: 0 12px !important; background: var(--card); position: sticky; top: 0; z-index: 5; }
.slider-body { padding: 14px 18px calc(28px + var(--safe-b)) !important; }
#pane_edit .desc-block .form-group { margin-bottom: 0; }
#pane_edit .desc-block label { display: none; }
#task_desc_ed .bx-area {
  min-height: 220px !important; font-size: 15px; line-height: 1.55;
  background: var(--surface); border-radius: 12px;
}
.details-fold {
  margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: var(--surface);
}
.details-fold summary {
  cursor: pointer; list-style: none; padding: 12px 14px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.details-fold summary::-webkit-details-marker { display: none; }
.details-fold summary::after { content: "▾"; color: var(--muted); }
.details-fold[open] summary::after { content: "▴"; }
.details-fold .fold-body { padding: 0 14px 14px; }
.slider-foot {
  display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; position: sticky; bottom: 0;
  padding-top: 10px; background: linear-gradient(transparent, var(--card) 30%);
}
#pane_time .hint { margin-top: 0; }

@media (max-width: 960px) {
  .filters-bar { padding: 8px; gap: 6px; }
  .filters-bar .filter-item { flex: 1 1 calc(50% - 6px); }
  .filters-bar select, .filters-bar .c-select { width: 100% !important; max-width: none !important; min-width: 0 !important; }
  .dash-chips { margin-bottom: 10px; gap: 6px; }
  .dash-chip { padding: 5px 10px; font-size: 12px; }
  .view-group-toggle { margin-left: 0; width: 100%; justify-content: center; display: inline-flex; }
  .quick-add { margin-bottom: 10px; }
  .quick-add-hint { display: none; }
  .task-name { max-width: none; }
  .task-meta .chip.pr-low,
  .task-meta .chip.pr-medium,
  .task-meta .chip.pr-high { display: none; }
  .table-card tr.task-row td[data-label="Постановщик"],
  .table-card tr.task-row td[data-label="Поставлена"],
  .table-card tr.task-row td[data-label="Время"] { display: none; }
  .table-card tr.task-row {
    grid-template-columns: 28px 1fr auto;
    gap: 6px 10px; padding: 10px 12px;
  }
  .table-card tr.task-row td:nth-child(1) { grid-row: 1 / span 4; }
  .table-card tr.task-row td[data-label="Проект"],
  .table-card tr.task-row td[data-label="Статус"],
  .table-card tr.task-row td[data-label="Срок"] {
    grid-column: 2 / span 2;
  }
  .table-card tr.task-row td[data-label="Проект"]::before,
  .table-card tr.task-row td[data-label="Статус"]::before,
  .table-card tr.task-row td[data-label="Срок"]::before { display: none; }
  .table-card tr.group-head {
    display: block; padding: 8px 4px 2px; border: 0;
  }
  .table-card tr.group-head td { display: block; padding: 0 !important; }

  /* Full-screen sheet */
  .slider {
    width: 100% !important; right: -105%;
    border-radius: 16px 16px 0 0;
    top: 6vh !important; height: 94vh !important;
    padding-top: 0 !important;
  }
  .slider.open { right: 0; }
  .slider::before {
    content: ""; display: block; width: 42px; height: 4px; border-radius: 999px;
    background: var(--line-strong); margin: 8px auto 0;
  }
  .slider-title-input { font-size: 17px; }
  .slider-head { padding-right: 12px !important; }
  .slider-head-actions { align-self: flex-start; }
  .slider-meta .meta-row-2 { grid-template-columns: 1fr; }
  .slider-meta .pipe button { font-size: 12px; padding: 8px 4px; }
  #task_desc_ed .bx-area { min-height: 160px !important; }
  .proj-detail-body { grid-template-columns: 1fr; }
}

html[data-theme="dark"] .table-card thead th,
html.dark .table-card thead th {
  background: color-mix(in srgb, var(--surface) 88%, var(--card));
}
html[data-theme="dark"] .quick-add,
html.dark .quick-add { box-shadow: none; }
html[data-theme="dark"] .slider::before,
html.dark .slider::before { background: var(--line-strong); }

/* Project searchable combobox */
.c-select-list button.hi,
.c-select-list button.hi:hover {
  background: var(--accent-soft);
  color: var(--accent-2);
  outline: 1px solid var(--accent);
}
.c-select-list button.c-select-create {
  border-top: 1px solid var(--line);
  margin-top: 4px;
  color: var(--accent-2);
  font-weight: 700;
}
.c-select-list button.c-select-create b { font-weight: 800; color: var(--text); }
.c-select-creatable .c-select-list {
  min-width: min(360px, calc(100vw - 24px));
  max-width: min(420px, calc(100vw - 24px));
}
.slider-meta .c-select-creatable .c-select-list {
  width: max(100%, 280px);
}
html[data-theme="dark"] .c-select-list button.c-select-create,
html.dark .c-select-list button.c-select-create { color: var(--accent-2); }
html[data-theme="dark"] .c-select-list button.c-select-create b,
html.dark .c-select-list button.c-select-create b { color: var(--text); }

/* ---- Row badges + popovers (v3) ---- */
.row-actions { display: none !important; }
.badge-btn {
  border: 0; background: none; padding: 0; margin: 0; font: inherit; cursor: pointer;
  border-radius: 8px; display: inline-flex; max-width: 100%;
}
.badge-btn .chip { transition: box-shadow .12s, filter .12s; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }
.badge-btn:hover .chip, .badge-btn.pop-open .chip, .badge-btn:focus-visible .chip {
  box-shadow: 0 0 0 1px var(--line-strong); filter: brightness(1.06);
}
.badge-btn .chip::after { content: ""; }
.row-tools { white-space: nowrap; text-align: right; width: 1%; }
.row-tools .edit-task { vertical-align: middle; }
.row-more {
  width: 30px; height: 30px; border: 1px solid transparent; background: transparent; color: var(--muted);
  border-radius: 8px; cursor: pointer; margin-right: 4px; vertical-align: middle; font-size: 14px;
  opacity: .55; transition: opacity .12s, background .12s;
}
tr.task-row:hover .row-more, .row-more.pop-open, .row-more:focus-visible { opacity: 1; }
.row-more:hover, .row-more.pop-open { background: var(--surface-2); border-color: var(--line); color: var(--text); }
tr.task-row td { height: 64px; }

.row-pop {
  position: fixed; z-index: 1500; min-width: 200px; max-width: min(320px, calc(100vw - 16px));
  background: var(--card); color: var(--text); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 16px 40px rgba(15,23,42,.18); padding: 6px;
  display: flex; flex-direction: column; gap: 1px;
  max-height: min(420px, calc(100vh - 16px)); overflow: auto;
}
html[data-theme="dark"] .row-pop, html.dark .row-pop { box-shadow: 0 16px 40px rgba(0,0,0,.5); border-color: var(--line-strong); }
.row-pop .pop-title {
  font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); padding: 6px 10px 4px;
}
.row-pop button {
  border: 0; background: transparent; color: var(--text); font: inherit; font-size: 13px; font-weight: 600;
  text-align: left; padding: 8px 10px; border-radius: 8px; cursor: pointer;
  display: flex; align-items: center; gap: 8px; justify-content: flex-start;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row-pop button i { width: 16px; color: var(--muted); text-align: center; }
.row-pop button:hover, .row-pop button.hi { background: var(--accent-soft); color: var(--accent-2); }
.row-pop button.cur { font-weight: 750; }
.row-pop button.cur .fa-check { margin-left: auto; color: var(--accent); }
.row-pop .sep { height: 1px; background: var(--line); margin: 4px 2px; }
.row-pop .pop-date { display: flex; align-items: center; gap: 8px; padding: 6px 10px; font-size: 13px; color: var(--muted); }
.row-pop .pop-date input { flex: 1; min-width: 0; height: 32px; color-scheme: light; }
html[data-theme="dark"] .row-pop .pop-date input, html.dark .row-pop .pop-date input { color-scheme: dark; }
.row-pop.proj-pop { width: 300px; }
.row-pop .pp-search { margin: 2px 2px 6px; height: 34px; width: calc(100% - 4px); }
.row-pop .pp-list { display: flex; flex-direction: column; gap: 1px; overflow: auto; max-height: 300px; }
.row-pop .pp-create { color: var(--accent-2); font-weight: 700; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; }
.row-pop .pp-create b { color: var(--text); }
.c-select-list button.c-select-create-new { color: var(--accent-2); font-weight: 700; border-top: 1px solid var(--line); margin-top: 4px; }

@media (max-width: 960px) {
  tr.task-row td { height: auto; }
  .row-more { opacity: 1; width: 34px; height: 34px; }
  .table-card tr.task-row td.row-tools { grid-column: 3; grid-row: 1; display: flex; gap: 4px; align-items: flex-start; }
  /* compact mobile card: title on line 1, project · status · deadline on line 2 */
  .table-card tr.task-row { grid-template-columns: 28px minmax(56px, max-content) max-content minmax(0, 1fr) !important; gap: 6px 8px !important; position: relative; }
  .table-card tr.task-row td { padding: 0 !important; min-width: 0; }
  .table-card tr.task-row td:nth-child(1) { grid-row: 1 / span 2 !important; grid-column: 1 !important; }
  .table-card tr.task-row td:nth-child(2) { grid-column: 2 / -1 !important; grid-row: 1 !important; padding-right: 84px !important; }
  .table-card tr.task-row td[data-label="Проект"] { grid-column: 2 !important; grid-row: 2 !important; }
  .table-card tr.task-row td[data-label="Статус"] { grid-column: 3 !important; grid-row: 2 !important; }
  .table-card tr.task-row td[data-label="Срок"] { grid-column: 4 !important; grid-row: 2 !important; justify-self: start; max-width: 100%; }
  .table-card tr.task-row td.row-tools { position: absolute; top: 10px; right: 12px; width: auto !important; }
  .table-card tr.task-row .badge-btn .chip { max-width: 100%; }
  .row-pop.sheet {
    left: 8px !important; right: 8px !important; top: auto !important; bottom: 8px !important;
    width: auto !important; min-width: 0; max-width: none; max-height: 70vh; border-radius: 16px; padding: 8px;
  }
  .row-pop button { padding: 10px 12px; font-size: 14px; }
}

/* ===================== Task card v4: single view ===================== */
#taskSlider.cv { width: min(820px, 100%) !important; }
#taskSlider.cv .slider-head { padding: 14px 18px 12px !important; border-bottom: 1px solid var(--line); }
#taskSlider.cv .slider-head-main { gap: 4px; }
#taskSlider.cv .slider-kicker { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
#taskSlider.cv .slider-title-input { font-size: 19px; font-weight: 700; height: auto; min-height: 0; border: 0 !important; box-shadow: none !important; background: transparent !important; padding: 2px 0 !important; }
#taskSlider.cv #copy_task_link, #taskSlider.cv #close_slider { width: 32px; height: 32px; }
#taskSlider.cv .slider-body { padding: 14px 18px 0 !important; }
.cv-body { display: flex; flex-direction: column; gap: 16px; }

.cv-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 4px; line-height: 1.2;
}
.cv-label-note { text-transform: none; letter-spacing: 0; font-weight: 600; opacity: .85; }
.cv-count:empty { display: none; }
.cv-count {
  display: inline-flex; min-width: 18px; height: 16px; padding: 0 5px; border-radius: 999px;
  background: var(--surface-2); color: var(--text); font-size: 10.5px; letter-spacing: 0;
  align-items: center; justify-content: center; border: 1px solid var(--line);
}

/* status: compact segmented control */
.cv-status .pipe {
  margin: 0; display: inline-flex; width: auto; max-width: 100%; gap: 0;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 2px;
}
.cv-status .pipe button {
  flex: 0 1 auto; min-width: 92px; padding: 6px 14px; font-size: 12.5px; font-weight: 650; line-height: 1.2;
  border: 0; border-radius: 7px; background: transparent; color: var(--muted); white-space: nowrap; cursor: pointer;
}
.cv-status .pipe button:hover { color: var(--text); }
.cv-status .pipe button.on { background: var(--card); color: var(--accent-2); font-weight: 700; box-shadow: 0 1px 2px rgba(15,23,42,.1); }
html[data-theme="dark"] .cv-status .pipe button.on { background: var(--surface); box-shadow: 0 0 0 1px var(--line-strong); }
.cv-status .pipe button[data-st="completed"].on { color: #16a34a; }
html[data-theme="dark"] .cv-status .pipe button[data-st="completed"].on { color: #4ade80; }

/* field grid */
.cv-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 12px; }
.cv-f { min-width: 0; }
.cv-f[hidden] { display: none !important; }
#taskSlider .cv-grid input:not([type=checkbox]):not([type=hidden]),
#taskSlider .cv-grid .c-select-btn,
#taskSlider .cv-grid select {
  height: 34px; min-height: 34px; padding: 0 10px; font-size: 13px; line-height: 32px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--input); color: var(--text);
  width: 100%; max-width: 100%; box-shadow: none;
}
#taskSlider .cv-grid .c-select { width: 100%; max-width: 100%; min-width: 0; }
#taskSlider .cv-grid .c-select-btn-label { display: block !important; color: var(--text); }
#taskSlider .cv-grid .c-select-list input[type=search] { height: 32px; line-height: normal; }
#taskSlider .cv-grid input:hover, #taskSlider .cv-grid .c-select-btn:hover { border-color: var(--line-strong); }
#taskSlider .cv-grid input:focus, #taskSlider .cv-grid .c-select.open .c-select-btn {
  border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
#taskSlider .cv-grid .c-select-btn::after { width: 6px; height: 6px; }
#taskSlider input[type=date], #taskSlider input[type=datetime-local] { color-scheme: light; }
html[data-theme="dark"] #taskSlider input[type=date], html[data-theme="dark"] #taskSlider input[type=datetime-local] { color-scheme: dark; }

/* deadline with «Без срока» placeholder */
.cv-date { position: relative; }
.cv-date input { padding-right: 30px !important; }
.cv-date-ph {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  font-size: 13px; color: var(--muted); pointer-events: none; display: none;
}
.cv-date.is-empty .cv-date-ph { display: block; }
.cv-date.is-empty input:not(:focus) { color: transparent !important; }
.cv-date.is-empty input:not(:focus)::-webkit-datetime-edit { color: transparent; }
.cv-date:focus-within .cv-date-ph { display: none; }
.cv-date-x {
  position: absolute; right: 30px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; border: 0; border-radius: 6px; background: transparent; color: var(--muted);
  font-size: 15px; line-height: 1; cursor: pointer; display: none;
}
.cv-date:not(.is-empty):hover .cv-date-x { display: block; }
.cv-date-x:hover { background: var(--surface-2); color: var(--text); }

/* time */
.cv-time { display: flex; gap: 4px; align-items: center; }
.cv-num { position: relative; flex: 1 1 64px; min-width: 64px; }
.cv-num input { padding-right: 34px !important; -moz-appearance: textfield; }
.cv-num input::-webkit-outer-spin-button, .cv-num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cv-num span { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--muted); pointer-events: none; }
.cv-add {
  flex: none; height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--muted); font: inherit; font-size: 12px; font-weight: 650; cursor: pointer;
}
.cv-add:hover { color: var(--accent-2); border-color: var(--accent); background: var(--accent-soft); }

/* sections */
.cv-sec { display: flex; flex-direction: column; gap: 6px; border-radius: 10px; }
.cv-sec[hidden] { display: none; }
.cv-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; }
.cv-sec-head .cv-label { margin: 0; }
.cv-link {
  border: 0; background: transparent; color: var(--accent-2); font: inherit; font-size: 12.5px; font-weight: 650;
  padding: 3px 6px; border-radius: 6px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.cv-link:hover { background: var(--accent-soft); }
.cv-empty { font-size: 13px; color: var(--muted); padding: 8px 10px; border: 1px dashed var(--line); border-radius: 8px; }
#cv_files.over { outline: 2px dashed var(--accent); outline-offset: 4px; background: var(--accent-soft); }

#taskSlider .bx-editor { border-color: var(--line); border-radius: 8px; }
#taskSlider .bx-tools { padding: 3px 6px; }
#taskSlider .bx-tools button { width: 28px; height: 26px; }
#taskSlider #task_desc_ed .bx-area { min-height: 140px !important; font-size: 14px; background: var(--input); border-radius: 0; }
#taskSlider #cmt_body_ed .bx-area { min-height: 44px; font-size: 13.5px; }

/* files: compact 2-col list */
.cv-files { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 0; }
.cv-files:empty { display: none; }
.cv-files .cv-empty { grid-column: 1 / -1; }
.cv-files .file-chip { padding: 5px 6px 5px 8px; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; min-width: 0; }
.cv-files .file-thumb { width: 34px; height: 34px; border-radius: 6px; }
.cv-files .file-chip .meta b { font-size: 12.5px; font-weight: 600; }
.cv-files .file-chip .meta b a { color: var(--text); text-decoration: none; }
.cv-files .file-chip .meta b a:hover { color: var(--accent-2); }
.cv-files .file-chip .btn-danger {
  background: transparent; color: var(--muted); border: 0; width: 24px; height: 24px; padding: 0; min-height: 0; opacity: .6;
}
.cv-files .file-chip:hover .btn-danger { opacity: 1; color: #ef4444; background: color-mix(in srgb, #ef4444 12%, transparent); }

/* comments */
#taskSlider .comments { gap: 8px; }
#taskSlider .cmt .avatar { width: 26px; height: 26px; font-size: 10px; flex: none; }
#taskSlider .cmt-body { padding: 8px 10px; border: 1px solid var(--line); font-size: 13.5px; }
#taskSlider .cmt-body .rich p:last-child { margin-bottom: 0; }
#taskSlider .composer { margin-top: 4px; gap: 6px; }
#taskSlider .composer-actions { justify-content: space-between; }
#taskSlider .composer .file-chips:empty { display: none; }

/* footer */
#taskSlider .cv-foot {
  position: sticky; bottom: 0; z-index: 4; margin: 0 -18px; padding: 10px 18px calc(10px + var(--safe-b));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--card); border-top: 1px solid var(--line);
}
.cv-foot-hint { font-size: 12px; color: var(--muted); }
#taskSlider .cv-foot .btn-primary { height: 34px; padding: 0 18px; }

@media (max-width: 960px) {
  .cv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  #taskSlider.cv .slider-head { padding: 10px 12px 10px !important; }
  #taskSlider.cv .slider-body { padding: 12px 12px 0 !important; }
  .cv-body { gap: 14px; }
  .cv-status .pipe { display: flex; width: 100%; }
  .cv-status .pipe button { flex: 1 1 0; min-width: 0; padding: 7px 4px; }
  .cv-grid { grid-template-columns: 1fr; gap: 6px; }
  .cv-f { display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: center; gap: 8px; }
  .cv-f .cv-label { margin: 0; }
  .cv-label-note { display: none; }
  .cv-files { grid-template-columns: 1fr; }
  #taskSlider .cv-foot { margin: 0 -12px; padding: 8px 12px calc(8px + var(--safe-b)); }
  .cv-foot-hint { display: none; }
  #taskSlider .cv-foot .btn-primary { width: 100%; height: 40px; }
  #taskSlider #task_desc_ed .bx-area { min-height: 120px !important; }
}

/* v4 fixes */
.cv-link[hidden] { display: none !important; }
#taskSlider.cv textarea.slider-title-input {
  display: block; width: 100%; min-height: 0 !important; height: auto; resize: none; overflow: hidden;
  line-height: 1.3; font-family: inherit;
}
html:not([data-theme="dark"]) #taskSlider .cv-grid input:not([type=checkbox]):not([type=hidden]),
html:not([data-theme="dark"]) #taskSlider .cv-grid .c-select-btn,
html:not([data-theme="dark"]) #taskSlider .bx-editor,
html:not([data-theme="dark"]) #taskSlider .cv-files .file-chip,
html:not([data-theme="dark"]) #taskSlider .cmt-body { border-color: var(--line-strong); }
@media (max-width: 600px) { #taskSlider.cv textarea.slider-title-input { font-size: 17px; } }

/* ===================== Compact list top (v5) ===================== */
#tasksTab .filters-bar {
  background: transparent; border: 0; padding: 0; margin: 0 0 8px; gap: 6px; flex-wrap: wrap; min-height: 34px; /* переносится только если не влезает */
  border-radius: 0; box-shadow: none;
}
#tasksTab .filters-bar .switch-field {
  height: 32px; padding: 0 10px; gap: 6px; border-radius: 8px; border-color: var(--line);
  background: transparent; font-size: 13px; flex: none;
}
#tasksTab .filters-bar .c-select, #tasksTab .filters-bar select { min-width: 0; width: auto; max-width: 170px; }
#tasksTab .filters-bar .c-select-btn {
  height: 32px; min-height: 32px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; border-color: var(--line); gap: 6px;
}
#tasksTab .filters-bar .c-select-btn::after { width: 6px; height: 6px; }
#tasksTab .filters-more-btn { height: 32px; padding: 0 10px; border-radius: 8px; font-size: 12.5px; background: transparent; flex: none; }
#tasksTab .filters.extra { margin: 0 0 8px; padding: 8px 10px; }

/* counters as one segmented group */
#tasksTab .dash-chips.seg {
  display: inline-flex; flex-wrap: nowrap; gap: 0; margin: 0 0 0 4px; padding: 2px; height: 32px; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); flex: none;
}
#tasksTab .dash-chips.seg .dash-chip {
  border: 0; background: transparent; border-radius: 7px; padding: 0 9px; height: 26px; gap: 6px;
  font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap;
}
#tasksTab .dash-chips.seg .dash-chip + .dash-chip { box-shadow: -1px 0 0 var(--line); }
#tasksTab .dash-chips.seg .dash-chip:hover { color: var(--text); background: var(--hover); }
#tasksTab .dash-chips.seg .dash-chip.on { background: var(--card); color: var(--accent-2); box-shadow: 0 0 0 1px var(--accent); }
#tasksTab .dash-chips.seg .dash-chip .n { min-width: 18px; height: 17px; font-size: 11px; padding: 0 5px; }
#tasksTab .view-group-toggle {
  margin-left: auto; height: 32px; padding: 0 12px; border-radius: 8px; font-size: 12.5px; flex: none;
  display: inline-flex; align-items: center; gap: 6px; background: transparent; border-color: var(--line);
}
#tasksTab .view-group-toggle.on { background: var(--accent-soft); border-color: var(--accent); }

/* slim quick-add */
#tasksTab .quick-add {
  height: 34px; padding: 0 3px 0 10px; margin: 0 0 10px; gap: 8px; box-shadow: none !important;
  background: var(--input); border: 1px solid var(--line); border-radius: 8px;
}
#tasksTab .quick-add:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent) !important; }
#tasksTab .quick-add i { margin: 0; font-size: 12px; }
#tasksTab .quick-add input {
  height: 32px; padding: 0; font-size: 13px; border: 0 !important; box-shadow: none !important; background: transparent !important;
}
#tasksTab .quick-add input::placeholder { color: var(--muted); opacity: .85; }
#tasksTab .qa-btn {
  flex: none; width: 28px; height: 28px; border: 0; border-radius: 6px; cursor: pointer;
  background: var(--accent); color: #fff; font-size: 12px; opacity: .35; transition: opacity .12s;
}
#tasksTab .quick-add:focus-within .qa-btn, #tasksTab .qa-btn:hover { opacity: 1; }
.quick-add-hint { display: none !important; }

/* denser table */
#tasksTab .table-card thead th { padding-top: 8px; padding-bottom: 8px; font-size: 11px; }
#tasksTab tr.task-row td { padding-top: 8px; padding-bottom: 8px; height: 52px; }
#tasksTab .group-head td { padding: 8px 12px 4px !important; }

@media (max-width: 1180px) {
  #tasksTab .filters-bar { flex-wrap: wrap; }
}
@media (max-width: 960px) {
  #tasksTab .filters-bar { flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
  #tasksTab .filters-bar .filter-item { flex: 1 1 0; min-width: 0; }
  #tasksTab .filters-bar .c-select, #tasksTab .filters-bar select { max-width: none; width: 100%; }
  #tasksTab .dash-chips.seg {
    order: 10; flex: 1 1 auto; min-width: 0; margin: 0; overflow-x: auto; scrollbar-width: none;
  }
  #tasksTab .dash-chips.seg::-webkit-scrollbar { display: none; }
  #tasksTab .dash-chips.seg .dash-chip { flex: none; }
  #tasksTab .view-group-toggle { order: 11; margin-left: 0; width: auto; padding: 0 10px; }
  #tasksTab .filters-bar .switch-field { order: 1; }
  #tasksTab .filters-bar .filter-item { order: 2; }
  #tasksTab .filters-more-btn { order: 3; }
  #tasksTab .quick-add { margin-bottom: 8px; }
  #tasksTab tr.task-row td { height: auto; padding-top: 0; padding-bottom: 0; }
}
@media (max-width: 600px) {
  #tasksTab .filters-bar .switch-field span { font-size: 12.5px !important; }
  #tasksTab .filters-more-btn { padding: 0 9px; }
  #tasksTab .filters-more-btn { font-size: 0; gap: 0; }
  #tasksTab .filters-more-btn i { font-size: 13px; }
  #tasksTab .filters-more-btn.has-active .n { font-size: 11px; margin-left: 4px; }
  #tasksTab .view-group-toggle { font-size: 0; gap: 0; width: 34px; justify-content: center; padding: 0; }
  #tasksTab .view-group-toggle i { font-size: 13px; }
}
@media (max-width: 960px) {
  /* line 1: статус · проект · фильтры; line 2: невыполненные · счётчики (скролл) · группировка */
  #tasksTab .filters-bar .filter-item { order: 1; }
  #tasksTab .filters-more-btn { order: 2; }
  #tasksTab .filters-bar::after { content: ""; order: 3; flex-basis: 100%; height: 0; }
  #tasksTab .filters-bar .switch-field { order: 4; padding: 0 8px; }
  #tasksTab .dash-chips.seg { order: 5; flex: 1 1 0; }
  #tasksTab .view-group-toggle { order: 6; }
}
@media (max-width: 600px) {
  #tasksTab .filters-bar .switch-field span { font-size: 0 !important; }
  #tasksTab .filters-bar .switch-field span::after { content: "Открытые"; font-size: 12.5px; }
}
@media (max-width: 960px) {
  #tasksTab .filters-bar .switch-field { width: auto !important; flex: 0 0 auto !important; max-width: none; }
}
html:not([data-theme="dark"]) #tasksTab .filters-bar .switch-field,
html:not([data-theme="dark"]) #tasksTab .filters-bar .c-select-btn,
html:not([data-theme="dark"]) #tasksTab .filters-more-btn,
html:not([data-theme="dark"]) #tasksTab .dash-chips.seg,
html:not([data-theme="dark"]) #tasksTab .view-group-toggle:not(.on),
html:not([data-theme="dark"]) #tasksTab .quick-add { border-color: var(--line-strong); }
html:not([data-theme="dark"]) #tasksTab .dash-chips.seg .dash-chip + .dash-chip { box-shadow: -1px 0 0 var(--line-strong); }

/* hide sidebar brand block */
.bx-brand{display:none!important}

/* ===================== Full-height list (tasks / accesses), desktop ===================== */
@media (min-width: 961px) {
  body[data-tab="tasks"] .bx-work,
  body[data-tab="accesses"] .bx-work { height: 100vh; height: 100dvh; min-height: 0; }
  body[data-tab="tasks"] .bx-work > .content,
  body[data-tab="accesses"] .bx-work > .content {
    flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; padding-bottom: 16px;
  }
  body[data-tab="tasks"] #tasksTab,
  body[data-tab="accesses"] #accessesTab { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  body[data-tab="tasks"] #tasksTab[style*="none"],
  body[data-tab="accesses"] #accessesTab[style*="none"] { display: none !important; }
  body[data-tab="tasks"] #tasksTab > *,
  body[data-tab="accesses"] #accessesTab > * { flex: 0 0 auto; }
  body[data-tab="tasks"] #tasksTab > #list_view { flex: 1 1 auto; min-height: 160px; max-height: none; }
  body[data-tab="tasks"] #tasksTab > #kanban_view { flex: 1 1 auto; min-height: 0; overflow: auto; }
  body[data-tab="accesses"] #accessesTab > .acc-wrap { flex: 1 1 auto; min-height: 160px; max-height: none; }
  body[data-tab="tasks"] #tasksTab > #mass_bar { flex: none; }
}

/* ===================== Доступы: grid ===================== */
.acc-bar { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; flex-wrap: wrap; }
.acc-search {
  position: relative; flex: 0 1 340px; min-width: 200px; height: 32px;
}
.acc-search i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12px; pointer-events: none; }
#accessesTab .acc-search input {
  height: 32px; padding: 0 10px 0 30px !important; font-size: 13px; width: 100%; border: 1px solid var(--line); border-radius: 8px; background: var(--input);
}
#accessesTab .acc-bar .c-select { min-width: 150px; max-width: 220px; width: auto; }
#accessesTab .acc-bar .c-select-btn { height: 32px; min-height: 32px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; border-color: var(--line); }
#accessesTab .acc-bar .c-select-btn-label { display: block !important; color: var(--text); }
#accessesTab #acc_add { height: 32px; padding: 0 12px; }
.acc-count { font-size: 12px; color: var(--muted); }
.acc-status { margin-left: auto; font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; min-height: 18px; }
.acc-status.ok { color: #16a34a; }
html[data-theme="dark"] .acc-status.ok { color: #4ade80; }
.acc-status.err { color: var(--danger); font-weight: 600; }
.acc-hint { font-size: 11px; color: var(--muted); margin-top: 6px; }

.acc-wrap {
  overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px; outline: none;
  max-height: calc(100dvh - 200px);
}
.acc-wrap:focus-visible { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }
.acc-grid { width: 100%; min-width: 980px; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 13px; }
.acc-grid col.w-project { width: 15%; }
.acc-grid col.w-title { width: 16%; }
.acc-grid col.w-url { width: 19%; }
.acc-grid col.w-login { width: 15%; }
.acc-grid col.w-password { width: 13%; }
.acc-grid col.w-note { width: auto; }
.acc-grid col.w-act { width: 40px; }
.acc-grid thead th {
  position: sticky; top: 0; z-index: 3; height: 32px; padding: 0 10px; text-align: left;
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  background: var(--surface); border-bottom: 1px solid var(--line-strong); border-right: 1px solid var(--line);
  white-space: nowrap; user-select: none;
}
.acc-grid thead th[data-k] { cursor: pointer; }
.acc-grid thead th[data-k]:hover { color: var(--text); }
.acc-grid thead th[data-k]::after { content: "↕"; margin-left: 6px; opacity: .35; font-size: 10px; }
.acc-grid thead th.sorted { color: var(--accent-2); }
.acc-grid thead th[data-dir="asc"]::after { content: "↑"; opacity: 1; }
.acc-grid thead th[data-dir="desc"]::after { content: "↓"; opacity: 1; }
.acc-grid tbody td {
  height: 32px; padding: 0 8px 0 10px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line);
  white-space: nowrap; overflow: hidden; position: relative; cursor: cell; background: var(--card);
}
.acc-grid tbody tr:hover td { background: var(--hover); }
.acc-grid td.acc-c { display: table-cell; }
.acc-grid .acc-txt {
  display: inline-block; max-width: calc(100% - 22px); overflow: hidden; text-overflow: ellipsis; vertical-align: middle; line-height: 31px;
}
.acc-grid .acc-proj { font-weight: 600; }
.acc-grid .acc-muted { color: var(--muted); }
.acc-grid .acc-link { color: var(--accent-2); text-decoration: none; cursor: pointer; }
.acc-grid .acc-link:hover { text-decoration: underline; }
.acc-grid .acc-pw { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; letter-spacing: .04em; max-width: calc(100% - 46px); }
.acc-grid .acc-ic {
  border: 0; background: transparent; color: var(--muted); width: 22px; height: 22px; padding: 0; border-radius: 5px;
  cursor: pointer; font-size: 12px; vertical-align: middle; opacity: 0; transition: opacity .1s;
}
.acc-grid td:hover .acc-ic, .acc-grid td.sel .acc-ic, .acc-grid .acc-eye { opacity: .8; }
.acc-grid .acc-ic:hover { opacity: 1; color: var(--text); background: var(--surface-2); }
.acc-grid td.acc-password .acc-ic { float: right; margin-top: 5px; }
.acc-grid td.acc-url .acc-copy, .acc-grid td.acc-login .acc-copy, .acc-grid td.acc-title .acc-copy { position: absolute; right: 4px; top: 5px; background: var(--card); }
.acc-grid tbody tr:hover td.acc-url .acc-copy, .acc-grid tbody tr:hover td.acc-login .acc-copy, .acc-grid tbody tr:hover td.acc-title .acc-copy { background: var(--hover); }
.acc-grid td.acc-act { text-align: center; padding: 0; cursor: default; border-right: 0; }
.acc-grid td.acc-act .acc-del { opacity: .45; }
.acc-grid tr:hover td.acc-act .acc-del { opacity: 1; }
.acc-grid td.acc-act .acc-del:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.acc-grid td.sel { box-shadow: inset 0 0 0 2px var(--accent); z-index: 1; }
.acc-grid td.editing { padding: 0; box-shadow: inset 0 0 0 2px var(--accent); background: var(--input) !important; }
#accessesTab .acc-grid .acc-input {
  width: 100%; height: 31px; border: 0 !important; border-radius: 0; padding: 0 9px; margin: 0; font: inherit; font-size: 13px;
  background: transparent !important; color: var(--text); box-shadow: none !important; outline: none;
}
.acc-grid tr.acc-empty td { height: auto; cursor: default; white-space: normal; border-right: 0; }
html:not([data-theme="dark"]) .acc-grid tbody td,
html:not([data-theme="dark"]) .acc-grid thead th { border-color: var(--line); }
html:not([data-theme="dark"]) .acc-wrap { border-color: var(--line-strong); }

@media (max-width: 960px) {
  .acc-bar { gap: 6px; }
  .acc-search { flex: 1 1 100%; }
  .acc-status { margin-left: 0; }
  .acc-hint { display: none; }
  .acc-wrap { max-height: none; -webkit-overflow-scrolling: touch; }
  .acc-grid { min-width: 860px; }
  .acc-grid col.w-project { width: 130px; }
  .acc-grid thead th:first-child, .acc-grid tbody td:first-child {
    position: sticky; left: 0; z-index: 2; box-shadow: 1px 0 0 var(--line-strong);
  }
  .acc-grid thead th:first-child { z-index: 4; }
  .acc-grid .acc-ic { opacity: .7; }
}
