@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Source+Serif+4:wght@400;600&display=swap');

:root {
  --bg: #0f1318;
  --bg-alt: #141b22;
  --ink: #f5f7fb;
  --muted: #9aa7b3;
  --accent: #3ee6c8;
  --accent-2: #ffb65e;
  --danger: #ff6b6b;
  --card: rgba(23, 29, 37, 0.82);
  --glass: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, #1d2733 0%, #0f1318 50%, #0b0f13 100%);
  min-height: 100vh;
}

a {
  color: var(--accent);
}

a.muted {
  color: var(--muted);
  text-decoration: none;
}

body.admin-body {
  background: radial-gradient(circle at 20% 20%, #1d2230 0%, #0f1318 60%, #0b0f13 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px 60px;
}

.bg-orb {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.3;
  z-index: 0;
}

.orb-1 {
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  top: -140px;
  left: -120px;
}

.orb-2 {
  background: radial-gradient(circle, var(--accent-2) 0%, transparent 70%);
  bottom: -160px;
  right: -120px;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(var(--glass) 1px, transparent 1px),
    linear-gradient(90deg, var(--glass) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.2;
  pointer-events: none;
  z-index: 0;
}

.hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  padding: 56px 7vw 24px;
}

.hero-left {
  max-width: 520px;
}

.hero-left h1 {
  font-size: clamp(2.2rem, 3vw, 3.4rem);
  margin: 12px 0 12px;
  font-family: 'Source Serif 4', serif;
  letter-spacing: 0.4px;
}

.hero-left p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  letter-spacing: 1.2px;
}

.status-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px 24px;
  box-shadow: var(--shadow);
  min-width: 260px;
}

.status-card.status-ok {
  border-color: rgba(62, 230, 200, 0.5);
}

.status-card.status-bad {
  border-color: rgba(255, 107, 107, 0.5);
}

.status-card.status-maint {
  border-color: rgba(255, 182, 94, 0.5);
}

.status-card.status-unknown {
  border-color: rgba(255, 255, 255, 0.2);
}

.status-label {
  font-size: 1.2rem;
  font-weight: 600;
}

.status-meta {
  color: var(--muted);
  margin-top: 6px;
  font-size: 0.9rem;
}

main {
  position: relative;
  z-index: 1;
  padding: 24px 7vw 80px;
}

.section {
  margin-top: 48px;
}

.section-title {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 24px;
}

.section-title.inline {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.section-title h2 {
  margin: 0;
  font-size: 1.6rem;
}

.section-title p {
  margin: 0;
  color: var(--muted);
}

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

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.service-card h3 {
  margin: 0 0 6px;
}

.service-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.service-message {
  margin: 12px 0 8px;
  font-size: 0.95rem;
}

.service-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--muted);
}

.uptime-block {
  display: flex;
  gap: 24px;
  margin: 16px 0 12px;
}

.uptime-label {
  color: var(--muted);
  font-size: 0.8rem;
}

.uptime-value {
  font-size: 1.2rem;
  font-weight: 600;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(6px, 1fr));
  gap: 4px;
  margin-top: 8px;
}

.timeline-bar {
  height: 14px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  cursor: help;
}

.timeline-bar.ok {
  background: rgba(62, 230, 200, 0.8);
}

.timeline-bar.bad {
  background: rgba(255, 107, 107, 0.8);
}

.incident {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 16px;
}

.incident:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.incident-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.notes {
  margin: 12px 0 0;
  padding-left: 16px;
  color: var(--muted);
}

.notes li {
  margin-bottom: 6px;
}

.attachments {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.attachment {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  text-decoration: none;
}

.attachment:hover {
  border-color: rgba(62, 230, 200, 0.6);
}

.form {
  display: grid;
  gap: 12px;
}

.form.inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.form-row {
  display: grid;
  gap: 6px;
}

input,
select,
textarea {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(10, 14, 18, 0.8);
  color: var(--ink);
  font-family: inherit;
}

textarea {
  resize: vertical;
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  background: var(--accent);
  color: #0c1216;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(62, 230, 200, 0.3);
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.08);
}

.pill-ok {
  background: rgba(62, 230, 200, 0.2);
  border-color: rgba(62, 230, 200, 0.6);
}

.pill-bad {
  background: rgba(255, 107, 107, 0.2);
  border-color: rgba(255, 107, 107, 0.6);
}

.pill-warn {
  background: rgba(255, 182, 94, 0.2);
  border-color: rgba(255, 182, 94, 0.6);
}

.pill-unknown {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.muted {
  color: var(--muted);
}

.mono {
  font-variant-numeric: tabular-nums;
}

.footer {
  padding: 24px 7vw 40px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.login-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  width: min(420px, 90vw);
  box-shadow: var(--shadow);
}

.code-table {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  margin: 12px 0 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 600;
  letter-spacing: 2px;
  text-align: center;
}

.alert {
  background: rgba(255, 107, 107, 0.2);
  border: 1px solid rgba(255, 107, 107, 0.6);
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 12px;
}

.admin-header {
  width: min(1100px, 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.admin-grid {
  width: min(1100px, 100%);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.card.full {
  grid-column: 1 / -1;
}

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

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

.bug-grid {
  display: grid;
  gap: 16px;
}

.bug-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.bug-item.bug-fixed {
  opacity: 0.7;
}

.bug-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.collapsible {
  display: none;
}

.collapsible.open {
  display: block;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.6s ease forwards;
  animation-delay: var(--delay, 0s);
}

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

@media (max-width: 768px) {
  .hero {
    padding-top: 40px;
  }

  .section-title.inline {
    flex-direction: column;
    align-items: flex-start;
  }

  .form.inline {
    flex-direction: column;
    align-items: stretch;
  }
}
