/* /opt/skynet-portal/app/static/css/search.css */
/* v0.5.0 — светлая тема: мягкое затемнение, акцент и цвета групп/статусов в чернилах, цвета статусов темы, без неона */
/* 24.10.2026: v0.5.0 (секция в конце файла); v0.4.1 окно как окна портала; 06.10.2026: v0.4.0 перетаскивание, растягивание */

/* =====================================================================
   Поле в топбаре — только вход в окно (щелчок открывает палитру)
   ===================================================================== */
.topbar-search { position: relative; }
.topbar-search-input[readonly] { cursor: pointer; }
html.gsx-lock, html.gsx-lock body { overflow: hidden; }
html.gsx-dragging, html.gsx-dragging * { cursor: grabbing !important; user-select: none !important; }
html.gsx-resizing, html.gsx-resizing * { user-select: none !important; }

/* =====================================================================
   Окно-палитра: токены — из темы портала, с запасными значениями
   ===================================================================== */
.gsx {
  --gx-acc: var(--accent, #8b5cf6);
  --gx-acc-2: color-mix(in srgb, var(--accent, #8b5cf6) 68%, #ffffff);
  --gx-acc-3: color-mix(in srgb, var(--accent, #8b5cf6) 55%, #ec4899);
  --gx-bg: var(--bg-surface, #10162a);
  --gx-bg-2: var(--bg-surface-2, #141b30);
  --gx-line: var(--border-default, rgba(148, 163, 184, 0.16));
  --gx-line-2: color-mix(in srgb, var(--gx-line) 60%, transparent);
  --gx-t1: var(--text-primary, #e8ecf7);
  --gx-t2: var(--text-secondary, #b7c0d8);
  --gx-t3: var(--text-tertiary, #8791ad);
  --gx-t4: var(--text-muted, #636d88);
  --gx-mono: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  --gx-soft: rgba(148, 163, 184, 0.08);
  --gx-soft-2: rgba(148, 163, 184, 0.14);
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(14px, 7vh, 88px) 18px 18px;
}
.gsx[hidden] { display: none; }
.gsx-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 14, 0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.gsx.is-open .gsx-backdrop { opacity: 1; }

/* Окно — как стандартные окна портала (modal.css): фон и рамка окна, нейтральная тень без цветного свечения */
.gsx-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1140px, 100%);
  height: min(760px, calc(100vh - clamp(14px, 7vh, 88px) - 18px));
  border-radius: var(--radius-xl, 18px);
  overflow: hidden;
  color: var(--gx-t1);
  border: 1px solid var(--border-strong, rgba(255, 255, 255, 0.14));
  background: var(--surface-gradient, var(--gx-bg));
  box-shadow:
    0 34px 80px -12px rgba(0, 0, 0, 0.62),
    0 14px 34px -14px rgba(0, 0, 0, 0.45),
    var(--edge-light, inset 0 1px 0 rgba(255, 255, 255, 0.05));
  opacity: 0;
  transform: translateY(12px) scale(0.985);
  transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}
.gsx.is-open .gsx-dialog { opacity: 1; transform: none; }
/* Свободное окно (перетащено / растянуто) и «во весь экран» — место задаёт search-window.js */
.gsx-dialog.is-float { position: absolute; margin: 0; max-width: none; max-height: none; }
.gsx-dialog.is-max {
  left: 10px !important;
  top: 10px !important;
  width: calc(100% - 20px) !important;
  height: calc(100% - 20px) !important;
  border-radius: 16px;
}
[data-theme="light-pearl"] .gsx-dialog { box-shadow: 0 28px 64px rgba(22, 27, 46, 0.18), 0 12px 28px rgba(22, 27, 46, 0.1), var(--edge-light, inset 0 1px 0 rgba(255, 255, 255, 0.9)); }
.gsx-dialog.is-dragging, .gsx-dialog.is-resizing {
  transition: none;
  border-color: var(--border-accent, var(--gx-acc));
}
.gsx-dialog > * { position: relative; z-index: 1; }
.gsx-dialog > .gsx-bar { position: absolute; z-index: 3; }
/* Акцентная полоса сверху — как у окон портала */
.gsx-dialog::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  z-index: 4;
  background: linear-gradient(90deg, var(--accent, #7c6cff), var(--accent-hover, #9a8cff));
  pointer-events: none;
}

/* Полоса загрузки по верхнему краю */
.gsx-bar { position: absolute; left: 0; right: 0; top: 0; height: 2px; overflow: hidden; pointer-events: none; z-index: 5; }
.gsx-bar::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -40%;
  width: 40%;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  opacity: 0;
}
.gsx.is-loading .gsx-bar::after { opacity: 0.9; animation: gsx-run 1s ease-in-out infinite; }

/* =====================================================================
   Полоса-ручка окна (search-window.js): тянуть — переместить,
   двойной щелчок — во весь экран; кнопки «как было», «развернуть», «закрыть»
   ===================================================================== */
.gsx-chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding: 9px 10px 9px 16px;
  border-bottom: 1px solid var(--border-default, var(--gx-line));
  background: var(--bg-surface-2, rgba(255, 255, 255, 0.02));
  cursor: grab;
  user-select: none;
}
.gsx-grip { display: grid; grid-template-columns: repeat(2, 3px); gap: 3px; flex-shrink: 0; opacity: 0.6; transition: opacity 0.15s; }
.gsx-grip i { width: 3px; height: 3px; border-radius: 50%; background: var(--gx-t3); }
.gsx-chrome:hover .gsx-grip { opacity: 1; }
.gsx-chrome:hover .gsx-grip i { background: var(--gx-acc-2); }
.gsx-ctitle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-family: var(--font-display, inherit);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--gx-t1);
  white-space: nowrap;
}
.gsx-ctitle svg { color: var(--gx-acc-2); flex-shrink: 0; }
.gsx-chint kbd {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 6px;
  border: 1px solid var(--gx-line);
  border-bottom-width: 2px;
  background: var(--gx-soft);
  font-family: var(--gx-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--gx-t3);
}
.gsx-cbtns { display: flex; align-items: center; gap: 3px; margin-left: auto; }
.gsx-cbtn {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md, 10px);
  border: 1px solid transparent;
  background: transparent;
  color: var(--gx-t3);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.12s;
}
.gsx-cbtn[hidden] { display: none; }
.gsx-cbtn:hover { color: var(--gx-t1); background: var(--gx-soft-2); border-color: var(--gx-line-2); }
.gsx-cbtn:active { transform: scale(0.92); }
.gsx-cbtn.is-close:hover { color: var(--danger-text, #fb7185); background: var(--bg-hover, rgba(255, 255, 255, 0.04)); border-color: var(--border-default, var(--gx-line)); }

/* Края и углы для растягивания (поверх содержимого, тонкие) */
.gsx-dialog > .gsx-rz { position: absolute; z-index: 6; display: block; }
.gsx-rz.rz-n { left: 14px; right: 14px; top: 0; height: 5px; cursor: ns-resize; }
.gsx-rz.rz-s { left: 14px; right: 14px; bottom: 0; height: 6px; cursor: ns-resize; }
.gsx-rz.rz-e { top: 14px; bottom: 14px; right: 0; width: 5px; cursor: ew-resize; }
.gsx-rz.rz-w { top: 14px; bottom: 14px; left: 0; width: 6px; cursor: ew-resize; }
.gsx-rz.rz-ne { right: 0; top: 0; width: 14px; height: 14px; cursor: nesw-resize; }
.gsx-rz.rz-nw { left: 0; top: 0; width: 14px; height: 14px; cursor: nwse-resize; }
.gsx-rz.rz-se { right: 0; bottom: 0; width: 16px; height: 16px; cursor: nwse-resize; }
.gsx-rz.rz-sw { left: 0; bottom: 0; width: 14px; height: 14px; cursor: nesw-resize; }
.gsx-dialog > .gsx-corner {
  position: absolute;
  right: 3px;
  bottom: 3px;
  z-index: 7;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  color: var(--gx-t4);
  cursor: nwse-resize;
  transition: color 0.15s, background 0.15s;
}
.gsx-dialog > .gsx-corner:hover, .gsx-dialog.is-resizing > .gsx-corner { color: var(--gx-acc-2); background: color-mix(in srgb, var(--gx-acc) 14%, transparent); }
.gsx-dialog.is-max > .gsx-rz, .gsx-dialog.is-max > .gsx-corner { display: none; }

/* =====================================================================
   Голова: поле ввода, что распознано, очистка, закрытие
   ===================================================================== */
.gsx-head { position: relative; display: flex; align-items: center; gap: 12px; flex-shrink: 0; padding: 14px 20px 13px; border-bottom: 1px solid var(--gx-line-2); }
.gsx-head::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gx-acc-2), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}
.gsx-head:focus-within::after { opacity: 0.85; }
.gsx-head-ic {
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--gx-acc-2);
  background: color-mix(in srgb, var(--gx-acc) 14%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gx-acc) 30%, transparent);
}
.gsx.is-loading .gsx-head-ic::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 15px;
  border: 2px solid transparent;
  border-top-color: var(--gx-acc-2);
  animation: gsx-spin 0.8s linear infinite;
}
.gsx-input {
  flex: 1;
  min-width: 0;
  height: 40px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--gx-t1);
  font: inherit;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.01em;
  caret-color: var(--gx-acc-2);
}
.gsx-input::placeholder { color: var(--gx-t4); font-weight: 500; }
.gsx-kind {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 11px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
  color: var(--gx-acc-2);
  background: color-mix(in srgb, var(--gx-acc) 14%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gx-acc) 34%, transparent), 0 0 18px -8px var(--gx-acc);
  animation: gsx-pop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.gsx-kind[hidden] { display: none; }
.gsx-clear, .gsx-esc {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  border: 0;
  cursor: pointer;
  font: inherit;
}
.gsx-clear { width: 28px; height: 28px; border-radius: 9px; background: transparent; color: var(--gx-t3); }
.gsx-clear:hover { background: var(--gx-soft-2); color: var(--gx-t1); }
.gsx-clear[hidden] { display: none; }
.gsx-esc {
  height: 24px;
  padding: 0 8px;
  border-radius: 7px;
  font-family: var(--gx-mono);
  font-size: 11px;
  color: var(--gx-t3);
  background: var(--gx-soft);
  box-shadow: inset 0 0 0 1px var(--gx-line), inset 0 -2px 0 var(--gx-line);
}
.gsx-esc svg { display: none; }
.gsx-esc:hover { color: var(--gx-t1); }

/* =====================================================================
   Вкладки групп со счётчиками (Tab / Shift+Tab — по кругу)
   ===================================================================== */
.gsx-tabs { display: flex; gap: 6px; flex-shrink: 0; padding: 10px 16px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--gx-line-2); }
.gsx-tabs::-webkit-scrollbar { display: none; }
.gsx-tabs[hidden] { display: none; }
.gsx-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  height: 32px;
  padding: 0 12px;
  border-radius: 99px;
  border: 1px solid var(--gx-line-2);
  background: transparent;
  color: var(--gx-t2);
  font: inherit;
  font-size: 12.5px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.gsx-tab svg { color: var(--gc, var(--gx-t3)); }
