/**
 * Dashboard Styles (index.php)
 * Styles for the main dashboard page
 * 字体已放大；手机端统计卡片改为每行2个；Recent Cases 表格保持4列并横向滚动
 */

/* ===== Hero Banner ===== */
.hero-banner {
  background: linear-gradient(135deg, #c11010, #b01f0f);
  border-radius: 24px;
  padding: 28px 32px;
  margin-bottom: 28px;
  color: white;
}

.hero-banner h5 {
  color: white;
  font-size: 1.05rem;  /* 原0.85 +0.2 */
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
  opacity: 0.9;
}

.hero-banner h1 {
  font-size: 2.0rem;    /* 原1.8 +0.2 */
  font-weight: 700;
  color: white;
  margin: 0;
}

.hero-banner p {
  color: white;
  margin-top: 4px;
  opacity: 0.9;
}

.hero-banner .date-badge {
  margin-top: 10px;
  display: inline-block;
  background: rgba(255, 255, 255, 0.6);
  padding: 4px 16px;
  border-radius: 30px;
  font-size: 1.1rem;    /* 原0.9 +0.2 */
  color: white;
}

/* ===== Stats Grid ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: white;
  border-radius: 16px;
  padding: 18px 20px;
  border: 1px solid #eef2f8;
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-card .stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;  /* 图标大小不变，不调整 */
  flex-shrink: 0;
}

.stat-icon.blue {
  background: #e6f0fa;
  color: #2d7fb9;
}

.stat-icon.green {
  background: #e0f0e6;
  color: #2a9d8f;
}

.stat-icon.orange {
  background: #fef0e0;
  color: #f0ad4e;
}

.stat-icon.purple {
  background: #ede0f5;
  color: #8b5cf6;
}

.stat-card .stat-number {
  font-size: 1.8rem;   /* 原1.6 +0.2 */
  font-weight: 700;
  color: #1e466e;
  line-height: 1.2;
}

.stat-card .stat-label {
  font-size: 1.05rem;  /* 原0.85 +0.2 */
  color: #6f8ea3;
}

/* ===== Modules Grid ===== */
.modules-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.module-card {
  background: white;
  border-radius: 16px;
  padding: 20px 22px;
  border: 1px solid #eef2f8;
}

.module-card h3 {
  font-size: 1.3rem;   /* 原1.1 +0.2 */
  font-weight: 700;
  color: #260000;
  margin: 0 0 10px;
}

.module-card p {
  font-size: 1.1rem;   /* 原0.9 +0.2 */
  color: #2f3335;
  margin: 0;
}

.module-card.recent-cases {
  grid-column: 1 / -1;
  overflow-x: auto;    
}

.module-card.recent-cases .placeholder-table {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr; 
  gap: 8px;
  font-size: 1.05rem;   /* 原0.85 +0.2 */
  color: #6f8ea3;
  margin-top: 8px;
  min-width: 400px;  
}

.module-card.recent-cases .placeholder-table .header {
  font-weight: 600;
  color: #1e466e;
}

/* ===== Footer ===== */
footer {
  margin-top: 20px;
  padding-top: 10px;
  border-top: 1px solid #e0eaf2;
  text-align: center;
  font-size: 0.95rem;   /* 原0.75 +0.2 */
  color: #7c9ab3;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .modules-grid {
    grid-template-columns: 1fr;
  }

  .module-card.recent-cases {
    grid-column: 1;
  }
}

@media (max-width: 768px) {
  .hero-banner {
    padding: 20px;
  }

  .hero-banner h1 {
    font-size: 1.65rem;   /* 原1.5 +0.15 */
  }

  .hero-banner p {
    font-size: 1.15rem;   /* 原1.0 +0.15 */
  }

  .hero-banner .date-badge {
    font-size: 0.95rem;   /* 原0.8 +0.15 */
    padding: 2px 12px;
  }

  /* ★★★ The mobile app's statistics cards have been changed to two per row. ★★★ */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .stat-card {
    padding: 14px 16px;
  }

  .stat-card .stat-number {
    font-size: 1.55rem;   /* 原1.4 +0.15 */
  }

  .stat-card .stat-label {
    font-size: 0.95rem;   /* 原0.8 +0.15 */
  }

  .modules-grid {
    gap: 12px;
  }

  .module-card {
    padding: 16px 18px;
  }

  .module-card h3 {
    font-size: 1.2rem;    /* 原1.05 +0.15 */
  }

  .module-card p {
    font-size: 1.0rem;    /* 原0.85 +0.15 */
  }

  /* Keep the table with 4 columns, only adjust the font size. */
  .module-card.recent-cases .placeholder-table {
    font-size: 0.95rem;   /* 原0.8 +0.15 */
    gap: 4px 12px;
  }
}

@media (max-width: 480px) {
  .hero-banner {
    padding: 16px;
    border-radius: 16px;
  }

  .hero-banner h1 {
    font-size: 1.45rem;   /* 原1.3 +0.15 */
  }

  /* ★★★ Even on ultra-small screens, two characters per row are still maintained. ★★★ */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .stat-card {
    padding: 12px 14px;
    gap: 10px;
  }

  .stat-card .stat-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .stat-card .stat-number {
    font-size: 1.35rem;   /* 原1.2 +0.15 */
  }

  .module-card {
    padding: 14px 16px;
  }

  .module-card h3 {
    font-size: 1.15rem;   /* 原1.0 +0.15 */
  }

  .module-card.recent-cases .placeholder-table {
    font-size: 0.9rem;    /* 原0.75 +0.15 */
    gap: 2px 8px;
  }
}