/* FONT – MBKCorpoS */
@font-face {
  font-family: "MBKCorpoS";
  src: url("/static/MBKCorpoS.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* RESET & BASE */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;

}

body {
  font-family: "MBKCorpoS", -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Apple SD Gothic Neo", system-ui, sans-serif !important;
  background: #f5f5f7;
  /* 애플 스토어 배경 */
  color: #111827;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 1040px;
  margin: 40px auto 48px;
  padding: 0 24px 24px;
}

/* HEADER – 상단 로고만 중앙 배치 */

.page-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 24px 24px;
  margin-bottom: 8px;
  gap: 12px;
  flex-wrap: nowrap;
}

.header-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.mb-logo {
  width: 60px;
  /* 작고 단정하게 */
  height: 60px;
  object-fit: contain;
  opacity: 0.95;
  flex-shrink: 0;
}

/* BUTTONS – 애플 블루 */

.btn {
  border-radius: 999px;
  padding: 7px 20px;
  font-size: 14px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.18s ease;
  white-space: nowrap;
  font-family: inherit;
}

.btn.primary {
  background: #0071e3;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(0, 113, 227, 0.25);
}

.btn.primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.btn.ghost {
  background: transparent;
  color: #111827;
  border: 1px solid #d2d2d7;
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.7);
}

/* CONTENT LAYOUT */

.content {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* CARD – 애플식 카드 */

.card {
  background: #ffffff;
  border-radius: 28px;
  padding: 20px 22px 18px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.04);
  border: 1px solid #e5e5ea;
}

/* 상단 제목들 (차량 선택, 차량 금액, 등록 비용 등) */
.card-title {
  font-size: 17px;
  /* +2pt */
  font-weight: 600;
  margin: 0 0 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1d1d1f;
}

.card-body {
  display: grid;
  gap: 14px 18px;
}

.card-footer {
  margin-top: 10px;
}

.inline-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* GRID – 기본은 휴대폰 1열 */
.grid-3 {
  grid-template-columns: 1fr;
}

/* 화면이 넓을 때(아이패드/PC)만 3열 */
@media (min-width: 720px) {
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.field--full {
  grid-column: 1 / -1;
}

/* FIELD */

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field-label {
  font-size: 12px;
  font-weight: 500;
  color: #6e6e73;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.field-caption {
  font-size: 11px;
  color: #a1a1a6;
  text-transform: none;
  letter-spacing: 0;
}

.field-control {
  width: 100%;
  border-radius: 14px;
  border: 1px solid #d2d2d7;
  padding: 10px 14px;
  font-size: 15px;
  /* 입력 글자 크기 통일 */
  line-height: 1.2;
  background: #f5f5f7;
  color: #1d1d1f;
  outline: none;
  transition: all 0.18s ease;
  font-family: inherit;
}

.field-control:focus {
  border-color: #0071e3;
  box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.25);
  background: #ffffff;
}

.field-control--readonly {
  background: #f5f5f7;
  color: #6e6e73;
}

/* SUMMARY BLOCKS */

.field--summary {
  border-radius: 16px;
  padding: 9px 14px;
  background: #f5f5f7;
  border: 1px solid #e5e5ea;
}

.field--emphasis {
  background: #f0f4ff;
  border-color: #d0e1ff;
}

.field-value {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 17px;
  font-weight: 600;
  color: #1d1d1f;
  font-variant-numeric: tabular-nums;
}

.field-unit {
  font-size: 11px;
  color: #86868b;
}

/* SEGMENTED CONTROL (현금/할부 & 하위 선택) */

.paytype-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: #f5f5f7;
  border: 1px solid #e5e5ea;
  width: fit-content;
}

.segmented-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 18px;
  cursor: pointer;
  font-size: 12px;
  color: #6e6e73;
  user-select: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.segmented-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-control span {
  position: relative;
  z-index: 1;
}

.segmented-control::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #ffffff;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
  opacity: 0;
  transform: scale(0.92);
  transition: all 0.16s ease;
}

.segmented-control input:checked+span {
  color: #1d1d1f;
  font-weight: 600;
}

