/* ─────────────────────────────────────────────────────────────
   폰셀프 선불폰 자동충전 — 고객 페이지 스타일
   미니멀 인디고 테마
   ───────────────────────────────────────────────────────────── */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --c-primary:       #4f46e5;
  --c-primary-dark:  #4338ca;
  --c-primary-light: #eef2ff;
  --c-text:          #1f2937;
  --c-text-light:    #6b7280;
  --c-text-muted:    #9ca3af;
  --c-bg:            #f3f4f6;
  --c-card:          #ffffff;
  --c-border:        #e5e7eb;
  --c-border-light:  #f3f4f6;
  --c-success:       #10b981;
  --c-warn:          #f59e0b;
  --c-error:         #ef4444;
  --shadow-sm:  0 1px 2px rgba(0,0,0,0.05);
  --shadow-md:  0 4px 8px rgba(0,0,0,0.06);
  --radius:     12px;
  --radius-sm:  8px;
}

html, body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-text-size-adjust: 100%;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, select, button { font-family: inherit; font-size: inherit; }
input:focus, select:focus { outline: 2px solid var(--c-primary); outline-offset: 1px; }

/* ─── 히어로 배너 ──────────────────────────────────────── */
.header-hero {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  display: block;
  line-height: 0;
  overflow: hidden;
  background: var(--c-primary);
}
.header-hero img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* ─── 컨테이너 ────────────────────────────────────────── */
.container {
  max-width: 480px; margin: 0 auto;
  padding: 16px;
}

/* ─── 카드 ────────────────────────────────────────────── */
.card {
  background: var(--c-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 18px 20px;
  margin-bottom: 14px;
}
.card-title {
  font-size: 15px; font-weight: 700;
  color: var(--c-text); margin-bottom: 12px;
}

/* ─── 입금계좌 박스 ──────────────────────────────────── */
.account-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--c-primary-light);
  padding: 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.account-text {
  flex: 1;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.5;
}
.copy-btn {
  background: var(--c-primary);
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}
.copy-btn:active { background: var(--c-primary-dark); }
.account-hint {
  margin-top: 10px;
  font-size: 13px; color: var(--c-text-light);
  line-height: 1.5;
}
.account-hint strong { color: var(--c-text); }

/* ─── 입력 힌트 (필드 아래 작은 안내) ─────────────────── */
.field-hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--c-text-light);
  line-height: 1.5;
}

/* ─── 자동입력 안내 ──────────────────────────────────── */
.autofill-notice {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  font-size: 13px;
  display: flex; justify-content: space-between; align-items: center;
}
.link-btn {
  color: var(--c-primary);
  font-size: 13px; font-weight: 600;
  text-decoration: underline;
  background: none; padding: 0;
}

/* ─── 폼 ────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 13px; font-weight: 600;
  color: var(--c-text-light);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--c-text);
  transition: border-color 0.15s;
}
.form-input::placeholder { color: var(--c-text-muted); }
.form-input:focus {
  border-color: var(--c-primary);
  outline: none;
}

/* ─── 충전 금액 그리드 ───────────────────────────────── */
.amount-section-label {
  font-size: 12px;
  color: var(--c-text-muted);
  margin: 10px 0 8px;
  font-weight: 600;
}
.amount-section-label:first-child { margin-top: 4px; }
.amount-grid {
  display: grid; gap: 8px;
}
.amount-grid-5 { grid-template-columns: repeat(5, 1fr); }
.amount-grid-4 { grid-template-columns: repeat(4, 1fr); }
.amount-btn {
  background: #fff;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 14px 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--c-text);
  transition: all 0.15s;
}
.amount-btn:hover { border-color: var(--c-primary); }
.amount-btn.active {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
}
.amount-btn-flat {
  font-size: 13px;
  padding: 14px 4px;
}

/* 작은 화면 대응 */
@media (max-width: 360px) {
  .amount-grid-5 { grid-template-columns: repeat(5, 1fr); }
  .amount-btn { font-size: 12px; padding: 12px 2px; }
  .amount-btn-flat { font-size: 11px; }
}

