/* 카페24 상세설명 관리 — 스타일시트
 *
 * 빌드 스텝이 없다. 브라우저가 이 파일을 그대로 읽는다.
 * 색·간격·반경은 전부 아래 토큰으로만 쓴다. 하드코딩하지 말 것.
 * 값의 출처는 design/카페24 상세설명 관리.dc.html 캔버스다.
 */

:root {
  /* 배경·표면 */
  --bg: #f4f6f8;
  --card: #fff;
  --surface: #fafbfd;      /* 표 머리글, 되돌린 행, 드롭존 */
  --bg-subtle: #eceff3;    /* 태그, 진행바 트랙, 썸네일 자리 */
  --bg-hover: #f0f2f5;
  --bg-hover-2: #e6e9ee;   /* 드래그 핸들 hover */

  /* 글자 */
  --ink: #16191d;
  --ink-2: #3a4048;        /* 표 본문 */
  --muted: #5c636e;
  --muted-2: #7b828c;      /* 되돌린 행 */
  --faint: #a6adb6;        /* 화살표, 빈 상태 아이콘 */

  /* 선 */
  --line: #e2e6eb;
  --line-2: #eceff3;       /* 카드 내부 구분선 */
  --line-strong: #d7dbe1;
  --line-hover: #b9bfc7;

  /* 액센트 */
  --accent: #1d5fdb;
  --accent-hover: #154aad;
  --accent-soft: #e8eefc;
  --accent-dash: #c9d3e6;  /* 점선 테두리, 스피너 트랙 */

  /* 상태 — 배경 / 테두리 / 글자 */
  --ok-bg: #e7f5ed;   --ok-line: #c2e3d0;   --ok-ink: #166b3c;   --ok-dot: #1f9254;
  --warn-bg: #fff6e5; --warn-line: #f0dcb4; --warn-ink: #8a5300; --warn-dot: #a86800;
  --err-bg: #fdecec;  --err-line: #f3cdcd;  --err-ink: #8a2223;

  /* 파괴적 액션 */
  --danger: #b6262a;
  --danger-line: #f0cfcf;
  --danger-line-hover: #e0a9a9;
  --danger-bg-hover: #f9dcdc;
  --bar-bad: #d64545;      /* 실패한 작업의 진행바 */

  /* 간격 */
  --s1: 4px;  --s2: 6px;  --s3: 8px;  --s4: 10px;
  --s5: 12px; --s6: 14px; --s7: 16px; --s8: 20px;
  --s9: 24px; --s10: 28px; --s11: 32px;

  /* 반경 */
  --r-sm: 4px; --r-md: 6px; --r: 8px; --r-lg: 10px; --r-xl: 12px; --r-pill: 999px;

  /* 그림자 */
  --shadow: 0 1px 3px rgba(16, 24, 40, .04);
  --shadow-accent: 0 1px 4px rgba(29, 95, 219, .10);

  /* 포커스 */
  --focus: 2px solid var(--accent);
}

@keyframes shimmer { 0% { opacity: .45 } 50% { opacity: .9 } 100% { opacity: .45 } }
@keyframes spin { to { transform: rotate(360deg) } }

* { box-sizing: border-box; }

/* 아래 컴포넌트들이 display 를 지정하는 탓에 hidden 속성이 무력화된다.
   (작성자 스타일이 UA 의 [hidden]{display:none} 을 이긴다)
   JS 가 .hidden 으로 여닫는 요소가 여럿이므로 여기서 되돌려 놓는다. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

h1 { font-size: 24px; margin: var(--s10) 0 var(--s1); letter-spacing: -.015em; }
h2 { font-size: 17px; margin: 0 0 var(--s5); }

code {
  background: var(--bg-subtle);
  padding: 1px 5px;
  border-radius: var(--r-sm);
  font-size: 13px;
}

/* 포커스는 전 요소 공통. 키보드 사용자가 자기 위치를 잃지 않게 한다. */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: var(--focus);
  outline-offset: 1px;
  border-color: var(--accent);
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 var(--s8) 80px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.back { text-decoration: none; font-size: 14px; }

/* ───────────────────────────────────────────── 상단바 */

