/* CTC2 Custom Styles */
body {
  background-color: #f0f2f5;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
}

/* ===== AUTH OVERLAY ===== */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #1a2332 0%, #232f3e 50%, #2d3e50 100%);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-overlay.d-none { display: none !important; }

.auth-card {
  background: #fff;
  border-radius: 14px;
  padding: 40px 44px;
  width: 400px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
}
.auth-logo {
  font-size: 2.2rem;
  font-weight: 800;
  color: #ff9900;
  letter-spacing: 4px;
  margin-bottom: 4px;
}
.auth-card .form-label { font-size: 0.82rem; font-weight: 600; }
.auth-card .form-control { font-size: 0.88rem; }

/* ===== NAVBAR ===== */
.ctc-navbar {
  background-color: #232f3e !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  min-height: 52px;
}
.navbar-brand {
  color: #ff9900 !important;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 3px;
}
.ctc-navbar .nav-link {
  cursor: pointer;
  color: rgba(255,255,255,0.8) !important;
  border-radius: 4px;
  padding: 6px 14px !important;
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s;
}
.ctc-navbar .nav-link:hover {
  background-color: rgba(255,255,255,0.1);
  color: #fff !important;
}
.ctc-navbar .nav-link.active {
  background-color: rgba(255,153,0,0.25) !important;
  color: #ff9900 !important;
  font-weight: 600;
}
.nav-user-badge {
  color: #fff;
  font-size: 0.85rem;
  background: rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 4px 14px;
  font-weight: 500;
}
.nav-user-badge::before { content: '\F4DA'; font-family: 'bootstrap-icons'; margin-right: 6px; }

/* ===== REPORT DROPDOWN (navbar) ===== */
.ctc-report-dropdown {
  background-color: #2d3e50;
  border: 1px solid rgba(255,255,255,0.12);
  min-width: 140px;
  padding: 4px 0;
}
.ctc-report-dropdown .dropdown-item {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  padding: 7px 16px;
  cursor: pointer;
  border-radius: 4px;
  margin: 1px 4px;
  width: auto;
}
.ctc-report-dropdown .dropdown-item:hover {
  background-color: rgba(255,255,255,0.1);
  color: #fff;
}
.ctc-report-dropdown .dropdown-item.active {
  background-color: rgba(255,153,0,0.25) !important;
  color: #ff9900 !important;
  font-weight: 600;
}

/* ===== PAGE SECTIONS ===== */
.page-section { display: none; }
.page-section.active { display: block; }

/* ===== TABLE ===== */
.table-responsive { overflow-x: auto; }
.table th {
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 10px;
  vertical-align: middle;
}
.table td {
  font-size: 0.82rem;
  padding: 6px 10px;
  vertical-align: middle;
}
.table-hover tbody tr:hover {
  background-color: rgba(0, 102, 204, 0.06) !important;
}
.th-action {
  width: 80px;
  text-align: center;
}

