:root {
  --sc-font-ui: "Manrope", "Segoe UI", sans-serif;
  --sc-font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --sc-bg: #07111f;
  --sc-surface: rgba(13, 24, 41, 0.94);
  --sc-surface-soft: rgba(16, 29, 49, 0.92);
  --sc-surface-muted: rgba(21, 38, 63, 0.92);
  --sc-ink-950: #f8fafc;
  --sc-ink-800: #e2e8f0;
  --sc-ink-700: #cbd5e1;
  --sc-ink-600: #b7c6da;
  --sc-ink-500: #95a8c2;
  --sc-ink-400: #7f92ad;
  --sc-border: rgba(96, 165, 250, 0.14);
  --sc-border-strong: rgba(96, 165, 250, 0.24);
  --sc-shadow-lg: 0 28px 62px rgba(2, 6, 23, 0.34);
  --sc-shadow-md: 0 18px 38px rgba(2, 6, 23, 0.26);
  --sc-shadow-sm: 0 10px 24px rgba(2, 6, 23, 0.18);
  --sc-blue: #165dff;
  --sc-blue-soft: rgba(22, 93, 255, 0.1);
  --sc-green: #16a34a;
  --sc-green-soft: rgba(22, 163, 74, 0.12);
  --sc-yellow: #d97706;
  --sc-yellow-soft: rgba(217, 119, 6, 0.12);
  --sc-red: #dc2626;
  --sc-red-soft: rgba(220, 38, 38, 0.12);
}

body.dashboard-app {
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 34%),
    linear-gradient(135deg, #07111f 0%, #0a1424 52%, #07111f 100%);
  color: var(--sc-ink-950);
}

.dashboard-page,
.dashboard-page p,
.dashboard-page li,
.dashboard-page span,
.dashboard-page strong,
.dashboard-page button,
.dashboard-page input,
.dashboard-page select,
.dashboard-page a,
.dashboard-page th,
.dashboard-page td {
  font-family: var(--sc-font-ui);
}

.dashboard-page {
  padding: 24px 24px 34px;
  color: var(--sc-ink-950);
}

.dashboard-page p {
  color: var(--sc-ink-500);
}

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

.dashboard-topbar > *,
.panel-header > *,
.filters-header > * {
  min-width: 0;
}

.topbar-heading {
  display: grid;
  gap: 10px;
}

.page-eyebrow,
.section-kicker,
.panel-kicker,
.filter-field span,
.topbar-status-label,
.header-user-meta span,
.kpi-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-eyebrow {
  display: inline-flex;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(96, 165, 250, 0.16);
  color: #93c5fd;
}

.topbar-heading h1 {
  margin: 0;
  font-family: var(--sc-font-display);
  font-size: 36px;
  line-height: 1.03;
  letter-spacing: 0;
}

.topbar-heading p {
  margin: 0;
  max-width: 640px;
  font-size: 14px;
  line-height: 1.6;
}

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

.dashboard-search {
  position: relative;
  width: min(420px, 100%);
  min-width: 300px;
}

.search-box {
  width: min(380px, 100%);
  min-width: 0;
  height: 54px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 18px;
  background: var(--sc-surface);
  border: 1px solid var(--sc-border);
  box-shadow: var(--sc-shadow-sm);
}

.dashboard-search .search-box {
  width: 100%;
}

.global-search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 20;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid var(--sc-border-strong);
  background: rgba(8, 18, 35, 0.98);
  box-shadow: var(--sc-shadow-lg);
}

.global-search-item {
  width: 100%;
  min-height: 62px;
  padding: 12px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--sc-ink-950);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  cursor: pointer;
}

.global-search-item:hover,
.global-search-item:focus-visible {
  background: rgba(37, 99, 235, 0.16);
  outline: none;
}

.global-search-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.global-search-main strong,
.global-search-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search-main strong {
  font-size: 14px;
}

.global-search-main span {
  color: var(--sc-ink-500);
  font-size: 12px;
}

.search-icon,
.btn-icon {
  width: 18px;
  height: 18px;
  color: var(--sc-ink-400);
  flex-shrink: 0;
}

.search-icon svg,
.btn-icon svg,
.empty-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
  display: block;
}

.search-box input,
.filter-field input,
.filter-field select {
  width: 100%;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--sc-ink-950);
  font-size: 14px;
  font-weight: 600;
}

.search-box input::placeholder,
.filter-field input::placeholder {
  color: var(--sc-ink-400);
}

