/* © Егор — демо портфолио. */
/* =========================================================
   КЕЙС 11 — дизайн-система «ночная лаборатория обжарщика»
   ========================================================= */

:root {
  /* палитра */
  --bg:        #15100B;  /* тёмный эспрессо */
  --bg-2:      #1C1610;  /* панель */
  --bg-3:      #241C14;  /* приподнятая панель */
  --bg-4:      #2D2419;  /* ховер */
  --line:      #322719;  /* волосяные линии */
  --line-soft: #271E13;

  --ink:       #EFE7DA;  /* основной текст */
  --ink-2:     #B3A692;  /* вторичный */
  --ink-3:     #7C7060;  /* приглушённый */

  --amber:     #E8A33D;  /* светлая обжарка — главный акцент */
  --amber-ink: #15100B;
  --green:     #8FBF7F;  /* сырое зерно */
  --red:       #D96C4F;  /* просрочено */
  --blue:      #7FA8C9;  /* вода */

  /* типографика */
  --font-display: "Fraunces", Georgia, serif;
  --font-ui: "Onest", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --rail-w: 232px;
  --radius: 6px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-font-smoothing: antialiased; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14.5px;
  line-height: 1.5;
  min-height: 100vh;
}

::selection { background: rgba(232, 163, 61, .28); }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* лёгкое зерно поверх всего — фактура, не декор */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============ КАРКАС ============ */

.app { display: flex; min-height: 100vh; }

.main {
  flex: 1;
  min-width: 0;
  padding: 28px 36px 64px;
  max-width: none;
}

/* ============ ЛЕВЫЙ РЕЙЛ ============ */

.rail {
  width: var(--rail-w);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-2);
  border-right: 1px solid var(--line-soft);
  padding: 22px 16px 18px;
}

.rail__brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px 22px;
  border-bottom: 1px solid var(--line-soft);
}

.rail__mark { width: 30px; height: 30px; color: var(--amber); }

.rail__name {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: .01em;
  line-height: 1.1;
}

.rail__sub {
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: .04em;
}

.rail__nav { display: flex; flex-direction: column; gap: 2px; margin-top: 16px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 10px;
  background: none;
  border: none;
  border-radius: var(--radius);
  color: var(--ink-2);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background .12s, color .12s;
}

.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }

.nav-item:hover { background: var(--bg-3); color: var(--ink); }

.nav-item.is-active {
  background: var(--bg-3);
  color: var(--amber);
  box-shadow: inset 2px 0 0 var(--amber);
}

.nav-item__count {
  margin-left: auto;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  background: var(--bg-4);
  border-radius: 20px;
  padding: 1px 7px;
}

.rail__foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line-soft); }

.rail__shift { display: flex; align-items: center; gap: 10px; padding: 0 8px 12px; }

.rail__shift-label { font-size: 11.5px; color: var(--ink-3); }
.rail__shift-value { font-size: 13px; color: var(--ink); }

.rail__reset {
  width: 100%;
  background: none;
  border: none;
  color: var(--ink-3);
  font: inherit;
  font-size: 12px;
  text-align: left;
  padding: 6px 8px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: color .12s, background .12s;
}
.rail__reset:hover { color: var(--red); background: var(--bg-3); }

/* ============ ТОПБАР ============ */

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.topbar__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.topbar__date { color: var(--ink-3); font-size: 12.5px; margin-top: 6px; }

.topbar__actions { display: flex; gap: 10px; }

/* ============ КНОПКИ ============ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--bg-3);
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .12s, border-color .12s, transform .05s;
  white-space: nowrap;
}

.btn:hover { background: var(--bg-4); }
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--amber-ink);
}
.btn--primary:hover { background: #F0B253; border-color: #F0B253; }

.btn--ghost { background: transparent; }
.btn--ghost:hover { background: var(--bg-3); }

.btn--danger { color: var(--red); border-color: rgba(217,108,79,.35); }
.btn--danger:hover { background: rgba(217,108,79,.1); }

.btn--sm { padding: 5px 11px; font-size: 12.5px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  background: none;
  border: none;
  border-radius: var(--radius);
  color: var(--ink-3);
  cursor: pointer;
  transition: background .12s, color .12s;
}
.icon-btn:hover { background: var(--bg-4); color: var(--ink); }
.icon-btn svg { width: 15px; height: 15px; }

button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* ============ ВЬЮХИ ============ */

.view { animation: viewIn .22s ease-out; }

@keyframes viewIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .view { animation: none; }
  * { transition: none !important; }
}

/* ============ KPI ============ */

.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 22px;
  background: var(--bg-2);
}

