:root {
  --bg: #061936;
  --panel: rgba(5, 44, 88, 0.82);
  --panel2: rgba(7, 55, 107, 0.66);
  --line: rgba(31, 161, 255, 0.48);
  --glow: #19a7ff;
  --text: #eaf6ff;
  --muted: #a8c8ec;
  --orange: #ff9f2f;
  --green: #3ce09b;
  --blue: #62a9ff;
  --purple: #9b76ff;
  --red: #ff5b43;
  --yellow: #ffc83d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -10%, rgba(21, 142, 255, 0.34), transparent 30%),
    radial-gradient(circle at 95% 20%, rgba(0, 184, 255, 0.18), transparent 24%),
    linear-gradient(180deg, #071b3c 0%, #03102a 100%);
}

h1,
h2,
h3,
p {
  margin: 0;
}

.ops-screen {
  width: 100vw;
  height: 100vh;
  min-width: 1180px;
  min-height: 680px;
  display: grid;
  grid-template-rows: 92px minmax(0, 1fr) 70px;
  gap: 12px;
  padding: 16px 20px 14px;
  background:
    linear-gradient(90deg, rgba(14, 96, 191, 0.22) 1px, transparent 1px),
    linear-gradient(0deg, rgba(14, 96, 191, 0.18) 1px, transparent 1px);
  background-size: 80px 80px;
}

.ops-header {
  position: relative;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 330px;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid rgba(34, 158, 255, 0.48);
}

.ops-header::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: -2px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #49c3ff, #d9f4ff, #49c3ff, transparent);
  box-shadow: 0 0 18px #41bfff;
}

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

.brand strong {
  display: block;
  font-size: 26px;
  letter-spacing: 0;
}

.brand em {
  display: block;
  margin-top: 3px;
  color: #d7e6f4;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.brand-flower {
  position: relative;
  width: 52px;
  height: 52px;
}

.brand-flower span {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50% 50% 50% 8px;
  background: linear-gradient(135deg, #ffbc36, #ff6f24);
}

.brand-flower span:nth-child(1) {
  left: 12px;
  top: 0;
  transform: rotate(45deg);
}

.brand-flower span:nth-child(2) {
  right: 0;
  top: 12px;
  transform: rotate(135deg);
}

.brand-flower span:nth-child(3) {
  left: 12px;
  bottom: 0;
  transform: rotate(225deg);
}

.brand-flower span:nth-child(4) {
  left: 0;
  top: 12px;
  transform: rotate(315deg);
}

.ops-header h1 {
  text-align: center;
  font-size: clamp(38px, 3.2vw, 58px);
  letter-spacing: 10px;
  text-shadow: 0 0 18px rgba(145, 211, 255, 0.8);
}

.header-meta {
  justify-self: end;
  display: grid;
  grid-template-columns: auto auto auto;
  gap: 18px;
  align-items: center;
}

.header-meta strong {
  font-size: 30px;
  font-variant-numeric: tabular-nums;
}

.header-meta span {
  color: #d9eaff;
  font-size: 15px;
  line-height: 1.45;
}

.weather {
  display: flex;
  align-items: center;
  gap: 8px;
}

.weather i {
  position: relative;
  width: 42px;
  height: 26px;
  border-radius: 18px;
  background: #cdd8e5;
}

.weather i::before {
  content: "";
  position: absolute;
  left: 7px;
  top: -12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffd14a;
  box-shadow: 0 0 12px rgba(255, 209, 74, 0.75);
}

.main-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 0.98fr;
  grid-template-rows: minmax(0, calc((100vw - 52px) * 0.28409)) minmax(0, 1fr);
  gap: 12px;
}

.glow-panel {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(8, 58, 111, 0.83), rgba(3, 33, 73, 0.86));
  box-shadow:
    inset 0 0 25px rgba(28, 150, 255, 0.12),
    0 0 18px rgba(22, 145, 255, 0.2);
}

.activity-panel {
  position: relative;
  grid-column: 1;
  grid-row: 1;
}