.gsx-tab i { font-style: normal; font-family: var(--gx-mono); font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--gx-soft-2); color: var(--gx-t3); }
.gsx-tab:hover {
  color: var(--gx-t1);
  border-color: color-mix(in srgb, var(--gc, var(--gx-acc)) 40%, transparent);
  background: color-mix(in srgb, var(--gc, var(--gx-acc)) 10%, transparent);
}
.gsx-tab.is-on {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--gc, var(--gx-acc)), color-mix(in srgb, var(--gc, var(--gx-acc)) 62%, #000));
  box-shadow: 0 8px 22px -10px var(--gc, var(--gx-acc)), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.gsx-tab.is-on svg { color: #fff; }
.gsx-tab.is-on i { background: rgba(255, 255, 255, 0.22); color: #fff; }

/* =====================================================================
   Тело: выдача слева, карточка справа
   ===================================================================== */
.gsx-main { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 390px; }
.gsx-list { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 10px 16px; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--gx-acc) 35%, transparent) transparent; transition: opacity 0.15s; }
.gsx-list::-webkit-scrollbar, .gsx-pv::-webkit-scrollbar { width: 8px; }
.gsx-list::-webkit-scrollbar-thumb, .gsx-pv::-webkit-scrollbar-thumb { border-radius: 99px; background: color-mix(in srgb, var(--gx-acc) 30%, transparent); border: 2px solid transparent; background-clip: padding-box; }
.gsx-list.is-stale { opacity: 0.55; }

/* Заголовок группы (липкий): значок с цветом группы, линия до «показать все» */
.gsx-gh {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 -10px;
  padding: 13px 20px 7px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--gc, var(--gx-acc-2)) 55%, var(--gx-t2));
  background: linear-gradient(180deg, var(--gx-bg) 74%, transparent);
}
.gsx-gh::after {
  content: "";
  order: 1;
  flex: 1;
  height: 1px;
  margin-left: 4px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--gc, var(--gx-acc)) 45%, transparent), transparent);
}
.gsx-gh svg { color: var(--gc, var(--gx-acc-2)); flex-shrink: 0; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--gc, var(--gx-acc)) 55%, transparent)); }
.gsx-gh i { font-style: normal; font-family: var(--gx-mono); letter-spacing: 0; color: var(--gx-t4); }
.gsx-gh-more {
  order: 2;
  margin-left: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--gx-acc-2);
  font: inherit;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  opacity: 0.85;
  transition: background 0.15s, opacity 0.15s;
}
.gsx-gh-more:hover { opacity: 1; background: color-mix(in srgb, var(--gx-acc) 12%, transparent); }

