/* ===== 泓泰传媒综合管理系统 - 全局样式（对齐 Node 版界面） ===== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; width: 100%; overflow-x: hidden; }
body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  background: linear-gradient(to bottom right, #eff6ff 0%, #f0f9ff 50%, #eef2ff 100%);
  color: #1e293b;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01", "ss03";
  font-variant-numeric: tabular-nums;
  -webkit-text-size-adjust: 100%;
  min-height: 100dvh;
}
img, video, canvas, svg { max-width: 100%; }
a { color: #2563eb; text-decoration: none; }
.dim { color: #475569; font-size: 14px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.link { color: #2563eb; }

/* ---------- 页面背景光斑（Node 版 blobs） ---------- */
.app-bg { position: fixed; inset: 0; z-index: -10; overflow: hidden; pointer-events: none; }
.app-bg .blob { position: absolute; border-radius: 50%; filter: blur(70px); }
.app-bg .blob-1 { width: 300px; height: 300px; background: rgba(147,197,253,.35); top: -70px; left: -70px; }
.app-bg .blob-2 { width: 260px; height: 260px; background: rgba(125,211,252,.35); top: 33%; right: -70px; }
.app-bg .blob-3 { width: 280px; height: 280px; background: rgba(165,180,252,.22); bottom: 0; left: 25%; }

