/* DeepNeon — кабинет и админка. Только свои ресурсы: страницы отдаются с CSP default-src 'self', поэтому шрифты —
   локально (cabinet/fonts, лицензия OFL), без Google Fonts и без inline-стилей в разметке. */

@font-face { font-family: Onest; src: url('/fonts/Onest-Regular.ttf') format('truetype'); font-weight: 400; font-display: optional; }
@font-face { font-family: Onest; src: url('/fonts/Onest-Medium.ttf') format('truetype'); font-weight: 500; font-display: optional; }
@font-face { font-family: Onest; src: url('/fonts/Onest-SemiBold.ttf') format('truetype'); font-weight: 600 700; font-display: optional; }
@font-face { font-family: 'JetBrains Mono'; src: url('/fonts/JetBrainsMono-Medium.ttf') format('truetype'); font-weight: 400 500; font-display: optional; }
@font-face { font-family: 'JetBrains Mono'; src: url('/fonts/JetBrainsMono-Bold.ttf') format('truetype'); font-weight: 600 700; font-display: optional; }
/* Начертание Unbounded в плагине одно — Light; им же рисуются заголовки «500». */
@font-face { font-family: Unbounded; src: url('/fonts/Unbounded-Light.ttf') format('truetype'); font-weight: 300 500; font-display: optional; }

:root { --ink: #111224; --muted: #6d7184; --purple: #6358ed; --line: #e9eaf2; --bg: #f7f8fc; --danger: #c0243e; }
* { box-sizing: border-box }
html { font-family: Onest, Arial, sans-serif }
body { margin: 0; color: var(--ink); background: var(--bg) }
a { color: inherit; text-decoration: none }
button, input, select, textarea { font: inherit }
button { cursor: pointer }
[hidden] { display: none !important }
/* Поле для копирования запасным путём (copyText): в документе, но за экраном. */
.offscreen { position: fixed; left: -9999px; top: 0; opacity: 0 }

/* ── Каркас ── */
.shell { max-width: 1190px; margin: 0 auto; padding: 0 28px }
.bar { background: white; border-bottom: 1px solid var(--line) }
.bar .shell { height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px }
.logo { font: 600 23px Unbounded, sans-serif; letter-spacing: -.08em }
.nav { display: flex; align-items: center; gap: 25px; font-size: 13px; color: #4e5268 }
.nav a:hover { color: var(--purple) }
main { padding: 65px 0 100px }
.frame { max-width: 490px; margin: 0 auto }
.wide { max-width: 1080px; margin: auto }
.loading { text-align: center; padding: 80px; color: var(--muted) }

/* ── Текст ── */
.eyebrow { font: 500 11px 'JetBrains Mono', monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--purple) }
.eyebrow.spaced { margin-top: 24px }
h1 { font: 500 clamp(28px, 5vw, 44px)/1.16 Unbounded, sans-serif; letter-spacing: -.06em; margin: 14px 0 16px }
h2 { font: 500 19px/1.4 Unbounded, sans-serif; letter-spacing: -.04em; margin: 0 0 15px }
h3 { font-size: 15px; font-weight: 600; margin: 0 0 10px }
p { color: var(--muted); line-height: 1.65 }
.small { font-size: 12px }
.subtle, .muted { color: var(--muted) }
.notice { font-size: 12px; color: var(--muted) }
.meta { font: 500 11px 'JetBrains Mono', monospace; color: var(--muted); text-transform: uppercase }
.value { font-size: 19px; font-weight: 600; margin: 8px 0; overflow-wrap: anywhere }
.keycode { font: 600 16px 'JetBrains Mono', monospace; overflow-wrap: anywhere }
.mono { font-family: 'JetBrains Mono', monospace; overflow-wrap: anywhere }

/* ── Панели и карточки ── */
.panel { padding: 34px; border: 1px solid var(--line); background: white; border-radius: 15px; box-shadow: 0 13px 55px rgba(23, 22, 65, .04) }
.stack { display: grid; gap: 16px }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 23px }
.card { padding: 25px; border-radius: 13px; border: 1px solid var(--line); background: white; min-width: 0 }
.card p { margin: 7px 0 14px }
.card.flat { margin: 10px 0 }
.mutedcard { background: #f2f2fa }
.toprow { display: flex; justify-content: space-between; align-items: center; gap: 15px }
.section { margin-top: 42px }
.section > .toprow { margin-bottom: 8px }
.section > .toprow h2 { margin: 0 }
.mt { margin-top: 16px }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 14px; font-size: 14px }
.kv dt { color: var(--muted) }
.kv dd { margin: 0; overflow-wrap: anywhere }

