/* ============================================================================
   Vlprox — ретро-оболочка в духе Windows 95/98 и Windows XP.

   Правила системы:
     · рамка страницы, диалоги, модальные окна  → XP Luna (синий градиент,
       скруглённый верх, лицо #ece9d8);
     · внутренние панели и карточки             → Windows 95 (серебро #d4d0c8,
       квадратные фаски, сине-голубой заголовок);
     · любой контрол                            → жёсткие 1px фаски, без
       скруглений и без теней-размытий.

   Шрифт интерфейса — Tahoma 11px (как в XP), данные — Lucida Console.
   ========================================================================== */

:root {
  /* --- Классическая палитра 95/98 --- */
  --face: #d4d0c8;
  --face-95: #c0c0c0;
  --face-xp: #ece9d8;
  --face-light: #f4f2e8;
  --hilite: #ffffff;
  --light: #dfdfdf;
  --shadow: #808080;
  --dark: #404040;
  --ink: #000000;
  --ink-2: #3b3b3b;
  --ink-3: #6b6b63;
  --disabled: #9a968f;

  /* --- Заголовки окон --- */
  --title-95-a: #000080;
  --title-95-b: #1084d0;
  --title-xp-a: #0a4bb5;
  --title-xp-b: #3d95f5;
  --frame: #0831d9;
  --frame-95: #808080;

  /* --- Акценты --- */
  --navy: #000080;
  --select: #316ac5;
  --teal: #008080;
  --green-a: #6bbd58;
  --green-b: #37882c;
  --green-c: #245c1c;
  --red-a: #e8695a;
  --red-b: #c0392b;
  --amber: #a06000;
  --link: #0000ee;

  --font-ui: Tahoma, Verdana, Geneva, 'DejaVu Sans', sans-serif;
  --font-mono: 'Lucida Console', 'Courier New', Courier, monospace;

  /* Фаски */
  --out: inset -1px -1px 0 var(--shadow), inset 1px 1px 0 var(--hilite),
    inset -2px -2px 0 var(--dark), inset 2px 2px 0 var(--light);
  --in: inset 1px 1px 0 var(--shadow), inset -1px -1px 0 var(--hilite),
    inset 2px 2px 0 var(--dark), inset -2px -2px 0 var(--light);
  --out-thin: inset -1px -1px 0 var(--shadow), inset 1px 1px 0 var(--hilite);
  --in-thin: inset 1px 1px 0 var(--shadow), inset -1px -1px 0 var(--hilite);
  --groove: inset -1px -1px 0 var(--hilite), inset 1px 1px 0 var(--shadow);

  /* Кнопки заголовка окна (95) */
  --btns-95: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='50' height='14' shape-rendering='crispEdges'%3E%3Crect x='0' y='0' width='14' height='14' fill='%23d4d0c8'/%3E%3Cpath d='M0 0h14v1H0zM0 0h1v14H0z' fill='%23fff'/%3E%3Cpath d='M0 13h14v1H0zM13 0h1v14h-1z' fill='%23000'/%3E%3Cpath d='M3 9h8v2H3z' fill='%23000'/%3E%3Crect x='18' y='0' width='14' height='14' fill='%23d4d0c8'/%3E%3Cpath d='M18 0h14v1H18zM18 0h1v14h-1z' fill='%23fff'/%3E%3Cpath d='M18 13h14v1H18zM31 0h1v14h-1z' fill='%23000'/%3E%3Cpath d='M21 3h8v8h-8z' fill='none' stroke='%23000'/%3E%3Cpath d='M21 3h8v2h-8z' fill='%23000'/%3E%3Crect x='36' y='0' width='14' height='14' fill='%23d4d0c8'/%3E%3Cpath d='M36 0h14v1H36zM36 0h1v14h-1z' fill='%23fff'/%3E%3Cpath d='M36 13h14v1H36zM49 0h1v14h-1z' fill='%23000'/%3E%3Cpath d='M39.5 4.5l6 6M45.5 4.5l-6 6' stroke='%23000' stroke-width='1.4'/%3E%3C/svg%3E");

  /* Кнопки заголовка окна (XP) */
  --btns-xp: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='62' height='18'%3E%3Cg stroke='%23ffffff' stroke-opacity='.75' fill='none' stroke-width='1.4'%3E%3Crect x='.9' y='.9' width='16.2' height='16.2' rx='3.5' fill='%234c8ef0'/%3E%3Cpath d='M5 12.6h8'/%3E%3Crect x='22.9' y='.9' width='16.2' height='16.2' rx='3.5' fill='%234c8ef0'/%3E%3Cpath d='M27 5.5h8v7h-8zM27 5.5h8v2h-8z'/%3E%3Crect x='44.9' y='.9' width='16.2' height='16.2' rx='3.5' fill='%23d8503c'/%3E%3Cpath d='M49 5.5l5 7M54 5.5l-5 7'/%3E%3C/g%3E%3C/svg%3E");

  --checker: repeating-conic-gradient(#ffffff 0% 25%, #b7b3ac 0% 50%) 0 0 / 4px 4px;
}

/* --------------------------------------------------------------------------
   Сброс и база
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink);
  background: #1f5fbe;
}

/*
 * Рабочий стол: небо и холм — привет обоям «Безмятежность».
 * Отдельный fixed-слой вместо background-attachment: fixed — тот заставляет
 * браузер перерисовывать градиент на каждый кадр прокрутки.
 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(140% 70% at 50% 108%, #7ec24a 0%, #56972f 34%, rgba(86, 151, 47, 0) 62%),
    linear-gradient(
      180deg,
      #0a3d91 0%,
      #1f5fbe 26%,
      #4b93de 48%,
      #8fc6ef 62%,
      #bfe0f6 70%,
      #8ab84f 70.6%,
      #5b9a33 82%,
      #3d7524 100%
    );
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
fieldset,
legend {
  margin: 0;
  padding: 0;
}

fieldset {
  border: 0;
  min-width: 0;
}

ul,
ol {
  list-style: none;
}

h1 {
  font-size: 15px;
}

h2 {
  font-size: 13px;
}

h3 {
  font-size: 12px;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

button:disabled {
  cursor: default;
  color: var(--disabled);
  text-shadow: 1px 1px 0 var(--hilite);
}

input,
select,
textarea {
  font: inherit;
  color: inherit;
}

code,
kbd,
samp {
  font-family: var(--font-mono);
  font-size: 11px;
}

time {
  font-variant-numeric: tabular-nums;
}

table {
  border-collapse: collapse;
}

svg {
  flex: none;
}

::selection {
  background: var(--navy);
  color: #ffffff;
}

:focus-visible {
  outline: 1px dotted var(--ink);
  outline-offset: -4px;
}

/* --------------------------------------------------------------------------
   Полосы прокрутки в стиле 95
   -------------------------------------------------------------------------- */

* {
  scrollbar-color: var(--face) #ffffff;
}

::-webkit-scrollbar {
  width: 16px;
  height: 16px;
}

::-webkit-scrollbar-track {
  background: var(--checker);
}

::-webkit-scrollbar-corner {
  background: var(--face);
}

::-webkit-scrollbar-thumb {
  background: var(--face);
  box-shadow: var(--out);
  border: 0;
}

::-webkit-scrollbar-button {
  background: var(--face) no-repeat center;
  box-shadow: var(--out);
  display: block;
  height: 16px;
  width: 16px;
}

::-webkit-scrollbar-button:vertical:decrement {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M8 5l4 5H4z' fill='%23000'/%3E%3C/svg%3E");
}

::-webkit-scrollbar-button:vertical:increment {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M8 11L4 6h8z' fill='%23000'/%3E%3C/svg%3E");
}

::-webkit-scrollbar-button:horizontal:decrement {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M5 8l5-4v8z' fill='%23000'/%3E%3C/svg%3E");
}

::-webkit-scrollbar-button:horizontal:increment {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M11 8L6 12V4z' fill='%23000'/%3E%3C/svg%3E");
}

::-webkit-scrollbar-button:vertical:start:increment,
::-webkit-scrollbar-button:vertical:end:decrement,
::-webkit-scrollbar-button:horizontal:start:increment,
::-webkit-scrollbar-button:horizontal:end:decrement {
  display: none;
}

/* --------------------------------------------------------------------------
   Утилиты
   -------------------------------------------------------------------------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.spin {
  animation: spin 900ms steps(8, end) infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--link);
  text-decoration: underline;
  cursor: pointer;
}

.text-link:hover {
  color: #d00;
}

/* --------------------------------------------------------------------------
   Кнопки
   -------------------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 25px;
  padding: 4px 14px;
  font-size: 11px;
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--face);
  box-shadow: var(--out);
  border: 0;
  border-radius: 0;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.button:hover:not(:disabled) {
  background: #dedad2;
}

.button:active:not(:disabled) {
  box-shadow: var(--in);
  padding: 5px 13px 3px 15px;
}

.button:disabled {
  color: var(--disabled);
  text-shadow: 1px 1px 0 var(--hilite);
}

.button--primary {
  color: #ffffff;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.45);
  background: linear-gradient(180deg, var(--green-a) 0%, #4f9f3f 42%, var(--green-b) 62%, var(--green-c) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset -1px -1px 0 #1c4a15,
    inset 1px 0 0 rgba(255, 255, 255, 0.3),
    0 1px 0 #14340f;
  font-weight: 700;
}

.button--primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #7fcd6b 0%, #5cad4b 42%, #3f9433 62%, #2a6a20 100%);
}

.button--primary:active:not(:disabled) {
  background: linear-gradient(180deg, var(--green-c) 0%, var(--green-b) 60%, #4f9f3f 100%);
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.button--primary:disabled {
  color: #e6e6e6;
  background: linear-gradient(180deg, #b9c4b6 0%, #93a08f 60%, #7c8878 100%);
  text-shadow: none;
}

.button--secondary,
.button--light {
  background: var(--face);
}

.button--light {
  background: var(--face-light);
}

.button--ghost {
  background: transparent;
  box-shadow: none;
  color: #ffffff;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
  padding: 4px 10px;
}

.button--ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.16);
  box-shadow: var(--out-thin);
}

.button--ghost:active:not(:disabled) {
  box-shadow: var(--in-thin);
}

.button--compact {
  min-height: 22px;
  padding: 2px 10px;
}

.button--compact:active:not(:disabled) {
  padding: 3px 9px 1px 11px;
}

.button--large {
  min-height: 30px;
  padding: 6px 20px;
  font-size: 12px;
}

.button--large:active:not(:disabled) {
  padding: 7px 19px 5px 21px;
}

.button--full {
  width: 100%;
}

/* Мелкая квадратная кнопка-иконка (панель инструментов) */
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 23px;
  height: 22px;
  color: var(--ink);
  background: var(--face);
  box-shadow: var(--out-thin);
  cursor: pointer;
  flex: none;
}

