/* =============================================
   Verdi CRM — Business Cards v4.29.0
   명함 관리 모듈 (B-1단계: CRM 본체)
   ============================================= */

/* ── 로딩 / 에러 ── */
.bc-loading,
.bc-error {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 80px 24px;
  color: #7E879A;
  font-size: 15px;
}

/* ── 페이지 래퍼 ── */
.bc-page {
  padding: 20px 24px;
  max-width: 960px;
}

/* ══════════════════════════════════════════
   툴바 (검색 + 필터 + 등록 버튼)
   ══════════════════════════════════════════ */
.bc-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.bc-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.bc-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #7E879A;
  pointer-events: none;
  font-size: 14px;
}

.bc-search-input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(14,21,48,0.55);
  color: #F3F7FF;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.bc-search-input::placeholder { color: rgba(243,247,255,0.40); }
.bc-search-input:focus { border-color: var(--accent); }

.bc-filter-sel {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(14,21,48,0.55);
  color: #F3F7FF;
  font-size: 14px;
  outline: none;
  cursor: pointer;
  white-space: nowrap;
}

/* ══════════════════════════════════════════
   버튼 공통
   ══════════════════════════════════════════ */
.bc-btn-primary {
  padding: 9px 18px;
  border: none;
  border-radius: 8px;
  background: var(--accent, #5B84C4);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.bc-btn-primary:hover { opacity: 0.88; }
.bc-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.bc-btn-secondary {
  padding: 9px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(14,21,48,0.55);
  color: #F3F7FF;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: border-color 0.15s;
  white-space: nowrap;
}
.bc-btn-secondary:hover { border-color: var(--accent); }
.bc-btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }

.bc-btn-ghost {
  padding: 9px 18px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: transparent;
  color: #7E879A;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s, border-color 0.15s;
}
.bc-btn-ghost:hover { color: #F3F7FF; border-color: rgba(255,255,255,0.25); }
.bc-btn-ghost:disabled { opacity: 0.5; cursor: not-allowed; }

.bc-btn-full {
  width: 100%;
  justify-content: center;
}

/* ══════════════════════════════════════════
   화면 B — 카드 그리드 (보관함)
   ══════════════════════════════════════════ */
.bc-list-body { }

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

.bc-card-item {
  background: rgba(14,21,48,0.65);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bc-card-item:hover {
  border-color: var(--accent, #5B84C4);
  transform: translateY(-2px);
}

.bc-card-item__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.bc-card-item__date  { font-size: 12px; color: #7E879A; }
.bc-card-item__name  { font-size: 16px; font-weight: 700; color: #F3F7FF; line-height: 1.3; }
.bc-card-item__company { font-size: 14px; color: #CBD5E1; font-weight: 500; }
.bc-card-item__title { font-size: 13px; color: #7E879A; }
.bc-card-item__meta  {
  font-size: 12px;
  color: #7E879A;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.bc-card-item__footer {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.bc-card-item__author { font-size: 12px; color: #7E879A; }

/* ── 배지 ── */
.bc-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.bc-badge--pending  { background: rgba(245,158,11,0.15);  color: #F59E0B; }
.bc-badge--promoted { background: rgba(34,197,94,0.15);   color: #22C55E; }
.bc-badge--archived { background: rgba(107,114,128,0.15); color: #6B7280; }

/* ── 빈 목록 ── */
.bc-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  color: #4B5568;
  gap: 16px;
  text-align: center;
}
.bc-empty p { font-size: 15px; margin: 0; }

/* ══════════════════════════════════════════
   공통 폼 헤더 (화면 A/C 공통)
   ══════════════════════════════════════════ */
.bc-form-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.bc-back-btn {
  background: none;
  border: none;
  color: var(--accent, #5B84C4);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  flex: none;
}
.bc-back-btn:hover { text-decoration: underline; }

.bc-form-title {
  font-size: 18px;
  font-weight: 700;
  color: #F3F7FF;
  margin: 0;
}

/* ══════════════════════════════════════════
   화면 A — OCR 섹션
   ══════════════════════════════════════════ */
.bc-ocr-section {
  background: rgba(14,21,48,0.55);
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.bc-ocr-label {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--accent, #5B84C4);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  padding: 16px 28px;
  border: 1px solid var(--accent, #5B84C4);
  border-radius: 8px;
  transition: background 0.15s;
}
.bc-ocr-label:hover { background: rgba(91,132,196,0.12); }

.bc-img-input { display: none; }

.bc-img-preview { width: 100%; max-width: 360px; }
.bc-img-preview.hidden { display: none; }

.bc-preview-img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  object-fit: contain;
  max-height: 240px;
}

.bc-ocr-status {
  font-size: 13px;
  color: #7E879A;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 20px;
}

/* ══════════════════════════════════════════
   공통 폼 필드
   ══════════════════════════════════════════ */
.bc-form-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.bc-form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bc-label {
  font-size: 13px;
  font-weight: 500;
  color: #7E879A;
}

.bc-required { color: #E74C3C; margin-left: 2px; }

.bc-input {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(14,21,48,0.55);
  color: #F3F7FF;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
  box-sizing: border-box;
}
.bc-input::placeholder { color: rgba(243,247,255,0.35); }
.bc-input:focus { border-color: var(--accent); }

.bc-textarea {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(14,21,48,0.55);
  color: #F3F7FF;
  font-size: 14px;
  outline: none;
  resize: vertical;
  font-family: inherit;
  transition: border-color 0.15s;
  width: 100%;
  box-sizing: border-box;
}
.bc-textarea:focus { border-color: var(--accent); }

/* ══════════════════════════════════════════
   화면 C — 상세 메타 / 액션
   ══════════════════════════════════════════ */
.bc-detail-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: #7E879A;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.bc-action-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

/* ── 승격 메시지 박스 ── */
.bc-promote-msg {
  background: rgba(14,21,48,0.65);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 14px;
  color: #CBD5E1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  line-height: 1.5;
}

.bc-promoted-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #CBD5E1;
  padding: 12px 16px;
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.20);
  border-radius: 8px;
  flex-wrap: wrap;
}

.bc-link {
  color: var(--accent, #5B84C4);
  text-decoration: none;
}
.bc-link:hover { text-decoration: underline; }

/* ══════════════════════════════════════════
   반응형 (모바일 우선)
   ══════════════════════════════════════════ */
@media (max-width: 600px) {
  .bc-page       { padding: 14px 12px; }
  .bc-toolbar    { flex-direction: column; align-items: stretch; }
  .bc-card-grid  { grid-template-columns: 1fr; }
  .bc-search-wrap { min-width: 0; }
  .bc-filter-sel  { width: 100%; }
  .bc-btn-primary,
  .bc-btn-secondary,
  .bc-btn-ghost   { justify-content: center; }
}
