/* ============================================================
   솔 인증 관리자 — TReport 인증 관리자 디자인 시스템 이식판
   계층: 1.토큰 → 2.베이스 → 3.셸(사이드바/워크스페이스) → 4.컴포넌트
        → 5.뷰 → 6.다이얼로그·토스트 → 7.반응형
   규칙: 컴포넌트 CSS에는 원시 색상/픽셀 간격을 직접 쓰지 않는다(토큰 참조).
   ============================================================ */

/* ---------- 1. 디자인 토큰 (TReport auth-admin.css와 동일 팔레트) ---------- */
:root {
  color-scheme: light;

  /* 표면/배경 */
  --bg: #eef2f7;
  --surface: #ffffff;
  --surface-muted: #f6f9fc;
  --surface-raised: #ffffff;
  --line: #dde5ee;
  --line-strong: #c5d1e0;

  /* 텍스트 */
  --text: #101c2e;
  --text-muted: #5c6b81;
  --text-faint: #8b97aa;

  /* 액센트 (스카이 블루) */
  --accent: #0284c7;
  --accent-strong: #075f8e;
  --accent-soft: #e3f3fd;
  --accent-ring: rgba(2, 132, 199, 0.22);

  /* 의미 색 */
  --success: #067647;
  --success-soft: #e8f8f0;
  --danger: #b42318;
  --danger-soft: #feefed;
  --danger-line: #f4b6ae;
  --warning: #99540a;
  --warning-soft: #fef4e0;
  --info: #175cd3;
  --info-soft: #eaf1fd;

  /* 사이드바 (라이트에서도 다크 톤) */
  --sidebar-bg: #0d1526;
  --sidebar-line: rgba(255, 255, 255, 0.10);
  --sidebar-text: #cdd7e4;
  --sidebar-text-strong: #ffffff;
  --sidebar-hover: rgba(255, 255, 255, 0.07);
  --sidebar-active: rgba(56, 189, 248, 0.16);

  /* 간격 (4px 스케일) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;

  /* 타이포 */
  --font: "Segoe UI", "Malgun Gothic", "맑은 고딕", system-ui, sans-serif;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-md: 14px;
  --fs-lg: 16px;
  --fs-xl: 20px;
  --fw-medium: 600;
  --fw-bold: 700;

  /* 형태 */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 999px;
  --control-h: 38px;
  --control-h-sm: 32px;
  --shadow-sm: 0 1px 3px rgba(16, 28, 46, 0.07);
  --shadow-md: 0 10px 30px rgba(16, 28, 46, 0.10);
  --shadow-lg: 0 24px 60px rgba(16, 28, 46, 0.22);
}

[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0b1220;
  --surface: #141e32;
  --surface-muted: #1a2540;
  --surface-raised: #18233b;
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(148, 163, 184, 0.34);

  --text: #ecf2fa;
  --text-muted: #9aa8bd;
  --text-faint: #6e7c92;

  --accent: #38bdf8;
  --accent-strong: #7dd3fc;
  --accent-soft: rgba(56, 189, 248, 0.14);
  --accent-ring: rgba(56, 189, 248, 0.30);

  --success: #34d399;
  --success-soft: rgba(16, 185, 129, 0.15);
  --danger: #f87171;
  --danger-soft: rgba(239, 68, 68, 0.16);
  --danger-line: rgba(239, 68, 68, 0.40);
  --warning: #fbbf24;
  --warning-soft: rgba(245, 158, 11, 0.15);
  --info: #93b4f5;
  --info-soft: rgba(59, 130, 246, 0.16);

  --sidebar-bg: #080e1b;
  --sidebar-line: rgba(255, 255, 255, 0.08);
  --sidebar-text: #aebacb;
  --sidebar-text-strong: #ffffff;
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-active: rgba(56, 189, 248, 0.18);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
}

/* ---------- 2. 베이스 ---------- */
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: var(--radius-full);
  background: var(--line-strong);
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); background-clip: padding-box; }

.eyebrow {
  margin: 0;
  color: var(--text-faint);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  letter-spacing: 0.4px;
}

/* ---------- 3. 앱 셸 ---------- */
.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-4);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
}
.sidebar-spacer { flex: 1; }

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-1) var(--sp-2);
}
.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  color: #ffffff;
  font-size: 20px;
  font-weight: var(--fw-bold);
}
.brand strong {
  display: block;
  color: var(--sidebar-text-strong);
  font-size: var(--fs-lg);
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.brand small {
  display: block;
  color: var(--sidebar-text);
  font-size: var(--fs-xs);
  white-space: nowrap;
}
.theme-toggle { flex-shrink: 0; }
.sidebar .icon-button {
  border-color: var(--sidebar-line);
  background: transparent;
  color: var(--sidebar-text);
}
.sidebar .icon-button:hover { color: var(--sidebar-text-strong); border-color: var(--sidebar-text); }

.nav-list { display: grid; gap: var(--sp-1); }
.nav-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: var(--control-h);
  padding: 0 var(--sp-3);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--sidebar-text);
  font-weight: var(--fw-medium);
  font-size: var(--fs-md);
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-item:hover { background: var(--sidebar-hover); color: var(--sidebar-text-strong); }
.nav-item.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text-strong);
  box-shadow: inset 3px 0 0 var(--accent);
  font-weight: var(--fw-bold);
}
.nav-item-flex { justify-content: space-between; }