.icon-button:hover:not(:disabled) {
  background: #e4e0d8;
}

.icon-button:active:not(:disabled) {
  box-shadow: var(--in-thin);
}

.icon-button:disabled {
  color: var(--disabled);
  text-shadow: 1px 1px 0 var(--hilite);
  box-shadow: var(--out-thin);
}

/* --------------------------------------------------------------------------
   Формы
   -------------------------------------------------------------------------- */

input[type='text'],
input[type='search'],
input[type='password'],
input[type='number'],
input[type='date'],
input:not([type]),
select,
textarea {
  min-height: 22px;
  padding: 3px 5px;
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--ink);
  background: #ffffff;
  border: 0;
  border-radius: 0;
  box-shadow: var(--in);
  outline-offset: -3px;
}

textarea {
  padding: 5px;
  resize: vertical;
  line-height: 1.4;
}

select {
  padding-right: 18px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17'%3E%3Crect width='17' height='17' fill='%23d4d0c8'/%3E%3Cpath d='M0 0h17v1H0zM0 0h1v17H0z' fill='%23fff'/%3E%3Cpath d='M0 16h17v1H0zM16 0h1v17h-1z' fill='%23808080'/%3E%3Cpath d='M8.5 11L5 7h7z' fill='%23000'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
}

input:disabled,
select:disabled,
textarea:disabled {
  color: var(--disabled);
  background: var(--face);
  text-shadow: 1px 1px 0 var(--hilite);
  cursor: default;
}

input::placeholder,
textarea::placeholder {
  color: #9d9d95;
}

input[type='checkbox'] {
  appearance: none;
  width: 13px;
  height: 13px;
  margin: 0;
  flex: none;
  background: #ffffff;
  box-shadow: var(--in);
  cursor: pointer;
}

input[type='checkbox']:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13'%3E%3Cpath d='M3 6.5l2.5 3L10 3.5' stroke='%23000' stroke-width='1.8' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.stacked-form,
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stacked-form label,
.modal-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
}

.stacked-form label > span,
.modal-form label > span,
.select-control > span {
  color: var(--ink);
}

.stacked-form label b,
.modal-form label b {
  color: #a00;
}

.stacked-form small,
.modal-form small,
.select-control small {
  color: var(--ink-3);
  font-size: 10px;
  line-height: 1.35;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.form-grid--two {
  grid-template-columns: 1fr 1fr;
}

/* Группа полей — классический groupbox */
.modal-form fieldset,
.generator-controls fieldset {
  padding: 10px 10px 12px;
  box-shadow: var(--groove);
  position: relative;
  margin-top: 6px;
}

.modal-form legend,
.generator-controls legend {
  padding: 0 4px;
  margin-left: 4px;
  font-size: 11px;
  color: var(--ink);
  background: var(--face);
}

.input-with-icon {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 3px;
  background: #ffffff;
  box-shadow: var(--in);
}

.input-with-icon > svg {
  color: var(--shadow);
  margin-left: 3px;
}

.input-with-icon input {
  flex: 1;
  min-width: 0;
  box-shadow: none;
  padding: 2px 3px;
  min-height: 20px;
}

.input-with-icon input:focus-visible {
  outline: 1px dotted var(--ink);
  outline-offset: -2px;
}

.input-icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--face);
  box-shadow: var(--out-thin);
}

.input-icon-action:active {
  box-shadow: var(--in-thin);
}

.search-field,
.select-field {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 4px;
  background: var(--face);
  box-shadow: var(--out-thin);
  font-size: 11px;
}

.search-field {
  flex: 1;
  min-width: 180px;
}

.search-field input,
.select-field select {
  flex: 1;
  min-width: 0;
  min-height: 20px;
}

.select-control {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
}

.select-control > div {
  display: flex;
  align-items: center;
  gap: 4px;
}

.select-control select,
.select-control input {
  flex: 1;
  min-width: 0;
}

.select-control > div > svg {
  display: none;
}

/* Сообщения */
/* Блочная раскладка: внутри встречается и простой текст, и <strong> со списком. */
.form-notice,
.form-error {
  display: block;
  padding: 8px 10px;
  font-size: 11px;
  line-height: 1.45;
  background: #ffffe1;
  box-shadow: inset 0 0 0 1px #000000;
}

.form-notice > svg,
.form-error > svg {
  vertical-align: -3px;
  margin-right: 5px;
}

.form-error {
  background: #ffe8e4;
  color: #7a1408;
}

small.form-error {
  display: block;
  padding: 4px 6px;
}

.form-notice code {
  background: #ffffff;
  padding: 0 3px;
  box-shadow: var(--in-thin);
}

/* --------------------------------------------------------------------------
   Переключатель-вкладки
   -------------------------------------------------------------------------- */

.segmented-control {
  display: flex;
  gap: 2px;
}

.segmented-control button {
  flex: 1;
  min-height: 23px;
  padding: 3px 10px;
  font-size: 11px;
  background: var(--face);
  box-shadow: var(--out);
  white-space: nowrap;
}

.segmented-control button:hover {
  background: #dedad2;
}

.segmented-control button.is-active {
  box-shadow: var(--in);
  background: var(--checker);
  font-weight: 700;
  padding: 4px 9px 2px 11px;
}

/* --------------------------------------------------------------------------
   Значки состояния
   -------------------------------------------------------------------------- */

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 7px;
  font-size: 10px;
  white-space: nowrap;
  background: var(--face);
  color: var(--ink);
  box-shadow: var(--out-thin);
}

.status-dot {
  width: 7px;
  height: 7px;
  flex: none;
  background: var(--shadow);
  box-shadow: var(--in-thin);
}

.status-badge--active .status-dot,
.status-badge--success .status-dot,
.status-dot--teal {
  background: #00a000;
}

.status-badge--invited .status-dot {
  background: #0000c0;
}

.status-badge--suspended .status-dot {
  background: #c00000;
}

.status-badge--expired .status-dot {
  background: #808000;
}

.status-badge--active,
.status-badge--success {
  color: #005000;
}

.status-badge--suspended {
  color: #900000;
}

.status-badge--invited {
  color: #000080;
}

