:root {
  --bg: #eef3f8;
  --panel: #f8fbff;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.72);
  --line: rgba(10, 37, 28, 0.1);
  --line-strong: rgba(10, 37, 28, 0.16);
  --text: #000000;
  --muted: #4f5b66;
  --brand: #4DA3FF;
  --brand-deep: #1F5A8B;
  --accent: #f1a208;
  --danger: #c74a45;
  --gray: #7f8d87;
  --shadow: 0 24px 60px rgba(27, 61, 52, 0.12);
  --shadow-soft: 0 18px 40px rgba(27, 61, 52, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --scrollbar-radius: 999px;
  --scrollbar-track-radius: 999px;
}

* {
  box-sizing: border-box;
}

.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;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(77, 163, 255, 0.18), transparent 28%),
    radial-gradient(circle at right 10%, rgba(241, 162, 8, 0.18), transparent 24%),
    linear-gradient(180deg, #f5f9ff 0%, #ebf2fb 100%);
  color: var(--text);
  min-height: 100vh;
  scrollbar-width: auto;
  scrollbar-color: transparent transparent;
}

body.primary-loading {
  overflow: hidden;
}

body.primary-loading .app-shell {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.primary-loading .dashboard-loading-screen {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.dashboard-loading-screen {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(77, 163, 255, 0.16), transparent 30%),
    radial-gradient(circle at right 14%, rgba(15, 42, 68, 0.1), transparent 24%),
    linear-gradient(180deg, rgba(245, 249, 255, 0.96), rgba(235, 242, 251, 0.98));
  backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.34s ease, visibility 0.34s ease;
}

.app-shell {
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.dashboard-loading-screen.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.dashboard-loading-panel {
  position: relative;
  width: min(560px, 100%);
  padding: 28px 28px 24px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow: 0 28px 72px rgba(15, 42, 68, 0.16);
  overflow: hidden;
  display: grid;
  gap: 22px;
}

.dashboard-loading-brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.dashboard-loading-mark {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at top, rgba(77, 163, 255, 0.14), transparent 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(232, 241, 251, 0.92));
  border: 1px solid rgba(77, 163, 255, 0.14);
  flex: 0 0 auto;
}

.dashboard-loading-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  display: block;
}

.dashboard-loading-copy {
  display: grid;
  gap: 8px;
}

.dashboard-loading-copy .eyebrow {
  margin: 0;
}

.dashboard-loading-copy h1 {
  margin: 0;
  font-size: clamp(1.56rem, 2.8vw, 2.08rem);
  line-height: 1.04;
  color: #0f2a44;
  letter-spacing: -0.02em;
}

.dashboard-loading-copy p:last-child {
  margin: 0;
  color: rgba(15, 42, 68, 0.72);
  font-size: 0.96rem;
  line-height: 1.5;
}

.dashboard-loading-bars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
  min-height: 126px;
}

.dashboard-loading-bar {
  border-radius: 999px 999px 20px 20px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.2)),
    linear-gradient(180deg, rgba(15, 42, 68, 0.9), rgba(77, 163, 255, 0.72));
  background-size: 220px 100%, 100% 100%;
  animation: dashboardLoadingBars 1.26s ease-in-out infinite alternate, skeletonShimmer 1.3s linear infinite;
  transform-origin: bottom center;
}

.dashboard-loading-bar.bar-1 { height: 52%; animation-delay: 0s, 0s; }
.dashboard-loading-bar.bar-2 { height: 82%; animation-delay: 0.08s, 0.08s; }
.dashboard-loading-bar.bar-3 { height: 66%; animation-delay: 0.16s, 0.16s; }
.dashboard-loading-bar.bar-4 { height: 92%; animation-delay: 0.24s, 0.24s; }

.dashboard-loading-sheen {
  position: absolute;
  inset: auto 0 0;
  height: 80px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.32));
  pointer-events: none;
}

button,
select,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  align-items: start;
}

.sidebar {
  background: linear-gradient(180deg, #0F2A44 0%, #1F5A8B 100%);
  color: #f5fff9;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100vh;
  max-height: 100vh;
  overflow-y: hidden;
  overflow-x: hidden;
  position: fixed;
  top: 0;
  left: 0;
  width: 320px;
  z-index: 30;
  transform: translateX(0);
  transition: transform 0.3s ease;
  scrollbar-gutter: stable;
}

body:hover,
body:focus-within {
  scrollbar-color: rgba(77, 163, 255, 0.45) transparent;
}

body::-webkit-scrollbar,
.sidebar::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

body::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: var(--scrollbar-radius);
  border: 3px solid transparent;
  background-clip: padding-box;
}

body::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track {
  background: transparent;
  border-radius: var(--scrollbar-track-radius);
}

body:hover::-webkit-scrollbar-thumb,
body:focus-within::-webkit-scrollbar-thumb,
.sidebar:hover::-webkit-scrollbar-thumb,
.sidebar:focus-within::-webkit-scrollbar-thumb {
  background: rgba(77, 163, 255, 0.45);
}

.brand,
.profile-card,
.nav-item,
.section-card,
.surface-card,
.trend-card,
.hero-card,
.table-card,
.editor-shell {
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.05);
}

.brand-button {
  width: 100%;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.brand h1 {
  font-size: 0.92rem;
  line-height: 1.15;
  margin: 0;
}

.brand-mark {
  width: 50px;
  height: 50px;
  border-radius: 0;
  background: none;
  overflow: visible;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: none;
  border: 0;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f1a208, #ffe4a8);
  color: #173229;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  overflow: hidden;
  flex: 0 0 auto;
}

.avatar.has-image {
  background: transparent;
  color: transparent;
}

.avatar-large {
  width: 108px;
  height: 108px;
  font-size: 1.7rem;
}

.avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.sidebar .eyebrow {
  color: rgba(245, 255, 249, 0.56);
}

.hero-card h3,
.trend-card h3,
.surface-card h3,
.section-card h3,
.topbar h2,
.editor-header h3 {
  margin: 0;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  color: inherit;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  min-height: 60px;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.profile-card:hover,
.profile-card:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(8, 20, 33, 0.16);
}

.profile-card-docked {
  margin-top: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.profile-copy {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  flex: 1 1 auto;
}

.profile-copy strong {
  font-size: 0.86rem;
  font-weight: 700;
}

.profile-copy strong,
.table-title h3,
.table-title p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-card-arrow {
  flex: 0 0 auto;
  font-size: 0.96rem;
  line-height: 1;
  color: rgba(245, 255, 249, 0.62);
}

.sidebar-profile-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-top: 10px;
  flex: 0 0 auto;
  position: relative;
}

.collapsed-profile-menu {
  position: absolute;
  left: calc(100% + 12px);
  bottom: 0;
  width: 224px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(9, 23, 38, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 22px 50px rgba(4, 10, 18, 0.34);
  display: grid;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px) scale(0.98);
  transform-origin: bottom left;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  z-index: 1600;
}

.collapsed-profile-menu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.collapsed-profile-menu-button {
  width: 100%;
  border: 0;
  background: rgba(255, 255, 255, 0.06);
  color: #f6fbff;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.collapsed-profile-menu-button:hover,
.collapsed-profile-menu-button:focus-visible {
  background: rgba(77, 163, 255, 0.18);
  transform: translateY(-1px);
}

.collapsed-profile-menu-button.is-logout {
  background: rgba(199, 74, 69, 0.12);
  color: #ffb5af;
}

.collapsed-profile-menu-button.is-logout:hover,
.collapsed-profile-menu-button.is-logout:focus-visible {
  background: rgba(199, 74, 69, 0.22);
}

.collapsed-profile-menu-icon {
  width: 18px;
  min-width: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.98rem;
  line-height: 1;
}

.sidebar-logout-button {
  width: 60px;
  min-width: 60px;
  height: 60px;
  border-radius: 16px;
  background: rgba(199, 74, 69, 0.16);
  color: #ff9a93;
  border: 1px solid rgba(199, 74, 69, 0.34);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.sidebar-logout-button:hover,
.sidebar-logout-button:focus-visible {
  background: rgba(199, 74, 69, 0.24);
  color: #ffd0cc;
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(8, 20, 33, 0.16);
}

.sidebar-logout-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-logout-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
}

.sidebar-toggle {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 14px;
  cursor: pointer;
  flex: 0 0 auto;
}

.sidebar-toggle-mobile {
  display: none;
}

.sidebar-footer p {
  color: rgba(245, 255, 249, 0.72);
  margin: 0;
  font-size: 0.92rem;
}

.sidebar-main {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.client-branding {
  display: grid;
  place-items: center;
  width: 100%;
  padding: 0;
  margin: 4px 0 14px;
  flex: 0 0 auto;
  overflow: hidden;
}

.client-branding[hidden] {
  display: none !important;
}

.client-branding-image {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 168px;
  object-fit: contain;
  object-position: center;
  background: transparent;
}

.client-switcher {
  display: block;
  width: 100%;
  min-width: 0;
  margin-bottom: 14px;
}

.client-switcher label {
  font-size: 0.82rem;
  color: rgba(245, 255, 249, 0.72);
}

.client-switcher select {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.08));
  color: #f5fff9;
  border-radius: 16px;
  padding: 10px 36px 10px 16px;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.2;
  appearance: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background-image:
    linear-gradient(45deg, transparent 50%, #f5fff9 50%),
    linear-gradient(135deg, #f5fff9 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.client-switcher select:focus {
  outline: none;
  border-color: rgba(77, 163, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(77, 163, 255, 0.14);
}

.client-switcher select option {
  color: var(--text);
  background: #ffffff;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-content: start;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 6px;
  margin-right: -6px;
  scrollbar-width: auto;
  scrollbar-color: transparent transparent;
}

.sidebar-nav:hover,
.sidebar-nav:focus-within {
  scrollbar-color: rgba(77, 163, 255, 0.45) transparent;
}

.sidebar-nav::-webkit-scrollbar {
  width: 12px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: var(--scrollbar-radius);
  border: 3px solid transparent;
  background-clip: padding-box;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
  border-radius: var(--scrollbar-track-radius);
}

.sidebar-nav:hover::-webkit-scrollbar-thumb,
.sidebar-nav:focus-within::-webkit-scrollbar-thumb {
  background: rgba(77, 163, 255, 0.45);
}

.nav-item {
  border-radius: 16px;
  padding: 10px 16px;
  background: transparent;
  color: rgba(245, 255, 249, 0.8);
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0;
  min-height: 58px;
  user-select: none;
  transform-origin: center;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease;
}

.nav-item.is-dragging {
  opacity: 0.96;
  cursor: grabbing;
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 16px 28px rgba(8, 20, 33, 0.28);
  background: linear-gradient(135deg, rgba(31, 90, 139, 0.98), rgba(77, 163, 255, 0.52));
  color: #ffffff;
  z-index: 2;
}

.nav-item[data-menu-drag] {
  cursor: grab;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.nav-item.is-drag-armed {
  box-shadow: inset 0 0 0 1px rgba(77, 163, 255, 0.32), 0 10px 18px rgba(8, 20, 33, 0.14);
  transform: translateY(-1px);
}

.nav-item.is-drag-over {
  box-shadow: inset 0 0 0 1px rgba(207, 229, 255, 0.42);
  transform: translateY(-1px);
}

.nav-item.active,
.nav-item:hover {
  background: linear-gradient(135deg, rgba(31, 90, 139, 0.92), rgba(77, 163, 255, 0.38));
  color: #ffffff;
}

.nav-item[data-section="serviceMonitor"],
.nav-item[data-section="alarms"] {
  min-height: 86px;
  padding: 16px 16px;
}

.nav-item-label {
  font-weight: 700;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 20px;
}

.nav-item-icon {
  width: 20px;
  min-width: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.08rem;
  line-height: 1;
  opacity: 0.92;
}

.nav-item-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
}

.nav-item-meta {
  font-size: 0.76rem;
  color: rgba(245, 255, 249, 0.66);
  min-height: 1em;
  line-height: 1.2;
  display: flex;
  align-items: center;
  margin-top: 4px;
}

.nav-item[data-section="serviceMonitor"] .nav-item-meta,
.nav-item[data-section="alarms"] .nav-item-meta {
  margin-top: 8px;
  padding-right: 12px;
}

.nav-item-meta.is-ok {
  color: #79e4aa;
}

#serviceMonitorNavMeta.is-contrast {
  color: #ffffff;
}

.nav-item-meta.is-warning {
  color: #ffd479;
}

.nav-item-meta.is-critical {
  color: #ff8c8c;
}

.nav-item-meta:empty {
  display: none;
  margin-top: 0;
}

.profile-reload-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 18, 31, 0.58);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.profile-reload-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.profile-reload-dialog {
  position: relative;
  width: min(100%, 380px);
  padding: 22px 18px 18px;
  border-radius: 20px;
  background: #ffffff;
  color: #12263a;
  box-shadow: 0 28px 70px rgba(7, 18, 31, 0.28);
}

.profile-reload-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.profile-reload-copy {
  display: grid;
  gap: 10px;
}

.profile-reload-copy .eyebrow {
  margin-bottom: 0;
  color: #5c7288;
}

.profile-reload-copy h3 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.2;
  color: #12263a;
}

.profile-reload-copy p:last-child {
  margin: 0;
  color: #24384d;
  line-height: 1.5;
}

.profile-reload-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-start;
}

.invite-result-dialog {
  width: min(100%, 520px);
}

.invite-result-copy {
  gap: 12px;
}

.invite-result-summary,
.invite-result-details {
  display: grid;
  gap: 10px;
}

.invite-result-summary {
  padding: 14px;
  border-radius: 16px;
  background: rgba(15, 42, 68, 0.06);
  color: #16324c;
}

.invite-result-summary.is-success {
  background: rgba(28, 152, 92, 0.12);
  color: #125032;
}

.invite-result-summary.is-error {
  background: rgba(201, 48, 44, 0.12);
  color: #7f1d1d;
}

.invite-result-summary.is-partial {
  background: rgba(196, 121, 14, 0.14);
  color: #7a4b08;
}

.invite-result-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.72);
}

.invite-result-detail-card {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(15, 42, 68, 0.12);
  background: #f8fbff;
  color: #17324b;
}

.invite-result-detail-card.is-error {
  border-color: rgba(201, 48, 44, 0.18);
  background: rgba(255, 240, 240, 0.86);
}

.invite-result-detail-card strong,
.invite-result-detail-card span {
  display: block;
}

.invite-result-detail-card span + span,
.invite-result-detail-card strong + span {
  margin-top: 4px;
}

.invite-result-reason {
  color: #8a2f2f;
}

.invite-result-help {
  color: #5c7288;
}

.invite-result-actions {
  gap: 10px;
  flex-wrap: wrap;
}

.payload-disclosure {
  border: 1px solid rgba(16, 62, 104, 0.12);
  border-radius: 14px;
  background: rgba(239, 246, 255, 0.72);
  overflow: hidden;
  min-width: 260px;
}

.payload-disclosure summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  font-weight: 700;
  color: #0f2a44;
}

.payload-disclosure summary::-webkit-details-marker {
  display: none;
}

.payload-summary-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.payload-summary-title::before {
  content: "+";
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(31, 90, 139, 0.12);
  color: #1f5a8b;
  font-size: 0.95rem;
  line-height: 1;
}

.payload-disclosure[open] .payload-summary-title::before {
  content: "−";
}

.payload-summary-meta {
  font-size: 0.74rem;
  color: #49657d;
  font-weight: 600;
}

.payload-body {
  padding: 0 12px 12px;
}

.payload-group {
  display: grid;
  gap: 10px;
}

.payload-entry {
  border-left: 2px solid rgba(31, 90, 139, 0.14);
  padding-left: 12px;
  display: grid;
  gap: 4px;
}

.cell-disclosure {
  margin-top: 8px;
  border: 1px solid rgba(15, 42, 68, 0.1);
  border-radius: 12px;
  background: rgba(245, 249, 255, 0.9);
  overflow: hidden;
}

.cell-disclosure summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
}

.cell-disclosure summary::-webkit-details-marker {
  display: none;
}

.cell-disclosure-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #18446d;
}

.cell-disclosure-title::before {
  content: "+";
  width: 16px;
  height: 16px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(31, 90, 139, 0.12);
  color: #1f5a8b;
  font-size: 0.86rem;
  line-height: 1;
}

.cell-disclosure[open] .cell-disclosure-title::before {
  content: "−";
}

.cell-disclosure-meta {
  font-size: 0.7rem;
  color: #617b93;
  font-weight: 700;
  text-align: right;
}

.cell-disclosure-body {
  display: grid;
  gap: 8px;
  padding: 0 10px 10px;
}

.cell-disclosure-entry {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(31, 90, 139, 0.08);
}

.cell-disclosure-entry-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0f2a44;
  line-height: 1.25;
}

.cell-disclosure-entry-meta {
  font-size: 0.72rem;
  color: #49657d;
  line-height: 1.25;
}

.cell-disclosure-entry-subtle {
  font-size: 0.68rem;
  color: #7a93aa;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.payload-label-row {
  display: flex;
  align-items: center;
  min-height: 18px;
}

.payload-label {
  font-size: 0.73rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
  color: #4a6985;
}

.payload-value {
  display: grid;
  gap: 8px;
}

.payload-primitive {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #12263a;
}

.sidebar-footer {
  margin-top: auto;
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.05);
  display: grid;
  gap: 8px;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #4DA3FF;
  box-shadow: 0 0 0 6px rgba(77, 163, 255, 0.12);
}

.main-panel {
  padding: 34px;
  min-width: 0;
  margin-left: 320px;
  transition: margin-left 0.3s ease;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  gap: 18px;
}

.topbar-title {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.topbar-side {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.topbar-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  min-height: 44px;
}

.system-health-indicator {
  position: relative;
  min-height: 52px;
  min-width: min(320px, 100%);
  padding: 10px 16px 10px 14px;
  border-radius: 18px;
  border: 1px solid rgba(77, 163, 255, 0.14);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
}

.system-health-glow {
  position: absolute;
  inset: auto auto -18px -12px;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: rgba(77, 163, 255, 0.12);
  filter: blur(18px);
  z-index: 0;
  transition: background 0.2s ease;
}

.system-health-copy,
.system-health-dot {
  position: relative;
  z-index: 1;
}

.system-health-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #9ca3af;
  box-shadow: 0 0 0 8px rgba(156, 163, 175, 0.14), 0 0 20px rgba(156, 163, 175, 0.26);
  flex: 0 0 auto;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.system-health-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  text-align: left;
}

.system-health-copy strong {
  font-size: 0.86rem;
  line-height: 1.15;
  color: #0f2a44;
}

.system-health-copy span {
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.system-health-indicator.is-ok .system-health-dot {
  background: #16a34a;
  box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.16), 0 0 24px rgba(34, 197, 94, 0.3);
}

.system-health-indicator.is-ok .system-health-glow {
  background: rgba(34, 197, 94, 0.16);
}

.system-health-indicator.is-warning .system-health-dot {
  background: #f59e0b;
  box-shadow: 0 0 0 8px rgba(245, 158, 11, 0.16), 0 0 24px rgba(245, 158, 11, 0.28);
}

.system-health-indicator.is-warning .system-health-glow {
  background: rgba(245, 158, 11, 0.16);
}

.system-health-indicator.is-critical .system-health-dot {
  background: #dc2626;
  box-shadow: 0 0 0 8px rgba(220, 38, 38, 0.16), 0 0 24px rgba(220, 38, 38, 0.28);
}

.system-health-indicator.is-critical .system-health-glow {
  background: rgba(220, 38, 38, 0.16);
}

.system-health-indicator.is-loading {
  cursor: progress;
}

.system-health-indicator.is-loading .system-health-dot {
  background: #94a3b8;
  box-shadow: 0 0 0 8px rgba(148, 163, 184, 0.12), 0 0 20px rgba(148, 163, 184, 0.18);
}

@media (max-width: 1180px) {
  body.sidebar-collapsed .sidebar {
    transform: translateX(-100%);
  }

  body.sidebar-collapsed .main-panel {
    margin-left: 0;
  }
}