.menu-pending-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 var(--sp-2);
  border-radius: var(--radius-full);
  background: #e11d48;
  color: #ffffff;
  font-size: 11px;
  font-weight: var(--fw-bold);
  line-height: 1;
}

.health-panel {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--sidebar-line);
  border-radius: var(--radius-md);
  background: var(--sidebar-hover);
  font-size: var(--fs-sm);
}
.health-panel strong { color: var(--sidebar-text-strong); font-weight: var(--fw-medium); }
.health-panel small { display: block; margin-top: 2px; color: var(--sidebar-text); font-size: var(--fs-xs); }
.status-dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: #f59e0b;
}
.health-panel.is-ok .status-dot {
  background: #22c55e;
  animation: statusPulse 2s infinite;
}
.health-panel.is-error .status-dot { background: #ef4444; }
@keyframes statusPulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
  70%  { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.workspace {
  min-width: 0;
  padding: var(--sp-4) var(--sp-6) var(--sp-6);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.topbar h1 { margin: 0; font-size: var(--fs-xl); letter-spacing: -0.2px; }
.topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px;
  color: var(--text);
}
.account-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #ffffff;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
}
.account-meta { display: flex; flex-direction: column; line-height: 1.25; text-align: left; }
.account-meta strong { font-size: var(--fs-sm); }
.account-meta small { color: var(--text-muted); font-size: var(--fs-xs); }

/* 계정 칩을 클릭 가능한 버튼으로 (비밀번호 변경 진입점) */
.account-chip-button {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.account-chip-button:hover { border-color: var(--accent); background: var(--surface-muted); }

/* 비밀번호 변경 폼 */
.pw-form { display: grid; gap: var(--sp-3); margin-top: var(--sp-3); }
.pw-form label { display: grid; gap: var(--sp-1); font-size: var(--fs-sm); color: var(--text-muted); }
.pw-form input {
  width: 100%;
  height: var(--control-h);
  padding: 0 var(--sp-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
}
.pw-form input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pw-note { margin: 0; color: var(--text-faint); font-size: var(--fs-xs); }

/* 구인증 발급 결과(#scert-result) — <form class="pw-form"> 밖이라 위 .pw-form
   그리드를 못 받아 등록번호 textarea 가 쪼그라들었다(스크린샷 실측). 폼 안
   요청번호(#scert-block)와 같은 전폭 레이아웃이 되도록 동일 규칙을 부여한다. */
#scert-result { display: grid; gap: var(--sp-3); margin-top: var(--sp-3); }
#scert-result label { display: grid; gap: var(--sp-1); font-size: var(--fs-sm); color: var(--text-muted); }
#scert-result textarea { width: 100%; }

/* 구인증 세대 배지 — 수동등록 자동 분기 결과(.status-badge 재사용, 위치만 잡는다) */
.scert-gen-badge {
  justify-self: start;
  align-self: flex-start;
  margin: 0 0 var(--sp-2);
  background: var(--info-soft);
  color: var(--info);
}

/* 수동등록 에러 영역 안 [구인증 발급기로 열기] 버튼 — 안내문 옆 인라인 소형 */
.error-msg .scert-hint-btn {
  min-height: 26px;
  margin-left: var(--sp-2);
  padding: 0 var(--sp-3);
  font-size: var(--fs-xs);
  vertical-align: middle;
}

/* ---------- 4. 공통 컴포넌트 ---------- */

/* 버튼 */
.primary-button, .secondary-button, .danger-button, .icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-h);
  padding: 0 var(--sp-4);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: var(--fw-medium);
  font-size: var(--fs-md);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.primary-button { background: var(--accent); color: #ffffff; }
[data-theme="dark"] .primary-button { color: #082236; font-weight: var(--fw-bold); }
.primary-button:hover { background: var(--accent-strong); }
.secondary-button, .icon-button {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--text);
}
.secondary-button:hover, .icon-button:hover { border-color: var(--accent); color: var(--accent); }
.danger-button {
  border-color: var(--danger-line);
  background: var(--danger-soft);
  color: var(--danger);
}
.danger-button:hover { border-color: var(--danger); }
.icon-button { width: var(--control-h); padding: 0; font-size: 16px; }
button:disabled { cursor: not-allowed; opacity: 0.45; }
.btn-mini {
  min-height: var(--control-h-sm);
  padding: 0 var(--sp-3);
  font-size: var(--fs-sm);
}

/* 입력 */
input, select {
  min-height: var(--control-h-sm);
  padding: 0 var(--sp-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-md);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
input::placeholder { color: var(--text-faint); }

/* 상태 배지 */
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 var(--sp-3);
  border-radius: var(--radius-full);
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  white-space: nowrap;
}
.status-badge.pending  { background: var(--warning-soft); color: var(--warning); }
.status-badge.approved { background: var(--info-soft);    color: var(--info); }
.status-badge.rejected { background: var(--danger-soft);  color: var(--danger); }
.status-badge.sent     { background: var(--success-soft); color: var(--success); }
.status-badge.queued   { background: var(--warning-soft); color: var(--warning); }
.status-badge.failed   { background: var(--danger-soft);  color: var(--danger); }

/* 패널 */
.panel {
  min-width: 0;
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.panel h2 { margin: 0; font-size: var(--fs-lg); }
.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
}
.panel-header p { margin: var(--sp-1) 0 0; color: var(--text-muted); font-size: var(--fs-sm); }
.panel-header-actions { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }

.empty-state {
  display: grid;
  place-items: center;
  min-height: 140px;
  padding: var(--sp-4);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  text-align: center;
}
.empty-state strong {
  display: block;
  margin-bottom: var(--sp-2);
  color: var(--text);
  font-size: var(--fs-lg);
}

/* 테이블 */
.table-wrap {
  width: 100%;
  margin-top: var(--sp-3);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  max-height: calc(100vh - 320px);
}
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td {
  padding: var(--sp-2) var(--sp-2);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
  font-size: var(--fs-sm);
}
.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
}
.data-table tbody tr { cursor: pointer; transition: background 0.12s ease; }
.data-table tbody tr:hover { background: var(--surface-muted); }
/* 선택된 행(회원 그리드 다중선택) — accent-soft 배경 + 좌측 accent 막대. */
.data-table tbody tr.is-selected {
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}
.data-table tbody tr.is-selected:hover { background: var(--accent-soft); }
/* 회원 그리드 tbody 는 Shift 다중선택 시 텍스트 드래그 선택을 막는다. */
#cust-rows { user-select: none; }
/* 헤더 클릭 정렬 (공통 그리드 엔진·미니 그리드 — th.sortable + ▲/▼ 표시) */
.data-table th.sortable { cursor: pointer; user-select: none; }
.data-table th.sortable:hover { color: var(--accent); }
.sort-mark { margin-left: 4px; font-size: 10px; color: var(--accent); }
.mono { font-family: Consolas, "D2Coding", monospace; font-size: var(--fs-xs); }

/* ---------- 5. 뷰 ---------- */

/* 대시보드 통계 카드 */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}
.stat-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-1);
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-align: left;
}
.stat-label { font-size: var(--fs-sm); color: var(--text-muted); font-weight: var(--fw-medium); }
.stat-value { font-size: 26px; font-weight: var(--fw-bold); color: var(--text); line-height: 1.1; }
.stat-value.warn { color: var(--warning); }
.stat-value.ok   { color: var(--success); }
.stat-value.bad  { color: var(--danger); }
.stat-sub { font-size: var(--fs-xs); color: var(--text-faint); }
.stat-go { color: var(--accent); font-weight: var(--fw-medium); }
.stat-clickable {
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .05s ease;
}
.stat-clickable:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.stat-clickable:active { transform: translateY(1px); }
.stat-card.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }

