/* ============================================================
   鼎数管家 - 统一样式
   深色左侧菜单 + 浅色内容区 + 白色顶部banner + 窗口滚动条
   ============================================================ */

:root {
  --sidebar-w: 220px;
  --banner-h: 56px;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --success: #16a34a;
  --success-light: #f0fdf4;
  --warn: #d97706;
  --warn-light: #fffbeb;
  --gray-900: #0f172a;
  --gray-800: #1e293b;
  --gray-700: #334155;
  --gray-600: #475569;
  --gray-500: #64748b;
  --gray-400: #94a3b8;
  --gray-300: #cbd5e1;
  --gray-200: #e2e8f0;
  --gray-100: #f1f5f9;
  --gray-50: #f8fafc;
  --border: #e5e7eb;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--gray-100);
  color: var(--gray-800);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }

/* ---------- 美化滚动条（窗口级） ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: #94a3b8; background-clip: content-box; border: 2px solid transparent; }
::-webkit-scrollbar-corner { background: transparent; }
* { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }

/* ============ 侧边栏 ============ */
.sidebar {
  width: var(--sidebar-w); min-width: var(--sidebar-w);
  background: var(--gray-900); color: #cbd5e1;
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 90;
  display: flex; flex-direction: column; transition: transform .25s ease;
}
.sidebar-logo {
  height: var(--banner-h); flex-shrink: 0;
  display: flex; align-items: center; gap: 10px; padding: 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.sidebar-logo .logo-box {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 15px;
}
.sidebar-logo .logo-text { font-size: 15px; font-weight: 600; color: #fff; white-space: nowrap; }
.menu { flex: 1; padding: 10px 0; overflow-y: auto; }
.menu-group { margin: 0; }
.menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 20px; cursor: pointer; user-select: none;
  color: #94a3b8; transition: all .15s; border-left: 3px solid transparent;
}
.menu-item:hover { background: rgba(255, 255, 255, .05); color: #e2e8f0; }
.menu-item.active { background: rgba(37, 99, 235, .15); color: #fff; border-left-color: var(--primary); }
.mi-ico { width: 18px; height: 18px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.mi-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; }
.mi-label { font-size: 14px; white-space: nowrap; }
.submenu { padding: 0 0 4px; }
.submenu-item {
  display: block; padding: 7px 20px 7px 53px;
  font-size: 13px; color: #94a3b8; transition: all .15s;
  border-left: 3px solid transparent;
}
.submenu-item:hover { background: rgba(255, 255, 255, .05); color: #e2e8f0; }
.submenu-item.active { background: rgba(37, 99, 235, .15); color: #fff; border-left-color: var(--primary); }
.sidebar-foot {
  padding: 13px 20px; border-top: 1px solid rgba(255, 255, 255, .06);
  font-size: 12px; color: var(--gray-500); white-space: nowrap;
}
.sidebar-mask { display: none; }

/* ============ 顶部 banner（白色） ============ */
.banner {
  position: fixed; top: 0; left: var(--sidebar-w); right: 0; height: var(--banner-h); z-index: 100;
  background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 0 20px; box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
}
.banner-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.banner-title { font-size: 16px; font-weight: 600; color: var(--gray-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.banner-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.company-tag {
  background: var(--gray-100); border: 1px solid var(--border); border-radius: 8px;
  padding: 5px 12px; font-size: 13px; color: var(--gray-700);
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.company-switcher {
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px;
  font-size: 13px; background: #fff; color: var(--gray-700); max-width: 200px; cursor: pointer;
}
.icon-btn {
  background: #fff; border: 1px solid var(--border); color: var(--gray-600);
  width: 36px; height: 36px; border-radius: 8px; font-size: 14px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; transition: all .15s; flex-shrink: 0;
}
.icon-btn:hover { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.user-chip { font-size: 13px; color: var(--gray-600); white-space: nowrap; }
.menu-toggle {
  display: none; background: #fff; border: 1px solid var(--border); border-radius: 8px;
  width: 36px; height: 36px; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; transition: all .15s;
}
.menu-toggle:hover { border-color: var(--primary); background: var(--primary-light); }
.menu-toggle svg { width: 18px; height: 18px; stroke: var(--gray-600); fill: none; }

/* ============ 内容区：窗口滚动，四周 20px ============ */
.content {
  margin-left: var(--sidebar-w);
  padding: calc(var(--banner-h) + 20px) 20px 20px;
  min-height: 100vh;
  min-width: 0;
}
.page-loading { text-align: center; padding: 80px 0; color: var(--gray-500); }

/* ============ 页头/卡片/表格 ============ */
.page-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.page-title { font-size: 19px; font-weight: 600; color: var(--gray-900); }
.page-sub { color: var(--gray-500); font-size: 13px; margin-top: 2px; }
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px; }
.card-title { font-size: 15px; font-weight: 600; color: var(--gray-900); margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; min-width: 640px; }
.tbl th, .tbl td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--gray-100); white-space: nowrap; }
.tbl th { color: var(--gray-500); font-weight: 500; font-size: 13px; background: var(--gray-50); }
.tbl tbody tr:hover { background: var(--gray-50); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.text-in { color: var(--success); }
.text-out { color: var(--danger); }
.muted { color: var(--gray-500); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; }
.badge-green { background: var(--success-light); color: #15803d; }
.badge-orange { background: var(--warn-light); color: #b45309; }
.badge-gray { background: var(--gray-100); color: var(--gray-500); }
.badge-red { background: var(--danger-light); color: var(--danger); }
.badge-blue { background: var(--primary-light); color: #1d4ed8; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  border: 1px solid var(--border); background: #fff; color: var(--gray-700);
  border-radius: 8px; padding: 8px 15px; font-size: 13.5px; cursor: pointer;
  font-weight: 500; transition: all .15s; text-decoration: none; white-space: nowrap; line-height: 1.4;
}
.btn:hover { border-color: var(--gray-300); background: var(--gray-50); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-danger { background: #fff; border-color: #fecaca; color: var(--danger); }
.btn-danger:hover { background: var(--danger-light); }
.btn-danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger-solid:hover { background: #b91c1c; border-color: #b91c1c; }
.btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 6px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ============ 表单 ============ */
input, select, textarea {
  font-family: inherit; font-size: 13.5px; color: var(--gray-800);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 11px; background: #fff;
  outline: none; transition: border .15s, box-shadow .15s; max-width: 100%;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.form-item { margin-bottom: 14px; }
.form-item label { display: block; font-size: 13px; color: var(--gray-600); margin-bottom: 5px; font-weight: 500; }
.form-item input, .form-item select, .form-item textarea { width: 100%; }
.grid-form { display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.inline-form input, .inline-form select { width: auto; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .grow { flex: 1; }
.search-box { min-width: 200px; }

/* ============ 统计卡片 ============ */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px; position: relative; overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--primary);
}
.stat-card.c-green::before { background: var(--success); }
.stat-card.c-red::before { background: var(--danger); }
.stat-card.c-orange::before { background: var(--warn); }
.stat-card.c-cyan::before { background: #0891b2; }
.stat-label { color: var(--gray-500); font-size: 13px; }
.stat-value { font-size: 22px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; color: var(--gray-900); }
.stat-foot { color: var(--gray-500); font-size: 12px; margin-top: 4px; }

/* 简易柱状图 */
.bar-chart { display: flex; align-items: flex-end; gap: 8px; height: 180px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.bar-plot { width: 100%; max-width: 34px; display: flex; align-items: flex-end; justify-content: center; gap: 3px; height: 140px; }
.bar-i { width: 45%; border-radius: 3px 3px 0 0; min-height: 2px; background: var(--primary); }
.bar-o { width: 45%; border-radius: 3px 3px 0 0; min-height: 2px; background: var(--danger); }
.bar-label { font-size: 11.5px; color: var(--gray-500); white-space: nowrap; }

/* ============ 弹窗 ============ */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  background: #fff; border-radius: 12px; padding: 22px; width: 520px; max-width: 96vw;
  max-height: 86vh; overflow-y: auto; position: relative;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
}
.modal-title { font-size: 16px; font-weight: 600; color: var(--gray-900); margin-bottom: 16px; }
.modal-x {
  position: absolute; top: 12px; right: 14px; border: 1px solid var(--border); background: #fff;
  width: 28px; height: 28px; border-radius: 8px; font-size: 15px; cursor: pointer; color: var(--gray-500);
}
.modal-x:hover { border-color: var(--gray-300); background: var(--gray-50); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

/* ============ 提示 ============ */
.toast {
  position: fixed; top: 70px; left: 50%; transform: translateX(-50%) translateY(-16px);
  background: var(--gray-900); color: #fff; padding: 10px 22px; border-radius: 8px;
  font-size: 13.5px; z-index: 300; opacity: 0; pointer-events: none; transition: all .25s;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .3); max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-error { background: var(--danger); }
.toast-warn { background: var(--warn); }

/* ============ 分页 ============ */
.pager { display: flex; gap: 6px; justify-content: flex-end; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.pager button { min-width: 30px; }

/* ============ 提示条 ============ */
.alert { border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px; }
.alert-error { background: var(--danger-light); color: var(--danger); }

/* ============ 登录/安装页：左右分栏 ============ */
html, body.login-body { height: 100%; }
body.login-body { background: #0b1220; display: block; overflow-x: hidden; min-height: 100vh; }
.login-shell { display: flex; min-height: 100vh; width: 100%; }

/* ---- 左侧品牌区 ---- */
.login-hero {
  flex: 1.15; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 48px 64px; color: #e2e8f0;
  background:
    radial-gradient(900px 600px at -10% -20%, rgba(37, 99, 235, .35), transparent 60%),
    radial-gradient(700px 500px at 110% 115%, rgba(6, 182, 212, .28), transparent 60%),
    radial-gradient(500px 400px at 85% 8%, rgba(124, 58, 237, .18), transparent 55%),
    linear-gradient(160deg, #0b1220 0%, #101b33 55%, #0b1220 100%);
}
.login-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .07) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 80% at 40% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 40% 40%, #000 30%, transparent 75%);
}
.login-orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; pointer-events: none; }
.login-orb.o1 { width: 320px; height: 320px; left: -80px; bottom: -60px; background: radial-gradient(circle, rgba(37, 99, 235, .55), transparent 70%); animation: orbFloat 11s ease-in-out infinite; }
.login-orb.o2 { width: 240px; height: 240px; right: 6%; top: 12%; background: radial-gradient(circle, rgba(6, 182, 212, .45), transparent 70%); animation: orbFloat 9s ease-in-out 1.5s infinite reverse; }
@keyframes orbFloat { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-26px) scale(1.06); } }

.hero-top { position: relative; display: flex; align-items: center; gap: 12px; animation: fadeUp .7s ease both; }
.hero-logo {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 18px;
  box-shadow: 0 8px 24px rgba(37, 99, 235, .45);
}
.hero-top span { font-size: 15px; font-weight: 600; color: #f1f5f9; letter-spacing: .5px; }

.hero-mid { position: relative; max-width: 560px; }
.hero-mid h2 { font-size: 34px; line-height: 1.35; font-weight: 700; color: #f8fafc; letter-spacing: .5px; animation: fadeUp .7s .1s ease both; }
.hero-mid h2 em { font-style: normal; background: linear-gradient(90deg, #60a5fa, #22d3ee); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-mid p { margin-top: 14px; font-size: 14px; line-height: 1.9; color: #94a3b8; animation: fadeUp .7s .18s ease both; }

/* 登录页左侧：财务/库存数据看板 */
.hero-board {
  margin: 28px 0 26px; max-width: 520px; padding: 16px 16px 10px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(96, 165, 250, .22);
  border-radius: 14px;
  animation: fadeUp .7s .26s ease both;
}
.hb-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.hb-card {
  background: rgba(15, 23, 42, .55); border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 10px; padding: 10px 12px;
}
.hb-card span { display: block; font-size: 11.5px; color: #64748b; }
.hb-card b { display: block; font-size: 15px; color: #f1f5f9; font-weight: 700; margin-top: 3px; font-variant-numeric: tabular-nums; }
.hb-card i { display: inline-block; font-style: normal; font-size: 11px; margin-top: 4px; font-weight: 600; }
.hb-card i.up { color: #34d399; }
.hb-card i.down { color: #f87171; }
.hb-chart svg { width: 100%; height: 110px; display: block; }
.hb-in { fill: #60a5fa; }
.hb-out { fill: rgba(248, 113, 113, .75); }
.hb-legend { display: flex; align-items: center; gap: 14px; font-size: 11.5px; color: #94a3b8; padding: 0 2px 8px; }
.hb-legend em { font-style: normal; margin-left: auto; color: #475569; }
.dot-ic { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.dot-in { background: #60a5fa; }
.dot-out { background: rgba(248, 113, 113, .75); }
@media (prefers-reduced-motion: no-preference) {
  .hero-board svg rect { transform-origin: bottom; transform-box: fill-box; animation: hbGrow .8s cubic-bezier(.2, .7, .3, 1) both; }
  .hero-board svg rect:nth-of-type(2n) { animation-delay: .1s; }
}
@keyframes hbGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* 安装页左侧：安装步骤流程 */
.hero-steps { margin: 28px 0 26px; max-width: 460px; animation: fadeUp .7s .26s ease both; }
.hs-item { display: flex; align-items: flex-start; gap: 14px; position: relative; padding-bottom: 22px; }
.hs-item:last-child { padding-bottom: 0; }
.hs-item::before {
  content: ''; position: absolute; left: 14px; top: 30px; bottom: 2px; width: 2px;
  background: rgba(148, 163, 184, .18);
}
.hs-item:last-child::before { display: none; }
.hs-item.done::before { background: rgba(59, 130, 246, .45); }
.hs-no {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #64748b;
  background: rgba(15, 23, 42, .8); border: 1px solid rgba(148, 163, 184, .3);
}
.hs-item.done .hs-no { background: var(--primary); border-color: var(--primary); color: #fff; }
.hs-item.done .hs-no svg { width: 14px; height: 14px; stroke: #fff; }
.hs-item.active .hs-no { border-color: var(--primary); color: #fff; }
.hs-pulse { width: 12px; height: 12px; border-radius: 50%; background: #60a5fa; }
@media (prefers-reduced-motion: no-preference) {
  .hs-pulse { box-shadow: 0 0 0 0 rgba(96, 165, 250, .5); animation: livePulse 1.8s ease-out infinite; }
}
.hs-txt b { display: block; font-size: 14px; color: #e2e8f0; font-weight: 600; }
.hs-item.done .hs-txt b { color: #f8fafc; }
.hs-txt small { display: block; font-size: 12px; color: #64748b; margin-top: 2px; }

.hero-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 26px; max-width: 520px; animation: fadeUp .7s .34s ease both; }
.hero-feat { display: flex; align-items: center; gap: 12px; }
.hero-feat .ic {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(37, 99, 235, .14); border: 1px solid rgba(96, 165, 250, .25);
}
.hero-feat .ic svg { width: 19px; height: 19px; fill: none; stroke: #60a5fa; }
.hero-feat b { display: block; font-size: 14px; color: #e2e8f0; font-weight: 600; }
.hero-feat small { display: block; font-size: 12px; color: #64748b; margin-top: 2px; }
.hero-bottom { position: relative; display: flex; align-items: center; gap: 10px; font-size: 12px; color: #475569; animation: fadeUp .7s .42s ease both; }
.hero-bottom .live-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, .5); animation: livePulse 2s ease-out infinite; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .45); } 70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* ---- 右侧表单区 ---- */
.login-panel {
  width: 480px; min-width: 420px; flex-shrink: 0; position: relative;
  background: #fff; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 48px 56px;
}
.login-panel.panel-wide { width: 640px; min-width: 480px; overflow-y: auto; max-height: 100vh; }
.panel-inner { width: 100%; max-width: 340px; }
.panel-wide .panel-inner { max-width: 480px; }
.panel-brand-m { display: none; align-items: center; gap: 10px; margin-bottom: 28px; }
.panel-brand-m .m-logo {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 15px;
}
.panel-brand-m span { font-weight: 700; font-size: 15px; color: var(--gray-900); }
.panel-hello { animation: fadeUp .6s .1s ease both; }
.panel-hello h1 { font-size: 24px; font-weight: 700; color: var(--gray-900); letter-spacing: .5px; }
.panel-hello p { margin-top: 8px; font-size: 13px; color: var(--gray-500); }

.lg-form { margin-top: 26px; }
.lg-plain {
  width: 100%; border: 1.5px solid var(--gray-200); border-radius: 10px;
  background: var(--gray-50); height: 42px; padding: 0 12px;
}
.lg-plain:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(37, 99, 235, .1); }
.lg-field { margin-bottom: 18px; animation: fadeUp .6s ease both; }
.lg-field:nth-child(1) { animation-delay: .16s; }
.lg-field:nth-child(2) { animation-delay: .22s; }
.lg-field label { display: block; font-size: 13px; font-weight: 500; color: var(--gray-700); margin-bottom: 7px; }
.lg-input {
  display: flex; align-items: center; gap: 10px;
  border: 1.5px solid var(--gray-200); border-radius: 12px;
  background: var(--gray-50); padding: 0 14px; transition: all .18s ease;
}
.lg-input svg.f-ic { width: 17px; height: 17px; stroke: var(--gray-400); flex-shrink: 0; transition: stroke .18s; fill: none; }
.lg-input input {
  flex: 1; border: 0; outline: 0; background: transparent; border-radius: 0;
  height: 46px; font-size: 14px; color: var(--gray-900); min-width: 0; padding: 0;
}
.lg-input input::placeholder { color: var(--gray-400); }
.lg-input:focus-within { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(37, 99, 235, .1); }
.lg-input:focus-within svg.f-ic { stroke: var(--primary); }
.lg-eye { border: 0; background: none; cursor: pointer; padding: 6px; display: flex; align-items: center; border-radius: 6px; }
.lg-eye svg { width: 17px; height: 17px; stroke: var(--gray-400); transition: stroke .15s; fill: none; }
.lg-eye:hover svg { stroke: var(--primary); }
.lg-caps { display: none; margin-top: 6px; font-size: 12px; color: var(--warn); align-items: center; gap: 5px; }
.lg-caps.show { display: flex; }

.lg-submit {
  width: 100%; margin-top: 6px; height: 48px; border: 0; border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff; font-size: 15px; font-weight: 600; letter-spacing: 4px;
  cursor: pointer; position: relative; overflow: hidden;
  box-shadow: 0 10px 24px rgba(37, 99, 235, .32);
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s;
  animation: fadeUp .6s .28s ease both;
}
.lg-submit::after {
  content: ''; position: absolute; top: 0; left: -80%; width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .28), transparent);
  transform: skewX(-20deg); transition: none;
}
.lg-submit:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(37, 99, 235, .4); }
.lg-submit:hover:not(:disabled)::after { animation: sheen .9s ease; }
@keyframes sheen { from { left: -80%; } to { left: 130%; } }
.lg-submit:active:not(:disabled) { transform: translateY(0); }
.lg-submit:disabled { opacity: .7; cursor: not-allowed; }
.lg-foot { margin-top: 26px; text-align: center; font-size: 12px; color: var(--gray-400); animation: fadeUp .6s .34s ease both; }
.lg-foot a { color: var(--primary); }

.form-error { background: var(--danger-light); color: var(--danger); padding: 10px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; }
.form-tip { font-size: 12px; color: var(--gray-500); }

/* 安装页状态表 */
.install-tbl { width: 100%; border-collapse: collapse; margin: 4px 0 14px; }
.install-tbl td { padding: 9px 4px; border-bottom: 1px solid var(--gray-100); font-size: 13.5px; }
.install-tbl td:first-child { color: var(--gray-500); width: 130px; }

.install-step { color: rgba(255, 255, 255, .45); font-size: 12px; margin-top: 18px; }

/* ---------- 登录/安装页响应式 ---------- */
@media (max-width: 960px) {
  .login-hero { display: none; }
  .login-panel { width: 100%; min-width: 0; }
  .login-panel.panel-wide { min-width: 0; }
  .panel-brand-m { display: flex; }
}
@media (max-width: 480px) {
  body.login-body { background: #fff; }
  .login-panel { padding: 32px 26px; }
  .panel-wide .panel-inner { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .login-hero *, .lg-field, .lg-submit, .panel-hello, .lg-foot { animation: none !important; }
}

/* ============ 移动端适配 ============ */
@media (max-width: 768px) {
  .menu-toggle { display: inline-flex; }
  .user-chip { display: none; }
  .company-switcher { max-width: 120px; }
  .company-tag { max-width: 110px; }
  .banner { left: 0; padding: 0 12px; gap: 8px; }
  .banner-title { font-size: 15px; }
  .sidebar { transform: translateX(-100%); box-shadow: 8px 0 30px rgba(0, 0, 0, .25); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-mask.show { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .4); z-index: 85; }
  .content { margin-left: 0; padding: calc(var(--banner-h) + 20px) 20px 20px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-value { font-size: 18px; }
  .grid-form { grid-template-columns: 1fr; }
  .modal { padding: 18px 16px; }
  .bar-chart { height: 150px; }
  .bar-label { font-size: 10px; }
  .page-title { font-size: 17px; }
}
@media (max-width: 420px) {
  .stat-grid { grid-template-columns: 1fr; }
}