.control-btn {
  height: 52px;
  padding: 0 18px;
  border-radius: 18px;
  border: 1px solid var(--sc-border);
  background: var(--sc-surface);
  color: var(--sc-ink-800);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--sc-shadow-sm);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.control-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(22, 93, 255, 0.22);
  box-shadow: var(--sc-shadow-md);
}

.control-btn-primary {
  background: linear-gradient(135deg, #165dff 0%, #2f7cf7 100%);
  color: #ffffff;
  border-color: transparent;
}

.control-btn-primary .btn-icon {
  color: currentColor;
}

.topbar-status,
.header-user-card {
  border-radius: 18px;
  background: var(--sc-surface);
  border: 1px solid var(--sc-border);
  box-shadow: var(--sc-shadow-sm);
}

.topbar-status {
  min-width: 180px;
  padding: 10px 16px;
  display: grid;
  gap: 3px;
}

.topbar-status-label,
.header-user-meta span,
.panel-kicker,
.section-kicker,
.filter-field span,
.kpi-label {
  color: var(--sc-ink-400);
}

.topbar-status strong {
  font-size: 16px;
  line-height: 1.2;
}

.topbar-status small {
  color: var(--sc-ink-500);
  font-size: 12px;
  line-height: 1.5;
}

.header-user-card {
  min-width: 194px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #165dff 0%, #0f4ad8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
}

.header-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.header-user-meta {
  display: grid;
  gap: 3px;
}

.header-user-meta strong {
  font-size: 14px;
  line-height: 1.3;
}

.dashboard-banner {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
  box-shadow: var(--sc-shadow-sm);
}

.dashboard-banner.is-info {
  color: #0f3f97;
  background: rgba(22, 93, 255, 0.08);
  border-color: rgba(22, 93, 255, 0.14);
}

.dashboard-banner.is-warning {
  color: #8a4b08;
  background: rgba(217, 119, 6, 0.1);
  border-color: rgba(217, 119, 6, 0.16);
}

.dashboard-banner.is-success {
  color: #166534;
  background: rgba(22, 163, 74, 0.1);
  border-color: rgba(22, 163, 74, 0.16);
}

.command-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.82fr);
  gap: 16px;
  margin-bottom: 16px;
}

.command-copy,
.command-pulse,
.panel,
.filters-panel,
.kpi-card {
  background: var(--sc-surface);
  border: 1px solid var(--sc-border);
  box-shadow: var(--sc-shadow-md);
}

.command-copy,
.command-pulse {
  border-radius: 22px;
  padding: 20px;
}

.command-copy {
  display: grid;
  gap: 14px;
}

.section-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(96, 165, 250, 0.14);
}

.command-copy h2 {
  margin: 0;
  font-family: var(--sc-font-display);
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: 0;
}

.command-copy p {
  margin: 0;
  max-width: 760px;
  font-size: 14px;
  line-height: 1.65;
}

.command-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.command-tag,
.status-badge,
.priority-badge,
.feed-severity,
.module-pill,
.map-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.command-tag {
  background: var(--sc-surface-muted);
  color: var(--sc-ink-600);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.command-pulse {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(22, 93, 255, 0.12), transparent 34%),
    linear-gradient(160deg, #0f1f46 0%, #10244f 60%, #132954 100%);
  border-color: rgba(96, 165, 250, 0.14);
  color: #e2e8f0;
  display: grid;
  gap: 18px;
}

.command-pulse::after {
  content: "";
  position: absolute;
  top: -60px;
  right: -20px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.08);
  filter: blur(10px);
}

.command-pulse > * {
  position: relative;
  z-index: 1;
}

.pulse-kicker {
  color: #93c5fd;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pulse-value {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.pulse-value strong {
  color: #ffffff;
  font-family: var(--sc-font-display);
  font-size: 44px;
  line-height: 0.92;
}

.pulse-value span {
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 700;
}

.pulse-rail {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.16);
}

.pulse-rail > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #16a34a 0%, #4ade80 45%, #fbbf24 72%, #f87171 100%);
}

.pulse-metrics {
  display: grid;
  gap: 10px;
}

.pulse-metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.pulse-metric span {
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 700;
}

.pulse-metric strong {
  color: #ffffff;
  font-size: 14px;
}

.filters-panel,
.panel {
  border-radius: 22px;
  padding: 20px;
}

.filters-panel {
  margin-bottom: 18px;
}

.filters-header,
.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.filters-header {
  margin-bottom: 16px;
}

