/* ==================== 全局样式 ==================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #4A90D9;
  --primary-dark: #357ABD;
  --success: #52C41A;
  --warning: #FAAD14;
  --danger: #F5222D;
  --bg: #F0F2F5;
  --bg-card: #FFFFFF;
  --text: #333333;
  --text-secondary: #666666;
  --text-light: #999999;
  --border: #E8E8E8;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --radius: 8px;
  --transition: all 0.3s ease;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ==================== 登录页 ==================== */
.login-container {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}
.login-card {
  background: white; border-radius: 16px; padding: 40px;
  width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.login-header { text-align: center; margin-bottom: 30px; }
.login-icon { font-size: 48px; margin-bottom: 10px; }
.login-header h1 { font-size: 24px; color: var(--text); margin-bottom: 8px; }
.login-header p { color: var(--text-secondary); font-size: 14px; }
.login-form .form-group { margin-bottom: 16px; }
.login-form label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 14px; }
.login-form input {
  width: 100%; padding: 12px 16px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 14px; transition: var(--transition);
}
.login-form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(74,144,217,0.2); }
.login-hint { text-align: center; margin-top: 16px; color: var(--text-light); font-size: 12px; }

/* ==================== 按钮 ==================== */
.btn-primary {
  background: var(--primary); color: white; border: none;
  padding: 8px 20px; border-radius: 6px; cursor: pointer;
  font-size: 14px; transition: var(--transition);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-secondary {
  background: white; color: var(--text); border: 1px solid var(--border);
  padding: 8px 20px; border-radius: 6px; cursor: pointer;
  font-size: 14px; transition: var(--transition);
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

.btn-danger {
  background: var(--danger); color: white; border: none;
  padding: 6px 14px; border-radius: 6px; cursor: pointer; font-size: 13px;
}
.btn-danger:hover { opacity: 0.85; }

.btn-sm {
  padding: 4px 12px; font-size: 12px; border-radius: 4px;
  border: 1px solid var(--border); background: white; cursor: pointer;
  transition: var(--transition);
}
.btn-sm:hover { border-color: var(--primary); color: var(--primary); }

.btn-block { width: 100%; }
.btn-icon {
  background: none; border: none; cursor: pointer;
  font-size: 18px; padding: 6px; border-radius: 6px; transition: var(--transition);
}
.btn-icon:hover { background: rgba(0,0,0,0.05); }

.btn-today {
  background: var(--primary); color: white; border-color: var(--primary);
  font-weight: 600;
}

.btn-upload {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
}

.btn-action {
  display: block; width: 100%; padding: 10px; margin-bottom: 8px;
  border: 1px dashed var(--border); border-radius: 8px;
  background: white; cursor: pointer; font-size: 13px;
  transition: var(--transition); text-align: center;
}
.btn-action:hover { border-color: var(--primary); color: var(--primary); background: rgba(74,144,217,0.04); }

/* ==================== 布局 ==================== */
.app-container { min-height: 100vh; display: flex; flex-direction: column; }
.app-header {
  background: white; padding: 12px 24px; display: flex;
  align-items: center; gap: 16px; box-shadow: var(--shadow);
  position: sticky; top: 0; z-index: 100;
}
.app-title { font-size: 20px; color: var(--text); white-space: nowrap; }

.nav-tabs { display: flex; gap: 4px; }
.nav-tab {
  padding: 8px 20px; border: none; background: transparent;
  font-size: 14px; cursor: pointer; border-radius: 6px;
  transition: var(--transition); color: var(--text-secondary);
}
.nav-tab:hover { background: var(--bg); }
.nav-tab.active { background: var(--primary); color: white; }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.user-name { font-size: 14px; color: var(--text-secondary); }

.menu-toggle { display: none; }

.app-body { display: flex; flex: 1; min-height: calc(100vh - 60px); }

/* ==================== 侧边栏 ==================== */
.sidebar {
  width: 280px; background: white; border-right: 1px solid var(--border);
  padding: 16px; overflow-y: auto; flex-shrink: 0;
}
.sidebar-section { margin-bottom: 20px; }
.sidebar-section h3 {
  font-size: 13px; color: var(--text-light); margin-bottom: 10px;
  text-transform: uppercase; letter-spacing: 1px;
}

.date-nav-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.month-label { font-weight: 600; font-size: 15px; }

.quick-buttons { display: flex; gap: 8px; margin-bottom: 12px; }

/* 日历 */
.calendar { font-size: 13px; }
.calendar-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  text-align: center; color: var(--text-light); margin-bottom: 4px;
  font-size: 11px;
}
.calendar-days {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
}
.calendar-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: 4px; cursor: pointer; transition: var(--transition);
  position: relative; font-size: 12px;
}
.calendar-day:hover { background: var(--bg); }
.calendar-day.today { background: var(--primary); color: white; font-weight: 600; }
.calendar-day.selected { border: 2px solid var(--primary); font-weight: 600; }
.calendar-day.has-log::after {
  content: ''; position: absolute; bottom: 2px; width: 4px; height: 4px;
  border-radius: 50%; background: var(--success);
}
.calendar-day.today.has-log::after { background: white; }
.calendar-day.other-month { color: #ccc; cursor: default; }

.search-input {
  width: 100%; padding: 8px 12px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 13px; margin-bottom: 8px;
}
.search-type { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 12px; }
.search-date { flex: 1; padding: 6px; border: 1px solid var(--border); border-radius: 4px; font-size: 12px; }

/* ==================== 主内容 ==================== */
.main-content { flex: 1; padding: 24px; overflow-y: auto; }

.panel { display: none; }
.panel.active { display: block; }

.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.panel-header h2 { font-size: 22px; }

/* 通知栏 */
.notification-bar {
  background: var(--warning); color: #663C00;
  padding: 10px 16px; border-radius: var(--radius); margin-bottom: 16px;
  font-size: 13px; display: flex; align-items: center; gap: 8px;
}

/* ==================== 日志列表 ==================== */
.log-list { display: flex; flex-direction: column; gap: 12px; }

.log-card {
  background: white; border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow); transition: var(--transition);
  cursor: pointer; border-left: 3px solid transparent;
}
.log-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.12); border-left-color: var(--primary); }
.log-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.log-card-title { font-size: 17px; font-weight: 600; color: var(--text); }
.log-card-date { font-size: 12px; color: var(--text-light); white-space: nowrap; }
.log-card-preview {
  color: var(--text-secondary); font-size: 14px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 10px;
}
.log-card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  background: rgba(74,144,217,0.1); color: var(--primary);
  padding: 2px 10px; border-radius: 12px; font-size: 11px;
}
.log-card-actions { display: flex; gap: 8px; margin-top: 10px; }

