:root {
  color-scheme: dark;
  --bg: #07130f;
  --panel: #101b1f;
  --panel-strong: #15282d;
  --text: #eef7f3;
  --muted: #9eb2ae;
  --line: #294247;
  --accent: #38d39f;
  --accent-strong: #18a6b0;
  --danger: #ff7777;
  --warning: #f3bd4e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

.login-body {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 88px minmax(0, 1fr) 76px;
  background: #f9fbfc;
  color: #0b1f3a;
}

.login-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 32px;
  border-bottom: 1px solid #d9e1e8;
  background: #fff;
}

.login-wordmark {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #0b1f3a;
  text-decoration: none;
}

.login-wordmark img {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: contain;
}

.login-wordmark strong {
  font-size: 1.75rem;
  letter-spacing: 0;
}

.login-wordmark b {
  font-size: 1.35rem;
  font-weight: 700;
}

.login-wordmark > span {
  width: 1px;
  height: 34px;
  background: #cbd5df;
}

.login-header-actions,
.login-help-link,
.login-language {
  display: flex;
  align-items: center;
}

.login-header-actions {
  gap: 22px;
}

.login-help-link {
  gap: 10px;
  color: #0b1f3a;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
}

.login-header-actions svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-action-divider {
  width: 1px;
  height: 32px;
  background: #d9e1e8;
}

.login-language {
  gap: 8px;
}

.login-language select {
  width: auto;
  min-height: 44px;
  border: 0;
  padding: 0 30px 0 0;
  background-color: transparent;
  color: #0b1f3a;
  cursor: pointer;
}

.login-main {
  display: grid;
  place-items: center;
  padding: 20px 24px;
}

.brand-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(56, 211, 159, 0.5);
  background: rgba(56, 211, 159, 0.14);
  color: var(--accent);
  font-size: 1.35rem;
  font-weight: 800;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 620px;
  font-size: clamp(2.15rem, 4.3vw, 4rem);
  line-height: 0.98;
  text-wrap: balance;
}

h2 {
  font-size: 2.1rem;
}

.brand-subtitle {
  max-width: 460px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.6;
}

.login-card {
  width: min(100%, 472px);
  display: grid;
  gap: 26px;
  padding: 44px 40px 38px;
  border: 1px solid #cbd5df;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(11, 31, 58, 0.06);
}

.login-heading {
  text-align: center;
}

.login-heading h1 {
  max-width: none;
  font-size: 1.8rem;
  line-height: 1.25;
}

.login-heading p {
  margin: 10px 0 0;
  color: #617188;
  font-size: 1rem;
}

.login-form {
  display: grid;
  gap: 20px;
}

.login-field {
  gap: 8px;
  color: #0b1f3a;
  font-size: 0.9rem;
  font-weight: 700;
}

.login-field input,
.login-password-input input {
  min-height: 52px;
  border: 1px solid #8d9aaa;
  border-radius: 5px;
  padding: 0 15px;
  background: #fff;
  color: #0b1f3a;
  font-size: 1rem;
}

.login-field input:focus,
.login-password-input input:focus {
  border-color: #008f89;
  box-shadow: 0 0 0 3px rgba(0, 143, 137, 0.14);
}

.login-password-group {
  display: grid;
  gap: 8px;
}

.login-field-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.9rem;
}

.login-field-heading label {
  display: block;
  color: #0b1f3a;
  font-weight: 700;
}

.login-field-heading a,
.login-access a,
.login-footer a {
  color: #007d78;
  text-decoration: none;
}

.login-field-heading a:hover,
.login-access a:hover,
.login-footer a:hover,
.login-help-link:hover {
  text-decoration: underline;
}

.login-password-input {
  position: relative;
}

.login-password-input input {
  width: 100%;
  padding-right: 54px;
}

.password-toggle {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 4px;
  background: transparent;
  color: #40536d;
}

.password-toggle:hover {
  background: #eef4f5;
  filter: none;
}

.password-toggle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle .eye-closed,
.password-toggle[aria-pressed="true"] .eye-open {
  display: none;
}

.password-toggle[aria-pressed="true"] .eye-closed {
  display: block;
}

.login-check {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #253b56;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
}

.login-check input {
  width: 20px;
  min-height: 20px;
  margin: 0;
  accent-color: #008f89;
}

.login-submit {
  position: relative;
  min-height: 52px;
  border-radius: 5px;
  background: #008f89;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
}

.login-submit:hover {
  background: #007d78;
  filter: none;
}

.login-submit:focus-visible,
.password-toggle:focus-visible,
.login-header a:focus-visible,
.login-footer a:focus-visible {
  outline: 3px solid rgba(0, 143, 137, 0.3);
  outline-offset: 2px;
}

.login-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: login-spin 700ms linear infinite;
}

.login-submit.is-loading span:first-child {
  display: none;
}

.login-submit.is-loading .login-spinner {
  display: inline-block;
}

.login-access {
  margin: 0;
  color: #253b56;
  text-align: center;
  font-size: 0.95rem;
}

.login-access a {
  margin-left: 6px;
  font-weight: 650;
}

.login-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 16px 32px;
  border-top: 1px solid #d9e1e8;
  background: #fff;
  color: #253b56;
  font-size: 0.88rem;
}

.login-footer-divider {
  width: 1px;
  height: 24px;
  background: #d9e1e8;
}

.login-operational {
  display: flex;
  align-items: center;
  gap: 9px;
}

.login-operational i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #39a852;
  box-shadow: 0 0 0 3px rgba(57, 168, 82, 0.12);
}

.login-body .error-message {
  border-color: #efb7ba;
  background: #fff1f1;
  color: #b4232c;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes login-spin {
  to { transform: rotate(360deg); }
}

.help-body {
  grid-template-rows: 88px minmax(0, 1fr) 64px;
}

.help-back-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #007d78;
  font-weight: 650;
  text-decoration: none;
}

.help-back-link svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.legal-body {
  grid-template-rows: 88px minmax(0, 1fr) 64px;
}

.legal-main,
.access-main {
  width: 100%;
  padding: 48px 24px 64px;
}

.legal-content,
.access-card {
  width: min(100%, 880px);
  margin: 0 auto;
}

.legal-eyebrow {
  margin: 0 0 10px;
  color: #008f89;
  font-size: 0.76rem;
  font-weight: 750;
  text-transform: uppercase;
}

.legal-content h1,
.access-card h1 {
  max-width: none;
  color: #0b1f3a;
  font-size: 2.25rem;
  line-height: 1.15;
}

.legal-updated,
.access-card > p:not(.legal-eyebrow):not(.access-contact) {
  margin: 12px 0 0;
  color: #617188;
  line-height: 1.6;
}

.legal-content section {
  padding: 26px 0;
  border-bottom: 1px solid #d9e1e8;
}

.legal-content section:last-child {
  border-bottom: 0;
}

.legal-content h2 {
  color: #0b1f3a;
  font-size: 1.15rem;
}

.legal-content section p {
  margin: 9px 0 0;
  color: #40536d;
  font-size: 1rem;
  line-height: 1.7;
}

.legal-content a,
.access-card a {
  color: #007d78;
}

.access-card {
  max-width: 760px;
  padding: 34px;
  border: 1px solid #cbd5df;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(11, 31, 58, 0.06);
}

.access-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 28px;
}

.access-form label {
  display: grid;
  gap: 8px;
  color: #0b1f3a;
  font-size: 0.9rem;
  font-weight: 700;
}

.access-form input,
.access-form select,
.access-form textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid #8d9aaa;
  border-radius: 5px;
  padding: 11px 13px;
  background: #fff;
  color: #0b1f3a;
  font: inherit;
}

.access-form textarea {
  min-height: 108px;
  resize: vertical;
}

.access-form input:focus,
.access-form select:focus,
.access-form textarea:focus {
  border-color: #008f89;
  box-shadow: 0 0 0 3px rgba(0, 143, 137, 0.14);
  outline: 0;
}

.access-wide {
  grid-column: 1 / -1;
}

.access-message {
  margin-top: 24px;
  padding: 13px 15px;
  border: 1px solid;
  border-radius: 5px;
  line-height: 1.5;
}

.access-message.success {
  border-color: #9bd1b0;
  background: #edf9f1;
  color: #17663a;
}

.access-message.error {
  border-color: #efb7ba;
  background: #fff1f1;
  color: #b4232c;
}

.access-contact {
  margin: 24px 0 0;
  color: #617188;
  text-align: center;
}

.access-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.help-main {
  padding: 48px 24px 64px;
}

.help-content {
  width: min(100%, 820px);
  margin: 0 auto;
}

.help-heading {
  margin-bottom: 32px;
}

.help-heading p {
  margin: 0 0 8px;
  color: #007d78;
  font-size: 0.76rem;
  font-weight: 750;
}

.help-heading h1 {
  max-width: none;
  font-size: 2rem;
  line-height: 1.25;
}

.help-heading span {
  display: block;
  margin-top: 10px;
  color: #617188;
  line-height: 1.5;
}

.help-faq-list {
  border: 1px solid #cbd5df;
  border-radius: 6px;
  background: #fff;
}

.help-faq-list details + details {
  border-top: 1px solid #d9e1e8;
}

.help-faq-list summary {
  position: relative;
  min-height: 58px;
  display: flex;
  align-items: center;
  padding: 16px 52px 16px 20px;
  color: #0b1f3a;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.help-faq-list summary::-webkit-details-marker {
  display: none;
}

.help-faq-list summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  color: #007d78;
  font-size: 1.4rem;
  font-weight: 400;
}

.help-faq-list details[open] summary::after {
  content: "−";
}

.help-faq-list details p {
  margin: 0;
  padding: 0 52px 20px 20px;
  color: #52657d;
  line-height: 1.6;
}

.help-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 24px;
  padding: 20px;
  border: 1px solid #cbd5df;
  border-radius: 6px;
  background: #eef7f6;
}

.help-contact strong {
  color: #0b1f3a;
}

.help-contact p {
  margin: 5px 0 0;
  color: #52657d;
}

.help-contact a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0 18px;
  border: 1px solid #008f89;
  border-radius: 5px;
  color: #007d78;
  font-weight: 700;
  text-decoration: none;
}

.help-contact a:hover {
  background: #fff;
}

@media (max-width: 700px) {
  .login-body {
    grid-template-rows: 72px minmax(0, 1fr) auto;
    color-scheme: light;
  }

  .login-header {
    padding: 0 18px;
  }

  .login-wordmark {
    gap: 9px;
  }

  .login-wordmark img {
    width: 40px;
    height: 40px;
  }

  .login-wordmark strong {
    font-size: 1.25rem;
  }

  .login-wordmark b,
  .login-wordmark > span,
  .login-action-divider {
    display: none;
  }

  .login-header-actions {
    gap: 10px;
  }

  .login-language select {
    max-width: 88px;
  }

  .login-main {
    place-items: start center;
    padding: 32px 16px;
  }

  .login-card {
    padding: 32px 24px;
  }

  .login-heading h1 {
    font-size: 1.55rem;
  }

  .login-footer {
    flex-wrap: wrap;
    gap: 10px 16px;
    padding: 18px;
    text-align: center;
  }

  .login-footer-divider {
    display: none;
  }

  .help-body {
    grid-template-rows: 72px minmax(0, 1fr) auto;
  }

  .help-main {
    padding: 32px 16px 48px;
  }

  .help-heading h1 {
    font-size: 1.65rem;
  }

  .help-contact {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 390px) {
  .login-wordmark strong {
    font-size: 1.1rem;
  }

  .login-language svg {
    display: none;
  }

  .login-language select {
    max-width: 72px;
    padding-right: 22px;
  }

  .login-card {
    padding: 28px 18px;
  }

}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 650;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  outline: none;
  background: #0b1518;
  color: var(--text);
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56, 211, 159, 0.14);
}

button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #04110e;
  cursor: pointer;
  font-weight: 800;
}

button:hover {
  filter: brightness(1.08);
}

.hint,
.error-message {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.error-message {
  border: 1px solid rgba(255, 119, 119, 0.34);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 119, 119, 0.1);
  color: var(--danger);
}

.dashboard-body {
  min-height: 100vh;
  background: #08110f;
}

.app-layout {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  min-height: 100vh;
  width: 100%;
  transition: grid-template-columns 180ms ease;
}

.app-layout:has(.sidebar:hover),
.app-layout:has(.sidebar:focus-within) {
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 12;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  padding: 18px 10px;
  overflow: hidden;
  background: #0b1618;
  transition: width 180ms ease, box-shadow 180ms ease;
}

.sidebar:hover,
.sidebar:focus-within {
  box-shadow: 18px 0 40px rgba(0, 0, 0, 0.26);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.sidebar-logo {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(56, 211, 159, 0.35);
  border-radius: 8px;
  object-fit: contain;
  background: #202020;
  transition: width 180ms ease, height 180ms ease;
}

.sidebar-brand strong,
.sidebar-brand span:not([aria-hidden="true"]) {
  display: none;
}

.small-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  font-size: 1rem;
}

.side-menu {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.side-menu a {
  width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: width 180ms ease, border-color 180ms ease, background 180ms ease;
}

.sidebar:hover .side-menu a,
.sidebar:focus-within .side-menu a {
  width: 200px;
}

.side-menu a span {
  flex: 0 0 20px;
  text-align: center;
  font-size: 1.2rem;
  line-height: 1;
}

.side-menu a .menu-svg-icon {
  flex: 0 0 24px;
  text-align: center;
  font-size: 0;
  line-height: 0;
}

.menu-dashboard-icon,
.menu-live-icon,
.menu-attendance-icon,
.menu-alert-icon,
.menu-face-enroll-icon,
.menu-admin-icon,
.menu-audit-icon {
  width: 24px;
  height: 20px;
  display: inline-grid;
  place-items: center;
}

.menu-dashboard-icon svg {
  width: 24px;
  height: 24px;
  overflow: visible;
}

.menu-dashboard-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 4.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-live-icon svg {
  width: 28px;
  height: 22px;
  overflow: visible;
}

.menu-live-icon text {
  fill: var(--text);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
  font-family: "Segoe UI", Arial, sans-serif;
}

.live-icon-line {
  fill: none;
  stroke: #ff463d;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.live-icon-dot,
.live-icon-camera {
  fill: #ff463d;
}

.menu-attendance-icon svg {
  width: 25px;
  height: 25px;
  overflow: visible;
}

.scan-corner,
.face-line {
  fill: none;
  stroke: #87a8ff;
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.check-ring {
  fill: rgba(56, 211, 159, 0.12);
  stroke: #2fd382;
  stroke-width: 3;
}

.check-mark {
  fill: none;
  stroke: #2fd382;
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-alert-icon svg,
.menu-face-enroll-icon svg,
.menu-admin-icon svg,
.menu-audit-icon svg {
  width: 25px;
  height: 25px;
  overflow: visible;
}

.alert-wave {
  fill: none;
  stroke: #ff2f2f;
  stroke-width: 3.2;
  stroke-linecap: round;
}

.alert-bell {
  fill: #ff2f2f;
}

.alert-mark {
  fill: none;
  stroke: #fff;
  stroke-width: 3.4;
  stroke-linecap: round;
}

.alert-mark-dot {
  fill: #fff;
}

.enroll-corner,
.enroll-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.enroll-person {
  fill: currentColor;
}

.admin-person,
.admin-gear-ring,
.admin-gear-center,
.audit-board,
.audit-clip {
  fill: currentColor;
}

.admin-gear {
  fill: none;
  stroke: var(--bg);
  stroke-width: 2.2;
  stroke-linecap: round;
}

.audit-check,
.audit-line,
.audit-lens,
.audit-handle {
  fill: none;
  stroke: var(--bg);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.audit-lens,
.audit-handle {
  stroke: currentColor;
}

.audit-lens {
  fill: var(--panel);
}

.menu-label {
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  color: var(--text);
  font-size: 0.96rem;
  transition: max-width 180ms ease, opacity 140ms ease;
}

.sidebar:hover .menu-label,
.sidebar:focus-within .menu-label {
  max-width: 150px;
  opacity: 1;
}

.sidebar-footer {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.sidebar-operator {
  width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  transition: width 180ms ease;
}

.sidebar:hover .sidebar-operator,
.sidebar:focus-within .sidebar-operator {
  width: 200px;
}

.sidebar-operator > span {
  flex: 0 0 20px;
  color: var(--accent);
  text-align: center;
  font-weight: 900;
}

.sidebar-operator div {
  min-width: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 140ms ease;
}

.sidebar:hover .sidebar-operator div,
.sidebar:focus-within .sidebar-operator div {
  opacity: 1;
}

.sidebar-operator small,
.sidebar-operator strong {
  display: block;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.sidebar-operator small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.sidebar-operator strong {
  font-size: 0.9rem;
}

.sidebar-exit-button {
  width: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  transition: width 180ms ease;
}

.sidebar:hover .sidebar-exit-button,
.sidebar:focus-within .sidebar-exit-button {
  width: 200px;
}

.sidebar-exit-button strong {
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  transition: max-width 180ms ease, opacity 140ms ease;
}

.sidebar:hover .sidebar-exit-button strong,
.sidebar:focus-within .sidebar-exit-button strong {
  max-width: 120px;
  opacity: 1;
}

.exit-icon {
  position: relative;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
}

.exit-icon::before {
  content: "";
  position: absolute;
  right: 0;
  top: 2px;
  width: 9px;
  height: 18px;
  border: 2px solid #04110e;
  border-right-width: 5px;
  transform: skewY(-6deg);
}

.notification-widget {
  position: fixed;
  top: 22px;
  right: 28px;
  z-index: 40;
  display: grid;
  justify-items: end;
  gap: 10px;
  pointer-events: none;
}

.notification-button,
.notification-read-all {
  pointer-events: auto;
}

.notification-button {
  position: relative;
  width: 48px;
  height: 48px;
  min-width: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 30, 32, 0.94);
  color: var(--text);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}

.notification-button.has-alerts {
  border-color: rgba(56, 211, 159, 0.65);
}

.notification-icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-count {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 2px solid #08110f;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.72rem;
  line-height: 1;
}

.notification-panel {
  width: min(390px, calc(100vw - 32px));
  max-height: min(560px, calc(100vh - 92px));
  overflow: hidden;
  pointer-events: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 30, 32, 0.98);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

.notification-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.notification-panel-header small,
.notification-item em {
  display: block;
  color: var(--accent);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.notification-panel-header strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 1.05rem;
}

.notification-read-all {
  min-width: 96px;
  padding: 10px 12px;
  font-size: 0.78rem;
}

.notification-list {
  max-height: 470px;
  overflow: auto;
  padding: 8px;
}

.notification-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 12px;
  padding: 13px 12px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}

.notification-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.notification-item.read {
  opacity: 0.62;
}

.notification-dot {
  width: 9px;
  height: 9px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--accent);
}

.notification-item.warning .notification-dot,
.notification-toast.warning {
  background: #ffb547;
}

.notification-item.danger .notification-dot,
.notification-toast.danger {
  background: var(--danger);
}

.notification-item.success .notification-dot,
.notification-toast.success {
  background: var(--accent);
}

.notification-item strong,
.notification-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notification-item strong {
  color: var(--text);
  white-space: nowrap;
}

.notification-item small {
  margin-top: 4px;
  color: var(--muted);
  white-space: nowrap;
}

.notification-item em {
  margin-top: 8px;
  color: var(--muted);
}

.notification-empty {
  margin: 0;
  padding: 24px 14px;
  color: var(--muted);
  text-align: center;
}

.notification-toast-stack {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 42;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
}

.notification-toast {
  display: grid;
  gap: 4px;
  border-radius: 8px;
  padding: 14px 16px;
  color: #04110e;
  text-decoration: none;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}

.notification-toast strong,
.notification-toast span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-toast span {
  font-size: 0.84rem;
  font-weight: 800;
  opacity: 0.78;
}

.notification-page-panel {
  display: grid;
  gap: 18px;
}

.notification-page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.notification-page-heading h2 {
  margin: 0;
}

.notification-page-list {
  display: grid;
  gap: 8px;
}

.notification-page-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.025);
}

.notification-page-row:hover {
  border-color: rgba(56, 211, 159, 0.5);
  background: rgba(56, 211, 159, 0.06);
}

.notification-page-row.read {
  opacity: 0.62;
}

.notification-page-row strong,
.notification-page-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notification-page-row strong {
  white-space: nowrap;
}

.notification-page-row small {
  margin-top: 5px;
  color: var(--muted);
  white-space: nowrap;
}

.notification-page-row em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.notification-workspace {
  align-items: start;
}

.notification-enterprise-list {
  gap: 0;
}

.notification-enterprise-row {
  min-height: 76px;
}

.notification-enterprise-row.unread {
  border-top-color: rgba(56, 211, 159, 0.38);
}

.notification-enterprise-row.read {
  opacity: 0.68;
}

.notification-enterprise-row > strong {
  color: var(--muted);
  font-size: 0.88rem;
  white-space: nowrap;
}

.exit-icon::after {
  content: "";
  position: absolute;
  left: 1px;
  top: 9px;
  width: 16px;
  height: 4px;
  background: #04110e;
  box-shadow: 7px -5px 0 -1px #04110e, 7px 5px 0 -1px #04110e;
  clip-path: polygon(0 0, 62% 0, 62% -90%, 100% 50%, 62% 190%, 62% 100%, 0 100%);
}

.side-menu a:hover,
.side-menu a.active {
  border-color: var(--line);
  background: rgba(56, 211, 159, 0.1);
  color: var(--text);
}

.dashboard-shell {
  display: grid;
  gap: 18px;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 28px 40px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0 32px;
}

.topbar h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.dashboard-top-actions {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.dashboard-alert-button {
  position: relative;
  width: 52px;
  height: 52px;
  min-width: 52px;
  display: grid;
  place-items: center;
  align-self: flex-start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: rgba(12, 30, 32, 0.92);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.dashboard-alert-button:hover,
.dashboard-alert-button.has-alerts {
  border-color: rgba(56, 211, 159, 0.65);
  background: rgba(21, 52, 51, 0.96);
}

.dashboard-ask-button {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 58;
  height: 48px;
  min-width: 178px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid #07978e;
  border-radius: 6px;
  padding: 0 16px;
  background: #fff;
  color: #087f73;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(16, 35, 63, 0.18);
  cursor: pointer;
}

.dashboard-ask-button:hover,
.dashboard-ask-button.is-open {
  transform: translateY(-2px);
  background: #eaf7f5;
  box-shadow: 0 16px 32px rgba(7, 151, 142, 0.2);
}

.dashboard-ask-button strong {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0;
}

.assistant-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  color: #07978e;
}

.assistant-icon svg {
  width: 100%;
  height: 100%;
}

.assistant-icon rect {
  fill: currentColor;
  stroke: none;
}

.assistant-icon circle,
.assistant-icon path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.dashboard-alert-button strong {
  position: absolute;
  top: -9px;
  right: -9px;
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 2px solid #08110f;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.7rem;
  line-height: 1;
}

.modal-open {
  overflow: hidden;
}

.dashboard-alert-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.dashboard-ask-modal {
  position: fixed;
  inset: auto;
  z-index: 61;
  pointer-events: none;
}

.dashboard-alert-modal[hidden] {
  display: none;
}

.dashboard-ask-modal[hidden] {
  display: none;
}

.dashboard-ask-modal .dashboard-alert-backdrop {
  display: none;
}

.dashboard-alert-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 7, 0.72);
  backdrop-filter: blur(6px);
}

.dashboard-alert-dialog {
  position: absolute;
  top: 88px;
  right: 40px;
  width: min(520px, calc(100vw - 32px));
  max-height: min(680px, calc(100vh - 120px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0e1d20;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.5);
}

.dashboard-ask-dialog {
  position: fixed;
  right: 28px;
  bottom: 88px;
  width: min(580px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 112px));
  overflow: hidden;
  border: 1px solid #cbd9de;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(16, 35, 63, 0.26);
  pointer-events: auto;
}

.dashboard-ask-dialog .dashboard-alert-header {
  border-bottom-color: #d8e3e7;
}

.dashboard-ask-dialog .dashboard-alert-header h2 {
  color: #10233f;
}

.dashboard-ask-dialog .dashboard-alert-header .eyebrow {
  color: #07978e;
}

.dashboard-ask-dialog .dashboard-alert-close {
  background: #fff;
  border: 1px solid #d8e3e7;
  color: #52627a;
}

.dashboard-alert-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.dashboard-alert-header h2 {
  margin: 4px 0 0;
  font-size: 1.75rem;
}

.dashboard-alert-close {
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 8px;
  font-size: 1.5rem;
  line-height: 1;
}

.dashboard-alert-summary {
  display: flex;
  gap: 8px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}

.dashboard-alert-summary span {
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.dashboard-alert-list {
  overflow: auto;
  padding: 8px;
}

.dashboard-alert-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  padding: 13px 12px;
  color: var(--text);
  text-decoration: none;
}

.dashboard-alert-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.dashboard-alert-row.read {
  opacity: 0.62;
}

.dashboard-alert-row strong,
.dashboard-alert-row small {
  display: block;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.dashboard-alert-row small,
.dashboard-alert-row em {
  color: var(--muted);
}

.dashboard-alert-row em {
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-alert-actions {
  padding: 16px 20px;
  border-top: 1px solid var(--line);
}

.dashboard-ask-body {
  display: grid;
  gap: 14px;
  padding: 18px 20px 20px;
  overflow-y: auto;
}

.dashboard-ask-answer {
  min-height: 128px;
  border: 1px solid #d8e3e7;
  border-radius: 8px;
  padding: 16px;
  background: #f7fafb;
}

.dashboard-ask-answer strong,
.dashboard-ask-answer span {
  display: block;
}

.dashboard-ask-answer strong {
  color: #10233f;
  font-size: 1.05rem;
  line-height: 1.45;
}

.dashboard-ask-answer span,
.dashboard-ask-answer li {
  margin-top: 8px;
  color: #607086;
}

.dashboard-ask-answer ul {
  margin: 12px 0 0;
  padding-left: 18px;
}

.dashboard-ask-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.dashboard-ask-image-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.035);
}

.dashboard-ask-image-card:hover {
  border-color: rgba(56, 211, 159, 0.5);
}

.dashboard-ask-image-card img {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
}

.dashboard-ask-image-card span,
.dashboard-ask-image-card strong,
.dashboard-ask-image-card small {
  min-width: 0;
  margin: 0;
}

.dashboard-ask-image-card strong,
.dashboard-ask-image-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-ask-image-card strong {
  font-size: 0.9rem;
}

.dashboard-ask-image-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.75rem;
}

.dashboard-ask-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.dashboard-ask-actions a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(56, 211, 159, 0.32);
  border-radius: 8px;
  padding: 8px 12px;
  background: rgba(56, 211, 159, 0.12);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
}

.dashboard-ask-actions a:hover {
  border-color: rgba(56, 211, 159, 0.72);
  background: rgba(56, 211, 159, 0.2);
}

.dashboard-ask-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.dashboard-ask-form input {
  min-height: 52px;
  background: #fff;
  border-color: #cbd9de;
  color: #10233f;
}

.dashboard-ask-form button {
  background: #07978e;
  border-color: #07978e;
  color: #fff;
}

.dashboard-ask-prompt-groups {
  display: grid;
  gap: 7px;
}

.dashboard-ask-prompt-groups details {
  border: 1px solid #d8e3e7;
  border-radius: 6px;
  overflow: hidden;
}

.dashboard-ask-prompt-groups summary {
  align-items: center;
  color: #10233f;
  cursor: pointer;
  display: flex;
  font-size: 0.82rem;
  font-weight: 700;
  justify-content: space-between;
  list-style: none;
  padding: 10px 12px;
}

.dashboard-ask-prompt-groups summary span {
  align-items: center;
  background: #eaf7f5;
  border-radius: 999px;
  color: #087f73;
  display: inline-flex;
  font-size: 0.68rem;
  height: 22px;
  justify-content: center;
  width: 22px;
}

.dashboard-ask-prompt-groups details > div {
  border-top: 1px solid #e3eaed;
  display: grid;
  gap: 5px;
  padding: 7px;
}

.dashboard-ask-prompt-groups button {
  background: #fff;
  border: 0;
  border-radius: 4px;
  color: #52627a;
  justify-content: flex-start;
  min-height: 34px;
  padding: 7px 9px;
  text-align: left;
}

.dashboard-ask-prompt-groups button:hover {
  background: #edf7f5;
  color: #087f73;
}

.dashboard-ask-quick-actions {
  border-top: 1px solid #d8e3e7;
  padding-top: 12px;
}

.dashboard-ask-quick-actions > strong {
  color: #10233f;
  display: block;
  font-size: 0.78rem;
  margin-bottom: 8px;
}

.dashboard-ask-quick-actions > div {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-ask-quick-actions a,
.dashboard-ask-quick-actions button {
  align-items: center;
  background: #fff;
  border: 1px solid #b8d8d3;
  border-radius: 5px;
  color: #087f73;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 700;
  justify-content: center;
  min-height: 36px;
  padding: 6px 8px;
  text-align: center;
  text-decoration: none;
}

@media (max-width: 640px) {
  .dashboard-ask-button {
    bottom: 16px;
    height: 44px;
    min-width: 48px;
    padding: 0 10px;
    right: 16px;
  }

  .dashboard-ask-button > strong {
    display: none;
  }

  .dashboard-ask-dialog {
    bottom: 70px;
    left: 12px;
    max-height: calc(100vh - 88px);
    right: 12px;
    width: auto;
  }

  .dashboard-ask-dialog .dashboard-alert-header,
  .dashboard-ask-body {
    padding: 14px;
  }

  .dashboard-ask-quick-actions > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.attendance-kpi-panel {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  background: rgba(16, 35, 37, 0.88);
}

.attendance-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 12px;
}

.attendance-kpi-card {
  min-height: 130px;
  display: grid;
  align-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-decoration: none;
}

.attendance-kpi-card:hover {
  border-color: rgba(56, 211, 159, 0.5);
  background: rgba(56, 211, 159, 0.055);
}

.attendance-kpi-card span {
  color: var(--muted);
  font-size: 0.88rem;
}

.attendance-kpi-card strong {
  font-size: clamp(2rem, 3.2vw, 3.25rem);
  line-height: 1;
}

.attendance-kpi-card small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.sign-out-button {
  min-width: 92px;
  padding: 0 16px;
  color: #04110e;
}

.icon-signout {
  min-width: 48px;
  width: 48px;
  padding: 0;
  font-size: 1.35rem;
  line-height: 1;
}

.operator-chip {
  display: grid;
  gap: 2px;
  min-height: 48px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.03);
}

.operator-chip span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.operator-chip strong {
  color: var(--text);
  font-size: 0.95rem;
}

.danger-button {
  min-height: 38px;
  border: 1px solid rgba(255, 119, 119, 0.45);
  padding: 0 12px;
  background: rgba(255, 119, 119, 0.12);
  color: var(--danger);
}

.nav-actions,
.section-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.secondary-link {
  display: inline-grid;
  min-height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.secondary-link:hover {
  border-color: var(--accent);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric {
  display: grid;
  gap: 10px;
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--panel);
}

.metric-link {
  color: inherit;
  text-decoration: none;
}

.metric-link:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.metric span {
  color: var(--muted);
}

.metric strong {
  align-self: end;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.danger-text {
  color: var(--danger);
}

.graph-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.dashboard-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
}

.dashboard-chart-card {
  min-height: 330px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background:
    linear-gradient(145deg, rgba(56, 211, 159, 0.055), transparent 40%),
    var(--panel);
}

.chart-card-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.chart-card-header h2 {
  margin: 4px 0 0;
  font-size: clamp(1.45rem, 2.2vw, 2.15rem);
}

.chart-card-header span {
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.horizontal-bars {
  display: grid;
  align-content: center;
  gap: 14px;
}

.horizontal-bar-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  transition: color 160ms ease, transform 160ms ease;
}

.horizontal-bar-row span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.horizontal-bar-row strong {
  justify-self: end;
  font-size: 1.05rem;
}

.horizontal-bar-row:hover,
.horizontal-bar-row:focus-visible {
  color: var(--accent);
  transform: translateX(4px);
}

.horizontal-bar-row:hover span,
.horizontal-bar-row:focus-visible span {
  color: var(--text);
}

.horizontal-bar-row:hover .horizontal-bar-track,
.horizontal-bar-row:focus-visible .horizontal-bar-track {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 1px rgba(56, 211, 159, 0.26), 0 0 22px rgba(56, 211, 159, 0.14);
}

.horizontal-bar-track {
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.065);
  transition: background 160ms ease, box-shadow 160ms ease;
}

