/* ============================================================
   IMPACSYS Clarity Design System V6 — impacsys-v6.css · v6.1.3
   원본: imcms-design-system/v6. 제품 레포에서 직접 고치지 말 것 —
   제품은 scripts/sync-design-system.sh <tag> 로만 받는다(design-system.lock 으로 고정).
   제품에만 필요한 규칙은 각 제품의 impacsys-v6-ext.css 에 둔다.
   ============================================================ */
:root {
  color-scheme: light;
  --text: #1d1d1f;
  --text-soft: #3a3a3c;
  --secondary: #6e6e73;
  --tertiary: #8e8e93;
  --separator: rgba(60, 60, 67, 0.16);
  --separator-soft: rgba(60, 60, 67, 0.09);
  --canvas: #f5f5f7;
  --surface: rgba(255, 255, 255, 0.82);
  --solid: #ffffff;
  --accent: #0071e3;
  --accent-pressed: #0062c4;
  --accent-soft: #eaf3ff;
  --green: #248a3d;
  --green-soft: #edf8ef;
  --orange: #b25e09;
  --orange-soft: #fff4e5;
  --red: #d12f3f;
  --red-soft: #fff0f1;
  --radius-sm: 5px;
  --radius-md: 7px;
  --radius-lg: 8px;
  --shadow-hairline: 0 0 0 1px rgba(60, 60, 67, 0.08);
  --shadow-card: 0 0 0 1px rgba(60, 60, 67, 0.10), 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 20px rgba(16, 24, 40, 0.06);
  --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.06);
  --shadow-lift: 0 22px 48px rgba(0, 0, 0, 0.10);
  --font: "Pretendard", system-ui, "Noto Sans KR", "Malgun Gothic", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 1180px;
  color: var(--text);
  background: linear-gradient(180deg, #f8f8fa 0, var(--canvas) 44%, #f2f3f6 100%);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; letter-spacing: 0; }
h1 { margin: 0; font-size: 28px; line-height: 1.2; font-weight: 820; }
h2 { margin: 0; font-size: 18px; line-height: 1.28; font-weight: 780; }
h3 { margin: 0; font-size: 15px; line-height: 1.35; font-weight: 760; }
a { color: inherit; text-decoration: none; }
.muted { color: var(--tertiary); }
.subtle { color: var(--secondary); }
.icon {
  width: 17px;
  height: 17px;
  display: block;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
:focus-visible {
  outline: 3px solid rgba(0, 113, 227, 0.28);
  outline-offset: 3px;
  border-radius: var(--radius-md);
}

.v6-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--separator);
  background: rgba(245,245,247,0.78);
  backdrop-filter: blur(22px) saturate(1.25);
}
.v6-topline {
  height: 66px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 0 30px;
}
.v6-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 236px;
}
.v6-brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-lg);
  color: white;
  background: linear-gradient(180deg, #2c8dff, var(--accent));
  box-shadow: 0 10px 22px rgba(0, 113, 227, 0.22);
  font-weight: 800;
}
.v6-brand-title { margin: 0; color: var(--text); font-weight: 800; }
.v6-brand-subtitle { margin: 1px 0 0; color: var(--secondary); font-size: 12px; }
.v6-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.v6-nav a,
.v6-pill {
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--text-soft);
  font-weight: 720;
  white-space: nowrap;
}
.v6-nav a.active,
.v6-pill.active {
  color: var(--text);
  background: white;
  box-shadow: var(--shadow-hairline), 0 8px 18px rgba(0,0,0,0.05);
}
.v6-actions { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.v6-contextbar {
  min-height: 50px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 8px 30px;
  border-top: 1px solid var(--separator-soft);
  background: rgba(255,255,255,0.42);
}
.v6-subnav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.v6-subnav::-webkit-scrollbar { height: 0; }
.v6-subnav button,
.v6-subnav a {
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--secondary);
  padding: 0 11px;
  font-weight: 720;
  white-space: nowrap;
}
.v6-subnav .active { color: var(--text); background: rgba(118,118,128,0.12); }
.v6-shell { max-width: 1500px; margin: 0 auto; padding: 30px; }
.v6-page-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 20px;
}
.v6-page-head p { margin: 8px 0 0; }
.v6-head-actions { display: flex; align-items: center; gap: 8px; }