.kpi {
  padding: 18px 22px 16px;
  position: relative;
}
.kpi + .kpi { border-left: 1px solid var(--line); }

.kpi__label {
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: .05em;
  margin-bottom: 7px;
}

.kpi__value {
  font-family: var(--font-mono);
  font-size: 27px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.kpi__value small { font-size: 15px; color: var(--ink-2); font-weight: 400; }

.kpi__delta { font-family: var(--font-mono); font-size: 12px; margin-top: 6px; }
.kpi__delta--up { color: var(--green); }
.kpi__delta--down { color: var(--red); }
.kpi__delta--flat { color: var(--ink-3); }

/* ============ СЕТКА ДАШБОРДА ============ */

.dash-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 22px;
}

.panel {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  min-width: 0;
}

.panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
}

.panel__meta { font-size: 12px; color: var(--ink-3); }

.panel--roasts, .panel--feed { min-height: 240px; }

/* ============ ГРАФИК ============ */

.chart svg { display: block; width: 100%; height: auto; }

.chart .bar { fill: var(--bg-4); transition: fill .12s; cursor: pointer; }
.chart .bar:hover { fill: #3A2D1C; }
.chart .bar--cur { fill: var(--amber); }
.chart .bar--cur:hover { fill: #F0B253; }
.chart .grid-line { stroke: var(--line-soft); stroke-width: 1; }
.chart .lbl { fill: var(--ink-3); font-family: var(--font-mono); font-size: 10px; }
.chart .val { fill: var(--ink-2); font-family: var(--font-mono); font-size: 10px; }

/* ============ ШКАЛА ПЛАНА ============ */

.gauge { display: flex; justify-content: center; padding: 6px 0 2px; }
.gauge svg { width: 200px; height: auto; }

.gauge__track { stroke: var(--bg-4); }
.gauge__fill  { stroke: var(--amber); stroke-linecap: round; }

.gauge__pct {
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 600;
  fill: var(--ink);
}
.gauge__cap { font-family: var(--font-ui); font-size: 11px; fill: var(--ink-3); }

.gauge__legend {
  display: flex;
  justify-content: space-between;
  border-top: 1px dashed var(--line);
  margin-top: 14px;
  padding-top: 12px;
  font-size: 12.5px;
  color: var(--ink-2);
}
.gauge__legend .mono { color: var(--ink); }

/* ============ ОБЖАРКИ ============ */

.roast-list { list-style: none; display: flex; flex-direction: column; }

.roast {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 11px 0;
  border-top: 1px solid var(--line-soft);
}
.roast:first-child { border-top: none; padding-top: 2px; }

.roast__time {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--amber);
}
.roast--tomorrow .roast__time { color: var(--ink-3); }

.roast__name { font-weight: 500; }
.roast__meta { font-size: 12px; color: var(--ink-3); margin-top: 1px; }

.roast__kg { font-family: var(--font-mono); font-size: 13px; color: var(--ink-2); }

/* ============ ЛЕНТА ============ */

.feed { list-style: none; display: flex; flex-direction: column; max-height: 300px; overflow-y: auto; }

.feed__item {
  display: flex;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
}
.feed__item:first-child { border-top: none; padding-top: 0; }

.feed__icon { flex-shrink: 0; margin-top: 5px; }

.feed__text { color: var(--ink-2); }
.feed__text b { color: var(--ink); font-weight: 600; }
.feed__time { display: block; font-size: 11px; color: var(--ink-3); margin-top: 2px; font-family: var(--font-mono); }

/* ============ ТОЧКИ СТАТУСА ============ */

.dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot--live {
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(143,191,127,.5);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(143,191,127,.45); }
  70%  { box-shadow: 0 0 0 7px rgba(143,191,127,0); }
  100% { box-shadow: 0 0 0 0 rgba(143,191,127,0); }
}

.dot--amber { background: var(--amber); }
.dot--green { background: var(--green); }
.dot--red   { background: var(--red); }
.dot--blue  { background: var(--blue); }
.dot--grey  { background: var(--ink-3); }

/* ============ ВОРОНКА ============ */

.board {
  display: grid;
  grid-template-columns: repeat(5, minmax(218px, 1fr));
  gap: 14px;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 10px;
}

.col {
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 12px;
  min-height: 300px;
  transition: border-color .12s, background .12s;
}

.col.is-over { border-color: var(--amber); background: var(--bg-3); }

.col__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px 12px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 10px;
}

.col__name { font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }

.col__sum { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3); }

.card {
  background: var(--bg-3);
  border: 1px solid var(--line-soft);
  border-left: 2px solid var(--amber);
  border-radius: var(--radius);
  padding: 11px 12px;
  margin-bottom: 9px;
  cursor: grab;
  transition: border-color .12s, transform .12s;
}

