/* VentaPanel — интерфейс. Раскладка: меню слева, вкладки сверху, панель справа, белые карточки на светлом фоне. */

/* ---------- шрифт: IBM Plex Sans (SIL OFL 1.1, fonts/OFL.txt) ---------- */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-sans-cyrillic-500-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-latin-400-normal.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-sans-latin-500-normal.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-latin-600-normal.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- цвета и размеры ---------- */
:root {
  --bg: #edf2fc;          /* фон страницы, меню, правой панели */
  --bg2: #e0e8fa;         /* неактивная вкладка, выделенная строка, наведение */
  --card: #ffffff;
  --text: #222e42;
  --muted: #5d6f8f;
  --faint: #9aafd6;       /* подсказки под полями, неактивное */
  --line: #e0e8f9;        /* разделители */
  --line2: #c1d3f4;       /* круглые кнопки с обводкой */
  --inp-border: #bbcff4;
  --menu-border: #bcd0f3;
  --menu-sep: #c8d6f0;
  --search-border: #c3d0e3;
  --accent: #2d6fdb;
  --accent-ink: #ffffff;
  --focus: #4d68dc;
  --soft: #e0e8fa;        /* наведение на кнопку, выделение */
  --soft2: #edf2fc;       /* светлая кнопка, группа кнопок, заголовок секции */
  --hover: #f5f8fe;
  --sel: #e0e8fa;
  --th: #154093;          /* заголовок таблицы */
  --th-sep: #cdd1d6;
  --sort-bg: #e2e7f5;
  --chk-border: #0e131c;
  --chk-off: #b8c6e3;
  --disabled: #788fb8;
  --req: #d0614a;
  --ok: #03a9a8;   --ok-bg: #dff9fa;
  --warn: #e18e4c; --warn-ic: #f38c3e; --warn-bg: #fef0dd;
  --err: #ce4a89;  --err-bg: #fbeef4;
  --info: #4e68dc; --info-bg: #eef2fb;
  --run: #2d6fdb;
  --folder: #f7913f;
  --tooltip: #324463;
  --shadow: none;
  --shadow-pop: 0 4px 16px rgba(34, 46, 66, .08);
  --radius: 12px;
  --mono: ui-monospace, "Cascadia Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3 6 5 5 5-5' fill='none' stroke='%23222e42' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #12151f;
  --bg2: #232a3e;
  --card: #1b2030;
  --text: #e6e9f2;
  --muted: #9aa3b8;
  --faint: #6f7890;
  --line: #2a3043;
  --line2: #3a4766;
  --inp-border: #3a4766;
  --menu-border: #3a4766;
  --menu-sep: #343b52;
  --search-border: #3a4766;
  --accent: #6e9bf0;
  --accent-ink: #0d1020;
  --focus: #7f95f0;
  --soft: #2c3550;
  --soft2: #252c42;
  --hover: #222839;
  --sel: #26315a;
  --th: #a9bef0;
  --th-sep: #343b52;
  --sort-bg: #2c3550;
  --chk-border: #9aa3b8;
  --chk-off: #4a5577;
  --disabled: #6f7890;
  --req: #f08a74;
  --ok: #2cc3c1;   --ok-bg: #173a3f;
  --warn: #f0a15f; --warn-ic: #f0a15f; --warn-bg: #3d2f1e;
  --err: #e46aa5;  --err-bg: #3b2232;
  --info: #8a9cf3; --info-bg: #222b45;
  --run: #6e9bf0;
  --tooltip: #3a4766;
  --shadow-pop: 0 6px 24px rgba(0, 0, 0, .45);
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3 6 5 5 5-5' fill='none' stroke='%23e6e9f2' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/20px "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ic .fill { fill: currentColor; stroke: none; }
.ic .inv { stroke: #fff; stroke-width: 2; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); }
.hidden { display: none !important; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .45; } }

/* ---------- каркас ---------- */
.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr) 76px; height: 100vh; }
.shell.collapsed { grid-template-columns: 68px minmax(0, 1fr) 76px; }

.side { display: flex; flex-direction: column; padding: 20px 20px 12px 14px; min-height: 0; min-width: 0; background: var(--bg); }
.logo { display: flex; align-items: center; gap: 8px; height: 22px; margin: 0 0 29px; padding: 0 0 0 16px; font-weight: 600; font-size: 18px; line-height: 22px; white-space: nowrap; overflow: hidden; }
.logo span { overflow: hidden; text-overflow: ellipsis; }
.logo-mark { width: 22px; height: 22px; flex: none; }
.logo-mark rect { fill: var(--accent); }
.logo-mark path { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.side-tools { display: flex; gap: 8px; padding: 0 0 0 6px; margin: 0 0 16px; }
.round { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line2); background: transparent; display: grid; place-items: center; color: var(--text); position: relative; flex: none; padding: 0; }
.round .ic { width: 20px; height: 20px; }
.round:hover { border-color: var(--accent); }
.round.pinned { background: var(--bg2); border-color: var(--bg2); }
.menu { flex: 1; overflow-y: auto; overflow-x: hidden; margin-right: -12px; padding-right: 6px; position: relative; }
.menu.more-below { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent); }
/* тонкая полоса прокрутки, как в ISPmanager: бегунок 6 px без дорожки */
.menu::-webkit-scrollbar, .view::-webkit-scrollbar, .tbl-wrap::-webkit-scrollbar, .form-body::-webkit-scrollbar, .drawer-body::-webkit-scrollbar, .pop::-webkit-scrollbar { width: 6px; height: 6px; }
.menu::-webkit-scrollbar-thumb, .view::-webkit-scrollbar-thumb, .tbl-wrap::-webkit-scrollbar-thumb, .form-body::-webkit-scrollbar-thumb, .drawer-body::-webkit-scrollbar-thumb, .pop::-webkit-scrollbar-thumb { background: var(--inp-border); border-radius: 3px; }
.menu::-webkit-scrollbar-track, .view::-webkit-scrollbar-track, .tbl-wrap::-webkit-scrollbar-track, .form-body::-webkit-scrollbar-track, .drawer-body::-webkit-scrollbar-track, .pop::-webkit-scrollbar-track { background: transparent; }
@supports not selector(::-webkit-scrollbar) { .menu, .view, .tbl-wrap, .form-body, .drawer-body, .pop { scrollbar-width: thin; scrollbar-color: var(--inp-border) transparent; } }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 8px 16px 8px 16px; } /* x 30…220, как в interfejs/01 */
.mi { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; border: 0; background: none; padding: 0 12px 0 16px; border-radius: 18px; text-align: left; color: var(--text); white-space: nowrap; font-size: 14px; line-height: 20px; position: relative; }
.mi span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mi:hover { background: var(--card); }
.mi.active { background: linear-gradient(90deg, var(--card) 30%, transparent 100%); font-weight: 500; }
.mi .ic { width: 20px; height: 20px; color: var(--text); }
/* раскрытое меню: «таблетка» с x = 22, значок с 30, подпись с 56 (замер interfejs/01) */
.side .mi { margin-left: 8px; width: calc(100% - 8px); padding-left: 8px; gap: 8px; }
.side .mi > .ic { margin-left: -2px; }
.mi.active .ic { color: var(--accent); }
.mi .mi-ext { margin-left: auto; display: none; color: var(--text); padding: 2px; border-radius: 6px; }
.mi .mi-ext .ic { width: 18px; height: 18px; }
.mi:hover .mi-ext { display: grid; }
.mi .mi-ext:hover { color: var(--accent); }
.side-bottom { margin-top: 8px; padding-top: 9px; position: relative; }
.side-bottom::before { content: ""; position: absolute; top: 0; left: 16px; right: 10px; border-top: 1px solid var(--line); }

/* свёрнутое меню: колонка значков, при наведении раскрывается поверх содержимого */
@media (min-width: 761px) {
  .collapsed .side { padding: 20px 8px 12px 12px; position: relative; z-index: 60; width: 68px; }
  /* знак по центру на y = 28,5, как у ISPmanager (tekhnicheskaya-podderzhka__01_f000); поиск — по-прежнему с y = 68 */
  .collapsed .logo { height: 17px; margin: 0 0 31px; padding: 0 0 0 11px; }
  /* у свёрнутого меню полосы прокрутки нет (только затухание), при раскрытии наведением — есть */
  .shell.collapsed .side:not(:hover) .menu { scrollbar-width: none; }
  .shell.collapsed .side:not(:hover) .menu::-webkit-scrollbar { width: 0; }
  .collapsed .logo-mark { width: 14px; height: 14px; }
  .collapsed .logo span, .collapsed .mi span, .collapsed .mi .mi-ext { display: none; }
  .collapsed .side-tools { padding: 0; margin: 0 0 16px; }
  .collapsed .side-tools .round:not(:first-child) { display: none; }
  .collapsed .mi { width: 36px; padding: 0; justify-content: center; border-radius: 50%; }
  .collapsed .side .mi { margin-left: 0; }
  .collapsed .side .mi > .ic, .shell.collapsed .side:hover .mi > .ic { margin-left: 0; }
  .collapsed .mi.active { background: var(--card); }
  .collapsed .menu { margin-right: -8px; padding-right: 0; }
  .collapsed .menu hr { width: 16px; margin: 8px 0 8px 10px; }
  .collapsed .side-bottom::before { left: 10px; right: auto; width: 16px; }
  .shell.collapsed .side:hover { width: 242px; box-shadow: 4px 0 16px rgba(34, 46, 66, .08); border-radius: 0 12px 12px 0; }
  .shell.collapsed .side:hover .logo span, .shell.collapsed .side:hover .mi span:not(.mi-ext) { display: inline; }
  /* раскрытие наведением: значок с x = 22, подпись с 48 (tekhnicheskaya-podderzhka__01_f009) */
  .shell.collapsed .side:hover .mi { width: 100%; justify-content: flex-start; padding: 0 12px 0 8px; gap: 8px; border-radius: 18px; }
  .shell.collapsed .side:hover .mi.active { background: linear-gradient(90deg, var(--card) 30%, transparent 100%); }
  .shell.collapsed .side:hover .side-tools .round { display: grid; }
  .shell.collapsed .side:hover .menu { margin-right: -12px; padding-right: 6px; }
  .shell.collapsed .side:hover .menu hr { width: auto; margin: 8px 19px 8px 10px; }
  .shell.collapsed .side:hover .side-bottom::before { right: 19px; width: auto; }
  .shell.collapsed .side:hover .mi:hover .mi-ext { display: grid; }
}