.events-panel {
  grid-column: 2;
  grid-row: 1;
}

.service-panel {
  grid-column: 1;
  grid-row: 2;
}

.monitor-panel {
  grid-column: 2;
  grid-row: 2;
}

.activity-carousel,
.activity-slide,
.activity-photo,
.activity-mask {
  position: absolute;
  inset: 0;
}

.activity-slide {
  opacity: 0;
  transition: opacity 700ms ease;
}

.activity-slide.active {
  opacity: 1;
}

.activity-photo {
  background-position: center;
  background-size: cover;
}

.poster {
  background:
    radial-gradient(circle at 72% 28%, rgba(255, 255, 255, 0.23), transparent 18%),
    linear-gradient(135deg, rgba(61, 174, 255, 0.9), rgba(6, 56, 112, 0.95));
}

.poster::before {
  content: "";
  position: absolute;
  right: 11%;
  top: 12%;
  width: 210px;
  height: 210px;
  border: 22px solid rgba(255, 255, 255, 0.17);
  border-radius: 24px;
  transform: rotate(-8deg);
}

.poster-gold {
  background:
    radial-gradient(circle at 73% 30%, rgba(255, 255, 255, 0.22), transparent 19%),
    linear-gradient(135deg, rgba(255, 159, 47, 0.9), rgba(73, 42, 14, 0.96));
}

.activity-mask {
  background: linear-gradient(0deg, rgba(1, 12, 32, 0.85), transparent 58%);
}

.activity-caption {
  position: absolute;
  left: 30px;
  right: 24px;
  bottom: 24px;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.8);
}

.activity-caption h2 {
  margin-bottom: 10px;
  font-size: 28px;
}

.activity-caption p {
  font-size: 17px;
  color: #f1f7ff;
}

.slide-dots {
  position: absolute;
  right: 28px;
  bottom: 28px;
  display: flex;
  gap: 10px;
}

.slide-dots span {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
}

.slide-dots span.active {
  background: #1f9dff;
  box-shadow: 0 0 12px #1f9dff;
}

.section-title {
  height: 46px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(30, 155, 255, 0.32);
}

.section-title h2 {
  font-size: 22px;
}

.section-title span {
  color: var(--muted);
  font-size: 16px;
}

.section-title.sub {
  height: 38px;
  margin-top: 6px;
  border-top: 1px solid rgba(30, 155, 255, 0.22);
}

.monitor-grid {
  height: calc(100% - 46px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 8px;
  padding: 8px;
}

.metric-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(31, 161, 255, 0.3);
  border-radius: 8px;
  background: rgba(4, 47, 97, 0.8);
  padding: 7px 9px;
}

.metric-card span {
  font-size: 14px;
  font-weight: 800;
}

.metric-card strong {
  display: block;
  margin: 4px 0 2px;
  color: var(--blue);
  font-size: 26px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.metric-card.orange strong {
  color: var(--orange);
}

.metric-card.green strong {
  color: var(--green);
}

.metric-card.purple strong {
  color: var(--purple);
}

.metric-card em,
.summary-strip em,
.org-strip em {
  margin-left: 5px;
  font-size: 13px;
  color: #eaf6ff;
  font-style: normal;
  font-weight: 500;
}

.metric-card p {
  color: #d5e9ff;
  font-size: 12px;
}

.metric-icon,
.summary-icon,
.org-strip i {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(31, 161, 255, 0.18);
  display: grid;
  place-items: center;
  position: relative;
}

.metric-icon::before,
.summary-icon::before,
.org-strip i::before {
  content: "";
  width: 21px;
  height: 21px;
  border-radius: 8px;
  background: currentColor;
}

.metric-card.orange .metric-icon,
.summary-icon.training {
  color: var(--orange);
}

.metric-card.blue .metric-icon,
.summary-icon.health,
.org-strip i {
  color: var(--blue);
}

.metric-card.green .metric-icon,
.summary-icon.nursing {
  color: var(--green);
}

.metric-card.purple .metric-icon,
.summary-icon.music {
  color: var(--purple);
}

.summary-strip,
.org-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 8px 12px 0;
}