.counter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 18px;
  padding: 0 5px;
  font-size: 11px;
  font-family: var(--font-mono);
  background: #ffffff;
  box-shadow: var(--in-thin);
}

/* --------------------------------------------------------------------------
   Окно страницы (XP Luna)
   -------------------------------------------------------------------------- */

.workspace-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 12px 12px;
  min-height: calc(100vh - 28px);
  background: var(--face-xp);
  border: 3px solid var(--frame);
  border-top: 0;
  border-radius: 8px 8px 0 0;
  box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.45);
}

.workspace-page > :first-child:not(.workspace-header) {
  margin-top: 12px;
}

/* без строки заголовка окно всё равно должно быть замкнуто сверху */
.workspace-page:not(:has(> .workspace-header)) {
  border-top: 3px solid var(--frame);
}

.workspace-page > p {
  font-size: 11px;
}

/* Заголовок страницы = строка заголовка окна */
.workspace-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 -12px;
  padding: 4px 6px 5px 10px;
  background: linear-gradient(
    180deg,
    #0f6ce8 0%,
    #3d95f5 8%,
    #2a86f0 16%,
    #1c74e8 44%,
    #145fd4 86%,
    #2f7be8 94%,
    #0a4bb5 100%
  );
  border-radius: 5px 5px 0 0;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.workspace-header > div:first-child {
  flex: 1;
  min-width: 0;
}

.workspace-header h1 {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.55);
  letter-spacing: 0.2px;
}

.workspace-header p {
  font-size: 10px;
  color: #d3e6ff;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.35);
}

.workspace-header::after {
  content: '';
  width: 62px;
  height: 18px;
  flex: none;
  background: var(--btns-xp) no-repeat center / 62px 18px;
}


/* --------------------------------------------------------------------------
   Панель-окно (Windows 95)
   -------------------------------------------------------------------------- */

.workspace-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 10px 10px;
  background: var(--face);
  box-shadow: var(--out);
}

.workspace-card > :first-child:not(.workspace-card__header):not(.table-toolbar) {
  margin-top: 10px;
}

.workspace-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px -8px 0;
  padding: 2px 3px 2px 6px;
  background: linear-gradient(90deg, var(--title-95-a) 0%, var(--title-95-b) 100%);
}

.workspace-card__header > div:first-child {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
}

.workspace-card__header h2 {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
}

.workspace-card__header p {
  width: 100%;
  font-size: 10px;
  color: #c3dcf5;
  font-family: var(--font-mono);
}

.workspace-card__header p code {
  color: #ffffff;
}

.workspace-card__eyebrow {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--ink-3);
}

/* внутри строки заголовка — светлая надпись поверх синего */
.workspace-card__header .workspace-card__eyebrow {
  color: #a8caea;
}

.workspace-card__header > svg {
  color: #ffffff;
}

.workspace-card__header .text-link {
  color: #ffffff;
  font-size: 10px;
}

.workspace-card__header .text-link:hover {
  color: #ffff80;
}

.workspace-card__header::after {
  content: '';
  width: 50px;
  height: 14px;
  flex: none;
  background: var(--btns-95) no-repeat center / 50px 14px;
}

.workspace-card h2 {
  font-size: 12px;
}

.workspace-card > p {
  font-size: 11px;
  color: var(--ink-2);
}

.workspace-grid {
  display: grid;
  gap: 12px;
}

.workspace-grid--overview {
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
}

/* --------------------------------------------------------------------------
   Пустые состояния
   -------------------------------------------------------------------------- */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 30px 16px;
  text-align: center;
  background: #ffffff;
  box-shadow: var(--in);
}

.empty-state__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  color: var(--navy);
  background: var(--face);
  box-shadow: var(--out);
}

.empty-state h3 {
  font-size: 12px;
  font-weight: 700;
}

.empty-state p {
  max-width: 42ch;
  font-size: 11px;
  color: var(--ink-2);
}

.empty-state .button {
  margin-top: 4px;
}

.compact-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 12px;
  text-align: center;
  background: #ffffff;
  box-shadow: var(--in);
  font-size: 11px;
}

.compact-empty-state__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--navy);
  background: var(--face);
  box-shadow: var(--out);
}

.compact-empty-state span {
  color: var(--ink-2);
  max-width: 36ch;
}

/* --------------------------------------------------------------------------
   Оболочка приложения: «Пуск»-панель слева, рабочий стол справа
   -------------------------------------------------------------------------- */

.app-shell {
  display: grid;
  grid-template-columns: 226px minmax(0, 1fr);
  min-height: 100vh;
}

.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-right: 2px solid #0a3c88;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.app-sidebar__top {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 10px 8px;
  background: linear-gradient(180deg, #2b7ae8 0%, #1b5ecd 45%, #0f4bb0 100%);
  border-bottom: 2px solid #f4a417;
}

.environment-label {
  font-size: 10px;
  color: #cfe3ff;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.4);
}

.app-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px;
  overflow-y: auto;
  background: linear-gradient(180deg, #ffffff 0%, #ffffff 82%, #eef3fb 100%);
}

.app-nav__item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  font-size: 11px;
  color: var(--ink);
  cursor: pointer;
}

.app-nav__item svg {
  color: #1b5ecd;
}

.app-nav__item:hover {
  background: var(--select);
  color: #ffffff;
}

.app-nav__item:hover svg {
  color: #ffffff;
}

.app-nav__item.is-active {
  background: var(--select);
  color: #ffffff;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px #1a4a9e;
}

.app-nav__item.is-active svg {
  color: #ffffff;
}

.app-sidebar__bottom {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  background: linear-gradient(180deg, #2b7ae8 0%, #1b5ecd 50%, #0f4bb0 100%);
  border-top: 2px solid #f4a417;
}

.account-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.account-card__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  background: linear-gradient(180deg, #ffffff 0%, #cdd9ea 100%);
  box-shadow: 0 0 0 1px #ffffff, 0 0 0 2px #0a3c88;
}

.account-card__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.account-card__text strong {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.4);
}

.account-card__text span {
  font-size: 10px;
  color: #cfe3ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-action {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 8px;
  font-size: 11px;
  color: #ffffff;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.4);
  background: transparent;
}

.sidebar-action svg {
  padding: 2px;
  color: #ffffff;
  background: linear-gradient(180deg, #ef6a4c 0%, #b52d16 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6);
  box-sizing: content-box;
  width: 14px;
  height: 14px;
}

.sidebar-action:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.18);
}

.sidebar-action--muted {
  color: #b7cdec;
}

.sidebar-action--muted svg {
  background: linear-gradient(180deg, #7f9ac4 0%, #4f6c99 100%);
}

.app-sidebar-scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.45);
  border: 0;
}

.app-mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 6px;
  background: linear-gradient(180deg, #3f8ff2 0%, #1f66d8 12%, #1a5bc8 88%, #0d3f9c 100%);
  border-bottom: 1px solid #08307a;
}

.app-main {
  min-width: 0;
  padding: 14px;
}

/* --------------------------------------------------------------------------
   Логотип
   -------------------------------------------------------------------------- */

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #ffffff;
}

.brand-mark__symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: none;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
  background: linear-gradient(135deg, #4aa3ff 0%, #0a53c8 50%, #06307a 100%);
  box-shadow: var(--out-thin), inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.brand-mark__name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.45);
}

.brand-mark--inverted {
  color: var(--ink);
}

.brand-mark--inverted .brand-mark__name {
  text-shadow: none;
}

/* --------------------------------------------------------------------------
   Карточки-счётчики
   -------------------------------------------------------------------------- */

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.metric-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--face);
  box-shadow: var(--out);
}

.metric-card > div:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.metric-card span {
  font-size: 10px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-card strong {
  font-size: 20px;
  font-family: var(--font-mono);
  line-height: 1.1;
}

.metric-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: none;
  color: #ffffff;
  box-shadow: var(--out-thin);
}

