/* ============================================================
   STATUS PAGE — status.css
   ============================================================ */

/* ===== HERO BANNER ===== */
.status-hero {
  position: relative;
  border-radius: var(--r3);
  overflow: hidden;
  margin-bottom: 16px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.status-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: #051a0c;
}

.status-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,20,8,.92) 0%, rgba(5,40,18,.80) 60%, rgba(0,15,5,.70) 100%);
  z-index: 1;
}

.status-hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 16px;
}

.status-hero-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.status-hero-icon {
  width: 44px;
  height: 44px;
  background: rgba(34,197,94,.15);
  border: 1px solid rgba(34,197,94,.3);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.status-hero-icon i {
  font-size: 20px;
  color: #22c55e;
}

.status-hero-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 4px;
  line-height: 1.2;
}

.status-hero-sub {
  font-size: .75rem;
  color: rgba(255,255,255,.65);
  margin: 0;
  line-height: 1.4;
  max-width: 360px;
}

.status-hero-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  font-size: .75rem;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  text-decoration: none;
  transition: background .2s, border-color .2s;
}

.status-hero-btn:hover {
  background: rgba(34,197,94,.15);
  border-color: rgba(34,197,94,.4);
  color: #22c55e;
}

/* Stats bar bawah hero */
.status-hero-stats {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 12px 24px;
  border-top: 1px solid rgba(255,255,255,.07);
  background: rgba(0,0,0,.2);
}

.status-hero-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 0 20px 0 0;
}

.status-hero-stat:first-child {
  padding-left: 0;
}

.status-hero-stat-num {
  font-size: 1rem;
  font-weight: 800;
  color: #22c55e;
  line-height: 1;
}

.status-hero-stat-label {
  font-size: .68rem;
  color: rgba(255,255,255,.45);
  font-weight: 500;
}

.status-hero-stat-divider {
  width: 1px;
  height: 28px;
  background: rgba(255,255,255,.1);
  margin: 0 20px 0 0;
  flex-shrink: 0;
}

/* ===== PAGE WRAPPER ===== */
.status-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 0 60px;
}

/* ===== All Systems Operational banner ===== */
.status-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 32px;
  background: #16a34a;
  color: #fff;
}

.status-banner.degraded {
  background: #b45309;
}

.status-banner.outage {
  background: #b91c1c;
}

.status-banner i {
  font-size: 16px;
}

/* ===== Service List ===== */
.status-service-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ===== Single service item ===== */
.status-item {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 14px 0 8px;
}

.status-item:last-child {
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* ===== Service header row ===== */
.status-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.status-item-name {
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: default;
}

.status-item-name.has-children {
  cursor: pointer;
  user-select: none;
}

.status-item-name .expand-icon {
  font-size: 10px;
  color: #888;
  transition: transform 0.2s ease;
  display: inline-flex;
}

.status-item-name.has-children.open .expand-icon {
  transform: rotate(90deg);
}

.status-item-badge {
  font-size: 11px;
  font-weight: 600;
  color: #22c55e;
  letter-spacing: 0.02em;
}

.status-item-badge.degraded {
  color: #f59e0b;
}

.status-item-badge.outage {
  color: #ef4444;
}

.status-item-badge.partial {
  color: #fb923c;
}

.status-item-badge.dev {
  color: #60a5fa;
}

/* ===== Uptime bar row ===== */
.status-bar-row {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 30px;
  margin-bottom: 4px;
}

.status-bar-segment {
  flex: 1;
  height: 100%;
  border-radius: 2px;
  background: #16a34a;
  min-width: 2px;
  transition: opacity 0.15s;
  cursor: default;
  position: relative;
}

.status-bar-segment:hover {
  opacity: 0.75;
}

.status-bar-segment.incident {
  background: #ef4444;
}

.status-bar-segment.degraded-seg {
  background: #f59e0b;
}

.status-bar-segment.no-data {
  background: rgba(255,255,255,0.1);
}

/* ===== Bar labels ===== */
.status-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #555;
  margin-bottom: 2px;
}

/* ===== Children (sub-services) ===== */
.status-children {
  display: none;
  padding-left: 18px;
  border-left: 2px solid rgba(255,255,255,.06);
  margin-top: 6px;
  margin-left: 2px;
}

.status-children.open {
  display: block;
}

.status-children .status-item {
  border-top: 1px solid rgba(255,255,255,.04);
  padding: 10px 0 6px;
}

.status-children .status-item:last-child {
  border-bottom: none;
}

.status-children .status-item-name {
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
}

/* ===== Tooltip (dikelola via JS global element) ===== */
#status-tooltip {
  position: fixed;
  z-index: 9999;
  background: #1e2433;
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,.12);
  pointer-events: none;
  display: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.5);
  line-height: 1.4;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .status-hero-inner {
    flex-direction: column;
    gap: 12px;
    padding: 20px 16px 12px;
  }

  .status-hero-btn {
    align-self: flex-start;
  }

  .status-hero-stats {
    padding: 10px 16px;
    gap: 0;
  }

  .status-hero-stat {
    padding-right: 14px;
  }

  .status-hero-stat-divider {
    margin-right: 14px;
  }

  .status-hero-stat-num {
    font-size: .9rem;
  }
}

@media (max-width: 480px) {
  .status-hero {
    min-height: 150px;
  }

  .status-hero-title {
    font-size: .95rem;
  }

  .status-hero-sub {
    font-size: .7rem;
  }

  .status-hero-icon {
    width: 36px;
    height: 36px;
  }

  .status-hero-icon i {
    font-size: 16px;
  }

  .status-page {
    padding: 16px 0 40px;
  }

  .status-bar-segment {
    border-radius: 1px;
  }
}