:root{
  --bg:#f4f6fa;
  --surface:#ffffff;
  --border:#e2e8f0;
  --text:#0f172a;
  --text-muted:#64748b;
  --text-faint:#94a3b8;
  --cyan:#22a4dc;
  --cyan-bg:#e0f2fe;
  --green:#10b981;
  --green-bg:#d1fae5;
  --orange:#f59e0b;
  --orange-bg:#fef3c7;
  --purple:#8b5cf6;
  --purple-bg:#ede9fe;
  --red:#ef4444;
  --red-bg:#fee2e2;
}

*{ box-sizing:border-box; }

html,body{
  margin:0;
  padding:0;
  background:var(--bg);
  color:var(--text);
  font-family:'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  background-image:
    linear-gradient(rgba(15,23,42,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  min-height:100vh;
}

a{ text-decoration:none; color:inherit; }
svg{ display:block; }

/* ---------- Header ---------- */
header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 32px;
  background:var(--surface);
  border-bottom:1px solid var(--border);
}

.brand{ display:flex; align-items:center; gap:12px; }
.brand-badge{ width:34px; height:34px; flex-shrink:0; }

.brand-text .name{
  font-size:15px;
  font-weight:700;
  letter-spacing:0.5px;
  line-height:1.2;
}

.brand-text .tagline{
  font-size:11px;
  color:var(--text-muted);
  letter-spacing:0.3px;
}

.header-right{
  display:flex;
  align-items:center;
  gap:18px;
  font-size:12px;
  color:var(--text-muted);
}

.status-ok{
  display:flex;
  align-items:center;
  gap:6px;
  color:var(--green);
  font-weight:600;
  letter-spacing:0.5px;
}

.header-clock{ display:flex; align-items:center; gap:6px; }
.divider-v{ width:1px; height:16px; background:var(--border); }

.sign-out{
  display:flex;
  align-items:center;
  gap:6px;
  color:var(--text-muted);
  letter-spacing:0.5px;
  cursor:pointer;
  background:none;
  border:none;
  font-family:inherit;
  font-size:12px;
  padding:0;
}

.sign-out:hover{ color:var(--text); }

.icon-btn{
  width:16px;
  height:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--text-muted);
  cursor:pointer;
}

/* ---------- Layout ---------- */
main{
  max-width:1400px;
  margin:0 auto;
  padding:40px 32px;
}

.crumbs{
  font-size:11px;
  color:var(--text-faint);
  letter-spacing:0.4px;
  margin-bottom:20px;
}

.crumbs a:hover{ color:var(--text); }

footer{
  max-width:1400px;
  margin:40px auto 0;
  padding:20px 32px 40px;
  border-top:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:11px;
  color:var(--text-faint);
  letter-spacing:0.4px;
}

.session-tag{
  color:var(--text);
  background:#eef2f7;
  padding:2px 8px;
  border-radius:6px;
  font-weight:600;
}

/* ---------- Shared components ---------- */
.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 14px;
  border-radius:999px;
  font-size:11px;
  font-weight:600;
  letter-spacing:0.6px;
}

.pill-online{
  background:var(--cyan-bg);
  color:#0369a1;
  border:1px solid #bae6fd;
}

.pill-online .dot{ width:6px; height:6px; border-radius:50%; background:var(--cyan); }

.badge{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:4px 10px;
  border-radius:999px;
  font-size:10px;
  font-weight:700;
  letter-spacing:0.6px;
  white-space:nowrap;
}

.badge-cyan{ background:var(--cyan-bg); color:#0369a1; }
.badge-green{ background:var(--green-bg); color:#047857; }
.badge-orange{ background:var(--orange-bg); color:#b45309; }
.badge-purple{ background:var(--purple-bg); color:#6d28d9; }

.dot-pulse{
  width:8px;
  height:8px;
  border-radius:50%;
  background:var(--green);
  display:inline-block;
  margin-right:8px;
  animation:pulse 1.6s ease-in-out infinite;
}

@keyframes pulse{
  0%,100%{ opacity:1; }
  50%{ opacity:0.3; }
}

.btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  background:var(--green);
  color:#ffffff;
  border:none;
  border-radius:10px;
  padding:12px 26px;
  font-family:inherit;
  font-size:12px;
  font-weight:700;
  letter-spacing:0.8px;
  cursor:pointer;
  transition:background .15s ease;
}

.btn:hover{ background:#0d9668; }
.btn:disabled{ background:var(--text-faint); cursor:default; }

.alert{
  font-size:11.5px;
  padding:10px 14px;
  border-radius:8px;
  margin-bottom:16px;
}

.alert-error{ background:var(--red-bg); color:#b91c1c; border:1px solid #fecaca; }
.alert-info{ background:var(--cyan-bg); color:#0369a1; border:1px solid #bae6fd; }

@media (max-width: 600px){
  header{ flex-wrap:wrap; gap:12px; }
}
