/* Alles Team — цвета, шрифты и компоненты по Figma «Доступы» (k88NVHHx1giqRudV5R9kH4: 3:24, 5:11).
   Шрифты — свои файлы (fonts/, лицензия fonts/OFL.txt), без внешних сервисов. */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(fonts/manrope-cyrillic-wght-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(fonts/manrope-latin-wght-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: "JetBrains Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(fonts/jetbrains-mono-latin-wght-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;
}

:root {
  --ink: #17151F;
  --ink2: #4A4656;
  --muted: #6E6A7C;
  --faint: #9C98A8;
  --border: #E7E5EC;
  --border2: #D6D3DE;
  --canvas: #FAFAFB;
  --surface: #FFFFFF;
  --side: #F5F4F8;
  --brand: #7E36FC;
  --tint: #F1EEFF;
  --brand-ink: #5B1FD1;
  --green: #17795E;
  --green-tint: #E7F4EE;
  --amber: #94560A;
  --amber-tint: #FCF2E1;
  --red: #B3372C;
  --red-tint: #FBEAE8;
  --code: #F5F4F8;
  --scrim: rgba(23, 21, 31, .36);
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* --- основа ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--canvas); color: var(--ink);
  font: 400 14px/1.45 var(--sans); -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, kbd { font-family: var(--mono); font-size: 13px; }
input, select, textarea, button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.icon { flex: none; display: block; }
.muted { color: var(--muted); }
.spacer { flex: 1; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* --- каркас: панель 248 px и содержимое (5:11, экраны 01 и 07) ---------- */
.app { display: flex; min-height: 100vh; }
.side {
  position: sticky; top: 0; flex: none; width: 248px; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px; padding: 20px 16px 16px;
  background: var(--side); border-right: 1px solid var(--border);
}
.brand {
  display: flex; align-items: center; gap: 10px; padding: 0 0 20px 6px;
  color: var(--ink); font-size: 16px; line-height: normal; letter-spacing: -.32px; white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand img { flex: none; display: block; }
.brand b { font-weight: 700; }
.brand span span { font-weight: 500; color: var(--muted); margin-left: 1px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-group { padding-top: 20px; }
.nav-caption {
  padding: 0 0 6px 10px; font-size: 12px; font-weight: 600; line-height: 16px; letter-spacing: .24px;
  color: var(--faint);
}
.nav-item {
  display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 8px 0 10px;
  border: 1px solid transparent; border-radius: 6px;
  color: var(--ink2); font-size: 14px; font-weight: 500; line-height: normal;
}
.nav-item:hover { text-decoration: none; color: var(--ink); background: rgba(23, 21, 31, .04); }
.nav-item .icon { color: var(--muted); }
.nav-item[aria-current="page"] {
  background: var(--surface); border-color: var(--border); color: var(--ink); font-weight: 600;
}
.nav-item[aria-current="page"] .icon { color: var(--brand); }
.nav-text { flex: 1; min-width: 0; }
.nav-count {
  padding: 1px 7px; border-radius: 10px; background: var(--brand); color: #fff;
  font-size: 12px; font-weight: 700; line-height: normal;
}
.side-fill { flex: 1; }
.me {
  display: flex; align-items: center; gap: 10px; padding: 12px 0 0 6px; border-top: 1px solid var(--border);
}
.me-link { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: inherit; }
.me-link:hover { text-decoration: none; }
.me-link:hover .me-name { color: var(--brand-ink); }
.me-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; line-height: normal; }
.me-name, .me-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.me-email { font-size: 12px; color: var(--muted); }
.me form { margin: 0; }
.avatar {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%; background: var(--tint);
  color: var(--brand-ink); font-size: 12px; font-weight: 700; line-height: 1;
}

.main {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 28px; padding: 36px 48px 48px;
}
.page-head { display: flex; align-items: flex-end; gap: 24px; }
.page-head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.page-head h1 { font-size: 26px; font-weight: 600; line-height: 32px; letter-spacing: -.52px; color: var(--ink); }
.page-sub { font-size: 14px; line-height: 20px; color: var(--muted); }

/* --- сообщения и плашки (экран 10) ------------------------------------ */
.msg {
  display: flex; align-items: flex-start; gap: 14px; padding: 16px; border-radius: 8px;
  border: 1px solid transparent; background: var(--green-tint); color: var(--green);
  font-size: 14px; font-weight: 600; line-height: 20px;
}
.msg .icon { margin-top: 0; }
.msg.error { background: var(--red-tint); border-color: var(--red); color: var(--red); }
.msg.note { background: var(--tint); color: var(--brand-ink); }
.msg > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.msg p + p { font-size: 13px; font-weight: 400; line-height: 19px; color: var(--ink2); }

/* --- карточки, таблицы ------------------------------------------------ */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
}
.card-head { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 14px 20px; }
.card-title { font-size: 15px; font-weight: 600; line-height: 20px; color: var(--ink); }
.card-body { padding: 16px 20px; border-top: 1px solid var(--border); }
.card-head + .card-body:empty { display: none; }
.card-empty { padding: 14px 20px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--border); }
.card > .card-empty:first-child { border-top: 0; }
.scroll { overflow-x: auto; }
.card-head + .scroll, .card-body + .scroll { border-top: 1px solid var(--border); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 18px; color: var(--ink2); }
.table th {
  padding: 10px 8px; text-align: left; vertical-align: bottom; white-space: nowrap;
  background: var(--canvas); color: var(--muted); font-size: 12px; font-weight: 500; line-height: 16px;
}
.table td { padding: 12px 8px; text-align: left; vertical-align: middle; border-top: 1px solid var(--border); }
.table th:first-child, .table td:first-child { padding-left: 20px; }
.table th:last-child, .table td:last-child { padding-right: 20px; }
.table td.strong { color: var(--ink); font-weight: 600; font-size: 14px; }
.table code { font-weight: 500; color: var(--ink); }
.nowrap { white-space: nowrap; }
.table .sub { display: block; font-size: 12px; font-weight: 400; color: var(--muted); white-space: nowrap; }
details summary { cursor: pointer; color: var(--brand-ink); }
dl { margin: 8px 0 0; }
dt { margin-top: 6px; }
dt .muted { font-family: var(--mono); font-size: 12px; }
dd { margin: 2px 0 0 12px; color: var(--muted); }

/* --- кнопка (3:215): 36 / 30 px, радиус 6 ----------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: none;
  height: 36px; padding: 0 14px; border: 1px solid transparent; border-radius: 6px;
  font-size: 14px; font-weight: 600; line-height: normal; white-space: nowrap; cursor: pointer;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-ink); }
.btn-secondary { background: var(--surface); border-color: var(--border2); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink2); }
.btn-danger { background: var(--surface); border-color: var(--border2); color: var(--red); }
.btn-secondary:hover:not(:disabled), .btn-ghost:hover:not(:disabled) { background: var(--side); }
.btn-danger:hover:not(:disabled) { background: var(--red-tint); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none; padding: 4px; margin: -4px;
  border: 0; border-radius: 6px; background: none; color: var(--faint); cursor: pointer;
}
.icon-btn:hover { color: var(--ink2); background: rgba(23, 21, 31, .05); }

/* --- метка (3:173): 22 px, радиус 4 ------------------------------------ */
.tag {
  display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 3px 8px; border-radius: 4px;
  font-size: 12px; font-weight: 600; line-height: 16px; white-space: nowrap;
  background: var(--side); color: var(--ink2);
}
.tag-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag-brand { background: var(--tint); color: var(--brand-ink); }
.tag-green { background: var(--green-tint); color: var(--green); }
.tag-amber { background: var(--amber-tint); color: var(--amber); }
.tag-red { background: var(--red-tint); color: var(--red); }

/* --- поле (3:246): 36 px, радиус 6 ------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: 13px; font-weight: 600; line-height: 1.45; color: var(--ink); }
.input, .table input[type="text"], .table select,
form.inline input[type="text"], form.inline input[type="email"], form.inline select {
  height: 36px; min-width: 0; padding: 0 10px 0 12px;
  border: 1px solid var(--border2); border-radius: 6px; background: var(--surface); color: var(--ink);
  font-size: 14px; line-height: normal;
}
textarea.input { height: 88px; padding: 10px 10px 10px 12px; resize: vertical; line-height: 1.45; }
select.input, .table select, form.inline select {
  appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236E6A7C' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
}
::placeholder { color: var(--faint); opacity: 1; }
.input:focus, .table input:focus, .table select:focus, form.inline input:focus, form.inline select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--tint);
}
form.inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
form.inline + form.inline { margin-top: 8px; }
form.inline input[type="text"], form.inline input[type="email"] { flex: 1 1 180px; }
.table form.inline input[type="text"], .table form.inline select { height: 30px; font-size: 13px; }
.table form.inline { flex-wrap: nowrap; }
.table form.inline input[type="text"] { flex: 1 1 160px; min-width: 140px; }
form.stack { display: grid; gap: 16px; max-width: 420px; }

/* --- переключатель (17:993): 32×18 ------------------------------------- */
.switch { position: relative; display: inline-flex; flex: none; cursor: pointer; }
.switch input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.switch-track {
  position: relative; width: 32px; height: 18px; border-radius: 9px; background: var(--border2);
  transition: background .15s;
}
.switch-track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(23, 20, 31, .18); transition: transform .15s;
}
.switch input:checked + .switch-track { background: var(--brand); }
.switch input:checked + .switch-track::after { transform: translateX(14px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--brand); outline-offset: 2px; }
.switch input:disabled + .switch-track { opacity: .5; }

