/* Vymi ID — страницы входа, согласия и привязок на дизайн-системе Vymi.
   Значения — только токены @vymi/ui (vymi-tokens.css, vymi-theme.css);
   сами файлы копирует scripts/sync-ui.sh. */

@font-face { font-family: Onest; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(onest-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Onest; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(onest-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
:root { --font-onest: Onest; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
img, svg { display: block; }
a { color: var(--accent); text-underline-offset: 3px; }

/* колонка по центру экрана прямо на холсте: знак, содержимое, сноска */
.shell { width: 100%; max-width: calc(380px + 2 * var(--gutter)); padding: var(--s6) var(--gutter); display: flex; flex-direction: column; gap: var(--s6); }
.mark { align-self: center; display: inline-flex; align-items: center; gap: var(--s2); color: var(--text); text-decoration: none; border-radius: var(--r-sm);
  font-weight: 800; font-size: var(--t-h3); letter-spacing: -0.01em; }
.mark svg { width: 28px; height: 28px; }
.mark .id { color: var(--text-3); font-weight: 600; }

.panel { display: flex; flex-direction: column; gap: var(--s4); }
#content { display: flex; flex-direction: column; gap: var(--s4); }
h1 { margin: 0; font-size: var(--t-h2); line-height: var(--lh-h2); font-weight: 800; letter-spacing: -0.01em; text-wrap: balance; }
.sub { margin: calc(var(--s2) * -1) 0 0; font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--text-2); }
.sub strong, .sub b { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.hint { margin: 0; font-size: var(--t-cap); line-height: var(--lh-cap); color: var(--text-3); }
.mode-line { margin: 0; text-align: center; font-size: var(--t-sm); color: var(--text-2); }
.foot { margin: 0; text-align: center; font-size: var(--t-cap); line-height: var(--lh-cap); color: var(--text-3); }
.foot a { color: var(--text-2); }

/* формы */
form { display: flex; flex-direction: column; gap: var(--s3); }
.field { display: flex; flex-direction: column; gap: var(--gap-icon); }
.field label { font-size: var(--t-sm); font-weight: 500; }
.field input { height: var(--h-lg); border-radius: var(--r-md); border: 1px solid var(--line-strong); background: var(--canvas); padding: 0 var(--s3);
  outline: none; width: 100%; font-size: var(--t-body); transition: border-color var(--d-quick) var(--ease-color), box-shadow var(--d-quick) var(--ease-color); }
.field input::placeholder { color: var(--text-3); }
.field input:focus { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 30%, transparent); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field input.code { font-family: var(--font-mono); font-size: var(--t-h3); letter-spacing: 0.4em; text-align: center; font-variant-numeric: tabular-nums; }
.btn { width: 100%; height: var(--h-lg); font-size: var(--t-body); }
.btn.btn--sm { width: auto; height: var(--h-sm); font-size: var(--t-cap); }
.btn.danger { color: var(--danger); }
.btn svg { width: 20px; height: 20px; flex: none; }
.row-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.row-actions .btn { width: auto; flex: 1; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 600; font-size: var(--t-sm); cursor: pointer; border-radius: var(--r-sm); }
.linkbtn:disabled { color: var(--text-3); cursor: default; font-weight: 500; }
.linkbtn:hover:not(:disabled) { text-decoration: underline; }
.code-row { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); font-size: var(--t-sm); color: var(--text-3); }

.divider { display: flex; align-items: center; gap: var(--s3); font-size: var(--t-cap); color: var(--text-3); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.alts { display: flex; flex-direction: column; gap: var(--s2); }

/* сообщения */
.alert, .notice { display: none; margin: 0; padding: var(--s3) var(--s4); border-radius: var(--r-md); font-size: var(--t-sm); line-height: var(--lh-sm); }
.alert.show, .notice.show { display: flex; flex-direction: column; gap: var(--s3); }
.alert { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 40%, transparent); }
.notice { background: var(--fill-1); color: var(--text-2); }
.alert a, .notice a { color: var(--accent); font-weight: 600; }

/* приложение, которое просит вход: логотип + имя + тир */
.app { display: flex; align-items: center; gap: var(--s3); }
.app .names { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.app .names b { font-size: var(--t-body); font-weight: 700; overflow-wrap: anywhere; }
.avatar { width: 48px; height: 48px; flex: none; border-radius: var(--r-md); background: var(--surface-3); display: grid; place-items: center; overflow: hidden;
  font-weight: 800; font-size: var(--t-h3); color: var(--text); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 32px; height: 32px; border-radius: var(--r-full); font-size: var(--t-sm); }

.tier { display: inline-flex; align-items: center; gap: var(--gap-icon); font-size: var(--t-cap); font-weight: 600; color: var(--text-3); }
.tier svg { width: 14px; height: 14px; flex: none; }
.tier--reviewed { color: var(--success); }
.tier--verified { color: var(--accent); }
.tier--unverified { color: var(--warning); }

/* шапка согласия как у Discord: приложение ··· пользователь */
.pair { display: flex; align-items: center; justify-content: center; gap: var(--s3); }
.pair .avatar { width: 64px; height: 64px; font-size: var(--t-h2); }
.pair .avatar.user { border-radius: var(--r-full); }
.pair .dots { display: flex; gap: 5px; }
.pair .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong); }
.lead { display: flex; flex-direction: column; align-items: center; gap: var(--s2); text-align: center; }
.lead h1 { font-size: var(--t-h3); line-height: var(--lh-h3); font-weight: 600; }
.lead h1 b { font-weight: 800; }
.lead .hint, .lead .sub { margin: 0; }
.as { font-size: var(--t-sm); color: var(--text-3); text-align: center; margin: 0; }
.as b { color: var(--text-2); font-weight: 600; }

/* права приложения: строка = отметка, название, пояснение; недостающая привязка — кнопка в строке */
.section-title { font-size: var(--t-cap); font-weight: 600; color: var(--text-3); padding-top: var(--s4); border-top: 1px solid var(--line); }
.perms { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s3); }
.perms li { display: flex; gap: var(--s3); align-items: center; }
.perms .ico { width: 20px; height: 20px; flex: none; border-radius: var(--r-full); background: color-mix(in srgb, var(--success) 18%, transparent); color: var(--success); display: grid; place-items: center; }
.perms .ico svg { width: 12px; height: 12px; }
.perms li.missing .ico { background: color-mix(in srgb, var(--warning) 18%, transparent); color: var(--warning); }
.perms .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.perms .k { font-size: var(--t-sm); font-weight: 600; }
.perms .d { font-size: var(--t-cap); line-height: var(--lh-cap); color: var(--text-3); }
.perms li.missing .d { color: var(--warning); }
.perms .btn { flex: none; }

/* привязки в настройках */
.idrow { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) 0; border-top: 1px solid var(--line); }
.idrow:first-of-type { border-top: 0; }
.idrow .who { flex: 1; }
.uid { font-family: var(--font-mono); font-size: var(--t-cap); color: var(--text-3); overflow-wrap: anywhere; }

@media (max-width: 480px) {
  body { place-items: start center; }
  .shell { padding-top: var(--s7); }
}
