.tool-tabs { display:grid; grid-template-columns:repeat(7,1fr); min-height:42px; padding:4px; gap:3px; border-bottom:1px solid var(--line); background:var(--theme-bg); }
.tool-tabs a { display:grid; place-items:center; min-width:0; padding:6px 3px; color:var(--muted); border:1px solid transparent; border-radius:6px; }
.tool-tabs a span:not(.deployment-stale-badge) { font-size:17px; line-height:1; }
.tool-tab-deployment { position:relative; }
.deployment-stale-badge { position:relative; display:inline-block; width:16px; height:16px; padding:0; border-radius:50%; color:transparent; background:var(--theme-warning,#d99b32); box-shadow:0 0 0 2px var(--theme-bg); font-size:0!important; line-height:0; }
.deployment-stale-badge::before { content:''; position:absolute; width:70%; height:70%; left:50%; top:50%; transform:translate(-50%,-50%); background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M6 1v10M1.67 3.5l8.66 5M1.67 8.5l8.66-5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat; pointer-events:none; }
.tool-tabs .deployment-stale-tool-badge { position:absolute; top:1px; right:4px; width:12px; height:12px; margin:0; padding:0; line-height:0; }
.runtime-node-tree-item { position:relative; }
.runtime-node-tree-item>.deployment-stale-badge { position:absolute; top:5px; right:6px; }
.runtime-node-tree-item.deployment-stale { padding-right:27px!important; }
.tool-tabs a:hover { color:var(--text); background:#182131; }
.tool-tabs a.active { color:var(--theme-accent); background:var(--theme-accent-soft); border-color:color-mix(in srgb,var(--theme-accent) 45%,var(--line)); }
.base-frame-icon { color:var(--theme-warning); }
.deployment-list { display:grid; gap:9px; }
.deployment-list > div { display:grid; grid-template-columns:25px 1fr auto; align-items:center; padding:12px; border:1px solid var(--line); border-radius:7px; background:#0e1520; }
.deployment-list small { color:var(--muted); }
.io-settings-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px; }
.io-settings-grid .panel { min-height:100%; }
.io-map-table td:last-child,.io-map-table th:last-child { width:180px;text-align:right; }
.io-map-table .alarm-message { min-width:240px;max-width:480px;white-space:normal; }
.io-map-table .io-map-description { min-width:180px;max-width:360px;white-space:pre-wrap;overflow-wrap:anywhere; }
.io-map-actions { display:flex;flex-wrap:nowrap;justify-content:flex-end;align-items:center;gap:7px;white-space:nowrap; }
.io-map-actions > * { flex-shrink:0; }
.io-map-actions form { margin:0; }
.template-tabs > .tab-panel[data-panel="map"]:has(> .io-map-scroll):not([hidden]) {
  display:flex;flex-direction:column;overflow:hidden;min-width:0;
}
.template-tabs > .tab-panel[data-panel="map"] > :not(.io-map-scroll) { flex:none; }
.io-map-scroll { flex:1 1 0;min-height:0;min-width:0;overflow:auto;scrollbar-gutter:stable;overscroll-behavior:contain; }
.io-map-scroll .io-map-table { margin:0; }
.io-map-scroll thead th { position:sticky;top:0;z-index:1;background:var(--theme-surface); }
.io-tab-toolbar { flex-shrink:0; }
.io-map-link { color:var(--blue);font-family:ui-monospace,SFMono-Regular,Menlo,monospace; }
.io-tab-toolbar { display:flex;align-items:stretch;justify-content:space-between;gap:16px;border-bottom:1px solid var(--line); }
.io-tab-toolbar .tab-list { border-bottom:0; }
.io-runtime-control { display:flex;align-items:center;gap:9px;padding:6px 10px;margin:0; }
.io-runtime-state { color:var(--muted);font-size:12px; }
.io-runtime-state.running { color:var(--theme-success,#60c88a); }
.io-runtime-value { display:inline-block;min-width:70px;font:600 13px ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--theme-success,#60c88a); }
.io-runtime-value.bad { color:var(--theme-danger,#ff7f8b);text-transform:lowercase; }
.io-sample-metadata { display:block;overflow-wrap:anywhere;font-size:11px;line-height:1.4; }
.tree .io-id-conflict { display:inline-flex;align-items:center;justify-content:center;flex:0 0 18px;width:18px;height:18px;border:2px solid currentColor;border-radius:50%;font-weight:800;line-height:1;color:var(--theme-danger,#e64858); }
.tree .io-id-conflict-text { color:var(--theme-danger,#e64858);font-weight:600; }
.io-runtime-lock { min-width:0;padding:0;margin:0;border:0; }
.io-runtime-lock:disabled { opacity:.72; }
@media(max-width:900px){.io-settings-grid{grid-template-columns:1fr}}
#id_scada_models { display:grid; gap:8px; padding:10px; border:1px solid var(--line); border-radius:7px; }
#id_scada_models label { font-weight:400; margin:0; }
.runtime-group-layout { display:grid; grid-template-columns:minmax(280px,390px) minmax(520px,1fr); gap:16px; align-items:start; }
.runtime-group-settings>div { margin-bottom:14px; }
.runtime-group-settings small { display:block; margin-top:4px; color:var(--theme-muted); }
.runtime-placement-panel header { display:flex; justify-content:space-between; gap:16px; }
.runtime-placement-panel header h3 { margin-bottom:4px; }
.runtime-placement-grid { display:grid; grid-template-columns:minmax(220px,.7fr) minmax(320px,1.3fr); gap:14px; }
.runtime-placement-source,.runtime-drop-zone { min-height:180px; padding:12px; border:1px solid var(--theme-line); border-radius:8px; background:var(--theme-surface-2); }
.runtime-placement-source h4,.runtime-drop-zone h4 { margin:0 0 10px; }
.runtime-placement-catalog,.runtime-placement-targets,[data-runtime-selected-list] { display:grid; gap:7px; }
.runtime-placement-catalog button { display:flex; align-items:center; gap:8px; width:100%; padding:8px 10px; border:1px solid var(--theme-line); border-radius:6px; color:var(--theme-text); background:var(--theme-input); cursor:grab; text-align:left; }
.runtime-placement-catalog button[hidden] { display:none; }
.template-composition { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:16px; }
.template-composition-panel { min-height:240px; padding:12px; border:1px solid var(--theme-line); border-radius:8px; background:var(--theme-surface-2); }
.template-composition-panel.drop-target { border-color:var(--theme-accent); box-shadow:inset 0 0 0 1px var(--theme-accent); }
.template-tree-node > .template-tree-row { border-radius:6px; }
.template-tree-node.drop-target > .template-tree-row { background:var(--theme-accent-soft); box-shadow:inset 0 0 0 1px var(--theme-accent); }
.template-tree-node.drag-source { opacity:.55; }
.template-tree-component-node > .template-tree-row .template-tree-item { font-style:normal; }
.template-tree-component-type { margin-left:.25rem; color:var(--theme-muted); font-size:.75rem; }
.template-composition-panel h4 { margin:0 0 10px; }
.template-component-row>span:nth-child(2),.template-component-source>span:nth-child(2) { display:grid; flex:1; gap:3px; min-width:0; }
.template-component-row small,.template-component-source small { overflow:hidden; text-overflow:ellipsis; }
.object-row.template-component-row { grid-template-columns:26px minmax(100px,1fr) repeat(3,auto); }
.template-component-row>.button { align-self:center; width:auto; min-width:0; height:30px; padding:4px 9px; white-space:nowrap; }
.template-composition>.form-errors { grid-column:1/-1; }
.runtime-placement-catalog button:hover { border-color:var(--theme-accent); }
.runtime-drop-zone { transition:border-color .12s ease,background-color .12s ease; }
.runtime-drop-zone.drag-over { border-color:var(--theme-accent); background:var(--theme-accent-soft); }
[data-runtime-selected-list]>div { display:grid; grid-template-columns:22px minmax(0,1fr) 28px; align-items:center; gap:7px; padding:7px 8px; border:1px solid var(--theme-line); border-radius:6px; background:var(--theme-surface); }
[data-runtime-selected-list] button { width:26px; height:26px; padding:0; border:0; color:var(--theme-muted); background:transparent; cursor:pointer; font-size:18px; }
[data-runtime-selected-list] button:hover { color:var(--theme-danger); }
@media(max-width:1000px){.runtime-group-layout,.runtime-placement-grid,.template-composition{grid-template-columns:1fr}}
.object-panel { min-height:250px; }
.panel-hint { color:var(--muted); font-size:12px; margin:-8px 0 13px; }
.object-panel > .panel-title + .panel-hint { margin-top:8px; }
.tab-count { display:inline-grid; min-width:21px; height:21px; place-items:center; margin-left:5px; padding:0 6px; border:1px solid var(--theme-line); border-radius:999px; color:var(--theme-muted); background:var(--theme-surface-2); font-size:10px; line-height:1; }
.tab-button.active .tab-count { color:var(--theme-accent); border-color:color-mix(in srgb,var(--theme-accent) 48%,var(--theme-line)); background:var(--theme-accent-soft); }
.object-filter { display:grid; grid-template-columns:minmax(180px,420px) auto; align-items:end; gap:8px 14px; margin:0 0 13px; }
.object-filter label { grid-column:1; margin:0; color:var(--theme-muted); font-size:11px; }
.object-filter input { grid-column:1; height:34px; padding:7px 10px; }
.io-map-filter { grid-template-columns:minmax(200px,2fr) minmax(160px,1fr) minmax(160px,1fr) auto; }
.io-map-filter-block { border:1px solid var(--theme-line);border-radius:8px;padding:12px;margin-bottom:14px;background:var(--theme-surface); }
.io-map-filter-block > summary { cursor:pointer;color:var(--theme-text);font-weight:600; }
.io-map-filter-block[open] > summary { margin-bottom:12px; }
.io-map-filter-block .io-map-filter { margin-bottom:0; }
.io-map-filter label { grid-row:1; }
.io-map-filter label[for="modbus-map-area"],.io-map-filter #modbus-map-area { grid-column:2; }
.io-map-filter label[for="modbus-map-type"],.io-map-filter #modbus-map-type { grid-column:3; }
.io-map-filter input[type="search"],.io-map-filter select,.io-map-filter button { grid-row:2; }
.io-map-filter select { box-sizing:border-box;height:34px;min-width:0;padding:4px 10px;font-size:14px;line-height:20px; }
.object-filter.io-map-filter small { grid-column:1 / -1;grid-row:3; }
@media(max-width:850px) {
  .object-filter.io-map-filter { grid-template-columns:minmax(0,1fr); }
  .object-filter.io-map-filter > label,.object-filter.io-map-filter > input,.object-filter.io-map-filter > select,.object-filter.io-map-filter > button,.object-filter.io-map-filter > small { grid-column:1;grid-row:auto; }
}
.object-filter small { grid-column:2; grid-row:2; align-self:center; color:var(--theme-muted); white-space:nowrap; }
.catalog-pagination { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:4px; padding:10px 4px 2px; color:var(--theme-muted); font-size:12px; }
.catalog-pagination .button { min-width:32px; height:30px; padding:3px 8px; }
.catalog-page-button { display:inline-grid; min-width:30px; height:30px; padding:3px 7px; place-items:center; border:1px solid var(--theme-line); border-radius:6px; color:var(--theme-text); background:var(--theme-surface-2); cursor:pointer; }
.catalog-page-button:hover:not(:disabled),.catalog-page-button:focus-visible { border-color:var(--theme-accent); background:var(--theme-surface-3); outline:none; }
.catalog-page-button.active { border-color:var(--theme-accent); color:var(--theme-accent); background:var(--theme-accent-soft); font-weight:700; cursor:default; }
.catalog-page-button:disabled:not(.active) { opacity:.42; cursor:default; }
.catalog-page-ellipsis { display:inline-grid; min-width:20px; height:30px; place-items:center; color:var(--theme-muted); }
.catalog-loading { margin:10px; color:var(--theme-muted); font-size:12px; }
.template-tree-more { width:100%; border:0; background:transparent; color:var(--theme-accent); padding:6px 12px 6px 38px; text-align:left; cursor:pointer; }
.template-tree-more:hover { background:var(--theme-hover); }
.object-row[hidden],.object-search-empty[hidden] { display:none; }
[data-node-placement-editor] [data-node-tab][hidden] { display:none; }
[data-historian-query] { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr)); gap:12px; align-items:start; }
[data-historian-query]>label,[data-historian-query]>.historian-filter { display:grid; gap:6px; min-width:0; margin:0; }
[data-historian-query] label { margin:0; line-height:20px; }
[data-historian-query] input,[data-historian-query] select,[data-historian-query] .button { box-sizing:border-box; height:42px; min-width:0; margin:0; }
[data-historian-query]>button[type="submit"] { margin-top:26px; }
[data-historian-query] [data-historian-pick] { flex:0 0 42px; padding:0; }
[data-historian-query] [data-historian-lookup-status]:empty { display:none; }
[data-historian-query] [data-historian-lookup-status] { overflow-wrap:anywhere; }
[data-historian-query] .historian-suggestions { top:72px; }
.historian-records { overflow:auto; }
.historian-data-viewport { overflow:auto; max-height:60vh; min-height:180px; border:1px solid var(--theme-line); border-radius:7px; background:var(--theme-input); }
.historian-data-grid { --historian-columns:minmax(240px,2fr) 310px minmax(150px,1fr) minmax(230px,1fr); width:var(--historian-grid-width,auto); min-width:var(--historian-grid-width,930px); }
.historian-data-grid[data-entity="alarms"] { --historian-columns:minmax(240px,1.5fr) 310px 150px 230px 150px 210px 100px minmax(260px,2fr) 160px; min-width:var(--historian-grid-width,1810px); }
.historian-data-grid[data-entity="events"] { --historian-columns:minmax(240px,1.5fr) 310px 180px 230px minmax(260px,2fr) 160px; min-width:var(--historian-grid-width,1380px); }
.historian-grid-header,.historian-grid-row { display:grid; grid-template-columns:var(--historian-columns); }
.historian-grid-header { position:sticky; top:0; z-index:1; background:var(--theme-surface-2); color:var(--theme-text); font-weight:600; box-shadow:0 1px var(--theme-line-strong); }
.historian-grid-header>div,.historian-grid-row>div { min-width:0; padding:9px 12px; border-right:1px solid var(--theme-line); border-bottom:1px solid var(--theme-line); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; line-height:20px; }
.historian-grid-header>div:last-child,.historian-grid-row>div:last-child { border-right:0; }
.historian-grid-header>div { position:relative; padding-right:18px; }
.historian-time-sort { display:block; width:100%; padding:0; border:0; background:transparent; color:inherit; font:inherit; text-align:left; cursor:pointer; }
.historian-time-sort:hover,.historian-time-sort:focus-visible { color:var(--theme-accent); }
.historian-column-resizer { position:absolute; top:0; right:0; bottom:0; width:8px; cursor:col-resize; touch-action:none; user-select:none; }
.historian-column-resizer:hover,.historian-column-resizer:focus-visible,.historian-column-resizer.is-resizing { background:var(--theme-accent); outline:none; }
.historian-grid-row { color:var(--theme-text); outline:none; scroll-margin-top:40px; }
.historian-grid-row:nth-child(even) { background:var(--theme-surface); }
.historian-grid-row:hover { background:var(--theme-surface-3); }
.historian-grid-row[aria-selected="true"] { background:var(--theme-accent-soft); box-shadow:inset 3px 0 var(--theme-accent); }
.historian-grid-row:focus-visible { outline:2px solid var(--theme-accent); outline-offset:-2px; }
.historian-records td { vertical-align:top; overflow-wrap:anywhere; min-width:110px; max-width:400px; }
.historian-pagination,.historian-pagination [data-historian-pages] { display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
.historian-pagination { margin-top:12px; }
.historian-pagination [aria-current="page"] { color:var(--theme-accent); background:var(--theme-accent-soft); border-color:var(--theme-accent); font-weight:700; opacity:1; }
.historian-page-announcement { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.historian-filter { position:relative; min-width:0; }
.historian-filter-input { display:flex; align-items:center; gap:6px; }
.historian-filter-input input { flex:1; min-width:0; }
.historian-suggestions { position:absolute; top:100%; left:0; right:0; z-index:30; max-height:280px; overflow:auto; border:1px solid var(--theme-line); border-radius:6px; background:var(--theme-surface); color:var(--theme-text); box-shadow:0 8px 24px #0003; }
.historian-suggestions[hidden] { display:none; }
.historian-suggestions button { display:block; width:100%; text-align:left; padding:8px; background:transparent; color:var(--theme-text); border:0; overflow-wrap:anywhere; }
.historian-suggestions button:hover,.historian-suggestions button[aria-selected="true"] { background:var(--theme-accent-soft); color:var(--theme-accent); }
.historian-picker { width:min(720px,90vw); max-height:85vh; overflow:auto; border:1px solid var(--theme-line); border-radius:10px; padding:20px; background:var(--theme-surface); color:var(--theme-text); }
.historian-picker::backdrop { background:#0008; }
.historian-picker header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.historian-picker [data-picker-pages] { display:flex; gap:4px; }
.object-list { display:grid; gap:5px; }
.template-tabs > .tab-panel[data-panel="tags"]:not([hidden]) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.template-tabs > .tab-panel[data-panel="tags"] > :not([data-object-list]) {
  flex: none;
}
.template-tabs > .tab-panel[data-panel="tags"] > [data-object-list] {
  flex: 1 1 0;
  min-height: 0;
  overflow: auto;
  align-content: start;
  grid-auto-rows: min-content;
  scrollbar-gutter: stable;
  padding: 2px 6px 6px 2px;
}
.object-row { display:grid; grid-template-columns:26px minmax(100px,1fr) auto; align-items:center; min-height:39px; padding:6px 9px; border:1px solid transparent; border-radius:6px; color:var(--theme-text); background:var(--theme-surface-2); transition:background-color .12s ease,border-color .12s ease; }
.object-row:hover,.object-row:focus-visible { border-color:var(--theme-line-strong); background:var(--theme-surface-3); outline:none; }
.object-row.selectable-object { cursor:pointer; }
.object-row.selectable-object.selected { border-color:var(--theme-accent); background:var(--theme-accent-soft); box-shadow:inset 3px 0 var(--theme-accent); }
.object-icon { color:var(--theme-accent); font-weight:700; text-align:center; }
.object-name { font-weight:600; cursor:default; user-select:none; padding:4px; border-radius:4px; }
.object-name:hover, .object-name:focus { color:var(--theme-accent); background:transparent; outline:none; }
.object-row small { color:var(--theme-muted); }
.tag-row.inherited-tag, .object-row.inherited-symbol { border-color:var(--theme-line); background:var(--theme-surface-2); }
.inheritance-badge { grid-column:2/-1; width:max-content; margin-top:2px; padding:2px 7px; border-radius:10px; background:#203a5f; color:#a9c9ff; font-size:10px; }
.list-empty { display:grid; place-items:center; min-height:145px; color:var(--muted); border:1px dashed #35435a; border-radius:7px; }
.convert-action { margin-top:24px; }
.template-danger-zone { margin-top:28px; padding-top:20px; border-top:1px solid var(--theme-line); }
.template-danger-zone h3 { margin-bottom:8px; }
.template-delete-dialog { width:min(760px,100%); }
.deletion-warning,.deletion-ready { margin:18px 0; padding:14px 16px; border:1px solid var(--theme-line); border-radius:8px; background:var(--theme-surface-2); }
.deletion-warning { border-color:color-mix(in srgb,var(--theme-danger) 65%,var(--theme-line)); background:color-mix(in srgb,var(--theme-danger) 9%,var(--theme-surface-2)); }
.deletion-warning p,.deletion-ready p { margin:7px 0 0; color:var(--theme-muted); }
.dependency-groups { display:grid; gap:10px; }
.dependency-group { padding:13px 15px; border:1px solid var(--theme-line); border-radius:8px; background:var(--theme-surface-2); }
.dependency-group h2 { display:flex; align-items:center; gap:8px; margin:0 0 5px; font-size:15px; }
.dependency-group h2 span { display:inline-grid; min-width:22px; height:22px; padding:0 6px; place-items:center; border-radius:999px; color:var(--theme-warning); background:var(--theme-surface-3); font-size:11px; }
.dependency-group p,.dependency-group small { color:var(--theme-muted); font-size:12px; }
.dependency-group p { margin:0 0 8px; }
.dependency-group ul,.deletion-ready ul { margin:8px 0; padding-left:20px; }
.dependency-group a { color:var(--theme-accent); }
.cascade-delete-warning { margin-top:16px; padding:14px 16px; border:1px solid color-mix(in srgb,var(--theme-danger) 75%,var(--theme-line)); border-radius:8px; background:color-mix(in srgb,var(--theme-danger) 13%,var(--theme-surface-2)); }
.cascade-delete-warning p { margin:7px 0; color:var(--theme-muted); }
.cascade-delete-warning ul { margin:10px 0; padding-left:20px; }
.cascade-delete-form { margin:0; }
.context-menu .context-danger { color:var(--theme-danger); }
.project-context-menu>strong { display:block; max-width:300px; padding:8px 10px 7px; overflow:hidden; color:var(--theme-muted); font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.project-backup-modal { position:fixed; z-index:6500; inset:0; display:grid; place-items:center; padding:24px; background:var(--theme-overlay); }
.project-backup-modal[hidden] { display:none; }
.project-backup-dialog { width:min(560px,calc(100vw - 32px)); overflow:hidden; border:1px solid var(--theme-line-strong); border-radius:12px; color:var(--theme-text); background:var(--theme-surface); box-shadow:var(--theme-shadow); }
.project-backup-dialog>header,.project-backup-dialog>footer { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:13px 16px; background:var(--theme-surface-2); }
.project-backup-dialog>header { border-bottom:1px solid var(--theme-line); }
.project-backup-dialog>footer { border-top:1px solid var(--theme-line); }
.project-backup-dialog h2 { margin:2px 0 0; font-size:18px; }
.project-backup-dialog header small,.project-backup-dialog footer span,.project-backup-body p { color:var(--theme-muted); font-size:11px; }
.project-backup-dialog header button { display:grid; width:30px; height:30px; padding:0; place-items:center; border:1px solid var(--theme-line); border-radius:6px; color:var(--theme-text); background:var(--theme-input); font-size:20px; cursor:pointer; }
.project-backup-body { padding:20px 16px; }
.project-backup-body strong { display:block; margin-bottom:12px; }
.project-backup-body p { margin:10px 0 0; }
.project-backup-progress { position:relative; height:12px; overflow:hidden; border:1px solid var(--theme-line-strong); border-radius:999px; background:var(--theme-input); }
.project-backup-progress span { position:absolute; top:1px; bottom:1px; width:34%; border-radius:999px; background:linear-gradient(90deg,var(--theme-accent-strong),var(--theme-accent),var(--theme-accent-strong)); animation:project-backup-progress 1.15s ease-in-out infinite; }
.project-backup-modal.is-ready .project-backup-progress span { left:1px; width:calc(100% - 2px); background:var(--theme-success); animation:none; }
.project-backup-dialog>footer { justify-content:flex-end; }
.project-backup-dialog>footer span { margin-right:auto; }
@keyframes project-backup-progress { from { left:-36%; } to { left:102%; } }
.project-create-card { width:min(620px,100%); }
.project-create-tabs { display:flex; gap:6px; margin:0 0 24px; padding:5px; border:1px solid var(--theme-border); border-radius:10px; background:var(--theme-surface-muted); }
.project-create-tabs a { flex:1; padding:9px 12px; border-radius:7px; color:var(--theme-muted); text-align:center; }
.project-create-tabs a:hover,.project-create-tabs a.active { background:var(--theme-accent); color:#fff; }
.project-create-section h2 { margin-bottom:8px; font-size:20px; }
.project-delete-card { width:min(720px,100%); }
.project-delete-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; margin:18px 0; }
.project-delete-summary>div { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:9px 11px; border:1px solid var(--theme-line); border-radius:7px; background:var(--theme-surface-2); }
.project-delete-summary dt { color:var(--theme-muted); }
.project-delete-summary dd { margin:0; font-weight:700; }
.project-delete-card code { color:var(--theme-warning); }
.project-delete-card .button:disabled { cursor:not-allowed; opacity:.5; }
.button.warning { border-color:#9a7426; background:#74551b; color:#fff3d4; }
.button.warning:hover { border-color:#c6932e; background:#8b6722; }
.panel-actions { display:flex; align-items:center; gap:8px; }
.object-delete-form { margin:0; }
.object-delete-form button[hidden] { display:none; }
.button.danger { border-color:#8f3340; background:#672630; color:#ffe5e8; }
.button.danger:hover { border-color:#bd4656; background:#84313d; }
.tag-config-page { min-height:100vh; padding:24px; background:#0d131d; background-image:linear-gradient(#1a2230 1px,transparent 1px),linear-gradient(90deg,#1a2230 1px,transparent 1px); background-size:24px 24px; }
.tag-config-page > form { width:min(1500px,100%); margin:0 auto; }
.tag-config-header { position:sticky; top:0; z-index:20; display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:16px; padding:16px 20px; border:1px solid var(--theme-line); border-radius:10px; background:var(--theme-surface); color:var(--theme-text); box-shadow:var(--theme-shadow); }
.tag-config-header > div:first-child { min-width:0; }
.tag-config-header h1 { overflow-wrap:anywhere; }
.tag-config-header .actions { flex-wrap:wrap; flex-shrink:0; }
.tag-config-header .back { margin-bottom:8px; }
.tag-config-header h1 { margin:0; }
.tag-config-header .actions { margin:0; }
.tag-config-grid { display:grid; grid-template-columns:minmax(300px,0.8fr) minmax(520px,1.6fr); gap:16px; align-items:start; }
.tag-config-side-panels { display:grid; gap:16px; }
.tag-config-grid h2 { font-size:18px; margin-bottom:20px; }
.config-panel-header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:20px; }
.config-panel-header h2 { margin:0; }
.editor-header-actions { display:flex; align-items:center; gap:9px; }
.config-panel-actions { display:flex; align-items:center; gap:8px; }
.config-lock { display:grid; place-items:center; width:32px; height:32px; margin:0; border:1px solid var(--theme-line-strong,#41516b); border-radius:6px; color:var(--theme-accent,#8eb8ff); background:var(--theme-input,#111a28); cursor:pointer; font-size:15px; }
.config-lock[hidden] { display:none; }
.config-lock input { position:absolute; opacity:0; pointer-events:none; }
.config-lock.locked { color:var(--theme-warning,#d9aa55); }
.config-lock.small { width:27px; height:27px; font-size:13px; }
.config-lock:has(input:focus-visible) { outline:2px solid var(--theme-accent,#4c8dff); outline-offset:2px; }
.config-lock:has(input:disabled) { cursor:not-allowed; opacity:.72; }
.io-source-field { margin:0 0 17px; text-align:left; }
.io-source-control { display:grid; grid-template-columns:minmax(0,1fr) 38px auto; align-items:center; gap:8px; }
.io-source-control input[type="text"] { min-width:0; }
.io-source-browse { width:38px; min-width:38px; padding:0; font-size:18px; }
.io-source-lock { flex:none; }
.io-link-settings[hidden] { display:none; }
.io-separate-links { display:grid; gap:2px; }
.tag-main-settings.inherited-settings input:disabled,
.tag-main-settings.inherited-settings select:disabled,
.tag-main-settings.inherited-settings textarea:disabled {
  opacity:1;
  color:var(--theme-muted,#778291);
  background:var(--theme-surface-3,#293544);
  border-color:var(--theme-line-strong,#536277);
  box-shadow:inset 3px 0 var(--theme-line-strong,#536277);
  cursor:not-allowed;
}
.tag-main-settings.inherited-settings label { color:var(--theme-muted,#778291); }
.config-panel-toggle { display:grid; place-items:center; width:32px; height:32px; padding:0; border:1px solid #41516b; border-radius:6px; background:#111a28; color:#b8ceef; font-size:18px; cursor:pointer; }
.config-panel-toggle:hover { border-color:#6e92c8; background:#19263a; color:#fff; }
.config-panel-toggle.small { width:27px; height:27px; font-size:15px; }
#alarm-settings-content[hidden] { display:none; }
.alarm-master { padding:12px; border:1px solid #344158; border-radius:8px; background:#0e1520; }
.alarm-master > div { margin:0; }
.alarm-type-panel { margin-top:16px; }
.alarm-type-panel[hidden], #alarm-unavailable[hidden] { display:none; }
.alarm-boundaries { display:grid; grid-template-columns:repeat(2,minmax(240px,1fr)); gap:12px; }
.alarm-boundary-card { padding:14px; border:1px solid #344158; border-radius:8px; background:#0e1520; }
.alarm-boundary-card h3 { color:#9dc0ff; }
.boundary-header { margin-bottom:12px; }
.boundary-header h3 { margin:0; }
.boolean-event-grid { display:grid; grid-template-columns:repeat(2,minmax(240px,1fr)); gap:12px; }
.settings-card { padding:14px; border:1px solid #344158; border-radius:8px; background:#0e1520; }
.settings-card h3 { color:#9dc0ff; }
.inhibitor-picker { position:relative; margin:0 0 17px; }
.inhibitor-picker-control { display:grid; grid-template-columns:minmax(0,1fr) 38px 38px; gap:6px; }
.inhibitor-picker-control input { min-width:0; }
.inhibitor-picker-browse,.inhibitor-picker-clear { width:38px; padding:0; font-size:18px; }
.inhibitor-suggestions { position:absolute; z-index:40; top:calc(100% - 15px); right:82px; left:0; max-height:260px; padding:5px; overflow:auto; border:1px solid var(--theme-line-strong); border-radius:7px; color:var(--theme-text); background:var(--theme-surface); box-shadow:var(--theme-shadow); }
.inhibitor-suggestions[hidden] { display:none; }
.inhibitor-result { display:grid; width:100%; gap:2px; padding:8px 10px; border:0; border-radius:5px; color:var(--theme-text); background:transparent; text-align:left; cursor:pointer; }
.inhibitor-result:hover,.inhibitor-result:focus-visible { color:var(--theme-accent); background:var(--theme-accent-soft); outline:none; }
.inhibitor-result small { color:var(--theme-muted); font-size:10px; }
.inhibitor-modal { position:fixed; z-index:5100; inset:0; display:grid; place-items:center; padding:24px; background:var(--theme-overlay); }
.inhibitor-modal[hidden] { display:none; }
.inhibitor-modal-dialog { display:flex; width:min(680px,calc(100vw - 32px)); max-height:min(720px,calc(100vh - 32px)); flex-direction:column; overflow:hidden; border:1px solid var(--theme-line-strong); border-radius:10px; color:var(--theme-text); background:var(--theme-surface); box-shadow:var(--theme-shadow); }
.inhibitor-modal-dialog>header,.inhibitor-modal-dialog>footer { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 15px; background:var(--theme-surface-2); }
.inhibitor-modal-dialog>header { border-bottom:1px solid var(--theme-line); }
.inhibitor-modal-dialog>header h2 { margin:0; font-size:18px; }
.inhibitor-modal-dialog>header button { display:grid; width:30px; height:30px; place-items:center; padding:0; border:1px solid var(--theme-line); border-radius:5px; color:var(--theme-text); background:var(--theme-input); font-size:20px; cursor:pointer; }
.inhibitor-modal-dialog>footer { border-top:1px solid var(--theme-line); }
.inhibitor-modal-dialog>footer span { color:var(--theme-muted); font-size:12px; }
.inhibitor-modal-body { min-height:0; padding:14px 15px; overflow:auto; }
.inhibitor-modal-body>label { margin-bottom:6px; }
.inhibitor-modal-body>.panel-hint { margin:9px 0; }
.inhibitor-modal-results { display:grid; gap:3px; min-height:120px; }
.io-source-modal-dialog { width:min(760px,calc(100vw - 32px)); }
.io-source-modal-filters { display:grid; grid-template-columns:minmax(180px,.75fr) minmax(220px,1fr); gap:12px; }
.io-source-modal-filters label { display:grid; align-content:start; gap:6px; margin:0; }
.io-source-modal-filters label:last-child { grid-column:1/-1; }
.io-source-modal-filters select,.io-source-modal-filters input { width:100%; min-width:0; }
.io-source-table-wrap { min-height:260px; overflow:auto; border:1px solid var(--theme-line); border-radius:7px; }
.io-source-table { width:100%; border-collapse:collapse; font-size:12px; }
.io-source-table th,.io-source-table td { padding:8px 10px; border-bottom:1px solid var(--theme-line); text-align:left; vertical-align:middle; }
.io-source-table th { position:sticky; z-index:1; top:0; color:var(--theme-muted); background:var(--theme-surface-2); white-space:nowrap; }
.io-source-table tbody tr:last-child td { border-bottom:0; }
.io-source-table tbody tr:hover { background:var(--theme-accent-soft); }
.io-source-table td:nth-child(2) { color:var(--theme-accent); font-family:ui-monospace,Consolas,monospace; }
.io-source-table td:last-child { width:1%; text-align:right; }
.io-source-table-empty { height:150px; color:var(--theme-muted); text-align:center!important; }
.io-source-pagination { justify-content:center!important; }
.io-source-pagination nav { display:flex; align-items:center; justify-content:center; gap:4px; }
.io-source-pagination nav .button { min-width:32px; padding-inline:7px; }
.io-source-pagination nav .is-current { border-color:var(--theme-accent); color:var(--theme-surface); background:var(--theme-accent); }
.io-source-pagination nav span { min-width:auto; padding:0 2px; }
.runtime-deploy-modal{position:fixed;z-index:6200;inset:0;display:grid;place-items:center;padding:24px;background:var(--theme-overlay)}
.runtime-deploy-modal[hidden]{display:none}
.runtime-deploy-modal.is-minimized{place-items:end;padding:16px;pointer-events:none;background:transparent}
.runtime-deploy-dialog{width:min(620px,calc(100vw - 32px));overflow:hidden;border:1px solid var(--theme-line-strong);border-radius:10px;color:var(--theme-text);background:var(--theme-surface);box-shadow:var(--theme-shadow)}
.runtime-deploy-modal.is-minimized .runtime-deploy-dialog{width:min(430px,calc(100vw - 24px));pointer-events:auto;cursor:pointer}
.runtime-deploy-dialog>header,.runtime-deploy-dialog>footer{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 16px;background:var(--theme-surface-2)}
.runtime-deploy-dialog>header{border-bottom:1px solid var(--theme-line)}
.runtime-deploy-dialog>footer{border-top:1px solid var(--theme-line)}
.runtime-deploy-dialog>header small,.runtime-deploy-dialog>footer span{color:var(--theme-muted);font-size:11px}
.runtime-deploy-dialog h2{margin:2px 0 0;font-size:18px}
.runtime-deploy-dialog>header button{display:grid;width:30px;height:30px;padding:0;place-items:center;border:1px solid var(--theme-line);border-radius:5px;color:var(--theme-text);background:var(--theme-input);font-size:20px;cursor:pointer}
.runtime-deploy-mini-summary{display:none;min-width:0;flex:1;align-items:center;justify-content:flex-end;gap:10px}
.runtime-deploy-mini-summary strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.runtime-deploy-mini-summary span{color:var(--theme-accent);font-variant-numeric:tabular-nums}
.runtime-deploy-modal.is-minimized .runtime-deploy-mini-summary{display:flex}
.runtime-deploy-modal.is-minimized .runtime-deploy-body,.runtime-deploy-modal.is-minimized .runtime-deploy-dialog>footer{display:none}
.runtime-deploy-modal.is-minimized .runtime-deploy-dialog>header button{width:auto;min-width:92px;padding:0 10px;font-size:12px}
.runtime-deploy-body{padding:18px 16px}
.runtime-deploy-progress-line{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.runtime-deploy-progress-line span{color:var(--theme-accent);font-variant-numeric:tabular-nums}
.runtime-deploy-body progress{display:block;width:100%;height:16px;accent-color:var(--theme-accent)}
.runtime-deploy-body>p{margin:11px 0 0;color:var(--theme-muted);font-size:12px}
.runtime-deploy-metrics{padding:9px;border:1px solid var(--theme-line);border-radius:6px;background:var(--theme-input);font-variant-numeric:tabular-nums}
.runtime-deploy-workers{display:grid;max-height:250px;gap:7px;overflow:auto}
.runtime-deploy-workers[hidden]{display:none}
.runtime-deploy-workers>div{display:grid;grid-template-columns:82px minmax(130px,1fr) 120px;align-items:center;gap:5px 10px;padding:8px 10px;border:1px solid var(--theme-line);border-radius:6px;background:var(--theme-surface-2)}
.runtime-deploy-workers strong{font-size:12px}
.runtime-deploy-workers span{overflow:hidden;color:var(--theme-muted);font-size:11px;text-overflow:ellipsis;white-space:nowrap}
.runtime-deploy-workers progress{width:120px;height:7px}
.runtime-deploy-workers small{grid-column:2/4;color:var(--theme-muted);font-size:10px;font-variant-numeric:tabular-nums}
.runtime-deploy-error{max-height:180px;margin:12px 0 0;padding:10px;overflow:auto;border:1px solid var(--theme-danger);border-radius:6px;color:var(--theme-danger);background:var(--theme-surface-2);white-space:pre-wrap}
.runtime-deploy-footer-actions{display:flex;align-items:center;gap:8px}
@media(max-width:950px){.tag-config-grid{grid-template-columns:1fr}.alarm-boundaries{grid-template-columns:1fr 1fr}}
@media(max-width:620px){.object-filter{grid-template-columns:1fr}.object-filter small{grid-column:1;grid-row:auto}.tag-config-page{padding:12px}.tag-config-header{align-items:stretch;flex-direction:column}.tag-config-header .actions{justify-content:flex-start}.alarm-boundaries,.boolean-event-grid{grid-template-columns:1fr}}

.runtime-monitor { display:grid; gap:14px; }
.runtime-monitor-summary>header,.runtime-catalog>header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.runtime-monitor-summary h3,.runtime-catalog h3 { margin-bottom:4px; }
.runtime-status-badge { padding:5px 10px; border:1px solid var(--theme-line-strong); border-radius:999px; color:var(--theme-muted); background:var(--theme-surface-2); font-size:12px; text-transform:uppercase; }
.runtime-status-badge[data-status="ok"] { border-color:#3c8b68; color:#75d6a6; background:#16382b; }
.runtime-status-badge[data-status="activating"] { border-color:#3d79a8; color:#8dcbff; background:#18334a; }
.runtime-status-badge[data-status="idle"] { border-color:#8c7638; color:#e3c36d; background:#3b321a; }
.runtime-status-badge[data-status="degraded"],.runtime-status-badge[data-status="offline"] { border-color:#984553; color:#ff9daa; background:#421f26; }
.runtime-stat-grid { display:grid; grid-template-columns:repeat(6,minmax(100px,1fr)); gap:8px; margin-top:16px; }
.runtime-stat-grid>div,.runtime-resource-grid>div { min-width:0; padding:10px 12px; border:1px solid var(--theme-line); border-radius:7px; background:var(--theme-surface-2); }
.runtime-stat-grid dt { color:var(--theme-muted); font-size:11px; }
.runtime-stat-grid dd { margin:4px 0 0; overflow:hidden; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
.runtime-resource-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:8px; margin-top:14px; }
.runtime-resource-grid>div { display:grid; gap:4px; }
.runtime-resource-grid span { color:var(--theme-accent); font-size:18px; font-weight:700; }
.runtime-resource-grid small { color:var(--theme-muted); }
.runtime-monitor-columns { display:grid; grid-template-columns:1fr 1fr; gap:14px; min-width:0; }
.runtime-catalog { min-width:0; }
.runtime-catalog [data-runtime-panel-body] { display:grid; grid-template-rows:auto minmax(320px,1fr) auto; }
.runtime-catalog [data-runtime-panel-body][hidden] { display:none; }
.runtime-catalog input { width:min(230px,100%); margin-top:12px; }
.panel-collapse-toggle { min-width:30px; height:30px; padding:0; border:1px solid var(--theme-line); border-radius:6px; color:var(--theme-text); background:var(--theme-surface-2); cursor:pointer; font-size:16px; }
.panel-collapse-toggle:hover { border-color:var(--theme-accent); color:var(--theme-accent); }
.runtime-catalog.is-collapsed { align-self:start; }
.runtime-table { min-height:320px; margin-top:12px; overflow:auto; border:1px solid var(--theme-line); border-radius:7px; }
.runtime-table>div { display:grid; grid-template-columns:minmax(180px,1fr) minmax(90px,.45fr); gap:4px 12px; padding:7px 10px; border-bottom:1px solid var(--theme-line); }
.runtime-table>div:last-child { border-bottom:0; }
.runtime-table strong,.runtime-table span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.runtime-table span { color:var(--theme-accent); text-align:right; }
.runtime-table small { grid-column:1/-1; color:var(--theme-muted); }
.runtime-catalog footer { display:flex; align-items:center; justify-content:center; gap:8px; padding-top:10px; }
.runtime-catalog footer span { min-width:130px; color:var(--theme-muted); font-size:12px; text-align:center; }
.runtime-watch-toolbar{display:flex;align-items:center;gap:8px;margin-top:12px}.runtime-watch-toolbar input{margin-top:0;flex:1}.runtime-watch-toolbar .muted{margin-left:auto}.runtime-watch-table{min-height:180px}.runtime-watch-row,.runtime-picker-row{grid-template-columns:minmax(220px,1fr) minmax(100px,.4fr) auto!important;align-items:center}.runtime-watch-row button{width:26px;height:26px;padding:0;border:1px solid var(--theme-line);border-radius:5px;color:var(--theme-muted);background:transparent;cursor:pointer}.runtime-watch-row button:hover{border-color:var(--theme-danger);color:var(--theme-danger)}
.runtime-token-field{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:stretch;gap:8px}.runtime-token-field input{min-width:0}.runtime-token-field .button{white-space:nowrap}@media(max-width:560px){.runtime-token-field{grid-template-columns:1fr}.runtime-token-field .button{width:100%}}
.runtime-value-picker{width:min(900px,calc(100vw - 32px));max-height:80vh;padding:0;border:1px solid var(--theme-line-strong);border-radius:10px;color:var(--theme-text);background:var(--theme-surface);box-shadow:var(--theme-shadow)}.runtime-value-picker::backdrop{background:rgba(0,0,0,.55)}.runtime-value-picker form{display:grid;grid-template-rows:auto auto minmax(280px,1fr) auto;gap:12px;max-height:80vh;padding:16px}.runtime-value-picker header,.runtime-value-picker footer{display:flex;align-items:center;justify-content:space-between;gap:12px}.runtime-value-picker h3{margin:0}.runtime-value-picker header p{margin:4px 0 0}.runtime-value-picker>form>input{width:100%}.runtime-value-picker .runtime-table{min-height:280px;margin-top:0}.runtime-value-picker footer{justify-content:center}.runtime-value-picker footer span{min-width:160px;text-align:center;color:var(--theme-muted)}
.runtime-log-list { max-height:320px; margin-top:12px; overflow:auto; border:1px solid var(--theme-line); border-radius:7px; }
.runtime-log { display:grid; grid-template-columns:150px 70px 1fr; gap:8px; padding:6px 9px; border-bottom:1px solid var(--theme-line); font:12px/1.4 ui-monospace,Consolas,monospace; }
.runtime-log time { color:var(--theme-muted); }.runtime-log strong { color:var(--theme-accent); }.runtime-log-error strong { color:var(--theme-danger); }.runtime-log-warning strong { color:var(--theme-warning); }
@media(max-width:1100px){.runtime-stat-grid{grid-template-columns:repeat(3,1fr)}.runtime-monitor-columns{grid-template-columns:1fr}}
.topbar.project-topbar{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.5fr) minmax(0,1fr)}
.project-topbar-identity{display:flex;align-items:center;gap:12px;min-width:0}
.project-topbar-identity>strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.project-topbar-identity>.logo,.project-topbar-identity>.role,.project-topbar-identity>button{flex-shrink:0}
.project-topbar-description{grid-column:2;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center;font-weight:600;color:var(--theme-text)}
.project-topbar>.top-link{grid-column:3;justify-self:end}
@media(max-width:800px){.topbar.project-topbar{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto}.project-topbar-identity{gap:6px}}
.object-row-details { display:flex; align-items:center; justify-content:flex-end; gap:10px; flex-wrap:wrap; }
.tag-feature-icons { display:inline-flex; align-items:center; gap:6px; }
.tag-feature-icon { display:inline-flex; width:18px; height:18px; color:var(--theme-text); }
.tag-feature-icon svg { width:100%; height:100%; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.tag-main-settings textarea.tag-unit-input { min-height:0; height:auto; resize:none; overflow-x:auto; overflow-y:hidden; }
.tag-group-divider { display:flex; align-items:center; gap:10px; margin:10px 0 4px; color:var(--theme-muted); font-size:12px; font-weight:600; }
.tag-group-divider::after { content:""; flex:1; border-top:1px solid var(--theme-line); }
.object-row.tag-row-description { grid-template-columns:minmax(0,1fr) minmax(0,2fr) minmax(0,1fr); gap:10px; }
.tag-row-identity { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; min-width:0; }
.tag-row-identity .object-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tag-row-comment { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-align:center; color:var(--theme-muted); font-size:12px; }
.tag-row-description .object-row-details { min-width:0; overflow-wrap:anywhere; }
.tag-row-description .inheritance-badge { grid-column:1/-1; max-width:100%; white-space:normal; }
@media (max-width:700px) {
  .object-row.tag-row-description { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
  .tag-row-description .object-row-details { grid-column:2; grid-row:1; }
  .tag-row-comment { grid-column:1/-1; grid-row:2; }
  .tag-row-comment:empty { display:none; }
}
