/* Keep the original Radar Vision artwork on a legible white background. */
tb-logo.login-logo,
tb-logo.tb-logo-title {
  box-sizing: border-box !important;
  background: #fff;
  border-radius: 6px;
}
tb-logo.login-logo > a,
tb-logo.tb-logo-title > a {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  color: #17232b !important;
  text-decoration: none !important;
}
tb-logo.login-logo img,
tb-logo.tb-logo-title img {
  display: block !important;
  object-fit: contain !important;
  max-width: 100% !important;
  height: auto !important;
}
tb-logo.tb-logo-title {
  width: 218px !important;
  max-width: calc(100% - 16px) !important;
  height: 56px !important;
  margin: 4px auto !important;
  padding: 3px 10px;
}
tb-logo.tb-logo-title img { width: 194px !important; }
tb-logo.tb-logo-title .safetcam-product-name {
  font-size: 12px;
  line-height: 14px;
  font-weight: 600;
  letter-spacing: .5px;
}
tb-logo.login-logo {
  width: 300px !important;
  max-width: 100% !important;
  height: 112px !important;
  padding: 12px 16px;
}
tb-logo.login-logo img { width: 268px !important; }
tb-logo.login-logo .safetcam-product-name {
  margin-top: 8px;
  font-size: 24px;
  line-height: 30px;
  font-weight: 600;
  letter-spacing: .4px;
}

/* Present the native Devices router link as one top-level Cameras entry. */
tb-side-menu tb-menu-toggle.safetcam-camera-menu > .tb-button-toggle { display: none !important; }
tb-side-menu tb-menu-toggle.safetcam-camera-menu > .tb-menu-toggle-list { display: block !important; height: auto !important; overflow: visible !important; }
tb-side-menu tb-menu-toggle.safetcam-camera-menu > .tb-menu-toggle-list > li:not(.safetcam-camera-menu-item) { display: none !important; }
tb-side-menu .safetcam-camera-menu-item a { padding-left: 16px !important; }
tb-side-menu .safetcam-camera-menu-item[hidden] { display: none !important; }
tb-side-menu .safetcam-hide-iot-hub { display: none !important; }

