:root {
  /* 배경/표면 — 순수 흰색 대신 눈이 편안한 오프화이트 */
  --bg: #F6F7F9;
  --surface: #FFFFFF;
  --surface-soft: #F8F9FB;

  /* 텍스트 — 순수 검정 대신 짙은 네이비 (대비를 부드럽게) */
  --text: #191F28;
  --text-secondary: #6B7684;
  --text-muted: #8B95A1;

  /* 테두리 */
  --border: #E5E8EB;
  --border-strong: #D1D6DB;

  /* 포인트 컬러 (토스 블루) */
  --primary: #3182F6;
  --primary-strong: #1B64DA;
  --primary-tint: #EBF2FE;

  /* 상태 컬러 — 파스텔 톤 배지용 */
  --positive: #12B76A;
  --positive-tint: #E7F9F1;
  --negative: #F04452;
  --negative-tint: #FDEDEE;
  --warning: #F59E0B;
  --warning-tint: #FEF6E7;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body, button, input, textarea, select {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', sans-serif;
}

body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* 로그인 화면 인풋 포커스 */
#login-email:focus, #login-pw:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px var(--primary-tint);
}

/* 사이드바 */
#sidebar {
  width: 212px;
  background: var(--surface);
  color: var(--text);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

#sidebar .logo {
  height: 65px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 22px;
  border-bottom: 1px solid var(--border);
  box-sizing: border-box;
}

#sidebar .logo-text {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#sidebar nav {
  padding: 12px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

#sidebar nav button {
  width: 100%;
  background: none;
  border: none;
  border-radius: 10px;
  color: var(--text-secondary);
  text-align: left;
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

#sidebar nav button:hover {
  background: var(--surface-soft);
  color: var(--text);
}

#sidebar nav button.active {
  background: var(--primary-tint);
  color: var(--primary-strong);
  font-weight: 700;
}

.nav-group-label {
  padding: 12px 20px 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  pointer-events: none;
  user-select: none;
}

/* 준비 중 패널 */
.coming-soon-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 260px;
  gap: 10px;
  color: #ccc;
}

.coming-soon-title {
  font-size: 16px;
  font-weight: 600;
  color: #bbb;
}

.coming-soon-desc {
  font-size: 13px;
  color: #ccc;
}

/* 메인 영역 */
#main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#topbar {
  height: 65px;
  flex-shrink: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  box-sizing: border-box;
}

/* 상단바 타이틀은 각 패널 자체 헤더와 중복되므로 숨김 — 섹션 구분은 사이드바 활성 상태로 충분 */
#topbar-title {
  display: none;
}

#topbar .date {
  font-size: 13px;
  color: #999;
  font-weight: 500;
}

#content {
  flex: 1;
  overflow-y: auto;
  padding: 32px 36px;
}

/* 탭 패널 */
.panel {
  display: none;
}

.panel.active {
  display: block;
}

/* 섹션 헤더 */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-header h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

/* 버튼 */
.btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.btn:hover {
  background: var(--primary-strong);
}

.btn:active {
  transform: scale(0.98);
}

