/* ═══ Buttons ═══ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 12px;
  height: 32px;
  border-radius: var(--r-sm);
  font-size: var(--fs-meta);
  font-weight: 500;
  transition: background var(--dur-fast), color var(--dur-fast), box-shadow var(--dur-fast);
  white-space: nowrap;
  flex-shrink: 0;
}
.btn:disabled { opacity: 0.4; pointer-events: none; }
.btn-primary { background: var(--explan-red); color: var(--text-on-red); }
.btn-primary:hover { background: var(--explan-red-dark); }
.btn-secondary { background: var(--surface-base); color: var(--text-primary); border: 1px solid var(--border-default); }
.btn-secondary:hover { background: var(--surface-sub); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--surface-sub); color: var(--text-primary); }
.btn-danger { background: #FEE2E2; color: #991B1B; }
.btn-danger:hover { background: #FECACA; }
.btn-sm { height: 26px; padding: 0 10px; font-size: var(--fs-caption); }
.btn-xs { height: 22px; padding: 0 8px; font-size: var(--fs-tiny); }
.btn-icon { width: 32px; padding: 0; }
.btn-icon.btn-sm { width: 26px; height: 26px; }

/* ═══ Badge / Chip — v3.1 가독성 ↑ ═══ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0 7px;
  height: 22px;                  /* was 20 */
  border-radius: var(--r-sm);
  font-size: var(--fs-tiny);     /* 11 — 토큰 적용 */
  font-weight: 700;              /* was 600 — 짧은 한글 라벨 또렷이 */
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
/* Status badges */
.badge-등록    { background: var(--s-reg-bg);  color: var(--s-reg-fg); }
.badge-처리중  { background: var(--s-proc-bg); color: var(--s-proc-fg); }
.badge-처리완료{ background: var(--s-done-bg); color: var(--s-done-fg); }
.badge-종결    { background: var(--s-done-bg); color: var(--s-done-fg); }
.badge-미지정  { background: var(--s-none-bg); color: var(--s-none-fg); }
/* Importance — v3.1: Priority(채움 알약)와 형태로 분리. 외곽선 + 색점. */
.badge-imp-상,
.badge-imp-중,
.badge-imp-하 {
  background: transparent;
  border: 1px solid;
  padding: 0 6px 0 5px;
  gap: 4px;
}
.badge-imp-상::before,
.badge-imp-중::before,
.badge-imp-하::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.badge-imp-상 { color: #B91C1C; border-color: #FECACA; }
.badge-imp-상::before { background: #F43F5E; }
.badge-imp-중 { color: #B45309; border-color: #FCD34D; }
.badge-imp-중::before { background: #F59E0B; }
.badge-imp-하 { color: #4B5563; border-color: #D1D5DB; }
.badge-imp-하::before { background: #9CA3AF; }
/* Priority — v3.1: 채움 알약 (영역 점유 ↑, 채도 ↑ → 시인성) */
.badge-P1 { background: #FEE2E2; color: #991B1B; }
.badge-P2 { background: #FEF3C7; color: #92400E; }
.badge-P3 { background: #DBEAFE; color: #1E40AF; }
.badge-P4 { background: #F3F4F6; color: #6B7280; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  height: 24px;
  border-radius: var(--r-full);
  font-size: var(--fs-caption);
  font-weight: 500;
  background: var(--surface-sub);
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
  cursor: pointer;
  transition: all var(--dur-fast);
  white-space: nowrap;
}
.chip:hover { background: var(--surface-sunken); color: var(--text-primary); }
.chip-active { background: var(--explan-red-light); color: var(--explan-red); border-color: #FFBDBE; }
.chip-close { display: flex; align-items: center; opacity: 0.6; }
.chip-close:hover { opacity: 1; }

/* ═══ Avatar ═══ */
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--explan-red-light);
  color: var(--explan-red);
  font-size: 11px;
  width: 28px;
  height: 28px;
}
.avatar-sm { width: 22px; height: 22px; font-size: 9px; }
.avatar-lg { width: 36px; height: 36px; font-size: 14px; }
.avatar-xl { width: 48px; height: 48px; font-size: 18px; }

/* ═══ Card ═══ */
.card {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);    /* v3.1: sm→md로 통일 (모든 페이지 카드) */
  box-shadow: var(--sh-card);
}

/* ═══ Divider ═══ */
.divider { height: 1px; background: var(--border-default); margin: 0; }
.divider-v { width: 1px; background: var(--border-default); align-self: stretch; }

/* ═══ Input ═══ */
.input {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border-default);
  border-radius: var(--r-sm);
  background: var(--surface-base);
  font-size: var(--fs-body);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--dur-fast);
  width: 100%;
}
.input:focus { border-color: var(--border-focus); box-shadow: 0 0 0 2px rgba(197,37,47,0.1); }
.input::placeholder { color: var(--text-disabled); }
.input-with-icon { position: relative; }
.input-with-icon .input { padding-left: 32px; }
.input-with-icon .input-icon { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--text-tertiary); pointer-events: none; }

/* ═══ Side Rail Icon Item ═══ */
.rail-item {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  cursor: pointer;
  position: relative;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.rail-item:hover { background: var(--surface-base); color: var(--text-primary); }  /* v3.1.3: 진한 레일 위 흰색 hover로 명확 */
.rail-item.active { background: var(--explan-red-light); color: var(--explan-red); }
.rail-item .notif-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 7px; height: 7px;
  background: var(--explan-red);
  border-radius: 50%;
  border: 1.5px solid var(--surface-sunken);  /* v3.1.2: 새 rail bg에 맞춰 */
}

/* ═══ Nav Item (Issue Nav) — v3.1 가독성 ↑ ═══ */
.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 36px;             /* was 34 — 탭 영역 여유 */
  width: 100%;              /* v3.1.3: 항상 패널 폭 채움 — 빠른 필터 라벨 잘림 방지 */
  cursor: pointer;
  font-size: var(--fs-meta);
  color: var(--text-secondary);   /* was tertiary — 더 진하게 */
  border-radius: var(--r-sm);
  position: relative;
  transition: background var(--dur-fast), color var(--dur-fast);
  text-align: left;          /* button 기본 center 정렬 해제 */
}
.nav-item:hover { background: var(--surface-sunken); color: var(--text-primary); }   /* v3.1.3: 레일과 톤 통일 */
.nav-item.active { background: none; background-color: var(--nav-accent-bg, var(--explan-red-light)); color: var(--nav-accent, var(--explan-red)); font-weight: 700; }
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 3px;
  background: var(--nav-accent, var(--explan-red));
  border-radius: 0 2px 2px 0;
}
.nav-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--surface-sunken);
  color: var(--text-secondary);   /* was tertiary — 숫자 가독성 ↑ */
  border-radius: var(--r-full);
  font-size: var(--fs-tiny);      /* was 10 — 토큰 사용 */
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.nav-item.active .nav-badge { background: var(--nav-accent, var(--explan-red)); color: #fff; }

/* ═══ Section header (nav group) — v3.1 가독성 ↑ ═══ */
.nav-section-hd {
  padding: 14px 12px 6px;
  font-size: var(--fs-tiny);
  font-weight: 800;
  color: var(--text-tertiary);  /* was disabled — 그룹 헤더는 식별돼야 함 */
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.nav-section-sep {
  height: 1px;
  background: var(--border-default);
  margin: 6px 12px;
}

/* ═══ Filter bar ═══ */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  height: 44px;
  border-bottom: 1px solid var(--border-default);
  background: var(--surface-base);
  overflow-x: auto;
  flex-shrink: 0;
}
.filter-bar::-webkit-scrollbar { height: 0; }

/* ═══ Table / List — v3.1 헤더 대비 ↑ ═══ */
/* ═══ Table / List — v3.2 카드형 행 분리 ═══ */
.issue-table {
  width: 100%;
  min-width: 960px;            /* 고정폭 컬럼 합(~700) + 제목 최소폭 보장 → 좁아지면 컬럼 수축 대신 가로 스크롤 */
  border-collapse: separate;
  border-spacing: 0 7px;       /* 행 사이 세로 간격 */
  table-layout: fixed;
  font-size: var(--fs-meta);
  padding: 0 4px;
}
.issue-table th {
  text-align: left;
  font-weight: 700;
  font-size: var(--fs-caption);
  color: var(--text-tertiary);
  padding: 0 8px;
  height: 38px;
  background: var(--surface-base);     /* sticky 헤더 — 스크롤 시 본문 비침 방지 */
  position: sticky;
  top: 0;
  z-index: 5;
  box-shadow: inset 0 -1px 0 var(--border-default);
  white-space: nowrap;
  user-select: none;
  letter-spacing: 0.02em;
}
.issue-table th:first-child { padding-left: 16px; }
.issue-table td {
  padding: 0 10px;
  color: var(--text-primary);
  vertical-align: middle;
  background: var(--surface-base);   /* 흰 카드 행 */
  border-top: 1px solid var(--border-subtle, #ECECEE);
  border-bottom: 1px solid var(--border-subtle, #ECECEE);
  font-variant-numeric: tabular-nums;
}
/* 행 양끝 라운드 + 좌우 보더 → 카드처럼 */
.issue-table td:first-child {
  padding-left: 16px;
  border-left: 1px solid var(--border-subtle, #ECECEE);
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}
.issue-table td:last-child {
  border-right: 1px solid var(--border-subtle, #ECECEE);
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}
.issue-row { height: 54px; cursor: pointer; transition: box-shadow var(--dur-fast), transform var(--dur-fast); }
.issue-row:hover td { background: var(--surface-base); }
.issue-row:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.07); }
.issue-row:hover td:first-child { box-shadow: none; }
.issue-row.selected td { background: var(--explan-red-light); border-color: #F6C8CB; }
.issue-row.selected td:first-child { box-shadow: inset 3px 0 0 var(--explan-red); }

/* ═══ Quick Preview Panel ═══ */
.qp-panel {
  width: 360px;
  flex-shrink: 0;
  border-left: 1px solid var(--border-default);
  display: flex;
  flex-direction: column;
  background: var(--surface-base);
  transition: width var(--dur-std) var(--ease-out);
}
.qp-panel.collapsed { width: 0; overflow: hidden; border-left: none; }

/* ═══ Detail Panel (slide-in) ═══ */
.detail-panel-overlay {
  position: fixed;               /* 뷰포트 고정 — 페이지 스크롤에 딸려 올라가지 않도록(구: absolute) */
  inset: 0;
  z-index: 50;
  pointer-events: none;
}
.detail-panel-overlay.open { pointer-events: all; }
.detail-panel-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.2);
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease-std);
}
.detail-panel-overlay.open .detail-panel-backdrop { opacity: 1; }
.detail-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 1100px;
  max-width: 90%;
  background: var(--surface-base);
  box-shadow: var(--sh-panel);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--dur-slow) var(--ease-out);
}
/* (2026-08-01) 이슈 팝업·퀵프리뷰·대화 서랍 개별 8% 확대는 전역 기본 확대(display-prefs BASE
   1.08 — 전 화면 8% 상향 지시)에 흡수돼 제거됐다. 남기면 1.08×1.08 이중 확대가 된다. */