.horizontal-bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: filter 160ms ease, transform 160ms ease;
  transform-origin: left center;
}

.horizontal-bar-row:hover .horizontal-bar-track i,
.horizontal-bar-row:focus-visible .horizontal-bar-track i {
  filter: saturate(1.25) brightness(1.12);
  transform: scaleX(1.01);
}

.horizontal-bar-track i.primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
}

.horizontal-bar-track i.danger {
  background: linear-gradient(90deg, rgba(255, 119, 119, 0.88), var(--danger));
}

.vertical-chart {
  min-height: 210px;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  border-left: 1px solid rgba(186, 219, 215, 0.12);
  border-bottom: 1px solid rgba(186, 219, 215, 0.12);
  padding: 10px 0 0 8px;
  background:
    linear-gradient(rgba(186, 219, 215, 0.08) 1px, transparent 1px) 0 20% / 100% 25%;
}

.vertical-chart-day {
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 8px;
  border-radius: 8px;
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.vertical-bars {
  min-height: 170px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 4px;
}

.vertical-bars span {
  width: 9px;
  min-height: 4px;
  border-radius: 4px 4px 0 0;
  transition: filter 160ms ease, transform 160ms ease, box-shadow 160ms ease;
  transform-origin: bottom center;
}

.vertical-chart-day:hover,
.vertical-chart-day:focus-within {
  background: rgba(56, 211, 159, 0.07);
  box-shadow: inset 0 0 0 1px rgba(56, 211, 159, 0.16);
  transform: translateY(-3px);
}

.vertical-chart-day:hover .vertical-bars span,
.vertical-chart-day:focus-within .vertical-bars span {
  filter: saturate(1.25) brightness(1.18);
  transform: scaleY(1.04);
  box-shadow: 0 0 18px rgba(56, 211, 159, 0.16);
}

.vertical-chart-day:hover small,
.vertical-chart-day:focus-within small {
  color: var(--text);
}

.vertical-chart-day small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.7rem;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-present {
  background: #2f70ff;
}

.bar-unknown {
  background: #9fb5ff;
}

.bar-vehicle {
  background: #38d39f;
}

.bar-activity {
  background: #f2c94c;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
}

.chart-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.ai-health-panel {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background:
    linear-gradient(145deg, rgba(47, 112, 255, 0.08), transparent 42%),
    var(--panel);
}

.ai-health-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(240px, 0.8fr) minmax(360px, 1.5fr);
  gap: 14px;
  align-items: stretch;
}

.ai-health-score,
.ai-health-metrics,
.ai-camera-status-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.ai-health-score {
  display: grid;
  gap: 10px;
  align-content: center;
  padding: 20px;
}

.ai-health-score span,
.ai-health-score small {
  color: var(--muted);
}

.ai-health-score strong {
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1;
}

.ai-health-score i {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
}

.ai-health-metrics {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.ai-health-metrics span {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid rgba(186, 219, 215, 0.1);
  padding-bottom: 8px;
  color: var(--muted);
}

.ai-health-metrics span:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.ai-health-metrics b {
  color: var(--text);
}

.ai-camera-status-list {
  display: grid;
  align-content: start;
  overflow: hidden;
}

.ai-camera-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid rgba(186, 219, 215, 0.1);
  padding: 13px 16px;
  color: var(--text);
  text-decoration: none;
}

.ai-camera-status:last-child {
  border-bottom: 0;
}

.ai-camera-status:hover {
  background: rgba(56, 211, 159, 0.06);
}

.ai-camera-status span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.ai-camera-status strong,
.ai-camera-status small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-camera-status small {
  color: var(--muted);
}

.ai-camera-status em {
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.ai-camera-status.fresh em {
  background: rgba(56, 211, 159, 0.13);
  color: var(--accent);
}

.graph-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  background: var(--panel);
}

.enterprise-health-card {
  display: grid;
  gap: 20px;
  background:
    linear-gradient(145deg, rgba(56, 211, 159, 0.07), transparent 38%),
    #0f2022;
}

.enterprise-health-card.has-issue {
  background:
    linear-gradient(145deg, rgba(255, 119, 119, 0.08), transparent 38%),
    #0f2022;
}

.health-card-header,
.health-availability,
.health-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.health-card-header h2 {
  margin: 4px 0 0;
  font-size: clamp(1.65rem, 2.6vw, 2.4rem);
}

.health-card-header .ok-pill,
.health-card-header .down-pill {
  border-radius: 999px;
  padding: 8px 11px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.78rem;
  font-weight: 900;
}

.health-availability {
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.health-availability span,
.health-availability small {
  color: var(--muted);
  font-weight: 800;
}

.health-availability strong {
  display: block;
  margin-top: 4px;
  font-size: clamp(2.4rem, 4vw, 4.2rem);
  line-height: 0.95;
}

.health-segment-bar {
  display: flex;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.health-segment-bar span {
  min-width: 0;
}

.health-up {
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
}

.health-down {
  background: linear-gradient(90deg, rgba(255, 119, 119, 0.88), var(--danger));
}

.health-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.health-stat {
  min-height: 86px;
  align-items: start;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.03);
}

.health-stat:hover {
  border-color: rgba(56, 211, 159, 0.55);
}

.health-stat.critical:hover {
  border-color: rgba(255, 119, 119, 0.65);
}

.health-stat small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.health-stat strong {
  align-self: end;
  font-size: 1.55rem;
  line-height: 1;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.up-dot {
  background: var(--accent);
}

.down-dot {
  background: var(--danger);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
}

.dashboard-shell > .workspace {
  grid-template-columns: 1fr;
}

.system-name-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  background: var(--panel);
}

.full-width-panel {
  margin-top: 18px;
}

.section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-heading h2,
.system-name-panel h2 {
  max-width: 680px;
  font-size: clamp(1.7rem, 4vw, 3rem);
}

.section-heading span {
  flex: 0 0 auto;
  color: var(--muted);
  font-weight: 700;
}

.system-name-panel p:not(.eyebrow) {
  max-width: 640px;
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.attendance-export-panel {
  margin-bottom: 24px;
}

.export-form {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  align-items: end;
}

.attendance-export-form {
  grid-template-columns: minmax(260px, 1.2fr) minmax(260px, 1.3fr) minmax(170px, 0.8fr) minmax(150px, 0.65fr) minmax(150px, 0.65fr) auto;
  gap: 14px;
}

.attendance-export-form button {
  min-height: 48px;
  white-space: nowrap;
}

.camera-policy-picker {
  border-top: 1px solid var(--border);
}

.section-subpanel {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 18px;
  padding: 18px;
  background: rgba(8, 24, 25, 0.72);
}

.camera-policy-picker summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  min-height: 68px;
  cursor: pointer;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 900;
  list-style: none;
}

.camera-policy-picker summary::-webkit-details-marker {
  display: none;
}

.camera-policy-picker summary::after {
  content: "⌄";
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-left: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--accent);
}

.camera-policy-picker[open] summary::after {
  content: "⌃";
}

.camera-policy-picker summary strong {
  color: var(--muted);
  font-size: 0.85rem;
}

.camera-policy-list {
  display: grid;
  gap: 0;
}

.nvr-camera-policy-selector {
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
  padding: 18px 0;
}

.compact-camera-policy-list {
  gap: 10px;
}

.compact-camera-policy-list .camera-policy-row {
  background: rgba(6, 18, 19, 0.78);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
}

.attendance-nvr-selector {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(240px, 1fr);
  gap: 14px;
  padding: 16px 0 10px;
  border-top: 1px solid var(--border);
}

.attendance-nvr-selector label {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.attendance-nvr-selector select {
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--text);
  font-weight: 800;
}

.camera-policy-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(520px, 1.4fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--border);
}

.camera-policy-name h3 {
  margin: 0 0 8px;
}

.camera-policy-name p {
  margin: 0;
  color: var(--muted);
}

.attendance-policy-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) 90px auto;
  gap: 10px;
  align-items: end;
  min-width: min(620px, 100%);
}

.attendance-policy-form label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.attendance-policy-form select,
.attendance-policy-form input {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--text);
  font-weight: 800;
}

.vehicle-boundary-fields {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(160px, 0.55fr);
  gap: 10px;
  margin: 4px 0 0;
  padding: 12px;
  border: 1px solid rgba(84, 214, 190, 0.24);
  border-radius: 8px;
  background: rgba(4, 21, 20, 0.42);
}

.vehicle-boundary-fields legend {
  padding: 0 8px;
  color: #34f5bd;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.attendance-policy-form:not([data-policy-value="vehicle_monitoring"]) .vehicle-boundary-fields {
  display: none;
}

.vehicle-boundary-editor {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  min-height: 138px;
  border: 1px solid rgba(84, 214, 190, 0.28);
  border-radius: 8px;
  background: #020908;
  cursor: crosshair;
  touch-action: none;
}

.vehicle-boundary-editor img,
.vehicle-boundary-empty {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 138px;
  object-fit: fill;
}

.vehicle-boundary-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 900;
}

.vehicle-boundary-box {
  position: absolute;
  border: 2px solid #34f5bd;
  background: rgba(52, 245, 189, 0.12);
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.22);
  pointer-events: none;
}

.vehicle-boundary-box span {
  position: absolute;
  left: 6px;
  top: 6px;
  padding: 4px 7px;
  border-radius: 5px;
  background: rgba(5, 20, 18, 0.9);
  color: #34f5bd;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.vehicle-boundary-readout,
.vehicle-boundary-tools {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
}

.vehicle-boundary-readout span {
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.vehicle-boundary-tools {
  align-items: flex-end;
}

.vehicle-boundary-tools button {
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-weight: 900;
}

.camera-policy-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.attendance-nvr-drilldown {
  display: grid;
  gap: 14px;
}

.attendance-nvr-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.attendance-nvr-index-card {
  display: grid;
  gap: 18px;
  min-height: 240px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(13, 31, 33, 0.92);
  color: var(--text);
  text-decoration: none;
}

.attendance-nvr-index-card:hover {
  border-color: var(--accent);
}

.attendance-nvr-index-card h3 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.attendance-nvr-index-card > span {
  color: var(--muted);
}

.attendance-nvr-panel {
  border: 0;
}

.attendance-nvr-panel summary {
  display: block;
  cursor: pointer;
  list-style: none;
}

.attendance-nvr-panel summary::-webkit-details-marker {
  display: none;
}

.attendance-nvr-panel summary::after {
  content: none;
}

.attendance-nvr-panel[open] summary::after {
  content: none;
}

.attendance-nvr-panel summary strong {
  color: var(--muted);
  font-size: 0.86rem;
}

.attendance-nvr-card-summary {
  display: grid;
  gap: 18px;
  width: min(570px, 100%);
  min-height: 230px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  background:
    linear-gradient(145deg, rgba(56, 211, 159, 0.09), transparent 42%),
    var(--panel);
}

.attendance-nvr-card-summary:hover {
  border-color: var(--accent);
}

.attendance-nvr-card-summary h3 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.attendance-nvr-card-summary > span {
  color: var(--muted);
  font-size: 1.05rem;
}

.attendance-camera-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 420px));
  justify-content: start;
  align-items: start;
  gap: 20px;
  padding: 14px 0 4px;
}

.attendance-camera-monitor-card {
  display: flex;
  flex-direction: column;
  align-self: start;
  min-width: 0;
  width: min(420px, 100%);
  height: auto;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-strong);
}

.attendance-camera-preview {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  min-height: 0;
  overflow: hidden;
  cursor: pointer;
  background: #020807;
}

.attendance-camera-preview img,
.attendance-camera-preview video,
.attendance-camera-preview .empty-live-panel,
.attendance-live-message {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.attendance-live-message {
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
}

.attendance-live-message strong,
.attendance-live-message span {
  display: block;
}

.attendance-camera-preview .ok-pill,
.attendance-camera-preview .down-pill {
  position: absolute;
  right: 10px;
  top: 10px;
}

.attendance-play-button {
  position: absolute;
  right: 10px;
  bottom: 10px;
  min-height: 34px;
  padding: 8px 12px;
}

.attendance-detection-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.attendance-face-box {
  position: absolute;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45);
  transition: left 420ms ease, top 420ms ease, width 420ms ease, height 420ms ease, opacity 220ms ease;
}

.attendance-face-box.unknown {
  border-color: #ff6767;
}

.attendance-face-box.person {
  border-color: #4db7ff;
}

.attendance-face-box.vehicle {
  border-color: #ffd166;
}

.attendance-face-box.plate {
  border-color: #ff9f1c;
}

.attendance-face-box span {
  position: absolute;
  left: -2px;
  top: -26px;
  max-width: 240px;
  padding: 4px 7px;
  border-radius: 5px 5px 5px 0;
  background: var(--accent);
  color: #00110d;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attendance-face-box.unknown span {
  background: #ff6767;
  color: #170000;
}

.attendance-face-box.person span {
  background: #4db7ff;
  color: #001321;
}

.attendance-face-box.vehicle span {
  background: #ffd166;
  color: #1b1200;
}

.attendance-face-box.plate span {
  background: #ff9f1c;
  color: #1b0d00;
}

.attendance-vehicle-boundary {
  position: absolute;
  border: 2px dashed rgba(52, 245, 189, 0.92);
  background: rgba(52, 245, 189, 0.08);
  pointer-events: none;
  z-index: 2;
}

.attendance-vehicle-boundary span {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 4px 7px;
  border-radius: 5px;
  background: rgba(5, 20, 18, 0.86);
  color: #34f5bd;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.attendance-camera-card-body {
  display: grid;
  gap: 10px;
  grid-template-rows: auto auto auto auto auto;
  flex: 0 0 auto;
  padding: 10px;
}

.attendance-camera-card-body h3 {
  margin: 0 0 4px;
}

.attendance-camera-card-body p {
  margin: 0;
  color: var(--muted);
}

.card-policy-form {
  grid-template-columns: 1fr 1fr 84px auto;
  align-items: end;
  min-width: 0;
}

.attendance-camera-log {
  display: grid;
  gap: 8px;
  max-height: 180px;
  overflow: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.attendance-camera-log h4 {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.camera-mini-log-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px;
  align-items: center;
}

.camera-log-image-button {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: zoom-in;
}

.camera-log-image-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.camera-mini-log-row img,
.mini-log-empty {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  object-fit: cover;
}

.camera-mini-log-row strong,
.camera-mini-log-row span {
  display: block;
}

.camera-mini-log-row span {
  color: var(--muted);
  font-size: 0.82rem;
}

.camera-mini-log-row em {
  font-style: normal;
  font-size: 0.82rem;
}

.image-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(0, 8, 8, 0.82);
  backdrop-filter: blur(10px);
}

.image-preview-modal[hidden] {
  display: none;
}

.image-preview-dialog {
  position: relative;
  display: grid;
  gap: 12px;
  width: min(980px, 96vw);
  max-height: 92vh;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.image-preview-dialog img {
  width: 100%;
  max-height: 74vh;
  border-radius: 8px;
  border: 1px solid var(--border);
  object-fit: contain;
  background: #030807;
}

.image-preview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.image-preview-header strong,
.image-preview-header span {
  display: block;
}

.image-preview-header span {
  color: var(--muted);
  font-size: 0.88rem;
}

.image-preview-close {
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 8px;
  font-size: 1.35rem;
  line-height: 1;
}

.location-list {
  display: grid;
  gap: 12px;
}

.location-row,
.nvr-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(280px, 1.25fr) auto;
  align-items: center;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding: 16px 0 4px;
}

.nvr-list {
  display: grid;
  gap: 12px;
}

.location-row h3,
.nvr-row h3 {
  margin: 0;
  font-size: 1rem;
}

.nvr-row h3 a {
  color: var(--text);
  text-decoration: none;
}

.nvr-row p a {
  color: var(--accent);
  text-decoration: none;
}

.nvr-row h3 a:hover,
.nvr-row p a:hover {
  color: var(--accent);
}

.location-row p,
.nvr-row p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.location-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.location-counts span,
.status-ok,
.status-down {
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.location-counts .ok-pill {
  color: var(--accent);
}

.location-counts .warn-pill {
  background: rgba(255, 181, 71, 0.14);
  color: #ffca74;
}

.location-counts .down-pill,
.status-down {
  color: var(--danger);
}

.status-ok {
  color: var(--accent);
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 10px;
}

.activity-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: var(--panel);
}

.activity-panel h2 {
  font-size: 1.1rem;
}

.activity-panel p {
  color: var(--muted);
  line-height: 1.6;
}

.form-panel {
  display: grid;
  gap: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 34px 36px;
  background: var(--panel);
}

.nvr-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 22px;
}

.nvr-form button {
  grid-column: 1 / -1;
}

.compact-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.live-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: max-content;
  align-items: start;
  gap: 8px;
}

.nvr-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 520px));
  gap: 18px;
  align-items: stretch;
}

.nvr-select-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 230px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background:
    linear-gradient(145deg, rgba(56, 211, 159, 0.09), transparent 42%),
    var(--panel);
  color: var(--text);
  text-decoration: none;
}

.nvr-select-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.nvr-select-card h2 {
  font-size: clamp(1.35rem, 2vw, 1.9rem);
}

.nvr-select-card span {
  color: var(--muted);
}

.nvr-select-card > .location-counts {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.nvr-select-card > .location-counts span,
.nvr-select-card > strong {
  display: inline-flex;
  width: auto;
  min-width: 0;
  min-height: 0;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 0.78rem;
  line-height: 1;
  background: rgba(255, 255, 255, 0.08);
}

.nvr-select-card > strong {
  align-self: flex-start;
}

.nvr-live-console {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  min-height: calc(100vh - 150px);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #050b0b;
}

.live-viewer-panel {
  display: grid;
  grid-template-rows: minmax(420px, 1fr) auto;
  min-width: 0;
  background: #050706;
}

.main-live-player {
  display: grid;
  grid-template-rows: minmax(420px, 1fr) auto;
  min-height: 100%;
}

.main-video-frame {
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  min-height: 520px;
  background: #3f403e;
}

.main-video-frame video,
.main-video-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.main-player-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding: 16px 18px;
  background: #090f0f;
}

.main-player-bar h2 {
  font-size: 1.2rem;
}

.main-player-bar p {
  margin: 5px 0 0;
  color: var(--muted);
}

.multi-view-grid {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  background: #050706;
}

.show-multi-view .main-live-player {
  display: none;
}

.show-multi-view .multi-view-grid {
  display: grid;
}

.mini-live-tile {
  min-height: 180px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.mini-frame {
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #3f403e;
}

.mini-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ai-overlay-canvas {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.mini-frame span {
  color: var(--muted);
}

.mini-live-tile strong {
  display: block;
  padding: 10px;
  font-size: 0.9rem;
}

.camera-directory {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  border-left: 1px solid var(--line);
  background: #f6f7f7;
  color: #17212b;
}

.directory-heading {
  padding: 20px 20px 12px;
}

.directory-heading h2 {
  color: #17212b;
  font-size: 1.1rem;
}

.camera-search {
  width: calc(100% - 40px);
  margin: 0 20px 14px;
  border-color: #cad1d4;
  background: #ffffff;
  color: #17212b;
}

.nvr-directory-list {
  overflow: auto;
  padding: 0 8px 16px;
}

.directory-group {
  border-top: 1px solid #d9dedf;
  padding: 12px 0;
}

.directory-group-title {
  display: grid;
  gap: 3px;
  padding: 0 12px 8px;
}

.directory-group-title strong {
  color: #17212b;
}

.directory-group-title span {
  color: #66737a;
  font-size: 0.82rem;
}

.directory-camera-list {
  display: grid;
}

.directory-camera {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  border: 0;
  border-radius: 0;
  padding: 0 12px;
  background: transparent;
  color: #17212b;
  text-align: left;
}

.directory-camera:hover,
.directory-camera.loading {
  background: #e4e8e9;
}

.directory-camera span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-camera small {
  color: #69767c;
}

.directory-camera.is-down {
  color: #9d3640;
}

.live-card {
  align-self: start !important;
  height: fit-content;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.live-frame {
  display: grid;
  place-items: center;
  min-height: 0;
  aspect-ratio: 16 / 9;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.04) 1px, transparent 1px, transparent 8px),
    #06100f;
}

.live-frame video,
.live-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.no-stream {
  display: grid;
  gap: 8px;
  place-items: center;
  color: var(--muted);
}

.no-stream strong {
  color: var(--accent);
  text-transform: uppercase;
}

.snapshot-loading {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #111716;
}

.snapshot-loading img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.72;
}

.snapshot-loading div {
  position: absolute;
  left: 18px;
  bottom: 18px;
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(5, 11, 11, 0.82);
}

.snapshot-loading strong {
  color: var(--accent);
}

.snapshot-loading span {
  color: var(--muted);
}

.live-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 0;
  padding: 8px 10px;
}

.live-meta h3 {
  margin: 0;
  font-size: 1rem;
}

.live-meta p {
  margin: 3px 0 0;
  color: var(--muted);
}

.live-grid .live-meta {
  padding: 7px 9px;
}

.live-grid .live-meta p,
.live-grid .live-meta .row-actions {
  display: none;
}

.live-meta a {
  color: var(--accent);
  text-decoration: none;
}