.segmented-control input:checked~span,
.segmented-control input:checked+span {
  /* trigger ::before */
}

.segmented-control input:checked~span::before,
.segmented-control input:checked::before {
  opacity: 1;
  transform: scale(1);
}

.segmented-control.small {
  padding: 4px 12px;
  font-size: 11px;
}

/* CHECKBOX */

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6e6e73;
}

.checkbox input {
  width: 14px;
  height: 14px;
}

/* INLINE RADIO / DIVIDER */

.field--inline-radio {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.radio-group {
  display: inline-flex;
  gap: 6px;
}

.divider {
  height: 1px;
  margin: 8px 0 12px;
  background: linear-gradient(90deg,
      transparent,
      rgba(210, 210, 215, 0.9),
      transparent);
}

/* QUOTE CARD – 견적서 */

.quote-card {
  margin-top: 6px;
}

.quote-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.quote-model {
  margin: 0;
  font-size: 21px;
  /* +1pt */
  font-weight: 600;
  letter-spacing: 0.005em;
  /* 자간 줄이기 */
  color: #1d1d1f;
}

.quote-meta {
  margin: 4px 0 0;
  font-size: 12px;
  color: #6e6e73;
}

.quote-right {
  margin-left: auto;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.quote-tag {
  padding: 2px 10px;
  border-radius: 999px;
  background: #111111;
  color: #f5f5f7;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.quote-id {
  margin-top: 2px;
  font-size: 10px;
  /* 작게 */
  letter-spacing: 0.18em;
  color: #b3b3b3;
}

.quote-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px 18px;
}

@media (min-width: 720px) {
  .quote-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.quote-block h4 {
  margin: 0 0 6px;
  font-size: 14px;
  /* +2pt */
  font-weight: 500;
  color: #6e6e73;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.quote-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  /* +1pt */
  padding: 5px 0;
  border-bottom: 1px solid #f0f0f5;
}

.quote-row span:last-child {
  font-variant-numeric: tabular-nums;
}

.quote-row.strong span:last-child {
  font-weight: 600;
}

.quote-note {
  margin-top: 12px;
  font-size: 12px;
  /* 살짝 키움 */
  color: #a1a1a6;
}

/* 월 할부금 빨간색 */

#monthlyPay,
#quoteMonthly {
  color: #b91c1c;
}

/* BOTTOM ACTIONS */

.bottom-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

/* FOOTER */

.page-footer {
  margin-top: 24px;
  font-size: 11px;
  color: #a1a1a6;
  display: flex;
  justify-content: center;
  gap: 6px;
  align-items: center;
}

.page-footer .dot {
  font-size: 16px;
  line-height: 0;
}

/* RESPONSIVE */


/* PRINT – 견적서만 출력 */

@media print {
  body {
    background: #ffffff;
  }

  .page {
    max-width: 780px;
    margin: 0 auto;
    padding: 12mm;
  }

  .card {
    box-shadow: none;
    border-radius: 0;
  }

  .page-header,
  .content>.card:not(.quote-card),
  .page-footer,
  .no-print {
    display: none !important;
  }

  #quoteSection {
    margin-top: 0;
  }
}

/* 기준 선택: 라벨을 한 줄, 버튼은 그 아래 줄 */
.field-label--block {
  display: block;
  margin-bottom: 0.25rem;
}

/* 버튼 그룹 살짝 위아래 여백 */
.control-type-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* 견적서 카드: 둥근 모서리/테두리/그림자 제거 */
.quote-card {
  border-radius: 0;
  border: none;
  box-shadow: none;
  padding-top: 0;
}

/* 상단 헤더 이미지 */
.quote-header-img {
  width: 100%;
  display: block;
  margin-bottom: 1.5rem;
}

/* 브랜드/모델 행 */
.quote-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.quote-title-left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* MERCEDES-BENZ */
.quote-brand {
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* 2025 + 모델명 라인 */
.quote-model-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: baseline;
}

/* 2025 연식 */
.quote-year {
  font-size: 0.85rem;
  /* 모델명보다 살짝 작게 */
  font-weight: 500;
}

/* 모델명 */
.quote-model {
  font-size: 1.05rem;
  font-weight: 600;
}

