/* 易路发后台管理系统 - 商务深蓝风格 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Microsoft YaHei', sans-serif; background: #f0f2f5; color: #333; font-size: 14px; }
#app { display: flex; min-height: 100vh; }

/* 侧边栏 */
.sidebar { width: 220px; background: linear-gradient(180deg, #1A1A2E 0%, #16213E 100%); color: #fff; flex-shrink: 0; display: flex; flex-direction: column; position: fixed; height: 100vh; overflow-y: auto; }
.sidebar-header { padding: 28px 24px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.logo { font-size: 24px; font-weight: bold; }
.subtitle { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 4px; }
.sidebar-nav { flex: 1; padding: 12px 0; }
.nav-item { display: flex; align-items: center; padding: 14px 24px; color: rgba(255,255,255,0.7); text-decoration: none; font-size: 14px; cursor: pointer; transition: all 0.2s; }
.nav-item:hover { background: rgba(255,255,255,0.05); color: #fff; }
.nav-item.active { background: rgba(255,255,255,0.1); color: #fff; border-left: 3px solid #fff; }
.nav-icon { margin-right: 10px; font-size: 16px; }

/* 主内容 */
.main-content { flex: 1; margin-left: 220px; display: flex; flex-direction: column; min-height: 100vh; }
.topbar { height: 60px; background: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); position: sticky; top: 0; z-index: 10; }
.topbar h1 { font-size: 18px; font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.btn-logout { background: none; border: 1px solid #ddd; color: #666; padding: 6px 16px; border-radius: 4px; cursor: pointer; font-size: 13px; }
.btn-logout:hover { border-color: #1A1A2E; color: #1A1A2E; }
.page-content { padding: 24px; flex: 1; }

/* 卡片 */
.card { background: #fff; border-radius: 8px; padding: 20px; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.card-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #f0f0f0; }

/* 统计卡片 */
.stats-row { display: flex; gap: 20px; margin-bottom: 20px; }
.stat-box { flex: 1; background: #fff; border-radius: 8px; padding: 24px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.stat-box .stat-label { font-size: 13px; color: #999; }
.stat-box .stat-value { font-size: 28px; font-weight: bold; color: #1A1A2E; margin-top: 8px; }
.stat-box .stat-icon { font-size: 32px; float: right; opacity: 0.2; }

/* 图表 */
.chart-row { display: flex; gap: 20px; margin-bottom: 20px; }
.chart-box { flex: 1; background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.chart-container { height: 300px; }

/* 续费明细弹窗头部摘要 */
.renewal-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  background: #f7f8fa;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #555;
}
.renewal-head b { color: #1a1a2e; font-weight: 600; }

/* 排行榜角色切换 */
.rank-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.rank-tab { background: #f5f5f5; border: none; padding: 5px 12px; border-radius: 4px; cursor: pointer; font-size: 13px; color: #666; }
.rank-tab.active { background: #1A1A2E; color: #fff; }
.rank-tab:hover { background: #e8e8e8; }
.rank-tab.active:hover { background: #1A1A2E; }

/* 表格 */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #f0f0f0; font-size: 14px; }
th { background: #fafafa; font-weight: 600; color: #666; }
tr:hover { background: #fafafa; }

/* 按钮 */
.btn { background: #1A1A2E; color: #fff; border: none; padding: 8px 20px; border-radius: 4px; cursor: pointer; font-size: 14px; }
.btn:hover { opacity: 0.9; }
.btn-sm { padding: 4px 12px; font-size: 12px; }
.btn-danger { background: #ee0a24; }
.btn-success { background: #07c160; }
.btn-warning { background: #e67e22; }
.btn-outline { background: #fff; color: #1A1A2E; border: 1px solid #1A1A2E; }
.btn-outline:hover { background: #f5f5f5; }

/* 表单 */
.form-row { display: flex; align-items: center; margin-bottom: 16px; gap: 12px; }
.form-label { width: 120px; font-size: 14px; color: #666; text-align: right; }
.form-input, .form-select { flex: 1; max-width: 400px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; }
.form-input:focus, .form-select:focus { border-color: #1A1A2E; outline: none; }

/* 标签 */
.tag { display: inline-block; padding: 2px 10px; border-radius: 4px; font-size: 12px; }
.tag-blue { background: #e6f0ff; color: #1A1A2E; }
.tag-green { background: #e8f8e8; color: #07c160; }
.tag-red { background: #ffe8e8; color: #ee0a24; }
.tag-orange { background: #fff3e0; color: #ff9900; }

/* 弹窗 */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 100; display: flex; align-items: center; justify-content: center; }
.modal-box { background: #fff; border-radius: 8px; padding: 30px; width: 500px; max-width: 90%; }
.modal-title { font-size: 18px; font-weight: 600; margin-bottom: 20px; }
.modal-section { margin-bottom: 18px; }
.modal-subtitle { font-size: 14px; font-weight: 600; color: #1A1A2E; margin-bottom: 8px; padding-left: 8px; border-left: 3px solid #1989fa; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 20px; }

/* 登录 */
.login-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(135deg, #1A1A2E 0%, #0F3460 100%); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.login-box { background: #fff; border-radius: 12px; padding: 40px; width: 380px; text-align: center; }
.login-box h2 { margin-bottom: 30px; color: #1A1A2E; }
.login-box input { width: 100%; padding: 12px 16px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; margin-bottom: 16px; }
.login-box button { width: 100%; padding: 14px; background: #1A1A2E; color: #fff; border: none; border-radius: 6px; font-size: 16px; cursor: pointer; }
.login-box button:hover { opacity: 0.9; }

/* 筛选栏 */
.filter-bar { display: flex; gap: 16px; margin-bottom: 20px; align-items: center; }
.filter-bar select, .filter-bar input { padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; }

.empty { text-align: center; padding: 40px; color: #999; }

/* 客户到期倒计时配色 */
.d-red { color: #ee0a24; font-weight: 700; }
.d-orange { color: #ff976a; font-weight: 700; }
.d-normal { color: #07c160; font-weight: 600; }
.d-stopped { color: #999; font-weight: 600; }

/* 客户到期 - 分类标签 */
.filter-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.ftab { padding: 7px 16px; border: 1px solid #ddd; background: #fff; color: #666; border-radius: 18px; cursor: pointer; font-size: 13px; transition: all .15s; }
.ftab b { font-weight: 700; margin-left: 2px; }
.ftab:hover { border-color: #1A1A2E; color: #1A1A2E; }
.ftab.active { background: #1A1A2E; color: #fff; border-color: #1A1A2E; }
.ftab.urgent.active { background: #ee0a24; border-color: #ee0a24; }
.ftab.warning.active { background: #ff976a; border-color: #ff976a; }
.ftab.normal.active { background: #07c160; border-color: #07c160; }
.ftab.stopped.active { background: #999; border-color: #999; }

/* 客户到期 - 行内操作按钮 */
.row-btn { padding: 5px 14px; border-radius: 4px; cursor: pointer; font-size: 13px; border: 1px solid transparent; }
.row-btn.stop { background: #fff0f0; color: #ee0a24; border-color: #ee0a24; }
.row-btn.stop:hover { background: #ee0a24; color: #fff; }
.row-btn.resume { background: #eafaf0; color: #07c160; border-color: #07c160; }
.row-btn.resume:hover { background: #07c160; color: #fff; }
.row-btn:disabled { opacity: 0.6; cursor: default; }