@media (min-width: 1181px) {
  body.sidebar-collapsed .sidebar {
    width: 92px;
    padding: 18px 12px;
    transform: translateX(0);
    gap: 14px;
    overflow-x: visible;
    overflow-y: visible;
    z-index: 1500;
  }

  body.sidebar-collapsed .main-panel {
    margin-left: 92px;
  }

  body.sidebar-collapsed .brand {
    justify-content: center;
    padding: 6px;
    background: transparent;
    border-color: transparent;
  }

  body.sidebar-collapsed .brand h1,
  body.sidebar-collapsed .client-branding,
  body.sidebar-collapsed .client-switcher,
  body.sidebar-collapsed .nav-item-meta,
  body.sidebar-collapsed .profile-copy,
  body.sidebar-collapsed .profile-card-arrow,
  body.sidebar-collapsed .sidebar-logout-button,
  body.sidebar-collapsed .menu-prefs-panel {
    display: none !important;
  }

  body.sidebar-collapsed .sidebar-main {
    gap: 10px;
    flex: 1 1 auto;
    min-height: 0;
    overflow: visible;
  }

  body.sidebar-collapsed .sidebar-nav {
    align-items: center;
    flex: 1 1 auto;
    min-height: 0;
    padding-right: 0;
    margin-right: 0;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none;
  }

  body.sidebar-collapsed .sidebar-nav::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  body.sidebar-collapsed .sidebar-nav .nav-item,
  body.sidebar-collapsed .sidebar-nav .menu-prefs-toggle {
    width: 64px;
    min-height: 64px !important;
    padding: 10px 4px !important;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    align-self: center;
    overflow: hidden;
  }

  body.sidebar-collapsed .sidebar-nav .nav-item-label,
  body.sidebar-collapsed .sidebar-nav .menu-prefs-toggle {
    font-size: 0;
    line-height: 0;
    gap: 0;
    justify-content: center;
  }

  body.sidebar-collapsed .sidebar-nav .nav-item-icon {
    width: 34px;
    min-width: 34px;
    font-size: 1.6rem;
    line-height: 1;
    margin: 0;
  }

  body.sidebar-collapsed .sidebar-nav .menu-prefs-toggle {
    display: none !important;
  }

  body.sidebar-collapsed .sidebar-nav .nav-item,
  body.sidebar-collapsed .profile-card.profile-card-docked {
    position: relative;
    overflow: visible;
  }

  body.sidebar-collapsed .sidebar-nav .nav-item::after,
  body.sidebar-collapsed .profile-card.profile-card-docked::after {
    content: attr(data-collapsed-label);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(-6px);
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(9, 23, 38, 0.94);
    color: #f8fbff;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
    box-shadow: 0 14px 28px rgba(6, 18, 31, 0.24);
    border: 1px solid rgba(255, 255, 255, 0.08);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 50;
  }

  body.sidebar-collapsed .sidebar-nav .nav-item::before,
  body.sidebar-collapsed .profile-card.profile-card-docked::before {
    content: "";
    position: absolute;
    left: calc(100% + 6px);
    top: 50%;
    transform: translateY(-50%) translateX(-6px);
    border-width: 7px;
    border-style: solid;
    border-color: transparent rgba(9, 23, 38, 0.94) transparent transparent;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 49;
  }

  body.sidebar-collapsed .sidebar-nav .nav-item:hover::after,
  body.sidebar-collapsed .sidebar-nav .nav-item:hover::before,
  body.sidebar-collapsed .sidebar-nav .nav-item:focus-visible::after,
  body.sidebar-collapsed .sidebar-nav .nav-item:focus-visible::before,
  body.sidebar-collapsed .profile-card.profile-card-docked:hover::after,
  body.sidebar-collapsed .profile-card.profile-card-docked:hover::before,
  body.sidebar-collapsed .profile-card.profile-card-docked:focus-visible::after,
  body.sidebar-collapsed .profile-card.profile-card-docked:focus-visible::before {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }

  body.sidebar-collapsed .sidebar-profile-row {
    justify-content: center;
    margin-top: 8px;
    flex: 0 0 auto;
    overflow: visible;
    z-index: 1600;
  }

  body.sidebar-collapsed .profile-card.profile-card-docked {
    width: 64px;
    min-width: 64px;
    min-height: 64px;
    padding: 0;
    justify-content: center;
    border-radius: 18px;
    flex: 0 0 auto;
  }

  body.sidebar-collapsed .profile-card.profile-card-docked .avatar {
    width: 42px;
    height: 42px;
  }
}

body.sidebar-collapsed .sidebar-nav .nav-item::before,
body.sidebar-collapsed .sidebar-nav .nav-item::after,
body.sidebar-collapsed .profile-card.profile-card-docked::before,
body.sidebar-collapsed .profile-card.profile-card-docked::after {
  display: none !important;
}

.collapsed-sidebar-tooltip {
  position: fixed;
  top: 0;
  left: 0;
  transform: translateY(-50%);
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(9, 23, 38, 0.96);
  color: #f8fbff;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  box-shadow: 0 14px 28px rgba(6, 18, 31, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 120;
}

.collapsed-sidebar-tooltip::before {
  content: "";
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border-width: 7px;
  border-style: solid;
  border-color: transparent rgba(9, 23, 38, 0.96) transparent transparent;
}

.collapsed-sidebar-tooltip.is-visible {
  opacity: 1;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ghost-button,
.primary-button,
.icon-button,
.filter-chip,
.sort-button {
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.ghost-button,
.primary-button {
  padding: 12px 16px;
  border-radius: 14px;
  cursor: pointer;
}

.ghost-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
}

.primary-button {
  background: linear-gradient(135deg, #4DA3FF 0%, #1F5A8B 100%);
  color: #ffffff;
}

.primary-button:hover,
.ghost-button:hover,
.icon-button:hover,
.filter-chip:hover,
.sort-button:hover {
  transform: translateY(-1px);
}

.icon-button {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.icon-button span {
  font-size: 1.1rem;
  line-height: 1;
}

.icon-button-strong {
  background: rgba(234, 243, 255, 0.92);
  border-color: rgba(77, 163, 255, 0.22);
  color: var(--brand-deep);
}

.icon-button.is-loading {
  position: relative;
  pointer-events: none;
  color: transparent;
}

.ghost-button.is-loading,
.primary-button.is-loading {
  position: relative;
  pointer-events: none;
  color: transparent;
}

.icon-button.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(23, 50, 41, 0.22);
  border-top-color: var(--brand);
  animation: spin 0.8s linear infinite;
}

.ghost-button.is-loading::after,
.primary-button.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(23, 50, 41, 0.22);
  border-top-color: var(--brand);
  animation: spin 0.8s linear infinite;
}

.refresh-status {
  min-height: 22px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.82rem;
  color: rgba(245, 255, 249, 0.76);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.refresh-status.show {
  opacity: 1;
  transform: translateY(0);
}

.refresh-status.success {
  color: #000000;
  background: rgba(234, 243, 255, 0.92);
  border-color: rgba(77, 163, 255, 0.22);
}

.refresh-status.error {
  color: #ffd6d3;
  background: rgba(199, 74, 69, 0.1);
  border-color: rgba(199, 74, 69, 0.2);
}

#refreshStatus:not(.show) {
  display: none;
}

#refreshStatus:not(.show) + #lastRefresh {
  margin-top: -4px;
}

#lastRefresh {
  line-height: 1.2;
}

.floating-refresh-badge {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 45;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(31, 90, 139, 0.92);
  color: #f5fff9;
  border: 1px solid rgba(207, 229, 255, 0.18);
  box-shadow: var(--shadow-soft);
  font-size: 0.82rem;
  line-height: 1.35;
  max-width: min(320px, calc(100vw - 24px));
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.floating-refresh-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.floating-refresh-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.floating-refresh-copy strong {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(234, 243, 255, 0.82);
}

.floating-monitor-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex: 0 0 auto;
  position: relative;
  cursor: help;
}

.floating-monitor-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #94a3b8;
  box-shadow: 0 0 0 5px rgba(148, 163, 184, 0.14);
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.floating-monitor-indicator.is-ok .floating-monitor-indicator-dot {
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.18);
}

.floating-monitor-indicator.is-warning .floating-monitor-indicator-dot {
  background: #f59e0b;
  box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.18);
}

.floating-monitor-indicator.is-critical .floating-monitor-indicator-dot {
  background: #ef4444;
  box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.18);
}

.floating-monitor-indicator.is-loading .floating-monitor-indicator-dot {
  background: #94a3b8;
  box-shadow: 0 0 0 5px rgba(148, 163, 184, 0.14);
}

.floating-monitor-indicator .info-tooltip-text {
  position: absolute;
  right: 0;
  bottom: calc(100% + 14px);
  width: 220px;
  max-width: min(220px, calc(100vw - 48px));
  padding: 10px 12px;
  border-radius: 14px;
  background: #173229;
  color: #f5fff9;
  font-size: 0.78rem;
  line-height: 1.4;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  white-space: normal;
  overflow-wrap: break-word;
  z-index: 30;
}

.floating-monitor-indicator:hover .info-tooltip-text,
.floating-monitor-indicator:focus-within .info-tooltip-text {
  opacity: 1;
  transform: translateY(0);
}

.floating-refresh-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floating-refresh-status {
  min-height: 1.1em;
  font-size: 0.74rem;
  color: rgba(234, 243, 255, 0.84);
}

.floating-refresh-status.show {
  color: rgba(245, 255, 249, 0.92);
}

.floating-refresh-status.success {
  color: #000000;
}

.floating-refresh-status.error {
  color: #ffd6d3;
}

.floating-refresh-button {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(245, 255, 249, 0.88);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.floating-refresh-button:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.16);
}

.toast-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 80;
  display: grid;
  gap: 12px;
  width: min(360px, calc(100vw - 24px));
  pointer-events: none;
}

.toast {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 18px 38px rgba(15, 42, 68, 0.18);
  backdrop-filter: blur(16px);
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.toast-success {
  background: rgba(244, 250, 255, 0.96);
  color: #0f2a44;
  border-color: rgba(77, 163, 255, 0.2);
}

.toast-error {
  background: rgba(76, 17, 16, 0.92);
  color: #fff3f2;
  border-color: rgba(255, 214, 211, 0.18);
}

.toast-indicator {
  width: 11px;
  height: 11px;
  margin-top: 4px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.08);
}

.toast-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.toast-copy strong {
  font-size: 0.84rem;
  line-height: 1.1;
}

.toast-copy span {
  font-size: 0.8rem;
  line-height: 1.45;
}

body.editor-active .floating-refresh-badge {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
}

.workspace-shell {
  position: relative;
  min-width: 0;
}

.content-column {
  min-width: 0;
}

.editor-drawer {
  position: fixed;
  top: 76px;
  right: 14px;
  bottom: 12px;
  width: min(660px, calc(100vw - 28px));
  opacity: 0;
  pointer-events: none;
  transform: translateX(26px);
  transition: transform 0.28s ease, opacity 0.2s ease;
  z-index: 35;
}

.editor-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.editor-shell {
  position: relative;
  height: 100%;
  background: var(--surface);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
  padding: 14px 16px 16px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  max-height: none;
  min-height: 0;
  overflow: hidden;
}

.editor-header,
.editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.editor-header {
  justify-content: flex-end;
  min-height: 36px;
}

.editor-header-copy {
  display: none;
}

.editor-body,
.editor-multiselect {
  display: grid;
  align-content: start;
  align-items: start;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  scrollbar-width: auto;
  scrollbar-color: transparent transparent;
  transition: scrollbar-color 0.18s ease;
}

.editor-body {
  gap: 12px;
  min-width: 0;
  padding-bottom: 4px;
  padding-right: 6px;
}

.editor-body > * {
  min-width: 0;
  align-self: start;
}

.editor-drawer[data-section="assets"] .editor-body {
  max-height: calc(100vh - 210px);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.editor-drawer[data-section="assets"] .point-history-access-card,
.editor-drawer[data-section="rules"] .editor-note,
.editor-drawer[data-section="rules"] .selected-tags,
.editor-drawer[data-section="rules"] .editor-inline-actions,
.editor-drawer[data-section="rules"] .editor-grid,
.editor-drawer[data-section="routes"] .editor-note,
.editor-drawer[data-section="routes"] .selected-tags,
.editor-drawer[data-section="routes"] .editor-inline-actions,
.editor-drawer[data-section="routes"] .editor-grid {
  align-self: start;
}

.editor-body:hover,
.editor-body:focus-within,
.editor-multiselect:hover,
.editor-multiselect:focus-within {
  scrollbar-color: rgba(77, 163, 255, 0.45) transparent;
}

.editor-body::-webkit-scrollbar,
.editor-multiselect::-webkit-scrollbar {
  width: 14px;
}

.editor-body::-webkit-scrollbar-thumb,
.editor-multiselect::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: var(--scrollbar-radius);
  border: 4px solid transparent;
  background-clip: padding-box;
}

.editor-body::-webkit-scrollbar-track,
.editor-multiselect::-webkit-scrollbar-track {
  background: transparent;
  border-radius: var(--scrollbar-track-radius);
}

.editor-body:hover::-webkit-scrollbar-thumb,
.editor-body:focus-within::-webkit-scrollbar-thumb,
.editor-multiselect:hover::-webkit-scrollbar-thumb,
.editor-multiselect:focus-within::-webkit-scrollbar-thumb {
  background: rgba(77, 163, 255, 0.45);
  border-radius: var(--scrollbar-radius);
  border: 4px solid transparent;
  background-clip: padding-box;
}

.editor-footer {
  display: grid;
  gap: 12px;
  background: rgba(255, 255, 255, 0.96);
  padding-top: 10px;
  border-top: 1px solid rgba(77, 163, 255, 0.14);
}

.editor-status {
  color: var(--muted);
  font-size: 0.88rem;
}

.editor-status.error {
  color: var(--danger);
}

.editor-status.success {
  color: #000000;
}

.editor-drawer.is-alarm-ack .editor-header-copy {
  display: grid;
  gap: 0;
}

.editor-drawer.is-alarm-ack .editor-header {
  justify-content: space-between;
  align-items: flex-start;
  min-height: 0;
  padding-bottom: 0;
}

.editor-drawer.is-alarm-ack .editor-body {
  gap: 0;
  padding-bottom: 0;
}

.editor-drawer.is-alarm-ack .editor-status,
.editor-drawer.is-alarm-ack .editor-delete-button {
  display: none !important;
}

.editor-drawer.is-alarm-ack .editor-footer {
  gap: 0;
  padding-top: 6px;
}

.editor-drawer.is-alarm-ack .editor-field {
  gap: 0;
}

.editor-grid-alarm-ack {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.editor-drawer.is-alarm-ack .editor-textarea {
  min-height: 92px;
}

.editor-inline-delete {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.editor-inline-delete .ghost-button {
  width: 100%;
  max-width: none;
}

.editor-alarm-subtitle {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  color: #7e8b86;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

@media (min-width: 769px) {
  .editor-drawer.is-alarm-ack .editor-shell {
    height: auto;
    min-height: 0;
    grid-template-rows: auto auto auto;
    gap: 6px;
  }

  .editor-drawer.is-alarm-ack .editor-body {
    align-content: start;
    overflow-y: visible;
  }

  .editor-drawer.is-alarm-ack .editor-grid-alarm-ack,
  .editor-drawer.is-alarm-ack .editor-field {
    align-content: start;
  }

  .editor-drawer.is-alarm-ack .editor-textarea {
    min-height: 74px;
  }

  .editor-drawer.is-alarm-ack .editor-footer {
    padding-top: 4px;
  }
}

.editor-grid {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.editor-create-flow {
  display: grid;
  gap: 12px;
  align-content: start;
}

.editor-create-flow .editor-note {
  margin: 0;
}

.editor-grid-scrollable {
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.editor-grid-scrollable [data-field-wrapper="name"],
.editor-grid-scrollable [data-field-wrapper="company"],
.editor-grid-scrollable [data-field-wrapper="role"],
.editor-grid-scrollable [data-field-wrapper="email"],
.editor-grid-scrollable [data-field-wrapper="active"],
.editor-grid-scrollable [data-field-wrapper="validation_status"] {
  min-width: 0;
}

.editor-grid-scrollable [data-field-wrapper="phone"],
.editor-grid-scrollable [data-field-wrapper="validation_code"],
.editor-grid-scrollable [data-field-wrapper="date_birth"] {
  grid-column: 1 / -1;
}

.editor-field {
  display: grid;
  gap: 8px;
}

.editor-field.is-hidden {
  display: none;
}

.editor-field label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.editor-help {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
}

.copy-template-field {
  margin-bottom: 4px;
}

.editor-field.is-readonly label {
  color: #7e8b86;
}

.editor-field.is-mixed label::after {
  content: " • Diversos";
  color: #ac6b00;
}

.editor-note {
  display: inline-flex;
  align-self: start;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(234, 243, 255, 0.92);
  color: var(--brand-deep);
  border: 1px solid rgba(77, 163, 255, 0.2);
  font-size: 0.88rem;
  line-height: 1.45;
  width: fit-content;
  max-width: 100%;
}

.selected-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

.selected-tag {
  display: inline-flex;
  align-items: center;
  max-width: min(100%, 280px);
  width: fit-content;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.editor-inline-actions {
  display: flex;
  justify-content: flex-start;
}

.editor-multiselect {
  gap: 8px;
  max-height: 180px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
}

.multi-option {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.code-action-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.phone-parts-field {
  display: grid;
  grid-template-columns: 92px 92px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
}

.phone-parts-field .editor-input {
  min-width: 0;
}

.panel-section {
  display: none;
}

.panel-section.is-active {
  display: block;
}

.dashboard-manager-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.dashboard-manager-shell.is-editing {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 22vw);
  align-items: start;
}

.dashboard-manager-main {
  min-width: 0;
}

.dashboard-manager-toggle {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 54;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(15, 42, 68, 0.12);
  background: rgba(255, 255, 255, 0.92);
  color: #0f2a44;
  box-shadow: 0 18px 40px rgba(15, 42, 68, 0.16);
  backdrop-filter: blur(16px);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.dashboard-manager-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 48px rgba(15, 42, 68, 0.18);
}

.dashboard-manager-toggle.is-active {
  background: linear-gradient(135deg, #0f2a44, #1f5a8b);
  color: #ffffff;
}

.dashboard-manager-toggle-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(77, 163, 255, 0.16);
  font-size: 0.94rem;
}

.dashboard-manager-toggle.is-active .dashboard-manager-toggle-icon {
  background: rgba(255, 255, 255, 0.16);
}

.dashboard-canvas {
  display: grid;
  gap: 18px;
  align-items: start;
}

.dashboard-canvas-group {
  display: grid;
  gap: 12px;
}

.dashboard-canvas-group-head {
  display: grid;
  gap: 4px;
  padding: 0 4px;
}

.dashboard-canvas-group-head h3,
.dashboard-canvas-group-head p {
  margin: 0;
}

.dashboard-canvas-grid {
  display: grid;
  gap: 18px;
  align-items: start;
}

.dashboard-canvas-grid-large {
  grid-template-columns: repeat(10, minmax(0, 1fr));
}

.dashboard-canvas-grid-small {
  grid-template-columns: repeat(10, minmax(0, 1fr));
}

.dashboard-card {
  position: relative;
  min-width: 0;
  align-self: stretch;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-card[hidden] {
  display: none !important;
}

.dashboard-card-span-7 {
  grid-column: span 6;
}

.dashboard-card-span-5 {
  grid-column: span 4;
}

.dashboard-card-span-3 {
  grid-column: span 2;
}

.dashboard-card-summary .hero-card,
.dashboard-card-samples .trend-card,
.dashboard-card-metric .dashboard-kpi-card {
  height: 100%;
}

.dashboard-card-summary .hero-card,
.dashboard-card-samples .trend-card {
  min-height: 340px;
}

.dashboard-card-metric .dashboard-kpi-card {
  min-height: 190px;
}

.dashboard-card-samples .trend-card {
  overflow: hidden;
}

.dashboard-card-editor-tools {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  display: none;
  align-items: center;
  gap: 8px;
}

.dashboard-manager-shell.is-editing .dashboard-card-editor-tools {
  display: inline-flex;
}

.dashboard-card-tool {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(15, 42, 68, 0.12);
  background: rgba(255, 255, 255, 0.92);
  color: #0f2a44;
  box-shadow: 0 10px 24px rgba(15, 42, 68, 0.12);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.dashboard-card-tool-handle {
  cursor: grab;
}

.dashboard-card-tool-handle:active {
  cursor: grabbing;
}

.dashboard-manager-shell.is-editing .dashboard-card:hover {
  transform: translateY(-2px);
}

.dashboard-card.is-drop-target-before::before,
.dashboard-card.is-drop-target-after::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0f2a44, #4da3ff);
  z-index: 5;
}

.dashboard-card.is-drop-target-before::before {
  top: -9px;
}

.dashboard-card.is-drop-target-after::after {
  bottom: -9px;
}

.dashboard-canvas.is-drop-target {
  outline: 2px dashed rgba(77, 163, 255, 0.5);
  outline-offset: 8px;
  border-radius: 24px;
}

.dashboard-canvas-grid.is-drop-target {
  outline: 2px dashed rgba(77, 163, 255, 0.42);
  outline-offset: 6px;
  border-radius: 24px;
  padding: 6px;
}

.dashboard-kpi-card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
  padding: 20px;
  min-height: 190px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.dashboard-kpi-card h3,
.dashboard-kpi-card p {
  margin: 0;
}

.dashboard-kpi-value {
  font-size: clamp(1.7rem, 2.6vw, 2.32rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: #0f2a44;
}

.dashboard-kpi-meta {
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.9rem;
}

.dashboard-manager-panel {
  display: none;
  min-width: 0;
}

.dashboard-manager-shell.is-editing .dashboard-manager-panel {
  display: block;
}

.dashboard-manager-panel-shell {
  position: sticky;
  top: 108px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(15, 42, 68, 0.08);
  border-radius: 26px;
  box-shadow: 0 24px 60px rgba(15, 42, 68, 0.12);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.dashboard-manager-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(15, 42, 68, 0.08);
}

.dashboard-manager-panel-header h3,
.dashboard-manager-panel-header p {
  margin: 0;
}

.dashboard-manager-panel-body {
  display: grid;
  gap: 18px;
  max-height: min(74vh, 900px);
  overflow-y: auto;
  padding: 16px 18px 20px;
}

.dashboard-manager-panel-actions {
  display: grid;
  gap: 10px;
}

.dashboard-manager-panel-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.dashboard-manager-panel-section {
  display: grid;
  gap: 12px;
}

.dashboard-manager-panel-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #0f2a44;
}

.dashboard-manager-panel-section-head span {
  font-size: 0.82rem;
  color: var(--muted);
}

.dashboard-manager-pill-grid,
.dashboard-manager-library-grid {
  display: grid;
  gap: 10px;
}

.dashboard-manager-library-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-manager-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(15, 42, 68, 0.06);
  border: 1px solid rgba(15, 42, 68, 0.08);
}

.dashboard-manager-pill.is-active {
  background: linear-gradient(180deg, rgba(77, 163, 255, 0.12), rgba(77, 163, 255, 0.06));
}

.dashboard-manager-pill span {
  font-weight: 600;
  color: #0f2a44;
}

.dashboard-manager-pill-action {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  flex: 0 0 auto;
}

.dashboard-library-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(15, 42, 68, 0.08);
  box-shadow: var(--shadow-soft);
  cursor: grab;
  min-height: 150px;
}

.dashboard-library-card:active {
  cursor: grabbing;
}

.dashboard-library-card h4,
.dashboard-library-card p {
  margin: 0;
}

.dashboard-manager-empty-mini {
  padding: 14px;
  border-radius: 16px;
  color: var(--muted);
  background: rgba(15, 42, 68, 0.04);
  border: 1px dashed rgba(15, 42, 68, 0.12);
}

.dashboard-canvas-empty {
  grid-column: 1 / -1;
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px dashed rgba(15, 42, 68, 0.14);
  color: #0f2a44;
  box-shadow: var(--shadow-soft);
}

.dashboard-canvas-empty h3,
.dashboard-canvas-empty p {
  margin: 0;
}

.dashboard-canvas-empty h3 {
  margin-top: 6px;
  margin-bottom: 8px;
}

.dashboard-card-samples .mini-chart {
  --chart-bar-width: minmax(10px, 1fr);
  --chart-bar-gap: clamp(6px, 1vw, 10px);
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding-top: 10px;
  grid-auto-flow: row;
  grid-auto-columns: auto;
  grid-template-columns: repeat(var(--chart-columns, 1), minmax(0, 1fr));
  justify-content: stretch;
  overflow: hidden;
}

.dashboard-card-samples .chart-bar-wrap {
  width: 100%;
  min-width: 0;
}

.dashboard-card-samples .chart-bar-hitbox {
  width: 100%;
  min-width: 0;
}

.dashboard-card-samples .chart-bar {
  width: min(100%, 28px);
}

.dashboard-card-samples .chart-label {
  width: 100%;
  text-align: center;
}

.hero-grid,
.content-grid,
.profile-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1.28fr);
  gap: 18px;
  margin-bottom: 22px;
}

.profile-grid {
  grid-template-columns: minmax(380px, 1.14fr) minmax(300px, 0.86fr);
  align-items: start;
}

.hero-card,
.trend-card,
.surface-card,
.section-card,
.table-card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
  padding: 20px;
}

.hero-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  background:
    linear-gradient(135deg, #0F2A44, #1F5A8B),
    var(--surface-strong);
  color: #ffffff;
  min-height: 198px;
  padding: 22px 20px 20px;
  text-align: center;
}

.hero-card .eyebrow,
.hero-card #heroClientMeta,
.hero-card .hero-stat-label {
  color: rgba(245, 250, 255, 0.8);
}

.hero-copy {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  flex: 0 1 auto;
  align-self: center;
  align-content: center;
  justify-items: center;
  justify-self: center;
  text-align: center;
  min-width: 0;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  padding: 10px 0 0;
  gap: 16px;
}

.hero-copy p,
.hero-copy h3,
.hero-copy span {
  max-width: 390px;
  margin: 0;
}

.hero-copy p,
.hero-copy h3,
.hero-copy span,
.hero-stat-stack strong {
  color: #ffffff;
}

.hero-copy h3 {
  font-size: clamp(3.2rem, 5.2vw, 4.4rem);
  line-height: 0.94;
  letter-spacing: -0.03em;
  text-shadow: 0 8px 24px rgba(5, 17, 28, 0.18);
}

.hero-copy .eyebrow {
  margin-bottom: 0;
  font-size: 1.08rem;
  letter-spacing: 0.16em;
  font-weight: 700;
}

#heroClientMeta {
  display: none;
}

.hero-stat-stack {
  display: none;
  flex: 0 0 auto;
  align-self: center;
  align-content: center;
  justify-items: center;
  justify-self: center;
  text-align: center;
  gap: 14px;
  min-width: 164px;
  width: 100%;
  max-width: 220px;
  margin: 0 auto;
}

.hero-stat-stack > div {
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 100%;
}

.hero-stat-label,
.metric-label {
  display: block;
  font-size: 0.84rem;
  margin-bottom: 6px;
}

.metric-label {
  color: var(--muted);
}

.hero-stat-stack strong {
  font-size: 1.64rem;
}

.trend-card {
  min-height: 340px;
  padding: 22px 24px 22px;
}

.trend-card .card-heading {
  margin-bottom: 10px;
}

.kpi-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 22px;
}

