:root {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: #090d12;
  color: #eef2f7;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: #090d12;
}

button { font: inherit; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
}

.sidebar {
  min-height: 100vh;
  padding: 26px 18px 18px;
  background: #0f141b;
  border-right: 1px solid #242c36;
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 6px;
  margin-bottom: 34px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid #536174;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}

.brand-name {
  font-size: 15px;
  font-weight: 750;
}

.brand-product {
  margin-top: 2px;
  font-size: 11px;
  color: #7f8a98;
}

.nav-section-label {
  margin: 0 10px 10px;
  font-size: 9px;
  letter-spacing: .16em;
  color: #596575;
}

nav {
  display: grid;
  gap: 4px;
}

.nav-item {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #8d98a7;
  text-align: left;
  font-size: 12px;
  cursor: pointer;
}

.nav-item:hover {
  background: #151b23;
  color: #d6dce5;
}

.nav-item.active {
  background: #19202a;
  border-color: #303a47;
  color: #ffffff;
}

.sidebar-spacer { flex: 1; }

.mode-card {
  margin-top: 30px;
  padding: 15px;
  border: 1px solid #2a3441;
  background: #131920;
}

.mode-label,
.eyebrow,
.panel-kicker,
.safety-label,
.metric-label {
  font-size: 9px;
  letter-spacing: .15em;
  color: #718093;
}

.mode-value {
  margin-top: 7px;
  font-size: 12px;
  font-weight: 800;
}

.mode-note {
  margin-top: 6px;
  color: #718093;
  font-size: 10px;
  line-height: 1.5;
}

.connection-card {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-top: 10px;
  padding: 10px 4px;
}

.connection-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7b8796;
}

.connection-card strong {
  display: block;
  font-size: 10px;
}

.connection-card span:not(.connection-dot) {
  display: block;
  margin-top: 2px;
  color: #697686;
  font-size: 9px;
}

.main-area {
  min-width: 0;
  padding: 28px 34px 20px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: flex-start;
}

h1 {
  margin: 7px 0 4px;
  font-size: 28px;
  letter-spacing: -.025em;
}

.topbar p {
  margin: 0;
  color: #7f8a99;
  font-size: 12px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.refresh-meta {
  text-align: right;
}

.refresh-meta strong {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: #a4aebb;
}

.refresh-meta span {
  display: block;
  margin-top: 3px;
  font-size: 9px;
  color: #606d7c;
}

.refresh-button {
  padding: 8px 13px;
  background: #171e27;
  color: #e5eaf0;
  border: 1px solid #34404f;
  border-radius: 5px;
  cursor: pointer;
}

.refresh-button:hover {
  background: #202936;
}

.safety-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 24px 0 16px;
  border: 1px solid #252e39;
  background: #252e39;
}

.safety-strip > div {
  padding: 10px 13px;
  background: #10161d;
}

.safety-strip strong {
  display: block;
  margin-top: 4px;
  font-size: 10px;
}

.view-root {
  min-height: 620px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  gap: 9px;
  margin-bottom: 14px;
}

.summary-card,
.metric-card {
  padding: 14px;
  background: #10161d;
  border: 1px solid #252e39;
}

.summary-card strong,
.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 13px;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.panel {
  padding: 18px;
  background: #10161d;
  border: 1px solid #252e39;
}

.panel.wide {
  grid-column: 1 / -1;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 17px;
}

.panel h2 {
  margin: 5px 0 0;
  font-size: 16px;
}

.status-chip {
  display: inline-block;
  padding: 4px 7px;
  border: 1px solid #3c4857;
  color: #abb5c2;
  font-size: 9px;
  letter-spacing: .06em;
  white-space: nowrap;
}

.status-chip.good {
  border-color: #456555;
  color: #a9cbb6;
}

.status-chip.warn {
  border-color: #6c6040;
  color: #d1c39c;
}

.status-chip.bad {
  border-color: #744c50;
  color: #d3a6aa;
}

.rows {
  display: grid;
}

.row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  min-height: 36px;
  align-items: center;
  border-top: 1px solid #1f2731;
  font-size: 11px;
}

.row:first-child { border-top: 0; }

.row span {
  color: #788596;
}

.row strong {
  color: #edf1f6;
  text-align: right;
  font-size: 10px;
  font-weight: 700;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-end;
  margin: 8px 0 14px;
}

.section-heading h2 {
  margin: 0;
  font-size: 17px;
}

.section-heading p {
  margin: 5px 0 0;
  color: #718093;
  font-size: 11px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.table-panel {
  background: #10161d;
  border: 1px solid #252e39;
  overflow: hidden;
}

.table-header,
.table-row {
  display: grid;
  grid-template-columns: 1.5fr 1.2fr 1fr 1fr 1fr;
  gap: 15px;
  padding: 11px 14px;
  align-items: center;
}

.table-header {
  background: #141b23;
  color: #6f7d8f;
  font-size: 9px;
  letter-spacing: .09em;
}

.table-row {
  border-top: 1px solid #202833;
  font-size: 10px;
}

.empty-state {
  padding: 46px 22px;
  text-align: center;
  color: #718093;
}

.empty-state strong {
  display: block;
  margin-bottom: 7px;
  color: #c4ccd6;
  font-size: 12px;
}

.attention-box {
  border-left: 3px solid #637287;
}

.attention-box h3 {
  margin: 0 0 7px;
  font-size: 13px;
}

.attention-box p {
  margin: 0;
  color: #7f8b9b;
  line-height: 1.6;
  font-size: 11px;
}

.identity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.identity-card {
  padding: 15px;
  border: 1px solid #252e39;
  background: #10161d;
}

.identity-card span {
  display: block;
  margin-bottom: 9px;
  color: #768394;
  font-size: 10px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #202833;
  color: #5f6c7c;
  font-size: 9px;
}

@media (max-width: 1180px) {
  .summary-grid { grid-template-columns: repeat(3, 1fr); }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 850px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main-area { padding: 22px; }
  .content-grid { grid-template-columns: 1fr; }
  .panel.wide { grid-column: auto; }
  .identity-grid { grid-template-columns: 1fr; }
  .safety-strip { grid-template-columns: 1fr; }
}
