/* Look: «+Альянс» corporate style, as backup.plus-aliance.ru (24.11.2026): neutral light-grey surfaces,
   a transparent «liquid glass» header (logo, tabs and actions on separate glass tiles), graphite buttons,
   colour only in the logo mark and in statuses; light / dark theme by the sun / moon button (theme.js:
   class .light / .dark on <html>, «как в системе» until chosen). Font Exo 2.
   Token names in comments are the system's; the old variable names stay so the rules below keep working.
   --brand / --brand-soft used to be orange: now the neutral emphasis (graphite / light grey). */
@font-face { font-family: "Exo 2"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(exo2-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Exo 2"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(exo2-latin.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 {
  --bg: hsl(220 14% 96%);            /* background */
  --panel: hsl(0 0% 100%);           /* card */
  --text: hsl(228 12% 9%);           /* foreground */
  --muted: hsl(228 5% 44%);          /* muted-foreground */
  --line: hsl(220 9% 88%);           /* border / input */
  --chip: hsl(220 9% 92%);           /* secondary / muted / accent */
  --accent: hsl(228 12% 9%);         /* primary: actions are graphite, not orange */
  --accent-text: hsl(0 0% 98%);      /* primary-foreground */
  --ring: hsl(228 12% 9%);           /* ring */
  --brand: hsl(228 12% 9%);          /* emphasis (selected item, ring, bars): graphite, not orange */
  --brand-soft: hsl(220 12% 89%);    /* selected rows / items: a shade darker than hover */
  --link: hsl(228 12% 9%);           /* links: text colour, underlined */
  --mark: #DD130A;                   /* the logo mark — the only red */
  --kitten: hsl(19 100% 56%);        /* the kitten keeps its own orange */
  /* liquid glass: almost clear, strong blur, a bright rim and a highlight on the top edge */
  --glass-a: rgb(255 255 255 / .18); --glass-b: rgb(255 255 255 / .42);
  --glass-border: rgb(255 255 255 / .6);
  --glass-shadow: 0 8px 32px rgba(31, 38, 64, .10), 0 1px 2px rgba(0, 0, 0, .06), inset 0 1px 0 rgb(255 255 255 / .85), inset 0 -1px 0 rgb(255 255 255 / .2), inset 0 0 24px rgb(255 255 255 / .15);
  --glass-shine: rgb(255 255 255 / .95);
  /* glass buttons (iOS «liquid glass»): clear capsule, bright rim, inner glow, soft shadow; colour only in the text */
  --gb-bg: rgb(255 255 255 / .22); --gb-bg-h: rgb(255 255 255 / .45);
  --gb-border: rgb(255 255 255 / .75);
  --gb-shadow: inset 0 1px 1px rgb(255 255 255 / .95), inset 0 -1px 1px rgb(255 255 255 / .45), inset 0 0 14px rgb(255 255 255 / .35), 0 0 0 .5px rgb(20 21 26 / .16), 0 4px 14px rgb(20 21 26 / .07);
  --gb-shadow-h: inset 0 1px 1px rgb(255 255 255 / 1), inset 0 -1px 1px rgb(255 255 255 / .5), inset 0 0 16px rgb(255 255 255 / .5), 0 0 0 .5px rgb(20 21 26 / .18), 0 8px 24px rgb(20 21 26 / .12);
  --gate-bg: linear-gradient(to top right, hsl(214 100% 97% / .6), hsl(270 100% 98% / .9));
  --head-h: 64px;                    /* sticky header height: sticky blocks below sit under it */
  --ok: hsl(152 60% 30%);  --ok-bg: hsl(152 37% 84%);     /* positive, positive-soft */
  --warn: hsl(42 89% 38%); --warn-bg: hsl(44 90% 89%);    /* warn (icons, not text), warn-soft */
  --bad: hsl(355 60% 49%); --bad-bg: hsl(355 60% 94%);    /* destructive; soft = derived, the system has none */
  --info: hsl(218 60% 44%); --info-bg: hsl(218 70% 90%);  /* info, info-soft */
  --side-bg: hsl(228 13% 12%); --side-fg: hsl(228 4% 78%); --side-accent: hsl(228 11% 17%);
  --side-border: hsl(225 10% 18%); --side-on-brand: hsl(228 12% 9%);
  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,.05);
  --shadow: 0 1px 3px 0 rgba(0,0,0,.1), 0 1px 2px -1px rgba(0,0,0,.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
  color-scheme: light;
}
/* Dark theme: chosen with the button (.dark), or the system's while nothing is chosen (not .light) */
:root.dark {
  --bg: hsl(228 14% 7%); --panel: hsl(228 13% 12%); --text: hsl(240 3% 85%); --muted: hsl(228 3% 57%);
  --line: hsl(225 10% 18%); --chip: hsl(228 11% 17%);
  --accent: hsl(240 3% 85%); --accent-text: hsl(228 13% 9%); --ring: hsl(240 3% 85%);
  --brand: hsl(240 3% 85%); --brand-soft: hsl(228 10% 22%); --link: hsl(240 3% 85%);
  --ok: hsl(152 50% 48%); --ok-bg: hsl(152 30% 15%);
  --warn: hsl(42 80% 52%); --warn-bg: hsl(42 30% 15%);
  --bad: hsl(355 60% 62%); --bad-bg: hsl(355 30% 16%);
  --info: hsl(218 60% 58%); --info-bg: hsl(218 30% 15%);
  --side-bg: hsl(228 15% 8%); --side-accent: hsl(228 11% 14%); --side-border: hsl(225 10% 15%);
  --glass-a: rgb(255 255 255 / .03); --glass-b: rgb(255 255 255 / .08); --glass-border: rgb(255 255 255 / .10);
  --gb-bg: rgb(255 255 255 / .05); --gb-bg-h: rgb(255 255 255 / .11); --gb-border: rgb(255 255 255 / .16);
  --gb-shadow: inset 0 1px 1px rgb(255 255 255 / .28), inset 0 -1px 1px rgb(255 255 255 / .06), inset 0 0 14px rgb(255 255 255 / .04), 0 0 0 .5px rgb(0 0 0 / .5), 0 4px 16px rgb(0 0 0 / .35);
  --gb-shadow-h: inset 0 1px 1px rgb(255 255 255 / .38), inset 0 -1px 1px rgb(255 255 255 / .1), inset 0 0 16px rgb(255 255 255 / .07), 0 0 0 .5px rgb(0 0 0 / .5), 0 8px 24px rgb(0 0 0 / .45);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, .45), inset 0 1px 0 rgb(255 255 255 / .14), inset 0 0 24px rgb(255 255 255 / .03);
  --glass-shine: rgb(255 255 255 / .25);
  --gate-bg: linear-gradient(to top right, #1a1a1a, #201a1a);
  --shadow: 0 1px 3px 0 rgba(0,0,0,.4), 0 1px 2px -1px rgba(0,0,0,.4);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.5), 0 4px 6px -4px rgba(0,0,0,.5);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not(.light) {
    --bg: hsl(228 14% 7%); --panel: hsl(228 13% 12%); --text: hsl(240 3% 85%); --muted: hsl(228 3% 57%);
    --line: hsl(225 10% 18%); --chip: hsl(228 11% 17%);
    --accent: hsl(240 3% 85%); --accent-text: hsl(228 13% 9%); --ring: hsl(240 3% 85%);
    --brand: hsl(240 3% 85%); --brand-soft: hsl(228 10% 22%); --link: hsl(240 3% 85%);
    --ok: hsl(152 50% 48%); --ok-bg: hsl(152 30% 15%);
    --warn: hsl(42 80% 52%); --warn-bg: hsl(42 30% 15%);
    --bad: hsl(355 60% 62%); --bad-bg: hsl(355 30% 16%);
    --info: hsl(218 60% 58%); --info-bg: hsl(218 30% 15%);
    --side-bg: hsl(228 15% 8%); --side-accent: hsl(228 11% 14%); --side-border: hsl(225 10% 15%);
    --glass-a: rgb(255 255 255 / .03); --glass-b: rgb(255 255 255 / .08); --glass-border: rgb(255 255 255 / .10);
  --gb-bg: rgb(255 255 255 / .05); --gb-bg-h: rgb(255 255 255 / .11); --gb-border: rgb(255 255 255 / .16);
  --gb-shadow: inset 0 1px 1px rgb(255 255 255 / .28), inset 0 -1px 1px rgb(255 255 255 / .06), inset 0 0 14px rgb(255 255 255 / .04), 0 0 0 .5px rgb(0 0 0 / .5), 0 4px 16px rgb(0 0 0 / .35);
  --gb-shadow-h: inset 0 1px 1px rgb(255 255 255 / .38), inset 0 -1px 1px rgb(255 255 255 / .1), inset 0 0 16px rgb(255 255 255 / .07), 0 0 0 .5px rgb(0 0 0 / .5), 0 8px 24px rgb(0 0 0 / .45);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, .45), inset 0 1px 0 rgb(255 255 255 / .14), inset 0 0 24px rgb(255 255 255 / .03);
    --glass-shine: rgb(255 255 255 / .25);
    --gate-bg: linear-gradient(to top right, #1a1a1a, #201a1a);
    --shadow: 0 1px 3px 0 rgba(0,0,0,.4), 0 1px 2px -1px rgba(0,0,0,.4);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.5), 0 4px 6px -4px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; font: 400 14px/20px "Exo 2", Inter, system-ui, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text);
  transition: background-color .3s, color .3s; }