@media (max-width: 860px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .app-layout:has(.sidebar:hover),
  .app-layout:has(.sidebar:focus-within) {
    grid-template-columns: 1fr;
  }

  .dashboard-shell {
    padding: 18px;
  }

  .sidebar {
    position: static;
    width: auto;
    height: auto;
    display: block;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 16px 18px;
  }

  .sidebar:hover,
  .sidebar:focus-within {
    box-shadow: none;
  }

  .sidebar-brand {
    margin-bottom: 14px;
  }

  .side-menu {
    grid-template-columns: repeat(4, 44px);
    justify-content: start;
  }

  .sidebar:hover .side-menu a,
  .sidebar:focus-within .side-menu a {
    width: 44px;
  }

  .sidebar:hover .menu-label,
  .sidebar:focus-within .menu-label {
    max-width: 0;
    opacity: 0;
  }

  .sidebar-footer {
    display: none;
  }

  .workspace,
  .location-row,
  .nvr-row,
  .nvr-form,
  .camera-policy-row,
  .attendance-policy-form,
  .attendance-export-form,
  .attendance-nvr-selector {
    grid-template-columns: 1fr;
  }

  .camera-policy-actions {
    justify-content: stretch;
  }

  .attendance-camera-preview {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .attendance-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .graph-grid,
  .dashboard-chart-grid,
  .live-grid,
  .nvr-select-grid,
  .nvr-live-console {
    grid-template-columns: 1fr;
  }

  .camera-directory {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .health-stat-grid {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .nav-actions,
  .section-actions,
  .row-actions {
    display: grid;
    justify-content: stretch;
  }
}

@media (max-width: 540px) {
  .status-grid,
  .attendance-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.enrollment-panel[hidden] {
  display: none;
}

.enrollment-panel {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(1, 12, 10, 0.78);
}

.enrollment-card {
  width: min(980px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

.enrollment-scan-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.8fr);
  gap: 16px;
  align-items: stretch;
  margin: 14px 0;
}

.enrollment-live {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #020807;
}

.enrollment-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020807;
  object-fit: cover;
  display: block;
}

.enrollment-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.enrollment-review {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.enrollment-score {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 8px 0 14px;
}

.enrollment-score strong {
  font-size: 38px;
  line-height: 1;
}

.enrollment-score span {
  color: var(--muted);
}

.enrollment-samples {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.enrollment-sample {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #020807;
  aspect-ratio: 4 / 3;
}

.enrollment-sample img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.enrollment-sample span {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(1, 8, 7, 0.78);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.attendance-event-row {
  grid-template-columns: 78px minmax(0, 1fr) auto auto;
}

.daily-attendance-row {
  grid-template-columns: 148px minmax(0, 1fr) auto auto;
}

.daily-face-pair {
  display: flex;
  gap: 8px;
}

.unknown-face-row {
  grid-template-columns: 270px minmax(0, 1fr) auto auto;
  border-color: rgba(255, 94, 94, 0.35);
}

.unknown-image-pair {
  display: grid;
  grid-template-columns: 74px 180px;
  gap: 10px;
}

.unknown-image-pair > div {
  display: grid;
  gap: 6px;
}

.unknown-image-pair span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.event-face-thumb {
  width: 64px;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  object-fit: cover;
}

.log-image-button {
  display: block;
  padding: 0;
  overflow: hidden;
  color: inherit;
  cursor: zoom-in;
}

.log-image-button img {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: inherit;
  object-fit: cover;
}

.log-image-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.event-frame-thumb {
  width: 176px;
  height: 98px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  object-fit: cover;
}

.vehicle-event-row {
  grid-template-columns: minmax(460px, 1.1fr) minmax(280px, 0.9fr) minmax(240px, 0.75fr) auto;
  align-items: center;
}

.vehicle-image-grid {
  display: grid;
  grid-template-columns: 180px 180px 150px;
  gap: 12px;
  align-items: start;
}

.vehicle-image-tile {
  display: grid;
  gap: 7px;
}

.vehicle-image-tile span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.vehicle-thumb {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  object-fit: cover;
}

.vehicle-main-thumb {
  height: 96px;
}

.vehicle-person-thumb,
.vehicle-frame-thumb {
  height: 96px;
}

.vehicle-plate-thumb {
  height: 54px;
}

.vehicle-event-summary h3 {
  margin: 4px 0 6px;
  font-size: clamp(1.2rem, 1.4vw, 1.7rem);
  letter-spacing: 0;
}

.vehicle-event-summary p {
  margin: 0;
  color: var(--muted);
}

.vehicle-review-panel {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.vehicle-review-panel form {
  display: grid;
  grid-template-columns: minmax(110px, 0.7fr) minmax(140px, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.vehicle-review-panel label {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.vehicle-review-panel select,
.vehicle-review-panel input {
  width: 100%;
  margin-top: 5px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--text);
  font-weight: 900;
}

.vehicle-review-panel button {
  min-height: 39px;
}

.empty-thumb {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

@media (max-width: 880px) {
  .enrollment-scan-layout {
    grid-template-columns: 1fr;
  }

  .attendance-event-row {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .daily-attendance-row {
    grid-template-columns: 148px minmax(0, 1fr);
  }

  .unknown-face-row {
    grid-template-columns: 1fr;
  }

  .vehicle-event-row {
    grid-template-columns: 1fr;
  }

  .vehicle-image-grid {
    grid-template-columns: minmax(160px, 1fr) minmax(90px, 0.7fr);
  }

  .vehicle-image-tile:last-child {
    grid-column: 1 / -1;
  }
}

/* Dashboard typography: keep the UI lighter and less bold across all app pages. */
.dashboard-body,
.dashboard-body button,
.dashboard-body input,
.dashboard-body select {
  font-weight: 400;
}

.dashboard-body h1,
.dashboard-body h2,
.dashboard-body h3,
.dashboard-body strong,
.dashboard-body .metric strong,
.dashboard-body .health-percent,
.dashboard-body .stat-value,
.dashboard-body .donut-value {
  font-weight: 500;
}

.dashboard-body .eyebrow,
.dashboard-body label,
.dashboard-body .side-menu a,
.dashboard-body .status-ok,
.dashboard-body .status-down,
.dashboard-body .status-chip,
.dashboard-body .ok-pill,
.dashboard-body .down-pill,
.dashboard-body .nav-actions a,
.dashboard-body .secondary-link,
.dashboard-body .danger-button,
.dashboard-body .vehicle-review-panel label,
.dashboard-body .vehicle-review-panel input,
.dashboard-body .vehicle-review-panel select,
.dashboard-body .empty-thumb {
  font-weight: 500;
}
/* Compact live camera tiles: camera title overlays video - 20260520-live-card-overlay */
.live-grid {
  align-items: start;
  align-content: start;
  grid-auto-rows: auto;
}

.live-grid .live-card {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  height: auto !important;
  min-height: 0 !important;
  overflow: hidden;
  background: #06100f;
}

.live-grid .live-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0 !important;
  aspect-ratio: auto;
}

.live-grid .live-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  min-height: 0 !important;
  padding: 8px 10px;
  border: 0;
  background: linear-gradient(180deg, rgba(5, 11, 11, 0), rgba(5, 11, 11, 0.88));
  pointer-events: none;
}

.live-grid .live-meta h3 {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.95rem;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
}

.live-grid .live-meta a {
  pointer-events: auto;
}
/* Live frame title label - 20260520-live-no-meta-panel */
.live-frame-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9;
  padding: 26px 10px 9px;
  background: linear-gradient(180deg, rgba(5, 11, 11, 0), rgba(5, 11, 11, 0.86));
  pointer-events: none;
}

.live-frame-label h3 {
  margin: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.95rem;
  line-height: 1.2;
  color: var(--text);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}
/* Enterprise compact live layout - 20260520-enterprise-live-layout */
.dashboard-shell {
  align-content: start;
  grid-auto-rows: max-content;
}

.show-multi-view .dashboard-shell {
  gap: 12px;
  padding-top: 22px;
}

.show-multi-view .topbar {
  padding: 8px 0 16px;
}

.show-multi-view .topbar h1 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.nvr-select-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 470px));
  align-items: start;
  align-content: start;
  gap: 16px;
}

.nvr-select-card {
  min-height: 0;
  height: auto;
  gap: 22px;
  padding: 22px;
}

.nvr-select-card > .location-counts {
  margin-top: 22px;
}

.mini-live-tile {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto;
  overflow: hidden;
}

.mini-frame {
  min-height: 0;
  aspect-ratio: 16 / 9;
}

.mini-live-tile strong {
  padding: 8px 10px;
  line-height: 1.25;
}
/* NVR console compact tiles and directory toggle - 20260520-nvr-console-toggle */
.nvr-live-console {
  position: relative;
  grid-template-columns: minmax(0, 1fr) 360px;
  min-height: 0;
}

.nvr-live-console.directory-collapsed {
  grid-template-columns: minmax(0, 1fr) 44px;
}

.live-viewer-panel {
  align-content: start;
  grid-template-rows: auto;
  min-height: 0;
}

.show-multi-view .multi-view-grid {
  align-content: start;
  align-items: start;
  grid-auto-rows: auto;
}

.mini-live-tile {
  position: relative;
  display: block;
  min-height: 0 !important;
  height: auto;
  overflow: hidden;
  border-radius: 4px;
}

.mini-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 0 !important;
  overflow: hidden;
}

.mini-frame video,
.mini-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-frame-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  display: block;
  padding: 26px 10px 9px;
  background: linear-gradient(180deg, rgba(5, 11, 11, 0), rgba(5, 11, 11, 0.88));
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.directory-toggle {
  position: absolute;
  left: -18px;
  top: 50%;
  z-index: 12;
  width: 34px;
  min-width: 34px;
  height: 86px;
  min-height: 86px;
  border: 1px solid #d8dede;
  border-right: 0;
  border-radius: 8px 0 0 8px;
  background: #f6f7f7;
  color: #17212b;
  font-size: 2rem;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
}

.camera-directory {
  position: relative;
  overflow: visible;
}

.nvr-live-console.directory-collapsed .directory-heading,
.nvr-live-console.directory-collapsed .camera-search,
.nvr-live-console.directory-collapsed .nvr-directory-list {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
/* Attendance enterprise index layout - 20260520-attendance-enterprise */
.attendance-index-page .dashboard-shell {
  gap: 14px;
  padding-top: 22px;
  padding-bottom: 24px;
}

.attendance-index-page .topbar {
  padding: 6px 0 12px;
}

.attendance-index-page .topbar h1 {
  font-size: clamp(2rem, 3vw, 2.8rem);
}

.attendance-index-page .status-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.attendance-index-page .metric {
  min-height: 84px;
  gap: 8px;
  padding: 15px 16px;
}

.attendance-index-page .metric strong {
  font-size: clamp(1.55rem, 2.4vw, 2rem);
}

.attendance-index-page .system-name-panel {
  padding: 22px 24px;
}

.attendance-index-page .attendance-export-panel {
  margin-bottom: 10px;
}

.attendance-index-page .section-heading {
  margin-bottom: 16px;
}

.attendance-index-page .section-heading h2,
.attendance-index-page .system-name-panel h2 {
  font-size: clamp(1.55rem, 2.6vw, 2.35rem);
}

.attendance-index-page .attendance-export-form {
  grid-template-columns: minmax(190px, 1.1fr) minmax(210px, 1.15fr) minmax(150px, 0.8fr) minmax(140px, 0.65fr) minmax(140px, 0.65fr) auto;
  gap: 10px;
  margin-top: 0;
}

.attendance-index-page .attendance-export-form input,
.attendance-index-page .attendance-export-form select {
  min-height: 42px;
}

.attendance-index-page .attendance-export-form button {
  min-height: 42px;
  padding: 0 14px;
}

.attendance-index-page .attendance-nvr-card-grid {
  grid-template-columns: repeat(3, minmax(250px, 1fr));
  gap: 12px;
}

.attendance-index-page .attendance-nvr-index-card {
  position: relative;
  min-height: 0;
  gap: 12px;
  padding: 20px 22px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(56, 211, 159, 0.085), transparent 42%),
    rgba(10, 28, 30, 0.96);
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.attendance-index-page .attendance-nvr-index-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: transparent;
  transition: background 160ms ease;
}

.attendance-index-page .attendance-nvr-index-card:hover,
.attendance-index-page .attendance-nvr-index-card:focus-visible {
  border-color: rgba(56, 211, 159, 0.85);
  background:
    linear-gradient(145deg, rgba(56, 211, 159, 0.16), rgba(37, 183, 193, 0.055) 55%, transparent),
    rgba(12, 35, 37, 0.98);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.26), 0 0 0 1px rgba(56, 211, 159, 0.12) inset;
  transform: translateY(-2px);
}

.attendance-index-page .attendance-nvr-index-card:hover::before,
.attendance-index-page .attendance-nvr-index-card:focus-visible::before {
  background: var(--accent);
}

.attendance-index-page .attendance-nvr-index-card h3 {
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1.1;
}

.attendance-index-page .attendance-nvr-index-card:hover h3,
.attendance-index-page .attendance-nvr-index-card:focus-visible h3 {
  color: var(--accent);
}

.attendance-index-page .attendance-nvr-index-card .location-counts {
  gap: 7px;
}

.attendance-index-page .attendance-nvr-index-card .location-counts span,
.attendance-index-page .attendance-nvr-index-card > strong {
  padding: 6px 9px;
  font-size: 0.76rem;
}

.attendance-index-page .attendance-nvr-index-card > strong {
  justify-self: start;
}

@media (max-width: 1180px) {
  .attendance-index-page .attendance-nvr-card-grid {
    grid-template-columns: repeat(2, minmax(250px, 1fr));
  }
  .attendance-index-page .attendance-export-form {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 760px) {
  .attendance-index-page .status-grid,
  .attendance-index-page .attendance-nvr-card-grid,
  .attendance-index-page .attendance-export-form {
    grid-template-columns: 1fr;
  }
}

/* Enterprise sidebar menu - 20260520-menu-enterprise */
:root {
  --sidebar-closed: 72px;
  --sidebar-open: 304px;
}

.app-layout {
  grid-template-columns: var(--sidebar-closed) minmax(0, 1fr);
  transition: grid-template-columns 220ms ease;
}

.app-layout:has(.sidebar:hover),
.app-layout:has(.sidebar:focus-within) {
  grid-template-columns: var(--sidebar-open) minmax(0, 1fr);
}

.sidebar {
  padding: 14px 10px;
  border-right: 1px solid rgba(56, 211, 159, 0.22);
  background:
    linear-gradient(180deg, rgba(10, 27, 28, 0.98), rgba(5, 15, 14, 0.98)),
    radial-gradient(circle at 20% 0%, rgba(56, 211, 159, 0.16), transparent 34%);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.02);
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.32;
}

.sidebar:hover,
.sidebar:focus-within {
  box-shadow: 22px 0 48px rgba(0, 0, 0, 0.34);
}

.sidebar-brand {
  position: relative;
  min-height: 64px;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  padding: 8px 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  overflow: hidden;
}

.sidebar:hover .sidebar-brand,
.sidebar:focus-within .sidebar-brand {
  border-color: rgba(56, 211, 159, 0.24);
  background: rgba(255, 255, 255, 0.025);
}

.sidebar-logo {
  position: relative;
  z-index: 1;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  padding: 4px;
  border-radius: 8px;
  border-color: rgba(56, 211, 159, 0.42);
  background: #171b1c;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.sidebar-brand-copy {
  min-width: 0;
  max-width: 210px;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 160ms ease, transform 180ms ease;
}

.sidebar:hover .sidebar-brand-copy,
.sidebar:focus-within .sidebar-brand-copy {
  opacity: 1;
  transform: translateX(0);
}

/* Compact Live View: dense NVR camera grid. */
.compact-live-page {
  --live-bg: #f5f7f8;
  --live-panel: #ffffff;
  --live-text: #13233d;
  --live-muted: #63708a;
  --live-line: #d8dfe7;
  --live-accent: #0a9389;
  --live-accent-soft: #eaf6f4;
  --live-danger: #d93742;
  --live-warning: #ea9c0b;
  background: var(--live-bg);
  color: var(--live-text);
}

.compact-live-page .app-layout,
.compact-live-page .app-layout:has(.sidebar:hover),
.compact-live-page .app-layout:has(.sidebar:focus-within) {
  grid-template-columns: 168px minmax(0, 1fr);
}

.compact-live-page .sidebar {
  padding: 18px 10px;
  border-right-color: var(--live-line);
  background: #ffffff;
  box-shadow: none;
  color: var(--live-text);
}

.compact-live-page .sidebar::before {
  display: none;
}

.compact-live-page .sidebar:hover,
.compact-live-page .sidebar:focus-within {
  box-shadow: none;
}

.compact-live-page .sidebar-brand {
  min-height: 78px;
  display: grid;
  justify-items: center;
  gap: 5px;
  margin-bottom: 16px;
  padding: 4px;
  overflow: visible;
}

.compact-live-page .sidebar-logo {
  width: 48px;
  height: 48px;
  border: 0;
  background: transparent;
}

.compact-live-page .sidebar-brand-copy {
  display: grid;
  width: 100%;
  max-width: 100%;
  justify-items: center;
  text-align: center;
}

.compact-live-page .sidebar-brand-copy strong,
.compact-live-page .sidebar-brand-copy span,
.compact-live-page .sidebar:hover .sidebar-brand-copy strong,
.compact-live-page .sidebar:hover .sidebar-brand-copy span {
  display: block;
  color: var(--live-accent);
  font-size: 0.72rem;
  line-height: 1.25;
  white-space: normal;
}

.compact-live-page .sidebar-brand-copy span {
  color: var(--live-muted);
  font-size: 0.64rem;
}

.compact-live-page .side-menu {
  gap: 4px;
}

.compact-live-page .side-menu a,
.compact-live-page .sidebar:hover .side-menu a,
.compact-live-page .sidebar:focus-within .side-menu a {
  width: 148px;
  min-height: 44px;
  gap: 10px;
  border: 0;
  border-radius: 6px;
  padding: 0 12px;
  overflow: visible;
  color: #526179;
}

.compact-live-page .side-menu a:hover,
.compact-live-page .side-menu a.active {
  background: var(--live-accent-soft);
  color: var(--live-accent);
}

.compact-live-page .side-menu a.active::before {
  content: "";
  position: absolute;
  left: 0;
  width: 3px;
  height: 28px;
  border-radius: 0 3px 3px 0;
  background: var(--live-accent);
}

.compact-live-page .side-menu a {
  position: relative;
}

.compact-live-page .menu-label,
.compact-live-page .sidebar:hover .menu-label,
.compact-live-page .sidebar:focus-within .menu-label {
  display: block;
  width: auto;
  overflow: visible;
  opacity: 1;
  color: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  text-overflow: clip;
  transform: none;
}

.compact-live-page .enterprise-menu-icon svg {
  stroke: currentColor;
}

.compact-live-page .sidebar-footer {
  border-top-color: var(--live-line);
}

.compact-live-page .sidebar-operator {
  display: none;
}

.compact-live-page .sidebar-exit-button,
.compact-live-page .sidebar:hover .sidebar-exit-button,
.compact-live-page .sidebar:focus-within .sidebar-exit-button {
  width: 44px;
  min-width: 44px;
  margin-inline: auto;
  background: transparent;
  box-shadow: none;
  color: var(--live-muted);
}

.compact-live-page .sidebar-exit-button strong {
  display: none;
}

.compact-live-shell {
  gap: 14px !important;
  min-width: 0;
  padding: 28px 32px 32px !important;
  background: var(--live-bg);
}

.compact-live-header {
  display: grid;
  gap: 18px;
}

.compact-live-title-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.compact-live-back {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--live-line);
  border-radius: 6px;
  padding: 0 13px;
  background: var(--live-panel);
  color: #40516a;
  font-size: 0.84rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.compact-live-back:hover,
.compact-live-back:focus-visible {
  border-color: #8bcac4;
  background: #eef9f7;
  color: var(--live-accent);
}

.compact-live-back svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.compact-live-header h1 {
  color: var(--live-text);
  font-size: 2rem !important;
  font-weight: 600 !important;
  line-height: 1.1;
}

.compact-live-toolbar {
  display: grid;
  grid-template-columns: minmax(190px, 1.1fr) minmax(190px, 1fr) minmax(170px, 0.85fr) auto auto;
  align-items: center;
  gap: 12px;
}

.live-toolbar-field {
  min-width: 0;
  height: 48px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--live-line);
  border-radius: 6px;
  padding: 0 14px;
  background: var(--live-panel);
}

.live-toolbar-field:focus-within {
  border-color: var(--live-accent);
  box-shadow: 0 0 0 3px rgba(10, 147, 137, 0.1);
}

.live-toolbar-field svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #53617a;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.compact-live-page .live-toolbar-field input,
.compact-live-page .live-toolbar-field select {
  min-width: 0;
  min-height: 44px;
  border: 0;
  padding: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  color: var(--live-text);
  font-size: 0.9rem;
}

.live-grid-controls {
  height: 48px;
  display: flex;
  overflow: hidden;
  border: 1px solid var(--live-line);
  border-radius: 6px;
  background: var(--live-panel);
}

.compact-live-page .live-grid-button.live-grid-fit-button {
  width: auto;
  min-width: 96px;
  grid-template-columns: 19px auto;
  gap: 7px;
  padding: 0 11px;
  white-space: nowrap;
}

.compact-live-page .live-grid-fit-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.compact-live-page .live-grid-fit-button span {
  font-size: 0.76rem;
  font-weight: 650;
}

.compact-live-page .live-grid-button {
  width: 48px;
  min-width: 48px;
  min-height: 46px;
  display: grid;
  place-items: center;
  border-right: 1px solid var(--live-line);
  border-radius: 0;
  padding: 0;
  background: #ffffff;
  color: #52617a;
}

.compact-live-page .live-grid-button:last-child {
  border-right: 0;
}

.compact-live-page .live-grid-button.active {
  background: var(--live-accent-soft);
  color: var(--live-accent);
}

.grid-icon {
  width: 20px;
  height: 20px;
  display: grid;
  gap: 2px;
}

.grid-icon-2 { grid-template-columns: repeat(2, 1fr); }
.grid-icon-3 { grid-template-columns: repeat(3, 1fr); }
.grid-icon-4 { grid-template-columns: repeat(4, 1fr); }

.grid-icon i {
  border: 1.5px solid currentColor;
  border-radius: 1px;
}

.live-online-summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  margin: 0;
  color: #42516a;
  font-size: 0.86rem;
  white-space: nowrap;
}

.live-online-summary span,
.nvr-state-dot,
.camera-live-state i,
.compact-live-badge i {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: var(--live-accent);
}

.compact-nvr-group {
  border: 1px solid var(--live-line);
  border-radius: 7px;
  background: var(--live-panel);
}

.compact-nvr-header {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  color: var(--live-text);
  text-decoration: none;
}

.compact-nvr-group > .compact-nvr-header {
  border-bottom: 1px solid var(--live-line);
}

.compact-nvr-header > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.compact-nvr-header h2,
.compact-nvr-header p,
.compact-nvr-header strong {
  margin: 0;
}

.compact-nvr-header h2 {
  color: var(--live-text);
  font-size: 1.05rem;
  font-weight: 600 !important;
}

.compact-nvr-header p {
  color: var(--live-muted);
  font-size: 0.8rem;
}

.compact-nvr-header strong {
  color: var(--live-accent);
  font-size: 0.82rem;
  font-weight: 600 !important;
  white-space: nowrap;
}

.compact-nvr-header strong.is-warning {
  color: var(--live-warning);
}

.nvr-state-dot.is-down {
  background: var(--live-danger);
}

.nvr-state-dot.is-warning {
  background: var(--live-warning);
}

.compact-live-page .nvr-collapse-button {
  width: 36px;
  min-width: 36px;
  min-height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  background: transparent;
  color: var(--live-text);
}

.nvr-collapse-button svg,
.compact-nvr-header > div > svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.compact-nvr-group.is-collapsed .nvr-collapse-button {
  transform: rotate(180deg);
}

.compact-nvr-group.is-collapsed .compact-camera-grid {
  display: none;
}

.compact-live-page .compact-camera-grid.multi-view-grid {
  --live-grid-columns: 4;
  display: grid;
  grid-template-columns: repeat(var(--live-grid-columns), minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  background: #f9fafb;
}

.compact-live-page .compact-camera-grid.multi-view-grid.is-fit-all {
  grid-template-columns: repeat(var(--fit-grid-columns, 6), minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
}

.compact-camera-grid.is-fit-all .compact-live-card-footer {
  min-height: 52px;
  gap: 3px;
  padding: 7px 8px;
}

.compact-camera-grid.is-fit-all .compact-live-card-footer h3 {
  font-size: 0.76rem;
}

.compact-camera-grid.is-fit-all .compact-live-meta {
  gap: 5px;
  font-size: 0.62rem;
}

.compact-camera-grid.is-fit-all .camera-ai-chips,
.compact-camera-grid.is-fit-all .compact-event-chips {
  display: none;
}

.compact-live-card {
  position: relative;
  min-width: 0;
  overflow: visible;
  border: 1px solid var(--live-line);
  border-radius: 6px;
  background: #ffffff;
}

.compact-live-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: visible;
  background: #202727;
}

.compact-live-frame::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  height: 45px;
  pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.58), transparent);
}

.compact-live-frame video,
.compact-live-frame img,
.compact-stream-state {
  width: 100%;
  height: 100%;
  border-radius: 5px 5px 0 0;
  object-fit: cover;
}

.compact-stream-state {
  display: grid;
  place-content: center;
  gap: 4px;
  color: #d6dfdf;
  text-align: center;
  background: #2f3636;
}

.compact-stream-state strong {
  color: #ffffff;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.compact-stream-state span {
  font-size: 0.72rem;
}

.compact-live-page .compact-live-frame > .compact-live-badge {
  position: absolute;
  top: 9px;
  right: auto;
  bottom: auto;
  left: 9px;
  inset: 9px auto auto 9px;
  z-index: 5;
  display: inline-flex;
  width: auto;
  height: auto;
  align-items: center;
  place-items: initial;
  gap: 5px;
  border-radius: 4px;
  padding: 5px 7px;
  background: rgba(9, 58, 57, 0.85);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 600;
}

.compact-live-page .compact-live-badge b {
  font: inherit;
}

.compact-live-page .compact-live-badge i,
.camera-live-state i {
  animation: live-status-blink 1.2s ease-in-out infinite;
}

.compact-live-page .compact-live-badge.is-down {
  background: rgba(112, 18, 27, 0.9);
}

.compact-live-page .compact-live-badge.is-down i {
  background: var(--live-danger);
}

.compact-live-page .compact-live-badge.is-maintenance {
  background: rgba(132, 83, 0, 0.92);
}

.compact-live-page .compact-live-badge.is-maintenance i {
  background: #f4b740;
  animation: none;
}

@keyframes live-status-blink {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 currentColor; }
  50% { opacity: 0.22; box-shadow: 0 0 0 3px transparent; }
}

@media (prefers-reduced-motion: reduce) {
  .compact-live-page .compact-live-badge i,
  .camera-live-state i { animation: none; }
}

.compact-live-page .dashboard-ask-button,
.compact-live-page .notification-button {
  display: none;
}

.compact-live-page .camera-menu-button {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 12;
  width: 30px;
  min-width: 30px;
  min-height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 5px;
  padding: 0;
  background: rgba(255, 255, 255, 0.94);
  color: #17233a;
}

.camera-menu-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.compact-frame-actions {
  position: absolute;
  right: 7px;
  bottom: 7px;
  z-index: 5;
  display: flex;
  gap: 3px;
}

.compact-live-page .compact-frame-actions button {
  width: 28px;
  min-width: 28px;
  min-height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  background: rgba(8, 16, 18, 0.72);
  color: #ffffff;
}

.compact-frame-actions svg,
.camera-control-menu svg,
.fullscreen-exit-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.compact-live-page .fullscreen-exit-button {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 50;
  min-height: 40px;
  display: none;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 5px;
  padding: 0 12px;
  background: rgba(8, 16, 18, 0.82);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 500;
}

.compact-live-frame:fullscreen,
.compact-live-frame.is-pseudo-fullscreen {
  display: grid;
  place-items: center;
  background: #000000;
}

.compact-live-frame.is-pseudo-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 999;
  width: 100vw;
  height: 100dvh;
  aspect-ratio: auto;
}

.compact-live-frame:fullscreen video,
.compact-live-frame.is-pseudo-fullscreen video {
  position: static;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.compact-live-frame:fullscreen .fullscreen-exit-button,
.compact-live-frame.is-pseudo-fullscreen .fullscreen-exit-button {
  display: inline-flex;
}

.compact-live-frame:fullscreen .camera-menu-button,
.compact-live-frame:fullscreen .compact-frame-actions,
.compact-live-frame:fullscreen .compact-live-badge,
.compact-live-frame.is-pseudo-fullscreen .camera-menu-button,
.compact-live-frame.is-pseudo-fullscreen .compact-frame-actions,
.compact-live-frame.is-pseudo-fullscreen .compact-live-badge {
  display: none;
}

.camera-control-menu {
  position: absolute;
  top: 44px;
  right: 8px;
  z-index: 30;
  width: min(236px, calc(100% - 16px));
  border: 1px solid var(--live-line);
  border-radius: 6px;
  padding: 9px;
  background: #ffffff;
  color: var(--live-text);
  box-shadow: 0 14px 32px rgba(29, 43, 65, 0.2);
}

.camera-control-menu[hidden] {
  display: none;
}

.camera-control-menu > strong {
  display: block;
  padding: 4px 7px 7px;
  font-size: 0.78rem;
  font-weight: 600 !important;
}

.compact-live-page .camera-control-menu button,
.camera-control-menu a {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 4px;
  padding: 0 7px;
  background: transparent;
  color: #35435a;
  font-size: 0.75rem;
  font-weight: 400;
  text-decoration: none;
}

.compact-live-page .camera-control-menu button:hover,
.camera-control-menu a:hover {
  background: #f2f5f7;
}

.compact-live-page .camera-control-switch {
  justify-content: space-between;
}

.camera-control-switch i {
  position: relative;
  width: 30px;
  height: 17px;
  flex: 0 0 30px;
  border-radius: 999px;
  background: #cbd3dc;
  transition: background 140ms ease;
}

.camera-control-switch i::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 140ms ease;
}

.camera-control-switch[aria-checked="true"] i {
  background: var(--live-accent);
}

.camera-control-switch[aria-checked="true"] i::after {
  transform: translateX(13px);
}

.camera-control-switch.saving {
  opacity: 0.55;
}

.camera-control-menu hr {
  height: 1px;
  margin: 6px 0;
  border: 0;
  background: var(--live-line);
}

.compact-live-card-footer {
  min-height: 76px;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 10px;
}

.compact-live-card-footer h3 {
  margin: 0;
  overflow: hidden;
  color: var(--live-text);
  font-size: 0.82rem;
  font-weight: 600 !important;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-live-meta {
  display: grid;
  grid-template-columns: auto auto minmax(58px, 1fr) auto;
  align-items: center;
  gap: 7px;
  color: var(--live-muted);
  font-size: 0.68rem;
}

.compact-live-meta time {
  justify-self: end;
  color: #42516a;
  font-variant-numeric: tabular-nums;
}

.camera-live-state {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--live-accent);
  font-weight: 600;
}

.camera-live-state i {
  width: 6px;
  height: 6px;
  flex-basis: 6px;
}

.camera-live-state.is-down {
  color: var(--live-danger);
}

.camera-live-state.is-down i {
  background: var(--live-danger);
}

.camera-live-state.is-maintenance {
  color: #a56500;
}

.camera-live-state.is-maintenance i {
  background: #e89b18;
  animation: none;
}

.compact-event-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.compact-event-chips span {
  border: 1px solid #badbd7;
  border-radius: 4px;
  padding: 3px 6px;
  background: var(--live-accent-soft);
  color: #147e77;
  font-size: 0.63rem;
}

.compact-live-empty {
  grid-column: 1 / -1;
  min-height: 220px;
  display: grid;
  place-content: center;
  gap: 6px;
  color: var(--live-muted);
  text-align: center;
}

.compact-live-empty strong {
  color: var(--live-text);
}

.compact-other-nvrs {
  display: grid;
  gap: 10px;
}

.compact-other-nvrs .compact-nvr-header {
  border: 1px solid var(--live-line);
  border-radius: 7px;
  background: #ffffff;
}

.compact-other-nvrs .compact-nvr-header:hover {
  border-color: #9ec9c4;
}

.live-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  max-width: min(340px, calc(100vw - 32px));
  border-radius: 6px;
  padding: 11px 14px;
  background: #123e3b;
  color: #ffffff;
  font-size: 0.82rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 150ms ease, transform 150ms ease;
  pointer-events: none;
}

.live-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.live-toast.is-error {
  background: #9f2630;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1120px) {
  .compact-live-toolbar {
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(160px, 0.85fr) auto;
  }

  .live-online-summary {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .compact-live-page .compact-camera-grid.multi-view-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .compact-live-page .app-layout,
  .compact-live-page .app-layout:has(.sidebar:hover),
  .compact-live-page .app-layout:has(.sidebar:focus-within) {
    grid-template-columns: 66px minmax(0, 1fr);
  }

  .compact-live-page .sidebar-brand-copy,
  .compact-live-page .menu-label {
    display: none !important;
  }

  .compact-live-page .side-menu a,
  .compact-live-page .sidebar:hover .side-menu a,
  .compact-live-page .sidebar:focus-within .side-menu a {
    width: 44px;
  }

  .compact-live-shell {
    padding-inline: 20px !important;
  }

  .compact-live-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .live-grid-controls {
    justify-self: start;
  }

  .compact-live-page .compact-camera-grid.multi-view-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 660px) {
  .compact-live-page .compact-camera-grid.multi-view-grid.is-fit-all {
    grid-template-columns: 1fr;
  }

  .compact-live-page .app-layout,
  .compact-live-page .app-layout:has(.sidebar:hover),
  .compact-live-page .app-layout:has(.sidebar:focus-within) {
    grid-template-columns: 1fr;
  }

  .compact-live-page .sidebar {
    position: static;
    width: 100%;
    height: auto;
    display: block;
    padding: 8px 12px;
  }

  .compact-live-page .sidebar-brand,
  .compact-live-page .sidebar-footer {
    display: none;
  }

  .compact-live-page .side-menu {
    display: flex;
    overflow-x: auto;
  }

  .compact-live-page .side-menu a,
  .compact-live-page .sidebar:hover .side-menu a,
  .compact-live-page .sidebar:focus-within .side-menu a {
    flex: 0 0 44px;
  }

  .compact-live-shell {
    padding: 18px 12px 24px !important;
  }

  .compact-live-header h1 {
    font-size: 1.55rem !important;
  }

  .compact-live-title-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .compact-live-toolbar {
    grid-template-columns: 1fr;
  }

  .live-grid-controls,
  .live-online-summary {
    grid-column: 1;
  }

  .compact-nvr-header {
    align-items: flex-start;
    padding: 14px;
  }

  .compact-nvr-header > div {
    flex-wrap: wrap;
  }

  .compact-nvr-header > div:last-child {
    justify-content: flex-end;
  }

  .compact-live-page .compact-camera-grid.multi-view-grid {
    grid-template-columns: 1fr;
    padding: 8px;
  }
}

/* Operations dashboard - a focused, light-weight CCTV overview. */
.ops-dashboard-body {
  --ops-ink: #10233d;
  --ops-muted: #65738a;
  --ops-line: #dce3eb;
  --ops-surface: #ffffff;
  --ops-bg: #f5f7f9;
  --ops-teal: #008f86;
  --ops-red: #dd3c45;
  --ops-amber: #c88600;
  background: var(--ops-bg);
  color: var(--ops-ink);
}

.ops-app-layout {
  grid-template-columns: 112px minmax(0, 1fr);
  background: var(--ops-bg);
}

.ops-app-layout:has(.sidebar:hover),
.ops-app-layout:has(.sidebar:focus-within) {
  grid-template-columns: 112px minmax(0, 1fr);
}

.ops-app-layout .sidebar {
  border-right-color: var(--ops-line);
  background: #fff;
  padding-inline: 8px;
}

.ops-app-layout .sidebar-logo {
  border-color: #c9ddd9;
  background: #fff;
}

.ops-app-layout .sidebar-brand {
  display: grid;
  justify-items: center;
  gap: 7px;
}

.ops-app-layout .sidebar-brand-copy,
.ops-app-layout .sidebar-brand strong,
.ops-app-layout .sidebar-brand span:not([aria-hidden="true"]) {
  display: block;
  text-align: center;
}

.ops-app-layout .sidebar-brand-copy strong {
  color: #007d76;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.15;
}

.ops-app-layout .sidebar-brand-copy span { display: none !important; }

.ops-app-layout .side-menu {
  justify-items: center;
  gap: 6px;
}

.ops-app-layout .side-menu a,
.ops-app-layout .sidebar:hover .side-menu a,
.ops-app-layout .sidebar:focus-within .side-menu a {
  width: 94px;
  min-height: 54px;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 5px;
}

.ops-app-layout .menu-label,
.ops-app-layout .sidebar:hover .menu-label,
.ops-app-layout .sidebar:focus-within .menu-label {
  display: block;
  width: auto;
  max-width: none;
  overflow: visible;
  opacity: 1;
  color: inherit;
  font-size: 0.66rem;
  font-weight: 600;
  text-overflow: clip;
  transform: none;
  white-space: nowrap;
}

.ops-app-layout .sidebar-footer { align-items: center; }
.ops-app-layout .sidebar-operator { display: none; }
.ops-app-layout .sidebar-exit-button,
.ops-app-layout .sidebar:hover .sidebar-exit-button,
.ops-app-layout .sidebar:focus-within .sidebar-exit-button { width: 44px; min-width: 44px; padding: 0; }
.ops-app-layout .sidebar-exit-button strong { display: none; }

.ops-app-layout .side-menu a {
  color: #52627a;
}

.ops-app-layout .side-menu a:hover,
.ops-app-layout .side-menu a.active {
  border-color: #d5ebe7;
  background: #e8f6f4;
  color: #007d76;
}

.ops-app-layout .side-menu a.active .enterprise-menu-icon {
  color: #008f86;
  filter: none;
}

.ops-dashboard-shell {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  gap: 20px;
  padding: 30px 36px 42px;
}

.ops-topbar {
  min-height: 48px;
  padding: 0 0 8px;
}

.ops-topbar h1 {
  color: var(--ops-ink);
  font-size: 2rem;
  font-weight: 650;
}

.ops-updated {
  color: var(--ops-muted);
  font-size: 0.85rem;
}

.ops-dashboard-shell .dashboard-alert-button {
  width: 42px;
  min-width: 42px;
  height: 42px;
  border-color: var(--ops-line);
  background: #fff;
  color: #39506b;
  box-shadow: none;
}

.ops-dashboard-shell .dashboard-alert-button:hover,
.ops-dashboard-shell .dashboard-alert-button:focus-visible,
.ops-dashboard-shell .dashboard-alert-button.has-alerts {
  border-color: #a9d7d1;
  background: #eef9f7;
  color: var(--ops-teal);
  filter: none;
}

.ops-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--ops-line);
  border-radius: 8px;
  background: var(--ops-surface);
}

.ops-metric {
  display: grid;
  min-width: 0;
  gap: 9px;
  min-height: 112px;
  padding: 22px 24px;
  border-right: 1px solid var(--ops-line);
  color: inherit;
  text-decoration: none;
}

.ops-metric:last-child { border-right: 0; }
.ops-metric:hover { background: #f7fbfb; }
.ops-metric span { color: var(--ops-muted); font-size: 0.88rem; }
.ops-metric strong { overflow: hidden; color: var(--ops-ink); font-size: clamp(1.55rem, 2.7vw, 2.35rem); font-weight: 650; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.ops-metric.good strong { color: var(--ops-teal); }
.ops-metric.danger strong { color: var(--ops-red); }

.ops-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(310px, 0.8fr);
  gap: 20px;
  align-items: start;
}

.ops-primary-stack {
  display: grid;
  gap: 20px;
  align-content: start;
}

.ops-panel {
  min-width: 0;
  border: 1px solid var(--ops-line);
  border-radius: 8px;
  background: var(--ops-surface);
}

.ops-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 78px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--ops-line);
}

