/* Color tokens from the supplied ddalkkak-theme.css. Output pages retain their own styles. */
: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;
}

[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;
}

[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;
}

@media screen {
body[data-theme][data-tone]{
  --blue:var(--theme-primary);--blue2:var(--theme-primary-hover);--sky:var(--theme-tint-bg);--sky2:var(--theme-tint-border);--ink:var(--text-body);--muted:var(--text-sub);--line:var(--border-card);--bg:var(--bg-page);
  --ddk-ui-theme:var(--theme-primary)!important;--ddk-ui-ink:var(--text-body)!important;--ddk-ui-muted:var(--text-sub)!important;--ddk-ui-border:var(--border-card)!important;--ddk-ui-soft:var(--theme-tint-bg)!important;--ddk-ui-ring:var(--theme-tint-border)!important;
  background:var(--bg-page)!important;color:var(--text-body)!important;
}
body[data-theme] [data-ddk-ui-button],body[data-theme] [data-ddk-ui-nav]{--ddk-ui-control-theme:var(--theme-primary)!important}
body[data-theme] :is(.hero,.side-card,.main>.section){background:var(--bg-card);border-color:var(--border-card)!important}
body[data-theme] :is(.sidebar,.main>.step-nav,.report-preview-column){background:var(--theme-tint-bg)!important;border-color:var(--border-card)!important}
body[data-theme] :is(.title,.side-card h2,.main .stephead h2,.group-head h3,.ready-check h3){color:var(--text-title)!important}
body[data-theme] :is(.brand,.subtitle,.stephead p,.group-head p,.upload-note,.security,.ready-check .runhint,.settings-help,.input-hint,.side-footer,.foot,.fund-hint,.file-row .detail){color:var(--text-sub)!important}
body[data-theme] :is(.field label,.ready-group .ready .label){color:var(--text-label)!important}
body[data-theme] :is(.field input,.field textarea,.field select,#inspectionMonth){background:var(--bg-card)!important;color:var(--text-body)!important;border-color:var(--border-input)!important}
body[data-theme] :is(.field input,.field textarea,.field select,#inspectionMonth):focus{border-color:var(--theme-primary)!important;outline-color:var(--theme-tint-border)!important}
body[data-theme] :is(.choose,.run):not(:disabled){background:var(--theme-primary)!important;border-color:var(--theme-primary)!important;color:var(--theme-on-primary)!important}
body[data-theme] :is(.choose,.run):not(:disabled):hover{background:var(--theme-primary-hover)!important;border-color:var(--theme-primary-hover)!important}
body[data-theme] .step-link{background:var(--bg-card)!important;color:var(--text-sub)!important;border-color:var(--border-card)!important}
body[data-theme] .step-link.active{background:var(--theme-primary)!important;border-color:var(--theme-primary)!important;color:var(--theme-on-primary)!important}
body[data-theme] .step-link.active :is(b,small){color:var(--theme-on-primary)!important}
body[data-theme] :is(.step-dot,.side-footer b,.eyebrow){color:var(--theme-primary)!important}
body[data-theme] :is(.guide-button,.dl button){color:var(--theme-primary)!important;border-color:var(--border-input)!important;background:var(--bg-card)!important}
body[data-theme] :is(.guide-button,.dl button):hover{background:var(--theme-tint-bg)!important}
body[data-theme] :is(.drop,.ready-group .ready){border-color:var(--border-input)!important}
body[data-theme] .drop{background:var(--theme-tint-bg)!important}
body[data-theme] :is(.num,.privacy-pill){color:var(--theme-tint-text)!important;border-color:var(--theme-tint-border)!important;background:var(--theme-tint-bg)!important}
body[data-theme] :is(.manual-row input,#monthConfirmed,.fund-absent input,.electronic-note-option input){accent-color:var(--theme-primary)}
body[data-theme] .check-card{border-color:var(--border-card)}
body[data-theme] .electronic-note-option{color:var(--text-sub)}
body[data-theme] .brand-badge{background:var(--theme-primary);color:var(--theme-on-primary)}
}
