/* ================================
   m_default14 - CSS 变量定义
   ================================ */

:root {
    /* ================================
       主题色（从数据库配置获取）
       ================================ */
    --primary-color: #2e7d32;       /* <%=m_bgcolor%> */
    --primary-dark: #1b5e20;
    --primary-light: #4caf50;
    --secondary-color: #ff9800;     /* <%=m_textcolor%> */
    --secondary-dark: #e65100;
    --secondary-light: #ffb74d;

    /* ================================
       布局尺寸
       ================================ */
    --topbar-height: 64px;
    --sidebar-width: 240px;
    --sidebar-collapsed-width: 70px;
    --container-max-width: 1400px;

    /* ================================
       侧边栏颜色
       ================================ */
    --sidebar-bg: #1a2332;
    --sidebar-bg-dark: #0d1321;
    --sidebar-text: #ffffff;
    --sidebar-text-muted: rgba(255,255,255,0.7);
    --sidebar-hover: #2c3e50;
    --sidebar-active: var(--primary-color);
    --sidebar-border: rgba(255,255,255,0.08);

    /* ================================
       页面背景与文字颜色
       ================================ */
    --bg-color: #f5f7fa;
    --bg-color-dark: #e8eaed;
    --card-bg: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --text-muted: #9ca3af;
    --text-light: #ffffff;
    --border-color: #e9ecef;
    --border-color-dark: #dee2e6;

    /* ================================
       功能颜色
       ================================ */
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;

    /* ================================
       阴影
       ================================ */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --shadow-xl: 0 12px 32px rgba(0,0,0,0.15);

    /* ================================
       圆角
       ================================ */
    --radius-xs: 2px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* ================================
       间距
       ================================ */
    --spacing-xs: 0.25rem;    /* 4px */
    --spacing-sm: 0.5rem;     /* 8px */
    --spacing-md: 1rem;       /* 16px */
    --spacing-lg: 1.5rem;     /* 24px */
    --spacing-xl: 2rem;       /* 32px */
    --spacing-2xl: 3rem;      /* 48px */
    --spacing-3xl: 4rem;      /* 64px */

    /* ================================
       字体
       ================================ */
    --font-family-base: 'Segoe UI', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-family-heading: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    --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: 1.875rem;    /* 30px */
    --font-size-4xl: 2.25rem;     /* 36px */
    --font-size-5xl: 3rem;        /* 48px */
    --line-height-tight: 1.25;
    --line-height-normal: 1.6;
    --line-height-relaxed: 1.75;

    /* ================================
       过渡动画
       ================================ */
    --transition-fast: 150ms;
    --transition-base: 250ms;
    --transition-slow: 350ms;
    --transition-timing: cubic-bezier(0.4, 0, 0.2, 1);

    /* ================================
       Z-index 层级
       ================================ */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* ================================
   英文版变量（可选）
   ================================ */
[data-lang="en"] {
    --font-family-base: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}
