:root {
  color-scheme: dark;
  --bg: #09110f;
  --panel: rgba(16, 27, 24, .92);
  --line: #263b35;
  --text: #eff7f1;
  --muted: #8da098;
  --green: #6ee7a8;
  --amber: #f4c76b;
  --red: #f27f7f;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 75% 0%, #17352b 0, transparent 38%), var(--bg);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
.noise {
  position: fixed; inset: 0; pointer-events: none; opacity: .08;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}
.app, .login-shell { position: relative; z-index: 1; }
.hidden { display: none !important; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card {
  width: min(430px, 100%); padding: 42px; border: 1px solid var(--line);
  background: var(--panel); border-radius: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.35);
}
.brand-mark {
  width: 64px; height: 64px; display: grid; place-items: center; border-radius: 18px;
  background: var(--green); color: #07120e; font-size: 30px; font-weight: 900; margin-bottom: 28px;
}
.brand-mark.small { width: 42px; height: 42px; border-radius: 12px; font-size: 20px; margin: 0; }
.eyebrow { margin: 0 0 8px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 10px; letter-spacing: -.03em; }
.muted { color: var(--muted); }
form { display: grid; gap: 18px; margin-top: 32px; }
label { display: grid; gap: 8px; color: #b9c8c1; font-size: 13px; }
input {
  width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: #0b1512; color: var(--text); outline: none;
}
input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(110,231,168,.12); }
button {
  border: 0; border-radius: 10px; padding: 12px 16px; background: var(--green); color: #07120e;
  font-weight: 800; cursor: pointer;
}
button:hover { filter: brightness(1.06); }
.error { min-height: 20px; margin: 0; color: var(--red); font-size: 13px; }
.app { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; }
aside {
  position: sticky; top: 0; height: 100vh; padding: 28px 22px; border-right: 1px solid var(--line);
  background: rgba(7, 14, 12, .82); backdrop-filter: blur(16px); display: flex; flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand strong, .brand span { display: block; }
.brand span { margin-top: 4px; color: var(--muted); font-size: 11px; }
nav { display: grid; gap: 6px; margin-top: 46px; }
.nav-button {
  width: 100%; padding: 11px 12px; border-radius: 9px; background: transparent;
  color: var(--muted); text-align: left; font-size: 14px; font-weight: 500;
}
.nav-button.active, .nav-button:hover { background: #12241e; color: var(--text); }
.aside-foot { margin-top: auto; color: var(--muted); font-size: 12px; }
.status-dot { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 14px var(--green); }
.link-button { display: block; margin-top: 14px; padding: 0; background: none; color: var(--muted); font-weight: 500; }
.content { width: min(1380px, 100%); padding: 44px 48px 70px; }
header, .section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.header-actions { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 12px; }
.header-actions button { background: #18352b; color: var(--green); }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 30px; }
.metric-card {
  min-height: 152px; padding: 22px; border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(145deg, rgba(20,35,30,.96), rgba(10,19,16,.96));
}
.metric-card > span { color: var(--muted); font-size: 12px; }
.metric-card strong { display: block; margin: 22px 0 12px; font-size: 30px; letter-spacing: -.04em; }
.metric-card small { color: var(--muted); }
.bar { height: 5px; margin-top: 18px; overflow: hidden; border-radius: 99px; background: #25352f; }
.bar i { display: block; width: 0; height: 100%; background: var(--green); transition: width .4s ease; }
.section { margin-top: 48px; }
.section-title { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.section-title h2 { margin-bottom: 0; }
.section-title > span { color: var(--muted); font-size: 12px; }
.project-list { display: grid; margin-top: 8px; }
.project-row {
  display: grid; grid-template-columns: 1.2fr 1.5fr .8fr 1.3fr auto; align-items: center; gap: 18px;
  padding: 18px 10px; border-bottom: 1px solid rgba(38,59,53,.75);
}
.project-name strong, .project-name span { display: block; }
.project-name span, .meta { margin-top: 5px; color: var(--muted); font-size: 11px; }
.domain-link { color: #c9f6dd; text-decoration: none; font-size: 13px; }
.project-link-button {
  padding: 0; border: 0; border-radius: 0; background: transparent;
  color: #c9f6dd; font-weight: 500; text-align: left;
}
.domain-link:hover { color: var(--green); }
.badge { width: fit-content; padding: 5px 9px; border-radius: 99px; background: #152b24; color: var(--green); font-size: 11px; }
.badge.offline { background: #311d1d; color: var(--red); }
.open-link { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--text); text-decoration: none; font-size: 12px; }
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  aside { position: static; width: 100%; height: auto; }
  nav { grid-template-columns: repeat(2, 1fr); margin-top: 22px; }
  .aside-foot { display: none; }
  .content { padding: 30px 22px 60px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .project-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .login-card { padding: 30px 24px; }
  header, .section-title { align-items: flex-start; flex-direction: column; }
  .metric-grid { grid-template-columns: 1fr; }
  .project-row { grid-template-columns: 1fr; }
}
