/* =====================================================================
   딸깍 시리즈 웹앱 공통 색상 테마 (ddalkkak-theme.css)
   - 색상과 테두리만 정합니다. 폰트, 글자 크기, 여백은 들어 있지 않습니다.
   - 사용법: <body data-tone="strong" data-theme="blue">
       data-tone  : 바탕 톤 (글자·테두리 진하기)  → strong | stronger
       data-theme : 테마색 (앱별 포인트 색)      → blue | navy | green | violet | orange

   [AI에게 안내]
   이 CSS로 화면을 만들거나 고칠 때는, 작업을 시작하기 전에 사용자에게
   아래 두 가지를 먼저 물어보세요. 사용자가 이미 말했다면 묻지 않아도 됩니다.
     1) 바탕 톤 : 진하게(strong) / 아주 진하게(stronger)
     2) 테마색  : 블루(blue) / 네이비(navy) / 그린(green) / 바이올렛(violet) / 오렌지(orange)
   - 색은 아래 CSS 변수(var(--...))로만 쓰고, 색상 코드를 직접 적지 마세요.
   - 폰트 관련 속성은 이 파일에서 정하지 않습니다. 사용자 지시를 따르세요.
   ===================================================================== */


/* ---------------------------------------------------------------------
   0. 기본값 (data 속성을 지정하지 않았을 때: 진하게 + 블루)
   --------------------------------------------------------------------- */
:root {
  /* 바탕 톤: 진하게 */
  --text-title:   #0B1220;
  --text-body:    #111827;
  --text-sub:     #374151;
  --text-label:   #1F2937;
  --border-card:  #6B7280;
  --border-input: #4B5563;
  --line-head:    #4B5563;
  --line-row:     #9CA3AF;
  --line-width:   1px;

  /* 공통 배경 */
  --bg-page:      #F8FAFC;
  --bg-card:      #FFFFFF;
  --bg-head:      #E5E7EB;

  /* 테마색: 블루 */
  --theme-primary:       #2563EB;
  --theme-primary-hover: #1D4ED8;
  --theme-tint-bg:       #EFF6FF;
  --theme-tint-border:   #BFDBFE;
  --theme-tint-text:     #1E40AF;
  --theme-on-primary:    #FFFFFF;

  /* 3. 상태색 — 모든 앱 공통 */
  --status-done:         #166534;  /* 완료·승인 */
  --status-done-bg:      #DCFCE7;
  --status-warn:         #B45309;  /* 주의·대기 */
  --status-warn-bg:      #FEF3C7;
  --status-error:        #9F1239;  /* 오류·삭제 */
  --status-error-bg:     #FFE4E6;
}


/* ---------------------------------------------------------------------
   1. 바탕 톤 — 모든 앱 공통 (data-tone)
   --------------------------------------------------------------------- */

/* 진하게 */
[data-tone="strong"] {
  --text-title:   #0B1220;  /* 제목 글자 */
  --text-body:    #111827;  /* 본문 글자 */
  --text-sub:     #374151;  /* 안내문 글자 */
  --text-label:   #1F2937;  /* 입력칸 라벨 */
  --border-card:  #6B7280;  /* 카드 테두리 */
  --border-input: #4B5563;  /* 입력칸 테두리 */
  --line-head:    #4B5563;  /* 표 머리줄 아래 선 */
  --line-row:     #9CA3AF;  /* 표 행 구분선 (1px) */
  --line-width:   1px;      /* 카드·입력칸·머리줄 선 두께 */
}

/* 아주 진하게 */
[data-tone="stronger"] {
  --text-title:   #030712;
  --text-body:    #0F172A;
  --text-sub:     #1F2937;
  --text-label:   #111827;
  --border-card:  #374151;
  --border-input: #1F2937;
  --line-head:    #1F2937;
  --line-row:     #6B7280;
  --line-width:   1.5px;
}


/* ---------------------------------------------------------------------
   2. 테마색 — 앱별로 하나 선택 (data-theme)
   주색: 버튼·활성 단계·딸깍 배지 / hover: 마우스 올림·링크
   tint: 배지·강조 영역의 연한 배경, 테두리, 그 위 글자
   --------------------------------------------------------------------- */

