/* Вид — как у самого TRAIO (platform/web/src/styles.css): меню полосой слева, шапка с крошками, плиты со срезом.
   Скриптов нет: меню всегда раскрыто, на узком экране — одни значки. */
@font-face { font-family: "Onest"; font-style: normal; font-display: swap; font-weight: 400; src: url(/static/fonts/onest-cyrillic-ext-400-normal.woff2) format("woff2"); unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F; }
@font-face { font-family: "Onest"; font-style: normal; font-display: swap; font-weight: 400; src: url(/static/fonts/onest-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-display: swap; font-weight: 400; src: url(/static/fonts/onest-latin-400-normal.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: "Onest"; font-style: normal; font-display: swap; font-weight: 500; src: url(/static/fonts/onest-cyrillic-ext-500-normal.woff2) format("woff2"); unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F; }
@font-face { font-family: "Onest"; font-style: normal; font-display: swap; font-weight: 500; src: url(/static/fonts/onest-cyrillic-500-normal.woff2) format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-display: swap; font-weight: 500; src: url(/static/fonts/onest-latin-500-normal.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: "Onest"; font-style: normal; font-display: swap; font-weight: 600; src: url(/static/fonts/onest-cyrillic-ext-600-normal.woff2) format("woff2"); unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F; }
@font-face { font-family: "Onest"; font-style: normal; font-display: swap; font-weight: 600; src: url(/static/fonts/onest-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-display: swap; font-weight: 600; src: url(/static/fonts/onest-latin-600-normal.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; }

/* цвета и шкалы — те же, что в продукте; --accent — красный из презентации TRAIO (#e92b2b), только главная кнопка страницы */
:root {
  --bg: #08090b; --rail: #0b0c0f; --panel: #0e1013; --plate: #121418; --edge: #1b1d22;
  --line: #262a31; --line2: #1a1d22; --frame: #2c3038; --frame-end: #15171b;
  --t1: #e4e7eb; --t2: #a4abb5; --t3: #7b838e; --read: #d3d7dd; --lit: #ffffff; --cut: #aaaaaa;
  --field: #0a0b0d; --fill: #1e2126; --rim: #343941; --pop: #191b20;
  --ok: #3fd08a; --bad: #ff3344; --badx: #ff7a84; --amb: #e8a93e;
  --accent: #e92b2b; --on-accent: #ffffff;
  --veil-3: rgba(255, 255, 255, 0.07); --glow-hi: rgba(255, 255, 255, 0.6); --shade-in: rgba(0, 0, 0, 0.5);
  --sans: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #fafafa; --rail: #fafafa; --panel: #ffffff; --plate: #ffffff; --edge: #eaeaea;
    --line: #e0e0e0; --line2: #eaeaea; --frame: #eaeaea; --frame-end: #eaeaea;
    --t1: #171717; --t2: #4d4d4d; --t3: #666666; --read: #4d4d4d; --lit: #171717; --cut: #8a8a8a;
    --field: #ffffff; --fill: #f2f2f2; --rim: #c9c9c9; --pop: #ffffff;
    --ok: #0a7a3f; --bad: #c8102e; --badx: #a50d26; --amb: #b45309;
    --veil-3: #0000001a; --glow-hi: #0000003d; --shade-in: #00000014;
    color-scheme: light;
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--t1); font: 14px/1.43 var(--sans); }

/* знак и буквы */
.m-lit { fill: var(--lit); }
.m-dim { fill: var(--t3); }
.m-cut { fill: var(--cut); }
.mark, .word { flex: none; }
/* знак семейства: буквы TRAIO как в меню продукта, после них плашка сайта по высоте букв; буквы в плашке — цветом фона меню.
   Буквы плашек нарисованы по одной сетке: строчные 10 px, линия 2 px, просветы 2 px.
   На узком экране остаётся один треугольник продукта. */
.m-ink { stroke: var(--rail); }
.word-my { flex: none; width: 31px; height: 16.4px; }
.word-partners { flex: none; width: 70.4px; height: 16.4px; }
.rail-mark .word, .solo-mark .word { width: 74px; height: 16.4px; }
.rail-mark .mark, .solo-mark .mark { display: none; }

/* вход: одна колонка по центру, знак над формой */
.solo { max-width: 360px; margin: 0 auto; padding: 96px 16px 64px; }
.solo-mark { display: flex; align-items: center; gap: 8px; margin: 0 0 32px; }

/* каркас: меню, шапка, поле */
.shell { display: flex; height: 100%; overflow: hidden; }
.rail { position: relative; z-index: 4; flex: none; width: 188px; display: flex; flex-direction: column; background: var(--rail); }
/* линия меню и линия шапки сходятся срезом 14 px, к концам — тише */
.rail::before { content: ""; position: absolute; right: 0; top: 62px; bottom: 0; width: 1px; pointer-events: none; background: linear-gradient(180deg, var(--frame), var(--frame-end)); }
.rail-mark { flex: none; display: flex; align-items: center; gap: 8px; height: 48px; padding-left: 13px; overflow: hidden; text-decoration: none; }
.rail-list { flex: 1; min-height: 0; padding-top: 16px; overflow-x: hidden; overflow-y: auto; scrollbar-width: none; }
.rail-item { position: relative; display: flex; align-items: center; justify-content: flex-start; gap: 12px; width: 100%; height: 40px; padding: 0 12px 0 18px; overflow: hidden;
  border: 0; background: none; clip-path: none; color: var(--t2); font: 400 14px var(--sans); text-align: left; text-decoration: none; white-space: nowrap; cursor: pointer; }
.rail-item svg { flex: none; }
.rail-item span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rail-item:hover { color: var(--t1); }
.rail-item[aria-current="page"] { color: var(--t1); background: linear-gradient(270deg, var(--veil-3), transparent); }
.rail-item[aria-current="page"]::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 2px; background: var(--lit); box-shadow: 0 0 10px var(--glow-hi); }
.rail-item:focus-visible { outline: 1px solid var(--t2); outline-offset: -3px; }
.user { flex: none; display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 12px; overflow: hidden; }
.avatar { flex: none; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: var(--fill); box-shadow: inset 0 0 0 1px var(--line); color: var(--t1); font: 600 12px var(--sans); }
.user-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.user-who span, .user-who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-who small { color: var(--t2); font-size: 12px; }
.rail form { display: block; margin: 0 0 8px; }
.body { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; }
.body::before { content: ""; position: absolute; left: 0; top: 48px; width: 14px; height: 14px; pointer-events: none; z-index: 1; background: var(--rail); clip-path: polygon(0 0, 100% 0, 0 100%); }
.body::after { content: ""; position: absolute; left: -1px; top: 48px; width: 15px; height: 15px; pointer-events: none; z-index: 2;
  background: linear-gradient(to bottom right, transparent calc(50% - 0.7px), var(--frame) 50%, transparent calc(50% + 0.7px)); }
.topbar { flex: none; position: relative; z-index: 4; display: flex; align-items: center; gap: 16px; height: 48px; padding: 0 24px; background: var(--rail); }
.topbar::after { content: ""; position: absolute; left: 13px; right: 0; bottom: -1px; height: 1px; pointer-events: none; background: linear-gradient(90deg, var(--frame), var(--frame) 30%, var(--frame-end)); }
.crumbs { display: flex; align-items: center; gap: 12px; min-width: 0; }
.crumb { display: inline-flex; align-items: center; min-width: 0; height: 32px; padding: 0 12px; overflow: hidden; background: var(--plate); box-shadow: inset 0 0 0 1px var(--line2);
  color: var(--t1); font-weight: 600; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
a.crumb:hover { box-shadow: inset 0 0 0 1px var(--t2); }
.crumb-sep { flex: none; color: var(--t3); font: 14px var(--mono); }
.main { flex: 1; min-height: 0; overflow: auto; padding: 24px 32px 48px; }
.main > * { max-width: 1040px; }

/* текст */
h1 { margin: 0 0 24px; font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -0.01em; }
h2 { margin: 32px 0 12px; font-size: 16px; line-height: 24px; font-weight: 600; }
p { margin: 0 0 16px; color: var(--read); }
a { color: var(--t1); text-underline-offset: 3px; }
code, .sum { font: 13px/20px var(--mono); }
.sum { word-break: break-all; }
.err { color: var(--badx); }
.ok { color: var(--t1); }
.hint { color: var(--t2); }
.label { margin: 0; font: 500 12px/16px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--t2); }
pre { margin: 0 0 16px; padding: 12px 16px; background: var(--field); box-shadow: inset 0 0 0 1px var(--line); font: 13px/20px var(--mono); white-space: pre-wrap; word-break: break-all; }

/* таблицы: подписи колонок моноширинные, строки тонкой чертой */
table { width: 100%; margin: 0 0 16px; border-collapse: collapse; }
th { padding: 0 16px 8px 0; text-align: left; font: 500 12px/16px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--t2); }
td, tbody th { padding: 12px 16px 12px 0; border-top: 1px solid var(--line2); vertical-align: middle; }
tbody th { width: 200px; }
td form { display: block; }
.num { text-align: right; }
td.acts { text-align: right; white-space: nowrap; }
td.acts > * { display: inline-flex; margin-left: 12px; vertical-align: middle; }
div.acts { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
div.acts form { display: block; }

/* поля и кнопки: высота 40, главная кнопка — со срезом угла */
form { display: grid; gap: 12px; }
label { font-size: 12px; line-height: 16px; color: var(--t2); }
input, select, textarea { height: 40px; padding: 0 12px; border: 0; border-radius: 0; outline: none; background: var(--field);
  box-shadow: inset 0 0 0 1px var(--line), inset 0 2px 6px var(--shade-in); color: var(--t1); font: 14px var(--sans); }
input:focus-visible, select:focus-visible, textarea:focus-visible { box-shadow: inset 0 0 0 1px var(--t2); }
textarea { display: block; width: 100%; height: auto; padding: 8px 12px; font: 13px/20px var(--mono); resize: vertical; }
input[type="checkbox"] { width: 16px; height: 16px; padding: 0; box-shadow: none; accent-color: var(--accent); }
button, .btn { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 24px; border: 0; border-radius: 0; background: var(--accent); color: var(--on-accent);
  font: 500 14px var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer; clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%); }
button:focus-visible, .btn:focus-visible { outline: 1px solid var(--t2); outline-offset: 3px; }
.second { position: relative; isolation: isolate; background: var(--rim); color: var(--t1); }
.second::before { content: ""; position: absolute; inset: 1px; z-index: -1; background: linear-gradient(180deg, var(--pop), var(--plate)); clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%); }
.second:hover::before { background: linear-gradient(180deg, var(--line), var(--pop)); }
/* в поле страницы кнопка — по ширине подписи; во всю ширину она только на входе */
.main form > button { justify-self: start; }
.link { height: auto; padding: 0; background: none; clip-path: none; color: var(--t1); font-weight: 400; text-decoration: underline; text-underline-offset: 3px; }
td .btn, td button:not(.link) { height: 32px; padding: 0 16px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; }
.row > input { flex: 1 1 220px; }
.check { display: flex; align-items: center; gap: 8px; color: var(--t1); font-size: 14px; }

/* заявка на сделку: поля с подписью сверху, по два-три в ряд; длинный текст — обычным шрифтом */
.wide { max-width: 760px; }
.field { display: grid; gap: 4px; min-width: 0; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; align-items: end; }
textarea.text { font: 14px/20px var(--sans); }
.wide h2 { margin: 12px 0 0; }
/* решение сотрудника: поле и кнопка в одну строку, решения — одно под другим */
.pair { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.pair.short { grid-template-columns: 160px auto; justify-content: start; }
.pair + .pair { margin-top: 16px; }
.lines { white-space: pre-wrap; }
.state { display: inline-flex; align-items: center; gap: 8px; }
.head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 24px; }
.head h1 { margin: 0; }
.facts { max-width: 760px; }
.facts td { color: var(--read); }

/* главная заказчика: плиты «что у меня есть» с одним действием на каждой */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.tile { min-width: 0; padding: 1px; background: var(--edge); clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%); }
.tile-in { display: flex; flex-direction: column; gap: 12px; height: 100%; padding: 16px 24px 24px; background: var(--panel); clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%); }
.tile-main { display: flex; align-items: center; gap: 8px; font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -0.01em; }
.tile-note { flex: 1; color: var(--t2); }
.tile-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 4px; }
.tile-acts form { display: block; }
.dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--t3); }
.dot.ok { background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.dot.warn { background: var(--amb); box-shadow: 0 0 6px var(--amb); }
.dot.bad { background: var(--bad); box-shadow: 0 0 10px var(--bad); }

/* узкий экран: меню — одни значки, подписи в подсказке */
@media (max-width: 860px) {
  .rail { width: 56px; }
  .word, .word-my, .word-partners, .rail-item span, .user-who { display: none; }
  .rail-mark .mark { display: block; }
  .topbar { padding: 0 16px; }
  .main { padding: 16px 16px 48px; }
  tbody th { width: auto; }
  th:nth-child(2), td:nth-child(2) { word-break: break-all; }
}