.metric-card__icon--violet {
  background: linear-gradient(180deg, #9a7de0 0%, #5b3fa8 100%);
}

.metric-card__icon--teal {
  background: linear-gradient(180deg, #3fb9a6 0%, #0d6b5c 100%);
}

.metric-card__icon--blue {
  background: linear-gradient(180deg, #57a2f0 0%, #14509e 100%);
}

.metric-card__icon--amber {
  background: linear-gradient(180deg, #f0b849 0%, #a06000 100%);
}

/* --------------------------------------------------------------------------
   Таблицы — вид «Таблица» из Проводника
   -------------------------------------------------------------------------- */

.table-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 -10px;
  padding: 5px 8px;
  background: var(--face);
  box-shadow: inset 0 -1px 0 var(--shadow), inset 0 -2px 0 var(--hilite);
  flex-wrap: wrap;
}

.responsive-table-wrap {
  margin: 0 -10px;
  overflow-x: auto;
  background: #ffffff;
  box-shadow: var(--in);
}

.data-table {
  width: 100%;
  font-size: 11px;
  background: #ffffff;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 4px 8px;
  text-align: left;
  font-size: 11px;
  font-weight: 400;
  color: var(--ink);
  background: var(--face);
  box-shadow: var(--out-thin);
  white-space: nowrap;
}

.data-table td {
  padding: 5px 8px;
  border-bottom: 1px solid #e8e6e0;
  vertical-align: middle;
}

.data-table tbody tr:hover td {
  background: #eef3fb;
}

.data-table code {
  font-size: 11px;
}

.client-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.client-cell > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.client-cell strong {
  font-size: 11px;
}

.client-cell small {
  font-size: 10px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 26ch;
}

.client-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: none;
  font-size: 10px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(180deg, #6ba4ec 0%, #14509e 100%);
  box-shadow: var(--out-thin);
}

.table-actions {
  width: 1%;
  white-space: nowrap;
}

.row-actions,
.table-actions > span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.table-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 21px;
  color: var(--ink);
  background: var(--face);
  box-shadow: var(--out-thin);
}

.table-action-button:hover:not(:disabled) {
  background: #e4e0d8;
}

.table-action-button:active:not(:disabled) {
  box-shadow: var(--in-thin);
}

.table-action-button:disabled {
  color: var(--disabled);
  text-shadow: 1px 1px 0 var(--hilite);
}

/* Строка состояния снизу карточки-таблицы */
.table-footer {
  margin: 0 -10px -10px;
  padding: 3px 8px;
  font-size: 10px;
  color: var(--ink-2);
  background: var(--face);
  box-shadow: var(--groove);
}

/* --------------------------------------------------------------------------
   Журнал событий
   -------------------------------------------------------------------------- */

.event-list {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  box-shadow: var(--in);
}

.event-list--full {
  max-height: none;
}

.event-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 9px;
  border-bottom: 1px solid #e8e6e0;
  font-size: 11px;
}

.event-row:last-child {
  border-bottom: 0;
}

.event-row:hover {
  background: #eef3fb;
}

.event-row > div {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.event-row strong {
  font-size: 11px;
}

.event-row span {
  font-size: 10px;
  color: var(--ink-3);
}

.event-row time {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--ink-3);
  white-space: nowrap;
}

.event-row__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: none;
  color: #ffffff;
  background: linear-gradient(180deg, #8f9aa8 0%, #4b5563 100%);
  box-shadow: var(--out-thin);
}

.event-row__icon.is-positive {
  background: linear-gradient(180deg, #6bbd58 0%, #2a6a20 100%);
}

/* --------------------------------------------------------------------------
   Модальное окно = диалог XP
   -------------------------------------------------------------------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
  background: rgba(8, 24, 58, 0.5);
}

.modal-panel {
  width: min(520px, 100%);
  background: var(--face-xp);
  border: 3px solid var(--frame);
  border-top: 0;
  border-radius: 8px 8px 0 0;
  box-shadow: 4px 4px 14px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 12px 14px;
}

.modal-panel--wide {
  width: min(760px, 100%);
}

.modal-panel__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 -12px;
  padding: 4px 5px 5px 10px;
  background: linear-gradient(
    180deg,
    #0f6ce8 0%,
    #3d95f5 8%,
    #2a86f0 16%,
    #1c74e8 44%,
    #145fd4 86%,
    #2f7be8 94%,
    #0a4bb5 100%
  );
  border-radius: 5px 5px 0 0;
}

.modal-panel__header > div:first-child {
  flex: 1;
  min-width: 0;
}

.modal-panel__header h2 {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.55);
}

.modal-panel__header p {
  font-size: 10px;
  color: #d3e6ff;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
}

/* фальшивые «свернуть/развернуть» слева от настоящего «закрыть» */
.modal-panel__header::after {
  content: '';
  order: 1;
  width: 42px;
  height: 18px;
  flex: none;
  background: var(--btns-xp) no-repeat left center / 62px 18px;
}

.modal-panel__header .icon-button {
  order: 2;
  width: 18px;
  height: 18px;
  margin-left: 3px;
  color: #ffffff;
  border-radius: 3px;
  background: linear-gradient(180deg, #f08a76 0%, #d8503c 45%, #a72d1c 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.modal-panel__header .icon-button:hover {
  background: linear-gradient(180deg, #ffa48f 0%, #e75f49 45%, #b8351f 100%);
}

.modal-panel > p {
  font-size: 11px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 4px;
}

/* --------------------------------------------------------------------------
   Результат создания клиента
   -------------------------------------------------------------------------- */

.invitation-result {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.success-emblem {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  color: #ffffff;
  background: linear-gradient(180deg, #6bbd58 0%, #2a6a20 100%);
  box-shadow: var(--out);
}

.invitation-result__client {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  background: #ffffff;
  box-shadow: var(--in);
}

.invitation-result__client > div {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.invitation-result__client strong {
  font-size: 12px;
}

.invitation-result__client span {
  font-size: 10px;
  color: var(--ink-3);
}

.invitation-link-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
}

.invitation-link-field > div {
  display: flex;
  gap: 6px;
}

.invitation-link-field input {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
}

.result-details {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 10px;
  font-size: 11px;
  background: #ffffff;
  box-shadow: var(--in);
}

.result-details span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.result-details code {
  background: var(--face);
  padding: 0 4px;
  box-shadow: var(--out-thin);
}

.invitation-behaviour {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  background: #ffffe1;
  box-shadow: inset 0 0 0 1px #000000;
}

.invitation-behaviour > div {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.invitation-behaviour strong {
  font-size: 11px;
}

.invitation-behaviour span {
  font-size: 10px;
  color: var(--ink-2);
}

/* --------------------------------------------------------------------------
   Готовность интеграции / провайдер
   -------------------------------------------------------------------------- */

.integration-readiness {
  gap: 8px;
}

.integration-readiness__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: #ffffff;
  background: linear-gradient(180deg, #57a2f0 0%, #14509e 100%);
  box-shadow: var(--out);
}

.readiness-steps {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  background: #ffffff;
  box-shadow: var(--in);
}

.readiness-steps span {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--ink-3);
}

.readiness-steps .is-ready {
  color: #005000;
}

.provider-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   Вход — экран приветствия Windows XP
   -------------------------------------------------------------------------- */

.auth-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: 40px;
  align-items: center;
  min-height: 100vh;
  padding: 40px;
  background: linear-gradient(180deg, #103e8f 0%, #2f6fd0 45%, #1c56ae 72%, #0b2f74 100%);
  position: relative;
  overflow: hidden;
}

/* характерные тонкие полосы экрана входа XP */
.auth-page::before,
.auth-page::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.75) 20%,
    rgba(255, 255, 255, 0.85) 80%,
    rgba(255, 255, 255, 0) 100%
  );
  box-shadow: 0 6px 22px rgba(120, 180, 255, 0.7);
  pointer-events: none;
}

.auth-page::before {
  top: 16%;
}

.auth-page::after {
  bottom: 16%;
}

.auth-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 20px 0 30px;
  color: #ffffff;
  text-align: right;
  align-items: flex-end;
  z-index: 1;
}

.auth-aside__aurora {
  position: absolute;
  inset: -60px -40px;
  background: radial-gradient(60% 60% at 70% 40%, rgba(255, 255, 255, 0.16), transparent 70%);
  pointer-events: none;
}

.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #cfe3ff;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.4);
}

.auth-back-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

.auth-aside__content {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.auth-aside__content h1 {
  font-size: 22px;
  font-weight: 400;
  line-height: 1.25;
  max-width: 16ch;
  text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.45);
}

.auth-aside__content > p {
  font-size: 11px;
  color: #d3e6ff;
  max-width: 42ch;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.35);
}

.auth-aside__content ul {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.auth-aside__content li {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: #eaf3ff;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.35);
}

.auth-aside__network {
  position: relative;
  width: 100%;
  height: 46px;
}

.auth-orbit {
  position: absolute;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.55));
}

.auth-orbit--one {
  top: 10px;
  width: 220px;
}

.auth-orbit--two {
  top: 20px;
  width: 150px;
}

.auth-orbit--three {
  top: 30px;
  width: 90px;
}

