/* ==========================================================================
   JP Smart Work Place - 총무팀 업무 전용 스타일시트 (style.css)
   담당: 김수현 총무 (Kim Su-hyun, General Affairs Team)
   ========================================================================== */

:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;
  
  --sidebar-bg: #fbfcfd;
  --sidebar-border: #e2e8f0;
  --sidebar-text: #334155;
  --sidebar-hover: #f1f5f9;
  
  --bg-main: #f8fafc;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --success-color: #10b981;
  --success-light: #ecfdf5;
  --warning-color: #f59e0b;
  --warning-light: #fffbeb;
  --danger-color: #ef4444;
  --danger-light: #fef2f2;
  --info-color: #0284c7;
  --info-light: #f0f9ff;
  
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

/* 글자 크기 배율 지원 */
body.font-size-80 { font-size: 11.5px; }
body.font-size-90 { font-size: 13px; }
body.font-size-100 { font-size: 14.5px; }
body.font-size-110 { font-size: 16px; }

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", Roboto, "Apple SD Gothic Neo", sans-serif;
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.45;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ================= 앱 전체 레이아웃 ================= */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* ================= 좌측 사이드바 (캡처 화면 100% 미러링) ================= */
.sidebar {
  width: 230px;
  min-width: 230px;
  background-color: #ffffff;
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: width 0.2s ease, min-width 0.2s ease;
  z-index: 20;
}

.sidebar.collapsed {
  width: 60px;
  min-width: 60px;
}

.sidebar.collapsed .brand-text,
.sidebar.collapsed .sidebar-user-block,
.sidebar.collapsed .menu-section-title,
.sidebar.collapsed .menu-item span,
.sidebar.collapsed .caret-down-icon,
.sidebar.collapsed .sidebar-footer .system-info {
  display: none !important;
}

.sidebar.collapsed .sidebar-header {
  padding: 12px 8px;
  justify-content: center;
}

.sidebar.collapsed .menu-item a {
  justify-content: center;
  padding: 9px 0;
}

/* 사이드바 상단 헤더 & 로고 */
.sidebar-header {
  padding: 14px 16px 12px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-badge {
  width: 32px;
  height: 32px;
  background-color: #2b3952;
  color: #ffffff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.brand-text h2 {
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.brand-text p {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

/* 사이드바 사용자 블록 (캡처 화면 직관적 배치) */
.sidebar-user-block {
  padding: 10px 16px 12px;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
}

.user-block-name {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.user-block-email {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

/* 메뉴 영역 */
.sidebar-menu-wrapper {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px;
}

.sidebar-menu-wrapper::-webkit-scrollbar {
  width: 4px;
}
.sidebar-menu-wrapper::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 4px;
}

.menu-section {
  margin-bottom: 14px;
}

.menu-section.focus-section {
  border: 2px solid #ef4444;
  border-radius: 6px;
  padding: 4px;
  background-color: #fffafb;
  margin-bottom: 14px;
}

.menu-section-title {
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  padding: 6px 8px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.badge-operator {
  font-size: 10px;
  background-color: #fee2e2;
  color: #dc2626;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.menu-list {
  list-style: none;
}

.menu-item {
  margin-bottom: 1px;
}

.menu-item a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  color: #334155;
  text-decoration: none;
  font-size: 12.5px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  font-weight: 500;
}

.menu-item a:hover {
  background-color: #f1f5f9;
  color: var(--primary-color);
}

.menu-item.active a {
  background-color: #f1f5f9;
  color: #0f172a;
  font-weight: 700;
}

.focus-section .menu-item.active a {
  background-color: #eff6ff;
  color: var(--primary-color);
  font-weight: 700;
}

.menu-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  stroke: currentColor;
}

.caret-down-icon {
  margin-left: auto;
  stroke: #94a3b8;
}

/* 사이드바 하단 푸터 */
.sidebar-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--sidebar-border);
  background-color: #ffffff;
  font-size: 11px;
}

.system-info {
  margin-bottom: 8px;
}

.system-info .version {
  font-weight: 600;
  color: #475569;
}

.system-info .developer {
  font-size: 10px;
  color: #94a3b8;
}

.btn-collapse {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  padding: 5px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: #475569;
  cursor: pointer;
}
.btn-collapse:hover {
  background-color: #e2e8f0;
}

/* ================= 메인 컨텐츠 영역 ================= */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: #f8fafc;
}

/* 상단 탑 헤더 */
.top-header {
  height: 48px;
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  flex-shrink: 0;
  z-index: 10;
}

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

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
}
.breadcrumb .depth1 { color: #64748b; }
.breadcrumb .separator { color: #cbd5e1; font-size: 10px; }
.breadcrumb .depth2 { color: #0f172a; font-weight: 700; }

.operator-badge-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}
.operator-badge-wrap .badge-title {
  font-size: 10px;
  background: #2563eb;
  color: #fff;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 700;
}
.operator-badge-wrap .badge-name {
  font-size: 11.5px;
  font-weight: 600;
  color: #1e293b;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-switcher-box {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #475569;
}
.account-select {
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11.5px;
  background: #fff;
  color: #0f172a;
  font-weight: 600;
}

.font-size-control {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #64748b;
}
.font-size-control select {
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 11.5px;
  background: #fff;
}

.live-clock {
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  background-color: #f1f5f9;
  padding: 4px 8px;
  border-radius: 4px;
}

/* ================= 뷰 패널 컨테이너 ================= */
.content-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.view-panel {
  display: none;
}
.view-panel.active {
  display: block;
  animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(2px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================= 공통 컴포넌트 ================= */

/* 헤더 바 */
.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.view-header h2 {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}
.view-header .view-desc {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

/* KPI 카드 그리드 */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

/* 직원 관리 전용 5단 핵심 KPI 그리드 (임직원수, 재직상태, 팀별현황, 신규입사자 취득신고, 퇴사자 퇴직정산) */
.kpi-grid.emp-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 1450px) {
  .kpi-grid.emp-kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

.kpi-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
}
.kpi-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: var(--primary-color);
}
.kpi-card.warning::before { background-color: var(--warning-color); }
.kpi-card.danger::before { background-color: var(--danger-color); }
.kpi-card.success::before { background-color: var(--success-color); }

.kpi-card .kpi-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.kpi-card .kpi-value {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  margin-top: 6px;
  letter-spacing: -0.5px;
}
.kpi-card .kpi-sub {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
}

/* 툴바 & 필터 바 */
.toolbar-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-xs);
}

.toolbar-left, .toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.search-input-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  width: 260px;
}
.search-input-box input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 12px;
  width: 100%;
  color: #0f172a;
}
.search-input-box svg {
  stroke: #94a3b8;
}