.filters-header h2,
.panel-header h2 {
  margin: 4px 0 6px;
  font-size: 1.42rem;
  line-height: 1.18;
}

.filters-header p,
.panel-header p {
  margin: 0;
  line-height: 1.68;
}

.filters-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 14px;
}

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

.filter-field input,
.filter-field select {
  height: 48px;
  padding: 0 16px;
  border-radius: 16px;
  background: var(--sc-surface-soft);
  border: 1px solid var(--sc-border);
}

.filter-field input:focus,
.filter-field select:focus {
  border-color: rgba(22, 93, 255, 0.24);
  box-shadow: 0 0 0 4px rgba(22, 93, 255, 0.08);
}

.kpi-grid {
  margin: 0 0 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.kpi-card {
  min-height: 128px;
  border-radius: 18px;
  padding: 14px;
  display: grid;
  gap: 10px;
}

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

.kpi-icon {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: rgba(15, 23, 42, 0.04);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sc-ink-600);
  font-weight: 800;
  font-size: 15px;
}

.kpi-value {
  font-family: var(--sc-font-display);
  font-size: 32px;
  line-height: 0.96;
  letter-spacing: 0;
}

.kpi-trend {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
}

.kpi-meta {
  color: var(--sc-ink-500);
  font-size: 12px;
  line-height: 1.45;
}

.kpi-progress {
  margin-top: auto;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.14);
}

.kpi-progress > span,
.bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.78fr);
  gap: 16px;
  align-items: start;
}

.workspace-main,
.workspace-side,
.status-stack {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.panel-header-meta,
.live-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.panel-header-meta {
  color: var(--sc-ink-600);
  background: var(--sc-surface-muted);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.operations-board {
  display: grid;
  gap: 14px;
}

.ops-card {
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(16, 29, 49, 0.96) 0%, rgba(11, 22, 39, 0.96) 100%);
  border: 1px solid rgba(96, 165, 250, 0.12);
  display: grid;
  gap: 14px;
}

.ops-head,
.ops-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ops-site {
  display: grid;
  gap: 5px;
}

.ops-site strong {
  font-family: var(--sc-font-display);
  font-size: 1rem;
  letter-spacing: 0;
}

.ops-site span,
.ops-meta,
.module-meta,
.site-id span,
.site-client span,
.update-cell span,
.feed-copy,
.feed-time,
.bar-foot,
.chart-card-head p,
.region-subtext {
  color: var(--sc-ink-500);
}

.ops-meta,
.feed-copy,
.bar-foot,
.chart-card-head p {
  font-size: 13px;
  line-height: 1.6;
}

.ops-statuses,
.module-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.ops-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}

.table-action {
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  border-radius: 10px;
  border: 1px solid var(--sc-border);
  background: rgba(15, 23, 42, 0.58);
  color: var(--sc-ink-800);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.table-action:hover {
  transform: translateY(-1px);
  border-color: rgba(22, 93, 255, 0.2);
  background: rgba(22, 93, 255, 0.04);
}

.table-action.is-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #165dff 0%, #2f7cf7 100%);
  border-color: transparent;
}

.table-action.is-critical {
  color: var(--sc-red);
  background: rgba(220, 38, 38, 0.06);
  border-color: rgba(220, 38, 38, 0.16);
}

.chart-card {
  padding: 18px;
  border-radius: 22px;
  background: var(--sc-surface-soft);
  border: 1px solid rgba(148, 163, 184, 0.14);
  display: grid;
  gap: 16px;
}

.chart-card.compact {
  min-height: 0;
}

.chart-card-head {
  display: grid;
  gap: 5px;
}

.chart-card-head h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.32;
}

.donut-layout {
  display: flex;
  align-items: center;
  gap: 18px;
}

.chart-donut {
  --donut-fill: conic-gradient(#1e3a5f 0deg 360deg);
  position: relative;
  width: 118px;
  min-width: 118px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: var(--donut-fill);
}

.chart-donut::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: #101d31;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
}

.chart-donut-center {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 14px;
}

.chart-donut-center strong {
  font-family: var(--sc-font-display);
  font-size: 1.55rem;
  line-height: 1;
  letter-spacing: 0;
}

