/* ============================================================
   admin.css — 管理画面スタイル（GUI版）
   ============================================================ */

:root {
  --bg: #0a0a0b;
  --bg-soft: #111113;
  --bg-card: #1c1c1f;
  --bg-card-hover: #232327;
  --text: #f5f5f6;
  --text-soft: #9a9aa4;
  --text-muted: #5c5c66;
  --line: rgba(255, 255, 255, 0.08);
  --line-hover: rgba(255, 255, 255, 0.18);
  --accent: #e4e4e7;
  --accent-rgb: 228, 228, 231;
  --accent-soft: rgba(255, 255, 255, 0.06);
  --danger: #ef5a6f;
  --danger-soft: rgba(239, 90, 111, 0.1);
  --success: #7c8ff0;
  --success-soft: rgba(124, 143, 240, 0.1);
  --warning: #d4d4d8;
  --font-heading: "Outfit", sans-serif;
  --font-body: "Inter", "Noto Sans JP", sans-serif;
  --radius: 10px;
  --radius-sm: 6px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

h1, h2, h3, .modal-title {
  font-family: var(--font-heading);
}

/* ログイン画面 */
.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(124, 143, 240, 0.05) 0%, transparent 45%),
    var(--bg);
}
.login-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: 40px;
  border-radius: 20px;
  width: 100%;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.login-logo {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.login-logo .logo-text {
  background: linear-gradient(135deg, #ffffff 0%, var(--text-soft) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.login-logo .logo-bracket { color: var(--accent); font-weight: 400; }
.login-sub {
  color: var(--text-soft);
  margin: 0 0 24px;
  font-size: 14px;
}
.login-error {
  display: none;
  background: var(--danger-soft);
  color: var(--danger);
  padding: 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 14px;
}
.login-error.show { display: block; }
.login-back {
  display: inline-block;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-muted);
}
.login-back:hover { color: var(--accent); }

/* フォーム共通 */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 14px;
  color: var(--text-soft);
  margin-bottom: 6px;
  font-weight: 500;
}
.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
}
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-soft);
  cursor: pointer;
  margin-bottom: 10px;
  line-height: 1.5;
}
.form-check input {
  margin-top: 3px;
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  cursor: pointer;
}
.proj-image-options {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px 4px;
}

/* ボタン */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: 0.2s;
  font-family: inherit;
  font-size: 14px;
  text-decoration: none;
}
.btn:hover { border-color: var(--line-hover); color: var(--accent); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent); color: var(--bg); }
.btn-danger { color: var(--danger); border-color: var(--danger-soft); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-icon { padding: 4px 8px; }

/* ダッシュボード */
.dashboard {
  display: none;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px 48px;
}
.dashboard.active { display: block; }

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  margin: 0 -24px 24px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 11, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
}
.admin-brand .logo-bracket { color: var(--accent); font-weight: 400; }
.admin-brand .logo-text {
  background: linear-gradient(135deg, #ffffff 0%, var(--text-soft) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.admin-brand-sub {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  padding-left: 10px;
  margin-left: 2px;
  border-left: 1px solid var(--line);
}
.toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

/* タブ */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
  overflow-x: auto;
}
.tab-btn {
  background: none;
  border: none;
  color: var(--text-soft);
  padding: 12px 24px;
  font-size: 15px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: 0.2s;
  white-space: nowrap;
}
.tab-btn:hover { color: var(--text); }
.tab-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.tab-content { display: none; }
.tab-content.active { display: block; animation: fade-in 0.3s; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* リストアイテム (作品・経歴など) */
.item-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: var(--radius);
  gap: 16px;
  transition: 0.2s;
}
.list-item:hover {
  border-color: var(--line-hover);
  background: var(--bg-card-hover);
}
.item-info { flex: 1; min-width: 0; }
.item-title { font-weight: 600; margin-bottom: 4px; font-size: 15px; }
.item-meta { font-size: 12px; color: var(--text-soft); display: flex; gap: 8px; flex-wrap: wrap; }
.item-actions { display: flex; gap: 8px; flex-shrink: 0; }

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 14px;
  background: var(--bg-card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.badge {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
}
.badge-accent { color: var(--accent); border-color: var(--accent-soft); }

/* モーダル */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-overlay.open { display: flex; animation: overlay-in 0.2s ease; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  animation: modal-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
  padding: 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-title { margin: 0; font-size: 18px; }
.modal-body {
  padding: 20px;
  overflow-y: auto;
}
.modal-footer {
  padding: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.code-block {
  background: var(--bg-soft);
  padding: 16px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  color: var(--text-soft);
  font-family: monospace;
}

/* トースト */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}
.toast {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  animation: slide-up 0.3s;
  border: 1px solid var(--line);
  background: var(--bg-card);
}
.toast-success { color: var(--success); border-color: var(--success-soft); }
.toast-error { color: var(--danger); border-color: var(--danger-soft); }
@keyframes slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
