/* ShilenGuard Console: public-site identity, accessible working surfaces.
   Explicit layers keep legacy component specificity out of the design contract. */
@layer components, release;
@import url('portal_components.css?v=20261008c') layer(components);

/* Native cross-document snapshots cause a flash on some Chromium builds. */
@view-transition { navigation:none; }

@font-face { font-family:Inter; src:url('/static/landing/inter-latin-400.woff2') format('woff2'); font-weight:400; font-display:swap; unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+20AC,U+2122,U+2190-2199; }
@font-face { font-family:Inter; src:url('/static/landing/inter-latin-500.woff2') format('woff2'); font-weight:500; font-display:swap; unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+20AC,U+2122,U+2190-2199; }
@font-face { font-family:Inter; src:url('/static/landing/inter-latin-600.woff2') format('woff2'); font-weight:600 900; font-display:swap; unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+20AC,U+2122,U+2190-2199; }
@font-face { font-family:Inter; src:url('/static/landing/inter-cyrillic.woff2') format('woff2'); font-weight:400 900; font-display:swap; unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family:Montserrat; src:url('/static/landing/montserrat-latin-600.woff2') format('woff2'); font-weight:600; font-display:swap; unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+20AC; }
@font-face { font-family:Montserrat; src:url('/static/landing/montserrat-latin-700.woff2') format('woff2'); font-weight:700 900; font-display:swap; unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+20AC; }
@font-face { font-family:Montserrat; src:url('/static/landing/montserrat-cyrillic.woff2') format('woff2'); font-weight:600 900; font-display:swap; unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family:'Geist Mono'; src:url('/static/landing/geist-mono-latin-400.woff2') format('woff2'); font-weight:400 600; font-display:swap; }