.work { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 12px 0 0; }
.rail { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 20px; }
.rail .round.me { background: var(--card); border-color: var(--card); }
.rail .round.on { border-color: #2c7cd8; }
.rail .round.me.on { border-color: #2c7cd8; }
.imp-group { display: flex; flex-direction: column; gap: 8px; padding: 4px; margin: -4px; border-radius: 22px; background: #dfe6f7; }
:root[data-theme="dark"] .imp-group { background: var(--soft); }
.badge { position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--err); color: #fff; font-size: 11px; line-height: 17px; font-weight: 600; display: grid; place-items: center; }

/* ---------- вкладки: одна вкладка — одна цепочка «список › форма» ---------- */
.tabs { display: flex; gap: 8px; align-items: flex-end; height: 36px; padding: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; flex: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: flex; align-items: stretch; height: 36px; border-radius: 12px 12px 0 0; background: var(--bg2); min-width: 0; position: relative; flex: none; }
.tab .seg { display: flex; align-items: center; gap: 8px; width: 160px; padding: 0 12px 0 16px; border: 0; background: none; color: var(--text); white-space: nowrap; min-width: 0; font-size: 14px; font-weight: 400; border-radius: 12px 12px 0 0; position: relative; flex: none; }
.tab .seg span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tab .seg .ic { width: 20px; height: 20px; }
.tab .chev { width: 16px; flex: none; display: grid; place-items: center; }
.tab .chev::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid var(--text); border-top: 1.5px solid var(--text); transform: translateX(-2px) rotate(45deg); }
.tab.home .seg { width: 48px; padding: 0; justify-content: center; }
.tab.active .seg.cur { background: var(--card); }
.tab.active .seg.cur::before, .tab.active .seg.cur::after { content: ""; position: absolute; bottom: 0; width: 12px; height: 12px; pointer-events: none; }
.tab.active .seg.cur::before { left: -12px; background: radial-gradient(circle at 0 0, transparent 11.5px, var(--card) 12px); }
.tab.active .seg.cur::after { right: -12px; background: radial-gradient(circle at 100% 0, transparent 11.5px, var(--card) 12px); }
.tab.active { z-index: 1; }
.tab .close { position: absolute; right: 6px; top: 8px; width: 20px; height: 20px; border: 0; border-radius: 50%; background: none; color: var(--text); padding: 0; display: none; place-items: center; z-index: 2; }
.tab .close:hover { background: var(--bg2); }
.tab:not(.home):hover .close { display: grid; }
.tab:not(.home):hover .seg.cur { padding-right: 30px; }
.tab .close .ic { width: 14px; height: 14px; }
/* закреплённая вкладка: всегда видна булавка (нажатие — открепить), «×» нет */
.tab.pinned .close { display: grid; color: var(--accent); }
.tab.pinned .seg.cur, .tab.pinned .seg:last-of-type { padding-right: 30px; }

.views { flex: 1; min-height: 0; position: relative; }
.view { position: absolute; inset: 0; overflow-y: auto; padding: 0 0 14px; }
.view.first-tab-active > .card:first-child { border-top-left-radius: 0; }
.view.list-view, .view.form-view { display: flex; flex-direction: column; overflow: hidden; }
/* полоса прокрутки таблицы — в промежутке справа от карточек (setevye-sluzhby/01: бегунок в 3–8 px от карточки) */
.view.list-view { right: -8px; padding-right: 8px; }
/* главная и «Все разделы» прокручиваются целиком — полоса там же, ширина карточек не меняется */
.view:not(.list-view):not(.form-view) { right: -8px; padding-right: 2px; scrollbar-gutter: stable; }
.view.list-view.hidden, .view.form-view.hidden { display: none; }

/* ---------- карточки ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.head { padding: 20px 10px 20px 20px; flex: none; }
.head-row { display: flex; align-items: center; gap: 8px; min-height: 36px; }
/* кнопки справа от заголовка — с шагом 36 px (замер tekhnicheskaya-podderzhka__01_f000, perenos…01_f025) */
.head-row > .icon-btn + .icon-btn { margin-left: -8px; }
.dash-head .head-row > .icon-btn + .icon-btn { margin-left: -4px; }
.dash-head .head-row > .icon-btn:not(:last-child) .ic { width: 18px; height: 18px; } /* шестерёнка 16 px, как «⋮» */
.head h1, .form-head h1 { font-size: 24px; line-height: 36px; margin: 0; font-weight: 500; letter-spacing: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 0; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: none; display: grid; place-items: center; color: var(--text); flex: none; position: relative; padding: 0; }
.icon-btn:hover { background: var(--soft2); }
.icon-btn:disabled { color: var(--disabled); cursor: default; background: none; }
.close-circle, .back-circle { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--text); flex: none; padding: 0; }
.close-circle { border: 1px solid var(--inp-border); background: var(--card); }
.close-circle .ic { width: 24px; height: 24px; stroke-width: 1.4; } /* «×» 14 px, как в ISPmanager */
.close-circle:hover { border-color: #2c7cd8; }
.back-circle { border: 0; background: var(--soft2); margin-right: 2px; }
.back-circle:hover { background: var(--soft); }
.refresh-chip { height: 36px; padding: 0 12px; gap: 6px; border: 0; border-radius: 18px; background: var(--soft2); display: inline-flex; align-items: center; font-size: 14px; color: var(--text); flex: none; }
.refresh-chip:hover { background: var(--soft); }
.refresh-chip .ic { width: 18px; height: 18px; }

/* панель кнопок: круг поиска + группа-«таблетка» */
.toolbar { display: flex; align-items: center; gap: 8px; margin-top: 16px; height: 36px; flex-wrap: nowrap; }
.tb-search { display: inline-flex; align-items: center; height: 36px; width: 36px; border: 1px solid var(--search-border); border-radius: 18px; background: var(--card); flex: none; transition: width .15s ease-out; position: relative; }
.tb-search .ts-btn { width: 34px; height: 34px; border: 0; background: none; border-radius: 50%; display: grid; place-items: center; color: var(--text); padding: 0; flex: none; }
.tb-search input { width: 0; min-width: 0; flex: 1; border: 0; outline: 0; background: none; padding: 0; height: 34px; font-size: 14px; }
.tb-search .ts-x { display: none; width: 28px; height: 28px; border: 0; background: none; border-radius: 50%; place-items: center; color: var(--text); padding: 0; margin-right: 3px; flex: none; }
.tb-search .ts-x .ic { width: 16px; height: 16px; }
.tb-search .ts-x:hover { background: var(--soft2); }
.tb-search.open { width: 260px; }
.tb-search.open .ts-x { display: grid; }
.tb-search.open input { padding-right: 4px; }
.tb-search:focus-within { border-color: var(--focus); }
/* «Сортировка» и «Фильтр» между поиском и группой: круглые 36 px без обводки, счётчик — розовый кружок справа внизу */
.tb-ic { width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; display: grid; place-items: center; color: var(--text); padding: 0; flex: none; position: relative; }
.tb-ic:hover { background: var(--soft2); }
.tb-ic .cnt { position: absolute; right: 3px; bottom: 5px; min-width: 13px; height: 13px; padding: 0 3px; border-radius: 7px; background: var(--err-bg); color: var(--text); font-size: 10px; line-height: 13px; font-weight: 500; text-align: center; }
.tb-ic .cnt:empty { display: none; }
.tb-group { display: inline-flex; align-items: stretch; height: 36px; border-radius: 18px; background: var(--soft2); flex: none; }
.tb { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px; border: 0; border-radius: 0; background: none; color: var(--text); white-space: nowrap; font-size: 14px; position: relative; }
.tb-group > .tb + .tb { border-left: 1px solid var(--bg2); }
.tb-group > .tb:first-child { border-radius: 18px 0 0 18px; }
.tb-group > .tb:last-child { border-radius: 0 18px 18px 0; }
.tb-group > .tb:only-child { border-radius: 18px; }
.tb.icon { width: 49px; padding: 0; justify-content: center; } /* 48 px + разделитель: шаг 49, как в ISPmanager */
.tb.primary { padding-left: 14px; } /* «+» в 16 px от края группы */
.tb:hover:not(:disabled), .tb.open { background: var(--soft); }
.tb:disabled { color: var(--disabled); cursor: default; }
.tb .ic { width: 20px; height: 20px; color: currentColor; }
.tb.primary .ic { color: var(--accent); }
.tb.primary:disabled .ic { color: var(--disabled); }
.tb .ic-chev .ic, .tb .ic.chev { width: 16px; height: 16px; }
.tb .ic-chev { display: inline-grid; }
/* «Создать сайт ⌄»: шеврон — цветом текста, вплотную к подписи (toolbar-02) */
.tb.primary .ic-chev .ic { color: currentColor; }
.tb.primary .ic-chev { margin-left: -5px; } /* кнопка 162 px, как «Создать сайт ⌄» в perenos…01_f025 */
.tb.tb-more { padding-right: 14px; } /* «Ещё ⌄» — 83 px (эталон 80; разница — отрисовка шрифта) */

/* всплывающая подсказка */
[data-tip] { position: relative; }
/* подсказки data-tip и «?» (data-hint) — один элемент .tip-pop в <body>, место считает app.js (showTip): так их не
   обрезают прокручиваемые области и overflow: hidden у родителей, и они не уходят за края окна */
.tip-pop { position: fixed; z-index: 1000; max-width: calc(100vw - 16px); background: var(--tooltip); color: #fff; font-size: 14px; font-weight: 400; line-height: 20px; padding: 8px 12px; border-radius: 6px; white-space: nowrap; pointer-events: none; text-align: left; overflow-wrap: anywhere; }
.tip-pop.tip-hint { width: max-content; max-width: min(360px, calc(100vw - 16px)); white-space: pre-line; box-shadow: var(--shadow-pop); }
:root[data-theme="dark"] .tip-pop.tip-hint { box-shadow: 0 0 0 1px #4a5577, var(--shadow-pop); }

/* сообщения */
.notice { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 0; padding: 12px 16px; border-radius: 8px; background: var(--info-bg); color: var(--text); font-size: 14px; line-height: 20px; }
.notice > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.notice .ic { width: 20px; height: 20px; margin: 0 -2px; color: var(--info); }
.notice.warn { background: var(--warn-bg); }
.notice.warn .ic { color: var(--warn); }
.notice.err { background: var(--err-bg); }
.notice.err .ic { color: var(--err); }
.notice.ok { background: var(--ok-bg); }
.notice.ok .ic { color: var(--ok); }
.notice .notice-x { width: 20px; height: 20px; border: 0; background: none; padding: 0; color: var(--text); display: grid; place-items: center; border-radius: 50%; flex: none; }
.notice .notice-x .ic { width: 16px; height: 16px; margin: 0; color: var(--text); }
.head .notice { margin-right: 10px; }
.form-inner > .notice { margin: 0 0 20px; }
.tb-search input::-webkit-search-cancel-button { display: none; }

/* путь в менеджере файлов: строка над заголовком таблицы */
.pathbar { display: flex; align-items: center; gap: 8px; margin: 16px 0 0; height: 38px; padding: 0 12px 0 14px; background: var(--card); border-radius: 12px 12px 0 0; border-bottom: 1px solid var(--bg2); flex-wrap: nowrap; overflow: hidden; flex: none; }
.pathbar .icon-btn { width: 30px; height: 30px; }
.pathbar .crumbs { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; overflow: hidden; }
.pathbar .pb-acts { display: flex; align-items: center; gap: 6px; flex: none; margin-left: auto; }
.pathbar .pb-acts .icon-btn.on { color: var(--accent); }
.pathbar .path-inp { height: 30px; width: 100%; max-width: 640px; padding: 0 10px; border-radius: 8px; }
.crumb { border: 0; background: none; border-radius: 12px; padding: 2px 4px; font-size: 14px; color: var(--text); white-space: nowrap; }
.crumb:hover { background: var(--soft2); }
.crumb.cur { background: var(--soft2); padding: 2px 8px; }
.pathbar .slash { color: var(--text); }
.pathbar + .tbl-wrap { margin-top: 0; }
.pathbar + .tbl-wrap table.tbl { margin-top: -4px; }
.pathbar + .tbl-wrap .tbl thead th:first-child { border-top-left-radius: 0; }
.pathbar + .tbl-wrap .tbl thead th:last-child { border-top-right-radius: 0; }

/* ---------- таблица: каждая строка — отдельная белая полоса ---------- */
.tbl-wrap { margin-top: 12px; margin-right: -8px; padding: 0 2px 0 0; flex: 0 1 auto; min-height: 0; overflow: auto; scrollbar-gutter: stable; }
table.tbl { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0 4px; font-size: 14px; line-height: 20px; }
.tbl col.c-chk { width: 42px; }
.tbl col.c-more { width: 48px; }
.tbl col.c-switch { width: 120px; }
.tbl col.c-status { width: 180px; }
.tbl col.c-date { width: 170px; }
.tbl col.c-size { width: 110px; }
.tbl col.c-bool { width: 110px; }
.tbl col.c-bar { width: 200px; }
.tbl th, .tbl td { height: 38px; padding: 0 14px; background: var(--card); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.tbl th { text-align: left; font-weight: 400; color: var(--th); user-select: none; position: sticky; top: 0; z-index: 1; }
.tbl th + th::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 1px; background: var(--th-sep); }
.tbl th:last-child::before { display: none; }
.tbl th.sortable { cursor: pointer; }
.tbl th .sort { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-left: 6px; border-radius: 50%; background: var(--sort-bg); vertical-align: middle; color: var(--th); }
.tbl th .sort .ic { width: 16px; height: 16px; }
.tbl th .sort.desc .ic { transform: scaleY(-1); }
.tbl th:first-child, .tbl td:first-child { border-radius: 12px 0 0 12px; padding: 0 0 0 20px; }
.tbl th:last-child, .tbl td:last-child { border-radius: 0 12px 12px 0; padding: 0 12px 0 0; text-align: right; }
.tbl tr.row { cursor: default; }
.tbl tr.row:hover td { background: var(--hover); }
.tbl tr.row.sel td { background: var(--sel); }
.tbl td.mono { font-family: inherit; font-size: 14px; }
.mono { font-family: var(--mono); font-size: 13px; }
.cell-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cell-name .ic { color: var(--text); }
.cell-name .ic.folder-fill, .cell-name .ic.folder { color: var(--folder); }
.cell-name span { overflow: hidden; text-overflow: ellipsis; }
.chk { width: 16px; height: 16px; border-radius: 3px; border: 1px solid var(--chk-border); background: var(--card); display: inline-grid; place-items: center; vertical-align: middle; cursor: pointer; padding: 0; }
.chk.on, .chk.part { background: var(--accent); border-color: var(--accent); }
.chk.on::after { content: ""; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.chk.part::after { content: ""; width: 8px; height: 2px; background: #fff; }
.row-more { width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--text); display: inline-grid; place-items: center; padding: 0; vertical-align: middle; }
.row-more .ic { width: 22px; height: 22px; }
.row-more:hover { background: var(--soft2); }
/* состояния: значок + текст */
.st { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; vertical-align: middle; }
.st > span { overflow: hidden; text-overflow: ellipsis; }
.st .ic { width: 20px; height: 20px; color: var(--text); }
.st.ok .ic { color: var(--text); stroke-width: 1.4; }
.st.off .ic, .foot-chip.off .ic { stroke-width: 1.4; }
.foot-chip.ok .ic { stroke-width: 1.4; }
.st.warn .ic { color: var(--warn-ic); }
.st.err .ic { color: var(--err); }
.st.run .ic { color: var(--run); animation: spin 1.4s linear infinite; }
.st.wait .ic, .st.off .ic { color: var(--faint); }
/* переключатель «Состояние» */
.sw { position: relative; display: inline-block; width: 30px; height: 16px; border-radius: 8px; border: 1px solid var(--line2); background: transparent; vertical-align: middle; flex: none; }
.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); transition: left .15s; }
.sw.on { background: var(--accent); border-color: var(--accent); }
.sw.on::after { left: 16px; background: #fff; }
.pill { display: inline-block; padding: 0 8px; border-radius: 6px; background: var(--soft); font-size: 12px; line-height: 20px; font-weight: 500; }
.bar { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bar i { flex: 1; height: 6px; border-radius: 3px; background: var(--soft); overflow: hidden; position: relative; }
.bar i b { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--accent); }
.bar i b.warn { background: var(--warn); }
.bar i b.err { background: var(--err); }
.bar em { font-style: normal; color: var(--text); width: 38px; text-align: right; }
.list-foot { display: flex; gap: 16px; align-items: center; color: var(--text); font-size: 14px; line-height: 20px; padding: 4px 0 0; flex: none; min-width: 0; }
.list-foot .foot-note { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* счётчики по состояниям в подвале («✓ : 25», «— : 4»), как в ISPmanager */
.list-foot .foot-chips { display: flex; gap: 8px; flex: none; }
.foot-chip { display: inline-flex; align-items: center; gap: 2px; height: 24px; padding: 0 6px; border-radius: 4px; background: var(--bg2); color: var(--text); font-size: 14px; line-height: 20px; white-space: nowrap; }
.foot-chip .ic { width: 18px; height: 18px; color: var(--text); }
.foot-chip.warn .ic { color: var(--warn-ic); }
.foot-chip.err .ic { color: var(--err); }
.foot-chip.wait .ic, .foot-chip.off .ic { color: var(--faint); }
.list-foot .pager { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.list-foot .pager span { margin-right: 4px; }
.pg { width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--card); color: var(--text); display: grid; place-items: center; padding: 0; }
.pg .ic { width: 16px; height: 16px; }
.pg:hover:not(:disabled) { background: var(--bg2); }
.pg:disabled { color: var(--disabled); cursor: default; opacity: .6; }
.empty { min-height: 218px; margin-top: 4px; padding: 34px 20px 24px; background: var(--card); border-radius: 12px; text-align: center; color: var(--text); }
.empty b { display: block; font-weight: 600; line-height: 20px; }
.empty .fab { display: grid; place-items: center; width: 72px; height: 72px; margin: 32px auto 12px; border: 0; border-radius: 50%; background: var(--accent); color: #fff; padding: 0; }
.empty .fab:hover { filter: brightness(1.08); }
.empty .fab .ic { width: 32px; height: 32px; stroke-width: 1.3; }
.empty .cta { line-height: 20px; }
.empty .empty-note { margin-top: 8px; color: var(--muted); }
.empty.small { min-height: 0; padding: 24px 20px; }
.loading { color: var(--muted); padding: 30px; text-align: center; }
.skel { padding: 20px; }
.skel i { display: block; height: 36px; border-radius: 8px; background: var(--soft2); margin-top: 16px; animation: pulse 1.4s ease-in-out infinite; }
.skel i:first-child { width: 220px; margin-top: 0; }
.skel i.w { max-width: 400px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- формы ---------- */
.form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; max-width: none; }
.form-head { display: flex; align-items: center; gap: 8px; padding: 20px 10px 0 20px; flex: none; } /* «⋮» в 28 px от края карточки, как у списков */
.form-head h1 { padding-left: 0; }
/* полоса прокрутки всегда зарезервирована (8 px), бегунок 6 px в 2 px от края карточки — как в ISPmanager */
/* короткая форма: кнопки сразу под полями (osnovnoj-ssl-sertifikat-exim f037, interfejs/02 f320); длинная —
   тело прокручивается, подвал прижат к низу карточки с линией (tekhnicheskaya-podderzhka f015) */
.form-body { flex: 0 1 auto; min-height: 0; overflow-y: auto; padding: 32px 12px 10px 20px; scrollbar-gutter: stable; }
.form-body::-webkit-scrollbar { width: 8px; }
.form-body::-webkit-scrollbar-thumb { border-right: 2px solid transparent; background-clip: padding-box; }
.section { margin-bottom: 28px; }
.section:last-child { margin-bottom: 0; }
.section.hidden-if { display: none; }
.section-head { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 36px; border: 0; background: var(--soft2); border-radius: 18px; padding: 0 16px; font-weight: 500; font-size: 14px; text-align: left; color: var(--text); }
.section-head:hover { background: var(--soft); }
.section-head .ic { width: 18px; height: 18px; color: var(--text); transition: transform .15s; }
.section-head > span { display: grid; } /* шеврон по центру «таблетки», а не по базовой линии */
.section.closed .section-head .ic { transform: rotate(180deg); }
.section.closed .section-body { display: none; }
.section-body { padding: 20px 0 0; display: grid; gap: 28px; }
.section-body.untitled { padding-top: 0; }
.field { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.field.hidden-if { display: none; }
.field.cb { align-items: center; min-height: 20px; }
.field.cb + .field.cb { margin-top: -8px; }
.fbox { position: relative; flex: 0 1 400px; min-width: 0; max-width: 400px; }
.form.wide .fbox { flex: 1 1 auto; max-width: none; }
.fbox > label { position: absolute; left: 12px; top: -7px; padding: 0 4px; background: var(--card); font-size: 12px; font-weight: 400; color: var(--text); line-height: 14px; z-index: 2; border-radius: 3px; max-width: calc(100% - 24px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; transition: top .12s, font-size .12s; }
.fbox:has(> .inp:placeholder-shown:not(:focus)) > label { top: 9px; font-size: 14px; line-height: 18px; background: transparent; }
.fbox:has(> .inp[readonly]) > label, .fbox:has(> select.inp:disabled) > label { background: var(--soft2); }
.req { color: var(--req); font-size: 11px; line-height: 10px; vertical-align: top; margin-left: 1px; }
.inp { width: 100%; height: 36px; border: 1px solid var(--inp-border); border-radius: 8px; background: var(--card); padding: 0 15px; outline: 0; font-size: 14px; color: var(--text); }
.inp:focus { border: 2px solid var(--focus); padding: 0 14px; }
.inp::placeholder { color: var(--faint); opacity: 1; }
.inp:not(:focus)::placeholder { color: transparent; }
input.inp[type=number] { -moz-appearance: textfield; appearance: textfield; }
input.inp[type=number]::-webkit-inner-spin-button, input.inp[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
textarea.inp { height: auto; min-height: 72px; padding: 9px 15px; resize: vertical; line-height: 20px; display: block; }
textarea.inp:focus { padding: 8px 14px; }
/* пустое поле: невидимый пример (placeholder) не даёт полосу прокрутки; полоса — тонкая, как везде */
textarea.inp:placeholder-shown:not(:focus) { overflow: hidden; }
textarea.inp::-webkit-scrollbar { width: 6px; height: 6px; }
textarea.inp::-webkit-scrollbar-thumb { background: var(--inp-border); border-radius: 3px; }
textarea.inp::-webkit-scrollbar-track, textarea.inp::-webkit-scrollbar-corner { background: transparent; }
textarea.inp.code { font-family: var(--mono); font-size: 13px; line-height: 20px; white-space: pre; tab-size: 4; min-height: 190px; }
select.inp { appearance: none; padding-right: 40px; background-image: var(--chev); background-position: right 12px center; background-size: 16px 16px; background-repeat: no-repeat; }
select.inp:focus { padding-right: 39px; }
.inp.ro, .inp[readonly], select.inp:disabled { background-color: var(--soft2); border-color: transparent; color: var(--text); opacity: 1; }
select.inp:disabled { background-image: none; }
.inp[readonly]:focus { border: 1px solid transparent; padding: 0 15px; }
textarea.inp[readonly]:focus { padding: 9px 15px; }
.fbox.err .inp { border: 2px solid var(--err); padding-left: 14px; }
.ferr { color: var(--err); font-size: 12px; line-height: 16px; margin-top: 4px; padding-left: 16px; }
.inp-actions { position: absolute; right: 8px; top: 4px; display: flex; gap: 2px; z-index: 1; }
.inp-actions .icon-btn { width: 28px; height: 28px; }
.inp-actions .icon-btn .ic { width: 18px; height: 18px; }
.fbox.has-actions .inp { padding-right: 72px; }
.hint { width: 16px; height: 16px; border-radius: 4px; background: var(--soft2); color: var(--text); font-size: 12px; line-height: 16px; font-weight: 700; display: grid; place-items: center; margin-top: 10px; flex: none; cursor: help; position: relative; border: 0; padding: 0; }
.hint:hover, .hint:focus-visible { background: var(--soft); outline: 0; }
.hint-spacer { width: 16px; flex: none; }
.field.cb .hint { margin-top: 0; }
.field.cb .hint-spacer { display: none; }
/* флажок в форме */
.check { display: inline-flex; align-items: center; gap: 12px; min-height: 20px; cursor: pointer; user-select: none; color: var(--text); position: relative; min-width: 0; }
.check input { position: absolute; left: 0; top: 2px; width: 16px; height: 16px; margin: 0; opacity: 0; pointer-events: none; }
.check i { width: 16px; height: 16px; border: 1px solid var(--chk-border); border-radius: 3px; background: var(--card); flex: none; display: grid; place-items: center; }
.check input:checked + i { background: var(--accent); border-color: var(--accent); }
.check input:checked + i::after { content: ""; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.check input:focus-visible + i { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.check.ro { cursor: default; color: var(--chk-off); }
.check.ro i { border-color: var(--chk-off); }
.check.ro input:checked + i { background: var(--chk-off); border-color: var(--chk-off); }
/* переключатели-«радио» */
.radio-group { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.radio-group .rg-title { font-weight: 500; margin-bottom: 4px; }
.radio { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; position: relative; }
.radio input { position: absolute; opacity: 0; width: 16px; height: 16px; margin: 0; }
.radio i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--chk-border); background: var(--card); display: grid; place-items: center; flex: none; }
.radio input:checked + i { border: 1.5px solid var(--accent); }
.radio input:checked + i::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.radio input:focus-visible + i { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 20%, transparent); }
/* значение только для чтения */
.ro-label { font-size: 12px; line-height: 14px; color: var(--text); margin-bottom: 11px; }
.ro-val { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 20px; white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.ro-val > span { min-width: 0; }
.copy-btn { width: 20px; height: 20px; border: 0; background: none; padding: 0; color: var(--text); display: grid; place-items: center; border-radius: 4px; flex: none; }
.copy-btn .ic { width: 18px; height: 18px; }
.copy-btn:hover { color: var(--accent); }
.field.ro .hint { margin-top: 27px; }
.link-act { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.link-act .la-ic { width: 36px; height: 36px; border-radius: 50%; background: var(--soft2); display: grid; place-items: center; flex: none; }
.link-act .la-ic .ic { width: 18px; height: 18px; }
.link-act:hover .la-ic { background: var(--soft); }
.qr-box { background: #fff; border-radius: 8px; padding: 6px; border: 1px solid var(--inp-border); display: inline-flex; }
.qr-box svg { display: block; width: 210px; height: 210px; }
/* индикатор сложности пароля */
.pw-meter { margin-top: -8px; padding: 14px 8px 6px; background: var(--ok-bg); border-radius: 0 0 8px 8px; font-size: 12px; line-height: 14px; }
.pw-meter .pw-track { height: 3px; border-radius: 2px; background: color-mix(in srgb, var(--ok) 18%, transparent); overflow: hidden; margin-bottom: 5px; }
.pw-meter .pw-track i { display: block; height: 100%; border-radius: 2px; background: #00aba7; transition: width .15s; }
.pw-meter[data-s="0"] { background: var(--err-bg); }
.pw-meter[data-s="0"] .pw-track i { background: var(--err); }
.pw-meter[data-s="1"] { background: var(--warn-bg); }
.pw-meter[data-s="1"] .pw-track i { background: var(--warn); }
.fbox.has-meter .inp { position: relative; z-index: 1; }
/* подвал формы: прижат к низу карточки, линия — только когда есть прокрутка */
.form-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 16px 20px 20px; border-top: 1px solid transparent; background: var(--card); border-radius: 0 0 var(--radius) var(--radius); flex: none; position: relative; z-index: 2; }
.form.overflow .form-foot { border-top-color: var(--inp-border); }
.form.more-below .form-foot::before { content: ""; position: absolute; left: 50%; top: -6px; width: 9px; height: 9px; margin-left: -5px; border-right: 1.5px solid #c2d4f4; border-bottom: 1.5px solid #c2d4f4; background: var(--card); transform: rotate(45deg); pointer-events: none; }
.form-foot .notice { flex: 0 0 100%; margin: 0 0 13px; align-items: center; }
.btn { height: 36px; padding: 0 16px; border-radius: 8px; border: 0; background: var(--soft2); color: var(--text); font-weight: 500; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; position: relative; white-space: nowrap; }
.btn:hover { background: var(--soft); }
.btn.primary { background: var(--soft2); color: var(--text); }
.btn.primary:hover { background: var(--soft); }
.btn.danger { background: var(--soft2); color: var(--text); }
.btn.danger:hover { background: var(--soft); }
.btn.text { background: none; }
.btn.text:hover { background: var(--soft2); }
.btn:disabled { cursor: default; }
.btn:focus-visible, .tb:focus-visible, .round:focus-visible, .icon-btn:focus-visible, .mi:focus-visible, .seg:focus-visible, .qt:focus-visible, .section-head:focus-visible, .pop button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.btn:disabled:not(.busy) { color: var(--disabled); }
.btn.busy { color: transparent; }
.btn.busy::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border: 2px solid var(--text); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.form.busy .form-foot .btn.text { opacity: .5; }

/* ---------- дашборд ---------- */
.dash-head { padding: 20px 12px 20px 20px; }
.dash-head .icon-btn { width: 32px; height: 32px; }
.quick-wrap { position: relative; margin-top: 16px; }
.quick { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.quick::-webkit-scrollbar { display: none; }
.qt { flex: none; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; width: 150px; height: 100px; border-radius: 12px; border: 0; background: var(--card); padding: 16px 20px 18px; text-align: left; position: relative; font-size: 14px; line-height: 18px; color: var(--text); overflow: hidden; }
.qt span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.qt:hover { background: var(--bg2); }
.qt .ic { position: absolute; right: 18px; bottom: 18px; width: 20px; height: 20px; color: var(--text); }
.qt:hover .ic { color: var(--accent); }
.quick-wrap.more::after { content: ""; position: absolute; top: 0; right: 0; width: 120px; height: 100px; background: linear-gradient(90deg, transparent, var(--bg)); pointer-events: none; }
.quick-next { position: absolute; right: 0; top: 36px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--card); z-index: 1; display: none; place-items: center; padding: 0; color: var(--text); box-shadow: var(--shadow-pop); }
.quick-next .ic { width: 16px; height: 16px; }
.quick-wrap.more .quick-next { display: grid; }
.widgets { display: flex; gap: 16px; margin-top: 16px; align-items: flex-start; }
.wcol { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.widget { padding: 0; overflow: hidden; border-radius: 12px; }
/* шеврон 10×6 в 23 px от края, заголовок с 46 px (tekhnicheskaya-podderzhka f000) */
.widget-head { display: flex; align-items: center; gap: 8px; width: 100%; height: 54px; border: 0; background: none; padding: 0 20px 0 18px; font-weight: 500; font-size: 18px; line-height: 24px; text-align: left; color: var(--text); }
.widget-head span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.widget-head .ic { width: 20px; height: 20px; color: var(--text); stroke-width: 1.6; transition: transform .15s; }
.widget.closed .widget-head .ic { transform: rotate(180deg); }
.widget.closed .widget-body { display: none; }
.widget-body { padding: 0 20px 16px; font-size: 14px; }
/* ширины — по каждой строке отдельно: подпись слева целиком (до 60%), значение — всё остальное место этой строки.
   Раньше столбцы сетки были общими: одно длинное значение («Intel(R) Xeon(R)… × 104», версия пакета PHP) обрезало
   подписи всех строк («Операционная сис…», «FastCGI для Apache (mod_…»). */
.kv { display: flow-root; margin: 0; }
.kv dt, .kv dd { padding: 10px 0; border-bottom: 1px solid var(--line); line-height: 20px; margin: 0; min-width: 0; }
.kv dt { float: left; clear: left; max-width: 60%; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kv dd { padding-left: 16px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.kv dt:nth-last-of-type(1), .kv dd:last-of-type { border-bottom: 0; }
.bars { display: grid; gap: 14px; padding-top: 4px; }
.bars .bl { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.bars .bl span:last-child { color: var(--text); text-align: right; }
.bars i { display: block; height: 6px; border-radius: 3px; background: var(--soft); overflow: hidden; }
.bars i b { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.bars i b.warn { background: var(--warn); }
.bars i b.err { background: var(--err); }
.mini col.c-date { width: 158px; }
.mini { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 14px; }
.mini th { text-align: left; color: var(--th); font-weight: 400; padding: 6px 8px 8px 0; border-bottom: 1px solid var(--line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini tr:last-child td { border-bottom: 0; }
.w-empty { color: var(--muted); padding: 4px 0 4px; }
/* главная пользователя (interfejs/02, масштаб 1,22): колонки 7:3, блоки ссылок — круг 36 px + подпись 14 px,
   между подписью и следующим кругом 24 px, ряды через 16 px */
.widgets.w-user > .wcol:first-child { flex: 7 1 0; }
.widgets.w-user > .wcol:last-child { flex: 3 1 0; }
.dlinks { display: flex; flex-wrap: wrap; gap: 16px 24px; padding: 2px 20px 20px; }
.dlink { display: inline-flex; align-items: center; gap: 12px; height: 36px; border: 0; background: none; padding: 0; color: var(--text); font-size: 14px; line-height: 20px; text-align: left; border-radius: 18px; }
.dlink .dl-ic { width: 36px; height: 36px; border-radius: 50%; background: var(--soft2); display: grid; place-items: center; flex: none; }
.dlink .dl-ic .ic { width: 20px; height: 20px; color: var(--text); }
.dlink:hover .dl-ic { background: var(--soft); }
.dlink:hover .dl-ic .ic { color: var(--accent); }
.dlink:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* главная пользователя: «Основная информация» и «Использование диска» (interfejs/02, r3-design-user) */
.uacc { padding: 0 20px 20px; }
.uacc-head { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 0 20px; border-bottom: 1px solid var(--line); text-align: center; }
.uacc-av { width: 80px; height: 80px; border-radius: 50%; background: var(--soft2); display: grid; place-items: center; margin-bottom: 14px; }
.uacc-av .ic { width: 24px; height: 24px; color: var(--text); }
.uacc-head b { font-weight: 600; }
.uacc-btn { align-self: stretch; margin-top: 10px; border-radius: 18px; }
.uacc-row { display: flex; align-items: center; gap: 8px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.uacc-row:last-child { border-bottom: 0; }
.uacc-txt { flex: 1; min-width: 0; line-height: 22px; }
.uacc-txt b { display: block; font-weight: 500; white-space: pre-line; overflow-wrap: anywhere; }
.uacc-acts { display: flex; gap: 8px; flex: none; }
.uacc-acts .icon-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--soft2); }
.upie { padding: 0 20px 20px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.upie-c svg { width: 240px; height: 240px; display: block; }
.upie-l { align-self: flex-start; display: flex; align-items: center; gap: 12px; }
.upie-l i { width: 16px; height: 16px; border-radius: 3px; background: var(--pie-free, #f38c3e); }
.upie-t { align-self: flex-start; color: var(--muted); }

/* «Модули» — замер ustanovka-cloudlinux-s-konvertachiey-os/01 (f20) и otkluchenie-litespeed/01: блок 244 px,
   плитка 62 px в 30 px от линии, название 18/600, плашки 28 px, кнопки 36 px, разделители 1 px */
.mods .form-head { position: relative; padding-bottom: 17px; }
.mods .form-head::after { content: ""; position: absolute; left: 20px; right: 20px; bottom: 0; border-bottom: 1px solid var(--inp-border); }
.mods-notice { padding: 16px 20px 0; flex: none; }
.mods-notice .notice { margin: 0; }
.mods .mods-body { padding-top: 0; padding-bottom: 0; }
.mod { display: flex; gap: 20px; padding: 25px 0 28px; border-bottom: 1px solid var(--inp-border); }
.mod:last-child { border-bottom: 0; }
.mod-logo { width: 62px; height: 62px; flex: none; border: 1px solid var(--inp-border); border-radius: 8px; display: grid; place-items: center; color: var(--accent); background: var(--card); }
.mod-logo .ic { width: 36px; height: 36px; stroke-width: 1.4; }
.mod-main { flex: 1; min-width: 0; }
.mod-name { display: flex; align-items: baseline; gap: 10px; min-width: 0; margin-top: -4px; }
.mod-name b { font-size: 18px; line-height: 24px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mod-ver { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mod-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.mod-chips:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 8px 0 6px; border-radius: 6px; font-size: 14px; line-height: 20px; color: var(--text); white-space: nowrap; }
.chip .ic { width: 18px; height: 18px; }
.chip.outline { border: 1px solid var(--inp-border); }
.chip.soft { background: var(--soft2); padding: 0 8px; }
.chip.err { background: var(--err-bg); } .chip.err .ic { color: var(--err); }
.chip.warn { background: var(--warn-bg); } .chip.warn .ic { color: var(--warn-ic); }
.chip.run, .chip.wait { background: var(--info-bg); } .chip.run .ic { color: var(--run); animation: spin 1.4s linear infinite; }
.mod-desc { margin-top: 11px; line-height: 20px; overflow-wrap: anywhere; }
.mod-acts { display: flex; gap: 8px; margin-top: 16px; }
.mod-ic { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--soft2); display: grid; place-items: center; color: var(--text); padding: 0; position: relative; }
.mod-ic:hover { background: var(--soft); }
.mod-ic.danger { background: var(--err-bg); }
.mod-ic.danger:hover { background: color-mix(in srgb, var(--err) 18%, var(--card)); }

/* все разделы */
.all-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 16px; }
.all-grid .card { padding: 20px 12px 12px; min-width: 0; }
.all-grid h3 { margin: 0 8px 8px; font-size: 18px; line-height: 24px; color: var(--text); font-weight: 500; text-transform: none; letter-spacing: 0; }
.all-grid .mi { padding: 0 12px 0 8px; }
.all-grid .mi:hover { background: var(--soft2); }
.all-item { display: flex; align-items: center; gap: 4px; }
.all-item .mi { flex: 1; min-width: 0; }
.all-item .all-menu { flex: none; opacity: 0; }
.all-item:hover .all-menu, .all-item .all-menu:focus-visible { opacity: 1; }
@media (hover: none) { .all-item .all-menu { opacity: 1; } }

/* ---------- панель справа, меню, тосты ---------- */
.drawer { position: fixed; top: 12px; right: 76px; bottom: 12px; width: 466px; max-width: calc(100vw - 96px); z-index: 40; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--inp-border); border-radius: 12px; box-shadow: var(--shadow-pop); }
/* шапка 72 px: кнопки 36 px сверху в 20 px, снизу 16 px (замер prosmotr-oshibok…_f015) */
.drawer-head { display: flex; align-items: center; gap: 8px; height: 72px; padding: 20px 20px 15px; border-bottom: 1px solid var(--inp-border); flex: none; }
.drawer-head h2 { font-size: 24px; line-height: 32px; margin: 0; flex: 1; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-head .icon-btn { width: 36px; height: 36px; }
.drawer-head .icon-btn + .icon-btn { margin-left: 6px; }
.drawer-body { overflow-y: auto; flex: 1; padding: 0; }
.drawer-body .empty { min-height: 0; background: none; }
.note { margin: 0 20px; padding: 20px 0; border-bottom: 1px solid var(--inp-border); display: flex; gap: 8px; line-height: 20px; }
.drawer-body > .note:first-child { margin-top: 4px; border-top: 1px solid var(--inp-border); }
.note > div { min-width: 0; overflow-wrap: anywhere; }
.note .ic { width: 20px; height: 20px; margin: -2px -2px 0; color: var(--ok); }
.note.warn .ic { color: var(--warn-ic); }
.note.error .ic { color: var(--err); }
.note .when { color: #0b419a; font-size: 14px; line-height: 16px; margin-bottom: 3px; }
:root[data-theme="dark"] .note .when { color: var(--accent); }
.note.read { opacity: .6; }

.pop { position: fixed; z-index: 70; min-width: 190px; max-width: 360px; max-height: calc(100vh - 16px); overflow-y: auto; background: var(--card); border-radius: 8px; box-shadow: var(--shadow-pop); padding: 4px 0; border: 1px solid var(--menu-border); }
.pop button { display: flex; align-items: center; gap: 9px; width: 100%; height: 36px; border: 0; background: none; padding: 0 16px; border-radius: 0; text-align: left; color: var(--text); font-size: 14px; white-space: nowrap; }
.pop button > .ic { margin-left: -2px; } /* значок с 17 px, подпись с 44 px от рамки — замер perenos…01_f025 */
.pop button span { overflow: hidden; text-overflow: ellipsis; }
.pop button:hover:not(:disabled) { background: var(--soft2); }
.pop button:disabled { color: var(--disabled); cursor: default; }
.pop button .ic { width: 20px; height: 20px; color: currentColor; }
.pop hr { border: 0; border-top: 1px solid var(--menu-sep); margin: 4px 0; }
.pop .pop-title { padding: 10px 16px 0; font-weight: 500; }
.pop .pop-sub { padding: 0 16px 10px; color: var(--muted); border-bottom: 1px solid var(--menu-sep); margin-bottom: 4px; }

.toasts { position: fixed; right: 96px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { width: 330px; max-width: calc(100vw - 32px); background: var(--card); color: var(--text); border: 1px solid var(--menu-border); border-radius: 12px; padding: 12px 40px 12px 12px; box-shadow: var(--shadow-pop); display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 20px; position: relative; animation: tin .18s ease-out; }
.toast > .toast-ic { display: grid; flex: none; }
.toast .toast-ic .ic { width: 20px; height: 20px; margin: 0 -2px; color: var(--info); }
.toast.ok .toast-ic .ic { color: var(--ok); }
.toast.err .toast-ic .ic { color: var(--err); }
.toast .toast-body { min-width: 0; overflow-wrap: anywhere; }
.toast .toast-act { display: inline-flex; align-items: center; border: 0; background: var(--soft2); color: var(--text); border-radius: 8px; height: 28px; padding: 0 12px; margin-top: 8px; font-size: 14px; font-weight: 500; }
.toast .toast-act:hover { background: var(--soft); }
.toast .x { position: absolute; top: 12px; right: 12px; width: 20px; height: 20px; border: 0; background: none; padding: 0; color: var(--text); display: grid; place-items: center; border-radius: 50%; }
.toast .x .ic { width: 16px; height: 16px; }
.toast .x:hover { background: var(--soft2); }
/* строка под сообщениями (toast-01): круг 34 px + «Закрыть все» на остаток ширины сообщения */
.toast-bar { display: flex; gap: 6px; width: 330px; max-width: calc(100vw - 32px); }
.toast-bar .round { width: 34px; height: 34px; background: var(--card); box-shadow: var(--shadow-pop); }
.toast-bar .round .ic { width: 18px; height: 18px; }
.close-all { flex: 1; height: 34px; padding: 0 16px; border-radius: 17px; border: 1px solid var(--line2); background: var(--card); color: var(--text); font-size: 14px; box-shadow: var(--shadow-pop); }
.close-all:hover { border-color: var(--accent); }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } }

.modal-back { position: fixed; inset: 0; background: color-mix(in srgb, var(--bg) 50%, transparent); z-index: 80; display: grid; place-items: center; padding: 16px; }
/* окно подтверждения — замер ustanovka-cms__03_f083: 360 px, буквы заголовка в 17 px от рамки, «Вы удаляете:» на 29 ниже, «×» в 22 px от правого края,
   кнопки 33 px в 18 px от низа */
.modal { width: 360px; max-width: 100%; padding: 10px 20px 18px 18px; border: 1px solid var(--menu-border); border-radius: 12px; box-shadow: var(--shadow-pop); }
.modal.anchored { position: fixed; }
.modal h3 { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 0 0 7px; font-size: 16px; line-height: 24px; font-weight: 500; }
.modal h3 > span { padding-top: 0; min-width: 0; overflow-wrap: anywhere; }
.modal .modal-x { width: 32px; height: 32px; margin: -4px -15px -4px 0; border: 0; background: none; padding: 0; color: var(--text); display: grid; place-items: center; border-radius: 50%; flex: none; }
.modal .modal-x .ic { width: 16px; height: 16px; }
.modal .modal-x:hover { background: var(--soft2); }
.modal .modal-label { font-weight: 500; margin-bottom: 6px; }
.modal .modal-items { margin-bottom: 12px; max-height: 200px; overflow-y: auto; overflow-wrap: anywhere; }
.modal p { margin: 0 0 12px; color: var(--text); white-space: pre-line; overflow-wrap: anywhere; }
.modal .row-btns { display: flex; justify-content: flex-start; gap: 8px; }
.modal .row-btns .btn { height: 33px; }

.search-pop { position: fixed; left: 20px; top: 111px; width: 400px; max-width: calc(100vw - 28px); z-index: 75; padding: 8px; border: 1px solid var(--menu-border); border-radius: 12px; box-shadow: var(--shadow-pop); }
.search-pop .inp:focus { padding: 0 14px; }
.search-pop .inp::placeholder, .search-pop .inp:not(:focus)::placeholder { color: var(--faint); }
.search-res { margin-top: 8px; max-height: 60vh; overflow-y: auto; }
.search-res:empty { display: none; }
.search-res button { display: flex; gap: 12px; align-items: center; width: 100%; height: 36px; border: 0; background: none; padding: 0 12px; border-radius: 8px; text-align: left; color: var(--text); font-size: 14px; }
.search-res button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-res button:hover, .search-res button.on { background: var(--bg2); }
.search-res small { color: var(--muted); margin-left: auto; font-size: 12px; white-space: nowrap; }

/* ---------- вход ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 16px; background: url(login-bg.svg) center / cover no-repeat; }:root[data-theme="dark"] .login { background-image: none; }
/* размеры сняты попиксельно с экрана входа ISPmanager 6: карточка 480×590, поля 36 px с шагом 64, «Войти» на 348 px от
   верха карточки, линия «Войти с помощью» на 422, кнопки соцсетей 60×60 на 447, подвал — 31 px от низа */
.login .card { width: 480px; max-width: 100%; padding: 40px 40px 31px; border: 1px solid #c9d2df; border-radius: 16px; box-shadow: none; text-align: center; }
:root[data-theme="dark"] .login .card { border-color: var(--line2); }
@media (max-width: 520px) { .login .card { padding: 32px 20px 24px; } }
.login .logo { justify-content: center; padding: 0; margin: 8px 0 0; height: 32px; gap: 8px; font-size: 30px; font-weight: 500; line-height: 32px; overflow: visible; }
.login .logo-mark { width: 28px; height: 28px; }
.login h1 { font-size: 18px; line-height: 24px; font-weight: 500; margin: 27px 0 25px; }
.login .inp { padding-left: 14px; }
.login .inp:focus { padding-left: 13px; }
.login .fbox > label { left: 11px; }
.login select.inp { padding-right: 40px; background-position: right 11px center; background-size: 14px 14px; }
.login form { text-align: left; }
.login .fbox { max-width: none; margin-bottom: 28px; }
.login .btn { width: 100%; }
.login .err-box { color: var(--err); margin: -14px 0 14px; font-size: 14px; }
.login .inp-actions { top: 5px; right: 11px; }
.login .inp-actions .icon-btn { width: 26px; height: 26px; background: var(--soft2); }
.login .inp-actions .icon-btn .ic { width: 20px; height: 20px; }
.login-copy { margin-top: 31px; font-size: 14px; line-height: 20px; color: var(--text); }
.brand-logo { max-height: 32px; max-width: 187px; object-fit: contain; }
.login .brand-logo { max-height: 40px; }
.login-foot { margin-top: 12px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.login-foot a { color: var(--muted); }
.social { margin-top: 0; }
.social-sep { display: flex; align-items: center; gap: 12px; margin: 27px 0 15px; color: var(--text); font-size: 14px; line-height: 20px; }
.social-sep::before, .social-sep::after { content: ""; flex: 1; border-top: 1px solid #cdced2; }
:root[data-theme="dark"] .social-sep::before, :root[data-theme="dark"] .social-sep::after { border-color: var(--line2); }
.social-list { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.social-list a { width: 60px; height: 60px; display: grid; place-items: center; border: 1px solid #c9cad3; border-radius: 8px; background: var(--card); color: var(--text); font-weight: 600; font-size: 18px; }
.social-list a:hover { border-color: var(--accent); }
/* шаг «Условия использования»: инфоблок, флажки «Я прочитал … и согласен с ним*», ссылка «Подробнее» */
.terms { margin: 0 0 28px; display: flex; flex-direction: column; gap: 28px; font-size: 14px; line-height: 20px; text-align: left; }
.terms-info { display: flex; gap: 12px; align-items: flex-start; background: var(--soft2); border-radius: 8px; padding: 16px 20px; font-size: 16px; line-height: 24px; }
.terms-info .ic { width: 20px; height: 20px; margin-top: 2px; color: var(--accent); flex: none; }
.terms .term-item { display: flex; flex-direction: column; gap: 20px; }
.terms .term { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; line-height: 22px; cursor: pointer; }
.terms .term input { accent-color: var(--accent); width: 18px; height: 18px; margin: 2px 0 0; flex: none; }
.terms .term-more { color: var(--text); text-decoration: underline; align-self: flex-start; }
.terms .term-text { max-height: 200px; overflow: auto; white-space: pre-line; font-size: 13px; color: var(--muted); }
.login .card { position: relative; }
.login-back { position: absolute; left: 16px; top: 16px; width: 32px; height: 32px; border-radius: 50%; background: var(--soft2); }
.img-field { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.img-preview { max-height: 40px; max-width: 160px; border-radius: 6px; background: var(--bg2); padding: 2px; }
.hidden-input { display: none; }

/* ---------- адаптив ---------- */
.mobile-toggle { display: none !important; }
@media (max-width: 1100px) {
  .tbl col.c-status { width: 150px; }
  .tbl col.c-date { width: 160px; }
}
@media (max-width: 760px) {
  .shell, .shell.collapsed { grid-template-columns: 0 minmax(0, 1fr) 0; }
  .work { grid-column: 2; grid-row: 1; }
  .side { position: fixed; z-index: 60; inset: 0 auto 0 0; width: 260px; background: var(--bg); box-shadow: 0 0 40px rgba(0,0,0,.2); transform: translateX(-105%); transition: transform .2s; }
  .shell.mobile-menu .side { transform: none; }
  .rail { position: fixed; z-index: 55; right: 8px; bottom: 8px; flex-direction: row; padding: 6px; background: var(--card); border-radius: 26px; box-shadow: var(--shadow-pop); }
  .rail .round.me { border-color: var(--line2); }
  .imp-group { flex-direction: row; }
  .mobile-toggle { display: grid !important; }
  .work { padding: 10px 8px 0; }
  .view { padding: 0 0 72px; }
  .head { padding: 14px 6px 14px 14px; }
  .head h1, .form-head h1 { font-size: 20px; }
  .form-head { padding: 14px 14px 0; }
  .form-body { padding: 20px 14px 6px; }
  .form-foot { padding: 12px 14px 14px; }
  .fbox { flex: 1 1 auto; max-width: none; }
  .tbl-wrap table.tbl { min-width: 640px; }
  .view.list-view, .view:not(.list-view):not(.form-view) { right: 0; padding-right: 0; scrollbar-gutter: auto; }
  .tbl-wrap { margin-right: 0; padding-right: 0; }
  .drawer { right: 8px; left: 8px; width: auto; max-width: none; bottom: 74px; }
  .toasts { right: 12px; left: 12px; bottom: 80px; align-items: stretch; }
  .toast, .toast-bar { width: auto; }
  .tb-search.open { width: 180px; }
  .toolbar .tb-ic { display: none; } /* «Сортировка» и «Фильтр» — в меню «⋮» */
  .wcol { gap: 12px; }
}

/* ---- поля с единицей измерения и «∞» (лимиты) ---- */
.fbox.has-unit .inp { padding-right: 56px; }
.fbox.has-unit .inp:focus { padding-right: 55px; }
.fbox .unit { position: absolute; right: 12px; top: 0; height: 36px; display: flex; align-items: center; color: var(--muted); font-size: 14px; pointer-events: none; z-index: 2; }
.inp.inf:not(:focus)::placeholder { color: var(--muted); }
/* лимит: «не ограничено», справа круг 26 px «∞» и единица (osnovnoj…_f037, resursy-i-ogranicheniya…/01) */
.fbox.has-inf .inp { padding-right: 46px; }
.fbox.has-inf .inp:focus { padding-right: 45px; }
.fbox.has-inf.has-unit .inp { padding-right: 88px; }
.fbox.has-inf.has-unit .inp:focus { padding-right: 87px; }
.fbox .inp-tail { position: absolute; right: 12px; top: 0; height: 36px; display: flex; align-items: center; gap: 8px; z-index: 2; color: var(--text); font-size: 14px; white-space: nowrap; }
.inf-btn { width: 26px; height: 26px; border: 0; border-radius: 50%; background: var(--soft2); color: var(--text); font-size: 17px; line-height: 26px; padding: 0; display: grid; place-items: center; }
.inf-btn:hover { background: var(--soft); }
.fbox:has(> .inp.inf:placeholder-shown:not(:focus)) > label { top: -7px; font-size: 12px; line-height: 14px; background: var(--card); }

/* ---- фильтр списка ---- */
.filter-chip { display: flex; align-items: center; gap: 4px; margin: 12px 10px 0 0; min-width: 0; }
.filter-chip .fc-main { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; height: 32px; padding: 0 14px 0 12px; border: 0; border-radius: 16px; background: var(--soft2); color: var(--text); font-size: 14px; }
.filter-chip .fc-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-chip .fc-main .ic, .filter-chip .fc-x .ic { width: 16px; height: 16px; flex: none; }
.filter-chip .fc-x { width: 28px; height: 28px; border: 0; border-radius: 50%; background: none; display: grid; place-items: center; color: var(--text); }
.filter-chip .fc-x:hover, .filter-chip .fc-main:hover { background: var(--soft3, var(--soft2)); }

/* ---- окна «Фильтр» и «Поля и столбцы» ---- */
.modal.form-modal { width: 420px; }
.modal.form-modal.wide { width: 520px; }
.modal .modal-body { max-height: min(60vh, 520px); overflow-y: auto; padding: 8px 2px 16px; }
.cols-list { display: grid; gap: 12px; padding-top: 2px; }
.filter-form { display: grid; gap: 18px; padding-top: 8px; }
.filter-form .field { margin: 0; }
.filter-form .fbox { max-width: none; flex: 1 1 auto; }

/* ---- виджеты главной: обновление и перетаскивание ---- */
.widget-top { display: flex; align-items: center; }
.widget-top .widget-head { flex: 1; min-width: 0; }
.w-acts { display: flex; align-items: center; gap: 2px; padding-right: 12px; opacity: 0; transition: opacity .15s; }
.widget:hover .w-acts, .w-acts:focus-within { opacity: 1; }
.w-acts .icon-btn { width: 32px; height: 32px; }
.w-grip { cursor: grab; }
.widget.dragging { opacity: .5; }
.widget.drop-over { outline: 2px dashed var(--focus); outline-offset: -2px; }
@media (hover: none) { .w-acts { opacity: 1; } }

/* ---- язык на странице входа ---- */

/* ---- редактор кода: настройки редактора (шрифт, тема, перенос, нумерация), поиск, во весь экран ---- */
.ed-field { align-items: flex-start; }
.ed { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.ed-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 16px; }
.form .ed .fbox.ed-opt { flex: none; max-width: none; }
.ed-o-font { width: 104px; } .ed-o-theme { width: 166px; } .ed-o-wrap { width: 120px; }
.ed-bar .ed-opt select.inp { height: 36px; }
.ed-num { margin-left: 2px; }
.ed-sp { flex: 1 1 auto; }
.ed-bar > .icon-btn + .icon-btn { margin-left: -12px; }
.form .ed > .fbox.ed-box { flex: none; max-width: none; }
.ed-box > label { z-index: 3; }
.ed-wrap { position: relative; display: flex; align-items: stretch; border: 1px solid var(--inp-border); border-radius: 8px; overflow: hidden;
  background: var(--card); color: var(--text); --ed-fs: 13px; --ed-lh: 20px; --ed-gut: var(--soft2); --ed-gfg: var(--muted); }
.ed-wrap:focus-within { border-color: var(--focus); box-shadow: 0 0 0 1px var(--focus); }
.ed-wrap textarea.inp.code, .ed-wrap textarea.inp.code:focus { flex: 1 1 auto; min-width: 0; border: 0; border-radius: 0; padding: 9px 12px; background: transparent; color: inherit;
  font-size: var(--ed-fs); line-height: var(--ed-lh); box-shadow: none; }
.ed-wrap.wrapped textarea.inp.code { white-space: pre-wrap; overflow-wrap: anywhere; }
/* высоту поля задаёт textarea (rows), номера строк её не растягивают; ширина — по числу цифр (--ed-dig) */
.ed-gutter { flex: none; position: relative; width: calc(var(--ed-dig, 2) * 1ch + 18px); min-width: 40px; overflow: hidden; background: var(--ed-gut); color: var(--ed-gfg);
  font: var(--ed-fs)/var(--ed-lh) var(--mono); text-align: right; user-select: none; }
.ed-nums { position: absolute; left: 0; right: 0; top: 0; padding: 9px 8px 60px 0; white-space: pre; }
.ed-wrap.no-num .ed-gutter { display: none; }
.ed-mirror { position: absolute; left: 0; top: 0; visibility: hidden; pointer-events: none; box-sizing: border-box; padding: 0 12px; font: var(--ed-fs)/var(--ed-lh) var(--mono);
  white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 4; }
.ed-search { position: absolute; top: 6px; right: 18px; z-index: 4; display: flex; align-items: center; gap: 2px; padding: 4px; background: var(--card); color: var(--text);
  border: 1px solid var(--inp-border); border-radius: 8px; box-shadow: var(--shadow-pop); }
.ed-search.hidden { display: none; }
.ed-search .inp { width: 200px; height: 30px; }
.ed-search .inp:not(:focus)::placeholder { color: var(--faint); }
.ed-search .icon-btn { width: 28px; height: 28px; }
.ed-search .icon-btn .ic { width: 18px; height: 18px; }
.ed-cnt { font-size: 12px; color: var(--muted); padding: 0 6px; white-space: nowrap; }
.ed-load { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; color: var(--text); font-size: 14px; cursor: pointer; }
.ed-clip { width: 36px; height: 36px; border-radius: 50%; background: var(--soft2); display: grid; place-items: center; }
.ed-load:hover .ed-clip { background: var(--soft); }
.ed-field.ed-full .ed { position: fixed; inset: 0; z-index: 70; background: var(--card); padding: 16px 20px 20px; }
.ed-field.ed-full .ed-box, .ed-field.ed-full .ed-wrap { flex: 1 1 auto; min-height: 0; }
.ed-field.ed-full textarea.inp.code { height: auto !important; resize: none; }
.ed-field.ed-full .ed-load { display: none; }
/* темы редактора (только цвета: подсветки синтаксиса нет) */
.ed-wrap.ed-t-chrome { background: #fff; color: #000; --ed-gut: #ebebeb; --ed-gfg: #333; }
.ed-wrap.ed-t-github { background: #fff; color: #24292e; --ed-gut: #f6f8fa; --ed-gfg: #959da5; }
.ed-wrap.ed-t-solarized_light { background: #fdf6e3; color: #586e75; --ed-gut: #fbf1d3; --ed-gfg: #93a1a1; }
.ed-wrap.ed-t-monokai { background: #272822; color: #f8f8f2; --ed-gut: #2f3129; --ed-gfg: #8f908a; }
.ed-wrap.ed-t-tomorrow_night { background: #1d1f21; color: #c5c8c6; --ed-gut: #25282c; --ed-gfg: #858a8f; }
.ed-wrap.ed-t-solarized_dark { background: #002b36; color: #93a1a1; --ed-gut: #01313f; --ed-gfg: #586e75; }
.ed-wrap.ed-t-twilight { background: #141414; color: #f8f8f8; --ed-gut: #232323; --ed-gfg: #e2e2e2; }
.ed-wrap[class*="ed-t-"] textarea.inp.code::selection { background: rgba(120, 150, 230, .45); }
/* поле «файл»: выбор файла с диска, содержимое — значение поля */
.file-inp { display: flex; align-items: center; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 72px; user-select: none; }
.file-inp:focus-visible { border: 2px solid var(--focus); padding-left: 14px; }
.file-inp.is-empty { color: var(--faint); } /* не .empty: это класс пустого списка (min-height 218px) */
.inp-actions .icon-btn.hidden { display: none; }
@media (max-width: 760px) {
  .ed-bar { gap: 14px 10px; }
  .ed-search { left: 8px; right: 8px; }
  .ed-search .inp { width: auto; flex: 1 1 auto; min-width: 0; }
}

/* Shell-клиент: тонкая тёмная полоса прокрутки (Chrome < 121, Safari) */
.vp-term::-webkit-scrollbar { width: 8px; }
.vp-term::-webkit-scrollbar-thumb { background: #4b4e55; border-radius: 4px; }
.vp-term::-webkit-scrollbar-track { background: transparent; }

/* ---- r4-design: меню-карточки «Создать сайт ⌄», значки «Параметры» в таблице, шаги мастера ---- */
.pop.pop-cards { max-width: 520px; width: 500px; padding: 12px; }
.pop.pop-cards button { display: block; height: auto; white-space: normal; padding: 18px 24px 20px; margin: 0 0 8px; border-radius: 8px; background: var(--soft2); }
.pop.pop-cards button:last-child { margin-bottom: 0; }
.pop.pop-cards button:hover:not(:disabled) { background: var(--soft); }
.pop.pop-cards button b { display: flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 500; line-height: 22px; }
.pop.pop-cards button b .ic { width: 18px; height: 18px; }
.pop.pop-cards button small { display: block; margin-top: 6px; font-size: 15px; line-height: 21px; color: var(--muted); }
.cell-icons { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; }
.cell-icons .ci { display: inline-grid; place-items: center; width: 22px; height: 22px; color: var(--text); }
.cell-icons .ci .ic { width: 18px; height: 18px; }
.wiz-steps { display: flex; align-items: center; flex-wrap: wrap; gap: 0; margin: 16px 20px 0; min-height: 36px; padding: 2px; border-radius: 18px; background: var(--soft2); font-size: 14px; flex: none; }
.wiz-step { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 16px; color: var(--muted); white-space: nowrap; }
.wiz-step.done { color: var(--text); }
.wiz-step.cur { background: var(--card); color: var(--text); }
.wiz-chev { display: inline-grid; place-items: center; width: 22px; color: var(--muted); }
.wiz-chev .ic { width: 14px; height: 14px; }
.wiz-steps + .form-body { padding-top: 24px; }
.section.wiz-off { display: none; }
.form-foot .btn.hidden { display: none; }
.field.fnote .fnote-text { white-space: pre-line; line-height: 21px; max-width: 520px; }
/* окно хода выполнения действия над строками (crops/progress-01): карточка, полоса 24 px, процент */
.op-progress { position: fixed; z-index: 80; width: 400px; max-width: calc(100vw - 16px); background: var(--card); border: 1px solid var(--menu-border); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 20px 20px 18px; }
.op-progress .opp-title { font-size: 16px; font-weight: 500; line-height: 22px; margin-bottom: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.op-progress .opp-bar { height: 24px; border-radius: 12px; background: var(--soft2); overflow: hidden; }
.op-progress .opp-bar i { display: block; height: 100%; width: 0; border-radius: 12px 0 0 12px; background: linear-gradient(90deg, #6f97e8, var(--accent)); transition: width .2s linear; }
.op-progress .opp-pct { margin-top: 14px; font-size: 14px; line-height: 20px; }
.tb.busy { color: transparent; }
.tb.busy .ic { visibility: hidden; }
.tb.busy::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border: 2px solid var(--text); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