/* Home only: leave the application toolbar and other pages intact. */
tb-home-links.safetcam-home-active > :not(.safetcam-home) { display: none !important; }
tb-home-links.safetcam-home-active { display: block; height: 100%; overflow: auto; background: #f4f7fb; }
.safetcam-home { box-sizing: border-box; max-width: 1500px; margin: 0 auto; padding: 26px 30px 40px; color: #172b46; font-family: Roboto, Arial, sans-serif; }
.safetcam-home * { box-sizing: border-box; }
.safetcam-home-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 30px; }
.safetcam-home-shortcut { display: grid; grid-template-columns: 42px 1fr 20px; grid-template-rows: auto auto; gap: 4px 13px; align-items: center; padding: 19px 20px; border: 1px solid #dce5f0; border-radius: 12px; background: #fff; text-decoration: none !important; color: #172b46 !important; box-shadow: 0 2px 5px #15365a05; transition: border-color .15s, box-shadow .15s; }
.safetcam-home-shortcut[hidden] { display: none !important; }
.safetcam-home-shortcut:hover { border-color: #8baed0; box-shadow: 0 4px 12px #15365a12; }
.safetcam-home-shortcut:focus-visible, .safetcam-home-refresh:focus-visible, .safetcam-chart-table summary:focus-visible { outline: 3px solid #0b78cf; outline-offset: 3px; }
.safetcam-shortcut-icon { display: flex; grid-row: 1 / 3; justify-content: center; align-items: center; width: 42px; height: 42px; border-radius: 10px; background: #edf4fc; color: #1f5888; font: 600 25px/1 Arial, sans-serif; }
.safetcam-home-shortcut strong { font-size: 17px; line-height: 22px; }
.safetcam-shortcut-detail { grid-column: 2; font-size: 12px; line-height: 18px; color: #61738a; }
.safetcam-shortcut-arrow { grid-column: 3; grid-row: 1 / 3; color: #6f87a3; font-size: 22px; }
.safetcam-home-heading { display: flex; align-items: center; justify-content: space-between; margin: 0 0 22px; }
.safetcam-home-eyebrow { font-size: 10px; letter-spacing: 1.5px; font-weight: 700; color: #627a94; margin: 0 0 6px; }
.safetcam-home-heading h1 { font-size: 27px; line-height: 35px; font-weight: 600; margin: 0; }
.safetcam-map-notice { color: #68788d; font-size: 13px; line-height: 20px; margin: 0 0 16px; }
.safetcam-map-notice:empty { display: none; }
.safetcam-home-panel { padding: 24px 28px 20px; border: 1px solid #dce5f0; border-radius: 14px; background: #fff; box-shadow: 0 3px 10px #15365a05; }
.safetcam-overview-section { display: grid; gap: 22px; margin-bottom: 22px; }
.safetcam-overview-section[hidden] { display: none !important; }
.safetcam-overview-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.safetcam-overview-stat { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 18px; border: 1px solid #e1e8f1; border-radius: 10px; background: #f7f9fc; }
.safetcam-overview-stat span { font-size: 13px; color: #526a84; }
.safetcam-overview-stat strong { font-size: 28px; line-height: 34px; font-weight: 600; }
.safetcam-overview-stat.online { background: #edf8f3; border-color: #d5ebe0; color: #13785c; }
.safetcam-overview-stat.offline { background: #fff4f1; border-color: #f2dfd9; color: #a34c37; }
.safetcam-overview-stat.unknown { color: #66778d; }
.safetcam-customer-table-scroll { overflow: auto; max-height: 410px; margin-bottom: 18px; }
.safetcam-customer-table { width: 100%; border-collapse: collapse; text-align: right; font-size: 14px; }
.safetcam-customer-table caption { text-align: left; color: #65778e; font-size: 12px; padding-bottom: 9px; }
.safetcam-customer-table th, .safetcam-customer-table td { padding: 12px 14px; border-bottom: 1px solid #e7edf4; white-space: nowrap; }
.safetcam-customer-table thead th { position: sticky; top: 0; background: #f4f7fb; color: #526982; font-size: 12px; font-weight: 600; }
.safetcam-customer-table th:first-child { text-align: left; }
.safetcam-customer-table tbody th { font-weight: 500; }
.safetcam-customer-table .online { color: #13785c; font-weight: 600; }
.safetcam-customer-table .offline { color: #a34c37; font-weight: 600; }
.safetcam-overview-chart-holder { overflow-x: auto; }
.safetcam-overview-chart { display: block; width: 100%; min-width: 530px; height: auto; overflow: visible; color: #1b8870; }
.safetcam-overview-chart.offences { color: #326ca8; }
.safetcam-history-line { stroke: currentColor; stroke-width: 2.3; }
.safetcam-history-line.partial { stroke-dasharray: 5 4; opacity: .7; }
.safetcam-history-point { fill: currentColor; stroke: white; stroke-width: 1; }
.safetcam-history-point.partial { fill: white; stroke: currentColor; stroke-width: 2; }
.safetcam-history-point:focus { stroke: #112f51; stroke-width: 3; outline: none; }
.safetcam-history-empty { color: #687d95; font-size: 14px; padding: 38px 20px; text-align: center; background: #f7f9fc; border-radius: 8px; }
.safetcam-home-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.safetcam-home-panel-heading h2 { font-size: 20px; line-height: 26px; margin: 0 0 5px; font-weight: 600; }
.safetcam-home-panel-heading p { margin: 0; font-size: 13px; color: #68788d; line-height: 20px; }
.safetcam-home-refresh { font: inherit; font-size: 13px; font-weight: 500; line-height: 20px; color: #255888; border: 1px solid #cddce9; border-radius: 7px; background: #f8fbff; padding: 8px 16px; cursor: pointer; }
.safetcam-home-refresh:hover { background: #eef5fc; }
.safetcam-home-refresh:disabled { opacity: .55; cursor: default; }
.safetcam-home-stats { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 12px; }
.safetcam-home-stat { display: flex; align-items: center; gap: 20px; min-width: 220px; padding: 13px 18px; border-radius: 9px; background: #f4f8fd; border-left: 4px solid #326ca8; }
.safetcam-home-stat.acknowledged { background: #eff9f6; border-color: #188779; }
.safetcam-home-stat span { font-size: 13px; color: #536a85; }
.safetcam-home-stat strong { font-size: 28px; line-height: 34px; font-weight: 600; color: #245b93; margin-left: auto; }
.safetcam-home-stat.acknowledged strong { color: #13796d; }
.safetcam-alarm-chart { display: block; width: 100%; min-width: 530px; height: auto; margin: 0; overflow: visible; }
.safetcam-home-chart-holder { overflow-x: auto; padding-bottom: 4px; }
.safetcam-chart-grid { stroke: #e7edf4; stroke-width: 1; }
.safetcam-chart-axis { fill: #64778d; font: 12px Roboto, Arial, sans-serif; }
.safetcam-chart-value { fill: #365271; font: 600 13px Roboto, Arial, sans-serif; }
.safetcam-chart-bar.issued rect { fill: #326ca8; }
.safetcam-chart-bar.acknowledged rect { fill: #188779; }
.safetcam-chart-bar:focus { outline: none; }
.safetcam-chart-bar:focus rect { stroke: #072f58; stroke-width: 3; }
.safetcam-chart-table { color: #5e7189; font-size: 12px; margin-top: 6px; }
.safetcam-chart-table summary { cursor: pointer; width: fit-content; padding: 4px 0; }
.safetcam-chart-table table { border-collapse: collapse; text-align: left; width: 100%; max-width: 700px; margin: 10px 0; font-size: 13px; }
.safetcam-chart-table caption { text-align: left; font-weight: 600; padding-bottom: 8px; }
.safetcam-chart-table th, .safetcam-chart-table td { border-bottom: 1px solid #e5ebf2; padding: 9px 12px; }
.safetcam-chart-table th { font-weight: 500; }
.safetcam-home-description { font-size: 12px; line-height: 19px; color: #6b7c91; margin: 17px 0 8px; max-width: 1000px; }
.safetcam-home-status { color: #7c8a9b; font-size: 11px; line-height: 17px; margin: 0; }
.safetcam-home-status.error { padding: 14px; background: #fff4ed; color: #8c4317; border-radius: 8px; font-size: 13px; }
@media (max-width: 1100px) {
  .safetcam-home { padding: 22px 20px 32px; }
  .safetcam-home-links { gap: 12px; }
  .safetcam-home-shortcut { padding: 16px 14px; grid-template-columns: 35px 1fr 14px; gap: 4px 9px; }
  .safetcam-shortcut-icon { width: 35px; height: 35px; }
  .safetcam-home-shortcut strong { font-size: 15px; }
  .safetcam-shortcut-detail { font-size: 11px; }
}
@media (max-width: 720px) {
  .safetcam-home { padding: 16px 14px 26px; }
  .safetcam-home-links { grid-template-columns: 1fr; gap: 10px; margin-bottom: 23px; }
  .safetcam-home-shortcut { padding: 13px 15px; }
  .safetcam-home-heading h1 { font-size: 23px; line-height: 30px; }
  .safetcam-home-panel { padding: 18px 15px; }
  .safetcam-overview-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .safetcam-overview-stat { padding: 12px; gap: 8px; }
  .safetcam-overview-stat strong { font-size: 25px; }
  .safetcam-customer-table th, .safetcam-customer-table td { padding: 10px; }
  .safetcam-home-panel-heading { align-items: flex-start; gap: 10px; }
  .safetcam-home-panel-heading h2 { font-size: 18px; }
  .safetcam-home-refresh { padding: 7px 10px; }
  .safetcam-home-stats { gap: 10px; }
  .safetcam-home-stat { min-width: 180px; flex: 1; gap: 10px; }
  .safetcam-home-stat strong { font-size: 25px; }
}
