/* ============================================================
   layout.css — 登录页（分屏 hero）/ 应用壳（侧栏·顶栏·内容）
   ============================================================ */

/* ---------- 登录页：左 hero 纯设计视觉 + 右表单 ---------- */
.login-page {
  position: fixed; inset: 0;
  display: flex;
  background: var(--bg);
  animation: fadeUp .4s ease;
}
.login-hero {
  position: relative; flex: 1.15;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 52px 56px;
  background: var(--grad-green);
  overflow: hidden;
  color: #fff;
}
/* 装饰层：光斑 / 轨道环 / 流光 */
.hero-fx { position: absolute; inset: 0; pointer-events: none; }
.fx-orb {
  position: absolute; border-radius: 50%;
  filter: blur(46px);
  animation: orbFloat 14s ease-in-out infinite;
}
.fx-orb.o1 {
  width: 420px; height: 420px; right: -110px; top: -150px;
  background: radial-gradient(circle, rgba(201,162,39,.34), transparent 65%);
}
.fx-orb.o2 {
  width: 340px; height: 340px; left: -120px; bottom: -80px;
  background: radial-gradient(circle, rgba(46,148,104,.5), transparent 65%);
  animation-delay: -5s;
}
.fx-orb.o3 {
  width: 200px; height: 200px; right: 22%; bottom: 16%;
  background: radial-gradient(circle, rgba(95,169,134,.3), transparent 62%);
  animation-delay: -9s;
}
.fx-ring {
  position: absolute; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 68%, rgba(232,208,138,.4) 80%, transparent 92%);
  -webkit-mask: radial-gradient(circle, transparent 61%, #000 63%, #000 65.5%, transparent 67.5%);
  mask: radial-gradient(circle, transparent 61%, #000 63%, #000 65.5%, transparent 67.5%);
  animation: spinSlow 26s linear infinite;
}
.fx-ring.r1 { width: 440px; height: 440px; right: -130px; top: 6%; }
.fx-ring.r2 {
  width: 300px; height: 300px; right: -30px; top: 22%;
  animation: spinReverse 18s linear infinite;
  background: conic-gradient(from 180deg, transparent 0 62%, rgba(255,255,255,.28) 76%, transparent 88%);
}
/* 流光线条 */
.fx-beam {
  position: absolute; height: 1.5px; width: 26%;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(232,208,138,.65), transparent);
  animation: beamSlide 8s ease-in-out infinite;
  opacity: 0;
}
.fx-beam.b1 { left: 4%; top: 30%; animation-delay: 0s; }
.fx-beam.b2 { left: 12%; top: 52%; animation-delay: 2.8s; width: 20%; background: linear-gradient(90deg, transparent, rgba(168,211,190,.55), transparent); }
.fx-beam.b3 { left: 0%; top: 70%; animation-delay: 5.2s; width: 32%; }
.login-hero .hero-copy { position: relative; z-index: 2; max-width: 520px; }
.login-hero .hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 14px; margin-bottom: 18px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .06em;
  color: var(--gold-300);
  background: rgba(201,162,39,.12);
  border: 1px solid rgba(201,162,39,.35);
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.login-hero h1 {
  font-size: 40px; line-height: 1.18; font-weight: 750;
  letter-spacing: .01em; margin-bottom: 14px;
}
.login-hero h1 em { font-style: normal; color: var(--gold-300); }
.login-hero .hero-slogan {
  font-size: 16px; color: rgba(255,255,255,.82);
  margin: -4px 0 18px; letter-spacing: .03em; font-weight: 500;
}
.login-hero .hero-slogan em { font-style: normal; color: var(--gold-300); }
.login-hero p.hero-desc {
  font-size: 15px; color: rgba(255,255,255,.78);
  margin-bottom: 30px; max-width: 460px;
}
.hero-points { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-points span {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  font-size: 13px; color: rgba(255,255,255,.92);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px;
  backdrop-filter: blur(6px);
}
.hero-points span::before { content: "✓"; color: var(--gold-400); font-weight: 700; }

/* 右侧表单面板 */
.login-panel {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  background: var(--surface);
}
.login-card { width: 100%; max-width: 380px; animation: fadeUp .5s ease .1s backwards; }
.login-logo {
  width: 58px; height: 58px;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad-green);
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(15,70,48,.3), inset 0 1px 0 rgba(255,255,255,.18);
  margin-bottom: 20px;
  position: relative;
}
.login-logo svg { width: 30px; height: 30px; filter: drop-shadow(0 0 8px rgba(232,208,138,.35)); }
.login-logo::after {
  content: ""; position: absolute; right: -4px; top: -4px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--grad-gold);
  box-shadow: 0 0 0 3px var(--surface);
}
.login-card h2 { font-size: 24px; margin-bottom: 6px; }
.login-sub { font-size: 13px; color: var(--ink-3); margin-bottom: 28px; }
#loginForm { display: flex; flex-direction: column; gap: 14px; }
#loginForm input { padding: 12px 14px; font-size: 14px; border-radius: 12px; }
#loginForm .btn { margin-top: 6px; padding: 12px; font-size: 15px; }
.login-err { min-height: 18px; font-size: 13px; color: var(--err); }
.login-foot { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line-2); font-size: 12px; color: var(--ink-4); display: flex; justify-content: space-between; }

