.realm-status-page {
  --realm-panel: rgba(4, 18, 32, 0.94);
  --realm-panel-soft: rgba(8, 28, 47, 0.88);
  --realm-line: rgba(82, 155, 205, 0.28);
  --realm-muted: #8fa9bd;
  --realm-blue: #55baff;
  --realm-green: #4be0a6;
  --realm-gold: #edbd63;
  --realm-red: #fb777e;
}

.realm-status-page .players-hero {
  min-height: 440px;
  padding-bottom: 44px;
}

.realm-status-page .players-hero-copy {
  max-width: 900px;
}

.realm-status-page .players-hero-copy p {
  max-width: 820px;
  margin-bottom: 20px;
}

.realm-status-page .players-hero-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.realm-status-page .realm-human-stat strong,
.realm-status-page .realm-human-stat .hero-stat-icon {
  color: #78c9ff;
}

.realm-status-page .realm-bot-stat strong,
.realm-status-page .realm-bot-stat .hero-stat-icon {
  color: #efbd64;
}

.realm-main-tabs {
  display: flex;
  width: fit-content;
  max-width: 100%;
  gap: 5px;
  margin: 22px auto 0;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid rgba(82, 155, 205, 0.25);
  border-radius: 13px;
  background: rgba(3, 16, 29, 0.82);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035), 0 10px 25px rgba(0, 0, 0, 0.16);
}

.realm-main-tab {
  display: inline-flex;
  min-width: 148px;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #91aabd;
  background: transparent;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.realm-main-tab:hover {
  color: #e4f5ff;
  background: rgba(43, 115, 160, 0.16);
}

.realm-main-tab:focus-visible {
  outline: 2px solid #68c7ff;
  outline-offset: 2px;
}

.realm-main-tab.active,
.realm-main-tab[aria-selected="true"] {
  border-color: rgba(82, 183, 241, 0.35);
  color: #eaf8ff;
  background: linear-gradient(180deg, rgba(22, 100, 145, 0.68), rgba(8, 45, 72, 0.82));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), 0 5px 14px rgba(0, 0, 0, 0.17);
}

.realm-main-tab.active i,
.realm-main-tab[aria-selected="true"] i {
  color: #67c5ff;
}

.realm-main-tab-panel[hidden],
.realm-main-tabs[hidden] {
  display: none !important;
}

.realm-main-tab-panel {
  min-width: 0;
}

.realm-status-page #realmStatusTabPanel,
.realm-status-page #online-players,
.realm-status-page #playersLiveMap {
  scroll-margin-top: 110px;
}

.realm-availability-heading {
  margin-top: 18px;
}

.realm-availability-heading h3 {
  font-size: clamp(1.1rem, 1.7vw, 1.35rem);
}

.realm-availability-heading p {
  margin: 5px 0 0;
  color: var(--realm-muted);
  font-size: 0.73rem;
  line-height: 1.5;
}

.realm-roster-tab-panel {
  padding-top: 0;
}

.realm-status-page .players-filter-panel > .realm-online-heading {
  align-items: flex-start;
  margin: 0 0 18px;
  padding: 0 2px 16px;
  border-bottom: 1px solid rgba(93, 151, 190, 0.16);
}

.realm-status-page .no-players-state > .realm-online-heading {
  align-items: center;
  flex-direction: column;
  margin: 0 auto 38px;
  text-align: center;
}

.realm-status-overview,
.realm-dashboard-card {
  border: 1px solid var(--realm-line);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(10, 30, 48, 0.94), rgba(3, 15, 27, 0.96));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035), 0 17px 40px rgba(0, 0, 0, 0.23);
}

.realm-status-overview {
  margin-top: 18px;
  padding: 24px 28px 26px;
}

.realm-status-panel-heading,
.realm-card-heading,
.realm-online-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.realm-status-eyebrow,
.realm-availability-heading > span,
.realm-card-heading > div > span,
.realm-online-heading > div > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #61baff;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.realm-status-panel-heading h2,
.realm-availability-heading h3,
.realm-card-heading h2,
.realm-online-heading h2 {
  margin: 4px 0 0;
  color: #f0f7ff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  letter-spacing: -0.02em;
}