/* creator/modifier columns */
.col-creator { color: #6c757d; font-size: 0.78rem; }

/* 작은 데이터 컬럼 — 줄바꿈 없이 내용에 맞게 */
.col-compact { white-space: nowrap; }

/* 리포트 탭/서브탭 커서 */
#reportTabs .nav-link,
.nav-tabs .nav-link { cursor: pointer; }

/* CTC2 브랜드 클릭 가능 */
.navbar-brand { cursor: pointer; }

/* 주간업데이트 편집 링크 */
.rpt-update-link {
  cursor: pointer;
}
.rpt-update-link:hover {
  background: rgba(0, 102, 204, 0.07);
}

/* 사업명 클릭 링크 */
.deal-name-link {
  color: #0066cc;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}
.deal-name-link:hover { text-decoration: underline; color: #0052a3; }

/* ===== ROW SELECTION ===== */
.th-chk {
  width: 36px;
  min-width: 36px;
  text-align: center;
  padding: 4px 6px !important;
}
.row-selected td {
  background-color: rgba(255, 153, 0, 0.12) !important;
}

/* ===== ACTION BUTTONS ===== */
.action-btns {
  white-space: nowrap;
  text-align: center;
}
.action-btns .btn {
  width: 28px;
  height: 26px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

/* ===== FORM ===== */
.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #495057;
  margin-bottom: 3px;
}

/* ===== MODAL ===== */
.ctc-modal-header {
  background-color: #232f3e;
  color: #fff;
  border-bottom: none;
}
.modal-xl { max-width: 960px; }

/* ===== SOLUTION CHECKBOXES ===== */
.solution-container {
  min-height: 52px;
  max-height: 110px;
  overflow-y: auto;
  background: #f8f9fa;
}
.solution-container .form-check {
  margin: 2px 4px;
  display: inline-flex;
  align-items: center;
}
.solution-container .form-check-label {
  font-size: 0.82rem;
  cursor: pointer;
}

/* ===== DEAL SEARCH DROPDOWN ===== */
.deal-search-dropdown {
  position: absolute;
  z-index: 9999;
  background: #fff;
  border: 1px solid #ced4da;
  border-top: none;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  max-height: 240px;
  overflow-y: auto;
  width: 100%;
  top: 100%;
  left: 0;
}
.deal-search-dropdown .result-item {
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.83rem;
  border-bottom: 1px solid #f0f0f0;
}
.deal-search-dropdown .result-item:last-child { border-bottom: none; }
.deal-search-dropdown .result-item:hover { background-color: #e8f0fe; }

/* ===== SETTINGS ===== */
.settings-wrap { max-width: 680px; }
#settingsTabs .nav-link {
  cursor: pointer;
  font-size: 0.85rem;
  padding: 6px 14px;
}
#settingsTabs .nav-link.active { font-weight: 600; }
#optionsList .list-group-item {
  font-size: 0.85rem;
  padding: 7px 14px;
}

/* ===== BADGE ===== */
.badge { font-size: 0.72rem; font-weight: 500; }

/* ===== TOAST ===== */
.ctc-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  min-width: 240px;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  animation: slideUp 0.25s ease;
  font-size: 0.87rem;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== TRUNCATED CELL ===== */
.cell-truncate {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cell-update {
  max-width: 340px;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ===== CARD ===== */
.card { border-radius: 8px; }

/* ===== COLUMN SORT / FILTER ===== */
#dealsTableHead th,
#weeklyTableHead th {
  padding: 6px 8px;
  vertical-align: top;
  white-space: nowrap;
  position: relative; /* 리사이즈 핸들 앵커 */
}

/* ===== 컬럼 드래그 리사이즈 핸들 ===== */
.col-resize-handle {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  cursor: col-resize;
  z-index: 2;
  border-right: 2px solid transparent;
  transition: border-color 0.15s;
}
.col-resize-handle:hover {
  border-right-color: rgba(255, 153, 0, 0.75);
}

.th-sort {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding-bottom: 4px;
  font-weight: 600;
  font-size: 0.8rem;
}
.th-sort:hover { color: #ffb84d; }
.th-sort:hover .sort-icon { opacity: 1; }

.sort-icon {
  font-size: 0.65rem;
  opacity: 0.35;
  flex-shrink: 0;
}
th.sort-active .th-sort { color: #ff9900; }
th.sort-active .sort-icon { opacity: 1; color: #ff9900; }

.col-filter {
  display: block;
  width: 100%;
  box-sizing: border-box;
  font-size: 0.71rem;
  padding: 1px 5px;
  height: 20px;
  border-radius: 3px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.07);
  color: #e0e6ed;
  outline: none;
  min-width: 0;
}
.col-filter::placeholder {
  color: rgba(255,255,255,0.28);
  font-style: italic;
}
.col-filter:focus {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,153,0,0.65);
  color: #fff;
}
select.col-filter {
  cursor: pointer;
  padding: 0 3px;
  -webkit-appearance: none;
  appearance: none;
}
select.col-filter option {
  background: #2d3e50;
  color: #e0e6ed;
}

/* ===== PAGINATION ===== */
.ctc-page-link {
  cursor: pointer;
  font-size: 0.8rem;
  padding: 3px 9px !important;
  line-height: 1.5;
}
.pagination .page-item.active .page-link {
  background-color: #232f3e;
  border-color: #232f3e;
}
.pagination .page-link:hover:not(.disabled) {
  background-color: rgba(255,153,0,0.15);
  border-color: #ff9900;
  color: #c07000;
}

/* ===== REPORT ===== */
.rpt-table { font-size: 0.82rem; }
.rpt-table th { white-space: nowrap; font-size: 0.78rem; font-weight: 600; padding: 6px 10px; }
.rpt-table td { padding: 5px 10px; vertical-align: middle; }
.rpt-table tfoot td { font-size: 0.8rem; }

.rpt-ps-group { margin-bottom: 0; border-bottom: 2px solid #dee2e6; }
.rpt-ps-group:last-child { border-bottom: none; }
.rpt-ps-header {
  background: #f1f3f5 !important;
  padding: 6px 14px !important;
  font-size: 0.82rem;
  font-weight: 700;
  color: #232f3e;
}
.rpt-update-cell {
  font-size: 0.8rem;
  white-space: pre-wrap;
  word-break: break-word;
  max-width: 420px;
}

/* 드릴다운 */
.rpt-drill-cell {
  cursor: pointer;
  color: #0066cc;
  font-weight: 600;
  text-decoration: underline dotted;
  transition: background 0.1s;
}
.rpt-drill-cell:hover { background-color: rgba(0,102,204,0.08) !important; }
.rpt-drill-cell.rpt-drill-active { background-color: rgba(255,153,0,0.18) !important; color: #b36a00; }
#rpt-drill-section { scroll-margin-top: 70px; }

/* ===== REPORT STATUS BADGE LINK ===== */
.rpt-status-link {
  cursor: pointer;
  transition: opacity 0.15s, box-shadow 0.15s;
}
.rpt-status-link:hover {
  opacity: 0.82;
  box-shadow: 0 0 0 2px rgba(0,102,204,0.35);
}

/* ===== REPORT INLINE LINKS ===== */
.rpt-link {
  color: #0066cc;
  text-decoration: none;
  cursor: pointer;
  font-weight: 500;
}
.rpt-link:hover { text-decoration: underline; color: #0052a3; }

/* ===== WEEKLY HISTORY BUTTON ===== */
.weekly-hist-btn {
  width: 26px;
  height: 24px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}
.whm-subtitle {
  color: rgba(255,255,255,0.65);
  font-size: 0.8rem;
}
.whm-update-cell {
  font-size: 0.82rem;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ===== BULLET TOOLBAR ===== */
.bullet-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f1f3f5;
  border: 1px solid #ced4da;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  padding: 5px 10px;
  flex-wrap: wrap;
}
.btool-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6c757d;
  margin-right: 4px;
  white-space: nowrap;
}
.btool {
  border: 1px solid #ced4da;
  background: #fff;
  border-radius: 3px;
  padding: 2px 10px;
  font-size: 0.82rem;
  cursor: pointer;
  color: #343a40;
  line-height: 1.5;
  font-family: inherit;
  transition: background 0.1s, border-color 0.1s;
  white-space: nowrap;
}
.btool:hover   { background: #e2e6ea; border-color: #6c757d; }
.btool:active  { background: #d3d9df; }
.btool-sep {
  display: inline-block;
  width: 1px;
  height: 16px;
  background: #ced4da;
  margin: 0 6px;
  flex-shrink: 0;
}
.btool-hint {
  font-size: 0.71rem;
  color: #adb5bd;
  white-space: nowrap;
}
/* 각 글머리 기호 크기 개별 조정 */
.b-icon { display: inline-block; line-height: 1; vertical-align: -0.05em; }
.b-l1   { font-size: 1.5em; }    /* •  U+2022: 글리프가 em의 ~30% → 크게 키움 */
.b-l2   { font-size: 0.95em; }   /* ◦  U+25E6: 글리프가 em의 ~40% → 약간 키움 */
.b-l3   { font-size: 0.85em; }   /* ▪  U+25AA: 글리프가 em의 ~50% → 약간 축소 */
/* textarea attached to toolbar: no top radius */
.bullet-toolbar + .form-control {
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
}
