/* ===== 全局 ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif; background: #f0f2f5; color: #333; font-size: 14px; line-height: 1.6; }
a { color: #1a6cff; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== 登录页 ===== */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.login-box { background: #fff; padding: 40px 30px; border-radius: 16px; width: 360px; max-width: 92%; box-shadow: 0 20px 60px rgba(0,0,0,0.15); text-align: center; }
.login-logo { font-size: 48px; margin-bottom: 10px; }
.login-box h1 { font-size: 20px; color: #333; margin-bottom: 24px; font-weight: 600; }

/* ===== 表单 ===== */
.field { margin-bottom: 16px; text-align: left; }
.field label { display: block; font-size: 13px; color: #666; margin-bottom: 4px; font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; padding: 10px 12px; border: 1px solid #d9d9d9; border-radius: 8px; font-size: 14px; outline: none; transition: border 0.2s; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #1a6cff; box-shadow: 0 0 0 3px rgba(26,108,255,0.12); }
.field textarea { resize: vertical; min-height: 60px; }

.btn { display: inline-block; padding: 10px 20px; border: none; border-radius: 8px; font-size: 14px; cursor: pointer; font-weight: 500; transition: all 0.2s; text-align: center; }
.btn-primary { background: #1a6cff; color: #fff; }
.btn-primary:hover { background: #1557d4; }
.btn-danger { background: #ff4d4f; color: #fff; }
.btn-danger:hover { background: #d9363e; }
.btn-outline { background: #fff; color: #666; border: 1px solid #d9d9d9; }
.btn-outline:hover { border-color: #1a6cff; color: #1a6cff; }
.btn-success { background: #52c41a; color: #fff; }
.btn-success:hover { background: #45a818; }
.btn-full { width: 100%; padding: 12px; font-size: 16px; }
.btn-sm { padding: 5px 12px; font-size: 12px; }

.msg { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 13px; }
.msg.error { background: #fff2f0; border: 1px solid #ffccc7; color: #ff4d4f; }
.msg.success { background: #f6ffed; border: 1px solid #b7eb8f; color: #52c41a; }
.msg.info { background: #e6f7ff; border: 1px solid #91d5ff; color: #1890ff; }
.msg.warning { background: #fffbe6; border: 1px solid #ffe58f; color: #faad14; }

/* ===== 顶栏 ===== */
.topbar { background: #001529; color: #fff; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; }
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-logo { font-size: 20px; }
.topbar-title { font-size: 16px; font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.topbar-user { opacity: 0.8; }
.topbar a { color: #fff; opacity: 0.85; }
.topbar a:hover { opacity: 1; text-decoration: none; }

/* ===== 容器 ===== */
.container { max-width: 960px; margin: 0 auto; padding: 16px; }

/* ===== 统计卡片 ===== */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.stat-card { background: #fff; padding: 14px; border-radius: 10px; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.stat-num { font-size: 24px; font-weight: 700; }
.stat-label { font-size: 12px; color: #999; margin-top: 2px; }
.stat-card.urgent .stat-num { color: #ff4d4f; }
.stat-card.warning .stat-num { color: #faad14; }
.stat-card.ok .stat-num { color: #52c41a; }
.stat-card.total .stat-num { color: #1a6cff; }

/* ===== 功能按钮栏 ===== */
.toolbar { margin-bottom: 16px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ===== 案件卡片 ===== */
.case-card { background: #fff; border-radius: 12px; padding: 16px; margin-bottom: 12px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); border-left: 4px solid #d9d9d9; transition: box-shadow 0.2s; }
.case-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.case-card.urgent { border-left-color: #ff4d4f; }
.case-card.warning { border-left-color: #faad14; }
.case-card.ok { border-left-color: #52c41a; }
.case-card.finished { border-left-color: #999; opacity: 0.7; }

.case-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.case-title { font-size: 16px; font-weight: 600; color: #001529; }
.case-number { font-size: 12px; color: #999; }

.case-body { font-size: 13px; color: #666; }
.case-body .row { display: flex; margin-bottom: 4px; }
.case-body .row .label { width: 72px; flex-shrink: 0; color: #999; }
.case-body .row .value { flex: 1; }

.case-members { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.member-tag { background: #e6f7ff; color: #1890ff; padding: 2px 10px; border-radius: 12px; font-size: 12px; }
.member-tag.admin-tag { background: #fff7e6; color: #fa8c16; }

.case-actions { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }

/* ===== 紧急标记 ===== */
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 500; }
.badge-danger { background: #fff1f0; color: #ff4d4f; }
.badge-warning { background: #fffbe6; color: #faad14; }
.badge-ok { background: #f6ffed; color: #52c41a; }
.badge-info { background: #e6f7ff; color: #1890ff; }

/* ===== 日期高亮 ===== */
.date-highlight { color: #ff4d4f; font-weight: 600; }

/* ===== 空状态 ===== */
.empty { text-align: center; padding: 60px 20px; color: #bbb; }
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-text { font-size: 14px; }

/* ===== 表单页面 ===== */
.form-page { max-width: 600px; margin: 0 auto; }
.form-page h2 { font-size: 18px; margin-bottom: 20px; color: #001529; }
.form-card { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.form-actions { margin-top: 20px; display: flex; gap: 10px; }

/* ===== 复选框组 ===== */
.checkbox-group { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.checkbox-item { display: flex; align-items: center; gap: 6px; padding: 6px 12px; background: #f5f5f5; border-radius: 6px; font-size: 13px; cursor: pointer; }
.checkbox-item input[type="checkbox"] { width: auto; }
.checkbox-item.selected { background: #e6f7ff; color: #1890ff; }

/* ===== 筛选栏 ===== */
.filter-bar { background: #fff; border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.filter-bar .filter-left, .filter-bar .filter-right { display: flex; align-items: center; gap: 8px; }
.filter-bar select, .filter-bar input { padding: 6px 10px; border: 1px solid #d9d9d9; border-radius: 6px; font-size: 13px; outline: none; }
.filter-bar select:focus, .filter-bar input:focus { border-color: #1a6cff; }
.search-input { width: 220px; }
@media (max-width: 600px) {
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar .filter-right form { width: 100%; }
  .search-input { width: auto; flex: 1; }
}

/* ===== 详情页 ===== */
.detail-header { background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 16px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.detail-header h2 { font-size: 20px; margin-bottom: 4px; }
.detail-meta { font-size: 13px; color: #999; margin-bottom: 8px; }
.detail-section { background: #fff; border-radius: 12px; padding: 16px 20px; margin-bottom: 12px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.detail-section h3 { font-size: 15px; color: #001529; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #f0f0f0; }
.detail-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.detail-table th, .detail-table td { padding: 8px 4px; text-align: left; border-bottom: 1px solid #f5f5f5; }
.detail-table th { color: #999; font-weight: 500; width: 80px; }

/* ===== 进展时间线 ===== */
.timeline { position: relative; padding-left: 20px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 0; bottom: 0; width: 2px; background: #e8e8e8; }
.timeline-item { position: relative; padding-bottom: 16px; }
.timeline-item::before { content: ''; position: absolute; left: -14px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: #1a6cff; }
.timeline-item .time { font-size: 12px; color: #999; margin-bottom: 2px; }
.timeline-item .content { font-size: 13px; color: #333; }

/* ===== 开庭提醒横幅 ===== */
.alert-banner { background: linear-gradient(135deg, #fff7e6 0%, #fff1f0 100%); border: 1px solid #ffd591; border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; box-shadow: 0 2px 8px rgba(255,77,79,0.1); }
.alert-icon { font-size: 24px; flex-shrink: 0; }
.alert-content { font-size: 13px; color: #333; line-height: 1.8; }
.alert-item { display: inline-block; }
.alert-item.urgent { color: #ff4d4f; font-weight: 600; }

/* ===== 老钟风格开庭弹窗 ===== */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 1000; display: flex; align-items: center; justify-content: center; animation: fadeIn 0.3s; }
.modal-overlay.hide { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box { background: #fff; border-radius: 16px; width: 380px; max-width: 92%; box-shadow: 0 20px 60px rgba(0,0,0,0.3); overflow: hidden; animation: slideUp 0.3s; }
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header { background: linear-gradient(135deg, #ff4d4f 0%, #ff7a45 100%); color: #fff; padding: 20px; text-align: center; }
.modal-icon { font-size: 36px; display: block; margin-bottom: 6px; }
.modal-title { font-size: 18px; font-weight: 600; }
.modal-body { padding: 20px; max-height: 60vh; overflow-y: auto; }
.modal-clock { text-align: center; padding: 16px; background: #fff7e6; border-radius: 12px; margin-bottom: 16px; }
.clock-icon { font-size: 32px; }
.clock-text { font-size: 14px; color: #999; margin: 4px 0; }
.clock-countdown { font-size: 28px; font-weight: 700; color: #ff4d4f; }
.modal-case { background: #fafafa; border-radius: 10px; padding: 12px; margin-bottom: 10px; border-left: 3px solid #ff4d4f; }
.modal-case-title { font-size: 14px; font-weight: 600; color: #001529; margin-bottom: 4px; }
.modal-case-info { font-size: 12px; color: #666; margin-bottom: 2px; }
.modal-footer { padding: 0 20px 20px; }
@media (max-width: 600px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .topbar-title { font-size: 14px; }
  .case-header { flex-direction: column; }
  .case-number { margin-top: 2px; }
  .login-box { padding: 30px 20px; }
}