.auth-form-section {
  display: flex;
  justify-content: center;
  z-index: 1;
}

.auth-form-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 14px 16px;
  background: var(--face-xp);
  border: 3px solid var(--frame);
  border-top: 0;
  border-radius: 8px 8px 0 0;
  box-shadow: 4px 4px 16px rgba(0, 0, 0, 0.5);
}

.auth-form-card::before {
  content: 'Вход в систему';
  display: flex;
  align-items: center;
  margin: 0 -14px;
  padding: 5px 10px 6px;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.55);
  background:
    var(--btns-xp) no-repeat right 5px center / 62px 18px,
    linear-gradient(
      180deg,
      #0f6ce8 0%,
      #3d95f5 8%,
      #2a86f0 16%,
      #1c74e8 44%,
      #145fd4 86%,
      #2f7be8 94%,
      #0a4bb5 100%
    );
  border-radius: 5px 5px 0 0;
}

.auth-form-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-top: 2px;
  color: #ffffff;
  background: linear-gradient(180deg, #f0c14a 0%, #a06000 100%);
  box-shadow: var(--out);
}

.auth-form-card h2 {
  font-size: 14px;
}

.auth-form-card > p {
  font-size: 11px;
  color: var(--ink-2);
}

.invite-only-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  background: #ffffe1;
  box-shadow: inset 0 0 0 1px #000000;
}

.invite-only-note > div {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.invite-only-note strong {
  font-size: 11px;
}

.invite-only-note span {
  font-size: 10px;
  color: var(--ink-2);
}

/* --------------------------------------------------------------------------
   Служебные страницы: диалоги «Ошибка» / «Доступ ограничен»
   -------------------------------------------------------------------------- */

.centered-page,
.restricted-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 100vh;
  padding: 30px 16px;
}

.restricted-page__brand {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.centered-card,
.restricted-card {
  width: min(430px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0 18px 18px;
  text-align: center;
  background: var(--face-xp);
  border: 3px solid var(--frame);
  border-top: 0;
  border-radius: 8px 8px 0 0;
  box-shadow: 4px 4px 14px rgba(0, 0, 0, 0.5);
}

.centered-card::before,
.restricted-card::before {
  content: 'Vlprox';
  align-self: stretch;
  display: flex;
  align-items: center;
  margin: 0 -18px;
  padding: 5px 10px 6px;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  text-align: left;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.55);
  background:
    var(--btns-xp) no-repeat right 5px center / 62px 18px,
    linear-gradient(
      180deg,
      #0f6ce8 0%,
      #3d95f5 8%,
      #2a86f0 16%,
      #1c74e8 44%,
      #145fd4 86%,
      #2f7be8 94%,
      #0a4bb5 100%
    );
  border-radius: 5px 5px 0 0;
}

.centered-card::before {
  content: 'Ошибка 404';
}

.restricted-card::before {
  content: 'Доступ ограничен';
}

.centered-card h1,
.restricted-card h1 {
  font-size: 14px;
  margin-top: 4px;
}

.centered-card p,
.restricted-card p {
  font-size: 11px;
  color: var(--ink-2);
  max-width: 44ch;
}

.centered-card .button,
.restricted-card .button {
  margin-top: 6px;
}

.error-code {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 34px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 2px;
}

.restricted-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-top: 8px;
  color: #ffffff;
  background: linear-gradient(180deg, #e8695a 0%, #a72d1c 100%);
  box-shadow: var(--out);
}

/* --------------------------------------------------------------------------
   Кабинет клиента
   -------------------------------------------------------------------------- */

.client-workspace-header {
  align-items: center;
}

.client-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.client-status-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 10px;
  background: var(--face);
  box-shadow: var(--out);
}

.client-status-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--ink-3);
}

.client-status-card__body {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.client-status-card__body h2 {
  font-size: 12px;
}

.client-status-card__body p {
  font-size: 11px;
  color: var(--ink-2);
}

.client-status-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: none;
  color: #ffffff;
  box-shadow: var(--out-thin);
}

.client-status-card__icon--teal {
  background: linear-gradient(180deg, #3fb9a6 0%, #0d6b5c 100%);
}

.client-status-card__icon--blue {
  background: linear-gradient(180deg, #57a2f0 0%, #14509e 100%);
}

.client-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.client-dashboard-aside {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   Генератор прокси
   -------------------------------------------------------------------------- */

.generator-card__header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 20px;
  color: #ffffff;
}

.generator-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
  background: var(--face);
  box-shadow: var(--groove);
}

.generator-summary {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 7px 9px;
  background: #ffffff;
  box-shadow: var(--in);
}

.generator-summary > span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-3);
}

.generator-summary strong {
  flex: 1;
  font-size: 11px;
  font-family: var(--font-mono);
}

.generator-summary button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  padding: 2px 10px;
  font-size: 11px;
  background: var(--face);
  box-shadow: var(--out);
}

.generator-summary button:active {
  box-shadow: var(--in);
}

.generator-submit {
  align-self: flex-start;
}

.configuration-output {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #ffffff;
  box-shadow: var(--in);
}

.configuration-output__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 6px;
  background: var(--face);
  box-shadow: inset 0 -1px 0 var(--shadow);
}

.configuration-output__header > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.configuration-output__header span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-3);
}

.configuration-output__header small {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--ink-2);
}

.configuration-output__header > div:last-child {
  display: flex;
  gap: 3px;
}

.configuration-output > code {
  display: block;
  max-height: 260px;
  overflow: auto;
  padding: 8px 9px;
  font-size: 11px;
  line-height: 1.55;
  color: #0a2a06;
  background: #ffffff;
}

.configuration-output__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 26px 14px;
  text-align: center;
  color: var(--ink-3);
  font-size: 11px;
}

.configuration-output__empty span {
  font-size: 11px;
  color: var(--ink);
}

.configuration-output__empty small {
  font-size: 10px;
  max-width: 44ch;
}

/* --------------------------------------------------------------------------
   Профили
   -------------------------------------------------------------------------- */

.profile-list {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  box-shadow: var(--in);
}

.profile-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border-bottom: 1px solid #e8e6e0;
}

.profile-row:last-child {
  border-bottom: 0;
}

.profile-row:hover {
  background: #eef3fb;
}

.profile-row > div {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.profile-row strong {
  font-size: 11px;
}

.profile-row span {
  font-size: 10px;
  color: var(--ink-3);
}

.profile-row__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex: none;
  color: #ffffff;
  background: linear-gradient(180deg, #9a7de0 0%, #5b3fa8 100%);
  box-shadow: var(--out-thin);
}

/* --------------------------------------------------------------------------
   Статистика (заглушка)
   -------------------------------------------------------------------------- */

.statistics-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 14px;
  text-align: center;
  background: #ffffff;
  box-shadow: var(--in);
}

.statistics-empty__visual {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 54px;
}

.statistics-empty__visual span {
  width: 16px;
  background: var(--checker);
  box-shadow: var(--out-thin);
}

.statistics-empty__visual span:nth-child(1) {
  height: 40%;
}

.statistics-empty__visual span:nth-child(2) {
  height: 70%;
}

.statistics-empty__visual span:nth-child(3) {
  height: 52%;
}

.statistics-empty__visual span:nth-child(4) {
  height: 88%;
}

.statistics-empty h3 {
  font-size: 12px;
}

.statistics-empty p {
  font-size: 11px;
  color: var(--ink-2);
  max-width: 46ch;
}

.statistics-empty__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  font-size: 10px;
  background: var(--face);
  box-shadow: var(--out-thin);
}

/* --------------------------------------------------------------------------
   График расхода
   -------------------------------------------------------------------------- */

.stats-chart {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #ffffff;
  box-shadow: var(--in);
}

.stats-chart__plot {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 2px;
  height: 150px;
  padding: 8px 8px 0;
  overflow: hidden;
}

/* Потолок ширины: на паре снимков столбики не должны расплываться в блоки. */
.stats-chart__bar {
  flex: 1 1 auto;
  min-width: 2px;
  max-width: 26px;
  background: linear-gradient(180deg, #57a2f0 0%, #14509e 100%);
  box-shadow: var(--out-thin);
}

.stats-chart__bar:hover {
  background: linear-gradient(180deg, #6bbd58 0%, #2a6a20 100%);
}

.stats-chart__axis {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 8px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--ink-3);
  background: var(--face);
  box-shadow: var(--groove);
}

.stats-chart--empty {
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 28px 14px;
  text-align: center;
  color: var(--ink-3);
  font-size: 11px;
}

.stats-chart--empty span {
  color: var(--ink);
}

/* Графики нагрузки: полоса и соединения */
.load-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.load-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  box-shadow: var(--in);
}