.detail-panel-overlay.open .detail-panel { transform: translateX(0); }

/* ═══ Modal ═══ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal {
  background: var(--surface-base);
  border-radius: var(--r-md);
  box-shadow: var(--sh-modal);
  display: flex;
  flex-direction: column;
}
.modal-hd {
  padding: 16px 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-hd h2 { font-size: var(--fs-h2); font-weight: 700; }
.modal-body { padding: 16px 20px; overflow-y: auto; }
.modal-ft { padding: 12px 20px 16px; border-top: 1px solid var(--border-default); display: flex; gap: 8px; justify-content: flex-end; }

/* ═══ ★팝업 «세로» 규격 — 화면보다 길어져도 버튼은 늘 누를 수 있다 (대표 #815 · 2026-08-20) ═══
   신고: 「작은 휴대폰에선 팝업도 스크롤 필요해 보여요」.
   실측(헤드리스 320×460 · 긴 삭제 확인문): 카드 높이 515px > 화면 460px 이라
     · 위(경고 아이콘·«삭제 확인» 제목)가 top:-28px 로 잘리고
     · «취소/삭제» 버튼 밑선이 468px — **화면(460) 밖이라 누를 수가 없었다**
   그런데 오버레이가 position:fixed 라 스크롤도 안 된다 → 확인도 취소도 못 하는 상태.
   가로(667×375)도 같다(top:-15px). 삭제 확인창이 이 모양이라 가장 위험했다.
   ☞ 규격: ①카드 높이를 뷰포트에 묶고 ②«본문만» 스크롤 ③머리말·버튼줄은 flex 0 0 auto 로 고정.
   ★100dvh 를 뒤에 적어 우선 적용하고 100vh 를 폴백으로 남긴다 — 모바일 주소창이 접혔다 펴져도
     vh 는 안 변해 버튼이 주소창 뒤로 숨는다. dvh 를 모르는 구형 웹뷰는 앞줄(vh)을 쓴다.
   ★overscroll-behavior:contain — 본문 끝까지 굴렸을 때 뒤 페이지가 따라 스크롤되지 않게.
   ★이 세 클래스가 «공용 한 벌»이다. 새 팝업을 만들 때 복붙하지 말고 이 클래스를 붙인다. */