/* 견적번호: 오른쪽 위에 맞추기 */
.quote-right {
  text-align: right;
}

.quote-id {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}


/* 기준 선택 버튼을 pill 버튼 느낌으로 */
.control-type-btn {
  border-radius: 999px;
  padding-inline: 0.9rem;
  cursor: pointer;
}

/* 선택된 버튼은 PDF 저장 버튼 색과 비슷하게 */
.control-type-btn.is-active {
  background-color: var(--btn-primary-bg, #7f0019);
  /* 버튼 색 없으면 이 색 사용 */
  color: #fff;
}

.control-type-btn.is-active span {
  color: inherit;
}


.bond-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* '초기납에서 등록비 제외' 글자 크게 */
.exclude-reg-label {
  font-size: 0.95rem;
  /* 기존보다 약 2pt 정도 크게 보이도록 */
  font-weight: 500;
}

.bond-info {
  font-size: 14px;
  color: #6e6e73;
}


.bond-log {
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f5f5f7;
  font-size: 11px;
  line-height: 1.4;
  color: #555;
  white-space: pre-wrap;
  min-height: 36px;
}

.bond-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.bond-row .btn {
  padding-inline: 14px;
  font-size: 13px;
}

.bond-info {
  margin: 0;
  font-size: 13px;
  color: #6e6e73;
}



/* 헤더 이미지만 padding 없이 카드의 테두리에 딱 붙이기 */
.quote-header-img {
  width: 100%;
  display: block;
  margin: 0;
  padding: 0;
  /* 사진만 패딩 0 */
  border-radius: 0;
}

/* =========================
   견적서 레이아웃 튜닝
   ========================= */

/* 카드 자체는 테두리/그림자/패딩 제거 */
.quote-card {
  padding: 0;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

/* 헤더 사진: 좌우 꽉 차게, 위/옆 여백 없음 */
.quote-header-img {
  display: block;
  width: 100%;
  margin: 0;
}

/* 사진 아래부터는 여유 있는 패딩 적용 */
.quote-title-row,
.quote-grid,
.quote-note {
  padding-left: 28px;
  padding-right: 28px;
}

/* 타이틀 행은 사진과 살짝 붙고 위아래만 조정 */
.quote-title-row {
  padding-top: 20px;
  /* 사진 아래 여백 */
  padding-bottom: 8px;
}

/* 표 영역 전체 패딩 */
.quote-grid {
  padding-top: 8px;
  padding-bottom: 24px;
}

/* 하단 주석 부분 패딩 */
.quote-note {
  padding-top: 4px;
  padding-bottom: 28px;
}

/* 브랜드 라벨 MERCEDES-BENZ: 자간 줄이기 */
.quote-brand {
  font-size: 12px;
  letter-spacing: 0.08em;
  /* 너무 벌어지지 않게 */
}

/* 브랜드 아래 들어가 있던 가로선 제거 */
.quote-title-left::after {
  content: none !important;
  border: none !important;
}

/* 연식 + 모델 라인: 세로 쌓기 */
.quote-model-line {
  display: flex;
  flex-direction: column;
  /* 연식 위, 모델 아래 */
  gap: 2px;
}

/* 연식: 모델보다 작게, 위에 표시 */
.quote-year {
  font-size: 13px;
  font-weight: 400;
  opacity: 0.8;
}

/* 모델명: 한 단계 크게 */
.quote-model {
  font-size: 20px;
  /* 기존보다 1~2pt 크게 */
  font-weight: 600;
}

/* 견적서 상단 모델명 아래 가로선 제거 */
.quote-title-left hr,
.quote-title-left::after {
  display: none !important;
}

.quote-title-row::after {
  display: none !important;
}

.quote-brand::after,
.quote-title-row::after {
  display: none !important;
  content: none !important;
}

.quote-year {
  font-size: 14px;
  color: #8a8a8a;
  margin-top: -2px;
  margin-bottom: -3px;
  /* 모델명과 간격을 더 좁힘 */
  line-height: 1.1;
}

.quote-model {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
  /* 줄간격 촘촘 */
  margin-top: 0;
  /* 연식과 간격을 최소화 */
}

/* 브랜드 라벨 MERCEDES-BENZ: 자간 줄이기 */
.quote-brand {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  margin-bottom: 4px;
  white-space: nowrap;
  /* 👈 줄바꿈 금지 */
}

/* MSRP + 옵션 줄 숨김 */
.quote-row-base-hidden {
  display: none;
}

/* 기준 선택 버튼 hover 시 배경색 추가 및 글자 색 흰색 */
.control-type-btn:hover {
  background-color: #7f0019;
  color: #ffffff;
}

.control-type-btn:hover span {
  color: #ffffff !important;
}

/* 체크된 상태의 hover 유지 */
.control-type-btn input:checked+span {
  color: #ffffff !important;
}

body {
  margin: 0;
  padding: 0;
}

/* INPUT WRAPPER WITH SUFFIX */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-wrapper .field-control {
  padding-right: 30px;
  /* Make space for the suffix */
}

.input-suffix {
  position: absolute;
  right: 14px;
  color: #86868b;
  font-size: 15px;
  pointer-events: none;
  /* Let clicks pass through to the input */
}

.main-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  /* 중요한 부분 */
}

.card {
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
  background: #fff;
}

/* ==============================
   📱 휴대폰 기본 1열, 태블릿/PC 3열
   - 휴대폰(세로): 1열
   - 아이폰 가로 / 아이패드 / PC: 3열
   ============================== */

/* 기본: 휴대폰 기준 1열 */
.grid-3,
.card-body.grid-3,
.quote-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px 18px;
}

