/*
 * Токены и примитивы start-хоста — из холста «Team Next — дизайн»
 * (`tokens.css` холста, классы `tn-*`): только то, что нужно страницам
 * start (вход, настройка, разрешение; дальше портал `/` и `/account`).
 * Общий файл всех страниц start-хоста; экраны входа — `auth.css`.
 *
 * Шрифты — Google Sans и Google Sans Code (OFL, `fonts/OFL-*.txt`) своими
 * файлами с хоста: CSP start-хоста — `font-src 'self'`, без Google Fonts
 * (см. `assets.ts`). Подмножества latin и cyrillic, вариативные по весу.
 * Пути шрифтов `fonts/<файл>` заменяет `assets.ts` на хешированный путь `/assets/…`.
 */

@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/google-sans-cyrillic-032125d892f3.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/google-sans-latin-0feef3235236.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Google Sans Code";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/google-sans-code-latin-98eee6fe6dc8.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* шрифты */
  --font-sans:
    "Google Sans", "Product Sans", Roboto, system-ui, -apple-system, sans-serif;
  --font-mono:
    "Google Sans Code", "Geist Mono", ui-monospace, SFMono-Regular, Menlo,
    monospace;

  /* поверхности */
  --surface: #ffffff;
  --surface-sunken: #f5f6f9;
  --surface-glass: rgba(255, 255, 255, 0.82);
  --surface-glass-strong: rgba(255, 255, 255, 0.92);
  --surface-glass-border: rgba(255, 255, 255, 0.9);
  --fill-1: rgba(20, 24, 40, 0.03);
  --fill-2: rgba(20, 24, 40, 0.04);
  --fill-3: rgba(20, 24, 40, 0.05);
  --fill-4: rgba(20, 24, 40, 0.06);
  --fill-5: rgba(20, 24, 40, 0.07);
  --fill-strong: rgba(20, 24, 40, 0.12);
  --pill-bg: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.95),
    rgba(255, 255, 255, 0.75)
  );
  --pill-bg-btn: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.95),
    rgba(255, 255, 255, 0.8)
  );

  /* линии */
  --line: rgba(20, 24, 40, 0.06);
  --line-strong: rgba(20, 24, 40, 0.08);
  --line-input: rgba(20, 24, 40, 0.14);

  /* текст */
  --text: #1c1c1e;
  --text-2: #3a3a3c;
  --text-icon: #48484a;
  --text-3: #6e6e73;
  --text-muted: #8e8e93;
  --text-faint: #aeaeb2;
  --on-accent: #ffffff;

  /* акценты */
  --blue: #0a7aff;
  --blue-hover: #0062d6;
  --blue-strong: #0a6ee6;
  --blue-ink: #0a56b8;
  --blue-grad: linear-gradient(180deg, #2b8cff, #0a6ee6);
  --blue-tint: rgba(10, 122, 255, 0.1);
  --blue-tint-soft: rgba(10, 122, 255, 0.08);
  --blue-bg: #eaf2ff;
  --blue-line: rgba(10, 122, 255, 0.35);
  --green: #30b15a;
  --green-ink: #16733a;
  --green-bg: #e3f6e9;
  --green-line: rgba(31, 154, 74, 0.35);
  --red: #ff3b30;
  --red-ink: #d7261d;
  --red-bg: #fff0ef;
  --red-line: rgba(255, 59, 48, 0.35);
  --orange: #ff9500;
  --orange-ink: #a85400;
  --orange-bg: #fff4e0;
  --accent: var(--blue);

  /* «требует внимания» — предупреждения */
  --attn: #e0a106;
  --attn-soft: #fbf2da;
  --attn-ink: #7a5a10;
  --attn-line: rgba(224, 161, 6, 0.45);

  /* радиусы */
  --r-xs: 4px;
  --r-md: 9px;
  --r-lg: 10px;
  --r-xl: 12px;
  --r-card: 14px;
  --r-panel: 16px;
  --r-pop: 18px;
  --r-pill: 999px;

  /* тени */
  --sh-ring-strong: 0 0 0 1px rgba(20, 24, 40, 0.08);
  --sh-bubble: 0 1px 2px rgba(0, 0, 0, 0.06);
  --sh-card:
    0 1px 2px rgba(20, 24, 40, 0.04), 0 6px 20px -10px rgba(20, 24, 40, 0.1);
  --sh-btn-secondary:
    inset 0 1px 0 #fff, 0 0 0 0.5px rgba(20, 24, 40, 0.1),
    0 3px 10px -4px rgba(20, 24, 40, 0.16);
  --sh-btn-secondary-hover:
    inset 0 1px 0 #fff, 0 0 0 1px rgba(10, 122, 255, 0.35),
    0 4px 12px -4px rgba(10, 122, 255, 0.3);
  --sh-btn-primary:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 4px 12px -4px rgba(10, 110, 230, 0.6);
  --sh-pop:
    0 1px 2px rgba(20, 24, 40, 0.06), 0 24px 60px -20px rgba(20, 24, 40, 0.3);
  --sh-modal:
    0 1px 2px rgba(20, 24, 40, 0.06), 0 0 0 0.5px rgba(20, 24, 40, 0.06),
    0 32px 80px -24px rgba(20, 24, 40, 0.38);
  --focus-ring:
    0 0 0 1px rgba(10, 122, 255, 0.55), 0 0 0 4px rgba(10, 122, 255, 0.18);
  --focus-ring-danger:
    0 0 0 1px rgba(255, 59, 48, 0.55), 0 0 0 4px rgba(255, 59, 48, 0.16);
  --disabled-opacity: 0.45;

  /* фон A лицевых страниц s25 (вход, настройка, портал, «Вход и безопасность») */
  --auth-ground: linear-gradient(180deg, #f3f5fa, #e9edf5);
  --auth-mesh:
    radial-gradient(
      60% 55% at 12% 18%,
      rgba(10, 122, 255, 0.28),
      transparent 70%
    ),
    radial-gradient(
      55% 50% at 88% 12%,
      rgba(94, 92, 230, 0.24),
      transparent 70%
    ),
    radial-gradient(
      60% 60% at 80% 92%,
      rgba(36, 184, 189, 0.22),
      transparent 70%
    ),
    radial-gradient(
      50% 50% at 18% 88%,
      rgba(175, 82, 222, 0.14),
      transparent 70%
    ),
    var(--auth-ground);
  --surface-glass-card: rgba(255, 255, 255, 0.78);
  --surface-glass-phone: rgba(255, 255, 255, 0.6);
  --on-accent-faint: rgba(255, 255, 255, 0.35);

  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --t-fast: 0.15s ease;

  /* страницы сотрудника: портал и «Вход и безопасность» (холст) */
  --ink: #1c1c1e;
  --teal: #24b8bd;
  --indigo: #5e5ce6;
  --indigo-ink: #4b49c9;
  --indigo-bg: #e9e8fd;
  --purple: #af52de;
  --red-grad: linear-gradient(180deg, #ff5a4f, #e5281d);
  --surface-glass-soft: rgba(255, 255, 255, 0.45);
  --scrim-sheet: rgba(30, 34, 48, 0.24);
  --scrim-modal: rgba(30, 34, 48, 0.18);
  --r-seg: 7px;
  --sheet-radius: 28px;
  --app-radius: 22.5%;
  --sh-ring: 0 0 0 1px rgba(20, 24, 40, 0.06);
  --sh-pill:
    inset 0 1px 0 #fff, 0 0 0 0.5px rgba(20, 24, 40, 0.08),
    0 4px 14px -4px rgba(20, 24, 40, 0.14);
  --sh-tile-hover:
    0 1px 2px rgba(20, 24, 40, 0.06), 0 14px 28px -10px rgba(20, 24, 40, 0.32);
  --sh-btn-red:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 4px 12px -4px rgba(229, 40, 29, 0.55);
  --sh-btn-danger-hover:
    inset 0 1px 0 #fff, 0 0 0 1px rgba(255, 59, 48, 0.35),
    0 4px 12px -4px rgba(255, 59, 48, 0.3);
  --auth-mesh-muted:
    radial-gradient(
      70% 40% at 10% 6%,
      rgba(10, 122, 255, 0.16),
      transparent 70%
    ),
    radial-gradient(60% 36% at 92% 4%, rgba(94, 92, 230, 0.13), transparent 70%),
    radial-gradient(
      70% 45% at 85% 96%,
      rgba(36, 184, 189, 0.12),
      transparent 70%
    ),
    radial-gradient(
      55% 40% at 12% 92%,
      rgba(175, 82, 222, 0.08),
      transparent 70%
    ),
    var(--auth-ground);
}

/* база */
*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  /* biome-ignore lint/complexity/noImportantStyles: `hidden` сильнее `display` классов (формы — `display: contents`) */
  display: none !important;
}
html {
  background: var(--auth-ground);
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 20px;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
button,
input,
textarea {
  font-family: inherit;
}
.tn-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.tn-link {
  color: var(--blue);
  text-decoration: none;
  cursor: pointer;
}
.tn-link:hover {
  color: var(--blue-hover);
}
/* логотип s25 — фирменный SVG (start-ui `Wordmark.svelte`), не набранный текст (2026-11-06) */
.tn-wordmark {
  display: inline-flex;
  align-items: center;
  flex: none;
}
.tn-wordmark > svg {
  display: block;
  height: 24px;
  width: auto;
}
@media (max-width: 480px) {
  .tn-wordmark > svg {
    height: 22px;
  }
}

/* кнопки (пилюли) */
.tn-btn {
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--r-pill);
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: 600 14px / 1 var(--font-sans);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition:
    background var(--t-fast),
    box-shadow var(--t-fast),
    filter var(--t-fast),
    transform 0.12s ease;
}
.tn-btn:active:not(:disabled) {
  transform: scale(0.97);
}
.tn-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.tn-btn:disabled,
.tn-btn[aria-disabled="true"] {
  opacity: var(--disabled-opacity);
  cursor: not-allowed;
  filter: saturate(0.6);
}
.tn-btn > svg {
  flex: none;
}
.tn-btn--xs {
  height: 28px;
  padding: 0 10px;
  gap: 4px;
  font-size: 13px;
}
.tn-btn--lg {
  height: 44px;
  padding: 0 18px;
  gap: 8px;
  font-size: 15px;
}
.tn-btn--block {
  width: 100%;
}
.tn-btn--primary {
  background: var(--blue-grad);
  color: var(--on-accent);
  box-shadow: var(--sh-btn-primary);
}
.tn-btn--primary:hover:not(:disabled) {
  filter: brightness(1.06);
}
.tn-btn--primary:focus-visible {
  box-shadow: var(--sh-btn-primary), var(--focus-ring);
}
.tn-btn--secondary {
  background: var(--pill-bg-btn);
  color: var(--text);
  box-shadow: var(--sh-btn-secondary);
}
.tn-btn--secondary:hover:not(:disabled) {
  box-shadow: var(--sh-btn-secondary-hover);
}
.tn-btn--ghost {
  background: transparent;
  color: var(--text-icon);
  padding: 0 10px;
}
.tn-btn--ghost:hover:not(:disabled) {
  background: var(--fill-3);
  color: var(--text);
}

/* поля */
.tn-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tn-label {
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  color: var(--text);
}
.tn-hint {
  font-size: 12px;
  line-height: 16px;
  color: var(--text-3);
}
.tn-error {
  font-size: 12px;
  line-height: 16px;
  color: var(--red-ink);
  font-weight: 500;
}
.tn-input,
.tn-textarea {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  margin: 0;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--fill-3);
  color: var(--text);
  box-shadow: inset 0 0 0 1px transparent;
  outline: none;
  font: 400 14px / 20px var(--font-sans);
  transition:
    background var(--t-fast),
    box-shadow var(--t-fast);
}
.tn-input::placeholder,
.tn-textarea::placeholder {
  color: var(--text-muted);
}
.tn-input:hover:not(:disabled):not(:focus),
.tn-textarea:hover:not(:disabled):not(:focus) {
  background: var(--fill-4);
}
.tn-input:focus,
.tn-textarea:focus {
  background: var(--surface);
  box-shadow: var(--focus-ring);
}
.tn-input[aria-invalid="true"],
.tn-textarea[aria-invalid="true"] {
  background: var(--red-bg);
  box-shadow: inset 0 0 0 1px var(--red-line);
}
.tn-input[aria-invalid="true"]:focus,
.tn-textarea[aria-invalid="true"]:focus {
  background: var(--surface);
  box-shadow: var(--focus-ring-danger);
}
.tn-input:disabled,
.tn-textarea:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: var(--fill-2);
}
.tn-textarea {
  height: auto;
  min-height: 84px;
  padding: 9px 12px;
  resize: vertical;
}

