/* ==========================================================================
   CloudDash360 theme for ThingsBoard CE
   Restyles the application shell only (sidebar, header, page chrome).
   Dashboards and widgets keep their own styling, so every widget, flow and
   rule chain looks and works exactly as before.
   ========================================================================== */
@font-face{font-family:"IBM Plex Sans";font-weight:400;src:url(/cd360/fonts/plex-400.woff) format('woff');font-display:swap}
@font-face{font-family:"IBM Plex Sans";font-weight:500;src:url(/cd360/fonts/plex-500.woff) format('woff');font-display:swap}
@font-face{font-family:"IBM Plex Sans";font-weight:600;src:url(/cd360/fonts/plex-600.woff) format('woff');font-display:swap}
@font-face{font-family:"IBM Plex Sans";font-weight:700;src:url(/cd360/fonts/plex-700.woff) format('woff');font-display:swap}

:root{
  --cd-navy:#0B3A66; --cd-navy-2:#0F4A80; --cd-navy-3:#0A2F54; --cd-navy-ink:#082541;
  --cd-active:#1E64AE; --cd-yellow:#FDD400; --cd-bg:#F3F5F9; --cd-card:#FFFFFF;
  --cd-line:#E3E8EF; --cd-ink:#16202C; --cd-muted:#64748B; --cd-red:#E11D48; --cd-green:#16A34A;
  --cd-font:"IBM Plex Sans","Segoe UI",Roboto,Arial,sans-serif;
  --cd-radius:12px; --cd-shadow:0 1px 2px rgba(16,24,40,.05),0 1px 3px rgba(16,24,40,.06);
}