/* ---------- 6. 다이얼로그·토스트 ---------- */

/* 로그인 (중앙 카드) */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-5);
  background:
    radial-gradient(1000px 500px at 15% -10%, var(--accent-soft), transparent 60%),
    var(--bg);
}
.login-card {
  display: grid;
  gap: var(--sp-4);
  width: min(420px, calc(100vw - 32px));
  padding: var(--sp-6);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  box-shadow: var(--shadow-lg);
}
.login-card h1 { margin: 0; font-size: var(--fs-xl); }
.login-sub { margin: calc(var(--sp-2) * -1) 0 0; color: var(--text-muted); font-size: var(--fs-sm); }
.login-card label {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
}
.login-card input { width: 100%; min-height: var(--control-h); }
.login-submit { width: 100%; }

/* 상세 모달 */
.modal-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  background: rgba(8, 14, 27, 0.55);
  backdrop-filter: blur(3px);
  z-index: 1000;
}
.modal {
  width: min(560px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--surface-raised);
  box-shadow: var(--shadow-lg);
  /* 사용자가 모달 크기를 조절할 수 있게 한다(우하단 그리퍼). 초기 크기는 위
     width/max-height 가 정하고, 드래그로 min~max 범위에서 늘리고 줄인다.
     max-* 를 뷰포트 상한으로 둬 화면 밖으로는 못 키운다. min-* 로 너무
     작아져 내용이 깨지는 것도 막는다. */
  resize: both;
  min-width: min(320px, 100%);
  min-height: 160px;
  max-width: calc(100vw - 2 * var(--sp-4));
}
.detail-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.detail-title h2 { margin: 0; font-size: var(--fs-lg); }
.detail-grid {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: var(--sp-2) var(--sp-3);
  margin: 0;
}
.detail-grid dt { color: var(--text-muted); font-size: var(--fs-sm); }
.detail-grid dd { margin: 0; word-break: break-all; font-size: var(--fs-sm); }
.soft-rule { border: 0; border-top: 1px solid var(--line); margin: var(--sp-4) 0; }
/* ── 요청 상세 모달 전용(.req-modal 스코프 — 다른 모달 영향 없음) ── */
/* 회원 상세(.cust-modal)와 동일 방식의 폭 확대: .modal 기본 width:min(560px,100%) 를
   오버라이드해 940px 확보(좁은 화면 대비 94vw 상한) — 회원 인증 현황 표(5컬럼)가
   가로 스크롤 없이 한 줄에 들어간다. */