/* Строка выдачи */
.gsx-row {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
  animation: gsx-row 0.28s calc(var(--i, 0) * 18ms) cubic-bezier(0.16, 1, 0.3, 1) both;
  transition: background 0.12s, box-shadow 0.12s;
}
.gsx-row + .gsx-row { margin-top: 1px; }
.gsx-row.is-active {
  background: linear-gradient(90deg, color-mix(in srgb, var(--gx-acc) 20%, transparent), color-mix(in srgb, var(--gx-acc) 6%, transparent) 70%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gx-acc) 34%, transparent);
}
.gsx-row.is-active::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--gx-acc-2), var(--gx-acc));
  box-shadow: 0 0 10px color-mix(in srgb, var(--gx-acc) 70%, transparent);
}

/* Аватар, иконка, статус заявки */
.gsx-av {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 850;
  color: hsl(var(--h, 260) 85% 86%);
  background: radial-gradient(circle at 30% 20%, hsl(var(--h, 260) 75% 58% / 0.6), hsl(var(--h, 260) 65% 30% / 0.38));
  box-shadow: inset 0 0 0 1px hsl(var(--h, 260) 70% 70% / 0.28), 0 6px 14px -8px hsl(var(--h, 260) 70% 50% / 0.8);
}
.gsx-av.is-past { filter: saturate(0.35); opacity: 0.8; }
/* Светлая тема: инициалы тёмные, фон светлее — читаются на белом */
[data-theme="light-pearl"] .gsx-av {
  color: hsl(var(--h, 260) 62% 32%);
  background: radial-gradient(circle at 30% 20%, hsl(var(--h, 260) 85% 80% / 0.75), hsl(var(--h, 260) 70% 62% / 0.3));
  box-shadow: inset 0 0 0 1px hsl(var(--h, 260) 60% 50% / 0.25), 0 6px 14px -8px hsl(var(--h, 260) 70% 50% / 0.5);
}
.gsx-av.is-lg { width: 56px; height: 56px; border-radius: 18px; font-size: 19px; flex-shrink: 0; }
.gsx-ic {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  color: var(--c, var(--gx-t2));
  background: linear-gradient(145deg, color-mix(in srgb, var(--c, #94a3b8) 22%, transparent), color-mix(in srgb, var(--c, #94a3b8) 8%, transparent));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c, #94a3b8) 28%, transparent);
}
.gsx-ic.is-lg { width: 56px; height: 56px; border-radius: 18px; flex-shrink: 0; }
.gsx-ic.is-page svg { width: 18px; height: 18px; }
.gsx-ic.is-lg.is-page svg { width: 24px; height: 24px; }
.gsx .duo-fill { fill: currentColor; opacity: 0.2; }
.gsx-tk {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 15%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent);
}
.gsx-tk::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 2px var(--gx-bg), 0 0 8px var(--c);
}
.gsx-tk.is-lg { width: 56px; height: 56px; border-radius: 18px; flex-shrink: 0; }

/* Текст строки */
.gsx-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gsx-top { display: flex; align-items: center; gap: 7px; min-width: 0; }
.gsx-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 700; color: var(--gx-t1); }
.gsx-num { flex-shrink: 0; font-family: var(--gx-mono); font-size: 12px; font-weight: 800; color: var(--gx-acc-2); }
.gsx-idb { flex-shrink: 0; height: 18px; padding: 0 6px; border-radius: 6px; font-family: var(--gx-mono); font-size: 10.5px; font-weight: 800; line-height: 18px; color: var(--gx-t2); background: var(--gx-soft-2); box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18); }
.gsx-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 8px; min-width: 0; font-size: 12px; color: var(--gx-t3); }
.gsx-sub-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gsx mark {
  color: inherit;
  background: color-mix(in srgb, var(--gx-acc) 32%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--gx-acc) 42%, transparent);
  border-radius: 4px;
  padding: 0 1px;
}

