/* 简光OA 2.0 · HALOFLUX 主题:基础、外壳、登录 */
:root {
  --bg0: #05080c; --bg1: #0b0f14;
  --panel: rgba(13, 19, 27, .78); --panel2: rgba(14, 20, 28, .97);
  --line: #263140; --line2: rgba(94, 234, 212, .24);
  --text: #e6edf3; --text2: #c9d4e0; --dim: #8b98a9; --mute: #5d6b7c;
  --cyan: #5eead4; --indigo: #818cf8; --pink: #f472b6; --amber: #fbbf24;
  --green: #34d399; --red: #f87171; --blue: #60a5fa; --orange: #fb923c;
  --hud: rgba(125, 243, 226, .72);
  --mono: Consolas, 'Cascadia Mono', 'SFMono-Regular', monospace;
  --font: 'Microsoft YaHei UI', 'Microsoft YaHei', 'PingFang SC', 'Noto Sans SC', sans-serif;
  --side: 236px; --top: 60px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body { font: 15px/1.6 var(--font); color: var(--text); background: var(--bg1); overflow: hidden; -webkit-font-smoothing: antialiased; }
a { color: var(--cyan); text-decoration: none; }
a:hover { color: #a7f8ec; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: rgba(94, 234, 212, .3); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgba(139, 152, 169, .22); border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(94, 234, 212, .35); }
::-webkit-scrollbar-track { background: transparent; }

#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
body::before { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 300;
  background: radial-gradient(ellipse at center, transparent 58%, rgba(2, 6, 10, .5) 100%); }
body::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 301;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .022) 0 1px, transparent 1px 3px); }
#app { position: relative; z-index: 1; height: 100%; }
.boot { height: 100%; display: grid; place-items: center; font: 13px var(--mono); letter-spacing: .2em; color: var(--hud); }
.mono { font-family: var(--mono); }
.dim { color: var(--dim); }
.mute { color: var(--mute); }
.hud-code { font: 11px var(--mono); letter-spacing: .16em; color: var(--hud); text-transform: uppercase; }