[hidden] { display: none !important; }
a { color: var(--link); text-underline-offset: 3px; }
/* Logo: dark text in the light theme, white in the dark one */
.logo-dark { display: none !important; }
:root.dark .logo-light { display: none !important; }
:root.dark .logo-dark { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root:not(.light) .logo-light { display: none !important; }
  :root:not(.light) .logo-dark { display: block !important; }
}
/* «Liquid glass» tile: blurred, half-transparent, a thin shine on the top edge (backup.plus-aliance.ru) */
.glass { position: relative; border-radius: 14px; backdrop-filter: blur(20px) saturate(1.8); -webkit-backdrop-filter: blur(20px) saturate(1.8);
  background: linear-gradient(135deg, var(--glass-b), var(--glass-a) 45%, var(--glass-b)); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow); }
.glass::before { content: ''; position: absolute; inset: 0 12px auto; height: 1px; pointer-events: none;
  background: linear-gradient(to right, transparent, var(--glass-shine), transparent); }
/* Header: sticky and transparent; logo left, tabs centred, actions right — each on its own glass tile */
.top { position: sticky; top: 0; z-index: 50; display: grid; grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr); align-items: center; gap: 12px;
  min-height: var(--head-h); padding: 8px 16px; background: transparent; color: var(--text); }
.brand { grid-column: 1; justify-self: start; display: flex; align-items: center; height: 48px; padding: 8px 16px; }
.brand .logo { height: 32px; max-width: 180px; width: auto; display: block; }
nav { display: flex; gap: 4px; grid-column: 2; }
.top nav { align-items: center; height: 48px; padding: 0 8px; }
.user { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 2px; height: 48px; padding: 0 6px; white-space: nowrap; }
/* Medium screens: the e-mail leaves the header (it is in the «Выйти» tooltip); narrow: tabs go to a second row */
@media (max-width: 1400px) { #who { display: none; } }
@media (max-width: 1180px) {
  .top { display: flex; flex-wrap: wrap; justify-content: space-between; }
  .top nav { order: 3; width: 100%; overflow-x: auto; justify-content: safe center; }
  .top > * { min-width: 0; max-width: 100%; }
}
@media (max-width: 560px) { .brand .logo { max-width: 120px; } .user { flex-wrap: wrap; height: auto; padding: 4px; justify-content: flex-end; } .top button { padding: 6px 8px; } }
#who { color: var(--muted); font-size: 13px; padding: 0 6px; }
/* Buttons in the header: ghost (no box), text dims to muted, hover = light grey wash; «Войти» stays primary */
.top button { background: transparent; color: var(--text); border-color: transparent; box-shadow: none; padding: 6px 10px; }
.top button:hover { background: var(--gb-bg-h); box-shadow: var(--gb-shadow); }
.top button.primary { background: var(--gb-bg); color: var(--text); border-color: var(--gb-border);
  box-shadow: var(--gb-shadow); backdrop-filter: blur(10px) saturate(1.6); -webkit-backdrop-filter: blur(10px) saturate(1.6); }
.top button.primary:hover { background: var(--gb-bg); }
.top button:focus-visible { outline: 1px solid var(--ring); outline-offset: 1px; }
/* Theme button (sun in the light theme, moon in the dark one); alone in the corner on the sign-in pages */
.theme-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0 !important; }
.theme-btn svg { display: block; transition: transform .3s cubic-bezier(.4, 0, .2, 1); }
.theme-btn:hover svg { transform: rotate(20deg); }
.theme-btn .i-moon { display: none; }
:root.dark .theme-btn .i-sun { display: none; }
:root.dark .theme-btn .i-moon { display: block; }
@media (prefers-color-scheme: dark) { :root:not(.light) .theme-btn .i-sun { display: none; } :root:not(.light) .theme-btn .i-moon { display: block; } }
.theme-float { position: fixed; top: 8px; right: 16px; z-index: 50; padding: 6px; display: none; }
body.signed-out .theme-float { display: block; }
.theme-float button { background: transparent; border-color: transparent; box-shadow: none; color: var(--text); }
.theme-float button:hover { background: var(--gb-bg-h); box-shadow: var(--gb-shadow); }
/* Presence (who uses the portal): Microsoft-style facepile; green ring (Teams "Available" #6BB700) = online */
.people { position: relative; display: flex; align-items: center; }
.top .facepile { display: flex; align-items: center; padding: 4px 6px; background: none; border: none; box-shadow: none; gap: 0; }
.top .facepile:hover { background: var(--gb-bg-h); }
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 50%; overflow: visible;
  color: #fff; font-weight: 600; letter-spacing: .02em; position: relative; background: hsl(228 9% 40%); }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.avatar.s32 { width: 26px; height: 26px; font-size: 10px; }   /* header facepile (was 32px, −20% at Ivan's request) */
.avatar.s40 { width: 40px; height: 40px; font-size: 14px; }
.facepile .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--panel); }
.facepile .avatar:first-child { margin-left: 0; }
.facepile .avatar:not(.online):not(.more) img, .facepile .avatar:not(.online):not(.more) { filter: grayscale(.6); opacity: .7; }
.facepile .avatar.online { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px #6bb700; z-index: 1; margin-left: -2px; margin-right: 4px; }
.facepile .avatar.online:first-child { margin-left: 2px; }
.facepile .avatar.more { background: var(--chip); color: var(--text); font-weight: 500; }
.people-pop { position: absolute; top: calc(100% + 8px); right: 0; z-index: 30; width: 300px; max-height: 70vh; overflow-y: auto;
  background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-lg); padding: 8px 0; }
