/* ────────────────────────────────────────────────────────
   Xyrom OS — Status Page Styles (Production)
   ──────────────────────────────────────────────────────── */

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

body {
  font-family: 'Inter', 'Geist', system-ui, -apple-system, sans-serif;
  background: #0A0A0F;
  color: #F1F5F9;
  min-height: 100vh;
  line-height: 1.5;
}

a { color: #0078FF; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ─────────────────────────────────────────────── */
.page-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid #2A2A3A;
  margin-bottom: 2rem;
}

.header-brand { display: flex; align-items: center; gap: .6rem; }
.brand-mark {
  width: 34px; height: 34px;
  background: #0078FF;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 900; color: #fff;
}
.brand-name { font-size: 1rem; font-weight: 700; color: #F1F5F9; }
.brand-sub  { font-size: .7rem; color: #64748B; margin-top: 1px; }

.header-nav { display: flex; gap: .75rem; align-items: center; }
.nav-link {
  font-size: .8rem; color: #94A3B8; padding: .35rem .7rem;
  border-radius: 6px; transition: all .15s;
}
.nav-link:hover { background: #13131A; color: #F1F5F9; text-decoration: none; }

/* ── Auto-refresh bar ───────────────────────────────────── */
.refresh-bar {
  display: flex; align-items: center; gap: .5rem;
  font-size: .75rem; color: #64748B; padding: .5rem 0; margin-bottom: 1.5rem;
}
.refresh-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #22C55E;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }
.refresh-bar span { margin-left: auto; }

/* ── Overall status banner ──────────────────────────────── */
.status-banner {
  display: flex; align-items: center; gap: 1.25rem;
  padding: 1.5rem 1.75rem;
  border-radius: 12px;
  margin-bottom: 2.5rem;
  transition: all .3s;
}
.status-banner.operational {
  background: rgba(34,197,94,.07);
  border: 1px solid rgba(34,197,94,.25);
}
.status-banner.degraded {
  background: rgba(245,158,11,.07);
  border: 1px solid rgba(245,158,11,.3);
}
.status-banner.outage {
  background: rgba(239,68,68,.07);
  border: 1px solid rgba(239,68,68,.3);
}

.banner-icon { font-size: 2.25rem; flex-shrink: 0; }
.banner-title { font-size: 1.3rem; font-weight: 700; color: #F1F5F9; }
.banner-sub   { font-size: .85rem; color: #94A3B8; margin-top: .2rem; }

.banner-right { margin-left: auto; text-align: right; }
.banner-updated { font-size: .75rem; color: #64748B; }

/* ── Sections ───────────────────────────────────────────── */
.section { margin-bottom: 3rem; }
.section-heading {
  font-size: .75rem; font-weight: 700;
  color: #64748B;
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 1rem;
  display: flex; align-items: center; gap: .5rem;
}
.section-heading::after {
  content: ''; flex: 1; height: 1px; background: #2A2A3A;
}

/* ── Service items ──────────────────────────────────────── */
.services-list { display: flex; flex-direction: column; gap: .5rem; }

.service-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #13131A;
  border: 1px solid #2A2A3A;
  border-radius: 10px;
  transition: border-color .15s;
  cursor: pointer;
}
.service-item:hover { border-color: #3A3A4A; }
.service-item.expanded { border-color: #0078FF; }

.service-left {}
.service-name { font-weight: 600; color: #F1F5F9; font-size: .9rem; }
.service-desc { font-size: .78rem; color: #64748B; margin-top: .2rem; }

.service-response {
  font-size: .75rem; color: #64748B;
  text-align: right; white-space: nowrap;
}
.service-response strong { color: #94A3B8; }

.status-pill {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .25rem .7rem; border-radius: 99px;
  font-size: .72rem; font-weight: 600; white-space: nowrap;
}
.status-pill.operational { background: rgba(34,197,94,.12); color: #22C55E; }
.status-pill.degraded    { background: rgba(245,158,11,.12); color: #F59E0B; }
.status-pill.outage      { background: rgba(239,68,68,.12);  color: #EF4444; }
.status-pill.maintenance { background: rgba(96,165,250,.12); color: #60A5FA; }

.status-pill::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}

/* Service expand details */
.service-details {
  display: none;
  padding: 1rem 1.25rem;
  background: #0D0D14;
  border: 1px solid #2A2A3A;
  border-top: none;
  border-radius: 0 0 10px 10px;
  margin-top: -6px;
}
.service-details.open { display: block; }
.service-detail-row {
  display: flex; justify-content: space-between;
  font-size: .8rem; padding: .3rem 0;
  border-bottom: 1px solid #1C1C26;
  color: #94A3B8;
}
.service-detail-row:last-child { border: none; }
.service-detail-row strong { color: #F1F5F9; }

/* ── 90-day uptime calendar ─────────────────────────────── */
.uptime-rows { display: flex; flex-direction: column; gap: .875rem; }

.uptime-row { display: flex; align-items: center; gap: 1rem; }
.uptime-row-label {
  width: 200px; font-size: .82rem; color: #F1F5F9; flex-shrink: 0;
}
.uptime-row-label small { display: block; color: #64748B; font-size: .7rem; margin-top: 1px; }

.uptime-calendar {
  flex: 1; display: flex; gap: 2px; align-items: center;
}
.uptime-day {
  flex: 1; height: 28px; border-radius: 3px;
  cursor: default; transition: opacity .15s;
  min-width: 4px; max-width: 10px;
  position: relative;
}
.uptime-day:hover { opacity: .8; }
.uptime-day[title]:hover::after {
  content: attr(title);
  position: absolute; bottom: 130%; left: 50%; transform: translateX(-50%);
  background: #1C1C26; color: #F1F5F9; padding: .25rem .5rem;
  border-radius: 4px; font-size: .7rem; white-space: nowrap;
  pointer-events: none; z-index: 10;
}

.day-operational { background: #22C55E; }
.day-degraded    { background: #F59E0B; }
.day-outage      { background: #EF4444; }
.day-maintenance { background: #60A5FA; }
.day-no-data     { background: #2A2A3A; }

.uptime-pct {
  width: 52px; text-align: right;
  font-size: .78rem; font-weight: 600; color: #94A3B8;
}
.uptime-pct.perfect { color: #22C55E; }

.uptime-legend {
  display: flex; gap: 1.25rem; margin-top: 1rem;
  font-size: .72rem; color: #64748B;
  flex-wrap: wrap;
}
.legend-item { display: flex; align-items: center; gap: .35rem; }
.legend-dot  { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }

/* ── Active incident banner ─────────────────────────────── */
.active-incident-banner {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1rem 1.25rem;
  background: rgba(245,158,11,.07);
  border: 1px solid rgba(245,158,11,.3);
  border-radius: 10px;
  margin-bottom: 1rem;
}
.active-incident-banner .inc-icon { font-size: 1.25rem; flex-shrink: 0; padding-top: .1rem; }
.active-incident-banner .inc-title { font-weight: 600; color: #F59E0B; font-size: .9rem; }
.active-incident-banner .inc-body  { font-size: .82rem; color: #94A3B8; margin-top: .25rem; }
.active-incident-banner .inc-time  { font-size: .75rem; color: #64748B; margin-top: .35rem; }

/* ── Incident cards ─────────────────────────────────────── */
.incidents-container { display: flex; flex-direction: column; gap: .75rem; }

.incident-card {
  background: #13131A;
  border: 1px solid #2A2A3A;
  border-radius: 10px;
  overflow: hidden;
}
.incident-header {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1rem 1.25rem; cursor: pointer;
}
.incident-header:hover { background: #0D0D14; }

.inc-status-dot {
  width: 10px; height: 10px; border-radius: 50%;
  flex-shrink: 0; margin-top: .35rem;
}
.inc-status-dot.resolved    { background: #22C55E; }
.inc-status-dot.investigating { background: #F59E0B; animation: pulse 2s infinite; }
.inc-status-dot.identified  { background: #60A5FA; }
.inc-status-dot.monitoring  { background: #A78BFA; }

.inc-info { flex: 1; }
.inc-title-text { font-weight: 600; color: #F1F5F9; font-size: .9rem; }
.inc-severity {
  display: inline-block; margin-left: .5rem;
  font-size: .65rem; font-weight: 700; text-transform: uppercase;
  padding: .15rem .4rem; border-radius: 4px;
}
.inc-severity.minor    { background: rgba(148,163,184,.15); color: #94A3B8; }
.inc-severity.major    { background: rgba(245,158,11,.15);  color: #F59E0B; }
.inc-severity.critical { background: rgba(239,68,68,.15);   color: #EF4444; }

.inc-meta { font-size: .75rem; color: #64748B; margin-top: .3rem; }
.inc-toggle { font-size: .8rem; color: #64748B; flex-shrink: 0; margin-top: .2rem; }

.incident-timeline {
  display: none;
  padding: 0 1.25rem 1.25rem 2.5rem;
  border-top: 1px solid #1C1C26;
}
.incident-timeline.open { display: block; }

.timeline-update {
  position: relative; padding: .75rem 0 .75rem 1.25rem;
  border-left: 2px solid #2A2A3A;
}
.timeline-update::before {
  content: ''; position: absolute; left: -5px; top: 1rem;
  width: 8px; height: 8px; border-radius: 50%;
  background: #3A3A4A; border: 2px solid #2A2A3A;
}
.timeline-update:first-child::before { background: #0078FF; border-color: #0078FF; }
.timeline-status {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  color: #64748B; letter-spacing: .04em; margin-bottom: .2rem;
}
.timeline-message { font-size: .82rem; color: #94A3B8; }
.timeline-time    { font-size: .72rem; color: #475569; margin-top: .25rem; }

.no-incidents-msg {
  text-align: center; padding: 2.5rem;
  color: #64748B; font-size: .9rem;
}
.no-incidents-msg .emoji { font-size: 2rem; display: block; margin-bottom: .5rem; }

/* ── Maintenance ────────────────────────────────────────── */
.maintenance-card {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1rem 1.25rem;
  background: rgba(96,165,250,.06);
  border: 1px solid rgba(96,165,250,.2);
  border-radius: 10px; margin-bottom: .75rem;
}
.maint-icon { font-size: 1.25rem; flex-shrink: 0; }
.maint-title { font-weight: 600; color: #93C5FD; font-size: .9rem; }
.maint-time  { font-size: .78rem; color: #64748B; margin-top: .2rem; }
.maint-desc  { font-size: .82rem; color: #94A3B8; margin-top: .35rem; }

/* ── Subscribe ──────────────────────────────────────────── */
.subscribe-box {
  background: #13131A;
  border: 1px solid #2A2A3A;
  border-radius: 12px;
  padding: 1.75rem;
  display: flex; gap: 2rem; align-items: center;
  flex-wrap: wrap;
}
.subscribe-text h3 { font-size: 1rem; font-weight: 600; color: #F1F5F9; margin-bottom: .25rem; }
.subscribe-text p  { font-size: .82rem; color: #64748B; }
.subscribe-form {
  display: flex; gap: .5rem; flex: 1; min-width: 280px;
}
.subscribe-input {
  flex: 1; background: #0D0D14; border: 1px solid #2A2A3A;
  color: #F1F5F9; padding: .55rem .9rem; border-radius: 8px;
  font-size: .875rem; outline: none; font-family: inherit;
  transition: border-color .15s;
}
.subscribe-input:focus { border-color: #0078FF; }
.subscribe-input::placeholder { color: #475569; }
.subscribe-btn {
  background: #0078FF; color: #fff; border: none;
  padding: .55rem 1.1rem; border-radius: 8px;
  font-size: .875rem; font-weight: 600; cursor: pointer;
  white-space: nowrap; font-family: inherit; transition: background .15s;
}
.subscribe-btn:hover { background: #0065d9; }
.subscribe-btn:disabled { background: #2A2A3A; cursor: not-allowed; }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.5rem 0; border-top: 1px solid #2A2A3A;
  font-size: .78rem; color: #475569; flex-wrap: wrap; gap: .75rem;
}
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { color: #64748B; }
.footer-links a:hover { color: #94A3B8; text-decoration: none; }

/* ── Toast ──────────────────────────────────────────────── */
.toast-wrap {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  display: flex; flex-direction: column; gap: .5rem; z-index: 1000;
}
.toast {
  padding: .75rem 1.1rem; border-radius: 10px;
  font-size: .85rem; font-weight: 500;
  display: flex; align-items: center; gap: .6rem;
  animation: slideIn .25s ease; box-shadow: 0 4px 20px rgba(0,0,0,.4);
  max-width: 320px;
}
.toast.success { background: #14532D; border: 1px solid #22C55E; color: #86EFAC; }
.toast.error   { background: #450A0A; border: 1px solid #EF4444; color: #FCA5A5; }
.toast.info    { background: #0C1A3A; border: 1px solid #3B82F6; color: #93C5FD; }
@keyframes slideIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }

/* ── Loading skeleton ───────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #1C1C26 25%, #252535 50%, #1C1C26 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.sk-row  { height: 64px; margin-bottom: .5rem; }
.sk-text { height: 14px; width: 60%; margin-bottom: .4rem; }
.sk-short{ height: 14px; width: 30%; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .page-wrap { padding: 0 1rem 3rem; }
  .service-item { grid-template-columns: 1fr auto; }
  .service-response { display: none; }
  .uptime-row-label { width: 130px; font-size: .75rem; }
  .subscribe-box { flex-direction: column; gap: 1rem; }
  .subscribe-form { min-width: unset; width: 100%; }
  .banner-right { display: none; }
  .site-footer { flex-direction: column; text-align: center; }
}