.empty-state {
  text-align: center; padding: 60px 20px; color: var(--text-light);
}
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }

/* ==================== 日志编辑器 ==================== */
.log-editor {
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.editor-header { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.editor-title {
  width: 100%; border: none; font-size: 18px; font-weight: 600;
  padding: 4px 0; outline: none; margin-bottom: 8px;
}
.editor-tags {
  width: 100%; border: none; font-size: 13px; color: var(--text-secondary);
  padding: 4px 0; outline: none;
}
.quill-editor { height: 400px; }
.editor-footer { padding: 16px 20px; border-top: 1px solid var(--border); }
.editor-attachments { margin-bottom: 16px; }
.editor-section {
  margin-bottom: 14px; padding: 12px; background: var(--bg);
  border-radius: 8px; border: 1px solid var(--border);
}
.editor-section-header {
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
}

.editor-actions {
  display: flex; gap: 10px; justify-content: space-between; align-items: center;
  flex-wrap: wrap;
}
.editor-media-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.editor-submit-btns { display: flex; gap: 8px; margin-left: auto; }

.btn-media {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 7px 14px; border: 1px solid var(--border);
  border-radius: 6px; background: white; cursor: pointer;
  font-size: 13px; transition: var(--transition);
  white-space: nowrap;
}
.btn-media:hover { border-color: var(--primary); color: var(--primary); background: rgba(74,144,217,0.04); }
.btn-upload-label { cursor: pointer; }

/* 编辑器文字笔记列表 */
.editor-text-list { display: flex; flex-direction: column; gap: 6px; }
.editor-text-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; background: white; border-radius: 6px;
  border: 1px solid var(--border);
}
.editor-text-title {
  font-size: 13px; font-weight: 500; min-width: 80px;
  cursor: pointer; color: var(--primary);
}
.editor-text-title:hover { text-decoration: underline; }
.editor-text-preview {
  font-size: 12px; color: var(--text-light); flex: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.editor-text-actions { display: flex; gap: 4px; flex-shrink: 0; }

/* 编辑器媒体文件列表 */
.editor-media-list { display: flex; flex-direction: column; gap: 8px; }
.editor-media-item {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 12px; background: white; border-radius: 6px;
  border: 1px solid var(--border);
}
.editor-media-name {
  font-size: 13px; font-weight: 500; min-width: 100px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.editor-media-size { font-size: 11px; color: var(--text-light); }
.editor-media-preview { height: 30px; max-width: 180px; }

/* ==================== 日志详情 ==================== */
.log-detail {
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 30px;
}
.log-detail-header { margin-bottom: 20px; }
.log-detail-title { font-size: 24px; margin-bottom: 8px; }
.log-detail-meta { color: var(--text-light); font-size: 13px; display: flex; gap: 16px; }
.log-detail-content { line-height: 1.8; font-size: 15px; }
.log-detail-content img { max-width: 100%; border-radius: 8px; margin: 10px 0; }
.log-detail-actions { display: flex; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }

/* ==================== 待办列表 ==================== */
.todo-filters { display: flex; gap: 8px; margin-bottom: 20px; }
.filter-chip {
  padding: 6px 16px; border-radius: 20px; border: 1px solid var(--border);
  background: white; cursor: pointer; font-size: 13px; transition: var(--transition);
}
.filter-chip:hover { border-color: var(--primary); }
.filter-chip.active { background: var(--primary); color: white; border-color: var(--primary); }

.todo-list { display: flex; flex-direction: column; gap: 10px; }

.todo-item {
  background: white; border-radius: var(--radius); padding: 16px 20px;
  box-shadow: var(--shadow); display: flex; align-items: center;
  gap: 14px; transition: var(--transition);
}
.todo-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.todo-item.completed { opacity: 0.7; }
.todo-item.completed .todo-item-title { text-decoration: line-through; }

.todo-checkbox {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border);
  cursor: pointer; flex-shrink: 0; transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.todo-checkbox:hover { border-color: var(--success); }
.todo-checkbox.checked { background: var(--success); border-color: var(--success); color: white; }

.todo-item-content { flex: 1; min-width: 0; }
.todo-item-title { font-weight: 500; margin-bottom: 4px; }
.todo-item-desc { font-size: 13px; color: var(--text-secondary); }
.todo-item-meta { display: flex; gap: 12px; align-items: center; flex-shrink: 0; }
.todo-priority {
  padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 500;
}
.todo-priority.high { background: #FFF1F0; color: var(--danger); }
.todo-priority.medium { background: #FFF7E6; color: var(--warning); }
.todo-priority.low { background: #F6FFED; color: var(--success); }
.todo-deadline {
  font-size: 12px; color: var(--text-light);
  display: flex; align-items: center; gap: 4px;
}
.todo-deadline.overdue { color: var(--danger); font-weight: 500; }

/* ==================== 报表 ==================== */
.report-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px; margin-bottom: 24px;
}
.report-card {
  background: white; border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.report-card h3 { font-size: 18px; margin-bottom: 8px; }
.report-card p { color: var(--text-secondary); font-size: 13px; margin-bottom: 16px; }
.report-card .form-input, .report-card select { width: 100%; margin-bottom: 12px; }

.form-input, .form-textarea, select {
  width: 100%; padding: 8px 12px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 14px; transition: var(--transition);
}
.form-input:focus, .form-textarea:focus, select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(74,144,217,0.15);
}
.form-textarea { resize: vertical; }

.report-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.report-actions .btn-secondary { font-size: 12px; padding: 6px 12px; }

.report-result {
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 30px;
}
.report-summary { margin-bottom: 20px; }
.report-summary h3 { margin-bottom: 12px; }
.summary-stats {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px;
}
.stat-card {
  background: var(--bg); border-radius: var(--radius); padding: 16px; text-align: center;
}
.stat-value { font-size: 28px; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 12px; color: var(--text-light); margin-top: 4px; }

.report-logs { margin-top: 20px; }
.report-log-item {
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.report-log-date { font-weight: 600; margin-bottom: 4px; color: var(--primary); }

/* ==================== 模态框 ==================== */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5); display: flex; align-items: center;
  justify-content: center; z-index: 1000;
}
.modal-card {
  background: white; border-radius: 12px; padding: 24px;
  width: 90%; max-width: 500px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.modal-card h3 { margin-bottom: 20px; }
.form-row { display: flex; gap: 12px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 500; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.modal-close {
  position: absolute; top: 12px; right: 16px;
  font-size: 20px; cursor: pointer; color: var(--text-light);
}

.voice-modal { max-width: 420px; text-align: center; }
.voice-timer { font-size: 48px; font-weight: 700; margin: 20px 0; font-variant-numeric: tabular-nums; }
.voice-status { color: var(--text-secondary); font-size: 14px; }
.voice-visualizer { height: 60px; margin: 10px 0; display: flex; align-items: center; justify-content: center; gap: 3px; }
.voice-bar {
  width: 4px; background: var(--primary); border-radius: 2px;
  transition: height 0.1s ease;
}
.voice-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 12px 0; }
.voice-result { margin-top: 12px; }

.btn-record { background: var(--danger) !important; }
.btn-record.recording { animation: pulse 1.5s infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* 图片预览 */
.image-preview-modal {
  max-width: 90vw; padding: 0; overflow: hidden; position: relative;
}
.image-preview-modal img {
  max-width: 100%; max-height: 70vh; border-radius: 0 0 8px 8px;
  display: block; margin: 0 auto;
}
.preview-top-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; background: #f8f8f8; border-radius: 8px 8px 0 0;
}
.preview-info {
  font-size: 13px; color: var(--text);
  max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.preview-actions {
  display: flex; align-items: center; gap: 16px;
}
.preview-download-btn {
  font-size: 13px; color: var(--primary); text-decoration: none;
  padding: 4px 12px; border: 1px solid var(--primary);
  border-radius: 4px; transition: var(--transition);
}
.preview-download-btn:hover { background: var(--primary); color: white; }

/* ==================== 图片画廊 (日志详情) ==================== */
.content-section {
  margin-bottom: 24px; padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.section-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
}
.section-icon { font-size: 18px; }
.section-title { font-size: 15px; font-weight: 600; color: var(--text); }
.section-badge {
  font-size: 11px; background: var(--primary); color: white;
  padding: 2px 8px; border-radius: 10px;
}

.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.image-gallery-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: #f0f0f0;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.image-gallery-item:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.image-gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
}
.image-gallery-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
  padding: 20px 10px 8px;
  display: flex; flex-direction: column;
  pointer-events: none;
}
.image-gallery-name {
  font-size: 11px; color: white;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.image-gallery-size {
  font-size: 10px; color: rgba(255,255,255,0.7);
}
.image-download-btn {
  position: absolute; top: 6px; right: 6px;
  width: 28px; height: 28px; background: rgba(255,255,255,0.85);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 14px; text-decoration: none;
  opacity: 0; transition: opacity 0.2s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.image-gallery-item:hover .image-download-btn { opacity: 1; }

/* ==================== 编辑器图片区 ==================== */
.editor-gallery-header {
  font-size: 13px; color: var(--text-secondary);
  margin-bottom: 10px; font-weight: 500;
}
.editor-gallery {
  display: flex; gap: 10px; flex-wrap: wrap;
}
.editor-gallery-item {
  position: relative; width: 100px; height: 100px;
  border-radius: 6px; overflow: hidden;
  border: 2px solid var(--border); transition: var(--transition);
}
.editor-gallery-item:hover { border-color: var(--primary); }
.editor-gallery-img {
  width: 100%; height: 100%; object-fit: cover; cursor: pointer; display: block;
}
.editor-gallery-remove {
  position: absolute; top: -2px; right: -2px;
  width: 20px; height: 20px; background: var(--danger); color: white;
  border: none; border-radius: 50%; font-size: 11px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  line-height: 1; padding: 0;
}

/* ==================== 语音笔记 ==================== */
.voice-note-item {
  font-size: 13px; padding: 8px 12px; background: var(--bg);
  border-radius: 6px; margin-bottom: 6px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.voice-duration { font-size: 11px; color: var(--text-light); }
.voice-note-item audio { height: 28px; max-width: 200px; }

/* ==================== 文字笔记卡片 (详情页) ==================== */
.text-notes-list { display: flex; flex-direction: column; gap: 10px; }
.text-note-card {
  background: #fafbfc; border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; transition: var(--transition);
}
.text-note-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.text-note-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; background: #f0f4f8;
  border-bottom: 1px solid var(--border);
}
.text-note-title { font-size: 14px; font-weight: 600; color: var(--text); }
.text-note-copy {
  font-size: 12px; color: var(--primary); cursor: pointer;
  background: white; border: 1px solid var(--primary);
  border-radius: 4px; padding: 2px 10px; transition: var(--transition);
}
.text-note-copy:hover { background: var(--primary); color: white; }
.text-note-body {
  padding: 14px 16px; font-size: 14px; line-height: 1.8;
  color: var(--text-secondary); white-space: pre-wrap; word-break: break-word;
}

/* ==================== 媒体文件卡片 (音频/视频详情页) ==================== */
.media-file-list { display: flex; flex-direction: column; gap: 12px; }
.media-file-card {
  background: #fafbfc; border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px; transition: var(--transition);
}
.media-file-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.media-file-info {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.media-file-icon { font-size: 18px; flex-shrink: 0; }
.media-file-name {
  font-size: 14px; font-weight: 500; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1;
}
.media-file-meta { font-size: 11px; color: var(--text-light); flex-shrink: 0; }
.media-audio-player { width: 100%; height: 36px; margin-bottom: 8px; }
.media-video-player { width: 100%; max-height: 360px; border-radius: 6px; background: #000; margin-bottom: 8px; }
.media-file-actions {
  display: flex; gap: 8px; justify-content: flex-end;
}
.media-dl-btn, .media-copy-btn {
  font-size: 12px; text-decoration: none; border: 1px solid var(--border);
  background: white; border-radius: 4px; padding: 3px 12px;
  cursor: pointer; color: var(--text-secondary); transition: var(--transition);
}
.media-dl-btn:hover, .media-copy-btn:hover { border-color: var(--primary); color: var(--primary); }
.video-card .media-video-player { max-width: 560px; }

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .sidebar {
    position: fixed; left: -100%; top: 60px; bottom: 0; z-index: 200;
    transition: left 0.3s ease; width: 85%; max-width: 300px;
  }
  .sidebar.open { left: 0; box-shadow: 4px 0 20px rgba(0,0,0,0.15); }
  .nav-tabs { display: none; }
  .main-content { padding: 16px; }
  .panel-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .report-cards { grid-template-columns: 1fr; }
  .log-detail { padding: 20px; }
  .form-row { flex-direction: column; }
  .todo-item { flex-wrap: wrap; }
  .todo-item-meta { width: 100%; margin-top: 8px; padding-left: 36px; }
}

@media (max-width: 480px) {
  .app-header { padding: 10px 16px; }
  .app-title { font-size: 16px; }
  .summary-stats { grid-template-columns: repeat(2, 1fr); }
}

/* 滚动条美化 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d4d4d4; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* 加载动画 */
.loading { text-align: center; padding: 40px; color: var(--text-light); }
.spinner {
  width: 32px; height: 32px; border: 3px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin 0.8s linear infinite; margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.toast {
  position: fixed; top: 20px; right: 20px; padding: 12px 24px;
  border-radius: 8px; color: white; font-size: 14px;
  z-index: 2000; animation: slideIn 0.3s ease; box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); color: #663C00; }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