.people-head { padding: 8px 16px; font-weight: 600; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.people-pop ul { list-style: none; margin: 0; padding: 0; }
.people-pop li { display: flex; align-items: center; gap: 12px; padding: 8px 16px; }
.people-pop li:hover { background: var(--chip); }
.people-pop .avatar.online { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px #6bb700; }
.people-pop .avatar:not(.online) { opacity: .75; }
.people-name { font-weight: 500; }
.people-status { font-size: 12px; line-height: 16px; color: var(--muted); }
.people-status.on { color: var(--ok); }
main { max-width: 1200px; margin: 0 auto; padding: 24px 16px; }
h1 { font-size: 24px; line-height: 32px; font-weight: 700; letter-spacing: -0.025em; margin: 8px 0 16px; }   /* page-title */
h2 { font-size: 20px; line-height: 28px; font-weight: 600; margin: 0 0 12px; }                              /* heading */
h3, h4 { font-weight: 600; }
.muted { color: var(--muted); }
/* Buttons — iOS «liquid glass»: a clear capsule (the page shows through, blurred), a bright rim, an inner glow and a
   soft shadow; no fills — colour only in the text. Primary = the same glass with bold text, a touch more presence;
   danger = red text. Hover: the glass brightens and lifts; press: it sinks a little. */
button { font: inherit; font-weight: 500; padding: 7px 16px; border-radius: 999px; border: 1px solid var(--gb-border); color: var(--text); cursor: pointer;
  background: var(--gb-bg); box-shadow: var(--gb-shadow);
  backdrop-filter: blur(12px) saturate(1.8); -webkit-backdrop-filter: blur(12px) saturate(1.8);
  transition: background .2s cubic-bezier(.4, 0, .2, 1), color .15s, border-color .15s, opacity .15s, box-shadow .3s cubic-bezier(.4, 0, .2, 1), transform .3s cubic-bezier(.2, .9, .3, 1.3); }
button:hover { background: var(--gb-bg-h); box-shadow: var(--gb-shadow-h); }
button:active:not(:disabled) { transform: scale(.96); transition-duration: .1s; }
button:focus-visible { outline: 1px solid var(--ring); outline-offset: 2px; }
button.primary { font-weight: 650; color: var(--text); }
button.primary:hover:not(:disabled) { background: var(--gb-bg-h); box-shadow: var(--gb-shadow-h); transform: scale(1.03); }
button.primary:active:not(:disabled) { transform: scale(.97); }
button:disabled { opacity: .45; cursor: default; }
button:disabled:hover { background: var(--gb-bg); box-shadow: var(--gb-shadow); }
button.primary:disabled:hover { background: var(--gb-bg); box-shadow: var(--gb-shadow); }
button.danger { color: var(--bad); }
button.danger:hover { background: var(--gb-bg-h); color: var(--bad); }
/* Buttons that sit on a glass tile or have no box of their own: no second blur layer */
.top button, .top .tab, .mgr-tree button, button.link, .gate-link, .theme-float button { backdrop-filter: none; -webkit-backdrop-filter: none; }
/* A chosen button (period, mode, the open section pill): a thin ring in the text colour, no fill */
.cmp-trend button.on, .top #btn-mode.on { background: var(--gb-bg-h); color: var(--text); font-weight: 600; box-shadow: var(--gb-shadow), inset 0 0 0 1px color-mix(in srgb, var(--text) 28%, transparent); }
/* Tabs: plain text on the glass tile — muted, the open one in the text colour with a short bar under it */
.tab { position: relative; border: none; background: none; box-shadow: none; color: var(--muted); padding: 6px 12px; }
.top .tab { background: none; border: none; color: var(--text); font-size: 14px; white-space: nowrap; opacity: .78; }
.top .tab:hover { background: none; color: var(--text); opacity: 1; }
.top .tab.active { background: none; color: var(--text); font-weight: 600; opacity: 1; }
.top .tab.active::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; border-radius: 2px; background: var(--text); }
.top .tab:active { transform: none; }
@media (prefers-reduced-motion: reduce) { button, button:hover, button:active { transform: none !important; } }
.bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bar h1 { margin: 8px 0; }
.spacer { flex: 1; }
/* Cards and tables: card surface, radius-xl, shadow */
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; margin-top: 12px; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 500; color: var(--muted); font-size: 13px; }
tbody tr:hover > td { background: color-mix(in srgb, var(--chip) 50%, transparent); }
tr:last-child td { border-bottom: none; }
/* Badges: radius-md, 12/16 600; status always in words too */
.badge { display: inline-block; padding: 2px 10px; border-radius: 6px; font-size: 12px; line-height: 16px; font-weight: 600; background: var(--chip); color: var(--text); }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--text); }   /* warn fails 4.5:1 as text in light */
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.small { font-size: 12px; line-height: 16px; }                    /* caption */
.err { color: var(--bad); font-size: 12px; max-width: 360px; word-break: break-word; }
.notice { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; background: var(--warn-bg); color: var(--text); border: 1px solid var(--line); }
.notice.bad { background: var(--bad-bg); }
/* Dialogs: radius-lg, shadow-lg */
dialog { border: 1px solid var(--line); border-radius: 8px; padding: 24px; width: min(560px, calc(100vw - 32px)); background: var(--panel); color: var(--text); box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(0, 0, 0, .6); }
dialog h2 { font-size: 18px; line-height: 28px; }
label { display: block; margin-bottom: 12px; font-weight: 500; }
label small { display: block; font-weight: 400; color: var(--muted); }
label.check { font-weight: 400; display: flex; gap: 8px; align-items: flex-start; }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; margin: 2px 0 0; }
input[type=text], input:not([type]), select { width: 100%; font: inherit; padding: 7px 12px; margin-top: 4px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--text); box-shadow: var(--shadow-sm); }
input:focus-visible, select:focus-visible { outline: 1px solid var(--ring); outline-offset: 0; border-color: var(--ring); }
input:disabled { opacity: .5; }
.actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
/* Onboarding steps: status by sign and colour, no emoji (the system's rule for the panel) */
.steps { padding-left: 24px; margin: 8px 0; max-height: 320px; overflow-y: auto; }
.steps li { margin: 4px 0; }
.steps li::marker { font-weight: 700; }
.steps li.run::marker { content: "…  "; color: var(--muted); }
.steps li.ok::marker { content: "✓  "; color: var(--ok); }
.steps li.warn::marker { content: "!  "; color: var(--warn); }
.steps li.bad::marker { content: "✕  "; color: var(--bad); }
/* ── Licences ─────────────────────────────────────────────── */
.lic summary { cursor: pointer; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.lic summary::-webkit-details-marker { display: none; }
.lic-main { font-weight: 600; }
.lic-more { font-size: 12px; color: var(--link); }
.lic-more::after { content: " ▾"; }
.lic[open] .lic-more::after { content: " ▴"; }
.lic ul { margin: 6px 0 0; padding-left: 16px; font-size: 13px; }
.lic li { margin: 2px 0; }
.lic .sku { font-size: 11px; color: var(--muted); font-family: ui-monospace, Consolas, monospace; }

/* ── Minutes ─────────────────────────────────────────────── */
.usage { margin-top: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 24px; box-shadow: var(--shadow); }
.usage h2 { font-size: 16px; line-height: 24px; margin: 0 0 8px; }   /* subheading */
.meter { height: 8px; border-radius: 9999px; background: var(--chip); overflow: hidden; }
.meter-fill { height: 100%; width: 0; background: var(--ok); transition: width .4s; }
.meter-fill.warn { background: var(--warn); }
.meter-fill.bad { background: var(--bad); }
.usage a { color: var(--link); }

/* ── Comparison ───────────────────────────────────────────── */
#cmp-tenants { margin-bottom: 12px; }
.filters { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin: 8px 0; }
.filters label { margin: 0; }
.filters input#cmp-q { width: 240px; margin: 0; }
.legend { margin: 4px 0 12px; }
.cmp-group { margin-bottom: 12px; }
.cmp-group > summary { cursor: pointer; padding: 6px 0; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; list-style: none; }
.cmp-group > summary::-webkit-details-marker { display: none; }
/* Collapsed / expanded is visible: ▸ / ▾ before the workload name */
.cmp-group > summary::before { content: '▸'; color: var(--brand); font-size: 14px; width: 12px; display: inline-block; transition: transform .15s; }
.cmp-group[open] > summary::before { transform: rotate(90deg); }
.cmp-group:not([open]) > summary { opacity: .85; }
/* Summary counters: change to a week / month / year ago */
.cmp-trend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 12px 0 0; font-size: 13px; }
.cmp-trend button { padding: 3px 10px; font-size: 13px; box-shadow: none; }
.cmp-trend button.on { background: var(--gb-bg-h); color: var(--text); font-weight: 600; box-shadow: var(--gb-shadow), inset 0 0 0 1px color-mix(in srgb, var(--text) 28%, transparent); }
.delta { font-size: 11px; font-weight: 600; padding: 0 5px; border-radius: 4px; margin-left: 4px; white-space: nowrap; }
.delta.good { color: var(--ok); background: var(--ok-bg); }
.delta.bad { color: var(--bad); background: var(--bad-bg); }
.delta.neutral { color: var(--text); background: var(--chip); }
.delta.zero, .delta.none { color: var(--muted); font-weight: 400; }
#btn-cmp-fold { padding: 5px 10px; font-size: 13px; min-width: 150px; }
.cmp-wl { font-weight: 600; font-size: 16px; }
table.cmp td, table.cmp th { white-space: nowrap; }
table.cmp td:first-child { white-space: normal; }
.cmp-row { cursor: pointer; }
.cmp-row:hover td, .cmp-row.open td { background: var(--chip); }
.cmp-row:hover td.rec-t-bad, .cmp-row.open td.rec-t-bad { background: var(--bad-bg); }
.cmp-row:hover td.rec-t-ok, .cmp-row.open td.rec-t-ok { background: var(--ok-bg); }
.cmp-name { display: block; }
.cmp .sku { font-size: 11px; color: var(--muted); font-family: ui-monospace, Consolas, monospace; }
.cmp-detail > td { background: var(--bg); }
/* Comparison: wider page on wide screens; one column grid shared by the summary and every workload table */
main:has(> #view-compare:not([hidden])) { max-width: var(--cmp-width, 1200px); }
table.cmp-grid { table-layout: fixed; }
/* First column fixed (180px = FIRST in compare.js), tenants share the rest; narrower than 95px per tenant
   the page switches to cards (compare.js narrow()). */
table.cmp-grid col:not(.col-t):not(.col-s) { width: 180px; }
/* Licences in the comparison: collapsed; "assigned / bought"; red = off or over-assigned, amber = expired (grace) */
.cmp-lic ul { padding-left: 0; list-style: none; }
.cmp-lic li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 6px; padding: 1px 4px; border-radius: 4px; }
.cmp-lic .lic-qty { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--muted); }
.cmp-lic .lic-note { flex-basis: 100%; font-size: 11px; line-height: 14px; }
.cmp-lic li.lic-off { background: var(--bad-bg); color: var(--bad); }
.cmp-lic li.lic-off .lic-qty { color: var(--bad); font-weight: 600; }
.cmp-lic li.lic-warn { background: var(--warn-bg); }
.cmp-lic .lic-rest { margin-top: 4px; padding-top: 4px; border-top: 1px dashed var(--line); opacity: .8; }
.cmp-lic .lic-bad { color: var(--bad); font-weight: 600; }
table.cmp-grid col.col-t { width: auto; }
table.cmp-grid col.col-s { width: 120px; }
table.cmp-grid > tbody > tr.cmp-row > td { overflow: hidden; text-overflow: ellipsis; }
table.cmp-grid > thead th { white-space: normal; overflow-wrap: anywhere; }
/* Cards (narrow windows): one card per resource, tenant values as tiles; a card opens like a table row. */
.cmp-cards { display: grid; gap: 8px; }
.cmp-tenant-cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin-bottom: 12px; }
.cmp-card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; box-shadow: var(--shadow-sm); min-width: 0; }
#cmp-groups .cmp-card-head, #cmp-groups .cmp-tiles { cursor: pointer; }
#cmp-groups .cmp-card:hover { border-color: var(--muted); }
.cmp-card.open { border-color: var(--accent); }
.cmp-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.cmp-card-head .sku { display: block; font-size: 11px; color: var(--muted); font-family: ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.cmp-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 6px; margin-top: 8px; }
.cmp-tile { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; padding: 3px 8px; background: var(--chip); border-radius: 6px; font-size: 13px; min-width: 0; }
.cmp-tile-t { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cmp-tile > span:last-child { white-space: nowrap; }
.cmp-card-detail { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); cursor: auto; }
.cmp-facts { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 8px 0 0; font-size: 13px; }
.cmp-facts dt { color: var(--muted); }
.cmp-facts dd { margin: 0; }
table.cmp-grid .sku { overflow-wrap: anywhere; }
table.cmp-summary td { white-space: normal; overflow-wrap: anywhere; }
/* Tenant names stay visible while scrolling: the header of each comparison table sticks to the top of the window.
   "overflow-x: clip" (not auto) keeps the wrapper from becoming a scroll container, otherwise the header would
   stick inside the wrapper and never move. */
