/* ALF × Floxio — портал-прототип. Светлая рабочая зона, тёмная навигация. */
:root {
  --blue: #954617;
  --blue-2: #C5652D;
  --blue-soft: #F6ECE5;
  --blue-ink: #6E3410;
  --ink: #1D1D1D;
  --ink-2: #151515;
  --ink-3: #252525;
  --bg: #F5F5F5;
  --card: #FFFFFF;
  --line: #E3E1DE;
  --line-2: #EFEDEA;
  --text: #1D1D1D;
  --text-2: #5A5A5A;
  --text-3: #8F8F8F;
  --green: #0E9F6E;
  --green-soft: #E3F6EE;
  --amber: #D98A04;
  --amber-soft: #FDF3DC;
  --red: #D83A3A;
  --red-soft: #FCE8E8;
  --violet: #6D4AE0;
  --violet-soft: #EEE9FD;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(29, 29, 29, .04), 0 6px 24px rgba(29, 29, 29, .05);
  --shadow-lg: 0 24px 64px rgba(29, 29, 29, .14);
  --display: 'Onest', -apple-system, BlinkMacSystemFont, sans-serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --side-w: 248px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
svg { width: 16px; height: 16px; flex: none; vertical-align: -3px; }
.chip svg { width: 13px; height: 13px; }
.card h3 { display: flex; align-items: center; gap: 8px; }
.kpi .label svg { width: 14px; height: 14px; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; letter-spacing: -.01em; }
.mono { font-family: var(--mono); font-feature-settings: "tnum"; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }

/* ── Каркас ─────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: radial-gradient(130% 80% at 0% 0%, #2a1d14 0%, #1d1d1d 60%, #151515 100%);
  color: #fff; padding: 18px 14px 24px; display: flex; flex-direction: column; gap: 6px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 16px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, #C5652D, #954617); font-family: var(--display); font-weight: 800; font-size: 15px;
  box-shadow: 0 6px 18px rgba(197, 101, 45, .35);
}
.brand-name { font-family: var(--display); font-weight: 700; font-size: 15px; line-height: 1.15; }
.brand-sub { font-size: 11px; color: rgba(255,255,255,.55); }
.nav-group { margin-top: 12px; }
.nav-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: rgba(255,255,255,.4); padding: 6px 10px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; color: rgba(255,255,255,.78);
  padding: 8px 10px; border-radius: 9px; text-align: left; font-size: 13.5px; transition: background .2s, color .2s;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: rgba(197,101,45,.18); color: #fff; box-shadow: inset 2px 0 0 #C77A4D; }
.nav-item svg { width: 17px; height: 17px; flex: none; opacity: .85; }
.nav-item .badge { margin-left: auto; }
.nav-item.locked { opacity: .35; pointer-events: none; }
.side-foot { margin-top: auto; padding: 12px 10px 0; font-size: 11.5px; color: rgba(255,255,255,.45); line-height: 1.45; }
.side-foot b { color: rgba(255,255,255,.8); font-weight: 600; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px;
  padding: 12px 28px; background: rgba(245,245,245,.86); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.crumbs { font-size: 13px; color: var(--text-3); display: flex; gap: 8px; align-items: center; min-width: 0; }
.crumbs b { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-search {
  margin-left: auto; display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 7px 12px; color: var(--text-3); font-size: 13px; width: 300px;
}
.top-search kbd { margin-left: auto; font-family: var(--mono); font-size: 11px; border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; }
.role-switch { position: relative; }
.role-btn {
  display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--card);
  border-radius: 999px; padding: 4px 12px 4px 4px; color: var(--text);
}
.avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; color: #fff;
  background: var(--blue); flex: none;
}
.role-btn .who { text-align: left; line-height: 1.15; }
.role-btn .who b { display: block; font-size: 13px; }
.role-btn .who span { font-size: 11px; color: var(--text-3); }
.role-menu {
  position: absolute; right: 0; top: calc(100% + 8px); width: 300px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; display: none;
}
.role-menu.open { display: block; animation: pop .25s var(--ease); }
.role-opt { display: flex; gap: 10px; align-items: center; width: 100%; border: 0; background: none; padding: 9px; border-radius: 10px; text-align: left; }
.role-opt:hover { background: var(--bg); }
.role-opt .who b { display: block; font-size: 13px; }
.role-opt .who span { font-size: 11.5px; color: var(--text-3); }
.role-opt.on { background: var(--blue-soft); }
.role-hint { font-size: 11.5px; color: var(--text-3); padding: 8px 10px 6px; border-top: 1px solid var(--line-2); margin-top: 4px; }

.view { padding: 26px 28px 60px; max-width: 1400px; width: 100%; animation: fadeUp .45s var(--ease); }
.view-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.view-head h1 { font-size: 26px; font-weight: 700; }
.view-head p { margin: 6px 0 0; color: var(--text-2); max-width: 760px; }
.view-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Базовые элементы ───────────────────────────────── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px 20px; }
.card h3 { font-size: 15px; font-weight: 700; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.card-head h3 { font-size: 14.5px; }
.card-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }

.btn {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--card); color: var(--text);
  border-radius: 9px; padding: 7px 13px; font-size: 13px; font-weight: 600; transition: transform .15s, box-shadow .2s, background .2s;
  white-space: nowrap;
}
.btn:hover { box-shadow: 0 4px 14px rgba(29,29,29,.08); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 6px 18px rgba(149,70,23,.25); }
.btn.primary:hover { background: var(--blue-ink); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: rgba(29,29,29,.04); box-shadow: none; }
.btn.danger { color: var(--red); }
.btn.green { background: var(--green); border-color: var(--green); color: #fff; }
.btn.sm { padding: 4px 9px; font-size: 12px; border-radius: 7px; }
.btn svg { width: 15px; height: 15px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  background: var(--line-2); color: var(--text-2); white-space: nowrap; line-height: 1.6;
}
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.amber { background: var(--amber-soft); color: #9A6100; }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.violet { background: var(--violet-soft); color: var(--violet); }
.badge.dark { background: var(--ink); color: #fff; }
.badge.count { background: #C5652D; color: #fff; min-width: 20px; justify-content: center; padding: 0 6px; }
.badge.outline { background: transparent; border: 1px solid var(--line); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.dot.pulse { animation: pulse 1.6s infinite; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 12.5px; background: var(--card); color: var(--text-2);
}
.chip.ours { border-color: rgba(14,159,110,.35); background: var(--green-soft); color: #08714F; font-weight: 600; }
.chip.not { color: var(--text-3); text-decoration: line-through; text-decoration-color: rgba(29,29,29,.25); }
.chip.maybe { border-color: rgba(217,138,4,.35); background: var(--amber-soft); color: #8A5800; }
button.chip { cursor: pointer; }
button.chip:hover { border-color: var(--blue); color: var(--blue); }

.tabs { display: flex; gap: 4px; background: var(--line-2); padding: 4px; border-radius: 11px; width: fit-content; flex-wrap: wrap; }
.tab { border: 0; background: none; padding: 6px 13px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text-2); display: flex; gap: 7px; align-items: center; }
.tab.on { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(29,29,29,.08); }

.kpi { padding: 16px 18px; }
.kpi .label { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.kpi .value { font-family: var(--display); font-weight: 700; font-size: 26px; margin-top: 4px; letter-spacing: -.02em; }
.kpi .sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.kpi.accent { background: linear-gradient(135deg, #954617, #6E3410); border-color: transparent; color: #fff; }
.kpi.accent .label, .kpi.accent .sub { color: rgba(255,255,255,.72); }

table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
.t th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #FAFAF9; white-space: nowrap; }
.t td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tr.click { cursor: pointer; transition: background .15s; }
.t tr.click:hover td { background: #FAF7F4; }
.t tr.dim td { opacity: .55; }
.t td.r, .t th.r { text-align: right; }
.t input.cell {
  width: 76px; border: 1px solid var(--line); border-radius: 7px; padding: 4px 7px; font: inherit; font-family: var(--mono); font-size: 12.5px; text-align: right; background: #FAFAF9;
}
.t input.cell:focus { outline: 2px solid rgba(149,70,23,.25); border-color: var(--blue); background: #fff; }
.table-wrap { overflow-x: auto; }

.bar { height: 6px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--blue); transition: width .8s var(--ease); }
.bar.green > i { background: var(--green); }
.bar.amber > i { background: var(--amber); }

.ring { --p: 50; --c: var(--blue); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--line-2) 0); position: relative; font-family: var(--mono); font-size: 12px; font-weight: 700; }
.ring::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--card); }
.ring span { position: relative; }

.note {
  display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 11px; font-size: 13px; line-height: 1.5;
  background: var(--blue-soft); color: #5E2C0E;
}
.note.amber { background: var(--amber-soft); color: #7A4E00; }
.note.green { background: var(--green-soft); color: #075F43; }
.note.gray { background: var(--line-2); color: var(--text-2); }
.note svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }

.demo-flag {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px;
  background: repeating-linear-gradient(135deg, #FFF6E0, #FFF6E0 6px, #FDEFC8 6px, #FDEFC8 12px); color: #8A5800; border: 1px solid #F3DCA0;
}
.real-flag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--ink); color: #fff; }

/* ── Радар ──────────────────────────────────────────── */
.tender {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--line-2);
  cursor: pointer; transition: background .15s; align-items: start;
}
.tender:hover { background: #FAF7F4; }
.tender:last-child { border-bottom: 0; }
.tender-title { font-weight: 600; font-size: 14px; line-height: 1.4; }
.tender-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--text-3); margin-top: 4px; }
.tender-mats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.tender-side { text-align: right; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.tender-sum { font-family: var(--display); font-weight: 700; font-size: 16px; }
.tender .why { font-size: 12.5px; color: var(--text-2); margin-top: 8px; padding-left: 10px; border-left: 2px solid var(--line); }
.plat {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 12px; color: #fff; letter-spacing: -.02em;
}

/* Конвейер агента */
.pipeline { position: relative; padding: 6px 0; }
.step { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; position: relative; padding-bottom: 16px; }
.step:not(:last-child)::before { content: ""; position: absolute; left: 16px; top: 32px; bottom: 0; width: 2px; background: var(--line); }
.step.done:not(:last-child)::before { background: linear-gradient(var(--green), var(--green)); }
.step-ico {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--line-2); color: var(--text-3);
  font-family: var(--mono); font-size: 12px; font-weight: 700; z-index: 1; border: 2px solid var(--card);
}
.step.run .step-ico { background: var(--blue); color: #fff; box-shadow: 0 0 0 6px rgba(149,70,23,.12); }
.step.done .step-ico { background: var(--green); color: #fff; }
.step-ico svg { width: 16px; height: 16px; }
.step-title { font-weight: 600; font-size: 13.5px; padding-top: 6px; }
.step-body { font-size: 12.5px; color: var(--text-2); margin-top: 3px; }
.step.wait .step-title, .step.wait .step-body { color: var(--text-3); }
.log {
  font-family: var(--mono); font-size: 11.5px; line-height: 1.7; background: #1A1714; color: #D9CFC7; border-radius: 10px; padding: 10px 12px; margin-top: 8px;
  max-height: 150px; overflow: hidden; white-space: pre-wrap;
}
.log .ok { color: #5EE3A6; }
.log .k { color: #E0A47F; }
.log .w { color: #FFC965; }
.caret::after { content: "▌"; animation: blink 1s steps(1) infinite; color: #E0A47F; }

/* Калькулятор */
.calc-total {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line-2);
}
.calc-total > div { padding: 14px 18px; border-right: 1px solid var(--line-2); }
.calc-total > div:last-child { border-right: 0; background: linear-gradient(135deg, #F8F1EC, #fff); }
.calc-total .label { font-size: 12px; color: var(--text-2); }
.calc-total .value { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -.02em; }
.param { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px dashed rgba(149,70,23,.35); border-radius: 10px; background: #FBF6F2; font-size: 12.5px; }
.param input { width: 54px; border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; font-family: var(--mono); text-align: right; }

/* Сделка Битрикс */
.b24 { border-radius: 14px; overflow: hidden; border: 1px solid #CFE3F7; background: #fff; box-shadow: var(--shadow); }
.b24-top { background: #2FC6F6; color: #fff; padding: 10px 16px; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 13px; }
.b24-top .logo { background: #fff; color: #2FC6F6; border-radius: 6px; padding: 1px 7px; font-weight: 800; }
.b24-stages { display: flex; gap: 2px; padding: 12px 16px 0; }
.b24-stages span { flex: 1; text-align: center; font-size: 10.5px; font-weight: 600; padding: 5px 4px; color: #fff; background: #C9D1DB; clip-path: polygon(0 0, 92% 0, 100% 50%, 92% 100%, 0 100%, 6% 50%); }
.b24-stages span.on { background: #2FC6F6; }
.b24-body { padding: 14px 16px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; font-size: 12.5px; }
.b24-body .f-l { color: #8A96A8; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.b24-body .f-v { font-weight: 600; }
.b24-title { padding: 12px 16px 0; font-weight: 700; font-size: 15px; font-family: var(--display); }

/* Канбан */
.kanban { display: grid; grid-template-columns: repeat(6, minmax(210px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: #EEECE9; border-radius: 12px; padding: 10px; min-height: 280px; }
.col-h { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--text-2); padding: 2px 4px 10px; text-transform: uppercase; letter-spacing: .04em; }
.col-h .sum { margin-left: auto; font-family: var(--mono); font-weight: 600; color: var(--text-3); text-transform: none; letter-spacing: 0; }
.kcard { background: #fff; border-radius: 10px; padding: 10px 11px; box-shadow: 0 1px 2px rgba(29,29,29,.06); margin-bottom: 8px; font-size: 12.5px; border-left: 3px solid var(--blue); }
.kcard b { display: block; font-size: 12.5px; line-height: 1.35; margin-bottom: 5px; }
.kcard .m { display: flex; justify-content: space-between; color: var(--text-3); font-size: 11.5px; }
.kcard.new { animation: glow 2.4s var(--ease); }

/* База знаний */
.doc-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.doc-row:hover { background: #FAF7F4; }
.doc-ico { width: 40px; height: 48px; border-radius: 7px; background: linear-gradient(160deg, #fff, #F3EFEB); border: 1px solid var(--line); display: grid; place-items: center; font-size: 10px; font-weight: 800; color: var(--blue); font-family: var(--mono); position: relative; }
.doc-ico::after { content: ""; position: absolute; top: -1px; right: -1px; border-width: 0 10px 10px 0; border-style: solid; border-color: var(--bg) var(--bg) #E2DCD6 #E2DCD6; border-radius: 0 0 0 3px; }
.issue { padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.issue:last-child { border-bottom: 0; }
.issue-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.issue-h b { font-size: 13.5px; }
.issue p { margin: 6px 0 0; font-size: 13px; color: var(--text-2); }
.quote { margin-top: 8px; padding: 8px 12px; border-left: 3px solid #D8C9BE; background: #F8F6F4; border-radius: 0 8px 8px 0; font-size: 12.5px; color: var(--text-2); }
.quote .src { display: block; font-size: 11px; color: var(--text-3); margin-top: 3px; font-weight: 600; }
.fix { margin-top: 8px; padding: 8px 12px; border-radius: 8px; background: var(--green-soft); color: #075F43; font-size: 12.5px; }
.fix b { font-weight: 700; }
.sev { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.sev.high { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.sev.medium { background: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }
.sev.low { background: #ABA39B; box-shadow: 0 0 0 4px var(--line-2); }

/* Помощник */
.chat { display: flex; flex-direction: column; height: calc(100vh - 190px); min-height: 520px; }
.chat-log { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 760px; display: flex; gap: 10px; animation: fadeUp .35s var(--ease); }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.bubble { padding: 11px 15px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: 13.5px; line-height: 1.6; }
.msg.me .bubble { background: var(--blue); color: #fff; border-color: var(--blue); border-bottom-right-radius: 4px; }
.msg.bot .bubble { border-bottom-left-radius: 4px; }
.bubble ol, .bubble ul { margin: 6px 0; padding-left: 20px; }
.bubble li { margin: 3px 0; }
.srcs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.src-chip { font-size: 11.5px; border: 1px solid var(--line); border-radius: 7px; padding: 3px 8px; background: #F8F6F4; color: var(--text-2); cursor: help; }
.src-chip b { color: var(--blue); }
.chat-in { border-top: 1px solid var(--line); padding: 14px; display: flex; gap: 10px; align-items: flex-end; background: #FBFAF9; border-radius: 0 0 var(--radius) var(--radius); }
.chat-in textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; font: inherit; min-height: 46px; max-height: 140px; background: #fff; }
.chat-in textarea:focus { outline: 2px solid rgba(149,70,23,.2); border-color: var(--blue); }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 22px 14px; }
.typing span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); margin-right: 4px; animation: bounce 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }

/* Тест */
.quiz-q { font-family: var(--display); font-weight: 700; font-size: 18px; line-height: 1.35; }
.opt { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; border: 1.5px solid var(--line); background: var(--card); border-radius: 12px; padding: 12px 14px; margin-top: 10px; font-size: 14px; transition: border-color .15s, background .15s; }
.opt:hover { border-color: #D9C2B2; }
.opt .l { width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; color: var(--text-3); }
.opt.right { border-color: var(--green); background: var(--green-soft); }
.opt.right .l { background: var(--green); border-color: var(--green); color: #fff; }
.opt.wrong { border-color: var(--red); background: var(--red-soft); }
.opt.wrong .l { background: var(--red); border-color: var(--red); color: #fff; }
.opt[disabled] { cursor: default; }
.progress-steps { display: flex; gap: 5px; }
.progress-steps i { flex: 1; height: 5px; border-radius: 9px; background: var(--line); }
.progress-steps i.ok { background: var(--green); } .progress-steps i.bad { background: var(--red); } .progress-steps i.cur { background: var(--blue); }

.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.check:last-child { border-bottom: 0; }
.cbox { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid #D3CCC5; display: grid; place-items: center; flex: none; margin-top: 1px; }
.cbox.on { background: var(--green); border-color: var(--green); color: #fff; }
.cbox svg { width: 13px; height: 13px; }

/* Доступы */
.matrix td.c { text-align: center; }
.tick { width: 22px; height: 22px; border-radius: 6px; display: inline-grid; place-items: center; }
.tick.full { background: var(--green-soft); color: var(--green); }
.tick.read { background: var(--blue-soft); color: var(--blue); }
.tick.none { color: #CFCAC5; }
.tick svg { width: 13px; height: 13px; }

/* Модалка, тост */
.modal-bg { position: fixed; inset: 0; background: rgba(29,29,29,.45); backdrop-filter: blur(4px); z-index: 60; display: grid; place-items: center; padding: 24px; animation: fade .2s; }
.modal { background: var(--card); border-radius: 18px; width: min(760px, 100%); max-height: 88vh; overflow: auto; box-shadow: var(--shadow-lg); animation: pop .3s var(--ease); }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 18px 22px; border-bottom: 1px solid var(--line-2); position: sticky; top: 0; background: var(--card); z-index: 1; }
.modal-h h3 { font-size: 17px; }
.modal-b { padding: 20px 22px; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 13px; z-index: 80; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center; animation: toastIn .35s var(--ease); }
.toast svg { width: 16px; height: 16px; color: #5EE3A6; }

.empty { padding: 40px; text-align: center; color: var(--text-3); }
.hl { background: linear-gradient(transparent 55%, rgba(255,201,101,.55) 55%); }
.mark-add { background: #DDF5EA; color: #075F43; border-radius: 4px; padding: 0 3px; }
.mark-del { background: #FBE2E2; color: #9D2525; text-decoration: line-through; border-radius: 4px; padding: 0 3px; }
.kbd { font-family: var(--mono); font-size: 11px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: #fff; }

.mic { width: 64px; height: 64px; border-radius: 50%; border: 0; background: var(--red); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 0 rgba(216,58,58,.4); }
.mic.rec { animation: ring 1.4s infinite; }
.mic svg { width: 26px; height: 26px; }
.wave { display: flex; gap: 3px; align-items: center; height: 36px; }
.wave i { width: 4px; border-radius: 4px; background: var(--red); animation: wave 1s infinite ease-in-out; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 currentColor; } 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes bounce { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes glow { 0% { box-shadow: 0 0 0 0 rgba(47,198,246,.0); transform: scale(.96); } 30% { box-shadow: 0 0 0 6px rgba(47,198,246,.35); transform: none; } 100% { box-shadow: 0 1px 2px rgba(29,29,29,.06); } }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(216,58,58,.45); } 70% { box-shadow: 0 0 0 18px rgba(216,58,58,0); } 100% { box-shadow: 0 0 0 0 rgba(216,58,58,0); } }
@keyframes wave { 0%, 100% { height: 8px; } 50% { height: 32px; } }

/* ── Адаптив ────────────────────────────────────────── */
.burger { display: none; border: 0; background: none; padding: 4px; color: var(--text); }
.burger svg { width: 22px; height: 22px; }
@media (max-width: 1180px) {
  .split { grid-template-columns: 1fr; }
  .g5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-search { display: none; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; z-index: 70; width: 270px; transform: translateX(-100%); transition: transform .3s var(--ease); }
  .side.open { transform: none; box-shadow: var(--shadow-lg); }
  .burger { display: block; }
  .top { padding: 10px 16px; }
  .view { padding: 18px 16px 50px; }
  .g2, .g3, .g4, .g5 { grid-template-columns: 1fr 1fr; }
  .role-btn .who { display: none; }
  .role-btn { padding: 4px; }
  .tender { grid-template-columns: 40px minmax(0, 1fr); }
  .tender-side { grid-column: 2; align-items: flex-start; text-align: left; flex-direction: row; flex-wrap: wrap; }
  .plat { width: 40px; height: 40px; }
  .calc-total { grid-template-columns: 1fr; }
  .calc-total > div { border-right: 0; border-bottom: 1px solid var(--line-2); }
  .b24-body { grid-template-columns: 1fr; }
  .view-head h1 { font-size: 22px; }
  .crumbs span.hide-m { display: none; }
}
@media (max-width: 520px) {
  .g2, .g3, .g4, .g5 { grid-template-columns: 1fr; }
  .kpi .value { font-size: 22px; }
}

/* Правки после проверки в браузере */
.opt[disabled] { color: var(--text); opacity: 1; }
.top-search span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }


/* ── Фирменный стиль ALF ── */
.brand { flex-direction: column; align-items: flex-start; gap: 8px; padding: 8px 10px 18px; }
.brand .lg { height: 20px; --logo-b: #fff; }
.brand-sub { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.5); }
.nav-item.active { background: rgba(149,70,23,.28); box-shadow: inset 2px 0 0 #C77A4D; }
.nav-label { color: rgba(255,255,255,.38); }
.btn { border-radius: 4px; }
.btn.primary { box-shadow: 0 6px 18px rgba(149,70,23,.28); }
.card, .b24, .modal { border-radius: 10px; }
.view-head h1 { font-weight: 600; }
.kpi .value { font-weight: 600; }
.badge.count { background: #C5652D; }
.brand .lg { display: block; height: 22px; }
.brand .lg .alf-logo { display: block; height: 100%; width: auto; }

/* Возврат к предложению */
a.brand { text-decoration: none; color: inherit; }
a.brand:hover .brand-sub { color: #E0A47F; }
.back-offer { margin-left: auto; border-color: #E3C9B6; color: #954617; }
.back-offer:hover { background: #F6ECE5; }
.top-search { margin-left: 0; }
.side-back { display: inline-flex; align-items: center; gap: 6px; color: #E0A47F; font-weight: 600; font-size: 12px; }
.side-back:hover { color: #fff; }
.side-back svg { width: 14px; height: 14px; }
@media (max-width: 860px) { .back-offer span { display: none; } .back-offer { padding: 6px 8px; } }
