:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #101311;
  color: #eef4ed;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 12% 0%, rgba(86, 147, 103, .14), transparent 35rem), #101311; }
button { font: inherit; cursor: pointer; }
.shell { max-width: 900px; margin: 0 auto; padding: 48px 24px 72px; }
.topbar, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.topbar { margin-bottom: 30px; }
h1, h2, p { margin: 0; }
h1 { margin-top: 6px; font-size: clamp(2rem, 5vw, 2.8rem); letter-spacing: -.05em; }
h2 { font-size: 1.1rem; letter-spacing: -.02em; }
.eyebrow { color: #86c28f; font-size: .7rem; font-weight: 750; letter-spacing: .16em; }
.subtitle, .section-heading p { margin-top: 7px; color: #9aa79d; font-size: .88rem; }
.panel { overflow: hidden; margin-top: 18px; border: 1px solid #29312c; border-radius: 15px; background: rgba(24, 29, 25, .94); box-shadow: 0 18px 50px #0002; }
.section-heading { padding: 20px 22px; border-bottom: 1px solid #29312c; }
.section-heading p { font-size: .82rem; }
.status { display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; border: 1px solid #303a33; border-radius: 999px; color: #a1aca4; font-size: .8rem; }
.status::before { width: 8px; height: 8px; border-radius: 50%; background: #707a72; content: ""; }
.status.online { border-color: #35523a; color: #a4dfa9; }
.status.online::before { background: #7ed28a; box-shadow: 0 0 10px #7ed28a88; }
.credential-list { display: grid; gap: 10px; padding: 18px 22px; }
.credential-item { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px; border: 1px solid #303a33; border-radius: 9px; background: #111612; }
.credential-item > div { min-width: 0; flex: 1; }
.credential-label, .metric-label { display: block; margin-bottom: 7px; color: #8e9b91; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
code { display: block; overflow-wrap: anywhere; color: #c8d8ca; font: .8rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; user-select: all; }
.secondary { flex: 0 0 auto; padding: 8px 11px; border: 1px solid #374139; border-radius: 8px; background: #202721; color: #d3ded5; font-size: .8rem; }
.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; padding: 18px 22px 22px; }
.metric-item { min-width: 0; padding: 13px; border: 1px solid #303a33; border-radius: 9px; background: #111612; }
.metric-item strong { display: block; overflow-wrap: anywhere; color: #dce8dd; font-size: .92rem; }
.guide { display: grid; gap: 14px; margin: 0; padding: 22px 26px 8px 46px; color: #c5d0c7; font-size: .88rem; line-height: 1.6; }
.guide li { padding-left: 4px; }
.guide strong { color: #e5eee6; }
.guide-note { padding: 12px 22px 22px; color: #9aa79d; font-size: .83rem; line-height: 1.55; }
.guide-section { padding: 20px 22px; border-bottom: 1px solid #29312c; }
.guide-section:last-child { border-bottom: 0; }
.guide-section h3 { margin: 0; color: #e5eee6; font-size: .98rem; }
.guide-section .guide { padding: 16px 0 0 22px; }
.guide-section .guide-note { margin: 12px 0 0; padding: 12px 14px; border: 1px solid #43583f; border-radius: 8px; background: #111612; }
.troubleshooting .guide { list-style: disc; }
.event-list { border-top: 0; }
.event-item { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding: 15px 22px; border-bottom: 1px solid #29312c; color: #c8d2ca; font-size: .84rem; line-height: 1.5; }
.event-item:last-child { border-bottom: 0; }
.event-item time { flex: 0 0 auto; color: #849087; font-size: .75rem; }
.empty { padding: 24px; color: #8d9990; text-align: center; }
.notice { margin: 0 22px 18px; padding: 12px 14px; border: 1px solid #43583f; border-radius: 8px; color: #c4e7c7; font-size: .84rem; }
.notice.error { border-color: #704141; color: #f0b3b3; }
.login-panel { max-width: 480px; margin: 8vh auto 0; }
#portal-login-form { display: grid; gap: 10px; padding: 22px; }
#portal-login-form label { margin-top: 6px; color: #c8d2ca; font-size: .84rem; }
#portal-login-form input { width: 100%; padding: 11px 12px; border: 1px solid #374139; border-radius: 8px; background: #111612; color: #eef4ed; font: inherit; }
#portal-login-form input:focus { outline: 2px solid #86c28f; outline-offset: 1px; }
.primary { padding: 10px 14px; border: 1px solid #5b9664; border-radius: 8px; background: #315b38; color: #eff8ef; font-weight: 650; }
.portal-actions { display: flex; align-items: center; gap: 10px; }
@media (max-width: 600px) {
  .shell { padding: 28px 14px 52px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .portal-actions { width: 100%; justify-content: space-between; }
  .event-item { flex-direction: column; gap: 5px; }
  .event-item time { order: -1; }
  .credential-item { align-items: flex-start; }
}