.realm-status-updated {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.realm-status-updated small,
.realm-chart-note {
  color: #7893a8;
  font-size: 0.68rem;
}

.realm-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(125, 146, 163, 0.3);
  border-radius: 999px;
  color: #bdc8d0;
  background: rgba(112, 129, 142, 0.1);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.realm-status-pill i,
.realm-service-state i {
  font-size: 0.48rem;
}

.realm-status-pill.operational {
  border-color: rgba(75, 224, 166, 0.35);
  color: var(--realm-green);
  background: rgba(29, 145, 101, 0.13);
}

.realm-status-pill.degraded,
.realm-status-pill.maintenance {
  border-color: rgba(237, 189, 99, 0.42);
  color: #f0c973;
  background: rgba(144, 102, 26, 0.16);
}

.realm-status-pill.offline {
  border-color: rgba(251, 119, 126, 0.38);
  color: #ff9499;
  background: rgba(147, 45, 51, 0.16);
}

.realm-maintenance-notice {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 13px;
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid rgba(79, 174, 230, 0.36);
  border-radius: 12px;
  color: #b5dcf5;
  background: linear-gradient(110deg, rgba(17, 75, 113, 0.38), rgba(8, 34, 55, 0.72));
}

.realm-maintenance-notice.active {
  border-color: rgba(79, 174, 230, 0.48);
  color: #c4e5fa;
  background: linear-gradient(110deg, rgba(17, 75, 113, 0.48), rgba(8, 34, 55, 0.78));
}

.realm-maintenance-notice > i {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 1.2rem;
}

.realm-maintenance-notice strong {
  display: block;
  color: #e9f7ff;
  font-size: 0.92rem;
}

.realm-maintenance-notice p {
  margin: 4px 0 5px;
  color: #c0d9e9;
  font-size: 0.78rem;
  line-height: 1.55;
}

.realm-maintenance-notice small {
  display: block;
  margin-top: 3px;
  color: #8db5d0;
  font-size: 0.67rem;
}

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

.realm-service-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  min-height: 80px;
  padding: 14px 15px;
  border: 1px solid rgba(93, 151, 190, 0.2);
  border-radius: 12px;
  background: rgba(3, 16, 29, 0.64);
}

.realm-service-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 11px;
  color: #89cfff;
  background: rgba(57, 143, 200, 0.13);
  font-size: 1.12rem;
}

.realm-service-copy {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.realm-service-copy > strong {
  overflow: hidden;
  color: #eef7ff;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.realm-service-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #8da4b7;
  font-size: 0.68rem;
  font-weight: 800;
}

.realm-service-card.operational .realm-service-state,
.realm-service-card.operational .realm-service-icon {
  color: var(--realm-green);
}

.realm-service-card.degraded .realm-service-state,
.realm-service-card.unknown .realm-service-state {
  color: #efc66b;
}

.realm-service-card.offline .realm-service-state {
  color: var(--realm-red);
}

.realm-service-latency {
  grid-column: 2;
  margin-top: 5px;
  color: #738da2;
  font-size: 0.63rem;
}

.realm-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.88fr);
  align-items: stretch;
  gap: 18px;
  margin-top: 18px;
}

.realm-dashboard-card {
  min-width: 0;
  padding: 22px 24px;
}

.realm-card-heading {
  align-items: flex-start;
}

.realm-card-heading h2 {
  font-size: clamp(1.2rem, 1.9vw, 1.55rem);
}

.realm-card-heading p {
  margin: 6px 0 0;
  color: var(--realm-muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.realm-period-switch {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(89, 144, 179, 0.2);
  border-radius: 10px;
  background: rgba(2, 12, 23, 0.7);
}

.realm-period-switch button {
  min-height: 31px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  color: #8fa9bd;
  background: transparent;
  font-size: 0.66rem;
  font-weight: 800;
  cursor: pointer;
}

.realm-period-switch button:hover,
.realm-period-switch button.active {
  color: #eaf7ff;
  background: rgba(44, 139, 201, 0.22);
}

.realm-chart-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 19px 0 10px;
}

.realm-chart-summary > div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(93, 151, 190, 0.16);
  border-radius: 9px;
  background: rgba(3, 15, 27, 0.58);
}