.sys-modal-card {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
}
.sys-modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.sys-modal-fixed { flex: 0 0 auto; }

/* ═══ Spotlight (⌘K) ═══ */
.spotlight-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
}
.spotlight-box {
  width: 560px;
  background: var(--surface-base);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-modal);
  overflow: hidden;
}
.spotlight-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-default);
}
.spotlight-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  background: transparent;
  color: var(--text-primary);
}
.spotlight-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background var(--dur-fast);
}
.spotlight-result-item:hover,
.spotlight-result-item.focused { background: var(--surface-sub); }

/* ═══ Treatment Card — v3.1 헤더 대비 ↑ ═══ */
.treatment-card {
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-base);
}
.treatment-card-hd {
  padding: 11px 14px;
  background: var(--surface-sub);
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-default);
  font-weight: 700;
  color: var(--text-primary);
}
.treatment-card-body { padding: 12px 14px; }

/* ═══ Approval Progress ═══ */
.approval-steps {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
}
.approval-step {
  display: flex;
  align-items: center;
  gap: 0;
}
.approval-step-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.approval-step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border-default);
  background: var(--surface-base);
  position: relative;
}
.approval-step-circle.done  { background: #D1FAE5; border-color: var(--kpi-good); }
.approval-step-circle.curr  { background: var(--explan-red-light); border-color: var(--explan-red); }
.approval-step-circle.wait  { background: var(--surface-sub); border-color: var(--border-default); }
.approval-step-line {
  height: 2px;
  width: 32px;
  background: var(--border-default);
  flex-shrink: 0;
}
.approval-step-line.done { background: var(--kpi-good); }

/* ═══ Toasts ═══ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  /* ★모든 레이어 위에 둔다(2026-08-11 실측 사고) — 구 300 은 팝오버의 «바깥 클릭 닫기»
     레이어(zIndex 2900)·모달(9000~12000) 아래였다. 그래서 알림 팝오버를 열어 둔 채
     토스트의 «실행취소»를 누르면 클릭이 버튼이 아니라 그 배경 레이어에 맞아,
     팝오버만 닫히고 취소는 실행되지 않았다(알림 2건이 실제로 유실됐다).
     토스트는 액션 버튼을 갖는 순간 «보이는 것 = 누를 수 있는 것»이어야 한다. */
  z-index: 13000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--text-primary);
  color: #fff;
  border-radius: var(--r-sm);
  font-size: var(--fs-meta);
  box-shadow: var(--sh-drop);
  pointer-events: all;
  animation: toast-in 0.2s var(--ease-out);
}
@keyframes toast-in { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
@keyframes ex-spin { to { transform: rotate(360deg); } }
.spin { animation: ex-spin 0.8s linear infinite; }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 1.6s; } }

/* 로딩 스켈레톤(공용 Loading variant='skeleton') — shimmer */
.ex-skel {
  border-radius: var(--r-sm);
  background: linear-gradient(90deg, var(--surface-sunken) 25%, var(--surface-sub) 37%, var(--surface-sunken) 63%);
  background-size: 400% 100%;
  animation: ex-shimmer 1.2s ease-in-out infinite;
}
@keyframes ex-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .ex-skel { animation-duration: 2.4s; } }
/* 스크린리더 전용(시각적 숨김) */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ═══ Bulk action bar ═══ */
.bulk-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  height: 40px;
  background: #1A1A1A;
  color: #fff;
  flex-shrink: 0;
}
.bulk-bar .btn { color: #fff; background: rgba(255,255,255,0.12); }
.bulk-bar .btn:hover { background: rgba(255,255,255,0.2); }
.bulk-bar .btn:disabled { opacity: 0.3; }

/* ═══ KPI card — v3.1 여유 ↑ ═══ */
.kpi-card {
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);   /* was sm — 더 소프트 */
  padding: 16px 18px;           /* was 14 16 */
  background: var(--surface-card);
  cursor: pointer;
  transition: box-shadow var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast);
  display: flex;
  flex-direction: column;
  gap: 8px;                     /* was 6 */
  min-width: 0;
}
.kpi-card:hover { box-shadow: var(--sh-card-hover); border-color: var(--border-strong); }
.kpi-status-bar {
  height: 3px;
  border-radius: 2px;
  width: 100%;
  margin-top: 4px;
}

/* ═══ Role Select ═══ */
.role-select-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--surface-sub);
  padding: 40px 20px;
}
.role-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 760px;
  width: 100%;
}
.role-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 22px 16px;
  background: var(--surface-base);
  border: 1.5px solid var(--border-default);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--dur-std);
  text-align: center;
  box-shadow: var(--sh-card);
}
.role-card:hover { border-color: var(--explan-red); box-shadow: 0 4px 16px rgba(197,37,47,0.12); transform: translateY(-2px); }
.role-card-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--explan-red-light);
  display: flex; align-items: center; justify-content: center;
  color: var(--explan-red);
}
.role-card-name { font-size: var(--fs-h3); font-weight: 700; }
.role-card-desc {
  font-size: var(--fs-caption);   /* was tiny — 2단계 ↑ */
  color: var(--text-tertiary);
  line-height: 1.6;
  word-break: keep-all;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  max-width: 100%;
  min-height: 38px;               /* 2줄 공간 확보 */
}

