:root {
  --blue: #1761a3;
  --blue-deep: #0d4375;
  --blue-bright: #2a7fc4;
  --green: #4daf83;
  --green-deep: #2f8f63;
  --black: #0f2a44;
  --gray: #5a6d82;
  --gray-light: #e8eef4;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.88);
  --surface-solid: #ffffff;
  --border: rgba(255, 255, 255, 0.65);
  --border-soft: rgba(23, 97, 163, 0.12);
  --shadow: 0 18px 50px rgba(13, 67, 117, 0.12);
  --shadow-soft: 0 8px 28px rgba(15, 42, 68, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
  --font: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  --up: #4daf83;
  --degraded: #d4a017;
  --down: #c44747;
  --unknown: #6b7c8f;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--black);
  min-height: 100vh;
  overflow-x: hidden;
  background: #c5daf0;
}

.particle-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-wash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 100% 80% at 50% -30%, rgba(42, 127, 196, 0.55) 0%, transparent 58%),
    radial-gradient(ellipse 70% 60% at 100% 10%, rgba(77, 175, 131, 0.32) 0%, transparent 55%),
    radial-gradient(ellipse 65% 55% at 0% 70%, rgba(23, 97, 163, 0.28) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 80% 90%, rgba(77, 175, 131, 0.2) 0%, transparent 45%),
    linear-gradient(165deg, #d9ebf8 0%, #c3dcf0 38%, #b4d2ea 68%, #a8c9e4 100%);
}

.bg-mesh {
  position: absolute;
  inset: -10%;
  opacity: 0.55;
  background:
    radial-gradient(circle at 18% 22%, rgba(23, 97, 163, 0.22), transparent 32%),
    radial-gradient(circle at 78% 18%, rgba(77, 175, 131, 0.2), transparent 28%),
    radial-gradient(circle at 62% 72%, rgba(23, 97, 163, 0.16), transparent 34%),
    radial-gradient(circle at 28% 78%, rgba(77, 175, 131, 0.14), transparent 30%);
  animation: meshDrift 28s ease-in-out infinite alternate;
}

.bg-grid {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(15, 42, 68, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 42, 68, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 20%, transparent 75%);
}

#particleCanvas {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0.85;
}

.space-aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  mix-blend-mode: multiply;
}

.space-aurora--left {
  width: min(70vw, 640px);
  height: min(70vw, 640px);
  top: -14%;
  left: -12%;
  background: radial-gradient(circle, rgba(23, 97, 163, 0.55) 0%, transparent 70%);
  animation: auroraDrift 20s ease-in-out infinite alternate;
}

.space-aurora--right {
  width: min(60vw, 560px);
  height: min(60vw, 560px);
  bottom: -12%;
  right: -10%;
  background: radial-gradient(circle, rgba(77, 175, 131, 0.48) 0%, transparent 70%);
  animation: auroraDrift 26s ease-in-out infinite alternate-reverse;
}

.space-aurora--top {
  width: min(50vw, 420px);
  height: min(40vw, 320px);
  top: 8%;
  right: 18%;
  background: radial-gradient(circle, rgba(42, 127, 196, 0.35) 0%, transparent 70%);
  animation: auroraPulse 16s ease-in-out infinite;
  mix-blend-mode: soft-light;
}

.space-aurora--core {
  width: min(80vw, 760px);
  height: min(55vw, 500px);
  top: 36%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(15, 42, 68, 0.14) 0%, transparent 65%);
  animation: auroraPulse 18s ease-in-out infinite;
  mix-blend-mode: normal;
}

@keyframes meshDrift {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(-2%, 3%) scale(1.05);
  }
}

@keyframes auroraDrift {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.85;
  }
  50% {
    transform: translate(4%, 6%) scale(1.1);
    opacity: 1;
  }
  100% {
    transform: translate(-3%, 3%) scale(0.96);
    opacity: 0.8;
  }
}

@keyframes auroraPulse {
  0%,
  100% {
    opacity: 0.55;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.95;
    transform: translate(-50%, -48%) scale(1.12);
  }
}

@media (prefers-reduced-motion: reduce) {
  .space-aurora,
  .bg-mesh {
    animation: none;
  }
}

.header,
.page,
.footer {
  position: relative;
  z-index: 1;
}

