/*
 * Общая визуальная система iHOME: локальные шрифты Inter, тёмная основа,
 * зелёный цвет действий и повторно используемые элементы серверных страниц.
 */
/* Шрифты поставляются вместе с приложением, поэтому интерфейс не зависит от внешних сервисов. */
@font-face {
  font-family: Inter;
  src: url('./inter-latin-400-normal-C38fXH4l.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  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;
}
@font-face {
  font-family: Inter;
  src: url('./inter-latin-600-normal-LgqL8muc.woff2') format('woff2');
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  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;
}
@font-face {
  font-family: Inter;
  src: url('./inter-cyrillic-400-normal-obahsSVq.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Inter;
  src: url('./inter-cyrillic-600-normal-CWCymEST.woff2') format('woff2');
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* Переменные темы задают общие цвета и размеры всех компонентов. */
:root {
  color-scheme: dark;
  --bg: #14171b;
  --sidebar: #171a1f;
  --surface: #1d2127;
  --surface-raised: #22272e;
  --surface-hover: #292f37;
  --border: #30363f;
  --border-soft: #292f36;
  --text: #edf0f2;
  --muted: #969fa9;
  --faint: #68727e;
  --green: #00e77a;
  --green-dark: #00331d;
  --green-border: #007d43;
  --red: #ff6969;
  --blue: #70a8ff;
  --violet: #bd9bff;
  --radius: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
html, body { min-width: 320px; min-height: 100%; margin: 0; }
body { color: var(--text); background: var(--bg); font-size: 13px; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
/* Каркас приложения: закреплённое меню, верхняя строка статуса и область страницы. */
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 254px; display: flex; flex-direction: column; padding: 23px 16px 18px; background: var(--sidebar); border-right: 1px solid var(--border-soft); z-index: 3; transition: width .18s ease; }
.sidebar-head { display: flex; align-items: center; gap: 5px; min-height: 45px; }
.brand { min-width: 0; flex: 1 1 auto; display: flex; align-items: center; gap: 11px; padding: 0 7px; min-height: 45px; }
.sidebar-toggle { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; padding: 0; color: #8b969f; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-raised); cursor: pointer; font-size: 18px; line-height: 1; transition: color .15s, border-color .15s, background .15s; }
.sidebar-toggle:hover { color: var(--green); border-color: rgba(0,231,122,.38); background: var(--surface-hover); }
.sidebar-toggle:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.brand-mark { position: relative; width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid rgba(0,231,122,.35); border-radius: 10px; background: linear-gradient(145deg, rgba(0,231,122,.18), rgba(0,231,122,.035)); color: var(--green); box-shadow: 0 0 22px rgba(0,231,122,.07); }
.brand-glyph { font-size: 20px; line-height: 1; font-weight: 700; font-style: italic; }
.brand-dot { position: absolute; width: 5px; height: 5px; right: 7px; top: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.brand-copy { display: flex; flex-direction: column; gap: 3px; }
.brand-copy strong { letter-spacing: .12em; font-size: 13px; }
.brand-copy small { color: var(--muted); font-size: 10px; }
.sidebar-divider { height: 1px; background: var(--border-soft); margin: 25px 5px 23px; }
.nav-caption, .page-kicker, .card-kicker { color: #79838e; font-size: 9px; font-weight: 700; letter-spacing: .14em; }
.nav-caption { padding: 0 10px 11px; }
.main-nav { display: grid; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 11px; color: #aeb6bf; border: 1px solid transparent; border-radius: 8px; font-weight: 500; transition: background .16s ease, color .16s ease; }
.nav-item:hover { color: var(--text); background: rgba(255,255,255,.035); }
.nav-item.is-active { color: #dfffee; background: linear-gradient(90deg, rgba(0,231,122,.14), rgba(0,231,122,.055)); border-color: rgba(0,231,122,.15); box-shadow: inset 2px 0 var(--green); }
.nav-icon { width: 18px; color: #7c8792; font-size: 19px; text-align: center; }
.is-active .nav-icon { color: var(--green); }
.nav-arrow { margin-left: auto; color: var(--green); font-size: 20px; }
.nav-group { display: grid; gap: 1px; }
.nav-group.is-open { padding-bottom: 3px; }
.nav-subitem { min-height: 31px; display: flex; align-items: center; gap: 10px; margin-left: 21px; padding: 0 11px; color: #89939d; border-left: 1px solid #343b43; font-size: 10px; }
.nav-subitem:hover, .nav-subitem.is-active { color: #dfffee; }
.nav-subdot { width: 5px; height: 5px; flex: 0 0 auto; border: 1px solid #68737e; border-radius: 50%; }
.nav-subicon { display: none; width: 18px; flex: 0 0 18px; color: #7c8792; font-size: 15px; text-align: center; }
.nav-subitem.is-active .nav-subdot { border-color: var(--green); background: var(--green); box-shadow: 0 0 8px rgba(0,231,122,.4); }

.sidebar-bottom { margin-top: auto; }
.device-status { display: flex; align-items: center; gap: 9px; padding: 12px 10px; border: 1px solid #303a38; border-radius: 9px; background: #1b2422; }
.online-dot { width: 7px; height: 7px; flex: 0 0 auto; display: inline-block; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px rgba(0,231,122,.48); }
.device-status > span:nth-child(2) { display: flex; flex-direction: column; gap: 4px; }
.device-status strong { font-size: 11px; font-weight: 600; }
.device-status small { color: #84918d; font-size: 9px; }
.status-pill { margin-left: auto; padding: 4px 6px; color: var(--green); border: 1px solid rgba(0,231,122,.2); background: rgba(0,231,122,.07); border-radius: 5px; font-size: 8px; font-weight: 700; letter-spacing: .06em; }
.sidebar-version { display: flex; justify-content: space-between; padding: 14px 4px 0; color: #69737d; font-size: 9px; }
.sidebar-version span { color: #838d97; }
.main-area { min-height: 100vh; margin-left: 254px; transition: margin-left .18s ease; }
/* Свёрнутая панель оставляет значки и подписи браузера, но освобождает ширину страницы. */
body.sidebar-collapsed .sidebar { width: 76px; align-items: center; padding-right: 10px; padding-left: 10px; }
body.sidebar-collapsed .main-area { margin-left: 76px; }
body.sidebar-collapsed .sidebar-head { flex-direction: column; gap: 11px; }
body.sidebar-collapsed .brand { justify-content: center; padding: 0; }
body.sidebar-collapsed .brand-copy,
body.sidebar-collapsed .sidebar-divider,
body.sidebar-collapsed .nav-caption,
body.sidebar-collapsed .sidebar-bottom,
body.sidebar-collapsed .nav-item > span:not(.nav-icon) { display: none; }
body.sidebar-collapsed .main-nav { width: 100%; margin-top: 12px; }
body.sidebar-collapsed .nav-item { justify-content: center; padding: 0; }
body.sidebar-collapsed .nav-icon { width: 100%; font-size: 20px; }
body.sidebar-collapsed .nav-subitem { min-height: 42px; justify-content: center; margin: 0; padding: 0; border-left: 0; }
body.sidebar-collapsed .nav-subitem > span:not(.nav-subicon) { display: none; }
body.sidebar-collapsed .nav-subicon { display: inline-block; }
body.sidebar-collapsed .nav-subitem.is-active .nav-subicon { color: var(--green); }
.topbar { height: 68px; position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 0 38px; border-bottom: 1px solid var(--border-soft); background: rgba(20,23,27,.94); backdrop-filter: blur(16px); }
.breadcrumbs { display: flex; align-items: center; gap: 10px; color: #7c8690; font-size: 11px; }
.breadcrumbs strong { color: #e1e5e8; font-weight: 500; }
.crumb-sep { color: #4d5660; }
.topbar-actions { display: flex; align-items: center; gap: 19px; }
.system-metrics { display: flex; align-items: center; gap: 20px; margin-left: auto; margin-right: 24px; }
.system-metrics > span { min-width: 67px; display: flex; flex-direction: column; gap: 4px; }
.system-metrics small { color: #77828c; font-size: 7px; font-weight: 700; letter-spacing: .09em; }
.system-metrics strong { color: #dfe5e8; font-size: 10px; font-weight: 500; font-variant-numeric: tabular-nums; }

/* В верхней строке находятся показатели системы, тема, имя пользователя и выход. */
.topbar-status { display: flex; align-items: center; gap: 7px; color: #9da7b0; font-size: 10px; }
.topbar-status .online-dot { width: 6px; height: 6px; }
.profile-chip { display: flex; align-items: center; gap: 9px; padding-left: 17px; border-left: 1px solid var(--border); }
.avatar { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; color: #c2ffe0; background: linear-gradient(145deg, #1c4534, #253b32); border: 1px solid #315846; font-size: 12px; font-weight: 600; }
.profile-name { display: flex; flex-direction: column; gap: 3px; font-size: 10px; font-weight: 600; }
.profile-name small { color: #7f8994; font-size: 9px; font-weight: 400; }
.icon-button { display: inline-grid; place-items: center; width: 31px; height: 31px; padding: 0; color: #8e98a2; border: 1px solid transparent; border-radius: 7px; background: transparent; cursor: pointer; font-size: 19px; line-height: 1; transition: color .15s, background .15s, border-color .15s; }
.icon-button:hover { color: var(--text); border-color: var(--border); background: var(--surface-raised); }
.logout-button { font-size: 18px; }
.content-wrap { max-width: 1440px; padding: 37px 38px 48px; margin: 0 auto; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 0 0 26px; }
.page-heading h1 { margin: 7px 0 7px; font-size: 25px; line-height: 1.2; letter-spacing: -.035em; font-weight: 600; }
.page-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.button { min-height: 37px; display: inline-flex; justify-content: center; align-items: center; gap: 9px; padding: 0 14px; border: 1px solid transparent; border-radius: 8px; font-size: 10px; font-weight: 600; cursor: pointer; transition: transform .15s, background .15s, border-color .15s, box-shadow .15s; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #0c1812; border-color: #35f197; background: linear-gradient(180deg, #19ed87, #00cf6b); box-shadow: 0 4px 14px rgba(0,231,122,.13); }
.button-primary:hover { background: #34f597; box-shadow: 0 5px 18px rgba(0,231,122,.2); }
.button-wide { width: 100%; height: 43px; margin-top: 6px; font-size: 12px; }
.button-wide span { margin-left: auto; font-size: 16px; }
.button-plus { font-size: 16px; font-weight: 400; }
.button-quiet { color: #bdc5cd; border-color: var(--border); background: var(--surface-raised); }
.button-quiet:hover { background: var(--surface-hover); }
.button-danger { color: #ffe1e1; border-color: rgba(255,105,105,.3); background: rgba(255,82,82,.12); }
.button-danger:hover { border-color: rgba(255,105,105,.5); background: rgba(255,82,82,.2); }
/* Выключение выделено красным цветом; перезапуск оформлен синим как отдельное действие. */
.power-actions .button[data-system-power="shutdown"] { color: #fff; border-color: #f06b73; background: linear-gradient(180deg, #d9535d, #b93643); box-shadow: 0 4px 13px rgba(212, 65, 77, .18); }
.power-actions .button[data-system-power="shutdown"]:hover { border-color: #ff9298; background: linear-gradient(180deg, #e5666e, #c74450); box-shadow: 0 5px 16px rgba(212, 65, 77, .25); }
.power-actions .button[data-system-power="reboot"] { color: #d9eaff; border-color: rgba(100, 165, 255, .45); background: linear-gradient(180deg, #293c56, #202d41); }
.power-actions .button[data-system-power="reboot"]:hover { border-color: rgba(132, 187, 255, .7); background: linear-gradient(180deg, #344d6c, #273850); }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin-bottom: 20px; }
.devices-stats-grid, .monitor-stats-grid { grid-template-columns: repeat(5, minmax(0,1fr)); }
/* Сводные карточки мониторинга не занимают место при обычном просмотре страницы. */
body.app-page:not(.monitor-edit-mode) .monitor-stats-grid { display: none; }
body.app-page.monitor-edit-mode .monitor-stats-grid { display: grid; }
.stat-card { min-height: 96px; position: relative; display: flex; align-items: center; gap: 14px; padding: 17px 19px; border: 1px solid var(--border); border-radius: 10px; background: linear-gradient(125deg, #1d2127, #1b1f25); box-shadow: 0 5px 14px rgba(0,0,0,.07); }
.stat-icon { display: grid; place-items: center; width: 39px; height: 39px; flex: 0 0 auto; border-radius: 10px; font-size: 18px; }
.icon-violet { color: var(--violet); background: rgba(167,128,255,.11); border: 1px solid rgba(167,128,255,.13); }
.icon-yellow { color: #ffdf00; background: rgba(255,223,0,.1); border: 1px solid rgba(255,223,0,.15); }
.icon-green { color: var(--green); background: rgba(0,231,122,.09); border: 1px solid rgba(0,231,122,.12); }
.icon-blue { color: var(--blue); background: rgba(92,153,255,.11); border: 1px solid rgba(92,153,255,.13); }
.stat-card > div:nth-child(2) { display: flex; flex-direction: column; gap: 6px; }
.stat-card > div:nth-child(2) span { color: #9ba4ad; font-size: 10px; }
.stat-card > div:nth-child(2) strong { font-size: 22px; line-height: 1; font-weight: 600; letter-spacing: -.03em; }
.stat-card > small { align-self: flex-end; margin: 0 0 4px auto; color: #707b85; font-size: 9px; }
.panel { overflow: hidden; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); box-shadow: 0 9px 30px rgba(0,0,0,.08); }
.panel-heading { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 16px 18px; border-bottom: 1px solid var(--border-soft); }
.panel-heading h2 { margin: 0 0 5px; font-size: 12px; font-weight: 600; }
.panel-heading p { margin: 0; color: #828d97; font-size: 9px; }
.table-tools { display: flex; align-items: center; gap: 8px; }
.search-box { display: flex; align-items: center; gap: 8px; width: 205px; height: 32px; padding: 0 9px; color: #828c96; border: 1px solid var(--border); border-radius: 7px; background: #181c21; }
.search-box > span { font-size: 17px; line-height: 1; }
.search-box input { min-width: 0; width: 100%; color: var(--text); outline: none; border: 0; background: transparent; font-size: 9px; }
.search-box input::placeholder { color: #76818c; }
.search-box:focus-within { border-color: rgba(0,231,122,.5); box-shadow: 0 0 0 3px rgba(0,231,122,.07); }
.filter-button { height: 32px; padding: 0 10px; color: #aab3bb; border: 1px solid var(--border); border-radius: 7px; background: #22272e; font-size: 9px; cursor: default; }
.filter-button span { padding-left: 9px; color: #76818b; }
.table-scroll { width: 100%; overflow-x: auto; }
/* Размер окна журнала выбирается в форме над таблицей; на узком экране элементы переносятся. */
.page-size-form { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.page-size-form select { height: 32px; padding: 0 8px; color: var(--text); border: 1px solid var(--border); border-radius: 7px; background: #181c21; font-size: 9px; }
.page-size-submit { min-height: 32px; padding: 0 9px; font-size: 9px; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
thead { background: #1c2026; }
th { height: 36px; padding: 0 18px; color: #707b86; border-bottom: 1px solid var(--border-soft); font-size: 8px; font-weight: 700; letter-spacing: .1em; }
th:first-child { min-width: 250px; }
th:last-child { width: 90px; }
td { height: 57px; padding: 7px 18px; color: #c6cdd3; border-bottom: 1px solid #282e35; font-size: 10px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255,255,255,.018); }
.user-cell { display: flex; align-items: center; gap: 10px; }
.avatar-table { width: 30px; height: 30px; font-size: 11px; }
.device-avatar { color: var(--green); border-color: rgba(0,231,122,.22); background: rgba(0,231,122,.08); }
.user-cell > span:last-child { display: flex; flex-direction: column; gap: 4px; }
.user-cell strong { color: #e4e8eb; font-size: 10px; font-weight: 500; }
.user-cell small { color: #7d8791; font-size: 9px; }
.protected-label { margin-left: 5px; color: #acb8b1; font-size: 7px; font-weight: 700; letter-spacing: .08em; }
.role-badge, .status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid #39414a; border-radius: 6px; color: #b6bfc7; background: #262b32; font-size: 8px; }
.role-admin { border-color: rgba(170,133,255,.2); color: #c7acff; background: rgba(152,112,236,.1); }
.status-badge { padding: 5px 8px; }
.status-badge i { width: 5px; height: 5px; display: inline-block; border-radius: 50%; background: currentColor; }
.status-active { color: #16df82; border-color: rgba(0,231,122,.19); background: rgba(0,231,122,.07); }
.status-inactive { color: #96a0a9; border-color: #3a4149; background: rgba(142,153,164,.07); }
.date-cell { color: #919ba4; font-size: 9px; }
.rtsp-preview { color: #a8c5b4; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; }
.ping-value { display: inline-flex; min-width: 54px; justify-content: center; padding: 5px 7px; border: 1px solid transparent; border-radius: 6px; font-size: 8px; font-variant-numeric: tabular-nums; }
.ping-ok { color: #16df82; border-color: rgba(0,231,122,.19); background: rgba(0,231,122,.07); }
.ping-fail { color: #ff8585; border-color: rgba(255,105,105,.2); background: rgba(255,105,105,.07); }
.ping-pending, .ping-muted { color: #8c97a1; border-color: #343b43; background: rgba(142,153,164,.05); }
.actions-cell { display: flex; align-items: center; gap: 2px; }
.actions-cell .icon-button { font-weight: 700; letter-spacing: .03em; }
.actions-cell .danger-icon { color: #8d7373; font-size: 18px; }
.actions-cell .danger-icon:hover { color: var(--red); border-color: rgba(255,105,105,.2); background: rgba(255,105,105,.07); }
.inline-form { display: inline-flex; }
.panel-footer { display: flex; align-items: center; justify-content: space-between; min-height: 40px; padding: 0 18px; color: #7f8993; border-top: 1px solid var(--border-soft); background: #1b1f25; font-size: 9px; }
.panel-footer strong { color: #cdd3d8; font-weight: 600; }
.secure-note { color: #77828c; }
.lock-icon { color: #6da98a; font-size: 11px; }
.empty-cell { height: 100px; text-align: center; color: #8d97a0; }
.alert { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; padding: 11px 13px; border: 1px solid; border-radius: 8px; font-size: 10px; }
.alert-success { color: #a4f1c9; border-color: rgba(0,231,122,.25); background: rgba(0,231,122,.07); }
.alert-error { color: #ffb1b1; border-color: rgba(255,105,105,.24); background: rgba(255,105,105,.07); }
/* Встроенные диалоги браузера содержат формы пользователей и RTSP-устройств. */
.user-dialog { width: min(560px, calc(100vw - 30px)); max-width: none; max-height: min(92vh, 760px); overflow-y: auto; padding: 25px; color: var(--text); border: 1px solid #3a424b; border-radius: 13px; background: #1d2228; box-shadow: 0 24px 90px rgba(0,0,0,.56); }
.user-dialog::backdrop { background: rgba(5,7,9,.72); backdrop-filter: blur(4px); }
.dialog-close-form { position: absolute; top: 14px; right: 14px; }
.dialog-close-form button { font-size: 20px; }
.dialog-heading { display: flex; align-items: flex-start; gap: 12px; margin: 0 20px 21px 0; }
.dialog-icon { width: 35px; height: 35px; display: grid; place-items: center; border: 1px solid rgba(0,231,122,.2); border-radius: 9px; color: var(--green); background: rgba(0,231,122,.08); font-size: 17px; }
.dialog-heading h2 { margin: 5px 0 5px; font-size: 16px; font-weight: 600; }
.dialog-heading p { margin: 0; color: #8e98a1; font-size: 9px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 13px; }
.form-field { display: flex; flex-direction: column; gap: 7px; }
.form-field-full { grid-column: 1 / -1; }
.form-field label { color: #c2c9ce; font-size: 9px; font-weight: 600; }
.form-field label span { color: #78838d; font-weight: 400; }
.form-field input, .form-field select { height: 36px; padding: 0 10px; outline: none; color: #e5e9ec; border: 1px solid #39414a; border-radius: 7px; background: #171b20; font-size: 10px; }
.form-field input:focus, .form-field select:focus { border-color: rgba(0,231,122,.5); box-shadow: 0 0 0 3px rgba(0,231,122,.07); }
.form-field input::placeholder { color: #68737e; }
.form-field select { color-scheme: dark; }
.form-field small { min-height: 12px; color: #76818b; font-size: 8px; }
.privacy-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 15px; padding: 10px 11px; color: #93a29a; border: 1px solid rgba(0,231,122,.13); border-radius: 7px; background: rgba(0,231,122,.045); font-size: 8px; line-height: 1.6; }
.privacy-note .lock-icon { flex: 0 0 auto; margin-top: 1px; }
.toggle-row { position: relative; display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding: 12px 0; border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); cursor: pointer; }
.toggle-row > span:first-child { display: flex; flex-direction: column; gap: 4px; }
.toggle-row strong { color: #cdd4d9; font-size: 9px; font-weight: 500; }
.toggle-row small { color: #78838d; font-size: 8px; }
.toggle-row input { position: absolute; opacity: 0; }
.toggle-switch { width: 31px; height: 18px; padding: 2px; border: 1px solid #47515b; border-radius: 20px; background: #343b43; transition: background .15s, border-color .15s; }
.toggle-switch::after { content: ""; width: 12px; height: 12px; display: block; border-radius: 50%; background: #9ca6af; transition: transform .15s, background .15s; }
.toggle-row input:checked + .toggle-switch { border-color: #139a5a; background: #08733e; }
.toggle-row input:checked + .toggle-switch::after { transform: translateX(12px); background: #d9ffe9; }
.toggle-row input:focus-visible + .toggle-switch { outline: 2px solid var(--green); outline-offset: 2px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 19px; }
.empty-state { display: grid; justify-items: center; text-align: center; padding: 95px 20px; }
.empty-icon { width: 45px; height: 45px; display: grid; place-items: center; color: var(--green); border: 1px solid rgba(0,231,122,.18); border-radius: 12px; background: rgba(0,231,122,.07); font-size: 22px; }
.empty-state h2 { margin: 16px 0 7px; font-size: 16px; }
.empty-state p { color: var(--muted); font-size: 10px; }
/* Карточки мониторинга используют общий потоковый блок, который подстраивается под размер плитки. */
.monitor-service-alert { margin: -7px 0 18px; }
.monitor-state-value { font-size: 15px !important; letter-spacing: -.02em; }
.monitor-grid { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); grid-auto-rows: 24px; align-content: start; column-gap: 16px; row-gap: 8px; }
.monitor-card { position: relative; display: flex; flex-direction: column; align-self: stretch; width: 100%; height: 100%; min-width: 0; min-height: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 11px; background: linear-gradient(145deg, #1d2127, #191d22); box-shadow: 0 8px 26px rgba(0,0,0,.09); }
.monitor-card-heading { min-height: 59px; display: flex; flex: 0 0 auto; align-items: center; gap: 10px; padding: 11px 14px; }
.monitor-device-icon { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 8px; font-size: 15px; }
.monitor-icon-camera { color: var(--violet); border: 1px solid rgba(167,128,255,.16); background: rgba(167,128,255,.08); }
.monitor-icon-audio { color: var(--green); border: 1px solid rgba(0,231,122,.16); background: rgba(0,231,122,.07); }
.monitor-device-name { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.monitor-device-name strong { overflow: hidden; color: #e4e8eb; font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.monitor-device-name small { color: #7e8993; font-size: 8px; }
.live-chip { display: flex; align-items: center; gap: 6px; margin-left: auto; padding: 4px 6px; color: var(--green); border: 1px solid rgba(0,231,122,.18); border-radius: 5px; background: rgba(0,231,122,.06); font-size: 7px; font-weight: 700; letter-spacing: .08em; }
.live-chip i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 7px rgba(0,231,122,.5); }
.monitor-frame { position: relative; width: 100%; height: auto; min-height: 0; flex: 1 1 0; aspect-ratio: auto; overflow: hidden; border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); background: #090b0d; }
.monitor-frame iframe { width: 100%; height: 100%; display: block; border: 0; background: #090b0d; }
.monitor-frame-audio { height: auto; min-height: 0; flex: 1 1 0; aspect-ratio: auto; }
/* MQTT:Текст показывает последний payload и возраст сообщения внутри контрастной плитки. */
.mqtt-text-card .mqtt-text-screen, .mqtt-status-card .mqtt-text-screen { min-height: 0; display: flex; flex: 1 1 0; flex-direction: column; justify-content: space-between; gap: 8px; padding: 10px 14px; container-type: size; color: #f2f2f2; background: #111; text-align: center; }
.mqtt-text-title { display: block; flex: 0 1 auto; min-height: 0; color: #d3d3d3; font-size: clamp(10px, 4cqw, 21px); font-weight: 500; line-height: 1.25; overflow: hidden; overflow-wrap: anywhere; }
.mqtt-text-value { display: flex; flex: 1 1 0; align-items: center; justify-content: center; min-height: 0; max-width: 100%; color: #fffb00; font-size: clamp(16px, 20cqw, 78px); font-weight: 300; line-height: 1; overflow: hidden; overflow-wrap: anywhere; white-space: pre-wrap; }
.mqtt-text-editor { cursor: text; caret-color: var(--green); outline: none; }
.mqtt-text-editor:focus { border-radius: 4px; box-shadow: 0 0 0 1px rgba(0,231,122,.24); }
.mqtt-text-editor:empty::before { color: #626262; content: attr(data-placeholder); }
.mqtt-text-age { display: block; flex: 0 1 auto; min-height: 0; color: #626262; font-size: clamp(9px, 3.5cqw, 20px); line-height: 1.2; overflow: hidden; }
.mqtt-text-publish-form { min-width: 0; min-height: 0; display: flex; flex: 1 1 0; flex-direction: column; justify-content: space-between; gap: 8px; margin: 0; }
.mqtt-text-publish-form [data-mqtt-publish-status] { color: #7e8b84; }
.mqtt-text-publish-form [data-mqtt-publish-status].is-success { color: #00c96c; }
.mqtt-text-publish-form [data-mqtt-publish-status].is-error { color: #ff7070; }
.mqtt-text-card .monitor-card-footer > span, .mqtt-status-card .monitor-card-footer > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mqtt-status-toggle { width: 100%; min-height: 0; display: flex; flex: 1 1 0; align-items: center; justify-content: center; border: 0; background: transparent; cursor: pointer; }
.mqtt-status-toggle:disabled { cursor: wait; opacity: .65; }
.mqtt-status-symbol { width: clamp(46px, 34cqw, 126px); aspect-ratio: 1; display: grid; place-items: center; border: clamp(4px, 1.3cqw, 7px) solid var(--status-off-color, #fffb00); border-radius: 17%; background: transparent; box-sizing: border-box; }
.mqtt-status-symbol > span { display: none; color: #080808; font-size: clamp(28px, 22cqw, 78px); font-weight: 800; line-height: 1; }
.mqtt-status-toggle[data-state="on"] .mqtt-status-symbol { border-color: var(--status-on-color, #ff0000); background: var(--status-on-color, #ff0000); }
.mqtt-status-toggle[data-state="on"] .mqtt-status-symbol > span { display: block; }
.mqtt-status-toggle[data-state="unknown"] .mqtt-status-symbol, .mqtt-status-toggle[data-state="other"] .mqtt-status-symbol { display: none; }
.mqtt-status-value { max-width: 100%; color: #e6e8e9; font-size: clamp(18px, 18cqw, 64px); font-weight: 400; line-height: 1.1; overflow: hidden; overflow-wrap: anywhere; }
.mqtt-status-toggle[data-state="on"] .mqtt-status-value, .mqtt-status-toggle[data-state="off"] .mqtt-status-value { display: none; }
.spaced-field-label { display: block; margin-top: 15px; }
.device-no-brokers { margin: 8px 0 0; color: var(--muted); font-size: 9px; }
.device-no-brokers a { color: var(--green); }
.mqtt-publish-toggle { margin-top: 14px; }
.mqtt-instant-update { margin-top: 12px; }
.mqtt-status-settings { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border-soft); }
.mqtt-status-settings input[type="color"] { height: 36px; padding: 4px; cursor: pointer; }
.monitor-card-footer { min-height: 37px; display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 10px; padding: 0 13px; color: #7f8b94; font-size: 8px; }
.monitor-card-footer > span { display: flex; align-items: center; gap: 6px; }
.monitor-card-footer .online-dot { width: 5px; height: 5px; }
.monitor-card-footer a { color: #94a69c; white-space: nowrap; }
.monitor-card-footer a:hover { color: var(--green); }
/* MQTT:График выводит все ряды одной панели на общей временной и числовой шкале. */
.mqtt-graph-card { min-width: 0; }
.mqtt-graph-toolbar { min-height: 43px; display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 7px 12px; border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.mqtt-graph-toolbar > label, .mqtt-graph-custom-range > label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 8px; }
.mqtt-graph-toolbar select, .mqtt-graph-custom-range input { height: 28px; min-width: 120px; padding: 0 7px; color: var(--text); border: 1px solid var(--border); border-radius: 6px; background: var(--surface-raised); font-size: 8px; }
.mqtt-graph-toolbar > .mqtt-graph-trend-toggle { min-width: 0; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); cursor: pointer; }
.mqtt-graph-trend-toggle input { width: 13px; height: 13px; margin: 0; accent-color: var(--green); cursor: pointer; }
.mqtt-graph-custom-range { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.mqtt-graph-custom-range input { min-width: 155px; }
.mqtt-graph-custom-range .button { min-height: 28px; padding: 0 9px; font-size: 8px; }
.mqtt-graph-filters { min-height: 32px; display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: center; gap: 5px 12px; padding: 5px 12px; border-bottom: 1px solid var(--border-soft); }
.mqtt-graph-series-filter { min-width: 0; display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 8px; cursor: pointer; }
.mqtt-graph-series-filter input { width: 13px; height: 13px; margin: 0; accent-color: var(--green); cursor: pointer; }
.mqtt-graph-series-filter i { width: 13px; height: 2px; flex: 0 0 13px; background: var(--graph-series-color, var(--green)); }
.mqtt-graph-series-filter span { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mqtt-graph-plot { position: relative; min-height: 110px; display: flex; flex: 1 1 0; overflow: hidden; border-bottom: 1px solid var(--border-soft); background: var(--surface-raised); }
.mqtt-graph-plot canvas { width: 100%; height: 100%; min-height: 110px; display: block; }
.mqtt-graph-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; color: var(--muted); font-size: 9px; text-align: center; pointer-events: none; }
.mqtt-graph-tooltip { position: absolute; z-index: 2; display: grid; gap: 5px; max-width: min(300px, calc(100% - 16px)); max-height: calc(100% - 16px); overflow: auto; padding: 8px 10px; color: var(--text); border: 1px solid var(--border); border-radius: 7px; background: var(--surface); box-shadow: 0 5px 18px rgba(0,0,0,.24); font-size: 9px; pointer-events: none; }
.mqtt-graph-tooltip[hidden] { display: none; }
.mqtt-graph-tooltip-time { color: var(--text); font-size: 9px; font-weight: 600; white-space: nowrap; }
.mqtt-graph-tooltip-row { min-width: 0; display: flex; align-items: center; gap: 6px; color: var(--muted); }
.mqtt-graph-tooltip-row i { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; }
.mqtt-graph-tooltip-row span { min-width: 0; overflow-wrap: anywhere; }
.mqtt-graph-empty[hidden], .mqtt-graph-custom-range[hidden], .mqtt-graph-settings[hidden] { display: none; }
.mqtt-graph-footer { min-height: 31px; }
.mqtt-graph-footer > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mqtt-graph-settings { margin-top: 4px; }
.mqtt-graph-settings > .muted { margin: 0 0 9px; font-size: 9px; }
.mqtt-graph-series-list { display: grid; gap: 8px; }
.mqtt-graph-series-row { display: grid; grid-template-columns: minmax(115px, 1fr) minmax(120px, 1fr) minmax(170px, 1.5fr) 62px 34px; align-items: end; gap: 8px; padding: 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.mqtt-graph-series-row label { min-width: 0; display: grid; gap: 5px; color: var(--muted); font-size: 8px; }
.mqtt-graph-series-row input:not([type="color"]), .mqtt-graph-series-row select { width: 100%; min-width: 0; }
.mqtt-graph-series-row input[type="color"] { height: 34px; padding: 3px; cursor: pointer; }
.mqtt-graph-series-row .icon-button { width: 32px; min-height: 34px; margin-bottom: 0; }
.mqtt-graph-settings > small { display: block; margin-top: 9px; color: var(--muted); font-size: 8px; }
.mqtt-graph-settings > #camera-form-graph-add { margin-top: 9px; }
/* Переключатель, панель и карточки ниже открывают управление только при редактировании. */
.monitor-page-actions { display: flex; align-items: center; gap: 12px; }
.monitor-edit-toggle { position: relative; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 9px; white-space: nowrap; cursor: pointer; }
.monitor-edit-toggle input { position: absolute; opacity: 0; }
.monitor-edit-toggle input:checked + .toggle-switch { border-color: #139a5a; background: #08733e; }
.monitor-edit-toggle input:checked + .toggle-switch::after { transform: translateX(12px); background: #d9ffe9; }
.monitor-edit-toggle input:focus-visible + .toggle-switch { outline: 2px solid var(--green); outline-offset: 2px; }
.monitor-edit-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: -5px 0 16px; padding: 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.monitor-edit-toolbar > label { color: var(--text); font-size: 9px; font-weight: 600; }
.monitor-edit-toolbar select { height: 31px; padding: 0 8px; color: var(--text); border: 1px solid var(--border); border-radius: 6px; background: #181c21; font-size: 9px; }
.monitor-edit-toolbar > select { min-width: 220px; }
.monitor-edit-toolbar .button { min-height: 31px; padding: 0 10px; font-size: 9px; }
.monitor-edit-toolbar .button:disabled { opacity: .45; cursor: not-allowed; }
#monitor-layout-message { margin-left: auto; color: var(--green); font-size: 9px; }
.monitor-edit-help { color: var(--muted); font-size: 8px; }
.monitor-card.is-editable { outline: 1px dashed rgba(0,231,122,.38); outline-offset: 3px; }
.monitor-grid.is-editing { min-height: 600px; padding: 16px; border: 1px dashed rgba(0,231,122,.3); border-radius: 11px; background-color: rgba(0,231,122,.025); background-image: repeating-linear-gradient(to right, rgba(0,231,122,.11) 0 1px, transparent 1px 4.166667%), repeating-linear-gradient(to bottom, rgba(0,231,122,.11) 0 1px, transparent 1px 32px); }
.monitor-grid.is-editing .monitor-card.is-editable { cursor: grab; }
.monitor-grid.is-editing .monitor-card.is-editable .monitor-frame iframe { pointer-events: none; }
.monitor-card.is-dragging { z-index: 20; opacity: .88; cursor: grabbing !important; box-shadow: 0 18px 40px rgba(0,0,0,.35); }
.monitor-card-editor { display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 11px; border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); background: rgba(0,0,0,.12); }
.monitor-order-controls { display: flex; gap: 3px; }
.monitor-move-button { width: 27px; height: 29px; color: var(--text); border: 1px solid var(--border); border-radius: 6px; background: var(--surface-raised); cursor: pointer; }
.monitor-move-button:hover { color: var(--green); border-color: rgba(0,231,122,.4); }
.monitor-remove-button { width: 29px; height: 29px; min-height: 29px; display: grid; flex: 0 0 29px; place-items: center; margin-left: auto; padding: 0; color: var(--muted); border: 0; border-radius: 6px; background: transparent; font-size: 20px; font-weight: 300; line-height: 1; cursor: pointer; }
.monitor-remove-button:hover { color: var(--red); background: rgba(255,82,82,.1); }
.monitor-resize-handle { position: absolute; z-index: 12; display: none; margin: 0; padding: 0; border: 0; border-radius: 4px; background: transparent; touch-action: none; }
.monitor-card.is-editable .monitor-resize-handle { display: block; background: rgba(0,231,122,.1); }
.monitor-resize-n, .monitor-resize-s { left: 12px; right: 12px; height: 8px; cursor: ns-resize; }
.monitor-resize-n { top: 0; }
.monitor-resize-s { bottom: 0; }
.monitor-resize-e, .monitor-resize-w { top: 12px; bottom: 12px; width: 8px; cursor: ew-resize; }
.monitor-resize-e { right: 0; }
.monitor-resize-w { left: 0; }
.monitor-resize-ne, .monitor-resize-sw { cursor: nesw-resize; }
.monitor-resize-nw, .monitor-resize-se { cursor: nwse-resize; }
.monitor-resize-ne, .monitor-resize-nw, .monitor-resize-se, .monitor-resize-sw { width: 14px; height: 14px; }
.monitor-resize-ne { top: 0; right: 0; }
.monitor-resize-nw { top: 0; left: 0; }
.monitor-resize-se { right: 0; bottom: 0; }
.monitor-resize-sw { bottom: 0; left: 0; }
.monitor-resize-handle:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }
.monitor-card.is-resizing { outline: 2px solid rgba(0,231,122,.65); outline-offset: 2px; user-select: none; }
.monitor-card.is-editable .monitor-resize-handle:hover { background: rgba(0,231,122,.24); }
.monitor-layout-empty { margin-top: 12px; }
.monitor-empty { display: grid; justify-items: center; padding: 54px 20px; text-align: center; }
.monitor-empty-icon { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid rgba(0,231,122,.2); border-radius: 12px; color: var(--green); background: rgba(0,231,122,.07); font-size: 20px; }
.monitor-empty h2 { margin: 15px 0 7px; font-size: 14px; }
.monitor-empty p { max-width: 380px; margin: 0 0 17px; color: var(--muted); font-size: 9px; line-height: 1.7; }
.monitor-empty .button { min-width: 190px; }
/* Страница входа использует отдельную карточку и компактную мобильную раскладку. */
.login-page { min-height: 100vh; overflow-x: hidden; background: radial-gradient(ellipse at 23% 48%, rgba(0,99,57,.15), transparent 40%), radial-gradient(ellipse at 83% 20%, rgba(67,81,111,.12), transparent 35%), #14171b; }
.login-layout { width: min(970px, calc(100% - 40px)); min-height: 100vh; display: grid; grid-template-columns: 1fr 400px; align-items: center; gap: 90px; margin: 0 auto; padding: 70px 0; }
.login-intro { padding-left: 24px; }
.brand-mark-large { width: 53px; height: 53px; margin-bottom: 29px; border-radius: 14px; }
.brand-mark-large .brand-glyph { font-size: 29px; }
.brand-mark-large .brand-dot { width: 6px; height: 6px; }
.login-intro .eyebrow { margin: 0 0 15px; color: #8e9c95; font-size: 9px; font-weight: 700; letter-spacing: .18em; }
.login-intro h1 { margin: 0; color: #f4f7f5; font-size: 47px; line-height: 1; font-weight: 600; letter-spacing: .1em; }
.intro-copy { margin: 18px 0 0; color: #d6dbd8; font-size: 14px; line-height: 1.9; }
.intro-copy span { color: #919b97; font-size: 11px; }
.login-foot { display: flex; align-items: center; gap: 9px; margin-top: 57px; color: #8e9a94; font-size: 10px; }
.login-card { position: relative; padding: 35px 33px 23px; border: 1px solid #343b43; border-radius: 13px; background: linear-gradient(145deg, rgba(34,39,46,.98), rgba(27,31,37,.98)); box-shadow: 0 22px 65px rgba(0,0,0,.3), inset 0 1px rgba(255,255,255,.025); }
.login-card::before { content: ""; position: absolute; top: -1px; left: 33px; right: 33px; height: 1px; background: linear-gradient(90deg, transparent, rgba(0,231,122,.5), transparent); }
.mobile-brand { display: none; align-items: center; gap: 9px; color: #e9f0ec; font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.login-card .card-kicker { margin-bottom: 10px; color: #63bd8b; }
.login-card h2 { margin: 0 0 8px; font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.muted { margin: 0; color: #939ca5; font-size: 10px; }
.login-form { display: flex; flex-direction: column; gap: 9px; margin-top: 26px; }
.login-form > label { margin-top: 7px; color: #c4cbd0; font-size: 9px; font-weight: 500; }
.input-wrap { min-height: 40px; display: flex; align-items: center; gap: 9px; padding: 0 10px; border: 1px solid #3a424b; border-radius: 7px; background: #171b20; transition: border-color .15s, box-shadow .15s; }
.input-wrap:focus-within { border-color: rgba(0,231,122,.5); box-shadow: 0 0 0 3px rgba(0,231,122,.07); }
.input-icon { width: 15px; color: #77838e; font-size: 14px; text-align: center; }
.input-wrap input { width: 100%; min-width: 0; color: #eef2ef; outline: 0; border: 0; background: transparent; font-size: 10px; }
.input-wrap input::placeholder { color: #68737e; }
.password-toggle { padding: 3px; color: #76818b; border: 0; background: transparent; cursor: pointer; font-size: 12px; }
.password-toggle:hover { color: var(--green); }
.login-form .button-primary { margin-top: 12px; }
.login-card-foot { display: flex; justify-content: center; align-items: center; gap: 7px; margin-top: 23px; padding-top: 16px; color: #79848d; border-top: 1px solid var(--border-soft); font-size: 8px; }
.login-card-foot .lock-icon { font-size: 10px; }


/* Панели имени устройства, сети, обновления и питания используют общие формы и кнопки. */
.settings-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 15px; align-items: start; }
.settings-column { display: grid; align-content: start; gap: 15px; min-width: 0; }
.settings-panel, .update-panel { overflow: hidden; }
.power-panel { margin-top: 0; overflow: hidden; }
.power-panel-body { display: grid; gap: 13px; padding: 18px; }
.power-panel-body > p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.power-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.power-actions .button:disabled { cursor: wait; opacity: .62; transform: none; }
.power-message { color: var(--muted); font-size: 10px; }
.power-message.is-error { color: var(--red); }
.power-message.is-success { color: var(--green); }
.settings-form { display: grid; gap: 16px; padding: 18px; }
.settings-form .form-grid { margin: 0; }
.settings-form .form-field input[type="file"] { height: auto; min-height: 38px; padding: 8px; }
.input-suffix { display: flex; align-items: center; height: 36px; padding-right: 10px; border: 1px solid #39414a; border-radius: 7px; background: #171b20; }
.input-suffix:focus-within { border-color: rgba(0,231,122,.5); box-shadow: 0 0 0 3px rgba(0,231,122,.07); }
.input-suffix input { width: 100%; min-width: 0; border: 0; background: transparent; box-shadow: none !important; }
.input-suffix span { color: #76818b; font-size: 10px; }
.mdns-current { padding: 10px 11px; color: var(--muted); border: 1px solid var(--border-soft); border-radius: 7px; background: rgba(255,255,255,.018); font-size: 10px; }
.mdns-current strong { color: var(--green); font-weight: 500; }
.settings-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.settings-actions [role="status"], .settings-message { color: #99a5ae; font-size: 10px; }
.settings-actions .is-error { color: var(--red) !important; }
.settings-actions .is-success { color: var(--green) !important; }
.certificate-panel { max-width: 760px; }
.certificate-message { min-height: 16px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.certificate-message.is-error { color: var(--red); }
.certificate-message.is-success { color: var(--green); }
.certificate-panel .button:disabled { cursor: wait; opacity: .7; transform: none; }
.network-pending { display: flex; align-items: center; justify-content: space-between; gap: 13px; padding: 12px; color: #f2c879; border: 1px solid rgba(242,200,121,.25); border-radius: 8px; background: rgba(242,200,121,.055); font-size: 9px; line-height: 1.6; }
.button-small { min-height: 31px; flex: 0 0 auto; padding: 0 10px; }
.version-chip { padding: 8px 11px; color: #aeb9c0; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); font-size: 9px; }
.update-panel { max-width: 820px; }
.update-panel .form-grid { grid-template-columns: 1fr 1fr; }
.update-progress[hidden], .update-log[hidden] { display: none; }
.update-progress { margin-top: 16px; padding: 12px; border: 1px solid rgba(0, 226, 139, .25); border-radius: 9px; background: rgba(0, 226, 139, .055); }
.update-progress.is-complete { border-color: rgba(0, 226, 139, .35); background: rgba(0, 226, 139, .09); }
.update-progress.is-error { border-color: rgba(255, 96, 96, .35); background: rgba(255, 96, 96, .07); }
.update-progress.is-reconnecting { border-color: rgba(106, 171, 255, .35); background: rgba(106, 171, 255, .07); }
.update-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--text); font-size: 11px; }
.update-progress-head span { color: var(--green); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-weight: 700; }
.update-progress.is-error .update-progress-head span { color: var(--red); }
.update-progress.is-reconnecting .update-progress-head span { color: #82baff; }
.update-progress-track { height: 8px; margin: 8px 0 7px; overflow: hidden; border-radius: 99px; background: rgba(4, 9, 13, .7); }
.update-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #00d783, #00f59b); box-shadow: 0 0 12px rgba(0, 235, 143, .24); transition: width .25s ease; }
.update-progress.is-error .update-progress-track span { background: var(--red); box-shadow: none; }
.update-progress.is-reconnecting .update-progress-track span { width: 32% !important; transform: translateX(-100%); animation: update-reconnecting 1.2s ease-in-out infinite alternate; background: linear-gradient(90deg, #3988e8, #a8d2ff); box-shadow: 0 0 12px rgba(106, 171, 255, .28); }
@keyframes update-reconnecting { to { transform: translateX(312.5%); } }
.update-progress small { color: var(--muted); font-size: 9px; line-height: 1.5; }
.update-log { max-height: 240px; overflow: auto; margin: 10px 0 0; padding: 12px; color: #c6d5de; border: 1px solid var(--border); border-radius: 8px; background: #0d1115; font: 10px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
/* Подробности журнала могут быть длинными; таблица сохраняет читаемость при прокрутке. */
/* Цвета IP гостей, счётчика повторов, страны и DNS помогают читать строки журнала. */
.audit-panel table { min-width: 1550px; }
.audit-panel th { position: relative; min-width: 0; }
.audit-panel th:first-child { min-width: 0; }
.audit-panel th:last-child { width: auto; }
.audit-panel th, .audit-panel tbody td { overflow: hidden; text-overflow: ellipsis; }
/* Полоса у правого края каждого заголовка служит мышиным указателем изменения ширины. */
.column-resize-handle { position: absolute; z-index: 1; top: 0; right: -3px; width: 8px; height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; cursor: col-resize; touch-action: none; }
.column-resize-handle::after { position: absolute; top: 25%; right: 3px; width: 1px; height: 50%; background: transparent; content: ""; }
.column-resize-handle:hover::after, .column-resize-handle:focus-visible::after, .column-resize-handle.is-dragging::after { background: var(--green); }
.is-column-resizing, .is-column-resizing * { cursor: col-resize !important; user-select: none !important; }
/* Навигация перемещает окно записей и сохраняет выбранное число строк на странице. */
.audit-pagination { display: flex; align-items: center; justify-content: center; gap: 18px; min-height: 52px; padding: 8px 14px; border-top: 1px solid var(--border-soft); color: var(--muted); font-size: 10px; }
.audit-pagination strong { color: var(--text); }
.audit-pagination .button { min-height: 32px; padding: 0 11px; font-size: 9px; text-decoration: none; }
.audit-pagination .is-disabled { opacity: .42; pointer-events: none; }
.audit-panel tbody td { font-size: 13px; }
.audit-panel .audit-ip { color: #9fc1ad; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; white-space: nowrap; }
.audit-panel .audit-ip.audit-ip-guest { color: var(--red); }
.audit-panel .audit-ip-count { color: var(--text); font-variant-numeric: tabular-nums; text-align: center; }
.audit-panel .audit-country, .audit-panel .audit-dns { max-width: 190px; color: var(--muted); font-size: 13px; white-space: normal; overflow-wrap: anywhere; }
.audit-panel .audit-details { max-width: 320px; color: var(--muted); font-size: 13px; white-space: normal; overflow-wrap: anywhere; }
/* Строки MQTT показывают адрес брокера и текущее состояние его соединения. */
.mqtt-panel .panel-heading { padding-right: 18px; }
.mqtt-note { display: flex; align-items: flex-start; gap: 10px; margin: 16px 18px 12px; padding: 12px; color: #9cb6aa; border: 1px solid rgba(0,231,122,.16); border-radius: 8px; background: rgba(0,231,122,.045); font-size: 9px; line-height: 1.7; }
.mqtt-note .lock-icon { flex: 0 0 auto; }
.mqtt-note code { color: #bfead2; font: 9px ui-monospace, SFMono-Regular, Consolas, monospace; }
.mqtt-page-message { min-height: 0; margin: 0 18px; color: var(--muted); font-size: 10px; }
.mqtt-page-message:empty { display: none; }
.mqtt-page-message.is-error { color: var(--red); }
.mqtt-page-message.is-success { color: var(--green); }
/* Таблица брокеров прокручивается по горизонтали и поддерживает мышиное изменение колонок. */
.mqtt-table { min-width: 900px; }
.mqtt-table th { position: relative; min-width: 0; }
.mqtt-table th:first-child { min-width: 0; }
.mqtt-table th:last-child { width: auto; }
.mqtt-table th, .mqtt-table tbody td { overflow: hidden; text-overflow: ellipsis; }
.mqtt-name-cell { color: var(--text); font-weight: 600; }
.mqtt-address { color: #a8c5b4; font: 9px ui-monospace, SFMono-Regular, Consolas, monospace; }
.mqtt-auth { color: var(--muted); font-size: 9px; }
.mqtt-actions { white-space: nowrap; }
.mqtt-ping-cell { text-align: center; }
.mqtt-status-pending { color: #e4c16f; border-color: rgba(228,193,111,.25); background: rgba(228,193,111,.07); }
.mqtt-panel .empty-cell { height: 82px; }
.user-form #mqtt-form-message { flex: 1 1 100%; }
.user-form .toggle-row { margin-top: 0; }
.user-form .settings-actions { justify-content: flex-end; margin-top: 8px; }
.user-form .settings-actions [role="status"] { margin-right: auto; }
/* На узких экранах меню и многоколоночные панели перестраиваются под мобильную ширину. */
@media (max-width: 1050px) {
  .content-wrap { padding-right: 25px; padding-left: 25px; }
  .topbar { padding-right: 25px; padding-left: 25px; }
  .sidebar { width: 225px; }
  .main-area { margin-left: 225px; }
  .stat-card { padding: 15px 13px; gap: 10px; }
  .stat-card > small { display: none; }
  .monitor-grid { column-gap: 11px; row-gap: 8px; }
  .system-metrics { gap: 10px; margin-right: 14px; }
  .system-metrics > span { min-width: 55px; }
  .settings-grid { grid-template-columns: 1fr; }
  .monitor-card-footer { padding: 0 9px; font-size: 7px; }
}
@media (max-width: 760px) {
  .sidebar { width: 225px; align-items: stretch; padding: 16px 12px; }
  .main-area { margin-left: 225px; }
  body.sidebar-collapsed .sidebar { width: 66px; align-items: center; padding: 16px 8px; }
  body.sidebar-collapsed .main-area { margin-left: 66px; }
  body.sidebar-collapsed .brand-mark { width: 32px; height: 32px; }
  .topbar { height: 59px; padding: 0 16px; }
  .breadcrumbs, .topbar-status, .profile-name { display: none; }
  .system-metrics { gap: 7px; margin-right: 5px; }
  .system-metrics > span { min-width: 0; }
  .system-metrics > span:not(:first-child) { display: none; }
  .system-metrics small { display: none; }
  .system-metrics strong { font-size: 9px; }
  .mobile-brand { display: flex; }
  .mobile-brand .brand-mark { width: 29px; height: 29px; border-radius: 8px; }
  .mobile-brand .brand-glyph { font-size: 16px; }
  .profile-chip { padding-left: 12px; }
  .avatar { width: 29px; height: 29px; }
  .topbar-actions { gap: 7px; }
  .content-wrap { padding: 25px 16px 35px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 16px; margin-bottom: 19px; }
  .page-heading h1 { font-size: 22px; }
  .page-heading > .button { width: 100%; }
  .monitor-page-actions { width: 100%; justify-content: space-between; }
  .monitor-page-actions > .button { width: auto; }
  .monitor-edit-toolbar > select { min-width: 0; flex: 1 1 180px; }
  .monitor-edit-toolbar #monitor-layout-message { flex: 1 1 100%; margin-left: 0; }
  .monitor-card-editor { flex-wrap: wrap; }
  .stats-grid { grid-template-columns: 1fr; gap: 8px; margin-bottom: 14px; }
  .stat-card { min-height: 72px; padding: 11px 13px; }
  .stat-icon { width: 35px; height: 35px; }
  .stat-card > small { display: block; }
  .monitor-grid { grid-template-columns: repeat(24, minmax(0, 1fr)); column-gap: 10px; row-gap: 8px; }
  .monitor-grid.is-editing { min-height: 400px; background-size: 4.166667% 100%, 100% 32px; }
  .monitor-card-heading { min-height: 53px; }
  .monitor-card-footer { min-height: 35px; }
  .mqtt-graph-series-row { grid-template-columns: 1fr 1fr; }
  .mqtt-graph-series-row label:nth-child(3) { grid-column: 1 / -1; }
  .mqtt-graph-series-row .icon-button { justify-self: end; }
  .mqtt-graph-custom-range input { min-width: 135px; }
  .panel-heading { align-items: flex-start; flex-direction: column; gap: 14px; padding: 15px 13px; }
  .table-tools { width: 100%; flex-wrap: wrap; }
  .search-box { flex: 1; width: auto; }
  .page-size-form { flex-wrap: wrap; justify-content: flex-end; }
  .audit-pagination { justify-content: space-between; gap: 5px; padding: 8px; }
  .audit-pagination .button { padding: 0 7px; font-size: 8px; }
  th { padding: 0 12px; }
  th:first-child { min-width: 195px; }
  td { padding: 7px 12px; }
  .panel-footer { padding: 0 12px; }
  .secure-note { display: none; }
  .login-layout { width: min(430px, calc(100% - 28px)); display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: 30px 0; }
  .login-intro { display: none; }
  .login-card { width: 100%; padding: 28px 23px 20px; }
  .login-card .mobile-brand { display: flex; margin-bottom: 27px; }
  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .update-panel .form-grid { grid-template-columns: 1fr; }
  .settings-form { padding: 14px; }
  .network-pending { align-items: flex-start; flex-direction: column; }
  .user-dialog { padding: 23px 18px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .update-progress.is-reconnecting .update-progress-track span { width: 100% !important; transform: none; }
}

/* Дневная тема применяется к страницам приложения; экран входа остаётся тёмным. */
html[data-theme="day"] { color-scheme: light; }
html[data-theme="day"] body.app-page {
  color-scheme: light;
  --bg: #f2f5f7;
  --sidebar: #ffffff;
  --surface: #ffffff;
  --surface-raised: #f4f7f9;
  --surface-hover: #eaf0f3;
  --border: #d3dde4;
  --border-soft: #e3e9ed;
  --text: #1c2933;
  --muted: #62727f;
  --faint: #7e8c97;
  --green: #008d52;
  --green-dark: #e2f5eb;
  --green-border: #6fbe94;
  --red: #c83e49;
  --blue: #286bb5;
  --violet: #7444b7;
  background: var(--bg);
}
html[data-theme="day"] body.app-page .sidebar,
html[data-theme="day"] body.app-page .panel,
html[data-theme="day"] body.app-page .monitor-card,
html[data-theme="day"] body.app-page .user-dialog { background: var(--surface); }
html[data-theme="day"] body.app-page .topbar { background: rgba(255,255,255,.95); }
html[data-theme="day"] body.app-page .breadcrumbs { color: #71808c; }
html[data-theme="day"] body.app-page .breadcrumbs strong { color: var(--text); }
html[data-theme="day"] body.app-page .mobile-brand { color: #263640; }
html[data-theme="day"] body.app-page .system-metrics small { color: #71808c; }
html[data-theme="day"] body.app-page .system-metrics strong { color: #24323c; }
html[data-theme="day"] body.app-page .topbar-status { color: #536572; }
html[data-theme="day"] body.app-page .profile-name small,
html[data-theme="day"] body.app-page .device-status small { color: #687a85; }
html[data-theme="day"] body.app-page .avatar { color: #12613e; background: linear-gradient(145deg, #e4f5ec, #d6ecdf); border-color: #b8ddc8; }
html[data-theme="day"] body.app-page .nav-caption,
html[data-theme="day"] body.app-page .page-kicker,
html[data-theme="day"] body.app-page .card-kicker { color: #687985; }
html[data-theme="day"] body.app-page .nav-item { color: #526572; }
html[data-theme="day"] body.app-page .nav-item:hover { color: var(--text); background: rgba(31,55,69,.045); }
html[data-theme="day"] body.app-page .nav-item.is-active,
html[data-theme="day"] body.app-page .nav-subitem:hover,
html[data-theme="day"] body.app-page .nav-subitem.is-active { color: #075b37; }
html[data-theme="day"] body.app-page .nav-subitem { color: #647580; border-left-color: #d6dfe5; }
html[data-theme="day"] body.app-page .device-status { border-color: #c9e3d5; background: #eff8f2; }
html[data-theme="day"] body.app-page .status-pill { color: #087d4b; border-color: #c3e5d1; background: #e4f5eb; }
html[data-theme="day"] body.app-page .sidebar-version,
html[data-theme="day"] body.app-page .sidebar-version span { color: #71818c; }
html[data-theme="day"] body.app-page .stat-card { background: linear-gradient(125deg, #fff, #f6f9fa); box-shadow: 0 5px 14px rgba(27,49,61,.055); }
html[data-theme="day"] body.app-page .stat-card > div:nth-child(2) span,
html[data-theme="day"] body.app-page .stat-card > small,
html[data-theme="day"] body.app-page .panel-heading p,
html[data-theme="day"] body.app-page .date-cell { color: #657580; }
html[data-theme="day"] body.app-page .search-box { color: #5f707c; background: #f6f8fa; }
html[data-theme="day"] body.app-page .search-box input::placeholder,
html[data-theme="day"] body.app-page .filter-button span { color: #778792; }
html[data-theme="day"] body.app-page .filter-button { color: #536571; background: #f1f5f7; }
html[data-theme="day"] body.app-page thead { background: #f4f7f8; }
html[data-theme="day"] body.app-page th { color: #667783; }
html[data-theme="day"] body.app-page td { color: #394b57; border-bottom-color: #e3e9ed; }
html[data-theme="day"] body.app-page .user-cell strong { color: #263640; }
html[data-theme="day"] body.app-page .user-cell small,
html[data-theme="day"] body.app-page .protected-label { color: #687984; }
html[data-theme="day"] body.app-page .role-badge,
html[data-theme="day"] body.app-page .status-badge { color: #53636e; border-color: #d7e0e5; background: #f3f6f8; }
html[data-theme="day"] body.app-page .role-admin { color: #7040b2; border-color: #e0d3f1; background: #f5effb; }
html[data-theme="day"] body.app-page .status-active { color: #087d4b; border-color: #c5e7d3; background: #e8f7ee; }
html[data-theme="day"] body.app-page .status-inactive { color: #65747e; border-color: #d9e0e5; background: #f2f5f7; }
html[data-theme="day"] body.app-page .rtsp-preview { color: #3f7657; }
html[data-theme="day"] body.app-page .ping-ok { color: #087d4b; border-color: #c5e7d3; background: #e8f7ee; }
html[data-theme="day"] body.app-page .ping-fail { color: #b52f3c; border-color: #f0c8cc; background: #fff0f1; }
html[data-theme="day"] body.app-page .ping-pending,
html[data-theme="day"] body.app-page .ping-muted { color: #63737e; border-color: #d7e0e5; background: #f3f6f8; }
html[data-theme="day"] body.app-page .panel-footer { color: #647580; background: #f6f8f9; }
html[data-theme="day"] body.app-page .panel-footer strong { color: #344651; }
html[data-theme="day"] body.app-page .secure-note { color: #647580; }
html[data-theme="day"] body.app-page .lock-icon { color: #39855e; }
html[data-theme="day"] body.app-page .empty-cell { color: #647580; }
html[data-theme="day"] body.app-page .alert-success { color: #17643e; border-color: #c8e9d5; background: #edf8f1; }
html[data-theme="day"] body.app-page .alert-error { color: #a8333d; border-color: #f0cdd0; background: #fff1f2; }
html[data-theme="day"] body.app-page .user-dialog { border-color: #d3dde4; box-shadow: 0 24px 90px rgba(23,42,54,.2); }
html[data-theme="day"] body.app-page .user-dialog::backdrop { background: rgba(36,50,60,.32); }
html[data-theme="day"] body.app-page .dialog-heading p,
html[data-theme="day"] body.app-page .form-field small,
html[data-theme="day"] body.app-page .toggle-row small { color: #687985; }
html[data-theme="day"] body.app-page .form-field label { color: #3e505b; }
html[data-theme="day"] body.app-page .form-field label span { color: #687985; }
html[data-theme="day"] body.app-page .form-field input,
html[data-theme="day"] body.app-page .form-field select { color: #24333d; border-color: #cbd6dd; background: #fff; }
html[data-theme="day"] body.app-page .form-field input::placeholder { color: #87949d; }
html[data-theme="day"] body.app-page .form-field select { color-scheme: light; }
/* Нативный список размеров страницы журнала должен использовать палитру светлой темы. */
html[data-theme="day"] body.app-page .page-size-form select {
  color: #24333d;
  color-scheme: light;
  border-color: #cbd6dd;
  background-color: #fff;
}
html[data-theme="day"] body.app-page .page-size-form select option {
  color: #24333d;
  background-color: #fff;
}
html[data-theme="day"] body.app-page .privacy-note { color: #466456; border-color: #d4eadc; background: #f1f8f3; }
html[data-theme="day"] body.app-page .toggle-row strong { color: #33454f; }
html[data-theme="day"] body.app-page .toggle-switch { border-color: #bcc9d1; background: #d5dee3; }
html[data-theme="day"] body.app-page .toggle-switch::after { background: #fff; }
html[data-theme="day"] body.app-page .monitor-edit-toolbar select { color: #24333d; color-scheme: light; border-color: #cbd6dd; background: #fff; }
html[data-theme="day"] body.app-page .monitor-card-editor { background: #f2f5f6; }
html[data-theme="day"] body.app-page .monitor-card { background: linear-gradient(145deg, #fff, #f5f8f9); }
html[data-theme="day"] body.app-page .monitor-device-name strong { color: #263640; }
html[data-theme="day"] body.app-page .monitor-device-name small,
html[data-theme="day"] body.app-page .monitor-card-footer { color: #667782; }
html[data-theme="day"] body.app-page .monitor-card-footer a { color: #3d7055; }
html[data-theme="day"] body.app-page .button-quiet { color: #41535e; }
html[data-theme="day"] body.app-page .button-danger { color: #a6313c; border-color: #ecc7cb; background: #fff1f2; }
html[data-theme="day"] body.app-page .power-actions .button[data-system-power="reboot"] { color: #245987; border-color: #c4d8eb; background: linear-gradient(180deg, #eef6fd, #e2eef9); }
html[data-theme="day"] body.app-page .network-pending { color: #795814; border-color: #ead9ad; background: #fff9e9; }
html[data-theme="day"] body.app-page .settings-actions [role="status"],
html[data-theme="day"] body.app-page .settings-message { color: #5d707c; }
html[data-theme="day"] body.app-page .input-suffix { border-color: #cbd6dd; background: #fff; }
html[data-theme="day"] body.app-page .input-suffix span { color: #687985; }
html[data-theme="day"] body.app-page .mdns-current { background: #f5f8f9; }
html[data-theme="day"] body.app-page .version-chip { color: #536571; }
html[data-theme="day"] body.app-page .update-progress { background: #f1faf5; }
html[data-theme="day"] body.app-page .update-progress.is-error { background: #fff1f2; }
html[data-theme="day"] body.app-page .update-progress.is-reconnecting { background: #f0f6fc; }
html[data-theme="day"] body.app-page .update-progress.is-reconnecting .update-progress-head span { color: #286bb5; }
html[data-theme="day"] body.app-page .update-progress-track { background: #dfe6e9; }
html[data-theme="day"] body.app-page .theme-toggle { color: #a26600; }
html[data-theme="day"] body.app-page .theme-toggle:hover { color: #765000; }
html[data-theme="day"] body.app-page .mqtt-note { color: #466456; border-color: #d4eadc; background: #f1f8f3; }
html[data-theme="day"] body.app-page .mqtt-note code { color: #17643e; }
html[data-theme="day"] body.app-page .mqtt-address { color: #3f7657; }
html[data-theme="day"] body.app-page .mqtt-status-pending { color: #795814; border-color: #ead9ad; background: #fff9e9; }
@media (max-width: 760px) {
  .system-metrics > span:not(:first-child):not(:last-child) { display: none; }
  .system-metrics > span:last-child { min-width: 37px; }
  .mqtt-note { margin-right: 12px; margin-left: 12px; }
  .mqtt-page-message { margin-right: 12px; margin-left: 12px; }
}
.app-page [hidden] { display: none !important; }
@media (max-width: 420px) {
  .app-page .mobile-brand { display: none; }
}
.organization-context-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-inline: 16px auto;
}

.dashboard-list { display: grid; gap: 14px; margin-top: 18px; }
.dashboard-list-card {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.dashboard-list-card h2 { margin: 6px 0; font-size: 17px; }
.dashboard-list-card p { margin: 0; color: var(--muted); }
.dashboard-assignment-form {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}
.dashboard-assignment-users { display: flex; flex: 1 1 400px; flex-wrap: wrap; gap: 8px 16px; }
.assignment-option { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); }
.user-dashboard-access { margin: 16px 0; padding: 12px; border: 1px solid var(--border); border-radius: 9px; }
.user-dashboard-access legend { padding-inline: 6px; color: var(--muted); }
.user-dashboard-access .assignment-option { margin: 5px 12px 5px 0; }

.organization-context-form select {
  min-width: 150px;
  max-width: 240px;
  padding: 8px 10px;
  border: 1px solid var(--border, #303944);
  border-radius: 8px;
  color: var(--text, #edf3fb);
  background: var(--surface, #1d2228);
}

@media (max-width: 1050px) {
  .organization-context-form {
    margin-inline: 0 auto;
  }
}

@media (max-width: 650px) {
  .dashboard-list-card { grid-template-columns: 1fr; }
  .dashboard-list-card > .button { justify-self: start; }
}

