/* ──────────────────────────────────────────────────────────
   HC Customer Management  ─  フロントエンドスタイル
   ────────────────────────────────────────────────────────── */

:root {
  --hc-primary:    #2563eb;
  --hc-primary-h:  #1d4ed8;
  --hc-danger:     #dc2626;
  --hc-success:    #16a34a;
  --hc-warning:    #d97706;
  --hc-info:       #0891b2;
  --hc-gray-50:    #f8fafc;
  --hc-gray-100:   #f1f5f9;
  --hc-gray-200:   #e2e8f0;
  --hc-gray-700:   #334155;
  --hc-gray-900:   #0f172a;
  --hc-radius:     8px;
  --hc-shadow:     0 1px 3px rgba(0,0,0,.12);
}

/* ── 共通コンテナ ─────────────────────────────────────── */
.hc-login-wrap,
.hc-apply-wrap,
.hc-mypage-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px 40px;
  font-size: 15px;
  color: var(--hc-gray-900);
}

/* ── フォーム ─────────────────────────────────────────── */
.hc-form .hc-form-group {
  margin-bottom: 20px;
}

.hc-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--hc-gray-700);
}

.hc-form input[type="text"],
.hc-form input[type="email"],
.hc-form input[type="tel"],
.hc-form input[type="date"],
.hc-form input[type="password"],
.hc-form input[type="number"],
.hc-form select,
.hc-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border: 1px solid var(--hc-gray-200);
  border-radius: var(--hc-radius);
  font-size: 15px;
  transition: border-color .2s, box-shadow .2s;
  background: #fff;
}

