/* ========================================
   ヘッダー
   ======================================== */
header {
  text-align: center;
  color: white;
  margin-bottom: 20px;
}

h1 {
  font-size: 2.5em;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  margin-bottom: 5px;
}

.description {
  color: rgba(37, 89, 139, 0.7);
  font-size: 0.9em;
  margin-bottom: 20px;
  line-height: 1.6;
}

.description a {
  color: rgba(37, 89, 139, 0.9);
  text-decoration: underline;
}

.description a:hover {
  color: white;
}

/* ========================================
   セクション区切り
   ======================================== */
.section-divider {
  border: none;
  border-top: 2px solid #e0e0e0;
  margin: 25px 0;
}

/* コース説明リンク */
.course-link-row {
  text-align: right;
  margin-bottom: 10px;
}

.course-link {
  color: #667eea;
  text-decoration: none;
  font-size: 0.85em;
  font-weight: 500;
}

.course-link:hover {
  text-decoration: underline;
  color: #764ba2;
}

/* ========================================
   コントロールパネル
   ======================================== */
.controls {
  background: white;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.control-group {
  margin-bottom: 20px;
}

.control-group:last-child {
  margin-bottom: 0;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

/* セレクトボックス */
select {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  background: white;
  cursor: pointer;
  transition: border-color 0.3s;
}

select:hover {
  border-color: #667eea;
}

select:focus {
  outline: none;
  border-color: #667eea;
}

/* チェックボックス */
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.checkbox-item:hover {
  background-color: #f5f5f5;
}

.checkbox-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.checkbox-item label {
  margin: 0;
  cursor: pointer;
  font-weight: 500;
}

/* ========================================
   アコーディオンフィルター（index固有）
   ======================================== */
.advanced-filter {
  margin-top: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}

/* ラジオボタンを非表示にする */
.approval-radio {
  display: none;
}


/* ========================================
   テーブル（index固有サイズ）
   ======================================== */
.table-container {
  background: white;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  overflow-x: auto;
}

.recent-submissions {
  margin-top: 20px;
}

th {
  padding: 12px 8px;
  font-size: 0.9em;
  position: relative;
}

/* ソート可能なヘッダー */
th.sortable {
  cursor: pointer;
  padding-right: 25px;
}

th.sortable:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ソートインジケーター */
th.sortable::after {
  white-space: pre;
  content: "▲\A▼";
  line-height: 0.8;
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.3;
  font-size: 0.8em;
}

th.sort-asc::after {
  content: "▲";
  opacity: 1;
}

th.sort-desc::after {
  content: "▼";
  opacity: 1;
}

td {
  padding: 10px 8px;
  font-size: 0.85em;
}

/* 操作方法列のスタイル */
td.control-cell {
  font-size: 1.1em;
  text-align: center;
}

/* ========================================
   特殊要素
   ======================================== */
/* プレイヤーリンク */
.player-link {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.player-link:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* ========================================
   フッター
   ======================================== */
/* スマホ限定の改行 */
.sp-only {
  display: none;
}

/* ========================================
   ローディング
   ======================================== */
.loading {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 1.2em;
}

/* ========================================
   レスポンシブ
   ======================================== */

/* 申請日時セルのデフォルト（デスクトップ：インライン） */
.datetime-cell .date-part,
.datetime-cell .time-part {
  display: inline;
}
.datetime-cell .time-part::before {
  content: " ";
}

@media (max-width: 768px) {
  .sp-only {
    display: block;
  }

  h1 {
    font-size: 2em;
  }

  .controls {
    padding: 20px;
  }

  .controls label {
    font-size: 0.85em;
    margin-bottom: 6px;
  }

  .controls select {
    padding: 8px;
    font-size: 0.85em;
  }

  .course-link-row {
    margin-bottom: 4px;
  }

  .course-link {
    font-size: 0.7em;
  }

  .section-title {
    font-size: 1.1em;
    margin-bottom: 14px;
  }

  /* テーブル全体の文字サイズ縮小 */
  table {
    font-size: 0.7em;
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  th,
  td {
    padding: 6px 4px;
  }

  .table-container,
  .recent-submissions {
    padding: 15px;
  }


  /* 空状態のサイズ縮小 */
  .empty-state {
    padding: 30px 15px;
  }

  .empty-state-icon {
    font-size: 2.5em;
    margin-bottom: 12px;
  }

  .empty-state h2 {
    font-size: 1.1em;
    margin-bottom: 6px;
  }

  .empty-state p {
    font-size: 0.9em;
  }

  /* 最近の申請の申請日時を日付と時刻で2行にする */
  .datetime-cell .date-part,
  .datetime-cell .time-part {
    display: block;
    white-space: nowrap;
  }
  .datetime-cell .time-part::before {
    content: none;
  }
}
