/* ════════════════════════════════════════════════════════════
   components.css — 어드민 공통 컴포넌트
   - 카드, 통계, 그리드, 배지, 칩, 버튼, 인풋
   - 탭, 목록, 테이블, 썸네일, 첨부파일
   - 툴바, 페이지네이션, 모달, 토스트, 스피너
   - 로그인, 페이지 헤더, 필터, 유틸리티
════════════════════════════════════════════════════════════ */

/* ── 카드 ───────────────────────────────────────────────── */
.adm-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.adm-card + .adm-card { margin-top: 10px; }
.adm-grid > .adm-card + .adm-card { margin-top: 0; }

.adm-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.adm-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── 통계 카드 ──────────────────────────────────────────── */
.adm-stat {
  text-align: center;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}
.adm-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  line-height: 1.4;
}
.adm-stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.adm-stat-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  min-height: 16px;
}

/* ── 그리드 ─────────────────────────────────────────────── */
.adm-grid { display: grid; gap: 10px; }
.adm-grid-2 { grid-template-columns: 1fr 1fr; }
.adm-grid-3 { grid-template-columns: 1fr 1fr 1fr; }

@media (max-width: 480px) {
  .adm-grid-3 { grid-template-columns: 1fr 1fr; }
}

/* ── 배지 ───────────────────────────────────────────────── */
.adm-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.adm-badge-y { background: rgba(22,163,74,0.12);  color: #16a34a; }
.adm-badge-n { background: rgba(217,119,6,0.12);  color: #d97706; }
.adm-badge-d { background: rgba(8,145,178,0.12);  color: #0891b2; }
.adm-badge-h { background: rgba(220,38,38,0.12);  color: #dc2626; }

/* ── 칩 ─────────────────────────────────────────────────── */
.adm-chip-group { display: flex; flex-wrap: wrap; gap: 6px; }
.adm-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  background: var(--bg);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.adm-chip:hover { border-color: var(--accent); color: var(--accent); }
.adm-chip.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-bg);
  font-weight: 600;
}
.adm-chip.active-success { border-color: var(--success); color: var(--success); background: rgba(22,163,74,0.08); }
.adm-chip.active-warning { border-color: var(--warning); color: var(--warning); background: rgba(217,119,6,0.08); }
.adm-chip.active-info    { border-color: var(--info);    color: var(--info);    background: rgba(8,145,178,0.08); }

/* ── 버튼 ───────────────────────────────────────────────── */
.adm-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  line-height: 1;
  text-decoration: none;
}
.adm-btn svg { width: 15px; height: 15px; }

.adm-btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.adm-btn-primary:hover { background: var(--accent-hover); }
.adm-btn-outline { background: transparent; color: var(--text-muted); border-color: var(--border-strong); }
.adm-btn-outline:hover { color: var(--text); border-color: var(--text-muted); }
.adm-btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.adm-btn-danger:hover { background: #b91c1c; }
.adm-btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.adm-btn-draft { background: var(--surface); color: var(--text-muted); border-color: var(--border-strong); }
.adm-btn-draft:hover { color: var(--text); }
.adm-btn-publish { background: var(--accent); color: #fff; border-color: var(--accent); }
.adm-btn-publish:hover { background: var(--accent-hover); }

.adm-btn-sm  { padding: 5px 10px; font-size: 12px; }
.adm-btn-sm svg { width: 13px; height: 13px; }
.adm-btn-xs  { padding: 3px 8px; font-size: 11px; }

/* ── 인풋 / 텍스트에리어 ────────────────────────────────── */
.adm-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  line-height: 1.5;
}
.adm-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.adm-input[disabled] { opacity: 0.5; cursor: not-allowed; }

.adm-textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}
.adm-textarea.mono {
  font-family: 'Courier New', 'Consolas', monospace;
  font-size: 12px;
  line-height: 1.4;
}

select.adm-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}

/* ── 필드 그룹 ──────────────────────────────────────────── */
.adm-field-group { display: flex; flex-direction: column; gap: 4px; }
.adm-field-group + .adm-field-group { margin-top: 10px; }
.adm-field-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.adm-field-label .req { color: var(--danger); }

/* ── 내부 탭 바 ─────────────────────────────────────────── */
.adm-tab-bar {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.adm-tab-bar::-webkit-scrollbar { display: none; }

.adm-tab-item {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  user-select: none;
  flex-shrink: 0;
}
.adm-tab-item:hover { color: var(--text); }
.adm-tab-item.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

.adm-tab-pane { display: none; }
.adm-tab-pane.active { display: block; animation: fadeIn 0.2s; }

/* ── 목록 아이템 ────────────────────────────────────────── */
.adm-list-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  transition: background 0.1s;
}
.adm-list-item:last-child { border-bottom: none; }
.adm-list-item:hover { background: var(--accent-bg); margin: 0 -14px; padding-left: 14px; padding-right: 14px; }

