/**
 * Design Tokens
 * 디자인 시스템의 기본 변수 정의
 */

:root {
    /* ==================== Colors ==================== */

    /* Primary Colors */
    --color-primary: #3B82F6;
    --color-primary-hover: #2563EB;
    --color-primary-active: #1D4ED8;
    --color-primary-light: #EFF6FF;
    --color-primary-rgb: 59, 130, 246;

    /* Semantic Colors */
    --color-success: #059669;
    --color-success-hover: #047857;
    --color-success-light: #d1fae5;
    --color-warning: #D97706;
    --color-warning-hover: #B45309;
    --color-warning-light: #fef3c7;
    --color-error: #DC2626;
    --color-error-hover: #B91C1C;
    --color-error-light: #fee2e2;
    --color-info: #3B82F6;
    --color-info-light: #EFF6FF;

    /* Neutral Colors */
    --color-white: #ffffff;
    --color-black: #000000;
    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-500: #6b7280;
    --color-gray-600: #4b5563;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-gray-900: #111827;

    /* Background & Text (Light Theme Default) */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --border-color: #e5e7eb;

    /* ==================== Typography ==================== */

    /* Font Families */
    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, "Noto Sans", sans-serif,
                 "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    --font-mono: "JetBrains Mono", "SF Mono", Monaco, "Cascadia Code", "Roboto Mono",
                 Consolas, "Courier New", monospace;

    /* Font Sizes */
    --text-xs: 0.75rem;      /* 12px */
    --text-sm: 0.875rem;     /* 14px */
    --text-base: 1rem;       /* 16px */
    --text-lg: 1.125rem;     /* 18px */
    --text-xl: 1.25rem;      /* 20px */
    --text-2xl: 1.5rem;      /* 24px */
    --text-3xl: 1.875rem;    /* 30px */
    --text-4xl: 2.25rem;     /* 36px */
    --text-5xl: 3rem;        /* 48px */

    /* Line Heights */
    --leading-none: 1;
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;

    /* Font Weights */
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;

    /* ==================== Spacing ==================== */

    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.25rem;   /* 20px */
    --space-6: 1.5rem;    /* 24px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */
    --space-16: 4rem;     /* 64px */
    --space-20: 5rem;     /* 80px */

    /* ==================== Sizing ==================== */

    --size-xs: 20rem;     /* 320px */
    --size-sm: 24rem;     /* 384px */
    --size-md: 28rem;     /* 448px */
    --size-lg: 32rem;     /* 512px */
    --size-xl: 36rem;     /* 576px */
    --size-2xl: 42rem;    /* 672px */
    --size-3xl: 48rem;    /* 768px */
    --size-4xl: 56rem;    /* 896px */
    --size-5xl: 64rem;    /* 1024px */
    --size-6xl: 72rem;    /* 1152px */
    --size-7xl: 80rem;    /* 1280px */

    /* ==================== Element Sizing (표준 컴포넌트 크기) ==================== */

    /* 버튼, 셀렉트, 인풋 등 인터랙티브 요소의 높이 */
    --el-height-xs: 24px;    /* 미니 요소 */
    --el-height-sm: 30px;    /* 소형 (btn-sm, 툴바 요소) */
    --el-height-md: 40px;    /* 기본 (btn, form-control) */
    --el-height-lg: 44px;    /* 대형 (btn-lg) */

    /* 인터랙티브 요소 폰트 크기 */
    --el-font-xs: 11px;
    --el-font-sm: 12px;
    --el-font-md: 13px;
    --el-font-lg: 14px;

    /* ==================== UX Standard Font Sizes (AI Council Consensus) ==================== */
    /* 모든 UI 요소의 표준 폰트 크기 — 3개 AI 모델(Gemini, Grok, OpenAI)의 합의 결과 */

    --font-size-page-title: 1.75rem;      /* 28px - 페이지 제목 */
    --font-size-section-heading: 1.25rem;  /* 20px - 섹션 제목 */
    --font-size-tab-label: 0.875rem;       /* 14px - 탭 라벨 */
    --font-size-table-th: 0.875rem;        /* 14px - 테이블 헤더 */
    --font-size-table-td: 0.875rem;        /* 14px - 테이블 셀 */
    --font-size-badge: 0.75rem;            /* 12px - 뱃지 */
    --font-size-button: 0.875rem;          /* 14px - 버튼 */
    --font-size-sidebar-menu: 0.875rem;    /* 14px - 사이드바 메뉴 */
    --font-size-form-input: 0.875rem;      /* 14px - 폼 인풋 */
    --font-size-toast: 0.875rem;           /* 14px - 토스트 알림 */
    --font-size-breadcrumb: 0.875rem;      /* 14px - 브레드크럼 */
    --font-size-caption: 0.75rem;          /* 12px - 캡션/설명 */

    /* ==================== Border Radius ==================== */

    --radius-none: 0;
    --radius-sm: 4px;
    --radius-base: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --radius-full: 9999px;

    /* ==================== Shadows ==================== */

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* ==================== Z-Index ==================== */

    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;

    /* ==================== Semantic Row Heights ==================== */
    /* Intensive (dense lists): email rows, compact nav */
    --row-height-intensive: 2.25rem;    /* 36px */
    /* Compact (standard lists): file rows, sidebar items */
    --row-height-compact: 2.5rem;       /* 40px */
    /* Comfortable (spacious): calendar items, cards */
    --row-height-comfortable: 3rem;     /* 48px */

    /* ==================== Component Heights ==================== */
    /* Toolbar / Header bar */
    --toolbar-height: 3rem;             /* 48px */
    /* Modal header & footer */
    --modal-header-height: 3.25rem;     /* 52px */
    --modal-footer-height: 3.25rem;     /* 52px */

    /* ==================== Semantic Padding ==================== */
    /* Row inline padding (left/right) */
    --row-padding-x: var(--space-4);        /* 16px */
    --row-padding-x-sm: var(--space-3);     /* 12px */
    /* Row block padding (top/bottom) */
    --row-padding-y: var(--space-2);        /* 8px */
    --row-padding-y-sm: var(--space-1);     /* 4px */
    /* Modal padding */
    --modal-padding: var(--space-4);        /* 16px */
    --modal-padding-sm: var(--space-3);     /* 12px */

    /* ==================== Hover / Interactive ==================== */
    /* Standard hover background overlay */
    --hover-bg: rgba(0, 0, 0, 0.04);
    --hover-bg-strong: rgba(0, 0, 0, 0.08);
    /* Active/pressed background */
    --active-bg: rgba(0, 0, 0, 0.12);
    /* Selected row background */
    --selected-bg: rgba(59, 130, 246, 0.08);
    --selected-bg-strong: rgba(59, 130, 246, 0.15);
    /* Standard hover transition */
    --transition-hover: 150ms ease-in-out;

    /* ==================== Transitions ==================== */

    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;

    /* ==================== Breakpoints ==================== */

    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
    --breakpoint-2xl: 1536px;
}