/* --- окно (экран 03) и боковая карточка (экран 14) ---------------------- */
dialog { color: var(--ink); }
dialog:focus-visible { outline: none; }  /* окно из ответа сервера берёт фокус само (team.js) — без рамки */
dialog::backdrop { background: var(--scrim); }
.modal {
  width: min(540px, calc(100vw - 32px)); padding: 28px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); box-shadow: 0 16px 48px rgba(23, 20, 31, .16);
}
.modal[open] { display: flex; flex-direction: column; gap: 20px; }
.modal-head, .drawer-head { display: flex; align-items: flex-start; gap: 12px; }
.modal-title { flex: 1; min-width: 0; font-size: 20px; font-weight: 600; line-height: 27px; letter-spacing: -.2px; }
.modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding-top: 4px; }
.drawer {
  position: fixed; inset: 0 0 0 auto; margin: 0; width: min(480px, 100vw); height: 100%; max-width: 100vw;
  max-height: 100%; padding: 28px; border: 0; background: var(--surface);
  box-shadow: -8px 0 32px rgba(23, 20, 31, .12); overflow-y: auto;
}
.drawer[open] { display: flex; flex-direction: column; gap: 22px; }
.drawer-title { flex: 1; min-width: 0; font-size: 18px; font-weight: 700; line-height: 1.45; }

