:root {
  --bg-0: #090807;
  --bg-1: #11100f;
  --bg-2: #1d1a17;
  --glass: rgba(255, 255, 255, 0.05);
  --glass-strong: rgba(255, 255, 255, 0.1);
  --text-1: #f8f3ea;
  --text-2: #cfc2ab;
  --accent-amber: #d3aa70;
  --accent-rose: #b78a6a;
  --accent-mint: #76b39a;
  --accent-sky: #809ac5;
  --accent-purple: #746652;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  --radius-lg: 28px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: "Manrope", "Kanit", sans-serif;
  color: var(--text-1);
  background: radial-gradient(circle at 14% 6%, rgba(211, 170, 112, 0.2), transparent 40%),
    radial-gradient(circle at 88% 16%, rgba(118, 179, 154, 0.12), transparent 43%),
    radial-gradient(circle at 50% 100%, rgba(183, 138, 106, 0.12), transparent 35%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1) 42%, var(--bg-2));
  min-height: 100vh;
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.03), transparent 28%),
    repeating-linear-gradient(-45deg,
      rgba(255, 255, 255, 0.018) 0,
      rgba(255, 255, 255, 0.018) 1px,
      transparent 1px,
      transparent 30px);
  opacity: 0.46;
  pointer-events: none;
}

.page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  position: relative;
}

.orb {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.2;
  z-index: -1;
}

.orb.one {
  background: var(--accent-purple);
  top: 60px;
  left: -120px;
  animation: floatPulse 16s ease-in-out infinite;
}

.orb.two {
  background: var(--accent-mint);
  top: 420px;
  right: -120px;
  animation: floatPulse 18s ease-in-out infinite reverse;
}

nav {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: center;
  gap: 14px 18px;
  margin-bottom: 30px;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid rgba(211, 170, 112, 0.24);
  background: linear-gradient(135deg, rgba(26, 21, 17, 0.88), rgba(14, 14, 16, 0.82));
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(8px);
  position: relative;
  z-index: 200;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
  max-width: 100%;
  position: relative;
}

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

.brand-mark {
  display: inline-flex;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-amber), var(--accent-rose));
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--bg-0);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.34);
  flex: 0 0 auto;
}

.brand-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-family: "Cormorant Garamond", "Kanit", serif;
  font-size: 1.12rem;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-copy small {
  color: var(--text-2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.66rem;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 8px;
  font-weight: 600;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 100%;
}

.nav-link-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-1);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.nav-link-chip:hover {
  border-color: rgba(211, 170, 112, 0.52);
  background: rgba(211, 170, 112, 0.14);
  transform: translateY(-1px);
}

.nav-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text-1);
  font: inherit;
  padding: 8px 14px;
  cursor: pointer;
}

.nav-btn:hover {
  color: var(--text-1);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  background: var(--text-1);
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-mobile {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 12px;
  width: min(280px, 92vw);
  background: rgba(12, 14, 20, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 12px;
  display: none;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow);
  z-index: 220;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-mobile.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-mobile a,
.nav-mobile button {
  color: var(--text-1);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 600;
  text-align: left;
}

.nav-mobile button {
  border: none;
  width: 100%;
  cursor: pointer;
}

header {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: stretch;
  margin-bottom: 48px;
}

.hero {
  background: linear-gradient(145deg, rgba(28, 23, 19, 0.92), rgba(16, 16, 18, 0.86));
  border: 1px solid rgba(211, 170, 112, 0.2);
  border-radius: var(--radius-lg);
  padding: 34px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  min-height: 654px;
  height: 100%;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 12% 8%, rgba(211, 170, 112, 0.16), transparent 36%),
    radial-gradient(circle at 84% 90%, rgba(118, 179, 154, 0.1), transparent 38%);
  pointer-events: none;
}

.hero h1 {
  font-family: "Cormorant Garamond", "Kanit", serif;
  font-size: clamp(2.5rem, 4vw, 3.85rem);
  letter-spacing: 0.02em;
  margin: 0 0 14px;
  line-height: 1.02;
  text-wrap: balance;
}

.hero p {
  margin: 0 0 26px;
  color: var(--text-2);
  font-size: 1.02rem;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ai-panel {
  margin-top: 16px;
  padding: 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(211, 170, 112, 0.12), rgba(128, 154, 197, 0.08));
  border: 1px solid rgba(211, 170, 112, 0.22);
}

.ai-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ai-panel-title {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: rgba(248, 243, 234, 0.75);
}

.ai-panel-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(211, 170, 112, 0.16);
  color: #fce8c6;
}

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

