/* ============================================
   营收看板 - 统一健康花园风格
   暖色自然主题
   ============================================ */

/* ===== 顶部导航 ===== */
.rev-tab-content { display: none; }
.rev-tab-content.active { display: block; }

.revenue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
  gap: var(--space);
}
.revenue-header h2 {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-serif);
  color: var(--text);
}
.revenue-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 3px;
}
.revenue-tab {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.revenue-tab:hover { color: var(--text); background: var(--bg-card); }
.revenue-tab.active {
  color: var(--primary);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

/* ===== 品牌分组 ===== */
.brand-section { margin-bottom: var(--space-xl); }
.brand-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space);
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-title .count {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}

/* ===== 门店卡片网格 ===== */
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space);
}
.store-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: var(--space-lg);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  border: 1px solid var(--border-light);
}
.store-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.store-card:active { transform: scale(0.98); }
.store-card .name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space);
}
.store-card .stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  font-size: 13px;
}
.store-card .stat-label { color: var(--text-muted); }
.store-card .stat-value { text-align: right; font-weight: 600; }
.store-card .stat-value.green { color: var(--success); }
.store-card .stat-value.red { color: var(--danger); }
.store-card .stat-value.orange { color: var(--accent); }

/* ===== 门店明细 ===== */
.store-detail {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: var(--space-xl);
  margin-top: var(--space);
  border: 1px solid var(--border-light);
}
.store-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
  gap: var(--space);
}
.store-detail-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font-serif);
}
.store-detail .detail-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== 数据表格 ===== */
.data-table-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  text-align: left;
  padding: 10px 14px;
  color: var(--text-muted);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  white-space: nowrap;
  font-size: 12px;
}
.data-table td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border-light);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg); }
.data-table .month-col { color: var(--text-muted); font-weight: 500; }
.data-table .num-col { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.data-table .action-col { text-align: center; white-space: nowrap; }

/* ===== 个人收支 ===== */
.personal-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space);
  margin-bottom: var(--space-xl);
}
.personal-stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: var(--space-lg);
  text-align: center;
  border: 1px solid var(--border-light);
  transition: box-shadow var(--duration) var(--ease);
}
.personal-stat-card:hover { box-shadow: var(--shadow-sm); }
.personal-stat-card .label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 500;
}
.personal-stat-card .value {
  font-size: 22px;
  font-weight: 700;
}
.personal-stat-card .value.green { color: var(--success); }
.personal-stat-card .value.red { color: var(--danger); }
.personal-stat-card .value.blue { color: var(--info); }

.month-selector {
  display: flex;
  align-items: center;
  gap: var(--space);
}
.month-selector select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--font-sans);
}

/* ===== 数据看板图表 ===== */
.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space);
}
.chart-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: var(--space-lg);
  border: 1px solid var(--border-light);
  transition: box-shadow var(--duration) var(--ease);
}
.chart-card:hover { box-shadow: var(--shadow-sm); }
.chart-card.full { grid-column: 1 / -1; }
.chart-card h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space);
}
.chart-card canvas { max-height: 280px; }

/* ===== 查询栏 ===== */
.query-bar {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: var(--space-md) var(--space-lg);
  margin-top: var(--space);
  margin-bottom: var(--space);
  display: flex;
  gap: var(--space);
  align-items: flex-end;
  flex-wrap: wrap;
  border: 1px solid var(--border-light);
}
.query-bar .form-group { margin: 0; min-width: 130px; }
.query-bar select, .query-bar input {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  width: 100%;
  font-family: var(--font-sans);
}
.query-summary {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: var(--space-md);
  margin-bottom: var(--space);
  border: 1px solid var(--border-light);
}

/* ===== 备忘录 ===== */
.memo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}
.memo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space);
}
.memo-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: var(--space-lg);
  border: 1px solid var(--border-light);
  transition: all var(--duration) var(--ease);
}
.memo-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.memo-card.pinned {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--bg-card), var(--accent-bg));
}
.memo-card .memo-time {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: 6px;
}
.memo-card .memo-pin {
  font-size: 14px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
  background: none;
  border: none;
  padding: 2px 6px;
  border-radius: 4px;
}
.memo-card .memo-pin:hover { color: var(--accent); background: var(--accent-bg); }
.memo-card .memo-pin.active { color: var(--accent); }
.memo-card .memo-content {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: var(--space);
}
.memo-card .memo-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  border-top: 1px solid var(--border-light);
  padding-top: var(--space);
}
.memo-card .memo-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--space);
}
.memo-card .memo-images img {
  max-width: 100%;
  max-height: 300px;
  border-radius: var(--radius-sm);
  object-fit: contain;
  background: var(--bg);
  cursor: pointer;
  transition: transform 0.2s;
}
.memo-card .memo-images img:hover { transform: scale(1.02); }
.memo-image-preview-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.memo-image-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.memo-image-preview-item .remove-btn {
  position: absolute; top: 2px; right: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  border: none; background: rgba(0,0,0,0.6); color: #fff;
  font-size: 12px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.memo-lightbox {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85); z-index: 300;
  justify-content: center; align-items: center;
  cursor: zoom-out;
}
.memo-lightbox.show { display: flex; }
.memo-lightbox img {
  max-width: 90%; max-height: 90%;
  object-fit: contain; border-radius: 4px;
}

/* ===== 管理页 ===== */
.settings-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: var(--space-xl);
  margin-bottom: var(--space);
  border: 1px solid var(--border-light);
}
.settings-section h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space);
}
.settings-section p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: var(--space);
}

/* ===== 月度概况条 ===== */
.month-summary-wrap {
  display: flex;
  gap: var(--space);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}
.month-summary-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: var(--space-md) var(--space-lg);
  flex: 1;
  min-width: 200px;
  border: 1px solid var(--border-light);
}
.month-summary-card .label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.month-summary-card .amount {
  font-size: 20px;
  font-weight: 700;
}
.month-summary-card .amount.green { color: var(--success); }
.month-summary-card .amount.red { color: var(--danger); }
.month-summary-card .amount.blue { color: var(--info); }

/* ===== 进度条 ===== */
.progress-bar {
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}
.progress-bar .fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}

/* ===== 空状态 ===== */
.revenue-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.revenue-empty .icon { font-size: 40px; margin-bottom: var(--space); opacity: 0.4; }
.revenue-empty p { font-size: 14px; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .revenue-header { flex-direction: column; align-items: flex-start; }
  .revenue-tabs { width: 100%; overflow-x: auto; }
  .store-grid { grid-template-columns: 1fr; }
  .chart-grid { grid-template-columns: 1fr; }
  .personal-summary { grid-template-columns: 1fr; }
  .month-summary-wrap { flex-direction: column; }
  .query-bar .form-group { min-width: 100%; }
}
