/* ============================================================
   修学旅行シートアサインツール - スタイルシート
   Aerolopa.com インスパイア デザイン
   ============================================================ */

:root {
  --bg-primary:    #07091a;
  --bg-secondary:  #0d1127;
  --bg-card:       #111828;
  --bg-card-hover: #16203a;
  --bg-elevated:   #1a2540;
  --border:        #1e2d4a;
  --border-light:  #2a3f6a;
  --text-primary:  #e8edf8;
  --text-secondary:#8b9fc4;
  --text-muted:    #4a5a7a;
  --accent:        #4A9EFF;
  --accent-hover:  #6ab4ff;
  --accent-dim:    rgba(74,158,255,0.12);
  --success:       #3ecf8e;
  --warning:       #f5a623;
  --danger:        #e05252;
  --gold:          #d4af37;
  --purple:        #9b5de5;

  /* 座席クラスカラー */
  --seat-first:    #d4af37;
  --seat-classj:   #4A9EFF;
  --seat-economy:  #2a3f6a;
  --seat-empty:    #111828;
  --seat-border:   #1e2d4a;

  /* グループカラーパレット */
  --g1: #4A9EFF; --g2: #e05252; --g3: #3ecf8e; --g4: #f5a623;
  --g5: #9b5de5; --g6: #00b8d9; --g7: #ff6b9d; --g8: #a8e063;
  --g9: #f7971e; --g10: #43cea2;

  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --shadow:    0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.6);

  --font-main: 'Inter', 'Noto Sans JP', sans-serif;
  --transition: 0.18s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── テキストユーティリティ ────────────────────────────── */
.text-muted    { color: var(--text-muted); }
.text-secondary{ color: var(--text-secondary); }
.text-accent   { color: var(--accent); }
.text-success  { color: var(--success); }
.text-warning  { color: var(--warning); }
.text-danger   { color: var(--danger); }
.text-center   { text-align: center; }
.font-mono     { font-family: 'Courier New', monospace; }

.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }

