/* ============================================================
   チャレンジシステム — グローバルスタイル
   ============================================================ */

/* ---- ベース ---- */
body {
  background: #F0F4F8;
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN",
               "Hiragino Sans", Meiryo, sans-serif;
  min-height: 100vh;
}

/* ---- ナビゲーション ---- */
.cs-navbar {
  background: linear-gradient(135deg, #1E3A5F 0%, #2563EB 100%);
  min-height: 52px;
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}

/* ---- ロゴアイコン ---- */
.cs-logo-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FCD34D, #F59E0B);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  box-shadow: 0 4px 16px rgba(245,158,11,.35);
}

/* ---- ページヘッダー ---- */
.cs-page-header {
  border-left: 4px solid #2563EB;
  padding-left: 12px;
}

/* ---- 合計金額ボックス ---- */
.cs-total-box {
  background: #EFF6FF;
  border: 2px dashed #93C5FD;
  transition: background .25s, border-color .25s;
}
.cs-total-box.cs-total-ok {
  background: #ECFDF5;
  border-color: #6EE7B7;
}
.cs-total-box.cs-total-ng {
  background: #FEF2F2;
  border-color: #FCA5A5;
  animation: shake .35s ease;
}
.cs-total-label {
  font-size: 1.7rem;
  font-weight: 800;
  color: #1E40AF;
  font-feature-settings: "tnum";
  letter-spacing: .02em;
}
.cs-total-ng .cs-total-label { color: #DC2626; }
.cs-total-ok .cs-total-label { color: #059669; }

@keyframes shake {
  0%,100% { transform: translateX(0); }
  25%      { transform: translateX(-6px); }
  75%      { transform: translateX(6px); }
}

/* ---- 申請カード ---- */
.cs-app-card {
  transition: box-shadow .2s, transform .2s;
}
.cs-app-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.10) !important;
  transform: translateY(-2px);
}

/* ---- 結果カード ---- */
.cs-result-card {
  border: 2px solid transparent;
}
.cs-result-success {
  background: linear-gradient(160deg, #F0FDF4 0%, #ECFDF5 100%);
  border-color: #6EE7B7;
}
.cs-result-fail {
  background: linear-gradient(160deg, #FEF2F2 0%, #FFF1F2 100%);
  border-color: #FCA5A5;
}
.cs-result-hold {
  background: linear-gradient(160deg, #FFFBEB 0%, #FEF9C3 100%);
  border-color: #FCD34D;
}
.cs-result-pending {
  background: linear-gradient(160deg, #EFF6FF 0%, #DBEAFE 100%);
  border-color: #93C5FD;
}

/* ---- イラスト ---- */
.cs-illust {
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.12));
}

/* ---- カード共通 ---- */
.card {
  border-radius: 1rem !important;
}
.card-header {
  border-bottom: none;
}

/* ---- ボタン ---- */
.btn {
  font-size: .95rem;
}
.btn-lg {
  padding: .75rem 1.5rem;
  font-size: 1rem;
}

/* ---- フォームコントロール ---- */
.form-control:focus,
.form-select:focus {
  border-color: #2563EB;
  box-shadow: 0 0 0 .2rem rgba(37,99,235,.2);
}

/* ---- テーブル ---- */
.table th {
  font-weight: 600;
  font-size: .85rem;
  color: #374151;
}
.table-hover tbody tr:hover {
  background: #EFF6FF;
}

/* ---- モバイル調整 ---- */
@media (max-width: 576px) {
  .cs-total-label { font-size: 1.4rem; }
  .cs-result-card { padding: 1rem !important; }
}

/* ---- ユーティリティ ---- */
.rounded-4  { border-radius: .85rem !important; }
.rounded-top-4 { border-top-left-radius: .85rem !important; border-top-right-radius: .85rem !important; }
.rounded-start-3 { border-top-left-radius: .5rem !important; border-bottom-left-radius: .5rem !important; }
.rounded-end-3   { border-top-right-radius: .5rem !important; border-bottom-right-radius: .5rem !important; }
.w-40 { width: 40%; }