.hc-form input:focus,
.hc-form select:focus,
.hc-form textarea:focus {
  outline: none;
  border-color: var(--hc-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

.hc-form .description {
  margin-top: 4px;
  font-size: 13px;
  color: #64748b;
}

.hc-required { color: var(--hc-danger); margin-left: 4px; }
.hc-optional { color: #94a3b8; font-size: 12px; font-weight: normal; margin-left: 4px; }

/* 読み取り専用入力（ログイン済み会員の氏名・メール） */
.hc-input-readonly {
  background: var(--hc-gray-50) !important;
  color: var(--hc-gray-700);
  cursor: default;
  border-color: var(--hc-gray-200) !important;
}

.hc-error-msg {
  display: block;
  color: var(--hc-danger);
  font-size: 13px;
  margin-top: 4px;
}

/* ── ボタン ───────────────────────────────────────────── */
.hc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: var(--hc-radius);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background .2s, opacity .2s;
  text-decoration: none;
}

.hc-btn:disabled { opacity: .55; cursor: not-allowed; }

.hc-btn--primary {
  background: var(--hc-primary);
  color: #fff;
}
.hc-btn--primary:hover { background: var(--hc-primary-h); }

.hc-btn--secondary {
  background: var(--hc-gray-100);
  color: var(--hc-gray-700);
  border-color: var(--hc-gray-200);
}
.hc-btn--secondary:hover { background: var(--hc-gray-200); }

.hc-btn--danger {
  background: var(--hc-danger);
  color: #fff;
}

.hc-btn--large { padding: 14px 32px; font-size: 17px; }
.hc-btn--small { padding: 5px 12px; font-size: 13px; }

/* ── 郵便番号検索行 ────────────────────────────────── */
.hc-postal-row {
  display: flex;
  gap: 8px;
}
.hc-postal-row input { flex: 1; }

/* ── アラート ─────────────────────────────────────────── */
.hc-alert {
  padding: 12px 16px;
  border-radius: var(--hc-radius);
  margin-bottom: 16px;
  font-size: 14px;
}
.hc-alert--error   { background: #fef2f2; color: #991b1b; border-left: 4px solid var(--hc-danger); }
.hc-alert--success { background: #f0fdf4; color: #166534; border-left: 4px solid var(--hc-success); }
.hc-alert--warning { background: #fffbeb; color: #92400e; border-left: 4px solid var(--hc-warning); }
.hc-alert--info    { background: #f0f9ff; color: #0c4a6e; border-left: 4px solid var(--hc-info); }

/* ── 成功ボックス ─────────────────────────────────────── */
.hc-success-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--hc-radius);
  padding: 24px;
  text-align: center;
}
.hc-success-box h3 { color: var(--hc-success); }

/* ── マイページ ナビゲーション ───────────────────────── */
.hc-mypage-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--hc-gray-200);
  padding-bottom: 0;
}

.hc-mypage-nav a {
  padding: 10px 16px;
  border-radius: 6px 6px 0 0;
  font-size: 14px;
  color: var(--hc-gray-700);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

.hc-mypage-nav a:hover { color: var(--hc-primary); }
.hc-mypage-nav a.active {
  color: var(--hc-primary);
  border-bottom-color: var(--hc-primary);
  font-weight: 600;
}

.hc-logout-link { color: var(--hc-danger) !important; margin-left: auto; }

/* 査定確認が完了するまでロックされるナビ項目 */
.hc-nav-disabled {
  padding: 10px 16px;
  border-radius: 6px 6px 0 0;
  font-size: 14px;
  color: #cbd5e1;
  cursor: not-allowed;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  user-select: none;
}

/* ── セクション ──────────────────────────────────────── */
.hc-section {
  background: #fff;
  border: 1px solid var(--hc-gray-200);
  border-radius: var(--hc-radius);
  padding: 24px;
  box-shadow: var(--hc-shadow);
}
.hc-section h2 { margin-top: 0; }
.hc-divider { margin: 32px 0; border: none; border-top: 1px solid var(--hc-gray-200); }

/* ── テーブル ─────────────────────────────────────────── */
.hc-assessment-table,
.hc-detail-table,
.hc-items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.hc-assessment-table th,
.hc-assessment-table td,
.hc-detail-table th,
.hc-detail-table td,
.hc-items-table th,
.hc-items-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--hc-gray-200);
  text-align: left;
}

.hc-detail-table th { width: 140px; background: var(--hc-gray-50); color: var(--hc-gray-700); }
.hc-assessment-table thead th { background: var(--hc-gray-100); font-weight: 600; }

/* ── ステータスバッジ ─────────────────────────────────── */
.hc-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
}
.hc-status--temp       { background: #f1f5f9; color: #475569; }
.hc-status--mailed     { background: #fef3c7; color: #92400e; }
.hc-status--active     { background: #dcfce7; color: #166534; }
.hc-status--suspended  { background: #fee2e2; color: #991b1b; }
.hc-status--pending    { background: #f1f5f9; color: #475569; }
.hc-status--received   { background: #dbeafe; color: #1e40af; }
.hc-status--assessing  { background: #ede9fe; color: #5b21b6; }
.hc-status--offered    { background: #fef3c7; color: #92400e; }
.hc-status--approved   { background: #dcfce7; color: #166534; }
.hc-status--rejected   { background: #fee2e2; color: #991b1b; }
.hc-status--paid       { background: #d1fae5; color: #065f46; }
.hc-status--returned   { background: #f3f4f6; color: #374151; }
.hc-status--cancelled  { background: #f3f4f6; color: #6b7280; }

/* ── 査定承認アクション ──────────────────────────────── */
.hc-assessment-actions {
  margin-top: 24px;
  padding: 20px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--hc-radius);
}
.hc-offer-info { font-size: 16px; margin-bottom: 16px; }
.hc-offer-info strong { font-size: 22px; color: var(--hc-primary); }
.hc-assessment-actions .hc-btn { margin-right: 12px; margin-top: 8px; }

/* ── 集荷申込: 初回 / リピーター 選択カード ─────────── */
.hc-apply-type-select {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
}

.hc-apply-type-card {
  flex: 1;
  border: 2px solid var(--hc-gray-200);
  border-radius: var(--hc-radius);
  padding: 20px;
  text-align: center;
  background: #fff;
}

.hc-apply-type-card--returning {
  border-color: var(--hc-primary);
  background: #eff6ff;
}

.hc-apply-type-icon {
  font-size: 32px;
  line-height: 1;
  margin-bottom: 10px;
}

.hc-apply-type-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--hc-gray-900);
}

.hc-apply-type-card p {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 14px;
}

@media (max-width: 600px) {
  .hc-apply-type-select { flex-direction: column; }
}

/* ── リピートバナー ───────────────────────────────────── */
.hc-repeat-banner {
  background: var(--hc-gray-100);
  border-left: 4px solid var(--hc-primary);
  padding: 12px 16px;
  border-radius: 0 var(--hc-radius) var(--hc-radius) 0;
  margin-bottom: 20px;
  font-size: 14px;
}

/* ── プライバシーノート ───────────────────────────────── */
.hc-privacy-note {
  font-size: 12px;
  color: #64748b;
  margin-top: 16px;
}

/* ── ログインページ ───────────────────────────────────── */
.hc-login-wrap {
  max-width: 440px;
}
.hc-login-desc { color: var(--hc-gray-700); margin-bottom: 24px; }
.hc-login-notice { font-size: 13px; color: #64748b; margin-top: 20px; }

/* ── 初回ログイン: 査定結果確認画面 ──────────────────── */
.hc-confirm-header {
  text-align: center;
  padding: 24px 0 20px;
  border-bottom: 1px solid var(--hc-gray-200);
  margin-bottom: 24px;
}
.hc-confirm-icon { font-size: 52px; line-height: 1; }
.hc-confirm-header h2 { margin: 12px 0 8px; font-size: 22px; }
.hc-confirm-header p  { color: var(--hc-gray-700); margin: 0; }

.hc-confirm-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--hc-gray-700);
  background: var(--hc-gray-50);
  padding: 12px 16px;
  border-radius: var(--hc-radius);
}

.hc-confirm-items { margin-bottom: 20px; overflow-x: auto; }
.hc-confirm-items .hc-items-table thead th { background: var(--hc-gray-100); }

.hc-confirm-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #eff6ff;
  border: 2px solid var(--hc-primary);
  border-radius: var(--hc-radius);
  padding: 16px 20px;
  margin-bottom: 28px;
}
.hc-confirm-total-label  { font-weight: 600; font-size: 16px; }
.hc-confirm-total-amount { font-size: 34px; font-weight: 700; color: var(--hc-primary); }

.hc-confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hc-confirm-actions .hc-btn { width: 100%; justify-content: center; }

/* ── お買取不可商品セクション ────────────────────────────── */
.hc-rejected-section {
  margin-top: 20px;
}

.hc-rejected-section > h3 {
  font-size: 14px;
  color: var(--hc-danger);
  margin: 0 0 8px;
}

.hc-rejected-items {
  background: #fff7f7;
  border: 1px solid #fecaca;
  border-radius: var(--hc-radius);
  overflow: hidden;
}

.hc-rejected-items th,
.hc-rejected-items td {
  padding: 10px 12px;
  border-bottom: 1px solid #fee2e2;
  text-align: left;
}

.hc-rejected-items thead th {
  background: #fee2e2;
  font-size: 13px;
}

.hc-disposition-radio {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.hc-disposition-radio label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: normal;
  cursor: pointer;
  font-size: 14px;
  color: var(--hc-gray-700);
}

.hc-disposition-radio input[type="radio"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--hc-primary);
}

/* ── レスポンシブ ─────────────────────────────────────── */
@media (max-width: 600px) {
  .hc-postal-row { flex-direction: column; }
  .hc-mypage-nav { overflow-x: auto; }
  .hc-assessment-actions .hc-btn { display: block; width: 100%; margin-right: 0; }
  .hc-confirm-total-amount { font-size: 26px; }
}
