/* ===== Base ===== */
body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* ===== Buttons ===== */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid rgba(63, 63, 70, 0.9);
  background: rgba(9, 9, 11, 0.55);
  color: rgba(244, 244, 245, 0.92);
  user-select: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.btn:hover {
  transform: translateY(-1px);
  color: #e0faff;
  background: linear-gradient(
    135deg,
    rgba(34, 211, 238, 0.15),
    rgba(56, 189, 248, 0.15)
  );
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.25), 0 10px 30px rgba(34, 211, 238, 0.25);
}
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.3);
}

/* ===== Cards ===== */
.card {
  border: 1px solid rgba(63, 63, 70, 0.55);
  background: rgba(9, 9, 11, 0.45);
  border-radius: 18px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 12px 40px rgba(0, 0, 0, 0.55);
}

/* ===== Filter Labels ===== */
.filter-label {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(161, 161, 170, 0.8);
}

/* ===== Premium Select/Input ===== */
.select-wrap {
  position: relative;
}

/* ✅ เฉพาะ select เท่านั้นที่ควรมีลูกศร (input date/month มี icon ของมันเองอยู่แล้ว) */
.select-wrap.is-select::after {
  content: "▾";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(244, 244, 245, 0.6);
  pointer-events: none;
  font-size: 14px;
}

.select-wrap select,
.select-wrap input {
  appearance: none;
  width: 100%;
  height: 44px;
  padding: 12px 40px 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(63, 63, 70, 0.6);
  background: linear-gradient(180deg, rgba(24, 24, 27, 0.85), rgba(9, 9, 11, 0.85));
  color: #f4f4f5;
  font-weight: 500;
  transition: all 0.25s ease;
}

.select-wrap select:hover,
.select-wrap input:hover {
  border-color: rgba(56, 189, 248, 0.6);
}

.select-wrap select:focus,
.select-wrap input:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.9);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.5), 0 0 30px rgba(56, 189, 248, 0.25);
  background: linear-gradient(180deg, rgba(24, 24, 27, 0.95), rgba(9, 9, 11, 0.95));
}

/* ===== Chart wrap ===== */
.chart-wrap {
  position: relative;
  height: 340px;
  width: 100%;
}
/* ===== Tabs ===== */
.tabs {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border-radius: 16px;
  border: 1px solid rgba(63, 63, 70, 0.6);
  background: rgba(9, 9, 11, 0.35);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.tab {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(244, 244, 245, 0.75);
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  user-select: none;
  line-height: 1;
}

.tab:hover {
  color: rgba(244, 244, 245, 0.95);
  background: rgba(24, 24, 27, 0.55);
  border-color: rgba(63, 63, 70, 0.55);
}

.tab.active {
  color: rgba(244, 244, 245, 0.98);
  background: linear-gradient(
    135deg,
    rgba(34, 211, 238, 0.18),
    rgba(56, 189, 248, 0.14)
  );
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.22), 0 10px 26px rgba(0, 0, 0, 0.35);
}

.tab:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.28);
}
/* ===== Picker icon visibility (date/month) ===== */
.select-wrap input[type="date"]::-webkit-calendar-picker-indicator,
.select-wrap input[type="month"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(1.2);
  opacity: 0.95;
  cursor: pointer;
}

/* ให้ค่าภายในช่อง date/month เป็นสีขาวชัด */
.select-wrap input::-webkit-datetime-edit {
  color: rgba(244, 244, 245, 0.95);
}
.select-wrap input::-webkit-datetime-edit-text,
.select-wrap input::-webkit-datetime-edit-month-field,
.select-wrap input::-webkit-datetime-edit-day-field,
.select-wrap input::-webkit-datetime-edit-year-field {
  color: rgba(244, 244, 245, 0.95);
}

/* ===== Premium Select/Input ===== */
.select-wrap {
  position: relative;
}

/* ✅ เฉพาะ select (ปี) เท่านั้นที่มีลูกศร */
.select-wrap.is-select::after {
  content: "▾";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(244, 244, 245, 0.7);
  pointer-events: none;
  font-size: 14px;
}

.select-wrap select,
.select-wrap input {
  appearance: none;
  width: 100%;
  height: 44px;
  padding: 12px 40px 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(63, 63, 70, 0.6);
  background: linear-gradient(180deg, rgba(24, 24, 27, 0.85), rgba(9, 9, 11, 0.85));
  color: rgba(244, 244, 245, 0.95);
  font-weight: 600;
  transition: all 0.25s ease;
}

.select-wrap select:hover,
.select-wrap input:hover {
  border-color: rgba(56, 189, 248, 0.6);
}

.select-wrap select:focus,
.select-wrap input:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.9);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.5), 0 0 30px rgba(56, 189, 248, 0.25);
  background: linear-gradient(180deg, rgba(24, 24, 27, 0.95), rgba(9, 9, 11, 0.95));
}
.filter-slot {
 /* ปรับได้: 360 / 380 / 420 */
  width: 35%;
}