@layer release {
  :root, body.portal-ui {
    --font-sans:Inter,'Segoe UI',system-ui,sans-serif;
    --font-heading:Montserrat,Inter,'Segoe UI',sans-serif;
    --font-mono:'Geist Mono',Consolas,monospace;
    --p-bg:#050608; --p-bg-2:#0a0d11; --p-surface:#101419; --p-surface-2:#161c23;
    --p-border:#263039; --p-border-strong:#3d4c58;
    --p-text:#e8eef2; --p-muted:#a6b1ba; --p-faint:#8d9ba7;
    --p-accent:#00a5ef; --p-accent-hover:#30bbff; --p-accent-2:#67ccff;
    --p-accent-soft:rgb(0 165 239 / .1); --p-accent-ring:rgb(0 165 239 / .23);
    --p-info:#67ccff; --p-info-soft:rgb(0 165 239 / .1);
    --p-ok:#54d9a3; --p-ok-soft:rgb(0 187 127 / .09);
    --p-warn:#ffb067; --p-warn-soft:rgb(254 110 0 / .09);
    --p-danger:#ff8e98; --p-danger-soft:rgb(242 90 110 / .09);
    --p-radius:10px; --p-sidebar:244px; --p-shadow:none;
    --ui-gutter:clamp(20px,2vw,36px); --ui-gap:20px; --ui-control:40px;
    background:var(--p-bg); color:var(--p-text); font:400 15px/1.55 var(--font-sans);
    -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
  }
  *, *::before, *::after { box-sizing:border-box; }
  html { scrollbar-gutter:stable; }
  body { min-width:320px; }
  [hidden] { display:none!important; }
  ::selection { color:#00131c; background:#67ccff; }
  :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible { outline:2px solid var(--p-accent); outline-offset:3px; }
  :is(h1,h2,h3,h4) { font-family:var(--font-heading); font-weight:600; color:var(--p-text); letter-spacing:-.025em; line-height:1.35; }
  h2 { font-size:22px; } h3 { font-size:18px; } h4 { font-size:16px; }
  :is(p,li,span,small,label,strong,code,a,time,summary) { text-rendering:optimizeLegibility; }
  :is(.muted,.field-hint,.hub-hint,.hub-module-hint,.admin-hint,.page-intro-sub) { color:var(--p-muted); font-size:14px; line-height:1.6; }
  small { font-size:13px; }
  :is(.mono,code,pre) { font-family:var(--font-mono); font-size:13px; font-variant-numeric:tabular-nums; }
  a { text-underline-offset:4px; }
  :is(.card,.panel,.stat-card,.admin-card,.policy-card,.diagnostic-snapshot,.hub-module) { background:var(--p-surface); border:1px solid var(--p-border); border-radius:var(--p-radius); box-shadow:none; }
  :is(.card,.panel,.stat-card):hover { transform:none; box-shadow:none; }
  .card:not(.panel-flush):not(.data-table-wrap) { padding:22px; }
  :is(.card,.panel,.nav-item,.stat-card,.dashboard-metric)::before,
  :is(.card,.panel,.nav-item,.stat-card,.dashboard-metric)::after { content:none; display:none; }
  .app-bg { display:none; }
  .app-shell { display:flex; min-height:100dvh; }
  .main { width:calc(100% - var(--p-sidebar)); min-width:0; margin-left:var(--p-sidebar); }
  .main>.content { width:100%; max-width:1920px; margin-inline:auto; padding:24px var(--ui-gutter) 48px; }
  [data-page-kind='editor'] .main>.content { max-width:1560px; }
  [data-page-kind='reading'] .main>.content { max-width:1440px; }
  .content>.stack { display:flex; flex-direction:column; gap:var(--ui-gap); }
  .content>.stack>* { min-width:0; }
  .console-eyebrow { color:var(--p-faint); font:400 12px/1.4 var(--font-mono); letter-spacing:.09em; }
  .sidebar { position:fixed; inset:0 auto 0 0; z-index:50; width:var(--p-sidebar); height:100dvh; display:flex; flex-direction:column; padding:24px 16px 16px; background:#090c10; border-right:1px solid var(--p-border); box-shadow:none; }
  .sidebar-brand { min-height:34px; padding:0 6px; border:0; }
  .brand-mark { display:inline-flex; align-items:center; gap:11px; }
  .brand-mark .logo { width:28px; height:28px; border-radius:0; }
  .brand-mark .brand-wordmark { display:block; width:148px; height:20px; object-fit:contain; flex:none; }
  .brand-mark .name { font:600 17px var(--font-heading); letter-spacing:-.035em; }
  .brand-mark .name b { color:var(--p-accent-2); font-weight:600; }
  .nav-search { margin-top:28px; min-height:42px; display:flex; align-items:center; gap:9px; padding:9px 11px; width:100%; color:var(--p-muted); font:400 13px var(--font-sans); background:#0f141a; border:1px solid var(--p-border); border-radius:7px; cursor:pointer; }
  .nav-search .ui-icon { width:17px; height:17px; }
  .nav-search kbd { margin-left:auto; color:var(--p-faint); font:400 12px var(--font-mono); white-space:nowrap; }
  .sidebar-nav { flex:1; min-height:0; overflow-y:auto; padding-top:30px; scrollbar-width:thin; }
  .nav-group-title { padding:0 12px; margin:0 0 12px; color:var(--p-faint); font-size:12px; font-weight:500; text-transform:none; letter-spacing:0; }
  .nav-item { min-height:46px; display:flex; align-items:center; gap:12px; padding:11px 12px; margin:3px 0; font-size:14px; font-weight:500; color:var(--p-muted); border:1px solid transparent; border-radius:7px; transition:background .12s,color .12s; }
  .nav-item:hover { color:var(--p-text); background:#141b22; transform:none; }
  .nav-item.active { background:#14232f; border-color:#24435a; color:#b9e7ff; box-shadow:none; }
  .nav-icon { color:var(--p-faint); width:20px; height:20px; }
  .nav-item.active .nav-icon { color:var(--p-accent-2); }
  .sidebar-user { display:flex; gap:10px; margin-top:22px; padding:14px 8px 0; background:none; border:0; border-top:1px solid var(--p-border); border-radius:0; }
  .avatar { width:36px; height:36px; flex:none; border-radius:8px; background:#142b39; color:#9cddff; font:600 14px var(--font-sans); box-shadow:none; }
  .sidebar-user .meta { min-width:0; flex:1; }
  .sidebar-user .n { font-size:14px; overflow:hidden; text-overflow:ellipsis; }
  .sidebar-user .r { margin-top:2px; color:var(--p-faint); font-size:12px; text-transform:none; letter-spacing:0; }
  .logout { width:30px; height:36px; padding:5px; background:none; color:var(--p-faint); border:0; cursor:pointer; }
  .logout:hover { color:var(--p-text); }
  .topbar { position:sticky; top:0; z-index:30; display:flex; flex-wrap:wrap; align-items:center; gap:14px 24px; min-height:76px; padding:16px var(--ui-gutter); background:#090c10; border-bottom:1px solid var(--p-border); backdrop-filter:none; }
  .topbar-head { display:flex; align-items:center; gap:14px; flex:1 1 180px; min-width:0; }
  .page-heading { min-width:0; }
  .page-heading .console-eyebrow { display:block; margin-bottom:5px; font-size:12px; }
  .topbar h1 { margin:0; color:var(--p-text); font:600 24px/1.25 var(--font-heading); letter-spacing:-.04em; background:none; -webkit-text-fill-color:currentColor; overflow-wrap:anywhere; }
  .topbar-actions { display:flex; flex:0 1 auto; width:auto; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:10px 14px; margin:0; padding:0; border:0; background:none; }
  .admin-scope-form { display:flex; flex-direction:row; align-items:center; gap:8px; padding:0; border:0; }
  .scope-select-label { color:var(--p-faint); font-size:12px; font-weight:400; white-space:normal; }
  .scope-select { width:210px; max-width:240px; min-width:0; }
  .gs-scope-select { width:150px; }
  .topbar-actions :is(.role-preview-switch,.lang-switch) { display:flex; align-items:center; gap:8px; margin:0; padding:0; }
  .role-preview-switch-label { color:var(--p-muted); font-size:12px; white-space:nowrap; }
  .tz-clock-wrap { width:auto; flex:none; }
  .tz-clock { justify-content:space-between; width:auto; min-height:40px; background:var(--p-bg-2); border-color:var(--p-border); }
  .tz-clock-time { font-size:13px; color:var(--p-muted); }
  .tz-picker-panel { background:#12181e; border-color:var(--p-border-strong); border-radius:10px; padding:18px; max-height:calc(100dvh - 24px); overflow-y:auto; }
  :is(.tz-picker-title,.tz-hour-opt) { font-size:13px; }
  .segmented { padding:3px; background:var(--p-bg-2); border:1px solid var(--p-border); border-radius:7px; gap:3px; }
  .segmented button { padding:7px 12px; font:500 13px/1.4 var(--font-sans); min-height:32px; border:0; border-radius:4px; color:var(--p-muted); background:none; }
  .segmented button.active { color:#a3deff; background:#1a3445; box-shadow:none; }
  .section-tabs { display:flex; flex-wrap:wrap; gap:4px; padding:0 0 14px; margin:0; border-bottom:1px solid var(--p-border); }
  .section-tabs a { padding:9px 16px; color:var(--p-muted); font-size:14px; font-weight:500; border:1px solid transparent; border-radius:6px; }
  .section-tabs a.active { color:#a3deff; background:#102531; border-color:#23475e; box-shadow:none; }
  .section-tabs a:hover { background:#151c23; color:var(--p-text); }
  .scope-banner { display:flex; align-items:center; gap:8px; padding:10px 14px; margin:0; color:var(--p-muted); background:#0d1217; border:1px solid var(--p-border); border-radius:6px; font-size:13px; border-left:1px solid var(--p-border); }
  .scope-banner::before { content:'\25C7'; color:var(--p-accent-2); font-size:15px; }
  :is(.alert,.form-ok,.admin-toast) { padding:12px 16px; border-radius:7px; font-size:14px; line-height:1.5; }
  .alert { border-left-width:1px; }
  .alert-info { color:#a3deff; background:var(--p-info-soft); border-color:#25465b; }
  .alert-warn { color:var(--p-warn); background:var(--p-warn-soft); border-color:#57402e; }
  :is(.btn,.admin-btn,.hwid-note-btn) { min-height:40px; display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:9px 15px; color:var(--p-text); background:#19222b; border:1px solid #34424d; border-radius:6px; font:500 14px/1.35 var(--font-sans); text-decoration:none; box-shadow:none; transform:none; cursor:pointer; transition:background .12s,border-color .12s; }
  .btn:hover { background:#222f3a; border-color:#536773; transform:none; }
  :is(.btn-primary,.hwid-note-save) { background:var(--p-accent); border-color:var(--p-accent); color:#00131c; font-weight:600; }
  :is(.btn-primary,.hwid-note-save):hover { color:#00131c; background:var(--p-accent-hover); border-color:var(--p-accent-hover); box-shadow:none; filter:none; }
  .btn-ghost { background:transparent; border-color:var(--p-border); color:var(--p-muted); }
  .btn-sm { min-height:34px; padding:6px 11px; font-size:13px; }
  :is(.btn-danger,.btn.danger) { color:var(--p-danger); background:var(--p-danger-soft); border-color:#54343c; }
  :is(.btn,input,select,textarea):disabled { opacity:.55; cursor:not-allowed; }
  .field { margin-bottom:20px; }
  :is(.field,.ops-field)>label { display:block; margin-bottom:7px; font-size:14px; font-weight:500; color:var(--p-muted); }
  :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea) { color:var(--p-text); background:var(--p-bg-2); border:1px solid #364550; border-radius:6px; font:400 14px/1.5 var(--font-sans); max-width:100%; padding:9px 12px; }
  :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select) { min-height:40px; }
  select { padding-right:30px; }
  input::placeholder,textarea::placeholder { color:var(--p-faint); opacity:1; }
  :is(input,select,textarea):focus { outline:none; border-color:var(--p-accent); box-shadow:0 0 0 3px var(--p-accent-ring); }
  :is(input[type=checkbox],input[type=radio]) { accent-color:var(--p-accent); width:17px; height:17px; flex:none; }
  :is(.check,.toggle) { font-size:14px; color:var(--p-text); line-height:1.5; }
  .field-hint { margin-top:8px; font-size:13px; }
  .form-card { width:100%; max-width:none; }
  .server-field-pair,.admin-fields-2 { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
  .server-settings-form .detection-layers { padding-top:20px; margin-top:12px; border-top:1px solid var(--p-border); }
  .detection-page-intro { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:20px; }
  .detection-page-intro h2 { font-size:21px; }
  .detection-server-picker { display:flex; flex-direction:column; align-items:stretch; min-width:240px; max-width:360px; gap:6px; }
  .detection-server-picker label { font-size:13px; }
  .detection-server-picker small { font-size:13px; }
  .detection-policy-layout { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:20px; }
  .detection-policy-main { grid-row:auto; display:grid; grid-template-columns:minmax(0,1fr); gap:20px; }
  .detection-policy-main>.policy-section:nth-child(3) { grid-column:auto; }
  .policy-section-head { gap:12px; padding-bottom:18px; margin-bottom:6px; }
  .policy-section-head p { font-size:14px; line-height:1.6; }
  .policy-rule,.policy-rule.is-ban { gap:16px; }
  .policy-rule.is-ban { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .policy-step { color:#00131c; font-weight:600; }
  .policy-preview { grid-row:auto; position:sticky; top:120px; display:flex; flex-direction:column; align-items:stretch; gap:16px; }
  .policy-preview>* { grid-column:auto; grid-row:auto; margin:0; }
  .policy-preview h3 { display:block; font-size:18px; }
  .policy-preview .eyebrow { font-size:12px; color:var(--p-muted); }
  .policy-preview-result { padding:16px; background:#102733; border:1px solid #2b4c60; border-radius:6px; font-size:15px; font-weight:500; }
  .policy-preview-note { padding:12px; font-size:14px; background:#0d1218; }
  .policy-preview-note.is-active { color:var(--p-warn); }
  .policy-preview ul { display:block; padding-left:18px; font-size:13px; line-height:1.6; }
  .policy-preview ul li+li { margin-top:8px; }
  .policy-preview .btn { width:100%; margin-top:4px; }
  .escalation-identity { gap:16px; }
  .escalation-identity .field { padding:14px; }
  .escalation-identity small { display:block; margin-top:8px; font-size:13px; line-height:1.6; color:var(--p-muted); }
  .escalation-ladder-head { flex-wrap:wrap; align-items:center; margin:24px 0 16px; }
  .escalation-ladder-head h4 { font-size:17px; }
  .escalation-ladder-head p { font-size:14px; }
  .escalation-steps { grid-template-columns:minmax(0,1fr); gap:12px; }
  .escalation-step { grid-template-columns:28px minmax(0,1fr) minmax(220px,.9fr) 26px; gap:12px; padding:16px; }
  .escalation-step-copy small { font-size:13px; line-height:1.5; }
  .escalation-step-number { background:#132c3b; color:var(--p-accent-2); }
  .detection-category-list { grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; padding-top:18px; }
  .detection-category-card summary { padding:16px; }
  .category-rule.is-ban { grid-template-columns:minmax(0,1fr); }
  .category-rule .policy-action-field { grid-column:auto; }
  .duration-control { grid-template-columns:minmax(65px,.6fr) minmax(110px,1fr); }
  .proj-edit-body { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:28px; }
  .proj-edit-col { min-width:0; }
  .proj-edit-block-label,.proj-edit-key-label,.admin-card-title { font-size:14px; font-weight:500; letter-spacing:0; text-transform:none; color:var(--p-muted); }
  .proj-edit-card { padding:22px; }
  .proj-edit-split { grid-template-columns:minmax(0,1fr); gap:20px; }
  .project-keys { margin-top:28px; padding-top:20px; border-top:1px solid var(--p-border); }
  .project-keys>summary { font-size:15px; color:var(--p-muted); }
  .proj-edit-key-value { font-size:13px; line-height:1.7; }
  .proj-edit-key-head { flex-wrap:wrap; gap:10px; }
  .opt-chip { border-radius:6px; font-size:14px; }
  .opt-chip:has(input:checked) { box-shadow:none; background:#102735; border-color:#36586d; }
  .detection-layer-row { padding:14px 0; }
  .hub-split { gap:20px; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ops-page { gap:20px; }
  .ops-toolbar__row,.ops-toolbar__fields { gap:14px; }
  .ops-toolbar__hint { margin-top:14px; font-size:13px; }
  .ops-field--grow { flex-basis:300px; }
  .data-table-wrap { width:100%; min-width:0; max-width:100%; overflow-x:auto; overscroll-behavior-x:contain; scrollbar-width:thin; border-radius:inherit; }
  .card.data-table-wrap { border-radius:var(--p-radius); }
  .content>.stack>.btn { align-self:flex-start; }
  .content>.stack>:is(h2,h3,p) { margin:0; }
  .admin-card-title { color:var(--p-text); font:600 17px/1.4 var(--font-heading); }
  .admin-card,.proj-edit-card { padding:22px; }
  .admin-card-flush { padding:0; }
  .bans-hub-layout { grid-template-columns:minmax(0,1fr) 340px; }
  .bans-create-card { max-width:none; }
  .policy-create-card { top:120px; }
  .inline-process-toolbar { display:flex; flex-wrap:wrap; gap:12px; margin:16px 0; }
  .inline-process-toolbar input { flex:1 1 220px; }
  .inline-process-toolbar select { flex:0 1 220px; }
  .data-table { width:100%; border-collapse:collapse; font-size:14px; line-height:1.5; }
  .data-table th { padding:13px 16px; color:var(--p-muted); background:#121920; border-bottom:1px solid var(--p-border); text-align:left; font:500 12px/1.5 var(--font-sans); letter-spacing:.01em; text-transform:none; }
  .data-table td { padding:13px 16px; color:var(--p-text); border-bottom:1px solid #202931; vertical-align:middle; }
  .data-table tbody tr:last-child td { border-bottom:0; }
  .data-table tbody tr:hover { background:#141d24; }
  .data-table td .muted { font-size:13px; }
  :is(.badge,.ui-badge,.gs-chip,.key-chip,.key-chip-text) { font:500 12px/1.4 var(--font-sans); border-radius:5px; padding:3px 8px; box-shadow:none; text-transform:none; letter-spacing:0; }
  .key-chip { color:var(--p-muted); background:#171e26; border-color:var(--p-border); }
  .gs-chip { background:#112735; border-color:#28485d; color:#a3deff; }
  .badge.ok,.ui-badge.tone-ok { color:var(--p-ok); border-color:#254c3e; background:var(--p-ok-soft); }
  .badge.warn,.ui-badge.tone-warn { color:var(--p-warn); border-color:#58422e; background:var(--p-warn-soft); }
  .badge.danger,.badge.bad,.ui-badge.tone-danger { color:var(--p-danger); border-color:#56353d; background:var(--p-danger-soft); }
  .mon-clients-table { min-width:1020px; table-layout:fixed; }
  .mon-clients-table th:nth-child(1) { width:9%; }
  .mon-clients-table th:nth-child(2) { width:22%; }
  .mon-clients-table th:nth-child(3) { width:11%; }
  .mon-clients-table th:nth-child(4) { width:11.5%; }
  .mon-clients-table th:nth-child(5) { width:11%; }
  .mon-clients-table th:nth-child(6) { width:9.5%; }
  .mon-clients-table th:nth-child(7) { width:10%; }
  .mon-clients-table th:nth-child(8) { width:16%; }
  .mon-clients-table td { padding:12px 14px; }
  .mon-account-line { flex-wrap:wrap; }
  .mon-account-name,.mon-char { white-space:normal; overflow-wrap:anywhere; }
  .mon-seen,.mon-country { white-space:normal; }
  .mon-hwid { max-width:100%; }
  .mon-hwid-cell { display:table-cell; }
  .mon-actions { min-width:154px; width:160px; }
  .mon-action-buttons { flex-wrap:nowrap; gap:8px; }
  .mon-action-buttons>form { display:flex; flex-direction:column; }
  .mon-menu-trigger { min-width:34px; width:34px; padding:4px; font-size:20px; line-height:1; letter-spacing:1px; }
  .mon-action-menu { position:fixed; inset:auto; margin:0; width:240px; max-width:calc(100vw - 24px); padding:10px; background:#131c24; border:1px solid var(--p-border-strong); border-radius:8px; box-shadow:0 12px 40px #0008; color:var(--p-text); }
  .mon-action-menu:popover-open { display:grid; gap:8px; }
  .mon-action-menu form { width:100%; }
  .mon-action-menu .btn { width:100%; justify-content:flex-start; padding:10px 12px; }
  .mon-kpi { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
  .mon-kpi__item { display:flex; align-items:center; justify-content:space-between; padding:16px 18px; background:var(--p-surface); border:1px solid var(--p-border); border-radius:8px; }
  .mon-kpi__label { color:var(--p-muted); font-size:13px; letter-spacing:0; text-transform:none; }
  .mon-kpi__value { font-size:24px; line-height:1.2; font-weight:600; }
  :is(.mon-kpi__item--ok,.mon-kpi__item--bad,.mon-kpi__item--neutral,.device-signal) { border-left-width:1px; border-left-color:var(--p-border); }
  .refresh-toolbar { padding:0 2px; font-size:13px; }
  .dashboard-period { gap:12px; }
  .dashboard-period>div { flex:1; }
  .dashboard-period .muted { font-size:14px; }
  .dashboard-period h2 { margin:0 0 6px; font-size:22px; }
  .dashboard-metrics { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:12px; }
  .card.dashboard-metric { display:flex; flex-direction:column; padding:16px; gap:12px; min-height:0; }
  .dashboard-metric .metric-body { display:flex; flex-direction:column; gap:7px; }
  .dashboard-metric .metric-body>span { color:var(--p-muted); font-size:13px; line-height:1.4; }
  .dashboard-metric .metric-body>strong { color:var(--p-text); font:600 28px/1.1 var(--font-heading); letter-spacing:-.04em; }
  .dashboard-metric .metric-body>small { display:none; }
  .metric-icon { display:inline-flex; width:22px; height:22px; color:var(--p-accent-2); background:none; border:0; }
  .metric-icon svg { width:22px; height:22px; }
  .tone-warn .metric-icon { color:var(--p-warn); }
  .tone-danger .metric-icon { color:var(--p-danger); }
  .dashboard-activity { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.4fr); gap:20px; }
  .card.dashboard-compact { padding:18px 20px; }
  .dashboard-trend .trend-chart { display:block; width:100%; height:110px; margin-top:16px; }
  .dashboard-trend .trend-footer { margin-top:12px; display:flex; flex-wrap:wrap; gap:6px 16px; justify-content:space-between; font-size:13px; color:var(--p-muted); }
  .dashboard-note { font-size:13px; line-height:1.55; margin:12px 0 0; }
  .dashboard-server-table th { padding:10px 12px; }
  .dashboard-server-table td { padding:12px; }
  .dashboard-project-name { display:block; margin-top:3px; font-size:13px; }
  .dashboard-detections { min-width:900px; }
  .dashboard-detections td:nth-child(2) { width:45%; }
  .dashboard-detections td:nth-child(2) .muted { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; margin-top:4px; }
  .dash-events-head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; }
  .dash-events-head h3 { font-size:17px; text-transform:none; letter-spacing:-.02em; }
  .dash-events-head a { color:var(--p-accent-2); font-size:13px; }
  .infra-project-grid,.infra-server-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr)); align-items:start; gap:20px; }
  .infra-project-head { align-items:center; gap:16px; padding-bottom:16px; }
  .infra-project-name,.infra-card-name { font-family:var(--font-heading); font-size:18px; font-weight:600; }
  .infra-project-ip,.infra-card-id { margin-top:6px; font-size:13px; }
  .infra-kpi-grid { gap:12px; margin:8px 0 20px; }
  .infra-kpi { background:#0c1116; border:1px solid var(--p-border); padding:12px; border-radius:6px; }
  .infra-kpi.tone-ok,.infra-kpi.tone-warn { background:#0c1116; border-color:var(--p-border); }
  .infra-kpi-label { font-size:12px; text-transform:none; letter-spacing:0; }
  .infra-kpi-value { font-size:16px; font-weight:500; line-height:1.4; overflow-wrap:anywhere; }
  .project-slot { padding:16px 0; }
  .project-slot:last-child { padding-bottom:0; }
  .project-slot-meta { margin-bottom:10px; font-size:13px; }
  .project-slot-head { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:10px; margin-bottom:5px; font-size:15px; }
  .project-slot-edit summary { color:var(--p-muted); font-size:13px; padding:4px 0; }
  .project-slot-edit[open] summary { margin-bottom:12px; color:var(--p-accent-2); }
  .project-slot-controls { gap:8px; }
  .project-slot-controls .inline-form { flex-basis:220px; }
  .infra-card-actions { gap:10px; }
  .infra-action-link { background:#0d1319; border:1px solid var(--p-border); border-radius:6px; padding:12px; }
  .infra-action-title { font-size:14px; }
  .infra-action-desc { font-size:13px; margin-top:5px; line-height:1.5; }
  .events-table { min-width:950px; }
  .events-table .col-time { width:180px; }
  .events-table .col-resp { width:135px; }
  .events-table .col-acc { width:175px; }
  .events-table .col-origin { width:170px; }
  .events-table td { padding:16px; }
  .ev-reason-line strong { font-size:14px; color:var(--p-text); }
  .ev-reason-line code { font-size:12px; }
  .ev-reason-sub { font-size:13px; margin-top:6px; max-width:76ch; line-height:1.5; }
  .ev-row:hover td,.ev-row:focus-visible td { background:#14212c; }
  .ev-acc-name { font-size:14px; max-width:none; white-space:normal; overflow-wrap:anywhere; }
  :is(.ev-acc-char,.ev-origin-hwid,.ev-proc-count) { font-size:13px; }
  .events-table :is(.col-acc,.col-origin) { display:table-cell; }
  .ev-modal { width:min(1180px,calc(100vw - 40px)); max-height:calc(100dvh - 40px); border-radius:12px; background:var(--p-surface); border-color:var(--p-border-strong); }
  .ev-modal-body { padding:28px; max-height:calc(100dvh - 40px); }
  .ev-modal-head { align-items:flex-start; padding-right:42px; }
  .ev-modal-titleline strong { font:600 21px var(--font-heading); color:var(--p-text); }
  .ev-modal-close { top:18px; right:18px; width:34px; height:34px; }
  .ev-modal-meta { padding:16px; gap:12px 20px; margin:22px 0; background:var(--p-bg-2); border-color:var(--p-border); }
  .ev-modal-meta__k { font-size:12px; color:var(--p-faint); text-transform:none; letter-spacing:0; margin-bottom:4px; }
  .ev-modal-meta span:not(.ev-modal-meta__k) { font-size:14px; white-space:normal; overflow-wrap:anywhere; }
  .ev-modal-proclist .detection-process-item { flex-wrap:wrap; padding:14px; gap:12px; }
  .detection-process-list { animation:none; }
  .ev-modal-proclist .detection-process-item__main { flex-direction:column; align-items:flex-start; gap:6px; }
  .ev-modal-proclist .detection-process-item__head { flex-wrap:wrap; }
  .ev-modal-proclist .detection-process-item__path { white-space:normal; overflow-wrap:anywhere; font-size:13px; }
  .detection-process-item__hash { font-size:12px; color:var(--p-faint); }
  .diagnostic-process-table { min-width:940px; }
  .diagnostic-process-table td { padding:12px; }
  .process-executable { font-size:14px; }
  .process-pager,.process-file-details { font-size:13px; }
  .diagnostic-snapshot { content-visibility:auto; contain-intrinsic-size:auto 120px; }
  .diagnostic-snapshot summary { padding:6px 0; }
  :is(.device-full-hwid code,.code-block,.key-block,pre) { background:#090d12; border-color:var(--p-border); font-size:13px; line-height:1.7; border-radius:6px; }
  .device-signal { border-left:1px solid var(--p-border); }
  .doc-card { padding:28px; }
  .doc-card p,.doc-card li { font-size:15px; line-height:1.8; max-width:90ch; }
  .doc-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
  .doc-list,.doc-steps { border:0; background:none; }
  .doc-list li,.doc-steps li { max-width:none; }
  .doc-list li:last-child { border-bottom:1px solid var(--p-border); }
  .doc-steps li { padding:18px 0; }
  .detection-row { grid-template-columns:160px 150px minmax(0,1fr) 170px; background:none; }
  .detection-main,.detection-origin { grid-column:auto; grid-row:auto; }
  .detection-row--error { background:var(--p-surface); }
  .detection-row:hover { background:var(--p-surface-2); }
  .policy-row-actions { display:table-cell; white-space:normal; width:175px; }
  .policy-row-actions form { display:inline-flex; margin:3px 0; }
  .policy-identity summary { font-size:13px; white-space:nowrap; }
  .policy-identity[open] summary { margin-bottom:10px; }
  .policy-identity>code { display:block; overflow-wrap:anywhere; }
  .diagnostic-device-table { min-width:970px; width:100%; table-layout:fixed; }
  .diagnostic-device-table th:nth-child(1) { width:150px; }
  .diagnostic-device-table th:nth-child(2) { width:165px; }
  .diagnostic-device-table th:nth-child(4) { width:125px; }
  .diagnostic-device-table th:nth-child(5) { width:155px; }
  .diagnostic-device-table th:nth-child(6) { width:180px; }
  .diagnostic-device-actions { display:table-cell; white-space:normal; }
  .diagnostic-device-actions .btn { margin:3px 0; }
  .diagnostic-device-row td>strong,.diagnostic-device-row td>span { white-space:normal; overflow-wrap:anywhere; }
  .ops-field:has(input[name='country']) { flex:0 1 110px; }
  .infra-action-desc { white-space:normal; overflow:visible; text-overflow:clip; }
  .slot-edit-form { max-width:900px; }
  .doc-list li { padding:20px; background:#0b1015; border:1px solid var(--p-border); border-radius:8px; }
  .doc-list strong,.doc-steps strong { font-size:16px; }
  .doc-list span,.doc-steps span { font-size:15px; }
  .command-dialog { width:min(600px,calc(100vw - 32px)); max-height:80dvh; padding:24px; background:#111820; border:1px solid var(--p-border-strong); border-radius:12px; color:var(--p-text); }
  .command-dialog::backdrop,.ev-modal::backdrop { background:#000a; backdrop-filter:none; }
  .command-head { margin-bottom:20px; }
  .command-head h2 { font-size:20px; }
  .command-results { margin-top:14px; }
  .command-results a { font-size:14px; padding:13px; border-radius:6px; }
  .command-results a:hover,.command-results a:focus { background:#162b3a; }
  .hwid-note-editor,.hwid-note-tooltip,#sg-floating-tip { background:#141c23; border-color:var(--p-border-strong); color:var(--p-text); font-size:13px; }
  .hwid-note-badge.has-note { color:var(--p-accent-2); }
  .hwid-note-badge.has-note::after { background:var(--p-accent); }
  .release-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
  .release-card .section-head { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:20px; }
  .release-card h2 { margin-top:0; }
  .release-download { display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
  .release-download .muted { flex-basis:100%; margin:0; }
  .release-card.is-current { border-color:#315364; }
  .release-instructions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); padding:0; margin:20px 0 0; list-style:none; gap:16px; }
  .release-instructions li { background:#0c1117; border:1px solid var(--p-border); border-radius:7px; padding:16px; font-size:14px; }
  .release-instructions strong { display:block; color:var(--p-text); font-size:14px; margin-bottom:8px; }
  .release-instructions code { overflow-wrap:anywhere; }
  .auth-page { min-height:100dvh; display:flex; flex-direction:column; justify-content:flex-start; align-items:stretch; max-width:1400px; margin:auto; padding:40px clamp(24px,5vw,80px); position:relative; }
  .auth-langs { display:flex; justify-content:flex-start; width:100%; margin:0 0 60px; }
  .auth-layout { flex:1; display:grid; grid-template-columns:1.15fr 1fr; gap:clamp(40px,7vw,100px); align-items:center; padding-bottom:60px; }
  .auth-story { position:relative; min-width:0; padding:20px 0; }
  .auth-story h2 { font:700 clamp(36px,4vw,54px)/1.13 var(--font-heading); letter-spacing:-.04em; margin:24px 0; }
  .auth-story h2 span { color:var(--p-accent); }
  .auth-story p { max-width:42ch; margin:0; color:var(--p-muted); font-size:16px; line-height:1.8; }
  .auth-network { display:flex; align-items:center; gap:14px; max-width:440px; margin:40px 0; font:400 13px var(--font-mono); color:var(--p-accent-2); }
  .auth-network span { padding:12px 16px; border:1px solid #2a4657; background:#0c1720; }
  .auth-network i { height:1px; flex:1; background:#314652; }
  .auth-home { font-size:14px; color:var(--p-muted); }
  .auth-card { width:100%; max-width:460px; padding:36px; border:1px solid var(--p-border); border-radius:12px; background:var(--p-surface); box-shadow:none; }
  .auth-card h1 { font:600 25px/1.35 var(--font-heading); margin:0 0 12px; }
  .auth-sub { font-size:15px; color:var(--p-muted); margin:0 0 28px; }
  .auth-card .btn-primary { width:100%; min-height:44px; margin-top:20px; color:#00131c; }
  .auth-foot { border-top:1px solid var(--p-border); margin:28px 0 0; padding-top:22px; font-size:14px; line-height:1.7; }
  .auth-foot a { color:var(--p-accent-2); }
  .password-field { position:relative; }
  .password-field input { width:100%; padding-right:90px; }
  .password-toggle { position:absolute; right:6px; top:6px; bottom:6px; padding:0 8px; color:var(--p-muted); background:transparent; border:0; border-radius:4px; font:500 12px var(--font-sans); cursor:pointer; }
  .password-toggle:hover { color:var(--p-accent-2); background:#162733; }
  .dashboard-peak { margin-top:14px; padding-top:12px; border-top:1px solid var(--p-border); font-size:13px; }
  .dashboard-activity:not(:has(.dashboard-trend)) { grid-template-columns:minmax(0,1fr); }
  .dash-empty,.empty-state { padding:40px 24px; color:var(--p-muted); font-size:15px; text-align:center; }
  * { scrollbar-width:thin; scrollbar-color:#344550 transparent; }
  .skip-link { background:#162b3a; color:var(--p-text); }
  @media (max-width:1600px) {
    .topbar-head { flex-basis:100%; }
    .topbar-actions { width:100%; justify-content:flex-start; }
    .dashboard-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }
    .card.dashboard-metric { flex-direction:row; gap:14px; align-items:center; padding:16px 18px; }
    .dashboard-metric .metric-body { display:grid; grid-template-columns:1fr auto; align-items:center; width:100%; gap:12px; }
    .dashboard-metric .metric-body>strong { font-size:26px; }
    .dashboard-activity { grid-template-columns:minmax(0,1fr); }
  }
  @media (max-width:1280px) {
    .detection-row { grid-template-columns:160px minmax(0,1fr); }
    .detection-main,.detection-origin { grid-column:2; }
    .bans-hub-layout { grid-template-columns:minmax(0,1fr); }
    .detection-policy-layout { grid-template-columns:minmax(0,1fr); }
    .policy-preview { position:static; }
    .proj-edit-body { grid-template-columns:minmax(0,1fr); }
    .topbar-actions { justify-content:flex-start; width:100%; }
    .topbar-head { flex-basis:100%; }
    .infra-project-grid,.infra-server-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .infra-hub-layout { grid-template-columns:minmax(0,1fr); }
    .infra-create-card { position:static; }
  }
  @media (max-width:880px) {
    :root,body.portal-ui { --ui-gutter:20px; }
    .sidebar { width:244px; transform:translateX(-100%); }
    .main { width:100%; margin-left:0; }
    .topbar { position:relative; padding:18px 20px; }
    .topbar-head { flex-basis:auto; }
    .main>.content { padding:20px 20px 36px; }
    .portal-nav-toggle:checked~.app-shell .sidebar { transform:translateX(0); }
    .portal-nav-toggle:checked~.app-shell .sidebar-backdrop { display:block; position:fixed; inset:0; z-index:40; background:#0009; }
    .hub-split,.release-grid,.doc-list { grid-template-columns:minmax(0,1fr); }
    .auth-layout { grid-template-columns:minmax(0,1fr); gap:32px; }
    .auth-story h2 { font-size:36px; }
    .auth-story p,.auth-network,.auth-home { display:none; }
    .auth-langs { margin-bottom:20px; }
    .auth-card { max-width:none; }
    .release-instructions { grid-template-columns:minmax(0,1fr); }
  }
  @media (max-width:600px) {
    .ev-modal-proclist .detection-process-item { flex-direction:column; align-items:stretch; }
    .ev-modal-proclist .detection-process-item__main { flex:none; width:100%; }
  .ev-modal-proclist .detection-process-item__actions { width:100%; margin-left:0; justify-content:flex-start; }
    .detection-row { grid-template-columns:minmax(0,1fr); }
    .detection-main,.detection-origin { grid-column:auto; }
    .escalation-identity,.detection-category-list,.policy-rule.is-ban { grid-template-columns:minmax(0,1fr); }
    .escalation-step { grid-template-columns:28px minmax(0,1fr) 26px; }
    .escalation-step .duration-control { grid-column:1 / -1; }
    .policy-section-head-toggle { grid-template-columns:28px minmax(0,1fr); }
    .policy-section-head-toggle .switch-control { grid-column:2; width:max-content; }
    body.portal-ui { font-size:14px; --ui-gap:16px; }
    .topbar h1 { font-size:22px; }
    .topbar-actions { gap:12px; }
    .topbar-actions>.admin-scope-form { width:calc(50% - 7px); flex:1 1 140px; flex-direction:column; align-items:stretch; }
    .scope-select,.gs-scope-select { width:100%; max-width:none; }
    .topbar-actions>.role-preview-switch { flex-wrap:wrap; }
    .card:not(.panel-flush):not(.data-table-wrap) { padding:18px; }
    .dashboard-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
    .card.dashboard-metric { flex-direction:column; align-items:flex-start; gap:10px; padding:14px; }
    .dashboard-metric .metric-body { display:flex; align-items:flex-start; gap:8px; }
    .dashboard-period>div { flex-basis:100%; }
    .infra-project-grid,.infra-server-grid,.server-field-pair,.admin-fields-2 { grid-template-columns:minmax(0,1fr); }
    .mon-kpi__item { padding:12px; flex-direction:column; align-items:flex-start; gap:8px; }
    .mon-kpi__label { font-size:12px; }
    .ops-toolbar__fields,.ops-field,.ops-field--grow { flex-basis:100%; }
    .ev-modal { width:calc(100vw - 16px); max-height:calc(100dvh - 16px); }
    .ev-modal-body { padding:20px; max-height:calc(100dvh - 16px); }
    .ev-modal-head { flex-direction:column; }
    .ev-modal-titleline strong { font-size:18px; }
    .ev-modal-meta { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .ev-modal-proclist .detection-process-item__actions { flex-wrap:wrap; }
    .auth-page { padding:24px; }
    .auth-card { padding:26px; }
    .auth-story h2 { font-size:30px; margin:14px 0 0; }
    .auth-story { padding:0; }
    .auth-layout { padding-bottom:24px; }
  }
  .hwid-note-host { display:inline-flex; align-items:center; vertical-align:middle; max-width:100%; gap:6px; }
  .portal-ui .hwid-note-badge { display:inline-flex; align-items:center; gap:5px; width:auto; height:25px; max-width:190px; padding:3px 7px; margin:3px 0 3px 5px; color:var(--p-muted); background:transparent; border:1px solid var(--p-border); border-radius:6px; opacity:1; cursor:pointer; font:500 12px/1.3 var(--font-sans); white-space:nowrap; }
  .portal-ui .hwid-note-badge svg { flex-shrink:0; }
  .portal-ui .hwid-note-badge span { overflow:hidden; text-overflow:ellipsis; }
  .portal-ui .hwid-note-badge.has-note { color:#85d9ff; background:#10232d; border-color:#27546a; }
  .portal-ui .hwid-note-badge.has-note::after { content:none; }
  .portal-ui .hwid-note-badge:hover { border-color:#50c9ff; color:#b6e9ff; }
  .hwid-note-dialog { width:min(600px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); padding:0; border:1px solid #334652; border-radius:14px; background:#0e151b; color:#e8f0f5; box-shadow:0 24px 90px #0009; }
  .hwid-note-dialog::backdrop { background:#02070bc9; }
  .hwid-note-form { display:flex; flex-direction:column; gap:12px; padding:26px; font:14px/1.55 var(--font-sans); }
  .hwid-note-form header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:6px; }
  .hwid-note-form h2 { font-size:21px; margin:0; }
  .hwid-note-form p { margin:5px 0 0; }
  .hwid-note-form label { font-weight:600; }
  .hwid-note-form input,.hwid-note-form textarea { width:100%; background:#080d11; color:#edf5fb; border:1px solid #35444e; border-radius:7px; padding:11px 12px; font:14px/1.6 var(--font-sans); }
  .hwid-note-form textarea { resize:vertical; min-height:160px; }
  .hwid-note-form footer { display:flex; align-items:center; gap:10px; margin-top:6px; flex-wrap:wrap; }
  .hwid-note-form footer>span { flex:1; }
  .hwid-note-error { color:#ff9ca5; min-height:20px; }
  .device-shared-note { display:flex; align-items:center; flex-wrap:wrap; gap:12px; }
  .mon-device-count { display:inline-flex; align-items:center; gap:4px; font-variant-numeric:tabular-nums; }
  .process-full-path,.portal-ui .detection-process-item__path { display:block; margin-top:7px; color:#a9c0ce; font-size:13px; line-height:1.6; overflow-wrap:anywhere; white-space:normal; text-overflow:clip; overflow:visible; user-select:text; }
  .diagnostic-process-table .process-image-cell { min-width:240px; }
  .portal-ui .diagnostic-process-table th:nth-child(1) { width:16%; }
  .portal-ui .diagnostic-process-table th:nth-child(2) { width:9%; }
  .portal-ui .diagnostic-process-table th:nth-child(3) { width:43%; }
  .portal-ui .diagnostic-process-table th:nth-child(4) { width:19%; }
  .portal-ui .diagnostic-process-table th:nth-child(5) { width:13%; }
  .ev-modal-proclist .detection-process-item__main { flex-wrap:wrap; }
  .ev-modal-proclist .detection-process-item__path { flex:1 1 100%; width:100%; }
  @media (max-width:520px) {
    .hwid-note-form { padding:20px; }
    .hwid-note-form footer { display:grid; grid-template-columns:1fr 1fr; }
    .hwid-note-form footer>span { display:none; }
    .hwid-note-form .note-save { grid-column:1 / -1; }
  }
  @media (prefers-reduced-motion:reduce) {
    *,*::before,*::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
  }
  /* Compact list summaries. Full process paths in detail views remain readable. */
  .portal-ui .mon-clients-table td,.portal-ui .events-table td,.portal-ui .device-table td { padding:9px 12px; line-height:1.35; vertical-align:middle; }
  .device-identity-line,.device-activity-line,.device-row-actions,.ev-account-line { display:flex; align-items:center; flex-wrap:nowrap; gap:7px; min-width:0; white-space:nowrap; }
  .device-identity-line>a,.device-identity-line>.ev-origin-hwid { flex:1 1 auto; min-width:60px; overflow:hidden; text-overflow:ellipsis; }
  .device-identity-line code { display:block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .device-identity-line .hwid-note-host { flex:0 1 auto; min-width:25px; max-width:48%; }
  .device-identity-line .hwid-note-badge { max-width:100%; margin:0; }
  .portal-ui .mon-account-line { flex-wrap:nowrap; gap:6px; }
  .portal-ui .mon-account-name { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .portal-ui .mon-clients-table .gs-chip { flex:0 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .portal-ui .mon-clients-table th:nth-child(1) { width:8%; }
  .portal-ui .mon-clients-table th:nth-child(2) { width:20%; }
  .portal-ui .mon-clients-table th:nth-child(3) { width:10%; }
  .portal-ui .mon-clients-table th:nth-child(4) { width:18%; }
  .portal-ui .mon-clients-table th:nth-child(5) { width:11%; }
  .portal-ui .mon-clients-table th:nth-child(6) { width:8%; }
  .portal-ui .mon-clients-table th:nth-child(7) { width:11%; }
  .portal-ui .mon-clients-table th:nth-child(8) { width:14%; }
  .portal-ui .mon-char,.portal-ui .mon-country,.portal-ui .mon-seen { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .portal-ui .mon-actions { min-width:0; width:auto; }
  .portal-ui .mon-action-buttons { gap:6px; }
  .portal-ui .mon-action-buttons>form { flex-direction:row; align-items:center; gap:4px; min-width:0; }
  .portal-ui .mon-action-buttons .btn { padding:6px 9px; min-height:30px; }
  .snapshot-state { color:#ffbd7f; font-weight:700; }
  .portal-ui .events-table .col-reason { min-width:0; }
  .portal-ui .events-table { table-layout:fixed; }
  .portal-ui .events-table .ui-badge { white-space:nowrap; }
  .portal-ui .events-table .col-resp { width:110px; }
  .portal-ui .events-table .col-time { width:170px; }
  .portal-ui .events-table .col-proc { width:55px; }
  .portal-ui .ev-reason-line { display:flex; flex-wrap:nowrap; align-items:center; gap:8px; min-width:0; }
  .portal-ui .ev-reason-line strong { flex:0 1 auto; max-width:42%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .portal-ui .ev-reason-line code { flex-shrink:0; }
  .portal-ui .ev-reason-sub { flex:1 1 0; min-width:0; margin:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; line-height:1.35; }
  .portal-ui .events-table .col-acc { width:15%; }
  .portal-ui .events-table .col-origin { width:22%; }
  .portal-ui .ev-account-line>span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .portal-ui .ev-acc-char { margin:0; }
  .portal-ui .ev-origin-hwid { margin:0; font-size:12px; }
  .portal-ui .events-table .gs-chip { max-width:85px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex-shrink:0; }
  .portal-ui .device-table { table-layout:fixed; min-width:1000px; }
  .portal-ui .device-table th:nth-child(1) { width:12%; }
  .portal-ui .device-table th:nth-child(2) { width:27%; }
  .portal-ui .device-table th:nth-child(3) { width:18%; }
  .portal-ui .device-table th:nth-child(4) { width:16%; }
  .portal-ui .device-table th:nth-child(5) { width:13%; }
  .portal-ui .device-table th:nth-child(6) { width:14%; }
  .portal-ui .device-risk-pill { min-width:48px; justify-content:center; font-size:14px; }
  .portal-ui .device-link-counts { display:flex; gap:8px; flex-wrap:nowrap; white-space:nowrap; align-items:center; }
  .portal-ui .device-link-counts>span:not(.device-samples) { flex-shrink:0; }
  .portal-ui .device-samples { margin:0; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .portal-ui .device-row-actions { justify-content:flex-end; gap:5px; }
  .portal-ui .device-row-actions .btn { padding:6px 8px; min-height:30px; }
  .portal-ui .device-drift-marker { color:#ffbd7f; font-size:17px; line-height:1; }
  .portal-ui .device-table .badge { flex-shrink:0; }
  .device-session-count { display:inline-flex; align-items:center; gap:5px; }
  .device-session-count svg { flex-shrink:0; color:var(--p-muted); }
  .device-activity-line { overflow:hidden; }
  .portal-ui form[aria-busy=true] .ops-input { border-color:var(--p-accent); }
  .portal-ui [hidden] { display:none!important; }
  [data-search-results] { display:flex; flex-direction:column; gap:18px; min-width:0; width:100%; max-width:100%; }
  .monitoring-live-body[data-search-results] { display:block; }
  #sg-floating-tip.portal-tooltip { position:fixed; inset:auto; margin:0; min-width:0; width:max-content; max-width:min(250px,calc(100vw - 24px)); max-height:calc(100dvh - 24px); overflow:hidden; padding:8px 14px; border-radius:6px; border:1px solid rgba(255,255,255,.1); background:rgba(13,17,23,.95); color:#fff; font:600 14px/1.4 var(--font-sans); text-align:left; white-space:pre-wrap; overflow-wrap:anywhere; word-break:normal; box-shadow:0 4px 15px rgba(0,0,0,.4); backdrop-filter:blur(4px); pointer-events:none; transition:none; animation:none; }
  #sg-floating-tip.portal-tooltip.is-wide { max-width:min(520px,calc(100vw - 24px)); }
  .search-error { margin:10px 0 0; color:var(--p-danger); font-size:13px; }
  /* Detection and evidence have separate, bounded columns; only evidence grows. */
  .portal-ui .events-table .col-time { width:170px; }
  .portal-ui .events-table .col-reason { width:360px; }
  .portal-ui .events-table .ev-time-short { display:none; }
  .portal-ui .events-table .col-resp { width:100px; }
  .portal-ui .events-table .col-acc { width:170px; }
  .portal-ui .events-table .col-origin { width:215px; }
  .portal-ui .events-table .col-proc { width:64px; padding-left:6px; padding-right:6px; white-space:nowrap; }
  .portal-ui .events-table .ev-row-chevron { margin-left:6px; }
  .portal-ui .events-table .ev-reason-line strong { max-width:none; flex:0 1 auto; min-width:0; }
  .portal-ui .events-table .col-details .ev-reason-sub { display:block; width:100%; max-width:none; }
  .portal-ui .events-table td { overflow:hidden; }
  .portal-ui .events-table .col-origin .device-identity-line { gap:6px; }
  .portal-ui .events-table .col-origin .ev-origin-hwid { flex:0 1 auto; min-width:0; max-width:104px; }
  .portal-ui .events-table .col-origin .hwid-note-host { max-width:75px; min-width:25px; }
  .portal-ui .events-table .col-origin .gs-chip { max-width:78px; }
  @media (max-width:1500px) {
    .portal-ui .events-table .col-time { width:154px; }
    .portal-ui .events-table .ev-time-full { display:none; }
    .portal-ui .events-table .ev-time-short { display:inline; }
    .portal-ui .events-table .col-reason { width:270px; }
    .portal-ui .events-table .col-acc { width:140px; }
    .portal-ui .events-table .col-origin { width:180px; }
    .portal-ui .events-table .col-proc { width:64px; }
  }
}
