.mg-reg {
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e5e7eb;
  --soft: #f7faff;
  --bg: #ffffff;
  --accent: #2563eb;
  /* 포커스 */
  --brand: #2d5f3f;
  /* 메인 버튼/강조 */
  --danger: #ef4444;
  --success: #16a34a;
  --warning: #f59e0b;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  --container: min(1100px, 94vw);

  color: var(--ink);
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px 16px;
}

/* Head */
.mg-head {
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 20px 0;
  border-bottom: 2px solid #eeede5;
  padding-bottom: 12px;
}

.mg-head-title {
  margin: 0 0 4px;
  font-size: 1.4rem;
}

.mg-head-desc {
  margin: 0;
  color: var(--muted);
}

.mileage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  table-layout: fixed;
}

.mileage-table th,
.mileage-table td {
  padding: 12px 14px;
  /* 동일한 간격 */
  border-bottom: 1px solid #e2e8f0;
  text-align: center;
  vertical-align: middle;
  line-height: 1.5;
  word-break: keep-all;
}

/* 헤더와 본문 동일 간격 + 컬러만 구분 */
.mileage-table thead th {
  background-color: #f8fafc;
  color: #334155;
  font-weight: 600;
}

.mileage-table tbody td {
  color: #475569;
}

/* hover */
/* .mileage-table tbody tr:hover {
    background-color: #f9fafb;
  } */

/* 금액 열 색상 강조 */
.mileage-transaction-amount.increase {
  color: #16a34a;
  font-weight: 600;
}

.mileage-transaction-amount.decrease {
  color: #dc2626;
  font-weight: 600;
}

/* 열 폭 균등 조정 */
.mileage-table th:nth-child(1),
.mileage-table td:nth-child(1) {
  width: 14%;
}

/* 날짜 */
.mileage-table th:nth-child(2),
.mileage-table td:nth-child(2) {
  width: 10%;
}

/* 구분 */
.mileage-table th:nth-child(3),
.mileage-table td:nth-child(3) {
  width: 30%;
  text-align: left;
}

/* 사유 */
.mileage-table th:nth-child(4),
.mileage-table td:nth-child(4) {
  width: 12%;
}

/* 포인트 종류 */
.mileage-table th:nth-child(5),
.mileage-table td:nth-child(5) {
  width: 18%;
}

/* 만료일 */
.mileage-table th:nth-child(6),
.mileage-table td:nth-child(6) {
  width: 16%;
  text-align: right;
}

/* 금액 */

.container {
  display: flex;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  color: #212529;
  line-height: 1.5;
}

.content {
  width: 100%;
}

.mileage-balance-section {
  /* background: #f8f9fa; */
  border-radius: 8px;
}
.balance-card {
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0px 0px 10px 1px rgba(0, 0, 0, 0.1);
}
.balance-info {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 20px;
  min-height: 70px;
}
.balance-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.balance-label {
  display: block;
  color: #666;
}
.balance-amount {
  display: block;
  font-size: 1.5em;
  font-weight: 600;
  line-height: 2;
}
/* .balance-amount.available {
  color: blue;
}
.balance-amount.unavailable {
  color: #6c757d;
} */
.mileage-search-section {
  display: flex;
  width: 100%;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 15px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 5px;
}
.search-controls {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
}
.date-search {
  display: flex;
  align-items: center;
  gap: 10px;
}
.date-search input[type="date"] {
  padding: 10px 12px;
  border: 1px solid #cfcfc7;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  background: #fff;
  color: #44443a;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  max-width: 160px;
  height: 40px;
}

.search-btn {
  width: 100px;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background-color 0.2s,
    transform 0.06s;
  height: 40px;
}
.search-btn:hover {
  background: #0056b3;
}
.mileage-history-wrapper {
  border-radius: 8px;
  overflow: hidden;
}
.mileage-history-item {
  border: 1px solid #e9ecef;
  border-radius: 8px;
  margin-bottom: 15px;
  padding: 20px;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.mileage-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
}
.mileage-date {
  display: flex;
  align-items: center;
  gap: 8px;
}
.date-value {
  color: #333;
}
.type-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: bold;
  text-align: center;
}
.type-badge.increase {
  background: #d4edda;
  color: #155724;
}
.type-badge.decrease {
  background: #f8d7da;
  color: #721c24;
}
.mileage-item-content {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}
.mileage-amount {
  font-size: 20px;
  font-weight: 600;
  min-width: 120px;
  text-align: right;
  margin-right: 6px;
  word-spacing: -4px;
}
.mileage-amount.increase {
  color: #2727ff;
}
.mileage-amount.decrease {
  color: #ff2237;
}
.mileage-details {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.mileage-reason-item,
.mileage-info,
.expiry-date-item {
  display: flex;
  gap: 10px;
}
.reason-label,
.info-label,
.expiry-label {
  font-weight: bold;
  color: #666;
  /* min-width: 80px; */
}
.reason-value,
.info-value,
.expiry-value {
  color: #333;
}
.expiry-value {
  color: #e74c3c;
  font-weight: bold;
} /* 반응형 디자인 */
@media (max-width: 768px) {
  .balance-info {
    flex-direction: column;
    gap: 15px;
  }
  .mileage-item-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .mileage-item-content {
    flex-direction: column;
    gap: 15px;
  }
  .mileage-amount {
    text-align: left;
    min-width: auto;
  }
  .search-controls {
    flex-direction: column;
    align-items: flex-start;
  }
  .date-search {
    flex-wrap: wrap;
  }
}