.realm-chart-summary small {
  color: #7f9bb1;
  font-size: 0.62rem;
}

.realm-chart-summary strong {
  color: #e9f5ff;
  font-size: 0.95rem;
}

.realm-chart-wrap {
  min-height: 225px;
  padding: 8px 0 0;
}

.realm-chart svg {
  display: block;
  width: 100%;
  height: 245px;
  overflow: visible;
}

.realm-chart-axis-label {
  fill: #7893a8;
  font-family: inherit;
  font-size: 10px;
}

.realm-chart-axis-label.human { fill: #4fc2ff; }
.realm-chart-axis-label.bots { fill: #e7a04f; }
.realm-chart-axis-label.availability { fill: #4be0a6; }

.realm-chart-gridline {
  stroke: rgba(121, 164, 193, 0.15);
  stroke-dasharray: 3 5;
  stroke-width: 1;
}

.realm-chart-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
}

.realm-chart-line.human {
  stroke: #4fc2ff;
  fill: none;
}

.realm-chart-point.human {
  stroke: #4fc2ff;
  fill: #4fc2ff;
}

.realm-chart-line.bots {
  stroke: #e7a04f;
  fill: none;
}

.realm-chart-point.bots {
  stroke: #e7a04f;
  fill: #e7a04f;
}

.realm-chart-line.availability {
  stroke: #4be0a6;
  fill: none;
}

.realm-chart-point.availability {
  stroke: #4be0a6;
  fill: #4be0a6;
}

.realm-chart-point {
  stroke: #071725;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.realm-chart-empty {
  display: grid;
  min-height: 190px;
  margin: 0;
  place-items: center;
  color: #7994aa;
  font-size: 0.76rem;
  text-align: center;
}

.realm-chart-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 2px 0 13px;
}

.realm-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #b8c9d7;
  font-size: 0.7rem;
  font-weight: 700;
}

