:root {
  --primary-color: #b7091d;
  --success-bg: #e8f5e9;
  --success-text: #1b5e20;
  --danger-bg: #ffebee;
  --danger-text: #b71c1c;
  --nav-height: 60px;
  --footer-height: 50px;
}

body {
  font-family: "Kanit", sans-serif;
  background-color: #f4f6f9;
  height: 100vh;
  overflow: hidden;
  /* ซ่อน Scrollbar เพื่อให้เป็น Dashboard นิ่งๆ */
}

/* --- Custom Grid 80/20 --- */
.dashboard-container {
  display: flex;
  flex-wrap: wrap;
  height: calc(100vh - var(--nav-height) - var(--footer-height));
  /* ความสูงเต็มจอ ลบหัวท้าย */
  padding: 10px;
  gap: 10px;
}

.panel-left {
  flex: 0 0 calc(80% - 10px);
  /* กว้าง 80% */
  max-width: calc(80% - 10px);
  display: flex;
  gap: 10px;
}

.panel-right {
  flex: 0 0 20%;
  /* กว้าง 20% */
  max-width: 20%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  /* ถ้าข้อมูลเยอะให้เลื่อนเฉพาะฝั่งขวา */
}

/* --- Responsive: จอเล็กให้เรียงลงมา --- */
@media (max-width: 1200px) {
  body {
    overflow: auto;
  }

  .dashboard-container {
    height: auto;
    display: block;
  }

  .panel-left,
  .panel-right {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
    margin-bottom: 20px;
  }

  .panel-left {
    height: 500px;
  }

  /* ความสูงขั้นต่ำในมือถือ */
}

/* --- Card Styles --- */
.glass-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  position: relative;
}

/* --- Left Side (Big Numbers) --- */
.big-stat-box {
  flex: 1;
  /* แบ่งครึ่งซ้ายขวาเท่ากันในพื้นที่ 80% */
  border-radius: 25px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.bg-count {
  background: var(--success-bg);
  color: var(--success-text);
  border: 2px solid #c8e6c9;
}

.bg-remain {
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 2px solid #ffcdd2;
}

.stat-label {
  font-size: clamp(1.5rem, 2vw, 2.5rem);
  font-weight: 600;
  margin-bottom: 0;
  opacity: 0.8;
}

.stat-number {
  font-size: clamp(8rem, 18vw, 20rem);
  /* ปรับให้ใหญ่สะใจ */
  font-weight: 800;
  line-height: 0.9;
  margin: 10px 0;
  font-variant-numeric: tabular-nums;
}

.stat-unit {
  font-size: 2rem;
  font-weight: 500;
}

/* --- Right Side (Details) --- */
.info-card {
  background: white;
  border-radius: 15px;
  padding: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  margin-bottom: 5px;
}

.info-title {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 2px;
}

.info-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  word-break: break-word;
}

.info-value-lg {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-color);
}

/* --- Navbar & Marquee --- */
.navbar {
  height: var(--nav-height);
  background: var(--primary-color);
}

.marquee-container {
  height: var(--footer-height);
  background: #333;
  color: white;
  display: flex;
  align-items: center;
  position: fixed;
  bottom: 0;
  width: 100%;
  z-index: 1000;
}