/* ---------- 启动页（Node SplashPage） ---------- */
.splash-body {
  min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #0ea5e9 100%);
}
.splash-card { text-align: center; color: #fff; padding: 24px; width: min(90%, 400px); }
.splash-logo {
  width: 56px; height: 56px; border-radius: 12px; object-fit: cover;
  background: rgba(255,255,255,.92); box-shadow: 0 12px 32px rgba(0,0,0,.3); margin: 0 auto 22px;
}
.splash-title { font-size: 20px; margin: 0 0 6px; font-weight: 500; letter-spacing: .5px; }
.splash-status { font-size: 14px; color: rgba(255,255,255,.72); min-height: 22px; margin: 0 0 30px; }
.splash-progress-track {
  width: 100%; height: 12px; border-radius: 99px;
  background: rgba(255,255,255,.22); overflow: hidden; box-shadow: inset 0 2px 4px rgba(0,0,0,.15);
}
.splash-progress-bar {
  height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, #ffffff, #bae6fd);
  box-shadow: 0 0 16px rgba(255,255,255,.6);
  transition: width .08s linear;
}
.splash-percent { margin-top: 14px; font-size: 14px; font-weight: 500; color: rgba(255,255,255,.82); }

/* ---------- 登录 / 注册页（Node 浅色主题） ---------- */
.auth-body {
  min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  background: linear-gradient(to bottom right, #eff6ff 0%, #f0f9ff 50%, #eef2ff 100%);
  padding: 28px 16px;
}
.auth-body .blob { position: absolute; border-radius: 50%; filter: blur(70px); }
.auth-body .blob-1 { width: 300px; height: 300px; background: rgba(147,197,253,.32); top: -60px; left: -60px; }
.auth-body .blob-2 { width: 280px; height: 280px; background: rgba(125,211,252,.32); top: 33%; right: -40px; }
.auth-body .blob-3 { width: 280px; height: 280px; background: rgba(165,180,252,.2); bottom: 0; left: 33%; }
.auth-card {
  position: relative; z-index: 10;
  background: rgba(255,255,255,.84); backdrop-filter: blur(12px);
  border: 1px solid rgba(219,234,254,.6); border-radius: 16px;
  box-shadow: 0 12px 32px rgba(2,32,92,.08);
  padding: 24px 28px; width: min(94%, 400px);
}
.auth-card-wide { width: min(94%, 440px); }
.auth-logo { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; display: block; margin: 0 auto 14px; box-shadow: 0 6px 16px rgba(37,99,235,.18); }
.auth-title { font-size: 20px; text-align: center; margin: 0 0 6px; font-weight: 500; }
.auth-sub { text-align: center; color: #475569; font-size: 15px; margin: 0 0 16px; }
.auth-links { text-align: center; margin-top: 18px; font-size: 15px; color: #475569; }
.auth-links a { color: #2563eb; font-weight: 500; }
.auth-links a:hover { text-decoration: underline; }
.rules-card {
  background: rgba(239,246,255,.85); border: 1px solid #dbeafe; border-radius: 10px;
  padding: 10px 14px; margin-bottom: 14px; font-size: 14px; color: #1e40af; line-height: 1.6;
}
.rules-card .rules-title { font-weight: 600; color: #1d4ed8; margin-bottom: 2px; }
.rules-card ul { margin: 4px 0 0; padding-left: 18px; }
.rules-card li { margin: 1px 0; }
/* 注册成功 */
.success-box { text-align: center; padding: 12px 0; }
.success-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: #d1fae5; color: #059669;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 14px;
}
.success-title { font-size: 16px; font-weight: 500; margin: 0 0 8px; }
.success-desc { font-size: 15px; color: #475569; line-height: 1.7; margin: 0 0 20px; }

/* ---------- 表单 ---------- */
.form { margin-top: 4px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.field { margin-bottom: 12px; }
.field-full { grid-column: 1 / -1; }
.label { display: block; font-size: 14px; font-weight: 600; color: #475569; margin-bottom: 6px; letter-spacing: .3px; }
.input {
  width: 100%; padding: 12px 12px; border: 1px solid #bfdbfe; border-radius: 10px; font-size: 16px;
  background: rgba(255,255,255,.72); color: #1e293b; outline: none;
  transition: border .15s, box-shadow .15s;
}
.input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,.18); }
.input-sm { width: auto; padding: 6px 10px; font-size: 15px; }
.input-error { border-color: #ef4444; }
.input-error:focus { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.15); }
.field-error { font-size: 14px; color: #ef4444; margin-top: 4px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 10px; padding: 12px 18px; font-size: 16px; font-weight: 500; cursor: pointer;
  transition: transform .12s, box-shadow .12s, opacity .12s; color: #fff; background: #3b82f6;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: linear-gradient(90deg, #2563eb, #0ea5e9); box-shadow: 0 4px 14px rgba(37,99,235,.3); }
.btn-primary:hover { background: linear-gradient(90deg, #3b82f6, #38bdf8); }
.btn-ghost { background: #fff; color: #2563eb; border: 1px solid #bfdbfe; }
.btn-green { background: #10b981; }
.btn-danger { background: #ef4444; }
.btn-warn { background: #f59e0b; }
.btn-sm { padding: 7px 12px; font-size: 14px; border-radius: 8px; }
.inline-form { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- 提示 ---------- */
.alert { border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; font-size: 16px; }
.alert-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ---------- 顶部导航（Node Layout header） ---------- */
.layout { min-height: 100dvh; }
.app-header {
  background: rgba(255,255,255,.72); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(219,234,254,.6);
  position: sticky; top: 0; z-index: 40;
}
.app-header-inner {
  max-width: 72rem; margin: 0 auto; padding: 0 16px;
  height: 58px; display: flex; align-items: center; justify-content: space-between;
}
.header-left { display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; box-shadow: 0 2px 6px rgba(2,32,92,.12); }
.brand-title { font-size: 15px; font-weight: 500; color: #1e293b; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: 9px; font-size: 15px; font-weight: 500; color: #475569;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.nav-link:hover { background: rgba(191,219,254,.5); color: #1e293b; }
.nav-link.active { background: linear-gradient(90deg, #3b82f6, #0ea5e9); color: #fff; box-shadow: 0 2px 8px rgba(37,99,235,.25); }
.header-right { display: flex; align-items: center; gap: 12px; }
.header-user { font-size: 15px; color: #475569; }
.btn-logout {
  display: flex; align-items: center; gap: 5px;
  border: none; background: transparent; cursor: pointer;
  padding: 9px 12px; font-size: 15px; color: #475569; border-radius: 9px;
  transition: background .15s, color .15s;
}
.btn-logout:hover { background: #eff6ff; color: #2563eb; }
.menu-btn {
  display: none; align-items: center; justify-content: center;
  width: 36px; height: 36px; border: none; background: transparent;
  border-radius: 9px; color: #334155; cursor: pointer;
}
.mobile-nav { display: none; border-top: 1px solid rgba(219,234,254,.6); background: rgba(255,255,255,.92); backdrop-filter: blur(12px); }
.mobile-nav .nav-link { padding: 12px 16px; font-weight: 500; }
.mobile-nav .me-line { padding: 10px 16px 12px; font-size: 14px; color: #475569; border-top: 1px solid rgba(219,234,254,.6); }
.main { max-width: 72rem; margin: 0 auto; padding: 18px 16px 40px; }

@media (max-width: 768px) {
  .nav, .header-user { display: none; }
  .menu-btn { display: inline-flex; }
  .mobile-nav.open { display: block; }
  .app-header-inner { height: 52px; padding: 0 12px; }
  .main { padding: 14px 12px 32px; }
  .brand-title { font-size: 14px; }
}

/* ---------- 页面元素 ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-title { font-size: 22px; margin: 0; font-weight: 600; }
.page-sub { font-size: 15px; color: #475569; margin: 4px 0 0; }
.panel { background: #fff; border-radius: 14px; padding: 18px; box-shadow: 0 4px 18px rgba(2,32,92,.06); margin-bottom: 16px; }
.mini-panel { margin: 0; }
.panel-title { margin: 0 0 12px; font-size: 17px; font-weight: 600; }
.panel-title.clickable { cursor: pointer; }
.panel-head-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs { display: inline-flex; gap: 4px; background: #eef2ff; padding: 4px; border-radius: 12px; flex-wrap: wrap; }
.tab { padding: 9px 16px; border-radius: 9px; font-size: 15px; color: #475569; background: transparent; border: none; cursor: pointer; }
.tab.active { background: #fff; color: #1d4ed8; font-weight: 600; box-shadow: 0 2px 6px rgba(2,32,92,.1); }
a.tab { text-decoration: none; }
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filter-bar .input { width: auto; }

/* 卡片 */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.card { background: #fff; border-radius: 14px; padding: 16px; box-shadow: 0 4px 18px rgba(2,32,92,.06); }
.card-grad { background: linear-gradient(135deg, #2563eb, #0ea5e9); color: #fff; }
.card-label { font-size: 13px; font-weight: 600; letter-spacing: .5px; color: #475569; margin-bottom: 4px; text-transform: uppercase; font-family: Consolas, Monaco, monospace; }
.card-num { font-size: 28px; font-weight: 600; line-height: 1.2; }
.card-num.green { color: #10b981; }
.card-num.blue { color: #2563eb; }
.card-num.red { color: #ef4444; }
.card-num.gray { color: #475569; }
.card-grad .card-label { color: rgba(255,255,255,.85); }
.card-grad .card-sub { color: rgba(255,255,255,.9); }
.card-sub { font-size: 14px; color: #64748b; margin-top: 2px; }
.welcome-bar { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 12px; }
.welcome-text { font-size: 17px; color: #1e293b; }

/* 表格 */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { background: #f1f5ff; color: #334155; text-align: left; padding: 11px 12px; white-space: nowrap; border-bottom: 1px solid #e2e8f0; font-weight: 600; }
.table td { padding: 11px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.table tr:hover td { background: #f8faff; }
.ops { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.empty { text-align: center; color: #94a3b8; padding: 24px 0; }

/* 徽章 */
.badge { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 14px; font-weight: 600; }
.badge-green { background: #ecfdf5; color: #047857; }
.badge-blue { background: #eff6ff; color: #1d4ed8; }
.badge-red { background: #fef2f2; color: #b91c1c; }
.badge-gray { background: #f1f5f9; color: #475569; }
.badge-gold { background: #fef3c7; color: #92400e; }

/* 图表 */
.chart-row { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.chart-box { width: min(100%, 340px); }
.legend { flex: 1; min-width: 180px; font-size: 15px; }
.legend-item { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.progress-list { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.progress-row { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.progress-label { width: 80px; flex-shrink: 0; }
.progress-track { flex: 1; height: 10px; background: #eef2ff; border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, #2563eb, #0ea5e9); border-radius: 99px; }
.progress-val { width: 60px; text-align: right; color: #475569; font-variant-numeric: tabular-nums; }

/* 库存卡片 */
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.item-card { background: #fff; border: 1px solid #eef2ff; border-radius: 14px; padding: 14px; box-shadow: 0 3px 12px rgba(2,32,92,.05); }
.item-thumb { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; margin-bottom: 10px; background: #f1f5ff; cursor: zoom-in; }
.item-name { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.stock-line { margin: 8px 0; font-size: 15px; }
.sku-row { display: flex; gap: 6px; }

/* 水印（Node: SVG 旋转 -20°，rgba(0,0,0,.07)，固定最上层） */
.watermark-layer {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  background-repeat: repeat;
}

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 16px; overflow-y: auto; }
.modal { background: #fff; border-radius: 16px; padding: 22px; width: min(94%, 460px); max-height: 88vh; max-height: 88dvh; margin: auto; overflow-y: auto; box-shadow: 0 20px 50px rgba(2,32,92,.25); }
.modal-title { font-size: 19px; font-weight: 600; margin: 0 0 16px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

/* 弹窗通用 */
.dialog-body { margin-bottom: 12px; font-size: 16px; line-height: 1.7; }

/* 响应式 */
@media (max-width: 768px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .filter-bar .input { width: 100%; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .form-grid { grid-template-columns: 1fr; }
  .card-num { font-size: 24px; }
}
