/* admin.css - 威迪高尔夫后台管理样式 */

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif; background: #f0f2f5; color: #333; }

/* 登录页 */
.login-container { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1a5c2a 0%, #2d8a4e 50%, #1a5c2a 100%); }
.login-card { background: #fff; border-radius: 20px; padding: 50px 40px; width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.login-header { text-align: center; margin-bottom: 36px; }
.login-header h1 { font-size: 32px; color: #1a5c2a; letter-spacing: 4px; }
.login-header p { font-size: 14px; color: #999; margin-top: 8px; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; color: #666; margin-bottom: 8px; font-weight: 500; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 16px; border: 1px solid #ddd; border-radius: 10px;
  font-size: 15px; outline: none; transition: border-color .2s;
}
.form-group input:focus, .form-group textarea:focus { border-color: #1a5c2a; }
.captcha-row { display: flex; gap: 12px; }
.captcha-row input { flex: 1; }
.captcha-img { width: 120px; height: 44px; border-radius: 8px; cursor: pointer; border: 1px solid #ddd; background: #f5f5f5; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #999; }

.btn-login { width: 100%; padding: 14px; background: linear-gradient(135deg, #1a5c2a, #2d8a4e); color: #fff; border: none; border-radius: 10px; font-size: 17px; font-weight: bold; cursor: pointer; }
.btn-login:hover { opacity: 0.9; }
.login-error { color: #e74c3c; font-size: 13px; text-align: center; margin-bottom: 14px; padding: 8px; background: #fef0f0; border-radius: 6px; }

/* 主界面 */
.main-container { display: flex; min-height: 100vh; }

/* 侧边栏 */
.sidebar { width: 220px; background: #1a1f36; color: #fff; display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; z-index: 100; }
.sidebar-header { padding: 24px 20px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.sidebar-header h2 { font-size: 20px; letter-spacing: 3px; }
.sidebar-header span { font-size: 12px; color: rgba(255,255,255,0.5); display: block; margin-top: 4px; }

.sidebar-nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 14px 20px; color: rgba(255,255,255,0.65); text-decoration: none; font-size: 14px; transition: all .2s; cursor: pointer; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,0.05); }
.nav-item.active { color: #fff; background: rgba(26,92,42,0.4); border-right: 3px solid #2d8a4e; }
.nav-icon { font-size: 18px; width: 24px; text-align: center; }

.sidebar-footer { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.08); }
.user-display { font-size: 13px; color: rgba(255,255,255,0.6); display: block; margin-bottom: 8px; }
.btn-logout { width: 100%; padding: 8px; background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7); border: 1px solid rgba(255,255,255,0.15); border-radius: 6px; font-size: 13px; cursor: pointer; }
.btn-logout:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* 内容区 */
.content { flex: 1; margin-left: 220px; padding: 24px 30px; }
.page { display: none; }
.page.active { display: block; }

.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.page-header h2 { font-size: 24px; color: #1a1f36; }

.btn-primary {
  padding: 10px 24px; background: #1a5c2a; color: #fff; border: none;
  border-radius: 8px; font-size: 14px; cursor: pointer; font-weight: 500;
}
.btn-primary:hover { background: #2d8a4e; }
.btn-outline {
  padding: 8px 18px; background: transparent; color: #1a5c2a; border: 1px solid #1a5c2a;
  border-radius: 8px; font-size: 13px; cursor: pointer;
}
.btn-danger { padding: 8px 18px; background: #e74c3c; color: #fff; border: none; border-radius: 8px; font-size: 13px; cursor: pointer; }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 6px; margin: 0 3px; }
.btn-info { padding: 8px 18px; background: #3498db; color: #fff; border: none; border-radius: 8px; font-size: 13px; cursor: pointer; }
.btn-warn { padding: 8px 18px; background: #e8a33d; color: #fff; border: none; border-radius: 8px; font-size: 13px; cursor: pointer; }
.btn-warn:hover { background: #d4902e; }
.btn-gray { padding: 8px 18px; background: #6c7a89; color: #fff; border: none; border-radius: 8px; font-size: 13px; cursor: pointer; }
.btn-gray:hover { background: #5a6673; }

/* 余额流水 */
.log-summary {
  display: flex; gap: 12px; margin-bottom: 16px;
}
.log-summary > div {
  flex: 1; background: #f7f9f8; border-radius: 10px; padding: 12px 14px;
}
.log-summary span { display: block; font-size: 12px; color: #8a968f; margin-bottom: 6px; }
.log-summary b { font-size: 18px; font-weight: 700; color: #1c1c1c; }

.log-table-wrap {
  max-height: 420px; overflow-y: auto;
  border: 1px solid #eef1ef; border-radius: 10px;
}
.log-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.log-table th {
  position: sticky; top: 0; background: #f7f9f8; z-index: 1;
  padding: 10px 12px; text-align: left; font-weight: 600;
  color: #5f6b65; font-size: 12px; border-bottom: 1px solid #eef1ef;
}
.log-table td { padding: 10px 12px; border-bottom: 1px solid #f4f6f5; color: #444; }
.log-table tbody tr:last-child td { border-bottom: none; }
.log-table tbody tr:hover { background: #fafcfb; }

.log-tag {
  display: inline-block; padding: 2px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
}
.log-in { background: rgba(26,92,42,0.1); color: #1a5c2a; }
.log-out { background: rgba(231,76,60,0.1); color: #c0392b; }
.log-adjust { background: rgba(52,152,219,0.1); color: #2471a3; }
.amt-in { color: #1a5c2a; font-weight: 700; }
.amt-out { color: #c0392b; font-weight: 700; }
.log-op { font-size: 11px; color: #a0aaa5; margin-top: 2px; }

/* 统计卡片 */
.stats-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: 14px; padding: 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.stat-value { font-size: 36px; font-weight: bold; color: #1a5c2a; }
.stat-label { font-size: 14px; color: #999; margin-top: 6px; }

.dashboard-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.dash-card { background: #fff; border-radius: 14px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.dash-card h3 { font-size: 16px; margin-bottom: 14px; color: #1a1f36; }
.dash-table table { width: 100%; font-size: 13px; border-collapse: collapse; }
.dash-table th { text-align: left; padding: 10px 8px; color: #999; font-weight: 500; border-bottom: 1px solid #f0f0f0; }
.dash-table td { padding: 10px 8px; border-bottom: 1px solid #f5f5f5; }

/* 筛选栏 */
.filter-bar { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-bar input, .filter-bar select { padding: 8px 14px; border: 1px solid #ddd; border-radius: 8px; font-size: 13px; outline: none; }

/* 数据表格 */
.data-table { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.data-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { background: #fafbfc; padding: 14px 16px; text-align: left; font-weight: 500; color: #666; border-bottom: 1px solid #eee; }
.data-table td { padding: 14px 16px; border-bottom: 1px solid #f5f5f5; }
.data-table tr:hover td { background: #fafbfc; }

.status-tag { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; }
.status-confirmed { background: rgba(26,92,42,0.1); color: #1a5c2a; }
.status-cancelled { background: rgba(231,76,60,0.1); color: #e74c3c; }
.status-completed { background: rgba(52,152,219,0.1); color: #3498db; }

.pagination { display: flex; justify-content: center; gap: 8px; padding: 20px 0; }
.pagination button { padding: 6px 14px; border: 1px solid #ddd; border-radius: 6px; background: #fff; cursor: pointer; font-size: 13px; }
.pagination button.active { background: #1a5c2a; color: #fff; border-color: #1a5c2a; }

/* 设置页 */
.settings-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.setting-card { background: #fff; border-radius: 14px; padding: 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.setting-card h3 { font-size: 16px; margin-bottom: 18px; color: #1a1f36; border-bottom: 1px solid #f0f0f0; padding-bottom: 12px; }

/* 弹窗 */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 200; display: flex; align-items: center; justify-content: center; }
.modal-content { background: #fff; border-radius: 16px; padding: 30px; width: 520px; max-height: 80vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.modal-content h3 { margin-bottom: 20px; font-size: 18px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }

.bay-item-admin { display:flex; justify-content:space-between; align-items:center; padding:12px 0; border-bottom:1px solid #f0f0f0; font-size:14px; gap:12px; }
.bay-item-admin:last-child { border-bottom:none; }
.bay-info-admin { display:flex; flex-direction:column; gap:3px; min-width:0; flex:1; }
.bay-name-admin { font-size:14px; font-weight:600; color:#222; }
.bay-desc-admin { font-size:12px; color:#94a09a; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bay-actions { display:flex; flex-shrink:0; }

/* 时段管理面板 */
.timeslot-panel { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ts-hint { font-size: 12px; color: #8a968f; margin: -6px 0 14px; line-height: 1.6; }
.ts-day-group { background: #f9fafb; border-radius: 10px; padding: 14px; border: 1px solid transparent; }
.ts-today { background: #f2f8f4; border-color: #cfe3d6; }
.ts-day-header { font-size: 14px; font-weight: bold; color: #1a1f36; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid #eee; display: flex; align-items: baseline; gap: 6px; }
.ts-today .ts-day-header { color: #1a5c2a; border-bottom-color: #cfe3d6; }
.ts-date { font-size: 12px; font-weight: 400; color: #8a968f; }
.ts-count { margin-left: auto; font-weight: 400; color: #999; font-size: 12px; }
.ts-today .ts-count { color: #2d8a4e; }
.ts-seg { margin-bottom: 6px; }
.ts-seg-label { font-size: 11px; color: #aaa; display: block; margin-bottom: 4px; }
.ts-toggle { display: flex; justify-content: space-between; align-items: center; padding: 3px 6px; cursor: pointer; border-radius: 4px; margin-bottom: 2px; font-size: 12px; }
.ts-toggle:hover { background: #e8f5e9; }
.ts-on { background: rgba(26,92,42,0.06); }
.ts-switch { font-size: 14px; }
.ts-on .ts-switch { color: #1a5c2a; }
.ts-toggle:not(.ts-on) .ts-switch { color: #ccc; }
.ts-past { cursor: not-allowed; opacity: 0.45; background: repeating-linear-gradient(45deg, #f4f4f4, #f4f4f4 6px, #ececec 6px, #ececec 12px); }
.ts-past:hover { background: repeating-linear-gradient(45deg, #f4f4f4, #f4f4f4 6px, #ececec 6px, #ececec 12px); }
.ts-past span:first-child { text-decoration: line-through; color: #aaa; }
.ts-past .ts-switch { color: #bbb; }

/* 响应式 */
@media (max-width: 768px) {
  .sidebar { width: 60px; }
  .sidebar-header h2, .sidebar-header span, .nav-item span:not(.nav-icon), .user-display, .sidebar-footer button { display: none; }
  .content { margin-left: 60px; }
  .stats-cards { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; }
}