/* DeepOctopus — кабинет и админка. Только свои ресурсы: страницы отдаются с CSP default-src 'self', поэтому шрифты —
   локально (cabinet/fonts, лицензия OFL), без Google Fonts и без inline-стилей в разметке.
   Палитра, шрифты и радиусы — токены --do-* главной (index.html); прежние имена (--ink, --purple…) — их синонимы,
   а вшитые в правила цвета переведены на токены. Оттенки, которых у бренда нет (зелёный «успех»), оставлены как были. */

@font-face { font-family: Onest; src: url('/cabinet/fonts/Onest-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: Onest; src: url('/cabinet/fonts/Onest-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: Onest; src: url('/cabinet/fonts/Onest-SemiBold.ttf') format('truetype'); font-weight: 600 700; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/cabinet/fonts/JetBrainsMono-Medium.ttf') format('truetype'); font-weight: 400 500; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/cabinet/fonts/JetBrainsMono-Bold.ttf') format('truetype'); font-weight: 600 700; font-display: swap; }

/* Токены бренда — копия :root главной (index.html): кабинет грузит только свои стили, главную он не подключает. */
:root {
  --do-deep: #2A0647; --do-lavender: #F2EDF8; --do-lilac: #B58CFF; --do-accent-strong: #7A4DC4; --do-accent-ink: #4B0082;
  --do-accent-soft: #F5F0FB; --do-accent-line: #D4BFF0; --do-ink: #1B1024; --do-ink2: #2E2438; --do-body: #4A4055;
  --do-muted: #6E6479; --do-muted2: #9A91A5; --do-line: #E4DDEC; --do-line2: #EEE8F4; --do-surface: #F8F5FB; --do-canvas: #FFFFFF;
  --do-amber: #C58A12; --do-amber-surface: #FFFDF8; --do-amber-line: #EAD9B0; --do-amber-ink: #8A5E06;
  --do-error: #B3261E; --do-error-ink: #9A3329; --do-error-surface: #FBEDEC; --do-error-line: #F0C8C4;
  --do-font-brand: 'JetBrains Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --do-font-ui: 'Onest', 'Segoe UI', Arial, sans-serif;
  --do-radius-control: 4px; --do-radius-chip: 6px; --do-radius-card: 10px; --do-radius-panel: 16px;
  --do-shadow-window: 0 24px 60px rgba(42,6,71,.14); --do-shadow-popover: 0 10px 28px rgba(42,6,71,.18); --do-overlay: rgba(26,4,48,.4);
}
:root { --ink: var(--do-ink); --muted: var(--do-muted); --purple: var(--do-accent-strong); --line: var(--do-line); --bg: var(--do-surface); --danger: var(--do-error); }
* { box-sizing: border-box }
html { font-family: var(--do-font-ui) }
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 { display: inline-flex; align-items: center }
.nav { display: flex; align-items: center; gap: 25px; font-size: 13px; color: var(--do-body) }
.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 var(--do-font-brand); letter-spacing: .1em; text-transform: uppercase; color: var(--purple) }
.eyebrow.spaced { margin-top: 24px }
h1 { font: 500 clamp(28px, 5vw, 44px)/1.16 var(--do-font-brand); letter-spacing: -.06em; margin: 14px 0 16px }
h2 { font: 500 19px/1.4 var(--do-font-brand); 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 var(--do-font-brand); color: var(--muted); text-transform: uppercase }
.value { font-size: 19px; font-weight: 600; margin: 8px 0; overflow-wrap: anywhere }
.keycode { font: 600 16px var(--do-font-brand); overflow-wrap: anywhere }
.mono { font-family: var(--do-font-brand); overflow-wrap: anywhere }