.btn {
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border: 0;
  border-radius: var(--radius-md);
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-hairline);
  font-weight: 720;
  white-space: nowrap;
  transition: background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
.btn:hover { transform: translateY(-1px); background: white; box-shadow: var(--shadow-hairline), 0 8px 18px rgba(0,0,0,0.06); }
.btn:active { transform: scale(.985); }
.btn.primary { color: white; background: var(--accent); box-shadow: 0 10px 22px rgba(0,113,227,0.22); }
.btn.primary:hover { background: var(--accent-pressed); }
.btn.soft { color: var(--accent); background: var(--accent-soft); }
.btn.icon-only { width: 38px; padding: 0; }

.search-wrap {
  width: 280px;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--tertiary);
  box-shadow: var(--shadow-hairline);
}
.search-wrap.wide { width: min(520px, 42vw); border-radius: var(--radius-lg); }
.search {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}
.search::placeholder { color: var(--tertiary); }
.input, .select, .textarea {
  width: 100%;
  border: 0;
  border-radius: var(--radius-md);
  background: white;
  color: var(--text);
  box-shadow: var(--shadow-hairline);
}
.input, .select { height: 38px; padding: 0 11px; }
.textarea { min-height: 112px; padding: 11px; resize: vertical; }
.field { display: grid; gap: 7px; }
.field label { color: var(--text); font-weight: 720; }
.field small { color: var(--tertiary); }

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 28px;
  align-items: stretch;
  margin-bottom: 18px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--solid);
  box-shadow: var(--shadow-soft);
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 780;
}
.hero-title { max-width: 720px; margin: 15px 0 10px; font-size: 34px; line-height: 1.18; font-weight: 820; }
.hero-copy { max-width: 760px; margin: 0; color: var(--secondary); font-size: 15px; }
.hero-actions { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.hero-side {
  display: grid;
  gap: 14px;
  padding-left: 22px;
  border-left: 1px solid var(--separator-soft);
}

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.layout-main { display: grid; grid-template-columns: minmax(0, 1fr) 376px; gap: 16px; align-items: start; }
.stack { display: grid; gap: 16px; }
.card, .panel {
  border-radius: var(--radius-lg);
  background: var(--solid);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.panel.lift { box-shadow: var(--shadow-soft); }
.card-head {
  min-height: 59px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--separator-soft);
}
.card-body { padding: 16px; }
.metric-card {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--solid);
  box-shadow: var(--shadow-card);
}
.metric-label { margin: 0; color: var(--secondary); font-weight: 720; }
.metric-value { margin: 3px 0 0; font-size: 25px; line-height: 1.1; font-weight: 820; }
.metric-glyph {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-lg);
  color: var(--accent);
  background: var(--accent-soft);
}
.badge {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}
.badge.ok { color: var(--green); background: var(--green-soft); }
.badge.wait { color: var(--orange); background: var(--orange-soft); }
.badge.risk { color: var(--red); background: var(--red-soft); }
.badge.info { color: var(--accent); background: var(--accent-soft); }
.badge.neutral { color: var(--secondary); background: rgba(118,118,128,0.11); }

.filterbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 13px 14px;
  border-bottom: 1px solid var(--separator-soft);
  background: rgba(245,245,247,0.66);
}
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 14px; border-bottom: 1px solid var(--separator-soft); text-align: left; vertical-align: middle; }
.table th { color: var(--secondary); background: rgba(245,245,247,0.72); font-size: 12px; font-weight: 760; }
.table tbody tr:hover td { background: rgba(0,113,227,0.026); }