.chart-donut-center span {
  color: var(--sc-ink-500);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.chart-legend {
  flex: 1;
  display: grid;
  gap: 10px;
}

.chart-legend-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-label,
.legend-value {
  font-size: 13px;
  font-weight: 700;
}

.legend-label {
  color: var(--sc-ink-600);
}

.legend-value {
  color: var(--sc-ink-950);
}

.bar-list {
  display: grid;
  gap: 12px;
}

.bar-item {
  display: grid;
  gap: 7px;
}

.bar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bar-top strong {
  color: var(--sc-ink-800);
  font-size: 13px;
}

.bar-top span {
  color: var(--sc-ink-500);
  font-size: 12px;
  font-weight: 700;
}

.bar-rail {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.16);
}

.table-shell {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(180deg, rgba(16, 29, 49, 0.92) 0%, rgba(10, 20, 36, 0.92) 100%);
}

.sites-table {
  width: 100%;
  min-width: 860px;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 13px;
}

.sites-col-id {
  width: 12%;
}

.sites-col-client {
  width: 17%;
}

.sites-col-status {
  width: 13%;
}

.sites-col-module {
  width: 12%;
}

.sites-col-update {
  width: 11%;
}

.sites-col-priority {
  width: 9%;
}

.sites-col-actions {
  width: 14%;
}

.sites-table thead {
  background: rgba(96, 165, 250, 0.08);
}

.sites-table th,
.sites-table td {
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
}