#view-compare .table-wrap { overflow-x: clip; overflow-y: visible; }
#view-compare table.cmp-grid > thead th { position: sticky; top: 0; z-index: 3; background: var(--panel); color: var(--text); font-weight: 600; box-shadow: inset 0 -1px 0 var(--line), 0 2px 4px -2px rgba(0,0,0,.15); }.detail-scroll { overflow-x: auto; }
table.cmp.inner { margin-top: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.c-ok { color: var(--ok); font-weight: 600; }
.c-empty { color: var(--muted); }
.c-lic { color: var(--warn); }
.c-acc, .c-err { color: var(--bad); }
.c-na { color: var(--muted); font-style: italic; }
button.link { border: none; background: none; box-shadow: none; color: var(--link); padding: 0 4px; text-decoration: underline; font-weight: 400; }
button.link:hover { background: none; }

/* ── Kitten ─────────────────────────────────────────────── */
.kitten { position: fixed; left: 0; bottom: 0; width: 64px; height: 48px; pointer-events: none; z-index: 20; transform-origin: 32px 24px; }
.kitten svg { display: block; overflow: visible; }
.kitten svg > * { pointer-events: visiblePainted; cursor: pointer; }   /* clicks only on the kitten's body, not its box */
/* Easter egg: "blue screen" after 5 clicks on the kitten */
.bsod { position: fixed; inset: 0; z-index: 1000; background: #0078d7; color: #fff; cursor: default; overflow: auto;
  font-family: "Segoe UI Light", "Segoe UI", system-ui, sans-serif; font-weight: 300; outline: none; }
.bsod-in { max-width: 900px; padding: 12vh 8vw 32px; }
.bsod-face { font-size: clamp(80px, 14vw, 160px); line-height: 1; margin-bottom: 32px; }
.bsod-lead { font-size: clamp(18px, 2.4vw, 26px); line-height: 1.35; margin: 0 0 24px; }
.bsod-foot { display: flex; gap: 20px; align-items: flex-start; margin-top: 24px; font-size: 14px; line-height: 1.5; }
.bsod-foot p { margin: 0 0 10px; }
.bsod-qr { flex: none; width: 92px; height: 92px; padding: 6px; background: #fff; display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; }
.bsod-qr i { background: #fff; }
.bsod-qr i.on { background: #0078d7; }
.bsod-hint { opacity: .75; }
.kitten g { transform-box: fill-box; }
.k-tail { transform-origin: 100% 100%; }
.k-legs-a, .k-legs-b { transform-origin: 50% 0; }
.k-head { transform-origin: 30% 80%; transition: transform .25s; }
.k-eyes { transform-origin: 50% 50%; animation: k-blink 4.5s infinite; }
.kitten.walk .k-legs-a { animation: k-step .45s ease-in-out infinite alternate; }
.kitten.walk .k-legs-b { animation: k-step .45s ease-in-out infinite alternate-reverse; }
.kitten.walk .k-tail { animation: k-swish 1.6s ease-in-out infinite alternate; }
.kitten.chase .k-legs-a { animation: k-step .18s linear infinite alternate; }
.kitten.chase .k-legs-b { animation: k-step .18s linear infinite alternate-reverse; }
.kitten.chase svg { animation: k-bob .18s linear infinite alternate; }
.kitten.chase .k-tail { transform: rotate(35deg); }
.kitten.sit svg { transform: translateY(3px); }
.kitten.sit .k-tail { animation: k-swish 3s ease-in-out infinite alternate; }
.kitten.watch .k-head { transform: rotate(-12deg); }
.kitten.watch .k-tail { animation: k-swish .5s ease-in-out infinite alternate; }
.kitten.watch svg { transform: translateY(2px); }
.kitten.play .k-legs-a { animation: k-bat .35s ease-in-out infinite alternate; }
.kitten.play .k-tail { animation: k-swish .4s ease-in-out infinite alternate; }
.kitten.play .k-head { transform: rotate(-8deg); }
.kitten.pounce svg { animation: k-pounce .9s ease-out; }
.kitten.pounce .k-head { transform: rotate(-18deg); }
@keyframes k-step { from { transform: rotate(-22deg); } to { transform: rotate(22deg); } }
@keyframes k-swish { from { transform: rotate(-14deg); } to { transform: rotate(18deg); } }
@keyframes k-bob { from { transform: translateY(0); } to { transform: translateY(-2px); } }
@keyframes k-bat { from { transform: rotate(0); } to { transform: rotate(-55deg); } }
@keyframes k-pounce { 0% { transform: translateY(2px) scaleY(.9); } 35% { transform: translateY(-16px) rotate(-8deg); } 70% { transform: translateY(0); } 100% { transform: translateY(0); } }
@keyframes k-blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@media (prefers-reduced-motion: reduce) { .kitten * { animation: none !important; } * { transition: none !important; } }
.top #btn-kitten { border: none; background: none; opacity: .45; padding: 4px 6px; color: var(--kitten); display: inline-flex; align-items: center; }
.top #btn-kitten.active { opacity: 1; }
.top #btn-kitten svg { display: block; }
.top #btn-faq { font-size: 13px; }

.top #btn-mode { font-size: 13px; white-space: nowrap; }
#who { white-space: nowrap; }

.top #btn-mode.on { background: var(--gb-bg-h); color: var(--text); font-weight: 600; box-shadow: var(--gb-shadow), inset 0 0 0 1px color-mix(in srgb, var(--text) 28%, transparent); }
/* Sign-in / no-access card (same look as the +Альянс remote access service). The top bar is hidden until signed in. */
body.signed-out header.top { display: none; }
/* Before the portal knows who is signed in: an empty page with a small spinner (no flash of the header or the sign-in card) */
body.booting header.top, body.booting main, body.booting #btn-top { visibility: hidden; }
body.booting::after { content: ''; position: fixed; top: 50%; left: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px;
  border: 3px solid var(--line); border-top-color: var(--text); border-radius: 50%; animation: boot-spin .8s linear infinite; }
@keyframes boot-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { body.booting::after { animation-duration: 2.4s; } }
/* Sign-in, no access, client approval: a card in the middle of a soft gradient (backup.plus-aliance.ru «Вход в систему»):
   frosted card, the logo mark on top, title and text centred. */
body.signed-out { background: var(--gate-bg), var(--bg); background-attachment: fixed; min-height: 100vh; }
.gate { display: flex; justify-content: center; align-items: center; min-height: calc(100vh - 96px); padding: 32px 0; }
.gate-card { width: min(460px, 100%); background: color-mix(in srgb, var(--panel) 80%, transparent); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid color-mix(in srgb, var(--line) 50%, transparent); border-radius: 12px; overflow: hidden; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .25);
  animation: gate-in .5s cubic-bezier(.4, 0, .2, 1); }
.gate-card.wide { width: min(680px, 100%); }
@keyframes gate-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .gate-card { animation: none; } }
.gate-head { display: flex; justify-content: center; padding: 32px 28px 0; }
.gate-mark { width: 64px; height: 64px; display: block; border-radius: 14px; }
.gate-logo { height: 36px; width: auto; display: block; }
.gate-service { font-weight: 600; font-size: 15px; color: var(--text); }
.gate-body { padding: 16px 28px 28px; text-align: center; }
.gate-body h1 { font-size: 24px; line-height: 32px; font-weight: 700; margin: 0 0 8px; }
.gate-body p { max-width: 620px; margin: 0 auto 10px; color: var(--muted); font-size: 14px; line-height: 21px; }
.gate-body p strong { color: var(--text); }
.gate-card.wide .gate-body { text-align: left; }
.gate-card.wide .gate-body h1 { text-align: center; }
.gate-card.wide .ap-center { text-align: center; padding: 8px 0 4px; }
.gate-ms { display: flex; width: 100%; align-items: center; justify-content: center; gap: 12px; margin-top: 20px; height: 48px; padding: 0 18px; font-size: 15px; font-weight: 500; color: var(--text);
  background: var(--gb-bg); border: 1px solid var(--gb-border); border-radius: 999px; box-shadow: var(--gb-shadow); }
.gate-ms:hover { background: var(--gb-bg-h); box-shadow: var(--gb-shadow-h); }
.gate-actions { display: flex; align-items: center; justify-content: center; gap: 8px 16px; flex-wrap: wrap; }
.gate-actions .gate-ms { flex: 1 1 100%; }
.gate-link { margin-top: 8px; background: none; border: none; box-shadow: none; color: var(--muted); padding: 8px 4px; }
.gate-link:hover { background: none; color: var(--text); text-decoration: underline; }
.gate-foot { padding: 14px 28px; border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); font-size: 12px; color: var(--muted); text-align: center; }
.gate-foot a { color: var(--muted); }
/* Tutorial: a card in the middle of a blurred page */
dialog.tutor { width: min(620px, calc(100vw - 32px)); padding: 24px 28px 18px; }
dialog.tutor::backdrop { background: transparent; }        /* the shade is .tutor-shade, with a hole for the step's block */
/* a block is highlighted: the card sits next to it (left/top set by tutorial.js every frame) */
dialog.tutor.spot { position: fixed; inset: auto; margin: 0; width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .45); }
dialog.tutor.spot .tutor-body { min-height: 0; }
.tutor-shade { position: fixed; z-index: 900; background: rgba(15, 17, 22, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); pointer-events: none; }
.tutor-ring { position: fixed; z-index: 901; border-radius: 8px; box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--brand), 0 0 24px 6px rgba(255, 255, 255, .25); pointer-events: none; }
.tutor-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.tutor-dots { display: inline-flex; gap: 5px; }
.tutor-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.tutor-dots span.on { background: var(--brand); }
dialog.tutor h2 { font-size: 22px; line-height: 30px; margin: 4px 0 12px; }
.tutor-body { min-height: 150px; font-size: 15px; line-height: 23px; }
.tutor-body p { margin: 0 0 10px; }
.tutor-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.tutor-foot label { margin: 0; align-items: center; }
.top #btn-tutor { font-size: 13px; }