.timeline { display: grid; gap: 0; }
.timeline-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 16px;
}
.timeline-dot {
  width: 12px;
  height: 12px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(0,113,227,0.1);
}
.timeline-item:not(:last-child) .timeline-dot::after {
  content: "";
  display: block;
  width: 1px;
  height: 58px;
  margin: 14px auto 0;
  background: var(--separator-soft);
}
.stepper { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.step {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-lg);
  background: rgba(118,118,128,0.08);
  color: var(--secondary);
  font-weight: 720;
}
.step.active { color: var(--text); background: var(--accent-soft); }
.step.done { color: var(--green); background: var(--green-soft); }
.step-num {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: white;
  box-shadow: var(--shadow-hairline);
  font-size: 12px;
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.empty-state {
  min-height: 180px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  color: var(--secondary);
}
.empty-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border-radius: var(--radius-lg);
  color: var(--accent);
  background: var(--accent-soft);
}
.skeleton {
  display: block;
  width: 100%;
  height: 8px;
  margin-top: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #eeeeef, #f7f7f9, #eeeeef);
  background-size: 220% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}
.notice {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.72);
  box-shadow: var(--shadow-hairline);
}
.notice-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  color: var(--accent);
  background: var(--accent-soft);
}
.quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.quick-card {
  min-height: 106px;
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: var(--solid);
  box-shadow: var(--shadow-hairline);
}
.quick-card:hover { box-shadow: var(--shadow-hairline), var(--shadow-soft); }

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  background: linear-gradient(180deg, #f7f7f9 0, #f5f5f7 42%, #f2f3f6 100%);
}
.admin-shell.collapsed { grid-template-columns: 84px minmax(0, 1fr); }
.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--separator);
  background: rgba(251, 251, 253, 0.78);
  backdrop-filter: blur(22px) saturate(1.25);
}
.admin-brand { height: 76px; display: flex; align-items: center; gap: 12px; padding: 0 20px; }
.admin-nav { flex: 1; min-height: 0; padding: 4px 10px 16px; overflow: auto; scrollbar-width: none; }
.admin-nav::-webkit-scrollbar { width: 0; height: 0; }
.admin-label { padding: 16px 12px 7px; color: var(--tertiary); font-size: 11px; font-weight: 760; }
.admin-link {
  height: 39px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  color: var(--text-soft);
  font-weight: 680;
}
.admin-link.active { color: var(--text); background: white; box-shadow: var(--shadow-hairline), 0 8px 18px rgba(0,0,0,0.05); }
.admin-link-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  color: var(--accent);
  background: var(--accent-soft);
  flex: 0 0 auto;
}
.admin-shell.collapsed .admin-text,
.admin-shell.collapsed .admin-label,
.admin-shell.collapsed .v6-brand-title,
.admin-shell.collapsed .v6-brand-subtitle { display: none; }

/* 사이드바 하단 액션 줄(접기·테마·로그아웃 등).
   화면에서 인라인 style 로 그리지 말 것 — 인라인은 스타일시트를 이기므로 아래 접힘 규칙이
   적용되지 않는다(super 콘솔이 실제로 그랬다). */
.admin-actions {
  display: flex;
  gap: 6px;
  padding: 12px;
  border-top: 1px solid var(--separator-soft);
}
/* 아이콘 버튼은 자리가 모자라도 찌그러지지 않는다. 레일(84px) 실측에서 38px 버튼 3개가
   16px 까지 눌렸다 — 누르기 어려운 크기다. 줄이 모자라면 줄바꿈으로 푼다. */
.admin-actions .btn { flex: 0 0 auto; }

/* ── 접힘 레일(84px) ──────────────────────────────────────────
   `.collapsed` 은 폭만 84px 로 줄였을 뿐, 안쪽 규칙은 넓은 폭을 전제로 쓰여 있었다.
   레일에서는 아이콘만 남으므로 가운데로 모으고, 뜻을 잃는 부가 아이콘은 감춘다.

   ⚠️ 901px 이상에서만 건다. 900px 이하에서 사이드바는 레일이 아니라 **284px 드로어**가 되고,
      아래 모바일 블록이 글자를 다시 보여 준다. 여기 규칙을 전 구간에 걸면 데스크톱에서 접어 둔
      사용자가 폰에서 드로어를 열었을 때 글자는 나오는데 가운데 정렬·간격 0 으로 뭉친다
      (Codex 지적 2026-09-12). 접힘 상태는 localStorage 가 아니라 클래스로만 남지만,
      같은 창을 줄이기만 해도 재현된다. */
