/* ==========================================================================
   YORUNA 管理画面 - デモ用スタイル
   ========================================================================== */

body.admin-body { background: var(--bg-alt); }

/* ---------- Login ---------- */
.admin-login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: var(--grad-hero);
  position: relative;
  overflow: hidden;
}
.admin-login-wrap::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(138,107,255,0.22), transparent 45%),
              radial-gradient(circle at 80% 80%, rgba(255,95,158,0.18), transparent 45%);
}
.admin-login-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-l);
  padding: 40px 32px;
  box-shadow: var(--shadow-pop);
}
.admin-login-card .logo { justify-content: center; margin-bottom: 6px; }
.admin-login-card .lead { text-align: center; font-size: 0.85rem; color: var(--text-faint); margin-bottom: 28px; }
.demo-hint {
  margin-top: 18px; font-size: 0.78rem; color: var(--text-faint);
  background: rgba(212,175,106,0.08); border: 1px dashed var(--border-strong);
  border-radius: var(--radius-s); padding: 12px 14px; text-align: center;
}
.demo-hint strong { color: var(--gold-bright); }

/* ---------- Shell layout ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--bg);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.admin-sidebar .logo { margin-bottom: 24px; padding-left: 8px; }
.admin-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: var(--radius-s); font-size: 0.9rem; color: var(--text-muted);
  margin-bottom: 4px;
}
.admin-nav a:hover { background: var(--surface-alt); color: var(--text); }
.admin-nav a.active { background: rgba(212,175,106,0.14); color: var(--gold-bright); font-weight: 700; }
.admin-nav .sep { height: 1px; background: var(--border); margin: 12px 4px; }

.admin-main { flex: 1; min-width: 0; }
.admin-topbar {
  height: 68px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; background: var(--surface);
}
.admin-topbar .store-tag { font-size: 0.85rem; color: var(--text-muted); }
.admin-topbar .store-tag strong { color: var(--gold-bright); }
.admin-content { padding: 28px; }

/* ---------- Stat cards ---------- */
.admin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 28px; }
.admin-stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m); padding: 20px 22px; }
.admin-stat-card .label { font-size: 0.78rem; color: var(--text-faint); margin-bottom: 8px; }
.admin-stat-card .value { font-size: 1.9rem; font-family: "Cormorant Garamond", serif; color: var(--gold-bright); font-weight: 700; }
.admin-stat-card .delta { font-size: 0.76rem; color: var(--pink-soft); }

/* ---------- Table ---------- */
.admin-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m); overflow: hidden; }
.admin-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: 10px; }
.admin-panel-head h2 { font-size: 1.05rem; margin: 0; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { text-align: left; font-size: 0.75rem; color: var(--text-faint); font-weight: 400; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface-alt); white-space: nowrap; }
.admin-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 0.85rem; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table img.thumb-sm { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; }
.admin-table .row-actions { display: flex; gap: 8px; }
.status-pill { font-size: 0.72rem; padding: 4px 10px; border-radius: 999px; background: rgba(120,220,150,0.15); color: #7fe0a0; }
.table-scroll { overflow-x: auto; }
.toast {
  position: fixed; top: 20px; right: 20px; z-index: 999;
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text);
  padding: 14px 20px; border-radius: var(--radius-s); box-shadow: var(--shadow-card);
  font-size: 0.88rem; display: flex; align-items: center; gap: 10px;
}
.toast strong { color: var(--gold-bright); }

/* ---------- Job edit form ---------- */
.admin-form-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 26px; align-items: start; }
.admin-form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m); padding: 24px; }
.admin-form-card h3 { font-size: 0.95rem; border-left: 3px solid var(--gold); padding-left: 10px; }
.img-choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 8px; }
.img-choice { position: relative; border-radius: var(--radius-s); overflow: hidden; aspect-ratio: 4/3; cursor: pointer; border: 2px solid transparent; }
.img-choice img { width: 100%; height: 100%; object-fit: cover; }
.img-choice.selected { border-color: var(--gold); }
.img-choice.selected::after { content: "✓"; position: absolute; top: 4px; right: 4px; background: var(--gold); color: #1a0f10; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 700; }
.preview-sticky { position: sticky; top: 20px; }
.preview-card-wrap .job-card { pointer-events: none; }
.tag-check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; }
.form-actions { display: flex; gap: 10px; margin-top: 24px; }

@media (max-width: 900px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; flex-direction: row; overflow-x: auto; align-items: center; padding: 12px; }
  .admin-sidebar .logo { display: none; }
  .admin-nav { display: flex; flex-direction: row; gap: 4px; }
  .admin-nav .sep { display: none; }
  .admin-stats { grid-template-columns: 1fr; }
  .admin-form-grid { grid-template-columns: 1fr; }
}