/* ═══ Login (진입 화면) — premium ═══ */
.login-page {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
  background: var(--surface-base);
}
/* 좌 — 브랜드 패널 (딥 차콜 + 레드 글로우) */
.login-brand {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 100% 0%, #1c1d24 0%, #121317 55%, #0d0e11 100%);
}
.login-brand-glow {
  position: absolute;
  left: -16%; bottom: -24%;
  width: 62%; height: 68%;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand-primary, var(--explan-red)) 38%, transparent) 0%, transparent 70%);
  filter: blur(6px);
  pointer-events: none;
}
.login-brand-dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.055) 1.1px, transparent 1.1px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(155deg, #000 0%, transparent 70%);
          mask-image: linear-gradient(155deg, #000 0%, transparent 70%);
  pointer-events: none;
}
.login-brand-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 100vh;
  box-sizing: border-box;
  padding: 54px 60px;
  display: flex;
  flex-direction: column;
}
.login-logo-mark {
  width: 48px; height: 48px;
  border-radius: 13px;
  background: var(--brand-primary, var(--explan-red));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--brand-primary, var(--explan-red)) 40%, transparent), inset 0 1px 0 rgba(255,255,255,0.18);
}
.login-submit .login-logo-tag, .login-logo-tag {
  font-size: 12px; font-weight: 800; letter-spacing: 0.14em; color: #fff;
  background: color-mix(in srgb, var(--brand-primary, var(--explan-red)) 30%, transparent);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 3px 9px; border-radius: 6px;
}
.login-eyebrow {
  font-size: 11px; font-weight: 800; letter-spacing: 0.22em;
  color: rgba(255,255,255,0.42);
  margin-bottom: 18px;
}
.login-headline {
  font-size: 34px; font-weight: 800; color: #fff;
  line-height: 1.3; letter-spacing: -0.025em; margin: 0;
  word-break: keep-all;
}
.login-sub {
  margin: 18px 0 0; font-size: 14.5px; line-height: 1.7;
  color: rgba(255,255,255,0.6); max-width: 360px; word-break: keep-all;
}
.login-features {
  margin-top: 34px; display: flex; flex-direction: column; gap: 16px;
}
.login-feature { display: flex; align-items: center; gap: 13px; }
.login-feature > span:last-child { min-width: 0; }
.login-feature-ic {
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 10px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.10);
  display: flex; align-items: center; justify-content: center;
}
.login-feature-t { display: block; font-size: 13.5px; font-weight: 700; color: rgba(255,255,255,0.92); word-break: keep-all; }
.login-feature-d { display: block; font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 1px; word-break: keep-all; }
.login-copy { font-size: 11.5px; color: rgba(255,255,255,0.34); margin-top: 40px; }

/* 우 — 폼 영역 */
.login-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 28px;
  background: var(--surface-sub);
}
.login-card {
  width: 100%;
  max-width: 380px;
}
.login-card-logo { display: none; }
.login-label {
  display: block;
  font-size: var(--fs-tiny);
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 7px;
  letter-spacing: 0.01em;
}
/* 입력 필드 */
.login-field { position: relative; }
.login-field-ic {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--text-disabled); display: flex; pointer-events: none;
  transition: color var(--dur-fast);
}
.login-input {
  width: 100%; height: 48px; box-sizing: border-box;
  padding: 0 14px 0 40px;
  border: 1.5px solid var(--border-default);
  border-radius: var(--r-md);
  background: var(--surface-base);
  font-family: inherit; font-size: 14.5px; color: var(--text-primary);
  outline: none;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.login-input::placeholder { color: var(--text-disabled); }
.login-input:hover { border-color: var(--border-strong); }
.login-input:focus {
  border-color: var(--brand-primary, var(--explan-red));
  box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--brand-primary, var(--explan-red)) 14%, transparent);
}
.login-field:focus-within .login-field-ic { color: var(--brand-primary, var(--explan-red)); }
.login-eye {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  border: none; background: none; cursor: pointer; padding: 6px;
  color: var(--text-tertiary); display: flex; border-radius: 6px;
  transition: color var(--dur-fast), background var(--dur-fast);
}
.login-eye:hover { color: var(--text-secondary); background: var(--surface-sub); }
/* 옵션 행 */
.login-remember {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  font-size: var(--fs-caption); color: var(--text-secondary); white-space: nowrap;
}
.login-remember input { accent-color: var(--explan-red); width: 16px; height: 16px; cursor: pointer; }
.login-secure span { white-space: nowrap; }

/* 빠른 로그인 (개발·데모) */
.login-quick {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border-default);
}
.login-quick-hd {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px; margin-bottom: 11px;
}
.login-quick-hd > span:first-child {
  font-size: var(--fs-tiny); font-weight: 800; color: var(--text-secondary);
  letter-spacing: 0.02em; white-space: nowrap;
}
.login-quick-note { font-size: 10px; color: var(--text-disabled); white-space: nowrap; }
.login-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}
.login-quick-btn {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 9px 4px 8px;
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  background: var(--surface-base);
  cursor: pointer; font-family: inherit;
  transition: border-color var(--dur-fast), background var(--dur-fast), transform var(--dur-fast), box-shadow var(--dur-fast);
}
.login-quick-btn:hover {
  border-color: var(--border-strong);
  background: var(--surface-sub);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px -4px rgba(20,22,26,0.18);
}
.login-quick-btn:active { transform: translateY(0); }
.login-quick-tier {
  width: 22px; height: 22px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 11px;
  font-family: var(--kpi-num-font, inherit);
}
.login-quick-label {
  font-size: 10.5px; font-weight: 600; color: var(--text-secondary);
  white-space: nowrap;
}
/* 실계정 버튼 — 샘플과 눈으로 구분한다(아이디만 채우고 비밀번호는 직접 입력). */
.login-quick-real {
  font-size: 9px; font-weight: 700; letter-spacing: .02em;
  color: #B45309; background: rgba(180,83,9,.10);
  border-radius: 999px; padding: 1px 6px; margin-top: -1px;
}
@media (max-width: 460px) {
  .login-quick-grid { grid-template-columns: repeat(3, 1fr); }
}
/* ★아주 좁은 폰(320)에서 «페이지가 통째로 넓어지던» 원인 (대표 #803 · 2026-08-20).
   실측: 320 기기인데 레이아웃 뷰포트가 348 로 벌어졌다(=8% 축소). 범인은 이 그리드 하나 —
   .login-quick-label 이 white-space:nowrap 이라 3칸의 min-content 가 270px 로 굳는데,
   320 폰이 카드에 줄 수 있는 폭은 242px(폼 패딩 32 + 카드 패딩 44 + 테두리 2 를 뺀 값)뿐이다.
   ☞ 두 칸으로 내리면 칸당 117px 라 nowrap 라벨(85px)이 그대로 들어간다.
     nowrap 을 푸는 대신 칸 수를 줄인 이유: 375·414 에서 라벨이 두 줄로 접혀 «PC 는 그대로»가
     깨진다(그 폭에서는 지금도 한 줄로 딱 맞는다). */