@media (min-width: 901px) {
  .admin-shell.collapsed .admin-brand,
  .admin-shell.collapsed .admin-link {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
    gap: 0;
  }
  /* 레일에서 링크는 **정사각형**이다. 글자가 빠져도 링크 상자는 여전히 나비 폭(63px)이라,
     활성 항목의 흰 배경·그림자만 가로로 긴 알약으로 남아 26px 아이콘 열과 어긋나 보였다
     (2026-09-12 운영 실측 63×39). 아이콘 타일(26px)·브랜드(36px)·하단 버튼(38px)과
     같은 리듬이 되도록 44px 정사각으로 맞춘다. 아이콘 타일 자체는 펼침 상태와 같게 둔다 —
     접었다 폈을 때 아이콘 생김새가 달라지지 않아야 한다. */
  .admin-shell.collapsed .admin-link {
    width: 44px;
    height: 44px;
    margin: 0 auto 2px;
    border-radius: var(--radius-md);
  }
  .admin-shell.collapsed .admin-actions {
    flex-wrap: wrap;
    justify-content: center;
  }
  /* 아이콘만 남은 링크에서 화살표·배지 같은 부가 표시는 무엇을 가리키는지 알 수 없다. */
  .admin-shell.collapsed .admin-link > i:not(.admin-link-icon) { display: none; }
}
.admin-main { min-width: 0; }
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 0 30px;
  border-bottom: 1px solid var(--separator);
  background: rgba(245,245,247,0.76);
  backdrop-filter: blur(22px) saturate(1.25);
}
.mobile-menu { display: none; }
.drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  background: rgba(0,0,0,0.24);
  backdrop-filter: blur(8px);
}
.drawer-scrim.open { display: block; }