.topbar {
  display: flex; align-items: center; gap: var(--s9); flex-wrap: wrap;
  background: var(--card); border-bottom: 1px solid var(--line);
  padding: 0 var(--s8); min-height: 56px;
}
.topbar .brand {
  font-weight: 700; text-decoration: none; color: var(--ink); letter-spacing: -.01em;
}
.topbar nav { display: flex; gap: var(--s1); flex: 1; flex-wrap: wrap; }
.topbar nav a {
  text-decoration: none; color: var(--muted);
  padding: var(--s2) var(--s4); border-radius: var(--r-md);
}
.topbar nav a:hover { background: var(--bg-hover); color: var(--ink); }
.topbar nav a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.topbar .me {
  display: flex; align-items: center; gap: var(--s4);
  font-size: 13px; color: var(--muted);
}
.avatar {
  display: inline-grid; place-items: center; width: 24px; height: 24px;
  border-radius: var(--r-pill); background: var(--accent-soft);
  color: var(--accent); font-weight: 700; font-size: 11px; flex: none;
}
.linklike {
  background: none; border: 1px solid transparent; color: var(--accent);
  cursor: pointer; font: inherit; font-size: 13px;
  padding: 2px var(--s2); border-radius: var(--r-md);
}
.linklike:hover { background: var(--bg-hover); }

/* ───────────────────────────────────────────── 카드 */

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: var(--s8); margin: var(--s7) 0;
}
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s7); align-items: start; }

.card-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s3); margin: 0 0 var(--s5); flex-wrap: wrap;
}
.card-head h2 { margin: 0; }

.login-card {
  max-width: 420px; margin: 12vh auto 0; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: var(--s11); text-align: center; box-shadow: var(--shadow);
}
.login-card h1 { font-size: 22px; line-height: 1.35; margin: 0 0 var(--s3); letter-spacing: -.01em; }

.error-card {
  max-width: 640px; margin: 40px auto 0; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r-xl); padding: var(--s10);
}
.error-card h1 { font-size: 22px; margin: 0 0 var(--s2); letter-spacing: -.01em; }

/* 로그인 화면의 도메인 안내 */
.domain-note {
  display: flex; align-items: center; justify-content: center; gap: var(--s3);
  margin: 0 0 var(--s8); padding: var(--s4) var(--s5);
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--r); font-size: 13px; color: var(--ink-2);
}
.domain-note .mark {
  display: inline-grid; place-items: center; width: 18px; height: 18px;
  border-radius: var(--r-pill); background: var(--accent);
  color: #fff; font-size: 11px; font-weight: 700; flex: none;
}

/* ───────────────────────────────────────────── 버튼 */

.btn {
  display: inline-block; border: 1px solid var(--line); background: var(--card);
  color: var(--ink); border-radius: var(--r); padding: var(--s3) var(--s6);
  cursor: pointer; text-decoration: none; font: inherit; font-size: 14px;
}
.btn:hover { border-color: var(--line-hover); color: var(--ink); }
.btn.primary {
  background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600;
}
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn.primary:focus-visible { outline-offset: 3px; }
.btn.primary:disabled {
  background: var(--accent); border-color: var(--accent);
  opacity: .45; cursor: not-allowed;
}
.btn.danger {
  color: var(--danger); border-color: var(--danger-line);
  background: var(--err-bg); font-weight: 600;
}
.btn.danger:hover {
  background: var(--danger-bg-hover); border-color: var(--danger-line-hover); color: var(--danger);
}
.btn.danger:focus-visible { outline-color: var(--danger); }
.btn.small { padding: 5px var(--s5); font-size: 13px; }
.btn.block { display: block; width: 100%; padding: 11px var(--s6); margin-top: var(--s8); }
form.inline { display: inline-block; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s3); }

/* ───────────────────────────────────────────── 알림 */

