/* ============================================================
   Оформление панели объектов — по согласованному макету
   (макет_карточки_объекта.html). Светлая тема Mira Developments.
   ============================================================ */

:root{
  /* Фон глубже, рамки чётче, тени заметнее — белые панели «выступают»,
     информация не сливается (по мотивам люкс-девелоперов и Linear) */
  --bg: #f0ebe1;        /* тёплый пергаментный фон */
  --panel: #ffffff;     /* белые панели-карточки */
  --panel2: #f4f0e8;    /* чуть темнее — плитки частей */
  --text: #1d1a15;
  --muted: #8b8478;
  --gold: #a9814a;      /* фирменный бронзово-золотой */
  --line: #ddd4c3;      /* рамки */
  --shadow: 0 3px 22px rgba(30,25,15,.10);
  --accent: var(--gold);/* у каждого объекта свой, задаётся в шаблоне */
}
*{box-sizing:border-box;}
body{
  margin:0; background:var(--bg); color:var(--text);
  font-family:'Inter', -apple-system, "Segoe UI", Arial, sans-serif;
}
h1,h2,h3,.brand{ font-family:'Cormorant Garamond', Georgia, serif; }

/* ---------- Шапка ---------- */
header{
  display:flex; align-items:center; justify-content:space-between;
  padding:20px 32px; border-bottom:1px solid var(--line);
  background:var(--panel);
}
.brand{ font-size:24px; letter-spacing:5px; font-weight:600; color:#1a1a1a;}
header .brand{ font-size:31px; letter-spacing:6px; }
.brand span{color:var(--gold); font-weight:500;}
.subtitle{color:var(--muted); font-size:13px; margin-top:3px; font-family:'Inter',sans-serif;}
.header-right{ display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.search-form input{
  padding:7px 12px; border:1px solid var(--line); border-radius:8px;
  font-size:13px; font-family:'Inter',sans-serif; width:180px; background:#fff;
}
.search-form input:focus{ outline:none; border-color:var(--gold); width:230px; transition:width .15s; }
.bell{ position:relative; text-decoration:none; }
.badge-count{
  position:absolute; top:-6px; right:-8px; background:#c14747; color:#fff;
  font-size:10px; font-weight:600; border-radius:10px; padding:1px 5px;
  line-height:1.3;
}
.header-user{ font-size:13px; color:var(--muted); border-bottom:none; }
.header-user:hover{ color:var(--gold); }
.header-link{
  color:var(--gold); font-size:13px; text-decoration:none;
  border:1px solid var(--line); border-radius:8px; padding:6px 12px;
  background:#fff; cursor:pointer; font-family:'Inter',sans-serif;
}
.header-link:hover{ border-color:#c9c2b4; }
.logout-form{ margin:0; display:inline; }
.as-button{ appearance:none; }

/* ---------- Вход ---------- */
.login-wrap{
  min-height:100vh; display:flex; align-items:center; justify-content:center;
  padding:20px;
}
.login-panel{
  background:var(--panel); border:1px solid var(--line); border-radius:16px;
  box-shadow:var(--shadow); padding:36px 40px; width:100%; max-width:420px;
  text-align:center;
}
.login-panel form{ margin-top:22px; text-align:left; }
.login-panel label{
  display:block; font-size:12px; color:var(--muted); margin:14px 0 5px;
  text-transform:uppercase; letter-spacing:1px;
}
.login-panel input{
  width:100%; padding:10px 12px; border:1px solid var(--line);
  border-radius:8px; font-size:14px; font-family:'Inter',sans-serif;
}
.login-panel input:focus{ outline:none; border-color:var(--gold); }
.login-hint{ margin-top:18px; font-size:12px; color:var(--muted); }

/* ---------- Дашборд ---------- */
#dashboard{ padding:28px 32px 60px; }
.grid{
  display:grid; grid-template-columns:repeat(auto-fill, minmax(390px,1fr));
  gap:26px;
}
/* Карточка оконтурена акцентным цветом объекта — единый «цвет-язык» */
.card{
  background:var(--panel); border:2px solid var(--accent, var(--line));
  border-radius:14px;
  overflow:hidden; cursor:pointer; transition:transform .15s, box-shadow .15s;
  box-shadow:var(--shadow); text-decoration:none; color:var(--text);
  display:block;
}
.card:hover{ transform:translateY(-3px); box-shadow:0 8px 24px rgba(30,25,15,.12); }
.card .thumb{ height:235px; background-size:cover; background-position:center; position:relative;}
.card .thumb::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(to top, rgba(20,16,10,.72), transparent 60%);
}
.thumb-empty{
  background:linear-gradient(135deg, var(--accent), #d8cdbd);
}
/* Бейдж стадии — нейтральная спокойная плашка (цвет объекта показывает
   рамка карточки и точки в списках, а не заливка бейджа) */
.card .thumb .badge{
  position:absolute; left:12px; bottom:10px; z-index:2;
  font-size:12px; padding:4px 10px; border-radius:20px;
  background:rgba(245,242,236,.94); color:#4a453f; font-weight:600;
  font-family:'Inter',sans-serif; border:1px solid rgba(30,25,15,.12);
}
/* Нижняя часть карточки — тем же мягким оттенком, что и страница объекта */
.card .body{
  padding:16px 18px 18px;
  background:color-mix(in srgb, var(--accent) var(--tint, 12%), var(--bg));
}
.card h3{ margin:0 0 5px; font-size:21px; font-weight:600; }
.card .loc{ color:var(--muted); font-size:12.5px; margin-bottom:11px; min-height:15px;}
.card .stats{ display:flex; gap:14px; font-size:12.5px; color:var(--muted); flex-wrap:wrap;}
.card .stats b{ color:var(--text); }

/* Плашка «сводка при входе» — по ширине текста, не на весь экран */
.digest-strip-wrap{ margin-bottom:20px; }
.digest-strip{
  display:inline-block; background:#fbf3e2; border:1px solid #ecd9ad;
  color:#7a5c1e; padding:9px 16px; font-size:13px; border-radius:10px;
  text-decoration:none;
}
.digest-strip:hover{ border-color:#d9c397; }
.digest-strip b{ color:#a03434; }

/* Две колонки под карточками: задачи + (команда, лента) */
.dash-columns{
  display:grid; grid-template-columns:minmax(0,1fr) 340px; gap:24px;
  margin-top:28px; align-items:start;
}
@media(max-width:1100px){ .dash-columns{grid-template-columns:1fr;} }
.dash-columns.single{ grid-template-columns:1fr; }

/* Блок «Задачи»: в виде списка — компактный, для доски — ровно
   по ширине трёх колонок (правило :has смотрит, что сейчас внутри) */
.tasks-panel{ margin-top:0; max-width:880px; }
.tasks-panel:has(.kanban){ max-width:1050px; }
.list-wrap{ max-width:820px; }
/* Шапка блока «Задачи»: заголовок и фильтры в одну строку, линия —
   под всей шапкой (а не только под словом «Задачи») */
.tasks-head{
  display:flex; align-items:center; justify-content:space-between;
  flex-wrap:wrap; gap:10px; margin-bottom:12px; padding-bottom:8px;
  border-bottom:1px solid var(--line);
}
.tasks-head h2{ margin:0; padding-bottom:0; border-bottom:none; }
.task-filters{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.task-filters select{
  padding:6px 9px; border:1px solid var(--line); border-radius:8px;
  font-size:12px; font-family:'Inter',sans-serif; background:#fff;
  color:#4a453f;
}
.task-filters .chk{
  font-size:12px; color:var(--muted); display:inline-flex; align-items:center;
  gap:5px; cursor:pointer;
}

/* Чипы-переключатели (быстрые срезы и вид список/доска) */
.chip-group{
  display:inline-flex; border:1px solid var(--line); border-radius:8px;
  overflow:hidden; background:#fff;
}
.chip{
  font-size:12px; color:var(--muted); padding:6px 10px; cursor:pointer;
  border-right:1px solid var(--line); user-select:none; line-height:1.2;
}
.chip:last-child{ border-right:none; }
.chip input{ display:none; }
.chip:has(input:checked){ background:var(--gold); color:#fff; }
.chip:hover:not(:has(input:checked)){ color:var(--text); }
.task-obj{ display:block; font-size:11px; color:var(--muted); margin-top:2px; }
.row-link{ text-decoration:none; color:var(--text); }
.row-link:hover{ color:var(--gold); }

/* Кликабельные имена сотрудников */
.emp-link{
  color:inherit; text-decoration:none; border-bottom:1px dotted #c9b98f;
}
.emp-link:hover{ color:var(--gold); }

/* Точка-маркер объекта его акцентным цветом (списки, панель, активность) */
.obj-dot{
  display:inline-block; width:8px; height:8px; border-radius:50%;
  margin-right:5px; vertical-align:0; box-shadow:0 0 0 1px rgba(30,25,15,.12);
}

/* Флаг страны — по высоте текста */
.flag{
  height:.85em; width:auto; vertical-align:-.02em; margin-left:5px;
  border-radius:2px; box-shadow:0 0 0 1px rgba(30,25,15,.15);
}

/* ---------- Карточка объекта ---------- */
.back-btn{
  display:inline-flex; align-items:center; gap:6px; margin:18px 0 0 32px;
  color:var(--muted); background:#fff; border:1px solid var(--line);
  padding:7px 14px; border-radius:8px; cursor:pointer; font-size:13px;
  font-family:'Inter',sans-serif; text-decoration:none;
}
.back-btn:hover{ color:#1a1a1a; border-color:#c9c2b4; }

.banner{
  height:340px; background-size:cover; background-position:center;
  position:relative; margin:16px 32px 0; border-radius:16px; overflow:hidden;
  border:1px solid var(--line);
}
.banner::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(to top, rgba(10,8,5,.88) 8%, rgba(10,8,5,.15) 55%, transparent 80%);
}
.banner-empty{ background:linear-gradient(135deg, var(--accent), #d8cdbd); }
.banner .info{ position:absolute; left:28px; bottom:22px; z-index:2; max-width:70%;}
.banner h1{ margin:0 0 6px; font-size:32px; color:#fff; font-weight:600;}
.banner .loc2{ color:#e9e5dd; font-size:13px; font-family:'Inter',sans-serif;}
.banner .badges{ position:absolute; right:22px; top:20px; z-index:2; display:flex; gap:8px;}
.pill{ font-size:12px; padding:5px 12px; border-radius:20px; font-weight:600; font-family:'Inter',sans-serif;}
.pill.stage{ background:rgba(245,242,236,.94); color:#4a453f;
  border:1px solid rgba(30,25,15,.12); }
.pill.status{ background:rgba(255,255,255,.9); color:#2f6e3a; }

/* Очень слабый оттенок акцентного цвета объекта под содержимым карточки —
   если браузер не знает color-mix, остаётся обычный фон */
.obj-body{ padding:24px 32px 60px; display:grid; grid-template-columns:2fr 1fr; gap:24px; }
#objectScreen{ background:color-mix(in srgb, var(--accent) var(--tint, 12%), var(--bg)); }
@media(max-width:900px){ .obj-body{grid-template-columns:1fr;} }

.section{
  background:var(--panel); border:1px solid var(--line); border-radius:14px;
  padding:18px 20px; margin-bottom:20px; box-shadow:var(--shadow);
}
/* Заголовки блоков: засечковый шрифт, обычный регистр,
   тонкая линия-волосок на всю ширину блока */
.section h2{
  font-family:'Cormorant Garamond', Georgia, serif;
  font-size:21px; font-weight:600; letter-spacing:.2px;
  text-transform:none; color:var(--text);
  margin:0 0 14px; padding-bottom:8px;
  border-bottom:1px solid var(--line);
}

.chars{ display:grid; grid-template-columns:1fr 1fr; gap:12px 20px; }
.chars div{ font-size:13px; }
.chars .k{ color:var(--muted); }
.chars .v{ color:#1a1a1a; font-weight:500; }

.gallery{ display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
@media(max-width:1200px){ .gallery{grid-template-columns:repeat(3,1fr);} }
.gallery figure{ margin:0; }
.gallery img{
  width:100%; height:80px; object-fit:cover; border-radius:8px;
  cursor:pointer; border:1px solid var(--line); display:block;
}
.gallery figcaption{ font-size:10.5px; color:var(--muted); margin-top:4px; text-align:center; }

.notes{ font-size:13px; color:#4a453f; line-height:1.6; }

/* ---------- Плитки частей ---------- */
.blocks{ display:flex; flex-wrap:wrap; gap:10px; margin-bottom:10px; }
.block-tile{
  padding:10px 16px; border-radius:10px; border:1px solid var(--line);
  background:var(--panel2); cursor:pointer; font-size:13px; font-weight:600;
  transition:.15s; font-family:'Inter',sans-serif;
}
.block-tile:hover{ border-color:var(--accent); }
.block-tile.active{ background:var(--accent); color:#fff; border-color:var(--accent); }
.block-content{ margin-top:8px; }
.block-content.show{ display:block; }
.content-caption{
  font-size:11px; text-transform:uppercase; letter-spacing:1px;
  color:var(--muted); margin:10px 0 4px;
}
.caption-problems{ color:#8a6a2e; margin-top:16px; }

/* ---------- Задачи ---------- */
.task-row{
  display:flex; align-items:center; gap:10px; padding:9px 0;
  border-bottom:1px solid var(--line); font-size:13px;
}
.task-wrap:last-of-type .task-row{ border-bottom:none; }
.clickable{ cursor:pointer; }
.task-row.clickable:hover .task-title{ color:var(--gold); }
.search-row.clickable:hover .row-link{ color:var(--gold); }
.kanban-card .row-link.clickable:hover{ color:var(--gold); }
/* Точки статуса из списков убраны: в строке одна точка — цвет объекта,
   просрочка выделяется бледным фоном строки (.overdue-row) */
/* Название задачи заметно темнее и плотнее подписей — иерархия текста */
.task-title{ flex:1; font-weight:500; color:var(--text); }
.task-row{ transition:background .1s; }
.task-row:hover{ background:#faf7f0; }
.task-meta{ color:var(--muted); font-size:12px; white-space:nowrap; }
.task-meta.overdue{ color:#c14747; font-weight:600; }
/* Высокий приоритет — компактный знак «!» */
.prio-mark{
  display:inline-block; color:#c14747; font-weight:800; font-size:14px;
  margin-left:5px; line-height:1;
}

/* Раскрытая задача */
.task-card{
  background:var(--panel2); border:1px solid var(--line); border-radius:10px;
  padding:12px 14px; margin:4px 0 10px; font-size:13px;
}
.task-card-meta{ color:var(--muted); font-size:12px; margin-bottom:8px; }
.status-buttons{ display:flex; flex-wrap:wrap; gap:6px; margin-bottom:10px; }
.status-btn{
  font-size:12px; padding:4px 10px; border-radius:16px; cursor:pointer;
  border:1px solid var(--line); background:#fff; font-family:'Inter',sans-serif;
}
.status-btn:hover{ border-color:var(--accent); }
.status-btn.current{ background:var(--accent); color:#fff; border-color:var(--accent); }

/* Комментарии */
.comments{ margin-top:10px; }
.comment{
  background:#fff; border:1px solid var(--line); border-radius:8px;
  padding:8px 10px; margin-bottom:8px;
}
.comment-meta{ font-size:11px; color:var(--muted); margin-bottom:3px; }
.comment-text{ font-size:13px; line-height:1.5; }
.comment-form{ margin-top:8px; }
.comment-form textarea{
  width:100%; min-height:84px; padding:9px 11px; resize:vertical;
  border:1px solid var(--line); border-radius:8px; font-size:13px;
  font-family:'Inter',sans-serif;
}
.comment-form textarea:focus{ outline:none; border-color:var(--gold); }

/* Вложения */
.attach-list{ display:flex; flex-wrap:wrap; gap:8px; margin:8px 0; }
.attach-image img{
  max-height:110px; max-width:170px; border-radius:8px;
  border:1px solid var(--line); display:block;
}
.attach-file{
  display:inline-block; font-size:12px; color:var(--gold);
  text-decoration:none; background:#fff; border:1px solid var(--line);
  border-radius:8px; padding:6px 10px; margin:2px 4px 2px 0;
}
.attach-file:hover{ border-color:var(--accent); }
.attach-meta{ color:var(--muted); margin-left:6px; }

/* ---------- Проблемы ---------- */
.problem-row{
  font-size:13px; padding:8px 0; border-bottom:1px solid var(--line);
  color:#8a6a2e;
}
.problem-row:last-of-type{ border-bottom:none; }
.problem-row.solved{ opacity:.55; }
.problem-row.solved .problem-text{ text-decoration:line-through; }
.problem-meta{ font-size:11px; color:var(--muted); margin-top:3px; }
.solved-list{ margin-top:10px; }
.solved-list summary{ list-style:none; display:inline-block; }
.solved-list summary::-webkit-details-marker{ display:none; }

/* ---------- Всплывающая панель задачи ---------- */
.panel-overlay{
  position:fixed; inset:0; background:rgba(25,20,12,.38); z-index:60;
}
.task-panel{
  position:fixed; top:0; right:0; bottom:0; width:840px; max-width:94vw;
  background:var(--panel); border-left:1px solid var(--line);
  box-shadow:-12px 0 34px rgba(30,25,15,.22);
  padding:18px 22px 30px; overflow-y:auto;
  animation:panel-in .18s ease-out;
}
@keyframes panel-in{
  from{ transform:translateX(40px); opacity:.4; }
  to{ transform:translateX(0); opacity:1; }
}
.task-panel-head{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:10px;
}
.task-panel-caption{
  font-size:12px; text-transform:uppercase; letter-spacing:1.2px;
  color:var(--muted); font-weight:700;
}
.panel-close{
  background:none; border:1px solid var(--line); border-radius:8px;
  font-size:14px; padding:4px 10px; cursor:pointer; color:var(--muted);
}
.panel-close:hover{ color:var(--text); border-color:#c9c2b4; }
.task-panel-title{
  font-size:17px; font-weight:600; line-height:1.4; margin-bottom:6px;
  overflow-wrap:anywhere;
}
.task-panel-place{ font-size:13px; margin-bottom:8px; }

/* ---------- Журнал «Активность» ---------- */
.activity-page{ max-width:860px; }
.act-row{
  display:flex; gap:10px; align-items:baseline; padding:8px 0;
  border-bottom:1px solid var(--line); font-size:13px;
}
.act-row:last-of-type{ border-bottom:none; }
.act-ico{
  width:22px; height:22px; border-radius:50%; flex-shrink:0;
  display:inline-flex; align-items:center; justify-content:center;
  color:#fff; font-size:12px; font-weight:700; align-self:center;
}
/* Оформление упрощено: один нейтральный тон, различаются значки */
.act-ico{
  background:var(--panel2); color:#5f594f; border:1px solid var(--line);
}
.act-series{
  font-size:10.5px; color:var(--muted); background:var(--panel2);
  border:1px solid var(--line); border-radius:10px; padding:1px 8px;
  margin-left:6px; white-space:nowrap;
}
.act-text{ flex:1; min-width:0; overflow-wrap:anywhere; line-height:1.45; }
.act-link{ color:var(--text); text-decoration:none; }
.act-link:hover{ color:var(--gold); }
.act-time{ color:var(--muted); font-size:11px; white-space:nowrap; }

/* ---------- Плитки статистики в сводке ГКП ---------- */
.stat-tiles{ display:flex; gap:14px; flex-wrap:wrap; margin-bottom:16px; }
.stat-tile{
  background:var(--panel2); border:1px solid var(--line); border-radius:12px;
  padding:12px 20px; text-align:center; min-width:120px;
}
.stat-tile b{ display:block; font-size:24px; font-weight:600; }
.stat-tile span{ font-size:11.5px; color:var(--muted); }
.stat-tile-bad{ background:#fbeaea; border-color:#e5b9b9; }
.stat-tile-bad b{ color:#a03434; }
.digest-table{
  width:100%; border-collapse:collapse; font-size:13px; margin-bottom:14px;
}
.digest-table th{
  text-align:left; font-size:11px; color:var(--muted); font-weight:600;
  padding:4px 10px 6px 0; text-transform:uppercase; letter-spacing:.5px;
}
.digest-table td{
  padding:6px 10px 6px 0; border-top:1px solid var(--line);
}

/* ---------- Формы и кнопки ---------- */
.add-form{ margin-top:10px; }
.add-form summary{ list-style:none; display:inline-block; }
.add-form summary::-webkit-details-marker{ display:none; }
.add-btn{
  font-size:12px; color:var(--gold); background:none; border:1px dashed #d9c397;
  padding:6px 12px; border-radius:8px; cursor:pointer;
  font-family:'Inter',sans-serif;
}
.add-btn:hover{ border-color:var(--gold); }
.add-form form{ margin-top:10px; }
.add-form textarea, .add-form input[type=text]{
  width:100%; padding:9px 11px; border:1px solid var(--line); border-radius:8px;
  font-size:13px; font-family:'Inter',sans-serif; resize:vertical;
}
.add-form textarea:focus, .add-form input:focus, .add-form select:focus{
  outline:none; border-color:var(--gold);
}
.form-row{
  display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; align-items:center;
}
.form-row select, .form-row input[type=date], .form-row input[type=file]{
  padding:8px 10px; border:1px solid var(--line); border-radius:8px;
  font-size:12px; font-family:'Inter',sans-serif; background:#fff;
  max-width:230px;
}
.btn-primary{
  font-size:13px; padding:8px 18px; border-radius:8px; cursor:pointer;
  background:var(--accent); color:#fff; border:1px solid var(--accent);
  font-family:'Inter',sans-serif; font-weight:500;
}
.btn-primary:hover{ filter:brightness(1.07); }
.btn-wide{ width:100%; margin-top:20px; }
.link-btn{
  background:none; border:none; color:var(--gold); cursor:pointer;
  font-size:11px; padding:0 0 0 6px; text-decoration:underline;
  font-family:'Inter',sans-serif;
}
.collapse-btn{
  background:none; border:none; color:var(--muted); cursor:pointer;
  font-size:11px; padding:4px 0 0; text-decoration:underline;
  font-family:'Inter',sans-serif;
}
.form-error{
  background:#fbeaea; border:1px solid #e5b9b9; color:#a03434;
  padding:8px 12px; border-radius:8px; font-size:12px; margin:10px 0;
}
.empty-note{ color:var(--muted); font-size:13px; padding:6px 0; }
.empty-note a{ color:var(--gold); }

/* Просроченные строки — слабый красный фон; выполненные — приглушены */
.task-row.overdue-row{ background:#f9edec; }
.task-row.overdue-row:hover{ background:#f6e6e4; }
.task-row.done-row{ opacity:.62; }

/* Заголовок + переключатель в блоке частей */
.content-head{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px; flex-wrap:wrap;
}

/* Кнопки-периоды в сводке ГКП */
.period-chips{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:16px; }
.chip-link{
  font-size:12px; color:var(--muted); padding:6px 14px; cursor:pointer;
  border:1px solid var(--line); border-radius:8px; background:#fff;
  text-decoration:none;
}
.chip-link.active{ background:var(--gold); color:#fff; border-color:var(--gold); }
.chip-link:hover:not(.active){ color:var(--text); }

/* Лайтбокс: картинка поверх затемнённой страницы */
.lightbox{
  position:fixed; inset:0; background:rgba(18,14,8,.84); z-index:90;
  display:flex; align-items:center; justify-content:center; cursor:zoom-out;
}
.lightbox img{
  max-width:92vw; max-height:92vh; border-radius:10px;
  box-shadow:0 10px 50px rgba(0,0,0,.5);
}
[data-lightbox]{ cursor:zoom-in; }

/* Фильтры «Активности»: кнопка раскрывает список с галочками */
.filter-checks{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
}
.dropdown{ position:relative; }
.dropdown-btn{
  font-size:12px; color:#4a453f; background:#fff; cursor:pointer;
  border:1px solid var(--line); border-radius:8px; padding:7px 12px;
  font-family:'Inter',sans-serif; white-space:nowrap;
}
.dropdown-btn:hover{ border-color:#c9c2b4; }
.dropdown.open .dropdown-btn{ border-color:var(--gold); color:var(--text); }
.dropdown-count{ color:var(--gold); font-weight:600; }
.dropdown-panel{
  display:none; position:absolute; z-index:65; top:calc(100% + 5px); left:0;
  min-width:220px; max-height:320px; overflow-y:auto;
  background:#fff; border:1px solid var(--line); border-radius:10px;
  box-shadow:0 8px 26px rgba(30,25,15,.18); padding:8px;
}
.dropdown.open .dropdown-panel{ display:block; }
.check-item{
  font-size:12.5px; color:#4a453f; display:flex; align-items:center;
  gap:7px; cursor:pointer; white-space:nowrap; padding:5px 7px;
  border-radius:6px;
}
.check-item:hover{ background:var(--panel2); color:var(--gold); }
.reset-btn{ align-self:center; }

/* Заметная кнопка «Добавить задачу» над списком */
.add-task-block{ margin:2px 0 14px; }
.add-task-btn{
  display:inline-block; font-size:13px; font-weight:600; cursor:pointer;
  background:var(--accent, var(--gold)); color:#fff; border-radius:9px;
  padding:9px 18px; font-family:'Inter',sans-serif;
  box-shadow:0 2px 8px rgba(30,25,15,.14);
}
.add-task-btn:hover{ filter:brightness(1.07); }
.add-task-block summary{ list-style:none; }
.add-task-block summary::-webkit-details-marker{ display:none; }
/* Открытая форма добавления выделяется подложкой */
details.add-task-block[open]{
  background:var(--panel2); border:1px solid var(--line);
  border-radius:12px; padding:12px;
}
details.add-task-block[open] textarea,
details.add-task-block[open] input[type=text]{ background:#fff; }

/* Кнопка выбора файла в стиле приложения (нативная скрыта) */
.file-btn{
  display:inline-block; font-size:12px; color:var(--gold); cursor:pointer;
  background:#fff; border:1px solid #d9c397; border-radius:8px;
  padding:8px 12px; font-family:'Inter',sans-serif; white-space:nowrap;
}
.file-btn:hover{ border-color:var(--gold); }
.file-btn input[type=file]{ display:none; }
.file-name{ font-size:11.5px; color:var(--muted); max-width:150px;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* Подсветка зоны при перетаскивании файла */
.drop-hover{ outline:2px dashed var(--gold); outline-offset:3px; }

/* Структурные блоки внутри панели задачи */
.panel-block{
  background:var(--panel2); border:1px solid var(--line);
  border-radius:12px; padding:12px 14px; margin-bottom:12px;
}
.panel-block-title{
  font-family:'Cormorant Garamond', Georgia, serif;
  font-size:18px; font-weight:600; letter-spacing:.2px;
  text-transform:none; color:var(--text);
  margin-bottom:10px; padding-bottom:6px;
  border-bottom:1px solid var(--line);
}
.panel-block .comment{ background:#fff; }
.panel-block .comment-form textarea{ background:#fff; }
.panel-block .attach-file{ background:#fff; }

/* Всплывающие уведомления (тосты) */
#toast-root{
  position:fixed; right:18px; bottom:18px; z-index:95;
  display:flex; flex-direction:column; gap:10px; max-width:340px;
}
.toast{
  background:#2a2118; color:#e9e0d2; font-size:13px; line-height:1.45;
  border-radius:10px; padding:12px 16px; cursor:pointer;
  box-shadow:0 8px 30px rgba(0,0,0,.35);
  border-left:3px solid var(--gold);
  animation:toast-in .25s ease-out;
}
.toast:hover{ background:#3a2e20; }
.toast-out{ opacity:0; transition:opacity .5s; }
@keyframes toast-in{ from{ transform:translateY(12px); opacity:0; }
                     to{ transform:translateY(0); opacity:1; } }

/* Выпадающая подсказка @упоминаний */
.mention-box{
  position:absolute; left:0; z-index:70; min-width:230px;
  background:#fff; border:1px solid var(--line); border-radius:10px;
  box-shadow:0 8px 26px rgba(30,25,15,.18); overflow:hidden;
}
.mention-item{
  padding:8px 14px; font-size:13px; cursor:pointer;
}
.mention-item:hover{ background:var(--panel2); color:var(--gold); }

/* ---------- Лента событий ---------- */
.event-row{
  display:flex; gap:10px; padding:7px 0; border-bottom:1px solid var(--line);
  font-size:12.5px; text-decoration:none; color:var(--text);
  align-items:baseline;
}
.event-row:last-of-type{ border-bottom:none; }
.event-row:hover .event-text{ color:var(--gold); }
.event-time{ color:var(--muted); font-size:11px; white-space:nowrap; flex-shrink:0; }
.event-text{ line-height:1.45; }

/* Длинные неразрывные строки (имена файлов и т. п.) переносим,
   чтобы не распирали колонки */
.event-text, .notif-text, .kanban-card, .search-row, .task-title,
.problem-text, .comment-text{
  overflow-wrap:anywhere; min-width:0;
}

/* ---------- Команда ---------- */
.team-row{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:7px 0; border-bottom:1px solid var(--line); text-decoration:none;
  color:var(--text); font-size:13px;
}
.team-row:last-of-type{ border-bottom:none; }
.team-row:hover .team-name{ color:var(--gold); }
.team-load{ display:flex; gap:6px; align-items:center; }
.team-count{
  background:var(--panel2); border:1px solid var(--line); border-radius:12px;
  padding:2px 9px; font-size:12px;
}
.team-overdue{
  background:#fbeaea; border:1px solid #e5b9b9; color:#a03434;
  border-radius:12px; padding:2px 9px; font-size:12px;
}

/* ---------- Уведомления ---------- */
.notif-row{
  display:flex; gap:10px; padding:10px 0; border-bottom:1px solid var(--line);
  text-decoration:none; color:var(--text); font-size:13px; align-items:baseline;
}
.notif-row:last-of-type{ border-bottom:none; }
.notif-row:hover .notif-text{ color:var(--gold); }
.notif-row.unread .notif-text{ font-weight:600; }
/* Прочитанные не исчезают — просто гаснут */
.notif-row.read{ opacity:.55; }
.notif-row.read:hover{ opacity:.8; }
.notif-dot{ width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.nd-mention{ background:#3f6e8c; }
.nd-assign{ background:var(--gold); }
.nd-comment{ background:#a49d90; }
.notif-page, .digest-page, .search-page{ max-width:860px; }
.page-body{ padding:0 32px 60px; }
.page-body .section{ margin-top:16px; }
.page-body .back-btn{ margin-left:0; }

/* ---------- Поиск ---------- */
.search-summary{ font-size:13px; color:var(--muted); margin-bottom:6px; }
.search-row{
  padding:8px 0; border-bottom:1px solid var(--line); font-size:13px;
}
.search-row:last-of-type{ border-bottom:none; }
.search-meta{ display:block; font-size:11px; color:var(--muted); margin-top:2px; }

/* ---------- Канбан-доска ---------- */
/* Колонок может быть 3 или 4 (когда есть заблокированные задачи) —
   раскладка подстраивается сама, колонки делят ширину поровну
   и не вылезают за границы панели */
.kanban{
  display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0, 1fr);
  gap:14px; align-items:start;
}
@media(max-width:1100px){
  .kanban{ grid-auto-flow:row; grid-template-columns:repeat(2, minmax(0,1fr)); }
}
.kanban-col{
  background:var(--col-bg, var(--panel2)); border:1px solid var(--line);
  border-top:3px solid var(--col-accent, var(--line)); border-radius:12px;
  padding:10px;
}
/* Свой оттенок у каждой колонки — в тёплой гамме сайта */
/* Фон столбцов чуть заметнее (приглушённые цвета статусов); насыщенный
   цвет остаётся только у точек объектов — два языка не конкурируют */
.col-new{      --col-accent:#b4ada2; --col-bg:#efeae0; }
.col-progress{ --col-accent:#e0b52e; --col-bg:#f7eecb; }
.col-done{     --col-accent:#3f9a4e; --col-bg:#e4efe4; }
.kanban-collapsed{
  font-size:12px; color:var(--muted); background:#fff;
  border:1px dashed var(--line); border-radius:10px; padding:10px 12px;
  text-align:center;
}
/* Кнопки перемещения — мягкий цвет статуса-цели */
.move-btn.move-to-new{      background:#efeae0; border-color:#d5cec0; color:#5f594f; }
.move-btn.move-to-progress{ background:#f7eecb; border-color:#e4d49a; color:#7a5c1e; }
.move-btn.move-to-done{     background:#e4efe4; border-color:#bcd8bc; color:#2f6e3a; }
.move-btn.move-to-new:hover, .move-btn.move-to-progress:hover,
.move-btn.move-to-done:hover{ filter:brightness(.96); }
.kanban-col-head{
  font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:1px;
  color:#5f594f; padding:2px 4px 10px; display:flex; gap:8px;
  align-items:center;
}
.kanban-col-head::before{
  content:''; width:9px; height:9px; border-radius:50%;
  background:var(--col-accent, var(--muted)); flex-shrink:0;
}
.kanban-count{
  background:#fff; border:1px solid var(--line); border-radius:10px;
  padding:0 8px; font-size:11px; color:var(--text); margin-left:auto;
}
.kanban-card{
  background:#fff; border:1px solid var(--line); border-radius:10px;
  padding:10px 12px; margin-bottom:10px; font-size:13px;
  box-shadow:0 1px 6px rgba(30,25,15,.05);
}
.kanban-card:last-child{ margin-bottom:0; }
.kanban-meta{ font-size:11px; color:var(--muted); margin-top:5px; }
.kanban-empty{ font-size:12px; color:var(--muted); padding:6px 4px; }
.kanban-moves{ display:flex; flex-wrap:wrap; gap:5px; margin-top:8px; }
.move-btn{
  font-size:10.5px; padding:3px 8px; border-radius:12px; cursor:pointer;
  border:1px solid var(--line); background:var(--panel2);
  font-family:'Inter',sans-serif; color:#4a453f;
}
.move-btn:hover{ border-color:var(--accent); color:var(--text); }
.wip-warning{
  background:#fbf3e2; border:1px solid #ecd9ad; color:#7a5c1e;
  padding:9px 14px; font-size:12.5px; border-radius:8px; margin-bottom:12px;
}
.caption-overdue{ color:#a03434; }

/* ---------- Страничка сотрудника ---------- */
.emp-body{ padding:24px 32px 60px; max-width:1100px; }
.emp-header{ display:flex; align-items:center; gap:20px; flex-wrap:wrap; }
.avatar{
  width:76px; height:76px; border-radius:50%; flex-shrink:0;
  background:linear-gradient(135deg, var(--gold), #d8cdbd); color:#fff;
  display:flex; align-items:center; justify-content:center;
  font-size:26px; font-weight:600; letter-spacing:1px;
  font-family:'Cormorant Garamond', Georgia, serif;
}
.emp-name{ margin:0 0 4px; font-size:28px; font-weight:600; }
.emp-role{ color:var(--muted); font-size:13px; }
.emp-contacts{ margin-top:8px; display:flex; gap:16px; flex-wrap:wrap; font-size:13px; }
.emp-contacts a{ color:var(--gold); text-decoration:none; }
.emp-contacts a:hover{ text-decoration:underline; }
.emp-header .form-row input{ max-width:220px; }
.pwd-link{ display:inline-block; margin-top:8px; padding:0; }
.login-hint a{ color:var(--gold); text-decoration:none; }
.emp-stats{ display:flex; gap:22px; margin-left:auto; }
.emp-stats div{ text-align:center; font-size:11px; color:var(--muted); }
.emp-stats b{ display:block; font-size:22px; color:var(--text); font-weight:600; }
.emp-stats .stat-bad b{ color:#c14747; }
.emp-columns{ display:grid; grid-template-columns:2fr 1fr; gap:24px; }
.emp-columns.single{ grid-template-columns:1fr; max-width:520px; }
@media(max-width:900px){ .emp-columns{grid-template-columns:1fr;} }
.lead-obj{
  display:block; padding:10px 14px; margin-bottom:8px; border-radius:10px;
  border:1px solid var(--line); background:var(--panel2); font-size:13px;
  font-weight:600; text-decoration:none; color:var(--text);
  border-left:4px solid var(--accent);
}
.lead-obj:hover{ border-color:var(--accent); }