/* 블루 — 추천 용도: 원천세, 여비 */
[data-theme="blue"] {
  --theme-primary:       #2563EB;
  --theme-primary-hover: #1D4ED8;
  --theme-tint-bg:       #EFF6FF;
  --theme-tint-border:   #BFDBFE;
  --theme-tint-text:     #1E40AF;
}

/* 네이비 — 차분한 화면 (주색이 짙어서 마우스를 올리면 오히려 밝아짐) */
[data-theme="navy"] {
  --theme-primary:       #172554;
  --theme-primary-hover: #1E3A8A;
  --theme-tint-bg:       #EEF2F9;
  --theme-tint-border:   #C3CEE3;
  --theme-tint-text:     #172554;
}

/* 그린 — 추천 용도: 엑셀 관련
   주의: 주색이 '완료' 상태색과 비슷하게 보일 수 있음 */
[data-theme="green"] {
  --theme-primary:       #15803D;
  --theme-primary-hover: #166534;
  --theme-tint-bg:       #F0FDF4;
  --theme-tint-border:   #BBF7D0;
  --theme-tint-text:     #166534;
}

/* 바이올렛 — 추천 용도: 기록물 */
[data-theme="violet"] {
  --theme-primary:       #6D28D9;
  --theme-primary-hover: #5B21B6;
  --theme-tint-bg:       #F5F3FF;
  --theme-tint-border:   #DDD6FE;
  --theme-tint-text:     #5B21B6;
}

/* 오렌지 — 추천 용도: 다음 앱 */
[data-theme="orange"] {
  --theme-primary:       #C2410C;
  --theme-primary-hover: #9A3412;
  --theme-tint-bg:       #FFF7ED;
  --theme-tint-border:   #FED7AA;
  --theme-tint-text:     #9A3412;
}


/* ---------------------------------------------------------------------
   4. 기본 요소에 적용 (색·테두리만)
   --------------------------------------------------------------------- */
body { background: var(--bg-page); color: var(--text-body); }
h1, h2, h3, h4 { color: var(--text-title); }
label { color: var(--text-label); }
.text-sub { color: var(--text-sub); }

a { color: var(--theme-primary-hover); }
a:hover { color: var(--theme-primary); }

.card {
  background: var(--bg-card);
  border: var(--line-width) solid var(--border-card);
}

input, select, textarea {
  background: var(--bg-card);
  color: var(--text-body);
  border: var(--line-width) solid var(--border-input);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--theme-primary);
  outline: 2px solid var(--theme-tint-border);
  outline-offset: 0;
}

table { border-collapse: collapse; }
th {
  background: var(--bg-head);
  color: var(--text-title);
  border-bottom: var(--line-width) solid var(--line-head);
}
td {
  color: var(--text-body);
  border-bottom: 1px solid var(--line-row);
}

/* 주 버튼 */
.btn-primary {
  background: var(--theme-primary);
  color: var(--theme-on-primary);
  border: var(--line-width) solid var(--theme-primary);
}
.btn-primary:hover {
  background: var(--theme-primary-hover);
  border-color: var(--theme-primary-hover);
}

/* 보조 버튼 (테두리형) */
.btn-secondary {
  background: var(--bg-card);
  color: var(--theme-primary);
  border: var(--line-width) solid var(--theme-primary);
}
.btn-secondary:hover { background: var(--theme-tint-bg); }

/* 활성 단계 (작성 단계 목록 등) */
.step.is-active {
  background: var(--theme-primary);
  color: var(--theme-on-primary);
  border-color: var(--theme-primary);
}

/* 딸깍 배지 */
.brand-badge {
  background: var(--theme-primary);
  color: var(--theme-on-primary);
}

/* 테마색 강조 배지·영역 */
.badge, .tint-box {
  background: var(--theme-tint-bg);
  color: var(--theme-tint-text);
  border: 1px solid var(--theme-tint-border);
}

/* 상태 표시 */
.status-done  { background: var(--status-done-bg);  color: var(--status-done);  border: 1px solid var(--status-done); }
.status-warn  { background: var(--status-warn-bg);  color: var(--status-warn);  border: 1px solid var(--status-warn); }
.status-error { background: var(--status-error-bg); color: var(--status-error); border: 1px solid var(--status-error); }

/* 삭제 버튼 */
.btn-danger {
  background: var(--bg-card);
  color: var(--status-error);
  border: var(--line-width) solid var(--status-error);
}
.btn-danger:hover { background: var(--status-error-bg); }