/* сообщение в форме (строкой, не плашкой с действиями) */
.tn-msg {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: var(--r-xl);
  font-size: 13px;
  line-height: 18px;
}
.tn-msg > svg {
  flex: none;
  margin-top: 1px;
}
.tn-msg--err {
  background: var(--red-bg);
  color: var(--red-ink);
}
.tn-msg--warn {
  background: var(--attn-soft);
  color: var(--attn-ink);
  box-shadow: inset 0 0 0 1px var(--attn-line);
}
.tn-msg--info {
  background: var(--blue-bg);
  color: var(--blue-ink);
}
.tn-msg--ok {
  background: var(--green-bg);
  color: var(--green-ink);
}

/* иконка-герой экрана отказа или итога */
.tn-hero-ic {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--fill-4);
  color: var(--text-icon);
}
.tn-hero-ic--ok {
  background: var(--green-bg);
  color: var(--green-ink);
}
.tn-hero-ic--warn {
  background: var(--attn-soft);
  color: var(--attn-ink);
  box-shadow: inset 0 0 0 1px var(--attn-line);
}
.tn-hero-ic--bad {
  background: var(--red-bg);
  color: var(--red-ink);
}
.tn-hero-ic--blue {
  background: var(--blue-bg);
  color: var(--blue-ink);
}