.load-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 8px;
  font-size: 11px;
  background: var(--face);
  box-shadow: inset 0 -1px 0 var(--shadow);
}

.load-card__head span {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-2);
}

.load-chart {
  display: block;
  width: 100%;
  height: 110px;
}

.load-chart__line {
  fill: none;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.load-chart--blue .load-chart__line {
  stroke: #14509e;
}
.load-chart--blue .load-chart__area {
  fill: rgba(87, 162, 240, 0.28);
}
.load-chart--green .load-chart__line {
  stroke: #2a6a20;
}
.load-chart--green .load-chart__area {
  fill: rgba(107, 189, 88, 0.3);
}
.load-chart--violet .load-chart__line {
  stroke: #5b3fa8;
}
.load-chart--violet .load-chart__area {
  fill: rgba(154, 125, 224, 0.3);
}
.load-chart--amber .load-chart__line {
  stroke: #a06000;
}
.load-chart--amber .load-chart__area {
  fill: rgba(240, 184, 73, 0.32);
}

.load-card__axis {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 8px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--ink-3);
  background: var(--face);
  box-shadow: var(--groove);
}

.stats-chart--empty small {
  font-size: 10px;
  max-width: 46ch;
}

/* Прогресс длинной проверки */
.check-progress {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.check-progress__bar {
  height: 18px;
  padding: 2px;
  background: #ffffff;
  box-shadow: var(--in);
}

/* Полоса собрана из сегментов — как индикаторы прогресса в 95-й. */
.check-progress__bar span {
  display: block;
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    var(--title-95-a) 0,
    var(--title-95-a) 10px,
    transparent 10px,
    transparent 13px
  );
  transition: width 200ms linear;
}

.check-progress small {
  font-size: 10px;
  color: var(--ink-3);
}

.drop-zone.is-over textarea {
  box-shadow: var(--in), 0 0 0 2px #ffff00;
  background: #ffffe1;
}

/* --------------------------------------------------------------------------
   Поиск по панели (Ctrl+K)
   -------------------------------------------------------------------------- */

.palette-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 90px 16px 16px;
  background: rgba(8, 24, 58, 0.4);
}

.palette {
  width: min(520px, 100%);
  background: var(--face);
  box-shadow: var(--out), 4px 4px 14px rgba(0, 0, 0, 0.5);
  padding: 3px;
}

.palette__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 3px 2px 7px;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(90deg, var(--title-95-a) 0%, var(--title-95-b) 100%);
}

.palette__input {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 3px 0;
  padding: 3px 6px;
  background: #ffffff;
  box-shadow: var(--in);
}

.palette__input input {
  flex: 1;
  min-width: 0;
  box-shadow: none;
  min-height: 20px;
}

.palette__list {
  max-height: 320px;
  overflow-y: auto;
  background: #ffffff;
  box-shadow: var(--in);
}

.palette__item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  padding: 5px 8px;
  text-align: left;
  font-size: 11px;
  border-bottom: 1px solid #e8e6e0;
}

.palette__item small {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 10px;
}

.palette__item.is-active {
  background: var(--select);
  color: #ffffff;
}

.palette__item.is-active small {
  color: #d7e6ff;
}

.palette__empty {
  padding: 16px;
  text-align: center;
  font-size: 11px;
  color: var(--ink-3);
}

.palette__hint {
  padding: 3px 6px;
  font-size: 10px;
  color: var(--ink-3);
  box-shadow: var(--groove);
}

/* --------------------------------------------------------------------------
   Скринсейвер
   -------------------------------------------------------------------------- */

.screensaver {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: #000000;
  overflow: hidden;
  cursor: none;
}

.screensaver__logo {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(90deg, var(--title-95-a) 0%, var(--title-95-b) 100%);
  box-shadow: var(--out);
  will-change: transform;
}

.screensaver__hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24px;
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
}

/* --------------------------------------------------------------------------
   Высокая контрастность — как схема «Контрастная чёрная» в 95-й
   -------------------------------------------------------------------------- */

.high-contrast body::before {
  background: #000000;
}

.high-contrast {
  --face: #000000;
  --face-95: #000000;
  --face-xp: #000000;
  --face-light: #000000;
  --hilite: #ffffff;
  --light: #c0c0c0;
  --shadow: #808080;
  --dark: #ffffff;
  --ink: #ffffff;
  --ink-2: #ffffff;
  --ink-3: #c0c0c0;
  --disabled: #808080;
  --title-95-a: #000080;
  --title-95-b: #000080;
  --frame: #ffffff;
  --checker: #000080;
}

.high-contrast .data-table,
.high-contrast .event-list,
.high-contrast .profile-list,
.high-contrast .access-list,
.high-contrast .empty-state,
.high-contrast .compact-empty-state,
.high-contrast .stats-chart,
.high-contrast .load-card,
.high-contrast .docs-list,
.high-contrast .palette__list,
.high-contrast .configuration-output,
.high-contrast .result-details,
.high-contrast .statistics-empty,
.high-contrast .readiness-steps,
.high-contrast .invitation-result__client,
.high-contrast .generator-summary,
.high-contrast input,
.high-contrast select,
.high-contrast textarea {
  background: #000000;
  color: #ffffff;
}

.high-contrast .data-table td,
.high-contrast .event-row,
.high-contrast .profile-row,
.high-contrast .access-row,
.high-contrast .docs-item,
.high-contrast .palette__item {
  border-bottom-color: #808080;
}

.high-contrast .data-table tbody tr:hover td,
.high-contrast .event-row:hover,
.high-contrast .profile-row:hover,
.high-contrast .docs-item:hover {
  background: #000080;
}

.high-contrast .form-notice,
.high-contrast .form-error,
.high-contrast .invitation-behaviour,
.high-contrast .support-security-note,
.high-contrast .invite-only-note {
  background: #000000;
  color: #ffff00;
  box-shadow: inset 0 0 0 1px #ffff00;
}

.high-contrast .button--primary {
  background: #000080;
  color: #ffffff;
}

/* Боковое меню и счётчики тоже уходят в чёрный, иначе текст сливается. */
.high-contrast .app-sidebar,
.high-contrast .app-nav,
.high-contrast .app-sidebar__top,
.high-contrast .app-sidebar__bottom {
  background: #000000;
  color: #ffffff;
}

.high-contrast .app-nav__item,
.high-contrast .app-nav__item svg {
  color: #ffffff;
}

.high-contrast .app-nav__item:hover,
.high-contrast .app-nav__item.is-active {
  background: #000080;
  color: #ffff00;
}

.high-contrast .app-nav__item:hover svg,
.high-contrast .app-nav__item.is-active svg {
  color: #ffff00;
}

.high-contrast .counter-badge,
.high-contrast .status-badge,
.high-contrast .table-footer,
.high-contrast .load-card__head,
.high-contrast .load-card__axis,
.high-contrast .stats-chart__axis,
.high-contrast .configuration-output__header,
.high-contrast .table-toolbar,
.high-contrast .search-field,
.high-contrast .select-field {
  background: #000000;
  color: #ffffff;
}

.high-contrast .account-card__avatar,
.high-contrast .client-avatar {
  background: #000080;
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   Документация
   -------------------------------------------------------------------------- */

.docs-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.docs-tabs button {
  padding: 4px 12px;
  font-size: 11px;
  background: var(--face);
  box-shadow: var(--out);
}

.docs-tabs button:hover {
  background: #dedad2;
}

.docs-tabs button.is-active {
  box-shadow: var(--in);
  background: var(--checker);
  font-weight: 700;
  padding: 5px 11px 3px 13px;
}

.docs-intro {
  font-size: 11px;
  color: var(--ink-2);
}

.docs-list {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  box-shadow: var(--in);
  margin: 0;
}

.docs-item {
  padding: 8px 10px;
  border-bottom: 1px solid #e8e6e0;
}

.docs-item:last-child {
  border-bottom: 0;
}

.docs-item:hover {
  background: #eef3fb;
}

.docs-item dt {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--navy);
}

.docs-item dd {
  margin: 3px 0 0 20px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-2);
}

/* --------------------------------------------------------------------------
   Поддержка
   -------------------------------------------------------------------------- */

.support-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.support-guide-card {
  gap: 8px;
}

.support-guide-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: #ffffff;
  background: linear-gradient(180deg, #57a2f0 0%, #14509e 100%);
  box-shadow: var(--out);
}