.ops-panel-heading h2 { color: var(--ops-ink); font-size: 1.05rem; font-weight: 650; }
.ops-panel-heading span { display: block; margin-top: 5px; color: var(--ops-muted); font-size: 0.78rem; }
.ops-text-link { color: #007dce; font-size: 0.82rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.ops-text-link:hover { text-decoration: underline; }

.ops-location-table { display: grid; }
.ops-location-table-head,
.ops-location-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.65fr) minmax(70px, 0.6fr) minmax(84px, 0.75fr) minmax(98px, 0.7fr);
  gap: 16px;
  align-items: center;
  padding: 14px 22px;
}
.ops-location-table-head { padding-top: 12px; padding-bottom: 12px; background: #fafbfc; color: var(--ops-muted); font-size: 0.72rem; font-weight: 650; text-transform: uppercase; }
.ops-location-row { border-top: 1px solid #edf0f3; color: var(--ops-ink); text-decoration: none; }
.ops-location-row:hover { background: #f8fbfb; }
.ops-location-row > span { min-width: 0; font-size: 0.92rem; }
.ops-location-row strong,
.ops-location-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-location-row strong { font-weight: 600; }
.ops-location-row small { margin-top: 4px; color: var(--ops-muted); font-size: 0.74rem; }
.ops-health { display: inline-flex; align-items: center; gap: 7px; color: var(--ops-teal); font-size: 0.82rem !important; font-weight: 600; }
.ops-health i,
.ops-availability-legend i { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: currentColor; }
.ops-health.problem { color: var(--ops-red); }
.ops-health.warning { color: var(--ops-amber); }

.ops-side-stack { display: grid; gap: 20px; }
.ops-attention-list, .ops-recent-list { display: grid; }
.ops-attention-row {
  position: relative;
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 68px;
  padding: 11px 18px;
  border-bottom: 1px solid #edf0f3;
  color: var(--ops-ink);
  text-decoration: none;
}
.ops-attention-row:last-child, .ops-recent-row:last-child { border-bottom: 0; }
.ops-attention-row:hover, .ops-recent-row:hover { background: #fafcfc; }
.ops-attention-row > i { height: 34px; border-radius: 3px; background: var(--ops-amber); }
.ops-attention-row.critical > i, .ops-attention-row.high > i { background: var(--ops-red); }
.ops-attention-row strong, .ops-attention-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-attention-row strong { font-size: 0.87rem; font-weight: 600; }
.ops-attention-row small { margin-top: 4px; color: var(--ops-muted); font-size: 0.74rem; }
.ops-attention-row em { color: var(--ops-muted); font-size: 0.7rem; font-style: normal; white-space: nowrap; }
.ops-empty { margin: 0; padding: 20px 22px; color: var(--ops-muted); font-size: 0.86rem; }

.ops-availability-content { display: flex; align-items: center; gap: 26px; padding: 22px; }
.ops-donut { position: relative; width: 132px; aspect-ratio: 1; display: flex; flex: 0 0 132px; flex-direction: column; align-items: center; justify-content: center; border-radius: 50%; background: conic-gradient(var(--ops-teal) var(--availability), #e1e8ea 0); color: var(--ops-ink); text-align: center; }
.ops-donut::before { content: ""; position: absolute; inset: 18px; border-radius: 50%; background: #fff; }
.ops-donut strong, .ops-donut span { position: relative; z-index: 1; }
.ops-donut strong { margin-bottom: 2px; font-size: 1.65rem; line-height: 1; }
.ops-donut span { color: var(--ops-muted); font-size: 0.72rem; }
.ops-availability-legend { display: grid; gap: 15px; flex: 1; min-width: 0; }
.ops-availability-legend span { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 8px; align-items: center; color: var(--ops-muted); font-size: 0.8rem; }
.ops-availability-legend i.online { color: var(--ops-teal); }.ops-availability-legend i.offline { color: var(--ops-red); }.ops-availability-legend b { color: var(--ops-ink); font-weight: 650; }

.ops-activity-panel, .ops-recent-panel { min-height: 250px; }
.ops-line-chart { padding: 16px 22px 12px; }
.ops-line-chart svg { width: 100%; height: 168px; overflow: visible; }
.ops-line-chart line { stroke: #e3e9ee; stroke-width: 1; }
.ops-line-chart svg > text { fill: var(--ops-muted); font-size: 10px; }
.ops-line-path { fill: none; stroke: #008f86; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.ops-line-point circle { fill: #008f86; stroke: #fff; stroke-width: 2; }
.ops-line-point text { fill: #53667d; font-size: 10px; font-weight: 650; }
.ops-line-labels { display: grid; grid-template-columns: repeat(var(--chart-columns, 7), minmax(0, 1fr)); gap: 2px; padding: 0 2.7% 0 5.8%; }
.ops-line-labels span { color: var(--ops-muted); font-size: 0.68rem; text-align: center; white-space: nowrap; }
.ops-chart-note { margin: 12px 0 2px; color: var(--ops-muted); font-size: 0.76rem; text-align: center; }
.ops-line-point.live circle { fill: #fff; stroke: #008f86; stroke-width: 3; }
.ops-recent-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 11px; align-items: center; min-height: 42px; padding: 9px 18px; border-bottom: 1px solid #edf0f3; color: var(--ops-ink); font-size: 0.82rem; text-decoration: none; }
.ops-recent-row i { width: 9px; height: 9px; border-radius: 50%; background: #6e8ca7; }.ops-recent-row i.critical, .ops-recent-row i.high { background: var(--ops-red); }.ops-recent-row i.warning { background: var(--ops-amber); }.ops-recent-row time { color: var(--ops-muted); font-size: 0.7rem; white-space: nowrap; }

.ops-worker-pool-status {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  margin: 0 !important;
  border: 1px solid #d5e1e6;
  border-radius: 5px;
  padding: 7px 10px;
  color: #53677f !important;
  font-size: 0.74rem !important;
  font-weight: 650;
  white-space: nowrap;
}

.ops-worker-pool-status i,
.ops-worker-health > i {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: currentColor;
}

.ops-worker-pool-status.healthy { border-color: #b9dfd7; background: #edf9f6; color: #148158 !important; }
.ops-worker-pool-status.attention { border-color: #efc7ca; background: #fff2f3; color: #bd3640 !important; }
.ops-worker-table { overflow-x: auto; }
.ops-worker-table-head,
.ops-worker-row {
  min-width: 980px;
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) minmax(130px, 0.9fr) minmax(170px, 1.1fr) minmax(105px, 0.7fr) minmax(110px, 0.75fr) minmax(130px, 0.9fr) minmax(120px, 0.8fr);
  gap: 18px;
  align-items: center;
  padding: 12px 22px;
}

.ops-worker-table-head {
  background: #fafbfc;
  color: var(--ops-muted);
  font-size: 0.7rem;
  font-weight: 650;
  text-transform: uppercase;
}

.ops-worker-row { min-height: 74px; border-top: 1px solid #edf0f3; }
.ops-worker-row:hover { background: #fafcfc; }
.ops-worker-row.offline { background: #fffafa; }
.ops-worker-row > span { min-width: 0; }
.ops-worker-row strong,
.ops-worker-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-worker-row strong { color: var(--ops-ink); font-size: 0.8rem; font-weight: 650; }
.ops-worker-row small { margin-top: 4px; color: var(--ops-muted); font-size: 0.68rem; }
.ops-worker-identity strong { font-size: 0.86rem; }
.ops-worker-health { display: grid; grid-template-columns: 8px minmax(0, 1fr); column-gap: 8px; align-items: center; color: #168451; }
.ops-worker-health > small { grid-column: 2; margin-top: 2px; }
.ops-worker-health.offline { color: var(--ops-red); }
.ops-worker-load > i { height: 5px; display: block; overflow: hidden; margin-top: 7px; border-radius: 5px; background: #e4eaed; }
.ops-worker-load > i em { height: 100%; display: block; border-radius: inherit; background: var(--ops-teal); }
.ops-worker-services { display: flex; flex-wrap: wrap; gap: 5px; }
.ops-worker-services b { border-radius: 4px; padding: 5px 7px; background: #eef2f5; color: #53677f; font-size: 0.65rem; font-weight: 650; }
.ops-worker-services b.good { background: #eaf7ef; color: #187c4c; }
.ops-worker-services b.bad { background: #fff0f1; color: #bd3640; }
.ops-worker-heartbeat strong { color: #168451; }
.ops-worker-row.offline .ops-worker-heartbeat strong { color: var(--ops-red); }

.ops-primary-stack .ops-worker-table-head,
.ops-primary-stack .ops-worker-row {
  min-width: 0;
  grid-template-columns: minmax(120px, 1.2fr) minmax(110px, 0.9fr) minmax(130px, 1fr) minmax(105px, 0.75fr) minmax(110px, 0.8fr);
  gap: 12px;
}

.ops-primary-stack .ops-worker-table-head > :nth-child(4),
.ops-primary-stack .ops-worker-row > :nth-child(4),
.ops-primary-stack .ops-worker-table-head > :nth-child(7),
.ops-primary-stack .ops-worker-row > :nth-child(7) {
  display: none;
}

/* Keep the operations dashboard comfortably dense on standard office displays. */
@media (min-width: 861px) {
  .ops-app-layout,
  .ops-app-layout:has(.sidebar:hover),
  .ops-app-layout:has(.sidebar:focus-within) {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .ops-app-layout .sidebar {
    padding: 12px 6px;
  }

  .ops-app-layout .sidebar-brand {
    margin-bottom: 10px;
  }

  .ops-app-layout .sidebar-logo {
    width: 38px;
    height: 38px;
  }

  .ops-app-layout .side-menu {
    gap: 3px;
  }

  .ops-app-layout .side-menu a,
  .ops-app-layout .sidebar:hover .side-menu a,
  .ops-app-layout .sidebar:focus-within .side-menu a {
    width: 76px;
    min-height: 48px;
    padding: 4px;
  }

  .ops-app-layout .menu-label,
  .ops-app-layout .sidebar:hover .menu-label,
  .ops-app-layout .sidebar:focus-within .menu-label {
    font-size: 0.61rem;
  }

  .ops-dashboard-shell {
    max-width: none;
    gap: 14px;
    padding: 18px 24px 28px;
  }

  .ops-topbar {
    min-height: 40px;
    padding-bottom: 4px;
  }

  .ops-topbar h1 {
    font-size: 1.65rem;
  }

  .ops-dashboard-shell .dashboard-alert-button {
    width: 38px;
    min-width: 38px;
    height: 38px;
  }

  .ops-metric {
    min-height: 86px;
    gap: 6px;
    padding: 15px 18px;
  }

  .ops-metric span {
    font-size: 0.78rem;
  }

  .ops-metric strong {
    font-size: clamp(1.45rem, 2.25vw, 1.9rem);
  }

  .ops-content-grid,
  .ops-primary-stack,
  .ops-side-stack {
    gap: 14px;
  }

  .ops-panel-heading {
    min-height: 60px;
    padding: 12px 18px;
  }

  .ops-panel-heading h2 {
    font-size: 0.96rem;
  }

  .ops-panel-heading span {
    margin-top: 3px;
    font-size: 0.71rem;
  }

  .ops-location-table-head,
  .ops-location-row {
    padding: 10px 18px;
  }

  .ops-location-row > span {
    font-size: 0.84rem;
  }

  .ops-location-row small {
    margin-top: 2px;
    font-size: 0.69rem;
  }

  .ops-attention-row {
    min-height: 54px;
    padding: 8px 15px;
  }

  .ops-empty {
    padding: 16px 18px;
    font-size: 0.8rem;
  }

  .ops-availability-content {
    gap: 18px;
    padding: 16px 18px;
  }

  .ops-donut {
    width: 104px;
    flex-basis: 104px;
  }

  .ops-donut::before {
    inset: 14px;
  }

  .ops-donut strong {
    font-size: 1.4rem;
  }

  .ops-availability-legend {
    gap: 10px;
  }

  .ops-activity-panel,
  .ops-recent-panel {
    min-height: 210px;
  }

  .ops-line-chart {
    padding: 10px 18px 8px;
  }

  .ops-line-chart svg {
    height: 132px;
  }

  .ops-chart-note {
    margin-top: 8px;
  }

  .ops-recent-row {
    min-height: 38px;
    padding: 7px 15px;
  }
}

@media (max-width: 1120px) {
  .ops-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ops-metric:nth-child(3) { border-right: 0; }
  .ops-metric:nth-child(-n + 3) { border-bottom: 1px solid var(--ops-line); }
  .ops-content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .ops-dashboard-shell { padding: 20px 14px 30px; }
  .ops-topbar { align-items: flex-start; }
  .ops-updated { display: none; }
  .ops-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-metric { min-height: 94px; padding: 17px; border-bottom: 1px solid var(--ops-line); }
  .ops-metric:nth-child(2n) { border-right: 0; }
  .ops-metric:last-child { grid-column: 1 / -1; border-bottom: 0; }
  .ops-location-table-head { display: none; }
  .ops-location-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .ops-location-row > span:nth-child(2), .ops-location-row > span:nth-child(3) { display: none; }
  .ops-availability-content { gap: 15px; padding: 18px; }
  .ops-donut { width: 108px; flex-basis: 108px; }.ops-donut::before { inset: 15px; }.ops-donut strong { font-size: 1.35rem; }
  .ops-line-chart { padding-inline: 12px; }
  .ops-line-labels { padding-left: 6%; padding-right: 2%; }
  .ops-worker-panel .ops-panel-heading { align-items: flex-start; }
  .ops-worker-table-head,
  .ops-worker-row { padding-inline: 16px; }
}

@media (max-width: 860px) {
  .ops-app-layout,
  .ops-app-layout:has(.sidebar:hover),
  .ops-app-layout:has(.sidebar:focus-within) { grid-template-columns: 1fr; }

  .ops-app-layout .sidebar-brand-copy,
  .ops-app-layout .sidebar-footer { display: none; }

  .ops-app-layout .side-menu { grid-template-columns: repeat(5, 44px); justify-content: start; }
  .ops-app-layout .side-menu a,
  .ops-app-layout .sidebar:hover .side-menu a,
  .ops-app-layout .sidebar:focus-within .side-menu a { width: 44px; min-height: 44px; }
  .ops-app-layout .menu-label,
  .ops-app-layout .sidebar:hover .menu-label,
  .ops-app-layout .sidebar:focus-within .menu-label { display: none; }
}

.sidebar-brand-copy strong,
.sidebar-brand-copy span {
  display: block;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.sidebar-brand-copy strong {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.12;
}

.sidebar-brand-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
}

.side-menu {
  position: relative;
  z-index: 1;
  gap: 6px;
}

.side-menu a {
  position: relative;
  width: 50px;
  min-height: 48px;
  gap: 13px;
  border-radius: 10px;
  padding: 0 13px;
  color: #a9c2c2;
  font-weight: 500;
  outline: none;
  transition:
    width 220ms ease,
    color 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.side-menu a::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 999px;
  background: transparent;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.sidebar:hover .side-menu a,
.sidebar:focus-within .side-menu a {
  width: 226px;
}

.side-menu a:hover {
  color: var(--text);
  border-color: rgba(56, 211, 159, 0.28);
  background: rgba(56, 211, 159, 0.075);
  transform: translateX(2px);
}

.side-menu a.active {
  color: var(--text);
  border-color: rgba(56, 211, 159, 0.45);
  background: linear-gradient(90deg, rgba(56, 211, 159, 0.18), rgba(56, 211, 159, 0.06));
}

.side-menu a.active::before {
  background: var(--accent);
  box-shadow: 0 0 18px rgba(56, 211, 159, 0.72);
}

.side-menu a .menu-svg-icon,
.side-menu a > span[aria-hidden="true"] {
  flex: 0 0 24px;
  display: inline-grid;
  place-items: center;
  color: currentColor;
}

.menu-label {
  max-width: 0;
  opacity: 0;
  color: var(--text);
  font-size: 0.91rem;
  font-weight: 500;
  letter-spacing: 0;
  transform: translateX(-4px);
  transition: max-width 200ms ease, opacity 150ms ease, transform 180ms ease;
}

.sidebar:hover .menu-label,
.sidebar:focus-within .menu-label {
  max-width: 172px;
  opacity: 1;
  transform: translateX(0);
}

.sidebar-footer {
  position: relative;
  z-index: 1;
  gap: 8px;
  padding-top: 12px;
  border-top-color: rgba(56, 211, 159, 0.2);
}

.sidebar-operator {
  width: 50px;
  min-height: 48px;
  gap: 12px;
  border-radius: 10px;
  padding: 0 13px;
  border-color: rgba(56, 211, 159, 0.22);
  background: rgba(255, 255, 255, 0.025);
}

.sidebar:hover .sidebar-operator,
.sidebar:focus-within .sidebar-operator {
  width: 226px;
}

.sidebar-operator > span {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(56, 211, 159, 0.13);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
}

.sidebar-operator small {
  color: var(--accent);
  font-size: 0.65rem;
  font-weight: 600;
}

.sidebar-operator strong {
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 500;
}

.sidebar-exit-button {
  width: 50px;
  min-width: 50px;
  height: 48px;
  gap: 12px;
  border-radius: 10px;
  padding: 0 13px;
  background: linear-gradient(135deg, #3bd3a5, #19aebc);
  box-shadow: 0 14px 30px rgba(25, 174, 188, 0.16);
}

.sidebar:hover .sidebar-exit-button,
.sidebar:focus-within .sidebar-exit-button {
  width: 226px;
}

.sidebar-exit-button strong {
  color: #031413;
  font-size: 0.9rem;
  font-weight: 600;
}

.exit-icon {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
}

.exit-icon::before {
  right: 1px;
  top: 3px;
  width: 10px;
  height: 18px;
  border: 2px solid #031413;
  border-left-width: 2px;
  border-right-width: 5px;
  transform: perspective(18px) rotateY(-16deg);
}

.exit-icon::after {
  left: 0;
  top: 10px;
  width: 17px;
  height: 4px;
  background: #031413;
  box-shadow: 7px -5px 0 -1px #031413, 7px 5px 0 -1px #031413;
}

@media (max-width: 860px) {
  :root {
    --sidebar-closed: 64px;
    --sidebar-open: 224px;
  }

  .sidebar {
    padding-inline: 7px;
  }

  .sidebar:hover .side-menu a,
  .sidebar:focus-within .side-menu a,
  .sidebar:hover .sidebar-operator,
  .sidebar:focus-within .sidebar-operator,
  .sidebar:hover .sidebar-exit-button,
  .sidebar:focus-within .sidebar-exit-button {
    width: 188px;
  }
}

/* Enterprise dashboard graph refresh - 20260520-dashboard-graphs */
.dashboard-chart-grid {
  grid-template-columns: minmax(430px, 0.95fr) minmax(520px, 1.05fr);
  gap: 16px;
}

.dashboard-chart-card {
  position: relative;
  overflow: hidden;
  min-height: 318px;
  border-color: rgba(56, 211, 159, 0.22);
  background:
    linear-gradient(145deg, rgba(56, 211, 159, 0.07), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01)),
    var(--panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.dashboard-chart-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(186, 219, 215, 0.045) 1px, transparent 1px);
  background-size: 100% 42px;
  opacity: 0.45;
}

.chart-card-header,
.infra-score-strip,
.infra-row-stack,
.vertical-chart,
.chart-legend {
  position: relative;
  z-index: 1;
}

.chart-card-header h2 {
  font-size: clamp(1.35rem, 1.8vw, 1.85rem);
  font-weight: 500;
}

.chart-card-header span {
  border: 1px solid rgba(56, 211, 159, 0.18);
  background: rgba(255, 255, 255, 0.045);
  font-weight: 500;
}

.enterprise-infra-chart {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.infra-score-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.infra-score-tile {
  min-width: 0;
  display: grid;
  gap: 5px;
  border: 1px solid rgba(186, 219, 215, 0.13);
  border-radius: 8px;
  padding: 12px 13px;
  color: var(--text);
  text-decoration: none;
  background: rgba(6, 17, 17, 0.45);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.infra-score-tile:hover,
.infra-score-tile:focus-visible {
  border-color: rgba(56, 211, 159, 0.48);
  background: rgba(56, 211, 159, 0.08);
  transform: translateY(-2px);
}

.infra-score-tile small,
.infra-score-tile em {
  overflow: hidden;
  color: var(--muted);
  font-style: normal;
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.infra-score-tile strong {
  color: var(--text);
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  font-weight: 500;
  line-height: 1;
}

.infra-score-tile.overall {
  background: linear-gradient(135deg, rgba(56, 211, 159, 0.13), rgba(25, 174, 188, 0.05));
}

.infra-row-stack {
  display: grid;
  align-content: center;
  gap: 9px;
}

.infra-row {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) 62px;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(186, 219, 215, 0.11);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  text-decoration: none;
  background: rgba(6, 17, 17, 0.38);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.infra-row:hover,
.infra-row:focus-visible {
  border-color: rgba(56, 211, 159, 0.48);
  background: rgba(56, 211, 159, 0.08);
  box-shadow: 0 0 0 1px rgba(56, 211, 159, 0.08), 0 18px 36px rgba(0, 0, 0, 0.14);
  transform: translateX(3px);
}

.infra-row.danger:hover,
.infra-row.danger:focus-visible {
  border-color: rgba(255, 119, 119, 0.5);
  background: rgba(255, 119, 119, 0.08);
}

.infra-row-label {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.infra-row-label small,
.infra-value small {
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.infra-row-label strong,
.infra-value strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.infra-track {
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
}

.infra-track i {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  transform-origin: left center;
  transition: filter 160ms ease, transform 160ms ease;
}

.infra-row.primary .infra-track i {
  background: linear-gradient(90deg, #39d9a8, #19b6c1);
}

.infra-row.danger .infra-track i {
  background: linear-gradient(90deg, #ff8b8b, #ff5f6d);
}

.infra-row:hover .infra-track i,
.infra-row:focus-visible .infra-track i {
  filter: saturate(1.25) brightness(1.12);
  transform: scaleX(1.015);
}

.infra-value {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.vertical-chart {
  min-height: 218px;
  gap: 8px;
  border: 1px solid rgba(186, 219, 215, 0.12);
  border-radius: 8px;
  padding: 14px 12px 10px;
  background:
    linear-gradient(rgba(186, 219, 215, 0.08) 1px, transparent 1px) 0 25% / 100% 25%,
    rgba(6, 17, 17, 0.34);
}

.vertical-chart-day {
  padding: 6px 4px;
}

.vertical-bars span {
  position: relative;
  width: 10px;
  cursor: default;
}

.vertical-bars span::after {
  content: attr(data-value);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 7px);
  min-width: 24px;
  padding: 3px 6px;
  border-radius: 6px;
  background: #e8f7f4;
  color: #061110;
  font-size: 0.68rem;
  opacity: 0;
  transform: translateX(-50%) translateY(3px);
  transition: opacity 140ms ease, transform 140ms ease;
  pointer-events: none;
}

.vertical-bars span:hover,
.vertical-bars span:focus-visible {
  filter: saturate(1.35) brightness(1.2);
  transform: scaleY(1.08);
  box-shadow: 0 0 20px rgba(56, 211, 159, 0.22);
}

.vertical-bars span:hover::after,
.vertical-bars span:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.chart-legend span {
  font-weight: 500;
}

@media (max-width: 1180px) {
  .dashboard-chart-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .infra-score-strip {
    grid-template-columns: 1fr;
  }

  .infra-row {
    grid-template-columns: 82px minmax(0, 1fr) 46px;
    gap: 8px;
  }
}

/* Live cards and AI overlay tuning - 20260520-live-overlay-tune */
.show-multi-view .dashboard-shell {
  gap: 10px;
  padding-top: 18px;
}

.show-multi-view .topbar {
  padding: 4px 0 10px;
}

.nvr-select-grid {
  grid-template-columns: repeat(auto-fill, minmax(330px, 390px));
  gap: 14px;
  align-items: start;
}

.nvr-select-card {
  position: relative;
  min-height: 220px;
  height: 220px;
  padding: 22px;
  border-color: rgba(56, 211, 159, 0.22);
  background:
    linear-gradient(145deg, rgba(56, 211, 159, 0.08), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01)),
    var(--panel);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.nvr-select-card:hover,
.nvr-select-card:focus-visible {
  border-color: rgba(56, 211, 159, 0.72);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.22);
  transform: translateY(-2px);
}

.nvr-live-console {
  min-height: auto;
  height: calc(100vh - 124px);
}

.show-multi-view .nvr-live-console {
  height: auto;
  min-height: 0;
  border-radius: 8px;
}

.show-multi-view .live-viewer-panel {
  background: #020807;
}

.show-multi-view .multi-view-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  background: #020807;
}

.show-multi-view .mini-live-tile {
  height: auto !important;
  min-height: 0 !important;
  border-radius: 5px;
  background: #06100f;
}

.show-multi-view .mini-frame {
  aspect-ratio: 16 / 9;
  height: auto !important;
  min-height: 0 !important;
  background: #06100f;
}

.show-multi-view .mini-frame video,
.show-multi-view .mini-frame img {
  object-fit: cover;
}

.mini-frame > span:not(.mini-frame-label) {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #343634;
}

.mini-frame-label {
  padding: 34px 10px 10px;
  font-size: 0.86rem;
  font-weight: 500;
}

.attendance-camera-card-grid {
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 14px;
  align-items: start;
}

.attendance-camera-monitor-card {
  width: 100%;
  border-color: rgba(56, 211, 159, 0.2);
}

.attendance-camera-preview {
  background: #020807;
}

.attendance-face-box {
  will-change: left, top, width, height, opacity;
  border-width: 2px;
  transition:
    left 520ms cubic-bezier(0.2, 0.8, 0.2, 1),
    top 520ms cubic-bezier(0.2, 0.8, 0.2, 1),
    width 520ms cubic-bezier(0.2, 0.8, 0.2, 1),
    height 520ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 260ms ease;
}

.attendance-face-box span {
  max-width: 280px;
  font-weight: 700;
  letter-spacing: 0;
}

.attendance-detection-overlay {
  z-index: 6;
}

@media (max-width: 1180px) {
  .show-multi-view .multi-view-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .show-multi-view .multi-view-grid,
  .attendance-camera-card-grid {
    grid-template-columns: 1fr;
  }

  .nvr-live-console {
    grid-template-columns: 1fr;
    height: auto;
  }

  .camera-directory {
    display: none;
  }
}

/* NVR select card layout fix - 20260520-nvr-card-fix */
.nvr-select-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 390px));
  align-items: stretch;
  align-content: start;
  gap: 14px;
}

.nvr-select-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  min-height: 220px;
  height: 220px;
  gap: 12px;
  overflow: hidden;
  padding: 22px;
}

.nvr-select-card > div:first-child {
  min-width: 0;
  min-height: 0;
}

.nvr-select-card h2 {
  display: -webkit-box;
  max-height: 2.35em;
  overflow: hidden;
  line-height: 1.16;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.nvr-select-card > div:first-child > span {
  display: block;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.nvr-select-card > .location-counts {
  margin-top: 0;
  align-self: end;
}

.nvr-select-card > strong {
  align-self: end;
  justify-self: start;
  margin: 0;
  max-width: 100%;
}

@media (max-width: 760px) {
  .nvr-select-grid {
    grid-template-columns: 1fr;
  }

  .nvr-select-card {
    height: auto;
    min-height: 190px;
  }
}

/* Enterprise sidebar icon system - 20260521-enterprise-menu-icons */
.side-menu a .enterprise-menu-icon {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  color: #b8cecc;
}

.enterprise-menu-icon svg {
  width: 21px;
  height: 21px;
  overflow: visible;
}

/* Reports workspace */
.reports-body { background: #f5f7f9; color: #172e47; }
.reports-shell { min-width: 0; padding: 22px 24px 32px; overflow-x: hidden; }
.reports-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.reports-header h1 { margin: 0; color: #102944; font-size: 1.62rem; line-height: 1.15; letter-spacing: 0; }
.reports-header p { margin: 5px 0 0; color: #60758a; font-size: .82rem; }
.reports-header > div:last-child { display: flex; align-items: center; gap: 10px; }
.reports-alert-link, .reports-export-button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; border: 1px solid #cbd8df; border-radius: 5px; background: #fff; color: #087f77; font-size: .77rem; font-weight: 700; text-decoration: none; }
.reports-alert-link { width: 40px; padding: 8px; color: #344f68; }
.reports-export-button { gap: 7px; padding: 8px 13px; }
.reports-alert-link svg, .reports-export-button svg, .reports-reset svg, .reports-table-panel > header button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.reports-success { margin: -8px 0 12px; padding: 9px 12px; border: 1px solid #9edbd2; border-radius: 5px; background: #eefaf8; color: #087f77; font-size: .76rem; }
.reports-filter-bar { display: grid; grid-template-columns: 1.05fr 1.05fr 1.1fr 1.05fr 1.15fr 1.05fr 40px 92px; align-items: end; gap: 10px; padding: 14px; border: 1px solid #d7e0e6; border-radius: 7px; background: #fff; }
.reports-filter-bar label { display: grid; gap: 6px; min-width: 0; color: #304961; font-size: .67rem; font-weight: 700; }
.reports-filter-bar input, .reports-filter-bar select { width: 100%; height: 38px; min-width: 0; padding: 0 10px; border: 1px solid #cbd7de; border-radius: 4px; background: #fff; color: #203a53; font: inherit; font-size: .74rem; }
.reports-filter-bar input:focus, .reports-filter-bar select:focus { outline: 2px solid rgba(8, 150, 141, .2); border-color: #08968d; }
.reports-filter-bar > button { height: 38px; border: 1px solid #07877f; border-radius: 4px; background: #08968d; color: #fff; font-size: .74rem; font-weight: 700; }
.reports-reset { display: grid; place-items: center; width: 40px; height: 38px; border: 1px solid #cbd7de; border-radius: 4px; background: #fff; color: #3d566d; }
.reports-kpis { display: grid; grid-template-columns: repeat(6, 1fr); margin-top: 14px; border: 1px solid #d7e0e6; border-radius: 7px; background: #fff; overflow: hidden; }
.reports-kpis article { position: relative; min-width: 0; padding: 17px 18px 16px 60px; border-right: 1px solid #e0e7eb; }
.reports-kpis article:last-child { border-right: 0; }
.report-kpi-icon { position: absolute; left: 17px; top: 20px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 6px; background: #e5f5f3; color: #078b82; }
.report-kpi-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.reports-kpis article.motion .report-kpi-icon { background: #e6f0fc; color: #2879df; }
.reports-kpis article.vehicle .report-kpi-icon { background: #fff1de; color: #db7d07; }
.reports-kpis article.animal .report-kpi-icon { background: #eee9fb; color: #7654c8; }
.reports-kpis article.attendance .report-kpi-icon { background: #fde9eb; color: #d93e49; }
.reports-kpis span, .reports-kpis small { display: block; color: #566d82; font-size: .69rem; }
.reports-kpis strong { display: block; margin: 3px 0; color: #078b82; font-size: 1.42rem; line-height: 1; font-variant-numeric: tabular-nums; }
.reports-kpis .motion strong { color: #2879df; }.reports-kpis .vehicle strong { color: #db7d07; }.reports-kpis .animal strong { color: #7654c8; }.reports-kpis .attendance strong { color: #d93e49; }
.reports-analytics { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(320px, .95fr); gap: 14px; margin-top: 14px; }
.reports-panel { border: 1px solid #d7e0e6; border-radius: 7px; background: #fff; overflow: hidden; }
.reports-panel > header { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 10px 14px; border-bottom: 1px solid #e2e8ec; }
.reports-panel h2 { margin: 0; color: #172e47; font-size: .84rem; letter-spacing: 0; }
.reports-activity > header span { padding: 6px 28px 6px 9px; border: 1px solid #d4dee4; border-radius: 4px; color: #425b71; font-size: .68rem; }
.reports-chart-svg { display: block; width: 100%; min-height: 245px; padding: 8px 10px 0; }
.reports-chart-svg text { fill: #65798c; font-size: 9px; }
.reports-activity > footer { display: flex; justify-content: center; gap: 22px; padding: 5px 12px 13px; color: #526a80; font-size: .66rem; }
.reports-activity > footer span::before { content: ""; display: inline-block; width: 18px; height: 2px; margin: 0 6px 3px 0; background: #07978e; }.reports-activity > footer .motion::before { background: #2879df; }.reports-activity > footer .vehicle::before { background: #ee9415; }
.reports-distribution > div { display: grid; grid-template-columns: 155px minmax(0, 1fr); align-items: center; gap: 14px; min-height: 270px; padding: 22px 18px; }
.reports-donut { width: 150px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; }
.reports-donut > span { width: 86px; aspect-ratio: 1; display: grid; place-content: center; border-radius: 50%; background: #fff; color: #64788b; font-size: .66rem; text-align: center; }
.reports-donut strong { display: block; color: #172e47; font-size: 1rem; }
.reports-distribution dl { margin: 0; min-width: 0; }
.reports-distribution dl div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; color: #3e576e; font-size: .68rem; }
.reports-distribution dt { display: flex; align-items: center; gap: 7px; }.reports-distribution dt i { width: 7px; height: 7px; border-radius: 50%; }.reports-distribution dd { margin: 0; color: #172e47; font-variant-numeric: tabular-nums; }
.reports-distribution dl .total { margin-top: 4px; border-top: 1px solid #e1e7eb; font-weight: 700; }
.reports-table-panel { margin-top: 14px; }
.reports-table-panel > header button { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 10px; border: 1px solid #a9ccc9; border-radius: 4px; background: #fff; color: #087f77; font-size: .68rem; font-weight: 700; }
.reports-table-wrap { overflow-x: auto; }
.reports-table-panel table { width: 100%; min-width: 900px; border-collapse: collapse; font-size: .7rem; }
.reports-table-panel th { padding: 9px 12px; background: #f8fafb; color: #3a5268; font-size: .65rem; text-align: left; white-space: nowrap; }
.reports-table-panel td { padding: 9px 12px; border-top: 1px solid #e4eaee; color: #344d64; font-variant-numeric: tabular-nums; }
.reports-table-panel td small { display: block; margin-top: 2px; color: #8191a0; font-size: .61rem; }
.report-event, .report-status { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 4px; background: #e8f6f4; color: #087f77; font-size: .63rem; font-weight: 700; }
.report-event-badges { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.report-event.motion { background: #e7f0fc; color: #1769c7; }.report-event.vehicle { background: #fff0dc; color: #b86300; }.report-event.animal { background: #eee9fb; color: #6541b2; }.report-event.attendance { background: #fde8ea; color: #bd303a; }
.report-status.reviewed { background: #e6f5e9; color: #28753c; }.report-status.new { background: #e8f0fb; color: #2465ad; }
.report-clip-link { padding: 0; border: 0; background: transparent; color: #087f77; font-size: .66rem; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.reports-no-media { color: #9aa7b2; }
.reports-table-panel > footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 14px; border-top: 1px solid #e1e7eb; color: #526a80; font-size: .67rem; }
.reports-table-panel > footer nav { display: flex; gap: 5px; }
.reports-table-panel > footer nav a { display: grid; place-items: center; min-width: 30px; height: 30px; border: 1px solid #d1dce2; border-radius: 4px; background: #fff; color: #3d566d; text-decoration: none; }.reports-table-panel > footer nav a.active { border-color: #08968d; background: #08968d; color: #fff; }.reports-table-panel > footer nav a.disabled { pointer-events: none; opacity: .42; }
.reports-empty { display: grid; place-items: center; min-height: 190px; color: #738598; font-size: .75rem; text-align: center; }
.reports-schedule-dialog { width: min(430px, calc(100vw - 32px)); padding: 0; border: 1px solid #cdd8df; border-radius: 7px; box-shadow: 0 20px 60px rgba(19, 42, 61, .24); }.reports-schedule-dialog::backdrop { background: rgba(17, 33, 47, .48); }
.reports-schedule-dialog form { padding: 18px; }.reports-schedule-dialog header { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 17px; }.reports-schedule-dialog h2 { margin: 0; font-size: 1rem; }.reports-schedule-dialog p { margin: 4px 0 0; color: #697e91; font-size: .73rem; }.reports-schedule-dialog header button { width: 34px; height: 34px; border: 0; background: transparent; color: #52697d; font-size: 1.5rem; }.reports-schedule-dialog label { display: grid; gap: 6px; margin-top: 12px; color: #344e66; font-size: .72rem; font-weight: 700; }.reports-schedule-dialog input, .reports-schedule-dialog select { height: 42px; padding: 0 10px; border: 1px solid #cad7de; border-radius: 4px; }.reports-schedule-dialog footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }.reports-schedule-dialog footer button { min-height: 38px; padding: 7px 13px; border: 1px solid #b8cbd2; border-radius: 4px; background: #fff; color: #344e66; }.reports-schedule-dialog footer button[type="submit"] { border-color: #08968d; background: #08968d; color: #fff; }
.report-video-viewer[hidden] { display: none; }.report-video-viewer { position: fixed; z-index: 170; inset: 0; display: grid; place-items: center; padding: 56px 24px 24px; background: rgba(5, 13, 20, .92); }.report-video-viewer video,.report-video-viewer img { width: auto; max-width: min(1100px, 100%); max-height: calc(100vh - 80px); background: #000; object-fit: contain; }.report-video-viewer video { width: min(1100px, 100%); }.report-video-viewer > button { position: fixed; top: 14px; right: 16px; width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.5); border-radius: 5px; background: #172a38; color: #fff; font-size: 1.5rem; }.report-video-open { overflow: hidden; }
.reports-body .dashboard-ask-button, .reports-body .dashboard-ask-modal { display: none !important; }

@media (max-width: 1180px) {
  .reports-filter-bar { grid-template-columns: repeat(4, minmax(0, 1fr)); }.reports-filter-bar > button { grid-column: span 2; }.reports-kpis { grid-template-columns: repeat(3, 1fr); }.reports-kpis article:nth-child(3) { border-right: 0; }.reports-kpis article:nth-child(n+4) { border-top: 1px solid #e0e7eb; }.reports-analytics { grid-template-columns: 1fr; }.reports-distribution > div { grid-template-columns: 180px minmax(240px, 1fr); justify-content: center; }
}
@media (max-width: 760px) {
  .reports-shell { padding: 16px 12px 26px; }.reports-header { align-items: flex-start; }.reports-header h1 { font-size: 1.35rem; }.reports-export-button { font-size: 0; width: 40px; padding: 8px; }.reports-filter-bar { grid-template-columns: 1fr 1fr; padding: 12px; }.reports-filter-bar label { font-size: .73rem; }.reports-filter-bar input, .reports-filter-bar select { font-size: 1rem; }.reports-filter-bar label:nth-of-type(n+3) { grid-column: span 2; }.reports-filter-bar > button { grid-column: auto; }.reports-kpis { grid-template-columns: 1fr 1fr; }.reports-kpis article, .reports-kpis article:nth-child(3) { padding-left: 52px; border-right: 1px solid #e0e7eb; border-top: 1px solid #e0e7eb; }.reports-kpis article:first-child { grid-column: span 2; border-top: 0; }.reports-kpis article:nth-child(odd) { border-right: 0; }.report-kpi-icon { left: 12px; }.reports-distribution > div { grid-template-columns: 1fr; justify-items: center; }.reports-distribution dl { width: 100%; }.reports-chart-svg { min-height: 210px; padding-left: 0; }.reports-table-panel > footer { align-items: flex-start; flex-direction: column; }.reports-table-panel > footer nav { align-self: stretch; justify-content: center; }.reports-panel > header { min-height: 46px; }
}

@media (max-width: 520px) {
  .reports-filter-bar { grid-template-columns: 1fr; }
  .reports-filter-bar label, .reports-filter-bar label:nth-of-type(n+3) { grid-column: auto; }
  .reports-filter-bar > button { grid-column: auto; }
}

.enterprise-menu-icon path,
.enterprise-menu-icon rect {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.side-menu a:hover .enterprise-menu-icon,
.side-menu a:focus-visible .enterprise-menu-icon {
  color: var(--text);
}

.side-menu a.active .enterprise-menu-icon {
  color: var(--accent);
  filter: none;
}

.side-menu a.active .enterprise-menu-icon path,
.side-menu a.active .enterprise-menu-icon rect {
  stroke-width: 1.8;
}

.side-menu a {
  letter-spacing: 0;
}

.menu-label {
  font-weight: 500;
}

/* Sidebar brand full title - 20260521-sidebar-brand-visible */
.sidebar:hover .sidebar-brand-copy strong,
.sidebar:focus-within .sidebar-brand-copy strong {
  display: -webkit-box;
  max-height: 2.3em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* Dashboard 30 day logs - 20260521-dashboard-30-day-logs */
.dashboard-logs-panel {
  display: grid;
  gap: 16px;
  border: 1px solid rgba(56, 211, 159, 0.22);
  border-radius: 8px;
  padding: 22px;
  background:
    linear-gradient(145deg, rgba(56, 211, 159, 0.06), transparent 42%),
    var(--panel);
}

.dashboard-logs-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-logs-summary span {
  display: grid;
  gap: 4px;
  min-height: 72px;
  border: 1px solid rgba(186, 219, 215, 0.12);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
}

.dashboard-logs-summary strong {
  color: var(--text);
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1;
}

.dashboard-log-feed {
  display: grid;
  max-height: 520px;
  overflow: auto;
  border-top: 1px solid rgba(186, 219, 215, 0.13);
}

.dashboard-log-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(190px, auto);
  gap: 14px;
  align-items: center;
  min-height: 88px;
  border-bottom: 1px solid rgba(186, 219, 215, 0.11);
  padding: 12px 0;
}

.dashboard-log-row:hover {
  background: rgba(56, 211, 159, 0.045);
}

.dashboard-log-thumb {
  width: 64px;
  height: 64px;
  overflow: hidden;
  border: 1px solid rgba(186, 219, 215, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 0.72rem;
  text-decoration: none;
}

.dashboard-log-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-log-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.dashboard-log-main strong,
.dashboard-log-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-log-main strong {
  color: var(--text);
  font-weight: 500;
}

.dashboard-log-main span {
  color: var(--muted);
}

.dashboard-log-meta {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.dashboard-log-meta span,
.dashboard-log-meta em {
  width: max-content;
  max-width: 240px;
  overflow: hidden;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.065);
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-log-meta em {
  color: var(--accent);
}

.dashboard-log-row.unknown-face .dashboard-log-meta em {
  color: #ff8a8a;
}

.dashboard-log-row.vehicle-event .dashboard-log-meta em {
  color: #ffd166;
}

.dashboard-log-row.person-activity .dashboard-log-meta em,
.dashboard-log-row.cleaning-activity .dashboard-log-meta em {
  color: #8fb7ff;
}

@media (max-width: 980px) {
  .dashboard-logs-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-log-row {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .dashboard-log-meta {
    grid-column: 2;
    justify-items: start;
    display: flex;
    flex-wrap: wrap;
  }
}



/* Sidebar label visibility fix - 20260521-menu-labels-visible */
.sidebar:hover .sidebar-brand,
.sidebar:focus-within .sidebar-brand {
  overflow: visible;
}

.sidebar:hover .sidebar-brand-copy,
.sidebar:focus-within .sidebar-brand-copy {
  flex: 1 1 auto;
  width: 218px;
  max-width: 218px;
}

.sidebar:hover .sidebar-brand-copy strong,
.sidebar:focus-within .sidebar-brand-copy strong,
.sidebar:hover .sidebar-brand-copy span,
.sidebar:focus-within .sidebar-brand-copy span {
  display: block;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.sidebar:hover .side-menu a,
.sidebar:focus-within .side-menu a {
  width: 262px;
  overflow: visible;
}

.sidebar:hover .menu-label,
.sidebar:focus-within .menu-label {
  flex: 1 1 auto;
  display: block;
  width: auto;
  max-width: none;
  overflow: visible;
  opacity: 1;
  text-overflow: clip;
  white-space: normal;
  transform: translateX(0);
}

/* Shared desktop navigation rail: stable geometry and visible labels on every page. */
@media (min-width: 861px) {
  .dashboard-body .app-layout,
  .dashboard-body .app-layout:has(.sidebar:hover),
  .dashboard-body .app-layout:has(.sidebar:focus-within) {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .dashboard-body .sidebar {
    padding: 12px 6px;
    box-shadow: none;
  }

  .dashboard-body .sidebar:hover,
  .dashboard-body .sidebar:focus-within {
    box-shadow: none;
  }

  .dashboard-body .sidebar-brand {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    padding: 0;
    overflow: hidden;
  }

  .dashboard-body .sidebar-logo {
    width: 38px;
    height: 38px;
  }

  .dashboard-body .sidebar-brand-copy,
  .dashboard-body .sidebar:hover .sidebar-brand-copy,
  .dashboard-body .sidebar:focus-within .sidebar-brand-copy {
    display: none;
  }

  .dashboard-body .side-menu {
    justify-items: center;
    gap: 3px;
  }

  .dashboard-body .side-menu a,
  .dashboard-body .sidebar:hover .side-menu a,
  .dashboard-body .sidebar:focus-within .side-menu a {
    width: 76px;
    min-height: 48px;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    overflow: visible;
    padding: 4px;
    transform: none;
  }

  .dashboard-body .side-menu a::before {
    left: -6px;
  }

  .dashboard-body .menu-label,
  .dashboard-body .sidebar:hover .menu-label,
  .dashboard-body .sidebar:focus-within .menu-label {
    flex: 0 0 auto;
    display: block;
    width: auto;
    max-width: none;
    overflow: visible;
    opacity: 1;
    font-size: 0.7rem;
    line-height: 1.05;
    text-overflow: clip;
    white-space: nowrap;
    transform: none;
  }

  .dashboard-body .sidebar-footer {
    align-items: center;
  }

  .dashboard-body .sidebar-operator {
    display: none;
  }

  .dashboard-body .sidebar-exit-button,
  .dashboard-body .sidebar:hover .sidebar-exit-button,
  .dashboard-body .sidebar:focus-within .sidebar-exit-button {
    width: 76px;
    min-width: 76px;
    height: 48px;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 4px;
    background: transparent;
    color: #a9c2c2;
    box-shadow: none;
  }

  .dashboard-body .sidebar-exit-button strong {
    width: auto;
    max-width: none;
    display: block;
    overflow: visible;
    opacity: 1;
    color: currentColor;
    font-size: 0.7rem;
    font-weight: 500;
    line-height: 1.05;
    white-space: nowrap;
    transform: none;
  }

  .dashboard-body .sidebar-exit-button:hover,
  .dashboard-body .sidebar-exit-button:focus-visible {
    border-color: rgba(221, 60, 69, 0.32);
    background: rgba(221, 60, 69, 0.09);
    color: #e05a62;
    filter: none;
  }

  .dashboard-body .exit-icon {
    width: 21px;
    height: 21px;
    flex-basis: 21px;
  }

  .dashboard-body .exit-icon::before,
  .dashboard-body .exit-icon::after {
    display: none;
  }

  .dashboard-body .exit-icon svg {
    width: 21px;
    height: 21px;
    display: block;
  }

  .dashboard-body .exit-icon path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
  }

  .ops-dashboard-body .sidebar-exit-button,
  .compact-live-page .sidebar-exit-button {
    color: #526179;
  }
}

/* Live NVR selector - light operations workspace. */
.live-select-body {
  overflow-x: hidden;
}

.live-select-shell {
  max-width: none;
  margin: 0;
  gap: 20px;
  padding: 30px 36px 44px;
  color: var(--ops-ink);
}

.live-select-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.live-select-header .eyebrow {
  margin-bottom: 7px;
  color: var(--ops-teal);
}

.live-select-header h1 {
  color: var(--ops-ink);
  font-size: 2.15rem;
  font-weight: 650;
  line-height: 1.08;
}

.live-select-subtitle {
  margin: 8px 0 0;
  color: var(--ops-muted);
  font-size: 0.94rem;
}

.live-select-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-updated {
  margin-left: 8px;
  color: var(--ops-muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.live-add-nvr-button,
.live-open-button,
.live-save-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #008f86;
  border-radius: 6px;
  padding: 0 16px;
  background: #008f86;
  color: #fff;
  font-size: 0.86rem;
  font-weight: 650;
  text-decoration: none;
}

.live-add-nvr-button:hover,
.live-open-button:hover,
.live-save-button:hover {
  filter: none;
  background: #007d76;
}

.live-add-nvr-button svg,
.live-open-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.live-icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #39506b;
}

.live-icon-button:hover,
.live-icon-button:focus-visible {
  border-color: var(--ops-line);
  background: #fff;
  color: var(--ops-teal);
}

.live-icon-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ops-dashboard-body .notification-widget {
  top: 20px;
  right: 24px;
}

.ops-dashboard-body .notification-button {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-color: var(--ops-line);
  border-radius: 6px;
  background: #fff;
  color: #39506b;
  box-shadow: 0 5px 16px rgba(20, 43, 62, 0.08);
}

.ops-dashboard-body .notification-button:hover,
.ops-dashboard-body .notification-button:focus-visible,
.ops-dashboard-body .notification-button.has-alerts {
  border-color: #a9d7d1;
  background: #eef9f7;
  color: var(--ops-teal);
  filter: none;
}

.ops-dashboard-body .notification-count {
  top: -7px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  border-color: #fff;
}

.live-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--ops-line);
  border-radius: 8px;
  background: #fff;
}

.live-summary-metric {
  position: relative;
  min-height: 104px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 20px 68px 20px 24px;
  border-right: 1px solid var(--ops-line);
}

.live-summary-metric:last-child { border-right: 0; }
.live-summary-metric > span { color: var(--ops-muted); font-size: 0.82rem; }
.live-summary-metric > strong { color: var(--ops-ink); font-size: 2rem; font-weight: 650; line-height: 1; }
.live-summary-metric.good > strong { color: #138c55; }
.live-summary-metric.danger > strong { color: var(--ops-red); }

.live-summary-metric svg {
  position: absolute;
  right: 24px;
  top: 50%;
  width: 31px;
  height: 31px;
  fill: none;
  stroke: var(--ops-teal);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translateY(-50%);
}

.live-summary-metric.good svg { stroke: #1f9d5a; }
.live-summary-metric.danger svg { stroke: var(--ops-red); }

.live-select-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 280px 280px;
  gap: 16px;
  align-items: end;
}

.live-select-search,
.live-select-filter {
  min-width: 0;
  color: #4f6178;
}

.live-select-search {
  position: relative;
  display: block;
}

.live-select-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  z-index: 1;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #53677f;
  stroke-width: 1.8;
  stroke-linecap: round;
  transform: translateY(-50%);
}

.live-select-search input,
.live-select-filter select {
  height: 48px;
  min-height: 48px;
  border: 1px solid #cfd8e3;
  border-radius: 6px;
  background: #fff;
  color: var(--ops-ink);
  box-shadow: none;
}

.live-select-search input { padding-left: 44px; }
.live-select-filter { position: relative; display: grid; gap: 0; }
.live-select-filter > span { position: absolute; z-index: 2; left: 14px; top: -8px; padding: 0 5px; background: var(--ops-bg); color: #53677f; font-size: 0.72rem; }
.live-select-filter select { padding-inline: 16px 38px; }

.live-select-search input:focus,
.live-select-filter select:focus,
.live-nvr-form input:focus,
.live-nvr-form select:focus {
  border-color: var(--ops-teal);
  box-shadow: 0 0 0 3px rgba(0, 143, 134, 0.12);
}

.live-select-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 28px;
  align-items: start;
}

.live-nvr-results { min-width: 0; }
.live-section-title { display: flex; align-items: baseline; gap: 18px; margin: 0 0 14px; }
.live-section-title h2,
.live-readiness h2 { color: var(--ops-ink); font-size: 1.12rem; font-weight: 650; }
.live-section-title span { color: var(--ops-muted); font-size: 0.78rem; }
.live-nvr-list { display: grid; gap: 12px; }

.live-nvr-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(250px, 1.2fr) minmax(210px, 0.9fr) minmax(170px, 0.7fr) auto;
  gap: 20px;
  align-items: center;
  min-height: 172px;
  border: 1px solid var(--ops-line);
  border-radius: 8px;
  padding: 22px;
  background: #fff;
}

.live-nvr-row[hidden] { display: none; }

.live-nvr-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.live-nvr-device {
  width: 58px;
  height: 46px;
  display: grid;
  flex: 0 0 58px;
  place-items: center;
  border: 1px solid #dce3ea;
  border-radius: 6px;
  background: #f5f7f9;
  color: #455c73;
}

.live-nvr-device svg { width: 42px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.live-nvr-identity > div { min-width: 0; }
.live-nvr-identity p { margin: 0 0 5px; color: var(--ops-teal); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; }
.live-nvr-identity h3 { margin: 0; color: var(--ops-ink); font-size: 1.35rem; font-weight: 650; }
.live-nvr-identity small { display: block; margin-top: 8px; color: var(--ops-muted); font-size: 0.72rem; }
.live-nvr-identity small b { display: block; margin-top: 2px; color: #334b65; font-size: 0.82rem; font-weight: 550; }

.live-location { display: flex; min-width: 0; align-items: center; gap: 5px; margin-top: 6px; overflow: hidden; color: #4f6178; font-size: 0.78rem; text-overflow: ellipsis; white-space: nowrap; }
.live-location svg { width: 15px; height: 15px; flex: 0 0 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.live-nvr-health {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 18px;
  border-left: 1px solid #e4e9ef;
  padding-left: 20px;
}

.live-status-chip { width: max-content; display: inline-flex; align-items: center; gap: 7px; border-radius: 5px; padding: 7px 10px; background: #e9f7ef; color: #18854e; font-size: 0.75rem; font-weight: 650; }
.live-status-chip i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.live-status-chip.down { background: #fff0f1; color: var(--ops-red); }
.live-camera-counts { display: flex; flex-wrap: wrap; gap: 16px; }
.live-camera-counts span { display: grid; gap: 3px; color: var(--ops-muted); font-size: 0.68rem; }
.live-camera-counts b { color: var(--ops-ink); font-size: 1.05rem; font-weight: 650; }
.live-camera-counts .online b { color: #18854e; }
.live-camera-counts .down b { color: var(--ops-red); }

.live-nvr-check { min-width: 0; display: grid; gap: 18px; border-left: 1px solid #e4e9ef; padding-left: 20px; }
.live-nvr-check > span { display: grid; gap: 3px; color: var(--ops-muted); font-size: 0.7rem; }
.live-nvr-check > span strong { color: #334b65; font-size: 0.8rem; font-weight: 550; }
.live-nvr-check > div { display: grid; gap: 8px; }
.live-nvr-check > div > span { display: flex; justify-content: space-between; gap: 10px; color: var(--ops-muted); font-size: 0.7rem; }
.live-nvr-check > div > span b { color: #18854e; font-weight: 650; }
.live-nvr-check > div > i { height: 6px; overflow: hidden; border-radius: 6px; background: #e4eaed; }
.live-nvr-check > div > i em { display: block; height: 100%; border-radius: inherit; background: var(--ops-teal); }

.live-nvr-actions { display: flex; align-items: center; gap: 8px; }
.live-open-button { white-space: nowrap; }
.live-more-button { width: 42px; height: 42px; display: grid; flex: 0 0 42px; place-items: center; border: 1px solid transparent; border-radius: 6px; color: #52657c; font-size: 1.45rem; text-decoration: none; }
.live-more-button:hover { border-color: var(--ops-line); background: #f6f8fa; }

.live-readiness {
  display: grid;
  align-content: start;
  border-left: 1px solid var(--ops-line);
  padding-left: 28px;
}

.live-readiness h2 { margin: 3px 0 18px; }
.live-readiness-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: start; min-height: 88px; padding: 17px 0; border-bottom: 1px solid var(--ops-line); }
.live-readiness-item:last-child { border-bottom: 0; }
.live-readiness-item svg { width: 25px; height: 25px; fill: none; stroke: #1f9d5a; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.live-readiness-item.warning svg { stroke: var(--ops-amber); }
.live-readiness-item span { min-width: 0; }
.live-readiness-item strong,
.live-readiness-item small { display: block; }
.live-readiness-item strong { color: var(--ops-ink); font-size: 0.86rem; font-weight: 650; }
.live-readiness-item small { margin-top: 6px; color: var(--ops-muted); font-size: 0.72rem; line-height: 1.45; }
.live-readiness-item > b { color: var(--ops-teal); font-size: 0.8rem; white-space: nowrap; }

.live-empty-state,
.live-filter-empty { border: 1px dashed #cfd8e3; border-radius: 8px; padding: 30px; background: #fff; color: var(--ops-muted); text-align: center; }
.live-empty-state { display: grid; gap: 6px; }
.live-empty-state strong { color: var(--ops-ink); }
.live-filter-empty { margin: 0; }

.live-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 79;
  min-height: 0;
  border-radius: 0;
  background: rgba(15, 31, 48, 0.25);
}

.live-drawer-backdrop:hover { filter: none; }

.live-nvr-drawer {
  position: fixed;
  z-index: 80;
  top: 0;
  right: 0;
  width: min(430px, 100vw);
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-left: 1px solid var(--ops-line);
  background: #fff;
  color: var(--ops-ink);
  box-shadow: -20px 0 48px rgba(21, 42, 60, 0.14);
  transform: translateX(102%);
  transition: transform 180ms ease;
}

.live-drawer-open .live-nvr-drawer { transform: translateX(0); }
.live-drawer-header { min-height: 72px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--ops-line); padding: 0 26px; }
.live-drawer-header h2 { color: var(--ops-ink); font-size: 1.15rem; font-weight: 650; }
.live-drawer-header button { width: 44px; height: 44px; min-height: 44px; display: grid; place-items: center; padding: 0; background: transparent; color: #41566f; }
.live-drawer-header button:hover { filter: none; background: #f3f6f8; }
.live-drawer-header svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.live-nvr-form { min-height: 0; display: grid; align-content: start; gap: 15px; overflow-y: auto; padding: 22px 26px 92px; }
.live-nvr-form label { gap: 7px; color: #4f6178; font-size: 0.78rem; font-weight: 650; }
.live-nvr-form [hidden] { display: none !important; }
.live-nvr-form input,
.live-nvr-form select { min-height: 44px; height: 44px; border: 1px solid #cfd8e3; border-radius: 6px; background: #fff; color: var(--ops-ink); box-shadow: none; }
.live-port-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.live-password-field { position: relative; display: block; }
.live-password-field input { padding-right: 48px; }
.live-password-field button { position: absolute; right: 2px; top: 2px; width: 40px; height: 40px; min-height: 40px; display: grid; place-items: center; padding: 0; background: transparent; color: #4f6178; }
.live-password-field button:hover { filter: none; background: #f4f7f9; }
.live-password-field svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.live-test-checkbox { grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 9px !important; font-weight: 500 !important; }
.live-test-checkbox input { width: 18px; height: 18px; min-height: 18px; accent-color: var(--ops-teal); }
.live-test-button,
.live-cancel-button { min-height: 42px; border: 1px solid var(--ops-teal); border-radius: 6px; background: #fff; color: #007d76; font-size: 0.82rem; font-weight: 650; }
.live-test-button:hover,
.live-cancel-button:hover { filter: none; background: #f0f8f7; }
.live-test-button:disabled,
.live-save-button:disabled { cursor: wait; opacity: 0.65; }
.live-test-result { border: 1px solid #bfe4d0; border-radius: 6px; padding: 11px 12px; background: #edf9f2; color: #167844; font-size: 0.78rem; line-height: 1.4; }
.live-test-result.error,
.live-form-error { border-color: #f0c7ca; background: #fff2f3; color: #b52c36; }
.live-form-error { margin: 0; border: 1px solid #f0c7ca; border-radius: 6px; padding: 11px 12px; font-size: 0.78rem; line-height: 1.4; }
.live-drawer-actions { position: fixed; right: 0; bottom: 0; width: min(430px, 100vw); display: grid; grid-template-columns: 1fr 1fr; gap: 12px; border-top: 1px solid var(--ops-line); padding: 14px 26px; background: #fff; }

@media (max-width: 1380px) {
  .live-select-shell { max-width: none; padding: 22px 24px 34px; }
  .live-nvr-row { grid-template-columns: minmax(230px, 1.2fr) minmax(190px, 0.9fr) minmax(150px, 0.7fr) auto; gap: 16px; padding: 18px; }
  .live-open-button { width: 42px; padding: 0; font-size: 0; }
  .live-open-button svg { width: 20px; height: 20px; }
  .live-select-content { grid-template-columns: minmax(0, 1fr) 275px; gap: 20px; }
}

@media (max-width: 1050px) {
  .live-select-toolbar { grid-template-columns: minmax(220px, 1fr) 220px 220px; }
  .live-select-content { grid-template-columns: 1fr; }
  .live-readiness { grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ops-line); border-left: 0; padding: 20px 0 0; }
  .live-readiness h2 { grid-column: 1 / -1; }
  .live-readiness-item { border-right: 1px solid var(--ops-line); border-bottom: 0; padding: 10px 18px 10px 0; }
  .live-readiness-item:last-child { border-right: 0; padding-left: 18px; }
}

@media (max-width: 820px) {
  .live-select-header { align-items: stretch; }
  .live-select-header-actions { flex-wrap: wrap; justify-content: flex-end; }
  .live-updated { width: 100%; order: 2; margin: 0; text-align: right; }
  .live-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .live-summary-metric:nth-child(2) { border-right: 0; }
  .live-summary-metric:nth-child(-n+2) { border-bottom: 1px solid var(--ops-line); }
  .live-select-toolbar { grid-template-columns: 1fr 1fr; }
  .live-select-search { grid-column: 1 / -1; }
  .live-nvr-row { grid-template-columns: minmax(0, 1fr) auto; }
  .live-nvr-health,
  .live-nvr-check { border-left: 0; border-top: 1px solid #e4e9ef; padding: 16px 0 0; }
  .live-nvr-actions { justify-content: flex-end; }
}

@media (max-width: 620px) {
  .live-select-shell { gap: 16px; padding: 18px 14px 28px; }
  .live-select-header { display: grid; }
  .live-select-header h1 { font-size: 1.7rem; }
  .live-select-header-actions { justify-content: flex-start; }
  .live-updated { width: auto; order: 0; margin-left: auto; text-align: left; }
  .live-summary-metric { min-height: 88px; padding: 15px 52px 15px 16px; }
  .live-summary-metric > strong { font-size: 1.55rem; }
  .live-summary-metric svg { right: 16px; width: 25px; height: 25px; }
  .live-select-toolbar { grid-template-columns: 1fr; }
  .live-select-search { grid-column: auto; }
  .live-nvr-row { grid-template-columns: 1fr; gap: 14px; }
  .live-nvr-actions { justify-content: stretch; }
  .live-open-button { width: auto; flex: 1; padding: 0 14px; font-size: 0.82rem; }
  .live-readiness { grid-template-columns: 1fr; }
  .live-readiness-item,
  .live-readiness-item:last-child { border-right: 0; border-bottom: 1px solid var(--ops-line); padding: 14px 0; }
  .live-port-fields { grid-template-columns: 1fr 1fr; }
}

/* Camera onboarding */
.camera-add-link,
.camera-back-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #008f86;
  border-radius: 6px;
  padding: 0 15px;
  background: #008f86;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 650;
  text-decoration: none;
}
.camera-add-link span { font-size: 1.2rem; font-weight: 400; line-height: 1; }
.camera-add-link:hover,
.camera-add-link:focus-visible { background: #007d76; color: #fff; }
.camera-back-link { border-color: #b9c7d4; background: #fff; color: #304860; }
.camera-back-link:hover,
.camera-back-link:focus-visible { border-color: #008f86; background: #eef8f7; color: #007d76; }
.camera-add-body { background: #f4f6f8; color: #142a43; }
.camera-add-shell { min-width: 0; display: grid; align-content: start; gap: 22px; padding: 24px 30px 42px; }
.camera-add-header { min-height: 80px; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-right: 56px; }
.camera-add-header h1 { margin: 4px 0 6px; color: #112943; font-size: 2rem; font-weight: 650; }
.camera-add-header > div > p:last-child { margin: 0; color: #60738a; font-size: 0.84rem; }
.camera-add-layout { display: grid; grid-template-columns: minmax(260px, 330px) minmax(520px, 760px); gap: 18px; align-items: start; }
.camera-nvr-picker,
.camera-add-form-panel { border: 1px solid #d8e0e8; border-radius: 8px; background: #fff; }
.camera-nvr-picker { display: grid; gap: 20px; padding: 22px; }
.camera-nvr-picker h2,
.camera-add-form-panel h2 { margin: 4px 0 0; color: #152c46; font-size: 1.05rem; font-weight: 650; }
.camera-nvr-picker > div > p:last-child { margin: 8px 0 0; color: #60738a; font-size: 0.72rem; line-height: 1.5; }
.camera-nvr-picker form { display: grid; gap: 10px; }
.camera-nvr-picker label { display: grid; gap: 7px; color: #455c74; font-size: 0.72rem; font-weight: 600; }
.camera-nvr-picker select { width: 100%; min-height: 44px; border: 1px solid #cbd6e0; border-radius: 6px; background: #fff; color: #18314b; }
.camera-nvr-picker button { min-height: 42px; border: 1px solid #008f86; border-radius: 6px; background: #fff; color: #007d76; font-size: 0.76rem; font-weight: 650; }
.camera-nvr-picker button:hover { background: #eef8f7; }
.camera-selected-nvr { margin: 0; border-top: 1px solid #e1e7ed; padding-top: 10px; }
.camera-selected-nvr > div { min-height: 42px; display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 12px; align-items: center; }
.camera-selected-nvr dt { color: #6a7c91; font-size: 0.68rem; }
.camera-selected-nvr dd { margin: 0; overflow: hidden; color: #203a54; font-size: 0.72rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.camera-add-panel-heading { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #dfe6ec; padding: 15px 22px; }
.camera-add-panel-heading > span { border-radius: 999px; padding: 6px 9px; background: #eaf7f5; color: #007d76; font-size: 0.65rem; font-weight: 650; }
.camera-add-form-panel .error-message { margin: 18px 22px 0; }
.camera-add-form-panel .compact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 22px; }
.camera-add-form-panel .compact-form label { min-width: 0; color: #455c74; font-size: 0.72rem; font-weight: 600; }
.camera-add-form-panel .compact-form label:nth-of-type(4),
.camera-add-form-panel .compact-form label:nth-of-type(5) { grid-column: 1 / -1; }
.camera-add-form-panel .compact-form input,
.camera-add-form-panel .compact-form select { width: 100%; min-height: 44px; border-color: #cbd6e0; border-radius: 6px; background: #fff; color: #17314b; }
.camera-add-form-panel .compact-form > button { grid-column: 1 / -1; min-height: 44px; border-radius: 6px; background: #008f86; font-size: 0.78rem; }
.camera-add-empty { margin: 0; padding: 22px; color: #60738a; font-size: 0.76rem; }

@media (max-width: 980px) {
  .camera-add-layout { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .camera-add-shell { gap: 16px; padding: 18px 12px 30px; }
  .camera-add-header { display: grid; padding-right: 0; }
  .camera-add-header h1 { font-size: 1.7rem; }
  .camera-back-link { width: max-content; }
  .camera-add-form-panel .compact-form { grid-template-columns: 1fr; padding: 16px; }
  .camera-add-form-panel .compact-form label,
  .camera-add-form-panel .compact-form label:nth-of-type(4),
  .camera-add-form-panel .compact-form label:nth-of-type(5),
  .camera-add-form-panel .compact-form > button { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .live-nvr-drawer { transition: none; }
}

/* NVR fleet management workspace. */
.nvr-management-body {
  overflow-x: hidden;
  background: var(--ops-bg);
}

.nvr-management-shell {
  width: 100%;
  max-width: 1680px;
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 20px;
  margin: 0 auto;
  padding: 28px 30px 40px;
  color: var(--ops-ink);
}

.nvr-management-header {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-right: 58px;
}

.nvr-management-header .eyebrow { margin: 0 0 6px; color: var(--ops-teal); }
.nvr-management-header h1 { margin: 0; color: var(--ops-ink); font-size: 2.15rem; font-weight: 650; line-height: 1.08; }
.nvr-management-header p:last-child { margin: 8px 0 0; color: var(--ops-muted); font-size: 0.9rem; }
.nvr-management-header-actions { display: flex; align-items: center; gap: 14px; }
.nvr-management-header-actions > span { color: var(--ops-muted); font-size: 0.78rem; white-space: nowrap; }

.nvr-primary-button,
.nvr-secondary-button,
.nvr-live-action {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--ops-teal);
  border-radius: 6px;
  padding: 0 15px;
  background: var(--ops-teal);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.nvr-primary-button:hover,
.nvr-primary-button:focus-visible,
.nvr-live-action:hover,
.nvr-live-action:focus-visible { background: #007d76; color: #fff; filter: none; }
.nvr-primary-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }

.nvr-management-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--ops-line);
  border-radius: 8px;
  background: #fff;
}

.nvr-management-metric {
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 8px;
  border-right: 1px solid var(--ops-line);
  padding: 18px 24px;
}

.nvr-management-metric:last-child { border-right: 0; }
.nvr-management-metric span { color: var(--ops-muted); font-size: 0.78rem; }
.nvr-management-metric strong { color: var(--ops-ink); font-size: 1.8rem; font-weight: 650; line-height: 1; font-variant-numeric: tabular-nums; }
.nvr-management-metric.good strong { color: var(--ops-teal); }
.nvr-management-metric.danger strong { color: var(--ops-red); }
.nvr-management-metric.warning strong { color: #b97400; }

.nvr-management-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(150px, 210px) minmax(140px, 180px) minmax(140px, 180px) 42px;
  gap: 12px;
  align-items: end;
}

.nvr-management-toolbar label { position: relative; min-width: 0; display: grid; }
.nvr-management-toolbar label > span:not(.sr-only) { position: absolute; z-index: 2; top: -7px; left: 12px; padding: 0 5px; background: var(--ops-bg); color: #53677f; font-size: 0.67rem; }
.nvr-management-toolbar input,
.nvr-management-toolbar select { width: 100%; height: 44px; min-height: 44px; border: 1px solid #cfd8e3; border-radius: 6px; background: #fff; color: var(--ops-ink); box-shadow: none; font-size: 0.78rem; }
.nvr-management-toolbar select { padding-inline: 13px 34px; }
.nvr-management-search svg { position: absolute; z-index: 1; top: 50%; left: 13px; width: 19px; height: 19px; fill: none; stroke: #52667d; stroke-width: 1.8; stroke-linecap: round; transform: translateY(-50%); }
.nvr-management-search input { padding-left: 42px; }
.nvr-management-toolbar input:focus,
.nvr-management-toolbar select:focus { border-color: var(--ops-teal); box-shadow: 0 0 0 3px rgba(0, 143, 134, 0.12); }

.nvr-refresh-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid #cfd8e3;
  border-radius: 6px;
  background: #fff;
  color: #41566f;
}
.nvr-refresh-button:hover,
.nvr-refresh-button:focus-visible { border-color: #9bcfc9; color: var(--ops-teal); }
.nvr-refresh-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.nvr-management-workspace {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(760px, 1fr) 320px;
  overflow: visible;
  border: 1px solid var(--ops-line);
  border-radius: 8px;
  background: #fff;
}

.nvr-table-panel { min-width: 0; }
.nvr-table-heading { min-height: 61px; display: flex; align-items: center; border-bottom: 1px solid var(--ops-line); padding: 0 16px; }
.nvr-table-heading > div { display: flex; align-items: baseline; gap: 12px; }
.nvr-table-heading h2 { margin: 0; color: var(--ops-ink); font-size: 0.95rem; font-weight: 650; }
.nvr-table-heading span { color: var(--ops-muted); font-size: 0.7rem; }
.nvr-management-table { min-width: 0; overflow-x: auto; }
.nvr-management-table-head,
.nvr-management-row { min-width: 1050px; display: grid; grid-template-columns: minmax(150px, 1.2fr) minmax(150px, 1fr) 110px 92px minmax(145px, 1fr) minmax(140px, 0.95fr) 118px; gap: 12px; align-items: center; }
.nvr-management-table-head { min-height: 40px; border-bottom: 1px solid var(--ops-line); padding: 0 12px; background: #f7f9fb; color: #52657c; font-size: 0.64rem; font-weight: 700; text-transform: uppercase; }
.nvr-management-row { position: relative; min-height: 74px; border-bottom: 1px solid #e5eaf0; padding: 10px 12px; cursor: pointer; transition: background-color 120ms ease; }
.nvr-management-row:last-child { border-bottom: 0; }
.nvr-management-row:hover { background: #f8fbfb; }
.nvr-management-row:focus-visible { z-index: 1; outline: 2px solid var(--ops-teal); outline-offset: -2px; }
.nvr-management-row.is-selected { background: #eef8f7; box-shadow: inset 3px 0 0 var(--ops-teal); }
.nvr-management-row[hidden] { display: none; }
.nvr-management-row > div { min-width: 0; display: grid; gap: 5px; }
.nvr-management-row > div > strong,
.nvr-management-row > div > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nvr-management-row > div > strong { color: #172d47; font-size: 0.75rem; font-weight: 600; }
.nvr-management-row > div > span { color: var(--ops-muted); font-size: 0.66rem; }
.nvr-row-identity > strong { font-size: 0.82rem !important; }
.nvr-tabular { font-variant-numeric: tabular-nums; }
.nvr-success-text { color: #14804a !important; }
.nvr-danger-text { color: var(--ops-red) !important; }

.nvr-plain-status { display: inline-flex !important; width: max-content; align-items: center; gap: 7px; color: #16834b !important; font-size: 0.7rem !important; font-weight: 600; }
.nvr-plain-status i { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: currentColor; }
.nvr-plain-status.warning { color: #b97400 !important; }
.nvr-plain-status.maintenance { color: #b97400 !important; }
.nvr-plain-status.down { color: var(--ops-red) !important; }
.nvr-storage-cell strong { color: #53677f !important; font-weight: 550 !important; }
.nvr-storage-cell.is-warning strong { color: var(--ops-red) !important; }
.nvr-storage-usage { display: grid; grid-template-columns: minmax(54px, 1fr) 34px; gap: 8px; align-items: center; }
.nvr-storage-usage > i { height: 6px; overflow: hidden; border-radius: 4px; background: #e1e7ea; }
.nvr-storage-usage > i > em { display: block; height: 100%; border-radius: inherit; background: #2b9c61; }
.nvr-storage-usage > strong { color: #334b65 !important; font-size: 0.68rem !important; font-variant-numeric: tabular-nums; }
.nvr-storage-usage.warning > i > em { background: #e89b18; }
.nvr-storage-usage.warning > strong { color: #a56500 !important; }
.nvr-storage-usage.danger > i > em { background: var(--ops-red); }
.nvr-storage-usage.danger > strong { color: var(--ops-red) !important; }

.nvr-management-actions { position: relative; display: flex !important; grid-template-columns: 1fr 36px; gap: 6px !important; align-items: center; overflow: visible !important; }
.nvr-live-action { min-height: 36px; padding: 0 10px; font-size: 0.7rem; }
.nvr-live-action.is-disabled { border-color: #cfd7df; background: #f0f3f5; color: #6b7d90; }
.nvr-live-action.is-disabled:hover { background: #e7ecef; color: #445a70; }
.nvr-more-action { width: 36px; height: 36px; min-height: 36px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 6px; padding: 0; background: transparent; color: #4a6077; }
.nvr-more-action:hover,
.nvr-more-action:focus-visible { border-color: #cfd8e3; background: #fff; filter: none; }
.nvr-more-action svg { width: 18px; height: 18px; fill: currentColor; }
.nvr-row-menu { position: absolute; z-index: 20; top: 40px; right: 0; width: 164px; display: grid; overflow: hidden; border: 1px solid #d3dce5; border-radius: 6px; padding: 5px; background: #fff; box-shadow: 0 10px 28px rgba(20, 43, 62, 0.16); }
.nvr-row-menu[hidden] { display: none; }
.nvr-row-menu a,
.nvr-row-menu button { width: 100%; min-height: 36px; display: flex; align-items: center; border: 0; border-radius: 4px; padding: 0 10px; background: transparent; color: #263e58; font-size: 0.72rem; font-weight: 500; text-align: left; text-decoration: none; }
.nvr-row-menu a:hover,
.nvr-row-menu button:hover { background: #f2f6f7; filter: none; }
.nvr-row-menu form:last-child button { color: var(--ops-red); }

.nvr-table-footer { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--ops-line); padding: 0 16px; }
.nvr-table-footer > span { color: var(--ops-muted); font-size: 0.7rem; }
.nvr-pagination { display: flex; gap: 5px; }
.nvr-pagination button { width: 34px; height: 34px; min-height: 34px; border: 1px solid #d4dde5; border-radius: 6px; padding: 0; background: #fff; color: #354b63; font-size: 0.72rem; }
.nvr-pagination button:hover:not(:disabled),
.nvr-pagination button.active { border-color: var(--ops-teal); background: #edf8f7; color: #007d76; filter: none; }
.nvr-pagination button:disabled { cursor: default; opacity: 0.4; }

.nvr-detail-panel { min-width: 0; display: grid; align-content: start; border-left: 1px solid var(--ops-line); background: #fbfcfd; }
.nvr-detail-panel[hidden] { display: none; }
.nvr-detail-header { min-height: 74px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--ops-line); padding: 17px 18px; background: #fff; }
.nvr-detail-header > div { min-width: 0; display: grid; gap: 7px; }
.nvr-detail-header h2 { margin: 0; overflow: hidden; color: var(--ops-ink); font-size: 1.14rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.nvr-detail-header button { width: 40px; height: 40px; min-height: 40px; display: grid; flex: 0 0 40px; place-items: center; border: 0; border-radius: 6px; padding: 0; background: transparent; color: #425870; }
.nvr-detail-header button:hover { background: #f0f4f6; filter: none; }
.nvr-detail-header svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.nvr-detail-location { display: grid; gap: 5px; border-bottom: 1px solid var(--ops-line); padding: 18px; }
.nvr-detail-location span,
.nvr-detail-storage > span { color: var(--ops-muted); font-size: 0.68rem; }
.nvr-detail-location strong { color: #263e58; font-size: 0.78rem; font-weight: 600; }
.nvr-detail-location small { overflow-wrap: anywhere; color: var(--ops-muted); font-size: 0.66rem; line-height: 1.45; }
.nvr-detail-facts { margin: 0; border-bottom: 1px solid var(--ops-line); padding: 8px 18px; }
.nvr-detail-facts > div { min-height: 43px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.nvr-detail-facts dt { color: var(--ops-muted); font-size: 0.69rem; }
.nvr-detail-facts dd { margin: 0; color: #263e58; font-size: 0.69rem; font-weight: 550; text-align: right; }
.nvr-detail-facts dd b { color: #14804a; font-weight: 600; }
.nvr-detail-facts dd em { color: var(--ops-red); font-style: normal; }
.nvr-detail-storage { display: grid; gap: 12px; border-bottom: 1px solid var(--ops-line); padding: 18px; }
.nvr-storage-unavailable { display: grid; grid-template-columns: 38px minmax(0, 1fr); column-gap: 11px; align-items: center; border: 1px dashed #c9d5df; border-radius: 6px; padding: 13px; background: #fff; }
.nvr-storage-unavailable[hidden] { display: none; }
.nvr-storage-unavailable svg { grid-row: 1 / 3; width: 34px; height: 34px; fill: none; stroke: #60758b; stroke-width: 1.5; }
.nvr-storage-unavailable strong { color: #334b65; font-size: 0.72rem; font-weight: 600; }
.nvr-storage-unavailable small { color: var(--ops-muted); font-size: 0.64rem; line-height: 1.4; }
.nvr-storage-reported { display: grid; gap: 10px; border: 1px solid #cfe2df; border-radius: 6px; padding: 13px; background: #fff; }
.nvr-storage-reported[hidden] { display: none; }
.nvr-storage-reported > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.nvr-storage-reported strong { color: #17314a; font-size: 0.78rem; font-weight: 650; }
.nvr-storage-reported span,
.nvr-storage-reported small { color: var(--ops-muted); font-size: 0.64rem; }
.nvr-storage-meter { height: 7px; overflow: hidden; border-radius: 4px; background: #e5ecef; }
.nvr-storage-meter i { display: block; height: 100%; border-radius: inherit; background: var(--ops-teal); }
.nvr-storage-reported.is-warning { border-color: #f2c1c5; background: #fffafb; }
.nvr-storage-reported.is-warning strong,
.nvr-storage-reported.is-warning small { color: var(--ops-red); }
.nvr-storage-reported.is-warning .nvr-storage-meter i { background: var(--ops-red); }
.nvr-detail-actions { display: grid; gap: 9px; padding: 18px; }
.nvr-secondary-button { border-color: var(--ops-teal); background: #fff; color: #007d76; }
.nvr-secondary-button:hover,
.nvr-secondary-button:focus-visible { background: #eef8f7; color: #006f69; }
.nvr-detail-empty,
.nvr-management-empty { display: grid; gap: 6px; padding: 30px; color: var(--ops-muted); font-size: 0.76rem; text-align: center; }
.nvr-detail-empty strong,
.nvr-management-empty strong { color: var(--ops-ink); font-size: 0.86rem; }
.nvr-filter-empty { margin: 0; border-top: 1px solid var(--ops-line); }
.nvr-filter-empty[hidden] { display: none; }

@media (max-width: 1380px) {
  .nvr-management-shell { padding: 22px 22px 34px; }
  .nvr-management-workspace { grid-template-columns: 1fr; }
  .nvr-detail-panel { border-top: 1px solid var(--ops-line); border-left: 0; }
  .nvr-detail-facts { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
  .nvr-detail-storage { grid-template-columns: 150px minmax(0, 1fr); align-items: center; }
  .nvr-detail-actions { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1080px) {
  .nvr-management-toolbar { grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(130px, 1fr)) 42px; }
}

@media (max-width: 820px) {
  .nvr-management-header { padding-right: 0; }
  .nvr-management-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nvr-management-metric { border-bottom: 1px solid var(--ops-line); }
  .nvr-management-metric:nth-child(2n) { border-right: 0; }
  .nvr-management-metric:last-child { grid-column: 1 / -1; border-bottom: 0; }
  .nvr-management-toolbar { grid-template-columns: 1fr 1fr; }
  .nvr-management-search { grid-column: 1 / -1; }
  .nvr-refresh-button { justify-self: end; }
}

@media (max-width: 620px) {
  .nvr-management-shell { gap: 16px; padding: 18px 12px 28px; }
  .nvr-management-header { display: grid; }
  .nvr-management-header h1 { font-size: 1.7rem; }
  .nvr-management-header-actions { justify-content: space-between; }
  .nvr-management-metric { min-height: 78px; padding: 14px; }
  .nvr-management-metric strong { font-size: 1.45rem; }
  .nvr-management-toolbar { grid-template-columns: 1fr; }
  .nvr-management-search { grid-column: auto; }
  .nvr-refresh-button { justify-self: start; }
  .nvr-table-heading { padding: 0 12px; }
  .nvr-table-footer { align-items: flex-start; flex-direction: column; padding: 14px 12px; }
  .nvr-detail-facts { grid-template-columns: 1fr; }
  .nvr-detail-storage { grid-template-columns: 1fr; }
  .nvr-detail-actions { grid-template-columns: 1fr; }
}

/* Camera management workspace */
.camera-management-body { background: var(--ops-bg); color: var(--ops-ink); }
.camera-management-shell { min-width: 0; display: grid; align-content: start; gap: 18px; padding: 26px 28px 40px; overflow: hidden; }
.camera-management-header { display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.camera-management-header .eyebrow { margin: 0 0 5px; color: var(--ops-teal); }
.camera-management-header h1 { margin: 0; color: var(--ops-ink); font-size: 2.15rem; font-weight: 650; line-height: 1.08; }
.camera-management-header p:last-child { margin: 7px 0 0; color: var(--ops-muted); font-size: .82rem; }
.camera-management-header-actions { display: flex; align-items: center; gap: 14px; }
.camera-management-header-actions > span { color: var(--ops-muted); font-size: .72rem; white-space: nowrap; }
.camera-add-link { height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 0 15px; border-radius: 6px; background: var(--ops-teal); color: #fff; font-size: .76rem; font-weight: 650; text-decoration: none; }
.camera-add-link span { font-size: 1.25rem; font-weight: 400; line-height: 1; }
.camera-add-link:hover { background: #007d75; }

.camera-management-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--ops-line); border-radius: 7px; background: #fff; }
.camera-management-summary .nvr-management-metric { min-height: 88px; }
.camera-management-toolbar { display: grid; grid-template-columns: minmax(230px, 1.45fr) repeat(3, minmax(125px, .75fr)) 42px; gap: 10px; align-items: center; }
.camera-management-toolbar label { position: relative; min-width: 0; display: grid; }
.camera-management-toolbar label > span:not(.sr-only) { position: absolute; z-index: 2; top: -7px; left: 12px; padding: 0 5px; background: var(--ops-bg); color: #53677f; font-size: .65rem; }
.camera-management-toolbar input,
.camera-management-toolbar select { width: 100%; height: 42px; min-height: 42px; border: 1px solid #cfd8e3; border-radius: 6px; background: #fff; color: var(--ops-ink); box-shadow: none; font-size: .75rem; }
.camera-management-toolbar select { padding-inline: 12px 32px; }
.camera-management-search svg { position: absolute; z-index: 1; top: 50%; left: 13px; width: 18px; height: 18px; fill: none; stroke: #52667d; stroke-width: 1.8; stroke-linecap: round; transform: translateY(-50%); }
.camera-management-search input { padding-left: 40px; }
.camera-management-toolbar input:focus,
.camera-management-toolbar select:focus { border-color: var(--ops-teal); box-shadow: 0 0 0 3px rgba(0,143,134,.12); }

.camera-management-workspace { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 14px; align-items: start; }
.camera-table-panel,
.camera-detail-panel { min-width: 0; border: 1px solid var(--ops-line); border-radius: 7px; background: #fff; }
.camera-table-heading { min-height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--ops-line); }
.camera-table-heading h2 { margin: 0; color: var(--ops-ink); font-size: .9rem; font-weight: 650; }
.camera-table-heading span { display: block; margin-top: 3px; color: var(--ops-muted); font-size: .66rem; }
.camera-management-table { min-width: 0; overflow-x: auto; }
.camera-management-table-head,
.camera-management-row { min-width: 730px; display: grid; grid-template-columns: minmax(130px,1.25fr) minmax(86px,.8fr) minmax(88px,.75fr) 70px minmax(92px,.9fr) minmax(78px,.72fr) 66px; gap: 8px; align-items: center; }
.camera-management-table-head { min-height: 38px; padding: 0 12px; border-bottom: 1px solid var(--ops-line); background: #f7f9fb; color: #52657c; font-size: .6rem; font-weight: 700; text-transform: uppercase; }
.camera-management-row { position: relative; min-height: 68px; padding: 8px 12px; border-bottom: 1px solid #e5eaf0; cursor: pointer; transition: background-color 120ms ease; }
.camera-management-row:last-child { border-bottom: 0; }
.camera-management-row:hover { background: #f8fbfb; }
.camera-management-row:focus-visible { z-index: 1; outline: 2px solid var(--ops-teal); outline-offset: -2px; }
.camera-management-row.is-selected { background: #eef8f7; box-shadow: inset 3px 0 0 var(--ops-teal); }
.camera-management-row[hidden] { display: none; }
.camera-management-row > div { min-width: 0; display: grid; gap: 4px; }
.camera-management-row > div > strong,
.camera-management-row > div > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.camera-management-row > div > strong { color: #172d47; font-size: .72rem; font-weight: 650; }
.camera-management-row > div > span { color: var(--ops-muted); font-size: .64rem; }
.camera-row-identity { grid-template-columns: 34px minmax(0,1fr); align-items: center; }
.camera-row-identity > span:last-child { min-width: 0; display: grid; gap: 4px; }
.camera-row-identity strong,
.camera-row-identity small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.camera-row-identity strong { color: #172d47; font-size: .72rem; }
.camera-row-identity small { color: var(--ops-muted); font-size: .63rem; }
.camera-device-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 5px; background: #eaf6f5; color: var(--ops-teal); }
.camera-device-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.camera-stream-health i { width: 72px; height: 4px; overflow: hidden; border-radius: 4px; background: #e2e8ed; }
.camera-stream-health em { height: 100%; display: block; border-radius: inherit; background: #1aa46f; }
.camera-ai-labels { display: flex !important; flex-wrap: wrap; gap: 4px !important; }
.camera-ai-labels > span { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; border-radius: 4px; background: #eef6f5; color: #216b65 !important; font-size: .57rem !important; }
.camera-ai-labels > span i { width: 4px; height: 4px; border-radius: 50%; background: #16a085; }
.camera-ai-labels small { color: var(--ops-muted); font-size: .62rem; }
.camera-management-actions { position: relative; display: flex !important; grid-template-columns: 32px 32px; gap: 5px !important; align-items: center; overflow: visible !important; }
.camera-preview-action,
.camera-more-action { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid #d7e0e8; border-radius: 5px; background: #fff; color: #4d6279; }
.camera-preview-action svg,
.camera-more-action svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.camera-more-action svg { fill: currentColor; stroke: none; }
.camera-preview-action:hover,
.camera-more-action:hover { border-color: var(--ops-teal); color: var(--ops-teal); }
.camera-table-footer { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px; border-top: 1px solid var(--ops-line); color: var(--ops-muted); font-size: .66rem; }
.camera-filter-empty { margin: 0; }
.camera-filter-empty[hidden] { display: none; }

.camera-detail-panel { position: sticky; top: 18px; overflow: hidden; }
.camera-detail-panel.is-closed { display: none; }
.camera-detail-header { min-height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--ops-line); }
.camera-detail-header > div { min-width: 0; display: grid; gap: 5px; }
.camera-detail-header h2 { margin: 0; overflow: hidden; color: var(--ops-ink); font-size: .85rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.camera-detail-header button { width: 30px; height: 30px; display: grid; place-items: center; border: 0; background: transparent; color: #65788e; }
.camera-detail-header button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.camera-preview-frame { position: relative; width: calc(100% - 28px); aspect-ratio: 16 / 9; margin: 14px; overflow: hidden; border: 1px solid #d8e1e8; border-radius: 5px; background: #0d1d22; }
.camera-preview-frame video { width: 100%; height: 100%; display: block; object-fit: cover; background: #071216; }
.camera-preview-frame video[hidden] { display: none; }
.camera-preview-fallback { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 5px; padding: 14px; background: #eff4f5; color: #607387; text-align: center; }
.camera-preview-fallback[hidden] { display: none; }
.camera-preview-fallback svg { width: 26px; height: 26px; fill: none; stroke: #6c8193; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.camera-preview-fallback strong { color: #344b61; font-size: .72rem; }
.camera-preview-fallback span { font-size: .62rem; }
.camera-preview-fallback.is-loading svg { animation: camera-preview-pulse 1.1s ease-in-out infinite; }
@keyframes camera-preview-pulse { 50% { opacity: .35; } }
.camera-detail-quickfacts { display: grid; gap: 8px; padding: 0 14px 12px; border-bottom: 1px solid #e3e9ee; }
.camera-detail-quickfacts > div { min-width: 0; display: flex; align-items: center; gap: 8px; color: #52677c; font-size: .67rem; }
.camera-detail-quickfacts svg { width: 15px; height: 15px; flex: 0 0 auto; fill: none; stroke: #52677c; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.camera-detail-quickfacts span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.camera-ai-summary[hidden] { display: none; }
.camera-ai-controls { display: grid; gap: 0; margin: 12px 14px 0; border: 1px solid #dce4ea; border-radius: 6px; }
.camera-ai-controls[hidden] { display: none; }
.camera-ai-controls label { min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 11px; border-bottom: 1px solid #e8edf1; color: #344b61; font-size: .67rem; }
.camera-ai-controls label:last-of-type { border-bottom: 0; }
.camera-ai-controls input[role="switch"] { width: 30px !important; min-width: 30px; height: 17px !important; min-height: 17px !important; appearance: none; position: relative; flex: 0 0 30px; border: 0; border-radius: 10px; padding: 0 !important; background: #c9d2db; box-shadow: none; cursor: pointer; }
.camera-ai-controls input[role="switch"]::after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform 120ms ease; }
.camera-ai-controls input[role="switch"]:checked { background: var(--ops-teal); }
.camera-ai-controls input[role="switch"]:checked::after { transform: translateX(13px); }
.camera-ai-controls small { min-height: 18px; padding: 3px 10px; color: var(--ops-teal); font-size: .6rem; text-align: right; }
.camera-detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 14px; }

@media (max-width: 1050px) {
  .camera-management-workspace { grid-template-columns: minmax(0,1fr); }
  .camera-detail-panel { position: static; display: grid; grid-template-columns: minmax(260px,.8fr) minmax(280px,1fr); align-items: start; }
  .camera-detail-header { grid-column: 1 / -1; }
  .camera-preview-frame { grid-row: 2 / span 3; }
  .camera-detail-quickfacts { padding-top: 8px; }
  .camera-detail-actions { grid-column: 2; }
}

@media (max-width: 900px) {
  .camera-management-shell { padding: 22px 20px 34px; }
  .camera-management-summary { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .camera-management-summary .nvr-management-metric:nth-child(3) { border-right: 0; }
  .camera-management-summary .nvr-management-metric:nth-child(-n+3) { border-bottom: 1px solid var(--ops-line); }
  .camera-management-toolbar { grid-template-columns: minmax(220px,1fr) repeat(2,minmax(120px,.65fr)); }
  .camera-management-toolbar .nvr-refresh-button { grid-column: 3; }
}

@media (max-width: 680px) {
  .camera-management-shell { gap: 14px; padding: 17px 11px 28px; }
  .camera-management-header { display: grid; align-items: start; }
  .camera-management-header h1 { font-size: 1.7rem; }
  .camera-management-header-actions { justify-content: space-between; }
  .camera-management-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .camera-management-summary .nvr-management-metric { min-height: 74px; border-right: 1px solid var(--ops-line); border-bottom: 1px solid var(--ops-line); padding: 13px; }
  .camera-management-summary .nvr-management-metric:nth-child(2n) { border-right: 0; }
  .camera-management-summary .nvr-management-metric:last-child { grid-column: 1 / -1; border-bottom: 0; }
  .camera-management-toolbar { grid-template-columns: 1fr 1fr; }
  .camera-management-search { grid-column: 1 / -1; }
  .camera-management-toolbar .nvr-refresh-button { grid-column: auto; }
  .camera-detail-panel { display: block; }
  .camera-detail-quickfacts { padding-top: 0; }
  .camera-detail-actions { grid-column: auto; }
}

/* Camera workflows */
.camera-events-scrim { position: fixed; inset: 0; z-index: 89; background: rgba(11, 24, 35, .24); }
.camera-events-drawer { position: fixed; z-index: 90; top: 0; right: 0; bottom: 0; width: min(390px, 100vw); display: grid; grid-template-rows: auto auto auto minmax(0, 1fr) auto; background: #fff; border-left: 1px solid #d8e1e8; box-shadow: -16px 0 36px rgba(26, 45, 63, .14); transform: translateX(102%); transition: transform 180ms ease; color: #142b44; }
.camera-events-drawer.is-open { transform: translateX(0); }
.camera-events-drawer > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 20px 16px; border-bottom: 1px solid #e3e9ee; }
.camera-events-drawer h2, .camera-events-page-shell h1 { margin: 0; color: #102641; letter-spacing: 0; }
.camera-events-drawer header p { margin: 4px 0 0; color: #61758c; font-size: .78rem; }
.camera-events-drawer header button { width: 34px; min-width: 34px; height: 34px; min-height: 34px; padding: 8px; border: 1px solid #dbe3ea; border-radius: 6px; background: #fff; color: #445b72; }
.camera-events-drawer svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; }
.camera-events-tabs { display: flex; gap: 3px; padding: 10px 14px; overflow-x: auto; border-bottom: 1px solid #e5ebf0; }
.camera-events-tabs button { flex: 0 0 auto; min-height: 32px; padding: 6px 10px; border: 0; border-radius: 5px; background: transparent; color: #65788d; font-size: .72rem; }
.camera-events-tabs button.active { background: #e6f6f3; color: #087f79; font-weight: 700; }
.camera-events-tools { display: grid; grid-template-columns: 126px 1fr; gap: 8px; padding: 12px 14px; }
.camera-events-tools input, .camera-events-page-tools input { width: 100%; min-height: 36px; padding: 8px 10px; border: 1px solid #d6e0e8; border-radius: 6px; background: #fff; color: #213b55; }
.camera-events-list { overflow-y: auto; padding: 0 14px 14px; }
.camera-events-list article, .camera-recent-events article, .camera-events-page-list article { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 11px; align-items: center; padding: 11px 0; border-bottom: 1px solid #e8edf1; }
.camera-events-list img, .camera-recent-events img, .camera-events-page-list img, .camera-event-placeholder { width: 72px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 5px; background: #e8eef1; }
.camera-events-list img, .camera-recent-events img, .camera-events-page-list img { cursor: zoom-in; }
.camera-events-list img:focus-visible, .camera-recent-events img:focus-visible, .camera-events-page-list img:focus-visible { outline: 2px solid #0a958b; outline-offset: 2px; }
.camera-event-placeholder::after { content: ""; display: block; width: 20px; height: 14px; margin: 15px auto 0; border: 1.5px solid #8fa0af; border-radius: 2px; }
.camera-events-list strong, .camera-recent-events strong, .camera-events-page-list strong { display: block; color: #172e47; font-size: .77rem; }
.camera-events-list time, .camera-recent-events time, .camera-events-page-list time { display: block; margin-top: 4px; color: #718398; font-size: .68rem; }
.camera-events-empty { padding: 34px 12px; color: #6b7f93; text-align: center; font-size: .78rem; }
.camera-events-drawer > footer { padding: 13px 14px; border-top: 1px solid #e2e9ee; }
.camera-events-export { display: block; min-height: 38px; padding: 10px 14px; border: 1px solid #0b948b; border-radius: 6px; color: #087f79; text-align: center; font-size: .76rem; font-weight: 700; }

.camera-settings-shell, .camera-events-page-shell { min-width: 0; padding: 25px 28px 42px; background: #f4f7f9; color: #18324c; }
.camera-settings-header, .camera-events-page-shell > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.camera-settings-header nav, .camera-events-page-shell header nav { display: flex; gap: 7px; margin-bottom: 6px; color: #718398; font-size: .7rem; }
.camera-settings-header nav a, .camera-events-page-shell header a { color: #087f79; }
.camera-settings-header h1 { margin: 0; color: #102641; font-size: 1.65rem; letter-spacing: 0; }
.camera-settings-header p, .camera-events-page-shell header p { margin: 5px 0 0; color: #63788e; font-size: .75rem; }
.camera-settings-header > div:last-child { display: flex; gap: 8px; }
.camera-settings-live-link, .camera-settings-header button, .camera-events-page-shell > header > a { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 8px 12px; border: 1px solid #cddbe3; border-radius: 6px; background: #fff; color: #0a817a; font-size: .74rem; font-weight: 700; }
.camera-settings-header svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.camera-settings-header button { width: 36px; padding: 8px; color: #536a80; }
.camera-settings-message { margin: -6px 0 14px; padding: 9px 12px; border: 1px solid #bce6d9; border-radius: 6px; background: #eefaf6; color: #087c64; font-size: .74rem; }
.camera-settings-layout { display: grid; grid-template-columns: 176px minmax(520px, 1fr) 270px; gap: 15px; align-items: start; }
.camera-settings-nav { position: sticky; top: 16px; display: grid; padding: 6px; border: 1px solid #d9e2e8; border-radius: 7px; background: #fff; }
.camera-settings-nav a { padding: 10px 11px; border-left: 3px solid transparent; border-radius: 4px; color: #586e83; font-size: .74rem; }
.camera-settings-nav a.active { border-left-color: #07978f; background: #eaf7f4; color: #087d77; font-weight: 700; }
.camera-settings-main { min-width: 0; }
.camera-settings-section-title { margin-bottom: 9px; }
.camera-settings-section-title h2 { margin: 0; color: #142c45; font-size: 1rem; letter-spacing: 0; }
.camera-settings-overview { display: grid; grid-template-columns: minmax(250px, 1.25fr) minmax(210px, .75fr); overflow: hidden; border: 1px solid #d9e2e8; border-radius: 7px; background: #fff; }
.camera-settings-preview { position: relative; aspect-ratio: 16 / 8.8; background: #10211f; }
.camera-settings-preview video { width: 100%; height: 100%; display: block; object-fit: cover; }
.camera-settings-preview > span { position: absolute; left: 10px; top: 10px; padding: 4px 7px; border-radius: 4px; background: rgba(7, 27, 25, .8); color: #fff; font-size: .62rem; font-weight: 700; }
.camera-settings-preview > span i { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: #30d7a5; }
.camera-settings-preview > span.connecting i, .camera-settings-preview > span.recovering i { background: #f2b238; }
.camera-settings-preview > span.offline i { background: #e34a59; }
.camera-counting-overview { display: grid; grid-template-columns: repeat(3, minmax(100px, 1fr)) minmax(170px, 1.25fr); gap: 8px; margin: 10px 0 18px; }
.camera-counting-overview > div, .camera-counting-overview > a { min-height: 66px; padding: 11px 13px; border: 1px solid #d9e3e8; border-radius: 6px; background: #fff; }
.camera-counting-overview span { display: block; color: #63798d; font-size: .68rem; }.camera-counting-overview strong { color: #11304a; font-size: 1.35rem; }
.camera-counting-overview > a { display: grid; place-items: center; color: #087f77; font-size: .75rem; font-weight: 700; text-decoration: none; }
.camera-settings-overview dl { margin: 0; padding: 8px 16px; }
.camera-settings-overview dl div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid #e7edf1; }
.camera-settings-overview dl div:last-child { border: 0; }
.camera-settings-overview dt { color: #6a7e91; font-size: .69rem; }
.camera-settings-overview dd { margin: 0; color: #263e56; font-size: .7rem; font-weight: 700; text-align: right; }
.camera-settings-config-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.camera-config-panel, .camera-notification-settings { border: 1px solid #d9e2e8; border-radius: 7px; background: #fff; padding: 14px 15px; }
.camera-config-panel h3, .camera-notification-settings h3 { margin: 0 0 10px; color: #173049; font-size: .79rem; letter-spacing: 0; }
.camera-config-panel > p, .camera-notification-settings p { margin: -4px 0 12px; color: #728498; font-size: .68rem; }
.camera-setting-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 45px; border-bottom: 1px solid #edf1f4; }
.camera-setting-toggle:last-child { border: 0; }
.camera-setting-toggle strong, .camera-setting-toggle small { display: block; }
.camera-setting-toggle strong { color: #283f56; font-size: .72rem; }
.camera-setting-toggle small { margin-top: 2px; color: #7a8b9c; font-size: .62rem; }
.camera-setting-toggle input[role="switch"] { appearance: none; width: 30px !important; min-width: 30px; height: 17px !important; min-height: 17px; margin: 0; padding: 0; border: 0; border-radius: 10px; background: #bdc9d3; position: relative; cursor: pointer; }
.camera-setting-toggle input[role="switch"]::after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; transition: transform 120ms ease; box-shadow: 0 1px 2px rgba(0,0,0,.18); }
.camera-setting-toggle input[role="switch"]:checked { background: #0b958c; }
.camera-setting-toggle input[role="switch"]:checked::after { transform: translateX(13px); }
.camera-sensitivity-control { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 3px; border: 1px solid #d9e2e8; border-radius: 6px; background: #f4f7f9; }
.camera-sensitivity-control input { position: absolute; opacity: 0; pointer-events: none; }
.camera-sensitivity-control span { display: block; padding: 7px; border-radius: 4px; color: #677a8c; text-align: center; font-size: .67rem; }
.camera-sensitivity-control input:checked + span { background: #fff; color: #087f79; font-weight: 700; box-shadow: 0 1px 4px rgba(25, 52, 72, .12); }
.camera-threshold-label { display: grid; grid-template-columns: 1fr 100px 36px; gap: 9px; align-items: center; margin-top: 17px; }
.camera-threshold-label strong, .camera-threshold-label small { display: block; }
.camera-threshold-label strong { font-size: .7rem; }.camera-threshold-label small { color: #7a8c9d; font-size: .6rem; }
.camera-threshold-label input { width: 100%; min-height: 18px; padding: 0; accent-color: #0a9189; }
.camera-threshold-label output { font-size: .7rem; font-weight: 700; }
.camera-recording-panel, .camera-attendance-band, .camera-notification-settings { margin-top: 12px; }
.camera-recording-panel > div { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.camera-recording-panel > div > label:not(.camera-setting-toggle) { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 45px; font-size: .7rem; }
.camera-recording-panel select, .camera-attendance-band select { min-height: 34px; padding: 6px 28px 6px 9px; border: 1px solid #d5e0e7; border-radius: 5px; background: #fff; color: #294158; font-size: .68rem; }
.camera-attendance-band { display: grid; grid-template-columns: minmax(230px, 1fr) 145px 125px auto; gap: 14px; align-items: end; padding: 14px 15px; border: 1px solid #b9dfda; border-left: 4px solid #0a978d; border-radius: 7px; background: #f2fbf8; }
.camera-attendance-band strong, .camera-attendance-band label span { display: block; color: #17364d; font-size: .72rem; }
.camera-attendance-band > div > span { margin-left: 8px; font-size: .65rem; font-weight: 700; }.camera-attendance-band p { margin: 4px 0 0; color: #668093; font-size: .64rem; }
.camera-attendance-band a { min-height: 34px; padding: 9px 10px; border: 1px solid #0b9188; border-radius: 5px; color: #087f79; text-align: center; font-size: .67rem; font-weight: 700; }
.camera-settings-actions { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-top: 12px; padding: 11px 0; background: #f4f7f9; }
.camera-settings-actions a, .camera-settings-actions button { min-height: 36px; padding: 9px 15px; border-radius: 6px; font-size: .72rem; font-weight: 700; }
.camera-settings-actions a { border: 1px solid #ccd9e2; background: #fff; color: #526a80; }.camera-settings-actions button { border: 1px solid #08877f; background: #0a958b; color: #fff; }
.camera-recent-events { border: 1px solid #d9e2e8; border-radius: 7px; background: #fff; overflow: hidden; }
.camera-recent-events h2 { margin: 0; padding: 14px; border-bottom: 1px solid #e5ebef; color: #173049; font-size: .82rem; letter-spacing: 0; }
.camera-recent-events > div { padding: 0 13px; }.camera-recent-events article { grid-template-columns: 58px 1fr; }.camera-recent-events img, .camera-recent-events .camera-event-placeholder { width: 58px; }
.camera-recent-events > div > p { padding: 18px 2px; color: #708397; font-size: .7rem; }.camera-recent-events > a { display: block; padding: 12px 14px; border-top: 1px solid #e5ebef; color: #087f79; font-size: .7rem; font-weight: 700; }

.camera-events-page-shell { min-height: 100vh; }
.camera-events-page-shell > header h1 { font-size: 1.6rem; }
.camera-events-page-tools { display: grid; grid-template-columns: minmax(0, 1fr) 240px auto; align-items: center; gap: 12px; margin-bottom: 12px; padding: 8px 10px; border: 1px solid #d9e2e8; border-radius: 7px; background: #fff; }
.camera-events-page-tools .camera-events-tabs { padding: 0; border: 0; }
.camera-events-page-tools > a { padding: 9px 12px; border: 1px solid #0a9087; border-radius: 5px; color: #087f79; font-size: .7rem; font-weight: 700; }
.camera-events-page-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; padding: 4px 16px 16px; border: 1px solid #d9e2e8; border-radius: 7px; background: #fff; }
.event-image-open { overflow: hidden; }
.event-image-viewer { position: fixed; z-index: 160; inset: 0; display: grid; place-items: center; padding: 54px 24px 24px; background: rgba(5, 13, 20, .92); }
.event-image-viewer img { display: block; max-width: 100%; max-height: calc(100vh - 78px); object-fit: contain; border-radius: 4px; box-shadow: 0 18px 54px rgba(0, 0, 0, .38); }
.event-image-viewer video { display: block; width: min(1120px, 100%); max-height: calc(100vh - 78px); background: #000; border-radius: 4px; box-shadow: 0 18px 54px rgba(0, 0, 0, .38); }
.event-clip-button { margin-top: 7px; padding: 5px 9px; border: 1px solid #79c9c2; border-radius: 4px; background: #f3fbfa; color: #087f77; font-size: .67rem; font-weight: 700; }
.camera-zone-panel { margin-top: 12px; }
.camera-zone-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
.camera-zone-heading h3 { margin-bottom: 3px; }
.camera-zone-heading p, .camera-zone-help { margin: 0; color: #6a7e91; font-size: .7rem; }
.camera-zone-tools { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.camera-zone-tools button { min-height: 32px; padding: 6px 10px; border: 1px solid #cbd7de; border-radius: 5px; background: #fff; color: #425a70; font-size: .68rem; }
.camera-zone-tools button.active { border-color: #0a958b; background: #eaf8f6; color: #087f77; }
.camera-zone-stage { position: relative; width: min(720px, 100%); aspect-ratio: 16 / 9; overflow: hidden; touch-action: none; cursor: crosshair; background: #10211f; border-radius: 5px; }
.camera-zone-stage > img, .camera-zone-layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.camera-zone-stage > img { display: block; object-fit: cover; pointer-events: none; }
.camera-zone-layer { pointer-events: none; }
.camera-zone-box { position: absolute; display: grid; place-items: start; padding: 5px; border: 2px solid #15b89f; background: rgba(21, 184, 159, .16); color: #fff; font-size: .64rem; font-weight: 700; text-shadow: 0 1px 2px #000; }
.camera-zone-box.ignore { border-color: #ed5665; background: rgba(237, 86, 101, .18); }
.camera-counting-line { position: absolute; height: 3px; transform-origin: left center; background: #f5c542; box-shadow: 0 0 0 1px rgba(12, 25, 31, .65), 0 0 10px rgba(245, 197, 66, .45); }
.camera-counting-line::after { content: ""; position: absolute; right: -6px; top: -5px; width: 11px; height: 11px; border-radius: 50%; background: #f5c542; box-shadow: 0 0 0 2px rgba(12, 25, 31, .7); }
.camera-counting-line i, .camera-counting-line b { position: absolute; top: -25px; display: grid; place-items: center; width: 22px; height: 20px; border-radius: 4px; background: #102b29; color: #fff; font-size: .64rem; font-style: normal; }
.camera-counting-line i { left: -8px; }.camera-counting-line b { right: -8px; }
.camera-counting-summary { display: grid; grid-template-columns: repeat(3, minmax(88px, 1fr)) minmax(180px, 1.5fr); gap: 8px; width: min(720px, 100%); margin-top: 10px; }
.camera-counting-summary > div, .camera-counting-summary > label { min-height: 58px; padding: 9px 11px; border: 1px solid #d9e3e8; border-radius: 5px; background: #f8fbfc; }
.camera-counting-summary span { display: block; color: #63798d; font-size: .65rem; }
.camera-counting-summary strong { display: block; margin-top: 2px; color: #11304a; font-size: 1.15rem; }
.camera-counting-summary select { width: 100%; margin-top: 4px; min-height: 28px; border: 0; background: transparent; color: #16354c; font-size: .7rem; font-weight: 700; }
.camera-counting-summary > a { display: grid; place-items: center; min-height: 58px; padding: 9px 11px; border: 1px solid #b7dcd7; border-radius: 5px; background: #effaf8; color: #087f77; font-size: .7rem; font-weight: 700; text-decoration: none; }
.camera-counting-page { width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 28px 0 50px; }
.camera-counting-page > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }.camera-counting-page nav { display: flex; gap: 7px; color: #688094; font-size: .7rem; }.camera-counting-page nav a { color: #087f77; }.camera-counting-page h1 { margin: 8px 0 4px; color: #112b44; font-size: 1.8rem; }.camera-counting-page header p { margin: 0; color: #688094; }
.camera-counting-report-summary { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; border: 1px solid #d8e2e8; border-radius: 7px; background: #fff; }.camera-counting-report-summary > div { padding: 20px; border-right: 1px solid #e2e9ed; }.camera-counting-report-summary > div:last-child { border: 0; }.camera-counting-report-summary span { display: block; color: #60768a; font-size: .75rem; }.camera-counting-report-summary strong { display: block; margin-top: 5px; color: #078c82; font-size: 2rem; }
.camera-counting-note { margin: 12px 0 18px; padding: 12px 14px; border-left: 3px solid #0a958b; background: #edf8f7; color: #526b7e; font-size: .76rem; }
.camera-counting-report { overflow: hidden; border: 1px solid #d8e2e8; border-radius: 7px; background: #fff; }.camera-counting-report > div:first-child { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid #e2e9ed; }.camera-counting-report h2 { margin: 0; color: #142c45; font-size: 1rem; }.camera-counting-report > div > span { color: #688094; font-size: .7rem; }.camera-counting-report table { width: 100%; border-collapse: collapse; }.camera-counting-report th, .camera-counting-report td { padding: 12px 18px; border-bottom: 1px solid #e6ecef; text-align: left; font-size: .72rem; }.camera-counting-report th { background: #f7f9fa; color: #50677a; font-size: .64rem; text-transform: uppercase; }.camera-counting-report td strong { color: #078c82; }
.camera-zone-help { margin-top: 8px; }
.event-image-viewer button { position: fixed; top: 14px; right: 16px; width: 40px; min-width: 40px; height: 40px; min-height: 40px; padding: 9px; border: 1px solid rgba(255,255,255,.46); border-radius: 6px; background: rgba(14, 28, 38, .78); color: #fff; }
.event-image-viewer button svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; }

@media (max-width: 1180px) {
  .camera-settings-layout { grid-template-columns: 160px minmax(0, 1fr); }
  .camera-recent-events { grid-column: 2; }
}
@media (max-width: 820px) {
  .camera-settings-shell, .camera-events-page-shell { padding: 18px 12px 32px; }
  .camera-settings-layout { display: block; }
  .camera-settings-nav { position: static; display: flex; overflow-x: auto; margin-bottom: 12px; }
  .camera-settings-nav a { flex: 0 0 auto; border-left: 0; border-bottom: 3px solid transparent; }
  .camera-settings-nav a.active { border-bottom-color: #07978f; }
  .camera-settings-config-grid, .camera-settings-overview { grid-template-columns: 1fr; }
  .camera-settings-overview dl { display: grid; grid-template-columns: repeat(3, 1fr); }
  .camera-settings-overview dl div { display: block; border-bottom: 0; border-right: 1px solid #e7edf1; }.camera-settings-overview dl div:last-child { border-right: 0; }
  .camera-settings-overview dd { margin-top: 4px; text-align: left; }
  .camera-attendance-band { grid-template-columns: 1fr 1fr; }.camera-attendance-band > div { grid-column: 1 / -1; }
  .camera-recent-events { margin-top: 12px; }
  .camera-events-page-tools { grid-template-columns: 1fr; }.camera-events-page-list { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .camera-settings-header { display: block; }.camera-settings-header > div:last-child { margin-top: 12px; }
  .camera-recording-panel > div, .camera-attendance-band { grid-template-columns: 1fr; }.camera-attendance-band > div { grid-column: auto; }
  .camera-settings-overview dl { grid-template-columns: 1fr; }.camera-settings-overview dl div { border-right: 0; border-bottom: 1px solid #e7edf1; }
  .camera-threshold-label { grid-template-columns: 1fr 74px 34px; }
  .camera-counting-summary { grid-template-columns: repeat(3, 1fr); }.camera-counting-summary > label { grid-column: 1 / -1; }
  .camera-counting-overview { grid-template-columns: repeat(3, 1fr); }.camera-counting-overview > a { grid-column: 1 / -1; }
  .camera-counting-page { width: min(100% - 22px, 1180px); }.camera-counting-page > header { flex-direction: column; }.camera-counting-report-summary { grid-template-columns: 1fr; }.camera-counting-report-summary > div { border-right: 0; border-bottom: 1px solid #e2e9ed; }.table-scroll { overflow-x: auto; }
  .camera-events-drawer { width: 100vw; }
}

/* One navigation rail across every authenticated dashboard page. */
.dashboard-body .sidebar, .compact-live-page .sidebar, .ops-app-layout .sidebar {
  border-right: 1px solid rgba(34, 180, 149, .3);
  background: linear-gradient(180deg, #071b1a 0%, #061614 56%, #04110f 100%);
  color: #d9efec;
  box-shadow: none;
}
.dashboard-body .sidebar::before, .compact-live-page .sidebar::before, .ops-app-layout .sidebar::before {
  display: block;
  background-image: linear-gradient(rgba(255,255,255,.016) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.016) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: .28;
}
.dashboard-body .sidebar-logo, .compact-live-page .sidebar-logo, .ops-app-layout .sidebar-logo {
  border: 1px solid rgba(42, 204, 164, .42);
  border-radius: 7px;
  background: #111d1d;
}
.dashboard-body .side-menu a, .dashboard-body .sidebar:hover .side-menu a, .dashboard-body .sidebar:focus-within .side-menu a,
.compact-live-page .side-menu a, .compact-live-page .sidebar:hover .side-menu a, .compact-live-page .sidebar:focus-within .side-menu a,
.ops-app-layout .side-menu a, .ops-app-layout .sidebar:hover .side-menu a, .ops-app-layout .sidebar:focus-within .side-menu a {
  border: 1px solid transparent;
  background: transparent;
  color: #b9cfcd;
}
.dashboard-body .side-menu a:hover, .compact-live-page .side-menu a:hover, .ops-app-layout .side-menu a:hover {
  border-color: rgba(45, 199, 161, .26);
  background: rgba(30, 177, 145, .1);
  color: #f2fffd;
}
.dashboard-body .side-menu a.active, .compact-live-page .side-menu a.active, .ops-app-layout .side-menu a.active {
  border-color: rgba(43, 211, 169, .56);
  background: linear-gradient(90deg, rgba(24, 188, 150, .22), rgba(20, 149, 123, .1));
  color: #f5fffd;
}
.dashboard-body .side-menu a.active::before, .compact-live-page .side-menu a.active::before, .ops-app-layout .side-menu a.active::before {
  left: -7px;
  top: 7px;
  bottom: 7px;
  width: 3px;
  height: auto;
  border-radius: 0 3px 3px 0;
  background: #28d7a9;
  box-shadow: 0 0 12px rgba(40, 215, 169, .56);
}
.dashboard-body .side-menu a .enterprise-menu-icon, .compact-live-page .side-menu a .enterprise-menu-icon, .ops-app-layout .side-menu a .enterprise-menu-icon { color: currentColor; }
.dashboard-body .side-menu a.active .enterprise-menu-icon, .compact-live-page .side-menu a.active .enterprise-menu-icon, .ops-app-layout .side-menu a.active .enterprise-menu-icon { color: #2bd6aa; }
.dashboard-body .menu-label, .compact-live-page .menu-label, .ops-app-layout .menu-label { color: currentColor; }
.dashboard-body .sidebar-footer, .compact-live-page .sidebar-footer, .ops-app-layout .sidebar-footer { border-top-color: rgba(43, 190, 157, .24); }
.dashboard-body .sidebar-exit-button, .compact-live-page .sidebar-exit-button, .ops-app-layout .sidebar-exit-button { color: #b9cfcd; }

/* Keep the shared notification control in the navigation rail, away from page actions. */
.sidebar-footer .notification-widget {
  position: relative;
  inset: auto;
  z-index: 70;
  width: 44px;
  display: grid;
  justify-items: center;
  align-self: center;
  gap: 0;
  pointer-events: auto;
}
.sidebar-footer .notification-button {
  width: 44px;
  min-width: 44px;
  height: 44px;
  display: grid;
  border-color: rgba(43, 190, 157, .3);
  border-radius: 7px;
  background: rgba(16, 46, 43, .82);
  color: #c9dddb;
  box-shadow: none;
}
.sidebar-footer .notification-button:hover,
.sidebar-footer .notification-button:focus-visible,
.sidebar-footer .notification-button.has-alerts {
  border-color: rgba(43, 211, 169, .58);
  background: rgba(25, 75, 66, .9);
  color: #32d8ac;
}
.sidebar-footer .notification-count {
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  border-color: #061614;
  font-size: .66rem;
}
.sidebar-footer .notification-count[hidden] { display: none; }
.sidebar-footer .notification-panel {
  position: fixed;
  left: 96px;
  bottom: 16px;
  z-index: 90;
  color: #eaf7f5;
}

@media (max-width: 860px) {
  .sidebar-footer .notification-panel {
    left: 72px;
    width: min(360px, calc(100vw - 84px));
  }
}

/* Notification bell participates in each page header instead of floating over actions. */
.page-notification-host {
  position: relative;
  min-height: 48px;
  padding-right: 60px !important;
}
.page-notification-host .notification-widget {
  position: absolute;
  top: 0;
  right: 0;
  left: auto;
  bottom: auto;
  z-index: 70;
  display: grid;
  justify-items: end;
  gap: 8px;
  pointer-events: none;
}
.page-notification-host .notification-button {
  width: 44px;
  min-width: 44px;
  height: 44px;
  display: grid;
  border: 1px solid #cbd8df;
  border-radius: 6px;
  background: #fff;
  color: #38536b;
  box-shadow: 0 5px 16px rgba(20, 43, 62, .08);
}
.page-notification-host .notification-button:hover,
.page-notification-host .notification-button:focus-visible,
.page-notification-host .notification-button.has-alerts {
  border-color: #9fd4cd;
  background: #eef9f7;
  color: #087f77;
}
.page-notification-host .notification-count {
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  border-color: #fff;
  font-size: .66rem;
}
.notification-count[hidden] { display: none !important; }
.page-notification-host .notification-panel {
  position: fixed;
  top: 72px;
  right: 16px;
  left: auto;
  bottom: auto;
  z-index: 90;
}
.page-notification-fallback {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

@media (max-width: 520px) {
  .page-notification-host { padding-right: 54px !important; }
  .page-notification-host .notification-panel { top: 64px; width: calc(100vw - 24px); right: 12px; }
}

/* Alert panel: compact operational treatment shared by every page. */
.page-notification-host .notification-panel {
  width: min(390px, calc(100vw - 24px));
  max-height: min(570px, calc(100vh - 88px));
  border: 1px solid #cdd9e0;
  border-radius: 8px;
  background: #fff;
  color: #193149;
  box-shadow: 0 18px 48px rgba(25, 49, 73, .2);
}
.page-notification-host .notification-panel-header {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 70px;
  padding: 13px 14px;
  border-bottom: 1px solid #e1e8ec;
  background: #fff;
}
.page-notification-host .notification-panel-header small {
  color: #078b82;
  font-size: .63rem;
  font-weight: 800;
  letter-spacing: .04em;
}
.page-notification-host .notification-panel-header strong {
  margin-top: 3px;
  color: #172e47;
  font-size: .95rem;
  line-height: 1.2;
}
.page-notification-host .notification-read-all {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #9bcfc8;
  border-radius: 5px;
  background: #eef9f7;
  color: #087f77;
  font-size: .66rem;
  font-weight: 750;
}
.page-notification-host .notification-read-all:hover,
.page-notification-host .notification-read-all:focus-visible {
  border-color: #078b82;
  background: #daf2ee;
}
.page-notification-host .notification-list {
  max-height: min(430px, calc(100vh - 215px));
  overflow-y: auto;
  background: #fff;
  scrollbar-color: #aab9c2 transparent;
  scrollbar-width: thin;
}
.page-notification-host .notification-item {
  position: relative;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  min-height: 74px;
  padding: 11px 14px;
  border-bottom: 1px solid #e8edf0;
  background: #fff;
  color: #263f56;
}
.page-notification-host .notification-item:last-child { border-bottom: 0; }
.page-notification-host .notification-item:hover {
  background: #f2f8f7;
  transform: none;
}
.page-notification-host .notification-item.unread {
  background: #f8fcfb;
}
.page-notification-host .notification-item.unread::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: #10a58f;
}
.page-notification-host .notification-dot {
  position: relative;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e2f5f1;
  color: #078b82;
}
.page-notification-host .notification-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
  border-radius: 50%;
}
.page-notification-host .notification-item.warning .notification-dot { background: #fff2dd; color: #d98008; }
.page-notification-host .notification-item.danger .notification-dot { background: #fde9eb; color: #d5424e; }
.page-notification-host .notification-item.success .notification-dot { background: #e6f5ea; color: #2b8b4b; }
.page-notification-host .notification-item strong {
  color: #1d354c;
  font-size: .76rem;
  font-weight: 750;
  line-height: 1.3;
}
.page-notification-host .notification-item small {
  margin-top: 3px;
  color: #6d8192;
  font-size: .67rem;
  line-height: 1.35;
}
.page-notification-host .notification-item em {
  margin-top: 5px;
  color: #718596;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: 0;
}
.notification-view-all {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid #e1e8ec;
  background: #f8fafb;
  color: #087f77;
  font-size: .69rem;
  font-weight: 750;
  text-decoration: none;
}
.notification-view-all:hover { background: #eef7f5; }

@media (max-width: 520px) {
  .page-notification-host .notification-panel { max-height: calc(100vh - 76px); }
  .page-notification-host .notification-list { max-height: calc(100vh - 202px); }
  .page-notification-host .notification-item { min-height: 70px; padding: 10px 12px; }
}

/* Dashboard alerts match the light, compact operational workspace. */
.ops-dashboard-body .dashboard-alert-backdrop {
  background: rgba(21, 38, 50, .34);
  backdrop-filter: blur(3px);
}
.ops-dashboard-body .dashboard-alert-dialog {
  top: 70px;
  right: 24px;
  width: min(430px, calc(100vw - 32px));
  max-height: min(610px, calc(100vh - 92px));
  border: 1px solid #cfdbe2;
  border-radius: 7px;
  background: #fff;
  color: var(--ops-ink);
  box-shadow: 0 20px 52px rgba(25, 49, 73, .22);
}
.ops-dashboard-body .dashboard-alert-header {
  align-items: center;
  min-height: 68px;
  padding: 12px 14px 12px 16px;
  border-bottom: 1px solid var(--ops-line);
}
.ops-dashboard-body .dashboard-alert-header .eyebrow {
  margin: 0;
  color: var(--ops-teal);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: 0;
}
.ops-dashboard-body .dashboard-alert-header h2 {
  margin: 3px 0 0;
  color: var(--ops-ink);
  font-size: 1.05rem;
  font-weight: 680;
  line-height: 1.2;
}
.ops-dashboard-body .dashboard-alert-close {
  position: relative;
  width: 36px;
  min-width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid #d4dfe5;
  border-radius: 6px;
  padding: 0;
  overflow: hidden;
  background: #fff;
  color: transparent;
  font-size: 0;
}
.ops-dashboard-body .dashboard-alert-close::before,
.ops-dashboard-body .dashboard-alert-close::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: #51677a;
}
.ops-dashboard-body .dashboard-alert-close::before { transform: rotate(45deg); }
.ops-dashboard-body .dashboard-alert-close::after { transform: rotate(-45deg); }
.ops-dashboard-body .dashboard-alert-close:hover,
.ops-dashboard-body .dashboard-alert-close:focus-visible {
  border-color: #9fcfc9;
  background: #eef8f6;
}
.ops-dashboard-body .dashboard-alert-close:hover::before,
.ops-dashboard-body .dashboard-alert-close:hover::after,
.ops-dashboard-body .dashboard-alert-close:focus-visible::before,
.ops-dashboard-body .dashboard-alert-close:focus-visible::after { background: var(--ops-teal); }
.ops-dashboard-body .dashboard-alert-summary {
  gap: 7px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--ops-line);
  background: #f8fafb;
}
.ops-dashboard-body .dashboard-alert-summary span {
  border: 1px solid #dce5e9;
  border-radius: 999px;
  padding: 4px 8px;
  background: #fff;
  color: #607488;
  font-size: .65rem;
  font-weight: 700;
}
.ops-dashboard-body .dashboard-alert-list {
  padding: 0;
  scrollbar-color: #aab8c1 transparent;
  scrollbar-width: thin;
}
.ops-dashboard-body .dashboard-alert-row {
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 60px;
  border-bottom: 1px solid #e7edf0;
  border-radius: 0;
  padding: 9px 16px;
  color: var(--ops-ink);
}
.ops-dashboard-body .dashboard-alert-row:last-child { border-bottom: 0; }
.ops-dashboard-body .dashboard-alert-row:hover { background: #f2f8f7; }
.ops-dashboard-body .dashboard-alert-row.read { opacity: .62; }
.ops-dashboard-body .dashboard-alert-row .notification-dot {
  width: 8px;
  height: 8px;
  margin: 0;
  background: var(--ops-teal);
}
.ops-dashboard-body .dashboard-alert-row.warning .notification-dot { background: var(--ops-amber); }
.ops-dashboard-body .dashboard-alert-row.danger .notification-dot { background: var(--ops-red); }
.ops-dashboard-body .dashboard-alert-row strong {
  color: var(--ops-ink);
  font-size: .76rem;
  font-weight: 700;
  line-height: 1.3;
}
.ops-dashboard-body .dashboard-alert-row small {
  margin-top: 2px;
  color: var(--ops-muted);
  font-size: .65rem;
  line-height: 1.3;
}
.ops-dashboard-body .dashboard-alert-row em {
  color: var(--ops-muted);
  font-size: .62rem;
  font-weight: 650;
}
.ops-dashboard-body .dashboard-alert-actions {
  display: flex;
  justify-content: flex-end;
  padding: 10px 14px;
  border-top: 1px solid var(--ops-line);
  background: #f8fafb;
}
.ops-dashboard-body .dashboard-alert-actions button {
  min-height: 34px;
  border: 1px solid #9fcfc9;
  border-radius: 5px;
  padding: 6px 11px;
  background: #eef8f6;
  color: var(--ops-teal);
  font-size: .68rem;
  font-weight: 750;
}
.ops-dashboard-body .dashboard-alert-actions button:hover,
.ops-dashboard-body .dashboard-alert-actions button:focus-visible {
  border-color: var(--ops-teal);
  background: #daf1ed;
}

@media (max-width: 520px) {
  .ops-dashboard-body .dashboard-alert-dialog {
    top: 62px;
    right: 12px;
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 74px);
  }
  .ops-dashboard-body .dashboard-alert-row { grid-template-columns: 8px minmax(0, 1fr); }
  .ops-dashboard-body .dashboard-alert-row em { grid-column: 2; margin-top: 2px; }
}

/* Users and location-scoped access control. */
.users-access-body { --users-ink: #10233d; --users-muted: #667b8f; --users-line: #d7e0e6; --users-teal: #078f86; background: #f4f7f9; color: var(--users-ink); }
.users-access-shell { min-width: 0; padding: 22px 24px 32px; }
.users-access-header { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.users-access-header > div:first-child p { margin: 0 0 2px; color: var(--users-teal); font-size: .64rem; font-weight: 800; text-transform: uppercase; }
.users-access-header h1 { margin: 0; color: var(--users-ink); font-size: 1.7rem; font-weight: 680; letter-spacing: 0; }
.users-access-tools { display: flex; align-items: center; gap: 10px; }
.users-search { width: min(320px, 28vw); min-height: 42px; display: flex; align-items: center; gap: 9px; border: 1px solid #cbd7df; border-radius: 6px; padding: 0 12px; background: #fff; }
.users-search svg, .users-add-button svg { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.users-search input { width: 100%; min-width: 0; border: 0; padding: 0; background: transparent; color: var(--users-ink); font-size: .76rem; box-shadow: none; outline: 0; }
.users-role-filter select { min-width: 142px; min-height: 42px; border: 1px solid #cbd7df; border-radius: 6px; padding: 0 32px 0 12px; background: #fff; color: #425a70; font-size: .74rem; }
.users-add-button { min-height: 42px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid #078f86; border-radius: 6px; padding: 0 15px; background: #078f86; color: #fff; font-size: .75rem; font-weight: 700; }
.users-add-button:hover, .users-add-button:focus-visible { background: #067b74; }
.users-form-error { margin: 0 0 14px; border: 1px solid #efb6bc; border-radius: 6px; padding: 10px 12px; background: #fff4f5; color: #b72f3d; font-size: .74rem; }
.users-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.user-metric { min-height: 94px; display: flex; align-items: center; gap: 15px; border: 1px solid var(--users-line); border-radius: 7px; padding: 15px 17px; background: #fff; }
.user-metric > span { width: 52px; height: 52px; display: grid; place-items: center; flex: 0 0 52px; border-radius: 50%; background: #e9f6f4; color: #087f77; }
.user-metric > span svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.user-metric small, .user-metric strong { display: block; }
.user-metric small { color: var(--users-muted); font-size: .72rem; }
.user-metric strong { margin-top: 4px; color: var(--users-ink); font-size: 1.65rem; line-height: 1; }
.user-metric.danger > span { background: #fdeced; color: #dc3545; }
.user-metric.danger strong { color: #d73343; }
.users-table-panel { overflow: hidden; border: 1px solid var(--users-line); border-radius: 7px; background: #fff; }
.users-table-head, .users-table-row { display: grid; grid-template-columns: minmax(215px, 1.35fr) minmax(110px, .7fr) minmax(150px, 1fr) minmax(135px, .85fr) 90px 110px 72px; align-items: center; }
.users-table-head { min-height: 42px; border-bottom: 1px solid var(--users-line); background: #f8fafb; color: #53687d; font-size: .65rem; font-weight: 750; text-transform: uppercase; }
.users-table-head span, .users-table-row > span, .users-table-row > time { min-width: 0; padding: 0 13px; }
.users-table-row { min-height: 66px; border-bottom: 1px solid #e8edf0; color: #2a4055; font-size: .72rem; }
.users-table-row:last-child { border-bottom: 0; }
.users-table-row:hover { background: #f4faf9; }
.users-person { display: flex; align-items: center; gap: 10px; }
.users-person > i { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 36px; border-radius: 50%; background: #e4f3f2; color: #087f77; font-size: .74rem; font-style: normal; font-weight: 750; }
.users-person strong, .users-person small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.users-person strong { color: var(--users-ink); font-size: .75rem; }
.users-person strong em { margin-left: 4px; border-radius: 999px; padding: 2px 5px; background: #eaf6f4; color: #087f77; font-size: .54rem; font-style: normal; }
.users-person small { margin-top: 3px; color: var(--users-muted); font-size: .62rem; }
.users-role { display: flex; align-items: center; gap: 7px; color: #087f77; }
.users-role svg, .users-row-actions svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.users-role b { color: #334c62; font-weight: 600; }
.users-location-scope { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.users-status { display: inline-flex; align-items: center; gap: 6px; }
.users-status i { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #16a34a; }
.users-status.suspended { color: #c7313f; }.users-status.suspended i { background: #dc3545; }
.users-table-row time { color: var(--users-muted); font-size: .64rem; }
.users-row-actions { display: flex; align-items: center; gap: 4px; }
.users-row-actions button { width: 30px; min-width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 5px; padding: 0; background: transparent; color: #087f77; font-size: 1.1rem; }
.users-row-actions button:hover, .users-row-actions button:focus-visible { border-color: #b7d9d5; background: #eaf6f4; }
.users-empty { margin: 0; padding: 32px; color: var(--users-muted); text-align: center; }
.users-drawer-backdrop { position: fixed; inset: 0; z-index: 79; background: rgba(21, 38, 50, .28); backdrop-filter: blur(2px); }
.users-access-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 80; width: min(390px, 100vw); overflow-y: auto; border-left: 1px solid #cfd9df; background: #fff; color: var(--users-ink); box-shadow: -18px 0 50px rgba(25, 49, 73, .18); }
.users-access-drawer[hidden], .users-drawer-backdrop[hidden] { display: none; }
.users-access-drawer > header { min-height: 66px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--users-line); padding: 12px 16px; }
.users-access-drawer > header small { display: block; color: var(--users-teal); font-size: .62rem; font-weight: 800; text-transform: uppercase; }
.users-access-drawer > header h2 { margin: 3px 0 0; font-size: 1.05rem; }
.users-access-drawer > header button { width: 36px; min-width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #d3dde3; border-radius: 6px; padding: 0; background: #fff; color: #52687b; }
.users-access-drawer > header svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.users-edit-form, .users-add-form { min-height: calc(100dvh - 66px); display: flex; flex-direction: column; gap: 18px; padding: 18px 20px; }
.users-edit-form[hidden], .users-add-form[hidden] { display: none; }
.users-edit-identity { display: flex; align-items: center; gap: 12px; }
.users-edit-identity > span { width: 48px; height: 48px; display: grid; place-items: center; flex: 0 0 48px; border-radius: 50%; background: #078f86; color: #fff; font-weight: 750; }
.users-edit-identity strong, .users-edit-identity small { display: block; }.users-edit-identity strong { font-size: .88rem; }.users-edit-identity small { margin-top: 3px; color: var(--users-muted); font-size: .68rem; }
.users-access-drawer fieldset { min-width: 0; margin: 0; border: 0; padding: 0; }
.users-access-drawer legend, .users-status-field > span, .users-add-form > label > span { margin-bottom: 9px; color: #253b50; font-size: .72rem; font-weight: 750; }
.users-role-segments { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.users-role-segments legend { grid-column: 1 / -1; }
.users-role-segments label { min-width: 0; }
.users-role-segments input { position: absolute; width: 1px !important; min-width: 1px; height: 1px !important; margin: 0; opacity: 0; pointer-events: none; }
.users-role-segments label > span { min-height: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 1px solid #cbd6dd; border-right: 0; color: #41586d; cursor: pointer; }
.users-role-segments label:first-of-type > span { border-radius: 6px 0 0 6px; }.users-role-segments label:last-of-type > span { border-right: 1px solid #cbd6dd; border-radius: 0 6px 6px 0; }
.users-role-segments svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.users-role-segments b { font-size: .67rem; font-weight: 650; }
.users-role-segments input:checked + span { border-color: #078f86; background: #078f86; color: #fff; }
.users-role-help { margin: -12px 0 0; color: var(--users-muted); font-size: .65rem; }
.users-location-access > div { display: grid; gap: 8px; }.users-location-access label, .users-permissions label, .users-add-form fieldset label { display: flex; align-items: center; gap: 9px; color: #3d5367; font-size: .7rem; }
.users-location-access input, .users-permissions input, .users-add-form fieldset input { width: 17px; height: 17px; margin: 0; accent-color: #078f86; }
.users-location-access button { margin-top: 9px; border: 0; padding: 0; background: transparent; color: #087f77; font-size: .67rem; }
.users-permissions { display: grid; gap: 8px; }.users-permissions legend { margin-bottom: 1px; }
.users-status-field { display: grid; }.users-status-field select, .users-add-form input, .users-add-form select { width: 100%; min-height: 42px; border: 1px solid #cbd7df; border-radius: 6px; padding: 0 11px; background: #fff; color: var(--users-ink); font-size: .72rem; }
.users-edit-form footer, .users-add-form footer { display: grid; grid-template-columns: 1fr 1.2fr; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--users-line); }
.users-edit-form footer button, .users-add-form footer button { min-height: 42px; border: 1px solid #078f86; border-radius: 6px; background: #fff; color: #087f77; font-size: .72rem; font-weight: 750; }
.users-edit-form footer button[type="submit"], .users-add-form footer button[type="submit"] { background: #078f86; color: #fff; }
.users-add-form > label { display: grid; gap: 0; }.users-add-form fieldset { display: grid; gap: 8px; }.users-add-form footer { margin-top: auto; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

@media (max-width: 1180px) {
  .users-table-head, .users-table-row { grid-template-columns: minmax(200px, 1.3fr) 110px minmax(140px, 1fr) 120px 82px 68px; }
  .users-table-head span:nth-child(6), .users-table-row time { display: none; }
}
@media (max-width: 860px) {
  .users-access-shell { padding: 18px 14px 84px; }
  .users-access-header { align-items: flex-start; flex-direction: column; }
  .users-access-tools { width: 100%; flex-wrap: wrap; }.users-search { width: 100%; }.users-role-filter { flex: 1; }.users-role-filter select { width: 100%; }
  .users-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .users-table-head { display: none; }
  .users-table-panel { overflow: visible; border: 0; background: transparent; }
  .users-table-body { display: grid; gap: 10px; }
  .users-table-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; min-height: 0; border: 1px solid var(--users-line); border-radius: 7px; padding: 14px; background: #fff; }
  .users-table-row > span, .users-table-row > time { padding: 0; }
  .users-table-row > :nth-child(3), .users-table-row > :nth-child(4) { grid-column: 1 / -1; }.users-table-row > :nth-child(5) { grid-column: 1; }.users-table-row > :nth-child(7) { grid-column: 2; grid-row: 1; }
}
@media (max-width: 520px) {
  .users-summary { gap: 8px; }.user-metric { min-height: 80px; gap: 10px; padding: 12px; }.user-metric > span { width: 40px; height: 40px; flex-basis: 40px; }.user-metric > span svg { width: 22px; height: 22px; }.user-metric strong { font-size: 1.35rem; }
  .users-access-drawer { width: 100vw; }
}

/* Settings workspace */
.settings-page-body {
  background: #f7f9fa;
  color: #10233f;
  overflow-x: hidden;
}

.settings-page-shell {
  min-width: 0;
  padding: 24px 28px 28px;
}

.settings-page-header {
  align-items: flex-end;
  display: flex;
  justify-content: space-between;
  margin: 0 auto 18px;
  max-width: 1480px;
}

.settings-page-header h1 {
  color: #10233f;
  font-size: 30px;
  line-height: 1.15;
  margin: 0 0 7px;
}

.settings-page-header p {
  color: #607086;
  font-size: 14px;
  margin: 0;
}

.settings-page-header > span {
  align-items: center;
  border: 1px solid #cad6dd;
  border-radius: 6px;
  color: #087f73;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 9px;
  padding: 9px 12px;
}

.settings-page-header > span i,
.settings-overview em i {
  background: #07978e;
  border-radius: 50%;
  display: inline-block;
  height: 9px;
  width: 9px;
}

.settings-page-body .dashboard-ask-button {
  display: none;
}

.settings-config > header h2 {
  color: #10233f;
  font-size: 22px;
  margin: 0 0 5px;
}

.settings-config > header p {
  color: #66758a;
  font-size: 13px;
  margin: 0;
}

.settings-success,
.settings-test-result {
  align-items: center;
  background: #eaf7f3;
  border: 1px solid #b8ddd5;
  border-radius: 5px;
  color: #087f73;
  display: flex;
  font-size: 12px;
  gap: 8px;
  margin: 18px 0 0;
  padding: 10px 12px;
}

.settings-test-result {
  margin: 0 auto 0 0;
}

.settings-test-result.failed {
  background: #fff1ef;
  border-color: #efc0ba;
  color: #c44132;
}

.settings-test-result i {
  background: currentColor;
  border-radius: 50%;
  height: 8px;
  width: 8px;
}

.settings-config form {
  margin-top: 26px;
}

.settings-control-grid {
  display: grid;
  gap: 20px 22px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-control {
  align-content: start;
  color: #34475c;
  display: grid;
  font-size: 12px;
  font-weight: 700;
  gap: 7px;
}

.settings-control-wide {
  grid-column: 1 / -1;
}

.settings-control input,
.settings-control select,
.settings-control textarea,
.settings-restore-form textarea {
  background: #fff;
  border: 1px solid #cad6dd;
  border-radius: 5px;
  color: #1e3148;
  font: inherit;
  font-weight: 500;
  min-height: 43px;
  outline: none;
  padding: 9px 11px;
  resize: vertical;
  width: 100%;
}

.settings-control input,
.settings-control select {
  height: 43px;
}

.settings-control input:focus,
.settings-control select:focus,
.settings-control textarea:focus,
.settings-restore-form textarea:focus {
  border-color: #07978e;
  box-shadow: 0 0 0 2px rgba(7, 151, 142, .12);
}

.settings-control > small {
  color: #718095;
  font-size: 11px;
  font-weight: 500;
}

.settings-secret-state {
  color: #087f73 !important;
}

.settings-toggle-group {
  border: 1px solid #d7e0e5;
  border-radius: 5px;
  overflow: hidden;
}

.settings-toggle {
  align-items: center;
  border-bottom: 1px solid #e1e7ea;
  cursor: pointer;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  min-height: 59px;
  padding: 10px 12px;
  position: relative;
}

.settings-control-grid > .settings-toggle {
  border: 1px solid #d7e0e5;
  border-radius: 5px;
}

.settings-toggle:last-child {
  border-bottom: 0;
}

.settings-toggle strong,
.settings-toggle small {
  display: block;
}

.settings-toggle strong {
  color: #263a50;
  font-size: 12px;
}

.settings-toggle small {
  color: #718095;
  font-size: 10px;
  margin-top: 3px;
}

.settings-toggle input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.settings-toggle > i {
  background: #bdc8cf;
  border-radius: 12px;
  flex: 0 0 38px;
  height: 22px;
  position: relative;
  transition: background .18s ease;
}

.settings-toggle > i::after {
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(23, 42, 55, .28);
  content: "";
  height: 18px;
  left: 2px;
  position: absolute;
  top: 2px;
  transition: transform .18s ease;
  width: 18px;
}

.settings-toggle input:checked + i {
  background: #07978e;
}

.settings-toggle input:checked + i::after {
  transform: translateX(16px);
}

.settings-form-footer {
  align-items: center;
  border-top: 1px solid #e0e7ea;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 28px;
  padding-top: 18px;
}

.settings-form-footer > button,
.settings-restore-form button,
.settings-system-actions a {
  align-items: center;
  border: 1px solid #07978e;
  border-radius: 5px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  justify-content: center;
  min-height: 40px;
  padding: 8px 15px;
  text-decoration: none;
}

.settings-form-footer > button[type="submit"]:last-child,
.settings-restore-form button {
  background: #07978e;
  color: #fff;
}

.settings-secondary-action {
  background: #fff !important;
  color: #087f73 !important;
}

.settings-danger-action {
  background: #fff !important;
  border-color: #df5a56 !important;
  color: #c23f3b !important;
}

.settings-health-strip,
.settings-system-status {
  border: 1px solid #d7e0e5;
  border-radius: 5px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
}

.settings-health-strip article,
.settings-system-status article {
  border-right: 1px solid #e0e7ea;
  display: grid;
  gap: 5px;
  min-height: 88px;
  padding: 15px;
}

.settings-health-strip article:last-child,
.settings-system-status article:last-child {
  border-right: 0;
}

.settings-health-strip span,
.settings-system-status span {
  color: #718095;
  font-size: 11px;
}

.settings-health-strip strong,
.settings-system-status strong {
  color: #1d3149;
  font-size: 13px;
}

.settings-health-strip em,
.settings-system-status em {
  color: #087f73;
  font-size: 10px;
  font-style: normal;
}

.settings-nvr-storage,
.settings-sessions {
  border: 1px solid #d7e0e5;
  border-radius: 5px;
  overflow: hidden;
}

.settings-nvr-storage > header,
.settings-sessions > header {
  align-items: center;
  background: #f7f9fa;
  display: flex;
  justify-content: space-between;
  min-height: 43px;
  padding: 8px 13px;
}

.settings-nvr-storage > header strong,
.settings-sessions > header strong {
  color: #263a50;
  font-size: 12px;
}

.settings-nvr-storage > header span,
.settings-sessions > header span {
  color: #718095;
  font-size: 10px;
}

.settings-nvr-storage article,
.settings-sessions article {
  align-items: center;
  border-top: 1px solid #e1e7ea;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(170px, 1fr) minmax(180px, 1fr) 90px;
  min-height: 59px;
  padding: 9px 13px;
}

.settings-nvr-storage article > div strong,
.settings-nvr-storage article > div small,
.settings-sessions article > div strong,
.settings-sessions article > div small {
  display: block;
}

.settings-nvr-storage article > div strong,
.settings-sessions article > div strong {
  color: #263a50;
  font-size: 11px;
}

.settings-nvr-storage article > div small,
.settings-sessions article > div small {
  color: #718095;
  font-size: 9px;
  margin-top: 3px;
}

.settings-nvr-storage article > span {
  align-items: center;
  color: #596a7d;
  display: flex;
  font-size: 10px;
  gap: 9px;
}

.settings-nvr-storage article > span > i {
  background: #dfe7e9;
  border-radius: 4px;
  display: block;
  height: 6px;
  overflow: hidden;
  width: 90px;
}

.settings-nvr-storage article > span em {
  background: #07978e;
  display: block;
  height: 100%;
}

.settings-nvr-storage article > b {
  color: #34495e;
  font-size: 10px;
  text-align: right;
}

.settings-sessions article {
  grid-template-columns: minmax(220px, 1fr) 110px 80px;
}

.settings-sessions time {
  color: #647489;
  font-size: 9px;
}

.settings-sessions button {
  background: #fff;
  border: 1px solid #cfdae0;
  border-radius: 4px;
  color: #c23f3b;
  font-size: 9px;
  min-height: 29px;
}

.settings-system-status {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 26px;
}

.settings-system-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.settings-system-actions a {
  background: #fff;
  color: #087f73;
}

.settings-restore-form {
  border-top: 1px solid #e0e7ea;
  display: grid;
  gap: 12px;
  margin-top: 26px;
  padding-top: 22px;
}

.settings-restore-form label {
  color: #34475c;
  display: grid;
  font-size: 12px;
  font-weight: 700;
  gap: 7px;
}

.settings-restore-form button {
  justify-self: end;
}

.settings-workspace {
  background: #fff;
  border: 1px solid #d8e0e5;
  border-radius: 7px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  margin: 0 auto;
  max-width: 1480px;
  min-height: calc(100vh - 135px);
  overflow: hidden;
}

.settings-section-nav {
  border-right: 1px solid #dce3e7;
  padding: 12px 0;
}

.settings-section-nav a {
  align-items: center;
  border-left: 3px solid transparent;
  color: #263546;
  display: flex;
  font-size: 14px;
  gap: 13px;
  min-height: 49px;
  padding: 0 20px;
  text-decoration: none;
}

.settings-section-nav a:hover {
  background: #f5f8f8;
}

.settings-section-nav a.active {
  background: #eef6f5;
  border-left-color: #07978e;
  color: #087f73;
  font-weight: 700;
}

.settings-section-nav svg {
  fill: none;
  flex: 0 0 21px;
  height: 21px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  width: 21px;
}

.settings-section-content {
  min-width: 0;
  padding: 22px 26px 26px;
}

.settings-audit-workspace > header h2,
.settings-overview > header h2 {
  color: #10233f;
  font-size: 22px;
  margin: 0 0 5px;
}

.settings-audit-workspace > header p,
.settings-overview > header p {
  color: #66758a;
  font-size: 13px;
  margin: 0;
}

.settings-audit-filters {
  align-items: stretch;
  display: grid;
  gap: 12px;
  grid-template-columns: 178px 225px 190px minmax(220px, 1fr) auto;
  margin: 28px 0;
}

.settings-audit-filters > label {
  align-items: center;
  border: 1px solid #cfd9df;
  border-radius: 5px;
  display: flex;
  min-height: 44px;
  padding: 0 11px;
}

.settings-audit-filters svg,
.settings-export svg {
  fill: none;
  flex: 0 0 19px;
  height: 19px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 19px;
}

.settings-audit-filters select,
.settings-audit-filters input {
  appearance: none;
  background: transparent;
  border: 0;
  color: #263546;
  font: inherit;
  min-width: 0;
  outline: 0;
  padding: 0 8px;
  width: 100%;
}

.settings-audit-filters label:has(select) {
  background-image: linear-gradient(45deg, transparent 50%, #263546 50%), linear-gradient(135deg, #263546 50%, transparent 50%);
  background-position: calc(100% - 16px) 19px, calc(100% - 11px) 19px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
}

.settings-audit-filters select {
  padding-right: 20px;
}

.settings-audit-search svg {
  color: #657285;
}

.settings-export {
  align-items: center;
  border: 1px solid #07978e;
  border-radius: 5px;
  color: #087f73;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  padding: 0 16px;
  text-decoration: none;
  white-space: nowrap;
}

.settings-export:hover {
  background: #edf8f6;
}

.settings-audit-metrics {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 28px;
}

.settings-audit-metric {
  align-items: center;
  border: 1px solid #d6dfe4;
  border-radius: 5px;
  display: flex;
  gap: 16px;
  min-height: 98px;
  padding: 14px 22px;
}

.settings-audit-metric > span {
  color: #07978e;
  display: grid;
  place-items: center;
}

.settings-audit-metric.failed > span {
  color: #f05a3f;
}

.settings-audit-metric svg {
  fill: none;
  height: 34px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
  width: 34px;
}

.settings-audit-metric small {
  color: #637186;
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.settings-audit-metric strong {
  color: #10233f;
  font-size: 27px;
}

.settings-audit-table-wrap {
  border: 1px solid #d7dfe4;
  border-radius: 5px;
  overflow: auto;
}

.settings-audit-table-wrap table {
  border-collapse: collapse;
  font-size: 12px;
  min-width: 1000px;
  width: 100%;
}

.settings-audit-table-wrap th {
  background: #f7f9fa;
  color: #243347;
  font-weight: 700;
  padding: 14px 12px;
  text-align: left;
  white-space: nowrap;
}

.settings-audit-table-wrap td {
  border-top: 1px solid #e1e7ea;
  color: #35445a;
  max-width: 210px;
  overflow: hidden;
  padding: 14px 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-audit-status {
  align-items: center;
  color: #176c47;
  display: inline-flex;
  gap: 7px;
}

.settings-audit-status i {
  background: #19a548;
  border-radius: 50%;
  height: 8px;
  width: 8px;
}

.settings-audit-status.failed {
  border: 1px solid #f05a3f;
  border-radius: 4px;
  color: #d6422e;
  padding: 3px 6px;
}

.settings-audit-status.failed i {
  background: #f05a3f;
}

.settings-audit-empty {
  color: #69778b;
  padding: 28px;
  text-align: center;
}

.settings-audit-footer {
  align-items: center;
  color: #657489;
  display: flex;
  font-size: 12px;
  justify-content: space-between;
  padding-top: 24px;
}

.settings-audit-footer nav {
  align-items: center;
  display: flex;
  gap: 8px;
}

.settings-audit-footer nav a {
  align-items: center;
  border: 1px solid #d2dbe0;
  border-radius: 4px;
  color: #263546;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  min-width: 36px;
  text-decoration: none;
}

.settings-audit-footer nav a.active {
  background: #07978e;
  border-color: #07978e;
  color: #fff;
}

.settings-audit-footer nav a.disabled {
  opacity: .35;
  pointer-events: none;
}

.settings-overview > div {
  display: grid;
  gap: 0;
  margin-top: 28px;
}

.settings-overview article {
  align-items: center;
  border-bottom: 1px solid #e1e7ea;
  display: grid;
  gap: 16px;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  min-height: 84px;
  padding: 10px 6px;
}

.settings-overview article > span {
  color: #087f73;
}

.settings-overview svg {
  fill: none;
  height: 24px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  width: 24px;
}

.settings-overview small,
.settings-overview strong {
  display: block;
}

.settings-overview small {
  color: #68768a;
  margin-bottom: 5px;
}

.settings-overview strong {
  color: #1c2e45;
  font-size: 14px;
}

.settings-overview em {
  align-items: center;
  color: #087f73;
  display: flex;
  font-size: 12px;
  font-style: normal;
  gap: 7px;
}

@media (max-width: 1380px) {
  .settings-audit-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .settings-audit-search {
    grid-column: span 2;
  }

  .settings-export {
    min-height: 44px;
  }
}

@media (max-width: 820px) {
  .settings-page-shell {
    padding: 18px 14px 24px;
  }

  .settings-page-header {
    align-items: flex-start;
    gap: 14px;
  }

  .settings-page-header h1 {
    font-size: 25px;
  }

  .settings-page-header > span {
    font-size: 0;
    padding: 9px;
  }

  .settings-workspace {
    display: block;
    min-height: auto;
  }

  .settings-section-nav {
    border-bottom: 1px solid #dce3e7;
    border-right: 0;
    display: flex;
    overflow-x: auto;
    padding: 0;
  }

  .settings-section-nav a {
    border-bottom: 3px solid transparent;
    border-left: 0;
    flex: 0 0 auto;
    min-height: 50px;
    padding: 0 14px;
  }

  .settings-section-nav a.active {
    border-bottom-color: #07978e;
    border-left-color: transparent;
  }

  .settings-section-content {
    padding: 18px 14px 22px;
  }

  .settings-audit-filters {
    grid-template-columns: 1fr 1fr;
    margin: 22px 0;
  }

  .settings-audit-search {
    grid-column: 1 / -1;
  }

  .settings-audit-metrics {
    gap: 10px;
    grid-template-columns: 1fr 1fr;
  }

  .settings-audit-metric {
    min-height: 82px;
    padding: 12px;
  }

  .settings-control-grid {
    grid-template-columns: 1fr;
  }

  .settings-control-wide {
    grid-column: auto;
  }

  .settings-health-strip,
  .settings-system-status {
    grid-template-columns: 1fr 1fr;
  }

  .settings-health-strip article:nth-child(2n),
  .settings-system-status article:nth-child(2n) {
    border-right: 0;
  }

  .settings-health-strip article:nth-child(n+3),
  .settings-system-status article:nth-child(n+3) {
    border-top: 1px solid #e0e7ea;
  }

  .settings-nvr-storage article,
  .settings-sessions article {
    gap: 8px;
    grid-template-columns: 1fr auto;
  }

  .settings-nvr-storage article > span,
  .settings-sessions time {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .legal-main,
  .access-main {
    padding: 30px 16px 44px;
  }

  .legal-content h1,
  .access-card h1 {
    font-size: 1.75rem;
  }

  .access-card {
    padding: 24px 18px;
  }

  .access-form {
    grid-template-columns: 1fr;
  }

  .access-wide {
    grid-column: auto;
  }

  .settings-page-header p {
    max-width: 250px;
  }

  .settings-section-nav a span {
    display: none;
  }

  .settings-section-nav a {
    justify-content: center;
    min-width: 50px;
    padding: 0 10px;
  }

  .settings-audit-filters {
    grid-template-columns: 1fr;
  }

  .settings-audit-search {
    grid-column: auto;
  }

  .settings-audit-metrics {
    grid-template-columns: 1fr;
  }

  .settings-audit-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .settings-health-strip,
  .settings-system-status {
    grid-template-columns: 1fr;
  }

  .settings-health-strip article,
  .settings-system-status article,
  .settings-health-strip article:nth-child(2n),
  .settings-system-status article:nth-child(2n) {
    border-right: 0;
  }

  .settings-health-strip article:nth-child(n+2),
  .settings-system-status article:nth-child(n+2) {
    border-top: 1px solid #e0e7ea;
  }

  .settings-form-footer {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .settings-form-footer > button,
  .settings-test-result {
    width: 100%;
  }

  .settings-system-actions {
    flex-direction: column;
  }
}
.password-reset-result {
  border: 1px solid #b8ddd5;
  background: #f2fbf8;
  color: #173f38;
  padding: 16px;
  border-radius: 6px;
  line-height: 1.5;
}

.password-reset-result strong { display: block; margin-bottom: 4px; }
.password-reset-result p { margin: 0; }
.camera-enrollment-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.camera-enrollment-form > input[type="hidden"],
.camera-enrollment-form .camera-advanced-source,
.camera-enrollment-form .camera-warm-option,
.camera-enrollment-form .camera-verification-panel,
.camera-enrollment-form .camera-enrollment-actions {
  grid-column: 1 / -1;
}

.camera-advanced-source {
  border-top: 1px solid #d9e3e8;
  padding-top: 14px;
}

.camera-advanced-source summary {
  color: #496176;
  cursor: pointer;
  font-weight: 700;
  margin-bottom: 12px;
}

.camera-warm-option {
  align-items: center;
  display: flex !important;
  flex-direction: row !important;
  gap: 9px;
}

.camera-warm-option input {
  height: 18px;
  width: 18px;
}

.camera-verification-panel {
  background: #f7fafb;
  border: 1px solid #d7e2e7;
  border-radius: 6px;
  padding: 16px;
}

.camera-verification-panel > div {
  align-items: center;
  display: flex;
  gap: 9px;
}

.camera-state-dot {
  background: #8da0ad;
  border-radius: 50%;
  height: 9px;
  width: 9px;
}

.camera-verification-panel[data-state="verifying"] .camera-state-dot {
  animation: camera-state-pulse 1.2s infinite;
  background: #e59b16;
}

.camera-verification-panel[data-state="ready"] .camera-state-dot,
.camera-verification-panel[data-state="online"] .camera-state-dot {
  background: #07966f;
}

.camera-verification-panel[data-state="failed"] .camera-state-dot {
  background: #d9364f;
}

.camera-verification-panel p {
  color: #5c7082;
  margin: 8px 0 0;
}

.camera-verification-panel video {
  aspect-ratio: 16 / 9;
  background: #071513;
  margin-top: 14px;
  max-height: 360px;
  object-fit: contain;
  width: 100%;
}

.camera-enrollment-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.camera-enrollment-actions button {
  min-width: 160px;
}

.camera-enrollment-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

@keyframes camera-state-pulse {
  50% { opacity: 0.35; }
}

@media (max-width: 720px) {
  .camera-enrollment-form { grid-template-columns: 1fr; }
  .camera-enrollment-actions { flex-direction: column; }
  .camera-enrollment-actions button { width: 100%; }
}