/* ---------- Loading screen (before Angular boots, after sign-in, on sign-out) ---------- */
html, body { background-color: var(--cd-bg) !important; }
.tb-loading-spinner, .cd-boot{ position:fixed !important; inset:0 !important; width:auto !important; height:auto !important; margin:0 !important; z-index:100000 !important;
  display:flex !important; flex-direction:column; align-items:center; justify-content:center; text-align:center; font-family:var(--cd-font);
  background:radial-gradient(1200px 600px at 50% 38%, #FFFFFF 0%, #F3F5F9 60%, #E9EEF5 100%) !important; }
.tb-loading-spinner > div, .cd-boot > div{ animation:none !important; background:none !important; border-radius:0 !important; margin:0 !important; width:auto !important; height:auto !important;
  display:block !important; transform:none !important; position:relative; }
.tb-loading-spinner > div:nth-child(1), .cd-boot > div:nth-child(1){ width:84px !important; height:84px !important; }
.tb-loading-spinner > div:nth-child(1)::before, .cd-boot > div:nth-child(1)::before{ content:""; position:absolute; inset:10px; border-radius:50%;
  background:url(/cd360/mark.svg) center/contain no-repeat; box-shadow:0 10px 26px rgba(11,58,102,.22); animation:cdPulse 1.8s ease-in-out infinite; }
.tb-loading-spinner > div:nth-child(1)::after, .cd-boot > div:nth-child(1)::after{ content:""; position:absolute; inset:0; border-radius:50%;
  border:3px solid rgba(11,58,102,.10); border-top-color:#FDD400; border-left-color:#0B3A66; animation:cdSpin .9s cubic-bezier(.55,.15,.45,.85) infinite; }
.tb-loading-spinner > div:nth-child(2), .cd-boot > div:nth-child(2){ margin-top:22px !important; font:700 26px/1 var(--cd-font); letter-spacing:-.4px; color:#0B3A66; }
.tb-loading-spinner > div:nth-child(2)::before, .cd-boot > div:nth-child(2)::before{ content:"CloudDash"; }
.tb-loading-spinner > div:nth-child(2)::after, .cd-boot > div:nth-child(2)::after{ content:"360"; color:#E0B800; }
.tb-loading-spinner > div:nth-child(3), .cd-boot > div:nth-child(3){ margin-top:16px !important; font:500 13px var(--cd-font); color:#64748B; letter-spacing:.2px; }
.tb-loading-spinner > div:nth-child(3)::before, .cd-boot > div:nth-child(3)::before{ content:""; display:block; width:180px; height:3px; margin:0 auto 14px; border-radius:3px;
  background:linear-gradient(90deg, transparent 0%, #FDD400 35%, #0B3A66 65%, transparent 100%) #E3E8EF; background-size:200% 100%; background-repeat:no-repeat; animation:cdBar 1.3s ease-in-out infinite; }
.tb-loading-spinner > div:nth-child(3)::after{ content:"Loading your workspace…"; }
.cd-boot > div:nth-child(3)::after{ content:attr(data-msg); }
@keyframes cdSpin{ to{ transform:rotate(360deg); } }
@keyframes cdPulse{ 0%,100%{ transform:scale(1); } 50%{ transform:scale(.94); } }
@keyframes cdBar{ 0%{ background-position:150% 0; } 100%{ background-position:-50% 0; } }

/* ---------- IBM Plex Sans everywhere in the application chrome (dashboard widgets keep their own fonts) ---------- */
body, body *:not(mat-icon):not(.mat-icon):not(.material-icons):not(.material-icons-outlined):not(.material-icons-round):not(.material-symbols-outlined):not(tb-icon):not(.mdi):not([class^="fa"]):not([class*=" fa-"]):not(code):not(pre):not(.ace_editor):not(.ace_editor *):not(tb-widget *):not(.tb-widget *):not(.tb-widget-container *){
  font-family:var(--cd-font) !important; }
body{ -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; }
/* Material spinners and progress bars in brand colours */
body{ --mdc-circular-progress-active-indicator-color:var(--cd-navy); --mat-progress-spinner-active-indicator-color:var(--cd-navy);
  --mdc-linear-progress-active-indicator-color:var(--cd-yellow); --mat-progress-bar-active-indicator-color:var(--cd-yellow);
  --mdc-linear-progress-track-color:rgba(11,58,102,.12); --mat-progress-bar-track-color:rgba(11,58,102,.12); }
.mat-mdc-progress-spinner circle, mat-spinner circle, .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{ stroke:var(--cd-navy) !important; }
.mat-mdc-progress-bar .mdc-linear-progress__bar-inner{ border-color:var(--cd-yellow) !important; }

/* ---------- Sidebar ---------- */
mat-sidenav.tb-site-sidenav{ background:linear-gradient(180deg,var(--cd-navy) 0%,var(--cd-navy-3) 100%) !important; border-right:0 !important; box-shadow:none !important; }
mat-sidenav.tb-site-sidenav .mat-drawer-inner-container{ display:flex; flex-direction:column; }
.tb-site-sidenav .tb-nav-header-toolbar{ background:transparent !important; border-bottom:1px solid rgba(255,255,255,.08) !important; min-height:72px !important; }
.tb-site-sidenav .tb-nav-header-toolbar > div{ height:72px !important; justify-content:flex-start; padding:0 18px; }
.tb-site-sidenav .tb-nav-header-toolbar .tb-logo-title{ height:44px !important; margin:auto 0 !important; }
.tb-site-sidenav .tb-side-menu-toolbar{ background:transparent !important; padding:10px 0 8px !important; flex:1 1 auto !important; }
.tb-site-sidenav .tb-side-menu-toolbar::-webkit-scrollbar{ width:6px; }
.tb-site-sidenav .tb-side-menu-toolbar::-webkit-scrollbar-thumb{ background:rgba(255,255,255,.18); border-radius:3px; }

tb-side-menu ul.tb-side-menu > li{ border:0 !important; }
tb-side-menu ul.tb-side-menu li,
tb-side-menu ul.tb-side-menu li a,
tb-side-menu ul.tb-side-menu li:not(:last-child){ border-bottom:0 !important; border-top:0 !important; }
tb-side-menu .tb-side-menu a.mat-mdc-button{
  font-family:var(--cd-font) !important; font-size:14px !important; font-weight:500 !important;
  letter-spacing:0 !important; text-transform:none !important; color:rgba(255,255,255,.9) !important;
  height:42px !important; line-height:42px !important; margin:2px 12px !important; width:calc(100% - 24px) !important;
  padding:0 12px !important; border-radius:8px !important; justify-content:flex-start !important;
  background:transparent !important; transition:background .15s ease;
}
tb-side-menu .tb-side-menu a.mat-mdc-button:hover{ background:rgba(255,255,255,.08) !important; }
tb-side-menu .tb-side-menu a.mat-mdc-button.tb-active{ background:var(--cd-active) !important; color:#fff !important; box-shadow:inset 3px 0 0 var(--cd-yellow); }
tb-side-menu .tb-side-menu a.mat-mdc-button .mat-icon,
tb-side-menu .tb-side-menu a.mat-mdc-button tb-icon{ color:rgba(255,255,255,.88) !important; font-size:20px !important; width:20px !important; height:20px !important; margin-right:14px !important; opacity:.95; }
tb-side-menu .tb-side-menu a.mat-mdc-button .mat-mdc-button-persistent-ripple::before{ background:transparent !important; }
tb-side-menu .tb-menu-toggle-list{ background:transparent !important; }
tb-side-menu .tb-menu-toggle-list a.mat-mdc-button{ height:38px !important; line-height:38px !important; padding-left:26px !important; font-size:13.5px !important; color:rgba(255,255,255,.78) !important; }
tb-side-menu .tb-menu-toggle-list a.mat-mdc-button.tb-active{ color:#fff !important; }
tb-side-menu .tb-toggle-icon{ color:rgba(255,255,255,.6) !important; font-size:12px !important; }
tb-side-menu a.is-new .mdc-button__label::after{ background:var(--cd-yellow) !important; color:var(--cd-navy-ink) !important; }

/* Bottom security note in the sidebar (added by shell.js) */
.cd-side-note{ margin:10px 14px 14px; padding:12px 14px; border-radius:10px; background:rgba(255,255,255,.07); color:rgba(255,255,255,.82);
  font:400 12px/1.5 var(--cd-font); flex:0 0 auto; }
.cd-side-note b{ display:flex; align-items:center; gap:7px; color:#fff; font-weight:600; font-size:12.5px; margin-bottom:3px; }
.cd-side-note b::before{ content:""; width:8px; height:8px; border-radius:50%; background:#22C55E; box-shadow:0 0 0 3px rgba(34,197,94,.25); }

/* ---------- Top header ---------- */
mat-toolbar.tb-primary-toolbar{
  background:var(--cd-navy) !important; color:#fff !important; height:72px !important; min-height:72px !important;
  padding:0 20px 0 12px !important; gap:6px; box-shadow:0 1px 0 rgba(0,0,0,.08) !important; font-family:var(--cd-font) !important;
}
mat-toolbar.tb-primary-toolbar tb-breadcrumb{ flex:0 1 auto !important; min-width:240px; max-width:380px; display:flex !important; flex-direction:column !important; justify-content:center; align-items:flex-start !important; text-align:left !important; overflow:hidden; }
mat-toolbar.tb-primary-toolbar tb-breadcrumb > .tb-breadcrumb{ flex:0 0 auto !important; max-width:100%; overflow:hidden; white-space:nowrap; }
mat-toolbar.tb-primary-toolbar tb-breadcrumb h1,
mat-toolbar.tb-primary-toolbar tb-breadcrumb .tb-breadcrumb{ font-family:var(--cd-font) !important; font-size:19px !important; font-weight:600 !important; letter-spacing:-.2px; }
mat-toolbar.tb-primary-toolbar tb-breadcrumb .mat-icon{ display:none !important; }
mat-toolbar.tb-primary-toolbar tb-breadcrumb a,
mat-toolbar.tb-primary-toolbar tb-breadcrumb span{ font-family:var(--cd-font) !important; }
.cd-subtitle{ font:400 12.5px/1.3 var(--cd-font); color:rgba(255,255,255,.72); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:1px; padding-left:2px; }
mat-toolbar.tb-primary-toolbar tb-github-badge{ display:none !important; }
mat-toolbar.tb-primary-toolbar .mat-mdc-icon-button{ color:#fff !important; }
mat-toolbar.tb-primary-toolbar tb-user-menu{ margin-left:6px; }
mat-toolbar.tb-primary-toolbar tb-user-menu .tb-user-info{ background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.14); border-radius:10px; padding:4px 10px 4px 6px !important; }
mat-toolbar.tb-primary-toolbar tb-user-menu .tb-user-display-name{ font:600 13.5px/1.3 var(--cd-font) !important; color:#fff !important; }
mat-toolbar.tb-primary-toolbar tb-user-menu .tb-user-authority{ font:400 12px/1.3 var(--cd-font) !important; color:rgba(255,255,255,.72) !important; }
mat-toolbar.tb-primary-toolbar tb-user-menu mat-icon.tb-mini-avatar{ color:var(--cd-yellow) !important; }

/* Header widgets added by shell.js */
.cd-spacer{ flex:1 1 auto; }
.cd-search{ position:relative; flex:0 1 360px; min-width:220px; margin:0 12px 0 24px; }
.cd-search input{ width:100%; height:40px; border-radius:8px; border:1px solid rgba(255,255,255,.18); background:rgba(255,255,255,.1); color:#fff;
  font:400 13.5px var(--cd-font); padding:0 58px 0 38px; outline:none; box-sizing:border-box; transition:background .15s,border-color .15s; }
.cd-search input::placeholder{ color:rgba(255,255,255,.7); }
.cd-search input:focus{ background:#fff; color:var(--cd-ink); border-color:#fff; }
.cd-search input:focus::placeholder{ color:#94A3B8; }
.cd-search .cd-search-ic{ position:absolute; left:11px; top:11px; width:18px; height:18px; fill:none; stroke:rgba(255,255,255,.8); stroke-width:2; pointer-events:none; }
.cd-search input:focus ~ .cd-search-ic{ stroke:#64748B; }
.cd-search kbd{ position:absolute; right:9px; top:9px; font:600 11px/20px var(--cd-font); padding:0 6px; border-radius:5px; border:1px solid rgba(255,255,255,.3); color:rgba(255,255,255,.8); pointer-events:none; }
.cd-search input:focus ~ kbd{ color:#64748B; border-color:#CBD5E1; }
.cd-results{ position:absolute; top:46px; left:0; min-width:440px; right:0; background:#fff; color:var(--cd-ink); border-radius:10px; box-shadow:0 12px 32px rgba(15,23,42,.22);
  max-height:420px; overflow:auto; z-index:1000; display:none; padding:6px; font:400 13.5px var(--cd-font); }
.cd-results.on{ display:block; }
.cd-results .grp{ font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.6px; color:var(--cd-muted); padding:8px 10px 4px; }
.cd-results a{ display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:7px; color:inherit; text-decoration:none; cursor:pointer; }
.cd-results a .mat-icon,.cd-results a .material-icons{ font-size:18px; width:18px; height:18px; color:var(--cd-navy); }
.cd-results a small{ margin-left:auto; color:var(--cd-muted); font-size:12px; }
.cd-results a.sel,.cd-results a:hover{ background:#EEF4FB; }
.cd-results .empty{ padding:14px 10px; color:var(--cd-muted); }
.cd-chip{ flex:0 0 auto; height:34px; display:flex; align-items:center; gap:7px; padding:0 13px; border-radius:9px; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.16); color:#fff;
  font:500 13px var(--cd-font); white-space:nowrap; max-width:260px; overflow:hidden; text-overflow:ellipsis; margin:0 8px; }
.cd-online{ display:flex; align-items:center; gap:7px; height:28px; padding:0 11px; border-radius:14px; background:rgba(34,197,94,.14); color:#86EFAC; font:500 12px var(--cd-font); margin:0 4px; }
.cd-online::before{ content:""; width:8px; height:8px; border-radius:50%; background:#22C55E; }
.cd-online.off{ background:rgba(239,68,68,.18); color:#FCA5A5; } .cd-online.off::before{ background:#EF4444; }
.cd-date{ font:400 13px var(--cd-font); color:rgba(255,255,255,.78); margin:0 8px; white-space:nowrap; }
@media (max-width:1560px){ .cd-date{ display:none; } }
@media (max-width:1400px){ .cd-online{ display:none; } }
@media (max-width:1180px){ .cd-chip{ display:none; } }
@media (max-width:820px){ .cd-search{ display:none; } }

/* ---------- Content area ---------- */
.tb-main-content{ background:var(--cd-bg) !important; }
.cd-tabs{ position:relative; z-index:1; display:flex; gap:4px; padding:0 22px; background:#fff; border-bottom:1px solid var(--cd-line); flex:0 0 auto; overflow-x:auto; scrollbar-width:none; }
.cd-tabs::-webkit-scrollbar{ display:none; }
.cd-tabs a{ position:relative; display:flex; align-items:center; height:48px; padding:0 14px; color:#475569; text-decoration:none; white-space:nowrap;
  font:500 14px var(--cd-font); cursor:pointer; }
.cd-tabs a:hover{ color:var(--cd-navy); }
.cd-tabs a.on{ color:var(--cd-active); font-weight:600; }
.cd-tabs a.on::after{ content:""; position:absolute; left:10px; right:10px; bottom:0; height:3px; border-radius:3px 3px 0 0; background:var(--cd-active); }

/* Entity tables & detail panels: lighter, card-like chrome (data untouched) */
tb-entities-table .mat-mdc-card, tb-entities-table > .mat-drawer-container{ border-radius:var(--cd-radius) !important; }
tb-entities-table .mat-mdc-table .mat-mdc-header-row{ background:#F8FAFC !important; }
tb-entities-table .mat-mdc-table .mat-mdc-header-cell{ font-family:var(--cd-font) !important; font-weight:600 !important; color:#475569 !important; text-transform:uppercase; font-size:12px !important; letter-spacing:.4px; }

/* ---------- Home: My Home panel ---------- */
.cd-home{ font-family:var(--cd-font); color:var(--cd-ink); padding:18px 22px 4px; flex:0 0 auto; }
.cd-home *{ box-sizing:border-box; }
.cd-h{ display:flex; align-items:center; gap:12px; margin:0 0 12px; }
.cd-h h2{ font-size:18px; font-weight:700; margin:0; letter-spacing:-.2px; }
.cd-h .hint{ color:var(--cd-muted); font-size:13px; }
.cd-h .r{ margin-left:auto; color:var(--cd-muted); font-size:13px; display:flex; align-items:center; gap:10px; }
.cd-iconbtn{ border:0; background:transparent; width:30px; height:30px; border-radius:7px; display:grid; place-items:center; cursor:pointer; color:#64748B; }
.cd-iconbtn:hover{ background:#E8EEF5; color:var(--cd-navy); }
.cd-iconbtn .material-icons{ font-size:19px; }
.cd-card{ background:var(--cd-card); border:1px solid var(--cd-line); border-radius:var(--cd-radius); box-shadow:var(--cd-shadow); }
.cd-apps{ padding:4px 18px 14px; margin-bottom:22px; }
.cd-apptabs{ display:flex; gap:4px; border-bottom:1px solid var(--cd-line); margin:0 -18px 12px; padding:0 14px; }
.cd-apptabs a{ position:relative; padding:12px 10px; font-size:13.5px; font-weight:500; color:#475569; cursor:pointer; }
.cd-apptabs a.on{ color:var(--cd-active); font-weight:600; }
.cd-apptabs a.on::after{ content:""; position:absolute; left:6px; right:6px; bottom:-1px; height:3px; border-radius:3px 3px 0 0; background:var(--cd-active); }
.cd-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:4px 10px; }
.cd-tile, .cd-tile:hover, .cd-tile:visited{ color:var(--cd-ink) !important; text-decoration:none !important; border:0 !important; }
.cd-tile{ display:flex; align-items:center; gap:12px; padding:10px; border-radius:10px; text-decoration:none; color:inherit; cursor:pointer; min-width:0; position:relative; }
.cd-tile:hover{ background:#F1F5FB; }
.cd-tile .ic{ flex:0 0 38px; height:38px; border-radius:9px; display:grid; place-items:center; color:#fff; }
.cd-tile .ic .mat-icon,.cd-tile .ic tb-icon,.cd-tile .ic .material-icons{ color:#fff !important; font-size:20px !important; width:20px !important; height:20px !important; line-height:20px; }
.cd-tile .ic svg{ width:20px; height:20px; fill:#fff; }
.cd-tile .tx{ min-width:0; }
.cd-tile .tx b{ display:block; font-size:14px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cd-tile .tx span{ display:block; font-size:12.5px; color:var(--cd-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cd-badge{ margin-left:auto; min-width:22px; height:20px; padding:0 7px; border-radius:10px; background:var(--cd-red); color:#fff; font-size:11.5px; font-weight:700; display:grid; place-items:center; }
.cd-tile .star{ position:absolute; right:8px; top:8px; font-size:18px; color:#CBD5E1; }
.cd-tile .star.on{ color:var(--cd-yellow); }
.cd-edit .cd-tile{ outline:1px dashed #CBD5E1; }
.cd-empty{ padding:16px 6px; color:var(--cd-muted); font-size:13.5px; }

.cd-ins{ display:grid; grid-auto-flow:column; grid-auto-columns:minmax(232px,1fr); gap:14px; overflow-x:auto; padding-bottom:6px; margin-bottom:16px; }
.cd-kpi{ padding:14px 16px; cursor:pointer; min-height:208px; display:flex; flex-direction:column; transition:box-shadow .15s,transform .15s; }
.cd-kpi:hover{ box-shadow:0 6px 18px rgba(15,23,42,.1); transform:translateY(-1px); }
.cd-kpi h3{ font-size:14px; font-weight:600; margin:0; }
.cd-kpi .sub{ font-size:12px; color:var(--cd-muted); margin:2px 0 10px; }
.cd-kpi .big{ display:flex; align-items:baseline; gap:8px; }
.cd-kpi .big b{ font-size:30px; font-weight:700; letter-spacing:-.5px; line-height:1.1; }
.cd-kpi .big span{ font-size:12.5px; color:var(--cd-muted); }
.cd-kpi .viz{ margin-top:auto; padding-top:10px; }
.cd-kpi .legend{ display:flex; flex-wrap:wrap; gap:4px 12px; font-size:12px; color:#475569; margin-top:8px; }
.cd-kpi .legend i{ display:inline-block; width:9px; height:9px; border-radius:2px; margin-right:5px; vertical-align:-1px; }
.cd-bars{ display:flex; flex-direction:column; gap:7px; }
.cd-bars .bar{ display:grid; grid-template-columns:84px 1fr 40px; align-items:center; gap:8px; font-size:12px; color:#475569; }
.cd-bars .bar .t{ height:8px; background:#EEF2F7; border-radius:4px; overflow:hidden; }
.cd-bars .bar .t i{ display:block; height:100%; border-radius:4px; }
.cd-bars .bar em{ font-style:normal; text-align:right; font-weight:600; color:var(--cd-ink); }
.cd-collapsed .cd-apps,.cd-collapsed .cd-ins,.cd-collapsed .cd-h.ins{ display:none; }
.cd-home-host{ overflow-y:auto !important; }
.cd-home-host > :not(.cd-home):not(.cd-tabs):not(router-outlet){ min-height:640px; flex:1 0 auto !important; }

/* Dashboard footer: rebrand the "Powered by" line */
.tb-powered-by-footer > span{ display:none !important; }
.tb-powered-by-footer::after{ content:"Powered by CloudDash360"; font-size:12px; opacity:.75; }

/* ==========================================================================
   Report Center
   ========================================================================== */
body.cd-rc-open .cd-tabs{ display:none !important; }
body.cd-rc-open mat-toolbar.tb-primary-toolbar tb-breadcrumb{ display:none !important; }
body.cd-rc-open tb-side-menu a.tb-active:not(.cd-rc-link){ background:transparent !important; box-shadow:none !important; }
tb-side-menu a.cd-rc-link.cd-rc-active{ background:var(--cd-active) !important; color:#fff !important; box-shadow:inset 3px 0 0 var(--cd-yellow); }
.cd-rc-title{ display:flex; flex-direction:column; justify-content:center; font-family:var(--cd-font); min-width:0; }
.cd-rc-title b{ font-size:20px; font-weight:700; letter-spacing:-.2px; line-height:1.25; }
.cd-rc-title span{ font-size:12.5px; color:rgba(255,255,255,.72); }
.cd-rc{ position:absolute; inset:0; z-index:6; background:var(--cd-bg); overflow:auto; font-family:var(--cd-font); color:var(--cd-ink); }
.cd-rc *, .cd-rc-modal *{ box-sizing:border-box; }
.cd-rc .material-icons, .cd-rc-modal .material-icons{ font-size:18px; vertical-align:-4px; }
.cd-rc-in{ padding:0 22px 28px; max-width:1500px; }
.cd-rc-head{ display:flex; align-items:center; gap:16px; background:#fff; margin:0 -22px 18px; padding:0 22px; border-bottom:1px solid var(--cd-line); position:sticky; top:0; z-index:2; }
.cd-rc-tabs{ display:flex; gap:4px; }
.cd-rc-tabs a{ position:relative; display:flex; align-items:center; gap:7px; height:52px; padding:0 14px; font-size:14px; font-weight:500; color:#475569; cursor:pointer; text-decoration:none; }
.cd-rc-tabs a.on{ color:var(--cd-active); font-weight:600; }
.cd-rc-tabs a.on::after{ content:""; position:absolute; left:10px; right:10px; bottom:0; height:3px; border-radius:3px 3px 0 0; background:var(--cd-active); }
.cd-rc-actions{ margin-left:auto; display:flex; align-items:center; gap:12px; }
.cd-rc-role{ display:flex; align-items:center; gap:6px; font-size:12.5px; font-weight:600; color:var(--cd-navy); background:#EAF1FA; border-radius:14px; padding:4px 12px 4px 8px; }
.cd-btn{ display:inline-flex; align-items:center; gap:6px; height:38px; padding:0 16px; border-radius:8px; border:1px solid #CBD5E1; background:#fff; color:var(--cd-navy-ink); font:600 13.5px var(--cd-font); cursor:pointer; white-space:nowrap; }
.cd-btn:hover{ background:#F1F5FB; } .cd-btn[disabled]{ opacity:.6; cursor:default; }
.cd-btn.primary{ background:var(--cd-navy); border-color:var(--cd-navy); color:#fff; } .cd-btn.primary:hover{ background:var(--cd-navy-2); }
.cd-ibtn{ width:34px; height:34px; border:0; background:transparent; border-radius:8px; color:#475569; cursor:pointer; display:inline-grid; place-items:center; }
.cd-ibtn:hover{ background:#E8EEF5; color:var(--cd-navy); } .cd-ibtn[disabled]{ opacity:.4; }
.cd-rc-warn{ display:flex; gap:10px; align-items:flex-start; background:#FFF8E1; border:1px solid #FDE68A; color:#7A5A00; border-radius:10px; padding:10px 14px; font-size:13.5px; line-height:1.55; margin-bottom:16px; }
.cd-rc-warn a{ color:var(--cd-navy); font-weight:600; cursor:pointer; text-decoration:underline; }
.cd-rc-kpis{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:16px; }
.cd-rc-kpi{ display:flex; align-items:center; gap:14px; padding:16px 18px; }
.cd-rc-kpi .ic{ width:42px; height:42px; border-radius:10px; display:grid; place-items:center; color:#fff; } .cd-rc-kpi .ic .material-icons{ font-size:22px; vertical-align:0; }
.cd-rc-kpi b{ display:block; font-size:24px; font-weight:700; line-height:1.1; } .cd-rc-kpi span{ font-size:12.5px; color:var(--cd-muted); }
.cd-rc-table{ overflow:auto; }
.cd-rc-table table{ width:100%; border-collapse:collapse; font-size:13.5px; }
.cd-rc-table th{ text-align:left; background:#F8FAFC; color:#475569; font-size:11.5px; font-weight:600; text-transform:uppercase; letter-spacing:.4px; padding:11px 14px; border-bottom:1px solid var(--cd-line); white-space:nowrap; }
.cd-rc-table td{ padding:11px 14px; border-bottom:1px solid #EEF2F6; vertical-align:middle; }
.cd-rc-table tbody tr:hover{ background:#F8FBFF; } .cd-rc-table tr[data-act]{ cursor:pointer; }
.cd-rc-table .r{ text-align:right; } .nowrap{ white-space:nowrap; }
.cd-rc-table small, .cd-rc small.blk{ color:var(--cd-muted); font-size:12px; } small.blk{ display:block; margin-top:2px; }
.cd-rc-name{ display:flex; align-items:center; gap:12px; min-width:240px; }
.cd-rc-name .ic{ flex:0 0 34px; height:34px; border-radius:8px; display:grid; place-items:center; color:#fff; } .cd-rc-name .ic .material-icons{ vertical-align:0; }
.cd-rc-name b{ display:block; font-weight:600; } .cd-rc-name small{ display:block; }
.cd-chip-s{ display:inline-flex; align-items:center; gap:4px; font-size:12px; font-weight:600; border-radius:12px; padding:3px 10px; white-space:nowrap; }
.cd-chip-s .material-icons{ font-size:15px; vertical-align:0; }
.cd-chip-s.ok{ background:#E8F7EE; color:#15803D; } .cd-chip-s.bad{ background:#FDECEC; color:#B91C1C; } .cd-chip-s.run{ background:#EAF1FA; color:#1E64AE; }
.cd-chip-s.mut{ background:#F1F5F9; color:#64748B; } .cd-chip-s.admin{ background:#EEF2FF; color:#4338CA; } .cd-chip-s.user{ background:#ECFDF5; color:#047857; }
.cd-rc .mut, .cd-rc-modal .mut{ color:#94A3B8; } .cd-rc .err, .cd-rc-modal .err{ color:#B91C1C; }
.cd-rc-empty{ display:flex; flex-direction:column; align-items:center; gap:8px; padding:56px 20px; text-align:center; color:var(--cd-muted); }
.cd-rc-empty > .material-icons{ font-size:44px; color:#94A3B8; } .cd-rc-empty b{ color:var(--cd-ink); font-size:16px; } .cd-rc-empty .cd-btn{ margin-top:10px; }
.cd-rc-loading{ padding:40px; color:var(--cd-muted); }
/* editor drawer */
.cd-rc-modal{ position:fixed; inset:0; z-index:1100; background:rgba(15,23,42,.45); display:flex; justify-content:flex-end; font-family:var(--cd-font); color:var(--cd-ink); }
.cd-rc-drawer{ width:min(720px,100%); height:100%; background:#fff; display:flex; flex-direction:column; box-shadow:-12px 0 32px rgba(15,23,42,.2); animation:cdIn .18s ease-out; }
@keyframes cdIn{ from{ transform:translateX(40px); opacity:.6 } to{ transform:none; opacity:1 } }
.cd-rc-dh{ display:flex; align-items:center; gap:12px; padding:16px 22px; background:var(--cd-navy); color:#fff; }
.cd-rc-dh b{ display:block; font-size:18px; } .cd-rc-dh span{ font-size:12.5px; color:rgba(255,255,255,.75); } .cd-rc-dh .cd-ibtn{ margin-left:auto; color:#fff; } .cd-rc-dh .cd-ibtn:hover{ background:rgba(255,255,255,.12); color:#fff; }
.cd-rc-db{ flex:1; overflow:auto; padding:6px 22px 24px; }
.cd-rc-df{ display:flex; align-items:center; gap:10px; padding:14px 22px; border-top:1px solid var(--cd-line); background:#FAFBFD; }
.cd-rc-df [data-err]{ margin-right:auto; font-size:13px; }
.cd-sec{ padding:16px 0 6px; border-bottom:1px solid #F0F3F7; } .cd-sec:last-of-type{ border-bottom:0; }
.cd-sec h4{ margin:0 0 10px; font-size:13.5px; font-weight:700; color:var(--cd-navy-ink); } .cd-sec h4 small{ font-weight:400; color:var(--cd-muted); margin-left:6px; }
.cd-in{ width:100%; height:40px; border:1px solid #D5DCE5; border-radius:8px; padding:0 12px; font:400 14px var(--cd-font); color:var(--cd-ink); background:#fff; outline:none; }
textarea.cd-in{ height:auto; padding:9px 12px; resize:vertical; }
.cd-in:focus{ border-color:var(--cd-navy); box-shadow:0 0 0 3px rgba(11,58,102,.12); } .cd-in.sm{ height:34px; } .cd-in.mono{ font-family:ui-monospace,Consolas,monospace; }
.cd-rc-modal label, .cd-set label{ display:block; font-size:12.5px; font-weight:600; color:#334155; margin:8px 0 0; } .cd-rc-modal label .cd-in, .cd-set label .cd-in{ margin-top:5px; font-weight:400; }
.cd-row2{ display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:8px; }
.hint{ font-size:12.5px; color:var(--cd-muted); margin:6px 0 0; line-height:1.5; } .hint.warn{ color:#92400E; } .hint code, .cd-set code{ background:#F1F5F9; border-radius:4px; padding:1px 5px; font-size:12px; }
.cd-types{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.cd-type{ position:relative; display:grid !important; grid-template-columns:38px 1fr; grid-template-rows:auto auto; column-gap:12px; align-items:center; padding:12px !important; margin:0 !important; border:1.5px solid #E3E8EF; border-radius:10px; cursor:pointer; }
.cd-type input{ position:absolute; opacity:0; } .cd-type .ic{ grid-row:1/3; width:38px; height:38px; border-radius:9px; display:grid; place-items:center; color:#fff; } .cd-type .ic .material-icons{ vertical-align:0; font-size:20px; }
.cd-type b{ font-size:14px; } .cd-type small{ font-weight:400; color:var(--cd-muted); font-size:12px; line-height:1.4; }
.cd-type.on{ border-color:var(--cd-active); background:#F3F8FE; box-shadow:0 0 0 3px rgba(30,100,174,.12); }
.cd-pick{ border:1px solid #D5DCE5; border-radius:10px; overflow:hidden; } .cd-pick .cd-in{ border:0; border-bottom:1px solid #E3E8EF; border-radius:0; box-shadow:none !important; }
.cd-pick-list{ max-height:200px; overflow:auto; }
.cd-pick-row{ display:flex !important; align-items:center; gap:10px; padding:8px 12px; margin:0 !important; font-weight:500 !important; font-size:13.5px !important; cursor:pointer; border-bottom:1px solid #F3F5F8; }
.cd-pick-row:hover{ background:#F8FBFF; } .cd-pick-row small{ margin-left:auto; color:var(--cd-muted); font-weight:400; } .cd-pick-row i.on{ color:#16A34A; font-style:normal; }
.cd-pick-row input, .cd-chk input{ width:16px; height:16px; accent-color:var(--cd-navy); margin:0; }
.cd-chips{ display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.cd-chip{ display:inline-flex; align-items:center; gap:5px; background:#EAF1FA; color:var(--cd-navy); border-radius:16px; padding:3px 4px 3px 10px; font-size:12.5px; font-weight:600; }
.cd-chip button{ border:0; background:transparent; color:inherit; cursor:pointer; padding:0; display:grid; place-items:center; } .cd-chip .material-icons{ font-size:16px; vertical-align:0; }
.cd-keys{ display:flex; flex-wrap:wrap; gap:6px; }
.cd-key{ display:inline-flex !important; align-items:center; gap:6px; margin:0 !important; border:1px solid #D5DCE5; border-radius:16px; padding:5px 12px !important; font-weight:500 !important; cursor:pointer; }
.cd-key input{ display:none; } .cd-key.on{ background:var(--cd-navy); border-color:var(--cd-navy); color:#fff !important; }
.cd-lim{ width:100%; border-collapse:collapse; font-size:13px; } .cd-lim th{ text-align:left; font-size:11.5px; color:#64748B; font-weight:600; padding:4px 6px; } .cd-lim td{ padding:4px 6px; }
.cd-seg{ display:inline-flex; border:1px solid #D5DCE5; border-radius:9px; overflow:hidden; }
.cd-seg button{ border:0; background:#fff; padding:8px 16px; font:500 13.5px var(--cd-font); color:#475569; cursor:pointer; border-right:1px solid #E3E8EF; } .cd-seg button:last-child{ border-right:0; }
.cd-seg button.on{ background:var(--cd-navy); color:#fff; }
.cd-days{ display:flex; gap:6px; margin-top:10px; }
.cd-days button{ width:48px; height:34px; border:1px solid #D5DCE5; background:#fff; border-radius:8px; font:600 12.5px var(--cd-font); color:#475569; cursor:pointer; } .cd-days button.on{ background:var(--cd-active); border-color:var(--cd-active); color:#fff; }
.cd-chk{ display:flex !important; align-items:center; gap:8px; font-weight:500 !important; margin:10px 0 0 !important; cursor:pointer; } .cd-chk.big{ margin:18px 0 0 !important; font-size:13.5px !important; }
/* settings */
.cd-set-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(380px,1fr)); gap:16px; align-items:start; }
.cd-set{ padding:18px 20px 20px; } .cd-set h3{ display:flex; align-items:center; gap:8px; margin:0; font-size:15.5px; color:var(--cd-navy-ink); } .cd-set > .hint{ margin:6px 0 6px; }
.cd-set .cd-btn{ margin-top:14px; } .cd-set .cd-row2 .cd-btn{ margin-top:0; }
.cd-logo{ display:flex; align-items:center; gap:14px; margin-top:8px; } .cd-logo .pv{ width:220px; height:70px; border:1px dashed #CBD5E1; border-radius:8px; display:grid; place-items:center; padding:8px; background:#fff; }
.cd-logo .pv img{ max-width:100%; max-height:100%; } .cd-logo .cd-btn{ margin-top:0; }
.cd-set-foot{ display:flex; justify-content:flex-end; margin-top:16px; }
.cd-toast{ position:fixed; left:50%; bottom:24px; transform:translate(-50%,20px); opacity:0; z-index:2000; background:#0F2A47; color:#fff; padding:11px 18px; border-radius:10px; font:500 13.5px var(--cd-font); box-shadow:0 10px 28px rgba(0,0,0,.25); transition:all .25s; max-width:80vw; }
.cd-toast.on{ opacity:1; transform:translate(-50%,0); } .cd-toast.bad{ background:#991B1B; }
@media (max-width:1100px){ .cd-rc-kpis{ grid-template-columns:repeat(2,1fr); } .cd-types{ grid-template-columns:1fr; } }
.cd-rc-kpi .ic .material-icons, .cd-rc-name .ic .material-icons, .cd-type .ic .material-icons, .cd-tile .ic .material-icons{ color:#fff !important; }
.cd-rc-table td, .cd-rc-table td *{ font-size:13.5px; } .cd-rc-table td small{ font-size:12px !important; } .cd-rc-table td b{ font-size:14px; }
.cd-rc-table td .material-icons{ font-size:17px !important; color:#64748B; }
.cd-rc-table .cd-ibtn .material-icons{ font-size:19px !important; color:inherit; }
.cd-rc-table td .cd-chip-s, .cd-rc-table td .cd-chip-s *{ font-size:12px; }

/* never show ThingsBoard's own login screen (the branded one replaces it) */
tb-login{ visibility:hidden !important; }

/* ---------- Report Center · Generate report ---------- */
.cd-g{ display:grid; grid-template-columns:minmax(0,1fr) 370px; gap:20px; align-items:start; }
.cd-g .cd-in{ height:40px; }
.cd-g .cd-in.sm{ height:34px; }
.cd-g-step{ margin-bottom:16px; }
.cd-g-step .sh{ display:flex; align-items:center; gap:12px; padding:14px 18px; border-bottom:1px solid var(--cd-line); }
.cd-g-step .sh .n{ flex:0 0 28px; height:28px; border-radius:8px; background:#FDD400; color:var(--cd-ink); display:grid; place-items:center; font-weight:700; font-size:13px; }
.cd-g-step .sh h3{ margin:0; font-size:15px; font-weight:700; } .cd-g-step .sh p{ margin:1px 0 0; font-size:12.5px; color:var(--cd-muted); }
.cd-g-step .sh .rt{ margin-left:auto; display:flex; gap:8px; align-items:center; }
.cd-g-step .sb{ padding:16px 18px; }
.cd-btn.sm{ height:32px; padding:0 11px; font-size:12.5px; }
.cd-btn.big{ height:48px; width:100%; justify-content:center; font-size:15px; }
.cd-g-link{ display:inline-flex; align-items:center; gap:5px; color:var(--cd-active); font-weight:600; font-size:12.5px; background:none; border:0; padding:0; cursor:pointer; text-decoration:none; }
.cd-g-tool{ display:flex; gap:10px; margin-bottom:12px; flex-wrap:wrap; }
.cd-g-tool select{ width:200px; }
.cd-g-search{ position:relative; flex:1; min-width:220px; } .cd-g-search .cd-in{ width:100%; padding-left:36px; }
.cd-g-search .material-icons{ position:absolute; left:11px; top:11px; color:var(--cd-muted); }
.cd-g-dlist{ border:1px solid var(--cd-line); border-radius:10px; max-height:330px; overflow-y:auto; }
.cd-g .drow{ display:grid; grid-template-columns:36px minmax(0,1.6fr) 1fr 1fr 96px; align-items:center; padding:9px 14px; border-bottom:1px solid #F0F3F7; cursor:pointer; font-size:13.5px; }
.cd-g .drow.nu{ grid-template-columns:36px minmax(0,1.6fr) 1fr 96px; }
.cd-g .drow:last-child{ border-bottom:0; } .cd-g .drow:hover{ background:#F8FBFF; } .cd-g .drow.sel{ background:#FFFBE0; } .cd-g .drow.empty{ cursor:default; }
.cd-g .drow.head{ background:#F8FAFC; font-size:11.5px; font-weight:600; color:#475569; text-transform:uppercase; letter-spacing:.4px; cursor:default; position:sticky; top:0; z-index:1; }
.cd-g .drow b{ font-weight:600; display:block; } .cd-g .drow small{ color:var(--cd-muted); font-size:12px; }
.cd-g .cb{ width:18px; height:18px; border-radius:5px; border:1.6px solid #94A3B8; display:grid; place-items:center; background:#fff; flex:0 0 18px; }
.cd-g .cb .material-icons{ font-size:14px; color:#fff; opacity:0; vertical-align:0; }
.cd-g .sel .cb, .cd-g .cb.on, .cd-g .on > .cb{ background:var(--cd-navy); border-color:var(--cd-navy); }
.cd-g .sel .cb .material-icons, .cd-g .cb.on .material-icons, .cd-g .on > .cb .material-icons{ opacity:1; }
.cd-g .cb.part{ background:var(--cd-navy); border-color:var(--cd-navy); } .cd-g .cb.part::after{ content:""; width:9px; height:2px; background:#fff; }
.cd-g .st{ display:inline-flex; align-items:center; gap:6px; font-size:12.5px; font-weight:600; } .cd-g .st::before{ content:""; width:7px; height:7px; border-radius:50%; }
.cd-g .st.on{ color:#15803D; } .cd-g .st.on::before{ background:#22C55E; } .cd-g .st.off{ color:#94A3B8; } .cd-g .st.off::before{ background:#CBD5E1; }
.cd-g .sm{ font-size:12.5px; }
.cd-g-selbar{ display:flex; align-items:center; gap:8px; margin-top:12px; flex-wrap:wrap; }
.cd-g-pill{ display:inline-flex; align-items:center; gap:4px; background:#EAF1FA; color:var(--cd-navy); border-radius:16px; padding:3px 5px 3px 11px; font-size:12.5px; font-weight:600; }
.cd-g-pill button{ border:0; background:none; color:inherit; padding:0; cursor:pointer; display:grid; place-items:center; } .cd-g-pill .material-icons{ font-size:15px; vertical-align:0; }
.cd-g-pgrid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:10px; }
.cd-g-par{ display:flex; align-items:center; gap:11px; border:1.5px solid var(--cd-line); border-radius:10px; padding:10px 12px; cursor:pointer; background:#fff; min-width:0; }
.cd-g-par.on{ border-color:var(--cd-navy); background:#F5F9FE; }
.cd-g-par .ic{ flex:0 0 34px; height:34px; border-radius:9px; display:grid; place-items:center; color:#fff; background:var(--cd-navy); }
.cd-g-par .ic .material-icons{ vertical-align:0; font-size:19px; }
.cd-g-par > div{ min-width:0; } .cd-g-par b{ display:block; font-size:13.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .cd-g-par small{ font-size:11.5px; color:var(--cd-muted); }
.cd-g-par .cb{ margin-left:auto; }
.cd-g-info{ display:flex; gap:8px; align-items:center; padding:10px 12px; background:#F8FAFC; border-radius:8px; font-size:12.5px; color:#475569; grid-column:1/-1; }
.cd-g-lim{ margin-top:14px; border:1px solid var(--cd-line); border-radius:10px; padding:12px 14px; background:#FBFCFE; }
.cd-g-lim .hint{ margin:0 0 8px; font-size:12.5px; color:var(--cd-muted); }
.cd-g-lim table{ width:100%; border-collapse:collapse; font-size:13px; }
.cd-g-lim th{ text-align:left; font-size:11.5px; font-weight:600; color:#475569; padding:4px 6px; }
.cd-g-lim td{ padding:4px 6px; } .cd-g-lim .cd-in{ width:100%; }
.cd-g-lim .cd-chk{ display:flex !important; align-items:center; gap:8px; margin-top:10px; font-size:13px !important; font-weight:500 !important; color:#334155; }
.cd-g-presets{ display:flex; flex-wrap:wrap; gap:8px; }
.cd-g-ps{ height:36px; padding:0 14px; border-radius:18px; border:1px solid #D5DCE5; background:#fff; font:500 13px var(--cd-font); color:#334155; cursor:pointer; }
.cd-g-ps:hover{ border-color:var(--cd-navy); } .cd-g-ps.on{ background:var(--cd-navy); border-color:var(--cd-navy); color:#fff; }
.cd-g-range{ display:grid; grid-template-columns:1fr 1fr auto; gap:12px; margin-top:14px; align-items:end; }
.cd-g-range label, .cd-g label.t{ display:block; font-size:12.5px; font-weight:600; color:#334155; }
.cd-g-range .cd-in{ width:100%; margin-top:5px; } .cd-g label.t{ margin-bottom:6px; }
.cd-g-tz{ font-size:12.5px; color:var(--cd-muted); padding-bottom:11px; }
.cd-g-opts{ display:grid; grid-template-columns:1fr 1fr; gap:14px 22px; margin-top:16px; }
.cd-g-opts select.cd-in, .cd-g-opts input.cd-in{ width:100%; }
.cd-g-seg{ display:inline-flex; border:1px solid #D5DCE5; border-radius:9px; overflow:hidden; background:#fff; }
.cd-g-seg button{ border:0; background:none; padding:9px 14px; font:500 13px var(--cd-font); color:#475569; border-right:1px solid #E3E8EF; cursor:pointer; }
.cd-g-seg button:last-child{ border-right:0; } .cd-g-seg button.on{ background:var(--cd-navy); color:#fff; }
.cd-g-seg.dis{ opacity:.5; } .cd-g-seg.dis button{ cursor:not-allowed; }
.cd-g-types{ display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.cd-g-ty{ position:relative; border:1.5px solid var(--cd-line); border-radius:12px; padding:14px; cursor:pointer; background:#fff; display:flex; flex-direction:column; gap:6px; }
.cd-g-ty.on{ border-color:var(--cd-navy); box-shadow:0 0 0 3px rgba(11,58,102,.1); background:#FBFDFF; }
.cd-g-ty .ic{ width:38px; height:38px; border-radius:10px; display:grid; place-items:center; color:var(--cd-ink); background:#FDD400; } .cd-g-ty .ic .material-icons{ vertical-align:0; font-size:21px; }
.cd-g-ty[data-type="alarm"] .ic{ background:#DC2626; color:#fff; }
.cd-g-ty b{ font-size:14px; } .cd-g-ty small{ font-size:12.3px; color:var(--cd-muted); line-height:1.45; }
.cd-g-ty .fm{ display:flex; gap:5px; } .cd-g-ty .fm span{ font-size:10.5px; font-weight:700; letter-spacing:.4px; border-radius:4px; padding:2px 6px; background:#EEF2F7; color:#475569; }
.cd-g-ty .rb{ position:absolute; right:12px; top:12px; width:18px; height:18px; border-radius:50%; border:1.6px solid #94A3B8; } .cd-g-ty.on .rb{ border:5px solid var(--cd-navy); }
.cd-g-incl{ grid-column:1/-1; display:flex; flex-wrap:wrap; gap:4px 22px; align-items:center; } .cd-g-incl label.t{ width:100%; margin:0; }
.cd-g-tg{ display:flex; align-items:center; gap:10px; font-size:13.5px; cursor:pointer; padding:5px 0; user-select:none; }
.cd-g-tg .sw{ width:36px; height:20px; border-radius:10px; background:#CBD5E1; position:relative; flex:0 0 36px; transition:.15s; }
.cd-g-tg .sw::after{ content:""; position:absolute; left:2px; top:2px; width:16px; height:16px; border-radius:50%; background:#fff; transition:.15s; box-shadow:0 1px 2px rgba(0,0,0,.2); }
.cd-g-tg.on .sw{ background:var(--cd-navy); } .cd-g-tg.on .sw::after{ left:18px; }
.cd-g-fmts{ display:flex; gap:10px; }
.cd-g-fmt{ flex:1; display:flex; align-items:center; gap:10px; border:1.5px solid var(--cd-line); border-radius:10px; padding:10px 12px; cursor:pointer; background:#fff; }
.cd-g-fmt.on{ border-color:var(--cd-navy); background:#F5F9FE; } .cd-g-fmt.dis{ opacity:.5; cursor:not-allowed; }
.cd-g-fmt .fi{ width:34px; height:40px; border-radius:5px; display:grid; place-items:center; color:#fff; font-size:10.5px; font-weight:800; }
.cd-g-fmt b{ display:block; font-size:13.5px; } .cd-g-fmt small{ font-size:11.5px; color:var(--cd-muted); } .cd-g-fmt .cb{ margin-left:auto; }
.cd-g-mail{ margin-top:14px; } .cd-g-mail .cd-in{ width:100%; } .cd-g-mail .hint{ font-size:12.5px; margin:6px 0 0; color:#7A5A00; display:flex; gap:6px; align-items:center; }
.cd-g-side{ position:sticky; top:70px; }
.cd-g-sum .hd, .cd-g-recent .hd{ padding:14px 18px; border-bottom:1px solid var(--cd-line); display:flex; align-items:center; gap:10px; }
.cd-g-sum .hd h3, .cd-g-recent .hd h3{ margin:0; font-size:15px; } .cd-g-recent .hd a{ margin-left:auto; }
.cd-g-sum .kv{ padding:10px 18px 4px; }
.cd-g-sum .kv div{ display:flex; justify-content:space-between; gap:12px; padding:7px 0; border-bottom:1px dashed #E3E8EF; font-size:13px; }
.cd-g-sum .kv div:last-child{ border:0; } .cd-g-sum .kv span{ color:var(--cd-muted); white-space:nowrap; } .cd-g-sum .kv b{ font-weight:600; text-align:right; word-break:break-word; }
.cd-g-warn{ margin:6px 18px 0; padding:8px 12px; border-radius:8px; background:#FFF8E1; border:1px solid #FDE68A; color:#7A5A00; font-size:12.5px; display:none; }
.cd-g-warn.on{ display:block; } .cd-g-warn div{ display:flex; gap:7px; padding:3px 0; } .cd-g-warn .material-icons{ font-size:16px; }
.cd-g-sum .gen{ padding:14px 18px 18px; }
.cd-g-prog{ height:6px; background:#EEF2F7; border-radius:3px; overflow:hidden; margin-top:12px; display:none; } .cd-g-prog.on{ display:block; }
.cd-g-prog i{ display:block; height:100%; width:0; background:#FDD400; transition:width .4s; }
.cd-g-status{ font-size:12.5px; color:var(--cd-muted); margin-top:6px; min-height:16px; }
.cd-g-recent{ margin-top:16px; }
.cd-g-recent .row{ display:flex; align-items:center; gap:12px; padding:10px 18px; border-top:1px solid #F0F3F7; }
.cd-g-recent .row:first-of-type{ border-top:0; }
.cd-g-recent .fi{ width:30px; height:36px; border-radius:4px; display:grid; place-items:center; color:#fff; font-size:9.5px; font-weight:800; flex:0 0 30px; }
.cd-g-recent .row > div{ min-width:0; flex:1; } .cd-g-recent b{ display:block; font-size:13px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } .cd-g-recent small{ font-size:11.5px; color:var(--cd-muted); }
.cd-g-recent .new{ animation:cdFlash 1.8s ease-out; } @keyframes cdFlash{ 0%{ background:#FFF6BF; } 100%{ background:#fff; } }
@media (max-width:1250px){ .cd-g{ grid-template-columns:1fr; } .cd-g-side{ position:static; } .cd-g-types, .cd-g-opts{ grid-template-columns:1fr; } }

/* ---------- ThingsBoard account pages (create / reset password, 2-step sign-in, expired links) in CloudDash360 style ---------- */
:is(tb-create-password, tb-reset-password, tb-reset-password-request, tb-link-expired, tb-two-factor-auth-login, tb-force-two-factor-auth-login){ display:block; width:100%; height:100%; }
:is(tb-create-password, tb-reset-password, tb-reset-password-request, tb-link-expired, tb-two-factor-auth-login, tb-force-two-factor-auth-login) > div{
  position:relative; min-height:100vh; height:100%; overflow:auto; padding:96px 16px 64px; box-sizing:border-box;
  background:radial-gradient(900px 520px at 85% 110%, rgba(253,212,0,.10), transparent 60%),
             radial-gradient(700px 700px at -10% -20%, rgba(255,255,255,.07), transparent 60%),
             linear-gradient(140deg, #0D4378 0%, #0B3A66 45%, #082C50 100%) !important; }
:is(tb-create-password, tb-reset-password, tb-reset-password-request, tb-link-expired, tb-two-factor-auth-login, tb-force-two-factor-auth-login) > div::before{
  content:""; position:absolute; top:28px; left:36px; width:220px; height:46px; background:url(/cd360/logo-dark-bg.svg) left center/contain no-repeat; }
:is(tb-create-password, tb-reset-password, tb-reset-password-request, tb-link-expired, tb-two-factor-auth-login, tb-force-two-factor-auth-login) > div::after{
  content:"© 2026 Polwax · CloudDash360 IoT platform · encrypted connection"; position:absolute; left:0; right:0; bottom:22px; text-align:center; font:400 12px var(--cd-font); color:rgba(255,255,255,.55); }
:is(tb-create-password, tb-reset-password, tb-reset-password-request, tb-link-expired, tb-two-factor-auth-login, tb-force-two-factor-auth-login) mat-card.mat-mdc-card{
  width:440px !important; max-width:100% !important; background:#fff !important; color:var(--cd-ink) !important; border-radius:16px !important; overflow:hidden;
  box-shadow:0 30px 70px rgba(2,12,27,.38), 0 2px 6px rgba(2,12,27,.12) !important; padding:0 0 10px !important; border-top:5px solid #FDD400; }
:is(tb-create-password, tb-reset-password, tb-reset-password-request, tb-link-expired, tb-two-factor-auth-login, tb-force-two-factor-auth-login) .mat-mdc-card-header{ padding:30px 32px 4px !important; }
:is(tb-create-password, tb-reset-password, tb-reset-password-request, tb-link-expired, tb-two-factor-auth-login, tb-force-two-factor-auth-login) .mat-mdc-card-title,
:is(tb-create-password, tb-reset-password, tb-reset-password-request, tb-link-expired, tb-two-factor-auth-login, tb-force-two-factor-auth-login) .mat-mdc-card-title *{
  font:600 23px/1.3 var(--cd-font) !important; color:var(--cd-navy-ink) !important; letter-spacing:-.2px !important; }
:is(tb-create-password, tb-reset-password, tb-reset-password-request) .mat-mdc-card-title::after{
  content:"Set the password you will use to sign in to CloudDash360."; display:block; margin-top:6px; font:400 13px/1.5 var(--cd-font); color:var(--cd-muted); letter-spacing:0; }
tb-reset-password-request .mat-mdc-card-title::after{ content:"Enter the e-mail address of your account and we will send you a reset link."; }
:is(tb-create-password, tb-reset-password, tb-reset-password-request, tb-link-expired, tb-two-factor-auth-login, tb-force-two-factor-auth-login) .mat-mdc-card-content{ padding:16px 32px 20px !important; color:#334155 !important; font:400 14px/1.6 var(--cd-font) !important; }
:is(tb-create-password, tb-reset-password, tb-reset-password-request, tb-link-expired, tb-two-factor-auth-login, tb-force-two-factor-auth-login) .mat-mdc-card-actions{ padding:0 32px 22px !important; }
/* fields: light, rounded */
:is(tb-create-password, tb-reset-password, tb-reset-password-request, tb-two-factor-auth-login, tb-force-two-factor-auth-login) mat-card .mat-mdc-text-field-wrapper{ background:#F8FAFC !important; border-radius:10px !important; }
:is(tb-create-password, tb-reset-password, tb-reset-password-request, tb-two-factor-auth-login, tb-force-two-factor-auth-login) mat-card .mdc-notched-outline > *{ border-color:#D5DCE5 !important; }
:is(tb-create-password, tb-reset-password, tb-reset-password-request, tb-two-factor-auth-login, tb-force-two-factor-auth-login) mat-card .mdc-notched-outline__leading{ border-radius:10px 0 0 10px !important; }
:is(tb-create-password, tb-reset-password, tb-reset-password-request, tb-two-factor-auth-login, tb-force-two-factor-auth-login) mat-card .mdc-notched-outline__trailing{ border-radius:0 10px 10px 0 !important; }
:is(tb-create-password, tb-reset-password, tb-reset-password-request, tb-two-factor-auth-login, tb-force-two-factor-auth-login) mat-card .mdc-text-field--focused .mdc-notched-outline > *{ border-color:var(--cd-navy) !important; }
:is(tb-create-password, tb-reset-password, tb-reset-password-request, tb-two-factor-auth-login, tb-force-two-factor-auth-login) mat-card .mat-form-field-invalid .mdc-notched-outline > *,
:is(tb-create-password, tb-reset-password, tb-reset-password-request, tb-two-factor-auth-login, tb-force-two-factor-auth-login) mat-card .mdc-text-field--invalid .mdc-notched-outline > *{ border-color:#DC2626 !important; }
:is(tb-create-password, tb-reset-password, tb-reset-password-request, tb-two-factor-auth-login, tb-force-two-factor-auth-login) mat-card input{ color:var(--cd-ink) !important; caret-color:var(--cd-navy) !important; font:400 14.5px var(--cd-font) !important; }
:is(tb-create-password, tb-reset-password, tb-reset-password-request, tb-two-factor-auth-login, tb-force-two-factor-auth-login) mat-card input:-webkit-autofill{ -webkit-box-shadow:0 0 0 40px #F8FAFC inset !important; -webkit-text-fill-color:var(--cd-ink) !important; }
:is(tb-create-password, tb-reset-password, tb-reset-password-request, tb-two-factor-auth-login, tb-force-two-factor-auth-login) mat-card :is(.mdc-floating-label, mat-label){ color:#64748B !important; font:500 14px var(--cd-font) !important; }
:is(tb-create-password, tb-reset-password, tb-reset-password-request, tb-two-factor-auth-login, tb-force-two-factor-auth-login) mat-card .mdc-text-field--focused .mdc-floating-label{ color:var(--cd-navy) !important; }
:is(tb-create-password, tb-reset-password, tb-reset-password-request, tb-two-factor-auth-login, tb-force-two-factor-auth-login) mat-card .mdc-text-field--invalid .mdc-floating-label{ color:#DC2626 !important; }
:is(tb-create-password, tb-reset-password, tb-reset-password-request, tb-two-factor-auth-login, tb-force-two-factor-auth-login) mat-card .mat-icon{ color:#64748B !important; }
:is(tb-create-password, tb-reset-password, tb-reset-password-request, tb-two-factor-auth-login, tb-force-two-factor-auth-login) mat-card :is(.mat-mdc-form-field-error, mat-error){ color:#DC2626 !important; font:500 12px var(--cd-font) !important; }
:is(tb-create-password, tb-reset-password, tb-reset-password-request, tb-two-factor-auth-login, tb-force-two-factor-auth-login) mat-card .mat-mdc-form-field-hint{ color:#64748B !important; }
/* buttons */
:is(tb-create-password, tb-reset-password, tb-reset-password-request, tb-link-expired, tb-two-factor-auth-login, tb-force-two-factor-auth-login) mat-card .mdc-button--unelevated,
:is(tb-create-password, tb-reset-password, tb-reset-password-request, tb-link-expired, tb-two-factor-auth-login, tb-force-two-factor-auth-login) mat-card .mdc-button--raised{
  background:var(--cd-navy) !important; color:#fff !important; height:46px !important; min-width:160px; border-radius:10px !important; padding:0 24px !important;
  font:600 14.5px var(--cd-font) !important; letter-spacing:0 !important; box-shadow:0 6px 16px rgba(11,58,102,.25) !important; }
:is(tb-create-password, tb-reset-password, tb-reset-password-request, tb-link-expired, tb-two-factor-auth-login, tb-force-two-factor-auth-login) mat-card .mdc-button--unelevated:hover{ background:var(--cd-navy-2) !important; }
:is(tb-create-password, tb-reset-password, tb-reset-password-request, tb-link-expired, tb-two-factor-auth-login, tb-force-two-factor-auth-login) mat-card .mdc-button--unelevated:disabled{ background:#94A3B8 !important; box-shadow:none !important; }
:is(tb-create-password, tb-reset-password, tb-reset-password-request, tb-link-expired, tb-two-factor-auth-login, tb-force-two-factor-auth-login) mat-card .mat-mdc-button:not(.mdc-button--unelevated){
  color:var(--cd-active) !important; height:46px !important; border-radius:10px !important; font:600 14px var(--cd-font) !important; letter-spacing:0 !important; }
:is(tb-create-password, tb-reset-password, tb-reset-password-request, tb-link-expired, tb-two-factor-auth-login, tb-force-two-factor-auth-login) mat-card .mat-mdc-button:not(.mdc-button--unelevated):hover{ background:#EEF4FB !important; }
:is(tb-create-password, tb-reset-password, tb-reset-password-request, tb-two-factor-auth-login, tb-force-two-factor-auth-login) mat-card form > div:last-child{ margin-top:6px; }
/* password rules popup */
tb-password-requirements-tooltip, .tb-password-requirements-tooltip{ font-family:var(--cd-font) !important; }
@media (max-width:600px){ :is(tb-create-password, tb-reset-password, tb-reset-password-request, tb-link-expired, tb-two-factor-auth-login, tb-force-two-factor-auth-login) > div::before{ left:50%; transform:translateX(-50%); } }

/* ---------- ThingsBoard pages: tables, cards, buttons, detail panels ---------- */
tb-entities-table .mat-mdc-table .mat-mdc-header-cell, tb-entities-table table.mat-mdc-table th.mat-mdc-header-cell{
  font:600 11.5px var(--cd-font) !important; color:#5B6B80 !important; text-transform:uppercase; letter-spacing:.5px; background:#F8FAFC !important; }
tb-entities-table .mat-mdc-table .mat-mdc-cell{ font:400 12.5px/1.45 var(--cd-font) !important; color:var(--cd-ink); }
tb-entities-table .mat-mdc-table .mat-mdc-row:hover{ background:#F6F9FD !important; }
tb-entities-table .mat-mdc-table .mat-mdc-row.tb-current-entity{ background:#FFFBE0 !important; }
tb-entities-table .mat-mdc-table .mat-mdc-header-row, tb-entities-table .mat-mdc-table .mat-mdc-row{ min-height:50px; }
tb-entities-table .mat-mdc-table .mat-mdc-cell, tb-entities-table .mat-mdc-table .mat-mdc-header-cell{ border-bottom-color:#EEF2F6 !important; }
tb-entities-table .mat-toolbar .mat-toolbar-tools .tb-entity-table-title, tb-entities-table .mat-toolbar .mat-toolbar-tools > span:first-child,
.tb-main-content .mat-mdc-card .mat-toolbar .tb-entity-table-title{ font:600 17px var(--cd-font) !important; color:var(--cd-navy-ink) !important; letter-spacing:-.1px; }
tb-entities-table .mat-mdc-paginator, tb-entities-table .mat-mdc-paginator *{ font-size:12.5px !important; }
/* primary actions: navy, rounded */
.mat-mdc-raised-button.mat-primary, .mat-mdc-unelevated-button.mat-primary{ --mdc-protected-button-container-color:var(--cd-navy); --mdc-filled-button-container-color:var(--cd-navy);
  background-color:var(--cd-navy) !important; color:#fff !important; border-radius:8px !important; font-weight:600 !important; letter-spacing:0 !important; box-shadow:none !important; }
.mat-mdc-raised-button.mat-primary:hover, .mat-mdc-unelevated-button.mat-primary:hover{ background-color:var(--cd-navy-2) !important; }
.mat-mdc-button, .mat-mdc-raised-button, .mat-mdc-unelevated-button, .mat-mdc-outlined-button{ letter-spacing:0 !important; border-radius:8px !important; }
/* entity detail panel: secondary actions as soft buttons instead of a row of dark blocks */
tb-entity-details-panel .mat-mdc-raised-button.mat-primary, .tb-details-drawer .mat-mdc-raised-button.mat-primary,
tb-entity-details-panel .mat-mdc-raised-button:not(.mat-accent), .tb-details-drawer .mat-mdc-raised-button:not(.mat-accent){
  background:#EEF4FB !important; color:var(--cd-navy) !important; border:1px solid #D3E1F1 !important; box-shadow:none !important; font:500 12.5px var(--cd-font) !important; height:34px !important; }
tb-entity-details-panel .mat-mdc-raised-button:hover, .tb-details-drawer .mat-mdc-raised-button:hover{ background:#E1ECF8 !important; }
tb-entity-details-panel .mat-mdc-raised-button[color="warn"], tb-entity-details-panel .mat-mdc-raised-button.mat-warn{ background:#FEF2F2 !important; color:#B91C1C !important; border-color:#FECACA !important; }
tb-entity-details-panel .mat-mdc-button-base .mat-icon{ font-size:17px !important; width:17px !important; height:17px !important; }
/* cards and dialogs */
tb-entities-table .mat-mdc-card, .tb-main-content > * > .mat-mdc-card{ border-radius:var(--cd-radius) !important; box-shadow:var(--cd-shadow) !important; }
.mat-mdc-dialog-container .mdc-dialog__surface{ border-radius:14px !important; }
.mat-mdc-dialog-container .mat-toolbar.mat-primary{ background:var(--cd-navy) !important; }
.mat-mdc-menu-panel{ border-radius:10px !important; box-shadow:0 12px 32px rgba(15,23,42,.18) !important; }
.mat-mdc-menu-item .mdc-list-item__primary-text{ font:500 13.5px var(--cd-font) !important; }
.mat-mdc-tooltip .mdc-tooltip__surface{ font:500 12px var(--cd-font) !important; border-radius:6px !important; background:#0F2A47 !important; }
/* inner tabs (device details etc.) */
.tb-main-content .mat-mdc-tab .mdc-tab__text-label, .mat-mdc-tab .mdc-tab__text-label{ font:500 13.5px var(--cd-font) !important; letter-spacing:0 !important; }
.mat-mdc-tab-group .mdc-tab-indicator__content--underline{ border-color:var(--cd-active) !important; border-top-width:3px !important; border-radius:3px 3px 0 0; }
/* form fields */
.mat-mdc-form-field, .mat-mdc-select, .mat-mdc-input-element, .mdc-floating-label, mat-label{ letter-spacing:0 !important; }
.mat-mdc-checkbox .mdc-checkbox__native-control:enabled:checked ~ .mdc-checkbox__background{ background-color:var(--cd-navy) !important; border-color:var(--cd-navy) !important; }
/* scrollbars */
.tb-main-content ::-webkit-scrollbar{ width:9px; height:9px; } .tb-main-content ::-webkit-scrollbar-thumb{ background:#C9D3DF; border-radius:6px; border:2px solid transparent; background-clip:padding-box; }
.tb-main-content ::-webkit-scrollbar-thumb:hover{ background-color:#AAB7C6; }
.cd-chip::before{ content:"apartment"; font-family:'Material Icons'; font-size:17px; line-height:1; color:var(--cd-yellow); -webkit-font-feature-settings:'liga'; font-feature-settings:'liga'; }
/* dashboard widgets keep ThingsBoard's own widget typography (exactly as designed in each dashboard) */
tb-widget.tb-widget{ font-family:Roboto,"Helvetica Neue",sans-serif; }

/* ---------- Access control ---------- */
html.cd-acl-wait tb-side-menu ul.tb-side-menu, html.cd-acl-wait .cd-home .cd-grid{ visibility:hidden; }
tb-side-menu li.cd-acl-off{ display:none !important; }
body.cd-ac-open .cd-tabs{ display:none !important; }
body.cd-ac-open mat-toolbar.tb-primary-toolbar tb-breadcrumb{ display:none !important; }
body.cd-ac-open tb-side-menu a.tb-active:not(.cd-ac-link){ background:transparent !important; box-shadow:none !important; }
tb-side-menu a.cd-ac-link.cd-rc-active{ background:var(--cd-active) !important; color:#fff !important; box-shadow:inset 3px 0 0 var(--cd-yellow); }
.cd-ac{ position:absolute; inset:0; z-index:6; background:var(--cd-bg); overflow:auto; font-family:var(--cd-font); color:var(--cd-ink); }
.cd-ac *{ box-sizing:border-box; }
.cd-ac .material-icons{ font-size:18px; vertical-align:-4px; }
.cd-ac-note{ display:flex; gap:10px; align-items:flex-start; background:#EEF4FB; border:1px solid #D3E1F1; color:#1E3A5F; border-radius:10px; padding:10px 14px; font-size:13px; line-height:1.55; margin-bottom:16px; }
.cd-ac-note > .material-icons{ color:var(--cd-active); margin-top:2px; }
.cd-ac-tbar{ display:flex; align-items:center; gap:14px; padding:12px 14px; border-bottom:1px solid var(--cd-line); }
.cd-ac-tbar .cd-g-search{ max-width:360px; } .cd-ac-tbar .cd-in{ height:38px; }
.cd-ac-tbar .hint{ margin-left:auto; color:var(--cd-muted); font-size:12.5px; }
.cd-ac .cd-ac-sel{ height:36px; min-width:230px; font-size:13px; }
.cd-ac .cd-chip-s .material-icons{ font-size:15px !important; vertical-align:-3px; }
.cd-ac-grid{ display:grid; grid-template-columns:320px minmax(0,1fr); gap:18px; align-items:start; }
.cd-ac-list{ display:flex; flex-direction:column; gap:10px; position:sticky; top:70px; }
.cd-ac-pcard{ padding:14px 16px; cursor:pointer; border:1.5px solid var(--cd-line) !important; transition:border-color .15s, box-shadow .15s; }
.cd-ac-pcard:hover{ border-color:#B9CBE0 !important; }
.cd-ac-pcard.on{ border-color:var(--cd-navy) !important; box-shadow:0 0 0 3px rgba(11,58,102,.1) !important; }
.cd-ac-pcard .t{ display:flex; align-items:center; gap:8px; } .cd-ac-pcard .t b{ font-size:14.5px; font-weight:600; }
.cd-ac-pcard small{ display:block; color:var(--cd-muted); font-size:12.3px; line-height:1.45; margin:3px 0 8px; }
.cd-ac-pcard .m{ display:flex; flex-wrap:wrap; gap:4px 12px; font-size:11.8px; color:#475569; } .cd-ac-pcard .m .material-icons{ font-size:14px; vertical-align:-3px; margin-right:3px; color:#64748B; }
.cd-ac-def{ font-size:10.5px; font-weight:700; letter-spacing:.4px; text-transform:uppercase; background:#FDD400; color:var(--cd-ink); border-radius:5px; padding:2px 7px; }
.cd-ac-ed{ padding:0; overflow:hidden; }
.cd-ac-edh{ padding:16px 20px 12px; border-bottom:1px solid var(--cd-line); }
.cd-ac-edh label{ display:block; font-size:12.5px; font-weight:600; color:#334155; } .cd-ac-edh label .cd-in{ margin-top:5px; width:100%; font-weight:400; height:40px; }
.cd-ac-edh .cd-chk{ display:flex !important; align-items:center; gap:8px; margin-top:12px; font-weight:500; }
.cd-ac-mx{ width:100%; border-collapse:collapse; font-size:13.5px; }
.cd-ac-mx th{ text-align:left; background:#F8FAFC; padding:12px 20px; font-size:13px; font-weight:600; color:#334155; border-bottom:1px solid var(--cd-line); vertical-align:top; }
.cd-ac-mx th:not(:first-child){ width:190px; } .cd-ac-mx th .material-icons{ margin-right:6px; color:var(--cd-navy); }
.cd-ac-mx th small{ display:block; font-weight:400; color:var(--cd-muted); font-size:11.8px; margin-top:2px; }
.cd-ac-mx th .q{ display:block; font-weight:500; font-size:11.8px; margin-top:4px; } .cd-ac-mx th .q a{ color:var(--cd-active); cursor:pointer; }
.cd-ac-mx td{ padding:9px 20px; border-bottom:1px solid #F0F3F7; } .cd-ac-mx td small{ display:block; color:#94A3B8; font-size:11.5px; }
.cd-ac-mx tr.grp td{ background:#FBFCFE; font-size:11.5px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; color:#64748B; padding:8px 20px; }
.cd-ac-mx td.na{ color:#CBD5E1; } .cd-ac-mx td.na .material-icons{ color:#16A34A; }
.cd-ac-sw{ position:relative; display:inline-block; width:40px; height:22px; cursor:pointer; }
.cd-ac-sw input{ position:absolute; opacity:0; } .cd-ac-sw span{ position:absolute; inset:0; border-radius:11px; background:#CBD5E1; transition:.15s; }
.cd-ac-sw span::after{ content:""; position:absolute; left:2px; top:2px; width:18px; height:18px; border-radius:50%; background:#fff; box-shadow:0 1px 2px rgba(0,0,0,.25); transition:.15s; }
.cd-ac-sw.on span{ background:var(--cd-navy); } .cd-ac-sw.on span::after{ left:20px; }
.cd-ac-foot{ display:flex; align-items:center; gap:10px; padding:14px 20px; border-top:1px solid var(--cd-line); background:#FAFBFD; position:sticky; bottom:0; }
.cd-ac-foot .hint{ margin-left:auto; color:var(--cd-muted); font-size:12.5px; }
@media (max-width:1100px){ .cd-ac-grid{ grid-template-columns:1fr; } .cd-ac-list{ position:static; } }

/* ---------- Alert Center ---------- */
body.cd-al-open .cd-tabs{ display:none !important; }
body.cd-al-open mat-toolbar.tb-primary-toolbar tb-breadcrumb{ display:none !important; }
body.cd-al-open tb-side-menu a.tb-active:not(.cd-al-link){ background:transparent !important; box-shadow:none !important; }
tb-side-menu a.cd-al-link.cd-rc-active{ background:var(--cd-active) !important; color:#fff !important; box-shadow:inset 3px 0 0 var(--cd-yellow); }
.cd-al{ position:absolute; inset:0; z-index:6; background:var(--cd-bg); overflow:auto; font-family:var(--cd-font); color:var(--cd-ink); }
.cd-al *, .cd-al-drawer *{ box-sizing:border-box; }
.cd-al .material-icons, .cd-al-drawer .material-icons{ font-size:18px; vertical-align:-4px; }
.cd-al-live{ display:inline-flex; align-items:center; gap:7px; font-size:12px; font-weight:500; color:#15803D; background:#E8F7EE; border-radius:14px; padding:4px 11px; }
.cd-al-live i{ width:8px; height:8px; border-radius:50%; background:#22C55E; box-shadow:0 0 0 0 rgba(34,197,94,.6); animation:cdLive 1.8s infinite; }
@keyframes cdLive{ 0%{ box-shadow:0 0 0 0 rgba(34,197,94,.55); } 70%{ box-shadow:0 0 0 7px rgba(34,197,94,0); } 100%{ box-shadow:0 0 0 0 rgba(34,197,94,0); } }
.cd-chip-s.warn{ background:#FEF3C7; color:#B45309; }
.cd-al .cd-rc-table td b.nb{ font-size:15px; }
.cd-al-dots{ display:flex; flex-wrap:wrap; gap:3px; margin-top:4px; max-width:150px; }
.cd-al-dot{ width:9px; height:9px; border-radius:50%; background:#22C55E; } .cd-al-dot.warning{ background:#F59E0B; } .cd-al-dot.alarm, .cd-al-dot.nodata{ background:#DC2626; }
.cd-al-lim{ display:inline-block; font-size:11.5px; font-weight:600; border-radius:6px; padding:2px 7px; margin:1px 2px 1px 0; }
.cd-al-lim.w{ background:#FEF3C7; color:#92400E; } .cd-al-lim.a{ background:#FEE2E2; color:#991B1B; }
.cd-al-ch{ display:inline-grid; place-items:center; width:26px; height:26px; border-radius:7px; margin-right:4px; }
.cd-al-ch .material-icons{ color:#fff !important; font-size:15px !important; vertical-align:0; }
.cd-al-sw{ position:relative; width:40px; height:22px; border:0; padding:0; background:transparent; cursor:pointer; vertical-align:middle; }
.cd-al-sw span{ position:absolute; inset:0; border-radius:11px; background:#CBD5E1; transition:.15s; }
.cd-al-sw span::after{ content:""; position:absolute; left:2px; top:2px; width:18px; height:18px; border-radius:50%; background:#fff; box-shadow:0 1px 2px rgba(0,0,0,.25); transition:.15s; }
.cd-al-sw.on span{ background:var(--cd-navy); } .cd-al-sw.on span::after{ left:20px; }
.cd-al-filters{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:14px; }
.cd-al-dv{ display:inline-grid; place-items:center; width:24px; height:24px; border-radius:6px; margin-right:3px; }
.cd-al-dv.ok{ background:#E8F7EE; } .cd-al-dv.ok .material-icons{ color:#15803D !important; } .cd-al-dv.bad{ background:#FDECEC; } .cd-al-dv.bad .material-icons{ color:#B91C1C !important; }
.cd-al-dv .material-icons{ font-size:14px !important; vertical-align:0; }
/* editor */
.cd-al-drawer{ width:min(900px,100%) !important; font-family:var(--cd-font); }
.cd-al-sec{ padding:18px 0 16px; border-bottom:1px solid #EEF2F6; }
.cd-al-sec > .h{ display:flex; align-items:center; gap:12px; margin-bottom:12px; }
.cd-al-sec > .h .n{ flex:0 0 28px; height:28px; border-radius:8px; background:#FDD400; display:grid; place-items:center; font-weight:700; font-size:13px; }
.cd-al-sec > .h b{ display:block; font-size:15px; } .cd-al-sec > .h small{ display:block; font-size:12.5px; color:var(--cd-muted); }
.cd-al-l{ display:block; font-size:12.5px; font-weight:600; color:#334155; margin:8px 0 0; } .cd-al-l .cd-in{ margin-top:5px; font-weight:400; }
.cd-al-l small{ font-weight:400; color:var(--cd-muted); } .cd-al-l > small{ display:block; margin-top:3px; }
.cd-al-dhead{ display:flex; align-items:center; justify-content:space-between; padding:7px 12px; border-bottom:1px solid #E3E8EF; background:#F8FAFC; font-size:12.5px; color:var(--cd-muted); }
.cd-al-dhead .cd-chk{ display:flex !important; align-items:center; gap:8px; margin:0 !important; font-weight:500 !important; }
.cd-al-drawer .cd-pick{ margin-top:12px; } .cd-al-drawer .cd-pick-list{ max-height:230px; }
.cd-key small{ color:var(--cd-muted); font-weight:400; margin-left:4px; }
.cd-al-now{ display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; align-items:stretch; }
.cd-al-now .t{ display:flex; align-items:center; gap:4px; font-size:12px; font-weight:600; color:#15803D; padding-right:4px; }
.cd-al-now .v{ background:#F8FAFC; border:1px solid #E3E8EF; border-radius:8px; padding:6px 10px; font-size:13px; }
.cd-al-now .v b{ font-size:15px; } .cd-al-now .v small{ display:block; font-size:11px; color:var(--cd-muted); }
.cd-al-lims{ display:grid; grid-template-columns:repeat(4,1fr); gap:12px; }
.cd-al-lims .cd-al-l.a{ color:#991B1B; } .cd-al-lims .cd-al-l.w{ color:#92400E; }
.cd-al-in{ position:relative; display:block; } .cd-al-in .cd-in{ padding-right:46px; }
.cd-al-in em{ position:absolute; right:10px; top:15px; font-style:normal; font-size:12px; color:var(--cd-muted); font-weight:500; }
.cd-al-band{ margin-top:16px; }
.cd-al-band .bar{ position:relative; height:14px; border-radius:7px; overflow:visible; background:#E3E8EF; }
.cd-al-band .bar i{ position:absolute; top:0; bottom:0; } .cd-al-band .bar i:first-child{ border-radius:7px 0 0 7px; } .cd-al-band .bar i:nth-child(5){ border-radius:0 7px 7px 0; }
.cd-al-band i.ok, .cd-al-band .lg i.ok{ background:#86EFAC; } .cd-al-band i.w, .cd-al-band .lg i.w{ background:#FCD34D; } .cd-al-band i.a, .cd-al-band .lg i.a{ background:#FCA5A5; }
.cd-al-band .pin{ position:absolute; top:-5px; width:4px; height:24px; margin-left:-2px; border-radius:2px; background:var(--cd-navy); box-shadow:0 0 0 2px #fff; }
.cd-al-band .tks{ position:relative; height:20px; } .cd-al-band .tk{ position:absolute; transform:translateX(-50%); font-size:11.5px; font-weight:600; color:#475569; top:4px; }
.cd-al-band .lg{ display:flex; gap:16px; font-size:11.5px; color:var(--cd-muted); margin-top:2px; } .cd-al-band .lg i{ display:inline-block; width:10px; height:10px; border-radius:3px; margin-right:5px; vertical-align:-1px; } .cd-al-band .lg i.pn{ background:var(--cd-navy); width:4px; }
.cd-al-limtools{ margin-top:8px; }
.cd-al-grid3{ display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.cd-al-tgs{ margin-top:12px; display:flex; flex-direction:column; gap:2px; }
.cd-al-chs{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.cd-al-chc{ border:1.5px solid var(--cd-line); border-radius:12px; padding:12px 14px; background:#fff; transition:border-color .15s; }
.cd-al-chc.on{ border-color:var(--cd-navy); background:#FBFDFF; } .cd-al-chc.off{ background:#F8FAFC; }
.cd-al-chc .t{ display:flex; align-items:center; gap:10px; margin-bottom:8px; } .cd-al-chc .t b{ font-size:14px; flex:1; }
.cd-al-chc .ic{ width:32px; height:32px; border-radius:8px; display:grid; place-items:center; } .cd-al-chc .ic .material-icons{ color:#fff; vertical-align:0; font-size:17px; }
.cd-al-chc .na{ font-size:12px; color:var(--cd-muted); } .cd-al-chc .na a{ color:var(--cd-active); font-weight:600; cursor:pointer; }
.cd-al-chc small{ display:block; font-size:11.5px; color:var(--cd-muted); margin-top:4px; } .cd-al-chc .cd-in:disabled{ background:#F1F5F9; color:#94A3B8; }
.cd-al-drawer .cd-row2 .cd-btn{ height:40px; }
/* previews */
.cd-al-prev{ display:grid; grid-template-columns:1.15fr 1fr; gap:16px; margin-top:14px; }
.cd-al-prev h5, .cd-al-tcol h5{ display:flex; align-items:center; gap:6px; margin:10px 0 6px; font-size:12.5px; font-weight:600; color:#334155; } .cd-al-prev h5 small{ font-weight:400; color:var(--cd-muted); margin-left:auto; }
.cd-al-prev h5 .material-icons, .cd-al-tcol h5 .material-icons{ font-size:16px; color:var(--cd-navy); }
.cd-al-prev .mail{ border:1px solid var(--cd-line); border-radius:10px; overflow:hidden; background:#fff; }
.cd-al-prev .mail .sub{ padding:8px 12px; font-size:12.5px; font-weight:600; border-bottom:1px solid var(--cd-line); background:#F8FAFC; }
.cd-al-prev iframe{ width:100%; height:300px; border:0; display:block; }
.cd-al-bub{ max-width:100%; font-size:12.5px; line-height:1.5; padding:8px 11px; border-radius:12px; margin-bottom:6px; white-space:normal; word-break:break-word; }
.cd-al-bub.sms{ background:#EEF2F7; border-top-left-radius:3px; } .cd-al-bub.wa{ background:#DCF8C6; border-top-left-radius:3px; } .cd-al-bub.tg{ background:#E8F1FB; border-top-left-radius:3px; }
/* templates */
.cd-al-tgrid{ grid-template-columns:300px minmax(0,1fr) !important; } .cd-al-tgrid .cd-ac-list .cd-btn{ justify-content:center; }
.cd-al-ted{ padding:0; overflow:hidden; }
.cd-al-vars{ display:flex; flex-wrap:wrap; gap:6px; align-items:center; padding:12px 20px; border-bottom:1px solid var(--cd-line); background:#FBFCFE; }
.cd-al-vars > span{ font-size:12px; font-weight:600; color:var(--cd-muted); margin-right:2px; }
.cd-al-var{ border:1px solid #D3E1F1; background:#EEF4FB; color:var(--cd-navy); border-radius:6px; padding:3px 8px; font:500 12px ui-monospace,Consolas,monospace; cursor:pointer; }
.cd-al-var:hover{ background:#DCE9F7; }
.cd-al-tf{ display:grid; grid-template-columns:1fr 1fr; gap:20px; padding:6px 20px 16px; }
.cd-al-tf textarea.cd-in{ font-size:13px; line-height:1.5; }
.cd-al-tprev{ padding:4px 20px 16px; border-top:1px solid #EEF2F6; } .cd-al-tprev h4{ display:flex; gap:6px; align-items:center; margin:14px 0 0; font-size:13.5px; }
/* channels */
.cd-al-chgrid{ display:grid; grid-template-columns:1fr 1fr; gap:16px; align-items:start; }
.cd-al-chcard h3{ display:flex; align-items:center; gap:10px; } .cd-al-chcard h3 .cd-chip-s{ margin-left:auto; }
.cd-al-chcard h3 .ic{ width:32px; height:32px; border-radius:8px; display:grid; place-items:center; } .cd-al-chcard h3 .ic .material-icons{ color:#fff !important; vertical-align:0; }
.cd-al-chcard .tst{ margin-top:14px; padding-top:12px; border-top:1px dashed var(--cd-line); align-items:center; }
.cd-al-chcard .tst .cd-btn{ margin-top:0 !important; }
.cd-al-sub{ border-left:3px solid #E3E8EF; padding-left:12px; margin-top:6px; }
.cd-al-steps{ margin:4px 0 6px 18px; padding:0; font-size:12.5px; color:#475569; line-height:1.7; }
.cd-al-chats{ display:flex; flex-direction:column; gap:6px; margin:10px 0; } .cd-al-chat{ font-size:13px; background:#F8FAFC; border:1px solid var(--cd-line); border-radius:8px; padding:6px 10px; }
.cd-al-chat code{ background:#EEF4FB; color:var(--cd-navy); padding:1px 6px; border-radius:4px; user-select:all; }
@media (max-width:1200px){ .cd-al-chgrid, .cd-al-tf, .cd-al-prev, .cd-al-chs{ grid-template-columns:1fr; } .cd-al-tgrid{ grid-template-columns:1fr !important; } }
@media (max-width:760px){ .cd-al-lims, .cd-al-grid3{ grid-template-columns:1fr 1fr; } }
/* Widget library (system administrator) */
.cd-wl{ padding:0; overflow:hidden; }
.cd-wl-h{ display:flex; align-items:center; gap:18px; padding:18px 20px; border-bottom:1px solid var(--cd-line); }
.cd-wl-h > div > b{ display:block; font-size:16px; } .cd-wl-h span b{ font-weight:600; } .cd-wl-h span{ display:block; font-size:13px; color:var(--cd-muted); margin-top:3px; line-height:1.55; max-width:760px; }
.cd-wl-act{ margin-left:auto; display:flex; align-items:center; gap:12px; flex:0 0 auto; white-space:nowrap; }
.cd-wl-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(420px,1fr)); gap:14px; padding:18px 20px; }
.cd-wl-b{ display:flex; gap:14px; border:1px solid var(--cd-line); border-radius:12px; padding:12px; background:#fff; }
.cd-wl-b img, .cd-wl-b .ph{ width:150px; height:120px; object-fit:cover; border-radius:8px; background:#EEF2F6; flex:0 0 150px; border:1px solid var(--cd-line); }
.cd-wl-b b{ display:block; font-size:14.5px; } .cd-wl-b small{ display:block; color:var(--cd-active); font-weight:600; font-size:12px; margin:2px 0 6px; }
.cd-wl-b p{ margin:0 0 8px; font-size:12.5px; color:var(--cd-muted); line-height:1.5; }
.cd-wl-log{ max-height:220px; overflow:auto; border-top:1px solid var(--cd-line); background:#FBFCFE; padding:10px 20px; font-size:12.5px; }
.cd-wl-log div{ display:flex; align-items:center; gap:6px; padding:2px 0; } .cd-wl-log div .material-icons{ font-size:16px; color:#16A34A; } .cd-wl-log div.err .material-icons{ color:#DC2626; }
.cd-wl-log small{ margin-left:auto; color:var(--cd-muted); }

/* ======================= SCADA / HMI and BMS (hmi.js) ======================= */
body.cd-hm-open .cd-tabs{ display:none !important; }
body.cd-hm-open mat-toolbar.tb-primary-toolbar tb-breadcrumb{ display:none !important; }
body.cd-hm-open tb-side-menu a.tb-active:not(.cd-hm-link){ background:transparent !important; box-shadow:none !important; }
.cd-hm{ position:absolute; inset:0; z-index:6; background:var(--cd-bg); overflow:auto; font-family:var(--cd-font); color:var(--cd-ink); }
.cd-hm *, .hm-fp-wrap *, .hm-modal *{ box-sizing:border-box; }
.cd-hm .material-icons, .hm-fp .material-icons, .hm-modal .material-icons{ font-size:18px; vertical-align:-4px; }
.cd-hm .cd-seg a, .cd-seg a{ display:inline-block; background:#fff; padding:8px 15px; font:500 13px var(--cd-font); color:#475569; cursor:pointer; border-right:1px solid #E3E8EF; user-select:none; }
.cd-seg a:last-child{ border-right:0; } .cd-seg a.on{ background:var(--cd-navy); color:#fff; }
.cd-ibtn:hover{ background:#EEF2F7; } .cd-ibtn.danger:hover{ background:#FEE2E2; color:#B91C1C; }
.hm-sp{ flex:1; }
.hm-body{ display:block; }
.hm-toolbar{ display:flex; align-items:center; gap:12px; margin-bottom:14px; flex-wrap:wrap; } .hm-toolbar .cd-in{ max-width:320px; height:38px; }
/* screen tiles */
.hm-group{ margin-bottom:26px; }
.hm-group h3{ display:flex; align-items:center; gap:8px; font-size:15px; font-weight:700; margin:4px 0 12px; color:var(--cd-navy-ink); }
.hm-group h3 small{ font-size:12px; font-weight:600; color:#64748B; background:#E8EDF3; border-radius:10px; padding:1px 8px; }
.hm-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:16px; }
.hm-tile{ overflow:hidden; cursor:pointer; transition:box-shadow .15s, transform .15s; }
.hm-tile:hover{ box-shadow:0 8px 24px rgba(15,42,71,.14); transform:translateY(-2px); }
.hm-thumb{ aspect-ratio:16/9; background:#E4E8ED; border-bottom:1px solid var(--cd-line); overflow:hidden; }
.hm-thumb svg{ width:100%; height:100%; display:block; pointer-events:none; }
.hm-tile-f{ display:flex; align-items:center; gap:8px; padding:12px 14px; }
.hm-tile-f > div:first-child{ flex:1; min-width:0; } .hm-tile-f b{ display:block; font-size:14.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } .hm-tile-f small{ font-size:12px; color:var(--cd-muted); }
.hm-tile-a{ display:flex; gap:2px; opacity:.55; } .hm-tile:hover .hm-tile-a{ opacity:1; }
/* runtime */
.cd-hm.hm-run-mode{ overflow:hidden; }
.hm-run{ display:flex; flex-direction:column; height:100%; background:#D9DEE5; }
.hm-run:fullscreen{ background:#11181F; }
.hm-bar{ display:flex; align-items:center; gap:12px; padding:10px 16px; background:#fff; border-bottom:1px solid var(--cd-line); flex:0 0 auto; }
.hm-bar .cd-btn{ height:36px; } .hm-bar-t select{ height:36px; min-width:260px; font-weight:600; }
.hm-live{ display:inline-flex; align-items:center; gap:7px; font-size:12.5px; color:#475569; } .hm-live b{ color:#15803D; }
.hm-live i{ width:9px; height:9px; border-radius:50%; background:#22C55E; animation:cdLive 1.8s infinite; }
.hm-alm-chip{ display:inline-flex; align-items:center; gap:6px; font-size:12.5px; font-weight:600; border-radius:16px; padding:5px 12px; cursor:pointer; }
.hm-alm-chip.ok{ background:#E8F7EE; color:#15803D; } .hm-alm-chip.bad{ background:#FEE2E2; color:#B91C1C; }
.hm-alm-chip.blink{ animation:hmBlinkBg 1s steps(2) infinite; }
@keyframes hmBlinkBg{ 50%{ background:#B91C1C; color:#fff; } }
.hm-stage{ flex:1; min-height:0; padding:12px; display:flex; align-items:center; justify-content:center; }
.hm-stage svg{ width:100%; height:100%; display:block; border-radius:6px; box-shadow:0 1px 4px rgba(0,0,0,.12); }
.hm-click{ cursor:pointer; } .hm-click:hover{ filter:brightness(1.06) drop-shadow(0 0 4px rgba(37,99,235,.55)); }
.hm-spin{ animation:hmSpin 1.1s linear infinite; transform-box:fill-box; transform-origin:center; }
@keyframes hmSpin{ to{ transform:rotate(360deg); } }
.hm-flow{ animation:hmFlow .8s linear infinite; } .hm-flow.rev{ animation-direction:reverse; }
@keyframes hmFlow{ to{ stroke-dashoffset:-40; } }
.hm-blink{ animation:hmBlink 1s steps(2) infinite; } @keyframes hmBlink{ 50%{ stroke-opacity:.25; } }
.hm-banner{ display:none; flex:0 0 auto; background:#1F2937; color:#fff; font-size:13px; }
.hm-banner.on{ display:block; }
.hm-ban-row{ display:grid; grid-template-columns:110px 70px 220px 1fr 160px; gap:12px; padding:7px 16px; border-top:1px solid rgba(255,255,255,.08); align-items:center; }
.hm-ban-row b{ font-size:11.5px; letter-spacing:.4px; padding:2px 8px; border-radius:5px; text-align:center; }
.hm-ban-row .st{ color:rgba(255,255,255,.65); text-align:right; }
.sev-critical b, .hm-sev.sev-critical{ background:#B91C1C; color:#fff; } .sev-major b, .hm-sev.sev-major{ background:#EA580C; color:#fff; }
.sev-minor b, .hm-sev.sev-minor{ background:#F59E0B; color:#1F2937; } .sev-warning b, .hm-sev.sev-warning{ background:#FDE047; color:#1F2937; } .sev-indeterminate b, .hm-sev.sev-indeterminate{ background:#94A3B8; color:#fff; }
.hm-sev{ display:inline-block; font-size:11px !important; font-weight:700; letter-spacing:.4px; padding:3px 9px; border-radius:5px; }
/* faceplate */
.hm-fp-wrap{ position:fixed; inset:0; z-index:1150; background:rgba(15,23,42,.35); display:flex; align-items:center; justify-content:center; font-family:var(--cd-font); color:var(--cd-ink); }
.hm-fp{ width:440px; max-width:94vw; max-height:90vh; overflow:auto; background:#fff; border-radius:14px; box-shadow:0 24px 64px rgba(0,0,0,.32); }
.hm-fp-h{ display:flex; align-items:center; gap:12px; padding:14px 14px 14px 18px; background:var(--cd-navy); color:#fff; border-radius:14px 14px 0 0; }
.hm-fp-h .ic{ width:38px; height:38px; border-radius:10px; background:rgba(255,255,255,.14); display:grid; place-items:center; } .hm-fp-h .ic .material-icons{ font-size:22px; vertical-align:0; }
.hm-fp-h > div{ flex:1; } .hm-fp-h b{ display:block; font-size:16px; } .hm-fp-h small{ font-size:12px; color:rgba(255,255,255,.75); }
.hm-fp-h .cd-ibtn{ color:#fff; } .hm-fp-h .cd-ibtn:hover{ background:rgba(255,255,255,.14); }
.hm-fp-b{ padding:16px 18px 18px; }
.hm-fp-v{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.hm-fp-v .big{ font-size:30px; font-weight:700; letter-spacing:-.5px; } .hm-fp-v .big small{ font-size:15px; color:var(--cd-muted); margin-left:5px; font-weight:500; }
.hm-fp-spark{ margin:12px 0 4px; background:#F8FAFC; border:1px solid var(--cd-line); border-radius:10px; padding:8px 10px; }
.hm-fp-spark svg{ width:100%; height:74px; display:block; } .hm-fp-spark div{ display:flex; justify-content:space-between; font-size:11px; color:var(--cd-muted); }
.hm-fp-spark.empty{ font-size:12.5px; color:var(--cd-muted); text-align:center; }
/* sensor pin (3D warehouse / floor plans) */
.hm-pin-pulse{ transform-box:fill-box; transform-origin:center; animation:hmPinPulse 1.6s ease-out infinite; } @keyframes hmPinPulse{ 0%{ transform:scale(.5); opacity:.55; } 100%{ transform:scale(1.6); opacity:0; } }
.hm-fp-pin{ width:480px; } .hm-fp-pin h5{ margin:12px 0 0; font-size:12px; color:var(--cd-muted); font-weight:600; text-transform:uppercase; letter-spacing:.4px; }
.hm-pin-loc{ display:flex; align-items:center; gap:10px; background:#F1F5F9; border-radius:10px; padding:10px 12px; } .hm-pin-loc > .material-icons{ color:#0B3A66; } .hm-pin-loc > div{ flex:1; } .hm-pin-loc small{ display:block; font-size:11px; color:var(--cd-muted); } .hm-pin-loc b{ font-size:14.5px; }
.hm-pin-tiles{ display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:8px; margin-top:10px; }
.hm-pin-tile{ border:1px solid var(--cd-line); border-radius:10px; padding:9px 11px; } .hm-pin-tile span{ display:flex; align-items:center; gap:4px; font-size:11.5px; color:var(--cd-muted); } .hm-pin-tile span .material-icons{ font-size:15px; }
.hm-pin-tile b{ display:block; font-size:24px; font-weight:700; letter-spacing:-.4px; margin:2px 0; } .hm-pin-tile b small{ font-size:12px; color:var(--cd-muted); margin-left:3px; font-weight:500; } .hm-pin-tile code{ font-size:10.5px; color:#94A3B8; }
.hm-pin-rng{ display:flex; gap:4px; margin-top:12px; } .hm-pin-rng a{ padding:4px 10px; border-radius:6px; font-size:12px; cursor:pointer; color:var(--cd-muted); border:1px solid var(--cd-line); } .hm-pin-rng a.on{ background:#0B3A66; color:#fff; border-color:#0B3A66; }
.hm-fp-t{ width:100%; border-collapse:collapse; margin-top:10px; font-size:13px; } .hm-fp-t td{ padding:6px 0; border-bottom:1px solid #EEF2F6; } .hm-fp-t td:first-child{ color:var(--cd-muted); width:110px; }
.hm-fp-cmd{ display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:16px; } .hm-fp-cmd .cd-btn{ height:46px; justify-content:center; font-size:14.5px; }
.hm-fp-cmd .cd-btn:only-child{ grid-column:1/-1; }
.cd-btn.go{ background:#16A34A; border-color:#16A34A; color:#fff; } .cd-btn.go:hover{ background:#15803D; }
.cd-btn.stop{ background:#DC2626; border-color:#DC2626; color:#fff; } .cd-btn.stop:hover{ background:#B91C1C; }
.cd-btn.go[disabled], .cd-btn.stop[disabled]{ background:#E2E8F0; border-color:#E2E8F0; color:#94A3B8; opacity:1; }
.hm-fp-sp{ display:flex; gap:10px; align-items:flex-end; margin-top:16px; } .hm-fp-sp label{ flex:1; font-size:12.5px; font-weight:600; color:#334155; } .hm-fp-sp .cd-in{ margin-top:5px; height:44px; font-size:16px; } .hm-fp-sp .cd-btn{ height:44px; }
.hm-fp-lim{ font-size:12px; color:var(--cd-muted); margin-top:6px; }
.hm-fp-note{ display:flex; align-items:center; gap:8px; margin-top:14px; font-size:13px; color:#92400E; background:#FEF3C7; border-radius:8px; padding:9px 12px; }
.hm-conf{ display:flex; align-items:center; gap:10px; margin-top:14px; background:#EFF6FF; border:1px solid #BFDBFE; border-radius:10px; padding:10px 12px; flex-wrap:wrap; }
.hm-conf > .material-icons{ color:#2563EB; } .hm-conf > div{ flex:1; min-width:200px; } .hm-conf b{ display:block; font-size:13.5px; } .hm-conf small{ font-size:12px; color:#475569; }
.hm-ok, .hm-err{ display:flex; align-items:center; gap:8px; margin-top:14px; font-size:13px; border-radius:8px; padding:9px 12px; }
.hm-ok{ background:#E8F7EE; color:#15803D; } .hm-err{ background:#FEE2E2; color:#991B1B; }
.hm-fp code, .cd-hm code{ font-family:"IBM Plex Mono",Consolas,monospace; font-size:12px; background:#F1F5F9; padding:1px 5px; border-radius:4px; }
/* new-screen dialog */
.hm-modal{ align-items:center; justify-content:center; }
.hm-dlg{ width:720px; max-width:95vw; max-height:92vh; overflow:auto; background:#fff; border-radius:14px; box-shadow:0 24px 64px rgba(0,0,0,.3); }
.hm-dlg-h{ display:flex; align-items:center; justify-content:space-between; padding:16px 18px; border-bottom:1px solid var(--cd-line); } .hm-dlg-h b{ font-size:17px; }
.hm-dlg-b{ padding:6px 20px 16px; } .hm-dlg-b label small{ font-weight:400; color:var(--cd-muted); }
.hm-dlg-f{ display:flex; justify-content:flex-end; gap:10px; padding:14px 18px; border-top:1px solid var(--cd-line); background:#F8FAFC; border-radius:0 0 14px 14px; }
.hm-tpls{ display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin:14px 0 4px; }
.hm-tpls button{ display:flex; flex-direction:column; align-items:flex-start; gap:4px; text-align:left; padding:14px; border:1.5px solid #D5DCE5; border-radius:12px; background:#fff; cursor:pointer; font-family:var(--cd-font); color:var(--cd-ink); }
.hm-tpls button .material-icons{ font-size:26px !important; color:var(--cd-navy); } .hm-tpls button b{ font-size:14px; } .hm-tpls button small{ font-size:12px; color:var(--cd-muted); line-height:1.4; }
.hm-tpls button.on{ border-color:var(--cd-active); background:#EFF6FF; box-shadow:0 0 0 3px rgba(30,100,174,.15); }
/* editor */
.cd-hm.hm-ed-mode{ overflow:hidden; }
.hm-ed{ display:flex; flex-direction:column; height:100%; }
.hm-ed-bar{ display:flex; align-items:center; gap:8px; padding:9px 14px; background:#fff; border-bottom:1px solid var(--cd-line); }
.hm-ed-bar .cd-btn{ height:36px; } .hm-ed-name{ display:flex; gap:8px; } .hm-ed-name .cd-in{ height:36px; } .hm-ed-name .cd-in[data-name]{ width:280px; font-weight:600; } .hm-ed-name .cd-in[data-folder]{ width:180px; }
.hm-zoom{ font-size:12px; font-weight:600; color:#475569; min-width:42px; text-align:center; }
.hm-ed-main{ flex:1; min-height:0; display:grid; grid-template-columns:212px 1fr 320px; }
.hm-pal{ background:#fff; border-right:1px solid var(--cd-line); overflow:auto; padding:10px 10px 20px; }
.hm-pal-g h4{ font-size:11px; text-transform:uppercase; letter-spacing:.6px; color:#64748B; margin:12px 4px 6px; }
.hm-pal-i{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
.hm-pal-i button span{ max-width:100%; overflow:hidden; text-overflow:ellipsis; }
.hm-pal-i button{ display:flex; flex-direction:column; align-items:center; gap:3px; padding:9px 4px 7px; border:1px solid #E3E8EF; border-radius:9px; background:#F8FAFC; cursor:pointer; font:500 11px/1.2 var(--cd-font); color:#334155; text-align:center; }
.hm-pal-i button:hover{ border-color:var(--cd-active); background:#EFF6FF; color:var(--cd-active); } .hm-pal-i button .material-icons{ font-size:22px !important; color:var(--cd-navy); vertical-align:0; }
.hm-tip{ font-size:11.5px; color:#64748B; line-height:1.5; margin:14px 4px 0; }
.hm-canvas{ overflow:auto; background:#CBD2DA; position:relative; }
.hm-canvas-in{ padding:20px; width:max-content; min-width:100%; }
.hm-canvas svg{ display:block; margin:0 auto; box-shadow:0 2px 10px rgba(0,0,0,.18); background:#fff; touch-action:none; user-select:none; }
.hm-canvas .hm-e{ cursor:move; }
.hm-props{ background:#fff; border-left:1px solid var(--cd-line); overflow:auto; padding:6px 16px 30px; font-size:13px; }
.hm-props h3{ display:flex; align-items:center; gap:7px; font-size:13.5px; font-weight:700; margin:16px 0 4px; padding-top:12px; border-top:1px solid #EEF2F6; color:var(--cd-navy-ink); }
.hm-props h3:first-child{ border-top:0; padding-top:4px; } .hm-props h3 .cd-ibtn{ width:30px; height:30px; }
.hm-props h4{ font-size:12px; margin:12px 0 0; color:#334155; } .hm-props h4 small{ font-weight:400; color:#64748B; }
.hm-props label{ display:block; font-size:12px; font-weight:600; color:#334155; margin:9px 0 0; } .hm-props label small{ font-weight:400; color:#64748B; }
.hm-props .cd-in{ margin-top:4px; height:34px; font-size:13px; width:100%; } .hm-props input[type=color].cd-in{ padding:2px 4px; }
.hm-props .hm-chk{ display:flex; align-items:center; gap:7px; font-weight:500; } .hm-props .hm-chk input{ width:16px; height:16px; }
.hm-row2{ display:grid; grid-template-columns:1fr 1fr; gap:8px; } .hm-row4{ display:grid; grid-template-columns:repeat(4,1fr); gap:6px; }
.hm-row{ display:flex; gap:8px; margin-top:6px; }
.hm-hint{ font-size:12px; color:#64748B; line-height:1.5; margin:6px 0 0; }
.hm-stats{ margin-top:18px; font-size:12px; color:#64748B; background:#F8FAFC; border-radius:8px; padding:9px 11px; }
/* alarms / trends / log / connections */
.hm-akpi{ display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:14px; }
.hm-akp{ display:flex; align-items:center; gap:12px; padding:14px 16px; } .hm-akp i{ width:10px; height:36px; border-radius:4px; } .hm-akp b{ font-size:24px; } .hm-akp span{ color:var(--cd-muted); font-size:13px; }
.cd-rc-table tr.hm-unack td:first-child{ box-shadow:inset 3px 0 0 #DC2626; }
.hm-tr-ctl{ display:flex; align-items:flex-end; gap:16px; padding:14px 16px; margin-bottom:14px; flex-wrap:wrap; }
.hm-tr-ctl label{ font-size:12px; font-weight:600; color:#334155; } .hm-tr-ctl select{ display:block; margin-top:4px; min-width:240px; height:38px; }
.hm-tr-keys{ flex:1; display:flex; flex-wrap:wrap; gap:6px; min-width:260px; }
.hm-kchip{ display:inline-flex; align-items:center; font-size:12.5px !important; font-weight:500 !important; padding:6px 12px; border:1px solid #D5DCE5; border-radius:16px; cursor:pointer; background:#fff; user-select:none; }
.hm-kchip input{ display:none; } .hm-kchip.on{ background:var(--cd-navy); border-color:var(--cd-navy); color:#fff !important; }
.hm-tr-r{ display:flex; gap:10px; align-items:center; }
.hm-chart{ padding:12px 16px 8px; margin-bottom:12px; position:relative; }
.hm-ch-h{ display:flex; align-items:center; gap:18px; font-size:12.5px; color:var(--cd-muted); margin-bottom:4px; flex-wrap:wrap; }
.hm-ch-h > b:first-child{ flex:1; display:flex; align-items:center; gap:8px; font-size:14px; color:var(--cd-ink); } .hm-ch-h > b i{ width:10px; height:10px; border-radius:3px; } .hm-ch-h span b{ color:var(--cd-ink); }
.hm-chart svg{ width:100%; height:170px; display:block; }
.hm-tip-box{ position:absolute; top:40px; transform:translateX(-50%); background:#0F2A47; color:#fff; font-size:11.5px; padding:3px 8px; border-radius:6px; pointer-events:none; opacity:0; white-space:nowrap; } .hm-tip-box.on{ opacity:1; }
.hm-conn-intro{ display:flex; gap:16px; padding:18px 20px; margin-bottom:16px; } .hm-conn-intro .ic{ width:46px; height:46px; flex:0 0 46px; border-radius:12px; background:var(--cd-navy); color:#fff; display:grid; place-items:center; } .hm-conn-intro .ic .material-icons{ font-size:24px; vertical-align:0; }
.hm-conn-intro b{ font-size:15px; } .hm-conn-intro p{ margin:6px 0 8px; font-size:13.5px; line-height:1.6; color:#334155; } .hm-conn-intro .cd-al-steps{ font-size:13px; }
.hm-conn{ display:grid; grid-template-columns:repeat(auto-fill,minmax(340px,1fr)); gap:14px; margin-bottom:16px; }
.hm-cc{ padding:16px 18px; } .hm-cc-h{ display:flex; align-items:center; gap:12px; } .hm-cc-h > i{ width:6px; height:38px; border-radius:3px; } .hm-cc-h > div{ flex:1; } .hm-cc-h b{ display:block; font-size:14.5px; } .hm-cc-h small{ font-size:12px; color:var(--cd-muted); }
.hm-cc p{ font-size:13px; line-height:1.6; color:#334155; margin:10px 0 0; }
.hm-snip{ padding:16px 18px; } .hm-snip pre{ background:#0F172A; color:#E2E8F0; border-radius:10px; padding:14px 16px; font:12px/1.55 "IBM Plex Mono",Consolas,monospace; overflow:auto; margin:10px 0 8px; }
@media (max-width:1100px){ .hm-ed-main{ grid-template-columns:170px 1fr 270px; } .hm-tpls{ grid-template-columns:1fr; } .hm-akpi{ grid-template-columns:repeat(2,1fr); } .hm-ban-row{ grid-template-columns:90px 60px 1fr 1fr; } .hm-ban-row .st{ display:none; } }

/* ---------- IoT Hub removed: sidebar entry + Home Help Center card ---------- */
tb-side-menu li:has(a[href="/iot-hub"]), tb-side-menu a[href^="/iot-hub"]{ display:none !important; }
.cd-hc{ font-family:var(--cd-font); padding:14px 18px 16px; height:100%; box-sizing:border-box; display:flex; flex-direction:column; }
.cd-hc *{ box-sizing:border-box; }
.cd-hc-h{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; }
.cd-hc-h b{ display:block; font-size:15px; color:var(--cd-ink); } .cd-hc-h div span{ font-size:12.5px; color:var(--cd-muted); }
.cd-hc-h a{ display:inline-flex; align-items:center; gap:6px; font-size:13px; font-weight:600; color:var(--cd-active); text-decoration:none; white-space:nowrap; }
.cd-hc-h a .material-icons{ font-size:16px; }
.cd-hc-g{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; flex:1; align-content:start; }
.cd-hc-g a{ display:flex; align-items:center; gap:10px; padding:10px 12px; border:1px solid var(--cd-line); border-radius:10px; text-decoration:none; color:var(--cd-ink); font-size:13px; font-weight:500; background:#fff; transition:.15s; min-width:0; }
.cd-hc-g a:hover{ border-color:#C9D6E6; box-shadow:0 4px 14px rgba(15,42,71,.1); }
.cd-hc-g a > span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cd-hc-g i{ flex:0 0 30px; width:30px; height:30px; border-radius:8px; display:grid; place-items:center; }
.cd-hc-g i .material-icons{ font-size:17px; color:#fff; }
@media (max-width:1200px){ .cd-hc-g{ grid-template-columns:repeat(2,minmax(0,1fr)); } }

/* ======================= 21 CFR Part 11 (cfr.js) ======================= */
body.cd-cfr tb-side-menu li:has(> tb-menu-link a[href="/customers"]), body.cd-cfr tb-side-menu li:has(a[href="/customers"]){ display:none !important; }
body.cf-open .cd-tabs{ display:none !important; }
body.cf-open mat-toolbar.tb-primary-toolbar tb-breadcrumb{ display:none !important; }
body.cf-open tb-side-menu a.tb-active:not(.cf-link){ background:transparent !important; box-shadow:none !important; }
.cf-page{ position:absolute; inset:0; z-index:6; background:var(--cd-bg); overflow:auto; font-family:var(--cd-font); color:var(--cd-ink); }
.cf-page *, .cf-ov *{ box-sizing:border-box; }
.cf-page .material-icons, .cf-ov .material-icons, .cf-idle .material-icons, .cf-chip .material-icons{ font-size:18px; vertical-align:-4px; }
.cf-chip{ display:inline-flex; align-items:center; gap:6px; height:30px; padding:0 4px 0 10px; border-radius:16px; background:rgba(253,212,0,.16); border:1px solid rgba(253,212,0,.55); color:#FDD400; font:600 12px var(--cd-font); white-space:nowrap; margin-right:8px; }
.cf-chip .material-icons{ font-size:16px !important; vertical-align:0; }
.cf-chip i{ font-style:normal; background:#FDD400; color:#082541; border-radius:12px; padding:2px 9px; font-weight:700; }
/* signature dialog */
.cf-ov{ position:fixed; inset:0; z-index:3000; background:rgba(8,20,36,.55); display:flex; align-items:center; justify-content:center; font-family:var(--cd-font); color:var(--cd-ink); animation:cfIn .15s ease; }
@keyframes cfIn{ from{ opacity:0; } }
.cf-dlg{ width:520px; max-width:94vw; max-height:94vh; overflow:auto; background:#fff; border-radius:16px; box-shadow:0 30px 80px rgba(0,0,0,.4); }
.cf-h{ display:flex; align-items:center; gap:12px; padding:16px 20px; background:var(--cd-navy); color:#fff; border-radius:16px 16px 0 0; box-shadow:inset 0 -3px 0 var(--cd-yellow); }
.cf-h .ic{ width:40px; height:40px; border-radius:11px; background:rgba(253,212,0,.18); display:grid; place-items:center; } .cf-h .ic .material-icons{ color:#FDD400; font-size:22px; vertical-align:0; }
.cf-h b{ display:block; font-size:17px; } .cf-h small{ font-size:12px; color:rgba(255,255,255,.75); }
.cf-b{ padding:16px 20px 6px; } .cf-b label{ display:block; font-size:12.5px; font-weight:600; color:#334155; margin-top:12px; } .cf-b label .cd-in{ margin-top:5px; font-weight:400; }
.cf-b textarea.cd-in{ margin-top:8px; width:100%; resize:vertical; font:inherit; font-size:13.5px; padding:8px 10px; }
.cf-act{ background:#F1F5FB; border:1px solid #DCE6F2; border-radius:10px; padding:10px 12px; } .cf-act small, .cf-who small{ display:block; font-size:11px; text-transform:uppercase; letter-spacing:.5px; color:#64748B; } .cf-act b{ font-size:14px; }
.cf-who{ display:grid; grid-template-columns:1.2fr 1.4fr .9fr; gap:10px; margin-top:12px; } .cf-who b{ font-size:13px; word-break:break-all; }
.cf-cert{ display:flex; gap:8px; align-items:flex-start; font-size:12px; color:#475569; background:#FFF8E1; border:1px solid #FDE68A; border-radius:8px; padding:8px 10px; margin:14px 0 4px; } .cf-cert .material-icons{ color:#B45309; font-size:16px !important; }
.cf-err{ color:#B91C1C; font-size:13px; min-height:18px; margin-top:6px; }
.cf-f{ display:flex; justify-content:flex-end; gap:10px; padding:12px 20px 16px; }
.cf-idle{ position:fixed; right:20px; bottom:20px; z-index:2500; display:flex; gap:12px; align-items:center; background:#0F2A47; color:#fff; border-radius:12px; padding:12px 16px; box-shadow:0 14px 40px rgba(0,0,0,.3); font-family:var(--cd-font); max-width:380px; border-left:4px solid #FDD400; }
.cf-idle b{ display:block; font-size:14px; } .cf-idle span{ font-size:12.5px; color:rgba(255,255,255,.8); } .cf-idle .material-icons{ color:#FDD400; font-size:24px !important; }
/* users */
.cf-access{ display:flex; align-items:center; gap:14px; padding:14px 18px; margin-bottom:16px; } .cf-access > .material-icons{ font-size:24px !important; color:var(--cd-active); } .cf-access > div{ flex:1; } .cf-access > div > b{ display:block; } .cf-access > div > span{ font-size:13px; color:#475569; }
.cf-role{ display:inline-block; font-size:12px; font-weight:700; color:var(--c); background:color-mix(in srgb, var(--c) 12%, white); border:1px solid color-mix(in srgb, var(--c) 30%, white); border-radius:12px; padding:2px 10px; }
tr.cf-off td{ opacity:.55; }
.cf-note{ display:flex; gap:8px; align-items:flex-start; font-size:12.5px; color:#475569; margin:12px 2px; }
.cf-roles{ display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:6px; }
.cf-rcard{ display:block !important; border:1.5px solid #D5DCE5; border-radius:10px; padding:10px 12px !important; margin:0 !important; cursor:pointer; position:relative; }
.cf-rcard input{ position:absolute; right:10px; top:10px; } .cf-rcard b{ display:block; font-size:13.5px; } .cf-rcard small{ display:block; font-size:11.5px; color:#64748B; font-weight:400; line-height:1.4; margin-top:3px; }
.cf-rcard:has(input:checked){ border-color:var(--cd-active); background:#EFF6FF; } .cf-rcard.dis{ opacity:.45; cursor:not-allowed; }
.cf-created{ display:flex; gap:10px; background:#E8F7EE; border:1px solid #BBE9CC; border-radius:10px; padding:12px; margin-top:14px; } .cf-created > .material-icons{ color:#15803D; } .cf-created b{ display:block; } .cf-created span{ font-size:12.5px; } .cf-created input{ margin-top:6px; width:100%; font-size:12px; }
.cf-matrix td:not(:first-child), .cf-matrix th:not(:first-child){ text-align:center; } .cf-yes .material-icons{ color:#16A34A; font-size:20px !important; } .cf-no{ color:#CBD5E1; }
.cf-rdesc{ display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-top:14px; } .cf-rdesc .cd-card{ padding:14px; } .cf-rdesc b{ display:block; margin-bottom:4px; } .cf-rdesc span{ font-size:12.5px; color:#475569; }
.cf-set{ display:grid; grid-template-columns:1.3fr 1fr; gap:16px; } .cf-sc{ padding:18px 20px; } .cf-sc:last-child{ grid-column:1/-1; }
.cf-sc h3{ display:flex; align-items:center; gap:8px; font-size:15px; margin:0 0 8px; color:var(--cd-navy-ink); } .cf-sc h3:not(:first-child){ margin-top:18px; } .cf-sc p{ font-size:13.5px; color:#475569; margin:6px 0; } .cf-sc label{ display:block; font-size:12.5px; font-weight:600; color:#334155; } .cf-sc .cd-in{ margin-top:5px; width:100%; }
.cf-sc textarea.cd-in{ font:inherit; font-size:13px; padding:8px 10px; } .cf-sc .cd-btn{ margin-top:12px; } .cf-sc .ok{ color:#15803D; }
.cf-list{ list-style:none; padding:0; margin:8px 0 0; } .cf-list li{ display:flex; gap:10px; align-items:center; font-size:13.5px; padding:6px 0; border-bottom:1px solid #EEF2F6; } .cf-list .material-icons{ color:var(--cd-active); }
/* audit trail */
.cf-atb{ display:flex; align-items:center; gap:10px; padding:12px 14px; margin:18px 0 12px; flex-wrap:wrap; } .cf-atb .cd-in{ height:38px; } .cf-atb input[data-q]{ width:260px; } .cf-atb .cd-btn{ height:38px; }
.cf-at tbody tr{ cursor:pointer; } .cf-sig{ display:inline-flex; align-items:center; gap:4px; font-size:12px; font-weight:700; color:#B45309; background:#FEF3C7; border-radius:10px; padding:2px 8px; }
.cf-sig .material-icons{ font-size:14px !important; color:#B45309 !important; }
.cf-verify{ display:flex; gap:12px; align-items:center; padding:12px 16px; margin-bottom:12px; } .cf-verify.ok{ border-color:#BBE9CC; background:#F0FDF4; } .cf-verify.bad{ border-color:#FECACA; background:#FEF2F2; }
.cf-verify > .material-icons{ font-size:28px !important; } .cf-verify.ok > .material-icons{ color:#16A34A; } .cf-verify.bad > .material-icons{ color:#DC2626; } .cf-verify b{ display:block; } .cf-verify span{ font-size:12.5px; color:#475569; }
.cf-kv{ width:100%; border-collapse:collapse; font-size:13px; } .cf-kv td{ padding:6px 4px; border-bottom:1px solid #EEF2F6; vertical-align:top; word-break:break-all; } .cf-kv td:first-child{ width:120px; color:#64748B; word-break:normal; }
.cf-pre{ background:#0F172A; color:#E2E8F0; border-radius:10px; padding:12px; font:11.5px/1.5 "IBM Plex Mono",Consolas,monospace; white-space:pre-wrap; word-break:break-all; max-height:340px; overflow:auto; }
/* report approval column */
.cf-rst{ display:inline-flex; align-items:center; gap:4px; font-size:12px; font-weight:700; border-radius:10px; padding:2px 9px; } .cf-rst.draft{ background:#F1F5F9; color:#475569; } .cf-rst.reviewed{ background:#EDE9FE; color:#6D28D9; } .cf-rst.approved{ background:#DCFCE7; color:#15803D; }
.cf-rst .material-icons{ font-size:14px !important; color:inherit !important; }
@media (max-width:1100px){ .cf-set, .cf-rdesc{ grid-template-columns:1fr; } }
.cd-ac-cfr{ display:flex; align-items:center; gap:16px; padding:16px 20px; margin-top:16px; } .cd-ac-cfr .ic{ width:44px; height:44px; flex:0 0 44px; border-radius:12px; background:#0B3A66; display:grid; place-items:center; } .cd-ac-cfr .ic .material-icons{ color:#FDD400; font-size:24px; vertical-align:0; }
.cd-ac-cfr > div:nth-child(2){ flex:1; } .cd-ac-cfr b{ display:block; font-size:15px; } .cd-ac-cfr span{ font-size:13px; color:#475569; line-height:1.55; }
.cd-ac-cfrsw{ display:inline-flex; align-items:center; gap:8px; cursor:pointer; font-size:12.5px; font-weight:600; color:#64748B; }
.cd-ac-cfrsw input{ display:none; } .cd-ac-cfrsw i{ width:38px; height:22px; border-radius:11px; background:#CBD5E1; position:relative; transition:.15s; }
.cd-ac-cfrsw i::after{ content:""; position:absolute; left:3px; top:3px; width:16px; height:16px; border-radius:50%; background:#fff; transition:.15s; box-shadow:0 1px 2px rgba(0,0,0,.2); }
.cd-ac-cfrsw.on{ color:#15803D; } .cd-ac-cfrsw.on i{ background:#16A34A; } .cd-ac-cfrsw.on i::after{ left:19px; }
.cf-atb .cd-in{ width:auto !important; } .cf-atb select.cd-in{ min-width:170px; } .cf-atb input[data-q]{ width:220px !important; } .cf-atb .cd-chk{ display:inline-flex; align-items:center; gap:6px; font-size:13px; }
/* 21 CFR — before/after, declaration, training, reviews, validation */
.cf-chg{ margin-top:10px; max-height:180px; overflow:auto; }
.cf-diff{ width:100%; border-collapse:collapse; font-size:12.5px; background:#fff; border:1px solid var(--cd-line); border-radius:8px; overflow:hidden; }
.cf-diff th{ background:#F8FAFC; text-align:left; font-size:11px; text-transform:uppercase; letter-spacing:.4px; color:#64748B; padding:6px 8px; }
.cf-diff td{ padding:6px 8px; border-top:1px solid #EEF2F6; vertical-align:top; word-break:break-word; } .cf-diff td:first-child{ font-family:"IBM Plex Mono",monospace; font-size:11.5px; color:#334155; width:34%; }
.cf-diff td.o{ background:#FEF2F2; color:#991B1B; } .cf-diff td.n{ background:#F0FDF4; color:#166534; }
.cf-chgn{ color:#1E64AE !important; } .cf-chgn .material-icons{ font-size:14px !important; color:#1E64AE !important; }
.cf-decl-t{ font-size:14px; line-height:1.65; background:#F8FAFC; border:1px solid var(--cd-line); border-left:4px solid #FDD400; border-radius:8px; padding:12px 14px; margin:0 0 6px; }
.cf-tr{ display:inline-flex; align-items:center; gap:4px; border:0; border-radius:12px; padding:3px 10px; font:600 12px var(--cd-font); cursor:pointer; }
.cf-tr.ok{ background:#DCFCE7; color:#15803D; } .cf-tr.no{ background:#FEF3C7; color:#B45309; } .cf-tr .material-icons{ font-size:15px !important; color:inherit !important; }
.cf-trd{ display:flex; gap:8px; align-items:center; font-size:13px; background:#F1F5FB; border-radius:8px; padding:9px 12px; margin-bottom:10px; }
.cf-tri{ border:1px solid var(--cd-line); border-radius:10px; padding:10px 12px; margin-bottom:8px; } .cf-tri.done{ background:#F0FDF4; border-color:#BBE9CC; }
.cf-tri .h{ display:flex; align-items:center; gap:8px; } .cf-tri .h .material-icons{ color:#94A3B8; } .cf-tri.done .h .material-icons{ color:#16A34A; } .cf-tri small{ display:block; margin:4px 0 0 30px; color:#475569; font-size:12px; }
.cf-trf{ display:flex; gap:6px; margin:8px 0 0 30px; } .cf-trf .cd-in{ height:32px; font-size:12.5px; } .cf-trf input[type=date]{ width:150px; } .cf-trf [data-trainer]{ flex:1; }
.cf-iq{ margin-top:12px; } .cf-iq .cf-list a{ color:var(--cd-active); }
.cf-dot{ background:#DC2626; color:#fff; font-size:10px; font-weight:700; border-radius:8px; padding:1px 6px; margin-left:4px; }
.cf-revh{ display:flex; align-items:center; gap:14px; padding:14px 18px; margin:18px 0 14px; } .cf-revh > .material-icons{ font-size:28px !important; } .cf-revh.ok > .material-icons{ color:#16A34A; } .cf-revh.bad{ border-color:#FECACA; background:#FEF2F2; } .cf-revh.bad > .material-icons{ color:#DC2626; }
.cf-revh > div{ flex:1; } .cf-revh b{ display:block; } .cf-revh span{ font-size:13px; color:#475569; }
.cd-rc-drawer.cf-wide{ width:760px; max-width:96vw; }
.cf-rk{ display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin:12px 0; } .cf-rk > div{ display:flex; align-items:center; gap:8px; border:1px solid var(--cd-line); border-radius:10px; padding:8px 10px; }
.cf-rk b{ font-size:18px; } .cf-rk span{ font-size:12px; color:#475569; } .cf-rk .warn{ background:#FFFBEB; border-color:#FDE68A; } .cf-rk .material-icons{ color:#64748B; }
.cf-exl{ max-height:240px; overflow:auto; border:1px solid var(--cd-line); border-radius:10px; } .cf-exl table{ width:100%; border-collapse:collapse; font-size:12.5px; } .cf-exl td{ padding:6px 8px; border-bottom:1px solid #EEF2F6; vertical-align:top; }
.cf-oc{ display:flex; flex-direction:column; gap:6px; margin-top:6px; } .cf-oc label{ font-weight:500 !important; display:flex !important; gap:8px; align-items:center; margin:0 !important; }
.cf-rev{ border-left-color:#DC2626 !important; }
.cf-axs{ width:100%; border-collapse:collapse; font-size:13px; } .cf-axs th{ text-align:left; font-size:11px; text-transform:uppercase; color:#64748B; padding:6px; border-bottom:1px solid var(--cd-line); }
.cf-axs td{ padding:7px 6px; border-bottom:1px solid #EEF2F6; vertical-align:top; } .cf-axs tr.warn td{ background:#FFFBEB; } .cf-axs select{ height:32px; min-width:110px; }
.cf-revh .cd-in{ height:38px; }

/* ---------------- Licensing (license.js) ---------------- */
body.cd-lc-open .cd-tabs{ display:none !important; }
body.cd-lc-open mat-toolbar.tb-primary-toolbar tb-breadcrumb{ display:none !important; }
body.cd-lc-open tb-side-menu a.tb-active:not(.cd-lic-link){ background:transparent !important; box-shadow:none !important; }
.cd-lc{ position:absolute; inset:0; z-index:6; background:var(--cd-bg); overflow:auto; font-family:var(--cd-font); color:var(--cd-ink); }
.cd-lc *{ box-sizing:border-box; }
.cd-lc .material-icons, .cd-lic-bar .material-icons{ font-size:18px; vertical-align:-4px; }
.lc-in{ padding-top:18px; }
.cd-btn.danger{ color:#B91C1C; border-color:#FCA5A5; }
.lc-st{ display:flex; align-items:center; gap:16px; padding:18px 20px; margin-bottom:14px; }
.lc-st .ic{ width:48px; height:48px; border-radius:12px; display:grid; place-items:center; flex:none; }
.lc-st .ic .material-icons{ font-size:28px; vertical-align:0; }
.lc-st.ok .ic{ background:#DCFCE7; color:#15803D; } .lc-st.warn .ic{ background:#FEF3C7; color:#B45309; } .lc-st.bad .ic{ background:#FEE2E2; color:#B91C1C; }
.lc-st b{ display:block; font-size:18px; } .lc-st span{ color:var(--cd-muted); font-size:13px; }
.lc-warn{ display:flex; gap:10px; align-items:center; padding:11px 16px; margin-bottom:12px; font-size:14px; font-weight:500; }
.lc-warn.bad{ background:#FEF2F2; color:#B91C1C; border-color:#FECACA; } .lc-warn.warn{ background:#FFFBEB; color:#B45309; border-color:#FDE68A; } .lc-warn.ok{ background:#F0FDF4; color:#15803D; border-color:#BBF7D0; margin-top:12px; }
.lc-grid{ display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); gap:14px; }
@media (max-width:1100px){ .lc-grid{ grid-template-columns:1fr; } }
.lc-dl{ padding:18px 20px; } .lc-dl h3{ margin:0 0 12px; font-size:15px; }
.lc-dl dl{ display:grid; grid-template-columns:140px 1fr; gap:9px 14px; margin:0; font-size:14px; }
.lc-dl dt{ color:var(--cd-muted); } .lc-dl dd{ margin:0; font-weight:500; }
.lc-dl label{ display:block; font-size:13px; font-weight:600; margin:14px 0 6px; } .lc-dl label .cd-in, .lc-dl label input[type=file]{ margin-top:6px; display:block; font-weight:400; }
.lc-act{ display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
.lc-key{ font:600 15px ui-monospace,Consolas,monospace !important; letter-spacing:.5px; text-transform:uppercase; }
.lc-code{ font:11.5px ui-monospace,Consolas,monospace !important; min-height:70px; }
.lc-off{ text-decoration:line-through; }
.lc-bar{ height:6px; background:#E2E8F0; border-radius:4px; margin-top:6px; overflow:hidden; max-width:160px; } .lc-bar i{ display:block; height:100%; background:var(--cd-navy); border-radius:4px; }
.lc-search{ position:relative; width:min(380px,100%); } .lc-search .material-icons{ position:absolute; left:11px; top:11px; color:#94A3B8; } .lc-search .cd-in{ padding-left:36px; }
.lc-k{ font:600 13px ui-monospace,Consolas,monospace; color:var(--cd-navy); }
a.lc-pcs{ font-weight:700; cursor:pointer; color:var(--cd-navy); }
.lc-mods{ display:grid; grid-template-columns:1fr 1fr; gap:6px 12px; }
.lc-new{ display:flex; align-items:center; gap:12px; background:#F1F5F9; border-radius:10px; padding:14px 16px; margin:12px 0 4px; }
.lc-new code{ font:700 20px ui-monospace,Consolas,monospace; color:var(--cd-navy); letter-spacing:1px; flex:1; }
.lc-tbl table{ width:100%; } .lc-h4{ margin:18px 0 6px; font-size:13px; font-weight:700; color:var(--cd-ink); text-transform:uppercase; letter-spacing:.4px; }
.lc-log{ font-size:12.5px; line-height:1.8; max-height:220px; overflow:auto; }
.cd-lic-bar{ position:fixed; left:50%; transform:translateX(-50%); bottom:16px; z-index:1100; display:flex; gap:12px; align-items:center; max-width:min(760px,94vw);
  padding:10px 10px 10px 16px; border-radius:10px; font:500 13.5px var(--cd-font); box-shadow:0 10px 30px rgba(15,23,42,.25); }
.cd-lic-bar.warn{ background:#FFFBEB; color:#92400E; border:1px solid #FDE68A; } .cd-lic-bar.bad{ background:#FEF2F2; color:#991B1B; border:1px solid #FECACA; }
.cd-lic-bar a{ color:inherit; font-weight:700; text-decoration:underline; margin-left:6px; }

/* 21 CFR: controlled report viewer */
.cf-lock{ color:#94A3B8 !important; cursor:help; display:inline-grid; place-items:center; }
.cf-view{ display:flex !important; align-items:center !important; justify-content:center !important; }
.cf-vbox{ width:min(1100px,94vw); height:92vh; background:#fff; border-radius:12px; display:flex; flex-direction:column; overflow:hidden; box-shadow:0 20px 60px rgba(15,23,42,.35); }
.cf-vh{ display:flex; align-items:center; gap:12px; padding:12px 16px; border-bottom:1px solid var(--cd-line,#E2E8F0); font-family:var(--cd-font); }
.cf-vh > div{ flex:1; min-width:0; } .cf-vh b{ display:block; font-size:15px; color:var(--cd-ink); } .cf-vh > div span{ font-size:12.5px; color:var(--cd-muted); }
.cf-vbox iframe{ flex:1; border:0; width:100%; background:#525659; }

/* ---------------- Platform notifications (toasts) in Polwax style ---------------- */
.tb-toast{ background:#fff !important; color:var(--cd-ink,#16202C) !important; border-radius:12px !important; border:1px solid #E2E8F0 !important; border-left:5px solid var(--cd-navy,#0B2F55) !important;
  box-shadow:0 12px 32px rgba(15,23,42,.18) !important; font-family:var(--cd-font) !important; font-size:14px !important; font-weight:500 !important; line-height:1.45 !important;
  padding:6px 8px 6px 14px !important; margin:10px !important; min-width:320px; max-width:560px; display:flex !important; align-items:center; gap:10px; }
.tb-toast::before{ content:"info"; font-family:'Material Icons'; font-size:24px; line-height:1; flex:none; color:var(--cd-navy,#0B2F55); -webkit-font-feature-settings:'liga'; font-feature-settings:'liga'; }
.tb-toast .toast-text{ padding:8px 4px !important; color:inherit !important; font-size:14px !important; flex:1; }
.tb-toast button{ border:0 !important; padding:6px 14px !important; cursor:pointer; color:var(--cd-navy,#0B2F55) !important; background:#E8EEF6 !important; border-radius:8px !important; font:600 13px var(--cd-font) !important; letter-spacing:0 !important; text-transform:none !important; margin:4px 0 4px 8px !important; }
.tb-toast.error-toast{ border-left-color:#DC2626 !important; background:#FEF2F2 !important; } .tb-toast.error-toast::before{ content:"error"; color:#DC2626; }
.tb-toast.warn-toast{ border-left-color:#F5B400 !important; background:#FFFBEB !important; } .tb-toast.warn-toast::before{ content:"warning"; color:#D97706; }
.tb-toast.success-toast{ border-left-color:#16A34A !important; background:#F0FDF4 !important; } .tb-toast.success-toast::before{ content:"check_circle"; color:#16A34A; }
.tb-toast.info-toast{ border-left-color:var(--cd-navy,#0B2F55) !important; }
.tb-modern-toast-panel{ border-radius:10px !important; font-family:var(--cd-font) !important; box-shadow:0 10px 28px rgba(15,23,42,.18) !important; border:1px solid #E2E8F0; }
.tb-modern-toast-panel.error-toast{ background:#FEF2F2 !important; color:#B91C1C !important; border-left:5px solid #DC2626; }
.tb-modern-toast-panel.warn-toast{ background:#FFFBEB !important; color:#92400E !important; border-left:5px solid #F5B400; }
.tb-modern-toast-panel.success-toast{ background:#F0FDF4 !important; color:#15803D !important; border-left:5px solid #16A34A; }
.tb-modern-toast-panel.info-toast{ background:#fff !important; color:var(--cd-ink) !important; border-left:5px solid var(--cd-navy,#0B2F55); }
.mat-mdc-snack-bar-container .mdc-snackbar__surface{ background:transparent !important; box-shadow:none !important; }

/* Report Center → PDF header & footer */
.hf-card{ grid-column:1 / -1; }
.hf-side{ border:1px solid var(--cd-line,#E2E8F0); border-radius:10px; padding:10px 12px; margin:10px 0; }
.hf-sh{ display:flex; align-items:center; gap:16px; flex-wrap:wrap; margin-bottom:4px; } .hf-sh b{ font-size:13.5px; margin-right:auto; }
.hf-3{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; } .hf-3 label{ margin:6px 0 0 !important; }
.hf-tags{ display:flex; flex-wrap:wrap; gap:6px; margin:6px 0 10px; }
.hf-tag{ border:1px dashed #94A3B8; background:#F8FAFC; color:var(--cd-navy,#0B2F55); border-radius:999px; padding:3px 10px; font:600 12px var(--cd-font); cursor:pointer; }
.hf-tag:hover{ background:#FEF3C7; border-color:#F5B400; }
.hf-opts{ display:flex; align-items:end; gap:18px; flex-wrap:wrap; } .hf-opts label{ margin:0 !important; } .hf-opts input[type=color]{ display:block; width:52px; height:34px; border:1px solid #CBD5E1; border-radius:8px; padding:2px; background:#fff; margin-top:6px; }
.hf-opts select{ width:80px; display:block; margin-top:6px; }
.hf-pv{ margin:14px 0 6px; background:#E2E8F0; border-radius:10px; padding:16px; }
.hf-page{ background:#fff; max-width:620px; margin:0 auto; padding:14px 22px; box-shadow:0 4px 14px rgba(15,23,42,.12); border-radius:4px; font-family:Arial,sans-serif; color:#4B5563; }
.hf-row{ display:grid; grid-template-columns:1fr 1fr 1fr; align-items:center; gap:8px; min-height:20px; } .hf-row span:nth-child(2){ text-align:center; } .hf-row span:nth-child(3){ text-align:right; }
.hf-row span{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } .hf-row b{ color:#1F2937; } .hf-row img{ height:18px; vertical-align:middle; margin-right:6px; }
.hf-row.lb{ border-bottom:1px solid #D1D5DB; padding-bottom:4px; } .hf-row.lt{ border-top:1px solid #D1D5DB; padding-top:4px; } .hf-row.off{ display:block; text-align:center; color:#94A3B8; font-style:italic; font-size:11px; }
.hf-pg{ color:#1F2937; padding:1px 8px; border-radius:3px; font-weight:700; }
.hf-body{ padding:14px 0; } .hf-body i{ display:block; height:8px; background:#EEF2F7; border-radius:4px; margin:8px 0; } .hf-body i.s{ width:60%; }
.hf-act{ display:flex; justify-content:flex-end; gap:8px; }

/* ---------- alarm acknowledgement remarks ---------- */
.ak-dlg{ width:560px; } .ak-dlg .cf-f{ display:flex; gap:8px; align-items:center; }
.ak-al{ display:flex; gap:12px; align-items:center; background:#F5F9FE; border:1px solid #E3EAF2; border-radius:10px; padding:10px 12px; margin-bottom:12px; font-size:13px; }
.ak-al b{ display:block; font-size:14px; color:var(--cd-ink); } .ak-al span{ color:#64748B; font-size:12px; } .ak-al .mut{ color:#94A3B8; }
.ak-sev{ flex:none; font-size:11px !important; font-weight:700; letter-spacing:.3px; padding:4px 9px; border-radius:6px; background:#FDE047; color:#1F2937 !important; }
.ak-sev.critical{ background:#B91C1C; color:#fff !important; } .ak-sev.major{ background:#EA580C; color:#fff !important; } .ak-sev.minor{ background:#F59E0B; }
.ak-lbl{ font-size:12.5px; font-weight:600; color:#334155; margin:2px 0 6px; } .ak-lbl em{ color:#DC2626; font-style:normal; }
.ak-chips{ display:flex; flex-wrap:wrap; gap:6px; margin-bottom:12px; }
.ak-chip{ border:1px solid #CBD5E1; background:#fff; border-radius:18px; padding:6px 12px; font:500 12.5px var(--cd-font); color:#334155; cursor:pointer; }
.ak-chip:hover{ border-color:#0B3A66; } .ak-chip.on{ background:#0B3A66; border-color:#0B3A66; color:#fff; box-shadow:inset 0 -2px 0 #FFD200; }
.ak-rm{ display:block; margin-top:4px; font-size:11.5px; color:#0B3A66; } .ak-rm b{ font-weight:600; } .ak-rm small{ color:#64748B; }
.cd-al-ack .cd-card{ padding:16px 18px; } .cd-al-ack textarea{ min-height:220px; font-size:13px; line-height:1.55; }
.cd-al-ack h3{ font-size:15px !important; font-weight:600; color:var(--cd-ink); display:flex; align-items:center; gap:8px; margin:0 0 6px !important; } .cd-al-ack h3 .material-icons{ font-size:20px; color:#0B3A66; }
.cd-al-ack label{ display:block; font-size:12.5px; font-weight:600; color:#334155; margin:10px 0 0; } .cd-al-ack label small{ font-weight:400; color:#64748B; } .cd-al-ack label .cd-in{ margin-top:5px; width:100%; }
.cd-al-ack .cd-g-tg{ margin-top:12px; } .cd-al-ack .cd-set-foot{ display:flex; gap:8px; justify-content:flex-end; margin-top:14px; }
.cd-al-ack table{ width:100%; border-collapse:collapse; font-size:12.5px; } .cd-al-ack th{ text-align:left; font-size:11px; letter-spacing:.4px; text-transform:uppercase; color:#64748B; padding:8px; border-bottom:1px solid #E3EAF2; }
.cd-al-ack td{ padding:9px 8px; border-bottom:1px solid #EEF2F7; vertical-align:top; } .cd-al-ack td b{ font-weight:600; } .cd-al-ack td small{ color:#475569; }
.cd-lvl{ display:inline-block; min-width:26px; text-align:center; font-weight:700; font-size:11px; border-radius:4px; padding:1px 5px; margin-right:6px; }
.cd-lvl.hh, .cd-lvl.ll{ background:#FEE2E2; color:#B91C1C; } .cd-lvl.h, .cd-lvl.l{ background:#FEF3C7; color:#B45309; }
