/* =========================================================
  DrCastiel Dashboard — glass + purple vibe
  ========================================================= */

:root{
  --bg0:#07070b;
  --bg1:#0b0b12;
  --card: rgba(255,255,255,0.06);
  --card2: rgba(255,255,255,0.09);
  --stroke: rgba(255,255,255,0.12);
  --text:#e9e9f4;
  --muted:rgba(233,233,244,0.72);
  --accent:#8b5cf6;
  --accent-soft:#6d3ef1;
  --good:#39d98a;
  --warn:#ffcc66;
  --bad:#ff5c7a;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: var(--sans);
  color: var(--text);
  background: #07070b;
  overflow-x:hidden;
}

.bg{ position:fixed; inset:0; pointer-events:none; overflow:hidden; }
.glow{
  position:absolute;
  width: 720px; height: 720px;
  border-radius: 999px;
  filter: blur(56px);
  opacity: .34;
  background: radial-gradient(circle at 30% 30%, rgba(139,92,246,.55), rgba(139,92,246,0) 70%);
}
.glow-a{ left:-220px; top:-240px; }

.wrap{ width:min(1100px, 92vw); margin: 0 auto; padding: 92px 0 48px; }
.topbar{
  position:sticky; top:0; z-index:20;
  backdrop-filter: blur(16px);
  background: linear-gradient(180deg, rgba(10,10,16,0.82), rgba(10,10,16,0.52));
  border-bottom: none;
  box-shadow: 0 10px 22px rgba(0,0,0,0.18);
  display:flex; align-items:center; justify-content:space-between;
  padding: 14px 16px;
}
.brand{ display:flex; gap:12px; align-items:center; }
.logo{
  width:40px; height:40px; border-radius: 14px;
  display:grid; place-items:center;
  font-weight:800;
  color:#0b0b12;
  background: linear-gradient(135deg, rgba(139,92,246,1), rgba(109,62,241,0.65));
  box-shadow: 0 8px 26px rgba(109,62,241,0.30);
}
.brand-text .title{ font-weight:800; letter-spacing:.4px; }
.brand-text .subtitle{ font-size:12px; color: var(--muted); margin-top:2px; }

.nav{ display:flex; gap:14px; align-items:center; }
.navlink{
  color: var(--muted);
  text-decoration:none;
  font-weight:600;
  font-size:13px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
}
.navlink:hover{
  color: var(--text);
  border-color: rgba(139,92,246,0.30);
  background: rgba(109,62,241,0.12);
}

.actions{ display:flex; gap:10px; align-items:center; }
.btn{
  background: rgba(109,62,241,0.16);
  border: 1px solid rgba(139,92,246,0.35);
  color: var(--text);
  border-radius: 14px;
  padding: 9px 12px;
  font-weight:700;
  cursor:pointer;
}
.btn:hover{ background: rgba(109,62,241,0.24); }
.meta{ font-size:12px; color: var(--muted); }

.hero{
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 18px;
  margin-top: 18px;
}
.hero h1{
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.05;
}
.accent{ color: var(--accent); text-shadow: 0 0 22px rgba(139,92,246,0.28); }
.lede{ margin: 0 0 16px; color: var(--muted); max-width: 52ch; }

.quicklinks{ display:flex; flex-wrap:wrap; gap:10px; }
.pill{
  text-decoration:none;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  padding: 9px 12px;
  border-radius: 999px;
  font-weight:700;
  font-size:13px;
}
.pill:hover{ border-color: rgba(139,92,246,0.32); background: rgba(109,62,241,0.14); }

.section{ margin-top: 26px; }
.section-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom: 12px; }
.section-head h2{ margin:0; font-size: 18px; }
.section-head p{ margin:0; color: var(--muted); font-size: 13px; }

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

.card{
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.04));
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 26px rgba(0,0,0,0.22);
  padding: 14px 14px;
}
.card.big{ padding: 16px 16px; }
.card.link{ text-decoration:none; color: var(--text); }
.card.link:hover{ border-color: rgba(139,92,246,0.30); background: rgba(109,62,241,0.12); }
.service-footer{
  margin-top:12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.uptime-inline{
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}

.card-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom: 10px; }
.card-title{ font-weight:800; letter-spacing:.2px; }
.card-subtitle{ font-size: 12px; color: var(--muted); margin-top: 3px; }
.badge{
  font-size:12px;
  font-weight:800;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.05);
}

.metrics{ grid-template-columns: repeat(3, 1fr); }
.metric, .mini{
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  padding: 10px 10px;
}
.label{ font-size: 12px; color: var(--muted); }
.value{ margin-top: 4px; font-size: 15px; font-weight: 800; }
.metric-foot{
  margin-top: 6px;
  display:flex;
  justify-content:flex-end;
  font-size: 12px;
}
.progress{
  margin-top: 8px;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.08);
}
.progress-fill{
  display:block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  transition: width .25s ease, background-color .25s ease;
}
/* Color-coded progress bars based on health */
.progress-fill.good{
  background: linear-gradient(90deg, #39d98a, #2db87e);
}
.progress-fill.warn{
  background: linear-gradient(90deg, #ffcc66, #ffc93f);
}
.progress-fill.bad{
  background: linear-gradient(90deg, #ff5c7a, #ff3f52);
}
.mono{ font-family: var(--mono); letter-spacing: .2px; }
.row{ display:flex; gap: 12px; }
.row .mini{ flex: 1; }

.divider{
  height:1px; background: rgba(255,255,255,0.10);
  margin: 12px 0;
}

.hint{ margin-top: 10px; font-size: 12px; color: var(--muted); }
.hint code{
  font-family: var(--mono);
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 2px 6px;
  border-radius: 10px;
  color: rgba(233,233,244,0.88);
}

.footer{
  margin-top: 36px;
  display:flex; justify-content:center; gap:10px;
  font-size: 12px;
  color: var(--muted);
  padding-bottom: 16px;
}
.dot{ opacity:.55; }

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

/* Status colors */
.good{ color: var(--good); }
.warn{ color: var(--warn); }
.bad{ color: var(--bad); }

/* Card sizing */
.span-4{ grid-column: span 4; }
.span-6{ grid-column: span 6; }
.span-12{ grid-column: span 12; }

/* Responsive */
@media (max-width: 980px){
  .hero{ grid-template-columns: 1fr; }
  .metrics{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px){
  .nav{ display:none; }
  .metrics{ grid-template-columns: 1fr; }
  .row{ flex-direction: column; }
  .wrap{ padding-top: 86px; }
}