.filter-select {
  border: 1px solid var(--border-color);
  background: #ffffff;
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  font-size: 12px;
  color: #334155;
  outline: none;
}

/* 버튼 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background-color: var(--primary-color);
  color: #ffffff;
}
.btn-primary:hover {
  background-color: var(--primary-hover);
}
.btn-secondary {
  background-color: #ffffff;
  border-color: var(--border-color);
  color: #334155;
}
.btn-secondary:hover {
  background-color: #f1f5f9;
}
.btn-success {
  background-color: var(--success-color);
  color: #ffffff;
}
.btn-success:hover {
  background-color: #059669;
}
.btn-danger {
  background-color: var(--danger-color);
  color: #ffffff;
}
.btn-outline-primary {
  background-color: transparent;
  border-color: var(--primary-color);
  color: var(--primary-color);
}
.btn-outline-primary:hover {
  background-color: var(--primary-light);
}
.btn-outline-danger {
  background-color: transparent;
  border: 1px solid var(--danger-color);
  color: var(--danger-color);
}
.btn-outline-danger:hover {
  background-color: #fee2e2;
}
.btn-xs {
  padding: 2px 6px;
  font-size: 11px;
}

/* 데이터 테이블 컨테이너 */
.table-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  max-height: calc(100vh - 280px);
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.custom-table thead {
  position: sticky;
  top: 0;
  background-color: #f8fafc;
  z-index: 5;
  border-bottom: 2px solid var(--border-color);
}

.custom-table th {
  padding: 9px 12px;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
  font-size: 11.5px;
}

.custom-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  white-space: nowrap;
}

.custom-table tbody tr:hover {
  background-color: #f8fafc;
}

.text-right { text-align: right; }
.text-center { text-align: center; }