.realm-chart-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.realm-chart-legend .human i { background: #4fc2ff; }
.realm-chart-legend .bots i { background: #e7a04f; }

.realm-availability-chart {
  margin-top: 12px;
}

.realm-availability-chart svg { display: block; width: 100%; height: 132px; }
.realm-availability-chart .realm-chart-empty { min-height: 92px; }
.realm-chart-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 16px auto 0;
  padding: 11px 15px;
  border: 1px solid rgba(82, 155, 205, 0.2);
  border-radius: 10px;
  color: #9eb9cd;
  background: rgba(11, 45, 70, 0.36);
  font-size: 0.69rem;
  line-height: 1.5;
  text-align: center;
}

.realm-chart-note i {
  flex: 0 0 auto;
  color: #66c2f7;
  font-size: 0.9rem;
}

.realm-dashboard-side {
  display: flex;
  min-width: 0;
}

.realm-incident-card {
  display: flex;
  min-height: 100%;
  flex: 1 1 auto;
  flex-direction: column;
}

.realm-incident-list {
  min-height: 0;
  flex: 1 1 auto;
}

.realm-no-incidents {
  height: 100%;
  min-height: 145px;
}

.realm-incident-count {
  display: grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: #f3c76e;
  background: rgba(180, 128, 34, 0.16);
  font-size: 0.72rem;
  font-weight: 900;
}

.realm-incident-list {
  display: grid;
  max-height: 520px;
  gap: 10px;
  margin-top: 14px;
  overflow: auto;
}

.realm-no-incidents {
  display: grid;
  min-height: 145px;
  align-content: center;
  justify-items: center;
  gap: 8px;
  color: #87a1b4;
  text-align: center;
}

.realm-no-incidents i { color: #4be0a6; font-size: 1.6rem; }
.realm-no-incidents strong { color: #d7e8f5; font-size: 0.8rem; }
.realm-no-incidents span { font-size: 0.67rem; }

.realm-incident-item {
  padding: 13px 14px;
  border: 1px solid rgba(91, 147, 184, 0.18);
  border-radius: 10px;
  background: rgba(2, 14, 25, 0.56);
}

.realm-incident-item.resolved { opacity: 0.78; }
.realm-incident-item header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.realm-incident-item time { color: #7893a8; font-size: 0.61rem; }
.incident-severity { display: inline-flex; padding: 3px 7px; border-radius: 999px; color: #e8bd68; background: rgba(168, 117, 31, 0.14); font-size: 0.58rem; font-weight: 900; text-transform: uppercase; }
.incident-severity.high, .incident-severity.critical { color: #ff969c; background: rgba(173, 48, 57, 0.18); }
.incident-severity.low { color: #81caff; background: rgba(50, 125, 174, 0.17); }
.realm-incident-item h3 { margin: 9px 0 4px; color: #edf6ff; font-size: 0.79rem; }
.realm-incident-item p { margin: 0; color: #a3b8c8; font-size: 0.68rem; line-height: 1.5; }
.realm-incident-item > small { display: block; margin-top: 7px; color: #8199ac; font-size: 0.6rem; }
.realm-incident-item ul { display: grid; gap: 8px; margin: 10px 0 0; padding: 10px 0 0; border-top: 1px solid rgba(91, 147, 184, 0.13); list-style: none; }
.realm-incident-item li { display: grid; grid-template-columns: auto 1fr; gap: 4px 8px; color: #adbdc9; font-size: 0.62rem; }
.realm-incident-item li b { color: #79caff; }
.realm-incident-item li span { grid-column: 1 / -1; line-height: 1.45; }
.realm-incident-item li small { grid-column: 1 / -1; color: #788fa2; }

.realm-online-heading {
  align-items: flex-end;
  margin: 0 2px 14px;
}

.realm-online-heading p {
  margin: 6px 0 0;
  color: #91adc2;
  font-size: 0.78rem;
}

.realm-status-page .players-map-panel,
.realm-status-page .players-filter-panel,
.realm-status-page .players-roster-panel,
.realm-status-page .players-insights,
.realm-status-page .no-players-state,
.realm-status-page .players-cta {
  margin-top: 16px;
}

@media (max-width: 1050px) {
  .realm-dashboard-grid { grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr); }
  .realm-service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 850px) {
  .realm-dashboard-grid { grid-template-columns: 1fr; }
  .realm-dashboard-side { display: flex; align-items: stretch; }
  .realm-status-page .players-hero { min-height: 510px; }
}

@media (max-width: 650px) {
  .realm-status-overview,
  .realm-dashboard-card { padding: 18px 16px; }
  .realm-status-panel-heading,
  .realm-online-heading { align-items: flex-start; flex-direction: column; }
  .realm-status-updated { justify-items: start; }
  .realm-service-grid { grid-template-columns: 1fr; }
  .realm-dashboard-side { display: flex; }
  .realm-card-heading { flex-direction: column; }
  .realm-period-switch { width: 100%; }
  .realm-period-switch button { flex: 1 1 auto; }
  .realm-chart-summary { grid-template-columns: 1fr; }
  .realm-main-tabs { width: 100%; justify-content: stretch; }
  .realm-main-tab { min-width: 0; min-height: 42px; flex: 1 1 0; gap: 6px; padding: 0 9px; font-size: 0.69rem; }
  .realm-status-page .players-hero { min-height: 570px; padding: 36px 22px 30px; }
  .realm-status-page .players-hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); right: 18px; bottom: 18px; left: 18px; gap: 8px; }
  .realm-status-page .hero-stat { min-height: 92px; padding: 12px; grid-template-columns: 36px minmax(0, 1fr); gap: 8px; }
  .realm-status-page .hero-stat-icon { width: 34px; height: 34px; font-size: 1rem; }
  .realm-status-page .hero-stat strong { font-size: 1.2rem; }
  .realm-status-page .hero-stat b { font-size: 0.7rem; }
  .realm-status-page .hero-stat small { font-size: 0.58rem; }
}

@media (max-width: 420px) {
  .realm-chart-wrap { min-height: 200px; }
  .realm-chart svg { height: 205px; }
  .realm-period-switch button { padding: 0 5px; font-size: 0.59rem; }
  .realm-main-tab { gap: 4px; padding: 0 5px; font-size: 0.62rem; }
  .realm-maintenance-notice { grid-template-columns: 32px minmax(0, 1fr); padding: 13px; }
  .realm-maintenance-notice > i { width: 32px; height: 32px; }
}