html.dark,
body.dark {
  color-scheme: dark;
  --text: #f5f5f7;
  --text-soft: #e6e6ea;
  --secondary: #aeaeb2;
  --tertiary: #8e8e93;
  --separator: rgba(255,255,255,0.18);
  --separator-soft: rgba(255,255,255,0.1);
  --canvas: #111113;
  --surface: rgba(36,36,40,0.78);
  --solid: #1c1c1e;
  --accent: #0a84ff;
  --accent-pressed: #409cff;
  --accent-soft: rgba(10,132,255,0.18);
  --green: #6bd878;
  --green-soft: rgba(52,199,89,0.18);
  --orange: #ffb340;
  --orange-soft: rgba(255,159,10,0.18);
  --red: #ff6961;
  --red-soft: rgba(255,69,58,0.18);
  --shadow-hairline: 0 0 0 1px rgba(255,255,255,0.1);
  --shadow-card: 0 0 0 1px rgba(255,255,255,0.12), 0 1px 2px rgba(0,0,0,0.4), 0 8px 22px rgba(0,0,0,0.45);
  --shadow-soft: 0 10px 28px rgba(0,0,0,0.28);
  --shadow-lift: 0 22px 48px rgba(0,0,0,0.36);
  background: #111113;
}
body.dark .admin-shell { background: linear-gradient(180deg, #141416, #111113); }
body.dark .v6-header,
body.dark .admin-sidebar,
body.dark .admin-topbar { background: rgba(28,28,30,0.78); }
/* 컨텍스트바는 라이트에서 반투명 흰색(rgba(255,255,255,0.42))이다. 다크 규칙이 없어
   상단에 밝은 띠로 남아 있었다(v6.0 부터, 샘플에서 발견). 헤더와 같은 계열로 낮춘다. */
body.dark .v6-contextbar { background: rgba(28,28,30,0.62); }
body.dark .card,
body.dark .panel,
body.dark .metric-card,
body.dark .quick-card,
body.dark .notice,
body.dark .hero-panel { background: var(--solid); }
body.dark .btn,
body.dark .search-wrap,
body.dark .input,
body.dark .select,
body.dark .textarea,
body.dark .v6-nav a.active,
body.dark .admin-link.active { background: rgba(44,44,46,0.92); color: var(--text); }
body.dark .btn:hover { background: rgba(58,58,60,0.96); box-shadow: var(--shadow-hairline), 0 8px 18px rgba(0,0,0,0.28); }
body.dark .btn.primary { background: var(--accent); color: #fff; }
body.dark .btn.primary:hover { background: var(--accent-pressed); }
body.dark .admin-link:hover,
body.dark .v6-nav a:hover,
body.dark .quick-card:hover { background: rgba(255,255,255,0.06); }
body.dark .table th,
body.dark .filterbar,
body.dark .step,
body.dark .metric { background: rgba(58,58,60,0.56); }
body.dark .table tbody tr:hover td { background: rgba(10,132,255,0.08); }
/* 다크 표 행 구분선 — 기본 --separator-soft(흰색 10%)는 어두운 배경에서 너무 밝게 튄다.
   .table 전용으로 더 낮춰 은은하게. 라이트는 이 규칙 밖이라 무영향. */
body.dark .table th, body.dark .table td { border-bottom-color: rgba(255,255,255,0.055); }
body.dark .step-num,
body.dark .metric-glyph,
body.dark .admin-link-icon,
body.dark .notice-icon,
body.dark .empty-icon { background: var(--accent-soft); color: var(--accent); }
body.dark .drawer-scrim { background: rgba(0,0,0,0.46); }

/* raw input/select/textarea (v6 .input 클래스가 아닌 것 — 예: class="border rounded" 인
   date/select 필터) 는 배경·글자색이 안 뒤집혀 흰 필드로 남는다.
   v6 .input 과 같은 값으로 덮는다. 체크박스·라디오·range 는 color-scheme 이 네이티브로
   처리하므로 제외(배경을 칠하면 위젯이 깨진다). date 캘린더 위젯은 위 color-scheme:dark 가 담당. */
body.dark input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),
body.dark select,
body.dark textarea { background: rgba(44,44,46,0.92) !important; color: var(--text) !important; border-color: var(--separator) !important; }
body.dark input::placeholder,
body.dark textarea::placeholder { color: var(--secondary); }


@keyframes shimmer {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

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

@media (max-width: 900px) {
  body { min-width: 0; }
  .v6-topline { height: auto; grid-template-columns: 1fr auto; padding: 14px 18px; gap: 12px; }
  .v6-nav { grid-column: 1 / -1; justify-content: flex-start; overflow-x: auto; }
  .v6-actions { justify-content: flex-end; }
  .v6-contextbar { grid-template-columns: 1fr; padding: 10px 18px; }
  .v6-shell { padding: 22px 18px 48px; }
  .v6-page-head { display: grid; }
  .hero-panel,
  .layout-main,
  .grid-2,
  .grid-3,
  .grid-4,
  .quick-grid,
  .form-grid { grid-template-columns: 1fr; }
  .hero-panel { padding: 22px; }
  .hero-title { font-size: 28px; }
  .hero-side { padding-left: 0; border-left: 0; border-top: 1px solid var(--separator-soft); padding-top: 18px; }
  .search-wrap,
  .search-wrap.wide { width: 100%; }
  .admin-shell { display: block; }
  .admin-sidebar {
    position: fixed;
    z-index: 80;
    inset: 0 auto 0 0;
    width: 284px;
    transform: translateX(-104%);
    transition: transform 220ms cubic-bezier(.2,.8,.2,1);
  }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-shell.collapsed .admin-text,
  .admin-shell.collapsed .admin-label,
  .admin-shell.collapsed .v6-brand-title,
  .admin-shell.collapsed .v6-brand-subtitle { display: block; }
  .admin-topbar { min-height: 68px; padding: 0 18px; grid-template-columns: auto minmax(0, 1fr) auto; }
  .mobile-menu { display: inline-flex; }
}

/* ============================================================
   v6.1 — 제품에서 올라온 공통 컴포넌트
   master·super·egov 의 ext.css 에 같은 규칙이 복제돼 있거나(im-*), master 에서 먼저
   만들어 검증된 것(페이지네이션·하위 탭·행 동작·모바일 표 재배치)을 원본으로 올렸다.
   파일 끝에 두는 이유: 제품에서 이 규칙들은 코어 뒤(ext)에 있었다. 같은 순서를 지킨다.
   ============================================================ */

/* ── 프로그레스 바 (대시보드 시스템 지표용) ── */
.im-progress {
  height: 6px;
  background: var(--separator);
  border-radius: 999px;
  overflow: hidden;
}
.im-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 300ms ease;
}
.im-progress-bar.ok     { background: var(--green); }
.im-progress-bar.warn   { background: var(--orange); }
.im-progress-bar.danger { background: var(--red); }

/* ── 페이지 타이틀 ── */
#pageTitle {
  font-size: 16px;
  font-weight: 760;
  margin: 0;
  color: var(--text);
}

/* ── 알림 모달 (imAlert) ── */
#imAlertModal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.36);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
#imAlertModal.open { display: flex; }
.im-alert-box {
  background: var(--solid);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  width: 100%;
  max-width: 360px;
  overflow: hidden;
}
.im-alert-head { padding: 20px 20px 12px; display: flex; gap: 12px; align-items: flex-start; }
.im-alert-icon { width: 40px; height: 40px; border-radius: 999px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.im-alert-foot { padding: 0 20px 20px; display: flex; gap: 8px; justify-content: flex-end; }

/* ── 메트릭 아이콘 ── */
.im-metric-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.im-metric-icon.blue   { background: var(--accent-soft); color: var(--accent); }
.im-metric-icon.green  { background: var(--green-soft);  color: var(--green); }
.im-metric-icon.orange { background: var(--orange-soft); color: var(--orange); }
.im-metric-icon.red    { background: var(--red-soft);    color: var(--red); }

/* ── 로그인 페이지 ── */
.im-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--canvas);
}
.im-login-box {
  width: 100%;
  max-width: 400px;
  padding: 40px;
  background: var(--solid);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

/* ── 페이지네이션 ── */
.v6-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}
.v6-pagination a,
.v6-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--separator);
  border-radius: var(--radius-md);
  color: var(--secondary);
  background: var(--surface);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background 120ms, color 120ms;
}
.v6-pagination a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.v6-pagination .is-active {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 8px 20px rgba(0, 113, 227, 0.18);
}
.v6-pagination .is-disabled {
  color: var(--tertiary);
  background: var(--separator-soft);
  cursor: not-allowed;
}