/* спиннер ожидания */
.tn-spinner {
  width: 16px;
  height: 16px;
  flex: none;
  border-radius: 50%;
  border: 2px solid var(--fill-strong);
  border-top-color: var(--blue);
  animation: tnSpin 0.8s linear infinite;
}
.tn-spinner--sm {
  width: 14px;
  height: 14px;
}
@keyframes tnSpin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .tn-spinner {
    animation-duration: 2.4s;
  }
}

/* код из 6 цифр: на всю ширину, ячейки равные, 3 + 3 с зазором посередине */
.tn-code {
  display: flex;
  gap: 8px;
  width: 100%;
}
.tn-code > span {
  flex: 1 1 0;
  min-width: 0;
  height: 52px;
  border-radius: var(--r-lg);
  background: var(--fill-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font: 600 22px / 1 var(--font-mono);
  color: var(--text);
}
.tn-code > span:nth-child(3) {
  margin-right: 8px;
}
.tn-code > span.is-bad {
  background: var(--red-bg);
  box-shadow: inset 0 0 0 1px var(--red-line);
}
.tn-code.is-busy > span {
  opacity: 0.55;
}

/*
 * Примитивы страниц сотрудника — портал `/` и «Вход и безопасность»
 * `/account` (холст, `tokens.css`: аватар, меню, плашки, бейджи, плитки,
 * окна, тост). Экраны — `portal.css` и `account.css`.
 */
.tn-face-page {
  box-sizing: border-box;
  min-height: 100dvh;
  margin: 0;
  background: var(--auth-mesh);
  font: 400 14px / 20px var(--font-sans);
  color: var(--text);
}
.tn-face-page *,
.tn-face-page *::before,
.tn-face-page *::after {
  box-sizing: border-box;
}
.tn-face-page button {
  font-family: inherit;
}
.tn-btn--sm {
  height: 32px;
  padding: 0 12px;
  gap: 5px;
  font-size: 13px;
}
a.tn-btn {
  text-decoration: none;
}
.tn-btn--danger {
  background: var(--pill-bg-btn);
  color: var(--red);
  box-shadow: var(--sh-btn-secondary);
}
.tn-btn--danger:hover:not(:disabled) {
  box-shadow: var(--sh-btn-danger-hover);
}
.tn-btn--danger:focus-visible {
  box-shadow: var(--focus-ring-danger);
}
.tn-btn--danger-solid {
  background: var(--red-grad);
  color: var(--on-accent);
  box-shadow: var(--sh-btn-red);
}
.tn-btn--danger-solid:hover:not(:disabled) {
  filter: brightness(1.06);
}
.tn-btn--danger-solid:focus-visible {
  box-shadow: var(--sh-btn-red), var(--focus-ring-danger);
}
.tn-icon-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: var(--r-seg);
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition:
    background var(--t-fast),
    color var(--t-fast),
    box-shadow var(--t-fast);
}
.tn-icon-btn:hover:not(:disabled),
.tn-icon-btn[aria-expanded="true"] {
  background: var(--fill-3);
  color: var(--text);
}
.tn-icon-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.tn-section-label {
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
}
.tn-kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--fill-4);
  border-radius: var(--r-xs);
  padding: 1px 5px;
  color: var(--text-3);
}
.tn-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px;
  border-radius: var(--r-pill);
  font: 600 12px / 1 var(--font-sans);
  white-space: nowrap;
  background: var(--fill-4);
  color: var(--text-2);
}
.tn-badge--accent {
  background: var(--blue-tint);
  color: var(--blue-ink);
}
.tn-badge--ok {
  background: var(--green-bg);
  color: var(--green-ink);
}
.tn-badge--warn {
  background: var(--orange-bg);
  color: var(--orange-ink);
}
.tn-badge--sm {
  height: 18px;
  padding: 0 6px;
  font-size: 11px;
}
.tn-popover {
  padding: 6px;
  border-radius: var(--r-panel);
  background: var(--surface-glass-strong);
  -webkit-backdrop-filter: blur(30px) saturate(1.6);
  backdrop-filter: blur(30px) saturate(1.6);
  border: 1px solid var(--surface-glass-border);
  box-shadow: var(--sh-pop);
}
.tn-popover[hidden] {
  display: none;
}
.tn-menu {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 200px;
}
.tn-menu-label {
  padding: 6px 10px 4px;
  font-size: 12px;
  line-height: 16px;
  color: var(--text-3);
}
.tn-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  margin: 0;
  border: 0;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font: 500 14px / 20px var(--font-sans);
  text-decoration: none;
}
.tn-menu-item svg {
  color: var(--text-icon);
  flex: none;
}
.tn-menu-item small {
  display: block;
  font-size: 12px;
  line-height: 16px;
  color: var(--text-3);
  font-weight: 400;
  white-space: normal;
}
.tn-menu-item:hover {
  background: var(--fill-3);
}
.tn-menu-item:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.tn-menu-item--danger,
.tn-menu-item--danger svg {
  color: var(--red-ink);
}
.tn-menu-item--danger:hover {
  background: var(--red-bg);
}
.tn-menu-item[aria-disabled="true"] {
  opacity: var(--disabled-opacity);
  cursor: not-allowed;
  background: transparent;
}
.tn-menu-sep {
  height: 1px;
  margin: 4px 6px;
  background: var(--fill-5);
}
.tn-avatar {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 600 12px / 1 var(--font-sans);
  background: var(--indigo-bg);
  color: var(--indigo-ink);
  box-shadow: inset 0 0 0 0.5px rgba(20, 24, 40, 0.08);
}
.tn-avatar > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tn-avatar--lg {
  width: 44px;
  height: 44px;
  font-size: 15px;
}
.tn-avatar-btn {
  display: inline-flex;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: box-shadow var(--t-fast);
}
.tn-avatar-btn:hover,
.tn-avatar-btn[aria-expanded="true"] {
  box-shadow: 0 0 0 4px var(--surface-glass-soft);
}
.tn-avatar-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.tn-callout {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-xl);
  background: var(--fill-2);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text-2);
  font-size: 13px;
  line-height: 18px;
}
.tn-callout[hidden] {
  display: none;
}
.tn-callout > svg {
  flex: none;
  margin-top: 1px;
  color: var(--text-icon);
}
.tn-callout__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tn-callout__title {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: var(--text);
}
.tn-callout__actions {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.tn-callout--danger {
  background: var(--red-bg);
  box-shadow: inset 0 0 0 1px var(--red-line);
}
.tn-callout--danger > svg,
.tn-callout--danger .tn-callout__title {
  color: var(--red-ink);
}
.tn-callout--warn {
  background: var(--attn-soft);
  box-shadow: inset 0 0 0 1px var(--attn-line);
}
.tn-callout--warn > svg {
  color: var(--attn-ink);
}
.tn-callout--info {
  background: var(--blue-bg);
  box-shadow: inset 0 0 0 1px var(--blue-line);
}
.tn-callout--info > svg {
  color: var(--blue-ink);
}
.tn-app-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px 10px 16px;
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--r-panel);
  background: var(--surface-glass-card);
  -webkit-backdrop-filter: blur(30px) saturate(1.4);
  backdrop-filter: blur(30px) saturate(1.4);
  box-shadow: var(--sh-card);
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition:
    box-shadow var(--t-fast),
    transform var(--t-fast);
}
.tn-app-tile:hover {
  box-shadow: var(--sh-tile-hover);
  transform: translateY(-1px);
}
.tn-app-tile:focus-visible {
  outline: none;
  box-shadow: var(--sh-card), var(--focus-ring);
}
.tn-app-tile__logo {
  position: relative;
  display: block;
}
.tn-app-tile__name {
  margin-top: 10px;
  font-weight: 600;
  font-size: 14px;
  line-height: 18px;
}
.tn-app-tile__sub {
  margin-top: 2px;
  font-size: 12px;
  line-height: 16px;
  color: var(--text-3);
}
.tn-app-tile__sub--warn {
  color: var(--orange-ink);
  font-weight: 500;
}
.tn-app-tile__sub--muted {
  color: var(--text-3);
  font-weight: 500;
}
.tn-app-logo {
  display: block;
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 17px;
  object-fit: cover;
}
.tn-app-tile.is-muted .tn-app-logo {
  opacity: 0.55;
  filter: saturate(0.6);
}
.tn-app-logo--mono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 700 22px / 1 var(--font-sans);
  letter-spacing: 0.02em;
}
.tn-app-dot {
  position: absolute;
  right: -3px;
  top: -3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: 0 0 0 2.5px var(--surface);
}
.tn-app-dot--warn {
  background: var(--orange);
}
.tn-app-dot--muted {
  background: var(--text-muted);
}
.tn-find {
  position: relative;
  width: 300px;
  max-width: 100%;
}
.tn-find > svg {
  position: absolute;
  z-index: 2;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  opacity: 0.8;
  pointer-events: none;
}
.tn-find > .tn-input {
  height: 34px;
  padding-left: 32px;
  padding-right: 34px;
  border-radius: var(--r-pill);
  font-size: 13px;
  background: var(--surface-glass-soft);
  box-shadow: inset 0 0 0 1px var(--line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.tn-find > .tn-input:hover:not(:focus) {
  background: var(--surface-glass);
}
.tn-find > .tn-input:focus {
  background: var(--surface-glass-strong);
  box-shadow:
    inset 0 0 0 1px var(--blue-line),
    0 0 0 3px var(--blue-tint-soft);
}
.tn-find > .tn-kbd {
  position: absolute;
  z-index: 2;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  background: var(--fill-3);
  color: var(--text-muted);
}
.tn-modal {
  width: min(460px, calc(100vw - 24px));
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--r-pop);
  box-shadow: var(--sh-modal);
  overflow: hidden;
}
.tn-modal__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px 6px;
}
.tn-modal__title {
  margin: 0;
  font: 600 17px / 24px var(--font-sans);
  letter-spacing: -0.01em;
  color: var(--text);
}
.tn-modal__desc {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 18px;
  color: var(--text-3);
}
.tn-modal__body {
  padding: 12px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.tn-modal__foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--surface-sunken);
  border-top: 1px solid var(--line);
}
.tn-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--r-card);
  background: var(--surface-glass-strong);
  -webkit-backdrop-filter: blur(30px) saturate(1.6);
  backdrop-filter: blur(30px) saturate(1.6);
  border: 1px solid var(--surface-glass-border);
  box-shadow: var(--sh-pop);
}
.tn-toast > svg {
  flex: none;
  color: var(--green-ink);
}

/*
 * Поля ввода на сенсорных экранах — не мельче 16 px: Safari на iOS при фокусе на поле с кеглем меньше
 * 16 приближает страницу и не возвращает масштаб. tn-input — 14, поиск tn-find — 13, стили экранов
 * start-ui задают свои, поэтому — правилом на элементы с !important. Мышь и трекпад остаются с кеглем холста.
 */
@media (hover: none) and (pointer: coarse) {
  input:not(
    [type="checkbox"],
    [type="radio"],
    [type="range"],
    [type="file"],
    [type="color"],
    [type="button"],
    [type="submit"],
    [type="reset"],
    [type="image"],
    [type="hidden"]
  ),
  select,
  textarea,
  [contenteditable]:not([contenteditable="false"]) {
    /* biome-ignore lint/complexity/noImportantStyles: иначе tn-find и стили экранов перебивают */
    font-size: 16px !important;
  }
}