.adm-list-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  flex: 1;
}
.adm-list-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ── 테이블 ─────────────────────────────────────────────── */
.adm-table-wrap { overflow-x: auto; }
.adm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.adm-table th {
  background: var(--bg);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 8px 10px;
  border-bottom: 2px solid var(--border);
  text-align: left;
  white-space: nowrap;
}
.adm-table td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.adm-table tr:last-child td { border-bottom: none; }
.adm-table tbody tr:hover { background: var(--accent-bg); }
.adm-table .td-center { text-align: center; }
.adm-table .td-muted  { color: var(--text-muted); font-size: 12px; }

/* ── 썸네일 박스 ────────────────────────────────────────── */
.adm-thumb-box {
  width: 120px;
  height: 80px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.adm-thumb-box img { width: 100%; height: 100%; object-fit: cover; }

/* ── 첨부파일 행 ────────────────────────────────────────── */
.adm-attach-list { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.adm-attach-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
}
.adm-attach-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}
.adm-attach-name a { color: var(--accent); }
.adm-attach-size { color: var(--text-muted); flex-shrink: 0; font-size: 11px; }

/* ── 목록 툴바 ──────────────────────────────────────────── */
.adm-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 6px;
}
.adm-list-toolbar-right { display: flex; gap: 6px; }
.adm-total-label { font-size: 12px; color: var(--text-muted); }

.adm-select-sm { width: auto; height: 30px; font-size: 12px; padding: 0 24px 0 8px; }

/* ── 카드 변형 ──────────────────────────────────────────── */
.adm-card-flush { padding: 0; overflow: hidden; }
.adm-card-body  { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 14px; }

/* ── 테이블 컬럼 ────────────────────────────────────────── */
.adm-col-title { min-width: 160px; }

/* ── 텍스트에리어 / 입력 높이 ───────────────────────────── */
.adm-textarea-lg { height: 280px; }
.adm-textarea-sm { height: 80px; }
.adm-input-h     { height: 34px; }

/* ── 상세 폼 그리드 ─────────────────────────────────────── */
.adm-detail-grid      { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.adm-detail-grid-wide { display: grid; grid-template-columns: 1fr 100px; gap: 8px; }

/* ── 파일 업로드 ────────────────────────────────────────── */
.adm-file-row    { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.adm-file-input  { display: none; }
.adm-btn-thumb-clear { margin-left: 6px; display: none; }

/* ── 시리즈 검색 ────────────────────────────────────────── */
.adm-series-search-row   { display: flex; gap: 6px; margin-bottom: 8px; }
.adm-series-search-input { flex: 1; }

/* ── 버튼 변형 ──────────────────────────────────────────── */
.adm-btn-full          { width: 100%; }
.adm-btn-center        { justify-content: center; }
.adm-btn-danger-outline { color: var(--danger); border-color: var(--danger); }
.adm-btn-mt            { margin-top: 20px; }

/* ── 키보드 힌트 ────────────────────────────────────────── */
.adm-kbd { font-size: 11px; padding: 1px 5px; border: 1px solid var(--border-strong); border-radius: 3px; }
.adm-hint-mt { margin-top: 8px; }

/* ── 목록 아이템 — 정적(클릭 불가) ─────────────────────── */
.adm-list-item-static { cursor: default; }

/* ── 코드 스팬 ──────────────────────────────────────────── */
.adm-code-span { font-family: 'Courier New', monospace; font-size: 12px; flex: 1; }

/* ── 유틸리티 ───────────────────────────────────────────── */
.adm-text-danger  { color: var(--danger); }
.adm-text-accent  { color: var(--accent); }
.adm-text-success { color: var(--success); }
.adm-text-right   { text-align: right; }
.adm-flex-row     { display: flex; gap: 8px; }
.adm-thumb-icon   { color: var(--text-muted); }
.mobile-meta-extra { display: none; }

/* ── 로그인 페이지 ──────────────────────────────────────── */
.adm-login-title    { font-size: 22px; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.adm-login-subtitle { font-size: 12px; color: var(--text-muted); margin-bottom: 28px; letter-spacing: 0.03em; }

.adm-label-clickable { cursor: pointer; user-select: none; }

/* ── 시리즈 행 ──────────────────────────────────────────── */
.adm-series-row {
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
}
.adm-series-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.adm-series-nav { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── 스피너 오버레이 ────────────────────────────────────── */
.adm-spinner {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  opacity: 1;
  transition: opacity 0.25s;
}
.adm-spinner.hidden { opacity: 0; pointer-events: none; }
.adm-spinner-wheel {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255,255,255,0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ── 모달 ───────────────────────────────────────────────── */
.adm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 8000;
  padding: 16px;
}
.adm-modal-overlay.active { display: flex; }
.adm-modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 360px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  animation: slideUp 0.2s;
}
.adm-modal-header {
  padding: 14px 16px;
  font-weight: 700;
  font-size: 15px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.adm-modal-body {
  padding: 16px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
}
.adm-modal-footer {
  padding: 12px 16px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--border);
}

/* ── 토스트 알림 ────────────────────────────────────────── */
.adm-notice-wrap {
  position: fixed;
  top: calc(var(--adm-topbar-h) + 8px);
  right: 12px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}
.adm-notice {
  background: #1e293b;
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideIn 0.25s;
  box-shadow: var(--shadow-md);
  max-width: 280px;
  pointer-events: auto;
}

/* ── 로그인 카드 ────────────────────────────────────────── */
.adm-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg);
}
.adm-login-card {
  width: 100%;
  max-width: 360px;
  animation: slideUp 0.3s;
}
.adm-login-logo {
  width: 48px;
  height: 48px;
  background: var(--accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
}

/* ── 페이지 헤더 ────────────────────────────────────────── */
.adm-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}
.adm-page-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

/* ── 탑바 내 요소 ───────────────────────────────────────── */
.adm-topbar-logo {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.adm-topbar-spacer { flex: 1; }
.adm-topbar-icon-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.adm-topbar-icon-btn:hover { color: var(--text); background: var(--bg); }
.adm-topbar-icon-btn svg { width: 18px; height: 18px; }

.adm-topbar-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── 필터 박스 ──────────────────────────────────────────── */
.adm-filter-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.adm-filter-box .adm-input { height: 34px; padding: 0 10px; flex: 1; min-width: 120px; }
.adm-filter-box select.adm-input { flex: 0 0 auto; width: auto; min-width: 100px; }

/* ── 페이지네이션 ───────────────────────────────────────── */
.adm-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding-top: 12px;
  flex-wrap: wrap;
}
.adm-page-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 13px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.adm-page-btn:hover { border-color: var(--accent); color: var(--accent); }
.adm-page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; }
.adm-page-btn:disabled { opacity: 0.4; cursor: default; }
.adm-page-btn svg { width: 13px; height: 13px; }