.alert {
  display: flex; align-items: flex-start; gap: var(--s4);
  border-radius: var(--r); padding: var(--s5) var(--s6);
  margin: var(--s5) 0; font-size: 13px; border: 1px solid transparent;
}
/* 색만으로 뜻을 전하지 않는다. 라벨을 함께 읽힌다. */
.alert .label { flex: none; font-weight: 700; }
.alert.error { background: var(--err-bg); border-color: var(--err-line); color: var(--err-ink); }
.alert.warn  { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-ink); }
.alert.ok    { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok-ink); }
.alert .mark {
  display: inline-grid; place-items: center; width: 18px; height: 18px;
  border-radius: var(--r-pill); background: currentColor;
  color: var(--warn-bg); font-size: 12px; font-weight: 700; flex: none;
}

/* ───────────────────────────────────────────── 검색 */

.search-field { position: relative; margin: var(--s7) 0 var(--s3); }
.search-field .icon {
  position: absolute; left: var(--s6); top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 15px; pointer-events: none;
}
.search {
  width: 100%; padding: var(--s5) var(--s6) var(--s5) 38px; font-size: 16px;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--card); color: var(--ink); font-family: inherit;
}
.search-hint { margin: 0 0 var(--s7); color: var(--muted); font-size: 12px; }

.results { position: relative; min-height: 72px; }
.results[aria-busy="true"] { opacity: .5; pointer-events: none; }
.results[aria-busy="true"]::before {
  content: ""; position: absolute; left: 50%; top: var(--s9); margin-left: -9px;
  width: 18px; height: 18px; z-index: 1;
  border: 2px solid var(--accent-dash); border-top-color: var(--accent);
  border-radius: var(--r-pill); animation: spin .7s linear infinite;
}

/* 빈 상태 — 검색 전, 결과 없음, 이력 없음 공용 */
.empty {
  display: grid; place-items: center; gap: var(--s2);
  padding: 56px var(--s8); background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r-lg); text-align: center;
}
.empty.dashed { border-style: dashed; border-color: var(--line-strong); }
.empty .icon { font-size: 22px; color: var(--faint); }
.empty strong { font-size: 15px; }
.empty span { color: var(--muted); font-size: 13px; }

/* ───────────────────────────────────────────── 상품 목록 */

.product-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s3); }
.product-list a {
  display: flex; align-items: center; gap: var(--s6); text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: var(--s4) var(--s6);
}
.product-list a:hover { border-color: var(--accent); box-shadow: var(--shadow-accent); }
.product-list img {
  width: 48px; height: 48px; object-fit: cover;
  border-radius: var(--r-md); background: var(--bg-subtle); flex: none;
}
.product-list .noimg {
  width: 48px; height: 48px; border-radius: var(--r-md); background: var(--bg-subtle);
  display: grid; place-items: center; font-size: 10px; color: var(--muted);
  text-align: center; flex: none;
}
.product-list .meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.product-list .meta strong {
  font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.product-list .meta > .muted {
  display: flex; align-items: center; gap: var(--s2); font-size: 13px; flex-wrap: wrap;
}
.product-list .chevron { color: var(--faint); font-size: 15px; flex: none; }

.tag {
  display: inline-block; background: var(--bg-subtle); color: var(--ink-2);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  padding: 0 var(--s2); font-size: 11px; font-weight: 600;
}
.tag.hidden-tag { background: var(--warn-bg); color: var(--warn-ink); border-color: var(--warn-line); }

.pager { display: flex; align-items: center; gap: var(--s5); margin-top: var(--s7); }

/* ───────────────────────────────────────────── 업로드 */

.dropzone {
  border: 2px dashed var(--accent-dash); border-radius: var(--r-lg);
  padding: var(--s9); text-align: center; background: var(--surface);
}
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone p { margin: 0 0 var(--s4); font-size: 14px; }
.dropzone p:last-child { margin: var(--s4) 0 0; color: var(--muted); font-size: 12px; }
.dropzone .btn { font-weight: 600; }

.queue-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s3); margin: var(--s7) 0 var(--s2);
}
.queue-head strong { font-size: 13px; }
.queue-head .muted { font-weight: 500; }

.queue {
  list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2);
  counter-reset: queue;
}
.queue li {
  display: flex; align-items: center; gap: var(--s4);
  border: 1px solid var(--line); border-radius: var(--r);
  padding: var(--s2) var(--s4); background: var(--card);
}
/* 번호는 CSS 카운터로 매긴다 — 순서가 곧 상세페이지 순서라는 걸 보이게 한다.
   드래그로 순서를 바꾸면 번호도 자동으로 다시 매겨진다. */