/* ── ヘッダー ───────────────────────────────────────────── */
.app-header {
  background: rgba(7,9,26,0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  height: 56px;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.logo-sub {
  font-size: 12px;
  color: var(--text-muted);
  border-left: 1px solid var(--border);
  padding-left: 10px;
  margin-left: 2px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  transition: color var(--transition);
}
.nav-link:hover { color: var(--accent); }

/* ── ボタン ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(74,158,255,0.35); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-primary);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-elevated); }

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

.btn-lg   { padding: 12px 24px; font-size: 14px; }
.btn-sm   { padding: 6px 12px; font-size: 12px; }
.btn-xs   { padding: 4px 8px; font-size: 11px; }
.btn-block{ width: 100%; justify-content: center; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ── フォーム ─────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.span-2 { grid-column: span 2; }

.form-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-label.required::after {
  content: ' *';
  color: var(--danger);
}

.form-label-sm { font-size: 11px; color: var(--text-muted); }

.form-input,
.form-select {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 9px 12px;
  font-size: 14px;
  font-family: var(--font-main);
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(74,158,255,0.15);
}

.form-input::placeholder { color: var(--text-muted); }
.form-select { cursor: pointer; }
.form-select option { background: var(--bg-card); }

.form-input-sm,
.form-select-sm { padding: 6px 10px; font-size: 13px; }

.form-hint    { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.form-hint-xs { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

.form-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

/* ── カード ─────────────────────────────────────────────── */
.card-dark {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

/* ── モーダル ────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 480px;
  max-width: 95vw;
  box-shadow: var(--shadow-lg);
}

.modal-sm { width: 360px; }

.modal-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.modal-desc {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 20px;
}

.modal-footer {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.divider-text {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  position: relative;
}
.divider-text::before,
.divider-text::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border);
}
.divider-text::before { left: 0; }
.divider-text::after  { right: 0; }

.session-restore {
  display: flex;
  gap: 8px;
}
.session-restore .form-input { flex: 1; }

/* ── セッションバー ────────────────────────────────────── */
.session-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.session-info { display: flex; align-items: center; gap: 12px; }

.session-trip {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.session-key {
  font-family: monospace;
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 2px 8px;
  border-radius: 4px;
}

.session-expire {
  font-size: 11px;
  color: var(--text-muted);
}

.session-actions { display: flex; align-items: center; gap: 8px; }

/* ── フライトタブ ─────────────────────────────────────── */
.flight-tabs-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  gap: 4px;
}

.flight-tabs { display: flex; gap: 2px; }

.flight-tab {
  padding: 10px 16px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.flight-tab:hover { color: var(--text-secondary); }
.flight-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.flight-tab .tab-close {
  opacity: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  transition: opacity var(--transition);
}
.flight-tab:hover .tab-close { opacity: 1; }

.tab-add-btn {
  padding: 8px 10px;
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 4px;
}

/* ── ステップナビゲーション ───────────────────────────── */
.step-nav {
  display: flex;
  align-items: center;
  padding: 20px 24px 16px;
  max-width: 900px;
  margin: 0 auto;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity var(--transition);
}

.step-item.active   { opacity: 1; }
.step-item.done     { opacity: 0.7; }
.step-item.clickable{ cursor: pointer; }
.step-item.clickable:hover { opacity: 0.9; }

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
  transition: all var(--transition);
}

.step-item.active .step-num {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.step-item.done .step-num {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.step-label { font-size: 12px; font-weight: 500; white-space: nowrap; }

.step-connector {
  flex: 1;
  height: 1px;
  background: var(--border);
  margin: 0 8px;
  min-width: 20px;
}

/* ── ステップコンテンツ ───────────────────────────────── */
.step-content-area {
  max-width: 900px;
  margin: 0 auto;
  padding: 8px 24px 40px;
}

.step-panel { animation: fadeIn 0.25s ease; }
.step-panel-wide { max-width: 100%; }

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

.step-header {
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.step-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.step-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.step-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

/* ── Amadeus セクション ──────────────────────────────── */
.amadeus-section { margin-top: 24px; }

.amadeus-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.amadeus-desc { font-size: 12px; color: var(--text-secondary); margin-bottom: 12px; }

.amadeus-status { margin-top: 8px; font-size: 12px; }

.badge {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
.badge-beta { background: rgba(155,93,229,0.2); color: var(--purple); border: 1px solid rgba(155,93,229,0.3); }

/* ── 座席割り当てブロック ─────────────────────────────── */
.alloc-list { display: flex; flex-direction: column; gap: 12px; }

.alloc-row {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.alloc-excluded { margin-top: 10px; }

.excluded-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  font-size: 12px;
  margin: 2px;
}

.excluded-tag button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 2px;
  font-size: 12px;
  transition: color var(--transition);
}
.excluded-tag button:hover { color: var(--danger); }

.alloc-excluded-add {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.alloc-excluded-add input { width: 80px; }

.alloc-summary-bar {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 8px;
}

/* ── グループリスト ────────────────────────────────────── */
.group-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 420px;
  overflow-y: auto;
}

.group-row {
  display: grid;
  grid-template-columns: 60px 90px 90px auto;
  gap: 8px;
  align-items: end;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.group-label { font-size: 11px; color: var(--text-muted); margin-bottom: 3px; }
.group-total { font-size: 11px; color: var(--text-secondary); align-self: center; }

/* ── スタッフグリッド ────────────────────────────────── */
.two-col-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 700px) {
  .two-col-layout { grid-template-columns: 1fr; }
}

.staff-grid { display: flex; flex-direction: column; gap: 8px; }

.staff-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.staff-icon { font-size: 22px; flex-shrink: 0; }

.staff-info { flex: 1; }
.staff-name { font-size: 13px; font-weight: 500; }
.staff-desc { font-size: 11px; color: var(--text-muted); }

.form-input-sm { width: 64px; text-align: center; }

.people-summary { }
.summary-title { font-size: 11px; color: var(--text-muted); text-transform: uppercase; margin-bottom: 8px; }

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
}
.summary-row:last-child { border: none; font-weight: 600; color: var(--accent); }

/* ── 設定ラジオカード ─────────────────────────────────── */
.pref-sections { display: flex; flex-direction: column; gap: 16px; }

.pref-section { }

.pref-section-title {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.pref-desc { font-size: 12px; color: var(--text-secondary); margin-bottom: 12px; }

.radio-group { display: flex; flex-direction: column; gap: 8px; }

.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  padding: 12px 14px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.radio-card:hover { border-color: var(--border-light); }

.radio-card input[type="radio"] { margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; }

.radio-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.radio-title { font-size: 13px; font-weight: 500; }
.radio-desc  { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* ── シートマップ ─────────────────────────────────────── */
.seatmap-container {
  margin-bottom: 28px;
  position: relative;
}

.aircraft-nose,
.aircraft-tail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--text-muted);
  padding: 4px 0;
}

.seatmap-scroll {
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 8px;
}

.seatmap-body {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  min-width: 100%;
  padding: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.seat-row {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 34px;
}

.row-label {
  width: 32px;
  text-align: right;
  font-size: 11px;
  color: var(--text-muted);
  padding-right: 6px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.seat-aisle { width: 18px; flex-shrink: 0; }

.seat {
  width: 34px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s ease;
  position: relative;
  border: 1.5px solid transparent;
  flex-shrink: 0;
  overflow: hidden;
  user-select: none;
}

.seat:hover { transform: scale(1.08); z-index: 10; }

.seat.seat-empty-slot {
  background: var(--seat-empty);
  border-color: var(--border);
  color: var(--text-muted);
  cursor: default;
}
.seat.seat-empty-slot:hover { transform: none; }

.seat.seat-unallocated {
  background: rgba(7,9,26,0.8);
  border-color: rgba(30,45,74,0.3);
  cursor: default;
  opacity: 0.3;
}
.seat.seat-unallocated:hover { transform: none; }

/* 座席クラス背景 (未アサイン) */
.seat.class-F { background: rgba(212,175,55,0.12); border-color: rgba(212,175,55,0.3); }
.seat.class-J { background: rgba(74,158,255,0.1);  border-color: rgba(74,158,255,0.2); }
.seat.class-Y { background: var(--bg-elevated);     border-color: var(--border); }

/* アサイン済み座席 */
.seat.assigned {
  border-color: transparent;
  color: #fff;
}

.seat.selected {
  box-shadow: 0 0 0 3px var(--accent), 0 0 12px rgba(74,158,255,0.5);
  z-index: 20;
  transform: scale(1.1);
}

.seat-label-main { font-size: 9px; font-weight: 700; line-height: 1.1; text-align: center; }
.seat-label-sub  { font-size: 8px; opacity: 0.8; line-height: 1; }

/* 座席番号表示 (未アサイン) */
.seat-letter-only {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── 座席凡例 ────────────────────────────────────────── */
.seat-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ── 搭乗順 ─────────────────────────────────────────── */
.boarding-section {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.boarding-order-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.boarding-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
}

.boarding-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.boarding-info { flex: 1; }
.boarding-label { font-size: 13px; font-weight: 500; }
.boarding-seats { font-size: 11px; color: var(--text-muted); font-family: monospace; }

/* ── スワップヒント ──────────────────────────────────── */
.swap-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-secondary);
  padding: 10px 14px;
  margin-top: 8px;
}

.swap-info-box {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 16px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  margin: 12px 0;
  font-size: 14px;
}

.swap-seat-info {
  text-align: center;
}
.swap-seat-id { font-size: 20px; font-weight: 700; color: var(--accent); }
.swap-seat-label { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

.swap-arrow { font-size: 20px; color: var(--text-muted); }

/* ── Step5 ヘッダー ──────────────────────────────────── */
.step5-actions { display: flex; gap: 8px; }

/* ── トースト通知 ────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-size: 13px;
  min-width: 240px;
  max-width: 340px;
  animation: slideInToast 0.25s ease;
  pointer-events: auto;
}

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

.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--danger); }
.toast.info    { border-left: 3px solid var(--accent); }

/* ── ローディング ────────────────────────────────────── */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7,9,26,0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  backdrop-filter: blur(4px);
}

.loading-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loading-text {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* ── 管理画面 ────────────────────────────────────────── */
.admin-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 20px;
}

.admin-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 800px) {
  .admin-layout { grid-template-columns: 1fr; }
}

.admin-pane-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.admin-pane-title {
  font-size: 16px;
  font-weight: 600;
}

.admin-filter { margin-bottom: 10px; }

.aircraft-list { display: flex; flex-direction: column; gap: 4px; }

.aircraft-item {
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.aircraft-item:hover { border-color: var(--border-light); background: var(--bg-card-hover); }
.aircraft-item.selected { border-color: var(--accent); background: var(--accent-dim); }

.aircraft-item-name { font-size: 13px; font-weight: 500; }
.aircraft-item-sub  { font-size: 11px; color: var(--text-muted); }

.admin-detail-pane {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.admin-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

.admin-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.admin-editor-header h3 { font-size: 18px; font-weight: 600; }

.section-divider {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 20px;
  margin-bottom: 12px;
}

.section-divider h4 { font-size: 13px; font-weight: 600; color: var(--text-secondary); }

.class-editor-row {
  margin-bottom: 10px;
  padding: 12px;
}

.class-editor-header {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.class-editor-header .class-code { width: 240px; }
.class-editor-header .class-name { flex: 1; }

.exception-editor-row {
  display: flex;
  gap: 8px;
  align-items: end;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-bottom: 6px;
}

.exception-editor-row > .form-grid-3 { flex: 1; }

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.admin-seat-preview {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  min-height: 80px;
  overflow-x: auto;
}

.seat-preview-mini { overflow-x: auto; }

/* ── グループカラー変数 ────────────────────────────────── */
.gc-0  { background: #4A9EFF; }
.gc-1  { background: #e05252; }
.gc-2  { background: #3ecf8e; }
.gc-3  { background: #f5a623; }
.gc-4  { background: #9b5de5; }
.gc-5  { background: #00b8d9; }
.gc-6  { background: #ff6b9d; }
.gc-7  { background: #a8e063; }
.gc-8  { background: #f7971e; }
.gc-9  { background: #43cea2; }
.gc-teacher   { background: #2d8a50; }
.gc-camera    { background: #b07d30; }
.gc-nurse     { background: #b03030; }
.gc-conductor { background: #7b2fa8; }

/* 男性は若干暗め, 女性は明るめ */
.gc-M { filter: brightness(0.85); }
.gc-F { filter: brightness(1.15); }

/* ── シートプレビュー ─────────────────────────────────── */
.preview-row {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 2px;
}

.preview-seat {
  width: 20px;
  height: 18px;
  border-radius: 3px;
  font-size: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.preview-aisle { width: 10px; }
.preview-row-label { width: 22px; font-size: 9px; color: var(--text-muted); text-align: right; padding-right: 4px; }

/* ── レスポンシブ ─────────────────────────────────────── */
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-group.span-2 { grid-column: span 1; }
  .alloc-row { grid-template-columns: 1fr 1fr; }
  .group-row { grid-template-columns: 50px 80px 80px auto; }
  .step-nav { padding: 16px 12px; }
  .step-label { display: none; }
}

/* ── カスタムスクロールバー ──────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
