/* ═══ 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: #DC2626; }
.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; }

/* ═══ 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;
  z-index: 300;
  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-forgot {
  border: none; background: none; cursor: pointer;
  font-size: var(--fs-caption); color: var(--text-tertiary);
  white-space: nowrap; flex-shrink: 0;
  transition: color var(--dur-fast);
}
.login-forgot:hover { color: var(--explan-red); }
.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); }
}
/* 버튼 */
.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; }
/* 칸반 히스토리 화살표 — 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; }

/* 좁은 화면 — 브랜드 패널 숨기고 폼만 + 카드화 */
@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;
  }
}
@media (max-width: 460px) {
  .login-form-wrap { padding: 24px 16px; }
  .login-card { padding: 30px 22px; }
}

/* ── 채팅 메시지 액션(리액션·답장·수정·삭제) ──────────────────────────────
   ★기본은 숨김, 그 메시지에 마우스를 올렸을 때만 보인다(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, #DC2626) !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;
}