/* «Support_1L»: admin tabs read-only — nothing that changes tenants, the pipeline or roles */
body.ro .admin-write { display: none !important; }
/* Manager workspace: the card is slightly blurred while Okdesk / the tenant is refreshed */
#mgr-list .mgr-tenant { transition: filter .2s, opacity .2s; }
#mgr-list.busy .mgr-tenant { filter: blur(1.5px); opacity: .6; pointer-events: none; user-select: none; }
@media (prefers-reduced-motion: reduce) { #mgr-list .mgr-tenant { transition: none; } }
/* Access tab: one group per role */
table.acc tr.acc-group td { background: var(--chip); font-weight: 600; padding-top: 10px; padding-bottom: 10px; border-top: 2px solid var(--line); }
table.acc tr.acc-group:first-child td { border-top: none; }
/* Access tab lock */
.acc-lock { display: inline-flex; align-items: center; gap: 6px; }
.acc-lock.open { border-color: var(--brand); color: var(--brand); }
#view-access.acc-locked .acc-add { opacity: .55; }
/* Client approval page (approve.html) */
.ap-ent { margin: 10px 0; font-size: 15px; }
.ap-ent ul { margin: 4px 0 0; padding-left: 20px; color: var(--muted); }
.ap-label { display: block; margin: 12px 0 0; max-width: 520px; font-weight: 500; }
.ap-label input, .ap-label textarea { width: 100%; margin-top: 4px; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--text); }
.ap-done { padding: 8px 12px; border-radius: 6px; background: var(--ok-bg); max-width: 620px; }
.ap-done.remarks { background: var(--warn-bg); }
.gate-actions:has(.ap-btn) { justify-content: flex-start; margin-top: 16px; }
.gate-actions .ap-btn { margin: 0; }
.gate-actions:has(.ap-btn) + p { margin-top: 12px; }
/* Send-to-client dialog */
dialog.send { width: min(640px, calc(100vw - 32px)); }
.send-to { max-height: 180px; overflow-y: auto; border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; margin: 4px 0 8px; }
.send-to label { margin: 2px 0; font-weight: 400; }
dialog.send textarea { width: 100%; font: inherit; font-size: 13px; padding: 8px 10px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--text); }
.send-opts { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; }
.send-opts label { margin: 0; font-weight: 400; }
.mgr-sent { margin: 8px 0; padding: 8px 12px; border-radius: 6px; background: var(--bg); font-size: 13px; }
/* "Наверх" button */
.to-top { position: fixed; right: 20px; bottom: 24px; z-index: 25; width: 44px; height: 44px; padding: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; background: var(--gb-bg); border-color: var(--gb-border); color: var(--text); box-shadow: var(--gb-shadow), var(--shadow-lg); backdrop-filter: blur(10px); }
.to-top:hover:not(:disabled) { background: var(--gb-bg); filter: brightness(1.1); }
.to-top[hidden] { display: none; }
/* Admin tab "Доступ" and the no-access page */
table.acc tr.acc-off td { color: var(--muted); }
table.acc tr.acc-hidden td { opacity: .6; }
.acc-show { margin: 0; align-items: center; }
table.acc .actions-cell button { margin-left: 4px; }
table.acc select { width: auto; margin-top: 0; padding: 4px 8px; }
.acc-add { margin-top: 20px; }
.acc-add input { max-width: 420px; }
.acc-found { list-style: none; padding: 0; margin: 8px 0; max-width: 720px; }
.acc-found li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.noaccess { max-width: 640px; margin: 48px auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 24px 32px; box-shadow: var(--shadow); }
/* Manager workspace */
.mgr-q { width: 220px !important; margin-top: 0 !important; }
.mgr-tenant { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 20px 16px; margin: 0 0 16px; box-shadow: var(--shadow); }
.mgr-tenant h2 { margin: 4px 0; }

.mgr-pin, .mgr-move { padding: 5px 7px; line-height: 1; color: var(--muted); display: inline-flex; align-items: center; }
.mgr-pin svg { display: block; transform: rotate(45deg); }
.mgr-pin.on { color: var(--brand); border-color: var(--brand); }
.mgr-pin.on svg { transform: none; }
.mgr-move { font-size: 13px; min-width: 28px; justify-content: center; }
.mgr-body { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; align-items: start; }
.mgr-notes { position: sticky; top: calc(var(--head-h) + 8px); display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.mgr-notes label { margin: 0; font-weight: 600; }
.mgr-note { width: 100%; min-height: 140px; resize: vertical; font: inherit; font-size: 13px; line-height: 18px; padding: 8px 10px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); }
.mgr-note:focus { outline: 1px solid var(--ring); outline-offset: 0; }
@media (max-width: 1180px) { .mgr-body { grid-template-columns: 1fr; } .mgr-notes { position: static; } }
.mgr-co { list-style: none; margin: 4px 0 8px; padding: 0; }
.mgr-co li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.mgr-co li:last-child { border-bottom: none; }
.mgr-co a { color: var(--text); text-decoration: none; }
.mgr-co a:hover { color: var(--link); text-decoration: underline; }
.mgr-co .badge { margin-left: 6px; }
.mgr-agr { margin-left: 8px; font-size: 13px; }
.mgr-tid { font-family: ui-monospace, Consolas, monospace; font-size: 12px; user-select: all; color: var(--text); }
.mgr-edit { border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; margin: 8px 0 12px; background: var(--bg); }
.mgr-co-pick .bar { margin-bottom: 6px; }
.mgr-co-q { width: 220px !important; margin-top: 0 !important; }
.mgr-co-list { max-height: 240px; overflow-y: auto; border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; background: var(--panel); columns: 2 260px; }
.mgr-co-opt { margin: 2px 0; break-inside: avoid; }
/* Menu tree on the left: companies; the chosen one opens its sections (sub-items indented) */
main:has(> #view-manager:not([hidden])) { max-width: 1560px; }
.mgr-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 4px; }
.mgr-content { grid-column: 2; min-width: 0; }
.mgr-tree { display: block; grid-column: 1; gap: 0;   /* the header's global `nav` rule (flex, column 2) must not apply here */
  position: sticky; top: calc(var(--head-h) + 8px); max-height: calc(100vh - var(--head-h) - 16px); overflow-y: auto; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 8px; box-shadow: var(--shadow); }
