/* ========== 公共导航 ========== */
.top-nav {
  display: flex; align-items: center; justify-content: space-between;
  background: #1a1a2e; color: #eee; padding: 0 24px; height: 52px;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.nav-brand { color: #4fc3f7; font-size: 18px; font-weight: 700; text-decoration: none; }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  color: #ccc; text-decoration: none; padding: 6px 14px; border-radius: 6px;
  font-size: 14px; transition: background .2s;
}
.nav-links a:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav-user { color: #4fc3f7; font-size: 13px; margin: 0 8px; }
.nav-logout { color: #ef5350 !important; }

/* ========== Toast 通知 ========== */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  padding: 10px 24px; border-radius: 8px; color: #fff; font-size: 14px;
  z-index: 9999; animation: toastIn .3s ease;
}
.toast-info { background: #1976d2; }
.toast-success { background: #388e3c; }
.toast-error { background: #d32f2f; }
.toast-warn { background: #f57c00; }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(20px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ========== 页面基础 ========== */
body { margin: 0; font-family: -apple-system, 'Microsoft YaHei', sans-serif; background: #f5f6fa; }
.page-container { max-width: 96vw; margin: 0 auto; padding: 20px; }
.card { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.08); margin-bottom: 16px; }
.btn {
  padding: 8px 18px; border: none; border-radius: 6px; cursor: pointer;
  font-size: 14px; transition: opacity .2s;
}
.btn:hover { opacity: .85; }
.btn-primary { background: #1976d2; color: #fff; }
.btn-danger { background: #d32f2f; color: #fff; }
.btn-success { background: #388e3c; color: #fff; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eee; font-size: 14px; }
th { background: #f8f9fa; font-weight: 600; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 4px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px;
  font-size: 14px; box-sizing: border-box;
}

/* ========== 固定操作栏 ========== */
.sticky-actions {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1050;
  background: #fff; border-top: 2px solid #e0e0e0; padding: 10px 24px;
  display: flex; gap: 10px; align-items: center;
  box-shadow: 0 -2px 8px rgba(0,0,0,.1);
}
.sticky-actions .btn { min-width: 100px; }
body.has-sticky-actions { padding-bottom: 60px; }

/* ========== 折叠面板（查看模式表格）========== */
.team-details-collapse {
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 6px 12px;
  margin-bottom: 8px;
  background: #fafbfc;
}
.team-details-collapse summary {
  padding: 6px 0;
  outline: none;
  user-select: none;
}
.team-details-collapse summary:hover {
  color: #0056b3;
}
.team-details-collapse[open] summary {
  border-bottom: 1px solid #e9ecef;
  margin-bottom: 6px;
  padding-bottom: 10px;
}

/* ========== 页面标题栏（统一样式）========== */
.page-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 2px solid #1976d2;
}
.page-header h1 { font-size: 20px; font-weight: 700; margin: 0; color: #111; }

/* ========== 统计卡片行 ========== */
.stats-row { display: flex; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.stat-card { background: #fff; padding: 12px 20px; border-radius: 8px; text-align: center; min-width: 90px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.stat-card .num { font-size: 22px; font-weight: 700; color: #1976d2; }
.stat-card .label { font-size: 12px; color: #888; margin-top: 2px; }

/* 移动端：隐藏顶部导航栏 */
@media (max-width: 768px) {
  .top-nav { display: none !important; }
  .container { padding: 8px !important; }
}

/* 年月选择器微调 */

/* 移动端表单折叠 */
@media (max-width:768px){.form-row-collapse .form-group:nth-child(n+4){display:none}.form-row-collapse.expanded .form-group{display:block}}
/* Mobile responsive */
@media (max-width:768px){
  table{font-size:12px}
  table th,table td{padding:4px 6px;white-space:nowrap}
  .table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch}
  .top-nav{flex-direction:column;align-items:flex-start}
  .top-nav .nav-links{flex-wrap:wrap;gap:4px;font-size:12px}
  .stat-cards{gap:8px}
  .stat-card{padding:10px 12px;min-width:120px;flex:1 1 45%}
  .stat-card .num{font-size:20px}
  .modal-dialog{max-width:95vw;margin:10px auto}
  .form-row{flex-direction:column}
  .form-group{width:100%!important}
}
/* 工作台待办折叠 */
.todo-group.collapsed .todo-group-body { display: none; }
.todo-group-header { cursor: pointer; user-select: none; }
.todo-group-header:hover { opacity: 0.8; }

