:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --surface: rgba(255, 255, 255, 0.82);
  --solid: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --tertiary: #98989d;
  --line: rgba(0, 0, 0, 0.08);
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --green: #248a3d;
  --orange: #c93400;
  --red: #d70015;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.07);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: radial-gradient(circle at 80% -10%, rgba(36, 138, 61, 0.08), transparent 32%), var(--bg);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }

button, .button {
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  color: #fff;
  border-radius: 12px;
  background: var(--blue);
  font-weight: 600;
  font-size: 13px;
  transition: all 0.15s ease;
}

button:hover, .button:hover { background: var(--blue-hover); }
button.secondary, .button.secondary { background: rgba(0, 0, 0, 0.06); color: var(--text); }
button.danger, .button.danger { background: #fff0f1; color: var(--red); }

.center-shell { min-height: 100vh; display: grid; place-items: center; padding: 32px 20px; }
.install-card, .login-card {
  width: min(100%, 460px);
  padding: 40px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.09);
  backdrop-filter: blur(28px);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 17px;
  color: #fff;
  background: linear-gradient(145deg, #34c759, #248a3d);
  box-shadow: 0 12px 26px rgba(36, 138, 61, 0.24);
  font-size: 24px;
  font-weight: 700;
}

.brand-mark.small { width: 44px; height: 44px; border-radius: 13px; font-size: 19px; }
.brand-mark.tiny { width: 36px; height: 36px; border-radius: 10px; font-size: 15px; }

.eyebrow { margin: 22px 0 6px; color: var(--green); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.install-card h1, .login-card h1 { margin: 0; font-size: 28px; line-height: 1.2; letter-spacing: -0.03em; }
.lead { margin: 8px 0 24px; color: var(--muted); font-size: 13px; }

label { display: block; margin-top: 18px; color: #333336; font-size: 13px; font-weight: 550; }
label small { margin-left: 6px; font-weight: 400; color: var(--tertiary); }

input, select, textarea {
  width: 100%;
  margin-top: 7px;
  padding: 11px 14px;
  color: var(--text);
  border: 1px solid #d2d2d7;
  border-radius: 11px;
  outline: 0;
  background: rgba(255, 255, 255, 0.9);
  font-size: 13px;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--green);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(36, 138, 61, 0.12);
}

.alert { margin: 16px 0; padding: 12px 16px; border-radius: 12px; color: #a50011; background: #fff0f1; font-size: 13px; }
.success-alert { margin: 16px 0; padding: 12px 16px; border-radius: 12px; color: #1b632c; background: #edf8f0; font-size: 13px; }

/* 节点 App Shell */
.app-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
aside {
  position: fixed;
  z-index: 20;
  width: 250px;
  height: 100vh;
  padding: 24px 16px;
  border-right: 1px solid var(--line);
  background: rgba(248, 248, 250, 0.82);
  backdrop-filter: blur(24px);
}

.side-brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 24px; }
.side-brand b { font-size: 15px; font-weight: 700; display: block; }
.side-brand small { margin-top: 1px; color: var(--tertiary); font-size: 11px; display: block; }

nav { display: grid; gap: 4px; }
nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 11px;
  color: #4b4b4e;
  font-size: 13px;
  font-weight: 520;
  transition: all 0.16s ease;
}

nav a:hover { background: rgba(0, 0, 0, 0.045); color: var(--text); }
nav a.active {
  color: var(--text);
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  font-weight: 600;
}

.dashboard { grid-column: 2; width: 100%; max-width: 1440px; padding: 48px clamp(24px, 4vw, 64px) 80px; }
.dashboard > header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 28px; }
.dashboard header .eyebrow { margin: 0 0 6px; }
.dashboard header h1 { margin: 0; font-size: 30px; letter-spacing: -0.035em; }

.panel {
  padding: 24px;
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: var(--surface);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(20px);
  margin-top: 18px;
}

.panel-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.panel-head h2 { margin: 0; font-size: 16px; }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  aside { position: sticky; top: 0; width: 100%; height: auto; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side-brand { display: none; }
  aside nav { display: flex; overflow-x: auto; gap: 6px; }
  .dashboard { grid-column: 1; padding: 30px 16px 60px; }
}