/* 초기 폭 940px, 리사이즈 상한은 .modal 의 뷰포트 상한을 따른다(max-width 를
   940 로 고정하면 그리퍼로 더 못 키운다). */
.req-modal { width: min(940px, 94vw); }
/* 요청 메타 그리드: 회원 상세와 같은 반응형 2열(라벨+값) — 라벨 90px 은 최장 라벨
   "디스크시리얼" 기준. 560px 이하에서는 1열 복귀. */
.req-modal .detail-grid {
  grid-template-columns: 90px minmax(0, 1fr) 90px minmax(0, 1fr);
  gap: var(--sp-3) var(--sp-4);
}
.req-modal .detail-grid dt { align-self: center; }
.req-modal .detail-grid dd { word-break: break-word; }
/* 긴 안내 행(회원 매칭·차단 사유·요청기·거절사유): 반 칸에 구겨지지 않게 줄 전체 사용.
   dt 도 1열로 고정해야 dt/dd 가 같은 줄에 남는다(자동 배치 어긋남 방지). */
.req-modal .detail-grid dt.dg-wide { grid-column: 1; }
.req-modal .detail-grid dd.dg-wide { grid-column: 2 / -1; }
@media (max-width: 560px) {
  .req-modal .detail-grid { grid-template-columns: 90px minmax(0, 1fr); }
}
/* 헤더의 제품명 — 이름 옆 보조 표기 (헤더 카드·나머지 클래스는 회원 상세 .cust-head* 재사용) */
.req-head-prog { color: var(--text-muted); font-size: var(--fs-md); font-weight: var(--fw-medium); }
/* 회원 인증 현황 표: 폭 확대로 평시엔 안 뜨지만, 극단 축소 시 셀 짤림 대신 가로 스크롤 */
.req-modal .cust-lic-wrap { overflow-x: auto; }
.req-modal .cust-lic-wrap th,
.req-modal .cust-lic-wrap td { white-space: nowrap; }
.req-modal .decide-hint {
  margin: calc(-1 * var(--sp-1)) 0 var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--text-faint);
}
/* 승인·거절 컨트롤 줄: 입력·버튼을 공통 높이(--control-h)로 한 줄 정렬(wrap 허용) */
.req-decide-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}
.req-decide-line input { height: var(--control-h); }
.req-decide-line .preset-row { margin-bottom: 0; }
.req-decide-line .req-days-input { width: 84px; }
.req-decide-line .req-expiry-input { width: 130px; }
.req-decide-line .req-reason-input { flex: 1; min-width: 200px; }
.req-decide-line .approve-button,
.req-decide-line .danger-button { margin-left: auto; white-space: nowrap; }
.approve-button { background: var(--success); }
.approve-button:hover { background: #045c37; }
[data-theme="dark"] .approve-button { color: #04281a; }
/* 알림 체크 줄: 체크박스·텍스트 수직 중앙 정렬(전역 input min-height 32px 무력화) */
.req-modal .check-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin: 0 0 var(--sp-1);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  line-height: 1.4;
  cursor: pointer;
}
.req-modal .check-row input[type="checkbox"] {
  width: 15px;
  height: 15px;
  min-height: 0;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--accent);
}
.hint-inline { font-weight: 400; font-size: var(--fs-xs); color: var(--text-faint); }