/* 버튼 묶음은 기본적으로 오른쪽 정렬 유지 */
.bottom-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

/* 화면이 충분히 넓을 때(아이패드 포함)만 3열로 전환 */
@media (min-width: 720px) {

  .grid-3,
  .card-body.grid-3,
  .quote-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .page {
    max-width: 1040px;
    margin: 40px auto 48px;
    padding: 0 24px 24px;
  }

  .bottom-actions {
    justify-content: flex-end;
  }
}

/* 📱 모바일 최적화 */
@media (max-width: 768px) {

  /* 페이지 전체 여백 조금만 */
  .page {
    margin-top: 16px;
    padding: 0 10px 20px;
  }

  /* 카드끼리 간격 */
  .card {
    margin-bottom: 14px;
    padding: 16px 14px;
  }

  /* 3열 그리드를 1열로 */
  .card-body.grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .card-body.grid-3 .field {
    width: 100%;
  }

  /* 견적서 상단 – 1열 레이아웃 */
  .quote-title-row {
    flex-direction: column;
    /* 👈 브랜드/모델이 전체 폭 사용 */
    align-items: flex-start;
    padding-left: 16px;
    padding-right: 16px;
  }

  .quote-right {
    align-self: flex-end;
    /* 오른쪽 아래로 */
    margin-top: 6px;
  }

  .quote-grid,
  .quote-note {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* 모바일에서 브랜드/모델 폰트 조금 더 줄이기 */
  .quote-brand {
    font-size: 11px;
    letter-spacing: 0.16em;
  }

  .quote-year {
    font-size: 12px;
  }

  .quote-model {
    font-size: 22px;
    /* 전체 폭 쓰면서도 과하지 않게 */
    line-height: 1.2;
  }
}

@media (max-width: 768px) {
  .quote-right {
    margin-top: 4px;
  }

  .quote-tag {
    font-size: 9px;
    padding: 1px 8px;
  }

  .quote-id {
    font-size: 9px;
  }
}

/* 📱 모바일에서는 MERCEDES-BENZ pill 숨기기 */
@media (max-width: 768px) {
  .quote-tag {
    display: none !important;
  }
}

/* =========================
   NEW QUOTE VIEW STYLES
   ========================= */

/* 견적서 미리보기 컨테이너 */
#quotePreviewContainer {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 40px;
}

/* 모바일 견적서 모드 */
.quote-card.mobile-mode {
  width: 100%;
  max-width: 420px;
  /* 모바일 화면 너비 제한 */
  margin: 0 auto;
  background: #ffffff;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-radius: 0;
  /* 이미지는 꽉 차게 */
  overflow: hidden;
}