.service-monitor-screen {
  display: grid;
  gap: 12px;
}

.service-monitor-overview {
  display: grid;
  gap: 10px;
}

.topbar-actions.is-service-monitor {
  align-items: flex-start;
  justify-content: flex-end;
  min-height: 0;
}

.service-monitor-status-card {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  min-height: 0;
  padding: 12px 14px;
  background:
    linear-gradient(135deg, rgba(15, 42, 68, 0.98), rgba(31, 90, 139, 0.94)),
    var(--surface);
  color: #f7fbff;
}

.service-monitor-status-card-topbar {
  width: min(100%, 260px);
}

.service-monitor-status-card .eyebrow,
.service-monitor-status-card .service-monitor-note,
.service-monitor-status-card .service-monitor-meta-line {
  color: rgba(234, 243, 255, 0.82);
}

.service-monitor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.service-monitor-copy,
.service-monitor-summary {
  display: grid;
  gap: 4px;
}

.service-monitor-summary {
  align-content: start;
  justify-items: start;
}

.service-monitor-copy-hero {
  min-height: 100%;
  place-content: center;
  text-align: center;
}

.service-monitor-copy-hero h3 {
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.service-monitor-copy h3,
.service-monitor-copy p,
.service-monitor-summary h3,
.service-monitor-summary p {
  margin: 0;
}

.service-monitor-summary h3 {
  font-size: 1.26rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

.service-monitor-meta-line {
  font-size: 0.82rem;
  line-height: 1.4;
}

.service-monitor-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.service-monitor-host-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.service-monitor-host-card,
.service-monitor-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

.service-monitor-host-card {
  display: grid;
  gap: 4px;
  min-height: 108px;
  padding: 12px 14px;
}

.service-monitor-host-card strong {
  font-size: 1.26rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

.service-monitor-host-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.service-monitor-host-note {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}

.service-monitor-overview-loading,
.service-monitor-loading-grid {
  pointer-events: none;
}

.service-monitor-loading-card {
  overflow: hidden;
}

.service-monitor-loading-head,
.service-monitor-loading-copy,
.service-monitor-loading-details {
  display: grid;
  gap: 10px;
}

.danger-button {
  background: linear-gradient(135deg, #c74a45, #db6a64);
  border-color: rgba(199, 74, 69, 0.34);
}

.danger-outline {
  border-color: rgba(199, 74, 69, 0.22);
  color: #9f3834;
  background: rgba(199, 74, 69, 0.06);
}

.delete-confirm-card,
.delete-confirm-copy,
.delete-confirm-impact {
  display: grid;
  gap: 12px;
}

.delete-confirm-copy p,
.delete-confirm-impact p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.delete-confirm-impact {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(15, 42, 68, 0.04);
  border: 1px solid rgba(15, 42, 68, 0.08);
}

.service-monitor-error {
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(199, 74, 69, 0.2);
  background: rgba(199, 74, 69, 0.08);
  color: #8c2f2a;
  font-size: 0.88rem;
  line-height: 1.45;
}

.service-monitor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.service-monitor-card {
  display: grid;
  gap: 10px;
}

.service-monitor-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.service-monitor-card-title {
  display: grid;
  gap: 8px;
}

.service-monitor-card-title h4,
.service-monitor-card-title p {
  margin: 0;
}

.service-monitor-card-title h4 {
  font-size: 1rem;
  line-height: 1.2;
}

.service-monitor-card-title p {
  font-size: 0.82rem;
  color: var(--muted);
}

.service-monitor-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #9ca3af;
  box-shadow: 0 0 0 8px rgba(156, 163, 175, 0.12);
  flex: 0 0 auto;
}

.service-monitor-dot.is-ok {
  background: #22c55e;
  box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.14);
}

.service-monitor-dot.is-warning {
  background: #f59e0b;
  box-shadow: 0 0 0 8px rgba(245, 158, 11, 0.14);
}

.service-monitor-dot.is-critical {
  background: #ef4444;
  box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.14);
}

.service-monitor-status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.service-monitor-status-pill.is-ok {
  color: #106b31;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.2);
}

.service-monitor-status-pill.is-warning {
  color: #9a6700;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.2);
}

.service-monitor-status-pill.is-critical {
  color: #9f2020;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.2);
}

.service-monitor-details {
  display: grid;
  gap: 9px;
}

.service-monitor-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-size: 0.86rem;
}

.service-monitor-row span:first-child {
  color: var(--muted);
}

.service-monitor-row strong {
  font-size: 0.88rem;
  text-align: right;
}

.service-monitor-note {
  font-size: 0.82rem;
  line-height: 1.45;
}

.kpi-card {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 8px;
  border-radius: 20px;
  min-height: 126px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
}

.kpi-card strong {
  font-size: 1.72rem;
  line-height: 1;
}

.kpi-card-loading {
  display: grid;
  gap: 12px;
}

.table-screen {
  min-width: 0;
  min-height: 0;
  height: calc(100vh - 178px);
  max-height: calc(100vh - 178px);
  display: grid;
}

.table-card {
  display: grid;
  gap: 12px;
  position: relative;
  isolation: isolate;
  overflow: visible;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 0;
  height: 100%;
}

.table-card-loading,
.table-toolbar-loading,
.table-loading-shell,
.table-loading-grid,
.table-loading-row {
  display: grid;
}

.table-loading-shell {
  gap: 18px;
}

.table-loading-grid {
  gap: 12px;
}

.table-loading-row {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.table-title p,
.table-title h3 {
  margin: 0;
}

.table-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  position: relative;
  z-index: 20;
  overflow: visible;
}

.toolbar-left,
.toolbar-right {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.toolbar-right {
  justify-content: flex-end;
  position: relative;
  z-index: 60;
  overflow: visible;
}

.column-picker {
  position: relative;
  z-index: 70;
}
.column-picker-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  max-height: 280px;
  overflow: auto;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  display: none;
  z-index: 120;
}

.column-picker-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.column-picker-panel-head strong {
  font-size: 0.9rem;
  color: var(--text);
}

.column-picker-close {
  width: 30px;
  height: 30px;
  padding: 0;
  flex: 0 0 auto;
}

.column-picker-panel-body {
  display: grid;
  gap: 10px;
}

.toolbar-extras {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.date-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted);
}

.date-filter input {
  border: 0;
  background: transparent;
  color: var(--text);
}

.column-picker.is-open .column-picker-panel {
  display: grid;
  gap: 10px;
}

.column-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.92rem;
}

.column-option-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.column-option-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.column-move-button {
  width: 32px;
  height: 32px;
  padding: 0;
}

.filter-chip-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.table-filter-summary {
  color: var(--muted);
  font-size: 0.84rem;
  min-width: 0;
}

.filter-chip {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.82rem;
  cursor: pointer;
}

.filter-chip.is-active {
  background: #EAF3FF;
  border-color: #4DA3FF;
  color: #4DA3FF;
}

.filter-chip[disabled] {
  opacity: 0.56;
  cursor: default;
  transform: none;
}

.table-search {
  min-width: min(100%, 260px);
  flex: 1 1 240px;
  position: relative;
}

.table-search input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
}

.table-search::before {
  content: "⌕";
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: var(--muted);
}

.table-meta {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

.table-shell,
.table-container {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.table-wrapper {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border-radius: inherit;
  overflow: hidden;
  background: inherit;
}

.table-scroll {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  scrollbar-width: auto;
  scrollbar-color: rgba(77, 163, 255, 0.45) transparent;
  background: inherit;
  border-radius: inherit;
  transition: scrollbar-color 0.18s ease;
  -webkit-overflow-scrolling: touch;
}

.table-scroll.has-horizontal-scroll {
  overflow-x: auto;
}

.table-scroll:hover,
.table-scroll:focus-within {
  scrollbar-color: rgba(77, 163, 255, 0.45) transparent;
}

.table-scroll::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

.table-scroll::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: var(--scrollbar-radius);
  border: 3px solid transparent;
  background-clip: padding-box;
}

.table-scroll::-webkit-scrollbar-track {
  background: transparent;
  border-radius: var(--scrollbar-track-radius);
}

.table-scroll:hover::-webkit-scrollbar-thumb,
.table-scroll:focus-within::-webkit-scrollbar-thumb {
  background: rgba(77, 163, 255, 0.45);
}

thead th[data-column-drag] {
  cursor: grab;
  user-select: none;
}

thead th[data-column-drag].is-dragging {
  opacity: 0.72;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 100%;
  margin: 0;
  table-layout: fixed;
}

th,
td {
  padding: 7px 6px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  background: rgba(255, 255, 255, 0.88);
  white-space: nowrap;
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 0;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr.is-selected td {
  background: rgba(234, 243, 255, 0.92);
}

thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #EAF3FF;
  box-shadow: inset 0 -1px 0 var(--line);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  overflow: visible;
  background-clip: padding-box;
}

thead th:first-child {
  border-top-left-radius: 22px;
}

thead th:last-child {
  border-top-right-radius: 22px;
}

.sort-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  cursor: pointer;
  font-weight: 700;
  text-transform: inherit;
  letter-spacing: inherit;
  position: relative;
}

.info-tooltip {
  display: inline-flex;
  align-items: center;
  position: relative;
  margin-left: 6px;
  z-index: 20;
}

.info-badge {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(77, 163, 255, 0.22);
  background: rgba(234, 243, 255, 0.92);
  color: var(--brand-deep);
  display: inline-grid;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: help;
}

.info-tooltip-text {
  position: absolute;
  left: 0;
  top: calc(100% + 18px);
  bottom: auto;
  width: 220px;
  max-width: min(220px, calc(100vw - 48px));
  padding: 10px 12px;
  border-radius: 14px;
  background: #173229;
  color: #f5fff9;
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.78rem;
  line-height: 1.4;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 30;
  white-space: normal;
  overflow-wrap: break-word;
}

.info-tooltip:hover .info-tooltip-text,
.info-tooltip:focus-within .info-tooltip-text {
  opacity: 1;
  transform: translateY(0);
}

thead th:last-child .info-tooltip-text,
thead th:nth-last-child(2) .info-tooltip-text {
  left: auto;
  right: 0;
}

.sort-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  color: rgba(98, 125, 115, 0.8);
}

.sort-button[data-sort-dir="asc"] .sort-icon,
.sort-button[data-sort-dir="desc"] .sort-icon {
  color: var(--brand-deep);
}

.row-check,
.head-check {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.cell-title {
  display: block;
  font-weight: 700;
  margin-bottom: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.muted {
  color: var(--muted);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.pill.normal,
.pill.active,
.pill.ack,
.pill.sent,
.pill.closed {
  background: rgba(234, 243, 255, 0.92);
  color: var(--brand-deep);
}

.pill.inactive,
.pill.disabled {
  background: rgba(127, 141, 135, 0.14);
  color: #5d6a65;
}

.pill.open,
.pill.error,
.pill.alarm {
  background: rgba(199, 74, 69, 0.12);
  color: var(--danger);
}

.pill.candidate,
.pill.pending {
  background: rgba(241, 162, 8, 0.15);
  color: #8a6000;
}

.required-marker {
  color: var(--danger);
  font-weight: 800;
  margin-left: 4px;
}

.editor-field.is-invalid label {
  color: var(--danger);
}

.editor-field.is-invalid .editor-input,
.editor-field.is-invalid .editor-select,
.editor-field.is-invalid .editor-textarea,
.editor-field.is-invalid .editor-multiselect,
.editor-field.is-invalid .phone-parts-field {
  border-color: rgba(199, 74, 69, 0.72);
  box-shadow: 0 0 0 3px rgba(199, 74, 69, 0.12);
}

.editor-field-error {
  display: block;
  margin-top: 6px;
  color: var(--danger);
  font-size: 0.78rem;
}

.mini-chart {
  --chart-bar-width: clamp(20px, 2vw, 24px);
  --chart-bar-gap: clamp(12px, 1.45vw, 16px);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--chart-bar-width);
  align-items: end;
  column-gap: var(--chart-bar-gap);
  justify-content: center;
  min-height: 262px;
  padding: 18px 0 0;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}

.chart-loading {
  display: grid;
  gap: 18px;
  min-height: 238px;
  align-content: center;
}

.chart-loading-bars {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--chart-bar-width, 24px);
  align-items: end;
  justify-content: center;
  gap: var(--chart-bar-gap, 16px);
  min-height: 194px;
}

.chart-loading-bar {
  border-radius: 16px 16px 0 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0.18)),
    linear-gradient(180deg, #17395f 0%, #3e84cb 100%);
  background-size: 240px 100%, 100% 100%;
  animation: skeletonShimmer 1.2s linear infinite;
}

.chart-loading-bar.bar-1 { height: 42%; }
.chart-loading-bar.bar-2 { height: 68%; }
.chart-loading-bar.bar-3 { height: 54%; }
.chart-loading-bar.bar-4 { height: 82%; }
.chart-loading-bar.bar-5 { height: 60%; }
.chart-loading-bar.bar-6 { height: 48%; }

.chart-bar-wrap {
  width: var(--chart-bar-width);
  min-width: var(--chart-bar-width);
  display: grid;
  justify-items: center;
  align-items: end;
  align-self: stretch;
  grid-template-rows: minmax(210px, 1fr) auto;
  row-gap: 0;
  position: relative;
}

.chart-bar-hitbox {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 210px;
  padding-top: 54px;
  outline: none;
}

.chart-bar {
  width: 100%;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(180deg, #16385d 0%, #3f83ca 100%);
  height: max(16px, var(--bar-height, 16px));
  min-height: 16px;
  box-shadow: 0 12px 24px rgba(24, 61, 102, 0.16);
  transition: filter 0.18s ease, box-shadow 0.18s ease;
}

.chart-bar-hitbox:hover .chart-bar,
.chart-bar-hitbox:focus-visible .chart-bar {
  filter: saturate(1.03) brightness(1.04);
  box-shadow: 0 16px 28px rgba(23, 59, 99, 0.22);
}

.chart-tooltip {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, 8px);
  min-width: max-content;
  max-width: 176px;
  padding: 10px 13px;
  border-radius: 14px;
  background: rgba(19, 47, 78, 0.98);
  color: #f8fbff;
  box-shadow: 0 14px 30px rgba(15, 42, 68, 0.24);
  border: 1px solid rgba(207, 229, 255, 0.08);
  display: grid;
  gap: 3px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 4;
  text-align: center;
}

.chart-tooltip strong {
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.2;
}

.chart-tooltip span {
  font-size: 0.8rem;
  color: rgba(234, 243, 255, 0.78);
}

.chart-bar-hitbox:hover .chart-tooltip,
.chart-bar-hitbox:focus-visible .chart-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.chart-helper {
  margin: 14px 0 0;
  font-size: 0.77rem;
  line-height: 1.55;
  color: rgba(112, 122, 132, 0.95);
  max-width: 39ch;
  text-align: left;
}

.chart-label {
  display: none;
}

.chart-label.is-muted {
  display: none;
}

.menu-prefs-toggle {
  width: 100%;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  padding: 10px 16px;
}

.sidebar-nav .menu-prefs-toggle {
  width: 100%;
  margin-top: 0;
}

.sidebar-nav > .menu-prefs-panel {
  width: 100%;
  margin-top: 8px;
  margin-bottom: 0;
}

.menu-prefs-panel {
  display: none;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.menu-prefs-panel.is-open {
  display: grid;
}

.menu-pref-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(245, 255, 249, 0.86);
  font-size: 0.9rem;
}

.profile-panel {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  min-width: 0;
}

.profile-main-card,
.profile-side-card {
  min-width: 0;
}

.profile-panel > div:last-child {
  min-width: 0;
}

.profile-panel h4,
.profile-panel p {
  overflow-wrap: anywhere;
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.detail-list div {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
}

.detail-list dt {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 6px;
}

.detail-list dd {
  margin: 0;
  font-weight: 700;
  font-size: 1rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.todo-list {
  display: grid;
  gap: 14px;
}

.profile-forms {
  margin-bottom: 14px;
  gap: 12px;
}

.profile-settings-card {
  gap: 14px;
}

.profile-settings-dialog {
  width: min(640px, calc(100vw - 28px));
}

.profile-settings-option {
  gap: 12px;
}

.profile-settings-option-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.settings-toggle,
.settings-select-field {
  display: grid;
  gap: 8px;
}

.settings-toggle {
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 10px;
  font-weight: 600;
}

.settings-toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--brand);
}