.mgr-tree ul { list-style: none; margin: 0; padding: 0; }
.mgr-tree li.open > ul { margin: 2px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.mgr-tree button { display: flex; align-items: center; gap: 6px; width: 100%; margin: 1px 0; padding: 6px 8px; border: 0; border-radius: 6px;
  background: none; box-shadow: none; color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.mgr-tree button:hover { background: var(--chip); }
.mgr-tree button:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.mgr-tree .tree-t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.mgr-tree .tree-caret { width: 12px; flex: none; color: var(--muted); font-size: 11px; }
.mgr-tree .tree-pin { color: var(--brand); flex: none; }
.mgr-tree .tree-pin svg { width: 12px; height: 12px; display: block; }
.mgr-tree .tree-co { font-weight: 600; }
.mgr-tree .tree-co.on { color: var(--brand); }
.mgr-tree .tree-sec .tree-item { padding-left: 26px; }
.mgr-tree .tree-sub .tree-item { padding: 4px 8px 4px 42px; font-size: 13px; color: var(--muted); }
.mgr-tree .tree-item.on { background: var(--brand-soft); color: var(--text); font-weight: 600; box-shadow: inset 3px 0 0 var(--brand); }
.mgr-tree .badge { font-size: 11px; padding: 0 6px; flex: none; white-space: nowrap; }
.mgr-tree .tree-n { font-size: 12px; color: var(--muted); flex: none; font-variant-numeric: tabular-nums; }
.mgr-sec-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 10px 0 8px; }
.mgr-sec-h h3 { margin: 0; font-size: 18px; }
.mgr-month-chg { margin-top: 6px; }
.mgr-month-chg > h4, .mgr-send > h4 { margin: 0 0 6px; }
.mgr-send { margin-top: 14px; }
/* Right column under the notes: the letter for the month and the client's answers log */
.mgr-side-month:not(:empty) { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.mgr-side-month .mgr-send { margin-top: 0; }
.mgr-side-month .mgr-send > button { width: 100%; justify-content: center; margin: 6px 0 4px; }
.mgr-side-month .mgr-send p { margin: 4px 0 0; }
.mgr-side-month .mgr-sent { font-size: 12px; line-height: 17px; margin: 6px 0; padding: 6px 10px; }
.mgr-side-month .mgr-month-comment { display: block; margin-top: 10px; }
.mgr-side-month .mgr-month-comment textarea { font-size: 12px; line-height: 17px; font-weight: 400; resize: vertical; }
.mgr-notes { max-height: calc(100vh - var(--head-h) - 16px); overflow-y: auto; padding: 4px 4px 6px; }   /* room for the highlight ring: the column clips what sticks out */
@media (max-width: 1180px) { .mgr-notes { max-height: none; overflow: visible; } }
@keyframes mgr-flash { from { box-shadow: 0 0 0 2px var(--brand); } to { box-shadow: 0 0 0 2px transparent; } }
.flash { animation: mgr-flash 1.6s ease-out; border-radius: 8px; }
@media (max-width: 900px) {
  .mgr-layout { grid-template-columns: 1fr; }
  .mgr-tree { position: static; max-height: none; }
  .mgr-tree, .mgr-content { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) { .flash { animation: none; } }
.mgr-sep { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 8px 0; }
.mgr-tenant .table-wrap { box-shadow: none; }
table.mgr-lic td.num, table.mgr-lic th.num { text-align: right; width: 90px; font-variant-numeric: tabular-nums; }
table.mgr-lic tr.lic-off > td { background: var(--bad-bg); }
table.mgr-lic tr.lic-warn > td { background: var(--warn-bg); }
/* Licence selected for the client's Excel: the whole row in the brand colour, so the choice is unmistakable */
table.mgr-lic tbody tr { cursor: pointer; }
table.mgr-lic th.pick, table.mgr-lic td.pick { width: 76px; text-align: center; white-space: nowrap; }
table.mgr-lic td.pick input { accent-color: var(--brand); width: 18px; height: 18px; margin: 2px 0 0; cursor: pointer; }
table.mgr-lic tr.mgr-picked > td { background: var(--brand-soft); }
table.mgr-lic tr.mgr-picked > td:first-child { box-shadow: inset 4px 0 0 var(--brand); }
table.mgr-lic tbody tr:not(.mgr-picked) > td:not(.pick) { opacity: .6; }
table.mgr-lic tbody tr:hover > td { filter: brightness(.97); }
/* Fixed layout: long licence names wrap instead of widening the table (no horizontal scroll) */
table.mgr-lic { table-layout: fixed; min-width: 800px; }   /* «Продукт» never narrower than ~220px; narrower windows scroll */
@media (max-width: 900px) {
  table.mgr-lic { min-width: 640px; }
  table.mgr-lic th.num, table.mgr-lic td.num { width: 70px !important; }
  table.mgr-lic th.term-h, table.mgr-lic td.term { width: 118px !important; }
  table.mgr-lic th.status-h { width: 100px !important; }
}
table.mgr-lic td { overflow-wrap: anywhere; }
table.mgr-lic th { white-space: nowrap; }
table.mgr-lic th.num, table.mgr-lic td.num { width: 88px; padding-left: 4px; padding-right: 8px; }
table.mgr-lic th.term-h, table.mgr-lic td.term { width: 138px; }
table.mgr-lic th.status-h { width: 118px; }
table.mgr-lic td.term { font-variant-numeric: tabular-nums; }
table.mgr-lic select.mgr-term { width: 100%; max-width: 100%; margin-top: 4px; padding: 2px 4px; font-size: 12px; }
table.mgr-lic .badge { white-space: normal; }
.mgr-az { margin-top: 0; }
.mgr-az > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
table.mgr-azure td.num, table.mgr-azure th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mgr-users { margin-top: 0; }
.mgr-users > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.mgr-users .bar { margin: 4px 0; }
.mgr-users-q { width: 240px !important; margin-top: 0 !important; }
table.mgr-pivot th, table.mgr-pivot td { padding: 6px 8px; font-size: 13px; }
table.mgr-pivot th.lic-col { max-width: 120px; white-space: normal; text-align: center; font-size: 12px; line-height: 15px; vertical-align: bottom; }
table.mgr-pivot td.lic-col { text-align: center; font-weight: 600; }
table.mgr-pivot .lic-col.picked { background: color-mix(in srgb, var(--brand-soft) 60%, transparent); }
/* Pivot scrolls inside its own box: the licence header and the current company band stay on top. */
.mgr-pivot-wrap { max-height: 75vh; overflow: auto; }
table.mgr-pivot { border-collapse: separate; border-spacing: 0; }
/* The whole header (licence names + «Итого») sticks; the company band sticks right under it (--ph = header height). */
table.mgr-pivot thead { position: sticky; top: 0; z-index: 3; }
table.mgr-pivot thead th { background: var(--panel); }
table.mgr-pivot tr.u-total-head td { border-bottom: 1px solid var(--line); }
table.mgr-pivot thead th.lic-col.picked { background: var(--brand-soft); color: var(--text); }
table.mgr-pivot tr.u-off td { color: var(--muted); }
table.mgr-pivot tr.u-group td { background: var(--chip); font-weight: 600; border: none; position: sticky; top: var(--ph, 48px); z-index: 2; }
table.mgr-pivot tr.u-group td.lic-col.picked { background: color-mix(in srgb, var(--brand-soft) 70%, var(--chip)); }
table.mgr-pivot tr.u-total td { background: var(--chip); font-weight: 700; border: none; }
table.mgr-pivot tr.u-total td.lic-col.picked { background: color-mix(in srgb, var(--brand-soft) 70%, var(--chip)); }
.mgr-seats { margin-top: 0; }
.mgr-seats > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.mgr-seats-mode { display: flex; gap: 20px; flex-wrap: wrap; margin: 4px 0 10px; }
.mgr-seats-mode label { margin: 0; }
.mgr-seat-facts { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.mgr-seat-facts > div { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; min-width: 150px; display: flex; flex-direction: column; gap: 2px; background: var(--panel); }
.mgr-seat-facts strong { font-size: 20px; line-height: 26px; }
.mgr-seat-facts input.mgr-paid { width: 110px; margin-top: 0; font-size: 16px; font-weight: 600; }
table.mgr-seat-list td.pick, table.mgr-seat-list th.pick { text-align: center; width: 110px; }
table.mgr-seat-list td.pick input { accent-color: var(--brand); width: 18px; height: 18px; }
table.mgr-seat-list tr.srv-on > td { background: color-mix(in srgb, var(--brand-soft) 55%, transparent); }
table.mgr-seat-list tr.u-off > td { color: var(--muted); }
.mgr-ticket-p { width: 90px !important; margin: 0 !important; padding: 2px 8px !important; font-size: 12px; }
.mgr-paste { margin-top: 10px; }
.mgr-paste > summary { cursor: pointer; font-weight: 500; }
.mgr-paste textarea { width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: 12px; padding: 6px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--text); }
.mgr-paste .actions { justify-content: space-between; align-items: center; }
.mgr-rules { margin-top: 0; }
.mgr-rules > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
table.mgr-rules-t td, table.mgr-rules-t th { padding: 4px 6px; font-size: 13px; }
table.mgr-rules-t select, table.mgr-rules-t input { width: 100%; margin-top: 0; padding: 4px 6px; font-size: 13px; }
table.mgr-rules-t button { padding: 3px 9px; margin-left: 2px; }
.mgr-sugg { list-style: none; margin: 4px 0 8px; padding: 0; font-size: 13px; }
.mgr-sugg li { padding: 4px 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mgr-sugg button { padding: 2px 10px; font-size: 12px; }
.mgr-ent-row select, select.mgr-ent { width: auto; max-width: 240px; margin-top: 4px; padding: 2px 6px; font-size: 12px; }
.mgr-new-ent { font-size: 13px; }
.mgr-new-ent.undet { color: var(--bad); font-weight: 600; }
.c-warn { color: var(--bad); }
button.on { border-color: var(--brand); }
.mgr-month { margin-top: 0; }
.mgr-month > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.mgr-month-bar { margin: 6px 0 10px; }
.mgr-month-bar select { width: auto; margin-top: 0; }
.mgr-month-status { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 500; }
.mgr-changes h4 { margin: 10px 0 4px; font-size: 13px; }
.mgr-changes ul { margin: 0; padding-left: 4px; list-style: none; }
.mgr-changes li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 3px 0; }
.chg { font-weight: 700; }
.chg.plus { color: var(--ok); }
.chg.minus { color: var(--bad); }
.mgr-ticket { width: 110px !important; margin: 0 !important; padding: 2px 8px !important; font-size: 12px; }
.mgr-excel { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--panel); }
.mgr-excel h4 { margin: 0 0 6px; }
table.mgr-excel-t { margin-bottom: 8px; }
table.mgr-excel-t td, table.mgr-excel-t th { padding: 5px 8px; font-size: 13px; }
table.mgr-excel-t select { width: auto; max-width: 420px; margin-top: 0; padding: 3px 8px; }
/* Licence rules: a licence not shown to the client is greyed and struck through */
table.mgr-licmap-t { margin-bottom: 2px; }
table.mgr-licmap-t tr.lm-off td:first-child { color: var(--muted); text-decoration: line-through; }
.mgr-licmap-t + p { margin: 0 0 12px; }
.mgr-excel .bar { align-items: flex-start; }
.mgr-excel .bar .small { flex: 1; min-width: 260px; }
.mgr-month-comment { margin-top: 10px; font-weight: 500; }
.mgr-month-comment textarea { width: 100%; font: inherit; font-size: 13px; padding: 6px 10px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--text); }
/* FAQ dialog */
dialog.faq { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow-y: auto; }
.faq details { border-top: 1px solid var(--line); padding: 10px 0; }
.faq details > summary { cursor: pointer; font-weight: 600; }
.faq h2:focus { outline: none; }
.faq summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.faq details > summary::marker { color: var(--brand); }
.faq details[open] > summary { margin-bottom: 6px; }
.faq ul, .faq ol { margin: 0; padding-left: 20px; }
.faq li { margin: 4px 0; }
.faq p { margin: 4px 0; }
.faq .table-wrap { margin: 8px 0; box-shadow: none; border-radius: 8px; }
.faq-cost th, .faq-cost td { font-size: 13px; line-height: 18px; padding: 8px 10px; }
.faq-cost td:first-child { width: 28%; font-weight: 500; }
.faq-cost td:last-child { width: 18%; white-space: normal; }
.faq code { font-size: 12px; background: var(--chip); padding: 1px 5px; border-radius: 4px; }

.steps .detail { display: block; color: var(--muted); font-size: 12px; line-height: 16px; word-break: break-word; }

/* Pipeline status */
.usage .bar { margin: 0 0 4px; }
.usage .bar h2 { margin: 0; }
#pipe select { font: inherit; padding: 4px 8px; margin: 0; width: auto; max-width: 100%; }
#pipe a { color: var(--link); }
.stages { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 8px 0; }
.stage { border: 1px solid var(--line); border-top: 3px solid var(--line); border-radius: 8px; padding: 8px 12px; min-width: 0; }
.stage.ok { border-top-color: var(--ok); }
.stage.warn { border-top-color: var(--warn); }
.stage.bad { border-top-color: var(--bad); }
.stage.run { border-top-color: var(--info); }
.stage-h { margin-bottom: 6px; }
.jobs, .tasks, .issues { list-style: none; margin: 0; padding: 0; }
.jobs > li { margin: 4px 0; }
.job summary { cursor: pointer; }
.tasks { margin: 4px 0 4px 18px; font-size: 13px; }
.tasks li { margin: 2px 0; overflow-wrap: anywhere; }
.issues { margin: 2px 0 4px 18px; font-size: 12px; }
.issues .err { max-width: none; }
.issues .wrn { color: var(--text); overflow-wrap: anywhere; }
.issues .wrn::before { content: "! "; color: var(--warn); font-weight: 700; }
.stage.run .stage-h, .job.run > details > summary { color: var(--info); }
.meter { display: flex; }
.meter-fill.other { background: var(--muted); opacity: .45; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 2px; vertical-align: -1px; }
.key.ours { background: var(--ok); }
.key.other { background: var(--muted); opacity: .45; }

/* Comparison: export card, fixes, settings */
.export-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 24px; margin: 0 0 16px; box-shadow: var(--shadow); }
.export-card h2 { margin: 0; }
.export-card p { margin: 4px 0; }
.export-card a, .fix a, .manual-next a { color: var(--link); }
#cmp-fixes { margin: 16px 0; }
.fixlist { margin: 6px 0 10px; padding-left: 20px; }
.fixlist li { margin: 2px 0; }
.fix { border: 1px solid var(--line); background: var(--panel); padding: 8px 12px; border-radius: 8px; margin: 4px 0 10px; }
.fix > div { margin: 2px 0; }
.fix-grant, .fix-exo, .fix-manual { background: var(--info-bg); }
.fix-licence, .fix-retry { background: var(--warn-bg); }
.fix-role, .fix-bug { background: var(--bad-bg); }
.cmp-detail h4 { margin: 10px 0 4px; font-size: 13px; }
/* Settings diff: fixed columns, every cell wraps (long lists, e-mails, IDs never spill into the next column) */
table.cmp.settings { table-layout: fixed; width: 100%; }
table.cmp.settings col.col-inst { width: 200px; }   /* inst + prop + rec = SET_FIXED (610) in compare.js */
table.cmp.settings col.col-prop { width: 240px; }
table.cmp.settings col.col-rec { width: 170px; }
/* Recommendation check per tenant value and the explanation rows */
table.settings td.rec-ok { background: var(--ok-bg); }
table.settings td.rec-bad { background: var(--warn-bg); }
table.settings tr.dev-summary td { border-top: 2px solid var(--line); font-size: 12px; }
/* «ⓘ Подробнее ▾» under a property: a visible pill that opens the explanation row */
.prop-info { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; padding: 2px 10px; font-size: 12px; font-weight: 600; line-height: 18px;
  border: 1px solid var(--brand); border-radius: 999px; background: none; box-shadow: none; color: var(--brand); cursor: pointer; }