/* ─────────────────────────────────────────────────────────────
   하위 탭(서브타이틀) — 한 메뉴 안에서 화면을 오가는 줄.

   master 에서 세 가지(밑줄+indigo / 알약+indigo 배경 / 밑줄+indigo-500)가 따로 놀던 것을
   한 모양으로 모은 것이다. 화면은 클래스만 붙인다 — Tailwind 유틸리티를 화면마다
   늘어놓으면 다음에 또 갈린다. 활성색은 --accent. indigo 는 이 디자인시스템 색이 아니다.
   ───────────────────────────────────────────────────────────── */
.subtab-bar {
  display: flex;
  gap: 22px;
  margin: 0 0 20px;
  border-bottom: 1px solid var(--separator);
  overflow-x: auto;
}
.subtab {
  flex: 0 0 auto;
  padding: 10px 2px;
  margin-bottom: -1px;              /* 밑줄이 바의 선 위에 겹치게 */
  border-bottom: 2px solid transparent;
  color: var(--secondary);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.subtab:hover { color: var(--text); }
.subtab.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.subtab i, .subtab .subtab-icon { margin-right: 6px; }

/* 알림 배지 같은 부가 표시 */
.subtab-badge {
  display: inline-block;
  min-width: 17px;
  padding: 0 5px;
  margin-left: 5px;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  vertical-align: middle;
}

/* 다크에서 하위 탭 선을 명시한다. impacsys-v6-tailwind.css 의 `.dark *`(0,1,0)가 이 파일
   뒤에 로드되어 `.subtab`·`.subtab-bar`(0,1,0) 의 테두리색을 덮는다 — 비활성 탭에 없던
   밑줄이 생긴다. 특정성으로 이겨서 로드 순서와 무관하게 만든다. */
body.dark .subtab-bar { border-bottom-color: var(--separator); }
body.dark .subtab { border-bottom-color: transparent; }
body.dark .subtab.is-active { border-bottom-color: var(--accent); }

/* ─────────────────────────────────────────────────────────────
   행의 동작을 셀 안의 진짜 링크·버튼으로 준다 (`.row-action`).

   `<tr onclick>` 에 tabindex 를 주는 것은 초점과 실행만 열어 준 것이다 — 스크린리더는
   그것을 여전히 "행" 으로 읽고, 무엇을 하는 행인지 말해 주지 않는다. 진짜 `<a>`/`<button>`
   이면 "링크"·"버튼" 으로 읽히고 초점·Enter 가 브라우저 기본 동작으로 온다.

   생김새는 주변 글자와 같게 둔다 — 목록이 버튼밭이 되면 오히려 읽기 어렵다.
   ───────────────────────────────────────────────────────────── */
.row-action {
  /* 브라우저가 `<button>` 의 inline 을 inline-block 으로 굳힌다(blockify) — 그래서
     칸 폭을 넘지 않도록 상한과 줄바꿈을 같이 준다. 2줄 카드에서 긴 제목이 들어와도
     칸 안에서 접힌다. */
  display: inline;
  max-width: 100%;
  overflow-wrap: anywhere;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: inherit;
  cursor: pointer;
}
.row-action:hover { text-decoration: underline; }
.row-action:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

/* 클릭되는 행(tabindex 를 준 행)은 초점이 보여야 쓸 수 있다.
   `:focus-visible` 을 쓴다 — 마우스로 눌렀을 때까지 테두리가 남으면 거슬린다. */
.table tbody tr[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* ═══════════════════════════════════════════
   목록 표 → 폰에서 2줄 카드 (`.table.reflow`)
   ═══════════════════════════════════════════

   관리자 목록은 7~11열이다. 가로 스크롤만 걸어 두면 폰에서 매번 옆으로 밀어야 한다.
   767px 이하에서 한 행을 두 줄로 재배치한다 — 1줄 제목, 2줄 나머지.

   ## 표에 붙이는 계약 (CSS 를 표마다 새로 쓰지 않는다)

     <table class="table reflow">        재배치 대상으로 표시. **opt-in 이다** —
                                          `.table` 전체를 바꾸지 않는다.
     <td data-c="title">                  1줄이 될 칸. **행마다 정확히 하나.**
     <td data-c="hide">                   폰에서 감출 칸(다른 칸과 같은 말을 하는 것).
     <td data-c="right">                  2줄 오른쪽 끝으로 밀 칸(보통 시각).
     <td data-c="strong">                 2줄에서 강조할 칸(보통 소속·기관).
     <td data-l="담당">                    값만 있으면 무엇인지 모르는 칸에 붙이는 라벨.

   `data-c` 는 띄어쓰기로 여러 개를 줄 수 있다(`data-c="right strong"`).
   나머지 칸은 아무것도 안 달아도 된다 — **DOM 순서대로** 2줄에 흐른다.

   ⚠️ 표와 카드를 따로 그리지 않는다. v6.0 의 `.mobile-list`/`.list-card` 는 같은 행을
      두 군데 적게 만들어 한쪽만 고치는 사고를 불렀고, 어느 제품도 쓰지 않아 v6.1 에서 뺐다.

   767px 을 쓴다 — 열이 많은 표는 640px 보다 훨씬 이전에 못 읽게 된다.  */
@media (max-width: 767px) {
  /* 재배치하면 가로로 넘칠 일이 없다. 제품이 폰에서 `table { min-width: … }` 를 걸어 두었어도
     되돌린다 — 안 그러면 2줄로 접어 놓고도 가로 스크롤이 남는다. */
  .table.reflow,
  .table.reflow tbody {
    /* 표 레이아웃을 아예 벗어난다. `display: table` 인 채로 행만 flex 로 만들면
       표가 여전히 칸 폭을 스스로 계산해서 **행이 폭을 다 채우지 못한다**
       (실측: 행폭 238px, 다른 표는 351px). 블록으로 바꾸면 균일해진다. */
    display: block;
    min-width: 0;
    width: 100%;
  }

  /* 머리글은 각 칸 옆에 라벨이 없으면 의미가 없다. 2줄 카드에서는 배지·서식과
     `data-l` 라벨이 스스로 무엇인지 말한다. */
  .table.reflow thead { display: none; }

  /* ⚠️ Tailwind 의 `.hidden`(0,1,0) 은 아래 규칙(0,2,2)에 진다. JS 로 접었다 펴는 행
     (처리결과 펼침 행 등)이 **폰에서 항상 펼쳐진 채** 남는다. 먼저 명시적으로 되돌린다. */
  .table.reflow tbody tr.hidden { display: none; }

  .table.reflow tbody tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--separator-soft);
  }

  /* `body.dark .table tbody tr:hover td`(0,3,4)가 이 규칙(0,3,3)보다 요소 하나만큼
     더 구체적이다. 다크에서만 칸마다 파란 조각이 남으므로 같은 모양으로 한 번 더 적는다. */
  .table.reflow tbody tr:hover td,
  body.dark .table.reflow tbody tr:hover td { background: transparent; }

  .table.reflow tbody td {
    /* `0 0 auto` 로 두면 **줄어들 수 없어서** 긴 값(URL·경로·이메일)이 든 칸이
       max-content 폭을 그대로 차지하고 행을 밀어낸다. 실측: 351px 행에 587·718px 칸.
       `min-width: 0` 은 줄어드는 것이 허용될 때만 의미가 있다 — 셋을 같이 준다. */
    flex: 0 1 auto;
    padding: 0;
    border: 0;
    /* 제목뿐 아니라 **어느 칸이든** 긴 값이 올 수 있다(URL·경로·이메일).
       flex 아이템의 기본 `min-width: auto` 때문에 줄바꿈이 안 걸려 행이 통째로
       가로로 넘친다. 두 줄 카드에서는 잘리는 것보다 접히는 게 낫다. */
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 12px;
    color: var(--secondary);
  }

  /* 1줄: 제목. `flex-basis: 100%` 가 줄 전체를 차지해 나머지를 아래로 밀어낸다 —
     이게 "두 줄" 을 만드는 장치다. `order: -1` 로 DOM 순서와 무관하게 맨 앞. */
  .table.reflow tbody td[data-c~="title"] {
    flex: 1 0 100%;
    order: -1;
    /* 제목에는 긴 값이 들어온다. 공백 없는 URL 같은 값이 오면 flex 아이템의 기본
       `min-width: auto` 때문에 줄바꿈이 안 돼 가로로 넘친다. **둘 다** 줘야 실제로 접힌다. */
    min-width: 0;
    overflow-wrap: anywhere;
    /* 데스크톱에서 한 줄로 줄여 보여 주던 제약(`truncate`·`max-w-*`)을 푼다.
       2줄 카드에서는 제목이 접히는 게 맞다. `white-space` 를 안 풀면
       `overflow-wrap` 을 줘도 nowrap 이라 줄바꿈이 안 걸린다. */
    white-space: normal;
    max-width: none;
    overflow: visible;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
  }

  .table.reflow tbody td[data-c~="strong"] {
    font-weight: 700;
    color: var(--text);
  }

  /* 오른쪽 끝으로.
     ⚠️ `margin-left: auto` 만으로는 **뒤에 오는 형제까지 함께** 오른쪽으로 밀린다.
        시각 칸이 중간에 있는 표가 대부분이라 그 뒤 칸들이 통째로 딸려 갔다.
        `order` 로 먼저 맨 뒤로 보낸 다음 밀어야 한다.
        무표시 칸은 order 0 이므로 1이면 충분하다(제목은 -1). */
  .table.reflow tbody td[data-c~="right"] {
    order: 1;
    margin-left: auto;
  }

  /* 폰에서만 감춘다 — 데스크톱 표에는 그대로 남는다. */
  .table.reflow tbody td[data-c~="hide"] { display: none; }

  /* 머리글을 감췄으므로 값만 남는 칸에는 라벨을 붙인다.
     배지·시각·번호는 생김새로 스스로를 설명하므로 라벨을 달지 않는다.
     `:not(:empty)` — 빈 칸에 라벨만 남는 것을 막는다. */
  .table.reflow tbody td[data-l]:not(:empty)::before {
    content: attr(data-l) " ";
    color: var(--tertiary);
  }

  /* 빈 목록 안내는 한 줄로 남긴다 — flex 아이템이 되면 가운데 정렬이 풀린다. */
  .table.reflow tbody tr td[colspan] {
    flex: 1 0 100%;
    order: 0;
    text-align: center;
  }
}