.summary-strip article,
.org-strip article {
  min-width: 0;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(31, 161, 255, 0.28);
  border-radius: 8px;
  background: rgba(4, 47, 97, 0.68);
  padding: 9px 10px;
}

.summary-strip span,
.org-strip span {
  display: block;
  margin-bottom: 4px;
  color: #d8eafd;
  font-size: 14px;
  font-weight: 800;
}

.summary-strip strong,
.org-strip strong {
  font-size: 25px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.summary-strip p {
  margin-top: 4px;
  color: #bdd6f4;
  font-size: 12px;
}

.service-panel {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  padding: 8px;
  gap: 8px 0;
}

.service-panel .section-title {
  height: 100%;
  padding: 0 12px;
  border: 1px solid rgba(30, 155, 255, 0.32);
  border-right: 0;
  border-radius: 8px 0 0 8px;
  background: rgba(8, 58, 111, 0.45);
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 4px;
}

.service-panel .section-title h2 {
  font-size: 17px;
  line-height: 1.15;
}

.service-panel .section-title span {
  font-size: 11px;
}

.service-panel .section-title.sub {
  height: 100%;
  margin-top: 0;
  border-top: 1px solid rgba(30, 155, 255, 0.32);
}

.service-panel .summary-strip,
.service-panel .org-strip {
  height: 100%;
  gap: 6px;
  padding: 0;
}

.service-panel .summary-strip article,
.service-panel .org-strip article {
  grid-template-columns: 32px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  gap: 5px;
  padding: 5px 7px;
  border-radius: 0;
  align-content: center;
  border-left-color: rgba(31, 161, 255, 0.18);
}

.service-panel .summary-strip article:last-child,
.service-panel .org-strip article:last-child {
  border-radius: 0 8px 8px 0;
}

.service-panel .summary-strip article:first-child,
.service-panel .org-strip article:first-child {
  border-left-color: rgba(31, 161, 255, 0.28);
}

.service-panel .summary-strip .summary-icon,
.service-panel .org-strip i {
  grid-column: 1;
  grid-row: 1 / 4;
}

.service-panel .summary-strip span,
.service-panel .summary-metric,
.service-panel .org-strip span,
.service-panel .org-strip strong {
  grid-column: 2;
}

.service-panel .summary-metric {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}

.service-panel .summary-icon,
.service-panel .org-strip i {
  width: 28px;
  height: 28px;
}

.service-panel .summary-icon::before,
.service-panel .org-strip i::before {
  width: 14px;
  height: 14px;
  border-radius: 5px;
}

.service-panel .summary-strip span,
.service-panel .org-strip span {
  margin-bottom: 1px;
  font-size: 12px;
  line-height: 1.1;
}

.service-panel .summary-strip strong,
.service-panel .org-strip strong {
  display: block;
  font-size: 20px;
  line-height: 1;
  white-space: nowrap;
}

.service-panel .summary-strip em,
.service-panel .org-strip em {
  margin-left: 2px;
  font-size: 9px;
}

.service-panel .summary-strip p {
  margin: 0;
  font-size: 9px;
  line-height: 1;
  white-space: nowrap;
}

.events-panel {
  display: grid;
  grid-template-rows: 46px minmax(0, 1fr);
}

.event-table {
  height: calc(100% - 24px);
  margin: 10px 14px 14px;
  overflow: hidden;
  border: 1px solid rgba(31, 161, 255, 0.28);
  border-radius: 8px;
}

.event-scroll {
  height: calc(100% - 40px);
  overflow: hidden;
}

.event-scroll-track {
  animation: event-scroll 18s linear infinite;
}

.event-scroll-track:hover {
  animation-play-state: paused;
}

@keyframes event-scroll {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-276px);
  }
}

.event-row {
  min-height: 46px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.7fr 0.85fr 0.8fr 0.78fr;
  align-items: center;
  border-top: 1px solid rgba(31, 161, 255, 0.18);
  padding: 0 14px;
  color: #e8f5ff;
  font-size: 16px;
}