.prop-info:hover, .prop-info.open { background: var(--gb-bg-h); color: var(--text); font-weight: 600; box-shadow: var(--gb-shadow), inset 0 0 0 1px color-mix(in srgb, var(--text) 28%, transparent); }
.prop-short { margin-top: 2px; font-family: inherit; }
tr.prop-explain > td { background: var(--bg); }
.explain { font-size: 13px; line-height: 1.5; }
.explain > div { margin: 3px 0; }
.explain a { color: var(--link); }
.res-explain { margin: 8px 0 4px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.res-explain > summary { cursor: pointer; }
code.api { display: inline-block; max-width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; background: var(--chip); padding: 1px 6px; border-radius: 4px; }
table.cmp.settings td, table.cmp.settings th, table.cmp.inner td { white-space: normal; overflow-wrap: break-word; }
table.settings td.val { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
table.settings code { font-size: 12px; }
.code-wrap { position: relative; }
.code-wrap pre { background: var(--chip); border: 1px solid var(--line); border-radius: 8px; padding: 12px; font-size: 12px; overflow-x: auto; max-height: 320px; white-space: pre; }
.code-wrap .copy { position: absolute; top: 6px; right: 6px; font-size: 12px; padding: 2px 8px; }
#dlg-access, #dlg-add:has(#steps-next:not([hidden])) { width: min(760px, calc(100vw - 32px)); }
.manual-next h3 { font-size: 16px; line-height: 24px; margin: 12px 0 6px; }

.actions-cell { white-space: nowrap; }
.actions-cell button { padding: 5px 10px; font-size: 13px; }
/* Сравнение: the legend and «Свернуть / Развернуть все» right above the list of modules */
.cmp-listbar { display: flex; align-items: flex-end; gap: 16px; margin: 8px 0 6px; }
.cmp-listbar .legend { flex: 1; margin: 0; }
.cmp-listbar #btn-cmp-fold { flex: none; white-space: nowrap; }
@media (max-width: 700px) { .cmp-listbar { flex-direction: column; align-items: flex-end; } }
/* Сравнение: module numbers, recommendation highlight (red — deviations, green — compared settings as recommended), jump */
.cmp-first { display: flex; align-items: flex-start; gap: 8px; }
.cmp-num { display: inline-block; flex: none; min-width: 2.4em; color: var(--muted); font-size: 12px; line-height: 20px; font-variant-numeric: tabular-nums; text-align: right; margin-right: 8px; }
.cmp-first .cmp-num { margin-right: 0; }
tr.cmp-row > td:first-child { box-shadow: inset 3px 0 0 transparent; }
tr.cmp-row.rec-row-bad > td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
tr.cmp-row.rec-row-ok > td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
td.rec-t-bad, .cmp-tile.rec-t-bad { background: color-mix(in srgb, var(--bad-bg) 75%, transparent); }
td.rec-t-ok, .cmp-tile.rec-t-ok { background: color-mix(in srgb, var(--ok-bg) 60%, transparent); }
.cmp-card.rec-row-bad { box-shadow: inset 3px 0 0 var(--bad); }
.cmp-card.rec-row-ok { box-shadow: inset 3px 0 0 var(--ok); }
.cmp-group > summary .badge { margin-left: 8px; }
button.cmp-go { padding: 1px 9px; margin-right: 8px; font-size: 12px; font-variant-numeric: tabular-nums; }
.rec-list { list-style: none; padding-left: 0; }
.rec-list li { display: flex; align-items: baseline; gap: 4px 8px; flex-wrap: wrap; padding: 3px 0; }
.rec-list .cmp-name { display: inline; }
.rec-list button.cmp-go { margin-right: 0; }
#cmp-fixes h2 .badge { vertical-align: middle; margin-left: 6px; }
@keyframes cmp-hit { from { background: var(--brand-soft); } to { background: transparent; } }
tr.cmp-hit > td, .cmp-card.cmp-hit { animation: cmp-hit 2.2s ease-out; }
tr.cmp-row { scroll-margin-top: calc(var(--head-h) + 12px); }
.cmp-card { scroll-margin-top: calc(var(--head-h) + 12px); }
@media (prefers-reduced-motion: reduce) { tr.cmp-hit > td, .cmp-card.cmp-hit { animation: none; } }
/* ── Phones and narrow windows (24.11.2026): the manager's essentials first ── */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }   /* iOS must not enlarge text in some blocks only */
.mgr-main, .mgr-notes { min-width: 0; }                             /* wide tables scroll inside, the card stays on screen */
.mgr-excel { overflow-x: auto; }
.tree-co-select { display: none; }
@media (max-width: 900px) {
  .mgr-tree { padding: 10px; }
  .tree-co-select { display: block; width: 100%; margin: 0 0 8px; font: inherit; font-weight: 600; padding: 8px 10px; border-radius: 8px;
    border: 1px solid var(--gb-border); background: var(--gb-bg); color: var(--text); }
  .mgr-tree > ul > li:not(.open) { display: none; }
  .mgr-tree .tree-co { display: none; }
  .mgr-tree li.open > ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; border: none; }
  .mgr-tree li.open > ul > li { display: contents; }
  .mgr-tree .tree-sec .tree-item, .mgr-tree .tree-sub .tree-item { width: auto; padding: 5px 10px; margin: 0; font-size: 13px; color: var(--text);
    border: 1px solid var(--gb-border); border-radius: 999px; background: var(--gb-bg); box-shadow: var(--gb-shadow); }
  .mgr-tree .tree-item.on { background: var(--gb-bg-h); color: var(--text); font-weight: 600; box-shadow: var(--gb-shadow), inset 0 0 0 1px color-mix(in srgb, var(--text) 28%, transparent); border-color: var(--gb-border); }

  .mgr-tree .tree-n { display: none; }
}
@media (max-width: 700px) {
  .hint { display: none !important; }
  main { padding: 12px 10px; }
  .mgr-tenant { padding: 10px 12px 14px; }
  .mgr-tenant > .bar > .muted.small { flex-basis: 100%; }           /* alias · tenant ID on its own line */
  .mgr-tenant .mgr-tid { word-break: break-all; }
  #view-manager > .bar h1 { font-size: 20px; line-height: 28px; flex-basis: 100%; }
  .mgr-q { width: auto !important; flex: 1; }
  .mgr-sec-h h3 { font-size: 17px; }
  .mgr-tenant, .mgr-tenant table, .mgr-side-month .mgr-sent, .mgr-side-month .mgr-month-comment textarea { font-size: 13px; line-height: 18px; }
  .mgr-note { font-size: 13px; }
  /* «Excel для клиента»: one card per row instead of a table */
  .mgr-excel { overflow-x: visible; padding: 10px 12px; }
  .mgr-excel-t thead { display: none; }
  .mgr-excel-t, .mgr-excel-t tbody, .mgr-excel-t tr, .mgr-excel-t td { display: block; width: 100%; }
  .mgr-excel-t tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
  .mgr-excel-t td { padding: 2px 0; border: none; }
  .mgr-excel-t select { width: 100% !important; max-width: 100% !important; }
  .mgr-excel .bar > button { width: 100%; }
}
/* «Режим менеджера» is gone (24.11.2026) */
#btn-mode { display: none !important; }
/* Menu: the «↳ section:» line exists for phones only */
.tree-break { display: none; }
@media (max-width: 900px) {
  /* sub-items: only those of the open section, in their own row under «↳ Section:», as text, not as buttons */
  .mgr-tree li.tree-sub:not(.show) { display: none; }
  .mgr-tree li.open > ul > li.tree-break { display: block; order: 1; flex-basis: 100%; margin-top: 4px; padding: 6px 2px 0; border-top: 1px dashed var(--line);
    font-size: 12px; color: var(--muted); }
  .mgr-tree li.tree-sub.show > button { order: 2; }
  .mgr-tree .tree-sub .tree-item { border: none; background: none; box-shadow: none; padding: 4px 8px; font-size: 13px; color: var(--muted); border-radius: 6px; }
  .mgr-tree .tree-sub .tree-item.on { color: var(--text); font-weight: 600; box-shadow: none; background: none;
    text-decoration: underline 2px; text-underline-offset: 5px; }
  .mgr-tree .tree-sec.tree-open .tree-item:not(.on) { box-shadow: var(--gb-shadow), inset 0 0 0 1px color-mix(in srgb, var(--text) 22%, transparent); }
}
/* Phones: logo, who is online, kitten / theme / sign out — one glass bar; it slides away on scrolling down
   and comes back on scrolling up (theme.js); «Обучение», FAQ and the e-mail stay on the computer */