.support-guide-card ul {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 9px;
  background: #ffffff;
  box-shadow: var(--in);
}

.support-guide-card li {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
}

.support-guide-card li svg {
  color: #2a6a20;
}

.support-security-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  font-size: 11px;
  background: #ffffe1;
  box-shadow: inset 0 0 0 1px #000000;
}

/* --------------------------------------------------------------------------
   Настройки и доступы
   -------------------------------------------------------------------------- */

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.settings-card {
  flex-direction: row !important;
  align-items: center;
  gap: 10px;
  padding: 12px 10px;
}

.settings-card > div:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.settings-card h2 {
  font-size: 12px;
}

.settings-card p {
  font-size: 11px;
  color: var(--ink-2);
}

.settings-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: none;
  color: #ffffff;
  background: linear-gradient(180deg, #6bbd58 0%, #2a6a20 100%);
  box-shadow: var(--out-thin);
}

.access-list {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  box-shadow: var(--in);
}

.access-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border-bottom: 1px solid #e8e6e0;
  flex-wrap: wrap;
}

.access-row:last-child {
  border-bottom: 0;
}

.access-row:hover {
  background: #eef3fb;
}

.access-row > .client-cell {
  flex: 1;
  min-width: 160px;
}

.access-row__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--ink-2);
}

/* --------------------------------------------------------------------------
   Лендинг
   -------------------------------------------------------------------------- */

.landing-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.landing-container {
  width: min(1140px, 100%);
  margin: 0 auto;
  padding: 0 16px;
}

/* Верхняя панель = строка заголовка + меню */
.landing-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: linear-gradient(180deg, #3f8ff2 0%, #1f66d8 12%, #1a5bc8 86%, #0d3f9c 100%);
  border-bottom: 1px solid #08307a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.landing-header__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 40px;
  padding-top: 4px;
  padding-bottom: 4px;
}

.landing-nav {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 2px;
}

.landing-nav a {
  padding: 4px 9px;
  font-size: 11px;
  color: #ffffff;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.4);
}

.landing-nav a:hover {
  background: var(--navy);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.landing-header__actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.landing-menu-button {
  display: none;
}

/* Герой */
.hero-section {
  position: relative;
  padding: 34px 0 30px;
  background: rgba(6, 34, 84, 0.18);
}

.hero-aurora {
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 55% at 20% 20%, rgba(255, 255, 255, 0.22), transparent 70%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 26px;
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: #ffffff;
}

.hero-copy h1 {
  font-size: 30px;
  line-height: 1.15;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-copy > p {
  font-size: 13px;
  max-width: 46ch;
  color: #e4f0ff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.45);
}

.hero-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.hero-proof {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.hero-proof span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  font-size: 11px;
  color: var(--ink);
  background: var(--face);
  box-shadow: var(--out-thin);
  text-shadow: none;
}

/* Окно «Контур подключения» */
.network-console {
  background: var(--face);
  box-shadow: var(--out), 4px 4px 12px rgba(0, 0, 0, 0.45);
  padding: 3px;
}

.network-console__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 3px 2px 6px;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(90deg, var(--title-95-a) 0%, var(--title-95-b) 100%);
}

.network-console__bar > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.network-console__state {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 400;
  padding: 1px 7px;
  color: var(--ink);
  background: var(--face);
  box-shadow: var(--out-thin);
}

.network-stage {
  position: relative;
  height: 320px;
  margin: 3px 0;
  overflow: hidden;
  background: var(--teal);
  box-shadow: var(--in);
}

.network-stage__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 24px 24px;
}

.network-stage__routes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.route-line {
  fill: none;
  stroke-width: 2;
}

.route-line--muted {
  stroke: rgba(255, 255, 255, 0.25);
  stroke-dasharray: 4 4;
}

.route-line--active {
  stroke-width: 3;
  stroke-dasharray: 300 700;
  animation: route-run 4.5s linear infinite;
}

.route-line--branch {
  stroke: rgba(255, 255, 0, 0.6);
  stroke-dasharray: 3 5;
}

@keyframes route-run {
  from {
    stroke-dashoffset: 1000;
  }
  to {
    stroke-dashoffset: 0;
  }
}

.network-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 5px 8px;
  background: var(--face);
  box-shadow: var(--out);
  font-size: 10px;
}

.network-node span {
  width: 8px;
  height: 8px;
  background: #00a000;
  box-shadow: var(--in-thin);
}

.network-node small {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-3);
}

.network-node strong {
  font-size: 11px;
}

.network-node--origin {
  left: 18px;
  bottom: 40px;
}

.network-node--relay {
  left: 38%;
  top: 22%;
}

.network-node--exit {
  right: 18px;
  top: 42%;
}

.route-settings-card {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 172px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 4px 7px 8px;
  background: var(--face);
  box-shadow: var(--out);
}

.route-settings-card__title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 -7px 3px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(90deg, var(--title-95-a) 0%, var(--title-95-b) 100%);
}

.mini-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
}

.mini-field span {
  color: var(--ink-3);
}

.mini-field strong {
  font-family: var(--font-mono);
  font-size: 10px;
}

.mini-action {
  margin-top: 3px;
  padding: 2px 8px;
  text-align: center;
  font-size: 10px;
  background: var(--face);
  box-shadow: var(--out);
}

.network-console__footer {
  display: flex;
  gap: 3px;
  padding: 2px 0 0;
}

.network-console__footer span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  padding: 2px 7px;
  font-size: 10px;
  color: var(--ink-2);
  box-shadow: var(--groove);
}

/*
 * Секции лендинга. Обои зафиксированы, поэтому при прокрутке белые заголовки
 * проходят и над светлой частью градиента — постоянная затемняющая подложка
 * держит контраст одинаковым на всей странице.
 */
.landing-section {
  padding: 34px 0;
  background: rgba(6, 34, 84, 0.22);
}

.landing-section--toned {
  background: rgba(6, 34, 84, 0.42);
}

.landing-section--compact {
  padding: 22px 0 34px;
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
  color: #ffffff;
}

.section-heading--center {
  align-items: center;
  text-align: center;
}

.section-heading > span,
.section-kicker {
  display: inline-flex;
  align-self: flex-start;
  padding: 2px 8px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--ink);
  background: var(--face);
  box-shadow: var(--out-thin);
}

.section-heading--center > span {
  align-self: center;
}

.section-heading h2 {
  font-size: 22px;
  font-weight: 700;
  text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.45);
}

.section-heading p {
  font-size: 12px;
  color: #dcebff;
  max-width: 62ch;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.capability-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--face);
  box-shadow: var(--out), 3px 3px 8px rgba(0, 0, 0, 0.3);
}

.capability-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: #ffffff;
  background: linear-gradient(180deg, #57a2f0 0%, #14509e 100%);
  box-shadow: var(--out-thin);
}

.capability-card h3 {
  font-size: 12px;
  font-weight: 700;
}

.capability-card p {
  font-size: 11px;
  color: var(--ink-2);
}

/* Шаги */
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.workflow-step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--face);
  box-shadow: var(--out), 3px 3px 8px rgba(0, 0, 0, 0.3);
}

.workflow-step__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--navy);
}

.workflow-step__number {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
}

.workflow-step h3 {
  font-size: 12px;
  font-weight: 700;
}

.workflow-step p {
  font-size: 11px;
  color: var(--ink-2);
}

.workflow-step__arrow {
  position: absolute;
  top: 50%;
  right: -19px;
  transform: translateY(-50%);
  color: #ffffff;
  z-index: 1;
}

/* Витрина панели */
.dashboard-showcase__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 26px;
  align-items: center;
}

.dashboard-showcase__copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  color: #ffffff;
}

.dashboard-showcase__copy h2 {
  font-size: 22px;
  font-weight: 700;
  text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.45);
}

.dashboard-showcase__copy > p {
  font-size: 12px;
  color: #dcebff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 9px 11px;
  background: var(--face);
  box-shadow: var(--out);
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--ink);
}

.feature-list li svg {
  color: #2a6a20;
}

.dashboard-showcase__copy .text-link {
  color: #ffff80;
}

.dashboard-showcase__copy .text-link:hover {
  color: #ffffff;
}

.product-preview {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  background: var(--face);
  box-shadow: var(--out), 4px 4px 12px rgba(0, 0, 0, 0.45);
  padding: 3px;
  gap: 3px;
}

.product-preview__sidebar {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 7px 6px;
  background: linear-gradient(180deg, #2b7ae8 0%, #1b5ecd 60%, #0f4bb0 100%);
}

.product-preview__sidebar .brand-mark {
  margin-bottom: 6px;
}

.preview-nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  font-size: 10px;
  color: #e4f0ff;
}