.header {
  padding: 20px 24px 0;
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: var(--surface-strong);
  backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--black);
}

.logo-img {
  height: 38px;
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(23, 97, 163, 0.15));
}

.logo-text {
  font-weight: 800;
  font-size: 1.08rem;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, var(--blue-deep), var(--blue), var(--green-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.header-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.header-nav a,
.footer a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  transition: color 0.2s ease;
}

.header-nav a:hover,
.footer a:hover {
  color: var(--blue-deep);
  text-decoration: underline;
}

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 24px 72px;
}

.hero {
  text-align: center;
  padding: 36px 20px 28px;
  margin-bottom: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.28) 100%);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px) saturate(1.15);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto -20% -40% -20%;
  height: 70%;
  background: radial-gradient(ellipse at center, rgba(77, 175, 131, 0.18), transparent 65%);
  pointer-events: none;
}

.hero-kicker {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(23, 97, 163, 0.08);
  border: 1px solid rgba(23, 97, 163, 0.12);
}

.hero-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(77, 175, 131, 0.55);
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(77, 175, 131, 0.55);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(77, 175, 131, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(77, 175, 131, 0);
  }
}

.hero-brand {
  position: relative;
  font-size: clamp(2.15rem, 5.2vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.08;
  margin-bottom: 14px;
  color: var(--black);
}

.hero-brand span {
  background: linear-gradient(115deg, var(--blue-deep) 0%, var(--blue) 45%, var(--green) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-tagline {
  position: relative;
  max-width: 640px;
  margin: 0 auto 26px;
  color: var(--gray);
  font-size: 1.06rem;
  line-height: 1.6;
}

.hero-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.overall-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: center;
  align-items: center;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid transparent;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-soft);
}

.overall-operational {
  background: rgba(77, 175, 131, 0.22);
  border-color: rgba(77, 175, 131, 0.4);
  color: #1a5f42;
}

.overall-partial_outage {
  background: rgba(212, 160, 23, 0.2);
  border-color: rgba(212, 160, 23, 0.42);
  color: #7a5a05;
}

.overall-major_outage {
  background: rgba(196, 71, 71, 0.18);
  border-color: rgba(196, 71, 71, 0.38);
  color: #8a2a2a;
}

.overall-unknown {
  background: rgba(107, 124, 143, 0.16);
  border-color: rgba(107, 124, 143, 0.32);
  color: var(--gray);
}

.updated-at {
  font-weight: 500;
  font-size: 0.85rem;
  opacity: 0.85;
}

.section {
  margin-top: 44px;
  animation: riseIn 0.55s ease both;
}

.section:nth-of-type(2) {
  animation-delay: 0.05s;
}
.section:nth-of-type(3) {
  animation-delay: 0.1s;
}
.section:nth-of-type(4) {
  animation-delay: 0.15s;
}
.section:nth-of-type(5) {
  animation-delay: 0.2s;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-head {
  margin-bottom: 18px;
}

.section-head h2 {
  font-size: 1.4rem;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
  color: var(--black);
}

.section-head p {
  color: var(--gray);
  font-size: 0.95rem;
  line-height: 1.45;
}

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

.component-tile {
  background: var(--surface);
  backdrop-filter: blur(16px) saturate(1.15);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 20px 18px 16px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.component-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(23, 97, 163, 0.22);
}

.component-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.component-name {
  font-weight: 750;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.component-desc {
  color: var(--gray);
  font-size: 0.9rem;
  margin-top: 5px;
  line-height: 1.45;
}

.status-pill {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.045em;
}

.status-operational {
  background: rgba(77, 175, 131, 0.2);
  color: #1a5f42;
}

.status-degraded {
  background: rgba(212, 160, 23, 0.2);
  color: #7a5a05;
}

.status-down {
  background: rgba(196, 71, 71, 0.18);
  color: #8a2a2a;
}

.status-unknown {
  background: rgba(107, 124, 143, 0.16);
  color: var(--gray);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 0.84rem;
  color: var(--gray);
  margin: 12px 0 14px;
}

.history-bar {
  display: grid;
  grid-template-columns: repeat(90, minmax(0, 1fr));
  gap: 2px;
  height: 30px;
  padding: 4px;
  border-radius: 8px;
  background: rgba(15, 42, 68, 0.04);
}

.history-day {
  border-radius: 2px;
  min-width: 0;
}

.history-day.operational {
  background: var(--up);
}

.history-day.degraded {
  background: var(--degraded);
}

.history-day.down {
  background: var(--down);
}

.history-day.no_data {
  background: rgba(107, 124, 143, 0.2);
}

.btn-subscribe,
.btn-primary,
.btn-secondary {
  font-family: var(--font);
  font-weight: 700;
  border-radius: 999px;
  padding: 13px 22px;
  cursor: pointer;
  border: none;
  font-size: 0.95rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn-subscribe:hover,
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(23, 97, 163, 0.35);
}

.btn-subscribe,
.btn-primary {
  background: linear-gradient(135deg, var(--blue-deep), var(--blue) 55%, var(--green-deep));
  color: #fff;
  box-shadow: 0 10px 26px rgba(23, 97, 163, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.9);
  color: var(--black);
  border: 1px solid rgba(15, 42, 68, 0.12);
}

.maintenance-list,
.sla-strip,
.incident-table-wrap {
  display: grid;
  gap: 12px;
}

.sla-strip {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.sla-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
  border-left: 4px solid var(--blue);
}

.sla-item:nth-child(even) {
  border-left-color: var(--green);
}

.sla-name {
  display: block;
  font-weight: 750;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.sla-value {
  color: var(--gray);
  font-size: 0.9rem;
}

.sla-value strong {
  color: var(--blue-deep);
  font-weight: 800;
}

.incident-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  padding: 4px;
  width: fit-content;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

.incident-tab {
  font-family: var(--font);
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--gray);
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.incident-tab.is-active {
  background: linear-gradient(135deg, var(--blue), var(--blue-bright));
  color: #fff;
  box-shadow: 0 6px 16px rgba(23, 97, 163, 0.25);
}

.table-scroll {
  overflow-x: auto;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table thead th {
  position: sticky;
  top: 0;
  text-align: left;
  padding: 13px 16px;
  background: linear-gradient(180deg, rgba(232, 242, 250, 0.98), rgba(224, 236, 247, 0.95));
  color: var(--blue-deep);
  font-weight: 700;
  white-space: nowrap;
  border-bottom: 1px solid rgba(23, 97, 163, 0.1);
}

.data-table tbody tr {
  transition: background 0.15s ease;
}

.data-table tbody tr:hover {
  background: rgba(23, 97, 163, 0.04);
}

.data-table td {
  padding: 13px 16px;
  border-top: 1px solid rgba(15, 42, 68, 0.07);
  vertical-align: top;
}

.cell-sub {
  color: var(--gray);
  font-size: 0.82rem;
  margin-top: 4px;
  line-height: 1.4;
}

.desc-cell {
  max-width: 380px;
  line-height: 1.45;
  color: #31485f;
}

.empty-state {
  color: var(--gray);
  padding: 22px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px dashed rgba(23, 97, 163, 0.28);
  text-align: center;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 67, 117, 0.48);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  width: min(460px, 100%);
  background: linear-gradient(180deg, #ffffff 0%, #f4f9fd 100%);
  border-radius: 20px;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 28px 70px rgba(13, 67, 117, 0.28);
}

.modal-card h2 {
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--blue-deep);
}

.modal-copy {
  color: var(--gray);
  margin-bottom: 18px;
  line-height: 1.45;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  font-weight: 600;
  font-size: 0.9rem;
}

.field input {
  font: inherit;
  font-weight: 500;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(23, 97, 163, 0.2);
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(23, 97, 163, 0.15);
}

.check-field {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.88rem;
  color: var(--gray);
  margin-bottom: 14px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.form-message {
  font-size: 0.88rem;
  margin-bottom: 12px;
}

.form-message.is-ok {
  color: var(--up);
}

.form-message.is-error {
  color: var(--down);
}

.footer {
  text-align: center;
  padding: 0 24px 48px;
  color: var(--gray);
  font-size: 0.9rem;
}

@media (max-width: 820px) {
  .component-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    padding: 28px 16px 22px;
    border-radius: 22px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .history-bar {
    height: 22px;
  }

  .incident-tabs {
    width: 100%;
  }

  .incident-tab {
    flex: 1;
  }
}
