:root {
  color-scheme: light;
  --bg: #f4f8f5;
  --panel: #ffffff;
  --text: #102116;
  --muted: #607468;
  --border: #dce8df;
  --border-strong: #c6d8cb;
  --shadow: 0 24px 70px rgba(14, 75, 35, 0.10);
  --brand: #21a038;
  --brand-2: #12b886;
  --brand-3: #8edb4f;
  --brand-dark: #063f26;
  --brand-soft: #eaf8ee;
  --up: #179b49;
  --down: #d92d20;
  --pending: #b76e00;
  --maintenance: #2563eb;
  --unknown: #64748b;
  --degraded: #b76e00;
}

* { box-sizing: border-box; }

html { min-height: 100%; scroll-behavior: smooth; }

body {
  min-height: 100%;
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 5%, rgba(33, 160, 56, 0.20) 0, transparent 26%),
    radial-gradient(circle at 86% 16%, rgba(18, 184, 134, 0.16) 0, transparent 30%),
    linear-gradient(180deg, #f9fbf8 0%, var(--bg) 48%, #eef6f0 100%);
  color: var(--text);
}

.page-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 0 42%, rgba(33, 160, 56, 0.04) 42% 44%, transparent 44% 100%),
    radial-gradient(circle at 75% 84%, rgba(142, 219, 79, 0.20), transparent 24%);
  z-index: -1;
}

button, input { font: inherit; }

button {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: white;
  padding: 13px 20px;
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(33, 160, 56, 0.22);
  transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}

button:hover { transform: translateY(-1px); box-shadow: 0 16px 32px rgba(33, 160, 56, 0.26); }
button:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

button.ghost-button {
  background: rgba(255, 255, 255, 0.78);
  color: var(--brand-dark);
  border: 1px solid rgba(12, 107, 54, 0.12);
  box-shadow: 0 8px 20px rgba(6, 63, 38, 0.08);
  backdrop-filter: blur(12px);
}

button.danger { background: #fff1f0; color: #b42318; }

input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px 16px;
  outline: none;
  background: #fbfffc;
}

input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(33, 160, 56, 0.14);
}

code {
  background: #f0f7f1;
  border: 1px solid #d7eadc;
  border-radius: 7px;
  padding: 1px 6px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(249, 251, 248, 0.82);
  border-bottom: 1px solid rgba(198, 216, 203, 0.72);
  backdrop-filter: blur(16px);
}

.site-header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  min-width: max-content;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: white;
  font-size: 23px;
  font-weight: 950;
  letter-spacing: -0.08em;
  background:
    linear-gradient(135deg, #0b7f35 0%, #21a038 54%, #8edb4f 100%);
  box-shadow: 0 12px 24px rgba(33, 160, 56, 0.24);
}

.brand-word {
  font-size: 25px;
  font-weight: 950;
  letter-spacing: -0.055em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(198, 216, 203, 0.62);
  border-radius: 999px;
  padding: 5px;
}

.main-nav a {
  color: #355342;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  padding: 9px 14px;
  border-radius: 999px;
}

.main-nav a:hover { background: var(--brand-soft); color: var(--brand-dark); }

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

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 72px;
}

.promo-hero {
  position: relative;
  overflow: hidden;
  min-height: 315px;
  display: grid;
  grid-template-columns: 1fr minmax(260px, 380px);
  gap: 28px;
  align-items: center;
  padding: clamp(30px, 5vw, 54px);
  margin-bottom: 26px;
  color: white;
  border-radius: 34px;
  background:
    radial-gradient(circle at 76% 24%, rgba(142, 219, 79, 0.55) 0, transparent 28%),
    linear-gradient(135deg, #063f26 0%, #087a35 46%, #21a038 100%);
  box-shadow: 0 30px 80px rgba(6, 63, 38, 0.24);
}

.promo-hero::after {
  content: "";
  position: absolute;
  inset: auto -80px -150px auto;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
}

.promo-content { position: relative; z-index: 1; max-width: 760px; }

.eyebrow {
  color: #93f0a3;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 12px;
}

.eyebrow.compact { color: var(--brand); margin-bottom: 8px; }

.promo-hero h1 {
  margin: 12px 0 0;
  max-width: 760px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.93;
  font-weight: 950;
  letter-spacing: -0.075em;
}

.hero-description {
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(17px, 2.2vw, 22px);
  line-height: 1.45;
  max-width: 670px;
}

.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.hero-badges span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.12);
  font-size: 14px;
  font-weight: 800;
}

.hero-badges i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9cff7c;
  box-shadow: 0 0 0 6px rgba(156, 255, 124, 0.12);
}

.promo-card {
  position: relative;
  z-index: 1;
  justify-self: end;
  width: min(100%, 360px);
  min-height: 210px;
  border-radius: 28px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(14px);
}

.promo-card-line {
  width: 66%;
  height: 14px;
  border-radius: 999px;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.26);
}

.promo-card-line.wide { width: 92%; }

.promo-card-status {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.90);
  color: var(--brand-dark);
  font-weight: 900;
}

.promo-card-status span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 8px rgba(33, 160, 56, 0.16);
}

.panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 26px;
}

