/**
 * CAREHERO Enterprise & 간병인협회 통합 플랫폼 공통 디자인 시스템 (public/assets/css/common.css)
 * - 전 페이지(SaaS 분양 포털, 슈퍼어드민, 브랜드 스튜디오, 협회 통합홈, 보호자/간병인 웹뷰, 확인서, ERP 어드민)에서 공통 로드
 * - 이 파일 하나를 수정하면 모든 분양 입점협회(/t/{협회코드} 및 자체 도메인)에 승인 절차 없이 즉시 공통 반영됩니다.
 */

:root {
  --brand-primary: #fee500;
  --brand-header-text: #191919;
  --brand-accent: #1d4ed8;
  --brand-bg: #f1f5f9;
  --ink-900: #0f172a;
  --ink-700: #334155;
  --ink-500: #64748b;
  --line-200: #e2e8f0;
  --line-300: #cbd5e1;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  word-break: keep-all;
  overflow-wrap: break-word;
  overflow-x: hidden;
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
  word-break: keep-all;
  line-height: 1.3;
}

img, svg, video, canvas {
  max-width: 100%;
  height: auto;
}

/* 공통 반응형 테이블 가로 스크롤 래퍼 */
.table-responsive,
.table-scroll-x {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* 공통 반응형 그리드 유틸리티 */
.cc-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.cc-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.cc-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

/* 입점협회 업그레이드 알림 배너 (어드민 및 공통 상단) */
.cc-upgrade-banner {
  background: linear-gradient(90deg, #1e1b4b 0%, #1d4ed8 55%, #0284c7 100%);
  color: #ffffff;
  padding: 11px 20px;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border-bottom: 2px solid #38bdf8;
}

.cc-upgrade-banner .cc-up-badge {
  background: #fee500;
  color: #0f172a;
  font-weight: 900;
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.cc-upgrade-banner .cc-up-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.cc-upgrade-banner .cc-up-btn {
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
}

.cc-upgrade-banner .cc-up-btn:hover {
  transform: translateY(-1px);
}

.cc-up-btn-review {
  background: #ffffff;
  color: #0f172a;
}

.cc-up-btn-approve {
  background: #22c55e;
  color: #ffffff;
}

.cc-up-btn-reject {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
}

/* 선택형 업그레이드(v4.2.0 smart_care_suite_v42) 승인 시 활성화되는 스마트 퀵액션 플로팅 바 */
.cc-smart-suite-bar {
  display: none;
  background: linear-gradient(90deg, #0f172a 0%, #1e3a8a 100%);
  color: #f8fafc;
  padding: 8px 16px;
  font-size: 12px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.35);
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

body.cc-feat-smart_care_suite_v42 .cc-smart-suite-bar {
  display: flex;
}

/* 공통 모달 반응형 높이/너비 안전장치 */
.modal-backdrop {
  padding: 16px;
}

.modal-box {
  max-height: calc(100dvh - 32px);
  width: 100%;
  overflow-y: auto;
}

/* 태블릿 브레이크포인트 (1024px 이하) */
@media screen and (max-width: 1024px) {
  .cc-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cc-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 모바일 브레이크포인트 (640px 이하) */
@media screen and (max-width: 640px) {
  .cc-grid-2,
  .cc-grid-3,
  .cc-grid-4,
  .grid-2,
  .form-grid,
  .form-grid-2 {
    grid-template-columns: 1fr !important;
  }

  .topbar,
  .hero-bar,
  .kakao-header .top-row,
  header .inner {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 8px;
  }

  .modal-backdrop {
    padding: 10px !important;
  }

  .modal-box {
    padding: 16px !important;
    max-height: calc(100dvh - 20px) !important;
  }
}