.ai-card {
  background: rgba(10, 12, 18, 0.74);
  border-radius: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  gap: 6px;
}

.ai-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ai-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--bg-0);
  background: linear-gradient(120deg, var(--accent-amber), var(--accent-mint));
}

.ai-status {
  font-size: 0.72rem;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ai-card h4 {
  margin: 0;
  font-size: 0.95rem;
}

.ai-card p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.85rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.ai-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.ai-chip-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
  border-radius: 4px;
}

.ai-chip-btn {
  appearance: none;
  cursor: pointer;
}

.mini-app {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  padding: 8px;
  display: grid;
  gap: 8px;
}

.mini-app-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mini-app-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}

.mini-app-dot-red {
  background: #ff6b6b;
}

.mini-app-dot-yellow {
  background: #f6c453;
}

.mini-app-dot-green {
  background: #5bd48a;
}

.mini-app-title {
  margin-left: auto;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
}

.mini-app-nav {
  display: inline-flex;
  gap: 6px;
}

.mini-app-arrow {
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-1);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.mini-app-arrow:hover {
  border-color: rgba(255, 255, 255, 0.35);
}

.mini-app-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 64px;
  grid-template-rows: repeat(2, 64px);
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
  align-items: center;
  justify-items: center;
}

.mini-app-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text-1);
  text-decoration: none;
  padding: 0;
  position: relative;
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.mini-app-icon {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
}

.mini-app-tile:hover {
  border-color: rgba(211, 170, 112, 0.4);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}

.mini-app-status {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid rgba(12, 16, 26, 0.9);
  background: #5bd48a;
}

.mini-app-status.is-down {
  background: #ff6b6b;
}

.mini-app-status.is-pending {
  background: #f6c453;
}

.mini-app-tile.is-offline {
  opacity: 0.4;
  filter: grayscale(1);
  pointer-events: none;
}

.mini-app-tile.is-pending {
  opacity: 0.7;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  color: var(--bg-0);
  background: linear-gradient(120deg, var(--accent-amber), var(--accent-rose));
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn.secondary {
  background: transparent;
  color: var(--text-1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.4);
}

.hero-visual {
  background: linear-gradient(165deg, rgba(10, 12, 16, 0.82), rgba(25, 21, 17, 0.78));
  border-radius: var(--radius-lg);
  padding: 26px;
  border: 1px solid rgba(211, 170, 112, 0.18);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.42);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.hero-visual svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
}

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

.status-strip-secondary {
  margin-top: 12px;
}

.status-divider {
  height: 1px;
  margin-top: 16px;
  background: rgba(255, 255, 255, 0.12);
}

.status-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.9rem;
  color: var(--text-2);
}

.status-line {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.status-sub {
  color: var(--text-2);
  font-size: 0.8rem;
}

.chip-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-1);
  font-weight: 700;
}

.chip-dot::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-mint);
  box-shadow: 0 0 12px rgba(82, 214, 160, 0.6);
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 40px 0 16px;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.section-title h2 {
  margin: 0;
  font-size: 1.7rem;
  font-family: "Cormorant Garamond", "Kanit", serif;
  letter-spacing: 0.02em;
}

.section-title.section-apps h2 {
  color: #dcb88d;
}

.section-title span {
  color: var(--text-2);
  font-size: 0.95rem;
  min-width: 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.card {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(211, 170, 112, 0.42);
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.38);
}

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

.card-badge {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-2);
}

.card.card-disabled {
  filter: grayscale(1);
  opacity: 0.7;
}

.card.card-disabled::after {
  opacity: 0.2;
}

.card.card-disabled .service-img {
  filter: grayscale(1);
}

.card.card-disabled a,
.card.card-disabled .link-btn {
  pointer-events: none;
  color: var(--text-2);
}

.link-disabled {
  pointer-events: none;
}

.card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-amber), var(--accent-sky));
  opacity: 0.6;
}

.card h3 {
  margin: 10px 0 8px;
  font-size: 1.22rem;
}

.card p {
  margin: 0 0 12px;
  color: var(--text-2);
  line-height: 1.6;
  font-size: 0.98rem;
}

.card .meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-3);
  margin-bottom: 14px;
}

