/* ==========================================================================
   Дизайн-система: тёплая земляная тема (linen / sandstone / olive / licorice)
   Источник: мудборды @elona_dsgn — льняной #FAF0E6, песчаник #B3A696,
   Намибия #7B6B5E, лакрица #2A2E1F + осенняя палитра (капучино, олива, корица)
   ========================================================================== */

/* --- Design tokens --- */
:root {
  /* surfaces — тёплые песочные */
  --bg: #f2efe2;              /* льняной тёплый фон с оливковым оттенком */
  --surface: rgba(255,255,255,.55);
  --surface-strong: rgba(255,255,255,.78);
  --surface-hover: rgba(255,255,255,.95);
  --line: rgba(90,75,55,.14);
  --line-strong: rgba(90,75,55,.28);

  /* text — тёплые тёмно-коричневые (контраст >= 4.5:1 на льняном) */
  --txt: #3a3226;
  --txt-dim: #5d5343;
  --txt-mut: #8a7c64;

  /* brand & semantic — больше зелёного, оливковый акцент */
  --acc: #2e7d32;             /* тёмный зелёный — основной акцент */
  --acc-hover: #1b5e20;
  --acc-soft: rgba(46,125,50,.18);
  --olive: #558b2f;           /* яркий оливковый */
  --olive-soft: rgba(85,139,47,.14);
  --green: #2e7d32;           /* тёмно-зелёный */
  --green-light: #4caf50;     /* яркий зелёный */
  --amber: #885e49;           /* корица */
  --red: #b3472f;             /* терракота */
  --violet: #7b6b5e;

  /* effect */
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(50,58,30,.28);
  --shadow-sm: 0 4px 14px rgba(50,58,30,.2);
  --ease: cubic-bezier(.22,.8,.3,1);

  /* z-scale */
  --z-modal: 100;
  --z-notif: 60;
  --z-hover: 40;
}

* { box-sizing: border-box; }
:root { color-scheme: light; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(1100px 520px at 85% -10%, rgba(105,94,38,.30), transparent 60%),
    radial-gradient(900px 460px at -10% 20%, rgba(46,74,42,.16), transparent 55%),
    radial-gradient(700px 380px at 50% 110%, rgba(123,107,94,.18), transparent 60%),
    var(--bg);
  color: var(--txt);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
.muted { color: var(--txt-mut); font-size: 12.5px; }

/* --- Base controls --- */
input, select, button {
  font-size: 14px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--txt);
  transition: border-color .18s var(--ease), background .18s var(--ease), transform .12s var(--ease), box-shadow .18s var(--ease);
}
/* Нативные выпадающие списки: светлые опции, читаемый текст на льняном фоне */
select option {
  background: #fbf7ef;
  color: #3a3226;
}
select option:hover, select option:checked {
  background: #e9dfce;
  color: #3a3226;
}
input::placeholder { color: var(--txt-mut); }
input:focus, select:focus, button:focus-visible {
  outline: none;
  border-color: var(--acc);
  box-shadow: 0 0 0 3px var(--acc-soft);
}
button { cursor: pointer; min-height: 40px; }
button:active { transform: scale(.97); }
button:disabled { opacity: .5; cursor: not-allowed; }