.queue li::before {
  counter-increment: queue; content: counter(queue);
  display: inline-grid; place-items: center; width: 22px; height: 22px;
  border-radius: var(--r-pill); background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; flex: none;
}
.queue img {
  width: 40px; height: 40px; object-fit: cover;
  border-radius: var(--r-sm); background: var(--bg-subtle); flex: none;
}
.queue .name {
  flex: 1; font-size: 13px; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.queue .size { color: var(--muted); font-size: 12px; flex: none; }
.queue .handle {
  background: var(--bg); color: var(--muted); border: 1px solid transparent;
  border-radius: var(--r-md); padding: var(--s1) var(--s2);
  cursor: grab; font: inherit; font-size: 13px; line-height: 1;
  letter-spacing: -1px; flex: none;
}
.queue .handle:hover { background: var(--bg-hover-2); color: var(--ink); }
.queue .remove {
  border: 1px solid transparent; background: none; color: var(--muted);
  cursor: pointer; font-size: 16px; line-height: 1;
  padding: var(--s1) var(--s2); border-radius: var(--r-md); flex: none;
}
.queue .remove:hover { color: var(--danger); background: var(--err-bg); }
.queue li.locked { background: var(--bg-subtle); border-style: dashed; }

/* 영상 링크 입력 줄 */
.video-add { display: flex; gap: var(--s2); margin-top: var(--s4); }
.video-add input {
  flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: var(--r-md);
  padding: var(--s2) var(--s3); font: inherit; font-size: 13px; background: var(--card);
}
.video-add input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }

/* 완료 화면의 업로드 URL 목록 (외부몰 복붙용) */
.url-list {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s1);
}
.url-list li {
  display: flex; align-items: center; gap: var(--s3);
  min-width: 0; /* grid 항목 기본 min-width:auto 가 긴 URL 로 카드 폭을 뚫는 것 방지 */
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: var(--s1) var(--s3); background: var(--bg-subtle);
}
.url-list .tag { flex: none; }
.url-actions { margin: var(--s3) 0 var(--s3); flex-wrap: wrap; }
/* 이력 행의 복사 버튼 묶음 */
.history .row-copy {
  display: inline-flex; align-items: center; gap: var(--s2);
  flex-wrap: wrap; margin-left: var(--s2);
}
.url-list code {
  flex: 1; min-width: 0; font-size: 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.url-list .btn { padding: 2px 8px; font-size: 12px; flex: none; }

.queue-empty {
  padding: var(--s8); text-align: center; color: var(--muted);
  font-size: 13px; background: var(--bg); border-radius: var(--r);
}

.options { margin: var(--s7) 0 0; border-top: 1px solid var(--line-2); padding-top: var(--s5); }
.options summary { cursor: pointer; color: var(--ink-2); font-size: 14px; font-weight: 600; }
.options summary .muted { font-weight: 400; }
.options label { display: block; margin: var(--s6) 0; font-size: 14px; }
.options label.check { display: flex; align-items: center; gap: var(--s3); }
.options .field-note { display: block; color: var(--muted); font-size: 12px; }
.options input[type="number"], .options input[type="text"] {
  display: block; width: 100%; margin-top: 5px; padding: var(--s3) var(--s4);
  border: 1px solid var(--line); border-radius: var(--r);
  font-size: 14px; font-family: inherit; color: var(--ink); background: var(--card);
}
.options label.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }

.submit-note { margin: var(--s3) 0 0; text-align: center; color: var(--muted); font-size: 12px; }

.preview {
  width: 100%; height: 460px; border: 1px solid var(--line);
  border-radius: var(--r); background: var(--card);
}

.field-note { color: var(--muted); font-size: 12px; }