/* ── Панели и карточки ── */
.panel { padding: 34px; border: 1px solid var(--line); background: white; border-radius: var(--do-radius-panel); box-shadow: 0 13px 55px rgba(42,6,71, .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: var(--do-radius-card); border: 1px solid var(--line); background: white; min-width: 0 }
.card p { margin: 7px 0 14px }
.card.flat { margin: 10px 0 }
.mutedcard { background: var(--do-line2) }
.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 var(--do-line); border-radius: var(--do-radius-control); 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 rgba(122,77,196,.11) }
.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: var(--do-radius-control); background: var(--do-deep); 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: var(--do-line) }
.btn.danger { background: var(--danger) }
.btn.secondary.danger { background: white; color: var(--danger); border-color: var(--do-error-line) }
.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: var(--do-muted2) }
.divider:before, .divider:after { content: ''; height: 1px; flex: 1; background: var(--line) }
.alert { border-radius: var(--do-radius-control); background: var(--do-error-surface); color: var(--do-error-ink); border: 1px solid var(--do-error-line); padding: 12px 14px; font-size: 13px; line-height: 1.5 }
.alert.info { background: var(--do-accent-soft); color: var(--do-accent-ink); border-color: var(--do-accent-line) }
.alert.ok { background: #effaf3; color: #1d6b3d; border-color: #cdebd8 }
.badge { display: inline-block; padding: 5px 8px; border-radius: var(--do-radius-chip); background: var(--do-line2); color: var(--do-muted); font-size: 11px; white-space: nowrap }
.badge.warn { background: var(--do-amber-surface); color: var(--do-amber-ink) }
.badge.ok { background: #effaf3; color: #1d6b3d }
.tabs { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0 }
.tabs a { padding: 9px 12px; border-radius: var(--do-radius-control); 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: var(--do-accent-line); background: var(--do-accent-soft) }
.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 var(--do-font-brand); 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: var(--do-radius-control); 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: var(--do-radius-control) }

/* ── Диалоги ── */
.dlg { border: 0; border-radius: var(--do-radius-panel); padding: 30px; width: min(520px, calc(100vw - 32px)); box-shadow: 0 24px 60px rgba(42,6,71, .18) }
.dlg::backdrop { background: var(--do-overlay) }
.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 var(--do-font-brand) }

@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 }

  .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:var(--do-surface)}
.bar{background:rgba(255,255,255,.97);border-bottom:1px solid var(--do-line);box-shadow:0 1px 0 rgba(42,6,71,.018)}
.bar .shell{max-width:1232px}
/* Логотип DeepOctopus — знак и надпись файлами сайта (assets/), как в шапке документов (assets/legal.css): у надписи
   в файле слева свой знак, поэтому она обрезана окном .logo-type. */
.logo{gap:0;flex:none;min-width:0;height:48px}
.logo .logo-mark{display:block;width:44px;height:44px;object-fit:contain;flex:none}
.logo .logo-type{display:block;position:relative;width:150px;height:38px;overflow:hidden;flex:none}
.logo .logo-type img{position:absolute;left:-40.5px;top:3.6px;width:185px;max-width:none;height:auto}
.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:var(--do-radius-control);transition:background .2s,color .2s}
.nav a:hover{background:var(--do-accent-soft);color:var(--do-accent-ink)}
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:var(--do-radius-panel);padding:38px;box-shadow:0 14px 40px rgba(42,6,71,.035)}
.card{border-radius:var(--do-radius-panel);padding:29px;box-shadow:0 5px 22px rgba(42,6,71,.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:var(--do-radius-control);font-weight:500;transition:background .2s,border-color .2s}
.tabs a:hover{background:var(--do-accent-soft);border-color:var(--do-accent-line)}
.tabs a.on{background:var(--do-accent-soft);border-color:var(--do-accent-strong);color:var(--do-accent-ink)}
.btn{border-radius:var(--do-radius-control);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,.logo:focus-visible{outline:3px solid var(--do-accent-strong);outline-offset:3px}
.field input,.field select,.field textarea{border-radius:var(--do-radius-control)}
.table th{background:var(--do-surface);padding-top:14px;padding-bottom:14px;white-space:nowrap}
.table td{padding-top:17px;padding-bottom:17px}
.table tbody tr:hover{background:var(--do-accent-soft)}
.table-wrap{border-radius:var(--do-radius-card);overflow-x:auto}
.toolbar{gap:13px;margin-bottom:22px}
#danger{border-color:var(--do-error-line);background:linear-gradient(145deg,#fff,var(--do-error-surface));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}.logo .logo-mark{width:36px;height:36px}.logo .logo-type{width:126px;height:32px}.logo .logo-type img{left:-34px;top:3px;width:155px}.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){.logo .logo-type{display:none}.nav a{padding:5px 6px;font-size:10px}}
@media(prefers-reduced-motion:reduce){.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 var(--do-line);font-size:13px;color:var(--do-muted)}
.account-help a{color:var(--do-accent-ink);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(--do-accent-strong);outline-offset:3px;border-radius:var(--do-radius-control)}
.table tr:focus-within{background:var(--do-accent-soft)}
.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(--do-accent-strong);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 var(--do-line)}
.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:var(--do-deep);color:var(--do-lavender);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 var(--do-font-brand);letter-spacing:-.06em;color:white}
.product-footer p,.product-footer-meta{font-size:13px;line-height:1.7;color:var(--do-muted2)}
.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:var(--do-body)!important}
.admin-logout:hover{border-color:var(--do-muted2);background:var(--do-surface)}
.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:var(--do-radius-card)}
#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-logo{display:inline-flex;align-items:center;max-width:100%;min-height:45px}
.product-footer .footer-logo img{display:block;max-width:100%;width:190px;height:auto}
.product-footer-meta a{color:var(--do-accent-line)}
.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:var(--do-accent-ink);cursor:pointer;font-weight:500;display:inline-block;padding:6px 0}
.admin-shell .event-data pre{font:11px/1.55 var(--do-font-brand);white-space:pre-wrap;overflow-wrap:anywhere;margin:8px 0 3px;padding:12px;border-radius:var(--do-radius-control);background:var(--do-surface);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:var(--do-line2);border-radius:var(--do-radius-card)}
.skeleton-row{height:40px;max-width:490px;margin-bottom:24px}
.skeleton-box{height:220px;border:1px solid var(--do-line);border-radius:var(--do-radius-panel);background:#fff}
.skeleton-box:before,.skeleton-box:after{content:"";position:absolute;left:28px;right:28px;height:22px;border-radius:var(--do-radius-chip);background:var(--do-line2)}
.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(122,77,196,.18)}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{font-synthesis:none}
button,input,select,textarea{font-family:var(--do-font-ui)}
.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:#44146a}
.btn.secondary:hover:not(:disabled){background:var(--do-accent-soft);border-color:var(--do-lilac);color:var(--do-accent-ink)}
.btn.secondary.danger:hover:not(:disabled){background:var(--do-error-surface);border-color:var(--do-error-line);color:var(--do-error)}
.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(--do-accent-strong);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:var(--do-muted);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(--do-accent-strong);animation:do-pulse 1.3s ease-in-out infinite}
@keyframes do-pulse{0%,100%{opacity:.35}50%{opacity:1}}
@media(prefers-reduced-motion:reduce){.compact-pending-dot{animation:none}}


