/* ===== Sprout アプリ用スタイル ===== */

/* ─────────────────────────────────────────────
   フォーム要素
───────────────────────────────────────────── */
.form-input {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: #fff;
  color: #1f2937;
}

.form-input:focus {
  outline: none;
  border-color: #88ca88;
  box-shadow: 0 0 0 3px rgba(136, 202, 136, 0.2);
}

.form-input::placeholder {
  color: #9ca3af;
}

.form-select {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 0.625rem 2.5rem 0.625rem 1rem;
  font-size: 0.875rem;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 0.75rem center / 1.25rem;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.form-select:focus {
  outline: none;
  border-color: #88ca88;
  box-shadow: 0 0 0 3px rgba(136, 202, 136, 0.2);
}

.form-textarea {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  resize: vertical;
  min-height: 100px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-textarea:focus {
  outline: none;
  border-color: #88ca88;
  box-shadow: 0 0 0 3px rgba(136, 202, 136, 0.2);
}

/* ─────────────────────────────────────────────
   診断フォーム
───────────────────────────────────────────── */
.diagnosis-step {
  display: none;
  animation: fadeSlideIn 0.3s ease forwards;
}

.diagnosis-step.active {
  display: block;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateX(16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 診断選択肢カード */
.option-card {
  border: 2px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.option-card:hover {
  border-color: #88ca88;
  background: #f0f9f0;
  transform: translateY(-1px);
}

.option-card.selected {
  border-color: #3a9a3a;
  background: #f0f9f0;
}

.option-card input[type="radio"],
.option-card input[type="checkbox"] {
  accent-color: #3a9a3a;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/* 進捗バー */
.progress-bar {
  height: 4px;
  background: #e5e7eb;
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3a9a3a, #55ae55);
  border-radius: 9999px;
  transition: width 0.4s ease;
}

/* ─────────────────────────────────────────────
   カードコンポーネント
───────────────────────────────────────────── */
.app-card {
  background: #fff;
  border-radius: 1.25rem;
  border: 1px solid #f3f4f6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
}

.app-card-hover {
  transition: box-shadow 0.2s, transform 0.2s;
}

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

/* ─────────────────────────────────────────────
   講師カード
───────────────────────────────────────────── */
.teacher-avatar {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  object-fit: cover;
  background: linear-gradient(135deg, #3a9a3a, #718f52);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
  flex-shrink: 0;
}

.teacher-card-list {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem;
  border-radius: 1.25rem;
  border: 1px solid #f3f4f6;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.teacher-card-list:hover {
  border-color: #dcf0dc;
  box-shadow: 0 2px 8px rgba(58, 154, 58, 0.08);
}

/* お気に入りボタン */
.favorite-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  font-size: 0.875rem;
  color: #9ca3af;
}

.favorite-btn:hover,
.favorite-btn.active {
  border-color: #f87171;
  color: #ef4444;
  background: #fef2f2;
}

/* ─────────────────────────────────────────────
   予約・トークカード
───────────────────────────────────────────── */
.booking-card {
  border-radius: 1.25rem;
  border: 1px solid #f3f4f6;
  background: #fff;
  padding: 1.25rem 1.5rem;
  transition: box-shadow 0.15s;
}

.booking-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* ─────────────────────────────────────────────
   トークルーム
───────────────────────────────────────────── */
.lesson-room {
  display: grid;
  grid-template-columns: 1fr 320px;
  height: calc(100vh - 3.5rem);
  gap: 0;
  overflow: hidden;
}

@media (max-width: 768px) {
  .lesson-room {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
    height: auto;
  }
}

.video-area {
  position: relative;
  background: #0f172a;
  border-radius: 0;
}

.material-panel {
  border-left: 1px solid #e5e7eb;
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.material-panel-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.material-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
}

.page-nav {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────
   ダッシュボード
───────────────────────────────────────────── */
.stat-card {
  background: #fff;
  border-radius: 1.25rem;
  border: 1px solid #f3f4f6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

/* ─────────────────────────────────────────────
   アラート / フラッシュメッセージ
───────────────────────────────────────────── */
.flash-message {
  animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─────────────────────────────────────────────
   テーブル
───────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #f3f4f6;
}

.data-table td {
  padding: 0.875rem 1rem;
  color: #374151;
  border-bottom: 1px solid #f9fafb;
  font-size: 0.875rem;
}

.data-table tbody tr:hover td {
  background: #fafafa;
}

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

/* ─────────────────────────────────────────────
   モーダル
───────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

.modal-box {
  background: #fff;
  border-radius: 1.5rem;
  padding: 2rem;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  animation: scaleUp 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* ─────────────────────────────────────────────
   スケルトンローディング
───────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #f3f4f6 25%, #e9eaec 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0.5rem;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─────────────────────────────────────────────
   ページネーション
───────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.page-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-decoration: none;
  color: #6b7280;
}

.page-btn:hover {
  background: #f3f4f6;
  border-color: #e5e7eb;
}

.page-btn.active {
  background: #3a9a3a;
  color: #fff;
  border-color: #3a9a3a;
}

/* ─────────────────────────────────────────────
   ステータスインジケーター
───────────────────────────────────────────── */
.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  display: inline-block;
  flex-shrink: 0;
}

.status-dot.green { background: #22c55e; }
.status-dot.yellow { background: #eab308; }
.status-dot.red { background: #ef4444; }
.status-dot.gray { background: #9ca3af; }

.status-dot.pulse {
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ─────────────────────────────────────────────
   タブ
───────────────────────────────────────────── */
.tab-bar {
  display: flex;
  border-bottom: 2px solid #f3f4f6;
  gap: 0;
}

.tab-item {
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.tab-item:hover {
  color: #3a9a3a;
}

.tab-item.active {
  color: #3a9a3a;
  border-bottom-color: #3a9a3a;
}

/* ─────────────────────────────────────────────
   空状態
───────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  color: #9ca3af;
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* ─────────────────────────────────────────────
   ドロップダウン
───────────────────────────────────────────── */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 11rem;
  background: #fff;
  border: 1px solid #f3f4f6;
  border-radius: 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  padding: 0.375rem;
  z-index: 50;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.875rem;
  border-radius: 0.625rem;
  font-size: 0.875rem;
  color: #374151;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.1s;
  width: 100%;
  border: none;
  background: none;
  text-align: left;
}

.dropdown-item:hover {
  background: #f9fafb;
}

.dropdown-item.danger {
  color: #ef4444;
}

.dropdown-item.danger:hover {
  background: #fef2f2;
}

/* ─────────────────────────────────────────────
   レスポンシブユーティリティ
───────────────────────────────────────────── */
@media (max-width: 640px) {
  .hide-mobile {
    display: none !important;
  }
  
  .app-card {
    padding: 1rem;
  }
  
  .lesson-room {
    height: auto;
    min-height: 100vh;
  }
}

/* ─────────────────────────────────────────────
   ローディングスピナー
───────────────────────────────────────────── */
.spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid #e5e7eb;
  border-top-color: #3a9a3a;
  border-radius: 9999px;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

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

/* ─────────────────────────────────────────────
   管理者画面
───────────────────────────────────────────── */
.admin-sidebar {
  width: 14rem;
  background: #fff;
  border-right: 1px solid #f3f4f6;
  min-height: calc(100vh - 3.5rem);
  padding: 1rem 0.75rem;
  flex-shrink: 0;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.875rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  color: #4b5563;
  text-decoration: none;
  transition: background 0.1s, color 0.1s;
  margin-bottom: 0.125rem;
}

.admin-nav-item:hover {
  background: #f0f9f0;
  color: #2d7d2d;
}

.admin-nav-item.active {
  background: #dcf0dc;
  color: #2d7d2d;
  font-weight: 600;
}

.admin-nav-item i {
  width: 1rem;
  font-size: 0.75rem;
  text-align: center;
}

/* ─────────────────────────────────────────────
   KPIカード（管理者ダッシュボード）
───────────────────────────────────────────── */
.kpi-card {
  background: #fff;
  border-radius: 1.25rem;
  border: 1px solid #f3f4f6;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  padding: 1.25rem;
}

.kpi-number {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: #1f2937;
}

.kpi-label {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 500;
}