.card:hover { border-color: var(--line); border-left-color: var(--amber); }
.card:active { cursor: grabbing; }
.card.is-dragging { opacity: .35; }

.card__client { font-weight: 600; font-size: 13.5px; margin-bottom: 3px; }
.card__title { font-size: 12.5px; color: var(--ink-2); margin-bottom: 9px; }

.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
}

.card__amount { color: var(--amber); font-weight: 600; }
.card__days { color: var(--ink-3); }
.card__days--stale { color: var(--red); }

.card__tags { display: flex; gap: 5px; margin-top: 8px; flex-wrap: wrap; }

/* ============ ЧИПЫ ============ */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid var(--line);
  color: var(--ink-2);
  white-space: nowrap;
}

/* ============ ТУЛБАР / ПОИСК / СЕГМЕНТЫ ============ */

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.toolbar__right { color: var(--ink-2); font-size: 13px; }

.search {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  width: 340px;
}

.search svg { width: 14px; height: 14px; color: var(--ink-3); flex-shrink: 0; }

.search input {
  flex: 1;
  background: none;
  border: none;
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  padding: 9px 0;
}
.search input::placeholder { color: var(--ink-3); }
.search input:focus { outline: none; }
.search:focus-within { border-color: var(--amber); }

.seg { display: flex; gap: 4px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 3px; }

.seg__btn {
  background: none;
  border: none;
  color: var(--ink-3);
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: background .12s, color .12s;
  white-space: nowrap;
}

.seg__btn:hover { color: var(--ink); }
.seg__btn.is-on { background: var(--bg-4); color: var(--amber); }

/* ============ ТАБЛИЦЫ ============ */

.table-wrap {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

.table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: .05em;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.table td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }

.table th.num, .table td.num { text-align: right; font-family: var(--font-mono); font-size: 13px; }

.table tbody tr { cursor: pointer; transition: background .1s; }
.table tbody tr:hover { background: var(--bg-3); }
.table tbody tr.no-hover { cursor: default; }
.table tbody tr.no-hover:hover { background: none; }

.cell-name { font-weight: 600; }
.cell-sub { font-size: 12px; color: var(--ink-3); margin-top: 1px; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--ink-2);
  white-space: nowrap;
}

.empty { padding: 44px 20px; text-align: center; color: var(--ink-3); font-size: 13.5px; }

/* ============ ЗАДАЧИ ============ */

.tasks-layout { display: grid; grid-template-columns: 1fr 300px; gap: 22px; align-items: start; }

.task-group { margin-bottom: 22px; }

.task-group__title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--ink-3);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.task-group__title .mono { color: var(--ink-3); }

.task {
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 12px 15px;
  margin-bottom: 7px;
  transition: background .12s;
}
.task:hover { background: var(--bg-3); }

.task__check {
  width: 19px; height: 19px;
  flex-shrink: 0;
  border: 1.5px solid var(--ink-3);
  border-radius: 5px;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: all .12s;
  padding: 0;
}
.task__check svg { width: 11px; height: 11px; }
.task__check:hover { border-color: var(--green); }
.task--done .task__check { background: var(--green); border-color: var(--green); color: var(--amber-ink); }

.task__body { flex: 1; min-width: 0; }
.task__title { font-size: 14px; }
.task--done .task__title { text-decoration: line-through; color: var(--ink-3); }
.task__meta { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

.task__prio {
  width: 3px;
  align-self: stretch;
  border-radius: 2px;
  background: var(--line);
  flex-shrink: 0;
}
.task__prio--high { background: var(--red); }
.task__prio--mid  { background: var(--amber); }

.task__del { opacity: 0; }
.task:hover .task__del { opacity: 1; }

.tasks-side .focus-big {
  font-family: var(--font-mono);
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
}
.tasks-side .focus-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-top: 1px dashed var(--line);
  font-size: 13px;
  color: var(--ink-2);
}
.tasks-side .focus-row .mono { color: var(--ink); }

/* ============ DRAWER ============ */

.drawer { position: fixed; inset: 0; z-index: 60; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(10, 7, 4, .6); }

.drawer__panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 420px;
  max-width: 92vw;
  background: var(--bg-2);
  border-left: 1px solid var(--line);
  overflow-y: auto;
  padding: 26px 28px 40px;
  animation: drawerIn .2s ease-out;
}

