:root {
  color-scheme: dark;
  --workspace-nav-width: 288px;
  --bg: #121212;
  --bg-strong: #181818;
  --surface: rgba(27, 27, 27, 0.94);
  --surface-muted: #232323;
  --surface-strong: #1f1f1f;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #ededed;
  --muted: #a1a1a1;
  --accent: #2383e2;
  --accent-soft: rgba(35, 131, 226, 0.16);
  --accent-strong: #0f6cbd;
  --nav-surface: rgba(22, 22, 22, 0.94);
  --nav-surface-muted: rgba(255, 255, 255, 0.045);
  --nav-surface-hover: rgba(255, 255, 255, 0.075);
  --nav-text: #d7d7d7;
  --nav-muted: #9b9b9b;
  --nav-active: rgba(35, 131, 226, 0.18);
  --nav-active-text: #f5f9ff;
  --success: #4ea36e;
  --warning: #de9236;
  --danger: #dc6b6b;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  --shadow-soft: 0 12px 28px rgba(0, 0, 0, 0.22);
  --radius: 18px;
  --radius-sm: 12px;
  --gap: 20px;
  --font: "Manrope", "Segoe UI Variable", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(35, 131, 226, 0.12), transparent 24%),
    radial-gradient(circle at top right, rgba(222, 146, 54, 0.08), transparent 26%),
    linear-gradient(180deg, #171717 0%, var(--bg) 100%);
}
body.modal-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
input, textarea, select, button { font: inherit; }