/* ── Поля и кнопки ── */
.field { display: grid; gap: 7px; font-size: 13px; font-weight: 600 }
.field input, .field select, .field textarea { padding: 13px 14px; border: 1px solid #dce0e9; border-radius: 8px; background: #fff; color: var(--ink); width: 100%; outline: none; font-weight: 400 }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 3px #6358ed1c }
.field .hint { font-weight: 400; font-size: 12px; color: var(--muted) }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.5 }
.check input { margin-top: 4px; accent-color: var(--purple) }
.check a { color: var(--purple); text-decoration: underline }
.btn { border: 1px solid transparent; border-radius: 9px; background: var(--ink); color: #fff; padding: 13px 18px; font-weight: 600; display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 46px }
.btn:hover { filter: brightness(1.17) }
.btn.secondary { color: var(--ink); background: white; border-color: #dfe1e9 }
.btn.danger { background: var(--danger) }
.btn.secondary.danger { background: white; color: var(--danger); border-color: #f2c9d0 }
.btn.mini { min-height: 34px; font-size: 12px; padding: 8px 12px }
.btn.full { width: 100% }
.btn:disabled { opacity: .5; cursor: not-allowed }
.link { color: var(--purple); text-decoration: underline; background: none; border: 0; padding: 0; font: inherit; cursor: pointer }
.actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap }
.divider { display: flex; align-items: center; gap: 13px; font-size: 12px; color: #9a9daf }
.divider:before, .divider:after { content: ''; height: 1px; flex: 1; background: var(--line) }
.alert { border-radius: 8px; background: #fff3ee; color: #843c26; border: 1px solid #f2d7cb; padding: 12px 14px; font-size: 13px; line-height: 1.5 }
.alert.info { background: #f3f2ff; color: #453bb4; border-color: #dfdbff }
.alert.ok { background: #effaf3; color: #1d6b3d; border-color: #cdebd8 }
.badge { display: inline-block; padding: 5px 8px; border-radius: 6px; background: #efeff9; color: #5c5a83; font-size: 11px; white-space: nowrap }
.badge.warn { background: #fff3ee; color: #843c26 }
.badge.ok { background: #effaf3; color: #1d6b3d }
.tabs { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0 }
.tabs a { padding: 9px 12px; border-radius: 8px; background: #fff; border: 1px solid var(--line); font-size: 13px }
.tabs a.on { border-color: var(--purple); color: var(--purple) }
.key-msg { margin-top: 12px }

/* ── Привязка ключа на главной кабинета ── */
.claim { border-color: #dfdbff; background: #f8f7ff }
.claim form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end }
.claim .field { flex: 1 1 260px }

/* ── Таблицы ── */
.table { width: 100%; border-collapse: collapse; font-size: 14px }
.table th { text-align: left; font: 500 11px 'JetBrains Mono', monospace; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line) }
.table td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere }
.table tr:last-child td { border-bottom: 0 }
.table .actions { justify-content: flex-end }
.table-wrap { overflow-x: auto }

/* ── Поиск и страницы списков (админка) ── */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin: 0 0 16px }
.toolbar .field { flex: 1 1 220px }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; font-size: 13px; color: var(--muted) }
.pager a { color: var(--purple) }
.mb { margin-bottom: 18px }

/* ── Выбор поиском: человек, подписка (админка) ── */
.pick-list { display: grid; gap: 6px; margin-top: 8px; max-height: 300px; overflow-y: auto }
.pick-row, .pick-line { display: grid; gap: 3px; text-align: left; font-weight: 400; overflow-wrap: anywhere }
.pick-row { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink) }
.pick-row:hover:not(:disabled) { border-color: var(--purple) }
.pick-row:disabled { cursor: not-allowed; background: var(--bg); color: var(--muted) }
.pick-chosen { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--purple); border-radius: 8px }

/* ── Диалоги ── */
.dlg { border: 0; border-radius: 15px; padding: 30px; width: min(520px, calc(100vw - 32px)); box-shadow: 0 24px 60px rgba(11, 12, 30, .18) }
.dlg::backdrop { background: rgba(5, 5, 10, .45) }
.dlg h2 { margin-bottom: 4px }

/* ── Вход админа ── */
.qr { display: flex; justify-content: center }
.qr svg { width: 220px; height: 220px; max-width: 100% }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; font: 600 15px 'JetBrains Mono', monospace }

@media (max-width: 720px) {
  .shell { padding: 0 17px }
  .bar .shell { height: 67px }
  .nav { gap: 12px; font-size: 12px }
  .nav a.hide-sm { display: none }
  main { padding: 32px 0 80px }
  .panel { padding: 23px }
  .dlg { padding: 22px }
  .cards { grid-template-columns: 1fr }
  .toprow { align-items: flex-start; flex-direction: column }
  .logo { font-size: 20px }
  .table thead { display: none }
  .table tr { display: grid; padding: 10px 0; border-bottom: 1px solid var(--line) }
  .table td { border: 0; padding: 4px 0 }
  .table .actions { justify-content: flex-start }
}

/* Unified product shell — October 2026: presentation only, API untouched */
body{min-height:100vh;background:#f7f8fc}
.bar{background:rgba(255,255,255,.97);border-bottom:1px solid #e8eaf1;box-shadow:0 1px 0 rgba(17,18,36,.018)}
.bar .shell{max-width:1232px}
.brand-lockup{display:inline-flex;align-items:center;gap:0;white-space:nowrap;font:500 23px/1 Unbounded,Arial,sans-serif;letter-spacing:-.082em;color:#0b0c1e;flex:none}
.brand-lockup .brand-o{display:inline-block;width:.93em;height:.93em;object-fit:contain;margin:0 .025em;vertical-align:middle}
.brand-lockup .animated-o{animation:dn-brand-orbit 8s linear infinite;transform-origin:center}
@keyframes dn-brand-orbit{to{transform:rotate(360deg)}}
.nav{gap:12px;flex-wrap:wrap;justify-content:flex-end}
.nav a{display:inline-flex;align-items:center;min-height:36px;padding:7px 12px;border-radius:8px;transition:background .2s,color .2s}
.nav a:hover{background:#f2f0ff;color:#5145d8}
body>main.shell{width:100%;min-height:calc(100vh - 78px);padding-top:48px;padding-bottom:150px}
.wide{max-width:1080px}
.wide>.eyebrow{margin-bottom:13px}
.wide>h1{margin-top:0;margin-bottom:20px}
h1{letter-spacing:-.055em;line-height:1.2}
h2{letter-spacing:-.035em}
.panel{border-radius:20px;padding:38px;box-shadow:0 14px 40px rgba(23,22,65,.035)}
.card{border-radius:17px;padding:29px;box-shadow:0 5px 22px rgba(23,22,65,.018)}
.section{margin-top:50px}
.section:last-child{margin-bottom:42px}
.tabs{margin:25px 0 28px;gap:9px}
.tabs a{display:inline-flex;align-items:center;min-height:39px;padding:9px 14px;border-radius:9px;font-weight:500;transition:background .2s,border-color .2s}
.tabs a:hover{background:#f5f3ff;border-color:#c8c2fa}
.tabs a.on{background:#f4f2ff;border-color:#7264ff;color:#5545df}
.btn{border-radius:9px;transition:background .2s,transform .2s,border-color .2s}
.btn:not(:disabled):hover{transform:translateY(-1px)}
.btn:focus-visible,.tabs a:focus-visible,.nav a:focus-visible,.brand-lockup:focus-visible{outline:3px solid var(--focus,#0b7a75);outline-offset:3px}
.field input,.field select,.field textarea{border-radius:9px}
.table th{background:#fafafe;padding-top:14px;padding-bottom:14px;white-space:nowrap}
.table td{padding-top:17px;padding-bottom:17px}
.table tbody tr:hover{background:#fafaff}
.table-wrap{border-radius:12px;overflow-x:auto}
.toolbar{gap:13px;margin-bottom:22px}
#danger{border-color:#f5dce2;background:linear-gradient(145deg,#fff,#fffafb);padding:38px}
#danger p{max-width:820px;line-height:1.8}
#danger .btn.danger,#danger .btn.secondary.danger{margin-top:6px}
#app>.wide{padding-bottom:32px}
@media(max-width:760px){.bar .shell{gap:10px}.brand-lockup{font-size:19px}.nav{gap:2px}.nav a{font-size:11px;padding:6px 7px;min-height:33px}body>main.shell{min-height:calc(100vh - 67px);padding-top:35px;padding-bottom:115px}.panel{padding:25px}.card{padding:23px}.section{margin-top:38px}#danger{padding:25px}.tabs{gap:7px}}
@media(max-width:420px){.brand-lockup{font-size:17px}.nav a{padding:5px 6px;font-size:10px}}
@media(prefers-reduced-motion:reduce){.brand-lockup .animated-o{animation:none}.btn,.tabs a,.nav a{transition:none}}

/* UX polish: account help and accessible navigation, no API behaviour changes */
.account-help{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 auto 44px;padding-top:18px;padding-bottom:24px;border-top:1px solid #e2e5ef;font-size:13px;color:#707488}
.account-help a{color:#5143d7;font-weight:600;overflow-wrap:anywhere}
.account-help a:hover{text-decoration:underline}
.account-help a:focus-visible,.table a:focus-visible,.link:focus-visible{outline:3px solid var(--focus,#0b7a75);outline-offset:3px;border-radius:3px}
.table tr:focus-within{background:#f6f5ff}
.table td,.table th{line-height:1.55}
.notice,.small{line-height:1.65}
input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--focus,#0b7a75);outline-offset:1px}
@media(max-width:720px){.account-help{flex-direction:column;align-items:flex-start;margin-bottom:25px}.table-wrap{overflow-x:auto;scrollbar-width:thin}}

/* Admin usability: constrain wide data tables, keep tools reachable at all widths */
.admin-shell #view{min-width:0}
.admin-shell #view>.panel{min-width:0;overflow:visible}
.admin-shell .table-wrap{width:100%;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;border:1px solid #e7e8ef}
.admin-shell .table{width:100%;min-width:970px;table-layout:auto}
.admin-shell .table th{white-space:nowrap}
.admin-shell .table td{vertical-align:middle}
.admin-shell .table td a{overflow-wrap:anywhere}
.admin-shell .toolbar{align-items:end}
.admin-shell .toolbar .field{min-width:180px}
.admin-shell .pager{flex-wrap:wrap}
.admin-shell #view>.panel>h2{margin-top:22px}
.admin-shell .toprow{flex-wrap:wrap}
@media(max-width:720px){
 .admin-shell .table thead{display:table-header-group}
 .admin-shell .table tr{display:table-row;padding:0;border-bottom:0}
 .admin-shell .table td{display:table-cell;padding:12px 11px;border-bottom:1px solid var(--line)}
 .admin-shell .table th{display:table-cell}
 .admin-shell .table{min-width:870px}
 .admin-shell .toolbar .field{flex:1 1 100%}
}

/* Product-wide footer, hierarchy and table actions (visual only) */
body{display:flex;flex-direction:column;min-height:100vh}
body>main.shell{flex:1;min-height:0;padding-bottom:95px}
.product-footer{background:#0b0c1e;color:#eeeefa;margin-top:auto}
.product-footer .shell{max-width:1232px}
.product-footer-grid{display:grid;grid-template-columns:1.2fr 1fr 1.2fr;gap:40px;padding-top:41px;padding-bottom:45px}
.product-footer strong{font:500 21px Unbounded,Arial,sans-serif;letter-spacing:-.06em;color:white}
.product-footer p,.product-footer-meta{font-size:13px;line-height:1.7;color:#aaaec7}
.product-footer p{max-width:310px}
.product-footer-links,.product-footer-meta{display:flex;flex-direction:column;align-items:flex-start;gap:12px}
.product-footer a:hover{color:#fff;text-decoration:underline}
.admin-shell .toprow>.admin-logout{align-self:flex-start}
.admin-logout{white-space:nowrap;color:#45485f!important}
.admin-logout:hover{border-color:#aab0c7;background:#f9f9fc}
.card .toprow{align-items:flex-start}
.card .toprow .meta{line-height:1.55}
.card .actions .btn,.admin-shell .table .actions .btn{white-space:nowrap;font-size:12px;min-height:36px;padding:8px 11px}
.card .actions{margin-top:17px}
.admin-shell .table{min-width:1130px}
.admin-shell .table th,.admin-shell .table td{white-space:nowrap}
.admin-shell .table td .small,.admin-shell .table td .badge{white-space:normal}
.admin-shell .table .actions{flex-wrap:wrap;justify-content:flex-end;gap:6px;min-width:200px}
.admin-shell .table td:last-child{min-width:190px}
.admin-shell .table .link{white-space:normal}
.admin-shell .table-wrap{border-radius:14px}
#view>.panel{padding:36px}
#view>.panel>h2{margin-top:23px}
.keycode{line-height:1.65}
@media(max-width:720px){
.product-footer-grid{grid-template-columns:1fr;gap:22px}
.product-footer .shell{padding:36px 18px 42px}
body>main.shell{padding-bottom:75px}
.admin-shell .table{min-width:1040px}
#view>.panel{padding:22px}
}

/* Last-mile footer and admin table layout */
.product-footer .footer-brand{color:#fff;display:inline-flex;font-size:21px}
.product-footer .footer-brand svg{flex:none}
.product-footer-meta a{color:#d9d9ec}
.product-footer-meta a:hover{text-decoration:underline}
.admin-shell .table{min-width:1260px}
.admin-shell .table td:last-child{min-width:330px}
.admin-shell .table .actions{flex-wrap:nowrap;white-space:nowrap;min-width:330px;justify-content:flex-end}
.admin-shell .table .actions .btn{flex:none}
.admin-shell .table td .event-data{max-width:350px;white-space:normal}
.admin-shell .event-data details>summary{color:#574bdd;cursor:pointer;font-weight:500;display:inline-block;padding:6px 0}
.admin-shell .event-data pre{font:11px/1.55 'JetBrains Mono',monospace;white-space:pre-wrap;overflow-wrap:anywhere;margin:8px 0 3px;padding:12px;border-radius:8px;background:#f5f5fc;max-width:390px}

/* Fast visual startup: structure appears immediately while protected data loads. */
.content-pending{padding-top:4px}
.content-pending h1{margin-bottom:24px}
.skeleton-row,.skeleton-box{position:relative;overflow:hidden;background:#eceef6;border-radius:12px}
.skeleton-row{height:40px;max-width:490px;margin-bottom:24px}
.skeleton-box{height:220px;border:1px solid #e5e8f2;border-radius:20px;background:#fff}
.skeleton-box:before,.skeleton-box:after{content:"";position:absolute;left:28px;right:28px;height:22px;border-radius:6px;background:#eceef6}
.skeleton-box:before{top:35px;right:45%}
.skeleton-box:after{top:77px;right:20%}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:720px){.skeleton-box{height:170px}.skeleton-row{height:34px}}

/* UI quality pass 2026-10-17: consistent touch targets and measured spacing.
   Presentation only; deliberately does not alter API, routing or form behaviour. */
:root{--control-height:44px;--focus-ring:rgba(99,88,237,.18)}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{font-synthesis:none}
button,input,select,textarea{font-family:Onest,Arial,sans-serif}
.btn{min-height:var(--control-height);padding:10px 16px;line-height:1.4;white-space:normal;text-align:center;transition:background-color .16s,border-color .16s,box-shadow .16s}
.btn.mini{min-height:38px;padding:8px 12px;line-height:1.3}
.btn:hover:not(:disabled){filter:none;background:#272843}
.btn.secondary:hover:not(:disabled){background:#f6f5ff;border-color:#bcb5ff;color:#4840b6}
.btn.secondary.danger:hover:not(:disabled){background:#fff3f5;border-color:#eaabb5;color:#b0233e}
.btn:active:not(:disabled){transform:translateY(0)}
.btn:disabled{opacity:.55;cursor:not-allowed}
.btn:focus-visible,button:focus-visible,a:focus-visible,.field input:focus-visible,.field select:focus-visible,.field textarea:focus-visible{outline:2px solid var(--focus,#0b7a75);outline-offset:3px}
.field{gap:8px;min-width:0}
.field input,.field select,.field textarea{min-height:var(--control-height);padding:11px 14px;line-height:1.45}
.field textarea{min-height:105px;resize:vertical}
.field .hint{line-height:1.6;font-weight:400}
.stack{gap:18px}
.actions{gap:10px;row-gap:10px}
.panel>.actions,.card>.actions{margin-top:18px}
.tabs{gap:8px;align-items:center}
.tabs a{min-height:var(--control-height);padding:11px 14px;display:inline-flex;align-items:center;justify-content:center;line-height:1.3}
.toprow{gap:20px}
.toprow h1{margin-bottom:10px}
.toprow p{margin-top:0}
.panel>h2,.card>h2{line-height:1.4}
.card p{line-height:1.65}
.toolbar{column-gap:12px;row-gap:12px;align-items:end}
.toolbar .field{min-width:0}
.toolbar .btn{min-width:100px}
.dlg{padding:32px;max-height:min(88dvh,820px);overflow-y:auto}
.dlg h2{margin-bottom:12px}
.dlg .actions{margin-top:8px}
.pager{flex-wrap:wrap;row-gap:14px}
.pager a{min-height:36px;display:inline-flex;align-items:center}
.table td,.table th{line-height:1.5}
.table td .actions{gap:7px}
.admin-shell .table .actions{align-items:center}
.admin-shell .table .actions .btn{min-height:36px}
.account-help{display:none}
@media(max-width:760px){
 .panel{padding:24px}
 .card{padding:22px}
 .dlg{padding:24px}
 .toprow{gap:14px}
 .tabs{flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px;scrollbar-width:thin}
 .tabs a{flex:none}
 .toolbar .field{flex:1 1 100%}
 .toolbar .btn{width:auto}
 .actions{gap:9px}
 .product-footer-grid{gap:26px}
}
@media(prefers-reduced-motion:reduce){
 .btn,.tabs a{transition:none}
 .btn:hover:not(:disabled){transform:none}
}

/* Compact loading state: no large skeleton or layout-shifting placeholder. */
.compact-pending{width:min(1080px,calc(100% - 32px));margin:42px auto 0;display:flex;align-items:center;gap:10px;color:#74768c;font-size:13px;line-height:1.5;min-height:32px}
.compact-pending-dot{width:8px;height:8px;flex:0 0 8px;border-radius:50%;background:var(--focus,#0b7a75);animation:dn-pulse 1.3s ease-in-out infinite}
@keyframes dn-pulse{0%,100%{opacity:.35}50%{opacity:1}}
@media(prefers-reduced-motion:reduce){.compact-pending-dot{animation:none}}

/* Stable logo: never hide brand letters or clip them when the fallback font is active. */
.bar .brand-lockup{display:inline-flex;align-items:center;min-width:150px;max-width:none;width:auto;overflow:visible;white-space:nowrap;flex-shrink:0}
.bar .brand-lockup .brand-o{flex:none}
.product-footer .footer-brand{width:auto;min-width:150px;max-width:none;overflow:visible;flex-shrink:0;white-space:nowrap}
@media(max-width:760px){.bar .brand-lockup{min-width:126px}}
@media(max-width:420px){.bar .brand-lockup{min-width:114px}}
/* The footer is not a loading indicator. Reveal it only once content is ready
   so changing from a short loading view to a full table does not visibly move it. */
body:has(.compact-pending) .product-footer{visibility:hidden}

/* Admin list headers: breathing room between create-actions and data tables. */
.admin-shell #view .panel > .toprow:has(> h2){
  align-items:center;
  gap:20px;
  margin:6px 0 22px;
  min-height:44px;
}
.admin-shell #view .panel > .toprow > h2{margin:0;line-height:1.4}
.admin-shell #view .panel > .toprow > .btn{
  flex:0 0 auto;
  min-height:44px;
  margin:0;
  white-space:nowrap;
}
.admin-shell #view .panel > .toprow + .table-wrap,
.admin-shell #view .panel > .toprow + .table{margin-top:0}
.admin-shell #view .panel > .toolbar{margin-bottom:25px}
@media(max-width:640px){
 .admin-shell #view .panel > .toprow:has(> h2){align-items:flex-start;gap:12px;flex-direction:column;margin-bottom:20px}
 .admin-shell #view .panel > .toprow > .btn{width:auto;max-width:100%}
}

/* Consistent controls in cabinet and admin: 44px standard, 36px compact.
   Security forms are equal-height cards; action buttons never stretch vertically. */
.btn:not(.mini){height:44px;min-height:44px;padding:0 16px;line-height:1.3;flex-shrink:0}
.btn.mini,.admin-shell .table .actions .btn{height:36px;min-height:36px;padding:0 12px;line-height:1.3}
.dlg .btn,.actions .btn{align-self:center}
.admin-shell #view .cards > form.card.stack{display:flex;flex-direction:column;gap:16px;align-items:stretch}
.admin-shell #view .cards > form.card.stack > .btn{margin-top:auto;align-self:stretch;height:44px;min-height:44px;padding:0 16px}
.admin-shell #view .cards > form.card.stack > h3{margin-bottom:10px}
.admin-shell #view .cards > form.card.stack > p{margin-top:0}
@media(max-width:480px){.btn:not(.mini){min-height:44px;height:auto;padding:11px 15px}}

/* Account overview/profile: same card rhythm and controls as the admin UI. */
body:not(.admin-shell) #app > .wide > .toprow{align-items:flex-start;margin-bottom:4px}
body:not(.admin-shell) #app > .wide > .toprow h1{font-size:clamp(28px,3.3vw,42px);overflow-wrap:break-word}
body:not(.admin-shell) #app > .wide > .toprow p{line-height:1.6}
body:not(.admin-shell) #app > .wide > .tabs{margin-top:28px;margin-bottom:28px}
body:not(.admin-shell) #app .claim{padding:32px 38px}
body:not(.admin-shell) #app .claim h2{margin-bottom:12px}
body:not(.admin-shell) #app .claim p{max-width:850px;margin:0;line-height:1.65}
body:not(.admin-shell) #app .claim form{align-items:end;gap:12px;margin-top:4px}
body:not(.admin-shell) #app .claim form .btn{min-width:128px}
body:not(.admin-shell) #app .cards{align-items:stretch;gap:20px}
body:not(.admin-shell) #app .card{padding:30px;display:flex;flex-direction:column;gap:16px}
body:not(.admin-shell) #app .card > h2{margin:0 0 2px}
body:not(.admin-shell) #app .card .stack{gap:14px}
body:not(.admin-shell) #app .card .field{gap:8px}
body:not(.admin-shell) #app .card .actions{justify-content:flex-start;align-items:center;margin-top:4px}
body:not(.admin-shell) #app .card .actions .btn{align-self:center}
body:not(.admin-shell) #app .card:has(#profile-form) #profile-form{gap:14px}
body:not(.admin-shell) #app .card:has(#profile-form) #email-box{margin-top:8px;padding-top:18px;border-top:1px solid var(--line)}
body:not(.admin-shell) #app .card:has(#profile-form) #email-box .kv{margin-bottom:4px;align-items:center}
body:not(.admin-shell) #app .card:has(#profile-form) #email-box .actions{margin-top:3px;gap:10px}
body:not(.admin-shell) #app .card:has(#login-box) #login-box{gap:18px;height:100%}
body:not(.admin-shell) #app .card:has(#login-box) #login-box > p{margin:0}
body:not(.admin-shell) #app .card:has(#login-box) #logout{margin-top:auto;align-self:flex-start;min-width:132px}
body:not(.admin-shell) #app .card:has(#profile-form) #profile-form > .btn{align-self:stretch}
@media(max-width:760px){
 body:not(.admin-shell) #app .claim{padding:25px}
 body:not(.admin-shell) #app .card{padding:23px}
 body:not(.admin-shell) #app .claim form .field{flex-basis:100%}
 body:not(.admin-shell) #app .claim form .btn{width:100%}
}

/* Identical header geometry for account overview and profile. */
body:not(.admin-shell) #app > .account-layout > .account-page-head{
  min-height:106px;
  margin:20px 0 0;
  align-items:flex-start;
}
body:not(.admin-shell) #app > .account-layout > .account-page-head h1{
  margin:0 0 12px;
  font-size:clamp(28px,3.3vw,42px);
  line-height:1.18;
}
body:not(.admin-shell) #app > .account-layout > .account-page-head p{
  margin:0;
  line-height:1.6;
}
body:not(.admin-shell) #app > .account-layout > .tabs{
  margin:20px 0 28px;
}
@media(max-width:760px){
 body:not(.admin-shell) #app > .account-layout > .account-page-head{min-height:112px}
}

/* Unified account/admin UI finishing pass. All changes visual-only. */
:root{--ui-action-h:44px;--ui-action-sm:36px;--ui-space:20px}
body #app>.wide>.eyebrow{margin-bottom:0}
body #app>.wide>.account-page-head,body.admin-shell #app>.wide>.toprow{margin-top:20px}
body #app>.wide>.tabs,body.admin-shell #app>.wide>.tabs{margin-top:20px;margin-bottom:28px}
body #app>.wide>.account-page-head{min-height:106px}
body.admin-shell #app>.wide>.toprow{min-height:106px;align-items:flex-start}
body.admin-shell #app>.wide>.toprow h1{font-size:clamp(28px,3.3vw,42px);line-height:1.18}
body.admin-shell #app>.wide>.toprow p{margin:0;line-height:1.6}
body.admin-shell #app>.wide>.toprow .admin-logout{margin-top:6px}
body #app .cards>a.card{display:flex;flex-direction:column;align-items:stretch;gap:10px}
body #app .cards>a.card .value{margin:2px 0;font-size:18px;overflow-wrap:anywhere}
body #app .cards>a.card .org-summary{margin:0;color:var(--muted);font-size:13px;line-height:1.55;overflow-wrap:anywhere}
body #app .cards>a.card .org-details{align-self:flex-start;min-width:125px;height:var(--ui-action-h);margin-top:auto;color:var(--ink);font-size:13px}
body #app .cards>a.card:hover{border-color:#c6c1f8;box-shadow:0 10px 35px rgba(42,32,99,.055)}
body #app .cards>a.card:focus-visible{outline:2px solid var(--focus,#0b7a75);outline-offset:3px}
body #app .cards>a.card:hover .org-details{border-color:#bcb5ff;background:#f6f5ff}
body #app .card>p.small,body #app .panel>p.small{max-width:75ch;line-height:1.65}
body #app .btn:not(.mini),body #app a.btn:not(.mini){min-height:var(--ui-action-h);height:var(--ui-action-h);padding:0 16px;line-height:1.3;display:inline-flex;justify-content:center;align-items:center}
body #app .btn.mini,body #app a.btn.mini{min-height:var(--ui-action-sm);height:var(--ui-action-sm);padding:0 12px;line-height:1.3;display:inline-flex;justify-content:center;align-items:center}
body #app .tabs a{min-height:var(--ui-action-h);height:var(--ui-action-h);padding:0 14px;line-height:1.3}
body #app .field input,body #app .field select{min-height:var(--ui-action-h);height:var(--ui-action-h)}
body #app .actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
body #app .card h2,body #app .panel h2{line-height:1.4}
body #app .meta{line-height:1.6}
@media(max-width:760px){
 body.admin-shell #app>.wide>.toprow,body #app>.wide>.account-page-head{min-height:auto}
 body #app>.wide>.tabs,body.admin-shell #app>.wide>.tabs{margin-top:24px}
 body #app .cards>a.card .org-details{align-self:flex-start}
}

/* QA corrections — one scoped layer, no changes to interaction or API. */
body.admin-shell #app>.wide>.toprow h1{margin:0 0 12px}
body:not(.admin-shell) #app>.account-layout>.account-page-head{min-height:106px}
body:not(.admin-shell) #app>.account-layout>.account-page-head .account-greeting{font-size:15px;font-weight:600;line-height:1.5;overflow-wrap:anywhere;margin:3px 0}
body:not(.admin-shell) #app>.account-layout>.account-page-head .account-subtitle{display:none}
body:not(.admin-shell) #app>.account-layout>.tabs{margin-top:20px}
.admin-shell .table td:last-child{min-width:0}
.admin-shell .table td:has(>.actions){min-width:260px}
.admin-shell .table .user-email-cell{min-width:225px;max-width:290px;white-space:normal}
.admin-shell .table .user-email{display:block;white-space:normal;overflow-wrap:anywhere;word-break:break-word;line-height:1.5}
.admin-shell .table .user-email-state{display:block;margin-top:5px;white-space:normal}
.admin-shell .table .user-email-state .badge{display:inline-flex;max-width:100%}
.admin-shell .table td{overflow-wrap:break-word}
body.admin-shell:has(#view[aria-busy="true"]) .product-footer,
body.admin-shell:has(#view .loading) .product-footer,
body:has(.compact-pending) .product-footer{visibility:hidden}
body.admin-shell:has(#view[aria-busy="true"]) main.shell,
body.admin-shell:has(#view .loading) main.shell{min-height:max(900px,100dvh)}
@media(max-width:760px){
 body:not(.admin-shell) #app>.account-layout>.account-page-head{min-height:112px}
 body:not(.admin-shell) #app>.account-layout>.tabs{margin-top:20px}
}

/* Shared logo metrics across landing, documents and account/admin UI. */
.bar .brand-lockup,.product-footer .footer-brand{
  font-weight:300;
  letter-spacing:-.045em;
  white-space:nowrap;
}

/* Shared wordmark scale: matches homepage and legal header/footer. */
.bar .brand-lockup{font-family:Unbounded,Arial,sans-serif;font-weight:300;font-size:23px;line-height:1;letter-spacing:-.045em;min-width:0;width:auto;max-width:none;overflow:visible;white-space:nowrap}
.product-footer .footer-brand{font-family:Unbounded,Arial,sans-serif;font-weight:300;font-size:21px;line-height:1;letter-spacing:-.045em;min-width:0;width:auto;max-width:none;overflow:visible;white-space:nowrap}
.bar .brand-o,.product-footer .footer-brand .brand-o{width:.93em;height:.93em;margin:0 .025em;flex:none}
@media(max-width:760px){
 .bar .brand-lockup{font-size:19px;min-width:0}
 .product-footer .footer-brand{font-size:18px;min-width:0}
}

/* Same physical logo origin as home: container width, gutters and header height. */
.bar .shell{max-width:1232px;height:78px;padding-left:28px;padding-right:28px;align-items:center}
.bar .logo.brand-lockup{align-self:center;margin:0;padding:0}
@media(max-width:760px){.bar .shell{height:68px;padding-left:20px;padding-right:20px}}

/* Align account/admin wordmark with the homepage on both axes. */
.bar{box-sizing:border-box;height:78px}
.bar .shell{box-sizing:border-box;width:100%;max-width:1232px;height:100%;padding:0 28px;display:flex;align-items:center}
.bar .logo.brand-lockup{align-self:center;margin:0;padding:0}
@media(max-width:760px){.bar{height:68px}.bar .shell{height:100%;padding:0 20px}}

/* Destructive account action: compact, readable and clearly separated. */
body:not(.admin-shell) #app #danger{gap:16px;padding:28px 32px;border-color:#f2d8db;background:#fffafa}
body:not(.admin-shell) #app #danger h2{margin:0}
body:not(.admin-shell) #app #danger .small{margin:0;max-width:70ch}
body:not(.admin-shell) #app #danger .danger-effects{margin:0;padding-left:20px;max-width:72ch;color:var(--muted);line-height:1.65}
body:not(.admin-shell) #app #danger .danger-effects li+li{margin-top:6px}
body:not(.admin-shell) #app #danger .danger-owner-note a{color:#5546ce;text-decoration:underline;text-underline-offset:3px}
body:not(.admin-shell) #app #danger .actions{margin-top:4px}
.delete-confirm-copy p{margin:0 0 12px}
.delete-confirm-copy ul{margin:0 0 14px;padding-left:20px;line-height:1.6}
.delete-confirm-copy li+li{margin-top:6px}
.delete-confirm-copy .delete-confirm-note{margin:0;font-size:13px;color:var(--muted)}
@media(max-width:760px){body:not(.admin-shell) #app #danger{padding:23px;gap:14px}}

/* Account navigation and support text refinements. */
body:not(.admin-shell) .account-logout-row{display:flex;justify-content:flex-end;margin-top:20px}
body:not(.admin-shell) .account-logout-row .btn{min-width:146px}
body:not(.admin-shell) .support-contact{display:inline-block;margin-top:4px;color:#5144c9;text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere}
body:not(.admin-shell) #new-org{background:#eeeaff;border-color:#aaa2fb;color:#35269f;font-weight:700;min-height:40px}
body:not(.admin-shell) #new-org:hover{background:#ded8ff;border-color:#7669e8}
@media(max-width:760px){body:not(.admin-shell) .account-logout-row{justify-content:flex-start}}

.product-footer .company-requisites{border-top:1px solid #343444;padding:18px 16px 0;margin:22px auto 0;max-width:1150px;display:flex;flex-wrap:wrap;justify-content:center;gap:4px 16px;text-align:center;color:#a0a2b1;font-size:11px;line-height:1.6}

/* Переключатель продукта мастер-админа в шапке админки, над вкладками (license-kit Э7; слово владельца 26.10.2026). */
.product-switch{display:inline-flex;align-items:center;gap:4px;margin-top:22px;padding:4px;border:1px solid var(--line);border-radius:12px;background:#fff;max-width:100%;overflow-x:auto}
.product-switch-label{padding:0 10px 0 8px;font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);flex:none}
.product-switch a{display:inline-flex;align-items:center;flex:none;min-height:36px;padding:0 16px;border-radius:9px;font-size:14px;font-weight:500;color:var(--ink);text-decoration:none;transition:background .2s,color .2s}
.product-switch a:hover{background:#f5f3ff}
.product-switch a.on{background:#5545df;color:#fff}
.product-switch a:focus-visible{outline:3px solid var(--focus,#0b7a75);outline-offset:2px}
body.admin-shell #app>.wide>.product-switch+.tabs{margin-top:14px}
@media(prefers-reduced-motion:reduce){.product-switch a{transition:none}}