@media (max-width: 360px) {
  .login-quick-grid { grid-template-columns: repeat(2, 1fr); }
}
/* 버튼 */
.login-submit {
  width: 100%; height: 50px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--brand-primary, var(--explan-red));
  color: var(--brand-on, #fff); border: none; border-radius: var(--r-md);
  font-size: 15px; font-weight: 700; cursor: pointer;
  font-family: inherit; letter-spacing: -0.01em; white-space: nowrap;
  box-shadow: 0 8px 20px -6px color-mix(in srgb, var(--brand-primary, var(--explan-red)) 50%, transparent);
  transition: background var(--dur-fast), transform var(--dur-fast), box-shadow var(--dur-fast);
}
.login-submit:hover { background: var(--brand-primary-dark, var(--explan-red-dark)); box-shadow: 0 10px 26px -6px color-mix(in srgb, var(--brand-primary, var(--explan-red)) 60%, transparent); }
.login-submit:active { transform: translateY(1px); box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--brand-primary, var(--explan-red)) 50%, transparent); }
/* 보안 안내 */
.login-secure {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin-top: 22px;
  font-size: var(--fs-tiny); color: var(--text-disabled);
}
/* 대시보드 카드 내 클릭 가능한 행/셀 개별 하이라이트 */
.dash-hit { margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 7px; transition: background var(--dur-fast); }
.dash-hit:hover { background: var(--surface-sub); }
.dash-cell { transition: outline var(--dur-fast); }
.dash-cell:hover { outline: 2px solid var(--brand-primary, var(--explan-red)); outline-offset: -2px; }
/* ═══ 분리된 채팅 창(.dm-popout) — 좁은 초기 폭(480px)에서 헤더가 깔끔하게 ═══
   제목이 두 줄로 꺾이고 «멤버 N명»이 줄바꿈되던 것을 정리(2026-08-13 사용자 지시).
   주 창(넓은 화면)은 건드리지 않는다 — 전부 .dm-popout 스코프. */
.dm-popout .dm-room-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* 제목을 감싼 flex 줄도 줄어들 수 있어야 ellipsis 가 걸린다(min-width:auto 기본값 해제) */
.dm-popout div:has(> .dm-room-title) { min-width: 0; }
/* 긴 방 이름 — 마우스를 대면 끝까지 흐른다(«…»로 잘려 확인할 길이 없던 것. title 툴팁과 병행).
   ★안쪽 span 을 움직인다 — 바깥이 overflow:hidden 이라 창이 아니라 «글자»가 이동해야 한다.
   ★hover 가 없는 터치 기기에는 애니메이션이 안 걸린다 — 그쪽은 title/탭 제목으로 확인한다. */
.dm-popout .dm-room-title-in { display: inline-block; will-change: transform; }
.dm-popout .dm-room-title:hover .dm-room-title-in { animation: dm-title-marquee 6s linear 0.4s infinite; }
@keyframes dm-title-marquee {
  0%, 12%   { transform: translateX(0); }
  88%, 100% { transform: translateX(calc(-100% + 180px)); }   /* 헤더 가시폭만큼 남기고 끝까지 */
}
/* ★가시폭을 «재서» 흐른다(2026-08-14) — 위 180px 은 제목이 아이콘과 한 줄을 나눠 쓰던 시절의
   폭이다. 제목이 한 줄을 다 쓰게 된 뒤로 그 값이면 글자가 왼쪽으로 지나쳐 오른쪽이 빈다.
   100cqw = 제목 칸의 실제 폭이라 창을 넓혀도 맞고, min(0px,…) 이라 짧은 이름은 아예 안 움직인다
   (구현은 짧은 이름에도 hover 하면 덜컥거렸다). 컨테이너 쿼리 미지원 브라우저는 위 규칙 그대로. */
@supports (container-type: inline-size) {
  .dm-popout .dm-room-title { container-type: inline-size; }
  @keyframes dm-title-marquee {
    0%, 12%   { transform: translateX(0); }
    88%, 100% { transform: translateX(min(0px, calc(100cqw - 100%))); }
  }
}
.dm-popout .dm-head-acts { gap: 3px !important; }
/* 좁은 폭에서 부가 기능은 접는다 — 이름 변경(연필)은 주 창에서 한다.
   ★!important — 버튼에 인라인 display:flex 가 있어 일반 규칙으로는 못 이긴다. */
.dm-popout [aria-label="이름 변경"] { display: none !important; }

/* ── 분리 창 헤더 = 2행: 제목이 첫 줄을 통째로 쓴다 (2026-08-14 사용자 지시) ──
   구현은 제목·멤버수·아이콘 7개가 480px 한 줄을 나눠 써서 방 이름이 «#SA-내부-공지테스…»로
   잘렸다. 제목에 한 줄을 다 주면 대부분의 방 이름이 잘리지 않고 끝까지 보인다.
   ★핵심은 display:contents — 제목을 감싼 두 겹(dm-head-title/titlerow)을 레이아웃에서
     «투명하게» 만들어, 안쪽 제목·배지·멤버수가 바깥 헤더 행의 직접 항목이 되게 한다.
     그래야 제목만 100% 폭을 갖고 나머지는 둘째 줄로 흐른다(주 창은 이 규칙이 없어 종전 그대로).
   ★높이는 CSS 가 정하고 JS 가 «잰다»(ChatArea 의 ResizeObserver) — 오버레이 패널 top 을
     숫자로 박으면 줄 수가 바뀔 때마다 어긋난다. 여기서 높이를 바꿔도 JS 를 고칠 필요가 없다. */
.dm-popout .dm-chat-head { height: auto !important; padding: 8px 16px !important; }
.dm-popout .dm-head-row { flex-wrap: wrap; row-gap: 6px; }
/* ★!important 필수 — dm-head-titlerow 에는 인라인 display:flex 가 있어 일반 규칙으로는 못 이긴다
   (위 «이름 변경» 버튼과 같은 함정. 안 붙이면 제목이 57px 로 쪼그라들고 줄바꿈도 안 된다 — 실측). */
.dm-popout .dm-head-title,
.dm-popout .dm-head-titlerow { display: contents !important; }
/* ★자식 결합자(>)를 쓰지 말 것 — display:contents 는 «레이아웃»에서만 투명해지고 DOM 은 그대로라
   .dm-head-row > .dm-room-title 은 영영 안 맞는다. 안 맞으면 제목이 flex 아이템으로서 폭 0 이
   돼 통째로 사라진다(실측: w=0). 아래처럼 후손 선택자로 잡는다. */