.event-row.head {
  position: relative;
  z-index: 2;
  min-height: 40px;
  border-top: 0;
  background: rgba(22, 105, 184, 0.38);
  color: #cce6ff;
  font-weight: 800;
}

.event-row.fall-alert {
  position: relative;
  margin: 2px 4px;
  min-height: 42px;
  border: 1px solid rgba(255, 91, 67, 0.95);
  border-radius: 6px;
  background: rgba(255, 91, 67, 0.14);
  animation: fall-border 1.1s ease-in-out infinite;
}

@keyframes fall-border {
  0%,
  100% {
    border-color: rgba(255, 91, 67, 0.5);
    box-shadow: inset 0 0 8px rgba(255, 91, 67, 0.08), 0 0 0 rgba(255, 91, 67, 0);
  }
  50% {
    border-color: #ff2d1d;
    box-shadow: inset 0 0 18px rgba(255, 91, 67, 0.28), 0 0 16px rgba(255, 91, 67, 0.75);
  }
}

.event-row span:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.event-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-block;
  background: currentColor;
}

.event-dot.red,
.red {
  color: var(--red);
}

.event-dot.orange,
.orange-text {
  color: var(--orange);
}

.event-dot.yellow,
.yellow-text {
  color: var(--yellow);
}

.event-row em {
  width: fit-content;
  border-radius: 99px;
  padding: 5px 12px;
  font-style: normal;
  font-weight: 900;
}

.done {
  background: rgba(60, 224, 155, 0.18);
  color: var(--green);
}

.doing {
  background: rgba(255, 159, 47, 0.18);
  color: var(--orange);
}

.closed {
  background: rgba(98, 169, 255, 0.18);
  color: var(--blue);
}

.alarm-bar {
  min-height: 0;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 140px;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(5, 52, 117, 0.95), rgba(9, 43, 91, 0.94));
  box-shadow: inset 0 0 25px rgba(37, 156, 255, 0.22), 0 0 20px rgba(23, 143, 255, 0.24);
  padding: 0 28px;
}

.alarm-title {
  display: flex;
  align-items: center;
  gap: 14px;
  border-right: 1px solid rgba(66, 180, 255, 0.42);
}

.alarm-title i {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle, #ff7d6a 35%, transparent 36%);
  box-shadow: 0 0 18px rgba(255, 91, 67, 0.75);
}

.alarm-title strong {
  font-size: 27px;
}

.ticker {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.ticker.is-rolling {
  animation: ticker-roll 420ms ease both;
}

@keyframes ticker-roll {
  0% {
    opacity: 0;
    transform: translateY(16px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.ticker span {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #f5fbff;
  font-size: 26px;
  font-weight: 900;
  white-space: nowrap;
}

.ticker span::before {
  content: "!";
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--red);
  color: white;
  box-shadow: 0 0 14px rgba(255, 91, 67, 0.82);
}

.refresh {
  color: #d9ecff;
  text-align: center;
  font-size: 17px;
  line-height: 1.35;
}

@media (max-width: 1300px) {
  .ops-screen {
    min-width: 0;
    padding: 12px;
    grid-template-rows: 82px minmax(0, 1fr) 60px;
  }

  .main-grid {
    grid-template-rows: minmax(0, calc((100vw - 36px) * 0.28409)) minmax(0, 1fr);
  }

  .ops-header {
    grid-template-columns: 260px minmax(0, 1fr) 250px;
  }

  .ops-header h1 {
    font-size: 38px;
    letter-spacing: 5px;
  }

  .brand strong {
    font-size: 21px;
  }

  .brand-flower {
    width: 42px;
    height: 42px;
  }

  .header-meta strong {
    font-size: 24px;
  }

  .metric-card strong {
    font-size: 24px;
  }

  .summary-strip strong,
  .org-strip strong {
    font-size: 24px;
  }

  .ticker span {
    font-size: 20px;
  }
}