/* 기존 업로드 콘텐츠 갤러리 모달 */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(15, 18, 25, .45);
  display: flex; align-items: center; justify-content: center; padding: var(--s6);
}
.modal {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  width: 100%; max-width: 760px; max-height: 82vh;
  display: flex; flex-direction: column; box-shadow: 0 18px 50px rgba(0, 0, 0, .25);
}
.modal-head {
  display: flex; align-items: center; gap: var(--s4);
  padding: var(--s5) var(--s6); border-bottom: 1px solid var(--line-2);
}
.modal-head .remove {
  margin-left: auto; border: 0; background: none; color: var(--muted);
  font-size: 20px; line-height: 1; cursor: pointer; padding: var(--s1) var(--s2);
  border-radius: var(--r-md);
}
.modal-head .remove:hover { color: var(--ink); background: var(--bg-hover-2); }
.modal-body { flex: 1; overflow-y: auto; padding: var(--s5) var(--s6); }
.modal-foot {
  display: flex; align-items: center; gap: var(--s4);
  padding: var(--s4) var(--s6); border-top: 1px solid var(--line-2);
}
.modal-foot .btn { margin-left: auto; }

.tabs { display: flex; gap: var(--s2); }
.tabs button {
  border: 1px solid transparent; background: none; cursor: pointer;
  padding: var(--s2) var(--s4); border-radius: var(--r-md);
  font: inherit; font-size: 13px; font-weight: 600; color: var(--muted);
}
.tabs button:hover { color: var(--ink); background: var(--bg-hover-2); }
.tabs button.active { color: var(--accent); background: var(--accent-soft); }

.crumbs { font-size: 13px; margin: 0 0 var(--s4); color: var(--muted); }
.crumbs a { color: var(--accent); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .sep { margin: 0 var(--s1); color: var(--line-hover); }

.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: var(--s3);
}
.gallery-item {
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-subtle);
  padding: var(--s2); cursor: pointer; text-align: center; min-width: 0;
}
.gallery-item:hover { border-color: var(--line-hover); }
.gallery-item.selected { outline: 2px solid var(--accent); border-color: var(--accent); }
.gallery-item img {
  width: 100%; height: 84px; object-fit: cover; border-radius: var(--r-sm);
  background: var(--bg); display: block;
}
.gallery-item .icon {
  width: 100%; height: 84px; display: flex; align-items: center; justify-content: center;
  font-size: 30px; background: var(--bg); border-radius: var(--r-sm);
}
.gallery-item .cap {
  display: block; margin-top: var(--s1); font-size: 11px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gallery-empty { padding: var(--s8); text-align: center; color: var(--muted); font-size: 13px; }

/* ───────────────────────────────────────────── 작업 진행 */

.job-head { display: flex; align-items: center; gap: var(--s3); margin: 0 0 var(--s4); }
.job-head strong { font-size: 15px; }
.spinner {
  display: inline-block; width: 14px; height: 14px; flex: none;
  border: 2px solid var(--accent-dash); border-top-color: var(--accent);
  border-radius: var(--r-pill); animation: spin .7s linear infinite;
}
/* 끝난 작업에는 스피너를 돌리지 않는다 */
#panel[data-status="done"] .spinner,
#panel[data-status="error"] .spinner { display: none; }

.bar {
  height: 10px; background: var(--bg-subtle); border-radius: var(--r-pill);
  overflow: hidden; margin: var(--s5) 0;
}
.fill { height: 100%; background: var(--accent); transition: width .3s; }
.fill.bad { background: var(--bar-bad); }
.fill.good { background: var(--ok-dot); }

/* ───────────────────────────────────────────── 표 */

table { width: 100%; border-collapse: collapse; font-size: 14px; }

.kv th {
  text-align: left; color: var(--muted); font-weight: 500;
  width: 160px; padding: 7px 0; vertical-align: top;
}
.kv td { padding: 7px 0; }

.table-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
}
.table-scroll { overflow-x: auto; }
.history { min-width: 680px; }
.history thead tr { background: var(--surface); }
.history th {
  text-align: left; color: var(--muted); font-weight: 600; font-size: 12px;
  padding: var(--s4) var(--s7); border-bottom: 1px solid var(--line);
}
.history td {
  padding: var(--s5) var(--s7); border-bottom: 1px solid var(--line-2);
  color: var(--ink-2); vertical-align: middle;
}
.history td.when, .history td.count { white-space: nowrap; }
.history td.act { text-align: right; }
.history td a { text-decoration: none; font-weight: 600; }
.history tr.reverted { background: var(--surface); color: var(--muted-2); }
.history tr.reverted td { color: var(--muted-2); }
.history tr.reverted td a { font-weight: 400; }
.history tr:last-child td { border-bottom: 0; }
.revert-info { font-size: 12px; line-height: 1.45; }

