/* Bundled locally: the interface does not depend on Google Fonts or another CDN. */
@font-face{font-family:"Open Sans";font-style:normal;font-display:swap;font-weight:400;src:url("./assets/fonts/open-sans-cyrillic-400.woff2") format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"Open Sans";font-style:normal;font-display:swap;font-weight:400;src:url("./assets/fonts/open-sans-latin-ext-400.woff2") format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Open Sans";font-style:normal;font-display:swap;font-weight:400;src:url("./assets/fonts/open-sans-latin-400.woff2") format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Open Sans";font-style:normal;font-display:swap;font-weight:600;src:url("./assets/fonts/open-sans-cyrillic-600.woff2") format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"Open Sans";font-style:normal;font-display:swap;font-weight:600;src:url("./assets/fonts/open-sans-latin-ext-600.woff2") format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Open Sans";font-style:normal;font-display:swap;font-weight:600;src:url("./assets/fonts/open-sans-latin-600.woff2") format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Open Sans";font-style:normal;font-display:swap;font-weight:700;src:url("./assets/fonts/open-sans-cyrillic-700.woff2") format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"Open Sans";font-style:normal;font-display:swap;font-weight:700;src:url("./assets/fonts/open-sans-latin-ext-700.woff2") format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Open Sans";font-style:normal;font-display:swap;font-weight:700;src:url("./assets/fonts/open-sans-latin-700.woff2") format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

:root {
  --ink: #17211c;
  --muted: #6e7c74;
  --line: #dfe6e1;
  --panel: #ffffff;
  --canvas: #f4f6f3;
  --green: #174d36;
  --green-2: #247653;
  --mint: #dceee3;
  --mint-2: #eff7f2;
  --gold: #b78027;
  --red: #b84040;
  --blue: #28649a;
  --shadow: 0 14px 38px rgba(31, 55, 43, .10);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--canvas); color: var(--ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 244px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; background: #15261e; color: #eaf2ed; padding: 22px 16px 16px; display: flex; flex-direction: column; z-index: 20; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 24px; border-bottom: 1px solid rgba(255,255,255,.10); }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: #d8b161; color: #17231d; font-weight: 900; letter-spacing: -.5px; }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 15px; }
.brand span { color: #94a69c; font-size: 10px; margin-top: 2px; }
.nav { display: grid; gap: 4px; padding-top: 18px; }
.nav-item { border: 0; background: transparent; color: #adc0b5; border-radius: 9px; min-height: 42px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; text-align: left; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-item.active { color: #fff; background: #274638; box-shadow: inset 3px 0 #d8b161; }
.nav-item kbd { border: 0; background: transparent; color: #73867b; font-size: 11px; }
.nav-count { min-width: 23px; padding: 2px 7px; border-radius: 20px; background: #355c49; font-size: 11px; text-align: center; }
.nav-count.warn { background: #754e25; }
.sidebar-footer { margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); padding-top: 14px; }
.user-card { display: flex; align-items: center; gap: 10px; padding: 6px 5px 12px; }
.avatar { flex: 0 0 35px; width: 35px; height: 35px; border-radius: 50%; display: grid; place-items: center; background: #e4c886; color: #253329; font-weight: 800; font-size: 12px; }
.user-card strong, .user-card span { display: block; }
.user-card strong { font-size: 12px; }
.user-card div span { color: #8fa297; font-size: 10px; margin-top: 2px; }
.main { min-width: 0; }
.topbar { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 28px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 15; backdrop-filter: blur(12px); }
.search-box { width: min(560px, 58vw); display: flex; align-items: center; gap: 8px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: #f8faf8; padding: 0 11px; color: var(--muted); }
.search-box input { min-width: 0; flex: 1; border: 0; outline: none; background: transparent; color: var(--ink); }
kbd { border: 1px solid #d7dfda; background: white; color: #89958e; border-radius: 5px; padding: 2px 6px; font-size: 10px; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.db-status { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 700; white-space: nowrap; }
.db-status i { width: 8px; height: 8px; border-radius: 50%; background: #a5afa9; }
.db-status.online i { background: #2c9b63; box-shadow: 0 0 0 3px #e1f3e9; }
.db-status.saving i, .db-status.connecting i { background: var(--gold); }
.db-status.offline { color: var(--red); }
.db-status.offline i { background: var(--red); }
.primary, .secondary, .ghost, .danger, .icon-btn { border-radius: 9px; min-height: 38px; padding: 0 14px; border: 1px solid transparent; font-weight: 700; font-size: 13px; }
.primary { background: var(--green); color: #fff; box-shadow: 0 5px 12px rgba(23,77,54,.18); }
.primary:hover { background: #0e3c29; }
.secondary { color: var(--green); background: var(--mint-2); border-color: #cfe0d6; }
.ghost { background: transparent; color: var(--muted); border-color: var(--line); }
.danger { background: #fff3f3; color: var(--red); border-color: #f2cccc; }
.icon-btn { width: 39px; padding: 0; background: white; color: var(--muted); border-color: var(--line); }
.notification-btn { position: relative; color: var(--gold); font-size: 12px; }
.notification-btn b { position: absolute; right: -5px; top: -7px; display: grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 10px; background: var(--red); color: white; font-size: 9px; }
.full { width: 100%; color: #9db0a5; border-color: rgba(255,255,255,.14); }
.view { padding: 28px; max-width: 1560px; margin: 0 auto; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 22px; }
.eyebrow { color: var(--green-2); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .11em; margin-bottom: 6px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-family: Georgia, "Times New Roman", serif; font-size: 31px; margin-bottom: 4px; letter-spacing: -.03em; }
h2 { font-size: 17px; margin-bottom: 0; }
h3 { font-size: 14px; }
.page-head p, .muted { color: var(--muted); }
.page-head p { margin: 0; font-size: 13px; }
.head-actions { display: flex; gap: 8px; }
.grid { display: grid; gap: 16px; }
.kpi-grid { grid-template-columns: repeat(4, minmax(0,1fr)); margin-bottom: 16px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 13px; padding: 17px 18px; min-width: 0; }
.kpi-top { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 700; }
.kpi strong { display: block; font-size: 24px; margin: 12px 0 5px; letter-spacing: -.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.delta { font-size: 11px; color: var(--green-2); }
.delta.red { color: var(--red); }
.dashboard-grid { grid-template-columns: minmax(0,1.55fr) minmax(310px,.75fr); align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.panel-head { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 17px; border-bottom: 1px solid var(--line); }
.panel-head p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.text-btn { border: 0; background: transparent; color: var(--green-2); font-size: 12px; font-weight: 750; padding: 6px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; text-align: left; background: #fafbfa; }
th, td { padding: 12px 14px; border-bottom: 1px solid #edf0ee; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.clickable:hover { background: #f8fbf9; }
.clickable { cursor: pointer; }
.company-cell strong, .deal-cell strong { display: block; font-size: 12px; }
.company-cell span, .deal-cell span { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tag { display: inline-flex; align-items: center; gap: 5px; border-radius: 20px; padding: 4px 8px; font-size: 10px; font-weight: 750; background: #eff4f1; color: #54665c; white-space: nowrap; }
.tag.green { background: #e4f3e9; color: #246742; }
.tag.gold { background: #fbf0da; color: #8b641f; }
.tag.red { background: #fae6e6; color: #9c3b3b; }
.tag.blue { background: #e7f0f8; color: #2b6393; }
.stage-list { padding: 5px 17px 12px; }
.stage-row { display: grid; grid-template-columns: minmax(120px,1fr) 86px 95px; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px solid #edf0ee; }
.stage-row:last-child { border: 0; }
.stage-name { font-size: 12px; font-weight: 700; }
.bar { height: 6px; background: #edf1ee; border-radius: 8px; overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--green-2); }
.task-list { padding: 4px 15px 12px; }
.task-item { display: grid; grid-template-columns: 23px 1fr auto; gap: 9px; padding: 12px 0; border-bottom: 1px solid #edf0ee; align-items: start; }
.task-item:last-child { border: 0; }
.task-check { width: 19px; height: 19px; border-radius: 6px; border: 1px solid #cad5ce; background: #fff; padding: 0; color: white; }
.task-check.done { background: var(--green-2); border-color: var(--green-2); }
.task-item strong { display: block; font-size: 12px; line-height: 1.35; }
.task-item span { color: var(--muted); font-size: 10px; }
.task-date { font-size: 10px; color: var(--muted); white-space: nowrap; }
.task-date.overdue { color: var(--red); font-weight: 700; }
.toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; flex-wrap: wrap; }
.pipeline-bar { display: flex; align-items: stretch; gap: 12px; margin-bottom: 12px; }
.pipeline-select-wrap { min-width: 250px; display: grid; gap: 3px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.pipeline-select-wrap span { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.pipeline-select-wrap select { border: 0; outline: 0; background: transparent; color: var(--ink); font-weight: 800; }
.pipeline-tabs { flex: 1; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; padding: 4px; border-radius: 11px; background: #e9eeeb; }
.pipeline-tab { border: 0; border-radius: 8px; background: transparent; color: var(--muted); padding: 8px 13px; text-align: left; }
.pipeline-tab strong, .pipeline-tab span { display: block; }
.pipeline-tab strong { font-size: 12px; }
.pipeline-tab span { margin-top: 2px; font-size: 10px; }
.pipeline-tab.active { color: var(--ink); background: #fff; box-shadow: 0 2px 8px rgba(23,33,28,.08); }
.stage-rail { display: flex; overflow-x: auto; gap: 2px; margin: 0 0 10px; padding-bottom: 3px; }
.stage-chip { position: relative; min-width: 145px; flex: 1; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 6px; border: 0; background: #dfe9e3; color: #315342; padding: 9px 10px; text-align: left; }
.stage-chip:first-child { border-radius: 8px 0 0 8px; }
.stage-chip:last-child { border-radius: 0 8px 8px 0; }
.stage-chip:hover { background: #cfe2d7; }
.stage-chip span { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.7); font-size: 10px; }
.stage-chip strong { font-size: 10px; white-space: nowrap; }
.stage-chip b { font-size: 10px; }
.compact-toolbar { margin-bottom: 10px; }
.filter-group { display: flex; gap: 3px; background: #e9eeeb; padding: 3px; border-radius: 9px; }
.filter-pill { border: 0; border-radius: 7px; background: transparent; padding: 7px 11px; color: var(--muted); font-size: 11px; font-weight: 700; }
.filter-pill.active { background: white; color: var(--ink); box-shadow: 0 2px 7px rgba(0,0,0,.06); }
.toolbar .spacer { flex: 1; }
.field-inline { min-height: 34px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); padding: 0 9px; font-size: 11px; }
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(245px, 1fr); gap: 11px; overflow-x: auto; padding-bottom: 14px; scroll-snap-type: x proximity; }
.column { background: #e9eeeb; border-radius: 12px; min-height: 500px; padding: 9px; scroll-snap-align: start; }
.column-head { display: flex; justify-content: space-between; gap: 8px; padding: 5px 4px 10px; }
.column-head strong { font-size: 11px; }
.column-head span { color: var(--muted); font-size: 10px; }
.deal-card { border: 1px solid #dce4df; background: white; border-radius: 10px; padding: 12px; margin-bottom: 8px; box-shadow: 0 2px 3px rgba(23,33,28,.03); }
.deal-card:hover { border-color: #a9c4b4; box-shadow: 0 5px 14px rgba(23,77,54,.08); }
.deal-card:focus { outline: 3px solid #cfe5d8; border-color: #7da58e; }
.deal-card .top { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 9px; }
.deal-card h3 { margin: 9px 0 5px; line-height: 1.35; }
.deal-card p { font-size: 10px; color: var(--muted); margin-bottom: 12px; }
.deal-card .numbers { display: flex; justify-content: space-between; align-items: end; gap: 8px; }
.deal-card .numbers strong { font-size: 13px; }
.deal-card .numbers span { display: block; font-size: 9px; color: var(--green-2); margin-top: 2px; }
.due { font-size: 9px; padding: 3px 6px; background: #f3f5f3; color: var(--muted); border-radius: 5px; }
.due.overdue { color: var(--red); background: #fff0f0; }
.open-hint { opacity: 0; margin-top: 10px; color: var(--green-2); font-size: 10px; font-weight: 750; transition: opacity .15s; }
.deal-card:hover .open-hint, .deal-card:focus .open-hint { opacity: 1; }
.list-panel { background: white; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.list-meta { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.empty { padding: 54px 20px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); margin-bottom: 5px; }
.back-row { margin-bottom: 12px; }
.back-btn { border: 0; background: transparent; color: var(--green-2); font-weight: 750; padding: 4px 0; }
.deal-stage-nav { display: flex; gap: 2px; overflow-x: auto; margin-bottom: 12px; padding-bottom: 3px; }
.deal-stage-step { min-width: 128px; flex: 1; display: flex; align-items: center; gap: 7px; border: 0; background: #e5ebe7; color: #708078; padding: 10px; text-align: left; }
.deal-stage-step:first-child { border-radius: 9px 0 0 9px; }
.deal-stage-step:last-child { border-radius: 0 9px 9px 0; }
.deal-stage-step span { flex: 0 0 20px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: #fff; font-size: 9px; }
.deal-stage-step strong { font-size: 10px; white-space: nowrap; }
.deal-stage-step.current { color: #fff; background: var(--green-2); }
.deal-stage-step.current span { color: var(--green); }
.detail-layout { display: grid; grid-template-columns: minmax(0,1fr) 330px; gap: 16px; }
.detail-card { background: white; border: 1px solid var(--line); border-radius: 13px; padding: 20px; }
.detail-title { display: flex; justify-content: space-between; gap: 15px; align-items: start; margin-bottom: 18px; }
.detail-title h1 { font-size: 27px; }
.detail-title .sub { color: var(--muted); font-size: 12px; }
.facts { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin: 17px 0; }
.fact { background: #f6f8f6; border-radius: 9px; padding: 11px; }
.fact span, .fact strong { display: block; }
.fact span { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.fact strong { font-size: 12px; }
.tabs { display: flex; gap: 5px; border-bottom: 1px solid var(--line); margin: 20px 0 14px; overflow-x: auto; }
.tab { border: 0; background: transparent; padding: 10px 11px; color: var(--muted); font-size: 11px; font-weight: 750; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab.active { color: var(--green); border-color: var(--green); }
.tab-content { min-height: 220px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 10px; }
.section-head p { color: var(--muted); font-size: 11px; margin: 4px 0 0; }
.tab-task-list { padding-left: 0; padding-right: 0; }
.tab-timeline { max-width: 720px; padding-top: 8px; }
.note { background: #f7f9f7; padding: 12px; border-radius: 8px; font-size: 11px; line-height: 1.5; margin-bottom: 8px; }
.timeline { position: relative; padding-left: 17px; }
.timeline:before { content:""; position: absolute; left: 4px; top: 7px; bottom: 7px; width: 1px; background: #d8e1db; }
.event { position: relative; padding: 0 0 16px 8px; font-size: 11px; }
.event:before { content:""; position: absolute; left: -17px; top: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--green-2); border: 2px solid white; box-shadow: 0 0 0 1px #bcd0c3; }
.event span { display: block; color: var(--muted); font-size: 9px; margin-top: 3px; }
.modal-root[aria-hidden="true"] { display: none; }
.modal-root { position: fixed; inset: 0; z-index: 100; background: rgba(9,18,13,.55); display: grid; place-items: center; padding: 24px; backdrop-filter: blur(4px); }
.modal { width: min(760px, 96vw); max-height: 92vh; overflow: auto; background: white; border-radius: 15px; box-shadow: var(--shadow); }
.modal.large { width: min(1050px, 97vw); }
.modal-head { position: sticky; top: 0; z-index: 2; background: white; border-bottom: 1px solid var(--line); padding: 17px 20px; display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { font-family: Georgia, serif; font-size: 21px; }
.close-btn { border: 0; background: #f1f4f2; color: var(--muted); width: 32px; height: 32px; border-radius: 8px; }
.modal-body { padding: 20px; }
.modal-foot { position: sticky; bottom: 0; background: white; border-top: 1px solid var(--line); padding: 13px 20px; display: flex; justify-content: flex-end; gap: 8px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.form-grid .wide { grid-column: 1 / -1; }
label.field { display: grid; gap: 6px; color: #55645c; font-size: 10px; font-weight: 750; }
label.field small { color: var(--muted); font-size: 10px; font-weight: 500; }
.auto-name { margin-bottom: 16px; padding: 12px 14px; border: 1px solid #cfe0d6; border-radius: 10px; background: var(--mint-2); }
.auto-name span, .auto-name strong { display: block; }
.auto-name span { color: var(--muted); font-size: 10px; margin-bottom: 4px; }
.auto-name strong { color: var(--green); font-size: 16px; }
.field input, .field select, .field textarea { width: 100%; min-height: 40px; border: 1px solid #d8e0db; border-radius: 8px; background: white; color: var(--ink); padding: 9px 10px; outline: none; font-size: 12px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #7da58e; box-shadow: 0 0 0 3px #edf6f0; }
.field textarea { min-height: 77px; resize: vertical; }
.form-section { margin: 22px 0 10px; padding-top: 17px; border-top: 1px solid var(--line); }
.form-section h3 { margin-bottom: 3px; }
.form-section p { color: var(--muted); font-size: 10px; margin-bottom: 12px; }
.line-items { border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; }
.line-items table { min-width: 850px; }
.line-items input { width: 100%; min-width: 80px; border: 1px solid #dce3df; border-radius: 6px; padding: 7px; }
.line-items .item-name { min-width: 180px; }
.remove-row { border: 0; background: transparent; color: var(--red); font-weight: 900; }
.totals { margin-top: 12px; display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.total { border-radius: 8px; background: #f3f6f4; padding: 10px; }
.total span, .total strong { display: block; }
.total span { color: var(--muted); font-size: 9px; margin-bottom: 4px; }
.total strong { font-size: 12px; }
.total.profit { background: #e8f3ec; color: #1c643e; }
.toast-root { position: fixed; right: 22px; bottom: 22px; z-index: 200; display: grid; gap: 8px; }
.toast { width: min(350px, calc(100vw - 30px)); background: #17251e; color: white; border-radius: 10px; box-shadow: var(--shadow); padding: 12px 14px; font-size: 12px; animation: slide .2s ease-out; }
@keyframes slide { from { transform: translateY(8px); opacity: 0; } }
.quick-menu { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
.quick-card { min-height: 90px; border: 1px solid var(--line); border-radius: 10px; background: #f8faf8; text-align: left; padding: 14px; }
.quick-card strong, .quick-card span { display: block; }
.quick-card strong { margin-bottom: 6px; }
.quick-card span { font-size: 10px; color: var(--muted); line-height: 1.4; }
.chart { padding: 20px 18px; min-height: 260px; display: flex; align-items: end; gap: 18px; border-bottom: 1px solid var(--line); }
.chart-col { flex: 1; text-align: center; min-width: 40px; }
.chart-bar { height: var(--h); min-height: 5px; background: linear-gradient(180deg,#2b7654,#174d36); border-radius: 7px 7px 2px 2px; position: relative; }
.chart-bar span { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 9px; color: var(--muted); white-space: nowrap; }
.chart-col label { display: block; margin-top: 7px; font-size: 9px; color: var(--muted); }
.mobile-title, .mobile-only { display: none; }
@media print {
  body { background: white; }
  .app-shell, .modal-head, .modal-foot { display: none !important; }
  .modal-root { position: static; display: block !important; background: white; padding: 0; }
  .modal { width: 100%; max-height: none; overflow: visible; box-shadow: none; border-radius: 0; }
  .modal-body { padding: 0; }
}

/* v7: familiar CRM hierarchy and role-specific funnels */
.nav { gap: 3px; padding-top: 12px; overflow-y: auto; }
.nav-label { padding: 13px 12px 5px; color: #71887c; font-size: 9px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.nav-item { min-height: 46px; display: grid; grid-template-columns: 27px minmax(0,1fr) auto; gap: 8px; padding: 0 11px; font-size: 13px; font-weight: 700; }
.nav-item i { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 6px; background: rgba(255,255,255,.06); color: #b9cbc1; font-style: normal; font-size: 15px; }
.nav-item.active i { background: rgba(255,255,255,.13); color: #fff; }
.nav-count.calc { background: #356587; color: #fff; }
.primary, .secondary, .ghost, .danger { min-height: 42px; padding: 0 17px; font-size: 13px; }
.big-action { min-height: 46px; padding: 0 20px; font-size: 14px; }
.role-shortcuts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.role-shortcuts>button { min-height: 72px; display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 11px 15px; border: 1px solid var(--line); border-radius: 11px; background: #fff; text-align: left; box-shadow: 0 2px 6px rgba(25,52,38,.04); }
.role-shortcuts>button:hover { border-color: #8bb5d1; box-shadow: 0 5px 16px rgba(32,82,116,.10); }
.role-shortcut-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 9px; background: #e7f4ec; color: #24704b; font-size: 21px; }
.role-shortcut-icon.blue { background: #e6f2fa; color: #2675a5; }
.role-shortcuts strong, .role-shortcuts small { display: block; }
.role-shortcuts strong { margin-bottom: 4px; font-size: 14px; }
.role-shortcuts small { color: var(--muted); font-size: 11px; }
.role-shortcuts b { color: #39789e; font-size: 13px; }
.pipeline-bar { min-height: 64px; align-items: center; padding: 7px; background: #fff; }
.pipeline-select-wrap { min-width: 285px; min-height: 50px; border: 0; border-right: 1px solid var(--line); border-radius: 0; padding: 6px 14px 6px 9px; }
.pipeline-select-wrap select { min-height: 27px; padding: 0 7px; font-size: 14px; }
.funnel-health { align-self: stretch; }
.funnel-health button { min-width: 86px; padding: 5px 12px; }
.view-switch { display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 7px; background: #edf2f5; }
.view-switch button { min-height: 38px; padding: 0 14px; border: 0; border-radius: 5px; background: transparent; color: #657985; font-size: 12px; font-weight: 750; }
.view-switch button.active { background: #fff; color: #176b9d; box-shadow: 0 1px 4px rgba(25,66,93,.14); }
.compact-toolbar { min-height: 43px; margin-bottom: 8px; }
.toolbar-note { color: #74858f; font-size: 11px; }
.kanban { grid-auto-columns: 286px; gap: 8px; padding: 2px 1px 18px; }
.column { position: relative; min-height: 560px; padding: 0 8px 10px; border: 1px solid #d9e3ea; border-radius: 6px; background: #edf2f5; overflow: hidden; }
.column-color { height: 6px; margin: 0 -8px 7px; background: #5eb6df; }
.column.stage-0 .column-color { background:#53b6df; }.column.stage-1 .column-color { background:#61c6d0; }.column.stage-2 .column-color { background:#74c999; }.column.stage-3 .column-color { background:#a7c96a; }.column.stage-4 .column-color { background:#d6c55e; }.column.stage-5 .column-color { background:#e7ad55; }.column.stage-6 .column-color { background:#e38a59; }.column.stage-7 .column-color { background:#bc88cf; }.column.stage-8 .column-color { background:#8c98d8; }.column.stage-9 .column-color { background:#6eba8b; }.column.stage-10 .column-color { background:#c8ced3; }
.column-head { min-height: 54px; align-items: start; padding: 6px 4px 9px; border: 0; border-radius: 0; }
.column-head>div { min-width: 0; display: flex; align-items: center; gap: 7px; }
.column-head strong { color: #253b4a; font-size: 13px; line-height: 1.25; }
.column-head b { min-width: 21px; height: 21px; display: grid; place-items: center; border-radius: 11px; background: #dbe5eb; color: #627783; font-size: 10px; }
.column-head>span { padding-top: 2px; color: #536c7b; font-size: 11px; font-weight: 700; white-space: nowrap; }
.column-add { width: 100%; min-height: 34px; margin-bottom: 7px; border: 1px dashed #b8cbd6; border-radius: 5px; background: rgba(255,255,255,.5); color: #387ca4; font-size: 11px; font-weight: 750; }
.column-add:hover { background: #fff; border-style: solid; }
.column-empty { padding: 34px 10px; color: #8a9aa4; font-size: 11px; text-align: center; }
.column.drag-over { background: #e2f1f8; box-shadow: inset 0 0 0 2px #55a8d2; }
.deal-card { margin-bottom: 8px; padding: 12px; border-radius: 5px; }
.deal-card-id { display: flex; justify-content: space-between; align-items: start; gap: 8px; }
.deal-card-id strong { color: #176c9f; font-size: 13px; line-height: 1.35; }
.deal-card-id button { flex: 0 0 26px; width: 26px; height: 26px; border: 0; border-radius: 5px; background: transparent; color: #84939c; font-weight: 800; }
.deal-card-id button:hover { background: #eef3f6; }
.deal-company { margin: 6px 0 9px!important; color: #637680!important; font-size: 12px!important; }
.deal-amount { margin: 0 0 10px; color: #172d3a; font-size: 17px; font-weight: 850; }
.deal-task { width: 100%; min-height: 35px; display: flex; align-items: center; gap: 7px; padding: 0 8px; border: 0; border-radius: 5px; background: #f4f7f8; color: #657983; text-align: left; font-size: 10px; }
.deal-task i { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: #91a2ab; }
.deal-task.overdue { background: #fff0f0; color: #b23d3d; }.deal-task.overdue i { background: #d84949; }
.deal-task.today { background: #fff7e8; color: #91641b; }.deal-task.today i { background: #d89c32; }
.deal-card-actions { min-height: 38px; display: grid; grid-template-columns: 1fr auto 29px; align-items: end; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid #edf1f3; }
.deal-card-actions button { min-height: 30px; padding: 0 9px; border: 1px solid #d7e3e9; border-radius: 5px; background: #f8fbfc; color: #37799f; font-size: 10px; font-weight: 750; }
.avatar-small { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; background: #d9edf8; color: #21688e; font-size: 9px; font-weight: 850; }
.department-summary { min-height: 72px; display: grid; grid-template-columns: minmax(250px,1fr) repeat(3,145px); gap: 1px; margin-bottom: 10px; border: 1px solid #cfdee7; border-radius: 7px; overflow: hidden; background: #cfdee7; }
.department-summary>* { border: 0; background: #fff; }
.department-title { display: grid; align-content: center; gap: 4px; padding: 12px 17px; }
.department-title span { color: #6f8491; font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
.department-title strong { color: #1d587c; font-size: 15px; }
.department-summary>button { display: grid; align-content: center; justify-items: start; gap: 3px; padding: 10px 17px; }
.department-summary>button b { color: #216f9e; font-size: 20px; }.department-summary>button span { color: #70838e; font-size: 11px; }
.department-help { display: flex; align-items: center; gap: 10px; min-height: 45px; margin-bottom: 10px; padding: 9px 13px; border-radius: 6px; background: #e9f4fa; color: #496b7e; font-size: 11px; }
.department-help strong { color: #1d658d; white-space: nowrap; }
.calculation-board .column-color { background:#56aee0; }.calculation-board .stage-1 .column-color { background:#6a9ede; }.calculation-board .stage-2 .column-color { background:#9a82d3; }.calculation-board .stage-3 .column-color { background:#5fbd83; }
.calculation-board .deal-card-id strong { color: #2b6393; }
.calc-progress { gap: 6px; padding: 8px 9px; }
.calc-progress span { display: flex; justify-content: space-between; gap: 8px; }
.internal-drawer .drawer-head { box-shadow: inset 5px 0 #4a9fd0; }
.drawer-actions .primary, .drawer-actions .secondary, .drawer-actions .convert-btn { min-height: 42px; padding: 0 15px; font-size: 12px; }
.drawer-tabs button { min-height: 46px; padding: 0 16px; font-size: 12px; }
.timeline-title button { min-height: 36px; padding: 0 11px; font-size: 11px; }
@media(max-width:900px){.role-shortcuts{grid-template-columns:1fr}.department-summary{grid-template-columns:1fr repeat(3,1fr)}.department-title{grid-column:1/-1}.pipeline-bar{flex-wrap:wrap}.view-switch{margin-left:auto}}
@media(max-width:700px){.role-shortcuts>button{min-height:64px}.department-summary{grid-template-columns:repeat(3,1fr)}.department-summary>button{padding:9px}.department-help{align-items:flex-start;flex-direction:column}.kanban{grid-auto-columns:86vw}.view-switch{width:100%;margin:0}.view-switch button{flex:1}.pipeline-select-wrap{min-width:100%;border-right:0;border-bottom:1px solid var(--line)}}

/* v8: stages live inside the deal; Activities is a real deal view */
.activities-explainer { display: flex; align-items: center; gap: 12px; min-height: 46px; margin: 0 0 10px; padding: 9px 13px; border: 1px solid #d6e3eb; border-radius: 6px; background: #f4f9fc; color: #5d7482; font-size: 13px; }
.activities-explainer strong { color: #226b96; font-size: 14px; }
.activities-board .activity-overdue .column-color { background: #df5959; }
.activities-board .activity-today .column-color { background: #e4a238; }
.activities-board .activity-tomorrow .column-color { background: #5aa9dc; }
.activities-board .activity-week .column-color { background: #60b8b1; }
.activities-board .activity-later .column-color { background: #8b9fcb; }
.activities-board .activity-none .column-color { background: #aeb9c0; }
.deal-stage-panel { padding: 12px 20px 14px; border-bottom: 1px solid #d8e2e8; background: #fff; }
.deal-stage-caption { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 9px; color: #70828d; font-size: 12px; }
.deal-stage-caption div span, .deal-stage-caption div strong { display: block; }
.deal-stage-caption div strong { margin-top: 3px; color: #173d55; font-size: 15px; }
.deal-stage-rail { display: flex; gap: 3px; overflow-x: auto; padding: 1px 1px 7px; scrollbar-width: thin; }
.deal-stage-rail button { position: relative; flex: 1 0 142px; min-height: 49px; display: grid; grid-template-columns: 24px 1fr; align-items: center; gap: 7px; padding: 6px 9px; border: 1px solid #d3dfe6; border-radius: 5px; background: #edf2f5; color: #637985; text-align: left; }
.deal-stage-rail button:hover { border-color: #70abd0; background: #e6f3fa; color: #245f82; }
.deal-stage-rail button i { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: #fff; color: #6f838e; font-style: normal; font-size: 11px; font-weight: 850; }
.deal-stage-rail button span { font-size: 12px; font-weight: 750; line-height: 1.2; }
.deal-stage-rail button.passed { border-color: #aad0e5; background: #def0f8; color: #2a7299; }
.deal-stage-rail button.passed i { background: #5ba9d2; color: #fff; }
.deal-stage-rail button.current { border-color: #2287c2; background: #2c91ca; color: #fff; box-shadow: 0 4px 12px rgba(39,128,181,.22); }
.deal-stage-rail button.current i { color: #2277a6; }
.deal-stage-rail button.terminal { flex-basis: 125px; }
.deal-stage-rail button.terminal.current { border-color: #38976a; background: #48a978; }
.deal-stage-rail button.terminal:last-child:not(.current) { border-color: #e3caca; background: #f8eeee; color: #9d5555; }
.flow-next { min-width: 178px; }
.flow-next.waiting, .flow-next:disabled { border-color: #d3dce1; background: #e9eef1; color: #788a94; box-shadow: none; cursor: not-allowed; }
.field-static { min-height: 67px; display: grid; align-content: center; gap: 4px; padding: 9px 11px; border: 1px solid #d8e0db; border-radius: 8px; background: #f7f9f8; }
.field-static span { color: #55645c; font-size: 12px; font-weight: 750; }
.field-static strong { font-size: 14px; }
.field-static small { color: var(--muted); font-size: 11px; }
.drawer-stage { grid-template-columns: repeat(4,minmax(140px,1fr)); }
.drawer-stage>div { min-height: 53px; align-content: center; }
.drawer-stage>div span { font-size: 11px; }
.drawer-stage>div strong { font-size: 14px; }
.drawer-tabs button { font-size: 13px; }
.drawer-section-head h3, .timeline-title h3 { font-size: 15px; }
.drawer-items strong, .role-card-head strong { font-size: 13px; }
.drawer-items span, .role-comment, .timeline-entry p { font-size: 12px; }
@media(max-width:900px){.drawer-head{grid-template-columns:38px minmax(220px,1fr)}.drawer-actions{grid-column:2;flex-wrap:wrap}.flow-next{min-width:150px}.deal-stage-panel{padding:10px 12px}.drawer-stage{grid-template-columns:repeat(2,1fr)}}
@media(max-width:600px){.deal-stage-rail button{flex-basis:132px}.deal-stage-caption{align-items:start}.drawer-stage{grid-template-columns:1fr 1fr}.activities-explainer{align-items:flex-start;flex-direction:column}.flow-next{width:100%}}

/* CRM workspace v5: compact Bitrix/amo-style funnel and deal slider */
.pipeline-bar { display:flex; align-items:center; gap:18px; padding:12px 14px; margin-bottom:8px; background:#fff; border:1px solid var(--line); border-radius:12px; box-shadow:0 3px 14px rgba(24,54,38,.04); }
.pipeline-select-wrap { min-width:240px; }
.pipeline-select-wrap select { font-size:14px; font-weight:800; border:0; background:#f2f6f3; }
.funnel-health { display:flex; gap:6px; margin-left:auto; }
.funnel-health button { display:flex; align-items:center; gap:6px; height:36px; padding:0 10px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--muted); font-size:10px; }
.funnel-health b { font-size:13px; color:var(--ink); }
.funnel-health button:first-child b { color:#c84242; }
.toolbar-note { color:var(--muted); font-size:10px; margin-left:auto; }
.stage-rail,.pipeline-tabs { display:none!important; }
.kanban { display:grid; grid-auto-flow:column; grid-auto-columns:252px; gap:8px; overflow-x:auto; align-items:start; padding:2px 2px 18px; min-height:570px; }
.column { min-height:530px; padding:0 7px 12px; border:1px solid #dfe7e2; border-radius:10px; background:#f4f7f5; transition:.16s; }
.column.drag-over { border-color:#2f8b5c; background:#eaf5ee; box-shadow:inset 0 0 0 2px rgba(47,139,92,.16); }
.column.final-column { background:#f7f7f4; }
.column-head { margin:0 -7px 7px; min-height:63px; padding:10px 10px 8px; border-bottom:1px solid #dce4df; background:#fff; border-radius:10px 10px 0 0; }
.column-head>div { display:flex; align-items:center; gap:6px; }
.column-head i { width:7px; height:7px; border-radius:50%; background:hsl(calc(145 + var(--stage) * 12),43%,42%); }
.column-head strong { font-size:11px; }
.column-head b { display:grid; place-items:center; min-width:20px; height:20px; border-radius:10px; background:#edf2ef; font-size:9px; }
.column-head>span { display:block; margin-top:5px; color:var(--muted); font-size:10px; }
.column-add { width:100%; height:29px; margin-bottom:6px; border:1px dashed #c8d5cd; border-radius:7px; background:transparent; color:#4f6d5d; font-size:10px; }
.column-add:hover { background:#fff; border-color:#7da58e; }
.column-empty { display:grid; place-items:center; min-height:80px; border:1px dashed #d4ddd8; border-radius:8px; color:#94a29a; font-size:10px; text-align:center; }
.deal-card { margin:0 0 7px; padding:11px; border:1px solid #dce4df; border-radius:9px; background:#fff; box-shadow:0 2px 7px rgba(28,54,39,.05); cursor:grab; }
.deal-card:hover { border-color:#91b29f; transform:translateY(-1px); box-shadow:0 5px 15px rgba(28,54,39,.09); }
.deal-card.dragging { opacity:.45; }
.deal-card-id,.deal-card-foot { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.deal-card-id strong { color:#173f2d; font-size:11px; }
.deal-card-id>span { color:var(--muted); font-size:9px; }
.deal-company { min-height:29px; margin:7px 0 6px; color:#526159; font-size:10px; line-height:1.35; }
.deal-amount { font-size:14px; font-weight:850; }
.deal-task { display:flex; align-items:center; gap:6px; min-height:28px; margin:9px -3px 8px; padding:5px 6px; border-radius:6px; background:#f2f5f3; color:#66736c; font-size:9px; }
.deal-task i { width:7px; height:7px; border-radius:50%; background:#8ba198; }
.deal-task.overdue { color:#a63131; background:#fff0ef; }.deal-task.overdue i { background:#d74242; }
.deal-task.today { color:#8c6418; background:#fff7e4; }.deal-task.today i { background:#e0a129; }
.deal-task.future { color:#296445; background:#edf7f1; }.deal-task.future i { background:#47a66e; }
.deal-task.none { color:#b25035; background:#fff4ee; }.deal-task.none i { background:#ef805d; }
.deal-card-foot { padding-top:8px; border-top:1px solid #edf0ee; color:#76847d; font-size:9px; }
.avatar-small { display:grid; place-items:center; width:22px; height:22px; border-radius:50%; background:#164e36; color:#fff; font-size:8px; font-weight:800; }
.task-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-bottom:12px; }
.task-summary button { display:grid; gap:2px; padding:13px 15px; text-align:left; border:1px solid var(--line); border-radius:10px; background:#fff; }
.task-summary button.active { border-color:#438565; box-shadow:inset 0 0 0 1px #438565; background:#f0f7f3; }
.task-summary button.danger-state b { color:#c33e3e; }.task-summary b { font-size:20px; }.task-summary span { color:var(--muted); font-size:10px; }
.task-workspace { max-width:980px; }.task-main { display:grid; gap:3px; border:0; background:none; text-align:left; }.task-main span { color:var(--muted); font-size:9px; }.task-date small { display:block; margin-top:2px; }.task-date.today { color:#9b6e15; }.task-item.priority { border-left:3px solid #dc594b; }
.drawer-backdrop { position:fixed; inset:0; z-index:70; background:rgba(12,24,17,.32); backdrop-filter:blur(1px); }
.deal-drawer { position:fixed; inset:0 0 0 auto; z-index:71; width:min(1180px,calc(100vw - 246px)); background:#f4f7f5; box-shadow:-12px 0 45px rgba(10,27,18,.22); overflow:auto; animation:drawer-in .2s ease-out; }
@keyframes drawer-in { from { transform:translateX(40px); opacity:.7; } }
.drawer-head { position:sticky; top:0; z-index:4; display:grid; grid-template-columns:38px minmax(260px,1fr) auto; align-items:center; gap:12px; min-height:84px; padding:12px 20px; border-bottom:1px solid var(--line); background:#fff; }
.drawer-close { width:34px; height:34px; border:0; border-radius:8px; background:#edf1ee; font-size:22px; }.drawer-head h2 { margin:3px 0; font-size:21px; }.company-link { padding:0; border:0; background:none; color:#267053; font-size:10px; }.drawer-actions { display:flex; gap:7px; }.convert-btn { min-height:38px; padding:0 13px; border:0; border-radius:8px; background:#e7f4ec; color:#17613e; font-weight:800; font-size:11px; }
.drawer-stage { display:grid; grid-template-columns:minmax(240px,1.5fr) repeat(3,minmax(120px,1fr)); gap:8px; padding:10px 20px; border-bottom:1px solid var(--line); background:#fff; }.drawer-stage label,.drawer-stage>div { display:grid; gap:4px; padding:7px 10px; border-radius:8px; background:#f4f7f5; color:var(--muted); font-size:9px; }.drawer-stage select { border:0; outline:0; background:transparent; color:#1a4f37; font-weight:850; }.drawer-stage strong { color:var(--ink); font-size:12px; }
.drawer-body { display:grid; grid-template-columns:minmax(0,1.18fr) minmax(360px,.82fr); min-height:calc(100vh - 150px); }.drawer-main { padding:16px 18px 40px; }.drawer-tabs { display:flex; gap:4px; margin-bottom:10px; border-bottom:1px solid var(--line); }.drawer-tabs button { padding:10px 12px; border:0; border-bottom:2px solid transparent; background:none; color:var(--muted); font-size:10px; }.drawer-tabs button.active { color:#17563a; border-color:#2b8158; font-weight:800; }.drawer-workspace { min-height:330px; padding:16px; border:1px solid var(--line); border-radius:10px; background:#fff; }.drawer-section-head { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:13px; }.drawer-section-head span { color:var(--muted); font-size:9px; }.drawer-items { display:grid; gap:6px; }.drawer-items>div { display:grid; grid-template-columns:1fr auto; gap:3px 12px; padding:10px; border:1px solid #e5eae7; border-radius:8px; }.drawer-items strong { font-size:10px; }.drawer-items span { grid-column:1; color:var(--muted); font-size:9px; }.drawer-items b { grid-column:2; grid-row:1/3; align-self:center; font-size:11px; }.drawer-totals { display:grid; grid-template-columns:repeat(4,1fr); gap:6px; margin-top:10px; }.drawer-totals>div { display:grid; gap:4px; padding:9px; border-radius:7px; background:#f2f5f3; }.drawer-totals span { color:var(--muted); font-size:8px; }.drawer-totals strong { font-size:11px; }.drawer-totals .accent { background:#e8f4ed; color:#17603e; }.deal-note { margin-top:12px; padding:11px; border-radius:8px; background:#f7f9f8; }.deal-note p { margin:5px 0 0; color:var(--muted); font-size:10px; line-height:1.5; }.deal-fields { margin-top:10px; padding:12px; border:1px solid var(--line); border-radius:9px; background:#fff; }.deal-fields summary { cursor:pointer; font-size:10px; font-weight:800; }.deal-fields>div { display:grid; grid-template-columns:auto 1fr; gap:8px 14px; margin-top:12px; font-size:10px; }.deal-fields span { color:var(--muted); }
.timeline-pane { border-left:1px solid var(--line); padding:17px; background:#fff; }.timeline-title { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:11px; }.timeline-title h3 { margin-bottom:3px; }.timeline-title span { color:var(--muted); font-size:9px; }.timeline-title button { height:32px; border:1px solid #cbd9d1; border-radius:7px; background:#f2f7f4; color:#215f42; font-size:10px; }.composer { margin-bottom:18px; border:1px solid #cad8d0; border-radius:9px; overflow:hidden; box-shadow:0 3px 11px rgba(20,53,36,.06); }.composer-tabs { display:flex; border-bottom:1px solid #e0e6e2; background:#f5f8f6; }.composer-tabs button { padding:8px 11px; border:0; border-right:1px solid #e0e6e2; background:transparent; color:var(--muted); font-size:9px; }.composer-tabs button.active { background:#fff; color:#17583b; font-weight:800; }.composer textarea { width:100%; min-height:76px; padding:11px; border:0; outline:0; resize:vertical; font-size:11px; }.composer>div:last-child { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:7px 9px; border-top:1px solid #edf0ee; }.composer>div:last-child span { color:var(--muted); font-size:8px; }.composer .primary { min-height:31px; }.deal-timeline { display:grid; gap:12px; }.timeline-entry { display:grid; grid-template-columns:30px 1fr; gap:8px; }.timeline-icon { display:grid; place-items:center; width:27px; height:27px; border-radius:50%; background:#edf3ef; color:#236344; font-size:11px; }.timeline-entry.message .timeline-icon { background:#e7f1ff; color:#2c66a0; }.timeline-entry.call .timeline-icon { background:#fff2df; color:#9e6416; }.timeline-entry.task .timeline-icon { background:#e8f5ec; }.timeline-meta { display:flex; justify-content:space-between; gap:8px; color:var(--muted); font-size:8px; }.timeline-meta strong { color:#384a40; font-size:9px; }.timeline-entry p { margin:4px 0 0; padding:9px 10px; border-radius:3px 9px 9px 9px; background:#f3f6f4; font-size:10px; line-height:1.45; }.timeline-entry.message p { background:#eef5ff; }.document-cards { display:grid; gap:7px; }.document-cards button { display:grid; grid-template-columns:30px 1fr; gap:2px 8px; padding:10px; border:1px solid var(--line); border-radius:8px; background:#fff; text-align:left; }.document-cards button span { grid-row:1/3; font-size:20px; }.document-cards small { color:var(--muted); }
@media(max-width:1050px){.deal-drawer{width:100vw}.drawer-body{grid-template-columns:1fr}.timeline-pane{border-left:0;border-top:1px solid var(--line)}.drawer-stage{grid-template-columns:repeat(2,1fr)}}
@media(max-width:700px){.funnel-health{order:3;width:100%;margin:0}.pipeline-bar{flex-wrap:wrap}.funnel-health button{flex:1}.task-summary{grid-template-columns:repeat(2,1fr)}.drawer-head{grid-template-columns:35px 1fr}.drawer-actions{grid-column:2;flex-wrap:wrap}.drawer-stage{grid-template-columns:1fr 1fr;padding:8px}.drawer-body{display:block}.drawer-main,.timeline-pane{padding:11px}.drawer-totals{grid-template-columns:repeat(2,1fr)}}

/* v6: department workflow, tasks and compact chat popup */
.nav-count.chat { background:#2a73c5; color:#fff; }

.pipeline-bar { border-radius:6px; border-color:#d8e1e8; box-shadow:0 1px 3px rgba(24,57,85,.08); }
.pipeline-select-wrap select { border-radius:4px; background:#eef5fb; color:#184f7a; }
.kanban { gap:10px; grid-auto-columns:270px; }
.column { border-radius:6px; border-color:#d9e3eb; background:#edf2f6; }
.column-head { position:relative; border-radius:5px 5px 0 0; border-top:4px solid hsl(calc(202 + var(--column,0) * 5),68%,52%); }
.column-head i { width:9px; height:9px; background:#42a5dd; }
.column-head strong { font-size:13px; color:#263f52; }.column-head>span { font-size:12px; }
.deal-card { border-radius:5px; border-color:#d6e0e7; box-shadow:0 1px 3px rgba(32,61,83,.1); cursor:pointer; }
.deal-card:hover { border-color:#65a9d8; box-shadow:0 4px 13px rgba(35,88,126,.14); }
.deal-card-id strong { color:#176a9e; font-size:13px; }.deal-company { font-size:12px; }.deal-amount { margin-top:8px; font-size:16px; }.deal-task { font-size:11px; }.deal-card-foot { font-size:11px; }
.calc-progress { display:grid; gap:3px; margin:8px 0; padding:7px; border-radius:4px; background:#f2f7fb; color:#537084; font-size:11px; }
.task-item { grid-template-columns:auto minmax(0,1fr) auto auto; align-items:center; gap:10px; }
.task-main strong { font-size:13px; }.task-main span { font-size:11px; }.task-date { min-width:78px; font-size:11px; }.task-open { min-height:30px; padding:0 10px; border:1px solid #bed3e2; border-radius:5px; background:#f4f9fc; color:#26698f; font-size:11px; }
.task-detail>h2 { margin:12px 0 5px; font-size:22px; }.task-detail>p { color:var(--muted); line-height:1.55; }.task-contact-card { margin:18px 0; padding:15px; border:1px solid #cddde8; border-radius:7px; background:#f2f8fc; }.task-contact-card>span,.task-contact-card>strong { display:block; }.task-contact-card>span { margin-bottom:4px; color:#6c8392; font-size:11px; }.task-contact-card>strong { font-size:16px; }.task-contact-card p { margin:5px 0; }.task-contact-card div { line-height:1.6; color:#235f83; }


.chat-pop-row { width:100%; display:grid; grid-template-columns:40px minmax(0,1fr) auto; align-items:center; gap:9px; border:0; background:transparent; text-align:left; }.chat-pop-row div { min-width:0; }.chat-pop-row strong,.chat-pop-row span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.chat-pop-row strong { font-size:12px; }.chat-pop-row div>span { margin-top:3px; color:#758894; font-size:11px; }.chat-pop-row>b { display:grid; place-items:center; min-width:19px; height:19px; border-radius:10px; background:#2e8ed0; color:#fff; font-size:10px; }.chat-avatar { display:grid!important; place-items:center; width:38px; height:38px; border-radius:50%; background:linear-gradient(135deg,#2a87c7,#59b5df); color:#fff; font-weight:800; }


.chat-popover { position:fixed; z-index:85; right:78px; top:58px; width:370px; max-height:540px; overflow:auto; border:1px solid #cfdce4; border-radius:8px; background:#fff; box-shadow:0 14px 45px rgba(20,49,68,.22); }.chat-popover header { display:flex; justify-content:space-between; align-items:center; padding:12px 14px; border-bottom:1px solid #e1e8ec; }.chat-popover header button { border:0; background:none; font-size:18px; }.chat-pop-row { padding:10px 12px; border-bottom:1px solid #edf1f3; }.chat-pop-row:hover { background:#f1f7fb; }.chat-all { width:100%; min-height:40px; border:0; background:#f0f7fb; color:#2373a4; font-weight:700; }
.member-list { display:grid; gap:7px; }.member-list label { display:flex; align-items:center; gap:9px; padding:10px; border:1px solid var(--line); border-radius:6px; }.member-list input { width:18px; height:18px; }
.cost-breakdown { display:grid; grid-template-columns:repeat(2,1fr); gap:6px; margin-top:12px; }.cost-breakdown>div { display:flex; justify-content:space-between; gap:10px; padding:9px 10px; border-radius:5px; background:#f2f5f7; font-size:11px; }.cost-breakdown span { color:#6f818c; }.cost-breakdown .cost-total { grid-column:1/-1; background:#e4f2fa; color:#145f8b; font-size:13px; }
.calc-workflow { display:grid; gap:12px; }.calc-workflow-head,.role-card-head { display:flex; justify-content:space-between; align-items:center; gap:10px; }.calc-workflow-head { padding-bottom:12px; border-bottom:1px solid #e0e7eb; }.calc-workflow-head h3 { margin:4px 0 0; }.role-card { padding:13px; border:1px solid #d9e3e9; border-radius:7px; }.role-card-head>div { display:flex; align-items:center; gap:8px; }.role-icon { display:grid; place-items:center; width:30px; height:30px; border-radius:50%; background:#4aa2d1; color:#fff; font-size:10px; font-weight:800; }.role-icon.logistics { background:#6e8fd0; }.procurement-table { display:grid; gap:5px; margin-top:11px; }.procurement-table>div { display:grid; grid-template-columns:minmax(150px,1.5fr) 1fr auto auto; gap:4px 10px; align-items:center; padding:8px; border-radius:5px; background:#f5f8fa; }.procurement-table strong { grid-row:1; }.procurement-table span { grid-column:1; color:#7a8b95; font-size:10px; }.procurement-table b { grid-column:2; grid-row:1/3; font-size:11px; }.procurement-table em { grid-column:3; grid-row:1/3; font-style:normal; font-size:11px; }.procurement-table i { grid-column:4; grid-row:1/3; font-style:normal; font-weight:800; }.role-comment { margin:8px 0 0; color:var(--muted); font-size:11px; }.handoff-button { width:100%; min-height:44px; margin-top:13px; border:0; border-radius:6px; background:#2c8fca; color:#fff; font-weight:800; }
.procurement-edit { display:grid; gap:10px; }.proc-row { display:grid; grid-template-columns:minmax(180px,1.4fr) repeat(4,1fr); gap:8px; padding:11px; border:1px solid #dce5ea; border-radius:7px; }.proc-row>div span { display:block; margin-top:5px; color:var(--muted); font-size:10px; }.proc-row label { display:grid; gap:4px; color:var(--muted); font-size:10px; }.proc-row input { min-width:0; width:100%; padding:8px; border:1px solid #d5e0e6; border-radius:5px; }.form-intro { color:var(--muted); }.pricing-result { padding:15px; border-radius:7px; background:#eaf5fb; }.pricing-result span,.pricing-result strong,.pricing-result small { display:block; }.pricing-result strong { margin:5px 0; font-size:22px; color:#176792; }.manager-items table { min-width:700px; }.manager-items textarea { width:100%; min-width:300px; min-height:54px; padding:7px; border:1px solid #dce3df; border-radius:6px; resize:vertical; }
@media(max-width:1100px){.proc-row{grid-template-columns:1fr 1fr}.proc-row>div{grid-column:1/-1}}
@media(max-width:760px){.chat-popover{right:8px;top:58px;width:calc(100vw - 16px)}.task-item{grid-template-columns:auto 1fr auto}.task-open{grid-column:2/4}.cost-breakdown{grid-template-columns:1fr}.cost-breakdown .cost-total{grid-column:auto}.procurement-table>div{grid-template-columns:1fr auto}.procurement-table span{grid-column:1}.procurement-table b{grid-column:1;grid-row:auto}.procurement-table em,.procurement-table i{grid-column:2}.proc-row{grid-template-columns:1fr}}
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2,1fr); }
  .dashboard-grid, .detail-layout { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; left: -265px; transition: left .2s; width: 244px; box-shadow: var(--shadow); }
  .sidebar.open { left: 0; }
  .topbar { height: 58px; padding: 0 13px; }
  .mobile-only { display: inline-grid; place-items: center; }
  .search-box { flex: 1; width: auto; }
  .search-box kbd { display: none; }
  .top-actions .notification-btn { display: none; }
  .db-status span { display: none; }
  .primary { padding: 0 11px; }
  .mobile-title { display: flex; justify-content: space-between; padding: 12px 16px 0; color: var(--muted); font-size: 11px; }
  .mobile-title strong { color: var(--ink); }
  .view { padding: 16px; }
  .page-head { align-items: start; flex-direction: column; margin-bottom: 16px; }
  .page-head h1 { font-size: 26px; }
  .head-actions { width: 100%; }
  .head-actions button { flex: 1; }
  .kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .kpi { padding: 13px; }
  .kpi strong { font-size: 19px; }
  .dashboard-grid { gap: 10px; }
  .panel-head { padding: 12px; }
  .toolbar { align-items: stretch; }
  .pipeline-bar { display: grid; }
  .pipeline-select-wrap { min-width: 0; }
  .pipeline-tabs { grid-template-columns: 1fr; }
  .stage-chip { min-width: 135px; }
  .deal-stage-step { min-width: 120px; }
  .filter-group { overflow-x: auto; max-width: 100%; }
  .toolbar .spacer { display: none; }
  .toolbar select, .toolbar .secondary { flex: 1; }
  .kanban { grid-auto-columns: 82vw; }
  th, td { padding: 10px; }
  .facts { grid-template-columns: repeat(2,1fr); }
  .detail-card { padding: 15px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
  .totals { grid-template-columns: repeat(2,1fr); }
  .modal-root { padding: 8px; place-items: end center; }
  .modal { width: 100%; max-height: 94vh; border-radius: 15px 15px 0 0; }
  .quick-menu { grid-template-columns: 1fr; }
}
@media print {
  .sidebar, .topbar, .mobile-title, .no-print { display: none !important; }
  .app-shell { display: block; }
  .view { padding: 0; }
  body { background: white; }
}

/* final CRM interaction layer */
.kanban { grid-auto-columns: 286px; gap: 8px; }
.kanban .column { position: relative; min-height: 560px; padding: 0 8px 10px; border: 1px solid #d9e3ea; border-radius: 6px; background: #edf2f5; overflow: hidden; }
.kanban .column-color { height: 6px; margin: 0 -8px 7px; background: #5eb6df; }
.kanban .column.stage-0 .column-color { background:#53b6df; }.kanban .column.stage-1 .column-color { background:#61c6d0; }.kanban .column.stage-2 .column-color { background:#74c999; }.kanban .column.stage-3 .column-color { background:#a7c96a; }.kanban .column.stage-4 .column-color { background:#d6c55e; }.kanban .column.stage-5 .column-color { background:#e7ad55; }.kanban .column.stage-6 .column-color { background:#e38a59; }.kanban .column.stage-7 .column-color { background:#bc88cf; }.kanban .column.stage-8 .column-color { background:#8c98d8; }.kanban .column.stage-9 .column-color { background:#6eba8b; }.kanban .column.stage-10 .column-color { background:#c8ced3; }
.kanban .column-head { min-height: 54px; align-items: start; padding: 6px 4px 9px; border: 0; border-radius: 0; }
.kanban .column-head>div { min-width: 0; display: flex; align-items: center; gap: 7px; }
.kanban .column-head strong { color: #253b4a; font-size: 13px; line-height: 1.25; }
.kanban .column-head b { min-width: 21px; height: 21px; display: grid; place-items: center; border-radius: 11px; background: #dbe5eb; color: #627783; font-size: 10px; }
.kanban .column-add { width: 100%; min-height: 34px; margin-bottom: 7px; border: 1px dashed #b8cbd6; border-radius: 5px; background: rgba(255,255,255,.5); color: #387ca4; font-size: 11px; font-weight: 750; }
.calculation-board .column.stage-0 .column-color { background:#56aee0; }.calculation-board .column.stage-1 .column-color { background:#6a9ede; }.calculation-board .column.stage-2 .column-color { background:#9a82d3; }.calculation-board .column.stage-3 .column-color { background:#5fbd83; }
.activities-board .activity-overdue .column-color { background: #df5959; }.activities-board .activity-today .column-color { background: #e4a238; }.activities-board .activity-tomorrow .column-color { background: #5aa9dc; }.activities-board .activity-week .column-color { background: #60b8b1; }.activities-board .activity-later .column-color { background: #8b9fcb; }.activities-board .activity-none .column-color { background: #aeb9c0; }
.deal-drawer .drawer-stage { grid-template-columns: repeat(4,minmax(140px,1fr)); }
.deal-drawer .drawer-stage>div { min-height: 53px; align-content: center; }
.deal-drawer .drawer-stage>div span { font-size: 11px; }.deal-drawer .drawer-stage>div strong { font-size: 14px; }
.deal-drawer .drawer-tabs button { min-height: 46px; padding: 0 16px; font-size: 13px; }
.deal-drawer .drawer-items strong, .deal-drawer .role-card-head strong { font-size: 13px; }
.deal-drawer .drawer-items span, .deal-drawer .role-comment, .deal-drawer .timeline-entry p { font-size: 12px; }
.next-activity { width: 100%; min-height: 74px; display: grid; gap: 3px; margin: 0 0 12px; padding: 11px 13px; border: 1px solid #bfd9e8; border-left: 4px solid #4b9bc6; border-radius: 7px; background: #f2f8fc; color: #294e63; text-align: left; }
.next-activity span { color: #66808f; font-size: 11px; }.next-activity strong { font-size: 13px; }.next-activity small { color: #49748d; font-size: 11px; }
.next-activity.overdue { border-color: #ecc5c5; border-left-color: #d95050; background: #fff3f3; }.next-activity.today { border-color: #ead3a9; border-left-color: #d5962d; background: #fff8eb; }.next-activity.empty-activity { border-style: dashed; border-left-style: solid; border-color: #d2dce2; border-left-color: #9baab3; background: #f8fafb; }
@media(max-width:900px){.deal-drawer .drawer-stage{grid-template-columns:repeat(2,1fr)}}
@media(max-width:600px){.kanban{grid-auto-columns:86vw}.deal-drawer .drawer-stage{grid-template-columns:1fr 1fr}}

/* v9: pipeline automation and explicit deal actions */
.deal-actionbar { display: grid; grid-template-columns: repeat(6,minmax(125px,1fr)); gap: 7px; padding: 10px 20px; border-bottom: 1px solid #d8e2e8; background: #f6f9fa; }
.deal-actionbar>button { min-height: 58px; display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid #d4e0e6; border-radius: 7px; background: #fff; color: #2b536a; text-align: left; }
.deal-actionbar>button:hover { border-color: #71afd1; box-shadow: 0 3px 10px rgba(39,105,143,.10); }
.deal-actionbar>button.accent { border-color: #62aacf; background: #eaf6fc; color: #176a99; }
.deal-actionbar>button:disabled { opacity: .58; cursor: not-allowed; box-shadow: none; }
.deal-actionbar>button>i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 7px; background: #e8f1f6; color: #2679a7; font-style: normal; font-size: 16px; font-weight: 850; }
.deal-actionbar>button>span, .deal-actionbar>button strong, .deal-actionbar>button small { display: block; min-width: 0; }
.deal-actionbar>button strong { font-size: 12px; white-space: nowrap; }.deal-actionbar>button small { margin-top: 3px; overflow: hidden; color: #748792; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.automation-topbar { min-height: 62px; display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 10px; padding: 7px 10px; border: 1px solid #d7e2e8; border-radius: 7px; background: #fff; }
.automation-pipelines { display: flex; gap: 4px; overflow-x: auto; }
.automation-pipelines button { min-height: 42px; padding: 0 15px; border: 0; border-radius: 5px; background: #edf2f5; color: #607784; font-size: 12px; font-weight: 750; white-space: nowrap; }
.automation-pipelines button.active { background: #2b8cc4; color: #fff; box-shadow: 0 3px 9px rgba(39,128,181,.22); }
.automation-legend { display: flex; gap: 13px; color: #71848f; font-size: 11px; white-space: nowrap; }
.automation-legend span { display: flex; align-items: center; gap: 5px; }.automation-legend i { width: 9px; height: 9px; border-radius: 50%; background: #2c91ca; }.automation-legend .trigger-dot { background: #8c79c7; }
.automation-note { display: flex; align-items: center; gap: 12px; min-height: 47px; margin-bottom: 10px; padding: 9px 13px; border-radius: 6px; background: #eaf5fb; color: #547183; font-size: 12px; }.automation-note strong { color: #216d98; white-space: nowrap; }
.automation-board { display: grid; grid-auto-flow: column; grid-auto-columns: 300px; gap: 9px; overflow-x: auto; padding-bottom: 18px; }
.automation-column { min-height: 505px; overflow: hidden; border: 1px solid #d7e1e7; border-radius: 7px; background: #edf2f5; }
.automation-column>header { min-height: 61px; display: grid; grid-template-columns: 26px minmax(0,1fr) 23px; align-items: center; gap: 7px; padding: 8px 10px; border-top: 5px solid #57aed8; background: #f8fafb; }
.automation-column.stage-1>header { border-top-color:#64bfd0 }.automation-column.stage-2>header { border-top-color:#7fc293 }.automation-column.stage-3>header { border-top-color:#b7c86c }.automation-column.stage-4>header { border-top-color:#d7bd57 }.automation-column.stage-5>header { border-top-color:#e0a254 }.automation-column.stage-6>header { border-top-color:#d98258 }.automation-column.stage-7>header { border-top-color:#aa82c6 }.automation-column.stage-8>header { border-top-color:#7d91cd }.automation-column.stage-9>header { border-top-color:#63b47e }.automation-column.stage-10>header { border-top-color:#b6c0c6 }
.automation-column>header>span, .automation-column>header>b { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: #e3edf2; color: #56717f; font-size: 10px; }.automation-column>header strong { font-size: 13px; line-height: 1.25; }
.automation-stack { display: grid; align-content: start; gap: 8px; padding: 9px; }
.automation-card { min-height: 91px; display: grid; grid-template-columns: 36px minmax(0,1fr) 34px; align-items: center; gap: 8px; padding: 10px; border: 1px solid #cadce7; border-left: 4px solid #3d99ca; border-radius: 6px; background: #fff; box-shadow: 0 2px 5px rgba(37,76,99,.06); }
.automation-card.disabled { opacity: .58; border-left-color: #9caab2; }
.automation-card-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #e5f3fa; color: #2679a7; font-size: 15px; }
.automation-card>div:nth-child(2) span, .automation-card>div:nth-child(2) strong, .automation-card>div:nth-child(2) small { display: block; }
.automation-card>div:nth-child(2) span { color: #5d88a0; font-size: 9px; font-weight: 800; letter-spacing: .05em; }.automation-card>div:nth-child(2) strong { margin: 4px 0; font-size: 12px; line-height: 1.25; }.automation-card>div:nth-child(2) small { color: #778a95; font-size: 10px; line-height: 1.3; }
.automation-switch { width: 32px; height: 19px; padding: 2px; border: 0; border-radius: 11px; background: #aebbc2; }.automation-switch i { display: block; width: 15px; height: 15px; border-radius: 50%; background: #fff; transition: transform .15s; }.automation-switch.on { background: #43a977; }.automation-switch.on i { transform: translateX(13px); }
.automation-add { min-height: 38px; border: 1px dashed #adc3cf; border-radius: 5px; background: rgba(255,255,255,.5); color: #377ba1; font-size: 11px; font-weight: 750; }.automation-empty { padding: 24px 8px 8px; color: #8798a1; font-size: 11px; text-align: center; }
.deal-automation-rules { display: grid; gap: 8px; }.deal-automation-rule { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 9px; padding: 10px; border: 1px solid #d4e1e8; border-left: 4px solid #3994c6; border-radius: 6px; }.deal-automation-rule>span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #e8f4fa; }.deal-automation-rule strong,.deal-automation-rule small { display: block; }.deal-automation-rule strong { font-size: 12px; }.deal-automation-rule small { margin-top: 4px; color: #71848f; font-size: 10px; }.deal-automation-rule.disabled { opacity:.55; border-left-color:#9ba8af; }
.automation-run-log { margin-top: 20px; padding-top: 15px; border-top: 1px solid #e0e7eb; }.automation-run-log h3 { margin-bottom: 10px; }.automation-run-log>div { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #edf1f3; }.automation-run-log strong { font-size: 11px; }.automation-run-log small { color: #7c8d96; font-size: 10px; }
@media(max-width:1150px){.deal-actionbar{grid-template-columns:repeat(3,1fr)}}
@media(max-width:760px){.deal-actionbar{grid-template-columns:repeat(2,1fr);padding:8px}.automation-topbar,.automation-note{align-items:flex-start;flex-direction:column}.automation-legend{white-space:normal}.automation-board{grid-auto-columns:84vw}}

/* v10: Bitrix-like blue workspace and real inter-funnel routing */
:root { --ink:#263238; --muted:#71828c; --line:#d8e2e8; --panel:#fff; --canvas:#eef2f4; --green:#168dcc; --green-2:#249bcf; --mint:#dff3fc; --mint-2:#edf8fd; --blue:#247cc3; --shadow:0 12px 32px rgba(24,73,101,.13); }
html,body { background:#eef2f4; color:#25333b; }
.sidebar { background:linear-gradient(180deg,#0d5278 0%,#123e5a 100%); color:#fff; }
.brand { border-color:rgba(255,255,255,.16); }.brand-mark { border-radius:5px; background:#32b7e8; color:#fff; }.brand span,.user-card div span { color:#a9ccdf; }
.nav-item { min-height:45px; border-radius:4px; color:#c2dcea; }.nav-item:hover { background:rgba(255,255,255,.09); }.nav-item.active { background:rgba(32,190,238,.25); box-shadow:inset 4px 0 #31c3f0; }.nav-count { background:#207aa4; }.nav-count.warn { background:#df7b4d; }
.topbar { height:64px; border-color:#d6e0e5; background:rgba(255,255,255,.97); }.search-box { border-radius:4px; background:#f3f7f9; }
.view { max-width:none; padding:22px 24px; }.page-head { margin-bottom:16px; }.page-head h1,.detail-title h1,.modal-head h2 { font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; font-weight:650; letter-spacing:-.025em; }.page-head h1 { font-size:28px; }
.primary,.secondary,.ghost,.danger,.icon-btn { min-height:42px; border-radius:4px; }.primary { background:#29a9df; box-shadow:none; }.primary:hover { background:#168fc6; }.secondary { border-color:#bcd9e7; background:#eef8fd; color:#247da9; }
.panel,.kpi,.list-panel,.detail-card,.pipeline-select-wrap,.automation-topbar { border-radius:5px; box-shadow:0 1px 2px rgba(35,72,91,.04); }
.pipeline-bar { gap:8px; }.pipeline-select-wrap { min-width:285px; border-color:#cfdce3; }.view-switch { border-radius:4px; background:#dfe8ed; }.view-switch button { min-height:44px; border-radius:3px; }
.kanban { grid-auto-columns:270px; gap:8px; }.column { min-height:565px; padding:8px; border:1px solid #d8e2e7; border-radius:4px; background:#e7edf0; }.column-color { height:7px!important; margin:-8px -8px 9px!important; }.column-head { min-height:49px; align-items:flex-start; padding:4px 4px 9px; }.column-head strong { font-size:12px; }.column-head b { min-width:20px; padding:2px 6px; border-radius:10px; background:rgba(255,255,255,.75); color:#54717f; text-align:center; }.deal-card { border-radius:4px; border-color:#d1dfe6; box-shadow:0 1px 2px rgba(33,72,92,.07); }.deal-card:hover { border-color:#74b8d8; box-shadow:0 4px 12px rgba(34,109,148,.13); }
.kanban .column.stage-0 .column-color { background:#4bb5e5; }.kanban .column.stage-1 .column-color { background:#5bc5df; }.kanban .column.stage-2 .column-color { background:#68c7c7; }.kanban .column.stage-3 .column-color { background:#83c3a1; }.kanban .column.stage-4 .column-color { background:#b4ca79; }.kanban .column.stage-5 .column-color { background:#d5bf62; }.kanban .column.stage-6 .column-color { background:#e6a358; }.kanban .column.stage-7 .column-color { background:#d98567; }.kanban .column.stage-8 .column-color { background:#8a9fd6; }.kanban .column.stage-9 .column-color { background:#55b985; }.kanban .column.stage-10 .column-color { background:#c56a6a; }
.calculation-board .column.stage-0 .column-color { background:#47b4e5; }.calculation-board .column.stage-1 .column-color { background:#e58a62; }.calculation-board .column.stage-2 .column-color { background:#4f9fda; }.calculation-board .column.stage-3 .column-color { background:#758fd2; }.calculation-board .column.stage-4 .column-color { background:#59bec9; }.calculation-board .column.stage-5 .column-color { background:#877bd0; }.calculation-board .column.stage-6 .column-color { background:#6689cf; }.calculation-board .column.stage-7 .column-color { background:#52b982; }
.tunnel-label { display:flex; align-items:center; gap:8px; margin-bottom:8px; padding:8px; border:1px dashed #6cb7da; border-radius:4px; background:#f2fbff; color:#4c7d95; font-size:10px; }.tunnel-label i { display:grid; place-items:center; width:28px; height:28px; border-radius:50%; background:#35a9dc; color:#fff; font-style:normal; font-size:18px; }.tunnel-label strong { color:#2279a4; }
.funnel-route { display:grid; grid-template-columns:minmax(180px,1fr) 34px minmax(220px,1.2fr) 34px minmax(240px,1fr); align-items:center; gap:6px; margin-bottom:10px; padding:10px; border:1px solid #d1dfe6; border-radius:5px; background:#fff; }.funnel-route>div { padding:9px 12px; border-radius:4px; background:#edf3f6; }.funnel-route>div.active { border:1px solid #73bfe1; background:#e8f7fd; }.funnel-route span,.funnel-route strong { display:block; }.funnel-route span { margin-bottom:4px; color:#7a8d97; font-size:9px; text-transform:uppercase; }.funnel-route strong { font-size:12px; }.funnel-route>i { color:#2c9fd0; font-size:21px; font-style:normal; text-align:center; }
.pipeline-location { display:flex; align-items:center; gap:8px; padding:8px 20px; border-bottom:1px solid #d8e2e8; background:#eaf7fd; color:#5e7886; font-size:10px; }.pipeline-location strong,.pipeline-location b { color:#247ba5; font-size:11px; }.pipeline-location i { font-style:normal; }.pipeline-location em { margin-left:auto; color:#6e8793; font-style:normal; }
.deal-stage-rail button { border-radius:3px; }.deal-stage-rail button.current { border-color:#168fc6; background:#29a9df; box-shadow:none; }.deal-actionbar { background:#edf3f6; }.deal-actionbar>button { min-height:64px; border-radius:4px; }.deal-actionbar>button.accent { background:#e2f5fd; border-color:#58b6de; }
.handoff-preview { padding:13px; border:1px solid #9fd1e7; border-radius:4px; background:#eef9fd; }.handoff-preview span,.handoff-preview strong,.handoff-preview small { display:block; }.handoff-preview span { color:#6d8794; font-size:9px; text-transform:uppercase; }.handoff-preview strong { margin:5px 0; color:#247da8; font-size:13px; }.handoff-preview small { color:#6f828c; line-height:1.45; }.rework-reason,.card-rework { color:#9b552f; background:#fff0e7; }.rework-reason { margin:8px 0 0; padding:8px; border-radius:4px; font-size:11px; }.card-rework { margin:7px 0; padding:6px 8px; border-radius:3px; font-size:10px; line-height:1.35; }
.company-link,.drawer-stage select,.drawer-tabs button.active,.composer-tabs button.active,.timeline-title button { color:#247da8; }.drawer-tabs button.active { border-color:#29a9df; }.drawer-close { background:#edf5f9; color:#40758f; }.drawer-workspace,.deal-fields,.drawer-items>div,.document-cards button { border-radius:4px; }.drawer-stage label,.drawer-stage>div,.drawer-totals>div,.deal-note { border-radius:4px; background:#f1f6f8; }.drawer-totals .accent { background:#e3f5fc; color:#176d99; }.timeline-icon { background:#e7f3f9; color:#247da8; }.timeline-entry p { background:#f0f5f8; }.composer { border-color:#c9dce6; box-shadow:0 3px 11px rgba(22,91,128,.07); }.role-shortcut-icon { background:#e5f5fb; color:#2183b3; }.auto-name { border-color:#b9dae9; background:#edf8fd; }.auto-name strong { color:#227da8; }.chart-bar { background:linear-gradient(180deg,#42b6e1,#267eae); }
@media(max-width:800px){.funnel-route{grid-template-columns:1fr}.funnel-route>i{transform:rotate(90deg)}.pipeline-location{align-items:flex-start;flex-wrap:wrap}.pipeline-location em{width:100%;margin-left:0}.view{padding:14px 10px}}

/* v11: cloud Bitrix24 information architecture */
.crm-nav { display:flex; align-items:center; min-height:45px; margin:-22px -24px 18px; padding:0 24px; border-bottom:1px solid #d4dee4; background:#fff; overflow-x:auto; }
.crm-nav button { align-self:stretch; padding:0 16px; border:0; border-bottom:3px solid transparent; background:transparent; color:#586b76; font-size:12px; font-weight:700; white-space:nowrap; }
.crm-nav button:hover { color:#168dcc; }.crm-nav button.active { border-bottom-color:#28a9df; color:#1b87bb; }.crm-nav .crm-more { margin-left:auto; }
.page-head { align-items:center; }.page-head h1 { font-size:25px; }.page-head .eyebrow { color:#8a9ba4; }.head-actions { align-items:center; }
.pipeline-bar { position:relative; min-height:58px; padding:6px 8px; border-radius:3px; }
.funnel-picker { position:relative; z-index:19; min-width:260px; }.funnel-trigger { width:100%; min-height:45px; display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:8px; padding:6px 12px; border:1px solid #c8d6de; border-radius:3px; background:#fff; color:#6b7f89; text-align:left; }.funnel-trigger span { font-size:10px; text-transform:uppercase; }.funnel-trigger strong { color:#263b46; font-size:13px; }.funnel-trigger i { font-style:normal; font-size:18px; }.funnel-trigger.open { border-color:#42add9; box-shadow:0 0 0 2px rgba(46,167,215,.12); }
.funnel-dropdown { position:absolute; top:51px; left:0; width:390px; padding:7px; border:1px solid #c8d5dc; border-radius:3px; background:#fff; box-shadow:0 12px 28px rgba(24,56,74,.22); }.funnel-dropdown header { padding:10px 11px 8px; border-bottom:1px solid #e2e8ec; }.funnel-dropdown header strong,.funnel-dropdown header span { display:block; }.funnel-dropdown header strong { font-size:14px; }.funnel-dropdown header span { margin-top:3px; color:#80919a; font-size:10px; }.funnel-dropdown>button { width:100%; display:grid; grid-template-columns:8px 1fr auto; align-items:center; gap:10px; padding:10px; border:0; border-radius:3px; background:#fff; text-align:left; }.funnel-dropdown>button:hover,.funnel-dropdown>button.active { background:#eaf7fd; }.funnel-dropdown>button>i { width:7px; height:32px; border-radius:1px; background:#72c6e7; }.funnel-dropdown>button:nth-of-type(2)>i { background:#4c9eda; }.funnel-dropdown>button:nth-of-type(3)>i { background:#8b83d5; }.funnel-dropdown span strong,.funnel-dropdown span small { display:block; }.funnel-dropdown span strong { color:#30434c; font-size:12px; }.funnel-dropdown span small { margin-top:3px; color:#7f919a; font-size:9px; }.funnel-dropdown>button>b { min-width:25px; padding:4px 7px; border-radius:12px; background:#dae8ef; color:#56717e; text-align:center; }.funnel-dropdown footer { padding:7px 10px 3px; border-top:1px solid #e2e8ec; }.funnel-dropdown footer button { border:0; background:transparent; color:#2188b7; font-size:10px; }
.funnel-context { display:flex; align-items:center; gap:18px; margin-bottom:8px; padding:10px 13px; border-left:4px solid #2da9dc; background:#e9f7fc; }.funnel-context strong { color:#247da5; font-size:11px; white-space:nowrap; }.funnel-context span { color:#66808c; font-size:10px; }
.deal-drawer { width:min(1320px,calc(100vw - 104px)); background:#eef2f4; }.drawer-head { min-height:74px; padding:8px 18px; }.drawer-head h2 { font-size:20px; }.drawer-actions { align-items:center; }.business-process-btn { min-height:40px; padding:0 15px; border:1px solid #b8cbd5; border-radius:3px; background:#fff; color:#405b68; font-size:11px; font-weight:750; }.business-process-btn:hover { border-color:#4caed6; color:#1786b8; }.business-process-btn i { margin-left:8px; font-style:normal; }
.deal-stage-panel { padding-top:9px; background:#fff; }.deal-stage-caption { padding:0 18px 7px; }.deal-stage-rail { gap:1px; padding:0 18px 10px; }.deal-stage-rail button { flex-basis:128px; min-height:42px; border-radius:1px; }.deal-stage-rail button i { width:20px; height:20px; }.deal-stage-rail button span { font-size:10px; }.pipeline-location { padding:7px 18px; }
.drawer-stage { background:#fff; }.deal-actionbar { padding:8px 18px; }.deal-actionbar>button { min-height:56px; }.drawer-body { grid-template-columns:minmax(520px,1.25fr) minmax(360px,.75fr); }.drawer-main,.timeline-pane { padding:14px; }.drawer-workspace { border-radius:2px; }.drawer-tabs { background:#fff; }.drawer-tabs button { min-height:42px!important; }
.supplier-invoice { display:grid; grid-template-columns:1fr 1fr 1fr auto; align-items:end; gap:8px; margin-top:10px; padding:10px; border-top:1px solid #dfe7eb; background:#f4f8fa; }.supplier-invoice span,.supplier-invoice strong { display:block; }.supplier-invoice span { margin-bottom:4px; color:#81929a; font-size:9px; text-transform:uppercase; }.supplier-invoice strong { font-size:11px; }.supplier-invoice button { min-height:36px; padding:0 12px; border:1px solid #64b5d8; border-radius:3px; background:#e7f6fc; color:#247fa8; font-size:10px; font-weight:750; }
.bp-intro { display:flex; justify-content:space-between; gap:15px; padding:12px; border:1px solid #d8e3e8; background:#f3f7f9; }.bp-intro strong { font-size:14px; }.bp-intro span { color:#718690; font-size:11px; }.bp-search { display:flex; align-items:center; gap:8px; margin:12px 0; padding:9px 12px; border:1px solid #ccd9df; background:#fff; }.bp-search input { flex:1; border:0; outline:0; font-size:12px; }.bp-list { border:1px solid #d8e1e6; }.bp-list article { display:grid; grid-template-columns:40px 1fr auto; align-items:center; gap:12px; padding:12px; border-bottom:1px solid #e2e8ec; }.bp-list article:last-child { border-bottom:0; }.bp-icon { display:grid; place-items:center; width:36px; height:36px; border-radius:50%; background:#e3f4fb; color:#2387b5; font-size:12px; font-weight:800; }.bp-list article>div>strong { display:flex; align-items:center; gap:6px; color:#2b404a; font-size:12px; }.bp-list article>div>strong button { width:17px; height:17px; padding:0; border:1px solid #aebfc8; border-radius:50%; background:#fff; color:#718690; font-size:9px; }.bp-list p { margin:3px 0; color:#6c808a; font-size:10px; }.bp-list small { color:#91a0a7; font-size:9px; }.bp-list .primary { min-height:34px; padding:0 12px; font-size:10px; }
@media(max-width:900px){.crm-nav{margin:-14px -10px 14px;padding:0 8px}.funnel-dropdown{width:min(390px,90vw)}.deal-drawer{width:100vw}.supplier-invoice{grid-template-columns:1fr 1fr}.funnel-context{align-items:flex-start;flex-direction:column;gap:5px}}

/* v12: deal workspace rebuilt around the Bitrix24 interaction model */
.deal-drawer {
  inset:16px 8px 0 auto;
  width:min(1320px,calc(100vw - 66px));
  border:1px solid #cbd8df;
  border-bottom:0;
  border-radius:18px 18px 0 0;
  background:#eef2f4;
  box-shadow:-14px 6px 42px rgba(19,61,84,.24);
}
.drawer-head {
  min-height:68px;
  padding:8px 16px;
  border-radius:18px 18px 0 0;
  background:#eef3f6;
}
.drawer-close { width:34px; height:34px; border-radius:50%; background:#dfeaf0; color:#2c779b; }
.deal-heading { min-width:0; display:flex; align-items:center; gap:13px; }
.deal-heading>div { min-width:0; }
.deal-heading h2 { overflow:hidden; margin:0 0 3px; font-size:23px; font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
.company-link { font-size:12px; }
.deal-funnel-name { padding-left:13px; border-left:1px solid #cbd7de; color:#637985; font-size:12px; white-space:nowrap; }
.drawer-actions { gap:8px; }
.header-icon-action,.header-menu-action {
  min-height:38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid #d3dee4;
  border-radius:6px;
  background:#fff;
  color:#4a616d;
  text-decoration:none;
  box-shadow:0 1px 2px rgba(28,65,84,.04);
}
.header-icon-action { width:38px; padding:0; font-size:15px; }
.header-menu-action { gap:8px; padding:0 13px; font-size:12px; }
.header-menu-action i { font-style:normal; color:#82919a; }
.business-process-btn { min-height:38px; border-radius:19px; border-color:#3ab5e5; color:#2486ad; background:#f9fdff; }
.flow-next { min-width:154px; min-height:38px!important; border-radius:6px; font-size:12px!important; }

.deal-stage-panel { padding:8px 14px 7px; border-bottom:0; background:#eef3f6; }
.deal-stage-rail { gap:3px; padding:0; overflow-x:auto; scrollbar-width:none; }
.deal-stage-rail::-webkit-scrollbar { display:none; }
.deal-stage-rail button {
  flex:1 0 112px;
  min-height:31px;
  display:block;
  overflow:visible;
  padding:0 12px;
  border:0;
  border-radius:3px;
  clip-path:polygon(0 0,calc(100% - 7px) 0,100% 50%,calc(100% - 7px) 100%,0 100%,7px 50%);
  background:#dce2e6;
  color:#4f626d;
  box-shadow:none;
  text-align:left;
}
.deal-stage-rail button:first-child { clip-path:polygon(0 0,calc(100% - 7px) 0,100% 50%,calc(100% - 7px) 100%,0 100%); }
.deal-stage-rail button span { display:block; overflow:hidden; font-size:10px; font-weight:750; line-height:31px; text-overflow:ellipsis; white-space:nowrap; }
.deal-stage-rail button.passed { border:0; background:#ffd900; color:#24343b; }
.deal-stage-rail button.current { border:0; background:#ffe100; color:#1f2d33; box-shadow:inset 0 -3px #21b8c9; }
.deal-stage-rail button.future { background:#dce2e6; color:#51636d; }
.deal-stage-rail button.terminal.current { background:#69c67e; box-shadow:inset 0 -3px #2c9f52; }
.deal-stage-rail button.terminal:last-child:not(.current) { border:0; background:#dce2e6; color:#51636d; }

.deal-primary-tabs {
  min-height:48px;
  display:flex;
  align-items:stretch;
  gap:0;
  overflow-x:auto;
  padding:0 18px;
  border-bottom:1px solid #d3dde3;
  background:#eef3f6;
}
.deal-primary-tabs button {
  min-width:max-content;
  padding:0 16px;
  border:0;
  border-bottom:3px solid transparent;
  background:transparent;
  color:#3e505a;
  font-size:13px;
}
.deal-primary-tabs button:hover,.deal-primary-tabs button.active { color:#167fc0; }
.deal-primary-tabs button.active { border-bottom-color:#25a9df; font-weight:700; }
.deal-primary-tabs .deal-tab-more { margin-left:auto; }

.drawer-body { grid-template-columns:minmax(390px,.72fr) minmax(520px,1fr); min-height:calc(100vh - 174px); }
.drawer-main { padding:12px 14px 34px 16px; }
.drawer-workspace { min-height:0; padding:0; border:0; border-radius:0; background:transparent; }
.timeline-pane { padding:12px 16px 36px 14px; border-left:1px solid #d6e0e5; background:#eef2f4; }

.deal-info-card { margin-bottom:12px; padding:0 14px 14px; border:1px solid #e0e7eb; border-radius:11px; background:#fff; box-shadow:0 1px 2px rgba(31,66,83,.03); }
.deal-info-card>header { min-height:45px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid #e8edef; }
.deal-info-card>header h3 { font-size:12px; font-weight:750; letter-spacing:.02em; text-transform:uppercase; }
.deal-info-card>header button,.deal-payment-box>button,.field-link { padding:0; border:0; background:transparent; color:#3a8fba; font-size:12px; text-decoration:none; }
.deal-info-fields { padding-top:10px; }
.deal-info-fields>div:not(.deal-payment-box) { display:grid; gap:4px; padding:7px 0; }
.deal-info-fields span { color:#8998a0; font-size:12px; }
.deal-info-fields strong,.deal-info-fields .field-link { color:#34464f; font-size:14px; font-weight:500; text-align:left; }
.deal-main-amount strong { font-size:34px!important; font-weight:400!important; letter-spacing:-.035em; }
.deal-payment-box { margin:7px 0 10px; padding:13px 14px 10px; border:1px solid #e3e9ec; border-radius:9px; background:#fbfcfd; }
.deal-payment-box p { margin:8px 0; color:#7d8c94; font-size:13px; line-height:1.45; }
.deal-payment-box footer { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:13px; padding-top:11px; border-top:1px solid #e5eaed; }
.deal-payment-box footer strong { font-size:14px!important; font-weight:500!important; }
.deal-info-card.compact { padding-bottom:0; }
.empty-fields { margin:0; padding:13px 0; color:#687b85; font-size:14px; }

.activity-tabs { min-height:43px; display:flex; align-items:stretch; padding:0 10px; border:1px solid #dbe4e8; border-bottom:0; border-radius:11px 11px 0 0; background:#fff; overflow-x:auto; }
.activity-tabs button { min-width:max-content; padding:0 13px; border:0; border-bottom:2px solid transparent; background:transparent; color:#42545e; font-size:13px; }
.activity-tabs button.active { border-bottom-color:#29a9df; color:#167fb1; font-weight:700; }
.composer { margin:0 0 14px; border-color:#d5e0e5; border-radius:0 0 11px 11px; box-shadow:none; background:#fff; }
.composer textarea { min-height:61px; padding:15px; font-size:14px; }
.composer>div:last-child { padding:8px 10px; }
.composer>div:last-child span { font-size:12px; }
.composer .primary { min-height:36px; padding:0 17px; border-radius:5px; font-size:12px; }
.next-activity { width:100%; min-height:92px; display:flex; align-items:center; justify-content:space-between; gap:16px; margin:0 0 15px; padding:13px 14px; border:1px solid #ebe5c7; border-radius:10px; background:#fffdf2; color:#43515a; text-align:left; }
.next-activity>div { display:grid; gap:5px; }
.next-activity span,.next-activity small { color:#819099; font-size:12px; }
.next-activity strong { font-size:14px; }
.next-activity>button { min-height:34px; padding:0 15px; border:1px solid #8fc7df; border-radius:17px; background:#f5fcff; color:#2385ad; }
.timeline-divider { display:flex; align-items:center; gap:10px; margin:6px 0 13px; color:#7a8b93; font-size:12px; }
.timeline-divider:before,.timeline-divider:after { content:""; flex:1; height:1px; background:#d6e0e5; }
.deal-timeline { position:relative; gap:13px; padding-left:4px; }
.deal-timeline:before { content:""; position:absolute; left:17px; top:18px; bottom:18px; width:1px; background:#cedbe1; }
.timeline-entry { position:relative; grid-template-columns:35px 1fr; gap:10px; }
.timeline-icon { z-index:1; width:35px; height:35px; border:4px solid #eef2f4; background:#36b7e5; color:#fff; font-size:12px; }
.timeline-entry.message .timeline-icon { background:#59b74c; color:#fff; }
.timeline-entry.call .timeline-icon { background:#efb13e; color:#fff; }
.timeline-entry.task .timeline-icon { background:#ef5b58; color:#fff; }
.timeline-card { padding:12px 13px; border:1px solid #e0e6e9; border-radius:10px; background:#fff; }
.timeline-meta { font-size:12px; }
.timeline-meta strong { font-size:13px; }
.timeline-entry p,.timeline-entry.message p { margin:8px 0 0; padding:0; border-radius:0; background:transparent; font-size:13px; line-height:1.45; }
.timeline-card-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:10px; }
.timeline-card-actions button { min-height:29px; padding:0 10px; border:1px solid #d1dce1; border-radius:15px; background:#fff; color:#71838d; font-size:11px; }

.drawer-items strong,.drawer-items span,.drawer-items b,.cost-breakdown span,.cost-breakdown strong,.drawer-totals span,.drawer-totals strong,.deal-note p { font-size:12px; }
.drawer-section-head h3 { font-size:15px; }
.drawer-section-head span { font-size:12px; }

@media(max-width:1050px){
  .deal-drawer{inset:0;width:100vw;border:0;border-radius:0}
  .drawer-head{border-radius:0;grid-template-columns:38px minmax(220px,1fr)}
  .drawer-actions{grid-column:2;flex-wrap:wrap}
  .drawer-body{grid-template-columns:1fr}
  .timeline-pane{border-left:0;border-top:1px solid #d6e0e5}
}
@media(max-width:700px){
  .deal-heading{display:block}.deal-funnel-name{display:block;margin-top:4px;padding:0;border:0}
  .header-menu-action{display:none}.business-process-btn{padding:0 11px}
  .deal-primary-tabs{padding:0 6px}.deal-primary-tabs button{padding:0 11px}
  .drawer-main,.timeline-pane{padding:10px}
  .deal-main-amount strong{font-size:29px!important}
}

/* v13: multi-brand items, supplier VAT mode and always-available deal chat */
.manager-items table { min-width:920px; }
.manager-items .item-brand { min-width:125px; }
.product-cost-row strong em { display:inline-flex; margin-left:7px; padding:2px 7px; border-radius:10px; background:#e8f4fa; color:#237fa9; font-size:10px; font-style:normal; font-weight:700; }
.drawer-items>div.product-cost-row { grid-template-columns:minmax(0,1fr) auto; }
.product-cost-row small { grid-column:2; color:#748891; font-size:10px; text-align:right; }
.proc-row { grid-template-columns:minmax(190px,1.35fr) minmax(130px,1fr) minmax(120px,.8fr) minmax(190px,1.2fr) minmax(95px,.65fr) minmax(150px,1fr); align-items:end; }
.proc-row { grid-template-columns:minmax(190px,1.35fr) minmax(90px,.55fr) minmax(130px,1fr) minmax(120px,.8fr) minmax(190px,1.2fr) minmax(95px,.65fr) minmax(150px,1fr); }
.shadow-deal { border-color:#72bee0; box-shadow:inset 3px 0 #28a6d8,0 2px 8px rgba(15,67,101,.12); }
.procurement-shadow { display:flex; align-items:center; gap:7px; margin:7px 0; padding:6px 8px; border-radius:4px; background:#e9f7fd; color:#2c718f; font-size:10px; }
.procurement-shadow b { padding:3px 6px; border-radius:10px; background:#2fa8d8; color:#fff; font-size:9px; text-transform:uppercase; }
.procurement-shadow span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.review-note { max-width:620px; margin:8px 0 0; padding:9px 11px; border-left:3px solid #24a4d7; background:#edf8fc; color:#557785; font-size:11px; }
.outcome-choice { display:grid; gap:10px; }
.outcome-choice>p { margin:0 0 4px; color:#657b87; }
.outcome-choice>button { width:100%; display:grid; grid-template-columns:38px 1fr; align-items:center; gap:12px; padding:15px; border:1px solid #d7e2e8; border-radius:6px; background:#fff; text-align:left; }
.outcome-choice>button:hover { transform:translateY(-1px); box-shadow:0 7px 18px rgba(22,67,91,.12); }
.outcome-choice>button>i { display:grid; place-items:center; width:36px; height:36px; border-radius:50%; color:#fff; font-size:20px; font-style:normal; }
.outcome-choice span,.outcome-choice strong,.outcome-choice small { display:block; }
.outcome-choice strong { color:#263d49; font-size:15px; }
.outcome-choice small { margin-top:4px; color:#738894; line-height:1.35; }
.outcome-success>i { background:#40aa70; }
.outcome-failed>i { background:#d45b5b; }
.closed-sale-panel { display:flex; align-items:center; gap:12px; margin:10px 18px; padding:12px 15px; border-left:4px solid #42ad73; background:#eef9f3; color:#557568; }
.closed-sale-panel strong { color:#278052; }
.closed-sale-panel.lost { border-left-color:#d15a5a; background:#fbf0f0; color:#886565; }
.closed-sale-panel.lost strong { color:#b84444; }
.funnel-dropdown>button:nth-of-type(4)>i { background:#58b9d9; }
.proc-product { align-self:center; }
.proc-product strong,.proc-product em,.proc-product span { display:block; }
.proc-product em { width:max-content; margin-top:5px; padding:2px 7px; border-radius:9px; background:#e8f4fa; color:#247fa8; font-size:10px; font-style:normal; }
.vat-choice { min-width:190px; display:grid; grid-template-columns:1fr 1fr; gap:4px; }
.vat-choice>span { grid-column:1/-1; color:var(--muted); font-size:10px; }
.vat-choice label { display:block; }
.vat-choice input { position:absolute; opacity:0; pointer-events:none; }
.vat-choice b { min-height:34px; display:flex; align-items:center; justify-content:center; padding:0 8px; border:1px solid #cfdce3; border-radius:5px; background:#fff; color:#647983; font-size:10px; cursor:pointer; }
.vat-choice input:checked+b { border-color:#32a9d8; background:#e5f6fd; color:#187da8; box-shadow:inset 0 0 0 1px #32a9d8; }
.proc-vat-result { grid-column:2/-1; display:grid; grid-template-columns:repeat(3,1fr); gap:7px; padding:8px 10px; border-radius:6px; background:#edf6fa; }
.proc-vat-result span { display:flex; justify-content:space-between; gap:8px; color:#6b808b; font-size:11px; }
.proc-vat-result b { color:#244956; }
@media(max-width:1100px){.proc-row{grid-template-columns:1fr 1fr}.proc-vat-result{grid-column:1/-1}.vat-choice{min-width:0}}

/* v14: unified CRM workspace based on the supplied interaction references */
.app-shell{grid-template-columns:216px 1fr;background:#eef3f6}
.sidebar{width:216px;padding:14px 12px 12px;background:linear-gradient(180deg,#176acb 0%,#0750bb 54%,#08408f 100%);box-shadow:inset -1px 0 rgba(255,255,255,.12)}
.brand{min-height:52px;padding:0 8px 13px;gap:9px}.brand-mark{width:31px;height:31px;border-radius:50%;background:#2fbcf0;font-size:10px}.brand strong{font-size:17px;font-weight:550}.brand span{color:#b8dcf4;font-size:9px}
.nav{gap:2px;padding-top:12px}.nav-label{padding:12px 10px 5px;color:#96c5eb;font-size:10px;letter-spacing:.05em;text-transform:uppercase}.nav-item{min-height:39px;padding:0 10px;border-radius:6px;color:#d8ecfb;font-size:14px}.nav-item i{width:22px;color:#bfe4fb;font-style:normal;font-size:15px}.nav-item span{flex:1}.nav-item.active{background:rgba(255,255,255,.27);box-shadow:inset 3px 0 #71dcff,0 1px 8px rgba(0,46,123,.16)}.nav-item:hover{background:rgba(255,255,255,.15)}.nav-count{background:rgba(0,52,132,.45)}.sidebar-footer{border-color:rgba(255,255,255,.16)}
.topbar{height:52px;padding:0 20px;border-color:#d7e2e9}.search-box{height:34px;border-radius:4px;background:#f3f7f9}.top-actions{gap:7px}.top-actions>.primary{min-height:34px}.view{padding:18px 20px}
.crm-nav{min-height:49px;margin:-18px -20px 16px;padding:0 20px}.crm-nav button{padding:0 13px;font-size:13px;font-weight:500}.crm-nav button.active{border-bottom-color:#29b5e5;color:#1384bd;font-weight:700}

.deals-surface{min-height:calc(100vh - 52px);margin:-18px -20px;padding:0 20px 22px;background:linear-gradient(145deg,#eef8ff 0%,#dceffa 46%,#cfe7f7 100%)}
.deals-surface .crm-nav{margin:0 -20px 12px;border-color:rgba(77,139,180,.18);background:rgba(255,255,255,.44)}
.deals-surface .crm-nav button{color:#416982}.deals-surface .crm-nav button.active{border-bottom-color:#28a9df;color:#146e9f;background:rgba(255,255,255,.72)}
.deals-surface .page-head{min-height:51px;margin-bottom:4px;align-items:center}.deals-surface .page-head .eyebrow{display:none}.deals-surface .page-head h1{color:#173f5a;font-size:28px;font-weight:550}.deals-surface .page-head p{color:#587b91}.deals-surface .head-actions{order:-1;margin-left:126px}.deals-surface .page-head>div:first-child{order:-2}.deals-surface .page-head .secondary{border-color:rgba(71,135,176,.25);background:rgba(255,255,255,.66);color:#256788}.create-deal-button{min-width:111px;background:#35b95d}.create-deal-button:hover{background:#28a94f}.create-deal-button i{margin-left:15px;font-style:normal}
.deals-surface .pipeline-bar{min-height:48px;padding:3px 0 7px;border:0;background:transparent;box-shadow:none}.deals-surface .funnel-trigger{min-height:36px;border-color:rgba(71,135,176,.25);background:rgba(255,255,255,.68);color:#52758a}.deals-surface .funnel-trigger strong{color:#1e5f82}.deals-surface .funnel-health button,.deals-surface .view-switch{background:rgba(255,255,255,.62);color:#3a6d8b}.deals-surface .view-switch button{min-height:36px;color:#3e708c}.deals-surface .view-switch button.active{background:rgba(255,255,255,.95);color:#147eb8}.deals-surface .compact-toolbar{min-height:39px;margin-bottom:7px;border:0;background:transparent}.deals-surface .compact-toolbar select{border-color:rgba(71,135,176,.24);background:rgba(255,255,255,.68);color:#285f7e}.deals-surface .toolbar-note{color:#55798f}.deals-surface .funnel-context{border-left-color:#29aee3;background:rgba(255,255,255,.58)}.deals-surface .funnel-context strong,.deals-surface .funnel-context span{color:#285f7d}
.deals-surface .kanban{grid-auto-columns:220px;gap:4px;min-height:620px;padding:0}.deals-surface .kanban .column{min-height:620px;padding:0 4px 10px;border:0;border-right:1px dashed rgba(56,119,162,.25);border-radius:0;background:transparent;overflow:visible}.deals-surface .kanban .column-color{height:29px!important;margin:0 0 0!important;border-radius:4px 0 0 4px;clip-path:polygon(0 0,calc(100% - 8px) 0,100% 50%,calc(100% - 8px) 100%,0 100%)}.deals-surface .kanban .column-head{min-height:81px;display:flex;align-content:center;justify-content:center;padding:9px 5px;color:#315e78;text-align:center}.deals-surface .kanban .column-head>div{position:absolute;top:7px;left:10px;z-index:2}.deals-surface .kanban .column-head strong{max-width:175px;overflow:hidden;color:#173342;font-size:11px;line-height:15px;text-overflow:ellipsis;white-space:nowrap}.deals-surface .kanban .column-head b{height:17px;min-width:17px;padding:1px 5px;background:rgba(255,255,255,.75);font-size:9px}.deals-surface .kanban .column-head>span{align-self:center;color:#244f69;font-size:21px;font-weight:400}.deals-surface .kanban .column-add{min-height:28px;margin:0 4px 5px;border:0;border-radius:14px;background:rgba(255,255,255,.62);color:#24759e}.deals-surface .kanban .deal-card{margin:0 0 5px;border:0;border-radius:9px;background:#fff;box-shadow:0 1px 3px rgba(0,38,100,.14)}.deals-surface .kanban .deal-card:hover{box-shadow:0 5px 16px rgba(0,45,90,.2);transform:translateY(-1px)}.deals-surface .column-empty{color:#6a899b}.deals-surface .tunnel-label{border-color:rgba(65,129,171,.28);background:rgba(255,255,255,.58);color:#4f748b}.deals-surface .tunnel-label strong{color:#275e7c}

.modal-root:has(#deal-form){padding:16px 8px 0 58px;place-items:stretch;background:rgba(3,34,76,.58)}
.modal:has(#deal-form){width:100%;max-height:100vh;border:1px solid #c9d7df;border-bottom:0;border-radius:18px 18px 0 0;background:#eef2f4;box-shadow:0 0 45px rgba(5,42,80,.3);overflow:auto}
.modal:has(#deal-form)>.modal-head{min-height:55px;padding:9px 18px;border-radius:18px 18px 0 0;background:#eef3f6}.modal:has(#deal-form)>.modal-head h2{font-size:22px;font-weight:550}.modal:has(#deal-form)>.modal-body{padding:0}.modal:has(#deal-form)>.modal-foot{z-index:8;justify-content:flex-start;padding:10px 0 10px 506px;background:#fff}.deal-save-button{min-width:112px;background:#9de400;color:#294100}.deal-save-button:hover{background:#8bcf00}
.deal-editor-layout{display:grid;grid-template-columns:500px minmax(480px,1fr);min-height:calc(100vh - 116px)}.deal-editor-form{padding:0 12px 28px 18px;background:#eef2f4}.deal-editor-section{margin-bottom:12px;padding:0 13px 14px;border:1px solid #e1e7ea;border-radius:11px;background:#fff}.deal-editor-section>header{min-height:47px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e7edef}.deal-editor-section>header strong{font-size:12px;text-transform:uppercase}.deal-editor-section>header span{color:#87969e;font-size:11px}.deal-editor-section .auto-name{margin:12px 0;border:0;border-radius:4px;background:#edf8fd}.deal-editor-section .form-grid{grid-template-columns:1fr;gap:11px}.deal-editor-section .field,.deal-editor-section .field-static{font-size:11px}.deal-editor-section .field input,.deal-editor-section .field select,.deal-editor-section .field textarea{min-height:38px;border-radius:4px;font-size:13px}.products-editor>p{margin:11px 0;color:#758892;font-size:11px;line-height:1.45}.products-editor #items-body{display:grid;gap:9px}.deal-item-editor{display:grid;grid-template-columns:1fr 115px;gap:9px;padding:10px;border:1px solid #dbe5ea;border-radius:6px;background:#f8fafb}.deal-item-editor>header{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between}.deal-item-editor>header strong{font-size:11px}.deal-item-editor>.field:nth-of-type(1),.deal-item-editor>.field:nth-of-type(2),.deal-item-editor>.field:nth-of-type(3){grid-column:1/-1}.deal-item-editor .item-qty{grid-column:2}.deal-item-editor .remove-row{font-size:18px}.add-product-button{width:100%;min-height:42px;margin-top:9px;border:1px dashed #92bdd2;border-radius:4px;background:#f3fbff;color:#237eaa;font-weight:700}.deal-editor-side{padding:12px 18px;background:rgba(232,237,240,.72)}.deal-editor-side .activity-tabs{opacity:.72}.editor-composer{min-height:63px;display:flex;align-items:center;justify-content:space-between;padding:14px;border:1px solid #d4dfe5;border-radius:0 0 11px 11px;background:rgba(255,255,255,.72);color:#8c9aa1;font-size:13px}.editor-help{display:flex;gap:13px;margin:16px 0;padding:14px;border-radius:10px;background:#fffced;opacity:.72}.editor-help i{display:grid;place-items:center;width:25px;height:25px;border-radius:50%;background:#8bcb00;color:#fff;font-style:normal;font-size:20px}.editor-help strong,.editor-help span{display:block}.editor-help strong{font-size:14px}.editor-help span{margin-top:3px;color:#85939a;font-size:12px}.editor-event{display:flex;gap:12px;padding:13px;border-radius:10px;background:rgba(255,255,255,.7);color:#546872;font-size:13px}.editor-event i{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#2cacdc;color:#fff;font-style:normal}

.company-drawer{position:fixed;inset:16px 8px 0 58px;z-index:71;overflow:auto;border:1px solid #cbd8df;border-bottom:0;border-radius:18px 18px 0 0;background:#eef2f4;box-shadow:-14px 6px 42px rgba(19,61,84,.24);animation:drawer-in .2s ease-out}.company-drawer-head{position:sticky;top:0;z-index:5;min-height:67px;display:grid;grid-template-columns:38px minmax(260px,1fr) auto;align-items:center;gap:12px;padding:8px 16px;background:#eef3f6}.company-drawer-head h2{margin:0 0 3px;font-size:23px;font-weight:550}.company-drawer-head>div>span{color:#70838e;font-size:12px}.company-primary-tabs{position:sticky;top:67px;z-index:4;min-height:50px;display:flex;align-items:stretch;padding:0 18px;border-bottom:1px solid #d3dde3;background:#eef3f6;overflow-x:auto}.company-primary-tabs button{padding:0 16px;border:0;border-bottom:3px solid transparent;background:transparent;color:#3e505a;font-size:13px;white-space:nowrap}.company-primary-tabs button.active{border-bottom-color:#25a9df;color:#167fc0;font-weight:700}.company-tab-more{margin-left:auto}.company-drawer-body{display:grid;grid-template-columns:minmax(380px,.75fr) minmax(520px,1fr);min-height:calc(100vh - 117px)}.company-drawer-body>main{padding:12px 14px 35px 18px}.company-timeline{padding:12px 18px 36px 14px;border-left:1px solid #d6e0e5}.company-info-card{overflow:hidden;border:1px solid #e0e7eb;border-radius:11px;background:#fff}.company-info-card>header{min-height:45px;display:flex;align-items:center;justify-content:space-between;margin:0 14px;border-bottom:1px solid #e8edef}.company-info-card>header h3{margin:0;font-size:12px;text-transform:uppercase}.company-info-card>header button{border:0;background:transparent;color:#2687b4;font-size:12px}.company-fields{padding:9px 14px}.company-fields>div{display:grid;gap:3px;padding:7px 0}.company-fields span,.company-note>span,.company-contact-section>span{color:#8998a0;font-size:12px}.company-fields strong,.company-fields a{color:#34464f;font-size:14px;font-weight:500;text-decoration:none}.company-contact-section{margin:0 14px;padding:10px;border:1px solid #dfe7eb;border-radius:7px;background:#fbfcfd}.company-contact-section>button:not(.field-link){width:100%;display:grid;grid-template-columns:27px 1fr auto;align-items:center;gap:8px;margin-top:7px;padding:8px;border:1px solid #dbe4e8;border-radius:4px;background:#fff;text-align:left}.company-contact-section button i,.contact-avatar{display:grid;place-items:center;width:27px;height:27px;border-radius:50%;background:#dfeaf0;color:#477183;font-style:normal}.company-contact-section button span strong,.company-contact-section button span small{display:block}.company-contact-section button span small{margin-top:2px;color:#758992;font-size:10px}.company-contact-section button b{color:#7d929c}.company-contact-section .field-link{margin-top:9px}.company-note{margin:12px 14px;padding:10px;border-radius:7px;background:#f7f9fa}.company-note p{margin:5px 0 0;color:#627680;font-size:13px;line-height:1.5}.company-info-card>footer{display:flex;gap:24px;padding:13px 14px;border-top:1px solid #e5eaed;color:#82919a;font-size:12px}.company-info-card>footer b{margin-left:5px;color:#34464f}.company-contact-list{display:grid;gap:8px;padding:13px}.company-contact-list article{display:grid;grid-template-columns:38px 1fr;gap:9px;padding:10px;border:1px solid #e0e7eb;border-radius:7px}.company-contact-list .contact-avatar{width:38px;height:38px}.company-contact-list strong,.company-contact-list small,.company-contact-list a{display:block}.company-contact-list small{margin:3px 0;color:#81929a}.company-contact-list a{color:#2783ad;font-size:12px;text-decoration:none}
@media(max-width:1050px){.deal-editor-layout{grid-template-columns:minmax(390px,500px) 1fr}.company-drawer-body{grid-template-columns:1fr}.company-timeline{border-left:0;border-top:1px solid #d6e0e5}}
@media(max-width:800px){.app-shell{grid-template-columns:1fr}.modal-root:has(#deal-form){padding:0}.modal:has(#deal-form){border-radius:0}.deal-editor-layout{display:block}.deal-editor-side{display:none}.modal:has(#deal-form)>.modal-foot{padding-left:12px}.company-drawer{inset:0;border-radius:0}.company-drawer-head{grid-template-columns:38px 1fr}.company-drawer-head .drawer-actions{grid-column:2}.company-primary-tabs{top:105px}.deals-surface .page-head{display:block}.deals-surface .head-actions{order:initial;margin:10px 0}.deals-surface .kanban{grid-auto-columns:84vw}}

.deals-surface .kanban .column-color{display:flex;align-items:center;gap:5px;padding:0 12px 0 9px}
.deals-surface .kanban .column-color strong{max-width:175px;overflow:hidden;color:#173342;font-size:11px;line-height:15px;text-overflow:ellipsis;white-space:nowrap}
.deals-surface .kanban .column-color b{height:17px;min-width:17px;display:grid;place-items:center;margin-left:auto;padding:1px 5px;border-radius:9px;background:rgba(255,255,255,.65);color:#526c79;font-size:9px}
.deals-surface .kanban .column-head{border:0!important;background:transparent!important}
@media(max-width:760px){.proc-row,.proc-vat-result{grid-template-columns:1fr}.proc-vat-result{grid-column:auto}.product-cost-row small{grid-column:1;text-align:left}}

/* v16: linked contacts, request/offer product grids and persistent kanban navigation */
.field-hint{display:block;margin-top:4px;color:#82949d;font-size:10px;font-weight:400}
.deal-editor-layout{grid-template-columns:minmax(700px,1.25fr) minmax(420px,.75fr)}
.modal:has(#deal-form)>.modal-foot{padding-left:min(720px,55vw)}
.request-table-head,.deal-item-editor{display:grid;grid-template-columns:34px minmax(165px,1.05fr) minmax(105px,.55fr) minmax(220px,1.35fr) 74px 30px;gap:7px;align-items:end}
.request-table-head{padding:7px 9px;border:1px solid #dbe5ea;border-bottom:0;border-radius:6px 6px 0 0;background:#eaf2f6;color:#6e838e;font-size:9px;text-transform:uppercase}
.products-editor #items-body{counter-reset:request-row;gap:0!important;overflow-x:auto;border:1px solid #dbe5ea;border-radius:0 0 6px 6px}
.deal-item-editor{counter-increment:request-row;min-width:690px;padding:8px;border:0!important;border-bottom:1px solid #e1e8ec!important;border-radius:0!important;background:#fff!important}
.deal-item-editor:last-child{border-bottom:0!important}
.request-row-number:before{content:counter(request-row)}
.request-row-number{align-self:center;color:#6e838e;font-size:12px;text-align:center}
.deal-item-editor>.field,.deal-item-editor>.field:nth-of-type(1),.deal-item-editor>.field:nth-of-type(2),.deal-item-editor>.field:nth-of-type(3),.deal-item-editor .item-qty{grid-column:auto!important}
.deal-item-editor .field{gap:3px;font-size:9px}.deal-item-editor textarea{min-height:38px!important;height:38px;resize:vertical}.deal-item-editor .remove-row{align-self:center;width:28px;height:32px;border:0;background:transparent;color:#b16868;font-size:20px}

.product-compare{overflow:auto;border:1px solid #d9e4e9;border-radius:6px;background:#fff}
.product-compare-head,.product-compare article{min-width:760px;display:grid;grid-template-columns:36px minmax(220px,1fr) minmax(240px,1.08fr) minmax(130px,.58fr);gap:0}
.product-compare-head{min-height:36px;align-items:center;background:#eaf2f6;color:#69808c;font-size:9px;text-transform:uppercase}
.product-compare-head>*{padding:0 10px}.product-compare article>span,.product-compare article>div{padding:11px;border-top:1px solid #e1e8ec;border-right:1px solid #e1e8ec}.product-compare article>*:last-child{border-right:0}
.compare-number{color:#78909b;text-align:center}.request-side label,.offer-side label{display:block;margin-bottom:5px;color:#8799a2;font-size:9px;text-transform:uppercase}.request-side strong,.offer-side strong,.request-side b,.offer-side b,.request-side p,.offer-side p,.request-side small,.offer-side small{display:block}.request-side strong,.offer-side strong{font-size:12px}.request-side b,.offer-side b{width:max-content;margin-top:4px;padding:2px 6px;border-radius:9px;background:#e8f4fa;color:#247fa8;font-size:9px}.request-side p,.offer-side p{margin:6px 0;color:#657b86;font-size:10px;line-height:1.4}.request-side small,.offer-side small{color:#506b77}.offer-side{background:#f5fbfe}.offer-cost{display:flex;flex-direction:column;gap:5px;justify-content:center}.offer-cost strong{font-size:14px}.offer-cost span,.offer-cost small{color:#71858e;font-size:9px}

.procurement-form-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;padding:11px 13px;border-radius:6px;background:#eaf6fb}.procurement-form-head strong,.procurement-form-head span{display:block}.procurement-form-head span{margin-top:3px;color:#67808c;font-size:11px}
.proc-row{grid-template-columns:minmax(210px,.8fr) minmax(310px,1.2fr) repeat(3,minmax(115px,.52fr));align-items:start;min-width:1050px;padding:0;border-radius:6px;overflow:hidden;background:#fff}
.proc-request,.proc-offer{grid-row:1/4;min-height:100%;padding:12px;border-right:1px solid #dce6eb}.proc-request{background:#f4f7f9}.proc-offer{display:grid;grid-template-columns:1fr 1fr;gap:8px;background:#f3fbfe}.proc-offer label:last-child{grid-column:1/-1}.proc-offer textarea{min-height:58px;padding:8px;border:1px solid #d5e0e6;border-radius:5px;resize:vertical}.proc-request>span{color:#7b909a;font-size:9px;text-transform:uppercase}.proc-request strong,.proc-request b,.proc-request small{display:block}.proc-request strong{margin-top:7px;font-size:13px}.proc-request b{width:max-content;margin-top:5px;padding:2px 7px;border-radius:9px;background:#e0edf3;color:#3c7189;font-size:9px}.proc-request p{margin:7px 0;color:#637984;font-size:10px;line-height:1.4}.proc-request small{font-weight:800}.proc-row>label,.proc-row>.vat-choice{margin:10px 8px 0}.proc-vat-result{grid-column:3/-1;margin:2px 8px 10px}.procurement-edit{overflow-x:auto;padding-bottom:5px}
.calc-compare-table{overflow:auto;border:1px solid #dce6eb;border-radius:5px}.calc-compare-table header,.calc-compare-table>div{min-width:690px;display:grid;grid-template-columns:1fr 1.15fr .8fr 105px;align-items:center}.calc-compare-table header{min-height:31px;background:#eaf2f6;color:#71858f;font-size:9px;text-transform:uppercase}.calc-compare-table header span,.calc-compare-table>div>span,.calc-compare-table>div>b{padding:8px 10px}.calc-compare-table>div{border-top:1px solid #e1e8ec}.calc-compare-table>div>span:nth-child(2){background:#f3fbfe}.calc-compare-table strong,.calc-compare-table small{display:block}.calc-compare-table strong{font-size:10px}.calc-compare-table small{margin-top:4px;color:#758a94;font-size:9px}.calc-compare-table>div>b{text-align:right}

.kanban-shell{position:relative}.deals-surface .kanban{padding-bottom:58px;scrollbar-width:none}.deals-surface .kanban::-webkit-scrollbar{display:none}
.kanban-fixed-nav{position:fixed;z-index:24;left:236px;right:20px;bottom:14px;display:grid;grid-template-columns:44px minmax(120px,1fr) 44px;align-items:center;gap:8px;padding:7px 9px;border:1px solid rgba(65,129,171,.28);border-radius:24px;background:rgba(255,255,255,.72);box-shadow:0 8px 25px rgba(24,83,121,.16);backdrop-filter:blur(10px)}
.kanban-fixed-nav button{width:38px;height:38px;border:1px solid rgba(47,130,181,.25);border-radius:50%;background:rgba(39,145,202,.11);color:#197faf;font-size:28px;line-height:30px;transition:.15s}.kanban-fixed-nav button:hover{background:#198fc8;color:#fff;transform:scale(1.06)}
.kanban-fixed-nav input{width:100%;height:22px;margin:0;accent-color:#269bd0;cursor:ew-resize}.kanban-fixed-nav input::-webkit-slider-runnable-track{height:7px;border-radius:5px;background:rgba(50,135,185,.24)}.kanban-fixed-nav input::-webkit-slider-thumb{margin-top:-5px;width:18px;height:18px;border-radius:50%;background:#269bd0;box-shadow:0 1px 5px rgba(0,68,110,.28)}
@media(max-width:1050px){.deal-editor-layout{grid-template-columns:minmax(620px,1.2fr) minmax(360px,.8fr)}.modal:has(#deal-form)>.modal-foot{padding-left:52vw}.proc-row{min-width:1000px}}
@media(max-width:800px){.deal-editor-layout{display:block}.modal:has(#deal-form)>.modal-foot{padding-left:12px}.request-table-head{display:none}.kanban-fixed-nav{left:10px;right:10px;bottom:10px}.product-compare-head,.product-compare article{min-width:700px}}

/* v18: context-aware deal layouts and a full-width procurement workspace */
.deal-drawer .drawer-head{grid-template-columns:38px minmax(0,1fr);align-items:start;row-gap:8px}
.deal-drawer .drawer-head>.drawer-close{margin-top:2px}
.deal-drawer .drawer-actions{grid-column:2;width:100%;min-width:0;display:flex;flex-wrap:wrap;justify-content:flex-start;gap:7px}
.deal-drawer .drawer-actions>*{flex:0 0 auto}
.deal-drawer .deal-actionbar{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}

.modal:has(#deal-form input[name="id"][value=""]) .deal-editor-layout{display:block;min-height:calc(100vh - 116px)}
.modal:has(#deal-form input[name="id"][value=""]) .deal-editor-side{display:none}
.modal:has(#deal-form input[name="id"][value=""]) .deal-editor-form{width:100%;padding:0 18px 30px}
.modal:has(#deal-form input[name="id"][value=""]) .deal-editor-section .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.modal:has(#deal-form input[name="id"][value=""]) .deal-editor-section .field.wide{grid-column:1/-1}
.modal:has(#deal-form input[name="id"][value=""])>.modal-foot{padding-left:18px}
.modal:has(#deal-form input[name="id"][value=""]) .request-table-head,
.modal:has(#deal-form input[name="id"][value=""]) .deal-item-editor{grid-template-columns:38px minmax(220px,1.1fr) minmax(140px,.55fr) minmax(320px,1.5fr) 88px 34px}
.modal:has(#deal-form input[name="id"][value=""]) .deal-item-editor{min-width:900px}

.deal-drawer:not(:has(.deal-primary-tabs [data-deal-tab="overview"].active)) .drawer-body{display:block;min-height:calc(100vh - 220px)}
.deal-drawer:not(:has(.deal-primary-tabs [data-deal-tab="overview"].active)) .timeline-pane{display:none}
.deal-drawer:not(:has(.deal-primary-tabs [data-deal-tab="overview"].active)) .drawer-main{width:100%;padding:16px 20px 42px}
.deal-drawer:not(:has(.deal-primary-tabs [data-deal-tab="overview"].active)) .drawer-workspace{width:100%}
.deal-drawer:has(.deal-primary-tabs [data-deal-tab="products"].active) .product-compare-head,
.deal-drawer:has(.deal-primary-tabs [data-deal-tab="products"].active) .product-compare article{min-width:1040px;grid-template-columns:44px minmax(300px,1fr) minmax(360px,1.15fr) minmax(190px,.55fr)}

.modal-root:has(#procurement-form){padding:12px 16px;background:rgba(3,34,76,.58)}
.modal:has(#procurement-form){width:min(1560px,calc(100vw - 32px));max-height:calc(100vh - 24px);border-radius:14px}
.modal:has(#procurement-form)>.modal-body{padding:14px 16px 8px;background:#eef3f6}
.modal:has(#procurement-form)>.modal-foot{position:sticky;bottom:0;z-index:5;background:#fff}
.procurement-edit{display:grid;gap:12px;overflow-x:auto;padding:0 0 8px}
.proc-row{min-width:1280px;display:grid;grid-template-columns:minmax(250px,.8fr) minmax(430px,1.35fr) repeat(3,minmax(135px,.45fr));grid-template-areas:"request offer qty supplier price" "request offer vat term comment" "request offer totals totals totals";align-items:start;border:1px solid #cfdee6;border-radius:9px;box-shadow:0 2px 7px rgba(28,77,102,.06)}
.proc-row .proc-request{grid-area:request}
.proc-row .proc-offer{grid-area:offer}
.proc-row>label:nth-of-type(1){grid-area:qty}
.proc-row>label:nth-of-type(2){grid-area:supplier}
.proc-row>label:nth-of-type(3){grid-area:price}
.proc-row>.vat-choice{grid-area:vat}
.proc-row>label:nth-of-type(4){grid-area:term}
.proc-row>label:nth-of-type(5){grid-area:comment}
.proc-row>.proc-vat-result{grid-area:totals;margin:4px 8px 10px}
.proc-row .proc-request,.proc-row .proc-offer{grid-row:auto;min-height:100%}
.proc-row>label,.proc-row>.vat-choice{margin:12px 9px 0}
.proc-row input,.proc-row select,.proc-row textarea{font-size:13px}
.proc-row .proc-request strong{font-size:14px}
.proc-row .proc-request p{font-size:12px;line-height:1.45}

@media(max-width:800px){
  .deal-drawer .drawer-head{grid-template-columns:36px minmax(0,1fr)}
  .deal-drawer .drawer-actions{grid-column:1/-1}
  .modal:has(#deal-form input[name="id"][value=""]) .deal-editor-section .form-grid{grid-template-columns:1fr}
  .modal:has(#deal-form input[name="id"][value=""]) .deal-editor-section .field.wide{grid-column:auto}
  .modal-root:has(#procurement-form){padding:0}
  .modal:has(#procurement-form){width:100vw;max-height:100vh;border-radius:0}
}

/* v19: stable deal transitions — stages are controlled only from the top rail */
.deal-drawer{animation:none;overflow-y:scroll;scrollbar-gutter:stable}
.deal-drawer .flow-next,
.deal-drawer [data-calc-action="send"],
.deal-drawer [data-calc-action="supplier-request"],
.deal-drawer [data-calc-action="to-logistics"],
.deal-drawer [data-calc-action="finish"]{display:none!important}
.deal-stage-rail button{transition:background-color .16s ease,color .16s ease,box-shadow .16s ease}
.deal-drawer .drawer-body{min-height:calc(100vh - 230px)}

/* v20: purchasing sees supplier economics, not the sales markup control */
.deal-drawer.internal-drawer .drawer-totals{grid-template-columns:repeat(3,1fr)}
.deal-drawer.internal-drawer .drawer-totals>div:first-child{display:none}

/* v21: simplified purchasing card controls */
.deal-drawer [data-deal-tab="automation"],
.deal-drawer .deal-actionbar [data-view="automations"]{display:none!important}
.deal-drawer.internal-drawer .drawer-actions [data-action="new-invoice"],
.deal-drawer.internal-drawer .drawer-actions .business-process-btn{display:none!important}
.deal-drawer.internal-drawer:has(.deal-stage-rail [data-stage-to="Новая заявка"].current) .drawer-section-head [data-edit-deal],
.deal-drawer.internal-drawer:has(.deal-stage-rail [data-stage-to="Новая заявка"].current) [data-deal-tab="history"]{display:none!important}
.deal-drawer.internal-drawer [data-export-procurement]{font-size:0}
.deal-drawer.internal-drawer [data-export-procurement]::after{content:"⇩ Скачать запрос в Excel";font-size:12px}
.deal-drawer.internal-drawer .supplier-invoice [data-purchase-invoice]{display:none}

/* v22: Bitrix-like centered work windows for deals and companies */
.drawer-backdrop{
  background:rgba(10,34,63,.38);
  -webkit-backdrop-filter:blur(2px) saturate(.82);
  backdrop-filter:blur(2px) saturate(.82)
}
.deal-drawer,
.company-drawer{
  top:16px;
  right:20px;
  bottom:0;
  left:240px;
  width:auto;
  max-width:none;
  border:1px solid rgba(190,207,218,.94);
  border-bottom:0;
  border-radius:18px 18px 0 0;
  box-shadow:0 12px 44px rgba(8,37,67,.28)
}

@media(max-width:1280px){
  .deal-drawer,.company-drawer{top:12px;right:12px;left:150px}
}

@media(max-width:980px){
  .deal-drawer,.company-drawer{top:8px;right:8px;left:68px;border-radius:14px 14px 0 0}
  .deal-drawer .drawer-head,.company-drawer-head{border-radius:14px 14px 0 0}
}

@media(max-width:800px){
  .drawer-backdrop{background:rgba(10,34,63,.3);-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px)}
  .deal-drawer,.company-drawer{inset:0;width:auto;border:0;border-radius:0}
  .deal-drawer .drawer-head,.company-drawer-head{border-radius:0}
}

/* v23: Bitrix-inspired workspace rhythm for deals */
.app-shell{grid-template-columns:196px minmax(0,1fr)}
.sidebar{width:196px;padding:12px 10px 10px;background:linear-gradient(180deg,#1975d1 0%,#0b5cbd 52%,#084a9e 100%);box-shadow:inset -1px 0 rgba(255,255,255,.13)}
.brand{min-height:54px;gap:9px;padding:0 7px 12px}.brand-mark{width:34px;height:34px;border-radius:50%;background:#36b9e8;color:#fff;font-size:10px}.brand strong{font-size:14px}.brand span{font-size:8px;color:#bee1f7}
.nav{gap:2px;padding-top:11px}.nav-section-title{margin:10px 8px 4px;color:#8fcef3;font-size:9px}.nav-item{min-height:39px;padding:0 9px;border-radius:7px;color:#d5ecfa;font-size:12px}.nav-item:hover{background:rgba(255,255,255,.09)}.nav-item.active{background:rgba(255,255,255,.22);box-shadow:inset 3px 0 #79d4f4;color:#fff}.nav-item kbd{font-size:10px}.nav-count{min-width:21px;padding:2px 6px;background:#12509d;font-size:10px}.nav-count.warn{background:#d37a32}.sidebar-footer{padding-top:10px}.user-card{gap:8px;padding:5px 4px 9px}.user-card strong{font-size:11px}.user-card div span{font-size:9px;color:#c0dff3}.sidebar-footer .full{min-height:36px}
.topbar{height:52px;padding:0 18px}.search-box{width:min(560px,52vw);height:35px;border-radius:5px;background:#f8fbfd}.top-actions{gap:7px}.top-actions .icon-btn{width:37px;min-height:35px;border-radius:5px}

.deals-surface{min-height:calc(100vh - 52px);margin:-18px -20px;padding:0 18px 66px;background:radial-gradient(circle at 88% 4%,rgba(95,191,233,.22),transparent 34%),linear-gradient(145deg,#f2faff 0%,#e4f3fb 48%,#d8ecf7 100%)}
.deals-surface>.crm-nav{display:none}
.deals-surface .page-head{min-height:65px;justify-content:flex-start;align-items:center;gap:18px;margin:0;padding:7px 0 5px}
.deals-surface .page-head>div:first-child{order:initial;min-width:126px}.deals-surface .page-head h1{margin:0;color:#163b55;font-size:27px;font-weight:650;letter-spacing:-.025em}.deals-surface .page-head p{margin-top:2px;color:#66859a;font-size:11px}
.deals-surface .head-actions{order:initial;display:flex;align-items:center;gap:7px;margin:0}.deals-surface .head-actions .big-action{min-height:38px;padding:0 15px;border-radius:7px;font-size:12px}.deals-surface .create-deal-button{min-width:134px;box-shadow:0 4px 12px rgba(35,164,84,.18)}.deals-surface .create-deal-button i{margin-left:18px}.deals-surface .page-head .secondary{background:rgba(255,255,255,.76)}
.deals-surface .pipeline-bar{min-height:46px;display:flex;align-items:center;gap:8px;margin:0 0 5px;padding:4px 0;border:0;background:transparent;box-shadow:none}.deals-surface .funnel-picker{flex:0 0 285px}.deals-surface .funnel-trigger{width:100%;min-height:38px;padding:0 12px;border-radius:7px;background:rgba(255,255,255,.8);box-shadow:0 1px 4px rgba(23,85,124,.06)}.deals-surface .funnel-trigger span{font-size:9px}.deals-surface .funnel-trigger strong{font-size:13px}.deals-surface .funnel-health{align-self:center;display:flex;gap:6px;margin-left:auto}.deals-surface .funnel-health button{height:36px;min-width:auto;padding:0 10px;border-radius:7px;background:rgba(255,255,255,.65);font-size:9px}.deals-surface .funnel-health b{font-size:12px}.deals-surface .view-switch{height:38px;padding:3px;border-radius:7px;background:rgba(255,255,255,.54)}.deals-surface .view-switch button{min-height:32px;padding:0 12px;border-radius:5px;font-size:11px}.deals-surface .view-switch button.active{box-shadow:0 1px 5px rgba(25,91,133,.12)}
.deals-surface .compact-toolbar{min-height:35px;margin:0 0 6px;padding:0}.deals-surface .compact-toolbar select{min-width:168px;height:34px;border-radius:7px;font-size:11px}.deals-surface .toolbar-note{margin-left:auto;font-size:9px}

.deals-surface .kanban{grid-auto-columns:clamp(286px,20vw,330px);gap:7px;min-height:calc(100vh - 195px);padding:0 0 52px}
.deals-surface .kanban .column{min-height:calc(100vh - 195px);padding:0 5px 12px;border-right:1px dashed rgba(55,122,164,.22)}
.deals-surface .kanban .column-color{height:32px!important;padding:0 14px 0 11px;border-radius:6px 0 0 6px;box-shadow:inset 0 1px rgba(255,255,255,.28)}
.deals-surface .kanban .column-color strong{max-width:250px;font-size:12px;line-height:16px}.deals-surface .kanban .column-color b{height:19px;min-width:19px;padding:1px 6px;font-size:10px}
.deals-surface .kanban .column-head{min-height:65px;padding:8px 5px}.deals-surface .kanban .column-head>span{font-size:23px;letter-spacing:-.02em}.deals-surface .kanban .column-add{min-height:31px;margin:0 4px 7px;border-radius:6px;font-size:11px;font-weight:700}
.deals-surface .kanban .deal-card{margin:0 0 7px;padding:13px;border:1px solid rgba(198,218,230,.78);border-radius:8px;box-shadow:0 2px 7px rgba(18,72,108,.1)}.deals-surface .kanban .deal-card:hover{border-color:#78bde0;box-shadow:0 7px 20px rgba(20,83,123,.16);transform:translateY(-2px)}
.deals-surface .kanban .deal-card-id strong{font-size:14px;line-height:1.35}.deals-surface .kanban .deal-card-id button{width:28px;height:28px;font-size:12px}.deals-surface .kanban .deal-company{margin:5px 0 10px;font-size:12px;line-height:1.35}.deals-surface .kanban .deal-amount{margin-top:8px;font-size:18px}.deals-surface .kanban .deal-task{min-height:33px;margin-top:9px;padding:6px 8px;font-size:11px}.deals-surface .kanban .deal-card-actions{min-height:39px;margin-top:9px;padding-top:8px}.deals-surface .kanban .deal-card-actions button{min-height:31px;font-size:11px}.deals-surface .kanban .deal-card-foot{font-size:11px}.deals-surface .kanban .column-empty{min-height:84px;padding:30px 10px;font-size:10px}
.deals-surface .tunnel-label{margin:0 4px 8px;padding:9px;border-radius:7px;font-size:10px}
.kanban-fixed-nav{left:214px;right:18px;bottom:10px;grid-template-columns:38px minmax(120px,1fr) 38px;gap:7px;padding:5px 8px;border-radius:22px;background:rgba(255,255,255,.78);box-shadow:0 7px 22px rgba(24,83,121,.14)}.kanban-fixed-nav button{width:34px;height:34px;font-size:24px;line-height:27px}.kanban-fixed-nav input::-webkit-slider-runnable-track{height:6px}.kanban-fixed-nav input::-webkit-slider-thumb{width:16px;height:16px}
.deal-drawer,.company-drawer{left:220px}

@media(max-width:1250px){.app-shell{grid-template-columns:172px minmax(0,1fr)}.sidebar{width:172px}.brand span{display:none}.nav-item{font-size:11px}.deals-surface .funnel-health span{display:none}.kanban-fixed-nav{left:190px}.deal-drawer,.company-drawer{left:188px}.deals-surface .kanban{grid-auto-columns:286px}}
@media(max-width:980px){.app-shell{grid-template-columns:66px minmax(0,1fr)}.sidebar{width:66px;padding-left:7px;padding-right:7px}.brand{justify-content:center;padding-left:0;padding-right:0}.brand>div:last-child,.nav-section-title,.nav-item>span,.nav-item>kbd,.nav-item .nav-count,.user-card>div,.sidebar-footer .full{display:none}.nav-item{justify-content:center;padding:0}.nav-item.active{box-shadow:inset 3px 0 #79d4f4}.user-card{justify-content:center}.deals-surface .page-head{flex-wrap:wrap}.deals-surface .pipeline-bar{flex-wrap:wrap}.deals-surface .funnel-health{margin-left:0}.kanban-fixed-nav{left:82px}.deal-drawer,.company-drawer{left:82px}}
@media(max-width:800px){.deals-surface{margin:-18px -20px;padding:0 12px 62px}.deals-surface .page-head{display:flex;min-height:auto;padding:12px 0}.deals-surface .page-head>div:first-child{width:100%}.deals-surface .head-actions{width:100%;overflow-x:auto}.deals-surface .pipeline-bar{display:flex}.deals-surface .funnel-picker{flex:1 0 100%}.deals-surface .funnel-health{order:3;width:auto}.deals-surface .view-switch{width:auto;flex:1}.deals-surface .toolbar-note{display:none}.deals-surface .kanban{grid-auto-columns:84vw}.kanban-fixed-nav{left:10px;right:10px}.deal-drawer,.company-drawer{left:0}}

/* v24: structural CRM shell and two-row deal command area */
.app-shell{grid-template-columns:228px minmax(0,1fr)}
.sidebar{width:228px;padding:10px 12px;background:linear-gradient(155deg,#315fc3 0%,#284caa 48%,#1d3e91 100%);box-shadow:inset -1px 0 rgba(255,255,255,.15)}
.brand{min-height:55px;padding:0 7px 11px}.brand-mark{width:35px;height:35px}.nav{padding-top:9px}.nav-label{margin:10px 8px 4px;color:#9fc5fb;font-size:9px}.nav-item{min-height:40px;padding:0 10px;color:#edf4ff}.nav-item i{width:28px;height:28px;display:grid;place-items:center;border-radius:7px;background:rgba(255,255,255,.07);font-style:normal}.nav-item.active{background:rgba(255,255,255,.26);box-shadow:none}.nav-item.active i{background:rgba(255,255,255,.18)}.nav-count{background:#234693}.sidebar-footer{border-top-color:rgba(255,255,255,.18)}
.topbar{height:55px;padding:0 14px;background:linear-gradient(90deg,#3763c4 0%,#3a55b4 54%,#2d459c 100%);border-bottom-color:rgba(255,255,255,.14);color:#fff;box-shadow:0 2px 10px rgba(26,57,128,.16)}
.product-nav{min-width:0;display:flex;align-items:center;gap:3px;height:100%;overflow:hidden}.product-nav button{height:34px;padding:0 11px;border:0;border-radius:7px;background:transparent;color:#e1e9ff;font-size:12px;white-space:nowrap}.product-nav button:hover,.product-nav button.active{background:rgba(255,255,255,.2);color:#fff}.product-nav i{margin-left:4px;color:#b9c9ef;font-style:normal}
.topbar-search{width:230px;min-width:150px;height:34px;margin-left:auto;border-color:rgba(255,255,255,.25);background:rgba(255,255,255,.14);color:#fff}.topbar-search input{color:#fff}.topbar-search input::placeholder{color:#dbe5ff}.topbar-search kbd{display:none}.topbar .db-status{color:#e4edff}.topbar .icon-btn{border-color:rgba(255,255,255,.24);background:rgba(255,255,255,.12);color:#fff}.topbar .primary{background:#20aee5;box-shadow:none}

.deals-surface{min-height:calc(100vh - 55px);margin:-18px -20px;padding:0 18px 64px;background:radial-gradient(circle at 80% 0,rgba(92,176,236,.19),transparent 36%),linear-gradient(150deg,#eef8ff 0%,#e2f1fb 54%,#d8ebf8 100%)}
.deals-commandbar{min-height:67px;display:flex;align-items:center;gap:9px;padding:9px 0 7px}
.deals-title{display:flex;align-items:center;gap:7px;margin-right:8px}.deals-title h1{margin:0;color:#183b5b;font-size:27px;font-weight:650;letter-spacing:-.035em}.deals-title span{color:#6687a6;font-size:17px}
.deals-commandbar .create-deal-button{height:40px;min-width:136px;padding:0 13px;border:0;border-radius:8px;background:#25b86a;color:#fff;font-size:12px;font-weight:800}.deals-commandbar .create-deal-button i{float:right;margin-left:16px;font-style:normal}
.deals-commandbar .funnel-picker{flex:0 0 245px}.deals-commandbar .funnel-trigger{min-height:40px;border:1px solid rgba(70,122,173,.24);border-radius:8px;background:rgba(255,255,255,.72);box-shadow:none}.deals-commandbar .funnel-trigger span{display:none}.deals-commandbar .funnel-trigger strong{font-size:12px}.deals-commandbar .funnel-trigger strong::before{content:"☷  ";color:#3b7ca4}
.deal-search-trigger{height:40px;width:min(300px,22vw);display:flex;align-items:center;justify-content:space-between;padding:0 12px;border:1px solid rgba(70,122,173,.22);border-radius:8px;background:rgba(255,255,255,.46);color:#6b86a0;font-size:12px}.deal-search-trigger:hover{background:rgba(255,255,255,.78)}.deal-search-trigger i{font-size:19px;font-style:normal}.command-spacer{flex:1}.command-button{height:38px;padding:0 13px;border:1px solid rgba(67,119,168,.22);border-radius:8px;background:rgba(255,255,255,.6);color:#316681;font-size:11px;font-weight:750}
.deals-viewbar{min-height:43px;display:flex;align-items:center;gap:8px;padding:3px 0 6px}.deals-viewbar .view-switch{height:35px;padding:2px;border-radius:7px;background:rgba(77,118,179,.13)}.deals-viewbar .view-switch button{min-height:31px;padding:0 13px;border-radius:6px;color:#50728b;font-size:11px}.deals-viewbar .view-switch button.active{background:rgba(255,255,255,.88);color:#2477a7;box-shadow:0 1px 4px rgba(25,77,118,.1)}
.stage-quick-filter{height:35px;min-width:155px;padding:0 28px 0 10px;border:1px solid rgba(67,119,168,.2);border-radius:7px;background:rgba(255,255,255,.5);color:#466c84;font-size:11px}.deals-viewbar .funnel-health{display:flex;gap:5px;margin-left:0}.deals-viewbar .funnel-health button{height:33px;display:flex;align-items:center;gap:5px;padding:0 9px;border:1px solid rgba(67,119,168,.17);border-radius:7px;background:rgba(255,255,255,.5);color:#5e7a8d;font-size:9px}.deals-viewbar .funnel-health b{font-size:11px}.deals-viewbar .funnel-health button:first-child b{color:#d54e4e}
.deals-surface .kanban{grid-auto-columns:clamp(300px,20vw,338px);min-height:calc(100vh - 165px)}.deals-surface .kanban .column{min-height:calc(100vh - 165px)}.deals-surface .kanban .column-color{height:33px!important}.deals-surface .kanban .column-head{min-height:57px}.deals-surface .kanban .column-head>span{font-size:22px}
.kanban-fixed-nav{left:246px}.deal-drawer,.company-drawer{left:252px}

@media(max-width:1400px){.product-nav button:nth-child(5),.product-nav button:nth-child(6){display:none}.deals-commandbar .funnel-picker{flex-basis:220px}.deal-search-trigger{width:210px}.deals-viewbar .funnel-health span{display:none}}
@media(max-width:1120px){.app-shell{grid-template-columns:76px minmax(0,1fr)}.sidebar{width:76px;padding-left:9px;padding-right:9px}.brand{justify-content:center}.brand>div:last-child,.nav-label,.nav-item>span,.nav-item>kbd,.nav-item .nav-count,.user-card>div,.sidebar-footer .full{display:none}.nav-item{justify-content:center}.nav-item i{width:32px;height:32px}.user-card{justify-content:center}.product-nav button:nth-child(n+4){display:none}.deals-commandbar{flex-wrap:wrap}.command-spacer{display:none}.deal-search-trigger{flex:1}.kanban-fixed-nav{left:94px}.deal-drawer,.company-drawer{left:92px}}
@media(max-width:800px){.topbar{padding:0 8px}.product-nav{display:none}.topbar-search{display:flex;width:auto;flex:1}.deals-commandbar{gap:7px}.deals-title{width:100%}.deals-commandbar .funnel-picker{flex:1 0 180px}.deal-search-trigger{display:none}.command-button{display:none}.deals-viewbar{overflow-x:auto}.stage-quick-filter{min-width:145px}.deals-viewbar .funnel-health{display:none}.deals-surface .kanban{grid-auto-columns:86vw}.kanban-fixed-nav{left:10px}.deal-drawer,.company-drawer{left:0}}

/* v25: rebuilt left navigation, following the Bitrix information hierarchy */
.app-shell{grid-template-columns:238px minmax(0,1fr)}
.sidebar{width:238px;padding:0 12px 12px;background:radial-gradient(circle at 10% 32%,rgba(101,91,220,.38),transparent 38%),linear-gradient(180deg,#354db0 0%,#283b96 58%,#22347f 100%);box-shadow:inset -1px 0 rgba(255,255,255,.14)}
.sidebar-brand{min-height:61px;display:flex;align-items:center;gap:12px;padding:0 8px;border-bottom:1px solid rgba(255,255,255,.13)}
.sidebar-burger{width:24px;height:32px;padding:0;border:0;background:transparent;color:#c8d3ff;font-size:20px;line-height:1}.sidebar-burger:hover{color:#fff}
.sidebar-brand strong{font-size:17px;font-weight:650;letter-spacing:-.02em}.sidebar-brand span{margin-top:1px;color:#b8c9f4;font-size:8px}
.sidebar .nav{display:flex;flex-direction:column;gap:2px;padding-top:12px}
.sidebar .nav-item{width:100%;min-height:40px;display:grid;grid-template-columns:27px minmax(0,1fr) auto;align-items:center;gap:8px;padding:0 9px;border:0;border-radius:8px;background:transparent;color:#f0f3ff;font-size:13px;font-weight:500;text-align:left;box-shadow:none}
.sidebar .nav-item i{width:22px;height:22px;display:grid;place-items:center;border-radius:0;background:transparent;color:#d5ddff;font-size:17px;font-style:normal}
.sidebar .nav-item:hover{background:rgba(255,255,255,.09)}
.sidebar .nav-item.active{background:rgba(255,255,255,.16);color:#fff;box-shadow:none}
.sidebar .nav-item.active i{background:transparent;color:#fff}
.sidebar .crm-hub{min-height:41px;margin-bottom:4px;background:rgba(255,255,255,.27);font-size:14px;font-weight:650}.sidebar .crm-hub:hover,.sidebar .crm-hub.active{background:rgba(255,255,255,.34)}.sidebar .crm-hub i{font-size:20px}
.sidebar .nav-count{min-width:21px;height:20px;display:grid;place-items:center;padding:0 6px;border-radius:11px;background:rgba(25,45,125,.72);color:#fff;font-size:10px;font-weight:750}.sidebar .nav-count.warn{background:#ef8b32}.sidebar .nav-count.chat{background:#238dce}
.sidebar .sidebar-more{margin-top:3px;color:#d1d9f5}.sidebar .sidebar-more i{font-size:18px}
.sidebar-footer{margin-top:auto;padding-top:9px;border-top:1px solid rgba(255,255,255,.16)}.sidebar-footer .user-card{min-height:47px;padding:4px 4px 8px}.sidebar-footer .avatar{width:34px;height:34px;flex-basis:34px;background:#efd477}.sidebar-footer .user-card strong{font-size:11px}.sidebar-footer .user-card span{color:#c6d2f0}.sidebar .sidebar-settings{min-height:39px;border:1px solid rgba(255,255,255,.13);color:#dbe3fa}.sidebar .sidebar-settings:hover{background:rgba(255,255,255,.09)}
.kanban-fixed-nav{left:256px}.deal-drawer,.company-drawer{left:262px}

@media(max-width:1120px){.app-shell{grid-template-columns:76px minmax(0,1fr)}.sidebar{width:76px}.sidebar-brand{justify-content:center}.sidebar-brand>div{display:none}.sidebar-burger{display:block}.sidebar .nav-item{display:flex;justify-content:center;padding:0}.sidebar .nav-item>span,.sidebar .nav-count,.sidebar-footer .user-card>div,.sidebar .sidebar-settings span{display:none}.sidebar .crm-hub{margin-bottom:4px}.sidebar-footer .user-card{justify-content:center}.kanban-fixed-nav{left:94px}.deal-drawer,.company-drawer{left:92px}}
@media(max-width:800px){.app-shell{grid-template-columns:1fr}.sidebar{width:238px}.sidebar-brand{justify-content:flex-start}.sidebar-brand>div{display:block}.sidebar .nav-item{display:grid;justify-content:initial}.sidebar .nav-item>span,.sidebar .nav-count,.sidebar-footer .user-card>div,.sidebar .sidebar-settings span{display:block}}

/* v26: proper line icons and a single active CRM module */
.sidebar{background:radial-gradient(circle at 18% 35%,rgba(112,91,224,.46),transparent 42%),linear-gradient(160deg,#3d48ad 0%,#2e3995 55%,#242f7e 100%)}
.sidebar-burger svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round}
.sidebar .nav-item i svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.sidebar .nav-item.active:not(.crm-hub){background:transparent;color:#eef2ff}
.sidebar .nav-item.active:not(.crm-hub):hover{background:rgba(255,255,255,.09)}
.sidebar .crm-hub{background:linear-gradient(90deg,rgba(255,255,255,.3),rgba(255,255,255,.2));box-shadow:inset 0 1px rgba(255,255,255,.12)}
.sidebar .nav-item:nth-child(5){margin-top:5px}
.sidebar .nav-item:nth-child(7){margin-top:5px}
.sidebar .sidebar-more{margin-top:5px}
.sidebar-footer .sidebar-settings i svg{width:19px;height:19px}

/* v27: deliberately larger typography and deal cards */
html,body{font-size:15px}
.sidebar .nav-item{min-height:44px;grid-template-columns:30px minmax(0,1fr) auto;gap:9px;padding:0 11px;font-size:15px}
.sidebar .nav-item i svg{width:22px;height:22px}.sidebar .crm-hub{min-height:45px;font-size:16px}.sidebar .nav-count{min-width:23px;height:22px;font-size:11px}.sidebar-brand strong{font-size:18px}.sidebar-brand span{font-size:9px}
.product-nav button{height:38px;padding:0 14px;font-size:14px}.topbar-search{height:38px;font-size:14px}.topbar .primary{min-height:38px;font-size:14px}
.deals-title h1{font-size:31px}.deals-commandbar{min-height:75px;gap:11px}.deals-commandbar .create-deal-button{height:44px;min-width:148px;font-size:14px}.deals-commandbar .funnel-picker{flex-basis:275px}.deals-commandbar .funnel-trigger{min-height:44px}.deals-commandbar .funnel-trigger strong{font-size:14px}.deal-search-trigger{height:44px;font-size:14px}.command-button{height:42px;font-size:13px}
.deals-viewbar{min-height:48px}.deals-viewbar .view-switch{height:40px}.deals-viewbar .view-switch button{min-height:36px;padding:0 16px;font-size:13px}.stage-quick-filter{height:40px;min-width:175px;font-size:13px}.deals-viewbar .funnel-health button{height:38px;font-size:11px}.deals-viewbar .funnel-health b{font-size:13px}
.deals-surface .kanban{grid-auto-columns:360px;gap:11px;min-height:calc(100vh - 178px)}
.deals-surface .kanban .column{min-height:calc(100vh - 178px);padding:0 7px 14px}
.deals-surface .kanban .column-color{height:38px!important;padding:0 16px 0 13px}.deals-surface .kanban .column-color strong{max-width:290px;font-size:14px;line-height:18px}.deals-surface .kanban .column-color b{height:22px;min-width:22px;font-size:12px}
.deals-surface .kanban .column-head{min-height:66px}.deals-surface .kanban .column-head>span{font-size:27px}.deals-surface .kanban .column-add{min-height:38px;margin:0 5px 9px;font-size:13px}
.deals-surface .kanban .deal-card{margin-bottom:10px;padding:16px;border-radius:10px}
.deals-surface .kanban .deal-card-id strong{font-size:16px;line-height:1.4}.deals-surface .kanban .deal-card-id button{width:32px;height:32px;font-size:14px}.deals-surface .kanban .deal-company{margin:7px 0 12px;font-size:14px}.deals-surface .kanban .deal-amount{margin-top:10px;font-size:22px}.deals-surface .kanban .deal-task{min-height:39px;margin-top:11px;padding:8px 10px;font-size:13px}.deals-surface .kanban .deal-card-actions{min-height:45px;margin-top:11px;padding-top:10px}.deals-surface .kanban .deal-card-actions button{min-height:36px;padding:0 12px;font-size:13px}.deals-surface .kanban .avatar-small{width:34px;height:34px;font-size:11px}.deals-surface .kanban .procurement-shadow{font-size:12px}.deals-surface .kanban .calc-progress{font-size:12px}
.page-head h1{font-size:31px}.page-head p{font-size:14px}.role-shortcuts>button{min-height:86px;padding:15px 18px}.role-shortcuts strong{font-size:17px}.role-shortcuts small{font-size:13px}.role-shortcuts b{font-size:15px}
.kpi{padding:21px 22px}.kpi-top{font-size:13px}.kpi strong{font-size:29px}.delta{font-size:13px}.panel-head{min-height:66px;padding:15px 19px}.panel-head h2{font-size:20px}.panel-head p{font-size:13px}.table-wrap th{font-size:11px}.table-wrap td{font-size:13px}.deal-cell strong{font-size:14px}.deal-cell span{font-size:11px}

@media(max-width:1400px){.deals-surface .kanban{grid-auto-columns:338px}.deals-commandbar .funnel-picker{flex-basis:245px}}
@media(max-width:800px){.sidebar .nav-item{min-height:42px;font-size:14px}.deals-surface .kanban{grid-auto-columns:88vw}.deals-surface .kanban .deal-card{padding:14px}}

/* v28: one visual system for kanban, deal, company and internal workspaces */
:root{--ui-radius:8px;--ui-control:40px;--ui-text:14px;--ui-small:12px;--ui-title:16px;--ui-line:#d7e2e9;--ui-blue:#168bc2;--ui-soft:#f4f8fa}
.deal-drawer,.company-drawer,.modal{color:#2d4350;font-size:var(--ui-text)}
.deal-drawer,.company-drawer{background:#eef3f6}
.drawer-head,.company-drawer-head{min-height:72px;padding:10px 18px;gap:12px;background:#f4f7f9}
.drawer-head h2,.company-drawer-head h2{margin:0 0 3px;font-size:23px;font-weight:650;line-height:1.25}.deal-heading,.company-drawer-head>div>span{font-size:var(--ui-small)}
.drawer-close{width:36px;height:36px;border-radius:50%;background:#e7f1f6;color:#27799e;font-size:22px}
.drawer-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.drawer-actions button,.drawer-actions a,.header-icon-action,.header-menu-action,.business-process-btn,.convert-btn{min-height:var(--ui-control);height:var(--ui-control);display:inline-flex;align-items:center;justify-content:center;padding:0 13px;border:1px solid var(--ui-line);border-radius:var(--ui-radius);background:#fff;color:#35677f;font-size:13px;font-weight:700;text-decoration:none;box-shadow:none}
.drawer-actions .header-icon-action{width:40px;padding:0;font-size:17px}.drawer-actions button:hover,.drawer-actions a:hover{border-color:#74b8d8;background:#f5fbfe;color:#167ead}
.deal-primary-tabs,.company-primary-tabs{min-height:49px;height:49px;padding:0 16px;border-bottom:1px solid var(--ui-line);background:#f4f7f9}.deal-primary-tabs button,.company-primary-tabs button{min-height:49px;padding:0 15px;border:0;border-bottom:3px solid transparent;background:transparent;color:#4a606d;font-size:13px;font-weight:550}.deal-primary-tabs button.active,.company-primary-tabs button.active{border-bottom-color:#23a9dc;color:#147da9;font-weight:750}
.deal-stage-rail{min-height:49px;padding:7px 16px;gap:4px;background:#fff}.deal-stage-rail button{min-height:34px;padding:0 10px;border-radius:5px;font-size:12px;font-weight:650}
.deal-actionbar{display:grid;grid-template-columns:repeat(auto-fit,minmax(165px,1fr));gap:8px;padding:10px 16px;border-bottom:1px solid var(--ui-line);background:#eef3f6}.deal-actionbar>button{min-height:52px;height:52px;grid-template-columns:30px minmax(0,1fr);gap:8px;padding:6px 10px;border:1px solid var(--ui-line);border-radius:var(--ui-radius);background:#fff}.deal-actionbar>button>i{width:30px;height:30px;border-radius:6px;font-size:14px}.deal-actionbar>button strong{font-size:13px}.deal-actionbar>button small{margin-top:2px;font-size:11px}
.drawer-body{grid-template-columns:minmax(470px,.9fr) minmax(520px,1.1fr)}.drawer-main,.timeline-pane{padding:16px}.timeline-pane,.company-timeline{background:#eef3f6}
.drawer-workspace,.deal-info-card,.company-info-card,.role-card,.timeline-card,.composer,.next-activity{border:1px solid var(--ui-line);border-radius:var(--ui-radius);background:#fff;box-shadow:none}
.drawer-workspace{min-height:350px;padding:16px}.drawer-section-head{min-height:34px;margin-bottom:14px}.drawer-section-head h3,.timeline-title h3,.deal-info-card>header h3,.company-info-card>header h3{margin:0;font-size:var(--ui-title);font-weight:700;text-transform:none}.drawer-section-head span,.timeline-title span{font-size:var(--ui-small)}
.deal-info-card>header,.company-info-card>header{min-height:48px;margin:0 16px;border-bottom:1px solid #e5ecef}.deal-info-card>header button,.company-info-card>header button{font-size:var(--ui-small)}
.deal-info-fields,.company-fields{padding:12px 16px}.deal-info-fields>div,.company-fields>div{gap:4px;padding:8px 0}.deal-info-fields span,.company-fields span,.company-note>span,.company-contact-section>span{font-size:var(--ui-small)}.deal-info-fields strong,.deal-info-fields a,.company-fields strong,.company-fields a{font-size:var(--ui-text);line-height:1.4}
.deal-main-amount strong{font-size:32px!important}.deal-payment-box{margin:8px 0;padding:13px;border:1px solid #dce8ee;border-radius:var(--ui-radius);background:#f8fbfd}.deal-payment-box p{font-size:13px}.deal-payment-box footer{font-size:13px}
.drawer-items{gap:8px}.drawer-items>div{padding:12px;border:1px solid var(--ui-line);border-radius:var(--ui-radius)}.drawer-items strong,.drawer-items b{font-size:13px}.drawer-items span,.drawer-items small{font-size:var(--ui-small)}
.drawer-totals{gap:8px;margin-top:12px}.drawer-totals>div{min-height:67px;padding:11px;border-radius:var(--ui-radius)}.drawer-totals span{font-size:11px}.drawer-totals strong{font-size:15px}
.activity-tabs{min-height:47px;height:47px;padding:0 8px;border:1px solid var(--ui-line);border-bottom:0;border-radius:var(--ui-radius) var(--ui-radius) 0 0}.activity-tabs button{min-height:46px;padding:0 13px;font-size:13px}.composer{margin-bottom:16px;border-radius:0 0 var(--ui-radius) var(--ui-radius)}.composer textarea{min-height:88px;padding:13px;font-size:var(--ui-text)}.composer>div:last-child{min-height:48px;padding:8px 11px}.composer>div:last-child span{font-size:var(--ui-small)}.composer .primary{min-height:36px}
.timeline-entry{grid-template-columns:34px 1fr;gap:10px}.timeline-icon{width:32px;height:32px;font-size:12px}.timeline-card{padding:13px}.timeline-meta,.timeline-meta strong{font-size:var(--ui-small)}.timeline-entry p,.timeline-entry.message p{margin:7px 0 0;padding:0;background:transparent;font-size:13px;line-height:1.5}.timeline-card-actions button{min-height:32px;padding:0 11px;font-size:11px}
.next-activity{min-height:76px;padding:13px}.next-activity span,.next-activity small{font-size:var(--ui-small)}.next-activity strong{font-size:14px}
.field,.field-static{gap:5px;font-size:var(--ui-small)}.field input,.field select,.field textarea,.proc-row input,.proc-row select,.proc-row textarea{min-height:var(--ui-control);padding:9px 11px;border:1px solid var(--ui-line);border-radius:var(--ui-radius);background:#fff;color:#2d4350;font-size:var(--ui-text)}.field textarea{min-height:88px}.field input:focus,.field select:focus,.field textarea:focus,.proc-row input:focus,.proc-row textarea:focus{border-color:#61b2d8;box-shadow:0 0 0 3px rgba(38,157,207,.12)}
.deal-editor-section{padding:0 16px 16px;border:1px solid var(--ui-line);border-radius:var(--ui-radius)}.deal-editor-section>header{min-height:50px}.deal-editor-section>header strong{font-size:14px}.deal-editor-section>header span,.products-editor>p{font-size:var(--ui-small)}.auto-name{padding:12px;border-radius:var(--ui-radius)}.auto-name span{font-size:11px}.auto-name strong{font-size:16px}
.request-table-head{min-height:38px;font-size:11px}.deal-item-editor{min-height:62px;padding:9px}.deal-item-editor .field{font-size:11px}.deal-item-editor .field input,.deal-item-editor .field textarea{min-height:42px!important;height:42px;font-size:13px}.add-product-button{min-height:42px;border-radius:var(--ui-radius);font-size:13px}
.product-compare,.calc-compare-table{border-color:var(--ui-line);border-radius:var(--ui-radius)}.product-compare-head,.calc-compare-table header{min-height:40px;font-size:11px}.product-compare article>span,.product-compare article>div{padding:13px}.request-side label,.offer-side label{font-size:11px}.request-side strong,.offer-side strong{font-size:14px}.request-side p,.offer-side p{font-size:12px}.offer-cost strong{font-size:16px}
.calc-workflow{gap:14px}.calc-workflow-head{min-height:52px;padding-bottom:13px}.calc-workflow-head h3{font-size:18px}.role-card{padding:15px}.role-card-head strong{font-size:14px}.role-card-head button{min-height:var(--ui-control);font-size:12px}.role-icon{width:34px;height:34px;font-size:11px}.calc-compare-table>div{min-height:60px}.calc-compare-table strong{font-size:13px}.calc-compare-table small{font-size:11px}.supplier-invoice>div{padding:12px}.supplier-invoice span{font-size:11px}.supplier-invoice strong{font-size:14px}
.procurement-form-head{min-height:58px;padding:13px 15px;border-radius:var(--ui-radius)}.procurement-form-head strong{font-size:15px}.procurement-form-head span{font-size:var(--ui-small)}.proc-row{border-radius:var(--ui-radius)}.proc-request,.proc-offer{padding:14px}.proc-request>span,.proc-request b,.proc-offer label,.vat-choice>span{font-size:11px}.proc-request strong{font-size:14px}.proc-request p{font-size:12px}.proc-vat-result{min-height:48px}.proc-vat-result span{font-size:12px}
.company-contact-section,.company-note{border-radius:var(--ui-radius)}.company-contact-section>button:not(.field-link){min-height:48px;padding:9px;border-radius:6px}.company-contact-section button span strong{font-size:13px}.company-contact-section button span small{font-size:11px}.company-contact-list article{padding:12px;border-radius:var(--ui-radius)}.company-contact-list strong{font-size:14px}.company-contact-list small,.company-contact-list a{font-size:12px}
.modal-head{min-height:61px;padding:12px 16px}.modal-head h2{font-size:21px}.modal-body{padding:16px}.modal-foot{min-height:61px;padding:10px 16px}.modal-foot button,.modal .primary,.modal .secondary,.modal .ghost{min-height:var(--ui-control);border-radius:var(--ui-radius);font-size:13px}

@media(max-width:1200px){.drawer-body{grid-template-columns:minmax(430px,1fr) minmax(420px,1fr)}.deal-actionbar{grid-template-columns:repeat(3,minmax(150px,1fr))}}
@media(max-width:980px){.drawer-body,.company-drawer-body{grid-template-columns:1fr}.timeline-pane,.company-timeline{border-left:0;border-top:1px solid var(--ui-line)}.deal-actionbar{grid-template-columns:repeat(2,minmax(145px,1fr))}}
@media(max-width:700px){.drawer-head,.company-drawer-head{padding:9px 10px}.drawer-head h2,.company-drawer-head h2{font-size:19px}.deal-primary-tabs,.company-primary-tabs{padding:0 5px}.deal-primary-tabs button,.company-primary-tabs button{padding:0 11px;font-size:12px}.deal-stage-rail{padding:6px 8px}.deal-actionbar{padding:8px;grid-template-columns:1fr 1fr}.deal-actionbar>button{min-height:48px;height:auto}.drawer-main,.timeline-pane,.company-drawer-body>main,.company-timeline{padding:10px}.drawer-workspace{padding:12px}.drawer-totals{grid-template-columns:1fr 1fr}}

/* Document attachments */


.message-attachments{display:grid;gap:6px;margin:7px 0 4px}.message-attachments a{min-width:245px;max-width:430px;display:grid;grid-template-columns:39px minmax(0,1fr);align-items:center;gap:9px;padding:7px;border:1px solid rgba(59,123,153,.18);border-radius:8px;background:rgba(255,255,255,.58);color:#2b647f;text-decoration:none}.message-attachments a:hover{border-color:#62b3d6;background:#fff}.message-attachments i{width:37px;height:37px;display:grid;place-items:center;border-radius:7px;background:#2699cc;color:#fff;font-size:9px;font-style:normal;font-weight:850}.message-attachments a>span{min-width:0}.message-attachments b,.message-attachments small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.message-attachments b{color:#2d4553;font-size:12px}.message-attachments small{margin-top:3px;color:#6f8b99;font-size:10px}
@media(max-width:620px){.message-attachments a{min-width:190px;max-width:100%}}

/* v31: employees, personal tasks and customer documents */
.employee-login{position:fixed;z-index:250;inset:0;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 25% 15%,rgba(80,194,239,.28),transparent 34%),linear-gradient(145deg,#073f91,#1687d2)}
.employee-login form{width:min(430px,100%);display:grid;gap:18px;padding:34px;border:1px solid rgba(255,255,255,.5);border-radius:16px;background:#fff;box-shadow:0 26px 70px rgba(4,38,82,.34)}
.employee-login-brand{display:flex;align-items:center;gap:14px;margin-bottom:4px}.employee-login-brand>span{width:54px;height:54px;display:grid;place-items:center;border-radius:50%;background:linear-gradient(145deg,#1aaee6,#1371c5);color:#fff;font-size:15px;font-weight:850}.employee-login-brand strong,.employee-login-brand small{display:block}.employee-login-brand strong{color:#183a52;font-size:25px;line-height:1.2}.employee-login-brand small{margin-top:5px;color:#748995;font-size:13px}.employee-login .field{font-size:13px}.employee-login .field input{height:46px;font-size:15px}.employee-login .primary{height:46px;font-size:15px}

.employee-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(330px,1fr));gap:16px}.employee-card{overflow:hidden;border:1px solid #d5e2e9;border-radius:10px;background:#fff;box-shadow:0 3px 10px rgba(25,68,92,.06)}.employee-card.inactive{opacity:.67}.employee-card header{min-height:82px;display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:12px;padding:16px 18px;border-bottom:1px solid #e2eaee;background:#f8fbfd}.employee-avatar{width:48px;height:48px;display:grid;place-items:center;border-radius:50%;background:linear-gradient(145deg,#41bde9,#167cc6);color:#fff;font-size:14px;font-weight:850}.employee-card header strong,.employee-card header small{display:block}.employee-card header strong{font-size:17px;color:#203f53}.employee-card header small{margin-top:4px;color:#718692;font-size:13px}.employee-card dl{display:grid;grid-template-columns:100px minmax(0,1fr);margin:0;padding:12px 18px}.employee-card dt,.employee-card dd{min-height:39px;display:flex;align-items:center;margin:0;border-bottom:1px solid #edf2f4;font-size:13px}.employee-card dt{color:#79909e}.employee-card dd{gap:9px;color:#263f4e;font-weight:650}.employee-card dd button{margin-left:auto;border:0;background:transparent;color:#1785b8;font-size:12px}.employee-card footer{display:flex;gap:8px;padding:13px 18px}.employee-card footer button{flex:1}.employee-form{display:grid;gap:18px}.employee-form fieldset{margin:0;padding:15px;border:1px solid #d5e2e9;border-radius:9px}.employee-form fieldset:disabled{opacity:.72}.employee-form legend{padding:0 7px;color:#315c72;font-size:13px;font-weight:750}.permission-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.permission-grid label{min-height:42px;display:flex;align-items:center;gap:9px;padding:9px 11px;border:1px solid #dce7ed;border-radius:7px;background:#f8fbfd;color:#334f5f;font-size:13px}.permission-grid input{width:17px;height:17px;accent-color:#1997cd}.pipeline-permissions{grid-template-columns:repeat(2,minmax(0,1fr))}.form-hint{margin:0;padding:11px 13px;border-radius:7px;background:#f1f7fa;color:#6e8592;font-size:12px;line-height:1.45}

.task-controlbar{min-height:76px;display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:14px;padding:12px 14px;border:1px solid #d4e2ea;border-radius:9px;background:#fff}.task-responsible-filter,.task-own-label{min-width:250px;display:grid;gap:4px}.task-responsible-filter>span,.task-own-label>span{color:#748c99;font-size:11px}.task-responsible-filter select{height:40px;padding:0 35px 0 11px;border:1px solid #cfdee6;border-radius:7px;background:#f9fbfc;color:#2d4858;font:650 13px inherit}.task-own-label strong{font-size:14px}.task-own-label small{color:#7e929d;font-size:11px}.task-view-tabs{display:flex;align-items:center;gap:5px;overflow-x:auto;padding:3px;border-radius:8px;background:#edf4f8}.task-view-tabs button{height:38px;flex:0 0 auto;padding:0 14px;border:0;border-radius:6px;background:transparent;color:#486779;font-size:13px;font-weight:650}.task-view-tabs button b{min-width:20px;display:inline-grid;place-items:center;margin-left:5px;padding:2px 5px;border-radius:10px;background:#d9e7ef;font-size:10px}.task-view-tabs button.active{background:#fff;color:#1381b4;box-shadow:0 2px 7px rgba(24,82,114,.12)}.task-workspace .task-item{min-height:70px}.task-workspace .task-main strong{font-size:14px}.task-workspace .task-main span{font-size:12px}.task-workspace .task-open{min-width:82px;height:36px;font-size:12px}
.task-calendar{overflow:hidden;border:1px solid #d4e1e8;border-radius:10px;background:#fff}.task-calendar>header{height:60px;display:flex;align-items:center;justify-content:center;gap:22px;border-bottom:1px solid #dce6eb}.task-calendar>header strong{min-width:180px;color:#263f4e;font-size:18px;text-align:center}.task-calendar>header button{width:38px;height:38px;border:1px solid #cfdee6;border-radius:50%;background:#f7fbfd;color:#1c89bb;font-size:24px}.calendar-weekdays,.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(120px,1fr))}.calendar-weekdays{background:#f4f8fa}.calendar-weekdays span{padding:9px;border-right:1px solid #e1e9ed;color:#6e8592;font-size:11px;font-weight:750;text-align:center}.calendar-grid{min-width:840px}.calendar-day{min-height:132px;padding:8px;border-top:1px solid #e2e9ed;border-right:1px solid #e2e9ed;background:#fff}.calendar-day>b{width:27px;height:27px;display:grid;place-items:center;margin-bottom:5px;border-radius:50%;color:#435f6f;font-size:12px}.calendar-day.today-cell{background:#f1faff}.calendar-day.today-cell>b{background:#179bd0;color:#fff}.calendar-day.muted-day{background:#f8fafb}.calendar-task{width:100%;display:block;overflow:hidden;margin:4px 0;padding:6px 7px;border:0;border-left:3px solid #35a3d4;border-radius:4px;background:#eaf6fc;color:#315267;font-size:10px;line-height:1.3;text-align:left;text-overflow:ellipsis;white-space:nowrap}.calendar-task span{margin-right:5px;color:#1e8dbc;font-weight:750}.calendar-task.priority{border-left-color:#df5757;background:#fff0f0}

.commercial-paper,.invoice-paper{width:min(100%,1080px);margin:0 auto;padding:34px 38px;background:#fff;color:#111;font-family:Arial,"Helvetica Neue",sans-serif;font-size:13px;line-height:1.42}.commercial-paper>header{display:grid;gap:2px}.commercial-paper>header strong{font-size:16px}.paper-line{height:2px;margin:17px 0 22px;background:#111}.commercial-paper h2,.invoice-paper h2{margin:0 0 18px;font-size:18px;text-align:center}.commercial-paper h3{margin:0 0 18px;font-size:16px;text-align:center}.commercial-paper>p{margin:0 0 11px}.commercial-table{overflow-x:auto}.commercial-table table,.invoice-items,.bank-table{width:100%;border-collapse:collapse}.commercial-table th,.commercial-table td,.invoice-items th,.invoice-items td,.bank-table td{padding:6px;border:1px solid #111;color:#111;font-size:10px;line-height:1.25;vertical-align:middle}.commercial-table th,.invoice-items th{text-align:center}.commercial-table td:nth-child(1),.commercial-table td:nth-child(4),.commercial-table td:nth-child(5),.commercial-table td:nth-child(n+6){text-align:center}.commercial-table small{font-size:9px}.paper-totals{width:min(440px,100%);display:grid;gap:4px;margin:12px 0 18px auto;text-align:right}.commercial-paper ol{margin:0;padding-left:21px}.commercial-paper li{margin-bottom:6px}.commercial-paper footer,.invoice-sign{position:relative;min-height:120px;display:grid;grid-template-columns:1fr auto;align-items:start;gap:20px;margin-top:24px;padding-top:13px;border-top:1px solid #222}.commercial-paper footer div{display:grid;gap:8px}.commercial-paper footer strong,.invoice-sign strong{padding-top:2px}.commercial-paper footer img,.invoice-sign img{position:absolute;right:42px;bottom:-42px;width:190px;height:auto;pointer-events:none}.invoice-paper{font-size:12px}.bank-table{margin-bottom:22px}.bank-table td{height:42px;font-size:11px}.bank-table small{display:block;margin-top:3px;color:#555;font-size:9px}.invoice-paper h2{padding-bottom:8px;border-bottom:2px solid #111;text-align:left}.invoice-parties p{margin:9px 0}.invoice-items{margin:18px 0 12px}.invoice-items td:nth-child(1),.invoice-items td:nth-child(n+3){text-align:center}.invoice-items td:nth-child(2){font-size:11px}.invoice-totals{display:grid;justify-content:end;gap:5px;text-align:right}.invoice-totals span{font-size:12px}.invoice-totals span:last-child{font-size:14px}.invoice-purpose{margin-top:22px;padding-top:10px;border-top:1px solid #222}.invoice-sign{grid-template-columns:1fr auto;margin-top:22px}

@media(max-width:900px){.employee-grid{grid-template-columns:1fr}.task-controlbar{align-items:stretch;flex-direction:column}.task-responsible-filter,.task-own-label{min-width:0}.calendar-grid,.calendar-weekdays{grid-template-columns:repeat(7,minmax(105px,1fr))}.task-calendar{overflow-x:auto}.commercial-paper,.invoice-paper{padding:24px 18px}.permission-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.employee-login{padding:10px}.employee-login form{padding:24px 20px}.employee-card header{grid-template-columns:44px minmax(0,1fr)}.employee-card header .tag{grid-column:2}.employee-card dl{grid-template-columns:82px 1fr;padding:10px 13px}.permission-grid,.pipeline-permissions{grid-template-columns:1fr}.task-view-tabs{width:100%}.task-workspace .task-item{grid-template-columns:32px minmax(0,1fr) auto}.task-workspace .task-open{display:none}.commercial-paper,.invoice-paper{padding:18px 10px}.commercial-table th,.commercial-table td{font-size:8px;padding:4px}.commercial-paper footer img,.invoice-sign img{right:0;width:150px}}

@media print{
  @page{size:A4 portrait;margin:10mm}
  body *{visibility:hidden!important}
  #quote,#quote *{visibility:visible!important}
  #quote{position:absolute!important;inset:0 auto auto 0!important;width:190mm!important;max-width:none!important;margin:0!important;padding:0!important;background:#fff!important;box-shadow:none!important}
  .modal-root{position:static!important;display:block!important;padding:0!important;background:#fff!important}
  .modal{position:static!important;width:auto!important;max-width:none!important;max-height:none!important;overflow:visible!important;border:0!important;box-shadow:none!important}
  .modal-head,.modal-foot{display:none!important}
  .modal-body{display:block!important;overflow:visible!important;padding:0!important}
  .commercial-table{overflow:visible!important}
}

/* 2026-09-12: единая компактная геометрия интерфейса и верхняя панель */
html,body,button,input,select,textarea{font-family:"Open Sans","Segoe UI",Arial,sans-serif}
body{font-size:14px}
button,input,select,textarea{font-size:14px}
.topbar{height:54px;padding:0 16px;gap:14px}
.product-nav{flex:0 0 auto;gap:4px}
.product-nav>button,.product-nav>details>summary{height:36px;padding:0 13px;font-size:13px;border-radius:6px}
.global-search-shell{position:relative;width:min(520px,42vw);margin-left:auto}
.global-search-shell .topbar-search{width:100%;height:36px;margin:0;box-sizing:border-box}
.global-search-popover{position:absolute;z-index:120;top:43px;right:0;width:min(520px,88vw);overflow:hidden;border:1px solid #d6e1e8;border-radius:10px;background:#fff;box-shadow:0 16px 42px rgba(14,44,68,.24)}
.global-search-popover[hidden]{display:none}
.global-search-popover header{display:flex;justify-content:space-between;padding:14px 16px 10px;border-bottom:1px solid #e5ecef;color:#607783;font-size:12px}
.global-search-popover>button{width:100%;display:grid;grid-template-columns:82px minmax(0,1fr);gap:2px 10px;padding:10px 15px;border:0;border-bottom:1px solid #edf2f4;background:#fff;text-align:left}
.global-search-popover>button:hover{background:#f0f8fc}
.global-search-popover .search-type{grid-row:1/3;align-self:center;justify-self:start;padding:4px 7px;border-radius:12px;background:#e8f4fa;color:#227da8;font-size:10px}
.global-search-popover strong{overflow:hidden;color:#203d4e;font-size:13px;text-overflow:ellipsis;white-space:nowrap}
.global-search-popover small{overflow:hidden;color:#7b909c;font-size:11px;text-overflow:ellipsis;white-space:nowrap}
.search-empty{padding:24px 18px;color:#758a96;font-size:12px;line-height:1.5}
.top-actions{margin-left:0}
.team-presence{position:relative}
.team-presence-trigger{height:36px;display:flex;align-items:center;gap:8px;padding:0 11px;border:1px solid rgba(255,255,255,.25);border-radius:7px;background:rgba(255,255,255,.12);color:#fff;font-size:12px}
.team-presence-trigger>i{font-style:normal;opacity:.72}
.presence-avatars{display:flex;padding-left:8px}
.presence-avatar{width:25px;height:25px;display:grid;place-items:center;overflow:hidden;margin-left:-8px;border:2px solid #4159bf;border-radius:50%;background:#27a9dc;color:#fff;font-size:8px;font-weight:800}
.presence-avatar img,.presence-card-avatar img,.employee-avatar img,.avatar img{width:100%;height:100%;object-fit:cover}
.team-presence-popover{position:absolute;z-index:125;top:43px;right:0;width:340px;overflow:hidden;border:1px solid #d6e1e8;border-radius:10px;background:#fff;color:#294655;box-shadow:0 16px 42px rgba(14,44,68,.24)}
.team-presence-popover[hidden]{display:none}
.team-presence-popover>header{display:flex;justify-content:space-between;padding:14px 15px;border-bottom:1px solid #e5ecef}
.team-presence-popover>header strong{font-size:14px}.team-presence-popover>header span{color:#748894;font-size:11px}
.presence-list{max-height:380px;overflow:auto}
.presence-list article{display:grid;grid-template-columns:42px 1fr;gap:10px;padding:11px 15px;border-bottom:1px solid #edf2f4}
.presence-card-avatar{width:42px;height:42px;display:grid;place-items:center;overflow:hidden;border-radius:50%;background:linear-gradient(145deg,#42bee8,#1a7fc7);color:#fff;font-size:12px;font-weight:800}
.presence-list strong,.presence-list span,.presence-list small{display:block}.presence-list strong{font-size:13px}.presence-list span{margin-top:1px;color:#748894;font-size:11px}.presence-list small{margin-top:5px;color:#8b9ba4;font-size:10px}.presence-list small::before{content:"";display:inline-block;width:7px;height:7px;margin-right:5px;border-radius:50%;background:#aebac0}.presence-list small.online{color:#278858}.presence-list small.online::before{background:#2cba70;box-shadow:0 0 0 3px rgba(44,186,112,.12)}.presence-list p{margin:5px 0 0;color:#607987;font-size:10px}
.presence-manage{width:100%;height:42px;border:0;background:#f5f9fb;color:#1682b2;font-size:12px;font-weight:700}
.user-card{width:100%;min-height:54px;display:grid!important;grid-template-columns:38px minmax(0,1fr) 14px!important;align-items:center;gap:9px!important;padding:7px 8px!important;border:1px solid rgba(255,255,255,.12)!important;border-radius:9px!important;background:rgba(255,255,255,.08)!important;text-align:left}
.user-card:hover{background:rgba(255,255,255,.14)!important}.user-avatar-wrap{position:relative;width:36px;height:36px}.user-avatar-wrap .avatar{width:36px;height:36px;display:grid;place-items:center;overflow:hidden;border-radius:50%;background:#efd477;color:#243c70;font-size:11px;font-weight:800}.user-avatar-wrap>i{position:absolute;right:-1px;bottom:0;width:9px;height:9px;border:2px solid #304cad;border-radius:50%;background:#35c879}.user-card>div{min-width:0}.user-card strong{overflow:hidden;color:#fff;font-size:11px!important;text-overflow:ellipsis;white-space:nowrap}.user-card div span{margin-top:2px!important;color:#c8d7f5!important;font-size:9px!important}.user-card>b{color:#cbd7f4;font-size:20px;font-weight:400}

/* v57: safe account profile; clicking the sidebar identity never logs out */
.my-profile-card{display:grid;gap:18px;min-width:min(420px,72vw)}
.my-profile-head{display:flex;align-items:center;gap:14px;padding:15px;border:1px solid #dfe6f1;border-radius:14px;background:#f6f9fd}
.my-profile-head .my-profile-avatar{width:58px;height:58px;flex:0 0 58px;display:grid;place-items:center;overflow:hidden;border-radius:50%;background:linear-gradient(145deg,#40bce8,#2477c7);color:#fff;font-size:17px;font-weight:800}
.my-profile-head .my-profile-avatar img{width:100%;height:100%;object-fit:cover}
.my-profile-head>div{display:grid;gap:3px}.my-profile-head strong{color:#26344d;font-size:18px}.my-profile-head span{color:#69778e;font-size:13px}.my-profile-head small{color:#20a86b;font-size:11px}
.my-profile-card dl{display:grid;grid-template-columns:130px minmax(0,1fr);gap:11px 18px;margin:0}.my-profile-card dt{color:#7a879b;font-size:12px}.my-profile-card dd{margin:0;color:#26344d;font-size:13px;font-weight:600}
.my-profile-card>p,.logout-confirm p{margin:0;color:#748197;font-size:12px;line-height:1.55}.logout-confirm{display:grid;gap:8px}.logout-confirm strong{color:#26344d;font-size:15px}
.deals-surface .deals-commandbar{min-height:62px;gap:9px;padding:9px 0 6px}
.deals-title h1{font-size:26px;line-height:1.1}
.deals-surface .deals-commandbar .create-deal-button{height:38px;min-width:132px;font-size:13px}
.deals-surface .deals-commandbar .funnel-picker{flex:0 0 240px}
.deals-surface .deals-commandbar .funnel-trigger,.deal-search-trigger{height:38px;min-height:38px;font-size:13px}
.deals-surface .deals-viewbar{min-height:40px;padding:2px 0 7px}
.deals-surface .deals-viewbar .view-switch{height:34px}.deals-surface .deals-viewbar .view-switch button{min-height:30px;padding:0 12px;font-size:12px}
.field,.proc-row label{font-size:12px}.field input,.field select,.field textarea,.proc-row input,.proc-row select,.proc-row textarea{min-height:38px;padding:8px 10px;border-color:#cddce4;border-radius:5px;font-size:13px;line-height:1.35}.field textarea,.proc-row textarea{min-height:74px}
.page-head{margin-bottom:16px}.page-head h1{font-size:26px}.page-head p{font-size:12px}
.employee-card header em{display:block;margin-top:5px;color:#8a9ca5;font-size:10px;font-style:normal}.employee-card header em.online{color:#258858}
.employee-avatar.has-photo{background:#e9eff2}.employee-contacts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:12px 18px 0}.employee-contacts>span{display:grid;gap:3px;padding:9px 10px;border:1px solid #e1e9ed;border-radius:7px;color:#8496a0;font-size:10px}.employee-contacts strong{overflow:hidden;color:#36505e;font-size:12px;text-overflow:ellipsis}.employee-profile-editor{display:flex;align-items:center;gap:12px;padding:12px;border:1px solid #dbe5ea;border-radius:8px;background:#f7fafc}.employee-profile-editor .employee-avatar{width:58px;height:58px}.employee-profile-editor>span{color:#82939c;font-size:11px}.employee-photo-button{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:0 12px;cursor:pointer}
.commercial-paper{width:min(100%,900px);padding:38px 44px;font-family:"Times New Roman",Times,serif;font-size:16px;line-height:1.3}
.commercial-paper>header strong{font-size:18px}.commercial-paper h2{margin-bottom:16px;font-size:18px;text-transform:none}.commercial-paper h3{margin-bottom:16px;font-size:17px}.commercial-paper>p,.commercial-paper ol{font-size:16px}.commercial-table{overflow:visible}.commercial-table th,.commercial-table td{padding:5px 4px;font-size:11px;line-height:1.2}.commercial-table small{font-size:10px}.commercial-table th:nth-child(1){width:4%}.commercial-table th:nth-child(2){width:10%}.commercial-table th:nth-child(3){width:24%}.commercial-table th:nth-child(4){width:9%}.commercial-table th:nth-child(5){width:7%}.commercial-table th:nth-child(n+6){width:11.5%}.paper-totals{font-size:15px}.commercial-paper li{margin-bottom:4px}
.commercial-paper footer,.invoice-sign{min-height:104px;grid-template-columns:minmax(0,1fr) 145px 165px;align-items:center;gap:12px;margin-top:20px;padding-top:10px}.commercial-paper footer>strong,.invoice-sign>strong{grid-column:2;min-width:0!important;padding:0!important;text-align:center!important;font-size:13px}.commercial-paper footer img,.invoice-sign img{position:static!important;grid-column:3;justify-self:end;width:155px!important;max-height:100px!important;object-fit:contain}.invoice-sign{display:grid}.invoice-sign>span{grid-column:1}
@media(max-width:1000px){.global-search-shell{width:auto;flex:1}.team-presence-trigger #team-online-label{display:none}.employee-contacts{grid-template-columns:1fr}.commercial-paper{padding:28px 20px}.commercial-paper footer,.invoice-sign{grid-template-columns:1fr 120px 135px}.commercial-paper footer img,.invoice-sign img{width:130px!important}}
@media(max-width:800px){.global-search-shell{width:100%}.team-presence{display:none}.deals-surface .deals-commandbar .funnel-picker{flex:1 0 180px}.deals-surface .deals-viewbar{overflow-x:auto}.deals-title h1{font-size:24px}}

/* v32: company registry and banking details */
.company-editor-form{display:grid;gap:14px}.company-form-section{padding:0 16px 16px;border:1px solid #d6e3ea;border-radius:9px;background:#fff}.company-form-section>header{min-height:58px;display:flex;align-items:center;border-bottom:1px solid #e3ebef}.company-form-section>header strong,.company-form-section>header span{display:block}.company-form-section>header strong{color:#29485a;font-size:15px}.company-form-section>header span{margin-top:4px;color:#78909d;font-size:12px}.company-form-section .form-grid{margin-top:14px}.company-inn-search{display:grid;grid-template-columns:minmax(240px,1fr) auto;align-items:end;gap:10px;margin-top:14px}.company-inn-search .primary{height:40px;min-width:148px}.company-lookup-result{display:none;min-height:52px;margin-top:10px;padding:10px 12px;border:1px solid #d5e3ea;border-radius:7px;background:#f6fafc}.company-lookup-result.loading,.company-lookup-result.error,.company-lookup-result.success{display:grid;gap:3px}.company-lookup-result.loading{color:#35718d}.company-lookup-result.error{border-color:#f0c5c5;background:#fff2f2;color:#b63e3e}.company-lookup-result.success{border-color:#bfe1cf;background:#f0fbf5;color:#285c41}.company-lookup-result.success.duplicate{border-color:#ebd49c;background:#fff9e9;color:#7b5a15}.company-lookup-result strong{font-size:14px}.company-lookup-result span{font-size:12px}.company-lookup-result small{font-size:11px;line-height:1.4}.registry-status{color:#268052!important}
.company-requisites>div.wide{padding-bottom:11px;border-bottom:1px solid #edf2f4}.company-bank-card{display:grid;grid-template-columns:100px minmax(0,1fr);margin:12px 14px;padding:12px;border:1px solid #d9e6ec;border-radius:8px;background:#f8fbfd}.company-bank-card>header{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;margin-bottom:6px;padding-bottom:9px;border-bottom:1px solid #e0e9ed}.company-bank-card>header span{color:#31566b;font-size:13px;font-weight:750}.company-bank-card>header button{border:0;background:transparent;color:#1785b8;font-size:12px}.company-bank-card>div{display:contents}.company-bank-card>div>span,.company-bank-card>div>strong{min-height:34px;display:flex;align-items:center;border-bottom:1px solid #e9eff2;font-size:12px}.company-bank-card>div>span{color:#81949f}.company-bank-card>div>strong{overflow-wrap:anywhere;color:#2f4857;font-weight:600}.company-bank-card>small{grid-column:1/-1;margin-top:10px;color:#7b909c;font-size:10px;line-height:1.4}
@media(max-width:620px){.company-form-section{padding:0 11px 12px}.company-inn-search{grid-template-columns:1fr}.company-inn-search .primary{width:100%}.company-bank-card{grid-template-columns:82px minmax(0,1fr);margin:10px}}

/* v34: own company settings and optional client banking details */
.optional-bank-section>header{gap:12px}.optional-bank-section>header>div{min-width:0;flex:1}.bank-toggle{min-height:32px;padding:0 11px;border:1px solid #b9d5e4;border-radius:6px;background:#f7fbfd;color:#167ca9;font-size:11px;font-weight:700;white-space:nowrap}.optional-bank-section.collapsed .form-grid,.optional-bank-section.collapsed .form-hint{display:none}.optional-bank-section.collapsed{padding-bottom:0}.company-bank-card.collapsed>div,.company-bank-card.collapsed>small{display:none}.company-bank-card.collapsed{display:block}.company-bank-card>header{gap:8px}.company-bank-card>header .bank-toggle{margin-left:auto}.settings-tabs{display:flex;gap:2px;margin:0 0 14px;padding:4px;border:1px solid #cbdce5;border-radius:8px;background:#eaf3f8;width:max-content}.settings-tabs button{min-height:36px;padding:0 16px;border:0;border-radius:6px;background:transparent;color:#557181;font-size:13px}.settings-tabs button.active{background:#fff;color:#167fab;font-weight:750;box-shadow:0 1px 4px rgba(29,75,98,.13)}.settings-requisites{display:grid;grid-template-columns:minmax(0,1fr) minmax(340px,.62fr);gap:14px;align-items:start}.settings-requisites>section{padding:0 18px 18px;border:1px solid #cfdee6;border-radius:10px;background:#fff;box-shadow:0 2px 7px rgba(38,77,96,.05)}.settings-requisites>section:first-child{grid-row:span 2}.settings-requisites>section>header{min-height:67px;display:flex;align-items:center;justify-content:space-between;gap:18px;border-bottom:1px solid #e3ebef}.settings-requisites>section>header strong,.settings-requisites>section>header span{display:block}.settings-requisites>section>header strong{color:#244b60;font-size:15px}.settings-requisites>section>header span{margin-top:4px;color:#78909d;font-size:11px}.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}.settings-grid .wide{grid-column:1/-1}
@media(max-width:1050px){.settings-requisites{grid-template-columns:1fr}.settings-requisites>section:first-child{grid-row:auto}}
@media(max-width:620px){.settings-tabs{width:100%}.settings-tabs button{flex:1;padding:0 8px}.settings-requisites>section{padding:0 12px 14px}.settings-requisites>section>header{align-items:flex-start;flex-direction:column;padding:13px 0}.settings-requisites>section>header .primary{width:100%}.settings-grid{grid-template-columns:1fr}.settings-grid .wide{grid-column:auto}.optional-bank-section>header{align-items:flex-start;flex-direction:column;padding-bottom:10px}.bank-toggle{width:100%}}

/* v35: shared background under glass navigation, personal badges */
html,body{background:#253b96 url('./assets/aks-night-background.jpg') center/cover fixed no-repeat}
[hidden]{display:none!important}.app-shell{background:transparent}.main{background:rgba(239,247,252,.9)}
.sidebar{background:linear-gradient(180deg,rgba(42,55,151,.68),rgba(28,42,123,.76));border-right:1px solid rgba(255,255,255,.14);box-shadow:8px 0 28px rgba(13,25,88,.13);backdrop-filter:blur(22px) saturate(125%);-webkit-backdrop-filter:blur(22px) saturate(125%)}
.topbar{background:linear-gradient(90deg,rgba(54,67,171,.7),rgba(40,53,151,.62));border-bottom:1px solid rgba(255,255,255,.18);box-shadow:0 8px 28px rgba(13,25,88,.12);backdrop-filter:blur(22px) saturate(125%);-webkit-backdrop-filter:blur(22px) saturate(125%)}
.main:has(.deals-surface){background:rgba(224,239,252,.66)}.deals-surface{background:linear-gradient(150deg,rgba(239,249,255,.7),rgba(218,237,251,.62))}
.sidebar .nav-count.task-today{background:#24a765;color:#fff}.sidebar .nav-count.task-overdue{background:#e44f5f;color:#fff;box-shadow:0 0 0 3px rgba(228,79,95,.18)}.sidebar .nav-count.chat{background:#2ca9df;color:#fff}
.sidebar .nav-item:nth-child(5),.sidebar .nav-item:nth-child(7){margin-top:0}.sidebar .crm-hub{margin-top:3px}
@media(max-width:800px){html,body{background-position:62% center}.sidebar{background:linear-gradient(180deg,rgba(42,55,151,.82),rgba(28,42,123,.88))}.main{background:rgba(239,247,252,.93)}}

/* v36: one shared background across every CRM workspace */
.main,
.main:has(.deals-surface){
  background:linear-gradient(145deg,rgba(231,243,252,.34),rgba(210,230,248,.22));
}
#view{
  min-height:calc(100vh - 52px);
  background:linear-gradient(145deg,rgba(239,248,255,.28),rgba(211,233,249,.18));
  backdrop-filter:blur(2px) saturate(108%);
  -webkit-backdrop-filter:blur(2px) saturate(108%);
}
.deals-surface{
  background:linear-gradient(150deg,rgba(239,249,255,.34),rgba(218,237,251,.2));
}
.panel,.kpi,.list-panel,.task-controlbar,.task-calendar,.employee-card,
.settings-requisites>section,.automation-card,.company-card,.contact-card{
  background:rgba(255,255,255,.93);
  box-shadow:0 4px 18px rgba(17,55,105,.08);
}
.drawer-backdrop,.company-backdrop{
  background:rgba(8,29,82,.34);
  backdrop-filter:blur(5px);
  -webkit-backdrop-filter:blur(5px);
}
.deal-drawer,.company-drawer{
  background:rgba(239,245,249,.9);
  backdrop-filter:blur(18px) saturate(112%);
  -webkit-backdrop-filter:blur(18px) saturate(112%);
}
@media(max-width:800px){
  .main,.main:has(.deals-surface){background:rgba(230,242,251,.46)}
  #view{background:rgba(234,245,252,.38);backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}
}

/* v37: Bitrix-like background/workspace separation */
.main,.main:has(.deals-surface){background:transparent}
#view{
  position:relative;
  background:linear-gradient(145deg,rgba(44,48,157,.2),rgba(8,54,137,.1));
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
.deals-surface{background:transparent}
#view .page-head h1,#view .page-head p,#view .page-head .eyebrow,
.deals-title h1,.deals-title span{
  color:#fff;
  text-shadow:0 2px 12px rgba(5,25,92,.36);
}
#view .crm-nav{
  border-bottom-color:rgba(255,255,255,.16);
  background:rgba(45,54,151,.42);
  box-shadow:0 8px 24px rgba(6,25,87,.1);
  backdrop-filter:blur(16px) saturate(118%);
  -webkit-backdrop-filter:blur(16px) saturate(118%);
}
#view .crm-nav button{color:rgba(255,255,255,.78)}
#view .crm-nav button:hover,#view .crm-nav button.active{color:#fff;background:rgba(255,255,255,.1)}
#view .crm-nav button.active{border-bottom-color:#58d6ff}
.list-panel,.panel,.kpi,.task-controlbar,.task-calendar,.employee-card,
.settings-requisites>section,.automation-topbar,.automation-note{
  border-color:rgba(209,225,236,.92);
  background:rgba(255,255,255,.96);
}


.company-drawer{animation:none}
.company-drawer.drawer-enter{animation:drawer-in .2s ease-out}


.kanban-shell [data-kanban-board]{scrollbar-width:none}
.kanban-shell [data-kanban-board]::-webkit-scrollbar{display:none}
.kanban-fixed-nav{
  transition:opacity .2s ease,transform .2s ease,visibility .2s;
}
.kanban-fixed-nav.is-hidden{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translateY(12px);
}
.kanban-fixed-nav button:disabled{opacity:.3;cursor:default;transform:none}
.kanban-fixed-nav input{
  height:18px;
  appearance:none;
  -webkit-appearance:none;
  border-radius:9px;
  outline:0;
  background:linear-gradient(to right,#269fd3 0 var(--scroll-progress,0%),rgba(55,126,172,.22) var(--scroll-progress,0%) 100%);
}
.kanban-fixed-nav input::-webkit-slider-runnable-track{height:7px;border-radius:5px;background:transparent}
.kanban-fixed-nav input::-webkit-slider-thumb{-webkit-appearance:none;margin-top:-5px;width:17px;height:17px;border:2px solid #fff;border-radius:50%;background:#269fd3;box-shadow:0 2px 7px rgba(0,63,105,.3)}
.kanban-fixed-nav input::-moz-range-track{height:7px;border-radius:5px;background:transparent}
.kanban-fixed-nav input::-moz-range-progress{height:7px;border-radius:5px;background:#269fd3}
.kanban-fixed-nav input::-moz-range-thumb{width:15px;height:15px;border:2px solid #fff;border-radius:50%;background:#269fd3;box-shadow:0 2px 7px rgba(0,63,105,.3)}
@media(max-width:800px){
  .main,.main:has(.deals-surface){background:transparent}
  #view{background:linear-gradient(145deg,rgba(44,48,157,.24),rgba(8,54,137,.14));backdrop-filter:none;-webkit-backdrop-filter:none}
}
@media(prefers-reduced-motion:reduce){
  
  .kanban-fixed-nav{transition:none}
}

/* v38: full-width tasks workspace */
#view[data-current-view="tasks"] .task-controlbar,
#view[data-current-view="tasks"] .task-workspace,
#view[data-current-view="tasks"] .task-calendar{
  width:100%;
  max-width:none;
}
#view[data-current-view="tasks"] .task-workspace{
  min-width:0;
}

/* v45: simplified navigation, readable deal controls and supplier workflow */
.deals-surface .deals-viewbar .view-switch{
  flex:0 0 auto;
  border:1px solid rgba(255,255,255,.2);
  background:rgba(20,50,139,.34);
  box-shadow:0 1px 4px rgba(4,24,88,.12);
}
.deals-surface .deals-viewbar .view-switch button{
  border:1px solid transparent;
  background:transparent;
  color:rgba(255,255,255,.88)!important;
  text-shadow:0 1px 1px rgba(12,39,101,.25);
}
.deals-surface .deals-viewbar .view-switch button:hover{
  background:rgba(255,255,255,.14);
  color:#fff!important;
}
.deals-surface .deals-viewbar .view-switch button.active{
  border-color:rgba(255,255,255,.9);
  background:#fff;
  color:#176c9b!important;
  text-shadow:none;
}
.deal-drawer .deal-actionbar{
  grid-template-columns:repeat(auto-fit,minmax(145px,1fr));
  overflow:visible;
}
.deal-drawer .deal-actionbar>button{min-width:0}
.company-delete-action{
  border-color:#efb1b1!important;
  background:#fff7f7!important;
  color:#b93737!important;
}
.company-delete-action:disabled{opacity:.65;cursor:default}
.deletion-requests-button b{
  display:inline-grid;place-items:center;min-width:20px;height:20px;margin-left:6px;border-radius:10px;background:#df5454;color:#fff;font-size:11px
}
.deletion-request-list{display:grid;gap:9px}
.deletion-request-list article{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:8px;padding:12px;border:1px solid #d8e4ea;border-radius:8px;background:#fff}
.deletion-request-list strong,.deletion-request-list span{display:block}.deletion-request-list span{margin-top:4px;color:#718795;font-size:12px}
.destructive-confirm{padding:14px;border:1px solid #efc6c6;border-radius:8px;background:#fff8f8}.destructive-confirm strong{font-size:17px}.destructive-confirm p{line-height:1.5}.destructive-confirm span{color:#b74444;font-size:12px}
.supplier-pick>span{display:grid;grid-template-columns:minmax(150px,1fr) auto;gap:5px}
.supplier-pick button{min-height:var(--ui-control,38px);padding:0 9px;border:1px solid #8bc6df;border-radius:6px;background:#eef9fd;color:#1877a4;font-size:10px;font-weight:750;white-space:nowrap}
.suppliers-table table{min-width:900px}


@media(max-width:980px){
  .deal-drawer .deal-actionbar{grid-template-columns:repeat(2,minmax(130px,1fr))}
  .deletion-request-list article{grid-template-columns:1fr 1fr}.deletion-request-list article>div{grid-column:1/-1}
}
@media(max-width:620px){
  .deals-surface .deals-viewbar .view-switch button{padding:0 10px;font-size:11px}
  .deal-drawer .deal-actionbar{grid-template-columns:1fr}
  .supplier-pick>span{grid-template-columns:1fr}
}


/* v46: compact client navigation and cleaner deal timeline */
.product-nav{overflow:visible}
.clients-menu{position:relative;height:38px}
.clients-menu summary{height:38px;display:flex;align-items:center;padding:0 14px;border:0;border-radius:7px;background:transparent;color:#e1e9ff;font-size:14px;white-space:nowrap;cursor:pointer;list-style:none}
.clients-menu summary::-webkit-details-marker{display:none}
.clients-menu summary i{margin-left:5px;transition:transform .18s ease}
.clients-menu[open] summary i{transform:rotate(180deg)}
.clients-menu[open] summary,.clients-menu:has(button.active) summary{background:rgba(255,255,255,.2);color:#fff}
.clients-menu>div{position:absolute;z-index:90;top:44px;left:0;width:210px;padding:7px;border:1px solid rgba(184,207,235,.72);border-radius:9px;background:rgba(255,255,255,.98);box-shadow:0 14px 34px rgba(11,35,91,.24);backdrop-filter:blur(18px)}
.product-nav .clients-menu>div button{width:100%;height:40px;display:flex;align-items:center;padding:0 12px;border-radius:6px;color:#31566d;font-size:14px;text-align:left}
.product-nav .clients-menu>div button:hover,.product-nav .clients-menu>div button.active{background:#eaf5fb;color:#147bab}
.deal-drawer .timeline-pane .activity-tabs{gap:2px}
.deal-drawer .timeline-card-actions button{font-size:12px}
@media(max-width:1120px){.clients-menu summary{font-size:12px;padding:0 10px}}

/* v39: continuous kanban scrolling without stage snapping */
.deals-surface .kanban[data-kanban-board]{
  scroll-snap-type:none;
  scroll-padding:0;
  overscroll-behavior-x:contain;
  -webkit-overflow-scrolling:touch;
}
.deals-surface .kanban[data-kanban-board] .column{
  scroll-snap-align:none;
  scroll-snap-stop:normal;
}

/* v40: compact Bitrix-like deal board density */
.deals-commandbar{min-height:64px;gap:8px;padding:7px 0 5px}
.deals-title{margin-right:5px}.deals-title h1{font-size:26px;letter-spacing:-.025em}.deals-title span{font-size:15px}
.deals-commandbar .create-deal-button{height:39px;min-width:132px;padding:0 12px;border-radius:7px;font-size:13px}
.deals-commandbar .funnel-picker{flex-basis:244px}.deals-commandbar .funnel-trigger{min-height:39px;border-color:rgba(176,202,220,.72);border-radius:7px;background:rgba(255,255,255,.66)}
.deals-commandbar .funnel-trigger strong,.deal-search-trigger{font-size:13px}.deal-search-trigger{height:39px}.command-button{height:37px;font-size:12px}
.deals-viewbar{min-height:41px;gap:7px}.deals-viewbar .view-switch{height:34px}.deals-viewbar .view-switch button{min-height:30px;padding:0 12px;font-size:12px}
.stage-quick-filter{height:34px;min-width:164px;font-size:12px}.deals-viewbar .funnel-health button{height:33px;font-size:10px}.deals-viewbar .funnel-health b{font-size:12px}
.deals-surface .kanban{grid-auto-columns:clamp(292px,19vw,312px);gap:6px;min-height:calc(100vh - 158px)}
.deals-surface .kanban .column{min-height:calc(100vh - 158px);padding:0 5px 11px;border-left:1px dashed rgba(174,204,222,.55);border-right:1px dashed rgba(68,132,174,.32)}
.deals-surface .kanban .column-color{height:32px!important;padding:0 13px 0 11px}.deals-surface .kanban .column-color strong{max-width:248px;font-size:12px;line-height:16px}.deals-surface .kanban .column-color b{height:19px;min-width:19px;font-size:10px}
.deals-surface .kanban .column-head{min-height:56px;padding:7px 5px}.deals-surface .kanban .column-head>span{font-size:20px}
.deals-surface .kanban .column-add{min-height:31px;margin:0 4px 7px;border:1px solid rgba(190,211,224,.72);font-size:11px}
.deals-surface .kanban .deal-card{margin-bottom:7px;padding:12px;border:1px solid #c9d9e3;border-radius:7px;box-shadow:0 1px 4px rgba(18,72,108,.1)}
.deals-surface .kanban .deal-card:hover{border-color:#71b7dc;box-shadow:0 5px 15px rgba(20,83,123,.15);transform:translateY(-1px)}
.deals-surface .kanban .deal-card-id strong{font-size:14px;line-height:1.35}.deals-surface .kanban .deal-card-id button{width:27px;height:27px;font-size:12px}
.deals-surface .kanban .deal-company{margin:5px 0 9px;font-size:12px}.deals-surface .kanban .deal-amount{margin-top:7px;font-size:18px}
.deals-surface .kanban .deal-task{min-height:32px;margin-top:8px;padding:6px 8px;border:1px solid rgba(231,193,193,.35);font-size:11px}
.deals-surface .kanban .deal-card-actions{min-height:38px;margin-top:8px;padding-top:7px}.deals-surface .kanban .deal-card-actions button{min-height:30px;padding:0 9px;font-size:11px}.deals-surface .kanban .avatar-small{width:30px;height:30px;font-size:10px}
.deals-surface .kanban .procurement-shadow,.deals-surface .kanban .calc-progress{font-size:11px}
@media(max-width:1400px){.deals-surface .kanban{grid-auto-columns:292px}}
@media(max-width:800px){.deals-title h1{font-size:24px}.deals-surface .kanban{grid-auto-columns:86vw}.deals-surface .kanban .deal-card{padding:12px}}

/* v41: exact sidebar selection and a simpler deal creation form */
.sidebar .crm-hub{background:transparent;box-shadow:none}
.sidebar .crm-hub:hover{background:rgba(255,255,255,.09)}
.sidebar .nav-item.active,
.sidebar .nav-item.active:not(.crm-hub),
.sidebar .crm-hub.active{background:rgba(255,255,255,.25);color:#fff;box-shadow:inset 3px 0 rgba(121,212,244,.9)}
.deal-create-fields{grid-template-columns:minmax(0,1fr)}
.deal-create-fields>.field,.deal-create-fields>.field-static,.deal-create-fields>.wide{grid-column:1;width:100%}
.modal:has(#deal-form input[name="id"][value=""]) .deal-editor-section .form-grid.deal-create-fields{grid-template-columns:minmax(0,1fr)}
.modal:has(#deal-form input[name="id"][value=""]) .deal-create-fields>.field,
.modal:has(#deal-form input[name="id"][value=""]) .deal-create-fields>.field-static,
.modal:has(#deal-form input[name="id"][value=""]) .deal-create-fields>.wide{grid-column:1/-1;width:100%;min-width:0}
#deal-form textarea[name="note"][data-auto-grow]{min-height:112px;overflow-y:hidden;resize:none;line-height:1.45}

/* v47: measured deal-toolbar rhythm and print-ready business documents */
.deals-surface .deals-commandbar{
  min-height:62px;
  align-items:center;
  gap:12px;
  padding:14px 0 7px;
}
.deals-surface .deals-title{flex:0 0 auto;margin:0 2px 0 0}
.deals-surface .deals-title h1{font-size:27px;line-height:34px;font-weight:650;letter-spacing:-.025em}
.deals-surface .deals-commandbar .create-deal-button{height:38px;min-width:136px;padding:0 14px;font-size:13px}
.deals-surface .deals-commandbar .funnel-picker{flex:0 0 248px}
.deals-surface .deals-commandbar .funnel-trigger,
.deals-surface .deal-search-trigger{height:38px;min-height:38px}
.deals-surface .deal-search-trigger{width:min(320px,24vw)}
.deals-surface .command-button{height:36px;padding:0 14px}
.deals-surface .deals-viewbar{
  min-height:54px;
  align-items:flex-start;
  gap:10px;
  padding:6px 0 14px;
}
.deals-surface .deals-viewbar .view-switch{height:34px}
.deals-surface .deals-viewbar .view-switch button{min-height:30px;padding:0 13px;font-size:12px}
.deals-surface .stage-quick-filter{height:34px;min-width:172px}
.deals-surface .deals-viewbar .funnel-health{gap:7px}
.deals-surface .deals-viewbar .funnel-health button{height:34px;padding:0 10px}
.deals-surface .kanban{min-height:calc(100vh - 176px)}
.deals-surface .kanban .column{min-height:calc(100vh - 176px)}

.commercial-table{overflow:visible;border:1px solid #111}
.commercial-table table,.invoice-items{table-layout:fixed;border:1px solid #111;border-collapse:collapse;border-spacing:0}
.commercial-table thead,.invoice-items thead{display:table-header-group}
.commercial-table tr,.invoice-items tr{break-inside:avoid;page-break-inside:avoid}
.commercial-table th,.commercial-table td,.invoice-items th,.invoice-items td{border:1px solid #111!important}
.commercial-table tbody tr:last-child td,.invoice-items tbody tr:last-child td{border-bottom:1px solid #111!important}
.commercial-paper footer,.invoice-sign{
  min-height:138px;
  grid-template-columns:minmax(0,1fr) minmax(240px,auto);
  align-items:start;
  overflow:visible;
  padding:16px 8px 22px;
  break-inside:avoid;
  page-break-inside:avoid;
}
.commercial-paper footer>div,.commercial-paper footer>strong,.invoice-sign>span,.invoice-sign>strong{position:relative;z-index:3}
.commercial-paper footer>strong,.invoice-sign>strong{min-width:240px;padding:7px 6px 0;text-align:right;white-space:normal}
.commercial-paper footer img,.invoice-sign img{z-index:1;right:176px;bottom:5px;width:178px;max-height:116px;object-fit:contain}

@media(max-width:1400px){
  .deals-surface .deals-commandbar{gap:9px}
  .deals-surface .deals-commandbar .funnel-picker{flex-basis:220px}
  .deals-surface .deal-search-trigger{width:210px}
}
@media(max-width:1120px){
  .deals-surface .deals-commandbar{align-content:center;row-gap:9px;padding-top:12px}
  .deals-surface .deals-viewbar{padding-bottom:12px}
}
@media(max-width:800px){
  .deals-surface .deals-commandbar{padding:13px 0 9px}
  .deals-surface .deals-title{width:100%}
  .deals-surface .deals-viewbar{min-height:48px;padding:4px 0 10px}
  .deals-surface .kanban,.deals-surface .kanban .column{min-height:calc(100vh - 205px)}
}
@media(max-width:620px){
  .commercial-paper footer,.invoice-sign{min-height:125px;grid-template-columns:1fr 180px;padding-inline:0}
  .commercial-paper footer>strong,.invoice-sign>strong{min-width:0;font-size:11px}
  .commercial-paper footer img,.invoice-sign img{right:112px;bottom:8px;width:145px}
}
@media print{
  .commercial-paper,.invoice-paper{box-sizing:border-box}
  .commercial-table,.commercial-table table,.invoice-items{overflow:visible!important;border:1px solid #111!important}
  .commercial-paper footer,.invoice-sign{min-height:34mm!important;margin-top:7mm!important;padding-bottom:4mm!important;overflow:visible!important}
  .commercial-paper footer img,.invoice-sign img{right:42mm!important;bottom:1mm!important;width:43mm!important;max-height:28mm!important}
}

/* v48: final density and document layout overrides */
html,body,button,input,select,textarea{font-family:"Open Sans","Segoe UI",Arial,sans-serif}
.deals-surface .deals-commandbar{min-height:62px;gap:9px;padding:9px 0 6px}
.deals-surface .deals-title h1{font-size:26px;line-height:1.1}
.deals-surface .deals-commandbar .create-deal-button{height:38px;min-width:132px;font-size:13px}
.deals-surface .deals-commandbar .funnel-picker{flex:0 0 240px}
.deals-surface .deals-commandbar .funnel-trigger,.deals-surface .deal-search-trigger{height:38px;min-height:38px;font-size:13px}
.deals-surface .deals-viewbar{min-height:40px;align-items:center;padding:2px 0 7px}
.deals-surface .deals-viewbar .view-switch{height:34px}.deals-surface .deals-viewbar .view-switch button{min-height:30px;padding:0 12px;font-size:12px}
.commercial-paper{width:min(100%,900px);padding:38px 44px;font-family:"Times New Roman",Times,serif;font-size:16px;line-height:1.3}
.commercial-paper>header strong{font-size:18px}.commercial-paper h2{margin-bottom:16px;font-size:18px;text-transform:none}.commercial-paper h3{margin-bottom:16px;font-size:17px}.commercial-paper>p,.commercial-paper ol{font-size:16px}.commercial-table{overflow:visible}.commercial-table th,.commercial-table td{padding:5px 4px;font-size:11px;line-height:1.2}.commercial-table small{font-size:10px}.commercial-table th:nth-child(1){width:4%}.commercial-table th:nth-child(2){width:10%}.commercial-table th:nth-child(3){width:24%}.commercial-table th:nth-child(4){width:9%}.commercial-table th:nth-child(5){width:7%}.commercial-table th:nth-child(n+6){width:11.5%}.paper-totals{font-size:15px}.commercial-paper li{margin-bottom:4px}
.commercial-paper footer,.invoice-sign{min-height:104px;display:grid;grid-template-columns:minmax(0,1fr) 145px 165px;align-items:center;gap:12px;margin-top:20px;padding:10px 0 0;overflow:visible}
.commercial-paper footer>strong,.invoice-sign>strong{position:relative;z-index:3;grid-column:2;min-width:0;padding:0;text-align:center;font-size:13px}
.commercial-paper footer img,.invoice-sign img{position:static;z-index:1;grid-column:3;justify-self:end;width:155px;max-height:100px;object-fit:contain}.invoice-sign>span{grid-column:1}
@media(max-width:620px){.commercial-paper footer,.invoice-sign{grid-template-columns:1fr 100px 115px}.commercial-paper footer img,.invoice-sign img{position:static;width:110px}.commercial-paper footer>strong,.invoice-sign>strong{font-size:10px}}
@media print{.commercial-paper footer,.invoice-sign{min-height:28mm!important;display:grid!important;grid-template-columns:minmax(0,1fr) 38mm 42mm!important;align-items:center!important;margin-top:6mm!important;padding:3mm 0 0!important}.commercial-paper footer img,.invoice-sign img{position:static!important;grid-column:3!important;width:40mm!important;max-height:26mm!important}.commercial-paper footer>strong,.invoice-sign>strong{grid-column:2!important;min-width:0!important;text-align:center!important}}

/* v49: Bitrix24 system typography. On Windows the system face is Segoe UI. */
:root{--ui-font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif}
html,body,button,input,select,textarea{font-family:var(--ui-font-family);font-synthesis:none;letter-spacing:0}
html,body{font-size:14px;font-weight:400;line-height:1.4;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
button,input,select,textarea{font-size:13px;font-weight:400;line-height:1.35}
input::placeholder,textarea::placeholder{font-weight:400}
strong,b{font-weight:600}
h1,.page-head h1,.detail-title h1,.deals-surface .deals-title h1{font-family:var(--ui-font-family);font-size:26px;font-weight:600;line-height:1.2;letter-spacing:-.015em}
h2,.modal-head h2{font-family:var(--ui-font-family);font-size:20px;font-weight:600;line-height:1.25;letter-spacing:-.01em}
h3{font-family:var(--ui-font-family);font-size:15px;font-weight:600;line-height:1.3}
.nav-item,.top-nav button,.top-nav a{font-size:14px;font-weight:400;line-height:1.3}
.nav-item.active,.top-nav .active{font-weight:600}
.primary,.secondary,.ghost,.danger,.text-btn,.link-btn,.command-button,.create-deal-button,.view-switch button,.bank-toggle{font-size:13px;font-weight:600;line-height:1.3}
.field{font-size:12px;font-weight:400;line-height:1.35}
.field>input,.field>select,.field>textarea,.form-grid input,.form-grid select,.form-grid textarea{font-size:14px;font-weight:400;line-height:1.35}
.field-hint,.form-hint,.hint,.muted,.page-head p,.employee-profile-editor>span{font-size:12px;font-weight:400;line-height:1.4}
.eyebrow,.tag,.badge,.status-pill{font-size:11px;font-weight:600;line-height:1.25;letter-spacing:0}
table{font-size:13px;font-weight:400}
th{font-size:12px;font-weight:600;letter-spacing:0}
.kanban .column-head,.kanban .column-head strong,.deals-surface .column-head,.deals-surface .column-head strong{font-size:13px;font-weight:600;line-height:1.3}
.deal-card,.task-card,.company-card,.contact-card{font-size:13px;font-weight:400;line-height:1.4}
.deal-card h3,.deal-card strong,.task-card strong,.company-card strong,.contact-card strong{font-weight:600}
.modal-body,.drawer-body,.timeline{font-size:13px;font-weight:400;line-height:1.45}
.permission-grid label,.permission-grid span{font-size:13px;font-weight:400;line-height:1.35}
.employee-form legend{font-size:13px;font-weight:600}
/* Printed commercial documents keep their formal document typeface. */
.commercial-paper{font-family:"Times New Roman",Times,serif}
.invoice-paper{font-family:Arial,sans-serif}

/* v50: one clear entry point for repeated deal actions */
.deal-drawer .drawer-actions [data-action="new-invoice"],
.deal-drawer .timeline-pane .activity-tabs [data-action="new-task"],
.deal-drawer .timeline-pane .activity-tabs [data-open-deal-chat],
.deal-drawer .timeline-card-actions,
.internal-drawer .business-process-btn,
.deal-actionbar [data-view="automations"]{display:none}

/* v51: full-width kanban navigation */


.kanban-fixed-nav{
  left:252px;
  right:20px;
  bottom:10px;
  height:42px;
  display:block;
  padding:11px 28px;
  border:1px solid rgba(124,171,203,.38);
  border-radius:23px;
  background:rgba(248,252,255,.9);
  box-shadow:0 7px 24px rgba(17,48,112,.2);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}
.kanban-fixed-nav input{display:block;width:100%;height:18px;margin:0}
.kanban-edge-nav{
  position:fixed;
  z-index:25;
  top:50%;
  width:60px;
  height:96px;
  display:grid;
  place-items:center;
  padding:0 0 8px;
  border:0;
  background:rgba(38,48,143,.54);
  color:rgba(255,255,255,.82);
  font-size:62px;
  font-weight:200;
  line-height:1;
  transform:translateY(-50%);
  transition:opacity .18s ease,background .18s ease,visibility .18s;
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
}
.kanban-edge-nav.left{left:238px;border-radius:0 48px 48px 0}
.kanban-edge-nav.right{right:0;border-radius:48px 0 0 48px}
.kanban-edge-nav:hover{background:rgba(31,42,137,.72)}
.kanban-edge-nav:disabled{opacity:.25;cursor:default}
.kanban-edge-nav.is-hidden{opacity:0;visibility:hidden;pointer-events:none}
@media(max-width:1120px){
  
  
  .kanban-fixed-nav{left:94px}
  .kanban-edge-nav.left{left:76px}
}
@media(max-width:800px){
  
  .kanban-fixed-nav{left:10px;right:10px}
  .kanban-edge-nav.left{left:0}
  .kanban-edge-nav{width:46px;height:78px;font-size:52px}
}


/* Right-side quick chat rail and Bitrix-like content breathing room */
@media(min-width:801px){
  #view:not([data-current-view="chats"]){margin-right:60px}
  .kanban-fixed-nav{right:72px}
  .kanban-edge-nav.right{right:58px}
}
.quick-chat-dock{
  position:fixed;
  z-index:92;
  top:74px;
  right:12px;
  width:50px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:9px;
  padding:6px 0 10px;
  border-radius:25px;
  background:rgba(34,45,139,.2);
  box-shadow:0 10px 30px rgba(13,25,97,.16);
  backdrop-filter:blur(7px);
  -webkit-backdrop-filter:blur(7px);
}
.quick-chat-dock[hidden]{display:none!important}
.quick-chat-dock>i{width:30px;height:1px;margin:1px 0;background:rgba(255,255,255,.23)}
.quick-chat-dock button{
  position:relative;
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  padding:0;
  border:1px solid rgba(255,255,255,.34);
  border-radius:50%;
  background:rgba(42,54,151,.76);
  color:#fff;
  box-shadow:0 3px 12px rgba(10,22,98,.22);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  transition:transform .15s ease,background .15s ease;
}
.quick-chat-dock button:hover{background:rgba(33,135,208,.92);transform:translateX(-4px)}
.quick-chat-dock button.active{background:#199add;box-shadow:0 0 0 3px rgba(101,211,255,.2),0 6px 17px rgba(8,22,91,.25)}
.quick-chat-dock button>span{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;font-size:15px;font-weight:700}
.quick-chat-dock button svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.quick-chat-dock .quick-chat-link>span{border:2px solid rgba(74,213,153,.9);background:linear-gradient(145deg,#276cb0,#2a3b87);font-size:10px;letter-spacing:.02em}
.quick-chat-dock button>b{
  position:absolute;
  top:-5px;
  right:-4px;
  min-width:17px;
  height:17px;
  display:grid;
  place-items:center;
  padding:0 4px;
  border:2px solid #3449a8;
  border-radius:10px;
  background:#f35b4e;
  color:#fff;
  font-size:9px;
  line-height:1;
}
@media(max-width:800px){.quick-chat-dock{display:none!important}}

/* Authoritative typography */
:root{--ui-font-family:"Open Sans","Segoe UI",Arial,sans-serif}
html,body,button,input,select,textarea{font-family:var(--ui-font-family)!important;font-synthesis:none}
html,body{font-size:14px;font-weight:400;line-height:1.4}
strong,b{font-weight:600}
.sidebar .sidebar-brand strong{font-family:var(--ui-font-family);font-size:18px;font-weight:600;letter-spacing:-.015em}
.sidebar .sidebar-brand span{font-family:var(--ui-font-family);font-size:8px;font-weight:400}
.sidebar .nav-item,.sidebar .nav-item.crm-hub{min-height:41px;font-family:var(--ui-font-family);font-size:14px;font-weight:400;line-height:1.25}
.sidebar .nav-item.active,.sidebar .nav-item.crm-hub.active{font-weight:600}
.sidebar .nav-item i svg{width:20px;height:20px}
.product-nav button,.clients-menu summary{font-family:var(--ui-font-family);font-size:13px;font-weight:400}
.page-head h1,.detail-title h1,.deals-surface .deals-title h1{font-size:26px;font-weight:600}

/* Procurement request layout */


.procurement-downloads{display:flex;gap:8px;flex-wrap:wrap}
.rfq-currencies{display:flex;align-items:center;gap:16px;margin:12px 0;padding:12px 16px;border:1px solid #dce7ed;border-radius:10px;background:#f7fafc}
.rfq-currencies legend{padding:0 6px;color:#4b6472;font-size:12px;font-weight:600}
.rfq-currencies label{display:flex;align-items:center;gap:5px;font-size:12px}
.proc-request label{display:block;margin-top:9px;color:#57707d;font-size:11px}
.proc-request label input,.proc-request label textarea{width:100%;margin-top:4px;padding:8px;border:1px solid #d5e2e8;border-radius:7px;background:#fff;font:inherit}
.quote-expired-warning{padding:6px 2px}.quote-expired-warning strong{display:block;color:#c13e36;font-size:16px}.quote-expired-warning p{margin:10px 0 0;line-height:1.5}
@media(max-width:800px){.rfq-currencies{align-items:flex-start;flex-direction:column;gap:8px}}


/* v58: secure auth boot and role-safe workspace */
.auth-pending{background:#142970}
.auth-pending body{overflow:hidden}
.auth-pending .app-shell,.auth-pending .quick-chat-dock,.auth-pending .modal-root,.auth-pending .toast-root{visibility:hidden!important}
.auth-boot{position:fixed;z-index:9999;inset:0;display:grid;place-items:center;background:linear-gradient(135deg,rgba(12,34,104,.9),rgba(30,75,157,.78)),url('./assets/aks-night-background.jpg') center/cover no-repeat;color:#fff;transition:opacity .18s ease}
.auth-ready .auth-boot{display:none}
.auth-boot>div{display:grid;justify-items:center;gap:12px;padding:28px 34px;border:1px solid rgba(255,255,255,.2);border-radius:18px;background:rgba(10,27,82,.4);box-shadow:0 18px 55px rgba(4,14,54,.35);backdrop-filter:blur(14px)}
.auth-boot span{display:grid;place-items:center;width:58px;height:58px;border-radius:16px;background:#fff;color:#176fa8;font-size:19px;font-weight:800}.auth-boot strong{font-size:14px;font-weight:600}.auth-boot i{width:34px;height:3px;overflow:hidden;border-radius:3px;background:rgba(255,255,255,.24)}.auth-boot i:after{content:'';display:block;width:14px;height:3px;border-radius:3px;background:#5fd0ff;animation:auth-progress .85s ease-in-out infinite alternate}@keyframes auth-progress{from{transform:translateX(0)}to{transform:translateX(20px)}}
.auth-unavailable{width:min(430px,calc(100vw - 28px));padding:28px;border:1px solid #d4e2e9;border-radius:16px;background:#fff;box-shadow:0 18px 54px rgba(10,38,75,.18)}
.auth-unavailable p{margin:18px 0;color:#617985;font-size:13px;line-height:1.55}.auth-unavailable .primary{width:100%;height:46px}


.permission-summary{padding:10px 12px;border-radius:8px;background:#f0f7fb;color:#466776!important}


/* v59: file storage settings and actionable-control audit */
.sidebar-more-menu{position:absolute;left:14px;bottom:148px;z-index:18;display:grid;width:198px;padding:7px;border:1px solid rgba(255,255,255,.22);border-radius:10px;background:#273a9a;box-shadow:0 14px 32px rgba(8,17,68,.35)}
.sidebar-more-menu[hidden]{display:none}.sidebar-more-menu button{min-height:37px;padding:0 11px;border:0;border-radius:7px;background:transparent;color:#eef2ff;text-align:left}.sidebar-more-menu button:hover{background:rgba(255,255,255,.13)}
.app-shell.sidebar-collapsed{grid-template-columns:76px minmax(0,1fr)}.app-shell.sidebar-collapsed .sidebar{width:76px}.app-shell.sidebar-collapsed .sidebar-brand{justify-content:center}.app-shell.sidebar-collapsed .sidebar-brand>div,.app-shell.sidebar-collapsed .sidebar .nav-item>span,.app-shell.sidebar-collapsed .sidebar .nav-count,.app-shell.sidebar-collapsed .sidebar-footer .user-card>div,.app-shell.sidebar-collapsed .sidebar .sidebar-settings span{display:none}.app-shell.sidebar-collapsed .sidebar .nav-item,.app-shell.sidebar-collapsed .sidebar-footer .user-card{justify-content:center}.app-shell.sidebar-collapsed .kanban-fixed-nav{left:94px}
.editor-preview-tabs span{display:flex;align-items:center;min-width:max-content;padding:0 13px;color:#7d8b92;font-size:13px}.editor-preview-tabs span.active{border-bottom:2px solid #29a9df;color:#167fb1;font-weight:700}
.storage-settings{display:grid;grid-template-columns:minmax(320px,.75fr) minmax(520px,1.25fr);gap:14px;align-items:start}.storage-settings>section{padding:0 18px 18px;border:1px solid #cfdee6;border-radius:10px;background:#fff;box-shadow:0 2px 7px rgba(38,77,96,.05)}.storage-settings>section>header{min-height:70px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid #e3ebef}.storage-settings>section>header strong,.storage-settings>section>header span{display:block}.storage-settings>section>header strong{color:#244b60;font-size:15px}.storage-settings>section>header span{max-width:560px;margin-top:4px;color:#78909d;font-size:11px;line-height:1.45}
.storage-status{display:grid;grid-template-columns:38px 1fr;align-items:center;gap:12px;margin-top:16px;padding:14px;border:1px solid #d8e5eb;border-radius:9px;background:#f7fafc}.storage-status>i{display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:#dfeaf0;color:#4d7588;font-style:normal;font-weight:800}.storage-status strong,.storage-status span{display:block}.storage-status strong{color:#294b5c;font-size:14px}.storage-status span{margin-top:4px;color:#708793;font-size:12px}.storage-status.connected{border-color:#b9dfc6;background:#f2fbf5}.storage-status.connected>i{background:#20b15a;color:#fff}.storage-status.warning{border-color:#f0d79e;background:#fffaf0}.storage-status.warning>i{background:#f0a92f;color:#fff}.storage-status.error{border-color:#f0b7b7;background:#fff5f5}.storage-status.error>i{background:#dc5555;color:#fff}.storage-status.loading>i{font-size:0}.storage-status.loading>i::after{content:'';width:15px;height:15px;border:2px solid #9fb4bf;border-top-color:#178ac0;border-radius:50%;animation:storage-spin .8s linear infinite}@keyframes storage-spin{to{transform:rotate(360deg)}}
.storage-explanation{margin-top:14px;padding:13px;border-radius:8px;background:#edf6fa}.storage-explanation strong{color:#2a5a70;font-size:13px}.storage-explanation p{margin:5px 0 0;color:#617985;font-size:12px;line-height:1.55}.folder-tree-preview{display:grid;gap:7px;margin-top:16px;padding:14px;border:1px dashed #b9ced9;border-radius:8px;background:#f8fbfc}.folder-tree-preview strong{color:#385d70;font-size:12px}.folder-tree-preview span{color:#637b87;font:11px/1.45 monospace}.document-upload-field input[type=file]{padding:8px;background:#f8fbfc}.document-file-name{display:block;margin-top:3px;color:#718792;font-size:10px}.document-file-card{display:grid;grid-template-columns:48px 1fr;align-items:center;gap:12px;margin-top:14px;padding:13px;border:1px solid #d7e4ea;border-radius:8px;background:#f8fbfc}.document-file-card>i{display:grid;place-items:center;width:46px;height:46px;border-radius:7px;background:#dbeef7;color:#167eac;font-style:normal;font-size:11px;font-weight:800}.document-file-card strong,.document-file-card span{display:block}.document-file-card span{margin-top:4px;color:#758b96;font-size:11px}.modal-download-link{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
@media(max-width:980px){.storage-settings{grid-template-columns:1fr}.app-shell.sidebar-collapsed{grid-template-columns:76px minmax(0,1fr)}}

/* Role permission controls */


.permission-grid label.permission-locked{opacity:.58}.permission-grid label.permission-locked input{cursor:not-allowed}


/* Canonical messenger: single layout and motion implementation */
.aks-chat-backdrop{position:fixed;z-index:70;top:52px;right:0;bottom:0;left:238px;opacity:1;background:rgba(17,39,88,.2);backdrop-filter:blur(2px);transition:opacity 380ms cubic-bezier(.22,1,.36,1)}
.aks-chat-surface{position:fixed;z-index:80;top:60px;right:12px;bottom:12px;left:250px;display:grid;grid-template-rows:52px minmax(0,1fr);min-width:0;overflow:hidden;border:1px solid #cfdde6;border-radius:15px;opacity:1;background:#fff;box-shadow:0 20px 58px rgba(14,37,82,.3);transform:translate3d(0,0,0);transform-origin:center bottom;transition:transform 380ms cubic-bezier(.22,1,.36,1),opacity 380ms cubic-bezier(.22,1,.36,1);will-change:transform,opacity}
.aks-chat-surface.aks-chat-opening,.aks-chat-surface.aks-chat-closing{opacity:0;transform:translate3d(0,105vh,0)}
.aks-chat-backdrop.aks-chat-opening,.aks-chat-backdrop.aks-chat-closing{opacity:0}
.aks-chat-close{position:absolute;z-index:5;top:8px;right:12px;display:grid;place-items:center;width:36px;height:36px;padding:0;border:1px solid #d8e4ea;border-radius:50%;background:#f5f8fa;color:#708692;font:25px/1 Arial,sans-serif;cursor:pointer}
.aks-chat-close:hover{background:#e9f2f6;color:#315a6c}
.aks-chat-tabs{display:flex;align-items:stretch;gap:4px;padding:0 58px 0 14px;border-bottom:1px solid #dce6eb;background:#fff}
.aks-chat-tabs button{height:52px;padding:0 14px;border:0;border-bottom:2px solid transparent;background:transparent;color:#536c79;font-size:13px;font-weight:400}
.aks-chat-tabs button:hover{color:#167fac}.aks-chat-tabs button.active{border-bottom-color:#27a9df;color:#167fac;font-weight:600}
.aks-chat-tabs .aks-chat-sound{margin-left:auto;color:#2c7da4;font-size:12px}
.aks-chat-layout{display:grid;grid-template-columns:350px minmax(0,1fr);min-width:0;min-height:0;background:#fff}
.aks-chat-list{min-width:0;min-height:0;overflow-y:auto;border-right:1px solid #d8e3e9;background:#fff}
.aks-chat-list-tools{position:sticky;z-index:2;top:0;display:grid;grid-template-columns:32px minmax(0,1fr) 32px;align-items:center;gap:7px;height:62px;padding:8px 10px;border-bottom:1px solid #e4ecef;background:#fff}
.aks-chat-list-tools>button{display:grid;place-items:center;width:32px;height:38px;padding:0;border:0;border-radius:50%;background:transparent;color:#718793;font-size:20px}.aks-chat-list-tools>button:hover{background:#edf5f9;color:#168ac5}
.aks-chat-search{display:flex;align-items:center;gap:7px;height:38px;padding:0 11px;border:1px solid #d8e4ea;border-radius:20px;background:#f7f9fa}.aks-chat-search span{color:#8a9aa2;font-size:17px}.aks-chat-search input{min-width:0;width:100%;height:34px;padding:0;border:0;outline:0;background:transparent;color:#334d5a;font-size:12px}
.aks-chat-row{position:relative;display:grid;grid-template-columns:50px minmax(0,1fr) auto;align-items:center;gap:10px;width:calc(100% - 14px);min-height:76px;margin:4px 7px;padding:9px 10px;border:0;border-radius:9px;background:#fff;color:#334c59;text-align:left}.aks-chat-row:hover{background:#f0f7fb}.aks-chat-row.active{background:#1698e5;color:#fff;box-shadow:0 5px 14px rgba(18,137,207,.2)}
.aks-chat-avatar{display:grid;place-items:center;width:46px;height:46px;flex:0 0 46px;border:2px solid #2abf73;border-radius:50%;background:linear-gradient(145deg,#247ca8,#315f96);color:#fff;font-size:12px;font-weight:700}.aks-chat-row.active .aks-chat-avatar{border-color:#fff;box-shadow:0 0 0 2px rgba(255,255,255,.36)}
.aks-chat-row>div{min-width:0;padding-right:35px}.aks-chat-row strong,.aks-chat-row div>span,.aks-chat-row small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.aks-chat-row strong{font-size:13px}.aks-chat-row div>span{margin-top:4px;color:#7d909a;font-size:11px}.aks-chat-row small{position:absolute;top:11px;right:10px;color:#8da0a9;font-size:9px}.aks-chat-row.active div>span,.aks-chat-row.active small{color:rgba(255,255,255,.84)}.aks-chat-row>b{display:grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:#e95757;color:#fff;font-size:10px}
.aks-chat-list-empty,.aks-chat-empty,.aks-chat-conversation-empty{display:grid;place-items:center;align-content:center;gap:5px;color:#69808c;text-align:center}.aks-chat-list-empty{padding:34px 18px}.aks-chat-empty,.aks-chat-conversation-empty{min-height:180px}.aks-chat-list-empty span,.aks-chat-empty span,.aks-chat-conversation-empty span{font-size:11px}
.aks-chat-room{display:grid;grid-template-rows:72px minmax(0,1fr) auto;min-width:0;min-height:0;height:100%;background:#fff}
.aks-chat-room>header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:9px 20px;border-bottom:1px solid #dce7ec;background:#fff}
.aks-chat-room-title{display:flex;align-items:center;gap:12px;min-width:0}.aks-chat-room-title>div{min-width:0}.aks-chat-room-title h2{margin:0;overflow:hidden;color:#263f4d;font-size:16px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.aks-chat-room-title button{padding:0;border:0;background:transparent;color:#1886bd;font-size:10px}.aks-chat-room-title small{margin-left:7px;color:#91a1a8;font-size:9px}.aks-chat-room-actions{display:flex;gap:8px}.aks-chat-room-actions button{min-height:32px;padding:0 12px;border-radius:17px;font-size:11px}
.aks-chat-messages{min-width:0;min-height:0;overflow-y:auto;padding:22px clamp(20px,4vw,64px) 30px;background-color:#77abe0;background-image:linear-gradient(135deg,rgba(255,255,255,.04) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.04) 50%,rgba(255,255,255,.04) 75%,transparent 75%),radial-gradient(circle at 18px 18px,rgba(255,255,255,.1) 0 2px,transparent 2.5px);background-size:42px 42px,58px 58px}
.aks-chat-day{position:sticky;z-index:2;top:0;display:flex;justify-content:center;margin-bottom:16px}.aks-chat-day span{padding:5px 13px;border-radius:14px;background:rgba(47,91,137,.52);color:#fff;font-size:10px;font-weight:600}
.aks-chat-stream{display:flex;flex-direction:column;width:min(720px,100%);margin:0 auto}.aks-chat-message{align-self:flex-start;display:grid;grid-template-columns:36px minmax(110px,auto);align-items:end;gap:8px;width:fit-content;max-width:100%;margin:0 0 11px}.aks-chat-message-avatar{display:grid;place-items:center;width:34px;height:34px;border:2px solid #fff;border-radius:50%;background:#287aaa;color:#fff;font-size:10px;font-weight:700}.aks-chat-bubble{min-width:118px;max-width:min(610px,calc(100vw - 720px));padding:9px 12px 7px;border-radius:5px 12px 12px 12px;background:#fff;box-shadow:0 1px 4px rgba(30,66,106,.24)}.aks-chat-message.mine .aks-chat-bubble{background:#e8ffc5}.aks-chat-bubble strong{display:block;color:#2481b3;font-size:11px;font-weight:600}.aks-chat-message.mine .aks-chat-bubble strong{color:#19915a}.aks-chat-bubble p{margin:3px 0;color:#283d48;font-size:14px;line-height:1.4;white-space:pre-wrap}.aks-chat-message-time{display:block;margin:2px 0 0 18px;color:#83959d;text-align:right;font-size:9px}
.aks-chat-compose{position:relative;display:grid;grid-template-columns:40px minmax(0,1fr) 50px;align-items:end;gap:8px;min-height:72px;padding:9px 16px;border-top:1px solid #d7e4ea;background:#fff}.aks-chat-attach{display:grid;place-items:center;width:38px;height:50px;color:#718995;font-size:21px;cursor:pointer}.aks-chat-attach input{display:none}.aks-chat-compose-field{position:relative;min-width:0}.aks-chat-compose textarea{width:100%;height:50px;min-height:50px;max-height:120px;padding:12px 12px 18px;border:1px solid #cbdde6;border-radius:12px;outline:0;resize:none;background:#fff;font:13px/1.35 var(--ui-font-family)}.aks-chat-compose textarea:focus{border-color:#35abe1;box-shadow:0 0 0 2px rgba(53,171,225,.12)}.aks-chat-compose-field small{position:absolute;right:10px;bottom:4px;color:#96a5ac;font-size:8px}.aks-chat-compose .primary{display:grid;place-items:center;width:48px;height:48px;min-height:48px;padding:0;overflow:hidden;border-radius:50%;font-size:0}.aks-chat-compose .primary:after{content:'➤';color:#fff;font-size:20px}
.aks-chat-pending-files{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:7px;padding:4px 0}.aks-chat-pending-files>span{display:grid;grid-template-columns:auto minmax(80px,1fr) auto auto;align-items:center;gap:7px;max-width:360px;padding:6px 8px;border:1px solid #d7e4ea;border-radius:8px;background:#f7fafc}.aks-chat-pending-files>span>i{color:#1584b8;font-size:10px;font-style:normal;font-weight:700}.aks-chat-pending-files>span>b{overflow:hidden;font-size:11px;text-overflow:ellipsis;white-space:nowrap}.aks-chat-pending-files>span>small{color:#80939d;font-size:9px}.aks-chat-pending-files button{border:0;background:transparent;color:#78909c;font-size:16px}
.aks-chat-bubble .message-attachments{display:grid;gap:6px;margin-top:7px}.aks-chat-bubble .message-attachments a{display:grid;grid-template-columns:34px minmax(0,1fr);align-items:center;gap:8px;padding:7px;border-radius:8px;background:rgba(36,129,179,.08);color:#315466;text-decoration:none}.aks-chat-bubble .message-attachments i{display:grid;place-items:center;width:32px;height:32px;border-radius:6px;background:#d9edf7;color:#167fac;font-size:9px;font-style:normal;font-weight:700}.aks-chat-bubble .message-attachments b,.aks-chat-bubble .message-attachments small{display:block}.aks-chat-bubble .message-attachments small{color:#77909c;font-size:9px}
body:has(.app-shell.sidebar-collapsed) .aks-chat-backdrop{left:76px}body:has(.app-shell.sidebar-collapsed) .aks-chat-surface{left:88px}
@media(max-width:1180px){.aks-chat-layout{grid-template-columns:300px minmax(0,1fr)}.aks-chat-bubble{max-width:min(560px,calc(100vw - 520px))}}
@media(max-width:800px){.aks-chat-backdrop{inset:52px 0 0}.aks-chat-surface{inset:58px 6px 6px;left:6px}.aks-chat-layout{grid-template-columns:112px minmax(0,1fr)}.aks-chat-list-tools{grid-template-columns:1fr}.aks-chat-list-tools>button{display:none}.aks-chat-row{grid-template-columns:46px;justify-items:center;padding:8px 4px}.aks-chat-row>div,.aks-chat-row>b{display:none}.aks-chat-tabs{padding-left:6px}.aks-chat-tabs button{padding:0 8px}.aks-chat-tabs .aks-chat-sound{display:none}.aks-chat-room-actions{display:none}.aks-chat-messages{padding-inline:12px}.aks-chat-stream{width:100%}.aks-chat-bubble{max-width:calc(100vw - 210px)}}
@media(prefers-reduced-motion:reduce){.aks-chat-surface,.aks-chat-backdrop{animation:none;transition:none}}