/* ---------- 应用壳 ---------- */
.app { display: flex; height: 100vh; overflow: hidden; }

/* 侧栏（深绿） */
.sidebar {
  width: var(--sidebar-w); flex: none;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #0B3524 0%, #08291C 60%, #06211A 100%);
  color: rgba(255,255,255,.88);
  position: relative; z-index: 40;
}
.sidebar::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 220px;
  background:
    radial-gradient(420px 200px at 90% -60px, rgba(201,162,39,.16), transparent 65%),
    radial-gradient(300px 160px at -60px 40px, rgba(46,148,104,.18), transparent 60%);
  pointer-events: none;
}
.brand {
  display: flex; align-items: center; gap: 11px;
  padding: 20px 20px 16px;
  font-size: 16.5px; font-weight: 700; letter-spacing: .02em;
  position: relative;
}
.brand .logo-mark {
  width: 34px; height: 34px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(201,162,39,.4);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 0 12px -4px rgba(201,162,39,.4);
}
.brand .logo-mark svg { width: 19px; height: 19px; display: block; }
.brand .gold-dot { color: var(--gold-400); }

.nav { flex: 1; overflow-y: auto; padding: 6px 12px 12px; position: relative; }
.nav::-webkit-scrollbar { width: 4px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border: none; }
.nav-group-title {
  padding: 16px 10px 7px;
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
  color: rgba(255,255,255,.38);
  text-transform: uppercase;
}
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 8.5px 11px; margin-bottom: 2px;
  font-size: 13.5px; font-weight: 500;
  color: rgba(255,255,255,.72);
  border-radius: 9px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all .15s ease;
}
/* 图标：线性 SVG 科技体系 */
.nav a .n-ico {
  width: 20px; height: 20px; flex: none;
  display: flex; align-items: center; justify-content: center;
  opacity: .82;
  transition: all .18s ease;
}
.nav a .n-ico svg { width: 17px; height: 17px; display: block; }
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a:hover .n-ico {
  opacity: 1; transform: translateY(-1px);
  color: var(--gold-300);
  filter: drop-shadow(0 0 6px rgba(232,208,138,.55));
}
/* 悬停光扫 */
.nav a::after {
  content: ""; position: absolute; left: -70%; top: 0;
  width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.12), transparent);
  transform: skewX(-18deg);
  transition: left .5s ease;
  pointer-events: none;
}
.nav a:hover::after { left: 118%; }
.nav a.active {
  background: linear-gradient(90deg, rgba(29,122,84,.38), rgba(29,122,84,.08));
  color: #fff; font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 20px -6px rgba(46,148,104,.55);
}
.nav a.active .n-ico {
  opacity: 1;
  color: var(--gold-400);
  filter: drop-shadow(0 0 7px rgba(201,162,39,.65));
  animation: icoBreath 2.8s ease-in-out infinite;
}
@keyframes icoBreath {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(201,162,39,.45)); }
  50%      { filter: drop-shadow(0 0 9px rgba(201,162,39,.85)); }
}
.nav a.active::before {
  content: ""; position: absolute; left: -12px; top: 50%;
  transform: translateY(-50%);
  width: 3.5px; height: 20px;
  background: var(--grad-gold);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 10px rgba(201,162,39,.55);
}

.sidebar-foot {
  padding: 14px 16px;
  display: flex; align-items: center; gap: 10px;
  border-top: 1px solid rgba(255,255,255,.09);
  position: relative;
}
.whoami {
  flex: 1; min-width: 0;
  font-size: 13px; font-weight: 600; color: rgba(255,255,255,.9);
  display: flex; align-items: center; gap: 8px;
}
.whoami::before {
  content: ""; width: 8px; height: 8px; flex: none;
  border-radius: 50%; background: var(--g-300);
  box-shadow: 0 0 8px rgba(95,169,134,.8);
}
.sidebar-foot .btn.ghost { color: rgba(255,255,255,.65); }
.sidebar-foot .btn.ghost:hover { background: rgba(255,255,255,.08); color: #fff; }

/* 主区 */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  flex: none; height: 60px;
  display: flex; align-items: center; gap: 14px;
  padding: 0 26px;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  position: relative; z-index: 30;
}
.topbar h2 { font-size: 17px; font-weight: 700; }
.menu-toggle {
  display: none;
  width: 38px; height: 38px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); cursor: pointer;
  color: var(--ink-2);
}
.menu-toggle svg { width: 18px; height: 18px; display: block; margin: auto; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.conn-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--ink-4);
  transition: all .3s;
}
.conn-dot.on { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-bg), 0 0 10px rgba(29,122,84,.6); animation: pulseDot 2.2s infinite; }
.conn-text { font-size: 12.5px; color: var(--ink-3); min-width: 26px; }

/* 内容视口 */
.view {
  flex: 1; overflow-y: auto;
  padding: 26px;
  background:
    radial-gradient(900px 320px at 88% -140px, rgba(29,122,84,.055), transparent 60%),
    radial-gradient(600px 260px at -120px 30%, rgba(201,162,39,.045), transparent 55%),
    var(--bg);
}
.view > * { animation: fadeUp .35s ease; }

/* H5 抽屉侧栏 */
.sidebar-mask {
  position: fixed; inset: 0; z-index: 35;
  background: rgba(7, 38, 26, .45);
  backdrop-filter: blur(2px);
}
