/* ============================================
   AGRR Design System - Design Tokens
   Created: 2025-10-12
   Purpose: 統一されたデザイントークンの定義
   ============================================ */

:root {
  /* ============================================
     カラーパレット
     ============================================ */
  
  /* Primary - 農業テーマの緑（メインブランドカラー） */
  --color-primary: #2d5016;
  --color-primary-light: #4a7c23;
  --color-primary-dark: #1a3009;
  
  /* Secondary - アクセント紫（AI/テクノロジー感） */
  --color-secondary: #667eea;
  --color-secondary-light: #8b9dff;
  --color-secondary-dark: #4a5fc5;
  
  /* グラデーション - 特別な要素用 */
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-success: linear-gradient(135deg, #00b894 0%, #55efc4 100%);
  --gradient-warning: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
  --gradient-success-surface: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
  
  /* Functional Colors - 機能的な色 */
  --color-success: #48bb78;
  --color-success-light: #9ae6b4;
  --color-success-dark: #2f855a;
  --color-success-bg: #d4edda;
  --color-success-border: #c3e6cb;
  --color-success-text: #155724;
  
  --color-warning: #f6ad55;
  --color-warning-light: #fbd38d;
  --color-warning-dark: #dd6b20;
  --color-warning-bg: #fff3cd;
  --color-warning-border: #ffc107;
  --color-warning-text: #856404;
  
  --color-error: #fc8181;
  --color-error-light: #feb2b2;
  --color-error-dark: #e53e3e;
  --color-error-bg: #f8d7da;
  --color-error-border: #f5c6cb;
  --color-error-text: #721c24;
  
  --color-info: #4299e1;
  --color-info-light: #90cdf4;
  --color-info-dark: #2b6cb0;
  --color-info-bg: #d1ecf1;
  --color-info-border: #bee5eb;
  --color-info-text: #0c5460;
  --color-info-surface: #ebf8ff;
  
  /* Neutral Colors - グレースケール */
  --color-white: #ffffff;
  --color-gray-50: #f8f9fa;
  --color-gray-100: #f7fafc;
  --color-gray-200: #e9ecef;
  --color-gray-300: #dee2e6;
  --color-gray-400: #cbd5e0;
  --color-gray-500: #a0aec0;
  --color-gray-600: #718096;
  --color-gray-700: #4a5568;
  --color-gray-800: #2d3748;
  --color-gray-900: #1a202c;
  --color-black: #000000;
  
  /* Background Colors - 背景色 */
  --bg-body: #f8f9fa;
  --bg-card: #ffffff;
  --bg-elevated: #ffffff;
  
  /* Text Colors - テキスト色 */
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-tertiary: #999999;
  --text-inverse: #ffffff;
  
  /* ============================================
     スペーシングシステム
     8pxベースのスペーシングスケール
     ============================================ */
  
  --space-0: 0;
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.5rem;    /* 24px */
  --space-6: 2rem;      /* 32px */
  --space-8: 3rem;      /* 48px */
  --space-10: 4rem;     /* 64px */
  --space-12: 6rem;     /* 96px */
  
  /* ============================================
     タイポグラフィシステム
     ============================================ */
  
  /* Font Families */
  --font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 
                      'Helvetica Neue', Arial, 'Hiragino Sans', 
                      'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
  --font-family-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', 
                      Consolas, 'Courier New', monospace;
  
  /* Font Sizes */
  --font-size-xs: 0.75rem;      /* 12px */
  --font-size-sm: 0.875rem;     /* 14px */
  --font-size-base: 1rem;       /* 16px */
  --font-size-lg: 1.125rem;     /* 18px */
  --font-size-xl: 1.25rem;      /* 20px */
  --font-size-2xl: 1.5rem;      /* 24px */
  --font-size-3xl: 2rem;        /* 32px */
  --font-size-4xl: 2.5rem;      /* 40px */
  --font-size-5xl: 3rem;        /* 48px */
  --font-size-6xl: 3.5rem;      /* 56px */
  
  /* Font Weights */
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  --font-weight-black: 900;
  
  /* Line Heights */
  --line-height-none: 1;
  --line-height-tight: 1.25;
  --line-height-snug: 1.375;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;
  --line-height-loose: 2;
  
  /* ============================================
     ボーダー
     ============================================ */
  
  /* Border Widths */
  --border-width-0: 0;
  --border-width-1: 1px;
  --border-width-2: 2px;
  --border-width-4: 4px;
  
  /* Border Radius */
  --radius-none: 0;
  --radius-sm: 0.25rem;     /* 4px */
  --radius-base: 0.375rem;  /* 6px */
  --radius-md: 0.5rem;      /* 8px */
  --radius-lg: 0.75rem;     /* 12px */
  --radius-xl: 1rem;        /* 16px */
  --radius-2xl: 1.5rem;     /* 24px */
  --radius-full: 9999px;    /* 完全な円形 */
  
  /* Border Colors */
  --border-color-light: var(--color-gray-200);
  --border-color-base: var(--color-gray-300);
  --border-color-dark: var(--color-gray-400);
  
  /* ============================================
     シャドウ
     ============================================ */
  
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-base: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.15);
  --shadow-2xl: 0 20px 40px rgba(0, 0, 0, 0.2);
  
  /* Colored Shadows */
  --shadow-primary: 0 4px 15px rgba(102, 126, 234, 0.3);
  --shadow-secondary: 0 4px 15px rgba(0, 184, 148, 0.3);
  --shadow-error: 0 4px 15px rgba(220, 53, 69, 0.3);
  
  /* ============================================
     トランジション
     ============================================ */
  
  --transition-fast: 150ms ease-in-out;
  --transition-base: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;
  
  /* Easing Functions */
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  
  /* ============================================
     Layout Dimensions
     ============================================ */
  
  --navbar-height: 80px;
  --navbar-padding-vertical: var(--space-4);
  --navbar-padding-horizontal: var(--space-6);
  
  /* ============================================
     Z-Index スタック
     ============================================ */
  
  --z-index-dropdown: 1000;
  --z-index-sticky: 1020;
  --z-index-fixed: 1030;
  --z-index-modal-backdrop: 1040;
  --z-index-modal: 1050;
  --z-index-popover: 1060;
  --z-index-tooltip: 1070;
  
  /* ============================================
     レスポンシブブレークポイント
     ============================================ */
  
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;
  
  /* ============================================
     コンテナサイズ
     ============================================ */
  
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1536px;
  
  /* ============================================
     カードレイアウト統一
     ============================================ */
  
  /* カードの最大幅を統一（ガントチャートと気象データカードの横幅を一致させる） */
  --card-max-width: 100%;
  --card-container-max-width: 1400px;
  
  /* ページレイアウトコンテナ */
  --page-container-max-width: 1400px;
  --page-container-padding-vertical: var(--space-6);
  --page-container-padding-horizontal: var(--space-5);
}

/* ============================================
   ダークモード対応（将来用）
   ============================================ */

@media (prefers-color-scheme: dark) {
  :root {
    /* ダークモード用の変数定義は将来実装 */
    /* --bg-body: #1a202c; */
    /* --bg-card: #2d3748; */
    /* --text-primary: #f7fafc; */
  }
}