/* ---------- 메일 알림 설정 모달 ---------- */
.settings-modal {
  width: min(460px, calc(100vw - 2 * var(--sp-4)));
  padding: 0;
  overflow: hidden;
}

/* 헤더: 아이콘 + 제목 + 부제 */
.settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-5) var(--sp-5) var(--sp-4);
  border-bottom: 1px solid var(--line);
}
.settings-head-text { display: flex; align-items: center; gap: var(--sp-3); }
.settings-head-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: var(--fs-lg);
}
.settings-head h2 { margin: 0; font-size: var(--fs-lg); line-height: 1.2; }
.settings-subtitle {
  margin: 2px 0 0;
  font-size: var(--fs-xs);
  color: var(--text-faint);
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  padding: var(--sp-5);
}

/* 섹션 그룹핑 — 관련 항목(알림 / 화면 / 관리자 도구)을 카드로 묶어 시각적 구획.
   작은 대문자성 라벨로 계층을 주고, 은은한 배경·테두리로 카드감. */
.settings-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  padding: var(--sp-3) var(--sp-3) var(--sp-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-muted);
}
.settings-section-label {
  margin: 0 0 var(--sp-1);
  padding: 0 var(--sp-2);
  font-size: 11px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* 이메일 필드 */
.settings-field { display: grid; gap: var(--sp-2); }
.settings-field > label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--text);
}
.input-with-icon { position: relative; display: flex; align-items: center; }
.input-lead-icon {
  position: absolute;
  left: var(--sp-3);
  color: var(--text-faint);
  font-size: var(--fs-md);
  pointer-events: none;
}
.input-with-icon input {
  width: 100%;
  height: var(--control-h);
  padding: 0 var(--sp-3) 0 calc(var(--sp-3) + 20px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-md);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.input-with-icon input::placeholder { color: var(--text-faint); }
.input-with-icon input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.settings-hint { margin: 0; font-size: var(--fs-xs); color: var(--text-faint); }

/* 구분선 — 은은하게(투명 → 라인색 → 투명 그라디언트). settings-modal 외 재사용처
   보존을 위해 기본 규칙은 유지하되, 그룹 카드 도입 후 설정 모달에선 거의 안 쓰인다. */
.settings-divider {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
  margin: calc(var(--sp-1) * -1) 0;
}

/* 토글 행: 텍스트 왼쪽, 스위치 오른쪽. hover 시 미묘한 배경으로 대화감. */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .12s ease;
}
.toggle-row:hover { background: var(--surface); }
[data-theme="dark"] .toggle-row:hover { background: rgba(255, 255, 255, 0.04); }
.toggle-text { display: grid; gap: 2px; }
.toggle-title { font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--text); }
.toggle-desc { font-size: var(--fs-xs); color: var(--text-faint); line-height: 1.4; }

/* 스위치 (체크박스 → iOS풍 토글) */
.switch { position: relative; flex-shrink: 0; width: 44px; height: 26px; }
.switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}
.switch-track {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-full);
  background: var(--line-strong);
  transition: background .16s ease;
}
.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease;
}
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-track {
  box-shadow: 0 0 0 3px var(--accent-ring);
}

/* 하단 액션 */
.settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-2);
  margin-top: var(--sp-1);
}
.settings-actions .primary-button,
.settings-actions .secondary-button { min-width: 84px; }
.settings-form .error-msg { margin: 0; }

/* 설정 모달의 관리자 도구 진입 행(그룹 관리·연락처 이관) — 토글 행 레이아웃에
   카드 어포던스를 더한다: 테두리 + hover 시 액센트 테두리·표면 상승·화살표 이동. */