.sites-table th {
  color: var(--sc-ink-500);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.sites-table tbody tr {
  transition: background 0.2s ease;
}

.sites-table tbody tr:hover {
  background: rgba(37, 99, 235, 0.1);
}

.sites-table tbody td {
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.site-id,
.site-client,
.module-cell,
.update-cell {
  display: grid;
  gap: 4px;
}

.site-id strong,
.site-client strong,
.update-cell strong {
  font-size: 13px;
  line-height: 1.34;
}

.site-id strong {
  font-family: var(--sc-font-display);
  letter-spacing: 0;
}

.site-id span,
.site-client span,
.module-meta,
.update-cell span {
  font-size: 12px;
  line-height: 1.45;
}

.site-client span,
.module-meta {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.site-list-panel {
  padding: 18px;
}

.site-list-panel .panel-header {
  align-items: center;
  margin-bottom: 10px;
}

.site-list-panel .panel-header p {
  max-width: 620px;
  font-size: 13px;
  line-height: 1.5;
}

.site-list-panel .panel-header-meta {
  padding: 8px 12px;
}

.table-empty-state {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 30px 16px 6px;
  text-align: center;
}

.table-empty-state strong {
  font-size: 1rem;
}

.table-empty-state p {
  margin: 0;
  max-width: 430px;
}

.empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: var(--sc-surface-soft);
  border: 1px solid rgba(148, 163, 184, 0.14);
  display: grid;
  place-items: center;
  color: var(--sc-blue);
}

.feed-list {
  display: grid;
  gap: 12px;
  max-height: 560px;
  overflow: auto;
  padding-right: 4px;
}

.feed-item {
  padding: 16px;
  border-radius: 20px;
  background: var(--sc-surface-soft);
  border: 1px solid rgba(148, 163, 184, 0.14);
  display: grid;
  gap: 10px;
}

.feed-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.feed-title {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

.feed-copy strong {
  color: var(--sc-ink-800);
}

.feed-time {
  font-size: 12px;
  font-weight: 700;
}

.region-grid {
  display: grid;
  gap: 12px;
}

.region-card {
  padding: 16px;
  border-radius: 20px;
  background: var(--sc-surface-soft);
  border: 1px solid rgba(148, 163, 184, 0.14);
  display: grid;
  gap: 12px;
}

.region-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.region-top strong {
  font-size: 15px;
}

.region-total {
  color: var(--sc-ink-500);
  font-size: 12px;
  font-weight: 800;
}

.region-bars {
  display: grid;
  gap: 8px;
}

.region-bar-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.region-bar-row span {
  font-size: 12px;
  font-weight: 700;
  color: var(--sc-ink-600);
}

.region-bar-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.15);
}

.region-bar-track > i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.region-subtext {
  font-size: 12px;
  line-height: 1.6;
}

.status-badge.is-online,
.module-pill.is-online,
.feed-severity.is-success,
.map-tag.is-online,
.command-tag.is-online,
.kpi-trend.is-online {
  color: var(--sc-green);
  background: var(--sc-green-soft);
}

.status-badge.is-attention,
.priority-badge.is-media,
.module-pill.is-warning,
.feed-severity.is-warning,
.map-tag.is-warning,
.command-tag.is-warning,
.kpi-trend.is-warning {
  color: var(--sc-yellow);
  background: var(--sc-yellow-soft);
}

.status-badge.is-offline,
.priority-badge.is-alta,
.module-pill.is-offline,
.feed-severity.is-danger,
.map-tag.is-offline,
.command-tag.is-offline,
.kpi-trend.is-offline {
  color: var(--sc-red);
  background: var(--sc-red-soft);
}

.status-badge.is-info,
.priority-badge.is-baixa,
.feed-severity.is-info,
.map-tag.is-info,
.command-tag.is-info,
.kpi-trend.is-info {
  color: var(--sc-blue);
  background: var(--sc-blue-soft);
}

.kpi-progress.is-online > span {
  background: linear-gradient(90deg, #16a34a, #4ade80);
}

.kpi-progress.is-warning > span {
  background: linear-gradient(90deg, #d97706, #fbbf24);
}

.kpi-progress.is-offline > span {
  background: linear-gradient(90deg, #dc2626, #f87171);
}

.kpi-progress.is-info > span {
  background: linear-gradient(90deg, #165dff, #60a5fa);
}

.chart-card-loading,
.kpi-card.is-skeleton,
.ops-card.is-skeleton,
.command-tag.is-skeleton,
.command-pulse.is-skeleton,
.region-card.is-skeleton,
.table-skeleton-line {
  position: relative;
  overflow: hidden;
}

.chart-card-loading::before,
.chart-card-loading::after,
.kpi-card.is-skeleton::before,
.kpi-card.is-skeleton::after,
.ops-card.is-skeleton::before,
.ops-card.is-skeleton::after,
.command-tag.is-skeleton::before,
.command-pulse.is-skeleton::before,
.region-card.is-skeleton::before,
.table-skeleton-line::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.5), rgba(71, 85, 105, 0.46), rgba(30, 41, 59, 0.5));
  background-size: 200% 100%;
  animation: dashboardShimmer 1.6s linear infinite;
}

.chart-card-loading::before {
  inset: 18px 18px auto;
  height: 18px;
  border-radius: 999px;
}

.chart-card-loading::after {
  inset: 54px 18px 18px;
  border-radius: 18px;
}

.kpi-card.is-skeleton::before {
  inset: 18px 18px auto;
  height: 18px;
  border-radius: 999px;
}

.kpi-card.is-skeleton::after {
  inset: auto 18px 18px;
  height: 70px;
  border-radius: 18px;
}

.ops-card.is-skeleton {
  min-height: 140px;
}

.ops-card.is-skeleton::before {
  inset: 18px 18px auto;
  height: 18px;
  border-radius: 999px;
}

.ops-card.is-skeleton::after {
  inset: 50px 18px 18px;
  border-radius: 18px;
}

.command-tag.is-skeleton {
  width: 180px;
  height: 34px;
  border: 0;
  background: var(--sc-surface-muted);
}

.command-pulse.is-skeleton {
  min-height: 250px;
}

.command-pulse.is-skeleton::before {
  inset: 18px;
  border-radius: 20px;
}

.region-card.is-skeleton {
  min-height: 120px;
}

.region-card.is-skeleton::before {
  inset: 16px;
  border-radius: 18px;
}

.table-row-skeleton td {
  padding: 16px 18px;
}

.table-skeleton-line {
  height: 60px;
  border-radius: 18px;
}

@keyframes dashboardShimmer {
  from {
    background-position: 200% 0;
  }

  to {
    background-position: -200% 0;
  }
}

@media (max-width: 1320px) {
  .workspace-grid,
  .command-strip {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 1080px) {
  .dashboard-topbar {
    flex-direction: column;
  }

  .topbar-toolbar {
    width: 100%;
  }

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

  .donut-layout {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .dashboard-page {
    padding: 18px 14px 28px;
  }

  .topbar-toolbar,
  .filters-header,
  .panel-header,
  .ops-head,
  .ops-row {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box,
  .dashboard-search,
  .control-btn,
  .topbar-status,
  .header-user-card {
    width: 100%;
    min-width: 0;
  }

  .filters-grid,
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .panel,
  .filters-panel,
  .command-copy,
  .command-pulse {
    padding: 18px;
    border-radius: 22px;
  }

  .ops-actions,
  .table-actions {
    width: 100%;
  }

  .table-action {
    flex: 1 1 140px;
  }

  .region-bar-row {
    grid-template-columns: 56px minmax(0, 1fr) auto;
  }
}