.preview-nav-item.is-active {
  color: #ffffff;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.product-preview__content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  background: var(--face-xp);
  box-shadow: var(--in-thin);
}

.preview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.preview-heading > div {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.preview-heading small {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--ink-3);
}

.preview-heading strong {
  font-size: 12px;
}

.preview-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.preview-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 7px;
  background: var(--face);
  box-shadow: var(--out-thin);
}

.preview-card span {
  font-size: 9px;
  color: var(--ink-3);
}

.preview-card strong {
  font-size: 10px;
}

.preview-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: #ffffff;
  box-shadow: var(--out-thin);
}

.preview-card__icon--violet {
  background: linear-gradient(180deg, #9a7de0 0%, #5b3fa8 100%);
}

.preview-card__icon--teal {
  background: linear-gradient(180deg, #3fb9a6 0%, #0d6b5c 100%);
}

.preview-card__icon--blue {
  background: linear-gradient(180deg, #57a2f0 0%, #14509e 100%);
}

.preview-generator {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 7px;
  background: var(--face);
  box-shadow: var(--groove);
}

.preview-generator__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.preview-generator__header > div {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.preview-generator__header strong {
  font-size: 11px;
}

.preview-generator__header span {
  font-size: 9px;
  color: var(--ink-3);
}

.preview-generator__controls {
  display: flex;
  gap: 3px;
}

.preview-control {
  padding: 2px 8px;
  font-size: 10px;
  background: var(--face);
  box-shadow: var(--out-thin);
}

.preview-control.is-active {
  box-shadow: var(--in-thin);
  background: var(--checker);
  font-weight: 700;
}

.preview-control.is-wide {
  flex: 1;
  text-align: center;
}

.preview-code-line {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--ink-2);
  background: #ffffff;
  box-shadow: var(--in);
}

.preview-code-line span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Безопасность / поддержка */
.split-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.split-feature-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: flex-start;
  padding: 16px;
  background: var(--face);
  box-shadow: var(--out), 3px 3px 8px rgba(0, 0, 0, 0.3);
}

.split-feature-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  color: #ffffff;
  background: linear-gradient(180deg, #57a2f0 0%, #14509e 100%);
  box-shadow: var(--out);
}

.split-feature-card__icon--teal {
  background: linear-gradient(180deg, #3fb9a6 0%, #0d6b5c 100%);
}

.split-feature-card > span {
  padding: 2px 8px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  box-shadow: var(--in-thin);
  background: #ffffff;
}

.split-feature-card h2 {
  font-size: 16px;
}

.split-feature-card p {
  font-size: 11px;
  color: var(--ink-2);
}

.inline-details {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.inline-details span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  font-size: 10px;
  box-shadow: var(--groove);
}

/* Финальный призыв */
.access-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 20px;
  overflow: hidden;
  background: var(--face-xp);
  box-shadow: var(--out), 4px 4px 12px rgba(0, 0, 0, 0.4);
}

.access-banner__decoration {
  position: absolute;
  right: -20px;
  bottom: -30px;
  color: rgba(20, 80, 158, 0.12);
  pointer-events: none;
}

.access-banner > div {
  flex: 1;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.access-banner span {
  align-self: flex-start;
  padding: 2px 8px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  background: var(--face);
  box-shadow: var(--out-thin);
}

.access-banner h2 {
  font-size: 20px;
}

.access-banner p {
  font-size: 11px;
  color: var(--ink-2);
  max-width: 56ch;
}

/* Подвал = панель задач */
.landing-footer {
  margin-top: auto;
  background: var(--face);
  box-shadow: inset 0 2px 0 var(--hilite);
}

.landing-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 22px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.landing-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.landing-footer__brand .brand-mark {
  color: var(--ink);
}

.landing-footer__brand .brand-mark__name {
  text-shadow: none;
}

.landing-footer__brand p {
  font-size: 11px;
  color: var(--ink-2);
  max-width: 46ch;
}

.landing-footer__links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.landing-footer__links > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.landing-footer__links strong {
  font-size: 11px;
  margin-bottom: 3px;
  padding-bottom: 3px;
  box-shadow: inset 0 -1px 0 var(--shadow), inset 0 -2px 0 var(--hilite);
}

.landing-footer__links a {
  font-size: 11px;
  color: var(--link);
}

.landing-footer__links a:hover {
  text-decoration: underline;
  color: #d00;
}

.landing-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 4px;
  padding-bottom: 4px;
  min-height: 32px;
  background: linear-gradient(180deg, #3f8ff2 0%, #1f66d8 12%, #1a5bc8 86%, #0d3f9c 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  width: 100%;
  max-width: none;
  color: #ffffff;
  font-size: 10px;
}

.landing-footer__bottom::before {
  content: 'Пуск';
  display: inline-flex;
  align-items: center;
  padding: 3px 14px 3px 12px;
  font-size: 12px;
  font-style: italic;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
  background: linear-gradient(180deg, var(--green-a) 0%, #4f9f3f 42%, var(--green-b) 62%, var(--green-c) 100%);
  border-radius: 0 8px 8px 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 1px 1px 2px rgba(0, 0, 0, 0.35);
  margin-left: -16px;
}

.landing-footer__bottom span:first-of-type {
  flex: 1;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.4);
}

.landing-footer__bottom span:last-of-type {
  padding: 2px 9px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.18);
  box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.35), inset -1px -1px 0 rgba(255, 255, 255, 0.35);
}

.desktop-only {
  display: inline-flex;
}

/* --------------------------------------------------------------------------
   Адаптив
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .capability-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-grid--overview,
  .client-dashboard-grid,
  .support-grid,
  .settings-grid,
  .hero-grid,
  .dashboard-showcase__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .workflow-step__arrow {
    display: none;
  }
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
    /* без явных строк свободная высота растянула бы и строку шапки */
    grid-template-rows: auto 1fr;
  }

  .app-mobile-header {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 45;
  }

  .app-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    width: 240px;
    transform: translateX(-100%);
    transition: transform 120ms linear;
  }

  .app-sidebar--open {
    transform: translateX(0);
  }

  .app-main {
    padding: 10px;
  }

  .workspace-page {
    min-height: 0;
  }

  .landing-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px;
    background: var(--face);
    box-shadow: var(--out), 3px 3px 8px rgba(0, 0, 0, 0.4);
  }

  .landing-nav--open {
    display: flex;
  }

  .landing-nav a {
    color: var(--ink);
    text-shadow: none;
    padding: 6px 10px;
  }

  .landing-menu-button {
    display: inline-flex;
  }

  .landing-header__inner {
    position: relative;
  }

  .desktop-only {
    display: none;
  }

  .split-feature-grid,
  .client-status-grid,
  .landing-footer__grid,
  .workflow-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-page {
    grid-template-columns: minmax(0, 1fr);
    padding: 24px 16px;
    gap: 22px;
  }

  .auth-aside {
    align-items: flex-start;
    text-align: left;
    padding: 0;
  }

  .auth-aside__content {
    align-items: flex-start;
  }

  .auth-aside__content ul {
    align-items: flex-start;
  }

  .auth-aside__content li {
    flex-direction: row;
  }

  .auth-aside__network {
    display: none;
  }

  .auth-page::before,
  .auth-page::after {
    display: none;
  }

  .hero-copy h1 {
    font-size: 24px;
  }
}

@media (max-width: 640px) {
  .metric-grid,
  .form-grid--two,
  .generator-controls,
  .preview-card-grid,
  .capability-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .network-stage {
    height: 260px;
  }

  .route-settings-card {
    display: none;
  }

  .workspace-header::after {
    display: none;
  }

  /* Таблицы превращаются в карточки */
  .responsive-table-wrap {
    overflow: visible;
  }

  .data-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .data-table tr {
    display: block;
    margin: 5px;
    background: #ffffff;
    box-shadow: var(--out-thin);
  }

  .data-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 7px;
    text-align: right;
  }

  .data-table td::before {
    content: attr(data-label);
    font-size: 10px;
    color: var(--ink-3);
    text-align: left;
    white-space: nowrap;
  }

  .data-table td.table-actions {
    width: auto;
    justify-content: flex-end;
  }

  .client-cell {
    justify-content: flex-end;
  }

  .access-row {
    align-items: flex-start;
  }

  .landing-footer__links {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --------------------------------------------------------------------------
   Уважение к настройке «меньше движения»
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