/* ───────────────────────────────────────────── 설정 */

.status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: var(--r-pill); padding: 2px var(--s4);
  font-size: 12px; font-weight: 600; border: 1px solid transparent;
}
.status-pill .dot { width: 6px; height: 6px; border-radius: var(--r-pill); }
.status-pill.on { background: var(--ok-bg); color: var(--ok-ink); border-color: var(--ok-line); }
.status-pill.on .dot { background: var(--ok-dot); }
.status-pill.off { background: var(--warn-bg); color: var(--warn-ink); border-color: var(--warn-line); }
.status-pill.off .dot { background: var(--warn-dot); }

.card-title { display: flex; align-items: center; gap: var(--s4); margin: 0 0 var(--s6); flex-wrap: wrap; }
.card-title h2 { margin: 0; }

.card-foot {
  display: flex; flex-wrap: wrap; gap: var(--s3);
  justify-content: space-between; align-items: center;
  margin-top: var(--s6); padding-top: var(--s6); border-top: 1px solid var(--line-2);
}
.danger-zone { display: inline-flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.danger-zone .muted { font-size: 12px; text-align: right; }

.setting-values { display: grid; gap: var(--s4); }
.setting-values .row {
  display: grid; grid-template-columns: 160px 1fr; gap: var(--s5); align-items: center;
}
.setting-values .row > span { color: var(--muted); font-size: 14px; }
.setting-values code {
  background: var(--bg); border: 1px solid var(--line);
  padding: 7px var(--s4); border-radius: var(--r-md); font-size: 13px;
  user-select: all; overflow-x: auto; white-space: nowrap;
}
/* 설정 폼 입력칸 — 개발자센터 설정값의 code 박스와 같은 생김새 */
.setting-values input, .setting-values select {
  width: 100%; background: var(--bg); border: 1px solid var(--line);
  padding: 7px var(--s4); border-radius: var(--r-md); font-size: 13px;
  font-family: inherit; color: var(--ink);
}
.setting-values input:focus, .setting-values select:focus {
  outline: 2px solid var(--accent-soft); border-color: var(--accent);
}
.setting-values .field-note { display: block; margin-top: 4px; }

/* ───────────────────────────────────────────── 반응형 */

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

@media (max-width: 640px) {
  .wrap { padding: 0 var(--s6) 56px; }
  h1 { font-size: 21px; }

  /* 브랜드와 사용자를 한 줄에 두고, 메뉴는 아래 줄로 내린다 */
  .topbar { gap: var(--s4); padding: var(--s3) var(--s6); }
  .topbar .brand { flex: 1; order: 1; }
  .topbar .me { order: 2; }
  .topbar nav { order: 3; width: 100%; flex: none; }
  .topbar .me > span:not(.avatar) { display: none; }

  .setting-values .row { grid-template-columns: 1fr; gap: var(--s1); }
  .card-foot { justify-content: flex-start; }
  .danger-zone .muted { text-align: left; }

  /* 이력 표를 카드로 쌓는다 — 가로 스크롤 없이 읽힌다 */
  .table-card { border: 0; background: none; border-radius: 0; }
  .table-scroll { overflow-x: visible; }
  .history { min-width: 0; display: grid; gap: var(--s3); }
  .history thead { display: none; }
  .history tbody, .history tr { display: block; }
  .history tr {
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--r-lg); padding: var(--s5) var(--s6);
  }
  .history td {
    display: flex; justify-content: space-between; gap: var(--s3);
    padding: 3px 0; border: 0; text-align: left;
  }
  .history td::before {
    content: attr(data-label); color: var(--muted); font-size: 12px; flex: none;
  }
  .history td.prod { display: block; }
  .history td.prod::before { display: block; margin-bottom: 2px; }
  .history td.act { justify-content: flex-end; padding-top: var(--s2); }
  .history td.act::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