/* Чип «что совпало»: поле + значение (+ «точно») */
.gsx-mt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-width: 0;
  height: 22px;
  padding: 0 8px 0 7px;
  border-radius: 8px;
  flex-shrink: 0;
  color: var(--gx-t2);
  background: rgba(148, 163, 184, 0.1);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.16);
}
.gsx-mt svg { flex-shrink: 0; color: var(--gx-acc-2); }
.gsx-mt b { flex-shrink: 0; font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gx-t3); }
.gsx-mt-v { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 650; color: var(--gx-t1); }
.gsx-mt-v.is-mono { font-family: var(--gx-mono); font-size: 11.5px; }
.gsx-mt em { flex-shrink: 0; font-style: normal; font-size: 9.5px; font-weight: 850; letter-spacing: 0.08em; text-transform: uppercase; color: #4ade80; }
.gsx-mt.is-exact { background: rgba(34, 197, 94, 0.1); box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.3); }
.gsx-mt.is-exact svg { color: #4ade80; }

/* Правая часть строки */
.gsx-side { display: flex; align-items: center; gap: 8px; flex-shrink: 0; color: var(--gx-t3); }
.gsx-enter {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 7px;
  font-family: var(--gx-mono);
  font-size: 11px;
  color: #fff;
  background: var(--gradient-accent, linear-gradient(135deg, var(--gx-acc), color-mix(in srgb, var(--gx-acc) 68%, #000)));
  box-shadow: 0 6px 14px -6px var(--gx-acc), inset 0 -2px 0 rgba(0, 0, 0, 0.18);
}
.gsx-row.is-active .gsx-enter { display: inline-flex; animation: gsx-pop 0.18s ease; }
.gsx-debt { font-family: var(--gx-mono); font-size: 12px; font-weight: 800; color: #fb7185; }
.gsx-amt { font-family: var(--gx-mono); font-size: 12.5px; font-weight: 800; color: var(--gx-t1); }
.gsx-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.gsx-res { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 800; color: var(--gx-t2); background: rgba(148, 163, 184, 0.1); }
.gsx-st {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
  color: color-mix(in srgb, var(--c) 78%, #fff);
  background: color-mix(in srgb, var(--c) 15%, transparent);
}
.gsx-st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); box-shadow: 0 0 6px var(--c); }

/* Метки */
.gsx-b {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 7px;
  border-radius: 99px;
  font-size: 9.5px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gx-t3);
  background: var(--gx-soft-2);
}
.gsx-b.is-fil2 { color: #2dd4bf; background: rgba(20, 184, 166, 0.16); }
.gsx-b.is-off { color: #fb7185; background: rgba(244, 63, 94, 0.14); }
.gsx-b.is-black { color: #f8fafc; background: rgba(15, 23, 42, 0.9); box-shadow: inset 0 0 0 1px rgba(248, 250, 252, 0.25); }
.gsx-b.is-src { color: var(--gx-t2); }

/* Скелетон: первый поиск, пока нет ни одной выдачи */
.gsx-sk { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px 12px; animation: gsx-row 0.3s calc(var(--i, 0) * 40ms) ease both; }
.gsx-sk-av, .gsx-sk-l1, .gsx-sk-l2, .gsx-sk-bar {
  display: block;
  border-radius: 9px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.08) 0%, color-mix(in srgb, var(--gx-acc) 18%, rgba(148, 163, 184, 0.12)) 40%, rgba(148, 163, 184, 0.08) 80%);
  background-size: 300% 100%;
  animation: gsx-shim 1.3s ease-in-out infinite;
}
.gsx-sk-av { width: 38px; height: 38px; border-radius: 13px; }
.gsx-sk-b { display: flex; flex-direction: column; gap: 8px; }
.gsx-sk-l1 { width: 46%; height: 12px; }
.gsx-sk-l2 { width: 72%; height: 10px; opacity: 0.7; }
.gsx-sk:nth-child(odd) .gsx-sk-l1 { width: 38%; }
.gsx-sk:nth-child(3n) .gsx-sk-l2 { width: 58%; }
.gsx-sk-bar { width: 120px; height: 9px; }

/* =====================================================================
   Пустой запрос: недавние, разделы плитками, «что можно искать»
   ===================================================================== */
.gsx-hint { margin: 14px 10px 4px; font-size: 12.5px; color: var(--gx-t3); }
.gsx-none { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 46px 20px 20px; text-align: center; }
.gsx-none-ic { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 19px; color: var(--gx-acc-2); background: color-mix(in srgb, var(--gx-acc) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gx-acc) 24%, transparent); }
.gsx-none-t { font-size: 15px; font-weight: 750; }
.gsx-none-s { font-size: 12.5px; color: var(--gx-t3); }
.gsx-can { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 20px 6px 6px; padding: 14px 10px 12px; border-radius: 16px; background: linear-gradient(180deg, var(--gx-soft), transparent); box-shadow: inset 0 0 0 1px var(--gx-line-2); }
.gsx-can-t { width: 100%; margin-bottom: 4px; text-align: center; font-size: 10.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gx-t4); }
.gsx-can-c { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 99px; font-size: 12px; color: var(--gx-t2); background: var(--gx-soft); box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.14); transition: background 0.15s, box-shadow 0.15s; }
.gsx-can-c:hover { background: color-mix(in srgb, var(--gx-acc) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gx-acc) 30%, transparent); }
.gsx-can-c svg { color: var(--gx-acc-2); }
.gsx-can-c em { font-style: normal; font-family: var(--gx-mono); font-size: 10.5px; color: var(--gx-t4); }
.gsx-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 4px 6px; }
.gsx-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--gx-t2);
  text-decoration: none;
  background: var(--gx-soft);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.16);
  transition: background 0.12s, color 0.12s;
}
.gsx-chip svg { color: var(--gx-t3); }
.gsx-chip.is-active { color: #fff; background: var(--gradient-accent, linear-gradient(135deg, var(--gx-acc), color-mix(in srgb, var(--gx-acc) 68%, #000))); box-shadow: 0 8px 20px -10px var(--gx-acc); }
.gsx-chip.is-active svg { color: #fff; }
.gsx-pg-l { display: flex; align-items: center; gap: 10px; margin: 12px 12px 6px; font-size: 10px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gx-t4); }
.gsx-pg-l::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--gx-line), transparent); }
.gsx-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; padding: 0 2px; }
/* Плитка раздела: карточка с цветным значком, подсветка и подъём */
.gsx-row.is-tile {
  grid-template-columns: 36px minmax(0, 1fr) auto;
  padding: 9px 10px;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(148, 163, 184, 0.06), rgba(148, 163, 184, 0.02));
  box-shadow: inset 0 0 0 1px var(--gx-line-2);
  transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
}
.gsx-row.is-tile + .gsx-row.is-tile { margin-top: 0; }
.gsx-row.is-tile .gsx-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; font-size: 13px; }
.gsx-row.is-tile .gsx-enter { display: none !important; }
.gsx-row.is-tile .gsx-ic { width: 36px; height: 36px; border-radius: 12px; transition: box-shadow 0.15s, transform 0.15s; }
.gsx-row.is-tile .gsx-sub { display: none; }
.gsx-row.is-tile .gsx-side { opacity: 0; transform: translateX(-4px); transition: opacity 0.15s, transform 0.15s; color: var(--gx-acc-2); }
.gsx-row.is-tile.is-active {
  transform: translateY(-1px);
  background: linear-gradient(160deg, color-mix(in srgb, var(--gx-acc) 16%, transparent), color-mix(in srgb, var(--gx-acc) 4%, transparent));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gx-acc) 42%, transparent), 0 12px 26px -16px var(--gx-acc);
}
.gsx-row.is-tile.is-active::before { display: none; }
.gsx-row.is-tile.is-active .gsx-ic { transform: scale(1.06); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c, #94a3b8) 50%, transparent), 0 0 20px -4px var(--c, var(--gx-acc)); }
.gsx-row.is-tile.is-active .gsx-side { opacity: 1; transform: none; }

/* =====================================================================
   Карточка справа
   ===================================================================== */
.gsx-pv {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-left: 1px solid var(--gx-line-2);
  background: color-mix(in srgb, var(--gx-bg-2) 55%, transparent);
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--gx-acc) 35%, transparent) transparent;
}
.gsx-pv.is-in .gsp { animation: gsx-pv 0.22s cubic-bezier(0.16, 1, 0.3, 1); }
.gsp { display: flex; flex-direction: column; gap: 14px; padding: 20px 20px 22px; }
.gsp-head { display: flex; align-items: center; gap: 14px; }
.gsp-head.is-hero {
  position: relative;
  margin: -20px -20px 0;
  padding: 24px 20px 18px;
  background:
    radial-gradient(420px 170px at 0% 0%, color-mix(in srgb, var(--sc) 30%, transparent), transparent 72%),
    linear-gradient(180deg, color-mix(in srgb, var(--sc) 10%, transparent), transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--sc) 18%, transparent);
}
.gsp-head.is-hero::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 40%;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, var(--sc), transparent);
  opacity: 0.75;
}
.gsp-head.is-hero .gsx-av.is-lg, .gsp-head.is-hero .gsx-ic.is-lg, .gsp-head.is-hero .gsx-tk.is-lg {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sc) 30%, transparent), 0 12px 28px -12px var(--sc);
}
.gsp-hb { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.gsp-name { font-size: 17px; font-weight: 850; letter-spacing: -0.02em; line-height: 1.2; word-break: break-word; }
.gsp-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.gsp-num { font-family: var(--gx-mono); font-size: 12px; font-weight: 800; color: var(--gx-acc-2); }
.gsp-idl { font-family: var(--gx-mono); font-size: 11.5px; color: var(--gx-t4); }
.gsp-found {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 13px;
  color: var(--gx-acc-2);
  background: color-mix(in srgb, var(--gx-acc) 10%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gx-acc) 28%, transparent);
}
.gsp-found svg { flex-shrink: 0; }
.gsp-found.is-exact { color: #4ade80; background: rgba(34, 197, 94, 0.08); box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.28); }
.gsp-found-t { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gsp-found-t b { font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.85; }
.gsp-found-v { font-size: 13px; font-weight: 700; color: var(--gx-t1); word-break: break-word; }
.gsp-found em { margin-left: auto; font-style: normal; font-size: 10px; font-weight: 850; letter-spacing: 0.08em; text-transform: uppercase; }
.gsp-money { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.gsp-tile { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 13px; background: linear-gradient(160deg, rgba(148, 163, 184, 0.09), rgba(148, 163, 184, 0.03)); box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12); }
.gsp-tile-k { display: flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gx-t4); }
.gsp-tile-k svg { flex-shrink: 0; color: var(--gx-t3); }
.gsp-tile.is-bad .gsp-tile-k svg { color: #fb7185; }
.gsp-tile.is-ok .gsp-tile-k svg { color: #4ade80; }
.gsp-tile-v { font-family: var(--gx-mono); font-size: 15px; font-weight: 850; color: var(--gx-t1); }
.gsp-tile-s { font-size: 11px; color: var(--gx-t4); }
.gsp-tile.is-bad .gsp-tile-v { color: #fb7185; }
.gsp-tile.is-ok .gsp-tile-v { color: #4ade80; }
.gsp-sec { display: flex; flex-direction: column; gap: 2px; }
.gsp-sec-h { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gx-t3); }
.gsp-sec-h::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--gx-line), transparent); }
.gsp-sec-h svg { color: var(--gx-acc-2); }
.gsp-kv { display: grid; grid-template-columns: 124px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 30px; margin: 0 -8px; padding: 3px 8px; border-radius: 9px; }
.gsp-kv:hover { background: rgba(148, 163, 184, 0.06); }
.gsp-kv.is-hit {
  background: color-mix(in srgb, var(--gx-acc) 13%, transparent);
  box-shadow: inset 3px 0 0 var(--gx-acc-2), inset 0 0 0 1px color-mix(in srgb, var(--gx-acc) 26%, transparent);
}
.gsp-kv.is-hit .gsp-k { color: var(--gx-acc-2); }
.gsp-kv.is-hit .gsp-v { color: var(--gx-t1); }
.gsp-kv.is-hit .gsp-copy { opacity: 1; }
.gsp-k { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: 11.5px; color: var(--gx-t4); }
.gsp-k span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gsp-k svg { flex-shrink: 0; }
.gsp-v { min-width: 0; font-size: 13px; font-weight: 600; color: var(--gx-t1); word-break: break-word; }
.gsp-v.is-mono { font-family: var(--gx-mono); font-size: 12.5px; }
.gsp-link { color: var(--gx-acc-2); text-decoration: none; }
.gsp-link:hover { text-decoration: underline; }
.gsp-copy {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--gx-t3);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s, background 0.12s;
}
.gsp-kv:hover .gsp-copy, .gsp-copy:focus-visible, .gsp-copy.is-done { opacity: 1; }
.gsp-copy:hover { background: rgba(148, 163, 184, 0.14); color: var(--gx-t1); }
.gsp-copy svg:last-child { display: none; color: #4ade80; }
.gsp-copy.is-done svg:first-child { display: none; }
.gsp-copy.is-done svg:last-child { display: block; }
.gsp-tel { color: #4ade80; text-decoration: none; }
.gsp-tel svg:last-child { display: block; color: inherit; }
.gsp-kv:has(.gsp-tel) { grid-template-columns: 124px minmax(0, 1fr) auto auto; }
@media (hover: none) { .gsp-copy { opacity: 1; } }
.gsp-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.gsp-chipx { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 11.5px; font-weight: 700; color: color-mix(in srgb, var(--c, #94a3b8) 78%, #fff); background: color-mix(in srgb, var(--c, #94a3b8) 14%, transparent); }
.gsp-chipx::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c, #94a3b8); box-shadow: 0 0 6px var(--c, #94a3b8); }
.gsp-text { font-size: 12.5px; line-height: 1.55; color: var(--gx-t2); white-space: pre-wrap; word-break: break-word; }
.gsp-big { display: flex; align-items: baseline; gap: 10px; padding: 6px 0; }
.gsp-big b { font-family: var(--gx-mono); font-size: 34px; font-weight: 900; letter-spacing: -0.03em; color: var(--gx-t1); }
.gsp-big span { font-size: 12.5px; color: var(--gx-t3); }

/* Таймлайн истории статусов заявки */
.gsp-tl { position: relative; display: flex; flex-direction: column; gap: 10px; padding-left: 4px; }
.gsp-tl::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: linear-gradient(180deg, var(--gx-line), transparent); }
.gsp-tl-r { position: relative; display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 12px; }
.gsp-tl-dot { position: relative; z-index: 1; width: 10px; height: 10px; margin-top: 4px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px var(--gx-bg), 0 0 8px var(--c); }
.gsp-tl-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 12px; }
.gsp-tl-top b { font-weight: 800; color: color-mix(in srgb, var(--c) 75%, #fff); }
.gsp-tl-top span { font-family: var(--gx-mono); font-size: 11px; color: var(--gx-t4); }
.gsp-tl-c { margin-top: 3px; font-size: 12.5px; line-height: 1.5; color: var(--gx-t2); word-break: break-word; }

/* Действия */
.gsp-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.gsp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gx-t1);
  text-decoration: none;
  background: rgba(148, 163, 184, 0.1);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18);
  transition: transform 0.12s, background 0.12s, box-shadow 0.12s;
}
.gsp-btn:hover { background: rgba(148, 163, 184, 0.16); transform: translateY(-1px); }
.gsp-btn.is-main { color: #fff; background: var(--gradient-accent, linear-gradient(135deg, var(--gx-acc), color-mix(in srgb, var(--gx-acc) 68%, #000))); box-shadow: 0 12px 26px -12px var(--gx-acc), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
.gsp-btn.is-main:hover { box-shadow: 0 16px 30px -12px var(--gx-acc), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.gsp-btn kbd { font-family: var(--gx-mono); font-size: 10.5px; padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.18); }
.gsx-ic.is-xl { width: 78px; height: 78px; border-radius: 24px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c, #94a3b8) 35%, transparent), 0 18px 40px -16px var(--c, var(--gx-acc)); }
.gsx-ic.is-xl.is-page svg { width: 34px; height: 34px; }
.gsp-page {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: -20px -20px 0;
  padding: 28px 20px 20px;
  background: radial-gradient(380px 200px at 0% 0%, color-mix(in srgb, var(--c, var(--gx-acc)) 24%, transparent), transparent 72%);
  border-bottom: 1px solid var(--gx-line-2);
}
.gsp-page-g { margin-top: 6px; font-size: 10px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gx-t4); }
.gsp-page-t { font-size: 19px; font-weight: 850; letter-spacing: -0.02em; line-height: 1.2; }
.gsp-page-u { font-family: var(--gx-mono); font-size: 11.5px; color: var(--gx-t4); }

/* Пустая карточка: значок и клавиши */
.gsp-empty { height: 100%; min-height: 240px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; color: var(--gx-t4); }
.gsp-empty-ic {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 17px;
  color: var(--gx-acc-2);
  background: color-mix(in srgb, var(--gx-acc) 12%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gx-acc) 26%, transparent);
}
.gsp-empty-t { max-width: 250px; font-size: 12.5px; line-height: 1.5; }
.gsp-legend { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 260px; margin-top: 8px; padding: 14px 16px; border-radius: 16px; background: linear-gradient(160deg, rgba(148, 163, 184, 0.08), rgba(148, 163, 184, 0.02)); box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12); }
.gsp-legend-r { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--gx-t3); }
.gsp-legend-r kbd { min-width: 54px; text-align: center; padding: 2px 8px; border-radius: 7px; font-family: var(--gx-mono); font-size: 11px; font-weight: 700; color: var(--gx-t1); background: linear-gradient(180deg, rgba(148, 163, 184, 0.16), rgba(148, 163, 184, 0.08)); border: 1px solid var(--gx-line); border-bottom-width: 2px; }