/* 뱃지 */
.pill-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 12px;
  font-size: 10.5px;
  font-weight: 700;
}
.pill-badge.unpaid { background-color: #fee2e2; color: #b91c1c; }
.pill-badge.partial { background-color: #fef3c7; color: #b45309; }
.pill-badge.promised { background-color: #dbeafe; color: #1d4ed8; }
.pill-badge.overdue { background-color: #f43f5e; color: #ffffff; }
.pill-badge.paid { background-color: #d1fae5; color: #047857; }
.pill-badge.normal { background-color: #e2e8f0; color: #475569; }

.pill-badge.success { background-color: #d1fae5; color: #047857; }
.pill-badge.waiting { background-color: #fef3c7; color: #b45309; }
.pill-badge.error { background-color: #fee2e2; color: #b91c1c; }

/* 금액 하이라이트 */
.amount-danger {
  font-weight: 700;
  color: #dc2626;
}
.amount-success {
  font-weight: 700;
  color: #059669;
}
.amount-primary {
  font-weight: 700;
  color: #2563eb;
}

/* 카드형 그리드 (회사·팀 관리용) */
.company-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.company-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-xs);
}
.company-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 10px;
  margin-bottom: 10px;
}
.company-box-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}
.company-meta-row {
  display: flex;
  gap: 12px;
  font-size: 11.5px;
  color: #64748b;
  margin-bottom: 6px;
}

/* 모달 레이아웃 */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.open,
.modal-backdrop.active {
  opacity: 1 !important;
  pointer-events: auto !important;
  visibility: visible !important;
}

.modal-dialog {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 540px;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.2s ease;
}

@keyframes slideUp {
  from { transform: translateY(15px); }
  to { transform: translateY(0); }
}

.modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}
.btn-close-modal {
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
}
.btn-close-modal:hover { color: #0f172a; }

.modal-body {
  padding: 16px 18px;
  overflow-y: auto;
}

.modal-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  background-color: #f8fafc;
}

.form-group {
  margin-bottom: 12px;
}
.form-group label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 5px;
}
.form-control {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 12.5px;
  outline: none;
}
.form-control:focus {
  border-color: var(--primary-color);
}

/* 토스트 알림 */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast-msg {
  background: #1e293b;
  color: #ffffff;
  padding: 9px 14px;
  border-radius: var(--radius-md);
  font-size: 12px;
  box-shadow: var(--shadow-lg);
  animation: slideToast 0.2s ease;
}
@keyframes slideToast {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   연차·휴가 관리대장 전용 스타일 (정평 연차 / 오투스 연차 공통)
   ========================================================================== */

/* 서브 탭 그룹 */
.subtab-group {
  display: flex;
  gap: 4px;
  background-color: #f1f5f9;
  padding: 3px;
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  width: fit-content;
  border: 1px solid var(--border-color);
}

.subtab-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: #64748b;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.subtab-btn:hover {
  color: var(--text-main);
}

.subtab-btn.active {
  background-color: #ffffff;
  color: var(--primary-color);
  box-shadow: var(--shadow-xs);
}

.subtab-badge {
  font-size: 11px;
  background-color: #e2e8f0;
  color: #475569;
  padding: 1px 6px;
  border-radius: 10px;
}

.subtab-btn.active .subtab-badge {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

/* 연차 관리 테이블 전면 가운데 정렬 */
#jpLeaveSummaryTable th,
#jpLeaveSummaryTable td,
#otusLeaveSummaryTable th,
#otusLeaveSummaryTable td,
#jpLeaveHistoryTable th,
#jpLeaveHistoryTable td,
#otusLeaveHistoryTable th,
#otusLeaveHistoryTable td {
  text-align: center !important;
  vertical-align: middle !important;
}

/* 연차 소진율 프로그레스 바 */
.leave-rate-box {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  gap: 8px;
  min-width: 110px;
}

.leave-progress-bar {
  flex: 1;
  height: 6px;
  background-color: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}

.leave-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.leave-progress-fill.safe {
  background-color: #10b981;
}

.leave-progress-fill.mid {
  background-color: #3b82f6;
}

.leave-progress-fill.high {
  background-color: #f59e0b;
}

.leave-progress-fill.over {
  background-color: #ef4444;
}

.leave-rate-text {
  font-size: 11px;
  font-weight: 700;
  min-width: 36px;
  text-align: right;
  color: #475569;
}

/* 휴가 종류별 배지 */
.pill-badge.leave-annual {
  background-color: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.pill-badge.leave-morning {
  background-color: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.pill-badge.leave-afternoon {
  background-color: #fefce8;
  color: #a16207;
  border: 1px solid #fef08a;
}

.pill-badge.leave-special {
  background-color: #faf5ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}

.pill-badge.leave-sick {
  background-color: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.pill-badge.leave-reward {
  background-color: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

/* 캘린더 모달 그리드 */
.calendar-view-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calendar-month-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 14px;
}

.calendar-week-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
  font-weight: 700;
  font-size: 12px;
  color: #64748b;
  padding-bottom: 4px;
}

.calendar-week-row .sun { color: #ef4444; }
.calendar-week-row .sat { color: #2563eb; }

.calendar-grid-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-day-cell {
  min-height: 80px;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
}

.calendar-day-cell.other-month {
  background-color: #f8fafc;
  opacity: 0.5;
}

.calendar-day-cell.today {
  border-color: var(--primary-color);
  background-color: #f0f7ff;
}

.calendar-day-num {
  font-weight: 700;
  color: #334155;
  margin-bottom: 2px;
}

.calendar-event-badge {
  font-size: 10px;
  padding: 2px 4px;
  border-radius: 3px;
  background-color: #eff6ff;
  color: #1e40af;
  border-left: 3px solid var(--primary-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.calendar-event-badge.half {
  background-color: #fefce8;
  color: #854d0e;
  border-left-color: #eab308;
}

/* 직원 인사카드 요약 헤더 */
.emp-card-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
}

.emp-avatar-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: #e2e8f0;
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}

.emp-summary-details {
  flex: 1;
}

.emp-summary-details h4 {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.emp-summary-details p {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
}

.emp-leave-stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

@media (max-width: 600px) {
  .emp-leave-stat-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-metric-box {
  padding: 10px;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  text-align: center;
}

.stat-metric-box .metric-label {
  font-size: 11px;
  color: #64748b;
}

.stat-metric-box .metric-val {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  margin-top: 2px;
}

.stat-metric-box.remain .metric-val {
  color: var(--primary-color);
}

/* 연차 관리 전용 3단 KPI 그리드 (관리임직원, 금일연차인원, 년차별발생기준표) */
.kpi-grid.leave-kpi-grid {
  display: grid;
  grid-template-columns: 210px 250px 1fr;
  gap: 14px;
  max-width: 100%;
  align-items: stretch;
}

@media (max-width: 1150px) {
  .kpi-grid.leave-kpi-grid {
    grid-template-columns: 1fr 1fr;
  }
  .leave-rule-card {
    grid-column: span 2;
  }
}

/* 년차별 연차 발생 기준표 미니 테이블 */
.leave-rule-card {
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.leave-rule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.leave-rule-table th, 
.leave-rule-table td {
  padding: 2.5px 5px;
  border: 1px solid #cbd5e1;
  line-height: 1.25;
}

.leave-rule-table th {
  font-weight: 700;
  text-align: center;
}

.leave-rule-table .tag-cell {
  text-align: center;
  font-weight: 700;
}

.text-teal {
  color: #0f766e;
}

/* 클릭 가능한 KPI 카드 */
.kpi-card.clickable {
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1.5px solid var(--border-color);
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.kpi-card.clickable:hover {
  transform: translateY(-2px);
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
  background: #ffffff;
}

.kpi-card.clickable:active {
  transform: translateY(0);
}

.kpi-card-action-hint {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-color);
  background-color: var(--primary-light);
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* 금일 연차자 상세 모달 카드 아이템 */
.today-leave-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
  box-shadow: var(--shadow-xs);
}

.today-leave-item-card:hover {
  border-color: #93c5fd;
  background-color: #f8fafc;
}

.today-leave-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.today-leave-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: #eff6ff;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  border: 1px solid #bfdbfe;
  flex-shrink: 0;
}

.today-leave-info h5 {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.today-leave-info p {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 3px;
}

.today-leave-right {
  text-align: right;
  flex-shrink: 0;
}

.today-leave-time-tag {
  font-size: 11.5px;
  font-weight: 700;
  color: #1e293b;
}

.today-leave-approver {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}

/* 엑셀 시트형 인라인 직접 편집 셀 스타일 */
.excel-cell-input {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  padding: 3px 6px;
  font-size: 12px;
  font-family: inherit;
  border-radius: 4px;
  transition: all 0.15s ease;
  color: #1e293b;
  outline: none;
}
.excel-cell-input:hover {
  border-color: #94a3b8;
  background: #ffffff;
}
.excel-cell-input:focus {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}
.excel-cell-input.text-right {
  text-align: right;
}
.excel-cell-input.text-center {
  text-align: center;
}
.inline-edit-row {
  background-color: #f0fdf4 !important;
  box-shadow: inset 0 0 0 1px #86efac;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.03); opacity: 0.88; }
  100% { transform: scale(1); opacity: 1; }
}

/* ==================== 엑셀 스프레드시트 표 형식 스타일 ==================== */
.excel-spreadsheet-container {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Malgun Gothic", sans-serif;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin-top: 10px;
}

/* 엑셀 상단 리본/툴바 */
.excel-ribbon-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: #f1f5f9;
  border-bottom: 1px solid #cbd5e1;
  gap: 8px;
  flex-wrap: wrap;
}

.excel-toolbar-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.excel-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: #334155;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.excel-tool-btn:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
  color: #0f172a;
}
.excel-tool-btn.primary {
  background: #107c41;
  color: #ffffff;
  border-color: #0e6b37;
}
.excel-tool-btn.primary:hover {
  background: #0e6b37;
}

/* 엑셀 수식 입력줄 (Formula Bar) */
.excel-formula-bar {
  display: flex;
  align-items: center;
  padding: 4px 10px;
  background: #f8fafc;
  border-bottom: 1px solid #cbd5e1;
  gap: 6px;
  font-size: 12px;
}
.excel-name-box {
  width: 65px;
  height: 25px;
  line-height: 23px;
  text-align: center;
  font-weight: 700;
  font-family: monospace;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  color: #1e293b;
  user-select: none;
}
.excel-fx-icon {
  font-family: "Georgia", serif;
  font-style: italic;
  font-weight: bold;
  color: #64748b;
  font-size: 13px;
  padding: 0 4px;
  user-select: none;
}
.excel-formula-input {
  flex: 1;
  height: 25px;
  padding: 2px 8px;
  font-size: 12px;
  font-family: inherit;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  background: #ffffff;
  outline: none;
}
.excel-formula-input:focus {
  border-color: #107c41;
  box-shadow: 0 0 0 1px #107c41;
}

/* 엑셀 그리드 래퍼 */
.excel-grid-wrapper {
  overflow: auto;
  max-height: 560px;
  position: relative;
  background: #ffffff;
  outline: none;
}
.excel-grid-wrapper:focus {
  outline: none;
}

.excel-grid-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  user-select: none;
  table-layout: fixed;
}
.excel-grid-table th,
.excel-grid-table td {
  border: 1px solid #cbd5e1;
  padding: 0;
  height: 28px;
  line-height: 26px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 엑셀 행/열 헤더 */
.excel-corner-header {
  background: #e2e8f0;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  text-align: center;
  position: sticky;
  left: 0;
  top: 0;
  z-index: 20;
  border-right: 2px solid #94a3b8 !important;
  border-bottom: 2px solid #94a3b8 !important;
  font-size: 11px;
  color: #64748b;
}
.excel-col-header {
  background: #f1f5f9;
  color: #334155;
  font-weight: 700;
  font-size: 11px;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 2px solid #94a3b8 !important;
  padding: 2px 6px;
  cursor: pointer;
  letter-spacing: -0.2px;
}
.excel-col-header.active-col {
  background: #dcfce7 !important;
  color: #166534 !important;
  border-bottom: 2px solid #107c41 !important;
}
.excel-row-header {
  background: #f8fafc;
  color: #64748b;
  font-weight: 700;
  font-size: 11px;
  text-align: center;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  position: sticky;
  left: 0;
  z-index: 9;
  border-right: 2px solid #94a3b8 !important;
  cursor: pointer;
}
.excel-row-header.active-row {
  background: #dcfce7 !important;
  color: #166534 !important;
  border-right: 2px solid #107c41 !important;
}

/* 엑셀 셀 내용 */
.excel-cell {
  position: relative;
  background: #ffffff;
  padding: 0 6px;
  cursor: cell;
  font-size: 12px;
  color: #1e293b;
  border: 1px solid #cbd5e1;
}
.excel-cell.active-cell {
  box-shadow: inset 0 0 0 2px #107c41 !important;
  outline: none;
  z-index: 4;
}
.excel-cell.active-cell:not([style*="background-color"]) {
  background: #f0fdf4;
}
.excel-cell.copy-flash {
  animation: copyPulse 0.4s ease;
}
@keyframes copyPulse {
  0% { background: #bbf7d0; }
  100% { background: #ffffff; }
}

.excel-cell.editing-cell {
  padding: 0 !important;
  background: #ffffff !important;
  z-index: 6;
}
.excel-cell.editing-cell input,
.excel-cell.editing-cell select {
  width: 100%;
  height: 100%;
  border: 2px solid #107c41;
  padding: 0 6px;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  background: #ffffff;
  box-sizing: border-box;
}

/* 엑셀 상태표시줄 */
.excel-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 12px;
  background: #f8fafc;
  border-top: 1px solid #cbd5e1;
  font-size: 11px;
  color: #475569;
  user-select: none;
}
.excel-status-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.excel-status-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.excel-status-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.excel-status-item strong {
  color: #0f172a;
}

/* ==========================================================================
   연차 관리: 직원용(Staff) vs 관리용(Admin) 분리 모드 및 구글 캘린더 스타일
   ========================================================================== */
.leave-mode-switcher-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 14px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.leave-mode-toggle-group {
  display: inline-flex;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 3px;
  gap: 4px;
}
.btn-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #64748b;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-mode-toggle:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.6);
}
.btn-mode-toggle.active {
  background: #ffffff;
  color: #1d4ed8;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.btn-mode-toggle.active.admin-mode {
  color: #991b1b;
  box-shadow: 0 1px 3px rgba(153, 27, 27, 0.15);
}
.leave-mode-info-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}
.leave-mode-info-badge .badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
}

/* 직원용 상단 기준표 카드 컨테이너 */
.staff-rule-card-container {
  margin-bottom: 14px;
}
.staff-rule-card {
  padding: 12px 16px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.staff-calendar-banner {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #86efac;
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* ==========================================================================
   사이드바 총무팀 업무 3단 그룹 (공용 / 정평 / 오투스) 및 메뉴 편집 시스템
   ========================================================================== */
.btn-sidebar-config {
  font-size: 10px;
  font-weight: 700;
  color: #1e40af;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  padding: 2px 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.15s ease;
  line-height: 1.2;
}
.btn-sidebar-config:hover {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #93c5fd;
}

.sidebar-group-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 6px 4px;
  margin-bottom: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}
.sidebar-group-card:hover {
  border-color: #94a3b8;
}
.sidebar-group-card.group-common {
  border-left: 3.5px solid #0284c7;
}
.sidebar-group-card.group-jp {
  border-left: 3.5px solid #d97706;
}
.sidebar-group-card.group-otus {
  border-left: 3.5px solid #16a34a;
}

.sidebar-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px 6px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 4px;
}
.sidebar-group-title {
  font-size: 11px;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 4px;
}
.sidebar-group-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
}

/* 메뉴 편집 모달 스타일 */
.config-group-block {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
}
.config-group-header {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 6px;
  border-bottom: 1px solid #e2e8f0;
}
.config-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 6px 10px;
  margin-bottom: 6px;
}
.config-item-row:last-child {
  margin-bottom: 0;
}
.config-btn-move {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}
.config-btn-move:hover {
  background: #e2e8f0;
}

/* =========================================================================
   계산서 관리 (정평 / 오투스) 엑셀 스프레드시트 탭 & 테이블 스타일
   ========================================================================= */
.bill-tabs-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  background: #f8fafc;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  overflow-x: auto;
}
.bill-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid transparent;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.bill-tab-btn:hover {
  background: #ffffff;
  color: #0f172a;
}
.bill-tab-btn.active {
  background: #ffffff;
  color: #1e40af;
  border-color: #cbd5e1;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.bill-tab-badge {
  background: #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}
.bill-tab-btn.active .bill-tab-badge {
  background: #dbeafe;
  color: #1e40af;
}

.bill-excel-summary-box {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.bill-excel-summary-title {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 2px;
}
.bill-excel-summary-val {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
}

.excel-col-letter {
  background: #f1f5f9 !important;
  color: #64748b !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  text-align: center !important;
  padding: 3px !important;
  border-bottom: 1px solid #cbd5e1 !important;
  user-select: none;
}
.th-yellow {
  background-color: #fef08a !important;
  color: #854d0e !important;
  font-weight: 700 !important;
}
.th-blue {
  background-color: #dbeafe !important;
  color: #1e40af !important;
  font-weight: 700 !important;
}
.th-group-marketing {
  background-color: #eff6ff !important;
  color: #1d4ed8 !important;
  font-weight: 800 !important;
  font-size: 13px !important;
  border-right: 2px solid #94a3b8 !important;
  text-align: center !important;
}
.th-group-actual {
  background-color: #f0fdf4 !important;
  color: #15803d !important;
  font-weight: 800 !important;
  font-size: 13px !important;
  border-right: 2px solid #94a3b8 !important;
  text-align: center !important;
}
.th-group-other {
  background-color: #f8fafc !important;
  color: #475569 !important;
  font-weight: 800 !important;
  font-size: 13px !important;
  text-align: center !important;
}
.bill-excel-table th,
.bill-excel-table td {
  text-align: center !important;
  vertical-align: middle !important;
  font-size: 12.5px;
}
.bill-excel-table td.text-right {
  text-align: right !important;
}
.bill-excel-table td.text-left {
  text-align: left !important;
}

/* 계산서 관리 엑셀 스프레드시트 인라인 셀 입력 전용 스타일 */
.bill-excel-table td {
  padding: 4px 5px !important;
}
.bill-excel-table .excel-cell-input {
  width: 100%;
  box-sizing: border-box;
  height: 28px;
  padding: 2px 6px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background-color: #ffffff;
  font-size: 12px;
  color: #1e293b;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.bill-excel-table .excel-cell-input:hover {
  border-color: #94a3b8;
}
.bill-excel-table .excel-cell-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
  background-color: #ffffff;
  outline: none;
}
.bill-excel-table select.excel-cell-input {
  cursor: pointer;
  padding-right: 2px;
}
.bill-excel-table input[type="date"].excel-cell-input {
  padding: 2px 4px;
  font-size: 11.5px;
}

/* ==================== 캘린더 일치 확인 체크박스 전용 스타일 ==================== */
.calendar-check-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  margin: 0;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  user-select: none;
  transition: all 0.15s ease-in-out;
  border: 1px solid transparent;
}

/* 1. 당일 또는 이미 지난 경우 (경과/당일: 주황/레드 강조) */
.calendar-check-badge.past-or-today {
  background-color: #fff7ed;
  border-color: #fdba74;
  color: #ea580c;
}
.calendar-check-badge.past-or-today:hover {
  background-color: #ffedd5;
  border-color: #fb923c;
}
.calendar-check-badge.past-or-today input[type="checkbox"] {
  accent-color: #ea580c !important;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* 2. 향후 예정된 미래 일정인 경우 (예정: 차분한 블루) */
.calendar-check-badge.future {
  background-color: #f0f9ff;
  border-color: #bae6fd;
  color: #0284c7;
}
.calendar-check-badge.future:hover {
  background-color: #e0f2fe;
  border-color: #7dd3fc;
}
.calendar-check-badge.future input[type="checkbox"] {
  accent-color: #0284c7 !important;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* 3. 일치 확인 완료 상태 (녹색 완료 뱃지) */
.calendar-check-badge.checked {
  background-color: #f0fdf4 !important;
  border-color: #86efac !important;
  color: #16a34a !important;
}
.calendar-check-badge.checked:hover {
  background-color: #dcfce7 !important;
  border-color: #4ade80 !important;
}
.calendar-check-badge.checked input[type="checkbox"] {
  accent-color: #16a34a !important;
}








/* ==================== 사업용카드 불출관리 엑셀 서식 스타일 ==================== */
.th-card-sky {
  background-color: #dbeafe !important;
  color: #1e40af !important;
  font-weight: 700 !important;
}
.th-card-pink {
  background-color: #fce7f3 !important;
  color: #9d174d !important;
  font-weight: 700 !important;
}
.th-card-yellow {
  background-color: #fef08a !important;
  color: #854d0e !important;
  font-weight: 700 !important;
}
.th-card-gray {
  background-color: #f1f5f9 !important;
  color: #334155 !important;
  font-weight: 700 !important;
}


/* ==================== 계산서 상태 드롭다운 (완료/진행중/Pass) 전용 실물 엑셀 배경 색상 ==================== */
.bill-status-select {
  font-weight: 700 !important;
  color: #000000 !important;
  border-radius: 4px;
  cursor: pointer;
  padding: 3px 6px !important;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

/* 1. 완료: 선명한 노란색 (Yellow) */
.bill-status-select.status-done {
  background-color: #ffff00 !important;
  border: 1px solid #eab308 !important;
  color: #000000 !important;
}

/* 2. 진행중: 선명한 초록색 (Green) */
.bill-status-select.status-in-progress {
  background-color: #00e600 !important;
  border: 1px solid #16a34a !important;
  color: #000000 !important;
}

/* 3. Pass: 선명한 주황색 (Orange) */
.bill-status-select.status-pass {
  background-color: #ff8000 !important;
  border: 1px solid #ea580c !important;
  color: #000000 !important;
}

/* ==================== 영업자 관리 상태 드롭다운 (O / X / 확인중 / Pass) ==================== */
.tm-status-select {
  font-weight: 700 !important;
  font-size: 12px;
  border-radius: 4px;
  padding: 3px 8px !important;
  cursor: pointer;
  text-align: center;
  text-align-last: center;
  outline: none;
  transition: all 0.15s ease;
  min-width: 76px;
  display: inline-block;
}

/* 1. O (완료/체결/접수): 밝은 연록색 배경 + 짙은 녹색 글씨 */
.tm-status-select.tm-status-o {
  background-color: #f0fdf4 !important;
  border: 1px solid #86efac !important;
  color: #15803d !important;
}

/* 2. X (미제출/미체결): 연붉은색 배경 + 짙은 빨간색 글씨 */
.tm-status-select.tm-status-x {
  background-color: #fef2f2 !important;
  border: 1px solid #fca5a5 !important;
  color: #b91c1c !important;
}

/* 3. 확인중: 연노랑 배경 + 짙은 주황/호박색 글씨 */
.tm-status-select.tm-status-checking {
  background-color: #fffbeb !important;
  border: 1px solid #fcd34d !important;
  color: #d97706 !important;
}

/* 4. Pass: 연회색 배경 + 슬레이트 회색 글씨 */
.tm-status-select.tm-status-pass {
  background-color: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  color: #64748b !important;
}



/* ==========================================================================
   금전소비대차 이자 청구서 전용 A4 규격 인쇄 및 PDF 저장 최적화 스타일
   ========================================================================== */
@media print {
  body * {
    visibility: hidden !important;
  }
  #printableInvoiceArea, #printableInvoiceArea * {
    visibility: visible !important;
  }
  #printableInvoiceArea {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 20px 30px !important;
    background: #ffffff !important;
    box-shadow: none !important;
  }
  .modal-backdrop {
    background: transparent !important;
    position: static !important;
    display: block !important;
  }
  .modal-dialog {
    box-shadow: none !important;
    border: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  .modal-header, .modal-footer {
    display: none !important;
  }
}



/* ==========================================================================
   [통합본] 김혜빈 총무 모듈 호환 CSS 변수 및 컴포넌트 스타일 통합
   ========================================================================== */
:root {
  --primary: #2563eb;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --indigo: #465582;
  --accent-strong: #343f69;
  --accent-soft: #edf0f8;
  --accent-shadow: #343f691a;
  --emerald: #21745e;
  --canvas: #f4f5f3;
  --surface: #ffffff;
  --surface-muted: #f5f6f7;
  --topbar-bg: #ffffff;
  --control-bg: #ffffff;
  --table-head: #f0f2f4;
  --row-hover: #f2f4f8;
  --text: #242c3b;
  --muted: #596579;
  --border: #dde1e5;
  --border-strong: #b9c2ce;
  --success-soft: #edf6f1;
  --warning-soft: #fff5e6;
  --error-soft: #fceef0;
  --info-soft: #edf4fa;
  --disabled-text: #687383;
  --focus-ring: var(--indigo);
  --radius-control: 6px;
  --radius-panel: 10px;
  --shadow-dialog: 0 16px 48px #242c3b29;
}

/* 김혜빈 총무 모달 호환 (style="display:flex" 또는 .show 클래스 지원) */
.modal-backdrop.show,
.modal-backdrop[style*="display: flex"],
.modal-backdrop[style*="display:flex"] {
  opacity: 1 !important;
  pointer-events: auto !important;
  visibility: visible !important;
}

.modal-backdrop.khb-modal .modal-dialog {
  width: min(860px, 95vw);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

/* 사이드바 담당자 필터 탭 및 메뉴 담당 배지 */
.sidebar-owner-filter-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 7px;
  margin-bottom: 10px;
  border: 1px solid #e2e8f0;
}

.owner-filter-btn {
  border: none;
  background: transparent;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 4px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  white-space: nowrap;
}

.owner-filter-btn:hover {
  color: #0f172a;
  background: rgba(255,255,255,0.6);
}

.owner-filter-btn.active {
  background: #ffffff;
  color: #2563eb;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.owner-filter-btn[data-owner="혜빈"].active {
  color: #7c3aed;
}

.menu-owner-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  line-height: 1.3;
  flex-shrink: 0;
}

.menu-owner-badge.owner-ksh {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.menu-owner-badge.owner-khb {
  background: #f3e8ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}

.menu-owner-badge.owner-both {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}


/* 버튼 컴포넌트 */
.button {
  min-height: 32px;
  padding: 5px 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
  transition: all 0.12s ease;
}

.button:hover:not(:disabled) {
  background: var(--row-hover);
}

.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.button.primary {
  background: #343f69;
  border-color: #242c3b;
  color: #fff;
}

.button.primary:hover:not(:disabled) {
  background: #242c3b;
}

.button.soft {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.button.danger {
  border-color: #fca5a5;
  background: #fff;
  color: #b91c1c;
}

.button.danger:hover:not(:disabled) {
  background: #fef2f2;
}

.button.export {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.button.export:hover:not(:disabled) {
  background: #dcfce7;
}

.bulkActionButton {
  min-height: 34px;
  padding: 6px 13px;
  border: 1px solid #3730a3;
  border-radius: 7px;
  background: #4338ca;
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 2px 8px #4338ca3b;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.bulkActionButton:hover:not(:disabled) {
  background: #312e81;
}

.bulkActionButton:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.font-scale-select {
  min-height: 32px;
  padding: 4px 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  background: var(--control-bg);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

/* ==========================================================
 * 3. 메인 작업표 및 테이블 그리드 (Spreadsheet UI)


.tablePanel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.tableWrap {
  max-height: calc(100vh - 190px);
  overflow: auto;
  outline: none;
}

.tableWrap table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  white-space: nowrap;
  font-size: 12px;
}

.tableWrap th, .tableWrap td {
  padding: 7px 10px;
  overflow: hidden;
  border: 0;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: left;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.tableWrap th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--table-head);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  user-select: none;
}

.invoiceTable th, .invoiceTable td {
  min-width: 110px;
  height: 35px;
}

.invoiceControlHeader {
  background: #e2e8f0 !important;
  color: #334155 !important;
  text-align: center;
  min-width: 44px !important;
  width: 44px !important;
}

.invoiceControlCell {
  background: #f8fafc !important;
  text-align: center;
}

.invoiceGroupCell {
  min-width: 58px !important;
  width: 58px !important;
  background: #fef3c7 !important;
  text-align: center !important;
  font-weight: 850;
  color: #92400e;
}

.invoiceTable th[data-field="processedAt"],
.ledgerTableWrap th[data-column="processed_at"] {
  background: #fbbf24 !important;
  color: #78350f !important;
  font-weight: 850;
}

.invoiceTable td[data-field="processedAt"],
.ledgerTableWrap td[data-column="processed_at"] {
  min-width: 140px !important;
  background: #fef3c7 !important;
  color: #78350f !important;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.amountInput {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #0f172a;
}

tr.row-blank td {
  color: #94a3b8;
  background: #fdfdfc;
}

tr.row-blank:hover td {
  background: #f8fafc !important;
}

.tableWrap tbody tr:hover td {
  background: var(--row-hover);
}

.tableWrap tbody tr:hover td.invoiceGroupCell {
  background: #fde68a !important;
}

.tableWrap tbody tr:hover td[data-field="processedAt"] {
  background: #fde68a !important;
}

/* 페이저 & 가이드 */
.ledgerPager {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 0 4px;
}

.ledgerPager label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 11.5px;
}

.ledgerPager select {
  min-height: 30px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 11.5px;
}

.ledgerPager span {
  padding: 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.gridHelpActions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  font-size: 11px;
  color: var(--muted);
}

.gridHelpActions p {
  margin: 0;
}

/* ==========================================================
 * 4. 세금계산서 미리보기 모달 (Official Red Box)
 * ========================================================== */
.previewBackdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 12px;
  background: rgba(15, 23, 42, 0.65);
}

.previewDialog {
  width: min(920px, 100%);
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.4);
}

.previewDialog > header, .previewDialog > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
}

.previewDialog h2 {
  margin: 0;
  font-size: 17px;
  color: var(--slate-900);
}

.previewDialog p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.previewDialog > footer {
  justify-content: flex-end;
  border-top: 1px solid var(--border);
}

.taxInvoice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0 20px 20px;
  border: 3px double #dc2626;
  color: #1f2937;
  font-size: 12px;
}

.taxInvoice > div {
  display: grid;
  grid-template-columns: 100px 1fr;
  border-bottom: 1px solid #fca5a5;
}

.taxInvoice > div + div {
  border-left: 1px solid #fca5a5;
}

.taxInvoice > div > * {
  padding: 7px 10px;
  border-bottom: 1px solid #fecaca;
}

.taxInvoice > div > b {
  grid-row: span 5;
  display: grid;
  place-items: center;
  border-right: 1px solid #fca5a5;
  color: #991b1b;
  font-weight: 850;
  background: #fff1f2;
}

.supplierOwner {
  position: relative;
  min-height: 48px;
}

.supplierOwner img {
  position: absolute;
  right: 10px;
  top: 50%;
  width: 58px;
  height: 58px;
  object-fit: contain;
  transform: translateY(-50%);
}

.taxInvoice dl {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 120px 1fr 120px 1fr;
  margin: 0;
}

.taxInvoice dt, .taxInvoice dd {
  margin: 0;
  padding: 8px 10px;
  border-right: 1px solid #fecaca;
  border-bottom: 1px solid #fecaca;
}

.taxInvoice dt {
  background: #fff1f2;
  color: #991b1b;
  font-weight: 800;
}

/* ==========================================================
 * 5. 회사·팀 관리 3단 패널 (Organizations)
 * ========================================================== */
.organization-panes {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(250px, 1.05fr) minmax(320px, 1.25fr);
  gap: 14px;
  align-items: start;
}

.organization-pane {
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.organization-pane > header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: #fafbf9;
}

.organization-pane header h2 {
  margin: 2px 0 0;
  font-size: 16px;
  font-weight: 750;
}

.organization-pane header small {
  color: var(--emerald);
  font-weight: 750;
  font-size: 11px;
}

.organization-pane header > b {
  color: var(--muted);
  font-size: 12px;
}

.organization-list {
  max-height: 480px;
  overflow-y: auto;
}

.organization-list > button, .organization-team > button:first-child {
  width: 100%;
  min-height: 60px;
  padding: 11px 14px;
  border: 0;
  border-bottom: 1px solid #e8edf3;
  border-radius: 0;
  background: white;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.organization-list button span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 13px;
}

.organization-list button small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.organization-list button.selected {
  background: #edf5f1;
  box-shadow: inset 3px 0 var(--emerald);
}

.organization-team {
  position: relative;
  padding-right: 64px;
  border-bottom: 1px solid #e8edf3;
}

.organization-team > button:first-child {
  border-bottom: 0;
}

.organization-team .link-button {
  position: absolute;
  top: 16px;
  right: 10px;
  padding: 5px 8px;
  font-size: 11px;
}

.member-bulk {
  display: flex;
  gap: 6px;
  align-items: center;
  overflow-x: auto;
  padding: 9px 12px;
  background: #f8faf9;
  border-bottom: 1px solid var(--border);
}

.member-bulk span {
  margin-right: auto;
  white-space: nowrap;
  font-size: 11.5px;
  font-weight: 750;
}

.member-list {
  max-height: 420px;
  overflow-y: auto;
}

.member-list > label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #e8edf3;
  cursor: pointer;
}

.member-list > label:hover {
  background: #f8faf9;
}

.member-list span {
  font-weight: 700;
  font-size: 12.5px;
}

.member-list small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

/* ==========================================================
 * 6. 직원 관리 명부 (Staff)
 * ========================================================== */
.staff-filter-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  background: #fff;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
}

.staff-filter-grid label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--slate-600);
}

.staff-filter-grid select, .staff-filter-grid input {
  min-height: 32px;
  padding: 4px 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  font: inherit;
  font-size: 11.5px;
}



/* ==========================================================
 * 9. 스프레드시트 셀 인터랙션 및 필터 팝오버 스타일
 * ========================================================== */
.tableWrap:focus-visible {
  box-shadow: inset 0 0 0 2px #818cf8;
}

.tableWrap td.activeCell {
  position: relative;
  box-shadow: inset 0 0 0 2px var(--accent-strong) !important;
  background: #ffffff !important;
  z-index: 2;
}

.tableWrap td.selectedCell {
  background: #eef2ff !important;
}

.tableWrap td.invoiceGroupCell.selectedCell {
  background: #fef08a !important;
}

.tableWrap td.invoiceGroupCell.activeCell {
  box-shadow: inset 0 0 0 2px #b45309 !important;
}

.cellInput {
  width: 100%;
  min-width: 100px;
  height: 28px;
  margin: -4px -6px;
  padding: 3px 6px;
  border: 1px solid #4f46e5;
  border-radius: 3px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  outline: none;
}

.cellSelect {
  width: 100%;
  height: 28px;
  margin: -4px -6px;
  padding: 2px 4px;
  border: 1px solid #4f46e5;
  border-radius: 3px;
  background: #fffde7;
  color: var(--text);
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  outline: none;
}

.columnHeaderWrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  width: 100%;
}