/* 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:var(--do-accent-line);box-shadow:0 10px 35px rgba(42,6,71,.055)}
body #app .cards>a.card:focus-visible{outline:2px solid var(--do-accent-strong);outline-offset:3px}
body #app .cards>a.card:hover .org-details{border-color:var(--do-lilac);background:var(--do-accent-soft)}
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}
}


/* 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{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{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:var(--do-error-line);background:var(--do-error-surface)}
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:var(--do-accent-ink);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:var(--do-accent-ink);text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere}
body:not(.admin-shell) #new-org{background:var(--do-accent-line);border-color:var(--do-lilac);color:var(--do-accent-ink);font-weight:700;min-height:40px}
body:not(.admin-shell) #new-org:hover{background:var(--do-accent-line);border-color:var(--do-accent-strong)}
@media(max-width:760px){body:not(.admin-shell) .account-logout-row{justify-content:flex-start}}

.product-footer .footer-legal{border-top:1px solid var(--do-ink2);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:var(--do-muted2);font-size:11px;line-height:1.6}

/* Кнопка «Continue with Google» — по правилам оформления Google (светлая тема): белый фон, рамка #747775, текст #1F1F1F,
   официальный значок «G» слева (cabinet/img/google-g.svg). Цвета Google — не токены бренда: их менять нельзя. */
.btn-google{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:44px;padding:10px 12px;background:#FFFFFF;color:#1F1F1F;border:1px solid #747775;border-radius:var(--do-radius-control);font:500 14px/20px var(--do-font-ui);text-decoration:none;transition:background-color .2s,box-shadow .2s}
.btn-google:hover{background:#F8F9FA;box-shadow:0 1px 2px rgba(60,64,67,.3),0 1px 3px 1px rgba(60,64,67,.15)}
.btn-google:active{background:#F1F3F4}
.btn-google:focus-visible{outline:3px solid var(--do-lilac);outline-offset:3px}
.btn-google-icon{display:block;width:20px;height:20px;flex:none}
.btn-google-text{white-space:nowrap}

/* Подвал кабинета — как у сайта (assets/footer.css): глубокий фиолетовый, логотип файлом, без реквизитов. */
.product-footer{background:var(--do-deep);color:#f5effb}
.product-footer p,.product-footer-meta{color:#c6b8d6}
.product-footer-links a,.product-footer-meta a{color:#efe8f6}
.product-footer-links a:hover,.product-footer-meta a:hover{color:#d0aeff}