@media (max-width: 700px) {
  .top { display: grid; grid-template-columns: auto 1fr; gap: 8px; padding: 8px 10px; transition: transform .3s cubic-bezier(.4, 0, .2, 1); }
  .top.head-hidden { transform: translateY(calc(-100% - 8px)); }
  .top::before { content: ''; grid-row: 1; grid-column: 1 / -1; align-self: stretch; border-radius: 14px; border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
    background: linear-gradient(135deg, var(--glass-b), var(--glass-a) 45%, var(--glass-b));
    backdrop-filter: blur(20px) saturate(1.8); -webkit-backdrop-filter: blur(20px) saturate(1.8); }
  .top > .brand, .top > .user { grid-row: 1; position: relative; z-index: 1; background: none; border: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; height: 52px; }
  .top > .brand::before, .top > .user::before { display: none; }
  .top > .brand { grid-column: 1; padding: 6px 4px 6px 12px; }
  .top > .brand .logo { height: 28px; max-width: 112px; }
  .top > .user { grid-column: 2; justify-self: end; flex-wrap: nowrap; gap: 0; padding: 0 6px 0 0; }
  .top > nav { grid-row: 2; grid-column: 1 / -1; width: auto; order: initial; }
  .top #btn-tutor, .top #btn-faq, .top #who { display: none !important; }
  .top .facepile { padding: 4px; }
  .top #btn-logout { padding: 6px 8px; }
}
@media (max-width: 700px) and (prefers-reduced-motion: reduce) { .top { transition: none; } }
/* Tutorial (24.11.2026): a card in the middle — a screenshot with example data on top, the text under it */
dialog.tutor { width: min(780px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 20px 24px 16px; display: none; flex-direction: column; }
dialog.tutor[open] { display: flex; }
dialog.tutor::backdrop { background: rgb(15 17 22 / .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
dialog.tutor .tutor-body { min-height: 0; flex: 1; overflow-y: auto; }
.tutor-shot { margin: 0 0 14px; }
.tutor-shot img { display: block; width: 100%; height: auto; max-height: 46vh; object-fit: contain; object-position: left top;
  border-radius: 10px; border: 1px solid var(--line); background: hsl(220 14% 96%); box-shadow: var(--shadow); }
.tutor-shot figcaption { margin-top: 4px; font-size: 11px; color: var(--muted); text-align: right; }
@media (max-width: 700px) { dialog.tutor { padding: 14px 14px 12px; } .tutor-shot img { max-height: 34vh; } }
/* «Excel для клиента»: one size for every legal entity's button, one line — a long name scrolls inside the button
   (full name in the tooltip); «все юрлица одним файлом» stands out a little: bold, a thin ring, no fill */
button.xlsx-ent { display: flex; align-items: center; gap: 6px; width: 200px; max-width: 100%; height: 34px; padding: 0 14px; font-size: 13px; white-space: nowrap; overflow: hidden; }
button.xlsx-ent > span { display: block; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the name scrolls only while the pointer is over the button (manager.js sets --shift / --dur when it is too long) */
button.xlsx-ent.marq > span { overflow: visible; text-overflow: clip; text-align: left; animation: xlsx-marq var(--dur, 3s) ease-in-out .25s infinite alternate; }
@keyframes xlsx-marq { from { transform: translateX(0); } to { transform: translateX(var(--shift, 0)); } }
@media (prefers-reduced-motion: reduce) { button.xlsx-ent.marq > span { animation: none; overflow: hidden; text-overflow: ellipsis; } }
button.xlsx-all { height: 38px; padding: 0 20px; background: var(--gb-bg-h); box-shadow: var(--gb-shadow-h); }
@media (max-width: 700px) { button.xlsx-ent { width: 100%; } button.xlsx-all { width: 100%; } }
/* «Экспорт»: a small black-and-white Excel mark before the word */
svg.i-xls { flex: none; vertical-align: -2px; margin-right: 2px; }
button svg.i-xls { margin-right: 4px; }
button.xlsx-ent svg.i-xls { margin-right: 0; }
/* Tech domain, tenant ID: one click copies; «✓ скопировано» for a moment */
button.copy-chip { display: inline; padding: 0 3px; margin: 0; border: none; border-radius: 4px; background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
  font: inherit; color: var(--text); cursor: copy; transform: none !important; }
button.copy-chip:hover { background: var(--chip); box-shadow: none; }
button.copy-chip.mgr-tid { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
button.copy-chip.copied::after { content: ' ✓ скопировано'; font-family: "Exo 2", system-ui, sans-serif; font-size: 11px; color: var(--ok); }
/* Tutorial v3 (24.11.2026): a full-screen screenshot with demo data; the step's block stays bright in a hole of the
   shade, the card sits next to it and glides to the next block. The live page is not touched. */
dialog.tutor::backdrop { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.tut-stage { position: fixed; inset: 0; z-index: 900; overflow: hidden; background: rgb(12 13 17 / .88); }
.tut-img { position: absolute; display: block; border-radius: 10px; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); user-select: none; pointer-events: none; }
.tut-hole { position: absolute; border-radius: 12px; pointer-events: none; box-shadow: 0 0 0 9999px rgb(12 13 17 / .38);
  transition: left .4s cubic-bezier(.4, 0, .2, 1), top .4s cubic-bezier(.4, 0, .2, 1), width .4s cubic-bezier(.4, 0, .2, 1), height .4s cubic-bezier(.4, 0, .2, 1), box-shadow .4s; }
.tut-hole.on { box-shadow: 0 0 0 9999px rgb(12 13 17 / .62), 0 0 0 2px rgb(255 255 255 / .95), 0 0 28px 6px rgb(255 255 255 / .28); }
.tut-note { position: absolute; right: 18px; bottom: 10px; font-size: 11px; color: rgb(255 255 255 / .65); }
dialog.tutor.spot { position: fixed; inset: auto; margin: 0; width: min(440px, calc(100vw - 24px)); max-height: calc(100vh - 24px);
  transition: left .4s cubic-bezier(.4, 0, .2, 1), top .4s cubic-bezier(.4, 0, .2, 1); box-shadow: 0 18px 50px rgba(0, 0, 0, .45); }
dialog.tutor.spot .tutor-body { min-height: 0; }
dialog.tutor.spot .tutor-foot { justify-content: flex-end; }
dialog.tutor.spot .tutor-foot label { flex: 1 1 100%; }
@media (prefers-reduced-motion: reduce) { .tut-hole, dialog.tutor.spot { transition: none; } }