.btn-outline {
  background: none;
  color: var(--text);
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.btn-outline:hover {
  background: var(--surface-soft);
  border-color: var(--border-strong);
}

.btn-danger {
  background: none;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.btn-danger:hover {
  background: var(--negative-tint);
  color: var(--negative);
  border-color: var(--negative);
}

/* 카드 그리드 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  transition: box-shadow 0.15s;
}

.card .card-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.card .card-role {
  font-size: 12px;
  color: #666;
  background: #f0f0f0;
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  margin-bottom: 12px;
}

.card .card-info {
  font-size: 13px;
  color: #555;
  line-height: 1.8;
}

.card .card-actions {
  margin-top: 14px;
  display: flex;
  gap: 6px;
}

/* 프로젝트 테이블 */
.table-wrap {
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

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

thead {
  background: #fafafa;
  border-bottom: 1px solid #f0f0f0;
}

thead th {
  padding: 13px 16px;
  text-align: left;
  font-size: 12.5px;
  font-weight: 700;
  color: #888;
}

tbody tr {
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.1s;
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr:hover {
  background: #fafafa;
}

tbody td {
  padding: 12px 16px;
  color: #333;
}

/* 프로젝트 카드 */
.proj-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.proj-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.proj-card-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.proj-card-name {
  font-size: 15px;
  font-weight: 700;
  color: #111;
}

.proj-card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.proj-card-assignees {
  font-size: 13px;
  color: #555;
}

.proj-card-note {
  font-size: 13px;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-badge {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-active   { background: var(--primary-tint); color: var(--primary-strong); }
.status-hold     { background: #F2F4F6; color: var(--text-secondary); }
.status-done     { background: var(--positive-tint); color: var(--positive); }

.status-badge-btn { border: none; cursor: pointer; transition: opacity 0.1s; }
.status-badge-btn:hover { opacity: 0.75; }

/* 모달 */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(17,17,17,0.4);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--surface);
  border-radius: 20px;
  padding: 30px 32px;
  width: 420px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.modal h3 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin-bottom: 22px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-tint);
}

.form-group textarea {
  height: 72px;
  resize: vertical;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.empty-state {
  text-align: center;
  color: #aaa;
  padding: 48px 0;
  font-size: 14px;
}

/* 담당자 체크박스 */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 150px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 10px 12px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}

.checkbox-label input[type=checkbox] {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: var(--primary);
}

/* ─── 할 일 관리 ────────────────────────── */

.todo-input-bar {
  margin-bottom: 22px;
}

.todo-input-bar input {
  width: 100%;
  padding: 11px 16px;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  outline: none;
  background: #fafafa;
  color: #222;
  transition: border-color 0.15s, background 0.15s;
}

.todo-input-bar input::placeholder {
  color: #c0c0c0;
}

.todo-input-bar input:focus {
  border-color: #999;
  background: #fff;
}

/* 프로젝트 탭 */
.todo-project-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.todo-proj-tab {
  background: none;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 13px;
  color: #666;
  cursor: pointer;
  transition: all 0.15s;
}

.todo-proj-tab:hover {
  border-color: #111;
  color: #111;
}

.todo-proj-tab.active {
  background: #111;
  border-color: #111;
  color: #fff;
}

/* 프로젝트 뱃지 */
.todo-proj-badge {
  display: inline-block;
  font-size: 11px;
  color: #888;
  background: #f0f0f0;
  border-radius: 3px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ─── 섹션 공통 ─────────────────────────── */
.todo-section {
  margin-bottom: 20px;
}

.todo-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 8px 14px;
  margin-bottom: 4px;
  border-radius: 6px;
  border-left: 3px solid transparent;
}

.todo-section-toggle {
  cursor: pointer;
  user-select: none;
}

.todo-section-toggle:hover .todo-section-title {
  color: #222;
}

.todo-section-title {
  font-size: 11px;
  font-weight: 700;
  color: #999;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.todo-count {
  font-weight: 500;
  font-size: 11px;
  color: #bbb;
  margin-left: 6px;
}

.todo-arrow {
  font-size: 10px;
  color: #ccc;
}

/* ─── 섹션별 강조 ───────────────────────── */
.todo-section-inbox .todo-section-header {
  border-left-color: #ddd;
  background: #fafafa;
}

.todo-section-today .todo-section-header {
  border-left-color: #111;
  background: #f5f5f5;
}

.todo-section-today .todo-section-title {
  color: #333;
}

.todo-section-later .todo-section-header {
  border-left-color: #e0e0e0;
  background: #fafafa;
}

.todo-section-done .todo-section-header {
  border-left-color: #ebebeb;
  background: #fafafa;
}

/* ─── 경고 메시지 ───────────────────────── */
.todo-warning {
  font-size: 12px;
  color: #999;
  background: #f8f8f8;
  border-radius: 4px;
  padding: 7px 14px;
  margin: 0 0 6px;
}

/* ─── 할 일 항목 ────────────────────────── */
.todo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px 9px 14px;
  border-bottom: 1px solid #f5f5f5;
  border-radius: 5px;
  transition: background 0.1s;
}

.todo-item:last-child {
  border-bottom: none;
}

.todo-item:hover {
  background: #f7f7f7;
}

.todo-item:hover .todo-actions {
  opacity: 1;
}

.todo-check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex: 1;
}

.todo-check-label input[type=checkbox] {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.todo-title {
  font-size: 14px;
  color: #222;
  flex: 1;
  line-height: 1.4;
}

.todo-title-done {
  color: #bbb;
  text-decoration: line-through;
}

.todo-item-done {
  opacity: 0.7;
}

/* ─── 액션 영역 ─────────────────────────── */
.todo-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: 10px;
  opacity: 0;
  transition: opacity 0.15s;
}

/* ─── 이동 버튼 (TODAY / INBOX / LATER) ── */
.todo-move-btns {
  display: flex;
  gap: 4px;
}

.todo-move-btn {
  background: none;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 2px 9px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #ccc;
  cursor: pointer;
  transition: all 0.12s;
}

.todo-move-btn:hover {
  background: #111;
  color: #fff;
  border-color: #111;
}

/* 복구 버튼 */
.todo-restore-btn {
  color: #aaa;
  border-color: #e0e0e0;
  border-radius: 10px;
  padding: 2px 10px;
  font-size: 11px;
}

.todo-restore-btn:hover {
  background: #555;
  color: #fff;
  border-color: #555;
}

/* ─── 아이콘 버튼 (편집 / 삭제) ─────────── */
.todo-ctrl-btns {
  display: flex;
  gap: 1px;
}

.todo-icon-btn {
  background: none;
  border: none;
  padding: 3px 8px;
  font-size: 11px;
  color: #aaa;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.12s;
  line-height: 1.4;
  white-space: nowrap;
}

.todo-icon-btn:hover {
  background: #ebebeb;
  color: #333;
}

.todo-icon-del:hover {
  background: #feeaea;
  color: #c44;
}

/* ─── 기존 텍스트 버튼 (의존 관계 등) ───── */
.todo-btn {
  background: none;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 4px 11px;
  font-size: 12px;
  color: #555;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}

.todo-btn:hover {
  background: #111;
  color: #fff;
  border-color: #111;
}

.todo-btn-muted {
  color: #bbb;
  border-color: #eee;
}

.todo-btn-muted:hover {
  background: #888;
  border-color: #888;
  color: #fff;
}

.todo-empty {
  font-size: 13px;
  color: #ccc;
  padding: 14px 14px;
}

/* ─── 확장형 할 일 아이템 ───────────────── */
.todo-item-expandable {
  flex-direction: column;
  align-items: stretch;
  padding: 9px 10px 9px 14px;
}

.todo-main-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.todo-main-row .todo-title {
  flex: 1;
}

.todo-main-row .todo-actions {
  margin-left: 0;
}

/* 체크박스 단독 래퍼 (Today 섹션) */
.todo-checkbox-wrap {
  display: flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.todo-checkbox-wrap input[type=checkbox] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* 더블클릭 편집 커서 힌트 */
.todo-title-editable {
  cursor: text;
}

/* 인라인 편집 입력창 */
.todo-edit-input {
  flex: 1;
  border: none;
  border-bottom: 1px solid #111;
  padding: 2px 4px;
  font-size: 14px;
  font-family: inherit;
  color: #111;
  outline: none;
  background: transparent;
}

/* 서브태스크 메타 (진행도 / 추가 트리거) */
.subtask-meta {
  padding-left: 24px;
  margin-top: 4px;
}

.subtask-progress,
.subtask-add-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #bbb;
  cursor: pointer;
  user-select: none;
  padding: 2px 0;
}

.subtask-progress:hover,
.subtask-add-trigger:hover {
  color: #666;
}

.subtask-arrow {
  font-size: 10px;
}

/* 서브태스크 리스트 */
.subtask-list {
  margin-top: 6px;
  margin-left: 22px;
  padding-left: 12px;
  border-left: 2px solid #f0f0f0;
}

.subtask-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid #f8f8f8;
}

.subtask-item:last-child {
  border-bottom: none;
}

.subtask-item-done {
  opacity: 0.55;
}

.subtask-check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  cursor: pointer;
}

.subtask-check-label input[type=checkbox] {
  width: 13px;
  height: 13px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.subtask-title {
  font-size: 13px;
  color: #333;
  cursor: text;
}

.subtask-delete-btn {
  background: none;
  border: none;
  color: #ddd;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  flex-shrink: 0;
  transition: color 0.1s;
}

.subtask-delete-btn:hover {
  color: #888;
}

/* 하위 할 일 추가 입력창 */
.subtask-input-row {
  padding: 5px 0 2px;
}

.subtask-input {
  width: 100%;
  border: none;
  border-bottom: 1px dashed #e0e0e0;
  padding: 3px 0;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  background: transparent;
  color: #555;
}

.subtask-input:focus {
  border-bottom-color: #aaa;
}

.subtask-input::placeholder {
  color: #ccc;
}

/* ─── 회계 관리 ─────────────────────────── */

/* 내부 탭 바 — 세그먼트 컨트롤 */
.acc-inner-tabs {
  display: inline-flex;
  gap: 2px;
  margin-bottom: 24px;
  background: #f0f0f0;
  border-radius: 12px;
  padding: 3px;
}

.acc-tab-btn {
  background: none;
  border: none;
  border-radius: 9px;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, box-shadow 0.15s;
}

.acc-tab-btn:hover { color: #333; }

.acc-tab-btn.active {
  color: #111;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* 정기 항목 요약 바 */
.rec-summary-bar {
  display: flex;
  gap: 32px;
  margin-bottom: 16px;
  font-size: 14px;
  color: #555;
}

.rec-summary-bar strong { color: #111; }

/* 정기 항목 뱃지 */
.rec-type-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 8px;
  white-space: nowrap;
}

.rec-type-income  { background: var(--positive-tint); color: var(--positive); }
.rec-type-expense { background: var(--negative-tint); color: var(--negative); }

/* 만료일 강조 */
.rec-date-expired { color: var(--negative); font-weight: 700; }

/* 연결 계약 뱃지 */
.rec-contract-badge {
  display: inline-block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 400;
  color: #888;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 1px 7px;
}

/* 빈 상태 */
.rec-empty-box {
  padding: 48px 24px;
  text-align: center;
  color: #aaa;
  font-size: 14px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.summary-card {
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.summary-card.highlight {
  background: var(--primary);
  border-color: var(--primary);
}

.summary-label {
  font-size: 12px;
  color: #888;
  margin-bottom: 8px;
}

.summary-card.highlight .summary-label {
  color: rgba(255,255,255,0.75);
}

.summary-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.summary-card.highlight .summary-value {
  color: #fff;
}

.account-balance {
  font-size: 18px;
  font-weight: 700;
  margin: 8px 0 4px;
}

.section-divider {
  margin: 32px 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e0e0e0;
}

/* 필터 바 */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #fafafa;
  border: 1px solid #f0f0f0;
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #555;
}

.filter-item input[type=date],
.filter-item select {
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  outline: none;
}

.filter-item input[type=date]:focus,
.filter-item select:focus {
  border-color: #111;
}

/* 라디오 버튼 그룹 */
.radio-group {
  display: flex;
  gap: 20px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  cursor: pointer;
}

.radio-label input[type=radio] {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* 세무 필드 구분선 */
.tax-fields-divider {
  font-size: 12px;
  font-weight: 600;
  color: #888;
  letter-spacing: 0.5px;
  padding: 10px 0 6px;
  border-top: 1px solid #eee;
  margin-top: 4px;
}

/* 거래 행 클릭 */
.tx-row {
  cursor: pointer;
}

.tx-row:hover td {
  background: #f5f5f5;
}

/* 거래 상세 펼침 행 */
.tx-detail-row td {
  background: #f8f8f8;
  padding: 0;
}

.tx-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 12px 16px;
  font-size: 13px;
  border-top: 1px solid #eee;
}

.detail-item {
  color: #555;
}

.detail-item strong {
  color: #333;
  margin-right: 4px;
}

/* ─── 완료 토스트 알림 ──────────────────── */

.todo-unblock-toast {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 300;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.13);
  width: 340px;
  max-width: calc(100vw - 48px);
  animation: toast-in 0.2s ease;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.toast-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  background: #111;
  border-radius: 6px 6px 0 0;
}

.toast-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.toast-close {
  background: none;
  border: none;
  color: #888;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.toast-close:hover { color: #fff; }

.toast-body {
  padding: 12px 14px;
}

.toast-subtitle {
  font-size: 11px;
  font-weight: 600;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 8px;
}

.toast-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid #f5f5f5;
}

.toast-item:last-child { border-bottom: none; }

.toast-item-left {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.toast-item-title {
  font-size: 13px;
  color: #222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast-item-status {
  font-size: 11px;
  color: #bbb;
  margin-top: 1px;
}

.toast-moved {
  font-size: 12px;
  color: #aaa;
  flex-shrink: 0;
}

/* ─── 차단 상태 시각화 ──────────────────── */

.todo-item-blocked {
  opacity: 0.55;
}

.todo-item-blocked .todo-title {
  color: #999;
}

.todo-item-blocked .todo-checkbox-wrap input[type=checkbox]:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.todo-blocked-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #999;
  background: #f0f0f0;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  padding: 1px 7px;
  flex-shrink: 0;
}

.todo-blocked-info {
  font-size: 12px;
  color: #bbb;
  padding-left: 24px;
  margin-top: 2px;
  margin-bottom: 2px;
}

.todo-succ-badge {
  display: inline-block;
  font-size: 11px;
  color: #aaa;
  background: #f5f5f5;
  border-radius: 3px;
  padding: 1px 5px;
  margin-left: 5px;
  vertical-align: middle;
  font-weight: 400;
}

.todo-completed-time {
  font-size: 11px;
  color: #ccc;
  margin-top: 3px;
  padding-left: 1px;
  letter-spacing: 0.2px;
}

/* ─── 의존 관계 UI ──────────────────────── */

.todo-dep-section {
  border-top: 1px solid #eee;
  padding-top: 14px;
  margin-top: 4px;
  margin-bottom: 14px;
}

.todo-dep-label {
  font-size: 12px;
  font-weight: 600;
  color: #888;
  margin-bottom: 8px;
}

.todo-dep-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.dep-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f0f0f0;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 3px 10px 3px 12px;
  font-size: 12px;
  color: #333;
}

.dep-chip button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: #aaa;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
}

.dep-chip button:hover {
  color: #333;
}

.todo-dep-search-wrap {
  margin-bottom: 8px;
}

.todo-dep-search-wrap input {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
}

.todo-dep-search-wrap input:focus {
  border-color: #111;
}

.todo-dep-dropdown {
  border: 1px solid #e0e0e0;
  border-top: none;
  border-radius: 0 0 4px 4px;
  max-height: 160px;
  overflow-y: auto;
  background: #fff;
}

.dep-dropdown-item {
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid #f5f5f5;
}

.dep-dropdown-item:last-child { border-bottom: none; }

.dep-dropdown-item:hover { background: #f5f5f5; }

.dep-dropdown-empty {
  padding: 10px 12px;
  font-size: 13px;
  color: #bbb;
}

/* ─── 할 일 관리 v2 (담당자 탭 + 카드) ──────────────────────────── */

/* 담당자 탭 바 */
.todo-assignee-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 2px;
}

.todo-assignee-tab {
  padding: 7px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-size: 13px;
  font-weight: 500;
  color: #888;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.12s;
  white-space: nowrap;
}
.todo-assignee-tab:hover { color: #333; }
.todo-assignee-tab.active {
  color: #111;
  font-weight: 700;
  border-bottom-color: #111;
}

.todo-tab-role {
  font-size: 11px;
  font-weight: 400;
  color: #bbb;
}
.todo-assignee-tab.active .todo-tab-role { color: #888; }

.todo-assignee-badge {
  background: #111;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 10px;
  padding: 1px 6px;
  min-width: 18px;
  text-align: center;
}

/* 프로젝트 필터 바 */
.todo-proj-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.todo-proj-label {
  font-size: 12px;
  color: #888;
  white-space: nowrap;
}
.todo-proj-select {
  padding: 4px 8px;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  font-size: 13px;
  color: #333;
  background: #fff;
  outline: none;
  cursor: pointer;
}

/* 미분류 배너 */
.todo-unclassified-banner {
  display: flex;
  align-items: center;
  background: #fffbeb;
  border: 1px solid #f59e0b;
  border-radius: 7px;
  padding: 10px 16px;
  font-size: 13px;
  color: #92400e;
  margin-bottom: 14px;
}

/* 새 할 일 버튼 바 (section-header에 이미 포함되어 있어 이 클래스는 fallback) */
.todo-add-bar {
  margin-bottom: 12px;
}

/* 카드 */
.todo-card {
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 7px;
  transition: box-shadow 0.12s;
}
.todo-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }

.todo-card-blocked {
  opacity: 0.55;
  background: #fafafa;
}

.todo-card-done {
  background: #fafafa;
  border-color: #f0f0f0;
}

.todo-card-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.todo-card-body {
  flex: 1;
  min-width: 0;
}

.todo-card-title {
  font-size: 14px;
  font-weight: 500;
  color: #111;
  line-height: 1.45;
  word-break: break-word;
}

.todo-card-done .todo-card-title { color: #bbb; }

.todo-card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* 삭제 버튼 */
.todo-btn-del {
  color: #ccc;
  font-size: 14px;
  padding: 3px 6px;
}
.todo-btn-del:hover { color: #e55; background: #fff5f5; }

/* ↑↓ 정렬 버튼 */
.todo-btn-order {
  padding: 3px 7px;
  font-size: 12px;
  color: #aaa;
  border-color: #e8e8e8;
}
.todo-btn-order:hover:not(:disabled) { color: #333; background: #f5f5f5; }
.todo-btn-disabled,
.todo-btn-order:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}

/* ─── 포트폴리오 ─────────────────────────── */

.pf-year-group {
  margin-bottom: 36px;
}

.pf-year-label {
  font-size: 13px;
  font-weight: 700;
  color: #888;
  letter-spacing: 1px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 12px;
}

.pf-card {
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 16px;
  padding: 18px 22px;
  margin-bottom: 10px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}

.pf-card:hover {
  border-color: #ddd;
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}

.pf-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.pf-date {
  font-size: 12px;
  color: #999;
}

.pf-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #111;
  margin-bottom: 4px;
}

.pf-card-summary {
  font-size: 13px;
  color: #555;
  margin-bottom: 4px;
}

.pf-card-counterparty {
  font-size: 12px;
  color: #888;
  margin-bottom: 4px;
}

.pf-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.pf-tag {
  font-size: 12px;
  color: #666;
  background: #f5f5f5;
  border-radius: 8px;
  padding: 2px 8px;
}

.pf-badges {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.pf-badge {
  font-size: 11px;
  color: #888;
  background: #f0f0f0;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 2px 8px;
}

/* 상세 모달 */
.pf-detail-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e0e0e0;
}

.pf-detail-title {
  font-size: 18px;
  font-weight: 700;
  color: #111;
  margin: 8px 0 4px;
}

.pf-detail-section {
  margin-bottom: 16px;
}

.pf-detail-label {
  font-size: 11px;
  font-weight: 700;
  color: #999;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.pf-pre {
  font-size: 13px;
  color: #333;
  white-space: pre-wrap;
  line-height: 1.7;
}

.pf-file-item,
.pf-link-item {
  display: flex;
  flex-direction: column;
  padding: 6px 0;
  border-bottom: 1px solid #f5f5f5;
}

.pf-file-name {
  font-size: 13px;
  color: #333;
}

.pf-file-path {
  font-size: 11px;
  color: #bbb;
  margin-top: 2px;
  word-break: break-all;
}

/* 필터 바 */
.pf-filter-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: #fafafa;
  border: 1px solid #f0f0f0;
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 8px;
}

.pf-search {
  flex: 1;
  min-width: 160px;
  border: 1px solid #e5e5e5;
  border-radius: 9px;
  padding: 6px 12px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.pf-search:focus {
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(17,17,17,0.06);
}

.pf-filter-wrap select {
  border: 1px solid #e5e5e5;
  border-radius: 9px;
  padding: 6px 10px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  outline: none;
  cursor: pointer;
}

.pf-filter-wrap select:focus {
  border-color: #111;
}

.pf-counter {
  font-size: 12px;
  color: #999;
  margin-bottom: 16px;
}

/* 태그 클릭 */
.pf-tag-link {
  cursor: pointer;
}

.pf-tag-link:hover {
  background: #e0e0e0;
  color: #111;
}

/* 첨부 파일 / 링크 (모달 내) */
.pf-attach-section {
  border-top: 1px solid #eee;
  padding-top: 14px;
  margin-top: 4px;
  margin-bottom: 14px;
}

.pf-attach-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.pf-attach-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #444;
}

.pf-attach-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #f5f5f5;
  gap: 8px;
}

.pf-attach-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.pf-link-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pf-link-input-wrap {
  background: #f8f8f8;
  border-radius: 4px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.pf-link-input-wrap input {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  margin-bottom: 6px;
}

.pf-link-input-wrap input:focus {
  border-color: #111;
}

/* 상세 모달 링크 클릭 */
.pf-link-open {
  font-size: 13px;
  color: #111;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ════════════════════════════════════════════
   주간 루틴
   ════════════════════════════════════════════ */

/* ─── 섹션 공통 ─────────────────────────── */
.routine-section {
  margin-bottom: 36px;
}

.routine-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  margin-bottom: 6px;
  border-left: 3px solid #111;
  background: #f5f5f5;
  border-radius: 6px;
}

.routine-section-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.routine-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #222;
  letter-spacing: 0.3px;
}

.routine-section-count {
  font-size: 12px;
  font-weight: 500;
  color: #aaa;
  background: #e8e8e8;
  border-radius: 10px;
  padding: 1px 7px;
  min-width: 20px;
  text-align: center;
}

.routine-section-sub {
  font-size: 12px;
  color: #bbb;
}

/* ─── 카테고리 라벨 구분 (data-cat) ─────── */
.routine-cat-label[data-cat="영업"]  { background: #e4e4e4; color: #333; }
.routine-cat-label[data-cat="운영"]  { background: #eaeaea; color: #444; }
.routine-cat-label[data-cat="재무"]  { background: #dcdcdc; color: #222; font-weight: 700; }
.routine-cat-label[data-cat="전략"]  { background: #d8d8d8; color: #111; font-weight: 700; }
.routine-cat-label[data-cat="학습"]  { background: #f0f0f0; color: #555; }
.routine-cat-label[data-cat="관계"]  { background: #e8e8e8; color: #444; }
.routine-cat-label[data-cat="기타"]  { background: #f5f5f5; color: #999; }

/* ─── 빈 상태 ──────────────────────────── */
.routine-empty-box {
  text-align: center;
  padding: 48px 24px;
  color: #bbb;
}

.routine-empty-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #ccc;
}

.routine-empty-desc {
  font-size: 13px;
  color: #ccc;
}

.routine-empty-row {
  font-size: 13px;
  color: #ccc;
  padding: 12px 14px;
}

/* ─── 카테고리 라벨 ─────────────────────── */
.routine-cat-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #888;
  background: #efefef;
  border-radius: 3px;
  padding: 1px 6px;
  flex-shrink: 0;
}

.routine-cat-small {
  font-size: 10px;
  padding: 1px 5px;
  color: #aaa;
  background: #f5f5f5;
}

/* ─── 매일 루틴 행 ──────────────────────── */
.routine-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 10px 14px;
  border-bottom: 1px solid #f5f5f5;
  border-radius: 5px;
  transition: background 0.1s;
  gap: 12px;
}

.routine-row:last-child {
  border-bottom: none;
}

.routine-row:hover {
  background: #f8f8f8;
}

.routine-row:hover .routine-row-actions {
  opacity: 1;
}

.routine-row-left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  cursor: pointer;
  min-width: 0;
}

.routine-row-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.routine-row-title {
  font-size: 14px;
  color: #222;
  font-weight: 500;
  line-height: 1.4;
}

.routine-row-desc {
  font-size: 12px;
  color: #bbb;
  line-height: 1.3;
}

.routine-row-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.12s;
}

/* ─── 순서 버튼 ─────────────────────────── */
.routine-order-btn {
  background: none;
  border: none;
  font-size: 10px;
  color: #ccc;
  cursor: pointer;
  padding: 4px 5px;
  border-radius: 3px;
  line-height: 1;
  transition: all 0.1s;
}

.routine-order-btn:hover:not(:disabled) {
  background: #ebebeb;
  color: #555;
}

.routine-order-btn:disabled {
  opacity: 0.2;
  cursor: default;
}

/* ─── 액션 버튼 ─────────────────────────── */
.routine-icon-btn {
  background: none;
  border: none;
  padding: 3px 8px;
  font-size: 11px;
  color: #aaa;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.12s;
  line-height: 1.4;
  white-space: nowrap;
}

.routine-icon-btn:hover {
  background: #ebebeb;
  color: #333;
}

.routine-icon-del:hover {
  background: #feeaea;
  color: #c44;
}

/* ─── 요일별 그리드 ─────────────────────── */
.routine-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(130px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.routine-day-col {
  border: 1px solid #ebebeb;
  border-radius: 7px;
  background: #fafafa;
  overflow: hidden;
}

.routine-day-today {
  border-color: #bbb;
  background: #fff;
}

.routine-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-bottom: 1px solid #ebebeb;
  background: #f2f2f2;
}

.routine-day-today .routine-day-header {
  background: #111;
}

.routine-day-name {
  font-size: 12px;
  font-weight: 700;
  color: #555;
  letter-spacing: 0.5px;
}

.routine-day-today .routine-day-name {
  color: #fff;
}

.routine-today-badge {
  font-size: 10px;
  font-weight: 600;
  color: #ccc;
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
  padding: 1px 5px;
}

.routine-day-body {
  padding: 6px 4px;
  min-height: 60px;
}

.routine-cell-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 7px 8px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.1s;
  margin-bottom: 3px;
  border-bottom: 1px solid #f2f2f2;
}

.routine-cell-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.routine-cell-item:hover {
  background: #ebebeb;
}

.routine-cell-title {
  font-size: 12px;
  color: #333;
  font-weight: 500;
  line-height: 1.35;
  word-break: keep-all;
}

.routine-cell-desc {
  font-size: 11px;
  color: #bbb;
  line-height: 1.3;
  word-break: keep-all;
}

.routine-cell-empty {
  font-size: 13px;
  color: #ddd;
  padding: 12px 8px;
  text-align: center;
}

/* 오늘 컬럼 본문 배경 */
.routine-day-today .routine-day-body {
  background: #fdfdfd;
}

.routine-day-today .routine-cell-item {
  border-bottom-color: #eee;
}

/* ─── 모달 내 요일 선택 ─────────────────── */
.routine-quick-btns {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.routine-day-checks {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.routine-day-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #444;
  cursor: pointer;
  padding: 5px 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  transition: all 0.1s;
  user-select: none;
}

.routine-day-label:has(input:checked) {
  background: #111;
  border-color: #111;
  color: #fff;
}

.routine-day-label input[type=checkbox] {
  display: none;
}

/* ─── 일시 중단 섹션 헤더 ───────────────── */
.routine-section-header-muted {
  border-left-color: #e0e0e0;
  background: #fafafa;
  cursor: pointer;
  user-select: none;
}

.routine-section-header-muted .routine-section-title {
  color: #aaa;
  font-weight: 600;
}

.routine-section-toggle {
  cursor: pointer;
  user-select: none;
}

.routine-section-arrow {
  font-size: 10px;
  color: #ccc;
}

/* 일시 중단 행 */
.routine-row-inactive {
  opacity: 0.6;
}

.routine-title-inactive {
  text-decoration: line-through;
  color: #aaa !important;
}

.routine-cat-inactive {
  opacity: 0.5;
}

/* 활성화 버튼 */
.routine-restore-btn {
  background: none;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 2px 10px;
  font-size: 11px;
  color: #888;
  cursor: pointer;
  transition: all 0.12s;
}

.routine-restore-btn:hover {
  background: #111;
  color: #fff;
  border-color: #111;
}

/* ─── 상세 모달 ─────────────────────────── */
.routine-detail-header-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.routine-inactive-badge {
  font-size: 11px;
  color: #aaa;
  background: #f0f0f0;
  border-radius: 3px;
  padding: 2px 7px;
}

.routine-detail-title {
  font-size: 18px;
  font-weight: 600;
  color: #111;
  margin-bottom: 8px;
}

.routine-detail-title-inactive {
  color: #bbb !important;
  text-decoration: line-through;
}

.routine-detail-desc {
  font-size: 14px;
  color: #555;
  margin-bottom: 10px;
  line-height: 1.5;
}

.routine-detail-days {
  font-size: 12px;
  color: #aaa;
  margin-bottom: 10px;
  padding: 5px 10px;
  background: #f5f5f5;
  border-radius: 4px;
  display: inline-block;
}

.routine-detail-memo {
  font-size: 13px;
  color: #777;
  background: #f9f9f9;
  border-radius: 5px;
  padding: 10px 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  margin-top: 8px;
}

/* ════════════════════════════════════════════
   네트워크 관리
   ════════════════════════════════════════════ */

/* ─── 필터 바 ───────────────────────────── */
.net-filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.net-search-input {
  flex: 1;
  padding: 10px 16px;
  font-size: 13.5px;
  font-family: inherit;
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fafafa;
  outline: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.net-search-input::placeholder { color: #c0c0c0; }
.net-search-input:focus { border-color: #111; background: #fff; box-shadow: 0 0 0 3px rgba(17,17,17,0.06); }

/* ─── 카운터 ────────────────────────────── */
.net-counter {
  font-size: 12px;
  color: #bbb;
  margin-bottom: 16px;
  min-height: 16px;
}

/* ─── 카드 그리드 ───────────────────────── */
.net-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.net-card {
  border: 1px solid #f0f0f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.1s;
  overflow: hidden;
}

.net-card:hover {
  border-color: #ddd;
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}

.net-card-top {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 14px;
}

.net-card-main {
  flex: 1;
  cursor: pointer;
  min-width: 0;
}

.net-card-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}

.net-card-name {
  font-size: 15px;
  font-weight: 600;
  color: #111;
}

.net-card-sub {
  font-size: 12px;
  color: #888;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.net-card-contact {
  font-size: 12px;
  color: #aaa;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.net-card-memo {
  font-size: 12px;
  color: #bbb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 4px;
}

/* ─── 카드 액션 버튼 ────────────────────── */
.net-card-actions {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.12s;
}

.net-card:hover .net-card-actions { opacity: 1; }

.net-icon-btn {
  background: none;
  border: none;
  padding: 3px 8px;
  font-size: 11px;
  color: #aaa;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.12s;
  line-height: 1.4;
  white-space: nowrap;
}

.net-icon-btn:hover { background: #ebebeb; color: #333; }
.net-icon-del:hover  { background: var(--negative-tint); color: var(--negative); }

/* ─── 빈 상태 / 검색 결과 없음 ──────────── */
.net-empty-box {
  text-align: center;
  padding: 60px 24px;
}

.net-empty-title {
  font-size: 15px;
  font-weight: 600;
  color: #ccc;
  margin-bottom: 8px;
}

.net-empty-desc {
  font-size: 13px;
  color: #d0d0d0;
}

.net-no-result {
  font-size: 13px;
  color: #ccc;
  padding: 24px 0;
}

/* ─── 모달 내 섹션 라벨 ─────────────────── */
.form-section-label {
  font-size: 11px;
  font-weight: 700;
  color: #aaa;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 6px 0 2px;
  border-top: 1px solid #f0f0f0;
  margin: 8px 0 4px;
}

/* ─── 상세 모달 내용 ────────────────────── */
.net-detail-name {
  font-size: 20px;
  font-weight: 700;
  color: #111;
  margin-bottom: 14px;
}

.net-detail-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 13px;
}

.net-detail-row:last-of-type { border-bottom: none; }

.net-detail-label {
  font-size: 11px;
  font-weight: 600;
  color: #aaa;
  min-width: 48px;
  flex-shrink: 0;
}

.net-detail-link {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.net-detail-memo {
  font-size: 13px;
  color: #666;
  background: #f9f9f9;
  border-radius: 5px;
  padding: 10px 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  margin-top: 12px;
}

/* ─── 계약서 ─────────────────────────────────────────────────── */

.ct-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.ct-filter-bar input[type="text"] {
  flex: 1;
  min-width: 160px;
  padding: 9px 14px;
  border: 1px solid #eee;
  border-radius: 12px;
  font-size: 13.5px;
  background: #fafafa;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.ct-filter-bar input[type="text"]:focus {
  outline: none;
  border-color: #111;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(17,17,17,0.06);
}

.ct-filter-bar select {
  padding: 8px 12px;
  border: 1px solid #eee;
  border-radius: 12px;
  font-size: 13px;
  background: #fafafa;
  cursor: pointer;
}

.ct-filter-bar select:focus { outline: none; border-color: #111; }

.ct-counter {
  font-size: 12px;
  color: #aaa;
  white-space: nowrap;
  margin-left: auto;
}

/* 카드 그리드 */
.ct-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.ct-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 16px;
  padding: 18px;
  cursor: pointer;
  min-height: 150px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}

.ct-card:hover {
  border-color: #ddd;
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}

/* 상단: 유형 뱃지 + 액션 */
.ct-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.ct-card-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.ct-icon-btn {
  font-size: 11px;
  padding: 4px 9px;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #fff;
  color: #495057;
  cursor: pointer;
  line-height: 1.4;
  transition: background 0.1s, border-color 0.1s;
}
.ct-icon-btn:hover { background: #f1f3f5; }
.ct-icon-del:hover { background: var(--negative-tint); color: var(--negative); border-color: var(--negative); }

/* 제목 — 최대 2줄까지만 표시 */
.ct-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #212529;
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 당사자 — footer를 하단으로 밀어내는 flex 영역 */
.ct-card-parties {
  font-size: 13px;
  color: #495057;
  line-height: 1.5;
  margin-bottom: auto;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ct-card-parties.ct-muted { color: #adb5bd; }

/* 하단: 계약일 + 파일 */
.ct-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #f1f3f5;
}
.ct-card-date {
  font-size: 12px;
  color: #868e96;
}
.ct-file-badge {
  font-size: 11px;
  color: #868e96;
  background: #f1f3f5;
  border-radius: 10px;
  padding: 2px 9px;
}

/* 유형 뱃지 */
.ct-type-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 10px;
}
.ct-type-internal { background: var(--primary-tint); color: var(--primary-strong); }
.ct-type-external { background: #F2F4F6; color: var(--text-secondary); }
.ct-type-other    { background: #f1f3f5; color: #868e96; }

.ct-card-files {
  margin-top: 8px;
  border-top: 1px solid #f0f0f0;
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ct-card-file {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ct-file-name {
  font-size: 12px;
  color: #555;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ct-file-name:hover { color: #111; }

.ct-file-missing {
  color: #bbb;
  text-decoration: line-through;
}

.ct-file-warn {
  display: inline-block;
  margin-left: 4px;
  font-size: 10px;
  color: var(--negative);
  font-weight: 700;
}

.ct-file-loc-btn {
  font-size: 10px;
  padding: 1px 6px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background: none;
  color: #aaa;
  cursor: pointer;
  flex-shrink: 0;
}

.ct-file-loc-btn:hover { background: #f0f0f0; color: #555; }

/* 빈 상태 */
.ct-empty-box {
  text-align: center;
  padding: 48px 24px;
  color: #aaa;
}

.ct-empty-title { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.ct-empty-desc  { font-size: 13px; }

/* 모달 내 파일 목록 */
.ct-file-section { margin-top: 4px; }

.ct-modal-file {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #f4f4f4;
}

.ct-modal-file:last-child { border-bottom: none; }

.ct-modal-file .ct-file-name {
  flex: 1;
  text-decoration: none;
  cursor: default;
}

.ct-modal-file-btns {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

/* 날짜 2열 */
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* 토스트 */
.ct-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: #222;
  color: #fff;
  font-size: 13px;
  padding: 10px 20px;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
  z-index: 9999;
  white-space: nowrap;
}

.ct-toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── 핵심 질문 ──────────────────────────────────────────────── */

.q-input-bar {
  margin-bottom: 16px;
}

.q-input-bar textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 7px;
  font-size: 14px;
  resize: none;
  overflow: hidden;
  line-height: 1.5;
  min-height: 40px;
  transition: border-color 0.15s;
}

.q-input-bar textarea:focus {
  outline: none;
  border-color: #888;
}

/* 필터 바 */
.q-filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.q-filter-bar select {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  color: #333;
  cursor: pointer;
}

.q-filter-bar select:focus {
  outline: none;
  border-color: #888;
}

/* 그룹 헤더 */
.q-group {
  margin-bottom: 24px;
}

.q-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #eee;
}

.q-group-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  background: #f0f0f0;
  color: #555;
}

.q-group-label[data-status="exploring"] { background: #f0f0f0; color: #333; }
.q-group-label[data-status="open"]      { background: #f0f0f0; color: #333; }
.q-group-label[data-status="answered"]  { background: #111; color: #fff; }
.q-group-label[data-status="archived"]  { background: #f0f0f0; color: #aaa; }

.q-group-count {
  font-size: 12px;
  color: #aaa;
}

/* 질문 카드 */
.q-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.q-card:hover {
  border-color: #bbb;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.q-card-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.q-status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.q-status-badge[data-status="open"]      { background: #f0f0f0; color: #555; }
.q-status-badge[data-status="exploring"] { background: #e8e8e8; color: #333; border: 1px solid #ccc; }
.q-status-badge[data-status="answered"]  { background: #111; color: #fff; }
.q-status-badge[data-status="archived"]  { background: #f5f5f5; color: #bbb; }

.q-cat-badge {
  font-size: 11px;
  color: #888;
  padding: 2px 6px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
}

.q-card-time {
  font-size: 11px;
  color: #bbb;
  margin-left: auto;
}

.q-card-question {
  font-size: 14px;
  font-weight: 500;
  color: #111;
  line-height: 1.55;
  white-space: pre-wrap;
}

.q-card-answer {
  margin-top: 8px;
  font-size: 13px;
  color: #666;
  line-height: 1.55;
  white-space: pre-wrap;
  padding-top: 8px;
  border-top: 1px solid #f0f0f0;
}

/* 빈 상태 */
.q-empty-box {
  text-align: center;
  padding: 48px 24px;
  color: #aaa;
}

.q-empty-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.q-empty-desc {
  font-size: 13px;
}

/* ─── 자료/레포트 (Knowledge) ─────────────────────────────────────── */

.kn-filter-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.kn-search {
  flex: 1;
  min-width: 200px;
  padding: 7px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
}

.kn-search:focus {
  border-color: #bbb;
}

.kn-counter {
  font-size: 12px;
  color: #aaa;
  white-space: nowrap;
}

.kn-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.kn-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 16px 18px;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.kn-card:hover {
  box-shadow: 0 3px 12px rgba(0,0,0,0.08);
  border-color: #ccc;
}

.kn-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.kn-source {
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: #555;
  border-radius: 4px;
  padding: 2px 7px;
  letter-spacing: 0.2px;
}

.kn-date {
  font-size: 12px;
  color: #aaa;
}

.kn-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #111;
  line-height: 1.4;
  margin-bottom: 6px;
}

.kn-card-summary {
  font-size: 12px;
  color: #777;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kn-badges {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.kn-badge {
  font-size: 11px;
  color: #888;
  background: #f4f4f4;
  border-radius: 4px;
  padding: 2px 7px;
}

.kn-empty-box {
  text-align: center;
  padding: 64px 24px;
  color: #aaa;
}

.kn-empty-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.kn-empty-desc {
  font-size: 13px;
}

/* ─── 일정 관리 (Schedule) ────────────────────────────────────────── */

/* 컨트롤 바 */
.sc-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.sc-nav-group {
  display: flex;
  gap: 4px;
}

.sc-nav-btn {
  padding: 5px 12px;
  background: #fff;
  border: 1px solid #DEE2E6;
  border-radius: 5px;
  font-size: 13px;
  color: #495057;
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s;
  font-weight: 500;
}
.sc-nav-btn:hover { background: #F1F3F5; border-color: #CED4DA; }

.sc-nav-title {
  font-size: 15px;
  font-weight: 700;
  flex: 1;
  color: #212529;
  letter-spacing: -0.3px;
}

.sc-view-select {
  padding: 5px 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 13px;
  color: #444;
  background: #fff;
  cursor: pointer;
  outline: none;
}

/* 담당자 범례 + 필터 바 */
.sc-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  background: #F8F9FA;
  border: 1px solid #E9ECEF;
  border-radius: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.sc-legend-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.sc-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: #495057;
  padding: 3px 8px;
  background: #fff;
  border: 1px solid #DEE2E6;
  border-radius: 20px;
  white-space: nowrap;
}

.sc-legend-none {
  color: #868E96;
}
.sc-legend-divider {
  width: 1px;
  height: 16px;
  background: #DEE2E6;
  margin: 0 4px;
  display: inline-block;
  vertical-align: middle;
}
.sc-legend-type { color: #495057; }

.sc-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.sc-filter-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.sc-filter-label {
  font-size: 12px;
  font-weight: 500;
  color: #6C757D;
  white-space: nowrap;
}

.sc-filter-select {
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid #CED4DA;
  border-radius: 5px;
  background: #fff;
  color: #333;
  outline: none;
  cursor: pointer;
}
.sc-filter-select:focus { border-color: #666; }

/* ─── FullCalendar 오버라이드 ─────────────────── */

/* 기본 폰트 */
.fc {
  font-family: 'Pretendard Variable', 'Pretendard', -apple-system, sans-serif !important;
}

/* 기본 툴바 숨김 (커스텀 컨트롤 사용) */
.fc .fc-toolbar { display: none !important; }

/* 요일 헤더 */
.fc .fc-col-header-cell {
  background: #fafafa;
  border-bottom: 1px solid #e8e8e8;
}
.fc .fc-col-header-cell-cushion {
  padding: 8px 4px;
  font-size: 12px;
  font-weight: 600;
  color: #777;
  text-decoration: none !important;
}
/* 일/토 헤더 색상 */
.fc .fc-day-sun .fc-col-header-cell-cushion { color: #DC2626; }
.fc .fc-day-sat .fc-col-header-cell-cushion { color: #2563EB; }

/* 날짜 숫자 */
.fc .fc-daygrid-day-number {
  font-size: 12px;
  color: #555;
  padding: 4px 6px;
  text-decoration: none !important;
}
.fc .fc-day-sun .fc-daygrid-day-number { color: #DC2626; }
.fc .fc-day-sat .fc-daygrid-day-number { color: #2563EB; }

/* 오늘 날짜 강조 */
.fc .fc-day-today {
  background: rgba(17,17,17,0.03) !important;
}
.fc .fc-day-today .fc-daygrid-day-number {
  background: #111;
  color: #fff !important;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 3px 4px;
  font-size: 11px;
}

/* 주말 셀 배경 */
.fc .fc-day-sun,
.fc .fc-day-sat {
  background: #fdfcfc;
}

/* 일정 이벤트 공통 */
.fc .fc-event {
  border-radius: 4px !important;
  font-size: 11.5px !important;
  font-weight: 500 !important;
  padding: 2px 6px !important;
  cursor: pointer !important;
  transition: filter 0.12s !important;
  letter-spacing: 0 !important;
}
.fc .fc-event:hover { filter: brightness(0.93); }
.fc .fc-event-title { font-size: inherit !important; }


/* "더 보기" 링크 */
.fc .fc-daygrid-more-link {
  font-size: 11px;
  color: #888;
}

/* 주간 뷰 시간 컬럼 */
.fc .fc-timegrid-slot {
  height: 36px;
}
.fc .fc-timegrid-slot-label-cushion {
  font-size: 11px;
  color: #aaa;
}

/* 셀 테두리 */
.fc .fc-scrollgrid {
  border-color: #e8e8e8 !important;
}
.fc td, .fc th {
  border-color: #e8e8e8 !important;
}

/* 캘린더 전체 최소 높이 */
#sc-calendar {
  min-height: 580px;
}

/* ─── 계정 관리 (Vault) ──────────────────────────────────────────────── */

.vault-loading {
  padding: 60px;
  text-align: center;
  color: #888;
  font-size: 14px;
}

/* 인증 화면 (setup / lock) */
.vault-center-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 60px 24px;
}

.vault-auth-box {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 20px;
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

.vault-auth-title {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  color: #111;
}

.vault-auth-desc {
  font-size: 13px;
  color: #666;
  text-align: center;
  line-height: 1.6;
}

.vault-hint-area {
  display: none;
  font-size: 12px;
  color: #888;
  background: #f8f8f8;
  border-radius: 6px;
  padding: 8px 12px;
  text-align: center;
}

.vault-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vault-field label {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

.vault-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.vault-input:focus {
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(17,17,17,0.06);
}

.vault-pw-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vault-pw-wrap .vault-input,
.vault-pw-wrap .form-input {
  flex: 1;
}

.vault-eye-btn {
  background: none;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  flex-shrink: 0;
}

.vault-eye-btn:hover {
  background: #f5f5f5;
}

.vault-error {
  font-size: 13px;
  font-weight: 600;
  color: var(--negative);
  min-height: 18px;
}

.vault-auth-btn {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
}

/* 메인 화면 */
.vault-main-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 4px 0;
}

.vault-main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.vault-main-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.vault-main-header-right {
  display: flex;
  gap: 8px;
}

.vault-lock-status {
  font-size: 14px;
  font-weight: 600;
  color: #111;
}

.vault-session-info {
  font-size: 12px;
  color: #888;
  font-variant-numeric: tabular-nums;
}

.vault-lock-btn {
  font-size: 13px;
}

/* 검색/필터 바 */
.vault-filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.vault-search {
  flex: 1;
  min-width: 200px;
  padding: 10px 16px;
  border: 1px solid #eee;
  border-radius: 12px;
  font-size: 14px;
  background: #fafafa;
  outline: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.vault-search:focus {
  border-color: #111;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(17,17,17,0.06);
}

.vault-select {
  padding: 9px 12px;
  border: 1px solid #eee;
  border-radius: 12px;
  font-size: 14px;
  background: #fafafa;
  cursor: pointer;
  outline: none;
}

/* 카드 그리드 */
.vault-group-label {
  font-size: 11px;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 8px 0 4px;
  margin-top: 8px;
  border-bottom: 1px solid #f0f0f0;
}

.vault-card-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.vault-card {
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  transition: box-shadow 0.15s, border-color 0.15s;
}

.vault-card:hover {
  border-color: #ddd;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.vault-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.vault-card-name {
  font-size: 15px;
  font-weight: 700;
  color: #111;
}

.vault-card-actions {
  display: flex;
  gap: 6px;
}

.vault-card-btn {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  color: #333;
  transition: background 0.12s, border-color 0.12s;
}

.vault-card-btn:hover {
  background: #f5f5f5;
}

.vault-card-btn-danger {
  color: #888;
}

.vault-card-btn-danger:hover {
  background: var(--negative-tint);
  color: var(--negative);
  border-color: var(--negative);
}

.vault-card-email {
  font-size: 13px;
  color: #555;
}

.vault-card-pw-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.vault-pw-label {
  font-size: 12px;
  color: #888;
  width: 54px;
  flex-shrink: 0;
}

.vault-pw-val {
  font-size: 13px;
  font-family: monospace;
  color: #333;
  min-width: 80px;
  letter-spacing: .05em;
}

.vault-card-url a {
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
}

.vault-card-url a:hover {
  text-decoration: underline;
}

.vault-card-cost {
  font-size: 12px;
  color: #333;
  font-weight: 600;
}

.vault-card-plan {
  font-size: 12px;
  color: #888;
}

.vault-empty {
  padding: 60px 24px;
  text-align: center;
  color: #aaa;
  font-size: 14px;
  line-height: 1.8;
}

/* 비용 요약 */
.vault-cost-box {
  background: #fafafa;
  border: 1px solid #f0f0f0;
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.vault-cost-label {
  font-size: 13px;
  color: #666;
}

.vault-cost-val {
  font-size: 18px;
  font-weight: 700;
  color: #111;
}

.vault-cost-sub {
  font-size: 11px;
  color: #aaa;
}

/* ═══════════════════════════════════════════════════════
   회계 모듈 v2
   ═══════════════════════════════════════════════════════ */

/* 빈 상태 */
.acc-empty {
  color: #aaa;
  font-size: 14px;
  padding: 32px 0;
  text-align: center;
}

/* 카테고리 관리 */
.cat-scope-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}
.cat-scope-btn {
  padding: 7px 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all .15s;
}
.cat-scope-btn:hover { background: var(--surface-soft); }
.cat-scope-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.cat-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.cat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
}
.cat-row-name { font-size: 14px; font-weight: 600; color: var(--text); }
.cat-row-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* 계좌 카드 */
/* ── 계좌/카드 섹션 ── */
.acc-section { margin-bottom: 24px; }
.acc-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #343a40;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.acc-section-count {
  font-size: 11px;
  font-weight: 600;
  color: #868e96;
  background: #f1f3f5;
  border-radius: 10px;
  padding: 1px 8px;
}
.acc-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.acc-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 16px;
  padding: 18px 20px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.1s;
}
.acc-card:hover { box-shadow: 0 6px 16px rgba(0,0,0,0.06); border-color: #ddd; transform: translateY(-1px); }

.acc-card-top {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
}
.acc-card-name {
  font-size: 15px;
  font-weight: 700;
  color: #212529;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acc-card-alias {
  font-size: 12.5px;
  color: #868e96;
  margin-top: -4px;
  margin-bottom: 6px;
}
.acc-card-bank {
  font-size: 12px;
  color: #868e96;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}
.acc-card-bal {
  font-size: 22px;
  font-weight: 700;
  color: #212529;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}
.acc-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: auto;
}
.acc-info-row {
  display: flex;
  font-size: 12.5px;
  color: #495057;
}
.acc-info-k {
  width: 56px;
  flex-shrink: 0;
  color: #adb5bd;
}
.acc-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #f1f3f5;
}
.acc-mini-btn {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 13px;
  border: 1px solid #eee;
  border-radius: 9px;
  background: #fff;
  color: #495057;
  cursor: pointer;
  transition: background 0.1s;
}
.acc-mini-btn:hover { background: #f1f3f5; }
.acc-mini-del { color: #888; }
.acc-mini-del:hover { background: var(--negative-tint); color: var(--negative); border-color: var(--negative); }

/* 거래 카테고리 뱃지 */
.tx-cat-badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}
.tx-cat-badge.tx-cat-매출 { background: var(--positive-tint); color: var(--positive); }
.tx-cat-badge.tx-cat-매입 { background: var(--negative-tint); color: var(--negative); }
.tx-cat-badge.tx-cat-이체 { background: var(--primary-tint); color: var(--primary-strong); }
.tx-cat-badge.tx-cat-급여 { background: var(--warning-tint); color: #92660A; }
.tx-cat-badge.tx-cat-기타 { background: #f3f3f3; color: #888; }

/* ─── 급여 대장 ─────────────────────────────────────────── */
.payroll-month-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.payroll-month-nav #payroll-period-label {
  font-size: 17px;
  font-weight: 700;
  min-width: 130px;
  text-align: center;
}
.payroll-nav-btn {
  border: 1px solid #e5e5e5;
  background: #fff;
  border-radius: 10px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 14px;
  color: #374151;
  transition: background 0.12s;
}
.payroll-nav-btn:hover { background: #f3f4f6; }
.payroll-status {
  display: inline-block;
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 10px;
  font-weight: 600;
}
.payroll-status.ps-unpaid  { background: var(--negative-tint); color: var(--negative); }
.payroll-status.ps-partial { background: var(--warning-tint); color: #92660A; }
.payroll-status.ps-paid    { background: var(--positive-tint); color: var(--positive); }
.emp-card {
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.emp-card.emp-resigned { opacity: 0.55; }
.emp-card .emp-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: #f0f0f0;
  color: #111;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; flex-shrink: 0;
}
.payroll-exp-input {
  width: 110px;
  padding: 6px 9px;
  border: 1px solid #e5e5e5;
  border-radius: 9px;
  font-size: 13px;
  text-align: right;
  background: #fff;
}
.payroll-exp-input:hover { border-color: #9ca3af; }
.payroll-exp-input:focus { outline: none; border-color: #111; box-shadow: 0 0 0 2px rgba(0,0,0,0.08); }
.pay-history-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  margin-bottom: 6px;
  font-size: 13px;
}

/* 거래 상세 행 */
.tx-detail {
  padding: 10px 12px;
  background: #fafafa;
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.tx-detail-item { color: #555; }
.tx-detail-item b { color: #111; }

/* 정기 항목 로그 섹션 */
.rec-log-section {
  margin-top: 24px;
}
.rec-log-header {
  font-size: 14px;
  font-weight: 700;
  color: #111;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e8e8e8;
}
.rec-log-status {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}
.log-pending    { background: var(--warning-tint); color: #92660A; }
.log-registered { background: var(--positive-tint); color: var(--positive); }
.log-skipped    { background: #f0f0f0; color: #aaa; }

/* 세무사 자료 탭 */
.tax-period-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.tax-period-btn {
  padding: 7px 15px;
  border: 1px solid #eee;
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: #555;
  transition: all .15s;
}
.tax-period-btn:hover { background: #f5f5f5; }
.tax-period-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.tax-range-label {
  font-size: 12px;
  color: #888;
  margin-bottom: 14px;
}
.tax-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.tax-summary-card {
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.tax-summary-card.highlight {
  border-color: var(--primary);
  background: var(--primary-tint);
}
.tax-summary-label {
  font-size: 11px;
  color: #888;
  margin-bottom: 4px;
}
.tax-summary-value {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.tax-checklist-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.tax-check-item {
  font-size: 13px;
  padding: 9px 13px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tax-check-ok   { background: var(--positive-tint); color: var(--positive); }
.tax-check-warn { background: var(--negative-tint); color: var(--negative); font-weight: 600; }
.tax-check-note { font-size: 12px; color: #999; }

/* ─── 거래 첨부파일 ─────────────────────────────────────── */
.acc-file-list {
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  padding: 8px 10px;
  min-height: 36px;
  background: #fafafa;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}
.acc-file-empty {
  font-size: 12px;
  color: #bbb;
}
.acc-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.acc-file-link {
  font-size: 13px;
  color: #111;
  text-decoration: underline;
  text-underline-offset: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 320px;
}
.acc-file-link:hover { color: #555; }
.acc-file-del {
  background: none;
  border: none;
  color: #bbb;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
  padding: 0 2px;
}
.acc-file-del:hover { color: #111; }
.acc-attach-btn {
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border: 1.5px dashed #ccc;
  border-radius: 10px;
  background: #fff;
  color: #555;
  cursor: pointer;
  width: 100%;
  transition: all .15s;
}
.acc-attach-btn:hover { border-color: #111; color: #111; background: #f5f5f5; }

/* 거래 내역 테이블 - 설명 컬럼이 넓어질 수 있어 가로 스크롤 허용 */
.table-wrap.tx-scroll-wrap { overflow-x: auto; overflow-y: hidden; }

/* 거래 목록 행 첨부파일 컬럼 */
.tx-file-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}
.acc-file-icon {
  display: inline-flex;
  color: #999;
  line-height: 0;
}
.acc-file-icon:hover { color: #111; }

/* 거래 목록 행 더보기(수정/삭제) 메뉴 */
.tx-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 7px;
  color: #999;
  border-radius: 6px;
}
.tx-more-btn:hover { background: #f0f0f0; color: #111; }
.tx-more-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  overflow: hidden;
  min-width: 88px;
  z-index: 20;
}
.tx-more-menu.open { display: block; }
.tx-more-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 14px;
  font-size: 13px;
  background: none;
  border: none;
  cursor: pointer;
  color: #333;
}
.tx-more-menu button:hover { background: #f5f5f5; }
.tx-more-menu button.tx-more-danger { color: #d33; }

/* ══════════════════════════════════════════════════════════════════════════════
   카리브 익스포트 어드민 (cariv-admin)
══════════════════════════════════════════════════════════════════════════════ */

/* 프로젝트 카드 어드민 강조 */
.proj-card-admin {
  border-left: 3px solid #4f46e5;
  background: #fafafe;
}
.proj-card-admin:hover { background: #f0f0fd; }
.proj-admin-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  background: #4f46e5;
  color: #fff;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* 어드민 헤더 */
.cv-hdr {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  height: 52px;
  background: #1e1b4b;
  color: #fff;
  flex-shrink: 0;
}
.cv-back-btn {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.cv-back-btn:hover { background: rgba(255,255,255,.2); }
.cv-hdr-center {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.cv-hdr-badge {
  background: #4f46e5;
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
}
.cv-hdr-count { font-size: 13px; color: rgba(255,255,255,.6); white-space: nowrap; }

/* 어드민 본체 2단 레이아웃 */
.cv-body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* 좌: 업체 목록 */
.cv-left {
  width: 280px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cv-list-top {
  padding: 12px;
  display: flex;
  gap: 8px;
  border-bottom: 1px solid #f0f0f0;
}
.cv-search-input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  min-width: 0;
}
.cv-search-input:focus { border-color: #4f46e5; }
.cv-list-filters {
  padding: 8px 12px;
  display: flex;
  gap: 6px;
  border-bottom: 1px solid #f0f0f0;
}
.cv-list-filters select {
  flex: 1;
  padding: 5px 6px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 12px;
  color: #555;
  outline: none;
  min-width: 0;
}
.cv-items { flex: 1; overflow-y: auto; }

/* 업체 목록 행 */
.cv-company-row {
  padding: 10px 12px;
  border-bottom: 1px solid #f5f5f5;
  cursor: pointer;
  transition: background .1s;
}
.cv-company-row:hover  { background: #f8f8fc; }
.cv-company-row.active { background: #ede9fe; }
.cv-row-name { font-size: 13px; font-weight: 600; color: #111; margin-bottom: 2px; }
.cv-row-meta { font-size: 12px; color: #888; margin-bottom: 4px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.cv-tag { background: #f0f0f0; border-radius: 3px; padding: 1px 5px; font-size: 11px; color: #666; }
.cv-row-badges { display: flex; gap: 4px; flex-wrap: wrap; }

/* 우: 상세 */
.cv-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f0f2f5;
}
.cv-no-sel {
  flex: 1;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 15px;
}
.cv-detail-hdr {
  padding: 12px 20px 0;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}
.cv-detail-hdr h3 { font-size: 16px; font-weight: 700; padding-bottom: 12px; }

/* 탭 네비 */
.cv-tabs {
  display: flex;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  overflow-x: auto;
  flex-shrink: 0;
  scrollbar-width: none;
}
.cv-tabs::-webkit-scrollbar { display: none; }
.cv-tab-btn {
  padding: 10px 14px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 13px;
  color: #888;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.cv-tab-btn:hover  { color: #4f46e5; }
.cv-tab-btn.active { color: #4f46e5; border-bottom-color: #4f46e5; font-weight: 600; }

/* 탭 패널 공통 */
.cv-tab-content {
  padding: 20px;
  max-width: 860px;
}
.cv-section {
  background: #fff;
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 16px;
  border: 1px solid #e5e7eb;
}
.cv-section-hdr {
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cv-hdr-btn {
  font-size: 12px !important;
  padding: 3px 10px !important;
  margin-left: auto;
}
.cv-form-row { display: flex; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.cv-fg { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 120px; }
.cv-fg label { font-size: 12px; color: #6b7280; font-weight: 500; }
.cv-fg input, .cv-fg select, .cv-fg textarea {
  padding: 7px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
  background: #fff;
}
.cv-fg input:focus, .cv-fg select:focus, .cv-fg textarea:focus { border-color: #4f46e5; }
.cv-fg textarea { resize: vertical; min-height: 60px; }
.cv-empty { color: #aaa; font-size: 13px; text-align: center; padding: 16px 0; }

/* 단계 바 */
.cv-stage-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 16px 18px 12px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.cv-stage-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background .15s;
  flex: 1;
  min-width: 80px;
}
.cv-stage-step:hover { background: #f0f0fd; }
.cv-stage-step.done .cv-stage-circle { background: #a5b4fc; color: #fff; }
.cv-stage-step.active .cv-stage-circle { background: #4f46e5; color: #fff; box-shadow: 0 0 0 3px #c7d2fe; }
.cv-stage-circle {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #9ca3af;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  transition: background .15s;
}
.cv-stage-lbl { font-size: 11px; color: #6b7280; text-align: center; }
.cv-stage-step.active .cv-stage-lbl { color: #4f46e5; font-weight: 600; }
.cv-stage-step.done .cv-stage-lbl  { color: #818cf8; }
.cv-stage-arrow { color: #d1d5db; font-size: 18px; padding: 0 2px; align-self: flex-start; margin-top: 8px; }

/* 상태 칩 */
.cv-status-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.cv-chip {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all .15s;
}
.cv-chip-normal  { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.cv-chip-noshow  { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.cv-chip-hold    { background: #f0f9ff; color: #0369a1; border-color: #bae6fd; }
.cv-chip-reject  { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.cv-chip-churn   { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.cv-chip.active  { box-shadow: 0 0 0 2px currentColor; font-weight: 700; }

/* 연락 로그 카드 */
.cv-log-card {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: #fafafa;
}
.cv-log-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.cv-log-dt { font-size: 12px; color: #6b7280; }
.cv-ch-badge { background: #e0e7ff; color: #3730a3; border-radius: 4px; padding: 1px 7px; font-size: 11px; font-weight: 600; }
.cv-log-summary { font-size: 13px; color: #374151; line-height: 1.5; }
.btn-link { background: none; border: none; color: #4f46e5; font-size: 12px; cursor: pointer; padding: 0; }
.btn-link:hover { text-decoration: underline; }
.cv-danger-link { color: #dc2626 !important; }

/* 구독 카드 */
.cv-sub-card { transition: background .2s; }
.cv-sub-warn { background: #fffbeb !important; border-color: #fde68a !important; }
.cv-sub-warn .cv-section-hdr { color: #92400e; }
.cv-days-left { color: #374151; }
.cv-days-warn { color: #d97706 !important; }
.cv-warn-msg { font-size: 12px; color: #b45309; margin-top: 8px; font-weight: 500; }

/* 테이블 */
.cv-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cv-table th { text-align: left; padding: 7px 10px; border-bottom: 2px solid #e5e7eb; color: #6b7280; font-weight: 600; white-space: nowrap; }
.cv-table td { padding: 8px 10px; border-bottom: 1px solid #f3f4f6; color: #374151; vertical-align: middle; }
.cv-table tr:hover td { background: #fafafa; }
.cv-dt-cell { font-size: 12px; color: #9ca3af; white-space: nowrap; }
.cv-muted { color: #9ca3af !important; }
.cv-pay-miss-row td { background: #fff5f5 !important; }
.cv-tkt-table td { cursor: pointer; }

/* 배지 */
.cv-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
/* 단계 */
.cv-s0  { background: #f3f4f6; color: #6b7280; }
.cv-s1  { background: #f0f9ff; color: #0369a1; }
.cv-s2  { background: #faf5ff; color: #7e22ce; }
.cv-s3  { background: #fff7ed; color: #c2410c; }
.cv-s4  { background: #fefce8; color: #a16207; }
.cv-s5  { background: #f0fdf4; color: #166534; }
/* 상태 */
.cv-st-normal { background: #f0fdf4; color: #166534; }
.cv-st-noshow { background: #fef3c7; color: #92400e; }
.cv-st-hold   { background: #f0f9ff; color: #0369a1; }
.cv-st-reject { background: #fff7ed; color: #9a3412; }
.cv-st-churn  { background: #fef2f2; color: #991b1b; }
/* 결제 */
.cv-pay-ok      { background: #d1fae5; color: #065f46; }
.cv-pay-miss    { background: #fee2e2; color: #991b1b; }
.cv-pay-partial { background: #fef3c7; color: #92400e; }
/* 티켓 우선순위 */
.cv-pri-urgent { background: #fee2e2; color: #991b1b; }
.cv-pri-high   { background: #ffedd5; color: #9a3412; }
.cv-pri-normal { background: #f3f4f6; color: #374151; }
.cv-pri-low    { background: #e0f2fe; color: #0369a1; }
/* 티켓 상태 */
.cv-tkt-new      { background: #e0e7ff; color: #3730a3; }
.cv-tkt-progress { background: #fef3c7; color: #92400e; }
.cv-tkt-wait     { background: #f3f4f6; color: #6b7280; }
.cv-tkt-done     { background: #d1fae5; color: #065f46; }
.cv-tkt-hold     { background: #fff7ed; color: #c2410c; }

/* 공지 박스 / 차트 placeholder */
.cv-notice-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 13px;
  color: #1e40af;
  line-height: 1.6;
  margin-bottom: 16px;
}
.cv-chart-placeholder {
  background: #f9fafb;
  border: 2px dashed #e5e7eb;
  border-radius: 8px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d1d5db;
  font-size: 14px;
}

/* 검색 인라인 */
.cv-inline-search {
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  width: 180px;
}
.cv-inline-search:focus { border-color: #4f46e5; }

/* CS 티켓 모달 */
.cv-ticket-modal {
  width: 700px !important;
  max-height: 90vh;
  overflow-y: auto;
}

/* 반응형: 좁은 화면 */
@media (max-width: 900px) {
  .cv-body { flex-direction: column; }
  .cv-left { width: 100%; height: 200px; border-right: none; border-bottom: 1px solid #e5e7eb; }
  .cv-ticket-modal { width: 95vw !important; }
}

/* ── 신청 대기 패널 ─────────────────────────────────────────────────────── */
.cv-panel-tabs {
  display: flex;
  border-bottom: 2px solid #e5e7eb;
  flex-shrink: 0;
}
.cv-panel-tab-btn {
  flex: 1;
  padding: 9px 6px;
  font-size: 13px;
  font-weight: 500;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  color: #6b7280;
  transition: color .15s, border-color .15s;
}
.cv-panel-tab-btn.active {
  color: #4f46e5;
  border-bottom-color: #4f46e5;
  font-weight: 600;
}
.cv-app-filter-row {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  flex-shrink: 0;
}
.cv-app-filter-btn {
  padding: 4px 12px;
  font-size: 12px;
  border: 1px solid #d1d5db;
  border-radius: 20px;
  background: #fff;
  cursor: pointer;
  color: #374151;
  transition: all .15s;
}
.cv-app-filter-btn.active {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
}
.cv-app-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 14px;
  margin: 0 10px 10px;
  transition: border-color .2s;
}
.cv-app-card-warn   { border-color: #f59e0b; border-left: 3px solid #f59e0b; }
.cv-app-card-urgent { border-color: #ef4444; border-left: 3px solid #ef4444; }
.cv-app-card-done   { opacity: .75; background: #f9fafb; }
.cv-app-card-hdr {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.cv-app-company-name { font-size: 14px; font-weight: 600; color: #111; }
.cv-app-date  { font-size: 12px; color: #6b7280; margin-bottom: 6px; }
.cv-app-info  { font-size: 12px; color: #4b5563; line-height: 1.6; margin-bottom: 8px; }
.cv-app-meta  { font-size: 12px; color: #6b7280; margin-bottom: 6px; }
.cv-app-reject-reason { font-size: 12px; color: #c44; margin-bottom: 6px; }
.cv-app-age-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 12px;
}
.cv-app-age-warn   { background: #fef3c7; color: #92400e; }
.cv-app-age-urgent { background: #fee2e2; color: #991b1b; }
.cv-app-status-icon {
  font-size: 13px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cv-app-approved { background: #d1fae5; color: #065f46; }
.cv-app-rejected { background: #fee2e2; color: #991b1b; }
.cv-app-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.cv-app-approve-btn {
  background: #4f46e5;
  color: #fff;
  border: none;
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}
.cv-app-approve-btn:hover { background: #4338ca; }
.cv-app-reject-btn {
  background: #ef4444;
  color: #fff;
  border: none;
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}
.cv-app-reject-btn:hover { background: #dc2626; }
/* 헤더 신청 배지 */
.cv-hdr-app-badge {
  background: #ef4444;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
}
/* 상세 테이블 */
.cv-detail-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cv-detail-table th {
  width: 120px;
  text-align: left;
  color: #6b7280;
  font-weight: 500;
  padding: 5px 8px 5px 0;
  vertical-align: top;
}
.cv-detail-table td { padding: 5px 0; color: #111; }
/* 승인 확인 모달 */
.cv-approve-checklist {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 2;
  color: #166534;
  margin-bottom: 12px;
}
.cv-approve-warning {
  font-size: 12px;
  color: #dc2626;
  margin: 0;
}

/* ══════════════════════════════════════════════════════════════════════════════
   법인 서류함 (company documents) — 블랙 앤 화이트
══════════════════════════════════════════════════════════════════════════════ */

.cd-filter-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.cd-search {
  flex: 1;
  min-width: 200px;
  padding: 10px 16px;
  border: 1px solid #eee;
  border-radius: 12px;
  font-size: 14px;
  color: #111;
  background: #fafafa;
  outline: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.cd-search::placeholder { color: #bbb; }
.cd-search:focus { border-color: #111; background: #fff; box-shadow: 0 0 0 3px rgba(17,17,17,0.06); }
.cd-counter {
  font-size: 12px;
  color: #999;
  white-space: nowrap;
}

/* 그룹 */
.cd-group { margin-bottom: 28px; }
.cd-group-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #111;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #111;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cd-group-count {
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: #111;
  border-radius: 9px;
  padding: 1px 8px;
}

/* 카드 그리드 */
.cd-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.cd-card {
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 16px;
  padding: 16px 18px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  transition: box-shadow 0.15s, transform 0.1s;
}
.cd-card:hover {
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}
.cd-card-expired { border-color: var(--negative); border-width: 1.5px; }
.cd-card-soon    { border-style: dashed; border-color: var(--warning); }

.cd-card-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 6px;
}
.cd-card-title {
  font-size: 14.5px;
  font-weight: 600;
  color: #111;
  line-height: 1.35;
}
.cd-card-meta {
  font-size: 12px;
  color: #888;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin-top: 4px;
}
.cd-meta-sep { color: #ccc; }
.cd-card-badges {
  margin-top: 10px;
  display: flex;
  gap: 6px;
}
.cd-no-file {
  font-size: 11px;
  color: #ccc;
  margin-top: 10px;
}

/* 배지 */
.cd-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 9px;
  white-space: nowrap;
}
.cd-badge-expired { background: var(--negative-tint); color: var(--negative); }
.cd-badge-soon    { background: var(--warning-tint); color: #92660A; }
.cd-badge-file    { background: #f2f2f2; color: #555; }

/* 빈 상태 */
.cd-empty-box {
  text-align: center;
  padding: 60px 20px;
  color: #bbb;
}
.cd-empty-title { font-size: 15px; font-weight: 600; color: #666; margin-bottom: 6px; }
.cd-empty-desc  { font-size: 13px; }

/* 상세 모달 */
.cd-detail-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cd-detail-row {
  display: flex;
  font-size: 13.5px;
  color: #111;
}
.cd-detail-k {
  width: 80px;
  flex-shrink: 0;
  color: #999;
  font-weight: 500;
}

/* ── 법인 서류함: 교체 필요 섹션 강조 ── */
.cd-group-replace {
  background: var(--negative-tint);
  border: 1px solid var(--negative);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 28px;
}
.cd-label-replace { color: var(--negative); border-bottom-color: var(--negative); }
.cd-count-replace { background: var(--negative); color: #fff; }

/* ══════════════════════════════════════════════════════════════════
   프로젝트 상세 / 파일 관리
══════════════════════════════════════════════════════════════════ */

/* 프로젝트 카드 — 클릭 가능 */
.proj-card.clickable { cursor: pointer; transition: box-shadow 0.15s; }
.proj-card.clickable:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.09); }

/* 상세 패널 헤더 */
.proj-detail-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.proj-detail-back {
  background: none;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  color: #555;
  cursor: pointer;
  white-space: nowrap;
}
.proj-detail-back:hover { background: #f5f5f5; }
.proj-detail-title { font-size: 18px; font-weight: 700; color: #111; }

/* 탭 */
.proj-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #e8e8e8;
  margin-bottom: 20px;
}
.proj-tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  color: #888;
  cursor: pointer;
}
.proj-tab-btn.active { color: #111; border-bottom-color: #111; }
.proj-tab-content { display: none; }
.proj-tab-content.active { display: block; }

/* 개요 탭 */
.proj-overview-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}
.proj-overview-note {
  font-size: 14px;
  color: #444;
  line-height: 1.7;
  white-space: pre-wrap;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 14px 16px;
  min-height: 60px;
}

/* 파일 탭 — 폴더 */
.pf-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}
.pf-empty {
  text-align: center;
  color: #aaa;
  padding: 40px 0;
  font-size: 14px;
  line-height: 1.8;
}
.pa-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
}
.pa-row-main { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.pa-row-name { font-size: 14px; font-weight: 600; color: var(--text); }
.pa-row-role { font-size: 13px; color: var(--text-secondary); }
.pa-row-actions { display: flex; gap: 6px; flex-shrink: 0; }

.pf-folder {
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}
.pf-folder-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #f8f8f8;
  cursor: pointer;
  user-select: none;
}
.pf-folder-header:hover { background: #f0f0f0; }
.pf-folder-toggle { font-size: 11px; color: #888; width: 14px; flex-shrink: 0; }
.pf-folder-name { font-size: 14px; font-weight: 600; color: #222; flex: 1; }
.pf-folder-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.1s;
}
.pf-folder:hover .pf-folder-actions { opacity: 1; }
.pf-folder-body { display: none; padding: 10px 16px 14px; }
.pf-folder-body.open { display: block; }

/* 파일 행 */
.pf-file-list { margin-bottom: 10px; }
.pf-file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  border-bottom: 1px solid #f0f0f0;
}
.pf-file-row:last-child { border-bottom: none; }
.pf-file-name { font-size: 13px; color: #333; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-file-size { font-size: 12px; color: #aaa; flex-shrink: 0; min-width: 56px; text-align: right; }
.pf-file-size.large { color: #e55; }
.pf-file-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.1s;
}
.pf-file-row:hover .pf-file-actions { opacity: 1; }
.pf-file-empty { font-size: 13px; color: #bbb; padding: 6px 4px; }
.pf-upload-btn {
  font-size: 12px;
  padding: 5px 12px;
  border: 1px dashed #bbb;
  border-radius: 6px;
  background: none;
  color: #777;
  cursor: pointer;
  margin-top: 4px;
}
.pf-upload-btn:hover { background: #f5f5f5; border-color: #999; }
.pf-upload-progress {
  font-size: 12px;
  color: #4a90d9;
  padding: 4px 0;
}

/* 버튼 — 소형 */
.btn-xs {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid #ddd;
  background: #fff;
  color: #555;
  cursor: pointer;
  white-space: nowrap;
}
.btn-xs:hover { background: #f5f5f5; }
.btn-xs.danger { border-color: #fca5a5; color: #dc2626; }
.btn-xs.danger:hover { background: #fef2f2; }

/* Toast */
.pf-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: #222;
  color: #fff;
  padding: 9px 20px;
  border-radius: 20px;
  font-size: 13px;
  z-index: 9999;
  pointer-events: none;
  animation: pfToastIn 0.2s ease;
  max-width: 90vw;
  text-align: center;
}
.pf-toast.error { background: #dc2626; }
@keyframes pfToastIn { from { opacity: 0; transform: translateX(-50%) translateY(8px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ══════════════════════════════════════════════════════════════════════════════
   팀원 관리 (team members) — 관리자 전용
══════════════════════════════════════════════════════════════════════════════ */

.tm-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.tm-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.tm-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}

.tm-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.tm-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.tm-card-email {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.tm-card-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.tm-menu-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tm-menu-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 8px;
  background: var(--primary-tint);
  color: var(--primary-strong);
}

.tm-menu-tag-none {
  background: #F2F4F6;
  color: var(--text-muted);
  font-weight: 500;
}

.tm-menu-tag-admin {
  background: var(--primary);
  color: #fff;
}

.tm-menu-tag-view {
  background: #F2F4F6;
  color: var(--text-secondary);
}

.tm-perm-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px 12px;
}

.tm-perm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
}

.tm-perm-row + .tm-perm-row {
  border-top: 1px solid var(--border);
}

.tm-perm-label {
  font-size: 13px;
  color: var(--text);
}

.tm-perm-select {
  font-size: 13px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.tm-loading {
  padding: 48px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.tm-empty-box {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.tm-empty-title { font-size: 15px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.tm-empty-desc  { font-size: 13px; }

/* ─── 보기 전용(view) 권한 UI ─────────────────────────────────────────
   팀원이 특정 메뉴에 view 권한만 가진 경우, 해당 패널에 .view-only 클래스가 붙고
   안내 배너가 표시되며 아래 규칙으로 추가/수정/삭제 컨트롤이 숨겨진다.
   보기/복사처럼 데이터를 바꾸지 않는 버튼은 계속 노출된다. */
.view-only-banner {
  background: var(--warning-tint);
  color: var(--warning);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
}

.panel.view-only .section-header .btn:not(.btn-outline) { display: none; }

/* 네트워크 */
.panel.view-only .net-card-actions { display: none; }

/* 계약서 */
.panel.view-only .ct-card-actions { display: none; }

/* 계정 관리(Vault) — 잠금 버튼, 비밀번호/메모 보기·복사는 유지 */
.panel.view-only .vault-main-header-right .btn:not(.vault-lock-btn) { display: none; }
.panel.view-only .vault-card-actions { display: none; }

/* 회계 관리 */
.panel.view-only .acc-card-actions { display: none; }
.panel.view-only #transaction-list button { display: none; }
.panel.view-only .rec-item-card > button { display: none; }
.panel.view-only .emp-card > button { display: none; }
.panel.view-only #payroll-list .btn:not(.btn-outline) { display: none; }
.panel.view-only .payroll-exp-input { pointer-events: none; background: var(--surface-soft); }
