/* ============================================================
   event-gift-platform — 共通スタイル
   ============================================================ */

:root {
  --primary:    #c0392b;
  --primary-dk: #96281b;
  --accent:     #f9ebea;
  --text:       #2c3e50;
  --muted:      #7f8c8d;
  --border:     #dee2e6;
  --sidebar-w:  240px;
}

/* ── ベース ─────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Hiragino Sans', 'Noto Sans JP', 'Yu Gothic', sans-serif;
  color: var(--text);
  background: #f8f9fa;
  margin: 0;
}

a { color: var(--primary); }
a:hover { color: var(--primary-dk); }

/* ── ボタン ─────────────────────────────────────────── */

.btn-gift {
  background: linear-gradient(135deg, var(--primary), var(--primary-dk));
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: .6rem 1.8rem;
  font-weight: 600;
  letter-spacing: .04em;
  transition: opacity .2s, transform .1s;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn-gift:hover  { opacity: .88; color: #fff; }
.btn-gift:active { transform: scale(.97); }

/* ── Public ナビゲーション ──────────────────────────── */

.pub-nav {
  background: linear-gradient(135deg, var(--primary), var(--primary-dk));
  padding: .75rem 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.pub-nav a { color: #fff; text-decoration: none; }
.pub-nav .brand { font-size: 1.15rem; font-weight: 700; }

/* ── Hero ────────────────────────────────────────────── */

.hero {
  background: linear-gradient(135deg, #922b21 0%, #c0392b 50%, #e74c3c 100%);
  color: #fff;
  padding: 4rem 1.5rem;
  text-align: center;
}
.hero h1 { font-size: clamp(1.4rem, 4vw, 2.4rem); font-weight: 800; margin-bottom: .75rem; }
.hero p   { font-size: 1.05rem; opacity: .9; margin: 0; }

/* ── イベントカード ─────────────────────────────────── */

.event-card {
  border: none;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  transition: transform .2s, box-shadow .2s;
  overflow: hidden;
}
.event-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.12); }

/* ── 出演者カード ────────────────────────────────────── */

.performer-card {
  text-align: center;
  padding: 1.25rem .75rem;
  border-radius: 16px;
  border: 1.5px solid var(--border);
  background: #fff;
  transition: box-shadow .2s;
}
.performer-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.performer-avatar {
  width: 80px; height: 80px;
  border-radius: 50%; object-fit: cover;
  border: 3px solid var(--accent);
}
.performer-avatar-placeholder {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; margin: 0 auto;
}

/* ── 商品カード ──────────────────────────────────────── */

.product-card {
  border: 2px solid var(--border) !important;
  border-radius: 14px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.product-card:hover    { border-color: var(--primary) !important; }
.product-card.selected { border-color: var(--primary) !important; background: var(--accent) !important; }
.product-img {
  width: 100%; height: 140px; object-fit: cover;
  border-radius: 8px; display: block;
}
.product-img-placeholder {
  width: 100%; height: 140px;
  background: var(--accent);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
}

/* ── ステータスバッジ ────────────────────────────────── */

.badge-DRAFT     { background: #6c757d !important; }
.badge-PUBLISHED { background: #28a745 !important; }
.badge-CLOSED    { background: #343a40 !important; }
.badge-PENDING   { background: #ffc107 !important; color: #000 !important; }
.badge-PAID      { background: #28a745 !important; }
.badge-CANCELED  { background: #dc3545 !important; }
.badge-REFUNDED  { background: #6610f2 !important; }

/* ── Admin レイアウト ────────────────────────────────── */

.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: #1e293b;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 200;
}
.admin-sidebar .sidebar-brand {
  padding: 1.25rem 1.25rem 1rem;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08);
  text-decoration: none;
  display: block;
}
.admin-sidebar .nav-section {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #64748b;
  padding: 1.1rem 1.25rem .4rem;
}
.admin-sidebar .nav-item a {
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem 1.25rem;
  color: #94a3b8;
  text-decoration: none;
  font-size: .88rem;
  border-left: 3px solid transparent;
  transition: color .15s, border-color .15s, background .15s;
}
.admin-sidebar .nav-item a:hover,
.admin-sidebar .nav-item a.active {
  color: #fff;
  background: rgba(255,255,255,.06);
  border-left-color: var(--primary);
}

.admin-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.admin-topbar .page-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}

.admin-content {
  padding: 1.75rem;
  flex: 1;
}

/* ── Admin ユーティリティ ──────────────────────────── */

.stat-card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  background: #fff;
}
.stat-card .stat-value { font-size: 2rem; font-weight: 800; }
.stat-card .stat-label { font-size: .8rem; color: var(--muted); }

/* ── フォーム ─────────────────────────────────────── */

.form-section {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  margin-bottom: 1.5rem;
}
.form-section-title {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--accent);
  color: var(--primary);
}

/* ── テーブル ─────────────────────────────────────── */

.data-table { width: 100%; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.data-table thead th { background: #f1f5f9; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .75rem 1rem; border: none; }
.data-table tbody td { padding: .75rem 1rem; vertical-align: middle; border-bottom: 1px solid #f1f5f9; font-size: .9rem; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: #fafbfc; }

/* ── ローディング・エラー ─────────────────────────── */

.loading-spinner {
  display: flex; align-items: center; justify-content: center;
  padding: 3rem;
  color: var(--muted);
  font-size: .9rem;
}
.error-banner {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: .75rem 1rem;
  font-size: .9rem;
}
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}

/* ── パンくずリスト ──────────────────────────────── */

.breadcrumb { background: none; padding: 0; margin-bottom: 1.5rem; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--muted); }

/* ── モバイル対応 ─────────────────────────────────── */

@media (max-width: 768px) {
  .admin-sidebar { transform: translateX(-100%); transition: transform .3s; }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .admin-content { padding: 1rem; }
}