/* ── 인라인 힌트 ────────────────────────────────────────── */
.adm-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  padding: 6px 8px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--border-strong);
}

/* ── 글자수 카운터 ──────────────────────────────────────── */
.adm-char-count { text-align: right; font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* ── 분리선 ─────────────────────────────────────────────── */
.adm-divider { border: none; border-top: 1px solid var(--border); margin: 14px 0; }

/* ── 비어있음 ───────────────────────────────────────────── */
.adm-empty { text-align: center; padding: 40px 20px; color: var(--text-muted); font-size: 13px; }

/* ── 디테일 페이지 탭 ───────────────────────────────────── */
.detail-sub-tabbar {
  position: sticky;
  top: var(--adm-topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -12px;
  padding: 0 12px;
}
.detail-sub-tabbar::-webkit-scrollbar { display: none; }

@media (min-width: 481px) {
  .detail-sub-tabbar { display: none; }

  .detail-panes-wrap {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 14px;
    align-items: start;
  }
  .detail-panes-wrap > .adm-tab-pane { display: block !important; }
  .detail-pane-body   { grid-column: 1; grid-row: 1 / 5; }
  .detail-pane-meta   { grid-column: 2; grid-row: 1; }
  .detail-pane-file   { grid-column: 2; grid-row: 2; }
  .detail-pane-series { grid-column: 2; grid-row: 3; }
}

/* ── 시리즈 검색결과 ────────────────────────────────────── */
.adm-series-search-result {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 6px;
}
.adm-series-search-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  cursor: pointer;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.adm-series-search-item:last-child { border-bottom: none; }
.adm-series-search-item:hover { background: var(--accent-bg); }

.adm-series-works-list { margin-top: 8px; }
.adm-series-work-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.adm-series-work-item:last-child { border-bottom: none; }
.adm-series-work-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* ── Repo Prompt 2패널 레이아웃 ─────────────────────────── */
.repo-prompt-wrap {
  display: flex;
  gap: 10px;
  height: calc(100vh - var(--adm-topbar-h) - 70px);
}

.repo-prompt-aside {
  width: 190px;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
}
.repo-prompt-aside::-webkit-scrollbar { display: none; }

.rp-group-title {
  padding: 8px 12px 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.rp-group-title:not(:first-child) {
  border-top: 1px solid var(--border);
  margin-top: 4px;
  padding-top: 10px;
}
.rp-item {
  display: block;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  margin: 1px 6px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.rp-item:hover  { background: var(--accent-bg); color: var(--text); }
.rp-item.active { background: var(--accent-bg); color: var(--accent); font-weight: 600; }

.repo-prompt-editor {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.rp-editor-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.rp-scope-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  min-width: 100px;
}
.rp-type-tabs {
  display: flex;
  gap: 2px;
}
.rp-type-btn {
  padding: 4px 12px;
  font-size: 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.rp-type-btn:hover  { color: var(--text); border-color: var(--text-muted); }
.rp-type-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }

.rp-textarea {
  flex: 1;
  width: 100%;
  resize: none;
  border: none;
  outline: none;
  padding: 12px 14px;
  font-family: 'Noto Sans KR', monospace;
  font-size: 13px;
  line-height: 1.7;
  background: var(--bg);
  color: var(--text);
  min-height: 0;
}

.rp-editor-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.rp-updated-at {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
}

@media (max-width: 480px) {
  .repo-prompt-wrap {
    flex-direction: column;
    height: auto;
  }
  .repo-prompt-aside {
    width: auto;
    height: 160px;
  }
  .rp-textarea {
    height: 300px;
  }
}