.settings-select-field span {
  font-size: 0.84rem;
  color: var(--muted);
}

.todo-item {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
}

.inline-form {
  display: grid;
  gap: 10px;
}

.form-helper {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
}

.collapsible-card {
  gap: 0;
  overflow: hidden;
}

.collapse-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--text);
  cursor: pointer;
}

.collapse-icon {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(234, 243, 255, 0.92);
  color: var(--brand-deep);
  font-weight: 800;
  transition: transform 0.2s ease;
}

.collapse-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.24s ease, padding-top 0.24s ease;
  padding-top: 0;
}

.collapse-body > * {
  overflow: hidden;
}

.collapsible-card.is-open .collapse-body {
  grid-template-rows: 1fr;
  padding-top: 12px;
}

.collapsible-card.is-open .collapse-body > * {
  overflow: visible;
  padding: 3px;
  margin: -3px;
}

.collapsible-card.is-open .collapse-icon {
  transform: rotate(45deg);
}

.todo-item.is-success {
  animation: successPulse 0.7s ease;
  border-color: rgba(77, 163, 255, 0.35);
  box-shadow: 0 0 0 3px rgba(77, 163, 255, 0.08);
}

.text-input,
.editor-input,
.editor-select,
.editor-textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  border-radius: 14px;
  padding: 12px 14px;
}

.editor-textarea {
  min-height: 110px;
  resize: vertical;
}

.editor-input:disabled,
.editor-select:disabled,
.editor-textarea:disabled {
  background: rgba(127, 141, 135, 0.14);
  border-color: rgba(127, 141, 135, 0.24);
  color: #6f7d77;
  cursor: not-allowed;
}

.editor-input.is-mixed,
.editor-select.is-mixed,
.editor-textarea.is-mixed {
  border-color: rgba(241, 162, 8, 0.28);
  background: rgba(241, 162, 8, 0.08);
}

.editor-shell.is-success {
  animation: drawerSuccessPulse 0.82s ease;
  box-shadow:
    0 0 0 3px rgba(77, 163, 255, 0.14),
    var(--shadow);
}

.avatar-editor-modal {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 16, 28, 0.64);
  backdrop-filter: blur(16px);
}

.avatar-editor-modal.is-open {
  display: flex;
}

.filter-modal {
  position: fixed;
  inset: 0;
  z-index: 135;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 16, 28, 0.48);
  backdrop-filter: blur(14px);
}

.filter-modal.is-open {
  display: flex;
}

.filter-modal-dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: min(88vh, 760px);
  background: rgba(248, 251, 255, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 28px;
  box-shadow: 0 30px 70px rgba(6, 20, 35, 0.24);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  padding: 22px;
  overflow: hidden;
}

.filter-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.filter-modal-header h3 {
  margin: 0;
}

.filter-modal-body {
  overflow: auto;
}

.filter-modal-card {
  display: grid;
  gap: 18px;
}

.filter-modal-group {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
}

.filter-modal-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.filter-modal-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-date-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.filter-date-field {
  display: grid;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

.filter-date-field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  padding: 11px 12px;
}

.filter-modal-help {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.filter-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.avatar-editor-dialog {
  width: min(980px, calc(100vw - 32px));
  max-height: min(92vh, 920px);
  background: rgba(248, 251, 255, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 30px;
  box-shadow: 0 30px 70px rgba(6, 20, 35, 0.24);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
  padding: 20px;
  overflow: hidden;
}

.avatar-editor-header,
.avatar-editor-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar-editor-header {
  justify-content: space-between;
}

.avatar-editor-actions {
  justify-content: flex-end;
  padding-top: 4px;
}

.avatar-editor-actions .ghost-button,
.avatar-editor-actions .primary-button {
  min-width: 120px;
  padding: 10px 16px;
}

.avatar-editor-header h3 {
  margin: 0;
}

.avatar-editor-content {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 240px);
  gap: 16px;
  align-items: stretch;
  overflow: hidden;
}

.avatar-editor-stage {
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  border-radius: 28px;
  padding: 18px;
  background:
    radial-gradient(circle at top, rgba(77, 163, 255, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(232, 241, 251, 0.96));
  border: 1px solid rgba(77, 163, 255, 0.16);
  overflow: hidden;
}

.avatar-editor-canvas {
  display: block;
  width: min(100%, 500px, calc(100vh - 360px));
  max-width: 100%;
  max-height: min(100%, calc(100vh - 360px));
  height: auto;
  aspect-ratio: 1;
  border-radius: 24px;
  background:
    linear-gradient(45deg, rgba(77, 163, 255, 0.08) 25%, transparent 25%) -12px 0 / 24px 24px,
    linear-gradient(-45deg, rgba(77, 163, 255, 0.08) 25%, transparent 25%) -12px 0 / 24px 24px,
    linear-gradient(45deg, transparent 75%, rgba(77, 163, 255, 0.08) 75%) -12px 0 / 24px 24px,
    linear-gradient(-45deg, transparent 75%, rgba(77, 163, 255, 0.08) 75%) -12px 0 / 24px 24px,
    #f4f8fc;
  cursor: grab;
  touch-action: none;
}

.avatar-editor-canvas.is-dragging {
  cursor: grabbing;
}

.avatar-editor-sidebar {
  display: grid;
  gap: 16px;
  align-content: start;
  min-width: 0;
}

.avatar-editor-preview-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  min-width: 0;
}

.avatar-editor-preview-label {
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.avatar-editor-preview {
  display: block;
  width: min(100%, 156px);
  aspect-ratio: 1;
  border-radius: 999px;
  background: #eef4fb;
}

.avatar-editor-preview[data-crop-shape="square"] {
  aspect-ratio: 1;
  border-radius: 24px;
}

.avatar-editor-preview[data-crop-shape="rect"] {
  aspect-ratio: 1.7 / 1;
  border-radius: 20px;
}

.avatar-editor-shape {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  color: var(--text);
}

.avatar-editor-shape-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.avatar-shape-button {
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(15, 42, 68, 0.12);
  background: rgba(244, 248, 252, 0.92);
  color: #0f2a44;
  cursor: pointer;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.avatar-shape-button:hover,
.avatar-shape-button:focus-visible {
  border-color: rgba(77, 163, 255, 0.42);
  background: rgba(225, 237, 249, 0.96);
}

.avatar-shape-button.is-active {
  background: linear-gradient(135deg, rgba(31, 90, 139, 0.92), rgba(77, 163, 255, 0.42));
  border-color: rgba(31, 90, 139, 0.5);
  color: #ffffff;
}

.avatar-shape-icon {
  display: inline-block;
  border: 2px solid currentColor;
  background: transparent;
}

.avatar-shape-icon-circle {
  width: 16px;
  height: 16px;
  border-radius: 999px;
}

.avatar-shape-icon-square {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.avatar-shape-icon-rect {
  width: 20px;
  height: 12px;
  border-radius: 4px;
}

.avatar-editor-zoom {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  color: var(--text);
}

.avatar-editor-zoom span {
  font-weight: 700;
}

.avatar-editor-zoom input {
  width: 100%;
}

.avatar-editor-help {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--muted);
  max-width: 28ch;
}

.password-field {
  position: relative;
}

.password-input {
  padding-right: 52px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
}

.password-toggle svg {
  width: 18px;
  height: 18px;
  display: block;
  margin: 0 auto;
}

.login-page {
  display: grid;
  place-items: center;
}

.login-shell {
  width: 100%;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(460px, 100%);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 28px;
  display: grid;
  gap: 20px;
}

.login-copy h2,
.login-copy p {
  margin: 0;
}

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

.login-button {
  justify-self: start;
}

.login-helper-links {
  display: flex;
  justify-content: flex-start;
}

.login-helper-link {
  color: #0f2a44;
  font-size: 0.92rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(15, 42, 68, 0.18);
}

.login-helper-link:hover {
  border-bottom-color: rgba(15, 42, 68, 0.52);
}

.finance-card {
  background:
    radial-gradient(circle at top right, rgba(77, 163, 255, 0.12), transparent 35%),
    linear-gradient(135deg, rgba(241, 162, 8, 0.08), rgba(77, 163, 255, 0.08)),
    #ffffff;
}

.empty-state {
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
  display: grid;
  gap: 8px;
  justify-items: center;
}

.empty-state strong {
  color: var(--text);
  font-size: 0.94rem;
}

.empty-state span {
  max-width: 54ch;
  line-height: 1.45;
}

.empty-state-actions {
  display: flex;
  justify-content: center;
}

.loading-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(238, 244, 251, 0.94));
  border: 1px solid rgba(77, 163, 255, 0.14);
  box-shadow: 0 16px 36px rgba(15, 42, 68, 0.08);
  color: #0f2a44;
  font-size: 0.92rem;
}

.loading-spinner {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(15, 42, 68, 0.12);
  border-top-color: #4DA3FF;
  animation: spin 0.8s linear infinite;
}

.table-inline-state {
  display: grid;
  gap: 10px;
  align-items: center;
}

.table-inline-state .loading-state {
  width: fit-content;
}

.table-inline-state.is-error {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(199, 74, 69, 0.18);
  background: rgba(255, 245, 244, 0.96);
  color: #742f2b;
}

.table-inline-state.is-error strong,
.table-inline-state.is-error span {
  display: block;
}

.table-inline-state.is-error span {
  margin-top: 4px;
}

.skeleton-line {
  display: block;
  width: 100%;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.42)),
    rgba(77, 163, 255, 0.18);
  background-size: 240px 100%;
  animation: skeletonShimmer 1.2s linear infinite;
}

.skeleton-title {
  max-width: 280px;
  height: 1.18em;
}

.skeleton-copy {
  max-width: 320px;
  height: 0.95em;
}

.skeleton-label {
  max-width: 120px;
  height: 0.76rem;
}

.skeleton-value {
  max-width: 120px;
  height: 1.6rem;
}

.skeleton-pill {
  width: 92px;
  height: 34px;
}

.skeleton-search {
  width: min(280px, 100%);
  height: 42px;
}

.skeleton-meta {
  width: 160px;
  height: 18px;
}

.skeleton-cell {
  min-height: 18px;
}

@keyframes skeletonShimmer {
  0% {
    background-position: 240px 0;
  }
  100% {
    background-position: -240px 0;
  }
}

@keyframes dashboardLoadingBars {
  0% {
    transform: scaleY(0.9);
    filter: saturate(0.96);
  }
  100% {
    transform: scaleY(1.04);
    filter: saturate(1.06);
  }
}

.table-scroll {
  overscroll-behavior: contain;
}

html {
  font-size: 14px;
}

body {
  line-height: 1.45;
}

img,
svg,
canvas,
video {
  max-width: 100%;
  height: auto;
}

.sidebar {
  width: 286px;
  padding: 16px 14px;
  gap: 14px;
}

.main-panel {
  margin-left: 286px;
  padding: 26px;
}

.topbar,
.hero-grid,
.content-grid,
.profile-grid,
.kpi-grid,
.monitor-summary-grid,
.service-monitor-grid,
.service-monitor-host-grid {
  gap: 14px;
}

.topbar {
  margin-bottom: 18px;
}

.table-card,
.service-monitor-card,
.service-monitor-host-card,
.metric-card,
.finance-card,
.editor-shell,
.filter-modal-dialog,
.avatar-editor-shell {
  border-radius: 18px;
}

.table-card {
  gap: 12px;
  padding: 14px;
}

.table-toolbar,
.toolbar-left,
.toolbar-right,
.toolbar-extras,
.filter-chip-group {
  gap: 8px;
}

.table-shell,
.table-container {
  border-radius: 18px;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  height: 100%;
}

.table-search {
  min-width: min(100%, 220px);
}

.table-search input,
.editor-field input,
.editor-field select,
.editor-field textarea,
.filter-date-field input,
.date-filter input {
  padding-top: 10px;
  padding-bottom: 10px;
}

.table-search input {
  padding-left: 40px;
}

.filter-chip,
.ghost-button,
.primary-button,
.secondary-button,
.icon-button {
  min-height: 36px;
}

th,
td {
  padding: 8px 8px;
}

.editor-drawer {
  top: 72px;
  right: 12px;
  width: min(680px, calc(100vw - 24px));
}

.editor-shell {
  padding: 14px 16px 16px;
  gap: 10px;
  max-height: calc(100vh - 20px);
}

.filter-modal,
.avatar-editor-modal,
.profile-reload-modal {
  padding: 18px;
}

.filter-modal-dialog,
.avatar-editor-shell,
.profile-reload-panel {
  padding: 18px;
}

.sidebar-footer {
  padding: 12px;
}

.sidebar-nav .nav-item {
  min-height: 40px;
}

.client-switcher select {
  min-height: 58px;
}

@media (max-width: 1180px) {
  .sidebar {
    width: min(286px, 82vw);
  }

  .main-panel {
    margin-left: 0;
    padding: 22px;
  }

  .table-screen {
    height: calc(100vh - 164px);
    max-height: calc(100vh - 164px);
  }
}