/* --- вход: без панели, карточка 420 px (экран 11) ----------------------- */
.auth {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 24px; padding: 40px 16px;
}
.auth .brand { padding: 0; }
.auth-card {
  width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 20px; padding: 32px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(23, 20, 31, .05);
}
.auth-card h1 { font-size: 22px; font-weight: 700; line-height: 1.45; color: var(--ink); }
.auth-caption { font-size: 12px; line-height: 1.45; color: var(--faint); text-align: center; }
.auth-head { display: flex; flex-direction: column; gap: 6px; }
.auth-sub, .auth-for { font-size: 14px; line-height: 1.45; color: var(--muted); }
.auth-for { display: flex; align-items: center; gap: 8px; }
.auth-icon {
  display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 22px;
  background: var(--tint); color: var(--brand);
}
.auth-icon-muted { background: var(--side); color: var(--muted); }   /* экран 13: замок серый */
.auth-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.auth-actions form { margin: 0; }
.auth-form { display: flex; flex-direction: column; gap: 20px; margin: 0; }
.auth-form .btn { width: 100%; }
.auth-hint { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.auth-hint .icon { margin-top: 1px; }
.rules {
  display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none;
  font-size: 13px; line-height: 1.45; color: var(--muted);
}
.rules li { display: flex; align-items: center; gap: 8px; }
.rules li.ok { color: var(--green); }

/* --- профиль (экран 17): слева сервисы и устройства, справа пароль 420 px ---- */
.profile { display: flex; align-items: flex-start; gap: 20px; }
.profile-main, .profile-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.profile-main { flex: 1; }
.profile-side { flex: none; width: 420px; }
.card-intro { display: flex; flex-direction: column; gap: 2px; padding: 16px 20px 14px; line-height: 1.45; }
.card-intro h2 { font-size: 16px; font-weight: 700; color: var(--ink); }
.card-intro p { font-size: 13px; color: var(--muted); }
.row-item {
  display: flex; align-items: center; gap: 12px; margin: 0; padding: 14px 20px; border-top: 1px solid var(--border);
}
.row-item > .icon { color: var(--muted); }
.row-action { padding-top: 12px; padding-bottom: 12px; }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.45; }
.row-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.row-sub { font-size: 12px; color: var(--muted); }
.card-form {
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin: 0; padding: 16px 20px 20px;
  border-top: 1px solid var(--border);
}
.card-form .field { align-self: stretch; }