/* ---------- 外壳 ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); height: 100%; }
.side { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10, 15, 21, .94), rgba(6, 9, 13, .94)); }
.brand { height: var(--top); flex: none; display: flex; align-items: center; gap: 11px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.brand b { font-size: 17px; letter-spacing: .04em; }
.brand small { display: block; font: 10px var(--mono); letter-spacing: .2em; color: var(--hud); margin-top: -2px; }
.core-ico { width: 30px; height: 30px; position: relative; flex: none; }
.core-ico::before { content: ''; position: absolute; inset: 10px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #fff, var(--cyan) 55%, rgba(94, 234, 212, .1));
  box-shadow: 0 0 12px rgba(94, 234, 212, .8); }
.core-ico i { position: absolute; inset: 0; border: 1.5px solid rgba(94, 234, 212, .7); border-radius: 50%; transform: rotateX(70deg) rotateZ(0deg); animation: spinRing 6s linear infinite; }
.core-ico i:nth-child(2) { border-color: rgba(129, 140, 248, .75); animation-duration: 9s; animation-direction: reverse; inset: -3px; }
@keyframes spinRing { to { transform: rotateX(70deg) rotateZ(360deg); } }

.nav { flex: 1; overflow: auto; padding: 6px 10px 18px; }
.nav-g { font: 11px var(--mono); letter-spacing: .2em; color: var(--mute); padding: 14px 12px 5px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 12px; margin: 1px 0; border-radius: 8px; color: var(--text2); font-size: 15px; transition: background .15s, color .15s; }
.nav a:hover { background: rgba(94, 234, 212, .06); color: #fff; }
.nav a.on { color: #fff; background: linear-gradient(90deg, rgba(94, 234, 212, .17), rgba(94, 234, 212, .02)); box-shadow: inset 2px 0 0 var(--cyan); }
.nav a.on svg { color: var(--cyan); filter: drop-shadow(0 0 4px rgba(94, 234, 212, .7)); }
.nav svg { width: 18px; height: 18px; flex: none; }
.nav .badge { margin-left: auto; }
.side-foot { flex: none; padding: 10px 16px; border-top: 1px solid var(--line); font: 11px/1.7 var(--mono); color: var(--mute); letter-spacing: .06em; }
.side-foot b { color: var(--amber); font-weight: 400; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100%; }
.top { height: var(--top); flex: none; display: flex; align-items: center; gap: 14px; padding: 0 22px; position: relative; z-index: 20;
  border-bottom: 1px solid var(--line); background: rgba(8, 12, 17, .72); backdrop-filter: blur(8px); }
.top h1 { font-size: 19px; font-weight: 600; white-space: nowrap; }
.top .sp { flex: 1; }
.clock { font: 13px var(--mono); color: var(--dim); letter-spacing: .08em; white-space: nowrap; }
.menu-btn { display: none; }
.icon-btn { all: unset; position: relative; width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; cursor: pointer; color: var(--text2); border: 1px solid transparent; }
.icon-btn:hover { color: #fff; border-color: var(--line); background: rgba(255, 255, 255, .03); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn .badge { position: absolute; top: 2px; right: 0; }
.user-btn { all: unset; display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid transparent; }
.user-btn:hover { border-color: var(--line); background: rgba(255, 255, 255, .03); }
.user-btn .nm { font-size: 14.5px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.view { flex: 1; min-height: 0; overflow: auto; padding: 22px 24px 48px; position: relative; }
.view.full { padding: 0; overflow: hidden; }
.view-in { animation: viewIn .28s ease-out; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- 登录 ---------- */
.login { position: fixed; inset: 0; display: grid; place-items: center; overflow: hidden; }
.login .stage { position: absolute; inset: 0; }
.login-card { position: relative; z-index: 2; width: 392px; max-width: calc(100vw - 32px); padding: 34px 32px 28px; border-radius: 16px;
  background: rgba(9, 14, 20, .8); border: 1px solid var(--line2); backdrop-filter: blur(12px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 50px rgba(94, 234, 212, .08); animation: viewIn .5s ease-out; }
.login-card::before, .login-card::after { content: ''; position: absolute; width: 18px; height: 18px; border: 1.5px solid var(--cyan); pointer-events: none; }
.login-card::before { top: -1px; left: -1px; border-right: none; border-bottom: none; border-top-left-radius: 16px; }
.login-card::after { bottom: -1px; right: -1px; border-left: none; border-top: none; border-bottom-right-radius: 16px; }
.login-card h2 { font-size: 24px; letter-spacing: .06em; margin: 6px 0 2px; }
.login-card .sub { color: var(--dim); font-size: 13.5px; margin-bottom: 24px; }
.login-card .fld { margin-bottom: 14px; }
.login-card .btn { width: 100%; height: 44px; font-size: 16px; margin-top: 8px; }
.login-card .err { min-height: 22px; color: var(--red); font-size: 13.5px; margin-top: 4px; }
.login-card .foot { margin-top: 16px; font-size: 12.5px; color: var(--mute); text-align: center; line-height: 1.7; }
.login .hud-tl { position: absolute; z-index: 2; left: 22px; top: 18px; }
.login .hud-br { position: absolute; z-index: 2; right: 22px; bottom: 16px; text-align: right; }

/* ---------- 窄屏 ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: var(--side); z-index: 60; transform: translateX(-102%); transition: transform .22s ease-out; }
  .side.open { transform: none; box-shadow: 20px 0 60px rgba(0, 0, 0, .6); }
  .menu-btn { display: grid; }
  .top { padding: 0 12px; gap: 8px; }
  .top h1 { font-size: 17px; }
  .clock, .top .hud-code, .user-btn .nm { display: none; }
  .view { padding: 16px 14px 40px; }
}