.login-panel { max-width: 720px; }
.login-header { display: flex; gap: 16px; align-items: flex-start; }
.login-header h2, .panel h2 { margin: 0; font-size: 24px; letter-spacing: -0.03em; }
.login-header p { margin: 8px 0 0; color: var(--muted); }
.lock-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--brand);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px rgba(33, 160, 56, 0.12);
}
.login-form { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin-top: 20px; }

.status-layout { margin-top: 0; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 26px;
  align-items: center;
  border-left: 6px solid var(--unknown);
}
.hero.up { border-left-color: var(--up); }
.hero.down { border-left-color: var(--down); }
.hero.degraded { border-left-color: var(--degraded); }
.hero.maintenance { border-left-color: var(--maintenance); }
.hero h2 { margin: 14px 0 8px; font-size: clamp(26px, 4vw, 40px); line-height: 1.05; letter-spacing: -0.05em; }

.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 9px 13px;
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.status-badge.up { color: #087236; background: #e7f8eb; }
.status-badge.down { color: #b42318; background: #fff1f0; }
.status-badge.degraded { color: #8a5300; background: #fff6db; }
.status-badge.maintenance { color: #1d4ed8; background: #eff6ff; }
.status-badge.unknown { color: #475569; background: #f1f5f9; }

.hero-stats { display: grid; grid-template-columns: repeat(3, minmax(118px, 1fr)); gap: 14px; }
.stat-card {
  min-width: 130px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, #f8fffa, #edf8ef);
  border: 1px solid #d9ebdc;
}
.stat-value { display: block; font-size: 31px; font-weight: 950; letter-spacing: -0.05em; color: var(--brand-dark); }
.stat-label { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; font-weight: 750; }

.notice-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 18px; }

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 34px 0 18px;
}
.section-heading h2 { margin: 0; font-size: clamp(27px, 4vw, 42px); letter-spacing: -0.055em; }
.section-heading p { margin: 8px 0 0; }

.groups { display: grid; gap: 18px; }
.group-card { padding: 0; overflow: hidden; }
.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 24px 26px;
  border-bottom: 1px solid var(--border);
}
.panel-title-row h2 { margin: 0; }
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 11px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 900;
}
.pill.danger { background: #fff1f0; color: #b42318; }
.pill.warning { background: #fff6db; color: #8a5300; }

.monitor-list { display: grid; }
.monitor-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 18px 26px;
  border-bottom: 1px solid #edf3ee;
  transition: background .16s ease;
}
.monitor-row:last-child { border-bottom: 0; }
.monitor-row:hover { background: #fbfffc; }
.monitor-main { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.monitor-main h3 { margin: 0; font-size: 17px; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.monitor-message { margin: 7px 0 0; color: var(--muted); }
.dot {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--unknown);
  box-shadow: 0 0 0 7px rgba(100, 116, 139, 0.10);
}
.dot.up { background: var(--up); box-shadow: 0 0 0 7px rgba(23, 155, 73, 0.12); }
.dot.down { background: var(--down); box-shadow: 0 0 0 7px rgba(217, 45, 32, 0.12); }
.dot.pending { background: var(--pending); box-shadow: 0 0 0 7px rgba(183, 110, 0, 0.12); }
.dot.maintenance { background: var(--maintenance); box-shadow: 0 0 0 7px rgba(37, 99, 235, 0.12); }
.monitor-meta { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; color: var(--muted); font-weight: 800; }
.monitor-meta > span:not(.monitor-status) {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 11px;
  background: #fbfffc;
}
.monitor-status {
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 950;
}
.monitor-status.up { color: #087236; background: #e7f8eb; }
.monitor-status.down { color: #b42318; background: #fff1f0; }
.monitor-status.pending { color: #8a5300; background: #fff6db; }
.monitor-status.maintenance { color: #1d4ed8; background: #eff6ff; }
.monitor-status.unknown { color: #475569; background: #f1f5f9; }

.alert-panel, .maintenance-panel { border-left: 6px solid var(--pending); }
.alert-panel h3, .maintenance-item h3 { margin: 0 0 8px; }
.maintenance-list { display: grid; gap: 12px; padding: 0 26px 24px; }
.maintenance-item {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fbfffc;
}

.error-box {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid #fecaca;
  background: #fff1f0;
  color: #b42318;
  font-weight: 800;
}

.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.empty-state { color: var(--muted); }

@media (max-width: 880px) {
  .site-header-inner { height: auto; padding: 14px 0; align-items: flex-start; flex-wrap: wrap; }
  .main-nav { order: 3; width: 100%; overflow-x: auto; justify-content: flex-start; }
  .promo-hero { grid-template-columns: 1fr; }
  .promo-card { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .monitor-row { grid-template-columns: 1fr; }
  .monitor-meta { justify-content: flex-start; }
  .section-heading { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 620px) {
  .app-shell, .site-header-inner { width: min(100% - 24px, 1180px); }
  .promo-hero { padding: 28px 22px; border-radius: 26px; }
  .hero-stats { grid-template-columns: 1fr; }
  .login-form { grid-template-columns: 1fr; }
  .panel { border-radius: 22px; padding: 20px; }
  .panel-title-row { padding: 20px; }
  .monitor-row { padding: 16px 20px; }
}