.settings-entry {
  border: 1px solid var(--line);
  background: var(--surface);
  transition: background .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.settings-entry:hover {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}
.settings-entry:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
#set-pii-open { cursor: pointer; }
.pii-open-arrow {
  flex-shrink: 0;
  color: var(--text-faint);
  font-size: var(--fs-md);
  transition: transform .12s ease, color .12s ease;
}
.settings-entry:hover .pii-open-arrow { color: var(--accent); transform: translateX(3px); }

/* ---------- 연락처(PII) 이관 모달 ---------- */
.pii-modal { width: min(560px, calc(100vw - 2 * var(--sp-4))); }
.pii-intro { margin-top: var(--sp-1); }
.pii-modal .pw-form input[type="file"] {
  padding: var(--sp-2);
  cursor: pointer;
  color: var(--text-muted);
}
.pii-summary { margin: var(--sp-3) 0 var(--sp-2); font-size: var(--fs-sm); color: var(--text); }
.pii-summary .pii-unmatched-count { color: var(--warning); }

/* 이관 판정 배지 — 미매칭 0 은 초록 강조, 있으면 경고색 */
.pii-verdict {
  display: inline-block;
  margin: 0 0 var(--sp-2);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
}
.pii-verdict-ok { background: var(--success-soft); color: var(--success); }
.pii-verdict-warn { background: var(--warning-soft); color: var(--warning); }
.pii-unmatched-warn { margin: var(--sp-2) 0; }
.pii-unmatched-wrap { max-height: 240px; overflow-y: auto; }

/* 발급 기간 프리셋 버튼 */
.preset-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.period-preset { padding: 4px 10px; font-size: var(--fs-xs); }
.period-preset.is-active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.error-msg { margin: var(--sp-2) 0 0; color: var(--danger); font-size: var(--fs-sm); }

/* 토스트 (우하단, 슬라이드업) */
.toast {
  position: fixed;
  right: var(--sp-5);
  bottom: var(--sp-5);
  max-width: min(420px, calc(100vw - 40px));
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-md);
  background: #101c2e;
  color: #ffffff;
  font-size: var(--fs-sm);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  z-index: 1100;
}
[data-theme="dark"] .toast {
  border: 1px solid var(--line-strong);
  background: var(--surface-raised);
  color: var(--text);
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ---------- 7. 반응형 ---------- */
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--sp-2);
  }
  .sidebar-spacer, .health-panel { display: none; }
  .nav-list { display: flex; gap: var(--sp-1); }
  .workspace { padding: var(--sp-3); }
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-2); }
  .topbar { flex-wrap: wrap; }
}

/* ---------- 회원 조회 뷰 (읽기 전용) ---------- */
.cust-search { display: flex; gap: var(--sp-2); align-items: center; }
/* 유효 라이선스 0건 등 강조할 필요 없는 칸을 흐리게 */
.cell-dim { color: var(--text-faint); }
.cust-total { color: var(--text-muted); margin: 0 0 var(--sp-2); }

/* 패널 제목 옆 건수 — 제목보다 작고 흐리게(다른 패널 제목과 톤 일관) */
.panel-count {
  font-size: var(--fs-md);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  margin-left: var(--sp-2);
}
.cust-more-row { text-align: center; padding: var(--sp-3) 0; }

/* ── 임대(rent_kind) 색칩 — 라이선스 평면 그리드의 임대 컬럼(솔패스 팔레트 이식) ── */
/* 배경색·글자색은 인라인 style 로 코드별 지정(rentKindBadge). 여기선 형태만 잡는다. */
.rent-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 var(--sp-2);
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  white-space: nowrap;
}
/* 회원 그룹(색칩, 0020) "미분류" — 색칩이 아닌 흐린 회색 텍스트로 표시. */
.group-chip-none {
  color: var(--text-muted);
  font-size: var(--fs-xs);
}

/* 회원 구분(개인/회사) 색 배지 — 표시 전용(정렬·CSV·편집은 원본 라벨/코드 유지).
   구분 전용 색: 개인=파랑, 회사=초록. 상태 배지·임대 칩과 톤을 맞추되 색으로만 구분.
   라이트/다크 각각 배경(soft)·글자(진한 대비) 조합을 명시해 양쪽 가독성 확보. */
