* { margin: 0; padding: 0; box-sizing: border-box; font-family: "Microsoft YaHei", "PingFang SC", sans-serif; }
body { background: #f0f4f8; color: #333; }
button { cursor: pointer; }

/* ========== 入口页(版本选择 + 登录) ========== */
.entry-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(135deg, #1565c0 0%, #1e88e5 50%, #26c6da 100%); padding: 20px; }
.entry-logo { text-align: center; margin-bottom: 36px; color: #fff; }
.entry-logo .logo-icon { font-size: 56px; }
.entry-logo h1 { font-size: 30px; letter-spacing: 4px; margin-top: 10px; }
.entry-logo p { opacity: .85; margin-top: 8px; font-size: 14px; letter-spacing: 2px; }
.version-cards { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.version-card { background: rgba(255,255,255,.95); border-radius: 16px; padding: 30px 44px; text-align: center; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,.18); transition: transform .2s, box-shadow .2s; width: 220px; }
.version-card:hover { transform: translateY(-6px); box-shadow: 0 14px 32px rgba(0,0,0,.25); }
.version-card .vc-icon { font-size: 52px; }
.version-card h3 { margin: 14px 0 6px; color: #1565c0; }
.version-card p { font-size: 13px; color: #789; }
.login-box { background: rgba(255,255,255,.97); border-radius: 16px; padding: 34px 40px; width: 380px; max-width: 94vw; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.login-box h2 { text-align: center; color: #1565c0; margin-bottom: 6px; }
.login-box .sub { text-align: center; color: #90a4ae; font-size: 13px; margin-bottom: 22px; }
.login-box label { display: block; font-size: 14px; color: #546e7a; margin: 12px 0 6px; }
.login-box input { width: 100%; padding: 11px 14px; border: 1px solid #cfd8dc; border-radius: 8px; font-size: 15px; }
.login-box input:focus { outline: none; border-color: #1e88e5; box-shadow: 0 0 0 3px rgba(30,136,229,.15); }
.login-err { color: #e53935; font-size: 13px; min-height: 20px; margin-top: 10px; text-align: center; }
.login-tip { margin-top: 12px; text-align: center; font-size: 12px; color: #90a4ae; }
.login-back { display: block; text-align: center; margin-top: 18px; color: #1e88e5; font-size: 14px; cursor: pointer; background: none; border: none; width: 100%; }

/* ========== 通用按钮 ========== */
.btn { border: none; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #eceff1; color: #37474f; }
.btn-primary { background: #1e88e5; color: #fff; }
.btn-primary:hover { background: #1976d2; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-danger { background: #ef5350; color: #fff; }

/* ========== 弹窗 ========== */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: none; align-items: center; justify-content: center; z-index: 100; }
.modal { background: #fff; border-radius: 12px; width: 560px; max-width: 94vw; max-height: 88vh; overflow: auto; padding: 22px 26px; }
.modal h3 { color: #1565c0; margin-bottom: 16px; }
.modal .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.form-item label { display: block; font-size: 13px; color: #607d8b; margin-bottom: 4px; }
.form-item input, .form-item select { width: 100%; padding: 8px 10px; border: 1px solid #cfd8dc; border-radius: 6px; font-size: 14px; }
.modal .modal-op { margin-top: 20px; text-align: right; }

/* ========== 工作台/统计通用 ========== */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { background: #fff; border-radius: 10px; padding: 18px; border-top: 4px solid #1e88e5; box-shadow: 0 2px 8px rgba(0,0,0,.06); cursor: pointer; transition: transform .15s; }
.stat-card:hover { transform: translateY(-3px); }
.sc-value { font-size: 26px; font-weight: bold; }
.sc-unit { font-size: 13px; font-weight: normal; margin-left: 4px; color: #90a4ae; }
.sc-name { color: #607d8b; font-size: 13px; margin-top: 6px; }
.dash-section h3, .chart-panel h3 { margin-bottom: 12px; color: #37474f; }
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 14px; background: #fff; padding: 20px; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.mod-card { text-align: center; cursor: pointer; padding: 12px 4px; border-radius: 10px; transition: background .15s; }
.mod-card:hover { background: #e3f2fd; }
.mod-icon { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; color: #fff; font-size: 26px; box-shadow: 0 3px 8px rgba(0,0,0,.18); }
.mod-name { display: block; margin-top: 8px; font-size: 13px; color: #455a64; }
.chart-panel { background: #fff; border-radius: 10px; padding: 20px; margin-bottom: 16px; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.bar-row { display: flex; align-items: center; margin-bottom: 10px; }
.bar-label { width: 90px; font-size: 13px; color: #546e7a; flex-shrink: 0; }
.bar-track { flex: 1; background: #eceff1; border-radius: 5px; height: 16px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 5px; transition: width .5s; min-width: 2px; }
.bar-num { width: 52px; text-align: right; font-size: 13px; color: #546e7a; flex-shrink: 0; }

/* ========== 列表 ========== */
.toolbar { display: flex; gap: 12px; margin-bottom: 14px; align-items: center; }
.search { flex: 1; max-width: 320px; padding: 9px 14px; border: 1px solid #cfd8dc; border-radius: 8px; font-size: 14px; background: #fff; }
.table-wrap { background: #fff; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.06); overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
th { background: #1565c0; color: #fff; padding: 11px 12px; text-align: left; font-weight: normal; }
td { padding: 10px 12px; border-bottom: 1px solid #eceff1; }
tbody tr:hover { background: #f5f9ff; }
.col-op { white-space: nowrap; }
.card-list { display: flex; flex-direction: column; gap: 12px; }
.data-card { background: #fff; border-radius: 10px; padding: 14px 16px; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.card-title { font-size: 16px; font-weight: bold; color: #1565c0; margin-bottom: 8px; }
.card-row { display: flex; font-size: 13px; padding: 3px 0; }
.cr-label { width: 110px; color: #90a4ae; flex-shrink: 0; }
.cr-value { color: #37474f; word-break: break-all; }
.card-op { margin-top: 10px; display: flex; gap: 10px; }

/* ========== 电脑版布局 ========== */
body[data-version="desktop"] .layout { display: flex; min-height: 100vh; }
.sidebar { width: 230px; background: #0d3c6e; color: #fff; display: flex; flex-direction: column; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side-brand { padding: 20px 18px; font-size: 17px; font-weight: bold; border-bottom: 1px solid rgba(255,255,255,.12); display: flex; align-items: center; gap: 10px; }
.menu { flex: 1; padding: 10px 0; }
.menu-group { padding: 12px 18px 6px; font-size: 12px; color: rgba(255,255,255,.45); }
.menu-item { display: flex; align-items: center; gap: 10px; padding: 9px 18px; cursor: pointer; font-size: 14px; color: rgba(255,255,255,.85); }
.menu-item:hover { background: rgba(255,255,255,.08); }
.menu-item.active { background: #1e88e5; color: #fff; }
.mi-icon { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.mi-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user { padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.12); font-size: 13px; }
.side-user .logout { margin-top: 8px; display: block; background: rgba(255,255,255,.12); color: #fff; border: none; border-radius: 6px; padding: 7px; width: 100%; font-size: 13px; }
.main { flex: 1; padding: 20px 26px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.topbar h2 { color: #0d3c6e; font-size: 20px; }
.topbar .date { color: #90a4ae; font-size: 13px; }

/* ========== 手机版布局 ========== */
body[data-version="mobile"] .mobile-header { position: sticky; top: 0; z-index: 50; background: #1565c0; color: #fff; padding: 14px 16px; display: flex; align-items: center; gap: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.mobile-header h2 { font-size: 17px; flex: 1; text-align: center; }
.back-btn { background: rgba(255,255,255,.18); border: none; color: #fff; border-radius: 6px; padding: 6px 12px; font-size: 14px; display: none; }
.logout-btn { background: rgba(255,255,255,.18); border: none; color: #fff; border-radius: 6px; padding: 6px 12px; font-size: 13px; }
.mobile-body { padding: 14px; }
.mobile-user { background: #fff; border-radius: 10px; padding: 12px 16px; margin-bottom: 14px; font-size: 13px; color: #607d8b; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
#menuView .module-grid { grid-template-columns: repeat(3, 1fr); padding: 16px 10px; gap: 10px; }
#menuView .mod-icon { width: 48px; height: 48px; font-size: 22px; }

@media (max-width: 480px) {
  .modal .form-grid { grid-template-columns: 1fr; }
  .bar-label { width: 70px; }
}