/* --- каталог (экран 01), страница витрины (02), окно заявки (03) --------- */
.page-head .search {
  flex: none; display: flex; align-items: center; gap: 8px; width: 320px; height: 36px; padding: 0 12px;
  border: 1px solid var(--border2); border-radius: 6px; background: var(--surface); color: var(--faint);
}
.page-head .search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--tint); }
.page-head .search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 14px; color: var(--ink); }
.group-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.group-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 20px; overflow: visible; }
.group-card-head { align-self: stretch; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.group-card-head .card-title { font-size: 16px; }
.group-card-meta { font-size: 13px; line-height: 18px; color: var(--muted); }
.group-card-meta code { font-size: 12px; color: var(--faint); margin-right: 4px; }
.group-card-text { font-size: 14px; line-height: 20px; color: var(--ink2); margin-bottom: 6px; }
.group-card .btn { margin-top: auto; }
.tabs { display: flex; align-items: center; gap: 2px; }
.tab {
  height: 28px; padding: 0 12px; border: 0; border-radius: 6px; background: none; cursor: pointer;
  font-size: 13px; font-weight: 500; color: var(--muted);
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--side); color: var(--ink); font-weight: 600; }
.cat-group {
  display: flex; align-items: center; gap: 8px; padding: 10px 20px; border-top: 1px solid var(--border);
  background: var(--canvas); font-size: 13px; line-height: 18px;
}
.cat-group-title { font-weight: 600; color: var(--ink); }
.cat-group code { font-size: 12px; color: var(--faint); }
.cat-lock { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.cat-row {
  display: grid; grid-template-columns: 220px 1fr auto 16px; align-items: center; gap: 20px; padding: 13px 20px;
  border-top: 1px solid var(--border); color: var(--ink2); font-size: 13px; line-height: 18px;
}
.cat-row:hover { background: var(--canvas); text-decoration: none; }
.cat-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cat-name code { font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.cat-desc { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-cols { color: var(--muted); white-space: nowrap; }
.cat-go { color: var(--faint); display: flex; }
.cat-row.is-locked { color: var(--faint); }
.cat-row.is-locked .cat-name code { color: var(--muted); font-weight: 400; }
.cat-row.is-locked .cat-name .icon { color: var(--faint); }

.crumbs { display: flex; align-items: center; gap: 6px; margin-bottom: -16px; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs code { font-size: 12px; color: var(--ink2); }
.mart-head { align-items: flex-start; }
.mart-head .page-sub { max-width: 640px; }
.mono-title { font-family: var(--mono); font-weight: 600; }
.facts {
  display: grid; grid-template-columns: repeat(5, 1fr); margin: 0; background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px;
}
.facts > div { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 20px; border-left: 1px solid var(--border); }
.facts > div:first-child { border-left: 0; }
.facts dt { margin: 0; font-size: 12px; line-height: 16px; color: var(--muted); }
.facts dd { margin: 0; font-size: 15px; line-height: 20px; font-weight: 600; color: var(--ink); }
.facts dd code { font-size: 14px; font-weight: 500; }
.mart-grid { display: flex; align-items: flex-start; gap: 20px; }
.mart-grid > .card { flex: 1; min-width: 0; }
.mart-side { flex: none; width: 380px; display: flex; flex-direction: column; gap: 20px; }
.table.cols td { padding: 11px 8px; }
.table.cols td code { font-weight: 500; }
.table .type { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.more {
  display: block; width: 100%; padding: 14px 20px; border: 0; border-top: 1px solid var(--border); background: none;
  text-align: left; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--brand-ink);
}
.side-card { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.card-title.ask { display: flex; align-items: center; gap: 8px; }
.card-title.ask .icon { color: var(--brand); }
.side-card .muted { font-size: 13px; line-height: 20px; }
.link-go { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; }
.sql {
  margin: 0; padding: 14px; border-radius: 6px; background: var(--code); overflow-x: auto;
  font-size: 12px; line-height: 1.6; color: var(--ink);
}
.sql code { font-size: 12px; }

.modal-sub { margin-top: -12px; font-size: 13px; line-height: 18px; color: var(--muted); }
.modal-form { display: flex; flex-direction: column; gap: 20px; margin: 0; }
.opens { display: flex; flex-direction: column; gap: 4px; padding: 14px 14px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--canvas); font-size: 13px; line-height: 18px; color: var(--ink2); }
.opens-label { font-size: 12px; color: var(--muted); }
.opens p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opens code { font-weight: 600; color: var(--ink); margin-right: 6px; }
fieldset.field { margin: 0; padding: 0; border: 0; }
.seg { align-self: flex-start; display: inline-flex; padding: 3px; gap: 2px; border-radius: 6px; background: var(--side); }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.seg span { display: block; padding: 6px 16px; border-radius: 4px; font-size: 13px; font-weight: 500; color: var(--muted); }
.seg input:checked + span { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--border), 0 1px 2px rgba(23, 20, 31, .08); }
.seg input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 1px; }

@media (max-width: 1100px) {
  .group-cards { grid-template-columns: 1fr; }
  .mart-grid { flex-direction: column; align-items: stretch; }
  .mart-side { width: auto; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .facts > div:nth-child(odd) { border-left: 0; }
  .page-head { flex-wrap: wrap; }
  .page-head .search { width: 100%; }
}
@media (max-width: 760px) {
  .cat-row { grid-template-columns: 1fr auto 16px; }
  .cat-desc { display: none; }
}

@media (max-width: 1100px) {
  .profile { flex-direction: column; align-items: stretch; }
  .profile-side { width: auto; }
}
@media (max-width: 480px) {
  .auth { justify-content: flex-start; padding-top: 32px; }
  .auth-card { padding: 24px; }
}
@media (max-width: 760px) {
  .app { flex-direction: column; }
  .side { position: static; width: auto; height: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .side-fill { display: none; }
  .main { padding: 24px 16px 40px; }
}

/* --- заявки (06) и журнал (09) ------------------------------------------ */
.who { display: flex; align-items: center; gap: 12px; }
.who-text { display: flex; flex-direction: column; min-width: 0; }
.who-name { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.req { vertical-align: top; }
.req-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.req-head b { font-size: 14px; color: var(--ink); }
.req-head span + span::before { content: "·"; margin-right: 8px; }
.req-reason { display: block; margin-top: 4px; max-width: 420px; font-size: 13px; line-height: 19px; color: var(--ink2); }
.row-buttons { text-align: right; white-space: nowrap; }
.row-buttons .btn + .btn { margin-left: 8px; }
.table .tag { margin-left: 8px; }
.faint { color: var(--faint); }
.page-head form.search { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border: 1px solid var(--border2);
  border-radius: 6px; background: var(--surface); font-size: 13px; font-weight: 500; color: var(--ink);
}
.chip:hover { text-decoration: none; background: var(--side); }
.chip[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.table.log td { padding-top: 13px; padding-bottom: 13px; }
.ev { display: inline-flex; align-items: center; gap: 8px; }
.ev .icon { color: var(--ink2); }
.log .bad, .log .bad .icon { color: var(--red); }
.log .det { color: var(--ink2); }
.more-link { text-align: center; }
.more-link:hover { text-decoration: none; background: var(--canvas); }

/* --- люди (07), карточка (14, 19), окна (15, 18, 08, 16) ------------------- */
.card.people { overflow-x: auto; }
.people-row {
  display: grid; grid-template-columns: 230px 170px minmax(0, 1fr) 130px 24px; align-items: center; gap: 16px;
  min-width: 720px; padding: 12px 20px; border-top: 1px solid var(--border); color: var(--ink2);
  font-size: 13px; line-height: normal;
}
.people.with-neural .people-row { grid-template-columns: 230px 170px minmax(0, 1fr) 150px 130px 24px; min-width: 880px; }
.people-head { border-top: 0; padding: 10px 20px; background: var(--canvas); color: var(--muted); font-size: 12px; font-weight: 500; }
a.people-row:hover { text-decoration: none; background: var(--canvas); }
a.people-row[aria-current="true"] { background: var(--tint); }
.people-row .who, .people-row .who-text { min-width: 0; }
.people-row .who-name, .people-row .sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people-row .sub { margin-top: 1px; font-size: 12px; color: var(--muted); }
.people-row.is-closed .avatar { background: var(--side); color: var(--faint); }
.people-row.is-closed .who-name, .people-row.is-closed .sub { color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.row-go { display: flex; justify-content: flex-end; color: var(--faint); }
.hint { display: flex; align-items: center; gap: 10px; font-size: 13px; line-height: normal; color: var(--muted); }

.drawer-head { align-items: center; }
.avatar-lg { width: 40px; height: 40px; }
.drawer-heading { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.45; }
.drawer-heading .drawer-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-sub { font-size: 13px; color: var(--muted); }
.drawer .msg { flex: none; }
.card-status { display: flex; align-items: center; gap: 10px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.drawer-section { display: flex; flex-direction: column; gap: 10px; }
.drawer-section-head { display: flex; flex-direction: column; gap: 2px; line-height: 1.45; }
.drawer-section-head h3 { margin: 0; font-size: 14px; font-weight: 700; color: var(--ink); }
.drawer-section-head p { font-size: 12px; color: var(--muted); }
.svc-box { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.svc-row { display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 14px; }
.svc-row + .svc-row { border-top: 1px solid var(--border); }
.svc-row > .icon { color: var(--muted); }
.grant-line { display: flex; align-items: center; gap: 8px; }
.grant-line .tags { flex: 1; }
.drawer-actions { display: flex; align-items: center; gap: 10px; }
.drawer-actions form, .zone-row form { margin: 0; }
.done-list {
  display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 12px 14px; list-style: none; border-radius: 8px;
  background: var(--amber-tint); color: var(--amber); font-size: 13px; line-height: 1.45;
}
.done-list li { display: flex; align-items: center; gap: 8px; }
.drawer-fill { flex: 1; }
.drawer-zone { display: flex; flex-direction: column; gap: 14px; padding-top: 18px; border-top: 1px solid var(--border); }
.zone-row { display: flex; align-items: center; gap: 12px; }
.zone-title { font-size: 13px; font-weight: 600; color: var(--ink); }

.modal-lg, .secret-window { width: min(520px, calc(100vw - 32px)); }
.modal-heading { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.modal-heading .modal-sub { margin-top: 0; }
.modal-lg .modal-title { font-size: 22px; font-weight: 700; line-height: 1.45; letter-spacing: 0; }
.modal-note { font-size: 13px; line-height: 1.45; color: var(--muted); }
.effects {
  display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 14px 16px; list-style: none; border-radius: 8px;
  background: var(--code); color: var(--ink2); font-size: 13px; line-height: 1.45;
}
.effects li { display: flex; align-items: flex-start; gap: 10px; }
.effects .icon { margin-top: 2px; }
.effects .no .icon { color: var(--red); }
.effects .yes .icon { color: var(--green); }
.secret-head { display: flex; align-items: center; gap: 12px; }
.secret-head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.secret-head .modal-sub { margin-top: 0; }
.secret-head > .icon { color: var(--brand); }
.secret-window[data-kind="created"] .secret-head > .icon { color: var(--green); }
.secret-box {
  display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--canvas);
}
.secret-label { font-size: 12px; font-weight: 500; color: var(--muted); }
.secret-line { display: flex; align-items: center; gap: 12px; }
.secret {
  flex: 1; min-width: 0; font-family: var(--mono); font-size: 22px; font-weight: 500; letter-spacing: .44px;
  color: var(--ink); overflow-wrap: anywhere; user-select: all;
}
.note-amber {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px; border-radius: 6px;
  background: var(--amber-tint); color: var(--amber); font-size: 13px; line-height: 19px;
}
.secret-text { font-size: 13px; line-height: 19px; color: var(--ink2); }
.btn.is-copied { border-color: var(--green); color: var(--green); }