/* =====================================================================
   Подвал: клавиши и итог
   ===================================================================== */
.gsx-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; padding: 9px 30px 9px 18px; border-top: 1px solid var(--gx-line-2); background: color-mix(in srgb, var(--gx-bg-2) 72%, transparent); }
.gsx-keys { display: flex; flex-wrap: wrap; gap: 14px; }
.gsx-key { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--gx-t4); }
.gsx-key kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 6px;
  font-family: var(--gx-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--gx-t2);
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.14), rgba(148, 163, 184, 0.06));
  border: 1px solid var(--gx-line);
  border-bottom-width: 2px;
}
.gsx-stat { font-family: var(--gx-mono); font-size: 11.5px; color: var(--gx-t4); white-space: nowrap; }

/* =====================================================================
   Анимации
   ===================================================================== */
@keyframes gsx-run { 0% { left: -40%; } 100% { left: 100%; } }
@keyframes gsx-spin { to { transform: rotate(360deg); } }
@keyframes gsx-pop { from { transform: scale(0.85); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes gsx-row { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes gsx-pv { from { opacity: 0; transform: translateX(6px); } to { opacity: 1; transform: none; } }
@keyframes gsx-shim { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* =====================================================================
   Адаптив по ширине САМОГО окна (растянули поуже — карточка уже, потом скрыта);
   телефон — окно на весь экран без рамки
   ===================================================================== */
.gsx-dialog { container-type: inline-size; container-name: gsx; }
@container gsx (max-width: 1040px) {
  .gsx-main { grid-template-columns: minmax(0, 1fr) 330px; }
}
@container gsx (max-width: 780px) {
  .gsx-main { grid-template-columns: minmax(0, 1fr); }
  .gsx-pv { display: none; }
}
@media (max-width: 640px) {
  .gsx { padding: 0; }
  .gsx-dialog, .gsx-dialog.is-float, .gsx-dialog.is-max {
    position: relative;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    height: 100% !important;
    border: 0;
    border-radius: 0;
  }
  .gsx-chrome, .gsx-dialog > .gsx-rz, .gsx-dialog > .gsx-corner { display: none; }
  .gsx-head { gap: 10px; padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px; }
  .gsx-head-ic { width: 32px; height: 32px; border-radius: 10px; }
  .gsx-input { font-size: 17px; }
  .gsx-kind span { display: none; }
  .gsx-kind { padding: 0 8px; }
  .gsx-esc { width: 34px; height: 34px; padding: 0; border-radius: 10px; }
  .gsx-esc span { display: none; }
  .gsx-esc svg { display: block; }
  .gsx-tabs { padding: 8px 10px; }
  .gsx-list { padding: 2px 6px calc(14px + env(safe-area-inset-bottom, 0px)); }
  .gsx-gh { margin: 0 -6px; padding: 12px 14px 6px; }
  .gsx-foot { display: none; }
  .gsx-pages { grid-template-columns: minmax(0, 1fr); }
  .gsx-row { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; padding: 9px 8px; }
  .gsx-av, .gsx-ic, .gsx-tk { width: 34px; height: 34px; border-radius: 11px; }
  .gsx-row.is-active::before { left: -4px; }
  .gsx-enter { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .gsx *, .gsx-dialog, .gsx-backdrop { animation: none !important; transition: none !important; }
}

/* =====================================================================
   Светлая тема (light-pearl)
   Затемнение под окном — мягкое; акцент текста и значков (--gx-acc-2),
   цвета групп и статусов уводим в чернила — читаются на белом; «точно»,
   долг, «отключён», «филиал 2» — цветами статусов темы; без неонового
   свечения точек и значков. Дополняет правила выше: тень окна
   (.gsx-dialog) и аватар (.gsx-av). :where() не добавляет веса.
   ===================================================================== */
:where(html[data-theme="light-pearl"]) .gsx {
  --gx-acc-2: var(--accent-bright, #5c4ebc);
}
:where(html[data-theme="light-pearl"]) .gsx-backdrop {
  background: var(--scrim, rgba(17, 24, 46, 0.36));
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

/* Группы: значок заголовка, вкладки */
:where(html[data-theme="light-pearl"]) .gsx-gh svg {
  color: color-mix(in oklab, var(--gc, var(--gx-acc)) 82%, #0b1020);
  filter: none;
}
:where(html[data-theme="light-pearl"]) .gsx-tab svg {
  color: color-mix(in oklab, var(--gc, var(--gx-t3)) 82%, #0b1020);
}
:where(html[data-theme="light-pearl"]) .gsx-tab.is-on {
  background: linear-gradient(135deg, color-mix(in oklab, var(--gc, var(--gx-acc)) 74%, #0b1020), color-mix(in oklab, var(--gc, var(--gx-acc)) 58%, #0b1020));
  box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--gc, var(--gx-acc)) 70%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Строки: полоса выбранной, значки, точки и статусы */
:where(html[data-theme="light-pearl"]) .gsx-row.is-active::before {
  box-shadow: none;
}
:where(html[data-theme="light-pearl"]) .gsx-ic {
  color: color-mix(in oklab, var(--c, var(--gx-t2)) 80%, #0b1020);
}
:where(html[data-theme="light-pearl"]) .gsx-tk {
  color: color-mix(in oklab, var(--c) 80%, #0b1020);
}
:where(html[data-theme="light-pearl"]) .gsx-tk::after {
  box-shadow: 0 0 0 2px var(--gx-bg);
}
:where(html[data-theme="light-pearl"]) .gsp-tl-dot {
  box-shadow: 0 0 0 3px var(--gx-bg);
}
:where(html[data-theme="light-pearl"]) .gsx-dot {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent);
}
:where(html[data-theme="light-pearl"]) .gsx-st,
:where(html[data-theme="light-pearl"]) .gsp-chipx {
  color: color-mix(in oklab, var(--c, #94a3b8) 70%, #0b1020);
}
:where(html[data-theme="light-pearl"]) .gsx-st::before,
:where(html[data-theme="light-pearl"]) .gsp-chipx::before {
  box-shadow: none;
}
:where(html[data-theme="light-pearl"]) .gsp-tl-top b {
  color: color-mix(in oklab, var(--c) 70%, #0b1020);
}
:where(html[data-theme="light-pearl"]) .gsx-row.is-tile.is-active .gsx-ic {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c, #94a3b8) 45%, transparent), 0 8px 16px -8px var(--c, var(--gx-acc));
}

/* Статусы: «точно», «есть деньги», телефон — нефрит; долг и «отключён» — гранат; филиал 2 — бирюза */
:where(html[data-theme="light-pearl"]) .gsx-mt em,
:where(html[data-theme="light-pearl"]) .gsx-mt.is-exact svg,
:where(html[data-theme="light-pearl"]) .gsp-found.is-exact,
:where(html[data-theme="light-pearl"]) .gsp-tile.is-ok .gsp-tile-k svg,
:where(html[data-theme="light-pearl"]) .gsp-tile.is-ok .gsp-tile-v,
:where(html[data-theme="light-pearl"]) .gsp-copy svg:last-child,
:where(html[data-theme="light-pearl"]) .gsp-tel {
  color: var(--success-text);
}
:where(html[data-theme="light-pearl"]) .gsx-debt,
:where(html[data-theme="light-pearl"]) .gsp-tile.is-bad .gsp-tile-k svg,
:where(html[data-theme="light-pearl"]) .gsp-tile.is-bad .gsp-tile-v {
  color: var(--danger-text);
}
:where(html[data-theme="light-pearl"]) .gsx-b.is-off {
  color: var(--danger-text);
  background: var(--danger-soft);
}
:where(html[data-theme="light-pearl"]) .gsx-b.is-fil2 {
  color: #00716d;
  background: rgba(0, 136, 133, 0.12);
}
