﻿/* DoyaLore - Admin Studio 繧ｹ繧ｿ繧､繝ｫ */
:root {
  --bg-dark: #0d1117;
  --bg-card: #161b22;
  --bg-input: #21262d;
  --border-subtle: #30363d;
  --accent: #58a6ff;
  --accent-hover: #1f6feb;
  --text-main: #c9d1d9;
  --text-bright: #f0f6fc;
  --text-muted: #8b949e;
  --success: #238636;
  --danger: #da3633;
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

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

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

body {
  background: var(--bg-dark);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  padding: 24px;
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.admin-header {
  max-width: 1100px;
  margin: 0 auto 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.admin-title-group h1 {
  font-size: 1.6rem;
  color: var(--text-bright);
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.admin-title-group p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.admin-header-actions {
  display: flex;
  gap: 10px;
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.btn {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-bright);
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.btn:hover {
  background: var(--border-subtle);
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.btn-primary {
  background: var(--success);
  border-color: rgba(240, 246, 252, 0.1);
  color: #fff;
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.btn-primary:hover {
  background: #2ea043;
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.btn-ai {
  background: linear-gradient(135deg, #8a2be2, #4158d0);
  border: none;
  color: #fff;
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.btn-ai:hover {
  opacity: 0.9;
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.admin-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 24px;
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

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

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

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

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.card-title {
  font-size: 1.1rem;
  color: var(--text-bright);
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.form-group {
  margin-bottom: 14px;
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 4px;
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.form-label small {
  color: var(--text-muted);
  font-weight: normal;
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.form-input, .form-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text-bright);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.form-input:focus, .form-textarea:focus {
  border-color: var(--accent);
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.form-textarea {
  resize: vertical;
  min-height: 50px;
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

/* 荳隕ｧ繝・・繝悶Ν */
.table-responsive {
  max-height: 600px;
  overflow-y: auto;
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.admin-table th {
  background: var(--bg-dark);
  color: var(--text-muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

/* 笘・ぞ繝悶Λ邵樊ｨ｡讒假ｼ郁ｦ冶ｪ肴ｧ蜷台ｸ奇ｼ・*/
.admin-table tbody tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.02);
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.admin-table tbody tr:hover {
  background-color: rgba(88, 166, 255, 0.08);
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

/* 笘・ｻ雁屓繧､繝ｳ繝昴・繝医〒霑ｽ蜉縺輔ｌ縺溷撫鬘後・繝上う繝ｩ繧､繝・*/
.admin-table tbody tr.newly-imported {
  background: rgba(46, 160, 67, 0.15) !important;
  border-left: 3px solid #2ea043;
  animation: glow-green 2s ease-in-out;
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

@keyframes glow-green {
  0% { background: rgba(46, 160, 67, 0.35); }

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

  100% { background: rgba(46, 160, 67, 0.15); }

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.badge {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.badge-today {
  background: #388bfd33;
  color: #58a6ff;
  border: 1px solid #388bfd66;
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.badge-target {
  background: rgba(255, 215, 0, 0.15);
  color: #ffd700;
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.text-truncate {
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.btn-action {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  margin-right: 4px;
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.btn-action:hover {
  background: var(--border-subtle);
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

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

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

/* 繝｢繝ｼ繝繝ｫ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.modal-content-lg {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  max-width: 720px;
  width: 100%;
  padding: 24px;
  position: relative;
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.prompt-textarea {
  width: 100%;
  height: 280px;
  background: var(--bg-dark);
  border: 1px solid var(--border-subtle);
  color: #7ee787;
  font-family: monospace;
  font-size: 0.85rem;
  padding: 12px;
  border-radius: 6px;
  margin: 14px 0;
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

/* 繝偵Ο繧､繝ｳ繧ｹ繧ｿ繧ｸ繧ｪ逕ｨ繧ｿ繝悶リ繝薙ご繝ｼ繧ｷ繝ｧ繝ｳ */
.admin-tab-nav {
  max-width: 1100px;
  margin: 0 auto 20px;
  display: flex;
  gap: 10px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.admin-tab-btn {
  padding: 10px 20px;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-muted);
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.admin-tab-btn:hover {
  color: var(--text-bright);
  border-color: var(--accent);
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.admin-tab-btn.active {
  background: linear-gradient(135deg, #1f6feb, #8b5cf6);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

/* 繧ｫ繝ｼ繝我ｸ隕ｧ繧ｵ繝繝阪う繝ｫ */
.card-table-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  display: block;
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.card-badge-sss { background: linear-gradient(135deg, #ffd700, #ff8008); color: #000; font-weight: 800; }

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.card-badge-ssr { background: linear-gradient(135deg, #ff007f, #7928ca); color: #fff; font-weight: 800; }

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.card-badge-sr  { background: linear-gradient(135deg, #00f0ff, #0070f3); color: #000; font-weight: 800; }

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.card-badge-r   { background: #374151; color: #e5e7eb; font-weight: 700; }

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

/* 蠢・医ヰ繝・ず縺ｨ繝舌Μ繝・・繧ｷ繝ｧ繝ｳ陦ｨ遉ｺ */
.badge-required {
  color: #f87171;
  font-weight: 800;
  font-size: 0.75rem;
  margin-left: 4px;
  background: rgba(239, 68, 68, 0.15);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.form-input.input-invalid, .form-textarea.input-invalid {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.08) !important;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

.form-input.input-valid, .form-textarea.input-valid {
  border-color: #10b981 !important;
}

/* 繝医げ繝ｫ繧ｹ繧､繝・メ繧ｹ繧ｿ繧､繝ｫ */

/* トグルスイッチスタイル */
#shop-master-toggle:checked + #shop-toggle-slider {
  background-color: #22c55e !important;
}
#shop-toggle-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}
#shop-master-toggle:checked + #shop-toggle-slider:before {
  transform: translateX(26px);
}


/* ========================================================
   ヒロインカード スタジオ＆リアルタイムD&Dプレビュー
   ======================================================== */
.card-studio-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 960px) {
  .card-studio-layout {
    grid-template-columns: 1fr;
  }
}

.card-studio-preview {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px;
  position: sticky;
  top: 16px;
}

.preview-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.preview-header-bar .preview-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-bright);
}

.live-card-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4.2;
  border-radius: 12px;
  overflow: hidden;
  background: #0b0f19;
  border: 2px solid #ec4899;
  box-shadow: 0 0 20px rgba(236, 72, 153, 0.35);
  transition: all 0.25s ease;
  cursor: pointer;
  user-select: none;
}

.live-card-frame.frame-sss {
  border-color: #ffd700;
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.5);
}

.live-card-frame.frame-ssr {
  border-color: #ec4899;
  box-shadow: 0 0 20px rgba(236, 72, 153, 0.45);
}

.live-card-frame.frame-sr {
  border-color: #8b5cf6;
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.4);
}

.live-card-frame.frame-r {
  border-color: #3b82f6;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.35);
}

.live-card-frame.drag-over {
  border: 3px dashed #00f0ff !important;
  box-shadow: 0 0 35px rgba(0, 240, 255, 0.8) !important;
  transform: scale(1.02);
}

.live-card-media {
  width: 100%;
  height: 100%;
  position: relative;
}

.live-card-media img,
.live-card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.live-card-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

.dropzone-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 20;
  border-radius: 10px;
}

.live-card-frame.drag-over .dropzone-overlay {
  display: flex;
}

.dropzone-overlay-content {
  pointer-events: none;
}

.live-card-info-overlay {
  position: absolute;
  inset: auto 0 0 0;
  background: linear-gradient(to top, rgba(11, 15, 25, 0.95) 0%, rgba(11, 15, 25, 0.7) 60%, transparent 100%);
  padding: 16px 14px 12px;
  z-index: 5;
  pointer-events: none;
}

.live-card-type-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(0, 240, 255, 0.15);
  border: 1px solid rgba(0, 240, 255, 0.4);
  color: #00f0ff;
  margin-bottom: 4px;
}

.live-card-name-title {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 4px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.live-card-quote-text {
  font-size: 0.78rem;
  color: #cbd5e1;
  margin: 0;
  line-height: 1.35;
  font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dropzone-hint-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(11, 15, 25, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 12px;
  backdrop-filter: blur(4px);
  z-index: 6;
  pointer-events: none;
}

.card-upload-status-box {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  line-height: 1.4;
  word-break: break-all;
}

.card-upload-status-box.success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #4ade80;
}

.card-upload-status-box.info {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}

.card-upload-status-box.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
}
