* { box-sizing: border-box; }
html, body, #app { height: 100%; margin: 0; }
body { font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif; background: #f0f2f5; color: #303133; }

/* 登录页 */
.login-wrap { height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #4b6cb7 0%, #182848 100%); }
.login-card { width: 380px; max-width: 92vw; background: #fff; border-radius: 14px; padding: 36px 30px;
  box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.login-card h1 { font-size: 20px; text-align: center; margin: 0 0 6px; }
.login-card .sub { text-align: center; color: #909399; font-size: 13px; margin-bottom: 26px; }

/* 布局 */
.layout { height: 100%; display: flex; }
.sidebar { width: 220px; background: #001529; color: #fff; display: flex; flex-direction: column; transition: width .2s; overflow: hidden; }
.sidebar.collapsed { width: 64px; }
.logo { height: 56px; display: flex; align-items: center; gap: 8px; padding: 0 18px; font-weight: 700; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); white-space: nowrap; }
.logo .em { font-size: 22px; }
.logo .logo-img-full { height: 40px; max-width: 180px; object-fit: contain; }
.logo .logo-img-collapsed { height: 32px; width: 32px; object-fit: contain; }
.menu-scroll { flex: 1; overflow-y: auto; }
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.header { height: 56px; background: #fff; display: flex; align-items: center; padding: 0 16px; gap: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.06); z-index: 5; }
.header .title { font-weight: 600; font-size: 15px; }
.header .spacer { flex: 1; }
.content { flex: 1; overflow-y: auto; padding: 16px; }
.el-menu { border-right: none; }

/* 统计卡片 */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { background: #fff; border-radius: 10px; padding: 18px; box-shadow: 0 1px 6px rgba(0,0,0,.05); }
.stat .num { font-size: 26px; font-weight: 700; margin-top: 6px; }
.stat .lbl { color: #909399; font-size: 13px; }
.stat-clickable { cursor: pointer; transition: all 0.2s; }
.stat-clickable:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.1); background: #f5f7fa; }
.row-clickable { cursor: pointer; }
.row-clickable:hover { background: #f5f7fa !important; }

/* 图表区域 */
.charts-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 14px; margin-bottom: 16px; }
.chart-box { background: #fff; border-radius: 10px; padding: 16px; box-shadow: 0 1px 6px rgba(0,0,0,.05); }
.panel { background: #fff; border-radius: 10px; padding: 16px; box-shadow: 0 1px 6px rgba(0,0,0,.05); margin-bottom: 16px; }
.panel h3 { margin: 0 0 12px; font-size: 15px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.toolbar .spacer { flex: 1; }
.page-card { background: #fff; border-radius: 10px; padding: 16px; box-shadow: 0 1px 6px rgba(0,0,0,.05); }
.pager { margin-top: 14px; display: flex; justify-content: flex-end; }
.clickable { color: #409eff; cursor: pointer; }
.file-layout { display: flex; gap: 14px; min-height: 360px; }
.file-tree { width: 240px; border-right: 1px solid #ebeef5; padding-right: 10px; overflow:auto; }
.file-list { flex: 1; min-width: 0; }
.dot-status { display:inline-block; width:8px;height:8px;border-radius:50%;margin-right:5px;vertical-align:middle; }

/* 地址级联组件 */
.address-cascade { border: 1px solid #dcdfe6; border-radius: 4px; padding: 12px; background: #fafafa; }
.address-cascade .smart-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.address-cascade .smart-label { width: 80px; text-align: right; color: #606266; font-size: 14px; flex-shrink: 0; }
.address-cascade .smart-input { flex: 1; }
.address-cascade .smart-btn { flex-shrink: 0; }
.address-cascade .addr-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.address-cascade .addr-row:last-child { margin-bottom: 0; }
.address-cascade .addr-label { width: 80px; text-align: right; color: #606266; font-size: 14px; flex-shrink: 0; }
.address-cascade .addr-select { flex: 1; }
.address-cascade .addr-input { flex: 1; }

@media (max-width: 768px) {
  .address-cascade .smart-row { flex-wrap: wrap; }
  .address-cascade .smart-label { width: 100%; text-align: left; margin-bottom: 4px; }
  .address-cascade .smart-btn { width: 100%; margin-top: 4px; }
  .address-cascade .addr-label { width: 70px; font-size: 13px; }
}

/* 移动端 */
.menu-mask { display:none; }
@media (max-width: 768px) {
  .sidebar { position: fixed; z-index: 100; height: 100%; left: 0; top: 0; box-shadow: 2px 0 12px rgba(0,0,0,.2); }
  .sidebar.mobile-hidden { left: -240px; }
  .menu-mask { display:block; position:fixed; inset:0; background:rgba(0,0,0,.4); z-index:99; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .content { padding: 10px; }
  .file-layout { flex-direction: column; }
  .file-tree { width: 100%; border-right: none; border-bottom: 1px solid #ebeef5; padding: 0 0 10px; }
}

/* 搜索框 */
.search-box { position: relative; display: inline-block; }
.search-box .search-placeholder {
  position: absolute; left: 38px; top: 50%; transform: translateY(-50%);
  color: #c0c4cc; font-size: 13px; pointer-events: none;
  transition: color 0.2s;
}
.search-box.focused .search-placeholder { color: #fff; }
.search-box.active .search-placeholder { display: none; }
.search-mode-hint {
  position: absolute; left: 290px; top: 50%; transform: translateY(-50%);
  font-size: 12px; color: #409eff; pointer-events: none;
}
.addr-tag {
  display: inline-block; padding: 0 6px; margin-right: 4px;
  background: #ecf5ff; color: #409eff; border-radius: 3px;
  font-size: 11px; font-weight: 500;
}