@media (max-width: 900px) {
  .service-monitor-host-grid,
  .service-monitor-grid {
    grid-template-columns: 1fr;
  }

  .table-screen {
    height: calc(100vh - 152px);
    max-height: calc(100vh - 152px);
  }

  .topbar-actions.is-service-monitor {
    justify-content: stretch;
  }

  .topbar-actions.is-service-monitor .service-monitor-status-card-topbar {
    width: 100%;
  }

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

  .toolbar-right {
    justify-content: flex-start;
  }

  .table-inline-state.is-error {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  html {
    font-size: 13px;
  }

  .main-panel {
    padding: 16px;
  }

  .table-screen {
    height: calc(100vh - 138px);
    max-height: calc(100vh - 138px);
  }

  .table-card {
    padding: 14px;
  }

  .table-shell,
  .table-container {
    grid-template-rows: minmax(0, 1fr) auto;
  }

  table {
    min-width: 620px;
  }

  th,
  td {
    white-space: normal;
    min-width: 96px;
    word-break: break-word;
  }

}

@media (max-width: 1440px) {
  .editor-drawer.is-open {
    width: min(620px, calc(100vw - 40px));
  }
}

@media (max-width: 1260px) {
  .editor-drawer {
    right: 20px;
    top: 84px;
    width: min(600px, calc(100vw - 40px));
  }

  .editor-drawer.is-open {
    width: min(600px, calc(100vw - 40px));
  }
}

@media (max-width: 1180px) {
  .sidebar {
    width: min(320px, 86vw);
    max-width: 86vw;
    box-shadow: 0 24px 48px rgba(6, 18, 15, 0.28);
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi-card {
    min-height: 118px;
  }

  .hero-grid,
  .content-grid,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .sidebar-toggle-mobile {
    display: none;
  }

  .sidebar-toggle:not(.sidebar-toggle-mobile) {
    display: inline-grid;
    place-items: center;
  }

  .main-panel {
    margin-left: 0;
    position: relative;
  }

  body:not(.sidebar-collapsed) .main-panel::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(12, 25, 22, 0.38);
    backdrop-filter: blur(2px);
    z-index: 20;
  }
}

@media (max-width: 840px) {
  .dashboard-loading-panel {
    padding: 24px 22px 20px;
    gap: 18px;
  }

  .dashboard-loading-brand {
    align-items: flex-start;
  }

  .dashboard-loading-mark {
    width: 76px;
    height: 76px;
  }

  .dashboard-loading-logo {
    width: 62px;
    height: 62px;
  }

  .main-panel {
    padding: 16px;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 18px;
  }

  .topbar-title {
    align-items: center;
  }

  .topbar-side {
    width: 100%;
    justify-content: flex-start;
  }

  .system-health-indicator {
    width: 100%;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .service-monitor-overview,
  .service-monitor-summary-row,
  .service-monitor-grid,
  .service-monitor-host-grid {
    grid-template-columns: 1fr;
  }

  .table-toolbar,
  .editor-actions {
    display: flex;
    flex-wrap: wrap;
  }

  .toolbar-right {
    justify-content: flex-start;
  }

  .toolbar-left,
  .toolbar-right,
  .toolbar-extras {
    width: 100%;
  }

  .detail-list {
    grid-template-columns: 1fr;
  }

  .hero-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-stat-stack {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-card,
  .trend-card,
  .surface-card,
  .section-card,
  .table-card {
    padding: 18px;
    border-radius: 22px;
  }

  .trend-card {
    min-height: 300px;
  }

  .mini-chart {
    --chart-bar-width: 18px;
    --chart-bar-gap: 12px;
    min-height: 228px;
    padding-inline: 0;
  }

  .chart-bar-hitbox {
    min-height: 194px;
    padding-top: 38px;
  }

  .toast-stack {
    top: auto;
    bottom: 84px;
  }

  .table-shell {
    min-height: clamp(320px, 62vh, 760px);
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .profile-panel {
    flex-direction: column;
    align-items: flex-start;
  }

  .code-action-field {
    grid-template-columns: 1fr;
  }

  .editor-grid-scrollable {
    grid-template-columns: 1fr;
  }

  .editor-grid-scrollable [data-field-wrapper="phone"],
  .editor-grid-scrollable [data-field-wrapper="validation_code"],
  .editor-grid-scrollable [data-field-wrapper="date_birth"] {
    grid-column: auto;
  }

  .phone-parts-field {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .editor-drawer {
    right: 10px;
    left: 10px;
    width: auto;
    top: auto;
    bottom: 10px;
  }

  .editor-shell {
    max-height: min(70vh, 680px);
    height: auto;
  }

  .editor-drawer[data-section="assets"] .editor-body {
    max-height: calc(min(70vh, 680px) - 230px);
  }

  .avatar-editor-dialog {
    width: min(840px, 100%);
    max-height: min(92vh, 860px);
    padding: 18px;
    border-radius: 24px;
  }

  .filter-date-grid {
    grid-template-columns: 1fr;
  }

  .avatar-editor-content {
    grid-template-columns: 1fr;
    overflow: hidden;
  }

  .avatar-editor-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .avatar-editor-help {
    grid-column: 1 / -1;
  }
}

@media (min-width: 769px) {
  .table-toolbar,
  .toolbar-left,
  .toolbar-right {
    overflow: visible;
  }

  .toolbar-right {
    width: auto;
    min-width: max-content;
    flex: 0 1 auto;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
  }

  .column-picker-desktop-shell {
    display: inline-flex !important;
    align-items: center;
    flex: 0 0 auto !important;
    min-width: max-content;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .column-picker-trigger-desktop {
    display: inline-flex !important;
    width: auto !important;
    min-width: max-content;
    white-space: nowrap;
    flex: 0 0 auto !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

}

@media (max-width: 768px) {
  body:not(.sidebar-collapsed) {
    overflow: hidden;
  }

  .table-screen {
    width: 100%;
    min-width: 0;
  }

  .table-card {
    width: 100%;
    min-width: 0;
  }

  .table-toolbar {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.82fr) minmax(0, 1.6fr) 32px;
    gap: 4px;
    align-items: center;
  }

  .toolbar-left,
  .toolbar-right {
    display: contents;
  }

  .toolbar-left > [data-open-filters],
  .toolbar-right > .filter-chip-group,
  .toolbar-right > .column-picker-desktop-shell,
  .toolbar-right > [data-local-refresh],
  .toolbar-left > .table-filter-summary,
  .toolbar-left > .table-search,
  .toolbar-left > .toolbar-extras {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  .toolbar-left > [data-open-filters] {
    grid-column: 2;
    grid-row: 1;
  }

  .toolbar-right > .filter-chip-group {
    grid-column: 3;
    grid-row: 1;
    display: flex;
    width: 100%;
    min-width: 0;
    flex-wrap: nowrap;
    overflow: hidden;
  }

  .toolbar-right > .column-picker-desktop-shell {
    grid-column: 4;
    grid-row: 1;
    display: inline-flex !important;
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .toolbar-left > .table-filter-summary {
    grid-column: 1 / 3;
    grid-row: 2;
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.84);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.66rem;
  }

  .toolbar-left > .table-search {
    grid-column: 4 / 6;
    grid-row: 2;
  }

  .toolbar-right > [data-local-refresh] {
    grid-column: 6;
    grid-row: 2;
    min-height: 32px;
    width: 32px;
    min-width: 32px;
    padding: 0;
  }

  .toolbar-left > .toolbar-extras {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .toolbar-right > .table-meta {
    display: none;
  }

  .toolbar-left > [data-open-filters],
  .toolbar-right > .filter-chip-group,
  .toolbar-right > .column-picker-desktop-shell {
    align-self: stretch;
    justify-self: stretch;
  }

  .toolbar-right > .filter-chip-group .ghost-button,
  .toolbar-right > .column-picker-desktop-shell .ghost-button,
  .toolbar-left > [data-open-filters],
  .toolbar-right > [data-local-refresh] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .toolbar-right > .filter-chip-group .ghost-button,
  .toolbar-right > .column-picker-desktop-shell .ghost-button,
  .toolbar-left > [data-open-filters] {
    width: 100%;
    min-width: 0;
    max-width: none;
    min-height: 32px;
    padding: 4px 5px;
    font-size: 0.62rem;
    line-height: 1;
    white-space: nowrap;
  }

  .table-shell,
  .table-container,
  .table-wrapper,
  .table-scroll {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .table-scroll {
    overflow-x: auto;
    overflow-y: auto;
  }

  .sidebar {
    height: 100dvh;
    max-height: 100dvh;
    overflow-x: hidden;
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  .brand,
  .profile-card,
  .client-switcher,
  .sidebar-footer {
    flex: 0 0 auto;
  }

  .sidebar-nav {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    touch-action: pan-y;
    padding-right: 4px;
    margin-right: -4px;
  }

  .nav-item[data-menu-drag] {
    touch-action: pan-y;
  }

  .sidebar-footer {
    margin-top: 12px;
    margin-bottom: calc(12px + env(safe-area-inset-bottom));
  }

  .mobile-filters {
    display: grid;
    gap: 10px;
    width: 100%;
    align-items: start;
  }

  .mobile-filters > * {
    min-width: 0;
    max-width: 100%;
  }

  .mobile-table-search,
  .mobile-table-search input {
    width: 100%;
    min-width: 0;
  }

  .mobile-filters-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .mobile-filters-bar > .ghost-button,
  .mobile-filters-bar > .column-picker {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
  }

  .mobile-filters-bar > .icon-button {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    min-width: 40px;
    align-self: stretch;
  }

  .mobile-filters-bar .ghost-button,
  .mobile-filters-bar .column-picker .ghost-button {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 40px !important;
    padding: 10px 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    line-height: 1.1 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .mobile-filters-bar .icon-button span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }

  .mobile-filters-bar .column-picker {
    position: relative;
    z-index: 70;
  }

  .mobile-filters-bar .column-picker-panel {
    left: auto;
    right: 0;
    width: min(240px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
  }

  .mobile-toolbar-extras:empty,
  .mobile-action-row:empty,
  .mobile-chip-group:empty {
    display: none;
  }

  .mobile-toolbar-extras,
  .mobile-action-row,
  .mobile-chip-group,
  .mobile-filters-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
  }

  .mobile-action-row {
    justify-content: flex-start;
  }

  .mobile-toolbar-extras > *,
  .mobile-chip-group > *,
  .mobile-filters-meta > * {
    min-width: 0;
    max-width: 100%;
  }

  .mobile-filters-meta {
    justify-content: space-between;
    align-items: flex-start;
    row-gap: 6px;
  }

  .mobile-filters-meta .table-filter-summary,
  .mobile-filters-meta .table-meta {
    min-width: 0;
    max-width: 100%;
  }

  .floating-refresh-badge {
    right: max(8px, env(safe-area-inset-right));
    left: auto;
    bottom: calc(8px + env(safe-area-inset-bottom));
    width: fit-content;
    max-width: calc(100vw - 16px - env(safe-area-inset-right));
    padding: 8px 9px;
    gap: 6px;
    font-size: 0.76rem;
    line-height: 1.28;
    justify-content: flex-start;
  }

  .floating-refresh-badge.is-mobile-collapsed {
    padding: 0 !important;
    gap: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }

  .floating-refresh-badge.is-mobile-collapsed .floating-refresh-copy {
    display: none !important;
  }

  .floating-refresh-badge.is-mobile-collapsed .floating-refresh-button {
    width: auto !important;
    min-width: 0 !important;
    height: 28px !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
    background: rgba(31, 90, 139, 0.94) !important;
    border: 1px solid rgba(207, 229, 255, 0.18) !important;
    box-shadow: var(--shadow-soft) !important;
    font-size: 0.72rem !important;
    line-height: 1 !important;
  }

  .floating-refresh-badge.is-mobile-expanded {
    padding: 8px 9px !important;
    gap: 6px !important;
    background: rgba(31, 90, 139, 0.92) !important;
    border: 1px solid rgba(207, 229, 255, 0.18) !important;
    box-shadow: var(--shadow-soft) !important;
    backdrop-filter: blur(10px) !important;
  }

  .floating-refresh-badge.is-mobile-expanded .floating-refresh-copy {
    display: grid !important;
  }

  .floating-refresh-copy {
    gap: 1px;
    width: fit-content;
    flex: 0 1 auto;
  }

  .floating-refresh-head {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    width: fit-content;
  }

  .floating-refresh-copy span {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .floating-refresh-copy strong {
    font-size: 0.68rem;
  }

  .floating-refresh-status {
    font-size: 0.7rem;
    line-height: 1.32;
  }

  .floating-refresh-button {
    width: 30px;
    height: 30px;
  }

  .editor-drawer {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    padding: 0 !important;
    transform: none !important;
    background: rgba(5, 16, 28, 0.42) !important;
    backdrop-filter: blur(10px) !important;
    z-index: 135 !important;
  }

  .editor-drawer.is-open {
    transform: none;
  }

  .editor-shell {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: min(94vw, 560px) !important;
    max-width: 94vw !important;
    max-height: min(82vh, calc(100dvh - 24px - env(safe-area-inset-bottom))) !important;
    height: auto !important;
    border-radius: 22px !important;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom)) !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    gap: 12px !important;
    overflow: hidden !important;
  }

  .editor-header {
    justify-content: space-between;
    align-items: flex-start;
    min-height: 0;
    padding-bottom: 2px;
  }

  .editor-header-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
    flex: 1 1 auto;
  }

  .editor-header-copy .eyebrow {
    margin: 0;
    font-size: 0.72rem;
  }

  .editor-header-copy h3 {
    margin: 0;
    font-size: 1.12rem;
    line-height: 1.2;
    color: #0f2a44;
  }

  .editor-body {
    gap: 14px;
    padding-right: 2px;
    padding-bottom: 2px;
  }

  .editor-note {
    padding: 10px 12px;
    border-radius: 13px;
    font-size: 0.84rem;
    line-height: 1.45;
  }

  .editor-inline-actions {
    width: 100%;
  }

  .editor-inline-actions .ghost-button {
    min-width: 0;
    max-width: 100%;
  }

  .editor-grid,
  .editor-grid-scrollable {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .editor-field {
    gap: 7px;
  }

  .editor-field label {
    font-size: 0.76rem;
    line-height: 1.3;
  }

  .editor-input,
  .editor-select,
  .editor-textarea,
  .editor-multiselect,
  .phone-parts-field {
    width: 100%;
    min-width: 0;
  }

  .editor-input,
  .editor-select,
  .editor-textarea,
  .editor-multiselect {
    border-radius: 14px;
  }

  .editor-textarea {
    min-height: 96px;
  }

  .editor-footer {
    gap: 10px;
    padding-top: 12px;
    position: relative;
    background: rgba(255, 255, 255, 0.96);
  }

  .editor-status {
    font-size: 0.82rem;
    line-height: 1.4;
  }

  .editor-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .editor-footer .editor-actions {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    justify-content: space-between !important;
  }

  .editor-actions .ghost-button,
  .editor-actions .primary-button {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    min-height: 42px;
    padding: 10px 12px;
  }

  .editor-drawer[data-section="assets"] .editor-body {
    max-height: calc(min(82vh, calc(100dvh - 24px - env(safe-area-inset-bottom))) - 228px);
  }

  .toolbar-left,
  .toolbar-right,
  .toolbar-extras,
  .filter-chip-group,
  .topbar-actions,
  .editor-actions,
  .mobile-filters,
  .mobile-filters-bar,
  .mobile-toolbar-extras,
  .mobile-action-row,
  .mobile-chip-group,
  .mobile-filters-meta,
  .mobile-table-list,
  .mobile-row-grid {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .toolbar-left,
  .toolbar-right,
  .toolbar-extras,
  .filter-chip-group,
  .topbar-actions {
    align-items: center;
    flex-wrap: wrap;
  }

  .editor-actions {
    align-items: center;
  }

  .filter-chip,
  .ghost-button,
  .primary-button {
    width: auto;
    min-width: 90px;
    max-width: 160px;
    padding: 10px 16px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
  }

  .toolbar-left .ghost-button,
  .toolbar-left .primary-button,
  .toolbar-right .ghost-button,
  .toolbar-right .primary-button,
  .toolbar-extras .ghost-button,
  .toolbar-extras .primary-button,
  .topbar-actions .ghost-button,
  .topbar-actions .primary-button,
  .filter-chip-group .filter-chip,
  .mobile-filters-bar .ghost-button,
  .mobile-toolbar-extras .ghost-button,
  .mobile-action-row .ghost-button,
  .mobile-action-row .primary-button,
  .mobile-chip-group .ghost-button,
  .mobile-chip-group .filter-chip {
    flex: 0 1 auto;
  }

  .table-card,
  .table-toolbar,
  .table-search,
  .table-search input,
  .mobile-table-card,
  .mobile-filters,
  .mobile-row-card,
  .mobile-row-title,
  .mobile-data-value,
  .mobile-summary-pair,
  .mobile-data-pair,
  .editor-shell,
  .editor-body,
  .editor-grid,
  .editor-field,
  .filter-modal-dialog,
  .avatar-editor-dialog,
  .service-monitor-card,
  .service-monitor-host-card,
  .service-monitor-status-card,
  .trend-card,
  .hero-card,
  .surface-card,
  .section-card,
  .mini-chart {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .table-screen,
  .table-card,
  .table-shell,
  .table-container,
  .table-wrapper {
    min-height: 0;
    height: auto;
    max-height: none;
  }

  .table-scroll {
    min-height: 240px;
    overflow-x: auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
  }

  .table-screen,
  .table-shell,
  .table-container,
  .table-wrapper,
  .table-scroll,
  table {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .dashboard-loading-screen {
    padding: 16px;
  }

  .dashboard-loading-panel {
    padding: 22px 18px 18px;
    border-radius: 24px;
  }

  .dashboard-loading-brand {
    flex-direction: column;
    gap: 14px;
  }

  .dashboard-loading-copy {
    gap: 6px;
  }

  .dashboard-loading-copy h1 {
    font-size: clamp(1.42rem, 7vw, 1.82rem);
  }

  .dashboard-loading-copy p:last-child {
    font-size: 0.9rem;
  }

  .sidebar {
    width: min(320px, 92vw);
    max-width: 92vw;
    padding: 16px 14px;
  }

  .brand,
  .profile-card,
  .sidebar-footer {
    padding: 12px;
  }

  .profile-card {
    min-height: 56px;
  }

  .sidebar-profile-row {
    gap: 8px;
  }

  .sidebar-logout-button {
    width: 56px;
    min-width: 56px;
    height: 56px;
    border-radius: 14px;
  }

  .main-panel {
    padding: 12px;
  }

  .topbar-title {
    gap: 10px;
  }

  .service-monitor-status-card,
  .service-monitor-host-card,
  .service-monitor-card {
    padding: 14px;
    border-radius: 18px;
  }

  .service-monitor-status-card {
    min-height: 0;
  }

  .service-monitor-host-card {
    min-height: 108px;
    padding: 14px;
  }

  .hero-copy h3 {
    font-size: clamp(1.6rem, 8vw, 2.2rem);
  }

  .hero-stat-stack {
    grid-template-columns: 1fr;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: center;
    gap: 12px 14px;
  }

  .kpi-card {
    min-height: 104px;
    padding: 13px 14px;
    gap: 6px;
  }

  .kpi-card:nth-child(5) {
    grid-column: 1 / -1;
    width: min(100%, calc(50% - 7px));
    justify-self: center;
  }

  .kpi-card strong {
    font-size: 1.56rem;
  }

  .hero-grid,
  .content-grid,
  .profile-grid {
    gap: 14px;
    margin-bottom: 16px;
  }

  .table-card,
  .hero-card,
  .trend-card,
  .surface-card,
  .section-card {
    padding: 16px;
    border-radius: 18px;
  }

  .filter-chip-group,
  .toolbar-left,
  .toolbar-right,
  .toolbar-extras {
    gap: 8px;
  }

  .filter-chip,
  .ghost-button,
  .primary-button {
    width: auto;
    min-width: 90px;
    max-width: 160px;
    justify-content: center;
  }

  .table-search {
    min-width: 100%;
    flex-basis: 100%;
  }

  .column-picker,
  .column-picker-panel {
    width: 100%;
  }

  .column-picker-panel {
    left: 0;
    right: auto;
    max-width: 100%;
  }

  table {
    min-width: 620px;
  }

  th,
  td {
    padding: 9px 8px;
  }

  .mini-chart {
    --chart-bar-width: 16px;
    --chart-bar-gap: 10px;
    min-height: 184px;
  }

  .chart-bar-hitbox {
    min-height: 152px;
    padding-top: 28px;
  }

  .chart-tooltip {
    max-width: 148px;
    padding: 8px 10px;
  }

  .chart-helper {
    font-size: 0.74rem;
    margin-top: 10px;
  }

  .toast-stack {
    right: 12px;
    width: calc(100vw - 24px);
  }

  .editor-shell {
    width: min(95vw, 520px);
    max-height: min(78vh, calc(100dvh - 20px - env(safe-area-inset-bottom)));
    padding: 14px 14px calc(14px + env(safe-area-inset-bottom));
    gap: 10px;
  }

  .editor-header-copy h3 {
    font-size: 1.04rem;
  }

  .editor-body {
    gap: 12px;
  }

  .editor-actions {
    gap: 8px;
  }

  .editor-actions .ghost-button,
  .editor-actions .primary-button {
    min-height: 40px;
    padding: 10px;
  }

  .editor-drawer[data-section="assets"] .editor-body {
    max-height: calc(min(78vh, calc(100dvh - 20px - env(safe-area-inset-bottom))) - 220px);
  }

  .avatar-editor-modal {
    padding: 0;
    align-items: flex-end;
  }

  .filter-modal {
    padding: 0;
    align-items: flex-end;
  }

  .filter-modal-dialog {
    width: 100%;
    max-height: 88vh;
    border-radius: 24px 24px 0 0;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  }

  .avatar-editor-dialog {
    width: 100%;
    max-height: 88vh;
    border-radius: 24px 24px 0 0;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  }

  .avatar-editor-stage {
    padding: 12px;
    border-radius: 22px;
  }

  .avatar-editor-canvas {
    width: 100%;
    max-height: min(100%, calc(100vh - 390px));
    border-radius: 20px;
  }

  .avatar-editor-sidebar {
    grid-template-columns: 1fr;
  }

  .avatar-editor-preview {
    width: 128px;
  }

  .avatar-editor-actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
  }

  .avatar-editor-actions .ghost-button,
  .avatar-editor-actions .primary-button {
    width: auto;
    min-width: 116px;
    padding: 10px 14px;
  }

  .phone-parts-field {
    grid-template-columns: 1fr;
  }

  .login-shell {
    padding: 16px;
  }

  .login-card {
    padding: 22px 18px;
    border-radius: 22px;
  }

  .floating-refresh-badge {
    width: fit-content;
    max-width: calc(100vw - 16px - env(safe-area-inset-right));
    padding: 7px 8px;
    gap: 6px;
  }

  .floating-refresh-copy {
    gap: 4px;
  }

  .floating-refresh-copy span {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .floating-refresh-copy strong {
    font-size: 0.68rem;
  }

  .floating-refresh-status {
    font-size: 0.7rem;
    line-height: 1.35;
  }

  .floating-refresh-button {
    width: 32px;
    height: 32px;
  }
}

.payload-disclosure {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.mini-chart.is-empty {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-flow: row;
  grid-auto-columns: auto;
  place-items: center;
  justify-content: stretch;
  width: 100%;
  min-height: 262px;
  padding: 18px 0 0;
}

.mini-chart-empty-message {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
  text-align: center;
}

table {
  table-layout: auto;
}

th,
td,
.cell-title,
.muted {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  max-width: none;
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media ((max-width: 1024px) and (pointer: coarse)), (max-width: 768px) {
  .table-screen,
  .table-card,
  .table-shell,
  .table-container,
  .table-wrapper,
  .table-scroll {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  table {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
  }
}

@media (min-width: 769px) {
  .table-scroll table {
    width: max(100%, calc(var(--table-rendered-columns, 1) * 148px));
    min-width: max(100%, calc(var(--table-rendered-columns, 1) * 148px));
  }

  .table-scroll th:not(:first-child),
  .table-scroll td:not(:first-child) {
    min-width: 148px;
  }
}

@media (max-width: 1024px) and (pointer: coarse) and (orientation: landscape) {
  .main-panel,
  .workspace-shell,
  .content-column,
  .panel-section,
  .table-screen,
  .table-card,
  .table-shell,
  .table-container,
  .table-wrapper,
  .table-scroll {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .main-panel,
  .workspace-shell,
  .content-column,
  .panel-section,
  .table-screen,
  .table-card,
  .table-shell,
  .table-container,
  .table-wrapper {
    overflow-x: hidden !important;
  }

  .table-screen,
  .table-card,
  .table-shell,
  .table-container,
  .table-wrapper {
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
  }

  .table-shell,
  .table-container {
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) auto !important;
  }

  .table-wrapper {
    overflow: hidden !important;
  }

  .table-scroll {
    min-height: 240px !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
  }

  table {
    width: auto !important;
    min-width: 100% !important;
    max-width: none !important;
  }

  .floating-refresh-badge {
    right: max(8px, env(safe-area-inset-right));
    left: auto;
    bottom: calc(8px + env(safe-area-inset-bottom));
    width: fit-content;
    max-width: min(320px, calc(100vw - 16px - env(safe-area-inset-right)));
    padding: 8px 10px;
    gap: 8px;
    font-size: 0.76rem;
    line-height: 1.28;
    justify-content: flex-start;
  }

  .floating-refresh-badge.is-mobile-collapsed {
    padding: 0 !important;
    gap: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }

  .floating-refresh-badge.is-mobile-collapsed .floating-refresh-copy {
    display: none !important;
  }

  .floating-refresh-badge.is-mobile-collapsed .floating-refresh-button {
    width: auto !important;
    min-width: 0 !important;
    height: 30px !important;
    padding: 0 12px !important;
    border-radius: 999px !important;
    background: rgba(31, 90, 139, 0.94) !important;
    border: 1px solid rgba(207, 229, 255, 0.18) !important;
    box-shadow: var(--shadow-soft) !important;
    font-size: 0.72rem !important;
    line-height: 1 !important;
  }

  .floating-refresh-badge.is-mobile-expanded {
    padding: 8px 10px !important;
    gap: 8px !important;
    background: rgba(31, 90, 139, 0.92) !important;
    border: 1px solid rgba(207, 229, 255, 0.18) !important;
    box-shadow: var(--shadow-soft) !important;
    backdrop-filter: blur(10px) !important;
  }

  .floating-refresh-badge.is-mobile-expanded .floating-refresh-copy {
    display: grid !important;
    gap: 2px;
    width: fit-content;
    flex: 0 1 auto;
  }

  .floating-refresh-badge.is-mobile-expanded .floating-refresh-head {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    width: fit-content;
  }

  .floating-refresh-badge.is-mobile-expanded .floating-refresh-copy span {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .floating-refresh-badge.is-mobile-expanded .floating-refresh-copy strong {
    font-size: 0.68rem;
  }

  .floating-refresh-badge.is-mobile-expanded .floating-refresh-status {
    font-size: 0.7rem;
    line-height: 1.32;
  }

  .floating-refresh-badge.is-mobile-expanded .floating-refresh-button {
    width: 30px;
    height: 30px;
  }
}

@media (min-width: 769px) {
  .alarm-status-pill {
    border-radius: 10px;
  }
}

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

@keyframes successPulse {
  0% {
    transform: scale(1);
    background: rgba(255, 255, 255, 0.88);
  }
  40% {
    transform: scale(1.01);
    background: rgba(234, 243, 255, 0.92);
  }
  100% {
    transform: scale(1);
    background: rgba(255, 255, 255, 0.88);
  }
}

@keyframes drawerSuccessPulse {
  0% {
    transform: translateX(0);
    background: var(--surface);
  }
  35% {
    transform: translateX(-2px);
    background: rgba(234, 243, 255, 0.92);
  }
  100% {
    transform: translateX(0);
    background: var(--surface);
  }
}


@media (max-width: 430px) {
  .table-toolbar {
    gap: 6px;
  }

  .toolbar-right > .filter-chip-group .ghost-button,
  .toolbar-right > .column-picker-desktop-shell .ghost-button,
  .toolbar-left > [data-open-filters] {
    padding-inline: 3px;
    font-size: 0.58rem;
  }

  .toolbar-right > [data-local-refresh] {
    width: 30px;
    min-width: 30px;
    height: 30px;
  }

  .toolbar-left > .table-filter-summary {
    padding-inline: 6px;
    font-size: 0.62rem;
  }

  .toolbar-left > .table-search {
    grid-column: 4 / 6;
  }

  .table-meta,
  .table-filter-summary {
    min-width: 0;
    max-width: 100%;
  }
}

@media (max-width: 375px) {
  .editor-footer .editor-actions {
    flex-wrap: wrap;
  }

  .editor-actions .ghost-button,
  .editor-actions .primary-button {
    flex-basis: 100%;
  }

  .filter-chip,
  .ghost-button,
  .primary-button {
    min-width: 90px;
    max-width: 148px;
  }

  .mobile-row-head,
  .mobile-row-details summary {
    flex-direction: column;
    align-items: flex-start;
  }
}


.editor-delete-button {
  display: none !important;
}

.editor-input[readonly],
.editor-textarea[readonly] {
  background: rgba(127, 141, 135, 0.1);
  border-color: rgba(127, 141, 135, 0.24);
  color: #425160;
  cursor: text;
}

.editor-input[readonly]:focus,
.editor-textarea[readonly]:focus {
  border-color: rgba(77, 163, 255, 0.35);
  box-shadow: 0 0 0 3px rgba(77, 163, 255, 0.08);
}

.editor-drawer[data-section="alarms"] .editor-grid,
.editor-drawer[data-section="notifications"] .editor-grid,
.editor-drawer[data-section="leadsites"] .editor-grid {
  grid-template-columns: minmax(0, 1fr);
}

.editor-drawer[data-section="alarms"] .editor-body,
.editor-drawer[data-section="alarms"] .editor-field,
.editor-drawer[data-section="alarms"] .editor-input,
.editor-drawer[data-section="alarms"] .editor-select,
.editor-drawer[data-section="alarms"] .editor-textarea,
.editor-drawer[data-section="alarms"] .editor-multiselect,
.editor-drawer[data-section="alarms"] .phone-parts-field,
.editor-drawer[data-section="notifications"] .editor-body,
.editor-drawer[data-section="notifications"] .editor-field,
.editor-drawer[data-section="notifications"] .editor-input,
.editor-drawer[data-section="notifications"] .editor-select,
.editor-drawer[data-section="notifications"] .editor-textarea,
.editor-drawer[data-section="notifications"] .editor-multiselect,
.editor-drawer[data-section="notifications"] .phone-parts-field,
.editor-drawer[data-section="leadsites"] .editor-body,
.editor-drawer[data-section="leadsites"] .editor-field,
.editor-drawer[data-section="leadsites"] .editor-input,
.editor-drawer[data-section="leadsites"] .editor-select,
.editor-drawer[data-section="leadsites"] .editor-textarea,
.editor-drawer[data-section="leadsites"] .editor-multiselect,
.editor-drawer[data-section="leadsites"] .phone-parts-field {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.editor-drawer[data-section="alarms"] .editor-note,
.editor-drawer[data-section="alarms"] .selected-tags,
.editor-drawer[data-section="alarms"] .selected-tag,
.editor-drawer[data-section="alarms"] .editor-help,
.editor-drawer[data-section="alarms"] .editor-status,
.editor-drawer[data-section="notifications"] .editor-note,
.editor-drawer[data-section="notifications"] .selected-tags,
.editor-drawer[data-section="notifications"] .selected-tag,
.editor-drawer[data-section="notifications"] .editor-help,
.editor-drawer[data-section="notifications"] .editor-status,
.editor-drawer[data-section="leadsites"] .editor-note,
.editor-drawer[data-section="leadsites"] .selected-tags,
.editor-drawer[data-section="leadsites"] .selected-tag,
.editor-drawer[data-section="leadsites"] .editor-help,
.editor-drawer[data-section="leadsites"] .editor-status {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.editor-drawer[data-section="alarms"] .editor-textarea,
.editor-drawer[data-section="notifications"] .editor-textarea,
.editor-drawer[data-section="leadsites"] .editor-textarea {
  max-width: 100%;
}

.editor-drawer.is-compact[data-section="notifications"] .editor-shell,
.editor-drawer.is-compact[data-section="leadsites"] .editor-shell {
  height: auto;
  min-height: 0;
  padding-bottom: 12px;
  gap: 8px;
}

.editor-drawer.is-compact[data-section="notifications"] .editor-body,
.editor-drawer.is-compact[data-section="leadsites"] .editor-body {
  gap: 0;
  padding-bottom: 0;
}

.editor-drawer.is-compact[data-section="notifications"] .editor-note-empty,
.editor-drawer.is-compact[data-section="leadsites"] .editor-note-empty {
  padding: 10px 12px;
  font-size: 0.84rem;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .editor-drawer.is-alarm-ack .editor-body {
    gap: 6px;
  }

  .editor-alarm-subtitle {
    font-size: 0.8rem;
    line-height: 1.5;
    padding-right: 2px;
  }

  .editor-drawer.is-alarm-ack .editor-textarea {
    min-height: 104px;
  }

  .mobile-filters-bar {
    gap: 6px !important;
  }

  .mobile-filters-bar > .ghost-button,
  .mobile-filters-bar > .column-picker {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    width: 0 !important;
  }

  .mobile-filters-bar .ghost-button,
  .mobile-filters-bar .column-picker .ghost-button {
    min-width: 0 !important;
    max-width: none !important;
    padding: 9px 8px !important;
    font-size: 0.73rem !important;
    letter-spacing: 0.01em;
  }

  .mobile-filters-bar > .icon-button {
    flex: 0 0 38px !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
  }

  .editor-delete-button:not([hidden]) {
    display: inline-flex;
    flex: 1 1 100%;
    max-width: none;
  }

  .editor-body,
  .editor-grid,
  .editor-grid-scrollable,
  .editor-footer {
    border-radius: 18px;
  }

  .editor-footer .editor-actions {
    flex-wrap: wrap !important;
  }

  .editor-drawer[data-section="alarms"] .editor-shell,
  .editor-drawer[data-section="notifications"] .editor-shell,
  .editor-drawer[data-section="leadsites"] .editor-shell {
    width: min(94vw, 560px) !important;
  }
}

@media (max-width: 430px) {
  .mobile-filters-bar .ghost-button,
  .mobile-filters-bar .column-picker .ghost-button {
    padding: 8px 7px !important;
    font-size: 0.69rem !important;
  }
}


@media (max-width: 768px) {
  .table-toolbar {
    grid-template-columns: max-content max-content max-content 32px;
    gap: 6px;
    align-items: center;
  }

  .table-toolbar .toolbar-left,
  .table-toolbar .toolbar-right {
    display: contents;
  }

  .table-toolbar .toolbar-left > [data-open-filters],
  .table-toolbar .toolbar-right > .filter-chip-group,
  .table-toolbar .toolbar-right > .column-picker-desktop-shell,
  .table-toolbar .toolbar-right > [data-local-refresh],
  .table-toolbar .toolbar-left > .table-filter-summary,
  .table-toolbar .toolbar-left > .table-search,
  .table-toolbar .toolbar-left > .toolbar-extras {
    min-width: 0;
    max-width: 100%;
  }

  .table-toolbar .toolbar-left > [data-open-filters] {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    justify-self: start;
    width: auto;
  }

  .table-toolbar .toolbar-right > .filter-chip-group {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow: visible;
    align-self: center;
    justify-self: start;
    width: auto;
  }

  .table-toolbar .toolbar-right > .column-picker-desktop-shell {
    grid-column: 3;
    grid-row: 1;
    display: inline-flex !important;
    min-width: 0;
    overflow: visible;
    align-self: center;
    justify-self: start;
    width: auto;
  }

  .table-toolbar .toolbar-right > [data-local-refresh] {
    grid-column: 4;
    grid-row: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    min-width: 32px;
    max-width: 32px;
    min-height: 32px;
    height: 32px;
    padding: 0;
  }

  .table-toolbar .toolbar-left > .table-filter-summary {
    grid-column: 1 / -1;
    grid-row: 3;
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.84);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.66rem;
    width: 100%;
    justify-self: stretch;
  }

  .table-toolbar .toolbar-left > .table-search {
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
    flex-basis: auto;
  }

  .table-toolbar .toolbar-left > .toolbar-extras {
    grid-column: 1 / -1;
    grid-row: 4;
  }

  .table-toolbar .toolbar-right > .table-meta {
    display: none;
  }

  .table-toolbar .ghost-button,
  .table-toolbar .filter-chip,
  .table-toolbar .toolbar-right > .column-picker-desktop-shell .ghost-button,
  .table-toolbar .toolbar-left > [data-open-filters] {
    min-width: 0 !important;
    max-width: max-content !important;
    width: auto;
    min-height: 32px;
    padding: 4px 10px;
    font-size: 0.68rem;
    line-height: 1;
    white-space: nowrap;
  }

  .table-toolbar .table-search,
  .table-toolbar .table-search input {
    min-width: 0 !important;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .table-toolbar {
    grid-template-columns: max-content max-content max-content 30px;
    gap: 5px;
  }

  .table-toolbar .ghost-button,
  .table-toolbar .filter-chip,
  .table-toolbar .toolbar-right > .column-picker-desktop-shell .ghost-button,
  .table-toolbar .toolbar-left > [data-open-filters] {
    padding: 4px 9px;
    font-size: 0.64rem;
  }

  .table-toolbar .toolbar-left > .table-filter-summary {
    padding-inline: 6px;
    font-size: 0.62rem;
  }

  .table-toolbar .toolbar-right > [data-local-refresh] {
    width: 30px;
    min-width: 30px;
    max-width: 30px;
    height: 30px;
    min-height: 30px;
  }
}

@media (max-width: 430px) {
  .table-toolbar {
    gap: 4px;
  }

  .table-toolbar .ghost-button,
  .table-toolbar .filter-chip,
  .table-toolbar .toolbar-right > .column-picker-desktop-shell .ghost-button,
  .table-toolbar .toolbar-left > [data-open-filters] {
    padding-inline: 8px;
    font-size: 0.61rem;
  }

  .table-toolbar .toolbar-left > .table-filter-summary {
    padding-inline: 5px;
    font-size: 0.6rem;
    max-width: none;
  }

  .table-toolbar .toolbar-right > [data-local-refresh] {
    width: 28px;
    min-width: 28px;
    max-width: 28px;
    height: 28px;
    min-height: 28px;
  }
}

@media (max-width: 768px) {
  .table-toolbar {
    display: grid !important;
    grid-template-columns: max-content max-content max-content minmax(0, 1fr) 36px !important;
    gap: 8px !important;
    align-items: center !important;
  }

  .table-toolbar .toolbar-left,
  .table-toolbar .toolbar-right {
    display: contents !important;
  }

  .table-toolbar .toolbar-left > [data-open-filters] {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: auto !important;
    justify-self: start !important;
  }

  .table-toolbar .toolbar-right > .filter-chip-group {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: inline-flex !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    overflow: visible !important;
    width: auto !important;
    justify-self: start !important;
  }

  .table-toolbar .toolbar-right > .column-picker-desktop-shell {
    grid-column: 3 !important;
    grid-row: 1 !important;
    display: inline-flex !important;
    overflow: visible !important;
    width: auto !important;
    justify-self: start !important;
  }

  .table-toolbar .toolbar-right > .column-picker-desktop-shell .column-picker-panel {
    position: fixed !important;
    top: 108px !important;
    bottom: auto !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    max-height: min(34vh, 240px) !important;
    padding: 10px !important;
    overflow: auto !important;
    border-radius: 16px !important;
    box-shadow: 0 18px 42px rgba(7, 18, 31, 0.24) !important;
  }

  .table-toolbar .toolbar-right > .column-picker-desktop-shell .column-option {
    align-items: flex-start !important;
    gap: 12px !important;
    font-size: 0.8rem !important;
  }

  .table-toolbar .toolbar-right > .column-picker-desktop-shell .column-option-main {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  .table-toolbar .toolbar-right > .column-picker-desktop-shell .column-option-actions {
    flex: 0 0 auto !important;
  }

  .table-toolbar .toolbar-right > [data-local-refresh] {
    grid-column: 5 !important;
    grid-row: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
  }

  .table-toolbar .toolbar-left > .table-search {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .table-toolbar .toolbar-left > .table-filter-summary {
    grid-column: 4 !important;
    grid-row: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-self: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 36px !important;
    padding: 0 12px !important;
    border: 1px solid var(--line) !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.84) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 0.7rem !important;
  }

  .table-toolbar .toolbar-left > .toolbar-extras {
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
  }

  .table-toolbar .toolbar-right > .table-meta {
    display: none !important;
  }

  .table-toolbar .ghost-button,
  .table-toolbar .filter-chip,
  .table-toolbar .toolbar-right > .column-picker-desktop-shell .ghost-button,
  .table-toolbar .toolbar-left > [data-open-filters] {
    width: auto !important;
    max-width: max-content !important;
    min-width: 0 !important;
    min-height: 36px !important;
    padding: 6px 12px !important;
    font-size: 0.7rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 640px) {
  .table-toolbar {
    grid-template-columns: max-content max-content max-content minmax(0, 1fr) 34px !important;
    gap: 7px !important;
  }

  .table-toolbar .ghost-button,
  .table-toolbar .filter-chip,
  .table-toolbar .toolbar-right > .column-picker-desktop-shell .ghost-button,
  .table-toolbar .toolbar-left > [data-open-filters] {
    padding: 5px 11px !important;
    font-size: 0.67rem !important;
  }

  .table-toolbar .toolbar-right > [data-local-refresh] {
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
  }

  .table-toolbar .toolbar-left > .table-filter-summary {
    min-height: 34px !important;
    padding-inline: 10px !important;
    font-size: 0.67rem !important;
  }
}

@media (max-width: 430px) {
  .table-toolbar {
    grid-template-columns: max-content max-content max-content minmax(0, 1fr) 32px !important;
    gap: 6px !important;
  }

  .table-toolbar .ghost-button,
  .table-toolbar .filter-chip,
  .table-toolbar .toolbar-right > .column-picker-desktop-shell .ghost-button,
  .table-toolbar .toolbar-left > [data-open-filters] {
    padding-inline: 10px !important;
    font-size: 0.64rem !important;
  }

  .table-toolbar .toolbar-right > [data-local-refresh] {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
  }

  .table-toolbar .toolbar-left > .table-filter-summary {
    min-height: 32px !important;
    padding-inline: 9px !important;
    font-size: 0.64rem !important;
  }

  .table-toolbar .toolbar-right > .column-picker-desktop-shell .column-picker-panel {
    top: 104px !important;
    left: 10px !important;
    right: 10px !important;
    max-height: min(30vh, 210px) !important;
    padding: 10px !important;
  }
}


.history-screen {
  display: grid;
}

.history-shell-card {
  display: grid;
  gap: 22px;
  padding: 24px;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(244, 249, 255, 0.94));
  border: 1px solid rgba(15, 42, 68, 0.08);
  box-shadow: var(--shadow-soft);
}

.history-header-card,
.history-toolbar,
.point-history-grid,
.history-kpi-grid,
.history-stat-grid,
.history-state-grid {
  display: grid;
}

.history-header-card {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}

.history-header-card h3,
.history-card-head h4 {
  margin: 0;
  color: #0f2a44;
}

.history-meta {
  margin: 8px 0 0;
  color: rgba(15, 42, 68, 0.72);
}

.history-header-actions,
.history-toolbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.history-toolbar {
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 16px;
  align-items: end;
}

.history-period-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.history-period-field select {
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(15, 42, 68, 0.14);
  background: rgba(255, 255, 255, 0.92);
}

.history-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.history-kpi-card,
.history-stat-card,
.history-state-card {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(15, 42, 68, 0.08);
}

.history-kpi-card span,
.history-stat-card span,
.history-state-card span,
.history-state-card small {
  display: block;
  color: var(--muted);
}

.history-kpi-card strong,
.history-stat-card strong,
.history-state-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.05rem;
  color: #0f2a44;
}

.history-aggregation-note,
.table-section-banner {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(77, 163, 255, 0.1);
  color: #1f5a8b;
  border: 1px solid rgba(77, 163, 255, 0.12);
}

.table-history-button {
  min-width: min(320px, 100%);
}

.point-history-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.point-history-grid.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.history-chart-card {
  display: grid;
  gap: 18px;
  padding: 20px;
  border-radius: 24px;
  background: rgba(248, 251, 255, 0.92);
  border: 1px solid rgba(15, 42, 68, 0.08);
}

.history-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.point-history-chart-wrap {
  overflow-x: auto;
}

.point-history-chart-svg {
  width: 100%;
  min-width: 640px;
  height: auto;
  display: block;
}

.history-axis-labels text {
  fill: rgba(15, 42, 68, 0.72);
  font-size: 12px;
}

.history-grid-line {
  stroke: rgba(15, 42, 68, 0.08);
  stroke-width: 1;
}

.history-zero-line {
  stroke: rgba(199, 74, 69, 0.35);
  stroke-width: 1.4;
  stroke-dasharray: 6 6;
}

.history-line-path {
  fill: none;
  stroke: #1f5a8b;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.history-line-path.is-step {
  stroke: var(--series-color, #1F5A8B);
}

.history-range-band {
  fill: rgba(77, 163, 255, 0.14);
  stroke: none;
}

.history-point-marker {
  fill: #f1a208;
  stroke: #ffffff;
  stroke-width: 1.6;
}

.history-stat-grid,
.history-state-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.point-history-chart-empty,
.history-state-empty {
  padding: 28px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1100px) {
  .history-header-card,
  .history-header-card-inline {
    grid-template-columns: 1fr;
  }

  .history-period-field {
    width: 100%;
  }

  .point-history-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .history-shell-card {
    padding: 18px;
  }

  .history-header-card,
  .history-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .history-toolbar-actions {
    justify-content: stretch;
  }

  .history-toolbar-actions .ghost-button,
  .history-toolbar-actions .primary-button,
  .table-history-button {
    width: 100%;
  }

  .point-history-chart-svg {
    min-width: 560px;
  }
}


.point-history-access-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(77, 163, 255, 0.12), rgba(255, 255, 255, 0.94));
  border: 1px solid rgba(77, 163, 255, 0.16);
}

.point-history-access-copy {
  display: grid;
  gap: 4px;
}

.point-history-access-copy strong {
  color: #0f2a44;
}

.point-history-access-copy span:last-child {
  color: var(--muted);
  line-height: 1.45;
}

.point-history-access-button,
.table-history-button {
  min-width: 220px;
}

body.editor-active .content-column {
  transition: padding-right 0.24s ease;
}

@media (min-width: 1360px) {
  body.editor-active .content-column {
    padding-right: min(688px, 48vw);
  }
}

.history-shell-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(244, 249, 255, 0.96));
  border: 1px solid rgba(15, 42, 68, 0.08);
  box-shadow: var(--shadow-soft);
}

.history-header-card,
.history-toolbar,
.point-history-grid {
  display: grid;
}

.history-header-card {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}

.history-header-card-inline {
  align-items: center;
}

.history-card-head h4 {
  margin: 0;
  color: #0f2a44;
}

.history-toolbar {
  justify-content: end;
}

.history-toolbar-right {
  grid-template-columns: minmax(220px, 280px);
  justify-content: end;
}

.history-period-field {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.84rem;
}

.history-period-field select {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 42, 68, 0.14);
  background: rgba(255, 255, 255, 0.92);
  font-size: 0.92rem;
}

.table-section-banner {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(77, 163, 255, 0.1);
  border: 1px solid rgba(77, 163, 255, 0.14);
  color: #1f5a8b;
}

/* Keep the two multi-line sidebar items taller than the default nav buttons. */
.sidebar-nav .nav-item[data-section="serviceMonitor"],
.sidebar-nav .nav-item[data-section="alarms"] {
  min-height: 66px !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  align-items: flex-start;
}

.sidebar-nav .nav-item[data-section="serviceMonitor"] .nav-item-main,
.sidebar-nav .nav-item[data-section="alarms"] .nav-item-main {
  min-height: 100%;
  align-content: center;
}

.sidebar-nav .nav-item[data-section="serviceMonitor"] .nav-item-meta,
.sidebar-nav .nav-item[data-section="alarms"] .nav-item-meta {
  margin-top: 6px !important;
  padding-right: 10px !important;
}

.point-history-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.history-chart-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(248, 251, 255, 0.94);
  border: 1px solid rgba(15, 42, 68, 0.08);
}

.history-chart-card.is-loading {
  overflow: hidden;
}

.history-card-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.history-legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.history-legend-row.is-loading {
  opacity: 0.4;
}

.history-legend-item {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 42, 68, 0.12);
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  transition: opacity 0.18s ease, border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.history-legend-item.is-muted {
  opacity: 0.45;
}

.history-legend-item.is-muted .history-legend-label {
  text-decoration: line-through;
}

.history-legend-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.history-legend-item:hover,
.history-legend-item:focus-visible {
  border-color: rgba(31, 90, 139, 0.34);
  background: rgba(255, 255, 255, 1);
  transform: translateY(-1px);
}

.history-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--series-color, #1F5A8B);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--series-color, #1F5A8B) 16%, transparent);
  flex: 0 0 auto;
}

.history-legend-label {
  color: #0f2a44;
  font-weight: 700;
  min-width: 0;
}

.history-legend-visibility {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  min-width: 22px;
  color: rgba(15, 42, 68, 0.68);
  font-size: 0.95rem;
  line-height: 1;
  flex: 0 0 auto;
}

.history-legend-item.is-muted .history-legend-visibility {
  color: rgba(15, 42, 68, 0.44);
}

.history-legend-empty,
.point-history-chart-empty {
  padding: 24px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  text-align: center;
}

.point-history-chart-wrap {
  position: relative;
  overflow-x: auto;
  padding-right: 6px;
}

.point-history-plotly {
  width: 100%;
  min-width: 680px;
  min-height: 340px;
  cursor: default;
}

.point-history-chart-svg {
  width: 100%;
  min-width: 680px;
  height: auto;
  display: block;
}

.history-band-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.history-band-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 42, 68, 0.1);
  background: rgba(255, 255, 255, 0.82);
  color: #23415f;
  font-size: 0.84rem;
  font-weight: 700;
}

.history-band-legend-swatch {
  width: 18px;
  height: 12px;
  border-radius: 999px;
  border: 1px solid var(--band-color, rgba(43, 124, 191, 0.32));
  background: var(--band-fill, rgba(43, 124, 191, 0.14));
  flex: 0 0 auto;
}

.history-chart-hitbox {
  cursor: crosshair;
}

.history-axis-labels text {
  fill: rgba(15, 42, 68, 0.72);
  font-size: 12px;
}

.history-grid-line {
  stroke: rgba(15, 42, 68, 0.08);
  stroke-width: 1;
}

.history-grid-line-vertical {
  stroke-dasharray: 4 8;
}

.history-zero-line {
  stroke: rgba(199, 74, 69, 0.4);
  stroke-width: 1.4;
  stroke-dasharray: 6 6;
}

.history-range-band {
  fill: color-mix(in srgb, var(--series-color, #5ea76a) 18%, rgba(119, 201, 134, 0.18));
  pointer-events: none;
}

.history-range-line {
  stroke: color-mix(in srgb, var(--series-color, #5ea76a) 58%, #255b31);
  stroke-width: 1.4;
  stroke-dasharray: 6 4;
  pointer-events: none;
}

.history-line-path {
  fill: none;
  stroke: var(--series-color, #1F5A8B);
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.history-hover-line {
  stroke: rgba(15, 42, 68, 0.38);
  stroke-width: 1.3;
  stroke-dasharray: 6 4;
  pointer-events: none;
}

.point-history-plotly .hoverlayer .hovertext rect {
  fill: #ffffff !important;
  fill-opacity: 1 !important;
  stroke: #dcdcdc !important;
  stroke-opacity: 1 !important;
}

.point-history-plotly .hoverlayer .hovertext text {
  fill: #111111 !important;
}

.history-loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  border-radius: inherit;
  background: rgba(248, 251, 255, 0.76);
  backdrop-filter: blur(5px);
  color: #1f5a8b;
  font-weight: 700;
}

.history-loading-spinner {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid rgba(31, 90, 139, 0.18);
  border-top-color: #1f5a8b;
  animation: spin 0.8s linear infinite;
}

.history-compact-stats {
  display: grid;
  gap: 8px;
}

.history-series-disclosure {
  border-top: 1px solid rgba(15, 42, 68, 0.08);
  padding-top: 8px;
}

.history-series-disclosure.is-muted {
  opacity: 0.52;
}

.history-series-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.history-series-summary::-webkit-details-marker {
  display: none;
}

.history-series-summary-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  color: rgba(15, 42, 68, 0.68);
  font-size: 0.78rem;
  flex: 0 0 auto;
}

.history-series-summary-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.history-series-visibility-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  min-width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(15, 42, 68, 0.78);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
}

.history-series-visibility-button.is-off {
  color: rgba(15, 42, 68, 0.46);
}

.history-series-summary-toggle::before {
  content: "▼";
  transition: transform 0.18s ease;
}

.history-series-disclosure[open] .history-series-summary-toggle::before {
  content: "▲";
}

.history-series-body {
  display: grid;
  gap: 6px;
  padding: 8px 0 0 22px;
}

.history-compact-stat-name {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #0f2a44;
  font-weight: 700;
  font-size: 0.92rem;
}

.history-compact-stat-values {
  color: rgba(15, 42, 68, 0.74);
  font-size: 0.88rem;
  line-height: 1.45;
  word-break: break-word;
}

.history-compact-stat-values.is-subtle {
  color: rgba(15, 42, 68, 0.58);
}

@media (max-width: 1359px) {
  body.editor-active .content-column {
    padding-right: 0;
  }
}

@media (max-width: 1100px) {
  .history-header-card,
  .history-header-card-inline,
  .point-history-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .history-period-field {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .point-history-access-card,
  .history-header-card,
  .history-toolbar-right {
    grid-template-columns: minmax(0, 1fr);
  }

  .point-history-access-button,
  .table-history-button {
    width: 100%;
  }

  .history-shell-card {
    padding: 18px;
  }

  .point-history-chart-svg {
    min-width: 560px;
  }
}


.history-multi-stack {
  display: grid;
  gap: 14px;
}

.history-section-card {
  gap: 14px;
}

.history-section-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.history-section-header-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.history-section-header-copy h3 {
  margin: 0;
  color: #0f2a44;
}

.history-section-order {
  display: inline-flex;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(31, 90, 139, 0.1);
  color: #1f5a8b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.history-section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: stretch;
}

.history-section-actions .history-period-field {
  min-width: 180px;
  max-width: 220px;
}

.history-section-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  align-items: stretch;
}

.history-environment-card {
  display: grid;
  gap: 14px;
}

.history-environment-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.history-environment-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.history-picker-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.28);
}

.history-picker-dialog {
  width: min(720px, calc(100vw - 32px));
  display: grid;
  gap: 12px;
}

.history-selector-card,
.history-selector-header,
.history-selector-copy,
.history-space-search,
.history-space-results {
  display: grid;
}

.history-selector-card {
  gap: 12px;
}

.history-selector-header {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.history-selector-copy {
  gap: 4px;
}

.history-selector-copy h3,
.history-selector-copy p {
  margin: 0;
}

.history-selector-copy h3 {
  color: #0f2a44;
}

.history-selector-copy p {
  color: rgba(15, 42, 68, 0.72);
}

.history-space-search {
  gap: 8px;
}

.history-space-search-field {
  position: relative;
}

.history-space-search-input {
  min-height: 42px;
  padding: 0 40px 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(15, 42, 68, 0.14);
  background: rgba(255, 255, 255, 0.96);
  color: #0f2a44;
  font: inherit;
  width: 100%;
  box-sizing: border-box;
}

.history-space-search-clear {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(15, 42, 68, 0.64);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.history-space-results {
  gap: 6px;
  max-height: min(420px, 60vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-right: 4px;
  align-content: start;
}

.history-space-results-empty {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.76);
  color: rgba(15, 42, 68, 0.66);
}

.history-space-option {
  appearance: none;
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15, 42, 68, 0.1);
  background: rgba(255, 255, 255, 0.84);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.history-space-option strong {
  color: #0f2a44;
}

.history-space-option span {
  color: rgba(15, 42, 68, 0.68);
  font-size: 0.92rem;
}

.history-space-option:hover,
.history-space-option:focus-visible,
.history-space-option.is-active {
  border-color: rgba(31, 90, 139, 0.28);
  background: rgba(240, 247, 255, 0.96);
  transform: translateY(-1px);
}

.history-selector-summary {
  margin-top: -4px;
}

.history-summary-chip {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-height: 56px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(15, 42, 68, 0.08);
  color: rgba(15, 42, 68, 0.76);
  line-height: 1.25;
  overflow: visible;
  word-break: break-word;
  font-size: 0.9rem;
}

.history-summary-chip strong {
  color: #0f2a44;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.history-summary-chip-value {
  display: block;
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.2;
}

.history-summary-chip.is-period .history-summary-chip-value {
  font-size: 0.86rem;
}

.history-section-actions .ghost-button,
.history-section-actions .primary-button,
.point-history-footer-actions .primary-button,
.history-selector-header .ghost-button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 0.88rem;
}

.history-normal-band-toggle.is-active {
  border-color: rgba(94, 167, 106, 0.44);
  background: rgba(236, 248, 238, 0.96);
  color: #255b31;
}

.point-history-footer-actions {
  display: flex;
  justify-content: center;
}

.point-history-footer-actions .primary-button {
  min-width: min(320px, 100%);
}

.point-history-picker-banner {
  justify-content: space-between;
  gap: 16px;
  text-align: left;
}

.point-history-picker-banner-copy {
  display: grid;
  gap: 6px;
}

.point-history-picker-banner-copy strong {
  color: #0f2a44;
}

.point-history-picker-banner-copy span {
  color: rgba(15, 42, 68, 0.74);
}

.point-history-period-dialog {
  max-width: min(680px, calc(100vw - 32px));
}

.point-history-period-card {
  gap: 18px;
}

.point-history-period-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.point-history-period-grid input {
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(15, 42, 68, 0.14);
  background: rgba(255, 255, 255, 0.92);
  color: #0f2a44;
}

.point-history-access-card.is-picker {
  background: linear-gradient(135deg, rgba(15, 42, 68, 0.08), rgba(77, 163, 255, 0.16));
}

@media (max-width: 1100px) {
  .history-section-header {
    grid-template-columns: minmax(0, 1fr);
  }

  .history-section-actions {
    justify-content: stretch;
  }

  .history-selector-header {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .history-section-actions,
  .point-history-period-grid,
  .point-history-picker-banner {
    grid-template-columns: minmax(0, 1fr);
  }

  .history-section-actions {
    display: grid;
  }

  .history-section-actions .ghost-button,
  .history-section-actions .primary-button,
  .history-section-actions .history-period-field,
  .point-history-picker-banner .ghost-button,
  .point-history-footer-actions .primary-button {
    width: 100%;
  }

  .history-section-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .history-environment-header {
    grid-template-columns: minmax(0, 1fr);
  }
}

.history-report-dialog {
  max-width: min(1220px, calc(100vw - 32px));
}

.history-report-header {
  align-items: center;
}

.history-report-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.history-report-body {
  max-height: min(78vh, 920px);
  overflow: auto;
  background:
    radial-gradient(circle at top left, rgba(77, 163, 255, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(245, 248, 252, 0.94), rgba(235, 241, 247, 0.92));
}

.history-report-document {
  display: grid;
  gap: 22px;
  padding: 8px 4px;
}

.history-report-cover,
.history-report-section,
.history-report-footer {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 42, 68, 0.1);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 18px 46px rgba(15, 42, 68, 0.08);
}

.history-report-kicker {
  margin: 0 0 6px;
  color: #5f7183;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.history-report-logo-wrap {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.history-report-logo {
  max-width: 180px;
  max-height: 64px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.history-report-cover h2,
.history-report-section h4 {
  margin: 0;
  color: #0f2a44;
}

.history-report-identification {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 14px;
  margin-top: 18px;
  color: #314a63;
  font-size: 0.94rem;
}

.history-report-section {
  display: grid;
  gap: 18px;
}

.history-report-section-head p {
  margin: 6px 0 0;
  color: #5f7183;
}

.history-report-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.history-report-kpi-card,
.history-report-table-card,
.history-report-chart-card,
.history-report-score-card {
  border-radius: 20px;
  border: 1px solid rgba(15, 42, 68, 0.09);
  background: rgba(248, 251, 254, 0.98);
  padding: 18px;
}

.history-report-kpi-card {
  display: grid;
  gap: 8px;
}

.history-report-kpi-card span,
.history-report-kpi-card small {
  color: #5f7183;
}

.history-report-kpi-card strong {
  color: #0f2a44;
  font-size: 1.7rem;
  line-height: 1.05;
}

.history-report-score-card {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 220px;
  background: linear-gradient(135deg, #1f5a8b 0%, #3b82f6 100%);
  border-color: transparent;
}

.history-report-score-card span,
.history-report-score-card small {
  color: rgba(255, 255, 255, 0.82);
}

.history-report-score-card strong {
  color: #fff;
  font-size: 3rem;
  line-height: 1;
}

.history-report-section-grid,
.history-report-two-columns {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 16px;
}

.history-report-two-columns {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.history-report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.history-report-table thead th {
  color: #5f7183;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.history-report-table th,
.history-report-table td {
  padding: 11px 0;
  border-bottom: 1px solid rgba(15, 42, 68, 0.08);
  text-align: left;
}

.history-report-table tbody tr:last-child th,
.history-report-table tbody tr:last-child td {
  border-bottom: none;
}

.history-report-chart-shell {
  display: grid;
  gap: 14px;
}

.report-pdf-timeline-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px 14px;
  margin-top: 2px;
  color: #4f6478;
  font-size: 0.74rem;
  line-height: 1.2;
}

.report-pdf-timeline-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.report-pdf-timeline-legend-swatch {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--timeline-legend-color, #2f9e44);
  flex: 0 0 auto;
}

.history-report-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.history-report-chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #314a63;
  font-size: 0.88rem;
}

.history-report-chart-legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--report-series-color, #1f5a8b);
  display: inline-block;
}

.history-report-chart-svg {
  width: 100%;
  display: block;
}

.history-report-grid-line {
  stroke: rgba(15, 42, 68, 0.08);
  stroke-width: 1;
}

.history-report-axis-label {
  fill: #5f7183;
  font-size: 11px;
}

.history-report-series-line {
  fill: none;
  stroke: var(--report-series-color, #1f5a8b);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.history-report-chart-empty {
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed rgba(15, 42, 68, 0.15);
  color: #5f7183;
  text-align: center;
}

.history-report-insights {
  margin: 0;
  padding: 18px 20px;
  border-left: 4px solid #1f5a8b;
  border-radius: 18px;
  background: rgba(232, 242, 250, 0.95);
  color: #17324e;
  line-height: 1.65;
}

.history-report-footer {
  gap: 6px;
  color: #5f7183;
  font-size: 0.9rem;
}

@media (max-width: 960px) {
  .history-report-section-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .history-report-dialog {
    max-width: calc(100vw - 12px);
  }

  .history-report-header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .history-report-cover,
  .history-report-section,
  .history-report-footer {
    padding: 18px;
    border-radius: 20px;
  }

  .history-report-kpi-grid,
  .history-report-two-columns {
    grid-template-columns: minmax(0, 1fr);
  }
}

.report-page {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.10), transparent 28%),
    radial-gradient(circle at top right, rgba(31, 90, 139, 0.14), transparent 24%),
    linear-gradient(180deg, #eef4f8 0%, #f7fafc 42%, #edf2f7 100%);
  color: #16324f;
  font-family: "Manrope", "Segoe UI", sans-serif;
}

.report-shell {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.report-topbar,
.report-hero-card,
.report-panel {
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.report-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
}

.report-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0f766e;
}

.report-topbar h1,
.report-hero-copy h2,
.report-panel h3 {
  margin: 0;
}

.report-subtitle {
  margin: 8px 0 0;
  color: #526277;
  font-size: 14px;
}

.report-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.report-status-card {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(197, 48, 48, 0.28);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.9);
}

.report-status-card strong {
  font-size: 15px;
}

.report-status-card span {
  color: #526277;
  font-size: 14px;
}

.report-status-card.is-error {
  border-color: rgba(197, 48, 48, 0.28);
  background: rgba(255, 245, 245, 0.95);
}

.report-content {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.report-toolbar {
  position: sticky;
  top: 12px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.report-page[data-export-mode="pdf"] .report-toolbar {
  display: none;
}

.report-close-button,
.report-export-button {
  border-color: #d6dde6;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.report-close-button {
  justify-content: flex-start;
}

.report-global-loading {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(236, 239, 243, 0.72);
  backdrop-filter: blur(4px);
}

.report-global-loading[hidden] {
  display: none !important;
}

.report-global-loading-card {
  width: min(520px, 100%);
  display: grid;
  gap: 16px;
  align-items: stretch;
  justify-items: stretch;
  padding: 22px 24px;
}

.report-global-loading-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.report-global-loading-head strong {
  display: block;
  color: #0f2a44;
  font-size: 1rem;
}

.report-global-loading-head p {
  margin: 6px 0 0;
  color: rgba(15, 42, 68, 0.72);
  font-size: 0.92rem;
  line-height: 1.45;
}

.report-global-loading-percent {
  flex: 0 0 auto;
  color: #1f5a8b;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.report-global-loading-progress {
  position: relative;
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #d8e0e8;
  box-shadow: inset 0 0 0 1px rgba(31, 90, 139, 0.08);
}

.report-global-loading-progress-bar {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: #4da3ff;
}

.report-global-loading-copy {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #0f2a44;
  font-size: 0.92rem;
}

.report-reference-document {
  max-width: 1120px;
  margin: 0 auto;
}

.report-reference-cover-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(240px, 320px);
  gap: 18px;
  align-items: stretch;
}

.report-reference-score-card {
  min-height: 100%;
}

.report-reference-section-grid {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 16px;
}

.report-reference-state-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.report-reference-chart-card {
  display: grid;
  gap: 12px;
}

.report-reference-chart-card h5 {
  margin: 0;
  color: #0f2a44;
  font-size: 1rem;
}

.report-reference-analysis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.9fr);
  gap: 16px;
}

.report-reference-copy-card {
  display: grid;
  gap: 10px;
  color: #314a63;
  line-height: 1.65;
}

.report-reference-copy-card p {
  margin: 0;
}

.history-report-section .report-metric-grid {
  margin-bottom: 0;
}

.history-report-section .report-metric-card {
  min-height: 0;
  padding: 18px;
  border-radius: 20px;
  border-color: rgba(15, 42, 68, 0.09);
  background: rgba(248, 251, 254, 0.98);
  box-shadow: none;
}

.history-report-section .report-metric-card strong {
  color: #0f2a44;
  font-size: 1.7rem;
}

.history-report-section .report-metric-card span,
.history-report-section .report-metric-card small {
  color: #5f7183;
}

.history-report-section .report-chart-shell,
.history-report-section .report-chart {
  min-height: 320px;
}

.history-report-section .report-chart-shell-timeline,
.history-report-section .report-chart-timeline {
  min-height: 110px;
}

.report-page[data-export-mode="pdf"] {
  background: #eceff3;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.report-page[data-export-mode="pdf"] .report-shell {
  width: min(100% - 24px, 860px);
  padding: 16px 0 36px;
}

.report-page[data-export-mode="pdf"] .report-topbar {
  display: none;
}

.report-page[data-export-mode="pdf"] .report-content {
  gap: 16px;
  margin-top: 0;
}

.report-page[data-export-mode="pdf"] .report-reference-document {
  max-width: 820px;
  gap: 16px;
  padding: 0;
}

.report-page[data-export-mode="pdf"] .report-reference-page {
  display: block;
  padding: 12px;
  background: #fff;
  border: 1px solid #d9dfe6;
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.08);
  box-sizing: border-box;
  break-inside: auto;
  page-break-inside: auto;
  break-after: auto;
  page-break-after: auto;
}

.report-page[data-export-mode="pdf"] .history-report-section,
.report-page[data-export-mode="pdf"] .report-pdf-kpi-grid,
.report-page[data-export-mode="pdf"] .report-summary-grid,
.report-page[data-export-mode="pdf"] .report-pdf-timeline-row {
  break-inside: auto;
  page-break-inside: auto;
}

.report-page[data-export-mode="pdf"] .history-report-table-card,
.report-page[data-export-mode="pdf"] .history-report-chart-card,
.report-page[data-export-mode="pdf"] .report-pdf-ico-section,
.report-page[data-export-mode="pdf"] .report-period-banner,
.report-page[data-export-mode="pdf"] .report-diagnosis-banner,
.report-page[data-export-mode="pdf"] .report-summary-reference-bar,
.report-page[data-export-mode="pdf"] .report-summary-footnote,
.report-page[data-export-mode="pdf"] .report-metric-card,
.report-page[data-export-mode="pdf"] .report-pdf-kpi-grid > *,
.report-page[data-export-mode="pdf"] .report-summary-grid > *,
.report-page[data-export-mode="pdf"] .report-pdf-timeline-row,
.report-page[data-export-mode="pdf"] .report-occurrence-description,
.report-page[data-export-mode="pdf"] .report-occurrence-description-entry,
.report-page[data-export-mode="pdf"] .report-occurrence-item,
.report-page[data-export-mode="pdf"] .history-report-insights,
.report-page[data-export-mode="pdf"] .report-copy-block,
.report-page[data-export-mode="pdf"] .report-diagnosis-copy,
.report-page[data-export-mode="pdf"] .report-pdf-index-composition {
  break-inside: avoid-page;
  page-break-inside: avoid;
}

.report-page[data-export-mode="pdf"] .report-top-summary,
.report-page[data-export-mode="pdf"] .report-pdf-ico-section {
  break-inside: avoid-page;
  page-break-inside: avoid;
}

.report-page[data-export-mode="pdf"] .js-plotly-plot,
.report-page[data-export-mode="pdf"] .plot-container,
.report-page[data-export-mode="pdf"] .svg-container,
.report-page[data-export-mode="pdf"] .main-svg {
  width: 100% !important;
  max-width: 100% !important;
}

.report-page[data-export-mode="pdf"] .report-chart-shell,
.report-page[data-export-mode="pdf"] .report-chart {
  overflow: visible;
  break-inside: avoid-page;
  page-break-inside: avoid;
}

.report-page[data-export-mode="pdf"] .report-chart-shell-timeline,
.report-page[data-export-mode="pdf"] .report-chart-timeline {
  min-height: 118px;
}

.report-page[data-export-mode="pdf"] .history-report-section-head h4,
.report-page[data-export-mode="pdf"] .report-pdf-section-title,
.report-page[data-export-mode="pdf"] .report-pdf-chart-head h4,
.report-page[data-export-mode="pdf"] .report-inline-title,
.report-page[data-export-mode="pdf"] .report-summary-grid h5,
.report-page[data-export-mode="pdf"] .report-technical-block h5,
.report-page[data-export-mode="pdf"] .report-metric-card strong,
.report-page[data-export-mode="pdf"] .report-metric-card span,
.report-page[data-export-mode="pdf"] .report-metric-card small,
.report-page[data-export-mode="pdf"] .history-report-table th,
.report-page[data-export-mode="pdf"] .history-report-table td,
.report-page[data-export-mode="pdf"] .report-summary-footnote,
.report-page[data-export-mode="pdf"] .report-reference-page p {
  overflow: visible;
  line-height: 1.35;
}

.report-page[data-export-mode="pdf"] .report-occurrences-disclosure,
.report-page[data-export-mode="pdf"] .report-occurrences-table,
.report-page[data-export-mode="pdf"] .report-occurrence-description,
.report-page[data-export-mode="pdf"] .report-occurrence-description-entry {
  break-inside: auto;
  page-break-inside: auto;
}

.report-page[data-export-mode="pdf"] .report-table-wrap,
.report-page[data-export-mode="pdf"] .report-occurrences-content,
.report-page[data-export-mode="pdf"] .report-occurrences-descriptions,
.report-page[data-export-mode="pdf"] .history-report-table-card,
.report-page[data-export-mode="pdf"] .history-report-chart-card,
.report-page[data-export-mode="pdf"] .history-report-section,
.report-page[data-export-mode="pdf"] .report-reference-page {
  overflow: visible !important;
}

.report-pdf-header {
  padding: 0;
  border: none;
  box-shadow: none;
  border-radius: 0;
}

.report-pdf-header-grid {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 112px;
  gap: 18px;
  align-items: center;
}

.report-pdf-header-logo {
  display: flex;
  align-items: center;
  min-height: 64px;
}

.report-pdf-header-logo.is-right {
  justify-content: flex-end;
}

.history-report-logo-fallback {
  display: inline-flex;
  align-items: center;
  min-height: 54px;
  max-width: 180px;
  font-weight: 700;
  color: #233647;
}

.report-pdf-brand-aacd {
  width: 54px;
  height: auto;
  display: block;
}

.report-pdf-title-stack {
  text-align: center;
  color: #233647;
}

.report-pdf-title-stack h2 {
  margin: 0 0 6px;
  font-size: 30px;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.report-pdf-title-stack p {
  margin: 3px 0;
  font-size: 12px;
  line-height: 1.45;
}

.report-tk-brand {
  width: 82px;
  height: auto;
  display: block;
}

.report-reference-page .history-report-section {
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(15, 42, 68, 0.05);
  border: 1px solid #e7edf4;
  background: #fff;
  break-inside: avoid-page;
  page-break-inside: avoid;
}

.report-reference-page .report-top-summary {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
  border: 1px solid #e4ebf3;
  box-shadow: 0 12px 28px rgba(15, 42, 68, 0.06);
}

.report-top-summary > .history-report-section,
.report-top-summary > .report-strategic-grid {
  margin: 0;
}

.report-top-summary > .history-report-section {
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  break-inside: auto;
  page-break-inside: auto;
}

.report-period-banner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: center;
  background: linear-gradient(180deg, #fbfdff 0%, #f6f9fc 100%);
}

.report-period-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.report-period-copy span,
.report-summary-reference-bar strong,
.report-diagnosis-copy strong,
.report-pdf-index-composition strong {
  font-size: 11px;
  color: #405467;
}

.report-period-copy strong {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: #1f3447;
  line-height: 1.4;
}

.report-icon-chip,
.report-pdf-index-icon,
.report-executive-card-icon,
.report-icon-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.report-icon-chip {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #eef4fb;
  color: #2d5f9a;
}

.report-icon-chip.is-info {
  background: #eaf2ff;
  color: #2157b6;
}

.report-icon-chip svg,
.report-pdf-index-icon svg,
.report-executive-card-icon svg,
.report-icon-inline svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.report-strategic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.report-strategic-grid.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.report-reference-page .report-pdf-ico-section {
  position: relative;
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid #dde6ef;
  border-left: 4px solid #ef7d32;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 8px 18px rgba(15, 42, 68, 0.04);
}

.report-pdf-section-title,
.report-inline-title {
  margin: 0;
  color: #2f4355;
  font-size: 12px;
  font-weight: 700;
}

.report-pdf-ico-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

.report-pdf-ico-main {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-width: 0;
}

.report-pdf-index-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  color: #d9480f;
  background: linear-gradient(180deg, #fff5f2 0%, #fff1ec 100%);
}

.report-pdf-index-icon svg {
  width: 30px;
  height: 30px;
}

.report-pdf-index-icon.is-ok {
  color: #15803d;
  background: linear-gradient(180deg, #f1fbf4 0%, #e8f8ee 100%);
}

.report-pdf-index-icon.is-warning {
  color: #ea580c;
  background: linear-gradient(180deg, #fff7ed 0%, #fff1e6 100%);
}

.report-pdf-index-icon.is-critical {
  color: #dc2626;
  background: linear-gradient(180deg, #fff2f2 0%, #ffe9e9 100%);
}

.report-pdf-ico-copy strong {
  display: block;
  color: #1f2937;
  font-size: 15px;
  line-height: 1;
}

.report-pdf-ico-copy {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.report-pdf-index-heading {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.report-pdf-index-title {
  margin: 0;
  color: #405467;
  font-size: 13px;
  line-height: 1.45;
}

.report-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eef3f8;
  color: #314a63;
  font-size: 12px;
  font-weight: 700;
  width: fit-content;
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

.report-status-badge.is-ok {
  background: #edf8ef;
  color: #15803d;
}

.report-status-badge.is-warning {
  background: #fff3e9;
  color: #ea580c;
}

.report-status-badge.is-critical {
  background: #fff0f0;
  color: #dc2626;
}

.report-pdf-score-value {
  color: #1f2937;
  font-size: clamp(40px, 4.6vw, 54px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.report-pdf-ico-section.is-ok {
  border-left-color: #15803d;
}

.report-pdf-ico-section.is-warning {
  border-left-color: #ea580c;
}

.report-pdf-ico-section.is-critical {
  border-left-color: #dc2626;
}

.report-pdf-ico-band.is-ok strong,
.report-pdf-score-value.is-ok,
.report-ico-text.is-ok {
  color: #15803d;
}

.report-pdf-ico-band.is-warning strong,
.report-pdf-score-value.is-warning,
.report-ico-text.is-warning {
  color: #ea580c;
}

.report-pdf-ico-band.is-critical strong,
.report-pdf-score-value.is-critical,
.report-ico-text.is-critical {
  color: #dc2626;
}

.report-pdf-score-stack {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
}

.report-pdf-index-description {
  margin: 0;
  color: #536579;
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.report-pdf-index-composition {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  margin-top: 0;
  padding-top: 14px;
  border-top: 1px solid #e6edf5;
  color: #536579;
  font-size: 11px;
  line-height: 1.45;
  min-width: 0;
}

.report-pdf-index-composition span:last-child {
  overflow-wrap: anywhere;
}

.report-icon-inline {
  color: #4d6072;
}

.report-pdf-kpi-grid {
  display: grid;
  gap: 8px;
}

.report-pdf-kpi-grid.is-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.report-reference-page .report-metric-card {
  min-height: 0;
  padding: 10px 12px;
  border-radius: 4px;
  border: 1px solid #e4e9f0;
  background: #fff;
}

.report-reference-page .report-metric-card span,
.report-reference-page .report-metric-card small {
  font-size: 10px;
  color: #6c7c8d;
}

.report-reference-page .report-metric-card strong {
  font-size: 30px;
  color: #26384a;
}

.report-reference-page .history-report-section-head h4,
.report-pdf-chart-head h4 {
  font-size: 13px;
  color: #2f4355;
}

.report-reference-page .history-report-section-head p,
.report-pdf-chart-head p {
  margin: 4px 0 0;
  font-size: 10px;
  color: #6c7c8d;
}

.report-reference-page .history-report-table-card,
.report-reference-page .history-report-chart-card {
  border-radius: 4px;
  padding: 10px;
  background: #fff;
  border: 1px solid #e4e9f0;
  break-inside: avoid-page;
  page-break-inside: avoid;
}

.report-reference-page .history-report-table,
.report-reference-page .history-report-table thead,
.report-reference-page .history-report-table tbody,
.report-reference-page .report-metric-card,
.report-reference-page .report-pdf-kpi-grid,
.report-reference-page .report-pdf-timeline-row,
.report-reference-page .js-plotly-plot,
.report-reference-page .plot-container,
.report-reference-page .svg-container {
  break-inside: auto;
  page-break-inside: auto;
}

.report-page[data-export-mode="pdf"] .history-report-table tr {
  break-inside: avoid-page;
  page-break-inside: avoid;
}

.report-page[data-export-mode="pdf"] .js-plotly-plot,
.report-page[data-export-mode="pdf"] .plot-container,
.report-page[data-export-mode="pdf"] .svg-container,
.report-page[data-export-mode="pdf"] .main-svg {
  break-inside: avoid-page;
  page-break-inside: avoid;
}

.report-page[data-export-mode="pdf"] .history-report-section-head,
.report-page[data-export-mode="pdf"] .report-inline-title,
.report-page[data-export-mode="pdf"] .report-pdf-chart-head {
  break-after: avoid;
  page-break-after: avoid;
}

.report-reference-page .history-report-table {
  font-size: 10px;
}

.report-reference-page .history-report-table thead th {
  font-size: 9px;
  color: #6c7c8d;
  letter-spacing: 0.04em;
}

.report-reference-page .history-report-table th,
.report-reference-page .history-report-table td {
  padding: 7px 0;
}

.report-table-emphasis {
  color: #d9480f;
  font-weight: 700;
}

.report-pdf-chart-head {
  text-align: center;
}

.report-pdf-timeline-stack {
  display: grid;
  gap: 14px;
}

.report-pdf-timeline-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  width: 100%;
  margin-left: 0;
}

.report-pdf-timeline-row span {
  font-size: 10px;
  color: #4d6072;
  font-weight: 700;
  display: block;
}

.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.report-summary-grid-executive {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.report-summary-grid-executive.is-cag {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.report-summary-grid h5,
.report-technical-block h5 {
  margin: 0 0 6px;
  color: #2f4355;
  font-size: 11px;
}

.report-summary-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.report-summary-columns span {
  display: block;
  color: #6c7c8d;
  font-size: 10px;
}

.report-summary-columns strong {
  display: block;
  margin-top: 2px;
  color: #26384a;
  font-size: 16px;
}

.report-summary-grid p,
.report-summary-footnote,
.report-technical-block p {
  margin: 6px 0 0;
  color: #536579;
  font-size: 10px;
  line-height: 1.45;
}

.report-technical-stack {
  display: grid;
  gap: 8px;
}

.report-executive-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #e4ebf3;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.report-executive-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: #27548d;
  background: linear-gradient(180deg, #f1f7ff 0%, #e8f2ff 100%);
}

.report-executive-card.is-ok .report-executive-card-icon {
  color: #15803d;
  background: linear-gradient(180deg, #effaf2 0%, #e5f7eb 100%);
}

.report-executive-card.is-warning .report-executive-card-icon {
  color: #0f766e;
  background: linear-gradient(180deg, #eefbfb 0%, #e1f6f5 100%);
}

.report-executive-card-copy span {
  display: block;
  font-size: 11px;
  color: #55697c;
  line-height: 1.4;
}

.report-executive-card-copy strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  color: #163047;
  line-height: 1.15;
}

.report-executive-card-copy small {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  color: #6c7c8d;
}

.report-top-summary > .report-diagnosis-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  background: linear-gradient(180deg, #f4f8ff 0%, #eef4ff 100%);
  border-color: #dbe7fb;
  border-radius: 16px;
  padding: 14px 16px;
}

.report-diagnosis-copy p {
  margin: 4px 0 0;
  color: #45596d;
  font-size: 12px;
  line-height: 1.55;
}

.report-summary-reference-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #dfebf8;
  background: linear-gradient(180deg, #fbfdff 0%, #f5f9fd 100%);
  color: #516577;
  font-size: 11px;
  line-height: 1.45;
}

.report-top-summary > .report-period-banner {
  padding: 12px 14px;
  border: 1px solid #e6edf5;
  border-radius: 16px;
}

.report-technical-block {
  padding: 0;
}

.report-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.7fr);
  gap: 18px;
  padding: 26px 28px;
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(31, 90, 139, 0.08), rgba(15, 118, 110, 0.06)),
    rgba(255, 255, 255, 0.92);
}

.report-hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px 18px;
  margin-top: 18px;
  font-size: 14px;
  color: #405261;
}

.report-ico-card {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 6px;
  min-height: 220px;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(160deg, #16324f 0%, #1f5a8b 45%, #0f766e 100%);
  color: #fff;
}

.report-ico-card span,
.report-ico-card small {
  color: rgba(255, 255, 255, 0.84);
}

.report-ico-card strong {
  font-size: clamp(48px, 7vw, 76px);
  line-height: 1;
}

.report-grid {
  display: grid;
  gap: 18px;
}

.report-drawer {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 30px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.48);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

.report-drawer-head h3 {
  margin: 0;
}

.report-grid-ico,
.report-grid-history,
.report-grid-failures,
.report-grid-humidity,
.report-grid-text {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-panel {
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
}

.report-panel-drawer {
  display: grid;
  gap: 10px;
}

.report-panel-analysis {
  background:
    linear-gradient(135deg, rgba(31, 90, 139, 0.06), rgba(15, 118, 110, 0.05)),
    rgba(255, 255, 255, 0.94);
}

.report-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.report-inline-section {
  display: grid;
  gap: 8px;
}

.report-inline-section + .report-inline-section {
  padding-top: 6px;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.report-inline-section-state {
  gap: 4px;
}

.report-inline-section-failures {
  margin-top: 6px;
}

.report-inline-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.report-inline-head h3 {
  margin: 0;
}

.report-inline-head-compact .report-kicker {
  margin-bottom: 2px;
}

.report-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.report-metric-grid-inline {
  margin-bottom: 18px;
}

.report-metric-card {
  display: grid;
  gap: 8px;
  min-height: 108px;
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(203, 213, 225, 0.68);
  background: linear-gradient(180deg, #f8fbfd 0%, #ffffff 100%);
}

.report-metric-card span,
.report-metric-card small {
  color: #5b6f84;
}

.report-metric-card strong {
  font-size: 26px;
  line-height: 1.1;
}

.report-chart-shell {
  min-height: 360px;
}

.report-chart {
  min-height: 360px;
}

.report-chart-shell-primary,
.report-chart-primary {
  min-height: 360px;
}

.report-chart-shell-compact,
.report-chart-compact {
  min-height: 260px;
}

.report-chart-shell-timeline,
.report-chart-timeline {
  min-height: 92px;
}

.report-chart-shell.is-empty,
.report-chart.is-empty {
  min-height: auto;
}

.report-empty-state {
  margin: 0;
  padding: 2px 0 0;
  color: #6c7c8d;
  font-size: 12px;
  line-height: 1.4;
  text-align: left;
}

.report-table-wrap {
  overflow: auto;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.report-table th,
.report-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #e5edf5;
  text-align: left;
  vertical-align: top;
}

.report-table thead th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #5b6f84;
}

.report-table tbody tr {
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.report-table tbody tr[data-episode-id] {
  cursor: pointer;
}

.report-table tbody tr[data-episode-id]:hover,
.report-table tbody tr.is-active {
  background: rgba(31, 90, 139, 0.08);
}

.report-copy-block {
  display: grid;
  gap: 10px;
  color: #405261;
  line-height: 1.65;
}

.report-copy-block p {
  margin: 0;
}

.report-analysis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
  gap: 18px;
}

.report-analysis-summary,
.report-analysis-meta {
  display: grid;
  gap: 10px;
  color: #405261;
  line-height: 1.7;
}

.report-occurrences-disclosure {
  display: grid;
  gap: 14px;
}

.report-occurrences-disclosure summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: #17324d;
}

.report-occurrences-disclosure summary::-webkit-details-marker {
  display: none;
}

.report-occurrences-summary-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.report-occurrences-summary-title::before {
  content: "▸";
  font-size: 13px;
  color: #1f5a8b;
  transition: transform 0.18s ease;
}

.report-occurrences-disclosure[open] .report-occurrences-summary-title::before {
  transform: rotate(90deg);
}

.report-occurrences-content {
  display: grid;
  gap: 14px;
}

.report-occurrences-meta {
  margin: 0;
  color: #5b6f84;
}

.report-occurrences-list {
  display: grid;
  gap: 12px;
}

.report-occurrences-table th,
.report-occurrences-table td {
  white-space: nowrap;
}

.report-occurrences-descriptions {
  display: grid;
  gap: 14px;
}

.report-occurrence-description {
  display: grid;
  gap: 8px;
  padding-top: 2px;
  border-top: 1px solid #e5edf5;
}

.report-occurrence-description:first-child {
  padding-top: 0;
  border-top: none;
}

.report-occurrence-description h5,
.report-occurrence-description-summary {
  margin: 0;
}

.report-occurrence-description h5 {
  font-size: 14px;
  color: #17324d;
}

.report-occurrence-description-summary {
  color: #5b6f84;
  line-height: 1.5;
}

.report-occurrence-description-body {
  display: grid;
  gap: 8px;
}

.report-occurrence-description-entry {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fbfe;
  border: 1px solid #d8e4ef;
}

.report-occurrence-description-title {
  color: #17324d;
  font-weight: 600;
}

.report-occurrence-description-meta {
  color: #5b6f84;
  line-height: 1.45;
}

.report-occurrence-item {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid #d8e4ef;
  border-radius: 14px;
  background: #f8fbfe;
}

.report-occurrence-item h5 {
  margin: 0;
  font-size: 14px;
  color: #17324d;
}

.report-occurrence-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 14px;
}

.report-occurrence-fields span {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5b6f84;
}

.report-occurrence-fields strong {
  color: #17324d;
}

.report-analysis-summary p,
.report-analysis-meta p {
  margin: 0;
}

@media (max-width: 1080px) {
  .report-hero-card,
  .report-grid-ico,
  .report-grid-history,
  .report-grid-failures,
  .report-grid-humidity,
  .report-grid-text,
  .report-analysis-grid,
  .report-reference-cover-grid,
  .report-reference-section-grid,
  .report-reference-state-grid,
  .report-reference-analysis-grid,
  .report-summary-grid,
  .report-summary-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .report-shell {
    width: min(100% - 20px, 1320px);
    padding-top: 18px;
  }

  .report-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .report-close-button,
  .report-export-button {
    width: 100%;
    justify-content: center;
  }

  .report-topbar,
  .report-hero-card,
  .report-panel {
    padding: 18px;
    border-radius: 22px;
  }

  .report-topbar {
    flex-direction: column;
  }

  .report-chart-shell,
  .report-chart {
    min-height: 300px;
  }

  .report-chart-shell-timeline,
  .report-chart-timeline {
    min-height: 92px;
  }

  .report-metric-grid {
    grid-template-columns: 1fr 1fr;
  }

  .report-reference-page {
    padding: 10px;
  }

  .report-pdf-header-grid,
  .report-period-banner,
  .report-strategic-grid,
  .report-pdf-timeline-row,
  .report-pdf-kpi-grid.is-three,
  .report-summary-grid-executive {
    grid-template-columns: 1fr;
  }

  .report-pdf-timeline-row {
    width: 100%;
    margin-left: 0;
  }

  .report-pdf-header-logo {
    justify-content: center;
  }

  .report-pdf-ico-band,
  .report-pdf-ico-main {
    grid-template-columns: 1fr;
  }

  .report-pdf-index-icon,
  .report-executive-card-icon,
  .report-icon-chip {
    margin: 0 auto;
  }

  .report-pdf-ico-copy,
  .report-pdf-score-stack,
  .report-diagnosis-copy,
  .report-period-copy {
    text-align: center;
  }
}

@media (max-width: 1440px) {
  .dashboard-canvas-grid-large .dashboard-card-span-7,
  .dashboard-canvas-grid-large .dashboard-card-span-5 {
    grid-column: span 6;
  }

  .dashboard-canvas-grid-small .dashboard-card-span-3 {
    grid-column: span 2;
  }
}

@media (max-width: 1180px) {
  .dashboard-manager-shell.is-editing {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-manager-panel {
    order: -1;
  }

  .dashboard-manager-panel-shell {
    position: static;
  }

  .dashboard-canvas-grid-large .dashboard-card-span-7,
  .dashboard-canvas-grid-large .dashboard-card-span-5 {
    grid-column: span 12;
  }

  .dashboard-canvas-grid-large,
  .dashboard-canvas-grid-small {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .dashboard-canvas-grid-small .dashboard-card-span-3 {
    grid-column: span 6;
  }

  .dashboard-manager-library-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .dashboard-manager-toggle {
    top: 16px;
    right: 16px;
    padding: 11px 14px;
  }

  .dashboard-manager-toggle-label {
    display: none;
  }

  .dashboard-canvas {
    gap: 14px;
  }

  .dashboard-canvas-grid-large,
  .dashboard-canvas-grid-small {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .dashboard-canvas-grid-large .dashboard-card-span-7,
  .dashboard-canvas-grid-large .dashboard-card-span-5,
  .dashboard-canvas-grid-small .dashboard-card-span-3 {
    grid-column: span 1;
  }

  .dashboard-kpi-card {
    min-height: 164px;
  }

  .dashboard-manager-panel-body {
    max-height: none;
  }

  .dashboard-manager-library-grid {
    grid-template-columns: 1fr;
  }
}