@keyframes drawerIn {
  from { transform: translateX(30px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

.drawer__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 4px; }

.drawer__title { font-family: var(--font-display); font-size: 25px; font-weight: 500; line-height: 1.15; }

.drawer__sub { color: var(--ink-3); font-size: 12.5px; margin: 4px 0 16px; }

.drawer__section { margin-top: 24px; }
.drawer__section-title {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .07em;
  color: var(--ink-3);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-soft);
}

.kv { display: flex; justify-content: space-between; gap: 14px; padding: 5px 0; font-size: 13px; }
.kv dt { color: var(--ink-3); }
.kv dd { text-align: right; }

.drawer__tags { display: flex; gap: 6px; flex-wrap: wrap; }

.mini-order {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line-soft);
  font-size: 13px;
}
.mini-order:last-child { border-bottom: none; }
.mini-order__id { font-family: var(--font-mono); color: var(--ink-3); font-size: 12px; }
.mini-order__sum { font-family: var(--font-mono); }

.drawer__actions { display: flex; gap: 10px; margin-top: 26px; }

/* ============ МОДАЛКА ============ */

.modal[hidden], .drawer[hidden], .view[hidden] { display: none; }

.modal { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; }
.modal__scrim { position: absolute; inset: 0; background: rgba(10, 7, 4, .65); }

.modal__box {
  position: relative;
  width: 460px;
  max-width: 92vw;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px 24px 24px;
  animation: modalIn .18s ease-out;
}

@keyframes modalIn {
  from { transform: translateY(10px) scale(.985); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

.modal__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal__title { font-family: var(--font-display); font-size: 21px; font-weight: 500; }

.field { margin-bottom: 14px; }

.field__label { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; }

.field__input, .field__select, .field__textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  padding: 9px 12px;
  transition: border-color .12s;
}
.field__input:focus, .field__select:focus, .field__textarea:focus { outline: none; border-color: var(--amber); }
.field__input::placeholder { color: var(--ink-3); }

.field__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.field--error .field__input, .field--error .field__select { border-color: var(--red); }
.field__err { font-size: 11.5px; color: var(--red); margin-top: 4px; }

.modal__foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* ============ ТОСТЫ ============ */

.toasts {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-left: 2px solid var(--green);
  border-radius: var(--radius);
  padding: 11px 16px;
  font-size: 13.5px;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
  animation: toastIn .2s ease-out;
  max-width: 360px;
}

.toast--amber { border-left-color: var(--amber); }
.toast--red { border-left-color: var(--red); }

.toast.is-out { animation: toastOut .18s ease-in forwards; }

@keyframes toastIn  { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastOut { to { transform: translateY(6px); opacity: 0; } }

/* ============ АДАПТИВ ============ */

@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpi:nth-child(3) { border-left: none; }
  .kpi:nth-child(3), .kpi:nth-child(4) { border-top: 1px solid var(--line); }
  .dash-grid { grid-template-columns: 1fr; }
  .board { grid-template-columns: repeat(5, 230px); }
  .tasks-layout { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .app { flex-direction: column; }
  .rail {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-right: none;
    border-bottom: 1px solid var(--line-soft);
    overflow-x: auto;
  }
  .rail__brand { border: none; padding: 0 10px 0 0; }
  .rail__sub, .rail__foot { display: none; }
  .rail__nav { flex-direction: row; margin: 0; }
  .nav-item span { display: none; }
  .nav-item { padding: 8px; }
  .nav-item__count { display: none; }
  .main { padding: 20px 18px 48px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .topbar__title { font-size: 26px; }
}

/* =========================================================
   ПОРТФОЛИО-ВЕРСИЯ: блоки без обводки по кругу.
   Убрана только внешняя рамка блоков (border-color: transparent —
   геометрия и отступы не меняются). Внутренние разделители,
   янтарная полоса слева у карточек, рамки полей ввода, чекбоксы
   и фокус-состояния сохранены. Подсветка колонки при drag-over
   (.col.is-over) продолжает работать как обратная связь.
   ========================================================= */

.kpis,
.panel,
.col,
.table-wrap,
.task,
.modal__box,
.drawer__panel { border-color: transparent; }

/* карточка сделки: обводка по кругу убрана, левая янтарная полоса остаётся */
.card,
.card:hover {
  border-top-color: transparent;
  border-right-color: transparent;
  border-bottom-color: transparent;
}

/* лента «данные вымышленные» — в стиле демо, не мешает тостам */
.demo-ribbon {
  position: fixed;
  left: calc(var(--rail-w) + 14px);
  bottom: 14px;
  z-index: 50;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--ink-3);
  background: var(--bg-3);
  border: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
  opacity: .92;
  pointer-events: none;
  user-select: none;
}
@media (max-width: 860px) {
  .demo-ribbon { display: none; }
}