/* ─── 금액 요약 ──────────────────────────────────────── */
.amount-summary {
  margin-top: 14px;
  padding: 14px;
  background: var(--c-primary-light);
  border-radius: var(--radius-sm);
}
.amount-row {
  display: flex; justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
}
.amount-row.total {
  font-size: 16px;
  font-weight: 800;
  color: var(--c-text);
}
.pay-amount {
  color: var(--c-primary);
  font-size: 18px;
  font-weight: 800;
}

/* ─── 알림 ───────────────────────────────────────────── */
.alert {
  margin: 12px 0;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
}
.alert-error { background: #fef2f2; color: var(--c-error); border: 1px solid #fecaca; }
.alert-warn  { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.alert-info  { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.hidden      { display: none !important; }

/* ─── 제출 버튼 ──────────────────────────────────────── */
.submit-btn {
  width: 100%;
  padding: 16px;
  margin-top: 6px;
  background: var(--c-primary);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.submit-btn:hover:not(:disabled) { background: var(--c-primary-dark); }
.submit-btn:active:not(:disabled) { transform: translateY(1px); }
.submit-btn:disabled {
  background: var(--c-text-muted);
  cursor: not-allowed;
}

/* ─── 안내사항 리스트 ────────────────────────────────── */
.notice-list {
  list-style: none;
  font-size: 13px;
  color: var(--c-text-light);
  line-height: 1.7;
}
.notice-list li {
  padding-left: 16px;
  position: relative;
  margin-bottom: 4px;
}
.notice-list li::before {
  content: "·";
  position: absolute;
  left: 4px;
  font-weight: 800;
  color: var(--c-primary);
}
.notice-list strong { color: var(--c-text); font-weight: 700; }

/* ─── 고객센터 ──────────────────────────────────────── */
.cs-section { text-align: center; }
.cs-title {
  font-size: 15px; font-weight: 700;
  margin-bottom: 12px;
}
.cs-kakao {
  display: inline-block;
  background: #fee500;
  color: #3c1e1e;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 14px;
}

/* ─── 하단 버튼 (전화 / 폰셀프 메인) ─────────────────── */
.bottom-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.ba-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 15px 10px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
}
.ba-call {
  background: var(--c-primary);
  color: #fff;
}
.ba-call:active { background: var(--c-primary-dark); }
.ba-home {
  background: var(--c-card);
  color: var(--c-primary);
  border: 1.5px solid var(--c-primary);
}
.ba-home:active { background: var(--c-primary-light); }

/* ─── 푸터 ──────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 20px 16px 24px;
  font-size: 11px;
  color: var(--c-text-muted);
  line-height: 1.6;
}
.footer-info { margin-bottom: 4px; }

/* ─── 토스트 ────────────────────────────────────────── */
.cust-toast {
  position: fixed;
  bottom: 30px; left: 50%;
  transform: translateX(-50%);
  background: rgba(31, 41, 55, 0.95);
  color: #fff;
  padding: 12px 20px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  z-index: 999;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ─── 모달 ──────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 998;
  display: flex; justify-content: center; align-items: center;
  padding: 20px;
}
.modal-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-md);
}
.modal-card h2 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--c-text);
}
.kv {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 10px 12px;
  margin-bottom: 14px;
  font-size: 14px;
}
.kv .k { color: var(--c-text-light); font-weight: 600; }
.kv .v { color: var(--c-text); font-weight: 600; }
.kv .v.amount { color: var(--c-primary); font-weight: 800; font-size: 16px; }
.bank-row {
  background: var(--c-primary-light);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}
.bank-row .kv { margin-bottom: 0; gap: 6px 12px; font-size: 13px; }
.modal-notice {
  font-size: 13px;
  color: var(--c-text-light);
  line-height: 1.55;
  background: #fffbeb;
  border: 1px solid #fde68a;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.modal-actions {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 10px;
}
.btn-secondary, .btn-primary {
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
}
.btn-secondary {
  background: #f3f4f6;
  color: var(--c-text);
}
.btn-primary {
  background: var(--c-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--c-primary-dark); }
.btn-primary:disabled { background: var(--c-text-muted); cursor: not-allowed; }