.dm-popout .dm-head-titlerow .dm-room-title { flex: 0 0 100%; }
/* 둘째 줄 — 왼쪽에 멤버 수·배지, 아이콘 묶음은 오른쪽 끝으로 */
.dm-popout .dm-head-acts { margin-left: auto; }

/* 메모 카드 삭제 버튼 — 평소엔 흐리게(내용을 가리지 않게), 카드에 올리면 드러나고 자신에 올리면 빨갛게.
   ★터치 기기에는 hover 가 없다 — opacity 0 으로 «숨기지» 않는다(그러면 폰에서 영영 못 지운다). */
.memo-del-btn { opacity: 0.35; transition: opacity var(--dur-fast), background var(--dur-fast); }
[class*="memo-card"]:hover .memo-del-btn, .memo-del-btn:focus-visible { opacity: 1; }
.memo-del-btn:hover { opacity: 1; background: rgba(0,0,0,0.07); }
.memo-del-btn:hover svg { stroke: var(--kpi-alert, #DC2626); }
/* 칸반 히스토리 화살표 — 3개 순차 흐름 */
@keyframes kanban-arrow-flow { 0%, 70%, 100% { opacity: .25; } 35% { opacity: 1; } }
.kanban-wf-arrow .kwa1, .kanban-wf-arrow .kwa2, .kanban-wf-arrow .kwa3, .kanban-wf-arrow .kwa4, .kanban-wf-arrow .kwa5 { display:inline-block; animation: kanban-arrow-flow 1.2s ease-in-out infinite; }
.kanban-wf-arrow .kwa2 { animation-delay: .15s; }
.kanban-wf-arrow .kwa3 { animation-delay: .3s; }
.kanban-wf-arrow .kwa4 { animation-delay: .45s; }
.kanban-wf-arrow .kwa5 { animation-delay: .6s; }
@media (prefers-reduced-motion: reduce) { .kanban-wf-arrow .kwa1, .kanban-wf-arrow .kwa2, .kanban-wf-arrow .kwa3, .kanban-wf-arrow .kwa4, .kanban-wf-arrow .kwa5 { animation: none; opacity: 1; } }
/* 미확인 알림 배지 — 맥동(pulse) 효과 */
@keyframes issue-alert-pulse { 0%,100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--explan-red) 55%, transparent); } 70% { box-shadow: 0 0 0 5px transparent; } }
.issue-alert-pulse { animation: issue-alert-pulse 1.4s ease-out infinite; }
@media (prefers-reduced-motion: reduce) { .issue-alert-pulse { animation: none; } }
/* 되돌아가기 칩 — 등장 + 화살표 슬라이드 */
@keyframes return-chip-in { 0% { opacity: 0; transform: translateY(-10px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes return-chip-arrow { 0%,100% { transform: translateX(0); } 50% { transform: translateX(-3px); } }
.return-chip-anim { animation: return-chip-in .28s ease-out; transition: transform .12s, box-shadow .12s; }
.return-chip-anim .return-chip-arrow { animation: return-chip-arrow 1.1s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .return-chip-anim, .return-chip-anim .return-chip-arrow { animation: none; } }
/* 홈 차트 동적 — 스파크라인 그리기·끝점 맥동·도넛 채우기 */
@keyframes spark-draw { from { stroke-dashoffset: 240; } to { stroke-dashoffset: 0; } }
.spark-line-draw { stroke-dasharray: 240; animation: spark-draw 2.4s ease-out forwards; }
@keyframes spark-dot { 0%,100% { r: 2.6; opacity: 1; } 50% { r: 3.6; opacity: .65; } }
.spark-dot-pulse { animation: spark-dot 1.6s ease-in-out infinite; }
@keyframes donut-fill { from { stroke-dashoffset: var(--donut-c); } to { stroke-dashoffset: var(--donut-off); } }
.donut-draw { animation: donut-fill 2.2s ease-out forwards; }
@media (prefers-reduced-motion: reduce) { .spark-line-draw, .spark-dot-pulse, .donut-draw { animation: none; stroke-dashoffset: var(--donut-off, 0); } }
/* 인사 헤더 감성 아이콘 — 부드러운 등장 + 은은한 부유 */
@keyframes greet-pop { 0% { transform: scale(.6) rotate(-12deg); opacity:0; } 100% { transform: scale(1) rotate(0); opacity:1; } }
@keyframes greet-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
.greet-icon { animation: greet-pop .4s ease-out, greet-float 3s ease-in-out infinite .4s; }
@media (prefers-reduced-motion: reduce) { .greet-icon { animation: none; } }
@keyframes login-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-7px); }
  40%, 80% { transform: translateX(7px); }
}
.login-shake { animation: login-shake 0.42s; }

/* 좁은 화면 — 브랜드 패널 숨기고 폼만 + 카드화
   ★모바일 폭 확장(2026-09-02 대표 지시 「좌우 여백 안 생기게 · 반응형」) — 380px 고정이
   폰(뷰포트 390~430px)에서 좌우 회색 띠를 만들었다. 좁은 화면에선 카드가 화면을 쓴다. */