.shell { display: grid; grid-template-columns: var(--workspace-nav-width) 10px 1fr; min-height: 100vh; }
.nav-resizer { cursor: col-resize; position: relative; }
.nav-resizer::after { content: ""; position: absolute; top: 20px; bottom: 20px; left: 4px; width: 2px; background: rgba(255, 255, 255, 0.08); border-radius: 999px; }
.nav-resizer-light::after { background: rgba(255, 255, 255, 0.14); }
.workspace-nav {
  background: var(--nav-surface);
  border-right: 1px solid var(--line);
  padding: 22px 18px;
  backdrop-filter: blur(14px);
  display: grid;
  gap: 18px;
  align-content: start;
}
.workspace-header { margin-bottom: 2px; display: flex; align-items: center; gap: 12px; }
.workspace-context-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(35,35,35,0.96), rgba(28,28,28,0.94));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 6px;
}
.workspace-context-name { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.workspace-context-role { color: var(--muted); font-size: 13px; }
.workspace-nav-groups { display: grid; gap: 18px; }
.workspace-nav-group { display: grid; gap: 10px; }
.workspace-nav-label {
  color: var(--nav-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0 10px;
}
.caption { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.name { font-size: 20px; font-weight: 800; margin-top: 4px; letter-spacing: -0.03em; }
.workspace-links, .project-list, .activity-list, .task-list { display: grid; gap: 8px; }
.workspace-links a, .workspace-chip, .project-row {
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--nav-text);
  font-weight: 700;
}

.workspace-links a[aria-current="page"] {
  background: var(--nav-active);
  border-color: rgba(35, 131, 226, 0.28);
  color: var(--nav-active-text);
}
.workspace-list { margin-top: 28px; }
.main-panel { display: grid; grid-template-rows: auto 1fr; }
.topbar {
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(22, 22, 22, 0.9);
  backdrop-filter: blur(14px);
  min-height: 72px;
}
.topbar-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.page-title { font-size: 29px; font-weight: 800; letter-spacing: -0.04em; }
.topbar-subtitle { margin-top: 2px; font-size: 13px; }
.muted { color: var(--muted); }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.theme-toggle {
  width: auto;
  min-height: 48px;
  padding: 8px 14px 8px 10px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.theme-toggle-glyph {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  background: var(--accent-soft);
  color: #9dceff;
  font-size: 14px;
  line-height: 1;
  flex: 0 0 auto;
}
.theme-toggle-label { font-size: 14px; font-weight: 800; }
.topbar-user {
  padding: 9px 12px;
  border-radius: 14px;
  background: rgba(34,34,34,0.92);
  border: 1px solid var(--line);
  min-width: 140px;
}
.topbar-user-name { font-size: 13px; font-weight: 800; }
.topbar-user-role { color: var(--muted); font-size: 12px; }
.settings-grid { align-items: start; }
.settings-summary { display: grid; gap: 14px; }
.settings-summary-item {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}
.settings-summary-item a {
  color: var(--accent);
  word-break: break-all;
}
.content { padding: 28px; display: grid; gap: 22px; }
.panel-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.panel {
  background: var(--surface);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 24px;
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.all-tasks-admin-layout { grid-template-columns: 1fr; }
.all-tasks-main-panel { width: 100%; }
.all-tasks-add-button { width: 48px; height: 48px; padding: 0; font-size: 28px; line-height: 1; display: grid; place-items: center; }
.project-editor-grid { grid-template-columns: 1fr; }
.project-form-panel { gap: 22px; }
.project-form-grid { display: grid; gap: 24px; grid-template-columns: minmax(320px, 420px); align-items: start; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs a {
  padding: 9px 14px;
  background: rgba(35,35,35,0.88);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}
.tabs-soft a { background: rgba(35, 35, 35, 0.94); }
.button {
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 14px 26px rgba(35, 131, 226, 0.2);
}
.button-secondary {
  background: rgba(36,36,36,0.96);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}
.button.is-active { background: #163f9e; color: white; }
.stack { display: grid; gap: 14px; }
.stack label, .form-row label { display: grid; gap: 6px; }
.choice-group { display: grid; gap: 10px; margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: rgba(36,36,36,0.96); }
.choice-group legend { padding: 0 4px; font-size: 14px; font-weight: 600; color: var(--text); }
.choice-list {
  display: grid;
  gap: 8px;
  max-height: clamp(160px, 26vh, 260px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-color: rgba(255, 255, 255, 0.28) rgba(255, 255, 255, 0.06);
  scrollbar-width: thin;
}
.choice-list::-webkit-scrollbar { width: 8px; }
.choice-list::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.06); border-radius: 999px; }
.choice-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.28); border-radius: 999px; }
.choice-list::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.38); }
.choice-item,
.stack label.choice-item,
.form-row label.choice-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.choice-item input { width: 18px; height: 18px; margin: 0; }
.choice-item span { color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(37,37,37,0.98);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--text);
}
input:focus, textarea:focus, select:focus {
  outline: 0;
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}
.form-row { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); }
.table-scroll { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #1d1d1d; }
.table-scroll .data-table { min-width: 720px; }
.bot-admin-layout { display: grid; gap: 22px; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); align-items: start; }
.bot-settings-panel,
.bot-bindings-panel { min-width: 0; }
.bot-token-form { max-width: 620px; }
.bot-integration-meta { display: flex; gap: 10px 16px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.bot-status-badge.is-ok { background: rgba(78, 163, 110, 0.16); color: #89d7a7; }
.bot-status-badge.is-warning { background: rgba(222, 146, 54, 0.16); color: #f0b977; }
.bot-status-badge.is-danger { background: rgba(220, 107, 107, 0.16); color: #ef9c9c; }
.bot-bindings-scroll .data-table { min-width: 640px; }
.bot-bindings-table td { vertical-align: top; }
.bot-binding-detail { max-width: 360px; margin-top: 7px; color: var(--muted); font-size: 13px; line-height: 1.4; white-space: normal; }
.user-list { display: grid; gap: 14px; }
.user-row-card { display: grid; gap: 12px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: #1f1f1f; }
.user-row-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.user-row-meta { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.user-row-actions { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.user-password-form { min-width: min(100%, 280px); }
.user-delete-form { flex: 0 0 auto; }
.badge { display: inline-flex; padding: 5px 10px; border-radius: 999px; background: var(--accent-soft); color: #a9d4ff; font-size: 13px; }
.priority { background: #fff2dd; color: var(--warning); }
.workspace-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.workspace-card { padding: 18px; background: linear-gradient(180deg, #232323, #1b1b1b); border-radius: 20px; border: 1px solid var(--line); display: grid; gap: 8px; }
.task-card { border: 1px solid var(--line); border-radius: 18px; padding: 16px; background: #1f1f1f; display: grid; gap: 10px; }
.task-card-top, .task-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 13px; }
.task-list { display: grid; gap: 14px; }
.compact-task-list { gap: 10px; }
.task-card-collapsible { padding: 0; overflow: hidden; }
.task-card-summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 18px; cursor: pointer; }
.task-card-summary::-webkit-details-marker { display: none; }
.task-card-collapsible[open] .task-card-summary { border-bottom: 1px solid var(--line); background: #232323; }
.task-summary-main { min-width: 0; display: flex; align-items: center; gap: 10px; }
.task-summary-main strong { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-summary-meta { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; flex-wrap: wrap; justify-content: flex-end; }
.task-open-hint { padding: 4px 8px; border-radius: 999px; background: #2b2b2b; color: #c9c9c9; font-size: 12px; }
.task-card-collapsible[open] .task-open-hint { background: rgba(35, 131, 226, 0.18); color: #a9d4ff; }
.task-card-details { padding: 16px 18px 18px; display: grid; gap: 14px; }
.task-card-actions-row { display: flex; justify-content: flex-end; }
.task-full-text { white-space: pre-wrap; line-height: 1.5; color: var(--text); background: #232323; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.workspace-stage { display: grid; gap: 22px; }
.workspace-center-layout { display: grid; gap: 22px; grid-template-columns: minmax(260px, 300px) minmax(0, 1fr); align-items: start; }
.workspace-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 26px 28px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(35, 131, 226, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(34,34,34,0.98), rgba(26,26,26,0.96));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.workspace-hero-compact { padding: 0 0 18px; background: transparent; border: 0; box-shadow: none; }
.workspace-hero-copy { max-width: 760px; display: grid; gap: 10px; }
.workspace-hero-copy h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 48px);
  line-height: .98;
  letter-spacing: -0.05em;
}
.workspace-hero-copy p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.workspace-hero-actions { display: grid; gap: 12px; justify-items: end; min-width: 220px; }
.workspace-hero-card {
  min-width: 220px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(34,34,34,0.92);
  border: 1px solid var(--line);
  display: grid;
  gap: 4px;
}
.workspace-hero-button { min-width: 220px; }
.database-panel { overflow: hidden; }
.database-head { margin-bottom: 18px; }
.task-page-layout { display: grid; gap: 22px; grid-template-columns: minmax(0, 1.4fr) minmax(320px, .72fr); align-items: start; }
.task-page-main { min-width: 0; }
.composer-panel { position: sticky; top: 20px; }
.explorer-panel { display: grid; gap: 16px; position: sticky; top: 20px; }
.explorer-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.explorer-head h2 { margin: 4px 0 0; font-size: 24px; letter-spacing: -0.04em; }
.explorer-all-link { width: auto; }
.explorer-list { display: grid; gap: 8px; }
.explorer-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px;
  border-radius: 18px;
  border: 1px solid transparent;
  background: rgba(255,255,255,0.62);
}
.explorer-item.is-active {
  background: linear-gradient(180deg, rgba(232,240,255,0.9), rgba(255,255,255,0.96));
  border-color: rgba(37, 99, 235, 0.18);
  box-shadow: var(--shadow-soft);
}
.explorer-item-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #edf2ea;
  color: #334155;
  font-weight: 800;
  flex: 0 0 auto;
}
.explorer-item.is-active .explorer-item-mark {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
}
.explorer-item-copy { min-width: 0; display: grid; gap: 4px; }
.explorer-item-copy strong { font-size: 14px; line-height: 1.35; }
.explorer-item-copy span { color: var(--muted); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.task-database { min-width: 0; }
.task-table-scroll {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,0.72);
}
.task-database-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
}
.task-database-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  text-align: left;
  padding: 14px 16px;
  background: rgba(243, 246, 238, 0.96);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  border-bottom: 1px solid var(--line);
}
.task-db-row td {
  padding: 0 16px;
  background: rgba(255,255,255,0.8);
  border-bottom: 1px solid rgba(31, 42, 55, 0.06);
  vertical-align: middle;
}
.task-db-expand {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 16px 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  text-align: left;
  cursor: pointer;
  color: inherit;
}
.task-db-expand-icon {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border-radius: 999px;
  background: var(--surface-muted);
  position: relative;
  flex: 0 0 auto;
}
.task-db-expand-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid #526071;
  border-bottom: 2px solid #526071;
  transform: rotate(-45deg);
}
.task-db-title-block { min-width: 0; display: grid; gap: 5px; }
.task-db-title-block strong {
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.task-db-title-block span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.task-db-assignees, .task-db-project, .task-db-due {
  color: #344054;
  font-size: 14px;
}
.task-db-tester-stack {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}
.task-db-person-list {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-send-testing-form {
  flex: 0 0 auto;
  margin: 0;
}
.task-send-testing-button {
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}
.task-inline-status-form {
  margin: 0;
}
.task-inline-status-select {
  width: 100%;
  min-width: 112px;
  min-height: 24px;
  padding: 3px 24px 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background-color: #2f2f2f;
  color: #d7d7d7;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}
.task-inline-status-select.is-testing {
  min-width: 148px;
  background-color: #3a2f1f;
  color: #f0c98b;
}
.task-state-pill, .task-priority-pill, .task-subtle-badge, .task-comments-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
.task-state-pill { background: #eef3ff; color: #2959c7; }
.task-state-pill.is-testing { background: #edf8f3; color: #16624a; }
.task-state-pill[data-task-state="К выполнению"] { background: #f3f4f6; color: #475467; }
.task-state-pill[data-task-state="В работе"] { background: #e7f0ff; color: #2759ca; }
.task-state-pill[data-task-state="Готово"] { background: #e7f7ef; color: #16734f; }
.task-state-pill[data-task-state="Доработка ТЗ"] { background: #fff4df; color: #9a5b00; }
.task-state-pill[data-task-state="Неактуально"] { background: #ffecec; color: #9b3131; }
.task-state-pill[data-task-state="В тестировке"] { background: #fff4df; color: #9a5b00; }
.task-state-pill[data-task-state="Оттестированно"] { background: #e7f7ef; color: #16734f; }
.task-state-pill[data-task-state="Не требует тестировки"] { background: #f3f4f6; color: #475467; }
.task-priority-pill { background: #f6efe1; color: var(--warning); }
.task-priority-pill[data-priority="не срочно"] { background: #f3f4f6; color: #5c6775; }
.task-priority-pill[data-priority="срочно"] { background: #fff0d8; color: #b26800; }
.task-priority-pill[data-priority="критично"] { background: #fde8e8; color: var(--danger); }
.task-subtle-badge, .task-comments-counter {
  background: rgba(255,255,255,0.82);
  border: 1px solid var(--line);
  color: var(--muted);
}
.task-drawer-shell {
  position: fixed;
  inset: 0;
  z-index: 1600;
  display: grid;
  place-items: center;
  padding: 18px;
}
.task-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 8, 0.56);
  backdrop-filter: blur(6px);
}
.task-drawer-panel {
  position: relative;
  z-index: 1;
  width: min(94vw, 1480px);
  height: min(94vh, 980px);
  display: grid;
  grid-template-rows: auto 1fr;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(27,27,27,0.99), rgba(22,22,22,0.99));
  border: 1px solid var(--line);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
  overflow: hidden;
}
.task-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 22px;
  border-bottom: 1px solid rgba(31, 42, 55, 0.08);
  background: rgba(255,255,255,0.62);
}
.task-drawer-title {
  margin-top: 4px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.task-drawer-close { width: auto; }
.task-drawer-body {
  overflow: auto;
  padding: 22px;
}
.task-drawer-content,
.task-drawer-main,
.task-comments-card {
  display: grid;
  gap: 16px;
}
.task-drawer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .85fr);
  gap: 18px;
}
.task-drawer-main,
.task-comments-card {
  padding: 20px;
  border-radius: 22px;
  background: rgba(255,255,255,0.86);
  border: 1px solid rgba(255,255,255,0.78);
  box-shadow: var(--shadow-soft);
}
.task-db-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.task-db-detail-head h3 {
  margin: 4px 0 0;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -0.04em;
}
.task-db-detail-badges { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.task-db-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.task-db-meta-grid > div {
  padding: 14px 15px;
  border-radius: 16px;
  background: var(--surface-muted);
  display: grid;
  gap: 6px;
}
.task-db-meta-grid strong { font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.task-db-description {
  white-space: pre-wrap;
  line-height: 1.65;
  padding: 18px;
  border-radius: 18px;
  background: #f7f9f4;
  border: 1px solid var(--line);
}
.task-db-form-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.task-db-edit-form { margin-top: 0; padding-top: 0; border-top: 0; }
.task-comments-card { display: grid; gap: 14px; align-content: start; }
.task-comments-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.task-comments-list { display: grid; gap: 10px; }
.task-comment {
  padding: 14px 15px;
  border-radius: 16px;
  background: #f8faf6;
  border: 1px solid var(--line);
}
.task-comment-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}
.task-comment-head strong { color: var(--text); font-size: 13px; }
.task-comment-body {
  white-space: pre-wrap;
  line-height: 1.55;
  color: #344054;
}
.task-comment-placeholder { color: var(--muted); }
.task-comment-form textarea { min-height: 112px; resize: vertical; }
.task-comment-compose-bottom {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
}
.task-comment-compose-bottom .task-comment-media-picker {
  flex: 1 1 auto;
  min-width: 0;
}
.task-comment-compose-bottom .button {
  flex: 0 0 auto;
}
.task-comment-media {
  margin-top: 10px;
}
.task-comment-media img,
.task-comment-media video {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}
.task-comment-media audio {
  width: 100%;
}
.task-comment-file {
  width: 100%;
}
.archive-compact .task-list,
.statistics-compact .task-list { gap: 8px; }
.archive-compact { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); align-items: start; }
.statistics-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.statistics-compact > .panel:first-child { grid-column: 1 / -1; }
.archive-compact .task-card,
.statistics-compact .task-card { border-radius: 14px; }
.archive-compact .task-card-summary,
.statistics-compact .task-card-summary { gap: 12px; padding: 12px 14px; align-items: flex-start; }
.archive-compact .task-summary-main,
.statistics-compact .task-summary-main { flex: 1 1 220px; align-items: flex-start; }
.archive-compact .task-summary-main strong,
.statistics-compact .task-summary-main strong { font-size: 15px; white-space: normal; overflow: visible; text-overflow: unset; line-height: 1.35; overflow-wrap: anywhere; }
.archive-compact .task-summary-meta,
.statistics-compact .task-summary-meta { flex: 1 1 260px; gap: 8px; font-size: 12px; justify-content: flex-start; }
.archive-compact .task-summary-meta span,
.statistics-compact .task-summary-meta span { min-width: 0; overflow-wrap: anywhere; }
.archive-compact .badge,
.statistics-compact .badge { padding: 4px 8px; font-size: 12px; }
.archive-compact .task-open-hint,
.statistics-compact .task-open-hint { padding: 3px 7px; font-size: 11px; }
.archive-compact .task-card-details,
.statistics-compact .task-card-details { padding: 12px 14px 14px; gap: 10px; }
.archive-compact .task-meta,
.statistics-compact .task-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); justify-content: unset; gap: 8px 12px; font-size: 12px; }
.archive-compact .task-meta span,
.statistics-compact .task-meta span { min-width: 0; overflow-wrap: anywhere; }
.archive-compact .task-full-text,
.statistics-compact .task-full-text { padding: 10px 12px; border-radius: 12px; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.archive-compact .task-edit-form,
.statistics-compact .task-edit-form,
.archive-compact .task-approval-form,
.statistics-compact .task-approval-form { margin-top: 10px; padding-top: 10px; }
.archive-compact .inline-actions,
.statistics-compact .inline-actions { gap: 8px; }
.archive-compact .panel,
.statistics-compact .panel { min-width: 0; overflow: hidden; }
.timeline { display: grid; gap: 14px; }
.timeline-item { display: grid; grid-template-columns: 18px 1fr; gap: 14px; }
.timeline-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); margin-top: 6px; }
.activity-item { padding: 14px 16px; background: var(--surface-muted); border-radius: 14px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.stat { background: var(--surface-muted); padding: 14px; border-radius: 14px; display: grid; gap: 4px; }
.empty-state { padding: 18px; background: var(--surface-muted); border-radius: 16px; color: var(--muted); }
.login-screen { min-height: 100vh; display: grid; place-items: center; background:
  radial-gradient(circle at top left, rgba(27,92,255,.15), transparent 28%),
  linear-gradient(180deg, #f2f5fa, #e7edf4);
}
.login-card { width: min(460px, calc(100vw - 32px)); background: rgba(255,255,255,.94); border: 1px solid rgba(215, 222, 231, .9); box-shadow: 0 24px 70px rgba(17, 29, 44, .12); border-radius: 24px; padding: 36px; }
.login-brand { color: var(--accent); font-weight: 700; letter-spacing: .03em; margin-bottom: 10px; }
.login-footnote { margin-top: 18px; color: var(--muted); font-size: 14px; }
.architecture-layout { grid-template-columns: 320px 1fr; }
.diagram-panel { min-height: 620px; }
.diagram-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.diagram-canvas { width: 100%; min-height: 540px; border-radius: 16px; background: linear-gradient(180deg, #fcfdff, #f4f7fb); border: 1px solid var(--line); }
.project-mindmap-block { display: grid; gap: 14px; }
.project-mindmap-block-wide { width: 100%; }
.mindmaps-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 18px; align-items: start; }
.mindmaps-sidebar { position: sticky; top: 20px; display: grid; gap: 18px; }
.mindmap-project-list { display: grid; gap: 10px; }
.mindmap-project-link { display: grid; gap: 5px; padding: 12px 14px; color: var(--text); text-decoration: none; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-muted); }
.mindmap-project-link span { color: var(--muted); font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mindmap-project-link:hover,
.mindmap-project-link.is-active { border-color: rgba(27, 92, 255, 0.45); background: rgba(27, 92, 255, 0.08); }
.mindmaps-create-form { padding-top: 16px; border-top: 1px solid var(--line); }
.mindmaps-board-panel { min-width: 0; }
.mindmaps-board-form { display: grid; gap: 16px; }
.mindmaps-stage-wrap { min-height: 650px; max-height: calc(100vh - 250px); }
.mindmaps-empty { min-height: 360px; display: grid; place-items: center; text-align: center; }
.mindmap-editor { display: grid; gap: 14px; }
.mindmap-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: #f8fafc; }
.mindmap-toolbar-field { display: grid; gap: 6px; min-width: 120px; }
.mindmap-toolbar-field span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.mindmap-toolbar-field input,
.mindmap-toolbar-field select { padding: 10px 12px; }
.mindmap-toolbar-field-wide { min-width: 260px; flex: 1 1 280px; }
.mindmap-hints-row { display: flex; gap: 12px; flex-wrap: wrap; }
.mindmap-hint { font-size: 13px; color: var(--muted); line-height: 1.45; }
.mindmap-stage-wrap { position: relative; overflow: auto; min-height: 620px; max-height: 720px; width: 100%; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(180deg, #fcfdff, #f4f7fb); }
.mindmap-stage-wrap-wide { min-height: 420px; max-height: 420px; }
.mindmap-stage { display: block; width: 3600px; height: 2200px; }
.mindmap-node { cursor: pointer; }
.mindmap-node.is-selected { filter: drop-shadow(0 8px 22px rgba(27, 92, 255, 0.16)); }
.mindmap-node.is-connect-source { filter: drop-shadow(0 8px 22px rgba(15, 143, 98, 0.2)); }
.mindmap-edge { cursor: pointer; }
.mindmap-resize-handle { cursor: nwse-resize; }
.mindmap-node-body { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 8px; color: #142033; overflow: hidden; padding: 8px; line-height: 1.2; }
.mindmap-node-title { font-weight: 700; }
.mindmap-node-content { color: #334155; }
.toast-stack { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 10px; z-index: 1000; }
.toast { padding: 12px 14px; border-radius: 12px; background: #152033; color: white; box-shadow: var(--shadow); }
.feedback-modal { position: fixed; inset: 0; z-index: 1300; display: grid; place-items: center; padding: 24px; }
.feedback-modal-backdrop { position: absolute; inset: 0; background: rgba(16, 21, 29, 0.62); backdrop-filter: blur(6px); }
.feedback-modal-card { position: relative; z-index: 1; width: min(520px, calc(100vw - 32px)); padding: 24px; border-radius: 22px; background: var(--surface); border: 1px solid rgba(203, 68, 68, 0.28); box-shadow: 0 28px 90px rgba(15, 23, 42, 0.38); }
.feedback-modal-head { display: grid; gap: 6px; margin-bottom: 14px; }
.feedback-modal-eyebrow { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #d45b5b; }
.feedback-modal-title { margin: 0; font-size: 28px; line-height: 1.05; }
.feedback-modal-body { color: var(--muted); white-space: pre-wrap; line-height: 1.6; }
.feedback-modal-actions { display: flex; justify-content: flex-end; margin-top: 20px; }
.modal-shell { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 24px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(16, 21, 29, 0.48); backdrop-filter: blur(4px); }
.modal-card { position: relative; z-index: 1; width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; background: var(--surface); border-radius: 20px; box-shadow: 0 28px 90px rgba(15, 23, 42, 0.28); padding: 24px; }
.modal-head { margin-bottom: 12px; }
.inline-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.task-approval-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.task-edit-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.compact-form { gap: 8px; min-width: 220px; }
.compact-form input { padding: 10px 12px; }
.task-card h3 { margin: 0; font-size: 18px; }
.task-card p { margin: 0; color: var(--muted); }
.kanban-board { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.kanban-column { display: grid; gap: 12px; min-height: 420px; background: #f7f9fc; border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
.kanban-column-head { display: flex; align-items: center; justify-content: space-between; }
.kanban-column-body { display: grid; gap: 12px; min-height: 300px; align-content: start; }
.kanban-column-body.is-over { outline: 2px dashed var(--accent); outline-offset: 4px; border-radius: 14px; }
.kanban-card { display: grid; gap: 10px; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: white; box-shadow: 0 10px 24px rgba(16, 21, 29, 0.08); cursor: grab; }
.kanban-card.is-dragging { opacity: .55; }
.kanban-card-top, .kanban-card-meta { display: flex; gap: 10px; flex-wrap: wrap; justify-content: space-between; align-items: center; }
.kanban-card-meta { color: var(--muted); font-size: 13px; }
.kanban-open-button { width: auto; justify-self: start; background: #1e9d63; }
.database-panel,
.composer-panel,
.explorer-panel,
.activity-item,
.stat,
.empty-state,
.kanban-column,
.kanban-card,
.modal-card,
.mobile-nav,
.login-card,
.mindmap-toolbar,
.mindmap-stage-wrap,
.diagram-canvas {
  background: #1f1f1f;
  border-color: var(--line);
  color: var(--text);
}

.explorer-item {
  background: #232323;
  border-color: var(--line);
}

.explorer-item.is-active {
  background: rgba(35, 131, 226, 0.14);
  border-color: rgba(35, 131, 226, 0.26);
  box-shadow: none;
}

.explorer-item-mark {
  background: #2d2d2d;
  color: #d5d5d5;
}

.activity-item,
.stat,
.empty-state,
.task-comment,
.task-db-description {
  background: #232323;
}

.timeline-dot {
  background: var(--accent);
}

.login-screen {
  background:
    radial-gradient(circle at top left, rgba(35,131,226,.18), transparent 28%),
    linear-gradient(180deg, #181818, #121212);
}

.login-card {
  background: rgba(27,27,27,.96);
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .3);
}

.diagram-canvas,
.mindmap-stage-wrap {
  background: linear-gradient(180deg, #1f1f1f, #181818);
}

.mindmap-toolbar {
  background: #232323;
}

.mindmap-node-title,
.mindmap-node-body {
  color: #101010;
}

.mindmap-node-content {
  color: rgba(16, 16, 16, 0.8);
}

.kanban-column {
  background: #1c1c1c;
}

.kanban-card {
  background: #232323;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.mobile-nav {
  background: var(--nav-surface);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

.workspace-links a:hover, .workspace-chip:hover, .project-row:hover, .tabs a:hover {
  background: var(--nav-surface-hover);
  border-color: var(--line);
  transform: translateY(-1px);
}

.list-view-create-plus {
  min-width: 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-size: 26px;
  line-height: 1;
}

.task-database-notion .task-table-scroll {
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  background: #191919;
}

.task-database-table-compact {
  min-width: 1040px;
  table-layout: fixed;
}

.task-database-table-compact thead th {
  padding: 10px 12px;
  background: #191919;
  font-size: 11px;
}

.task-database-table-compact .task-col-primary {
  width: 300px;
  min-width: 300px;
}

.task-col-open {
  width: 74px;
  min-width: 74px;
}

.task-db-row-compact td {
  padding: 0 10px;
  height: 48px;
  background: #191919;
}

.task-db-row-compact:hover td {
  background: #1d1d1d;
}

.task-db-row-compact:hover td:first-child {
  background: #1d1d1d;
}

.task-database-table-compact .task-db-primary-cell {
  width: 300px;
  min-width: 300px;
}

.task-db-expand-compact {
  gap: 10px;
  align-items: center;
  padding: 9px 0;
}

.task-db-expand-compact .task-db-leading {
  padding-top: 0;
}

.task-db-row-flags-compact {
  flex-wrap: nowrap;
  overflow: hidden;
}

.task-db-row-flags-compact .task-inline-badge {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-database-table-compact .task-db-title-block {
  gap: 4px;
}

.task-database-table-compact .task-db-title-block strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-database-table-compact .task-db-brief,
.task-database-table-compact .task-db-project,
.task-database-table-compact .task-db-assignees,
.task-database-table-compact .task-db-due,
.task-database-table-compact .task-db-updated {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}

.task-database-table-compact .task-priority-pill,
.task-database-table-compact .task-state-pill {
  max-width: 100%;
}

.project-db-row {
  cursor: pointer;
}

.project-db-row td {
  padding: 0 10px;
  cursor: pointer;
}

.project-db-open-cell {
  text-align: center;
}

.project-db-open-button,
.project-db-cell-button {
  width: 100%;
  min-height: 40px;
  padding: 6px 4px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.project-db-open-button {
  min-height: 24px;
  width: auto;
  padding: 0 7px;
  border-radius: 6px;
  border: 1px solid var(--clickup-border);
  background: #232323;
  color: #dcdcdc;
  font-size: 10px;
  font-weight: 700;
}

.project-db-primary-button {
  display: flex;
  align-items: center;
}

.project-db-pill-cell {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.project-db-cell-button:hover,
.project-db-open-button:hover {
  color: #fff;
}

.project-view-meta {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--clickup-border);
  border-radius: 8px;
  background: var(--clickup-surface-alt);
  color: #d7d7d7;
  font-size: 12px;
  line-height: 1.3;
}

.project-view-meta strong {
  color: #fff;
}

.project-architecture-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.project-architecture-card {
  display: grid;
  gap: 14px;
  min-height: 220px;
  padding: 18px;
  border: 1px solid var(--clickup-border);
  border-radius: 8px;
  background: #191919;
  color: #e8e8e8;
  cursor: pointer;
}

.project-architecture-card:hover {
  background: var(--clickup-surface-hover);
}

.project-card-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.project-card-main h2 {
  margin: 4px 0 0;
  color: #fff;
  font-size: 20px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.project-card-kicker {
  color: var(--clickup-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.project-card-open {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 7px 11px;
  border: 1px solid var(--clickup-border);
  border-radius: 8px;
  background: #232323;
  color: #f3f4f6;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.project-card-open:hover {
  color: #fff;
  border-color: var(--clickup-border-strong);
}

.project-architecture-card p,
.project-card-architecture {
  margin: 0;
  color: #b8b8b8;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.project-card-architecture {
  display: -webkit-box;
  padding-top: 12px;
  border-top: 1px solid var(--clickup-border);
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.project-card-meta span {
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--clickup-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #c7c7c7;
  font-size: 12px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.modal-card-project {
  width: min(96vw, 1380px);
  height: min(94vh, 1100px);
  max-height: min(94vh, 1100px);
  padding: 0;
  overflow: hidden;
}

.modal-card-full {
  width: min(100vw, 100%);
  height: calc(100vh - 24px);
  max-height: calc(100vh - 24px);
  padding: 0;
  border-radius: 22px;
  overflow: hidden;
}

.modal-form-shell {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.modal-form-head,
.modal-form-actions {
  padding: 18px 24px;
  border-bottom: 1px solid var(--clickup-border);
  background: rgba(25, 25, 25, 0.96);
}

.modal-form-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.modal-form-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.modal-form-copy h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.modal-form-copy p {
  margin: 0;
  color: #a8a8a8;
  line-height: 1.55;
}

.modal-form-body {
  overflow: auto;
  padding: 22px 24px;
  background: #171717;
}

.modal-form-body-narrow {
  max-width: 880px;
  width: 100%;
  justify-self: center;
}

.modal-form-body-project {
  padding-bottom: 28px;
}

.modal-form-actions {
  border-top: 1px solid var(--clickup-border);
  border-bottom: 0;
}

.modal-form-actions-right {
  justify-content: flex-end;
  width: 100%;
}

.modal-project-grid {
  display: grid;
  grid-template-columns: minmax(320px, 440px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.modal-section-head {
  margin-bottom: 12px;
}

.modal-card-project .mindmap-stage-wrap,
.modal-card-full .mindmap-stage-wrap {
  max-height: 60vh;
}

.task-database-clickup .task-drawer-panel {
  width: min(92vw, 1320px);
  height: min(90vh, 920px);
}

@media (max-width: 1100px) {
  .modal-project-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .list-view-create-plus {
    width: 40px;
    height: 40px;
    min-width: 40px;
    font-size: 24px;
  }

  .modal-card-project,
  .modal-card-full {
    width: calc(100vw - 24px);
    height: calc(100vh - 24px);
    max-height: calc(100vh - 24px);
    border-radius: 18px;
  }

  .modal-form-head,
  .modal-form-body,
  .modal-form-actions {
    padding: 16px;
  }
}
.mobile-nav-toggle { display: none; }
.mobile-nav-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.48); backdrop-filter: blur(3px); z-index: 1090; }
.mobile-nav { position: fixed; top: 0; left: 0; bottom: 0; width: min(92vw, 380px); padding: 20px; background: var(--nav-surface); border-right: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32); overflow: auto; z-index: 1100; }
.mobile-nav-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 24px; }
.mobile-nav-close { flex: 0 0 auto; }
.mobile-workspace-links { gap: 12px; }

@media (max-width: 1100px) {
  .shell { grid-template-columns: 1fr; }
  .workspace-nav { display: none; }
  .nav-resizer { display: none; }
  .mobile-nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .content { padding: 20px; }
  .panel-grid { grid-template-columns: 1fr; }
  .bot-admin-layout { grid-template-columns: 1fr; }
  .mindmaps-layout { grid-template-columns: 1fr; }
  .mindmaps-sidebar { position: static; }
  .project-form-grid { grid-template-columns: 1fr; }
  .kanban-board { grid-template-columns: 1fr; }
  .archive-compact,
  .statistics-compact { grid-template-columns: 1fr; }
  .statistics-compact > .panel:first-child { grid-column: auto; }
  .task-page-layout { grid-template-columns: 1fr; }
  .composer-panel { position: static; }
  .workspace-center-layout { grid-template-columns: 1fr; }
  .explorer-panel { position: static; }
  .task-drawer-layout { grid-template-columns: 1fr; }
  .task-db-meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .topbar { flex-direction: column; align-items: stretch; }
  .topbar-main, .topbar-actions { width: 100%; }
  .topbar-actions { justify-content: space-between; }
  .content { padding: 18px; }
  .panel { padding: 18px; }
  .architecture-layout { grid-template-columns: 1fr; }
  .project-form-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .form-row { grid-template-columns: 1fr; }
  .data-table { display: block; overflow-x: auto; white-space: nowrap; }
  .data-table th, .data-table td { min-width: 140px; vertical-align: top; }
  .stats-grid { grid-template-columns: 1fr; }
  .task-card-top, .task-meta { flex-direction: column; align-items: flex-start; }
  .task-card-summary { flex-direction: column; align-items: flex-start; }
  .task-summary-meta { justify-content: flex-start; }
  .task-card-actions-row { justify-content: stretch; }
  .task-card-actions-row .button { width: 100%; }
  .workspace-hero { padding: 22px 20px; }
  .workspace-hero,
  .task-db-detail-head,
  .task-comments-head { flex-direction: column; align-items: flex-start; }
  .workspace-hero-actions { width: 100%; justify-items: stretch; }
  .workspace-hero-card,
  .workspace-hero-button { width: 100%; min-width: 0; }
  .task-db-meta-grid,
  .task-db-form-row { grid-template-columns: 1fr; }
  .archive-compact .task-meta,
  .statistics-compact .task-meta { grid-template-columns: 1fr; }
  .mindmap-stage-wrap { min-height: 360px; max-height: 60vh; }
  .mindmap-stage-wrap-wide { min-height: 360px; max-height: 360px; }
  .mindmaps-stage-wrap { min-height: 460px; max-height: 62vh; }
  .mindmap-toolbar { align-items: stretch; }
  .mindmap-toolbar-field,
  .mindmap-toolbar-field-wide { min-width: 100%; flex: 1 1 100%; }
  .user-row-head { flex-direction: column; align-items: flex-start; }
  .user-row-actions { flex-direction: column; align-items: stretch; }
  .user-password-form, .user-delete-form { width: 100%; }
  .modal-shell { padding: 12px; }
  .modal-card { width: min(100vw - 24px, 760px); max-height: calc(100vh - 24px); padding: 18px; }
  .feedback-modal { padding: 12px; }
  .feedback-modal-card { width: min(100vw - 24px, 520px); padding: 20px; }
  .feedback-modal-title { font-size: 24px; }
}

@media (max-width: 640px) {
  .topbar {
    display: grid;
    gap: 8px;
    padding: 10px;
  }
  .page-title { font-size: 20px; }
  .topbar-subtitle { font-size: 12px; }
  .content { padding: 14px; gap: 16px; }
  .panel-grid { gap: 16px; }
  .panel { border-radius: 16px; padding: 16px; }
  .button { width: 100%; }
  .topbar-main {
    justify-content: space-between;
  }
  .topbar-main .button {
    width: auto;
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 10px;
  }
  .topbar-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    align-items: stretch;
  }
  .topbar-user { display: none; }
  .topbar-actions form { width: auto; }
  .topbar-actions .button {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 13px;
  }
  .theme-toggle {
    justify-content: center;
    gap: 0;
    padding-inline: 8px;
  }
  .theme-toggle-label {
    display: none;
  }
  .workspace-links a, .workspace-chip, .project-row { padding: 12px; }
  .mobile-nav { width: min(100vw, 360px); padding: 16px; }
  .mobile-nav-header { flex-direction: column; align-items: stretch; }
  .task-card-summary, .task-card-details { padding-left: 14px; padding-right: 14px; }
  .task-drawer-header,
  .task-drawer-body { padding: 16px; }
  .task-drawer-main, .task-comments-card { padding: 16px; border-radius: 18px; }
  .task-database-table { min-width: 760px; }
  .login-card { padding: 24px; border-radius: 20px; }
}

.clickup-shell {
  --clickup-border: rgba(255, 255, 255, 0.08);
  --clickup-border-strong: rgba(255, 255, 255, 0.14);
  --clickup-muted: #9b9b9b;
  --clickup-text: #ebebeb;
  --clickup-surface: #191919;
  --clickup-surface-soft: #202020;
  --clickup-surface-alt: #252525;
  --clickup-surface-hover: #232323;
  --clickup-accent: #2383e2;
  --clickup-accent-soft: rgba(35, 131, 226, 0.18);
  --clickup-accent-strong: #0f6cbd;
}

.clickup-shell .workspace-center-layout {
  grid-template-columns: 1fr;
  gap: 16px;
}

.clickup-shell .clickup-explorer-panel,
.clickup-shell .list-view-panel {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--clickup-border);
  background: linear-gradient(180deg, #191919 0%, #171717 100%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.clickup-explorer-panel {
  position: static;
  padding: 14px 18px;
  display: grid;
  gap: 10px;
  background: #1d1d1d;
  border-top: 1px solid var(--clickup-border);
  border-bottom: 1px solid var(--clickup-border);
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  box-shadow: none;
}

.explorer-section,
.list-view-copy,
.list-view-header,
.list-view-toolbar {
  display: grid;
}

.explorer-section {
  gap: 10px;
}

.explorer-section-head {
  min-height: 34px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.explorer-title {
  margin: 4px 0 0;
  font-size: 16px;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--clickup-text);
}

.explorer-section-label {
  color: var(--clickup-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.explorer-mini-action,
.explorer-filter-chip,
.list-filter-chip,
.list-inline-toggle,
.list-inline-field,
.task-view-role {
  border: 1px solid var(--clickup-border);
  background: var(--clickup-surface-alt);
  color: #d7d7d7;
}

.explorer-mini-action {
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.explorer-toolbar-list {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.explorer-filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.explorer-filter-chip.is-active,
.list-filter-chip.is-active,
.list-view-switch.is-active {
  border-color: rgba(35, 131, 226, 0.4);
  background: var(--clickup-accent-soft);
  color: #f5f9ff;
}

.list-view-panel {
  padding: 0;
}

.list-view-header,
.list-view-toolbar {
  gap: 14px;
  padding-inline: 22px;
}

.list-view-header {
  padding-top: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--clickup-border);
  background:
    radial-gradient(circle at top left, rgba(35, 131, 226, 0.12), transparent 26%),
    radial-gradient(circle at top right, rgba(222, 146, 54, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(27, 27, 27, 0.98), rgba(22, 22, 22, 0.98));
}

.list-view-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--clickup-muted);
  font-size: 12px;
  font-weight: 700;
}

.list-view-breadcrumbs strong {
  color: #fff;
}

.list-view-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px 22px;
  align-items: center;
}

.list-view-copy {
  gap: 6px;
  min-width: 0;
}

.list-view-kicker {
  color: #d2d2d2;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.list-view-copy h1 {
  margin: 0;
  color: #f5f5f5;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.list-view-copy p {
  margin: 0;
  max-width: 780px;
  color: #a8a8a8;
  font-size: 14px;
  line-height: 1.6;
}

.list-view-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.clickup-shell .list-view-actions .button,
.clickup-shell .list-view-actions .button-secondary,
.clickup-shell .task-drawer-header .button,
.clickup-shell .task-drawer-header .button-secondary {
  width: auto;
  min-height: 38px;
  padding-inline: 14px;
  border-radius: 10px;
  border-color: var(--clickup-border);
}

.clickup-shell .list-view-actions .button,
.clickup-shell .task-drawer-header .button {
  background: var(--clickup-accent);
  color: #fff;
}

.clickup-shell .list-view-actions .button-secondary,
.clickup-shell .task-drawer-header .button-secondary {
  background: var(--clickup-surface-alt);
  color: #d7d7d7;
}

.list-view-switch,
.list-view-create {
  width: auto;
  min-width: 102px;
  min-height: 40px;
}

.list-view-meta,
.list-filter-cluster,
.list-toolbar-controls,
.list-toolbar-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.list-view-meta {
  padding-top: 2px;
}

.list-view-toolbar {
  padding-top: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--clickup-border);
  background: #1b1b1b;
}

.list-view-panel-all-tasks .list-view-header {
  gap: 12px;
  padding-top: 16px;
  padding-bottom: 12px;
  background:
    linear-gradient(180deg, rgba(29, 29, 29, 0.98), rgba(20, 20, 20, 0.98));
}

.list-view-panel-all-tasks .list-view-copy h1 {
  font-size: clamp(24px, 2.3vw, 32px);
}

.list-view-panel-all-tasks .list-view-toolbar {
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--clickup-border);
  border-radius: 12px;
  background: rgba(12, 12, 12, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.task-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.task-board-stats {
  min-width: 0;
  padding-top: 0;
}

.task-board-actions {
  flex: 0 0 auto;
}

.task-board-actions .list-view-switch {
  min-width: 86px;
}

.task-board-actions .list-view-create-plus {
  width: 48px;
  min-width: 48px;
  padding-inline: 0;
  font-size: 26px;
  line-height: 1;
}

.task-filter-bar {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.task-filter-search {
  min-width: 0;
  min-height: 44px;
  background: rgba(255, 255, 255, 0.035);
}

.task-filter-fields {
  display: grid;
  grid-template-columns: minmax(168px, 0.9fr) minmax(190px, 1fr) minmax(112px, 0.58fr) minmax(160px, 0.82fr) minmax(250px, 1.25fr);
  gap: 8px;
  min-width: 0;
  align-items: stretch;
}

.task-filter-field,
.task-filter-toggle {
  min-width: 0;
  background: rgba(255, 255, 255, 0.035);
}

.task-filter-field {
  display: grid;
  gap: 3px;
  align-content: center;
  padding: 7px 10px;
}

.task-filter-field span,
.task-filter-toggle span {
  line-height: 1.15;
}

.task-filter-field select {
  min-width: 0;
  width: 100%;
  min-height: 24px;
  padding-right: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-filter-toggle {
  justify-content: center;
  padding-inline: 10px;
}

.task-command-bar {
  grid-template-columns: minmax(300px, 1.15fr) minmax(0, 2fr) auto;
  align-items: center;
}

.task-command-search {
  min-width: 0;
}

.task-command-fields {
  min-width: 0;
  justify-content: flex-end;
}

.task-command-field,
.task-command-toggle {
  background: rgba(255, 255, 255, 0.035);
}

.task-command-field {
  flex: 0 1 180px;
}

.task-command-field-priority {
  flex-basis: 150px;
}

.task-command-field-sort {
  flex-basis: 230px;
}

.task-command-field select {
  max-width: 100%;
}

.task-command-toggle {
  flex: 0 0 auto;
}

.task-command-summary {
  justify-content: flex-end;
}

.task-command-summary .task-view-role {
  min-height: 34px;
  background: transparent;
}

.list-toolbar-main {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.list-toolbar-filters,
.list-filter-group {
  display: flex;
  align-items: center;
  min-width: 0;
}

.list-toolbar-filters {
  gap: 10px;
  flex-wrap: wrap;
}

.list-filter-group {
  flex: 1 1 360px;
  gap: 8px;
}

.list-filter-group-projects {
  flex-basis: 260px;
}

.list-filter-label {
  flex: 0 0 auto;
  color: var(--clickup-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.list-filter-group .list-filter-cluster,
.list-filter-group .explorer-toolbar-list {
  min-width: 0;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.list-view-panel-all-tasks .list-filter-chip,
.list-view-panel-all-tasks .explorer-filter-chip {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 12px;
}

.list-view-panel-all-tasks .list-toolbar-search,
.list-view-panel-all-tasks .list-inline-toggle,
.list-view-panel-all-tasks .list-inline-field,
.list-view-panel-all-tasks .task-view-role {
  min-height: 36px;
  border-radius: 9px;
}

.list-view-panel-all-tasks .list-inline-field select {
  min-height: 34px;
}

.list-view-panel-all-tasks .list-toolbar-summary {
  flex: 0 0 auto;
}

.list-view-panel > .clickup-explorer-panel {
  margin: 0;
}

.list-toolbar-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--clickup-border);
  background: #232323;
}

.list-toolbar-search span,
.list-inline-field span,
.task-view-role.is-muted,
.task-db-brief,
.task-db-project,
.task-db-assignees,
.task-db-due,
.task-db-updated {
  color: var(--clickup-muted);
}

.list-toolbar-search span {
  font-size: 14px;
  font-weight: 700;
}

.clickup-shell .list-toolbar-search input,
.clickup-shell .list-inline-field select,
.clickup-shell .task-drawer-panel input,
.clickup-shell .task-drawer-panel select,
.clickup-shell .task-drawer-panel textarea {
  color: #f0f0f0;
  background: transparent;
  border-color: var(--clickup-border);
  box-shadow: none;
}

.clickup-shell .task-drawer-panel input,
.clickup-shell .task-drawer-panel select,
.clickup-shell .task-drawer-panel textarea {
  background: #252525;
}

.clickup-shell .task-drawer-panel label span,
.clickup-shell .task-drawer-panel legend,
.clickup-shell .task-drawer-panel .caption {
  color: #a8a8a8;
}

.clickup-shell .list-toolbar-search input {
  border: 0;
  padding: 0;
  min-height: 40px;
}

.list-filter-chip {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.list-inline-toggle,
.list-inline-field,
.task-view-role {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
}

.list-inline-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.list-inline-field span,
.task-view-role {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.list-inline-field select {
  border: 0;
  padding: 0 20px 0 0;
  min-width: 0;
  min-height: 38px;
}

.list-view-panel-all-tasks .task-filter-field {
  display: grid;
  gap: 3px;
  align-content: center;
  min-height: 58px;
  padding: 7px 10px;
}

.list-view-panel-all-tasks .task-filter-field select {
  width: 100%;
  min-height: 26px;
  padding-right: 18px;
  line-height: 1.2;
}

.list-view-panel-all-tasks .task-filter-toggle {
  display: inline-flex;
  min-height: 58px;
  justify-content: center;
}

.task-view-role strong {
  color: #fff;
}

.task-database-clickup {
  padding: 0;
}

.task-database-clickup .task-table-scroll {
  overflow: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  scrollbar-gutter: stable both-edges;
}

.task-database-clickup .task-database-table {
  min-width: 1710px;
  table-layout: fixed;
}

.task-database-clickup.task-table-projectless .task-database-table {
  min-width: 1480px;
}

.task-database-clickup.task-table-has-module .task-database-table {
  min-width: 1650px;
}

.project-database .task-database-table {
  min-width: 1360px;
}

.task-database-clickup .task-database-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  padding: 9px 12px;
  background: #191919;
  color: #7f7f7f;
  font-size: 11px;
  font-weight: 700;
  border-bottom: 1px solid var(--clickup-border);
  text-align: left;
  white-space: nowrap;
}

.task-db-head-label {
  display: inline-block;
  margin-right: 8px;
  color: #676767;
  font-size: 12px;
  font-weight: 700;
}

.task-database-clickup .task-database-table thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 6;
  width: 360px;
  min-width: 360px;
  background: #191919;
  box-shadow: 1px 0 0 var(--clickup-border);
}

.task-database-clickup .task-col-primary { width: 360px; min-width: 360px; }
.task-database-clickup .task-col-spec { width: 270px; }
.task-database-clickup .task-col-owner { width: 190px; }
.task-database-clickup .task-col-created { width: 150px; }
.task-database-clickup .task-col-due { width: 150px; }
.task-database-clickup .task-col-module { width: 160px; }
.task-database-clickup .task-col-tester { width: 230px; }
.task-database-clickup .task-col-priority { width: 160px; }
.task-database-clickup .task-col-status,
.task-database-clickup .task-col-test { width: 170px; }

.project-database .task-database-table thead th:first-child {
  width: 72px;
  min-width: 72px;
}

.project-database .task-database-table thead th:nth-child(2),
.project-database .task-db-primary-cell {
  width: 300px;
  min-width: 300px;
}

.project-database .task-database-table thead th:nth-child(3) { width: 260px; }
.project-database .task-database-table thead th:nth-child(4),
.project-database .task-database-table thead th:nth-child(7) { width: 170px; }
.project-database .task-database-table thead th:nth-child(5),
.project-database .task-database-table thead th:nth-child(6) { width: 140px; }
.project-database .task-database-table thead th:nth-child(8) { width: 150px; }
.project-database .task-database-table thead th:nth-child(9),
.project-database .task-database-table thead th:nth-child(10) { width: 120px; }

.project-database .project-db-open-cell {
  width: 72px;
  min-width: 72px;
}

.task-database-clickup .task-db-row td {
  padding: 0 12px;
  background: #191919;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  height: 44px;
  color: #e8e8e8;
  vertical-align: middle;
}

.task-database-clickup .task-db-row:hover td {
  background: var(--clickup-surface-hover);
}

.task-database-clickup .task-db-row td:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #191919;
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.06);
}

.task-database-clickup .task-db-row:hover td:first-child {
  background: var(--clickup-surface-hover);
}

.project-database.task-database-clickup .task-db-row td {
  height: 40px;
  padding: 0 10px;
}

.task-database-clickup .task-db-primary-cell {
  width: 360px;
  min-width: 360px;
}

.project-database.task-database-clickup .task-db-primary-cell {
  width: 300px;
  min-width: 300px;
}

.project-database.task-database-clickup .task-db-title-block {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.project-database.task-database-clickup .task-db-title-block strong {
  flex: 0 1 auto;
  min-width: 0;
}

.project-database.task-database-clickup .task-db-row-flags {
  flex: 0 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
  gap: 4px;
  overflow: hidden;
}

.project-database.task-database-clickup .task-inline-badge {
  min-height: 16px;
  max-width: 96px;
  padding: 1px 5px;
  overflow: hidden;
  line-height: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-database-clickup .task-db-expand,
.task-database-clickup .task-db-expand-link {
  display: flex;
  width: 100%;
  gap: 10px;
  align-items: center;
  padding: 7px 0;
  color: inherit;
  text-decoration: none;
}

.task-database-clickup .task-db-leading {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  flex: 0 0 auto;
  padding-top: 0;
}

.task-db-file-icon {
  position: relative;
  width: 14px;
  height: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.02);
}

.task-db-file-icon::after {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 6px;
  height: 6px;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
  background: rgba(255, 255, 255, 0.12);
  border-top-right-radius: 2px;
}

.task-database-clickup .task-db-expand-icon {
  width: 18px;
  height: 18px;
  margin-top: 0;
  background: #2a2a2a;
}

.task-database-clickup .task-db-expand-icon::before {
  width: 7px;
  height: 7px;
  border-right-width: 2px;
  border-bottom-width: 2px;
  border-color: #8b8b8b;
}

.task-db-state-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #8a8a8a;
  box-shadow: 0 0 0 4px rgba(138, 138, 138, 0.16);
}

.task-db-state-dot[data-task-state="К выполнению"] {
  background: #7b7b7b;
  box-shadow: 0 0 0 4px rgba(123, 123, 123, 0.16);
}

.task-db-state-dot[data-task-state="В работе"] {
  background: #2383e2;
  box-shadow: 0 0 0 4px rgba(35, 131, 226, 0.16);
}

.task-db-state-dot[data-task-state="Готово"] {
  background: #4ea36e;
  box-shadow: 0 0 0 4px rgba(78, 163, 110, 0.16);
}

.task-db-state-dot[data-task-state="ТЗ"] {
  background: #d29a47;
  box-shadow: 0 0 0 4px rgba(210, 154, 71, 0.16);
}

.task-db-state-dot[data-task-state="Доработка ТЗ"] {
  background: #d29a47;
  box-shadow: 0 0 0 4px rgba(210, 154, 71, 0.16);
}

.task-db-state-dot[data-task-state="Не актуально"] {
  background: #965e5e;
  box-shadow: 0 0 0 4px rgba(150, 94, 94, 0.16);
}

.task-db-state-dot[data-task-state="Неактуально"] {
  background: #965e5e;
  box-shadow: 0 0 0 4px rgba(150, 94, 94, 0.16);
}

.task-database-clickup .task-db-title-block {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.task-database-clickup .task-db-title-block strong {
  font-size: 13px;
  line-height: 1.2;
  color: #f4f4f4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-db-row-flags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.task-db-title-block-tight .task-db-row-flags {
  flex-wrap: nowrap;
}

.task-inline-badge {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 2px 6px;
  border-radius: 6px;
  background: #2a2a2a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #bbbbbb;
  font-size: 10px;
  font-weight: 700;
}

.task-inline-badge-module {
  background: rgba(164, 120, 58, 0.22);
  color: #efc28f;
  border-color: rgba(164, 120, 58, 0.16);
}

.task-db-empty {
  color: #858585;
}

.task-db-brief,
.task-database-clickup .task-db-project,
.task-database-clickup .task-db-assignees,
.task-database-clickup .task-db-due,
.task-database-clickup .task-db-updated {
  font-size: 12px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.task-db-brief {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.task-database-clickup .task-db-row td.task-db-brief,
.task-database-clickup .task-db-row td.task-db-project,
.task-database-clickup .task-db-row td.task-db-assignees,
.task-database-clickup .task-db-row td.task-db-due,
.task-database-clickup .task-db-row td.task-db-updated {
  display: table-cell;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-database-clickup .task-db-project,
.task-database-clickup .task-db-assignees,
.task-database-clickup .task-db-due {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-database-clickup .task-db-updated {
  white-space: nowrap;
}

.task-database-clickup .task-state-pill,
.task-database-clickup .task-priority-pill {
  min-height: 20px;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.task-database-clickup .task-state-pill {
  background: #2f2f2f;
  color: #d7d7d7;
}

.task-database-clickup .task-state-pill.is-testing {
  background: #3a2f1f;
  color: #f0c98b;
}

.task-database-clickup .task-state-pill[data-task-state="К выполнению"] {
  background: #303030;
  color: #d2d2d2;
}

.task-database-clickup .task-state-pill[data-task-state="В работе"] {
  background: rgba(35, 131, 226, 0.22);
  color: #9dceff;
}

.task-database-clickup .task-state-pill[data-task-state="Готово"] {
  background: rgba(78, 163, 110, 0.22);
  color: #aee0bf;
}

.task-database-clickup .task-state-pill[data-task-state="ТЗ"] {
  background: rgba(210, 154, 71, 0.2);
  color: #efca92;
}

.task-database-clickup .task-state-pill[data-task-state="Доработка ТЗ"],
.task-database-clickup .task-state-pill[data-task-state="В тестировке"] {
  background: rgba(210, 154, 71, 0.2);
  color: #efca92;
}

.task-database-clickup .task-state-pill[data-task-state="Не актуально"] {
  background: rgba(150, 94, 94, 0.22);
  color: #deb0b0;
}

.task-database-clickup .task-state-pill[data-task-state="Неактуально"] {
  background: rgba(150, 94, 94, 0.22);
  color: #deb0b0;
}

.task-database-clickup .task-state-pill[data-task-state="Оттестированно"] {
  background: rgba(78, 163, 110, 0.22);
  color: #aee0bf;
}

.task-database-clickup .task-state-pill[data-task-state="Не требует тестировки"] {
  background: #303030;
  color: #d2d2d2;
}

.task-database-clickup .task-priority-pill {
  background: rgba(222, 146, 54, 0.18);
  color: #efbf86;
}

.task-database-clickup .task-priority-pill[data-priority="не срочно"] {
  background: #303030;
  color: #cbcbcb;
}

.task-database-clickup .task-priority-pill[data-priority="срочно"] {
  background: rgba(176, 88, 56, 0.26);
  color: #f0b18a;
}

.task-database-clickup .task-priority-pill[data-priority="критично"] {
  background: rgba(120, 88, 183, 0.26);
  color: #c7b0ff;
}

.task-database-clickup [data-task-empty-row] td,
.project-database .empty-state {
  padding: 16px;
}

.task-database-clickup .empty-state {
  border-radius: 12px;
  background: #232323;
  color: var(--clickup-muted);
}

.task-drawer-shell {
  position: fixed;
  inset: 0;
  z-index: 1700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.task-database-clickup .task-drawer-backdrop {
  background: rgba(0, 0, 0, 0.28);
}

.task-database-clickup .task-drawer-panel {
  position: relative;
  z-index: 1;
  inset: auto;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  margin: auto;
  width: min(94vw, 1480px);
  max-width: calc(100vw - 36px);
  height: min(94vh, 980px);
  max-height: calc(100vh - 36px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-radius: 24px;
  background: linear-gradient(180deg, #191919, #171717);
  border: 1px solid var(--clickup-border);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
  color: #f0f0f0;
  overflow: hidden;
}

.task-database-clickup .task-drawer-header {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 16px 22px;
  background: rgba(25, 25, 25, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--clickup-border);
}

.task-drawer-header-copy {
  min-width: 0;
}

.task-database-clickup .task-drawer-title {
  margin-top: 4px;
  color: #f4f4f4;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.task-database-clickup .task-drawer-body {
  min-height: 0;
  overflow: auto;
  padding: 22px;
}

.task-database-clickup .task-drawer-content {
  max-width: none;
  min-height: 100%;
}

.task-database-clickup .task-drawer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 20px;
  align-items: start;
  min-height: 100%;
}

.task-database-clickup .task-drawer-side {
  display: grid;
  gap: 18px;
  align-content: start;
  min-height: 0;
}

.task-drawer-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: flex-start;
}

.task-drawer-hero-copy {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.task-drawer-hero h3 {
  margin: 2px 0 0;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.05em;
  color: #f4f4f4;
  overflow-wrap: anywhere;
}

.task-drawer-hero-meta,
.task-db-detail-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.task-database-clickup .task-drawer-main,
.task-database-clickup .task-comments-card,
.task-database-clickup .task-db-meta-grid > div,
.task-database-clickup .choice-group {
  background: #232323;
  border: 1px solid var(--clickup-border);
  box-shadow: none;
}

.task-database-clickup .task-drawer-main,
.task-database-clickup .task-comments-card {
  gap: 14px;
  padding: 20px;
  border-radius: 16px;
  min-height: 0;
}

.task-database-clickup .task-drawer-panel .choice-list {
  max-height: clamp(140px, 20vh, 220px);
}

.task-database-clickup .task-edit-card {
  align-self: start;
}

.task-database-clickup .task-db-meta-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.task-database-clickup .task-db-meta-grid > div {
  padding: 12px 14px;
  border-radius: 12px;
}

.task-database-clickup .task-db-meta-grid strong,
.task-database-clickup .task-drawer-section-head strong {
  color: #f0f0f0;
}

.task-drawer-section {
  display: grid;
  gap: 12px;
  padding-top: 4px;
}

.task-drawer-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.task-drawer-section-head strong {
  display: block;
  font-size: 15px;
}

.task-drawer-section-head span {
  display: block;
  margin-top: 4px;
  color: #9f9f9f;
  font-size: 13px;
  line-height: 1.45;
}

.task-database-clickup .task-db-description,
.task-database-clickup .task-comment,
.task-database-clickup .task-comment-placeholder {
  background: #1d1d1d;
  border: 1px solid var(--clickup-border);
  color: #d8d8d8;
}

.task-database-clickup .task-db-description {
  font-size: 14px;
  line-height: 1.7;
}

.task-database-clickup .task-comments-card {
  position: static;
  align-self: stretch;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.task-database-clickup .task-comments-list {
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
  max-height: none;
}

.task-database-clickup .task-db-form-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1200px) {
  .task-database-clickup .task-drawer-panel {
    width: min(96vw, 1320px);
    height: min(95vh, 960px);
  }
}

@media (max-width: 900px) {
  .list-view-topline,
  .task-drawer-hero {
    grid-template-columns: 1fr;
  }

  .task-board-head {
    align-items: flex-start;
    flex-direction: column-reverse;
  }

  .task-board-actions {
    width: 100%;
  }

  .task-filter-bar {
    grid-template-columns: 1fr;
  }

  .task-filter-fields {
    grid-template-columns: repeat(2, minmax(190px, 1fr));
  }

  .task-filter-toggle {
    justify-content: flex-start;
  }

  .task-command-bar {
    grid-template-columns: 1fr;
  }

  .task-command-fields {
    justify-content: flex-start;
  }

  .list-toolbar-main {
    grid-template-columns: 1fr;
  }

  .task-database-clickup .task-drawer-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .list-view-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .list-toolbar-controls {
    align-items: stretch;
  }

  .list-inline-toggle,
  .list-inline-field {
    width: 100%;
    justify-content: space-between;
  }

  .task-database-clickup .task-drawer-layout,
  .task-database-clickup .task-db-meta-grid,
  .task-database-clickup .task-db-form-row {
    grid-template-columns: 1fr;
  }

  .task-database-clickup .task-drawer-panel {
    width: min(96vw, 1120px);
    height: min(96vh, 960px);
  }
}

@media (max-width: 640px) {
  .list-view-header,
  .list-view-toolbar {
    padding-inline: 14px;
  }

  .list-view-panel-all-tasks .list-view-header {
    padding-inline: 14px;
  }

  .list-view-panel-all-tasks .list-view-toolbar {
    padding: 8px;
  }

  .task-filter-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-board-actions .list-view-switch,
  .task-board-actions .list-view-create-plus {
    width: auto;
    min-width: 0;
  }

  .task-board-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .clickup-shell .task-board-actions .button,
  .clickup-shell .task-board-actions .button-secondary {
    width: 100%;
    min-width: 0;
  }

  .task-command-field,
  .task-command-field-priority,
  .task-command-field-sort,
  .task-command-toggle,
  .task-command-summary {
    flex: 1 1 100%;
    width: 100%;
  }

  .task-command-summary {
    justify-content: flex-start;
  }

  .list-filter-group {
    flex: 1 1 100%;
  }

  .list-filter-label {
    width: 64px;
  }

  .list-view-copy h1 {
    font-size: 30px;
  }

  .task-database-clickup .task-drawer-panel {
    width: calc(100vw - 16px);
    max-width: none;
    height: calc(100vh - 16px);
    border-radius: 18px;
  }

  .task-database-clickup .task-drawer-body,
  .task-database-clickup .task-drawer-header {
    padding: 14px;
  }

  .task-database-clickup .task-drawer-content {
    max-width: none;
  }

  .explorer-toolbar-list,
  .list-filter-cluster,
  .list-toolbar-summary,
  .list-view-meta {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .task-database-clickup .task-drawer-title {
    font-size: 22px;
  }

  .clickup-shell {
    margin-inline: -4px;
  }

  .clickup-shell .list-view-panel {
    border-radius: 14px;
  }

  .list-view-panel-all-tasks .list-view-header,
  .list-view-header {
    gap: 10px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .task-board-stats,
  .list-view-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    overflow: visible;
  }

  .task-view-role {
    min-width: 0;
    min-height: 30px;
    padding: 5px 7px;
    font-size: 11px;
    white-space: normal;
    line-height: 1.2;
  }

  .list-view-panel-all-tasks .list-view-toolbar {
    border-radius: 10px;
  }

  .task-filter-search {
    min-height: 38px;
    padding-inline: 10px;
  }

  .clickup-shell .list-toolbar-search input {
    min-height: 36px;
    font-size: 16px;
  }

  .task-filter-fields {
    gap: 6px;
  }

  .list-view-panel-all-tasks .task-filter-field,
  .list-view-panel-all-tasks .task-filter-toggle {
    min-height: 38px;
    padding: 5px 8px;
  }

  .task-filter-field span,
  .task-filter-toggle span,
  .list-inline-field span {
    font-size: 10px;
    letter-spacing: 0.02em;
  }

  .list-view-panel-all-tasks .task-filter-field select {
    min-height: 26px;
    font-size: 12px;
  }

  .list-view-panel-all-tasks .task-filter-toggle {
    justify-content: flex-start;
  }

  .task-database-clickup .task-table-scroll {
    overflow: visible;
    padding: 10px;
    background: #171717;
  }

  .task-database-clickup .task-database-table,
  .task-database-clickup.task-table-projectless .task-database-table,
  .task-database-clickup.task-table-has-module .task-database-table {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .task-database-clickup .task-database-table thead {
    display: none;
  }

  .task-database-clickup .task-database-table tbody {
    display: grid;
    gap: 10px;
  }

  .task-database-clickup .task-db-row {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--clickup-border);
    border-radius: 12px;
    background: #1b1b1b;
  }

  .task-database-clickup .task-db-row td,
  .task-database-clickup .task-db-row td:first-child {
    position: static;
    left: auto;
    display: grid;
    grid-template-columns: minmax(76px, 0.34fr) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 38px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--clickup-border);
    background: transparent;
    box-shadow: none;
    white-space: normal;
  }

  .task-database-clickup .task-db-row td:last-child {
    border-bottom: 0;
  }

  .task-database-clickup .task-db-row td::before {
    content: attr(data-label);
    color: var(--clickup-muted);
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .task-database-clickup .task-db-row .task-db-primary-cell {
    display: block;
    grid-template-columns: 1fr;
    padding: 10px;
    background: rgba(255, 255, 255, 0.025);
  }

  .task-database-clickup .task-db-row .task-db-primary-cell::before {
    display: none;
  }

  .task-database-clickup .task-db-expand {
    position: relative;
    display: block;
    min-width: 0;
    width: 100%;
    min-height: 32px;
    padding: 0 0 0 38px;
  }

  .task-database-clickup .task-db-leading {
    position: absolute;
    left: 0;
    top: 3px;
    gap: 7px;
  }

  .task-database-clickup .task-db-title-block {
    display: block;
    width: min(260px, calc(100vw - 124px));
    max-width: none;
    min-width: min(220px, 100%);
  }

  .task-database-clickup .task-db-title-block strong {
    display: block;
    width: min(260px, calc(100vw - 124px));
    max-width: 100%;
    white-space: normal;
    font-size: 14px;
    line-height: 1.25;
    overflow-wrap: break-word;
    word-break: normal;
  }

  .task-database-clickup .task-db-row td.task-db-brief,
  .task-database-clickup .task-db-row td.task-db-project,
  .task-database-clickup .task-db-row td.task-db-assignees,
  .task-database-clickup .task-db-row td.task-db-due,
  .task-database-clickup .task-db-row td.task-db-updated {
    display: grid;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .task-database-clickup .task-db-brief {
    -webkit-line-clamp: 2;
  }

  .task-database-clickup .task-db-tester-stack {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .task-db-person-list {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .task-inline-status-select {
    min-height: 30px;
    font-size: 12px;
  }

  .task-database-clickup .empty-state {
    padding: 14px;
  }
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3efe7;
  --bg-strong: #fffdf9;
  --surface: rgba(255, 252, 246, 0.88);
  --surface-muted: #f3ecdf;
  --surface-strong: #fffaf2;
  --line: rgba(98, 79, 52, 0.14);
  --line-strong: rgba(98, 79, 52, 0.2);
  --text: #1f2328;
  --muted: #6c655d;
  --accent: #0f72c9;
  --accent-soft: rgba(15, 114, 201, 0.12);
  --accent-strong: #0958a8;
  --nav-surface: rgba(255, 252, 246, 0.92);
  --nav-surface-muted: rgba(98, 79, 52, 0.055);
  --nav-surface-hover: rgba(15, 114, 201, 0.08);
  --nav-text: #2e3338;
  --nav-muted: #746a60;
  --nav-active: rgba(15, 114, 201, 0.11);
  --nav-active-text: #103f6f;
  --success: #2c8a5b;
  --warning: #b06a10;
  --danger: #c04d4d;
  --shadow: 0 24px 60px rgba(112, 89, 56, 0.12);
  --shadow-soft: 0 12px 28px rgba(112, 89, 56, 0.08);
}

html[data-theme="light"] body {
  background:
    radial-gradient(circle at top left, rgba(15, 114, 201, 0.12), transparent 26%),
    radial-gradient(circle at top right, rgba(217, 144, 65, 0.12), transparent 24%),
    linear-gradient(180deg, #fcf9f3 0%, var(--bg) 100%);
}

html[data-theme="light"] .nav-resizer::after {
  background: rgba(98, 79, 52, 0.12);
}

html[data-theme="light"] .nav-resizer-light::after {
  background: rgba(98, 79, 52, 0.18);
}

html[data-theme="light"] .workspace-nav,
html[data-theme="light"] .topbar {
  background: var(--nav-surface);
  border-color: var(--line);
}

html[data-theme="light"] .workspace-brand-mark {
  background: linear-gradient(135deg, #1a6dc2, #4aa3f0);
  box-shadow: 0 14px 30px rgba(15, 114, 201, 0.2);
}

html[data-theme="light"] .workspace-links a,
html[data-theme="light"] .workspace-chip,
html[data-theme="light"] .project-row {
  color: var(--text);
}

html[data-theme="light"] .workspace-links a:hover,
html[data-theme="light"] .workspace-chip:hover,
html[data-theme="light"] .project-row:hover,
html[data-theme="light"] .tabs a:hover {
  background: rgba(15, 114, 201, 0.08);
  border-color: rgba(15, 114, 201, 0.14);
}

html[data-theme="light"] .theme-toggle,
html[data-theme="light"] .search-shell,
html[data-theme="light"] .topbar-user {
  background: rgba(255, 255, 255, 0.78);
  border-color: var(--line);
  box-shadow: none;
}

html[data-theme="light"] .settings-summary-item {
  background: rgba(82, 96, 113, 0.06);
}

html[data-theme="light"] .theme-toggle-glyph,
html[data-theme="light"] .search-shell span {
  background: rgba(15, 114, 201, 0.1);
  color: var(--accent);
}

html[data-theme="light"] .button-secondary {
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  border-color: var(--line);
}

html[data-theme="light"] .search {
  background: transparent;
}

html[data-theme="light"] .tabs a,
html[data-theme="light"] .choice-group,
html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] select,
html[data-theme="light"] .table-scroll,
html[data-theme="light"] .user-row-card,
html[data-theme="light"] .workspace-card,
html[data-theme="light"] .task-card,
html[data-theme="light"] .task-full-text,
html[data-theme="light"] .workspace-hero-card,
html[data-theme="light"] .activity-item,
html[data-theme="light"] .stat,
html[data-theme="light"] .empty-state,
html[data-theme="light"] .task-comment,
html[data-theme="light"] .task-db-description,
html[data-theme="light"] .kanban-column,
html[data-theme="light"] .kanban-card,
html[data-theme="light"] .mobile-nav,
html[data-theme="light"] .login-card,
html[data-theme="light"] .mindmap-toolbar,
html[data-theme="light"] .mindmap-stage-wrap,
html[data-theme="light"] .diagram-canvas,
html[data-theme="light"] .modal-card,
html[data-theme="light"] .database-panel,
html[data-theme="light"] .composer-panel,
html[data-theme="light"] .explorer-panel {
  background: rgba(255, 253, 249, 0.9);
  border-color: var(--line);
  color: var(--text);
}

html[data-theme="light"] .workspace-card {
  background: linear-gradient(180deg, #fffdf8, #f6efe4);
}

html[data-theme="light"] .task-card-collapsible[open] .task-card-summary,
html[data-theme="light"] .project-db-open-button {
  background: #f3ecdf;
}

html[data-theme="light"] .task-open-hint {
  background: #ece4d7;
  color: var(--muted);
}

html[data-theme="light"] .task-card-collapsible[open] .task-open-hint {
  background: rgba(15, 114, 201, 0.12);
  color: var(--accent);
}

html[data-theme="light"] .workspace-hero {
  background:
    radial-gradient(circle at top right, rgba(15, 114, 201, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(255, 252, 246, 0.98), rgba(247, 240, 229, 0.98));
  border-color: var(--line);
}

html[data-theme="light"] .explorer-item {
  background: rgba(255, 253, 249, 0.94);
  border-color: var(--line);
}

html[data-theme="light"] .explorer-item.is-active {
  background: rgba(15, 114, 201, 0.08);
  border-color: rgba(15, 114, 201, 0.16);
}

html[data-theme="light"] .explorer-item-mark {
  background: #efe6d8;
  color: #5a5147;
}

html[data-theme="light"] .task-table-scroll,
html[data-theme="light"] .task-db-row td,
html[data-theme="light"] .task-drawer-header,
html[data-theme="light"] .task-drawer-main,
html[data-theme="light"] .task-comments-card {
  background: rgba(255, 253, 249, 0.92);
}

html[data-theme="light"] .task-database-table thead th {
  background: rgba(247, 240, 229, 0.96);
}

html[data-theme="light"] .task-db-expand-icon {
  background: #ece4d7;
}

html[data-theme="light"] .task-db-expand-icon::before {
  border-color: #6b635a;
}

html[data-theme="light"] .task-db-assignees,
html[data-theme="light"] .task-db-project,
html[data-theme="light"] .task-db-due,
html[data-theme="light"] .task-comment-body {
  color: #4b5563;
}

html[data-theme="light"] .login-screen {
  background:
    radial-gradient(circle at top left, rgba(15, 114, 201, 0.12), transparent 28%),
    linear-gradient(180deg, #fcf9f3, #f1ebe2);
}

html[data-theme="light"] .diagram-canvas,
html[data-theme="light"] .mindmap-stage-wrap {
  background: linear-gradient(180deg, #fffdf9, #f5eee2);
}

html[data-theme="light"] .kanban-open-button {
  background: #198754;
}

html[data-theme="light"] .mobile-nav {
  background: var(--nav-surface);
  box-shadow: 0 24px 60px rgba(112, 89, 56, 0.16);
}

html[data-theme="light"] .modal-backdrop,
html[data-theme="light"] .mobile-nav-backdrop,
html[data-theme="light"] .task-drawer-backdrop {
  background: rgba(37, 31, 22, 0.24);
}

html[data-theme="light"] .modal-form-head,
html[data-theme="light"] .modal-form-actions {
  background: rgba(255, 250, 244, 0.96);
  border-color: var(--line);
}

html[data-theme="light"] .modal-form-copy p {
  color: var(--muted);
}

html[data-theme="light"] .modal-form-body {
  background: #f7f2e9;
}

html[data-theme="light"] .clickup-shell {
  --clickup-border: rgba(70, 82, 96, 0.12);
  --clickup-border-strong: rgba(70, 82, 96, 0.18);
  --clickup-muted: #736b63;
  --clickup-text: #1f2328;
  --clickup-surface: #fffdf8;
  --clickup-surface-soft: #f6f0e6;
  --clickup-surface-alt: #f2ebe0;
  --clickup-surface-hover: #ece3d6;
  --clickup-accent: #0f72c9;
  --clickup-accent-soft: rgba(15, 114, 201, 0.1);
  --clickup-accent-strong: #0958a8;
}

html[data-theme="light"] .clickup-shell .clickup-explorer-panel,
html[data-theme="light"] .clickup-shell .list-view-panel {
  background: linear-gradient(180deg, #fffdf8 0%, #f9f3e8 100%);
  border-color: var(--clickup-border);
  box-shadow: var(--shadow-soft);
}

html[data-theme="light"] .clickup-shell .clickup-explorer-panel,
html[data-theme="light"] .clickup-shell .list-view-toolbar,
html[data-theme="light"] .clickup-shell .list-toolbar-search,
html[data-theme="light"] .clickup-shell .explorer-mini-action,
html[data-theme="light"] .clickup-shell .explorer-filter-chip,
html[data-theme="light"] .clickup-shell .list-filter-chip,
html[data-theme="light"] .clickup-shell .list-inline-toggle,
html[data-theme="light"] .clickup-shell .list-inline-field,
html[data-theme="light"] .clickup-shell .project-view-meta,
html[data-theme="light"] .clickup-shell .task-view-role,
html[data-theme="light"] .clickup-shell .task-drawer-main,
html[data-theme="light"] .clickup-shell .task-comments-card,
html[data-theme="light"] .clickup-shell .task-db-meta-grid > div,
html[data-theme="light"] .clickup-shell .choice-group {
  background: var(--clickup-surface-alt);
  border-color: var(--clickup-border);
  color: var(--clickup-text);
}

html[data-theme="light"] .clickup-shell .list-view-header {
  background:
    radial-gradient(circle at top left, rgba(15, 114, 201, 0.12), transparent 26%),
    radial-gradient(circle at top right, rgba(217, 144, 65, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(255, 252, 246, 0.98), rgba(246, 238, 226, 0.98));
}

html[data-theme="light"] .clickup-shell .list-view-panel-all-tasks .list-view-header {
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.98), rgba(248, 241, 230, 0.98));
}

html[data-theme="light"] .clickup-shell .task-command-bar {
  background: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

html[data-theme="light"] .clickup-shell .task-command-field,
html[data-theme="light"] .clickup-shell .task-command-toggle {
  background: rgba(255, 255, 255, 0.62);
}

html[data-theme="light"] .clickup-shell .task-filter-field,
html[data-theme="light"] .clickup-shell .task-filter-toggle {
  background: rgba(255, 255, 255, 0.62);
}

html[data-theme="light"] .clickup-shell .task-filter-summary .task-view-role strong {
  color: var(--clickup-text);
}

html[data-theme="light"] .clickup-shell .list-view-breadcrumbs strong,
html[data-theme="light"] .clickup-shell .list-view-copy h1,
html[data-theme="light"] .clickup-shell .project-view-meta strong,
html[data-theme="light"] .clickup-shell .task-view-role strong,
html[data-theme="light"] .clickup-shell .task-db-title-block strong,
html[data-theme="light"] .clickup-shell .task-drawer-title,
html[data-theme="light"] .clickup-shell .task-drawer-hero h3,
html[data-theme="light"] .clickup-shell .task-db-meta-grid strong,
html[data-theme="light"] .clickup-shell .task-drawer-section-head strong {
  color: var(--clickup-text);
}

html[data-theme="light"] .clickup-shell .list-view-copy p,
html[data-theme="light"] .clickup-shell .task-drawer-section-head span,
html[data-theme="light"] .clickup-shell .project-view-meta.is-muted,
html[data-theme="light"] .clickup-shell .task-db-brief,
html[data-theme="light"] .clickup-shell .task-db-project,
html[data-theme="light"] .clickup-shell .task-db-assignees,
html[data-theme="light"] .clickup-shell .task-db-due,
html[data-theme="light"] .clickup-shell .task-db-updated,
html[data-theme="light"] .clickup-shell .list-toolbar-search span,
html[data-theme="light"] .clickup-shell .list-inline-field span,
html[data-theme="light"] .clickup-shell .task-view-role.is-muted,
html[data-theme="light"] .clickup-shell .task-db-empty {
  color: var(--clickup-muted);
}

html[data-theme="light"] .clickup-shell .list-view-actions .button-secondary,
html[data-theme="light"] .clickup-shell .task-drawer-header .button-secondary {
  background: rgba(255, 255, 255, 0.82);
  color: var(--clickup-text);
  border-color: var(--clickup-border);
}

html[data-theme="light"] .clickup-shell .list-view-kicker,
html[data-theme="light"] .clickup-shell .task-drawer-panel label span,
html[data-theme="light"] .clickup-shell .task-drawer-panel legend,
html[data-theme="light"] .clickup-shell .task-drawer-panel .caption {
  color: var(--clickup-muted);
}

html[data-theme="light"] .clickup-shell .list-toolbar-search input,
html[data-theme="light"] .clickup-shell .list-inline-field select,
html[data-theme="light"] .clickup-shell .task-inline-status-select,
html[data-theme="light"] .clickup-shell .task-drawer-panel input,
html[data-theme="light"] .clickup-shell .task-drawer-panel select,
html[data-theme="light"] .clickup-shell .task-drawer-panel textarea {
  color: var(--clickup-text);
  border-color: var(--clickup-border);
  box-shadow: none;
}

html[data-theme="light"] .clickup-shell .task-drawer-panel input,
html[data-theme="light"] .clickup-shell .task-drawer-panel select,
html[data-theme="light"] .clickup-shell .task-drawer-panel textarea {
  background: rgba(255, 255, 255, 0.82);
}

html[data-theme="light"] .clickup-shell .task-inline-status-select {
  background: #f4eadc;
}

html[data-theme="light"] .clickup-shell .task-inline-status-select.is-testing {
  background: #f8ead0;
  color: #7a4d0d;
}

html[data-theme="light"] .clickup-shell .task-database-table thead th,
html[data-theme="light"] .clickup-shell .task-database-table thead th:first-child,
html[data-theme="light"] .clickup-shell .task-db-row td,
html[data-theme="light"] .clickup-shell .task-db-row td:first-child,
html[data-theme="light"] .clickup-shell .task-database-notion .task-table-scroll {
  background: #fffaf2;
  border-color: var(--clickup-border);
  color: var(--clickup-text);
  box-shadow: none;
}

html[data-theme="light"] .clickup-shell .task-db-row:hover td,
html[data-theme="light"] .clickup-shell .task-db-row:hover td:first-child {
  background: var(--clickup-surface-hover);
}

html[data-theme="light"] .clickup-shell .project-architecture-card {
  background: #fffaf2;
  border-color: var(--clickup-border);
  color: var(--clickup-text);
}

html[data-theme="light"] .clickup-shell .project-architecture-card:hover {
  background: var(--clickup-surface-hover);
}

html[data-theme="light"] .clickup-shell .project-card-main h2 {
  color: var(--clickup-text);
}

html[data-theme="light"] .clickup-shell .project-card-kicker,
html[data-theme="light"] .clickup-shell .project-architecture-card p,
html[data-theme="light"] .clickup-shell .project-card-architecture,
html[data-theme="light"] .clickup-shell .project-card-meta span {
  color: var(--clickup-muted);
}

html[data-theme="light"] .clickup-shell .project-card-open,
html[data-theme="light"] .clickup-shell .project-card-meta span {
  background: #f3ecdf;
  border-color: var(--clickup-border);
}

html[data-theme="light"] .clickup-shell .project-card-open {
  color: var(--clickup-text);
}

html[data-theme="light"] .clickup-shell .task-db-file-icon {
  border-color: rgba(70, 82, 96, 0.18);
  background: rgba(70, 82, 96, 0.04);
}

html[data-theme="light"] .clickup-shell .task-db-file-icon::after {
  background: rgba(70, 82, 96, 0.12);
}

html[data-theme="light"] .clickup-shell .task-db-expand-icon {
  background: #ece3d6;
}

html[data-theme="light"] .clickup-shell .task-db-expand-icon::before {
  border-color: #7b7167;
}

html[data-theme="light"] .clickup-shell .task-inline-badge,
html[data-theme="light"] .clickup-shell .task-database-clickup .task-state-pill[data-task-state="К выполнению"],
html[data-theme="light"] .clickup-shell .task-database-clickup .task-priority-pill[data-priority="не срочно"] {
  background: #ece3d6;
  border-color: rgba(70, 82, 96, 0.1);
  color: #61584f;
}

html[data-theme="light"] .clickup-shell .task-database-clickup .empty-state,
html[data-theme="light"] .clickup-shell .task-database-clickup .task-db-description,
html[data-theme="light"] .clickup-shell .task-database-clickup .task-comment,
html[data-theme="light"] .clickup-shell .task-database-clickup .task-comment-placeholder {
  background: #fbf7ef;
  border-color: var(--clickup-border);
  color: var(--clickup-text);
}

html[data-theme="light"] .clickup-shell .task-drawer-panel {
  background: linear-gradient(180deg, #fffdf8, #f7f0e5);
  border-color: var(--clickup-border);
  color: var(--clickup-text);
  box-shadow: 0 28px 90px rgba(112, 89, 56, 0.16);
}

html[data-theme="light"] .clickup-shell .task-drawer-header,
html[data-theme="light"] .clickup-shell .modal-form-head,
html[data-theme="light"] .clickup-shell .modal-form-actions {
  background: rgba(255, 250, 244, 0.94);
  border-color: var(--clickup-border);
}

html[data-theme="light"] .clickup-shell .modal-form-body {
  background: #f8f2e8;
}

@media (max-width: 640px) {
  html[data-theme="light"] .clickup-shell .task-table-scroll {
    background: #f8f2e8;
  }

  html[data-theme="light"] .clickup-shell .task-db-row {
    background: #fffaf2;
    border-color: var(--clickup-border);
  }

  html[data-theme="light"] .clickup-shell .task-db-row .task-db-primary-cell {
    background: rgba(15, 114, 201, 0.035);
  }

  html[data-theme="light"] .clickup-shell .task-db-row td,
  html[data-theme="light"] .clickup-shell .task-db-row td:first-child {
    background: transparent;
  }
}

.dialogs-shell {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 0;
  min-height: calc(100vh - 128px);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.dialogs-sidebar,
.dialogs-main {
  min-width: 0;
}

.dialogs-sidebar {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  overflow: hidden;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.dialogs-sidebar-head,
.dialogs-main-head,
.message-compose-bottom,
.dialog-row-meta,
.message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dialogs-sidebar h2,
.dialogs-main h1 {
  margin: 0;
}

.dialog-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(37,37,37,0.98);
}

.dialog-search span {
  color: var(--muted);
  flex: 0 0 auto;
}

.dialog-search input {
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.dialogs-start-form {
  display: grid;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.dialogs-start-form label,
.message-compose label {
  display: grid;
  gap: 6px;
}

.dialogs-start-form label span,
.message-compose label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.dialogs-list {
  display: grid;
  gap: 8px;
  align-content: start;
  overflow-y: auto;
  padding-right: 4px;
}

.dialog-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.dialog-avatar {
  grid-row: 1 / span 3;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  font-weight: 900;
}

.dialog-row:hover,
.dialog-row.is-active {
  background: var(--accent-soft);
  border-color: rgba(35, 131, 226, 0.32);
}

.dialog-row-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.dialog-row-preview {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
}

.dialog-row-meta,
.message-meta {
  color: var(--muted);
  font-size: 12px;
}

.dialogs-main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
  padding: 18px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px),
    var(--surface);
  background-size: 28px 28px;
}

.messages-list {
  display: grid;
  gap: 12px;
  align-content: start;
  overflow-y: auto;
  padding-right: 4px;
}

.message-item {
  justify-self: start;
  width: min(720px, 88%);
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.message-item.is-mine {
  justify-self: end;
  background: rgba(35, 131, 226, 0.14);
  border-color: rgba(35, 131, 226, 0.28);
}

.message-item p {
  margin: 0;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message-task {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.14);
}

.message-task-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.message-task strong,
.message-task span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.message-media {
  min-width: 0;
}

.message-media img,
.message-media video {
  display: block;
  max-width: min(420px, 100%);
  max-height: 320px;
  border-radius: 12px;
  border: 1px solid var(--line);
  object-fit: contain;
  background: rgba(0, 0, 0, 0.18);
}

.message-media audio {
  width: min(360px, 100%);
}

.message-file {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.14);
  font-weight: 800;
}

.message-file span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-file-icon {
  flex: 0 0 auto;
}

.message-compose {
  display: grid;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.message-compose-bottom {
  align-items: end;
}

.message-compose-bottom label {
  flex: 1 1 auto;
  min-width: 0;
}

.message-compose-bottom .button {
  flex: 0 0 auto;
}

.message-media-picker input[type="file"] {
  display: none;
}

.message-media-picker b {
  display: block;
  min-height: 45px;
  padding: 12px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.dialogs-empty {
  align-self: center;
  justify-self: center;
  text-align: center;
  max-width: 420px;
}

html[data-theme="light"] .dialog-row,
html[data-theme="light"] .message-item,
html[data-theme="light"] .message-task,
html[data-theme="light"] .message-file,
html[data-theme="light"] .dialog-search {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(70, 82, 96, 0.14);
}

html[data-theme="light"] .dialog-row:hover,
html[data-theme="light"] .dialog-row.is-active,
html[data-theme="light"] .message-item.is-mine {
  background: rgba(35, 131, 226, 0.12);
  border-color: rgba(35, 131, 226, 0.28);
}

@media (max-width: 980px) {
  .dialogs-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .dialogs-sidebar,
  .dialogs-main {
    min-height: auto;
  }

  .dialogs-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .dialogs-list,
  .messages-list {
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 640px) {
  .message-item {
    width: 100%;
  }

  .message-compose-bottom {
    display: grid;
  }
}
