/* help.compnets.ru — плиточный интерфейс в бренде COMPNETS.
   Метро-логика: квадратные плитки, без радиусов и теней, крупные цифры, моно-подписи. */

@import url('fonts/fonts.css');

:root {
  --red: #97070a;
  --red-2: #c10d13;
  --red-3: #d0191e;
  --ink: #100e0f;
  --ink-2: #1b1618;
  --ink-3: #2a2224;
  --paper: #f7f3ef;
  --paper-2: #efe7df;
  --sand: #e7dbcf;
  --white: #fff;
  --text: #191415;
  --muted: #6e6461;
  --muted-d: rgba(255, 255, 255, .6);
  --line: rgba(25, 20, 21, .16);
  --line-d: rgba(255, 255, 255, .14);
  --display: 'Unbounded', system-ui, sans-serif;
  --body: 'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --pad: clamp(16px, 4vw, 48px);
  --w: 1320px;
  --tile-gap: 6px;
  --ease: cubic-bezier(.2, .6, .35, 1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  background: var(--paper);
  color: var(--text);
}
body.body-agent { background: var(--ink); color: var(--paper); }
body.body-auth { background: var(--ink); color: var(--paper); }

a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
::selection { background: var(--red); color: #fff; }

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

.mono, .tile__k, .field__k, .hello__k, .side__k, .block__meta, .err__code {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 10.5px;
  font-weight: 400;
}

/* ── общие блоки ─────────────────────────────────────── */
.inline { display: inline; margin: 0; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); color: inherit;
}
.brand svg { width: 30px; height: auto; flex: none; }
.brand span { display: flex; flex-direction: column; line-height: 1; }
.brand b { font-weight: 500; font-size: 13px; letter-spacing: .16em; }
.brand small {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .18em;
  text-transform: uppercase; opacity: .55; margin-top: 5px;
}
.brand--lg svg { width: 42px; }
.brand--lg b { font-size: 16px; }

/* ── авторизация ─────────────────────────────────────── */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.auth__brand {
  background:
    radial-gradient(110% 80% at 80% 12%, rgba(151, 7, 10, .5), transparent 60%),
    var(--ink);
  padding: clamp(28px, 5vw, 64px);
  display: flex; flex-direction: column; gap: 26px;
  position: relative; overflow: hidden;
}
.auth__brand::before {
  content: ''; position: absolute; inset: 0; opacity: .5;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(80% 60% at 55% 30%, #000, transparent 78%);
  -webkit-mask-image: radial-gradient(80% 60% at 55% 30%, #000, transparent 78%);
  pointer-events: none;
}
.auth__brand > * { position: relative; }
.auth__title {
  font-family: var(--display); font-weight: 500; letter-spacing: -.035em;
  font-size: clamp(2rem, 3.6vw, 3.4rem); line-height: 1.02; margin-top: auto;
}
.dot { color: var(--red-3); }
.auth__lead { color: rgba(255,255,255,.66); max-width: 38ch; font-size: 15.5px; }
.auth__tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--tile-gap); }
.mini {
  background: rgba(255,255,255,.05); border: 1px solid var(--line-d);
  padding: 14px 12px; display: flex; flex-direction: column; gap: 8px; min-height: 92px;
}
.mini b { font-family: var(--mono); font-size: 10px; color: var(--red-3); font-weight: 400; letter-spacing: .1em; }
.mini span { font-size: 13px; color: rgba(255,255,255,.72); line-height: 1.35; }
.auth__foot { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.32); margin-top: auto; }
.auth__foot a { color: rgba(255,255,255,.62); border-bottom: 1px solid rgba(255,255,255,.28); }
.auth__foot a:hover { color: #fff; border-color: #fff; }

.auth__panel {
  background: var(--paper); color: var(--text);
  display: flex; flex-direction: column; justify-content: center; gap: 18px;
  padding: clamp(24px, 4vw, 56px);
}
.auth__panel > * { width: 100%; max-width: 420px; }

.panel__site {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 20px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase;
}
.panel__site a { color: var(--muted); border-bottom: 1px solid rgba(25,20,21,.22); padding-bottom: 2px; transition: color .18s, border-color .18s; }
.panel__site a:hover { color: var(--red); border-color: var(--red); }
.panel__site span { color: rgba(25,20,21,.32); }

.panel__h { font-family: var(--display); font-weight: 500; font-size: 1.6rem; letter-spacing: -.02em; }
.panel__sub { color: var(--muted); font-size: 14.5px; margin-top: 8px; margin-bottom: 22px; }
.panel__alt { font-size: 14px; color: var(--muted); margin-top: 18px; }
.panel__alt a { color: var(--red); border-bottom: 1px solid rgba(151,7,10,.35); }

.panel-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--tile-gap); }
.pt {
  background: var(--white); border: 1px solid var(--line); padding: 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.pt b { font-family: var(--display); font-size: 15px; font-weight: 500; }
.pt span { font-size: 12px; color: var(--muted); line-height: 1.3; }
.pt--red { background: var(--red); border-color: var(--red); color: #fff; }
.pt--red span { color: rgba(255,255,255,.8); }
.pt--ink { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.pt--ink span { color: rgba(255,255,255,.65); }

/* ── формы ───────────────────────────────────────────── */
.form { display: flex; flex-direction: column; gap: 14px; }
.form--wide { max-width: 760px; }
.form--reply { margin-top: 22px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field__k { color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; font-size: 15.5px; color: var(--text);
  background: #fff; border: 1px solid rgba(25,20,21,.22); border-radius: 0;
  padding: 12px 13px; min-height: 46px;
  transition: border-color .18s, background .18s;
}
.field textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--red); outline: none; background: #fff;
}
.field input::placeholder, .field textarea::placeholder { color: #a89e99; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field--narrow { max-width: 180px; }
.form--row { flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.form--row .field { flex: 1 1 180px; }
.form__foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.form__hint { font-size: 12.5px; color: var(--muted); }
.form--dark .field__k { color: var(--muted-d); }
.form--dark .field input, .form--dark .field textarea, .form--dark .field select {
  background: var(--ink-2); color: var(--paper); border-color: var(--line-d);
}
.form--dark .field input::placeholder, .form--dark .field textarea::placeholder { color: rgba(255,255,255,.35); }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); line-height: 1.4; }
.check input { margin-top: 3px; width: 15px; height: 15px; accent-color: var(--red); flex: none; }

.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.toggle input { width: 15px; height: 15px; accent-color: var(--red); }
.toggle--dark { color: rgba(255,255,255,.66); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 0 20px; border: 1px solid var(--red); border-radius: 0;
  background: var(--red); color: #fff; font: inherit; font-weight: 600; font-size: 15px;
  cursor: pointer; transition: background .18s, transform .1s;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { background: var(--red-2); border-color: var(--red-2); }
.btn:active { transform: scale(.985); }
.btn--block { width: 100%; }
.btn--sm { min-height: 40px; padding: 0 14px; font-size: 14px; }

.btn-ghost {
  min-height: 38px; padding: 0 14px; background: none; border: 1px solid var(--line);
  border-radius: 0; color: inherit; font: inherit; font-size: 13.5px; cursor: pointer;
  transition: background .18s, border-color .18s;
}
.btn-ghost:hover { background: rgba(0,0,0,.04); border-color: rgba(25,20,21,.32); }
.btn-ghost--dark { border-color: var(--line-d); color: rgba(255,255,255,.8); }
.btn-ghost--dark:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.3); }

.radio-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.radio-tile { position: relative; display: block; }
.radio-tile input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.radio-tile span {
  display: flex; align-items: center; justify-content: center; min-height: 44px;
  background: #fff; border: 1px solid rgba(25,20,21,.22); font-size: 13.5px; color: var(--muted);
  transition: background .15s, color .15s, border-color .15s;
}
.radio-tile input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.radio-tile input:focus-visible + span { outline: 2px solid var(--red-3); outline-offset: 2px; }

/* ── флеш ────────────────────────────────────────────── */
.flash {
  padding: 12px 14px; font-size: 14px; margin-bottom: 18px;
  border-left: 3px solid transparent; background: #fff; border-color: var(--line);
}
.flash--ok { background: #eaf5ee; border-left-color: #1c7a45; color: #14562f; }
.flash--err { background: #fdecec; border-left-color: var(--red); color: #7c0a0c; }
.page--dark .flash--ok, .body-agent .flash--ok { background: rgba(28,122,69,.14); color: #9fe0b8; }
.page--dark .flash--err, .body-agent .flash--err { background: rgba(151,7,10,.22); color: #ffb9b7; }

/* ── шапка ───────────────────────────────────────────── */
.bar {
  display: flex; align-items: center; gap: 22px;
  padding: 0 var(--pad); height: 64px;
  border-bottom: 1px solid var(--line); background: var(--paper);
  position: sticky; top: 0; z-index: 20;
}
.bar--dark { background: var(--ink); border-bottom-color: var(--line-d); color: var(--paper); }
.bar__nav { display: flex; gap: 4px; margin-left: 12px; }
.bar__nav a {
  padding: 8px 14px; font-size: 14px; color: var(--muted);
  border: 1px solid transparent; transition: color .15s, background .15s;
}
.bar--dark .bar__nav a { color: rgba(255,255,255,.6); }
.bar__nav a:hover { color: inherit; background: rgba(0,0,0,.04); }
.bar--dark .bar__nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.bar__nav a.is-on { background: var(--ink); color: var(--paper); }
.bar--dark .bar__nav a.is-on { background: var(--red); color: #fff; }
.bar__right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.who { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); }
.who--dark { color: rgba(255,255,255,.7); }
.who__ava {
  width: 30px; height: 30px; display: grid; place-items: center;
  background: var(--ink); color: var(--paper); font-family: var(--mono); font-size: 11px;
}
.bar--dark .who__ava { background: var(--red); }
.who__mail { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── каркас страниц ──────────────────────────────────── */
.page { max-width: var(--w); margin: 0 auto; padding: clamp(20px, 3vw, 36px) var(--pad) 56px; }
.page--dark { color: var(--paper); }
.foot {
  max-width: var(--w); margin: 0 auto; padding: 20px var(--pad) 34px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line);
}
.foot--dark { border-top-color: var(--line-d); color: rgba(255,255,255,.42); }
.foot a { border-bottom: 1px solid rgba(151,7,10,.3); }

.notice {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--sand); color: var(--text); padding: 12px 16px;
  margin-bottom: var(--tile-gap); font-size: 14px; font-weight: 500;
  transition: filter .15s;
}
.notice:hover { filter: brightness(.97); }
.notice b { font-family: var(--display); font-size: 20px; font-weight: 500; }
.notice span { margin-left: auto; color: var(--red); }

.panel__hint { font-size: 12.5px; color: var(--muted); }
.panel__k {
  display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--red); margin-bottom: 10px;
}

.hello { margin-bottom: 22px; }
.hello__k { color: var(--red); display: block; margin-bottom: 8px; }
.hello--dark .hello__k { color: var(--red-3); }
.hello__h { font-family: var(--display); font-weight: 500; font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -.03em; }

/* ── плитки ──────────────────────────────────────────── */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--tile-gap); }
.tile {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
  min-height: 148px; padding: 18px;
  color: var(--paper); background: var(--ink-2);
  transition: filter .18s var(--ease), transform .12s var(--ease);
}
.tile:hover { filter: brightness(1.1); }
.tile:active { transform: scale(.988); }
.t--2x2 { grid-column: span 2; grid-row: span 2; min-height: 302px; padding: 22px; }
.t--2x1 { grid-column: span 2; }
.t--full { grid-column: 1 / -1; min-height: 0; }
.t--full .tile__t { font-size: 14px; }
.t--red { background: var(--red); }
.t--ink { background: var(--ink); }
.t--ink2 { background: var(--ink-3); }
.t--paper { background: var(--paper); color: var(--text); }
.t--sand { background: var(--sand); color: var(--text); }
.t--paper:hover, .t--sand:hover { filter: brightness(.97); }

.tile__k { opacity: .72; }
.tile__n {
  font-family: var(--display); font-weight: 500; letter-spacing: -.04em;
  font-size: clamp(1.8rem, 3vw, 2.5rem); line-height: 1;
}
.t--2x2 .tile__n { font-size: clamp(3rem, 6.4vw, 5.2rem); }
.tile__t { font-size: 13.5px; line-height: 1.35; opacity: .82; }
.tile__mail { font-size: 15.5px; font-weight: 500; overflow-wrap: anywhere; }
.tile__plus {
  font-family: var(--display); font-size: clamp(2.6rem, 5.4vw, 4.4rem); line-height: .8;
  font-weight: 500; color: rgba(255,255,255,.92);
}
.tile__ico { position: absolute; right: 16px; bottom: 16px; opacity: .5; }
.tile__ico svg { width: 22px; height: 22px; }
.t--2x2 .tile__ico svg { width: 26px; height: 26px; }

/* ── списки и строки ─────────────────────────────────── */
.block { margin-top: 30px; }
.block__head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 12px; }
.block__h { font-family: var(--display); font-weight: 500; font-size: 1.15rem; letter-spacing: -.02em; }
.block__meta { color: var(--muted); }
.block__link { margin-left: auto; font-size: 13.5px; color: var(--red); }
.block--dark .block__link { color: #ff9c99; }

.rows { display: flex; flex-direction: column; gap: 2px; }
.row-t, .row-a {
  display: grid; align-items: center; gap: 16px;
  background: #fff; border: 1px solid var(--line);
  padding: 14px 16px; font-size: 14.5px;
  transition: background .15s, border-color .15s;
}
.row-t { grid-template-columns: 92px minmax(0, 1fr) 110px 104px; }
.row-a { grid-template-columns: 92px minmax(0, 1.6fr) 110px 96px 150px 96px; }
.row-a--static { cursor: default; }

.row-u {
  display: grid; align-items: center; gap: 16px;
  grid-template-columns: 26px minmax(0, 1fr) 158px 132px 112px 92px 104px;
  background: var(--ink-2); border: 1px solid var(--line-d);
  padding: 14px 16px; font-size: 14.5px;
}
.row-u__tag {
  width: 24px; height: 24px; display: grid; place-items: center;
  font-family: var(--mono); font-size: 11px; color: #ff9c99;
  border: 1px solid rgba(255,255,255,.2);
}
.row-u__name { font-weight: 500; }
.row-u__name small { display: block; font-weight: 400; font-size: 12px; color: rgba(255,255,255,.45); margin-top: 3px; }
.row-u__login, .row-u__date { font-size: 12.5px; color: rgba(255,255,255,.45); }
.row-u form { margin: 0; }
.row-u__role select, .role-sel {
  width: 100%; background: var(--ink-3); color: var(--white);
  border: 1px solid rgba(255, 255, 255, .22); padding: 6px 8px;
  font-family: var(--body); font-size: 12.5px; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, rgba(255,255,255,.55) 50%),
                    linear-gradient(135deg, rgba(255,255,255,.55) 50%, transparent 50%);
  background-position: calc(100% - 14px) 52%, calc(100% - 9px) 52%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
  cursor: pointer; transition: border-color .2s, background-color .2s;
}
.row-u__role select:hover { border-color: rgba(255, 255, 255, .45); }
.row-u__role select:focus { outline: none; border-color: var(--red-2); }
.row-u__role option { background: var(--ink-2); color: var(--white); }
.side--danger { border-left: 3px solid var(--red-2); }
.btn-tile.btn-tile--danger { border-color: rgba(255, 90, 90, .55); color: #ff9a97; }
.btn-tile.btn-tile--danger:hover { background: var(--red); border-color: var(--red); color: #fff; }
.row-u__name a { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .2s; }
.row-u__name a:hover { border-color: rgba(255, 255, 255, .45); }
.side .form--row { margin-top: 10px; }
.side .side__meta + .form, .side .side__meta + .status-form { margin-top: 10px; }
.role-tag {
  display: inline-block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em;
  text-transform: uppercase; color: rgba(255,255,255,.5);
  border: 1px dashed rgba(255,255,255,.18); padding: 5px 8px;
}
.row-u__act { display: flex; justify-content: flex-end; margin: 0; }
.row-u__act button { width: 100%; }
.row-t:hover, .row-a:hover { background: var(--paper-2); }
.rows--dark .row-t, .rows--dark .row-a { background: var(--ink-2); border-color: var(--line-d); }
.rows--dark .row-t:hover, .rows--dark .row-a:hover { background: var(--ink-3); }
.row-t__num, .row-a__num { font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; color: var(--red); }
.rows--dark .row-t__num, .rows--dark .row-a__num { color: #ff9c99; }
.row-t__subj, .row-a__subj { overflow: hidden; }
.row-t__subj, .row-a__subj { font-weight: 500; }
.row-a__subj small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); margin-top: 3px; }
.rows--dark .row-a__subj small { color: rgba(255,255,255,.45); }
.row-t__meta, .row-a__meta, .row-a__assignee { font-size: 12.5px; color: var(--muted); }
.rows--dark .row-t__meta, .rows--dark .row-a__meta, .rows--dark .row-a__assignee { color: rgba(255,255,255,.45); }

.st {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px 9px; font-family: var(--mono); font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; border: 1px solid currentColor; white-space: nowrap;
}
.st--new { color: #b3121a; }
.st--open { color: #1f6b3f; }
.st--pending { color: #8a5a00; }
.st--closed { color: #7a716d; }
.st--ok { color: #1f6b3f; }
.st--wait { color: #8a5a00; background: rgba(240, 194, 116, .12); }
.st--off { color: #7a716d; }
.rows--dark .st--ok { color: #8fd8ac; }
.rows--dark .st--wait { color: #f0c274; background: rgba(240, 194, 116, .1); }
.rows--dark .st--off { color: rgba(255,255,255,.4); }
.rows--dark .st--new { color: #ff9c99; }
.rows--dark .st--open { color: #8fd8ac; }
.rows--dark .st--pending { color: #f0c274; }
.rows--dark .st--closed { color: rgba(255,255,255,.4); }

.chip {
  display: inline-flex; align-items: center; padding: 4px 9px; font-size: 11.5px;
  background: var(--paper-2); color: var(--muted); border: 1px solid transparent; white-space: nowrap;
}
.rows--dark .chip, .page--dark .chip { background: rgba(255,255,255,.08); color: rgba(255,255,255,.6); }
.chip--prio-high { background: #fbe3e2; color: #a8100f; }
.chip--prio-normal { background: var(--paper-2); }
.chip--prio-low { background: transparent; border-color: var(--line); color: var(--muted); }
.rows--dark .chip--prio-high, .page--dark .chip--prio-high { background: rgba(208,25,30,.32); color: #ffd2d0; }
.rows--dark .chip { border: 1px solid rgba(255,255,255,.14); }

.empty {
  background: #fff; border: 1px dashed var(--line); padding: 34px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--muted);
}
.empty--dark { background: var(--ink-2); border-color: var(--line-d); color: rgba(255,255,255,.5); }

/* ── заголовок страницы ──────────────────────────────── */
.pagehead { margin-bottom: 22px; }
.back { font-size: 13px; color: var(--muted); }
.page--dark .back { color: rgba(255,255,255,.5); }
.pagehead__h {
  font-family: var(--display); font-weight: 500; letter-spacing: -.03em;
  font-size: clamp(1.35rem, 2.6vw, 1.95rem); line-height: 1.12; margin: 10px 0 8px; max-width: 32ch;
}
.pagehead__sub { color: var(--muted); font-size: 13.5px; }
.page--dark .pagehead__sub { color: rgba(255,255,255,.5); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tags .mono { color: var(--red); }
.page--dark .tags .mono { color: #ff9c99; }


/* ── скриншоты ───────────────────────────────────────── */
.drop {
  position: relative; display: flex; flex-direction: column; gap: 3px;
  padding: 14px 16px; border: 1px dashed rgba(25,20,21,.3); background: #fff;
  cursor: pointer; transition: border-color .18s, background .18s;
}
.drop:hover, .drop.is-over { border-color: var(--red); background: #fffdfb; }
.drop input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop__k { font-family: var(--mono); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--red); }
.drop__t { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.drop.has-files { border-style: solid; border-color: var(--red); }
.drop.has-files .drop__t { color: var(--text); }

.form--dark .drop { background: var(--ink-2); border-color: var(--line-d); }
.form--dark .drop__k { color: #ff9c99; }
.form--dark .drop__t { color: rgba(255,255,255,.5); }
.form--dark .drop:hover, .form--dark .drop.is-over { border-color: var(--red-3); background: var(--ink-3); }
.form--dark .drop.has-files .drop__t { color: var(--paper); }

.thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.thumb {
  position: relative; width: 118px; height: 88px; overflow: hidden; display: block;
  border: 1px solid var(--line); background: var(--paper-2);
}
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s var(--ease); }
.thumb:hover img { transform: scale(1.05); }
.thumb__size {
  position: absolute; right: 4px; bottom: 4px; padding: 1px 5px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .04em;
  background: rgba(0,0,0,.62); color: #fff;
}
.msg--client .thumb, .msg--staff .thumb { border-color: var(--line); }

/* ── переписка ───────────────────────────────────────── */
.thread { display: flex; flex-direction: column; gap: var(--tile-gap); }
.msg { padding: 16px 18px; border: 1px solid transparent; }
.msg--client { background: var(--ink-2); color: var(--paper); border-color: var(--line-d); }
.msg--staff { background: #fff; color: var(--text); border-color: var(--line); }
.msg--note { background: #fdf4e0; border: 1px dashed #c8a25a; color: #5b4413; }
.msg__hd { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; font-size: 12.5px; }
.msg__hd b { font-size: 13.5px; font-weight: 600; }
.msg__hd time { margin-left: auto; opacity: .55; font-family: var(--mono); font-size: 10.5px; }
.msg__role {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase;
  opacity: .6;
}
.msg--client .msg__role { color: #ff9c99; opacity: .9; }
.msg__role--note { color: #8a5a00; opacity: 1; }
.msg__body { font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.hint { margin-top: 16px; font-size: 13px; color: var(--muted); }

/* ── рабочее место: две колонки ──────────────────────── */
/* индикатор онлайна */
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; vertical-align: middle; }
.dot--on { background: #4cc46a; box-shadow: 0 0 0 3px rgba(76, 196, 106, .16); margin-left: 6px; }
.online-pill {
  display: inline-flex; align-items: center; gap: 7px; margin-right: 10px; padding: 3px 9px;
  border: 1px solid rgba(76, 196, 106, .35); color: #8fe0a1;
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
}
.online-pill .dot { margin-left: 0; }

/* блок исполнителя в карточке заявки */
.assign-form { display: grid; gap: 8px; margin: 0; }
.assign-form__row { display: flex; flex-wrap: wrap; gap: 6px; }
.assign-form__row .btn-tile { flex: 1 1 auto; }

/* чат инженера с ИИ в карточке заявки */
.side--chat { padding-bottom: 12px; }
.chat { display: grid; gap: 10px; margin-top: 10px; }
.chat__log {
  display: grid; gap: 8px; max-height: 360px; overflow-y: auto; padding-right: 4px;
  scrollbar-width: thin;
}
.chat__empty { margin: 0; font-size: 12px; line-height: 1.45; color: rgba(255, 255, 255, .45); }
.chat__msg {
  padding: 9px 11px; font-size: 12.8px; line-height: 1.45;
  background: var(--ink-3); border: 1px solid var(--line-d); border-radius: 10px;
}
.chat__msg--user { background: rgba(151, 7, 10, .18); border-color: rgba(193, 13, 19, .35); margin-left: 18px; }
.chat__msg--assistant { margin-right: 8px; }
.chat__body { white-space: pre-wrap; color: rgba(255, 255, 255, .9); }
.chat__files { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.chat__file {
  font-size: 11.5px; color: #ff9a97; border-bottom: 1px dashed rgba(255, 154, 151, .4);
  text-decoration: none; word-break: break-all;
}
.chat__save {
  margin-top: 8px; padding: 0; background: none; border: 0; cursor: pointer;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255, 255, 255, .4); border-bottom: 1px solid rgba(255, 255, 255, .16);
}
.chat__save:hover { color: var(--white); border-color: rgba(255, 255, 255, .5); }
.chat__save.is-done { color: #7ad27a; border-color: rgba(122, 210, 122, .4); }
.chat__form { display: grid; gap: 8px; }
.chat__form textarea {
  width: 100%; resize: vertical; min-height: 58px; padding: 9px 10px;
  background: var(--ink-3); color: var(--white); border: 1px solid var(--line-d); border-radius: 10px;
  font-family: var(--body); font-size: 13px; line-height: 1.4;
}
.chat__form textarea:focus { outline: none; border-color: var(--red-2); }
.chat__row { display: flex; align-items: center; gap: 8px; }
.chat__pick {
  font-size: 11.5px; color: rgba(255, 255, 255, .6); border: 1px dashed var(--line-d);
  padding: 5px 9px; border-radius: 8px; cursor: pointer; white-space: nowrap;
}
.chat__pick:hover { color: var(--white); border-color: rgba(255, 255, 255, .35); }
.chat__hint { flex: 1; font-size: 11px; color: rgba(255, 255, 255, .45); }
.chat__row .btn { margin-left: auto; }

/* кнопка «ИИ» в форме ответа */
.ai-btn {
  min-height: 44px; padding: 0 16px; font-family: var(--mono); font-size: 12px;
  letter-spacing: .12em; text-transform: uppercase;
}
.ai-btn[disabled] { opacity: .6; cursor: default; }
.ai-btn__state { font-size: 11.5px; color: rgba(255, 255, 255, .5); }

/* подсказка инженеру в карточке заявки */
.pagehead__row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.pagehead__row .pagehead__h { margin-bottom: 0; }

.ai {
  background: var(--ink-2);
  border: 1px solid var(--line-d);
  border-left: 3px solid var(--red-2);
  padding: 14px 16px 16px;
  margin-bottom: var(--tile-gap);
}
.ai__hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.ai__k {
  font-family: var(--mono); font-size: 10px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--white);
}
.ai__badge {
  font-family: var(--mono); font-size: 9px; letter-spacing: .12em;
  padding: 1px 5px; background: var(--red); color: var(--white);
}
.ai__t { font-size: 11px; color: rgba(255, 255, 255, .45); }
.ai__act { margin-left: auto; }
.ai__link {
  background: none; border: 0; padding: 0; font: inherit; font-size: 11px;
  color: rgba(255, 255, 255, .55); border-bottom: 1px solid rgba(255, 255, 255, .2);
  cursor: pointer; transition: color .2s, border-color .2s;
}
.ai__link:hover { color: var(--white); border-color: rgba(255, 255, 255, .55); }
.ai__steps { counter-reset: st; list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ai__steps li {
  counter-increment: st; display: grid; grid-template-columns: 24px 1fr; gap: 8px;
  font-size: 13.5px; line-height: 1.45; color: rgba(255, 255, 255, .88);
}
.ai__steps li::before {
  content: counter(st, decimal-leading-zero); font-family: var(--mono);
  font-size: 10.5px; color: rgba(255, 255, 255, .38); padding-top: 3px;
}
.ai__load {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; color: rgba(255, 255, 255, .62);
}
.ai__load::before {
  content: ''; width: 6px; height: 6px; background: var(--red-2);
  animation: aiPulse 1.1s ease-in-out infinite;
}
@keyframes aiPulse { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.ai__note {
  margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line-d);
  font-size: 11.5px; color: rgba(255, 255, 255, .55);
}
.field__ai {
  font-style: normal; font-family: var(--mono); font-size: 9px; letter-spacing: .1em;
  text-transform: uppercase; color: #e8434a; margin-left: 6px;
}

.agent-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 10px; align-items: start; }
.agent-side { display: flex; flex-direction: column; gap: var(--tile-gap); }
.side { background: var(--ink-2); border: 1px solid var(--line-d); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.side__k { color: rgba(255,255,255,.45); }
.side__name { font-size: 15.5px; font-weight: 600; }
.side__mail { font-size: 13px; color: #ff9c99; overflow-wrap: anywhere; }
.side__meta { font-size: 12.5px; color: rgba(255,255,255,.45); }
.status-form { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.btn-tile {
  min-height: 38px; padding: 6px 10px; font: inherit; font-size: 12.5px;
  background: rgba(255,255,255,.05); color: rgba(255,255,255,.75);
  border: 1px solid var(--line-d); cursor: pointer; transition: background .15s, color .15s;
}
.btn-tile:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-tile.is-on { background: var(--red); border-color: var(--red); color: #fff; }
.btn-tile--tiny { min-height: 30px; font-size: 11.5px; padding: 4px 8px; }
.btn-tile--ok { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; }
.btn-tile--ok:hover { background: var(--red-2); border-color: var(--red-2); color: #fff; }
.rows--dark .btn-tile { background: rgba(255,255,255,.06); }

.dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; font-size: 12.5px; }
.dl dt { color: rgba(255,255,255,.4); }
.dl dd { margin: 0; text-align: right; }

/* ── фильтры ─────────────────────────────────────────── */
.filters { margin-bottom: 18px; display: flex; flex-direction: column; gap: 10px; }
.filters__chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip-tab {
  padding: 8px 14px; font-size: 13.5px; color: rgba(255,255,255,.6);
  background: rgba(255,255,255,.05); border: 1px solid var(--line-d);
  transition: background .15s, color .15s;
}
.chip-tab:hover { background: rgba(255,255,255,.1); color: #fff; }
.chip-tab.is-on { background: var(--paper); color: var(--text); border-color: var(--paper); }
.chip-tab__n { opacity: .55; font-family: var(--mono); font-size: 11px; margin-left: 4px; }
.chips-row { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 16px; }
.filters__row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters__search {
  display: flex; align-items: center; gap: 8px; flex: 1 1 240px;
  background: var(--ink-2); border: 1px solid var(--line-d); padding: 0 12px; min-height: 40px;
}
.filters__search svg { width: 16px; height: 16px; color: rgba(255,255,255,.4); flex: none; }
.filters__search input {
  flex: 1; min-width: 0; background: none; border: 0; color: var(--paper);
  font: inherit; font-size: 14px; outline: none;
}
.filters__row select, .filters__row input[type="search"] {
  background: var(--ink-2); color: var(--paper); border: 1px solid var(--line-d);
  font: inherit; font-size: 14px; min-height: 40px; padding: 0 10px; border-radius: 0;
}
.filters .toggle { color: rgba(255,255,255,.65); }


/* ── согласие на cookie ──────────────────────────────── */
body.has-cookie { padding-bottom: 92px; }
body.has-cookie .auth { min-height: calc(100vh - 92px); }
.cookie {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: var(--ink); color: var(--paper);
  border-top: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 -24px 48px -24px rgba(0, 0, 0, .55);
  transition: opacity .28s var(--ease), transform .28s var(--ease);
}
.cookie.is-hidden { opacity: 0; transform: translateY(10px); pointer-events: none; }
.cookie__in {
  max-width: var(--w); margin: 0 auto; padding: 14px var(--pad);
  display: flex; align-items: center; gap: 16px;
}
.cookie__k {
  flex: none; font-family: var(--mono); font-size: 10px; letter-spacing: .18em;
  text-transform: uppercase; color: #ff9c99;
}
.cookie__t { font-size: 13.5px; line-height: 1.45; color: rgba(255, 255, 255, .74); max-width: 84ch; }
.cookie__t a { color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .4); }
.cookie__t a:hover { border-color: #fff; }
.cookie__btn { margin-left: auto; flex: none; }

@media (max-width: 760px) {
  body.has-cookie { padding-bottom: 150px; }
  body.has-cookie .auth { min-height: calc(100vh - 150px); }
  .cookie__in { flex-wrap: wrap; gap: 10px 12px; }
  .cookie__t { order: 3; flex: 1 1 100%; }
  .cookie__btn { margin-left: auto; }
}

/* ── прочее ──────────────────────────────────────────── */
.panel-inline { background: var(--ink-2); border: 1px solid var(--line-d); padding: 16px; margin-bottom: 16px; }
.panel-inline .field__k { color: var(--muted-d); }
.panel-inline .field input, .panel-inline .field select {
  background: var(--ink); color: var(--paper); border-color: var(--line-d);
}
.prose { max-width: 74ch; display: flex; flex-direction: column; gap: 14px; font-size: 15px; color: var(--muted); }
.prose a { color: var(--red); border-bottom: 1px solid rgba(151,7,10,.3); }
.prose h2 { font-family: var(--display); font-weight: 500; font-size: 1.05rem; letter-spacing: -.01em; margin-top: 12px; }
.page--dark .prose h2 { color: var(--paper); }
.prose ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.prose li { color: var(--muted); font-size: 15px; }
.prose b { color: var(--text); font-family: var(--mono); font-size: 12.5px; letter-spacing: .02em; }
.page--dark .prose b, .page--dark .prose li { color: rgba(255,255,255,.8); }

.err { min-height: 60vh; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 12px; }
.err__code { color: var(--red); }
.page--dark .err__code { color: #ff9c99; }
.err__h { font-family: var(--display); font-weight: 500; font-size: clamp(1.6rem, 3vw, 2.4rem); letter-spacing: -.03em; }
.err__p { color: var(--muted); max-width: 50ch; }
.page--dark .err__p { color: rgba(255,255,255,.55); }

/* ── адаптив ─────────────────────────────────────────── */
@media (max-width: 1080px) {
  .agent-grid { grid-template-columns: 1fr; }
  .agent-side { flex-direction: row; flex-wrap: wrap; }
  .side { flex: 1 1 240px; }
  .row-a { grid-template-columns: 84px minmax(0, 1fr) 110px 90px; }
  .row-a__assignee { display: none; }
  .row-t { grid-template-columns: 84px minmax(0, 1fr) 110px; }
  .row-t__meta { display: none; }
}

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth__brand { gap: 16px; padding-top: 28px; }
  .auth__title { margin-top: 8px; font-size: clamp(1.8rem, 7vw, 2.6rem); }
  .auth__tiles { display: none; }
  .auth__foot { display: none; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .t--2x2 { grid-column: span 2; grid-row: span 1; min-height: 220px; }
  .t--2x1 { grid-column: span 2; }
.t--full { grid-column: 1 / -1; min-height: 0; }
.t--full .tile__t { font-size: 14px; }
  .bar { gap: 12px; height: auto; padding: 10px var(--pad); flex-wrap: wrap; }
  .bar__nav { margin-left: 0; }
  .bar__right { gap: 10px; }
  .who__mail { display: none; }
  .field-row { grid-template-columns: 1fr; }
  .form--row .field--narrow { max-width: none; }
}

@media (max-width: 600px) {
  .tile { min-height: 128px; padding: 14px; }
  .t--2x2 { min-height: 190px; }
  .row-a { grid-template-columns: 1fr auto; gap: 8px; }
  .row-a__num { grid-column: 1; }
  .row-a__subj { grid-column: 1 / -1; order: 3; }
  .row-a__meta { display: none; }
  .status-form { grid-template-columns: 1fr 1fr; }
  .radio-tiles { grid-template-columns: 1fr; }
  .row-u { grid-template-columns: 28px minmax(0, 1fr); gap: 8px 10px; }
  .row-u__tag { align-self: start; }
  .row-u__name, .row-u__role, .row-u .st, .row-u__act { grid-column: 2; }
  .row-u .st, .row-u__act { justify-content: flex-start; justify-self: start; }
  .row-u__act { margin-left: 2px; }
  .row-u__act button { width: auto; padding: 7px 14px; white-space: nowrap; }
  .thumb { width: 92px; height: 70px; }
  .row-u__login { display: none; }
  .row-u__date { display: none; }
  .panel-tiles { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; }
}