.btnColFilter {
  border: 0;
  background: transparent;
  color: var(--slate-400);
  padding: 1px 3px;
  cursor: pointer;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
}

.btnColFilter:hover {
  background: #e2e8f0;
  color: var(--slate-700);
}

.btnColFilter.has-filter {
  color: #4338ca;
  background: #e0e7ff;
}

.columnFilterPopover {
  position: absolute;
  z-index: 60;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
  padding: 10px 12px;
  min-width: 200px;
  max-width: 280px;
  font-size: 11.5px;
  color: var(--text);
  display: none;
  flex-direction: column;
  gap: 8px;
}

.columnFilterPopover.show {
  display: flex;
}

.columnFilterList {
  max-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.columnFilterList label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 3px 5px;
  border-radius: 4px;
}

.columnFilterList label:hover {
  background: var(--row-hover);
}

/* Dirty State 알림 배지 */
.dirtyNotice {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 750;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.toastAlert {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 150;
  background: #0f172a;
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  font-size: 12.5px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.2s ease;
  pointer-events: none;
}

.toastAlert.show {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================
 * 11. 입퇴사 관리 (Onboarding / Offboarding) 스타일
 * ========================================================== */
.kpi-grid-onoff {
  display: grid;
  grid-template-columns: repeat(2, 220px);
  gap: 14px;
  margin-bottom: 16px;
}

@media (max-width: 640px) {
  .kpi-grid-onoff {
    grid-template-columns: 1fr 1fr;
  }
}

.kpi-card-onoff {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}

.kpi-card-onoff::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #94a3b8;
}

.kpi-card-onoff.highlight::before { background: #3b82f6; }
.kpi-card-onoff.success::before { background: #10b981; }
.kpi-card-onoff.danger::before { background: #ef4444; }
.kpi-card-onoff.primary::before { background: #6366f1; }

.kpi-card-onoff .kpi-title {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 6px;
}

.kpi-card-onoff .kpi-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.kpi-card-onoff .kpi-value .unit {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-left: 2px;
}

.kpi-card-onoff .kpi-sub {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
}

.onoff-toolbar {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.onoff-search-input {
  padding: 7px 12px 7px 32px;
  font-size: 12px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  width: 250px;
  transition: all 0.2s;
}

.onoff-search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.onoff-select {
  padding: 7px 10px;
  font-size: 12px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

.team-multiselect-wrap {
  position: relative;
  display: inline-block;
  z-index: 40;
}

.team-multiselect-wrap.open {
  z-index: 1050;
}

.team-multiselect-btn {
  padding: 7px 10px;
  font-size: 12px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 33px;
  white-space: nowrap;
}

.team-multiselect-btn svg {
  transition: transform 0.2s ease;
}

.team-multiselect-wrap.open .team-multiselect-btn svg {
  transform: rotate(180deg);
}

.team-multiselect-btn:hover {
  background: #f8fafc;
}

.team-multiselect-panel {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 1060;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  padding: 8px 10px;
  min-width: 190px;
  max-height: 280px;
  overflow-y: auto;
}

.team-multiselect-wrap.open .team-multiselect-panel,
.team-multiselect-panel.show {
  display: block !important;
}

.team-chk-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 4px 6px;
  border-radius: 4px;
  cursor: pointer;
  color: var(--text);
  user-select: none;
}

.team-chk-item:hover {
  background: #f1f5f9;
}

.team-chk-item input[type="checkbox"] {
  cursor: pointer;
  accent-color: var(--primary);
}

.onoff-table-wrapper {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-x: auto;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.onoff-table {
  width: 100%;
  min-width: 1440px;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.onoff-table thead th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  padding: 10px 12px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.onoff-table tbody td {
  padding: 11px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text);
  vertical-align: middle;
}

.onoff-table tbody tr:hover {
  background-color: var(--row-hover);
}

.onoff-status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.onoff-status-badge.active {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.onoff-status-badge.resigned {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.btn-outline {
  background: #fff;
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}

.btn-outline:hover {
  background: #f8fafc;
}

.btn-xs {
  padding: 3px 6px;
  font-size: 11px;
  border-radius: 4px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-primary {
  background: #2563eb;
  color: #fff;
  border: 1px solid #1d4ed8;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.onoff-form-group {
  margin-bottom: 14px;
}

.onoff-form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}

.onoff-form-label .req {
  color: #ef4444;
  margin-left: 2px;
}

.onoff-form-control {
  width: 100%;
  padding: 8px 12px;
  font-size: 12.5px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  box-sizing: border-box;
  color: var(--text);
  background: #ffffff;
  transition: all 0.15s ease;
}

.onoff-form-control:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.onoff-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* 팀 및 직급 뱃지 */
.badge-dept {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.badge-position {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

/* 드롭다운 옵션 관리 모달 */
.option-manage-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 10px;
}

.option-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px;
}

.option-box-title {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.option-list-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 90px;
  max-height: 180px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 8px;
  margin-bottom: 10px;
}

.option-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 2px 8px 2px 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: #1e293b;
}

.option-chip .btn-del-chip {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.option-chip .btn-del-chip:hover {
  color: #ef4444;
}

.option-add-row {
  display: flex;
  gap: 6px;
}

.option-add-input {
  flex: 1;
  padding: 6px 10px;
  font-size: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
}

.option-add-input:focus {
  outline: none;
  border-color: #3b82f6;
}

@media (max-width: 768px) {
  .option-manage-container {
    grid-template-columns: 1fr;
  }
}

/* 임직원 정보 모달 탭 */
.staff-modal-tabs {
  display: flex;
  gap: 6px;
  padding: 8px 20px 0;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
}

.staff-modal-tab-btn {
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.staff-modal-tab-btn:hover {
  color: #1e293b;
}

.staff-modal-tab-btn.active {
  color: var(--primary, #3b82f6);
  font-weight: 700;
  border-bottom-color: var(--primary, #3b82f6);
}

/* 신규 입사 온보딩 배너 */
.onboarding-banner {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.onboarding-banner-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #166534;
  display: flex;
  align-items: center;
  gap: 6px;
}

.onboarding-banner-items {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.onboarding-person-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid #dcfce7;
  font-size: 12px;
}

/* ==========================================================
   통합 계산서 관리 (세금계산서, 현금영수증, 개별발행, 시재금)
   ========================================================== */
.mgmt-sub-tabs-container {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0;
  background: #ffffff;
}

.mgmt-sub-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 600;
  color: #64748b;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: -2px;
}

.mgmt-sub-tab-btn:hover {
  color: #1e293b;
  background: #f8fafc;
}

.mgmt-sub-tab-btn.active {
  color: #2563eb;
  font-weight: 700;
  border-bottom-color: #2563eb;
  background: #eff6ff;
  border-radius: 6px 6px 0 0;
}

.status-toggle-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.status-toggle-badge:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.status-toggle-badge.complete {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.status-toggle-badge.pending {
  background: #fff1f2;
  color: #e11d48;
  border: 1px solid #fecdd3;
}

.status-toggle-badge.warning {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.petty-amount-in {
  color: #059669;
  font-weight: 700;
  font-family: Consolas, monospace;
}

.petty-amount-out {
  color: #dc2626;
  font-weight: 700;
  font-family: Consolas, monospace;
}





/* ==========================================================
 * 통합 계산서 관리 테이블 전용 스타일
 * ========================================================== */
.invoice-mgmt-table-wrapper {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-x: auto;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  margin-bottom: 16px;
}

.invoice-mgmt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  text-align: left;
}

.invoice-mgmt-table thead th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  padding: 10px 12px;
  border-bottom: 2px solid var(--border);
  border-right: 1px solid #f1f5f9;
  white-space: nowrap;
}

.invoice-mgmt-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  border-right: 1px solid #f8fafc;
  color: var(--text);
  vertical-align: middle;
}

.invoice-mgmt-table tbody tr:hover {
  background-color: #f8fafc;
}


/* 시재금 구분 배지 (클릭 효과 없는 정적 라벨) */
.badge-petty-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 700;
  user-select: none;
  cursor: default !important;
  pointer-events: none;
}

.badge-petty-type.in {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.badge-petty-type.out {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

/* 시재금 잔액 열 시각적 강조 */
.petty-balance {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  font-family: Consolas, monospace;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: -0.3px;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.06);
}


/* 현금영수증 및 개별발행 공통 종류 배지 스타일 */
.badge-invoice-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11.5px;
  border: 1px solid #dbeafe;
  white-space: nowrap;
}