.card a {
  color: var(--text-1);
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.card .link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-1);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 1rem;
}

.card a span {
  display: inline-flex;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
}

.card .link-btn span {
  display: inline-flex;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
}

.service-media {
  width: 100%;
  height: 160px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #11192a;
}

.service-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-amber);
  font-weight: 700;
}

.status-area {
  margin: 26px 0 32px;
  display: grid;
  gap: 16px;
}

.status-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3);
  padding: 18px;
}

.status-card.status-live {
  border-left: 4px solid var(--accent-mint);
}

.status-card.status-live h3 {
  color: var(--accent-mint);
}

.status-card.status-tls {
  border-left: 4px solid var(--accent-amber);
}

.status-card.status-tls h3 {
  color: var(--accent-amber);
}

.status-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.status-card-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.status-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.status-title-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: currentColor;
  flex: 0 0 auto;
}

.status-title-icon svg {
  display: block;
}

.status-title-logo {
  width: 18px;
  height: 18px;
  display: block;
}
.status-summary {
  color: var(--text-2);
  font-size: 0.9rem;
}

.status-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.status-tag.is-up {
  color: var(--accent-mint);
  background: rgba(125, 185, 166, 0.16);
}

.status-tag.is-down {
  color: var(--accent-rose);
  background: rgba(179, 122, 106, 0.18);
}

.status-tag.is-pending {
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.06);
}

.status-tag.is-warn {
  color: var(--accent-amber);
  background: rgba(201, 162, 106, 0.16);
}

.status-tag.is-expired {
  color: var(--accent-rose);
  background: rgba(179, 122, 106, 0.18);
}

.status-tag.is-unknown {
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.04);
}

.status-meta {
  color: var(--text-2);
  font-size: 0.9rem;
}

.status-body {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-4px);
  transition: max-height 0.25s ease, opacity 0.2s ease, transform 0.25s ease;
}

.status-body.is-open {
  max-height: 2000px;
  opacity: 1;
  transform: translateY(0);
}

.status-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--text-1);
  font-size: 0.95rem;
}

.status-table th,
.status-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.pill.up {
  color: var(--accent-mint);
  background: rgba(125, 185, 166, 0.14);
}

.pill.down {
  color: var(--accent-rose);
  background: rgba(179, 122, 106, 0.16);
}

.pill.pending {
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.06);
}

.pill.warn {
  color: var(--accent-amber);
  background: rgba(201, 162, 106, 0.16);
}

.pill.expired {
  color: var(--accent-rose);
  background: rgba(179, 122, 106, 0.18);
}

.pill.unknown {
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.04);
}

.status-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status-toggle {
  padding: 8px 10px;
  width: 40px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.status-toggle svg {
  display: block;
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.ghost-btn:hover {
  border-color: rgba(211, 170, 112, 0.5);
  background: rgba(211, 170, 112, 0.12);
  transform: translateY(-1px);
}

.mqtt-panel {
  margin-top: 10px;
  display: grid;
  gap: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--text-2);
  font-size: 0.9rem;
}

input,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-1);
  font-size: 0.95rem;
}

textarea {
  min-height: 60px;
  resize: vertical;
}

.mqtt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mqtt-logs {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px;
  font-family: "Space Grotesk", "Kanit", monospace;
  font-size: 0.9rem;
  max-height: 200px;
  overflow: auto;
  color: var(--text-2);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 10, 18, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}

.modal {
  width: min(920px, 96vw);
  max-height: 92vh;
  overflow: auto;
  background: #0c1424;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-header h3 {
  margin: 0;
}

.modal-body {
  padding: 20px;
  display: grid;
  gap: 18px;
}

.modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.field-inline {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  align-items: center;
}

.input-group {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
}

select {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-1);
  font-size: 0.95rem;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.toggle input {
  appearance: none;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease;
}

.toggle input::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0c1424;
  top: 3px;
  left: 3px;
  transition: transform 0.2s ease;
}

.toggle input:checked {
  background: var(--accent-mint);
}

.toggle input:checked::after {
  transform: translateX(20px);
}

