/*
 * Pincon Application Styles
 * シンプルで確実に動作するCSSスタイル
 */

:root {
  --primary: #1B5E8C;
  --primary-dark: #2980B9;
  --secondary: #4B5563;
  --text: #1A202C;
  --text-light: #718096;
  --border: #E5E7EB;
  --bg: #F7FAFC;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   BUTTONS - シンプルで確実に動作する設計
   ============================================ */

/* Primary Button - メインアクション */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  margin: 0.25rem;
  background: linear-gradient(135deg, #1B5E8C 0%, #154A6E 100%);
  color: white;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(102, 126, 234, 0.4);
  min-height: 44px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Secondary Button - サブアクション */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  margin: 0.25rem;
  background: white;
  color: var(--secondary);
  font-weight: 600;
  font-size: 1rem;
  border-radius: 0.75rem;
  border: 2px solid var(--border);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  min-height: 44px;
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #F9FAFB;
}

/* Outline Button - 控えめなアクション */
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  margin: 0.25rem;
  background: transparent;
  color: var(--text-light);
  font-weight: 600;
  font-size: 1rem;
  border-radius: 0.75rem;
  border: 2px solid var(--border);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  min-height: 44px;
}

.btn-outline:hover {
  background: #F9FAFB;
  border-color: #9CA3AF;
  color: var(--text);
}

/* Small Button */
.btn-sm {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  min-height: 36px;
}

/* Large Button */
.btn-lg {
  padding: 1.125rem 2.5rem;
  font-size: 1.125rem;
  min-height: 52px;
}

/* Button Group用 - 旧.btnクラスとの互換性 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  margin: 0.25rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 0.75rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  min-height: 44px;
}

/* ============================================
   BADGES - ステータス表示
   ============================================ */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-primary {
  background: #EEF2FF;
  color: #4F46E5;
}

.badge-success {
  background: #D1FAE5;
  color: #065F46;
}

.badge-accent {
  background: #FEF3C7;
  color: #92400E;
}

.badge-gray {
  background: #F3F4F6;
  color: #6B7280;
}

/* ============================================
   FORMS - フォーム要素
   ============================================ */

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

.form-input {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: white;
  color: var(--text);
  font-size: 1rem;
  transition: all 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input::placeholder {
  color: #A0AEC0;
}

/* ============================================
   CARDS - カード
   ============================================ */

.card {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: all 0.3s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.card-interactive {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: all 0.3s;
  cursor: pointer;
}

.card-interactive:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

/* ============================================
   LINKS - リンク
   ============================================ */

.link-primary {
  color: var(--text);
  font-weight: 500;
  transition: color 0.2s;
  text-decoration: none;
}

.link-primary:hover {
  color: var(--primary);
}

.link-secondary {
  color: var(--text-light);
  transition: color 0.2s;
  text-decoration: none;
}

.link-secondary:hover {
  color: var(--text);
}

/* ============================================
   FLASH MESSAGES - 通知メッセージ
   ============================================ */

.flash-notice {
  background: #F0FFF4;
  border: 1px solid #9AE6B4;
  color: #22543D;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
}

.flash-alert {
  background: #FFF5F5;
  border: 1px solid #FEB2B2;
  color: #742A2A;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
}

/* ============================================
   GRID - グリッドレイアウト
   ============================================ */

.grid-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .grid-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .grid-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1280px) {
  .grid-cards {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================================
   BACKGROUNDS - 背景
   ============================================ */

.bg-gradient-main {
  background: linear-gradient(135deg, #F7FAFC 0%, #FFFFFF 50%, #FFF5F0 100%);
}

/* ============================================
   UTILITIES - ユーティリティ
   ============================================ */

.img-container {
  position: relative;
  padding-bottom: 100%;
  background: #EDF2F7;
  border-radius: 0.5rem;
  overflow: hidden;
}

.img-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.img-container:hover img {
  transform: scale(1.05);
}

/* ============================================
   NAVIGATION - ナビゲーション
   ============================================ */

.nav-link {
  color: var(--secondary);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--text);
}

/* ============================================
   TABLE - テーブル
   ============================================ */

.table {
  width: 100%;
  border-collapse: collapse;
}

.table thead {
  background: #F7FAFC;
}

.table th {
  padding: 0.75rem 1.5rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table td {
  padding: 1rem 1.5rem;
  font-size: 0.875rem;
  color: var(--text);
}

.table tbody tr {
  border-top: 1px solid var(--border);
  transition: background 0.15s;
}

.table tbody tr:hover {
  background: #F7FAFC;
}

/* ============================================
   SCROLLBAR - スクロールバー
   ============================================ */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #F7FAFC;
}

::-webkit-scrollbar-thumb {
  background: #CBD5E0;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #A0AEC0;
}
