/* 도씨 디자인 토큰 — 웹 전 화면 공통. 앱(mobile)은 같은 값을 theme 으로 둔다.
   기준: 구매한 Untitled UI VARIABLES v8 (Figma dSgbJDMMllCFGYKTqloJY2) 의 중성 회색·글자·테두리·그림자 값,
   브랜드는 Untitled UI Blue 팔레트, 기기 상태색은 IoT Device Monitoring 키트와 같은 의미(정상/주의/위험).
   테마: 기본은 기기 설정. <html data-theme="light|dark"> 로 강제 (/js/theme.js). 문서: docs/design/dossi-ui.md */
:root {
  color-scheme: light;

  /* Untitled UI Blue — 도씨 브랜드 */
  --brand-25: #f5faff;
  --brand-50: #eff8ff;
  --brand-100: #d1e9ff;
  --brand-200: #b2ddff;
  --brand-300: #84caff;
  --brand-400: #53b1fd;
  --brand-500: #2e90fa;
  --brand-600: #1570ef;
  --brand-700: #175cd3;
  --brand-800: #1849a9;
  --brand-900: #194185;
  --brand-950: #102a56;
  --navy: #1e2f62;            /* IoT 키트 Primary — 사이드바·강조 면 */

  --bg-primary: #ffffff;
  --bg-secondary: #fafafa;
  --bg-tertiary: #f5f5f5;
  --bg-page: #fafafa;
  --border-primary: #d4d4d4;
  --border-secondary: #e5e5e5;
  --text-primary: #171717;
  --text-secondary: #404040;
  --text-tertiary: #525252;
  --text-quaternary: #737373;
  --text-placeholder: #737373;
  --text-brand: #175cd3;
  --fg-brand: #1570ef;
  --focus-ring: #2563eb;

  --success-bg: #ecfdf3;
  --success-fg: #079455;
  --warning-bg: #f1f5f9;   /* 주의는 주황 대신 차분한 회청색 (사용자 취향: 주황 싫어함) */
  --warning-fg: #475569;
  --error-bg: #fef3f2;
  --error-fg: #d92d20;

  --shadow-xs: 0 1px 2px #0000000d;
  --shadow-lg: 0 12px 16px -4px #00000014, 0 4px 6px -2px #00000008, 0 2px 2px -1px #0000000a;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --font: 'Pretendard Variable', Pretendard, Inter, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg-primary: #171717;
    --bg-secondary: #1f1f1f;
    --bg-tertiary: #262626;
    --bg-page: #0a0a0a;
    --border-primary: #525252;
    --border-secondary: #333333;
    --text-primary: #fafafa;
    --text-secondary: #e5e5e5;
    --text-tertiary: #d4d4d4;
    --text-quaternary: #a3a3a3;
    --text-placeholder: #a3a3a3;
    --text-brand: #84caff;
    --fg-brand: #53b1fd;
    --focus-ring: #84adff;
    --success-bg: #053321;
    --success-fg: #47cd89;
    --warning-bg: #1e2633;
    --warning-fg: #cbd5e1;
    --error-bg: #55160c;
    --error-fg: #f97066;
    --shadow-xs: 0 1px 2px #00000040;
    --shadow-lg: 0 12px 16px -4px #00000066, 0 4px 6px -2px #00000033;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg-primary: #171717;
  --bg-secondary: #1f1f1f;
  --bg-tertiary: #262626;
  --bg-page: #0a0a0a;
  --border-primary: #525252;
  --border-secondary: #333333;
  --text-primary: #fafafa;
  --text-secondary: #e5e5e5;
  --text-tertiary: #d4d4d4;
  --text-quaternary: #a3a3a3;
  --text-placeholder: #a3a3a3;
  --text-brand: #84caff;
  --fg-brand: #53b1fd;
  --focus-ring: #84adff;
  --success-bg: #053321;
  --success-fg: #47cd89;
  --warning-bg: #1e2633;
  --warning-fg: #cbd5e1;
  --error-bg: #55160c;
  --error-fg: #f97066;
  --shadow-xs: 0 1px 2px #00000040;
  --shadow-lg: 0 12px 16px -4px #00000066, 0 4px 6px -2px #00000033;
}