.radio-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.modal-footer {
  padding: 16px 20px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.note {
  color: var(--text-2);
  font-size: 0.85rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.tile {
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
}

.tile svg {
  width: 100%;
  height: auto;
  border-radius: 14px;
  display: block;
  margin-bottom: 12px;
}

.monitor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.metric-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  display: grid;
  gap: 6px;
}

.metric-label {
  color: var(--text-2);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-value {
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

.metric-sub {
  color: var(--text-2);
  font-size: 0.85rem;
}

.monitor-alert {
  margin: 6px 0 16px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 123, 108, 0.35);
  background: rgba(255, 123, 108, 0.12);
  color: var(--text-1);
  font-size: 0.9rem;
}

.monitor-table-wrap {
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
  padding: 18px;
  overflow: auto;
}

.monitor-modal {
  width: min(90vw, 1280px);
  max-height: 80vh;
}

.microservices-modal {
  width: min(90vw, 1100px);
  max-height: 80vh;
}

.stock-modal {
  width: 90vw;
  height: 90vh;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.stock-modal-body {
  padding: 0;
  flex: 1;
  display: block;
}

.stock-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

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

.microservices-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: 14px;
}

.microservices-card-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 6px;
  padding-right: 14px;
  border-right: 1px dashed rgba(255, 255, 255, 0.12);
}

.microservices-card-title {
  margin: 0;
  font-size: 1.02rem;
}

.microservices-card-sub {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2);
}

.microservices-list {
  display: grid;
  gap: 10px;
  padding-left: 6px;
}

.microservices-item {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.microservices-item-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.microservices-path {
  font-family: "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
  font-size: 0.86rem;
  color: var(--text-1);
}

.microservices-desc {
  margin: 6px 0 0;
  font-size: 0.9rem;
  color: var(--text-2);
}

.microservices-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.microservices-table th,
.microservices-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.microservices-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.method-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-1);
}

.method-get {
  border-color: rgba(82, 214, 160, 0.5);
  color: var(--accent-mint);
  background: rgba(82, 214, 160, 0.12);
}

.method-post {
  border-color: rgba(255, 180, 84, 0.5);
  color: var(--accent-amber);
  background: rgba(255, 180, 84, 0.12);
}

.monitor-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.metric-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.metric-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-1);
}

.monitor-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.monitor-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.monitor-card-head {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: center;
}

.monitor-card-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.monitor-card-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.monitor-stat-row {
  display: grid;
  grid-template-columns: 26px 80px 1fr;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.monitor-stat {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 12px;
  display: grid;
  gap: 4px;
}

.monitor-stat-icon {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-1);
}

.monitor-stat-label {
  color: var(--text-2);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.monitor-stat-value {
  font-size: 0.98rem;
  justify-self: end;
}

.monitor-stat-sub {
  color: var(--text-2);
  font-size: 0.8rem;
  grid-column: 2 / -1;
}

.monitor-modal-card {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 14px 16px;
  display: grid;
  gap: 6px;
}

.monitor-table-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.monitor-table-header h3 {
  margin: 0;
}

.monitor-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.monitor-table th,
.monitor-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.table-muted {
  color: var(--text-2);
  text-align: center;
}

footer {
  margin-top: 56px;
  color: var(--text-2);
  font-size: 0.95rem;
  text-align: center;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 260;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(11, 11, 15, 0.52);
  color: var(--text-1);
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.back-to-top span {
  display: inline-flex;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.95rem;
}

.back-to-top:hover {
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

@media (max-width: 980px) {
  header {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-mobile {
    display: flex;
  }

  .ai-grid {
    grid-template-columns: 1fr;
  }

  .microservices-card {
    grid-template-columns: 1fr;
  }

  .microservices-card-head {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-right: 0;
    border-right: none;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
    padding-bottom: 10px;
  }

  .microservices-list {
    padding-left: 0;
  }
}

@media (max-width: 1160px) {
  nav {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-mobile {
    display: flex;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 24px 14px 72px;
  }

  nav {
    padding: 12px;
    border-radius: 16px;
  }

  .brand-copy strong {
    font-size: 1rem;
  }

  .brand-copy small {
    display: none;
  }

  .hero {
    padding: 26px 22px;
    min-height: auto;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .status-strip {
    grid-template-columns: 1fr;
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
  }
}

.hero,
.hero-visual,
.status-area,
.section-title,
.cards {
  animation: revealUp 0.65s ease both;
}

.hero {
  animation-delay: 0.03s;
}

.hero-visual {
  animation-delay: 0.12s;
}

.status-area {
  animation-delay: 0.2s;
}

.cards {
  animation-delay: 0.28s;
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatPulse {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(12px, -10px, 0) scale(1.08);
  }

  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
}