@media (max-width: 860px) {
  .login-page { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-card-logo {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 26px; justify-content: center;
  }
  .login-card {
    background: var(--surface-base);
    border: 1px solid var(--border-default);
    border-radius: var(--r-lg, 16px);
    box-shadow: 0 16px 48px rgba(20,22,26,0.10);
    padding: 36px 30px;
    max-width: 560px;               /* 태블릿·큰 폰 — 380 고정 해제 */
  }
}
@media (max-width: 460px) {
  .login-form-wrap { padding: 14px 10px; }
  .login-card { padding: 26px 18px; max-width: 100%; }
}

/* ── 채팅 메시지 액션(리액션·답장·수정·삭제) ──────────────────────────────
   ★기본은 숨김, 그 메시지에 마우스를 올렸을 때만 보인다(2026-07-28 지시).
     상시 노출이면 메시지마다 아이콘 4개가 늘 떠 있어 대화 자체가 안 읽힌다.
   ★리액션 피커를 연 동안(.chat-actions-open)은 마우스가 벗어나도 유지한다 —
     안 그러면 피커를 고르러 가는 순간 액션이 사라져 클릭이 취소된다.
   ★터치 기기는 hover 가 없다 — coarse 포인터에서는 항상 보이게 둔다. */
.chat-actions { opacity: 0; transition: opacity .12s ease; }
.bubble-line:hover .chat-actions,
.chat-actions.chat-actions-open,
.chat-actions:focus-within { opacity: 1; }
@media (hover: none), (pointer: coarse) {
  .chat-actions { opacity: 1; }
}


/* To-Do 행 삭제 버튼 — 마우스를 올렸을 때만 보인다(평소 목록은 조용해야 한다) */
.dash-todo-row:hover .todo-del { opacity: 1 !important; }
.todo-del:hover { color: var(--kpi-alert, #BE123C) !important; }
/* ★터치 기기에는 hover 가 없다 — 항상 보인다(2026-08-06 신고).
   구: 버튼이 opacity:0 인 채로 «자리와 클릭»만 살아 있어, 모바일에서 안 보이는데 눌리면
   삭제가 되는 상태였다(보이지 않는 파괴 버튼). 위 .chat-actions 와 같은 처방. */
@media (hover: none), (pointer: coarse) {
  .dash-todo-row .todo-del { opacity: 1 !important; }
  [id^="todo-menu-"] { opacity: 1 !important; }   /* TodoWidget 행 «더보기»(삭제 포함) — 같은 결함 */
}

/* ── 할 일 행 «메타 ↔ 액션» 자리 교대 (v7 리디자인 · 2026-08-13) ─────────────────
   평소엔 태그·우선순위·날짜(메타)를 보여 주고, 마우스를 올리면 그 자리에 긴급·더보기(액션)가 뜬다.
   ★JS 의 onMouseEnter 상태로 하지 않고 CSS 로 두는 이유는 «터치» 때문이다 —
     터치 기기엔 hover 가 없어 상태가 영영 false 로 남고, 액션이 보이지도 눌리지도 않는다
     (위 .todo-del 이 2026-08-06 에 똑같이 당한 결함). 아래 coarse 분기에서 «둘 다» 보여 준다. */
.todo-row .todo-acts { opacity: 0; pointer-events: none; transition: opacity .12s; }
.todo-row .todo-meta { opacity: 1; transition: opacity .12s; }
.todo-row:hover .todo-acts,
.todo-row.is-menu-open .todo-acts { opacity: 1; pointer-events: auto; }
.todo-row:hover .todo-meta,
.todo-row.is-menu-open .todo-meta { opacity: 0; pointer-events: none; }
.todo-row:hover, .todo-row.is-menu-open { background: var(--surface-hover); }
@media (hover: none), (pointer: coarse) {
  /* 터치 — 겹쳐 놓지 않고 «나란히» 흐르게 둔다(absolute 해제). 둘 다 항상 보인다. */
  .todo-row .todo-meta { opacity: 1 !important; pointer-events: auto !important; }
  .todo-row .todo-acts { opacity: 1 !important; pointer-events: auto !important;
    position: static !important; transform: none !important; }
}

/* ── 시스템관리 보기 모드 잠금(SysEditGuard, 2026-08-01) ─────────────────
   ★잠그는 것은 '설정을 바꾸는 것'이지 '보는 것'이 아니다(2026-08-02 수정).
     구 규칙은 button/input/select 를 통째로 죽여 검색·필터·탭·목록 선택까지 막았고,
     보기 모드에서 화면이 통째로 먹통이라는 신고가 나왔다(로그인 사용자 화면: 검색 1 + 필터 버튼 9 사망).
     조회 전용 컨트롤은 `data-sys-view` 로 표시해 잠금에서 제외한다 — 표시는 SysEditGuard 규약. */
[data-sys-lock="1"] button:not([data-sys-view]),
[data-sys-lock="1"] input:not([data-sys-view]),
[data-sys-lock="1"] select:not([data-sys-view]),
[data-sys-lock="1"] textarea:not([data-sys-view]),
[data-sys-lock="1"] a:not([data-sys-view]),
[data-sys-lock="1"] [role="button"]:not([data-sys-view]),
[data-sys-lock="1"] [contenteditable]:not([data-sys-view]),
[data-sys-lock="1"] [draggable="true"]:not([data-sys-view]) {
  pointer-events: none !important;
}
/* 조회 전용 영역 — 검색·필터·목록 선택 등 '읽기'는 보기 모드에서도 살아 있어야 한다.
   컨테이너에 한 번만 표시하면 그 안의 컨트롤이 전부 풀린다. */
[data-sys-lock="1"] [data-sys-view],
[data-sys-lock="1"] [data-sys-view] button,
[data-sys-lock="1"] [data-sys-view] input,
[data-sys-lock="1"] [data-sys-view] select,
[data-sys-lock="1"] [data-sys-view] textarea,
[data-sys-lock="1"] [data-sys-view] a,
[data-sys-lock="1"] [data-sys-view] [role="button"] {
  pointer-events: auto !important;
}
/* ★모달 닫기는 절대 잠그지 않는다(2026-08-03 신고: 카탈로그 상세를 열면 닫을 수가 없었다).
   잠글 대상은 '설정을 바꾸는 것'이다 — 닫기·취소는 아무것도 바꾸지 않는데, 잠기면 사용자가
   모달에 갇힌다(배경 클릭을 모르면 새로고침밖에 없다). 닫기·취소 컨트롤은 data-sys-close 로 표시한다. */
/*   ★선택자 구체성 주의 — 잠금 규칙이 `[data-sys-lock] button:not([data-sys-view])` 라
     `[data-sys-lock] [data-sys-close]` 만으로는 진다(같은 !important, 잠금 쪽이 더 구체적).
     그래서 요소 이름까지 붙여 확실히 이긴다. */
[data-sys-lock="1"] button[data-sys-close]:not([data-sys-view]),
[data-sys-lock="1"] a[data-sys-close]:not([data-sys-view]),
[data-sys-lock="1"] [role="button"][data-sys-close]:not([data-sys-view]),
[data-sys-lock="1"] [data-sys-close] button:not([data-sys-view]),
[data-sys-lock="1"] [data-sys-close] [role="button"]:not([data-sys-view]) {
  pointer-events: auto !important;
}
/* 검색창 자동 예외 — 표시자를 붙이는 걸 잊어도 검색은 살아 있게 한다.
   검색 입력은 화면 상태만 바꾸고 설정을 저장하지 않으므로 잠글 이유가 없다.
   (전수 점검 2026-08-02: 화면마다 자체 구현한 검색창이 6곳 더 있었다 — 하나씩 붙이면 반드시 빠진다) */
[data-sys-lock="1"] input[type="search"],
[data-sys-lock="1"] input[placeholder*="검색"] {
  pointer-events: auto !important;
}

/* ── 본문 HTML 표시(BodyHtml) — 이슈 내용·처리 내용 ─────────────────────────
   ★전역에 둔다: 예전엔 RichBodyEditor 안의 <style> 에만 있어서, 에디터가 없는
     읽기 전용 화면(모바일 퀵뷰·이슈 카드)에서는 규칙이 통째로 빠졌다. */
.body-html { white-space: pre-wrap; word-break: keep-all; overflow-wrap: break-word; }
.body-html .mention-tag { background: #EEF2FF; color: #4338CA; border-radius: 4px; padding: 0 4px; font-weight: 600; }
.body-html img.body-img {
  max-width: 100%; max-height: 320px; border-radius: var(--r-sm);
  border: 1px solid var(--border-default); display: inline-block; margin: 4px 0; cursor: zoom-in;
}
/* 레거시 본문의 표 — 원본 style 은 새니타이즈에서 제거되므로 여기서 최소 서식을 준다.
   넓은 표는 잘라내지 않고 «가로 스크롤» 시킨다(모바일에서 페이지가 밀리지 않게). */
.body-html table {
  border-collapse: collapse; margin: 6px 0; max-width: 100%;
  font-size: 0.95em; white-space: normal;
}
.body-html th, .body-html td {
  border: 1px solid var(--border-default); padding: 5px 8px; text-align: left; vertical-align: top;
}
.body-html th { background: var(--surface-sunken, #F1F5F9); font-weight: 700; }
/* 본문 목록 — base.css 의 리셋(ul,ol{list-style:none})을 여기서만 되돌린다.
   되돌리지 않으면 글머리 기호·번호가 통째로 사라져 «그냥 들여쓴 문단»으로 보인다. */
.body-html ul, .body-html ol { padding-left: 22px; margin: 4px 0; white-space: normal; }
.body-html ul { list-style: disc; }
.body-html ol { list-style: decimal; }
.body-html li { margin: 2px 0; }
.body-html .body-table-wrap { max-width: 100%; overflow-x: auto; }
/* 본문 링크 — 자동 링크(평문 URL)와 레거시 <a href> 모두 이 규칙을 탄다. 새 창으로 열린다. */
.body-html a { color: var(--kpi-info, #2563EB); text-decoration: underline; word-break: break-all; }
.body-html a:hover { opacity: .8; }

/* ── 평문 속 자동 링크(window.exLinkText / EX_LINKIFY.render) ─────────────────
   대화 말풍선·댓글·메모·결재 의견·AI 답변처럼 «평문을 그대로 찍던» 자리에서 쓴다(대표 #528).
   ★긴 URL 이 말풍선·카드를 밀어 레이아웃을 깨지 않게 여기서 줄바꿈을 보장한다 —
     부모가 white-space:pre-wrap 이어도 URL 은 공백이 없어 한 줄로 뻗는다. */
.ex-link {
  color: var(--kpi-info, #2563EB); text-decoration: underline;
  overflow-wrap: anywhere; word-break: break-all;
}
.ex-link:hover { opacity: .8; }
/* 배경색이 있는 자리(말풍선 등) — 파란 링크색은 진한 배경에서 읽히지 않는다.
   글자색을 물려받고 밑줄·굵기로 «링크»를 알린다. */
.ex-link--inherit { color: inherit; font-weight: 600; text-decoration: underline; }

/* ═══ 이력의 «이동» 화살표 (2026-08-08 지시 — 우측으로 가는 동적인 느낌) ═══ */
/*   사람 → 사람(전달·배정)처럼 «옮겨 갔다»를 말하는 자리에 쓴다. 정지한 → 는 그냥 기호로 읽힌다.
     살짝 오른쪽으로 밀었다 돌아오게 해 방향이 먼저 눈에 들어오게 한다.
     ★폭·자리는 그대로다(transform 만 움직인다) — 글자가 밀리면 읽기가 더 나빠진다. */
.ex-hist-arrow {
  display: inline-block;
  animation: exHistArrow 1.5s ease-in-out infinite;
  will-change: transform;
}
@keyframes exHistArrow {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(3px); }
}
/* 움직임을 줄여 달라는 설정을 존중한다 — 이 표시는 장식이지 정보가 아니다. */
@media (prefers-reduced-motion: reduce) {
  .ex-hist-arrow { animation: none; }
}

/* ── iOS 입력창 자동 확대 방지 (D20 · 2026-08-18 · T7) ──────────────────────────
   iOS Safari 는 **입력 요소의 폰트가 16px 미만이면** 포커스 시 페이지를 확대하고
   되돌리지 않는다. 모바일 셸은 그 조건에 정면으로 걸려 있었다(정적 실측):
     · .input 기본이 --fs-body=15px 로 이미 16px 미만
     · 모바일 화면들이 인라인으로 12.5~13px 을 21곳 더 지정
     · base.css 의 `input,textarea,select{font-size:inherit}` 라 16px 로 올리는 규칙이 없음
     · viewport 에 maximum-scale·user-scalable 없음(접근성상 옳다 — 그래서 확대가 실제로 난다)
   ☞ 결과: 검색창·입력칸을 탭할 때마다 화면이 확대된다.

   ★«입력 요소만» 16px 로 올린다 — 표시 텍스트·타이포는 건드리지 않는다.
   ★!important 인 이유: 화면들이 인라인 style 로 12.5~13px 을 주므로 그것을 이겨야 한다.
   ★.chat-editor(contenteditable) 도 넣는다 — 대화·이슈채팅 입력창이고 --fs-caption(13.8px)
     이라 같은 조건에 걸린다. contenteditable 도 iOS 확대 대상이다.
   ★범위는 모바일 셸(.m-app-frame) 안으로 한정 — 데스크톱 콘솔의 조밀한 폼은 그대로 둔다.
     실기기와 «모바일 미리보기»가 같은 프레임을 쓰므로 미리보기도 실기기와 같게 보인다.
   ※ /sv/ · /owner/ 스탠드얼론 앱은 이 규칙 밖 — app-shell.css 에 같은 모양의 규칙이 따로 있다(D52 · .oa-frame·.sv-frame). */
.m-app-frame input,
.m-app-frame select,
.m-app-frame textarea,
.m-app-frame .chat-editor { font-size: 16px !important; }