/* 일반 견적서 모드 (A4 최적화) */
.quote-card.general-mode {
  width: 100%;
  max-width: 794px;
  /* A4 너비 (96dpi 기준 약 794px) */
  margin: 0 auto;
  background: #ffffff;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  padding: 0;
  /* 내부 패딩은 quote-grid 등에서 처리 */
}

/* 일반 모드일 때 그리드 조정 (넓게 쓰기) */
.quote-card.general-mode .quote-grid {
  grid-template-columns: repeat(3, 1fr);
  /* 3열 배치 (1줄) */
  gap: 24px;
}

/* 모바일 모드일 때 그리드 (1열) */
.quote-card.mobile-mode .quote-grid {
  grid-template-columns: 1fr;
}

/* 미리보기 하단 버튼들 */
#quotePreviewContainer .bottom-actions {
  margin-top: 24px;
  width: 100%;
  max-width: 420px;
  /* 모바일 모드 기준 너비 */
  justify-content: space-between;
  /* 버튼 간격 벌리기 */
}

/* 일반 모드일 때는 버튼 컨테이너도 넓게 */
#quotePreviewContainer.general-view .bottom-actions {
  max-width: 794px;
}

/* 인쇄 시 설정 */
@media print {

  #inputForm,
  .page-header,
  .page-footer,
  .no-print {
    display: none !important;
  }

  #quotePreviewContainer {
    display: block !important;
    padding: 0;
  }

  .quote-card {
    box-shadow: none !important;
    max-width: 100% !important;
    width: 100% !important;
  }
}

/* Loading Spinner */
.btn.loading {
  color: transparent !important;
  pointer-events: none;
  position: relative;
}

.btn.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-top: -8px;
  margin-left: -8px;
  border: 2px solid #ffffff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* =========================
   HISTORY MODAL
   ========================= */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: #ffffff;
  width: 90%;
  max-width: 900px;
  max-height: 85vh;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid #e5e5ea;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f5f5f7;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1d1d1f;
}

.btn-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #86868b;
  cursor: pointer;
  line-height: 1;
}

.btn-close:hover {
  color: #1d1d1f;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  background: #ffffff;
}

/* HISTORY TABLE */
.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.history-table th {
  background: #f5f5f7;
  color: #6e6e73;
  font-weight: 600;
  padding: 12px 10px;
  border-bottom: 1px solid #d2d2d7;
  white-space: nowrap;
}

.history-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #e5e5ea;
  color: #1d1d1f;
  vertical-align: middle;
}

.history-table tr:last-child td {
  border-bottom: none;
}

.btn-delete {
  background: #ff3b30;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-delete:hover {
  background: #d70015;
}

/* MOBILE CARD VIEW */
@media (max-width: 768px) {
  .history-table thead {
    display: none;
  }

  .history-table,
  .history-table tbody,
  .history-table tr,
  .history-table td {
    display: block;
    width: 100%;
  }

  .history-table tr {
    margin-bottom: 16px;
    border: 1px solid #e5e5ea;
    border-radius: 12px;
    padding: 12px;
    background: #fbfbfd;
  }

  .history-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f5;
    font-size: 14px;
  }

  .history-table td:last-child {
    border-bottom: none;
    padding-top: 12px;
    justify-content: flex-end;
  }

  .history-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #6e6e73;
    font-size: 12px;
    margin-right: 12px;
  }
}
/* =========================
   MOBILE RESPONSIVE - Header
   ========================= */
@media (max-width: 768px) {
  .page-header {
    padding: 8px 12px 20px;
    gap: 8px;
  }

  .mb-logo {
    width: 45px;
    height: 45px;
  }

  .header-buttons .btn {
    padding: 5px 10px;
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .page-header {
    padding: 6px 8px 16px;
    gap: 6px;
  }

  .mb-logo {
    width: 40px;
    height: 40px;
  }

  .header-buttons {
    gap: 6px;
  }

  .header-buttons .btn {
    padding: 4px 8px;
    font-size: 10px;
  }
}