.kind-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 var(--sp-2);
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  white-space: nowrap;
}
.kind-personal { background: #e3f0fd; color: #1554b0; }
.kind-company  { background: #e2f4ea; color: #1a7a45; }
.kind-none     { background: var(--surface-muted); color: var(--text-muted); font-weight: var(--fw-medium); }
[data-theme="dark"] .kind-personal { background: rgba(59, 130, 246, 0.20); color: #93b4f5; }
[data-theme="dark"] .kind-company  { background: rgba(16, 185, 129, 0.20); color: #5fdca8; }
/* ── 회원 그룹 관리 모달 ── */
.group-modal { width: min(680px, 94vw); }
.group-list-wrap { max-height: 40vh; overflow-y: auto; }
.group-row-actions { white-space: nowrap; text-align: right; }
.group-form-title { margin: 0 0 var(--sp-2); font-size: var(--fs-md); }
.group-color-row { align-items: flex-end; }
.group-color-pick { display: inline-flex; align-items: center; gap: var(--sp-2); }
.group-color-pick input[type="color"] {
  width: 34px; height: 30px; padding: 0; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: none; cursor: pointer;
}
.group-hex-input { width: 90px; font-family: var(--font-mono, monospace); }
.group-swatches { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: var(--sp-2) 0; }
.group-swatch {
  width: 22px; height: 22px; padding: 0; border: 1px solid var(--line);
  border-radius: var(--radius-full); cursor: pointer;
}
.group-swatch:hover { outline: 2px solid var(--accent, #2E5CFF); outline-offset: 1px; }
.group-preview-row { display: flex; align-items: center; gap: var(--sp-2); margin: var(--sp-2) 0; }
/* 회원 상세: 발급 라이선스/이력 표(7컬럼)가 가로 스크롤 없이 한 줄에 들어가도록 폭 확대.
   .modal 기본 width:min(560px,100%) 를 오버라이드해야 실제로 넓어진다(max-width 만으론 560px 에서 걸림).
   좁은 화면(노트북 등) 대비 94vw 상한. 실측상 940px 면 7컬럼이 여유 있게 한 줄에 표시됨. */
.cust-modal { width: min(940px, 94vw); }
/* ── 회원 상세 헤더: 이름(큰 제목) + 상태 배지, 아래줄 회사·회원번호 ── */
.cust-head {
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-4);
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.cust-head-top {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.cust-head-name {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--text);
  line-height: 1.2;
}
.cust-head-sub {
  margin-top: var(--sp-1);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}
.cust-head-sub .mono { font-size: var(--fs-sm); }
.cust-head-dot { margin: 0 var(--sp-2); color: var(--text-faint); }
/* 그룹·업종·구분 배지 줄 — 회원 상세 헤더 전용(.cust-modal 스코프). 요청 상세(.req-modal)
   는 badgeRow 를 렌더하지 않으므로 이 클래스가 나타나지 않아 영향 없음. */
.cust-modal .cust-head-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
}
/* 업종 배지 — 무채색 보조 배지(구분/그룹 칩과 나란히 보이게 톤 맞춤). */
.cust-work-badge {
  display: inline-block;
  padding: 2px var(--sp-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  line-height: 1.4;
}
/* ── 회원 메타 그리드: 부가 정보를 반응형 2열(라벨+값)로 압축 ── */
.cust-modal .detail-grid {
  grid-template-columns: 76px minmax(0, 1fr) 76px minmax(0, 1fr);
  gap: var(--sp-3) var(--sp-4);
}
.cust-modal .detail-grid dt { align-self: center; }
.cust-modal .detail-grid dd { word-break: break-word; }
@media (max-width: 560px) {
  .cust-modal .detail-grid { grid-template-columns: 76px minmax(0, 1fr); }
}
.cust-lic-title { margin: var(--sp-2) 0; }
.cust-lic-wrap { max-height: 40vh; overflow-y: auto; }

/* ── 회원 상세: 메모·연락처(조회) 그리드 + 편집 폼 ── */
/* 메모/요청메모/연락처 블록은 메타 그리드와 시각적으로 분리(윗선 + 간격). */
.cust-info-grid, .cust-contact-grid { margin-top: var(--sp-4); }
/* 조회 모드 메모·요청메모 값칸 — 짧아도 넉넉한 높이 확보(내용 길면 자동 확장). */
.cust-modal .cust-info-grid dd.dg-wide { min-height: 4.5em; }
/* 메모·요청메모는 값이 길 수 있어 라벨+값이 줄 전체를 쓰도록(2열 그리드에서 전폭). */
.cust-modal .detail-grid dt.dg-wide { grid-column: 1; }
.cust-modal .detail-grid dd.dg-wide { grid-column: 2 / -1; white-space: pre-wrap; }
/* 연락처 마스킹 표기 — 저대비 보조 텍스트(테마 추적). */
.pii-masked { color: var(--text-faint); letter-spacing: 1px; }
/* 메모류 셀 — 길면 잘라 말줄임(전체는 title 툴팁). */
.cell-ellipsis { max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 편집 폼: 짧은 필드(전화·이메일·주소)는 반응형 2열 그리드. */
.cust-edit-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-3);
}
/* 이름·회사: 3:7 비율(이름 3, 회사 7) 한 줄. */
.cust-edit-name-row {
  display: grid;
  grid-template-columns: 3fr 7fr;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
/* 그룹·업종·구분: 한 줄 3열(균등). */
.cust-edit-triple {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
@media (max-width: 560px) {
  .cust-edit-cols,
  .cust-edit-name-row,
  .cust-edit-triple { grid-template-columns: minmax(0, 1fr); }
}
#cust-edit-form textarea { width: 100%; }
/* 메모 textarea 는 rows 상향(5줄)에 맞춰 최소 높이 확보 — 짧은 내용도 넉넉하게. */
#cust-edit-memo { min-height: 6.5em; }

/* ── 라이선스 그리드 필터 바 ── */
.filter-bar { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
.filter-bar input[type="text"] { min-width: 200px; }
/* 회원 검색창만 별도로 넓힘(회원번호·이름·회사·시리얼 + 문법 힌트 여유) — flex 로 확장, min 은 절대값이라 좁은 화면 안 깨짐 */
#cust-q { min-width: 340px; flex: 1 1 340px; max-width: 520px; }
.filter-bar input[type="number"] { width: 80px; }
.days-warn { color: var(--warning); font-weight: 600; }

/* ── 감사 로그 · 수동 등록 ── */
/* 감사 내용 칸: 한 줄 말줄임 (전문은 title 툴팁으로) */
.audit-details {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* textarea 기본 스타일 — input 과 동일 계열 (수동 등록 요청코드) */
textarea {
  padding: var(--sp-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-md);
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
textarea::placeholder { color: var(--text-faint); }

/* ── 열 표시 메뉴 (라이선스 컬럼 표시/숨김 — details 팝업) ── */
.col-menu { position: relative; }
.col-menu > summary {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-h-sm);
  padding: 0 var(--sp-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.col-menu > summary::-webkit-details-marker { display: none; }
.col-menu > summary:hover { border-color: var(--accent); color: var(--accent); }
.col-menu[open] > summary { border-color: var(--accent); color: var(--accent); }
.col-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + var(--sp-1));
  z-index: 30;
  min-width: 150px;
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: var(--sp-1);
}
.col-menu-list label {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
}

/* ── 회원 그리드 선택 툴바 (행 다중선택 시 나타남) ── */
.sel-toolbar {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-muted);
}
.sel-count {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--accent);
  margin-right: var(--sp-1);
}
/* 재전달 드롭다운은 col-menu 스타일을 재사용하되 우측 정렬 대신 좌측 정렬. */
.sel-redeliver .sel-redeliver-list { right: auto; left: 0; }
.sel-redeliver-summary::-webkit-details-marker { display: none; }
/* 선택 0 일 때 재전달 <summary> 비활성 표시 (disabled 속성이 없어 클래스로). */
.sel-redeliver-summary.is-disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: default;
}

/* ── 회사별·그룹별 보기 토글 버튼 활성 표시 (회원 뷰 — 상호배타 3택1) ── */
#btn-company-toggle.is-on,
#btn-group-toggle.is-on {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* ── 공통 그리드 엔진 (뷰 그리드 7종 — 열 폭·순서·표시) ── */

/* 폭이 저장된 그리드: table-layout fixed + colgroup 픽셀 제어 (JS 가 table 폭 = 열 합으로 고정).
   fixed 에선 내용이 열 폭을 못 늘리므로 넘치는 텍스트는 말줄임. */
.grid-fixed { table-layout: fixed; }
.grid-fixed th, .grid-fixed td { overflow: hidden; text-overflow: ellipsis; }

/* 리사이즈 그립: th 우측 끝 좁은 핸들 (th 는 sticky → 포지셔닝 컨텍스트).
   드래그로 폭 조절, 더블클릭 자동 맞춤. */
.col-grip {
  position: absolute;
  top: 0;
  right: 0;
  width: 7px;
  height: 100%;
  cursor: col-resize;
  user-select: none;
  z-index: 2;
}
.col-grip:hover { background: var(--accent-ring); }
body.col-resizing { cursor: col-resize; user-select: none; }

/* 열 순서 드래그: 끌리는 열은 흐리게, 드롭 위치는 액센트 세로 바 인디케이터 */
.data-table th.col-dragging { opacity: 0.45; }
.data-table th.drop-before { box-shadow: inset 3px 0 0 var(--accent); }
.data-table th.drop-after { box-shadow: inset -3px 0 0 var(--accent); }

/* 열 메뉴 하단 액션 (전체 자동 맞춤 · 열 상태 초기화) */
.col-menu-actions {
  display: grid;
  gap: var(--sp-1);
  margin-top: var(--sp-1);
  padding-top: var(--sp-2);
  border-top: 1px solid var(--line);
}

/* ── 회원 상세 모달 바로가기 줄 (요청/라이선스 화면 이동) ── */
.cust-goto-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}

/* ── 기기 이전(PC 교체) 승인 가드 ── */

/* 요청 상세: 다른 PC 유효 인증 경고 (결정 영역 위 — 경고 계열 토큰) */
.transfer-warn {
  margin: 0 0 var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--warning);
  border-radius: var(--radius-md);
  background: var(--warning-soft);
  color: var(--warning);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
}
/* 이전 후보 목록 (제품 · 디스크시리얼 · 만료일) */
.transfer-list {
  margin: 0;
  padding-left: var(--sp-5);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}
.transfer-list li { margin: 2px 0; }

/* 차단 기기 뷰: 수동 차단 폼 (admin 전용) — .filter-bar 배치에
   위험 조작임을 알리는 점선 위험 테두리만 더한다 */
.block-create-form {
  margin-top: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border: 1px dashed var(--danger-line);
  border-radius: var(--radius-md);
}
.block-create-form input { min-width: 200px; }