button.primary {
  background: linear-gradient(135deg, #5c5f28, #3a3f18);
  border: none; color: #f6f1e7; font-weight: 600;
  box-shadow: 0 4px 16px rgba(74,80,32,.4);
}
button.primary:hover { filter: brightness(1.1); box-shadow: 0 6px 20px rgba(74,80,32,.5); }
button.ghost { background: transparent; }
button.ghost:hover { background: var(--surface-hover); }
button.danger { background: transparent; border: 1px solid var(--red); color: var(--red); }
button.danger:hover { background: rgba(179,71,47,.12); }
.err { color: var(--red); min-height: 20px; margin-top: 8px; }

/* --- Login --- */
#login { display: flex; align-items: center; justify-content: center; height: 100vh; padding: 20px; }
.login-card { width: 340px; padding: 32px; }
.login-card input { width: 100%; margin-bottom: 12px; }
.login-card h2 { margin-top: 0; font-size: 22px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* --- Header --- */
header {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 18px;
  padding: 10px 22px;
  border-bottom: 1px solid rgba(74,80,32,.2);
  background: rgba(241,238,226,.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  flex-wrap: wrap;
}
.brand { font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.brand svg { color: var(--olive); }
nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav-btn {
  background: transparent; border: none; color: var(--txt-dim); font-weight: 600;
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: var(--radius-sm);
}
.nav-btn svg { width: 17px; height: 17px; }
.nav-btn:hover { background: var(--surface-hover); color: var(--txt); }
.nav-btn.active { color: #f6f1e7; background: linear-gradient(135deg, #5c5f28, #3a3f18); box-shadow: 0 4px 14px rgba(74,80,32,.3); }
.user-box { display: flex; align-items: center; gap: 10px; color: var(--txt-dim); }

.view { padding: 20px 24px; max-width: 1600px; margin: 0 auto; }
h3 { margin: 8px 0 14px; font-size: 20px; color: var(--green); }
h4 { margin: 22px 0 12px; color: var(--txt-dim); }

/* --- Widgets (bento-ish) --- */
.widgets { display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 14px; }
.widget {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; position: relative; overflow: hidden;
  backdrop-filter: blur(10px);
  transition: transform .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.widget::after {
  content: ""; position: absolute; top: -40%; right: -20%; width: 60%; height: 80%;
  background: radial-gradient(circle, rgba(105,94,38,.22), transparent 70%);
  opacity: .8; pointer-events: none;
}
.widget:hover { transform: translateY(-3px); border-color: var(--olive); box-shadow: var(--shadow-sm); }
.w-num { font-size: 32px; font-weight: 800; color: var(--olive); letter-spacing: -.5px; }
.w-num.warn { color: var(--red); }
.w-lab { color: var(--txt-mut); margin-top: 4px; font-size: 13px; }
.overdue-item {
  background: var(--surface); border: 1px solid var(--line);
  padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 8px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  border-left: 3px solid var(--red);
  transition: background .18s var(--ease);
}
.overdue-item:hover { background: var(--surface-hover); }
.due { color: var(--txt-mut); font-size: 12px; }
.due.overdue { color: var(--red); font-weight: 700; }

/* --- Динамика: новые vs выполнено --- */
.dyn-card { padding: 18px 20px; margin-bottom: 8px; }
.dyn-flex { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.dyn-item { text-align: center; }
.dyn-item.small { font-size: 13px; color: var(--txt-dim); }
.dyn-num { font-size: 34px; font-weight: 800; letter-spacing: -.5px; }
.dyn-num.new { color: var(--green); }
.dyn-num.done { color: var(--amber); }
.dyn-lab { font-size: 12px; color: var(--txt-mut); margin-top: 2px; }
.dyn-arrow { font-size: 24px; color: var(--txt-mut); }
.dyn-balance { font-size: 14px; font-weight: 700; color: var(--txt-dim); margin-left: auto; max-width: 220px; text-align: right; }
.dyn-30 { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.dyn-30 b { color: var(--txt); }
.seg { margin-top: 14px; }
.seg-bar { display: flex; height: 14px; border-radius: 20px; overflow: hidden; background: var(--surface-strong); border: 1px solid var(--line); }
.seg-fill { background: var(--green); transition: width .4s var(--ease); }
.seg-fill.seg-done { background: var(--amber); }
.seg-leg { display: flex; gap: 18px; margin-top: 7px; font-size: 12px; color: var(--txt-dim); align-items: center; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }

/* --- Прогресс по проектам / нагрузка --- */
.prog-list { display: grid; gap: 10px; }
.prog-row { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.prog-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; margin-bottom: 8px; flex-wrap: wrap; }
.prog-head span { color: var(--txt-mut); font-size: 12px; }
.prog-head .w-col { color: var(--olive); }
.bar { height: 8px; border-radius: 20px; background: var(--surface-strong); border: 1px solid var(--line); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 20px; transition: width .4s var(--ease); }

/* --- Нагрузка (компактная гистограмма) --- */
.load-chart { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.load-bars { display: grid; gap: 7px; }
.load-row { display: flex; align-items: center; gap: 8px; }
.load-name { width: 110px; font-size: 12px; font-weight: 600; color: var(--txt-dim); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.load-bar { flex: 1; height: 14px; border-radius: 20px; background: var(--surface-strong); border: 1px solid var(--line); overflow: hidden; display: flex; }
.load-fill { height: 100%; min-width: 2px; transition: width .4s var(--ease); }
.load-fill.inwork { background: var(--olive); }
.load-fill.queued { background: var(--green); }
.load-num { width: 30px; font-size: 12px; font-weight: 700; color: var(--txt); text-align: right; }

/* --- Тренд (столбчатый график) --- */
.chart-bars { display: flex; align-items: flex-end; gap: 6px; height: 130px; padding-top: 4px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.chart-stack { display: flex; align-items: flex-end; gap: 2px; height: 100px; width: 100%; justify-content: center; }
.chart-bar { width: 9px; border-radius: 3px 3px 0 0; min-height: 2px; transition: height .3s var(--ease); }
.chart-bar.new { background: var(--green); }
.chart-bar.done { background: var(--amber); }
.chart-lab { font-size: 10px; color: var(--txt-mut); white-space: nowrap; }

/* --- Реестр inline редактирование --- */
.reg-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.reg-table th, .reg-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.reg-table th { background: var(--surface-strong); color: var(--txt-dim); font-weight: 600; position: sticky; top: 0; z-index: 1; }
.reg-row:hover { background: var(--surface-hover); }
.reg-overdue { background: rgba(179,71,47,.08); }
.reg-rep { font-size: 12px; color: var(--txt-mut); margin-top: 4px; }
.cell-title { cursor: pointer; }
.inline-select, .inline-date { width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-strong); color: var(--txt); font-size: 12px; }
.inline-select:focus, .inline-date:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 2px var(--acc-soft); }

/* --- Фильтры на доске --- */
.board-filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.board-filters select { padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-strong); color: var(--txt); font-size: 13px; }

/* --- Кнопки зеленые --- */
button.primary { background: var(--acc); color: #fff; border: none; border-radius: var(--radius-sm); padding: 8px 14px; font-weight: 600; cursor: pointer; transition: background .2s var(--ease); }
button.primary:hover { background: var(--acc-hover); }
button.primary:focus { outline: none; box-shadow: 0 0 0 3px var(--acc-soft); }
button.ghost { background: transparent; color: var(--txt); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 8px 14px; cursor: pointer; transition: all .2s var(--ease); }
button.ghost:hover { background: var(--surface-strong); border-color: var(--acc); }
button.danger-link { color: var(--red); background: none; border: none; padding: 4px; cursor: pointer; }
button.danger-link:hover { background: rgba(179,71,47,.1); border-radius: 4px; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.tab {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-weight: 600;
  transition: all .18s var(--ease);
}
.tab:hover { background: var(--surface-hover); }
.tab.active { background: linear-gradient(135deg, #5c5f28, #3a3f18); color: #f6f1e7; border-color: transparent; box-shadow: 0 4px 14px rgba(74,80,32,.35); }

/* --- Kanban --- */
.kanban { display: grid; grid-template-columns: repeat(auto-fit,minmax(230px,1fr)); gap: 14px; align-items: start; }
.col {
  background: linear-gradient(160deg, rgba(255,255,255,.62), rgba(105,94,38,.08));
  border: 1px solid rgba(74,80,32,.22); border-radius: var(--radius);
  min-height: 200px;
  backdrop-filter: blur(10px);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.col:hover { border-color: rgba(74,80,32,.4); }
/* колонка «Готово» — зелёная подсветка */
.col[data-status="Готово"] {
  background: linear-gradient(160deg, rgba(255,255,255,.6), rgba(46,74,42,.16));
  border-color: rgba(46,74,42,.35);
}
.col[data-status="Готово"] .col-head { color: var(--green); border-bottom-color: rgba(46,74,42,.2); }
.col-head {
  padding: 12px 14px; font-weight: 700;
  border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.col-head .cnt {
  color: var(--green); font-weight: 700; font-size: 12px;
  background: rgba(46,74,42,.12); border-radius: 20px; padding: 2px 9px;
}
.add-card-top {
  background: transparent; border: 1px dashed var(--olive); color: var(--olive);
  border-radius: var(--radius-sm); padding: 4px 9px; font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 5px;
  transition: all .18s var(--ease);
}
.add-card-top svg { width: 14px; height: 14px; }
.add-card-top:hover { background: var(--acc); color: #fff; transform: none; }
.col-body { padding: 10px; min-height: 120px; }
.show-more {
  width: 100%; background: var(--surface); border: 1px dashed var(--line-strong);
  color: var(--txt-dim); border-radius: 9px; padding: 8px; font-weight: 600; font-size: 12.5px;
  min-height: 36px; transition: all .18s var(--ease);
}
.show-more:hover { background: var(--olive-soft); color: var(--olive); border-color: var(--olive); }

.card {
  background: linear-gradient(160deg, rgba(255,255,255,.85), rgba(105,94,38,.07));
  border: 1px solid var(--line);
  border-left: 4px solid var(--olive);
  border-radius: 11px; padding: 12px 14px; margin-bottom: 10px; cursor: grab;
  position: relative;
  transition: transform .16s var(--ease), border-color .16s var(--ease), box-shadow .16s var(--ease), background .16s var(--ease);
}
.card:hover { transform: translateY(-2px); background: linear-gradient(160deg, #fff, rgba(105,94,38,.12)); box-shadow: var(--shadow-sm); border-color: rgba(74,80,32,.4); }
.card.prio-high { border-left-color: var(--red); }
.card.prio-medium { border-left-color: var(--amber); }
.card.prio-low { border-left-color: var(--green); }
.card-title { font-weight: 600; margin-bottom: 8px; font-size: 14px; }
/* Название задачи: максимум 5 строк, остальное — обрезка + индикатор */
.card-title {
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.4;
}
.card-proj { font-size: 12px; color: var(--olive); margin-bottom: 5px; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.card-proj svg { width: 13px; height: 13px; }
.card-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12px; }
.pill {
  background: var(--bg); border: 1px solid rgba(74,80,32,.25); border-radius: 20px;
  padding: 3px 9px; color: var(--txt-dim); font-weight: 500;
  display: inline-flex; align-items: center; gap: 4px;
}
.pill svg { width: 12px; height: 12px; }
.del-btn {
  margin-left: auto; background: transparent; border: none; color: var(--txt-mut);
  width: 30px; height: 30px; padding: 0; border-radius: 7px; display: grid; place-items: center;
  min-height: 30px;
}
.del-btn svg { width: 15px; height: 15px; }
.del-btn:hover { color: var(--red); background: rgba(248,113,113,.12); }

/* --- My tasks --- */
.mytask { display: flex; flex-direction: column; gap: 6px; cursor: default; }

/* --- Admin --- */
.form-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.form-row input, .form-row select { min-width: 140px; }
.user-row {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--surface); border: 1px solid var(--line);
  padding: 12px 16px; border-radius: 11px; margin-bottom: 8px;
  transition: background .18s var(--ease);
}
.user-row:hover { background: var(--surface-hover); }
.user-actions { display: flex; gap: 6px; align-items: center; }
.user-actions button { min-height: 34px; padding: 6px 10px; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.danger-link { color: var(--red); border-color: rgba(248,113,113,.4); }
code { background: var(--surface-strong); padding: 2px 7px; border-radius: 6px; color: var(--acc); font-size: 12.5px; }
.perm-block { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 10px; }
.perm-item { display: inline-flex; gap: 7px; align-items: center; margin: 4px 14px 4px 0; font-size: 13px; cursor: pointer; }
.perm-item input { accent-color: var(--olive); width: 16px; height: 16px; min-height: 16px; }

/* --- Modal --- */
#modal, #closed_modal {
  position: fixed; inset: 0; z-index: var(--z-modal);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(40,50,25,.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadeIn .2s var(--ease);
}
.modal-box {
  width: min(560px, 94vw); max-height: 88vh; overflow: auto;
  padding: 24px;
  background: linear-gradient(160deg, #fff, #f5efe6);
  border: 1px solid rgba(74,80,32,.25);
  animation: modalIn .24s var(--ease);
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 12px; }
.modal-head b { font-size: 17px; }
.modal-body label { display: block; margin-bottom: 12px; font-size: 12.5px; color: var(--txt-mut); font-weight: 600; }
.modal-body select, .modal-body input { width: 100%; margin-top: 5px; font-weight: 400; }
.modal-body hr { border: none; border-top: 1px solid var(--line); margin: 16px 0; }
.modal-foot { margin-top: 16px; }
.rep { border-top: 1px solid var(--line); padding: 10px 0; font-size: 14px; animation: fadeSlide .25s var(--ease); }
.rep b { color: var(--txt-dim); font-size: 12px; }
.rep span { color: var(--txt-mut); font-size: 11px; float: right; }
.rep div { margin-top: 4px; }

/* --- Hover-комментарии на карточке --- */
.card-hover {
  display: none; position: absolute; left: 0; right: 0; top: calc(100% - 2px); z-index: var(--z-hover);
  background: #fdfaf4; border: 1px solid var(--line-strong); border-radius: 11px; padding: 12px;
  box-shadow: var(--shadow); max-height: 200px; overflow: auto;
}
.card:hover .card-hover { display: block; }
.h-rep { font-size: 12px; border-bottom: 1px solid var(--line); padding: 5px 0; }
.h-rep b { color: var(--acc); }
.h-rep div { margin-top: 2px; color: var(--txt-dim); }

/* --- Бейдж IT --- */
.it-pill { border-color: rgba(46,74,42,.5); color: var(--green); background: rgba(46,74,42,.08); }

/* --- Колокольчик --- */
.bell { background: transparent; border: 1px solid var(--line); border-radius: 10px; position: relative; width: 42px; height: 42px; padding: 0; display: grid; place-items: center; min-height: 42px; }
.bell svg { width: 19px; height: 19px; }
#bell_count {
  position: absolute; top: -5px; right: -5px; background: var(--red); color: #fff;
  border-radius: 20px; font-size: 11px; padding: 1px 6px; font-weight: 700; min-width: 18px; text-align: center;
}

/* --- Панель оповещений --- */
#notif_panel {
  position: fixed; right: 18px; top: 62px; z-index: var(--z-notif);
  width: min(370px, 94vw); background: rgba(253,250,244,.97);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; max-height: 72vh; overflow: auto;
  backdrop-filter: blur(16px);
  animation: fadeSlide .22s var(--ease);
}
.notif-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.notif-item { border-bottom: 1px solid var(--line); padding: 10px 0; font-size: 13px; }
.notif-item.unread { background: rgba(46,74,42,.1); border-radius: 9px; padding: 10px 12px; border-left: 3px solid var(--green); }

/* --- Реестр --- */
.reg-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.reg-filters select { background: var(--surface); color: var(--txt); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; }
.reg-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.reg-table th, .reg-table td { border-bottom: 1px solid var(--line); padding: 9px 11px; text-align: left; vertical-align: top; }
.reg-table th {
  background: rgba(46,74,42,.1); position: sticky; top: 56px; z-index: 5;
  font-weight: 700; color: var(--green); font-size: 12px; text-transform: uppercase; letter-spacing: .4px;
  backdrop-filter: blur(8px);
}
.reg-table tbody tr { transition: background .15s var(--ease); }
.reg-table tbody tr:hover { background: var(--surface-hover); }
.reg-table .reg-overdue td { background: rgba(248,113,113,.07); }
.reg-table td:nth-child(3) { min-width: 220px; }
.reg-row { cursor: pointer; }
.reg-row:hover td { background: var(--surface-hover) !important; }
.reg-rep { font-size: 12px; color: var(--txt-dim); max-width: 260px; }
.reg-rep b { color: var(--olive); font-weight: 600; }
.reg-rep div { margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Закрытые проекты */
.closed-item {
  width: 100%; display: flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 14px; margin-bottom: 8px; font-weight: 600; min-height: 42px;
  transition: all .18s var(--ease);
}
.closed-item:hover { background: var(--olive-soft); border-color: var(--olive); color: var(--olive); transform: translateX(2px); }
.closed-item svg { color: var(--txt-mut); }
.closed-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.closed-row .closed-item { margin-bottom: 0; flex: 1; }
.closed-row .closed-open { flex-shrink: 0; color: var(--green); border-color: rgba(46,74,42,.45); min-height: 42px; }
.closed-row .closed-open:hover { background: rgba(46,74,42,.12); }
#btn_toggle_close { color: var(--green); border-color: rgba(46,74,42,.45); }
#btn_toggle_close:hover { background: rgba(46,74,42,.12); }

/* --- Skeleton --- */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-hover) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
  border-radius: var(--radius-sm);
}

/* --- Toast --- */
#toast_zone { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: rgba(250,244,233,.97); border: 1px solid var(--line-strong); color: var(--txt);
  border-radius: 11px; padding: 12px 16px; font-size: 13.5px;
  box-shadow: var(--shadow); display: flex; align-items: center; gap: 10px;
  animation: toastIn .25s var(--ease);
  max-width: 340px;
}
.toast svg { width: 18px; height: 18px; color: var(--green); flex-shrink: 0; }
.toast.error svg { color: var(--red); }
.toast.out { animation: toastOut .2s var(--ease) forwards; }

/* --- Animations --- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes fadeSlide { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Появление карточек канбана — лёгкий stagger */
.col-body .card { animation: cardIn .3s var(--ease) backwards; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* --- Responsive --- */
@media (max-width: 768px) {
  header { gap: 10px; padding: 8px 14px; }
  .view { padding: 14px 14px; }
  nav { order: 3; width: 100%; justify-content: space-between; }
  .nav-btn { flex: 1; justify-content: center; }
  .reg-table th { top: 40px; }
}
@media (max-width: 480px) {
  .brand { font-size: 14px; }
  .nav-btn svg { width: 19px; height: 19px; }
}
