@charset "UTF-8";

/* 统一主题样式 - 全站字体、颜色、配色风格 */

/* ===== CSS变量系统 ===== */
:root {
    /* 字体系统 */
    --font-family-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-family-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;

    /* 字体大小系统 */
    --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-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;

    /* 行高系统 */
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;

    /* 主色系统 */
    --color-primary-50: #e3f2fd;
    --color-primary-100: #bbdefb;
    --color-primary-200: #90caf9;
    --color-primary-300: #64b5f6;
    --color-primary-400: #42a5f5;
    --color-primary-500: #2196f3;
    --color-primary-600: #1976d2;
    --color-primary-700: #1565c0;
    --color-primary-800: #0d47a1;
    --color-primary-900: #0a3d91;

    /* 中性色系统 */
    --color-gray-50: #fafafa;
    --color-gray-100: #f5f5f5;
    --color-gray-200: #eeeeee;
    --color-gray-300: #e0e0e0;
    --color-gray-400: #bdbdbd;
    --color-gray-500: #9e9e9e;
    --color-gray-600: #757575;
    --color-gray-700: #616161;
    --color-gray-800: #424242;
    --color-gray-900: #212121;

    /* 语义化颜色 */
    --color-success: #4caf50;
    --color-warning: #ff9800;
    --color-error: #f44336;
    --color-info: #2196f3;

    /* 背景色系统 */
    --bg-primary: #ffffff;
    --bg-secondary: var(--color-gray-50);
    --bg-tertiary: var(--color-gray-100);

    /* 组件背景与配色（新增） */
    --navbar-bg: var(--bg-primary);
    --footer-bg: var(--color-gray-800);
    --footer-text: #e0e0e0;
    --footer-border: var(--color-gray-700);
    --card-bg: #ffffff;

    /* 文本色系统 */
    --text-primary: var(--color-gray-900);
    --text-secondary: var(--color-gray-700);
    --text-muted: var(--color-gray-500);
    --text-disabled: var(--color-gray-400);

    /* 边框色系统 */
    --border-light: var(--color-gray-200);
    --border-medium: var(--color-gray-300);
    --border-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), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);

    /* 过渡动画 */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;

    /* 圆角系统 */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;

    /* 间距系统 */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* 断点系统 */
    --breakpoint-xs: 0;
    --breakpoint-sm: 576px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 992px;
    --breakpoint-xl: 1200px;
    --breakpoint-xxl: 1400px;
}

/* ===== 全局重置和基础样式 ===== */
* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ===== 工具类系统 ===== */

/* 字体大小工具类 */
.text-xs { font-size: var(--font-size-xs) !important; }
.text-sm { font-size: var(--font-size-sm) !important; }
.text-base { font-size: var(--font-size-base) !important; }
.text-lg { font-size: var(--font-size-lg) !important; }
.text-xl { font-size: var(--font-size-xl) !important; }
.text-2xl { font-size: var(--font-size-2xl) !important; }
.text-3xl { font-size: var(--font-size-3xl) !important; }
.text-4xl { font-size: var(--font-size-4xl) !important; }

/* 字重工具类 */
.font-light { font-weight: var(--font-weight-light) !important; }
.font-normal { font-weight: var(--font-weight-normal) !important; }
.font-medium { font-weight: var(--font-weight-medium) !important; }
.font-semibold { font-weight: var(--font-weight-semibold) !important; }
.font-bold { font-weight: var(--font-weight-bold) !important; }
.font-extrabold { font-weight: var(--font-weight-extrabold) !important; }

/* 行高工具类 */
.leading-tight { line-height: var(--line-height-tight) !important; }
.leading-normal { line-height: var(--line-height-normal) !important; }
.leading-relaxed { line-height: var(--line-height-relaxed) !important; }

/* 文本颜色工具类 */
.text-primary { color: var(--color-primary-600) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-disabled { color: var(--text-disabled) !important; }
.text-success { color: var(--color-success) !important; }
.text-warning { color: var(--color-warning) !important; }
.text-error { color: var(--color-error) !important; }
.text-info { color: var(--color-info) !important; }

/* 背景色工具类 */
.bg-primary { background-color: var(--bg-primary) !important; }
.bg-secondary { background-color: var(--bg-secondary) !important; }
.bg-tertiary { background-color: var(--bg-tertiary) !important; }
.bg-brand { background-color: var(--color-primary-600) !important; }
.bg-brand-light { background-color: var(--color-primary-50) !important; }

/* ===== 标题系统统一 ===== */
h1, .h1 {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
    font-family: var(--font-family-primary);
}

h2, .h2 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    font-family: var(--font-family-primary);
}

h3, .h3 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-normal);
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    font-family: var(--font-family-primary);
}

h4, .h4 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-normal);
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    font-family: var(--font-family-primary);
}

h5, .h5 {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-normal);
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    font-family: var(--font-family-primary);
}

h6, .h6 {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-normal);
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== 段落和文本统一 ===== */
p {
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    font-family: var(--font-family-primary);
}

.lead {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-light);
    line-height: var(--line-height-relaxed);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

small, .small {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    line-height: var(--line-height-normal);
}

/* ===== 链接统一样式 ===== */
a {
    color: var(--color-primary-600);
    text-decoration: none;
    transition: var(--transition-fast);
    font-weight: inherit;
}

a:hover {
    color: var(--color-primary-700);
    text-decoration: underline;
}

a:focus {
    outline: 2px solid var(--color-primary-300);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* ===== 按钮统一样式 ===== */
.btn {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-normal);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    transition: var(--transition-fast);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: var(--shadow-xs);
}

.btn:focus {
    outline: 2px solid #42a5f5;
    outline-offset: 2px;
}

.btn-primary {
    background-color: #1976d2;
    border-color: #1976d2;
    color: white;
}

.btn-primary:hover {
    background-color: #1565c0;
    border-color: #1565c0;
    color: white;
}

.btn-secondary {
    background-color: #616161;
    border-color: #616161;
    color: white;
}

.btn-secondary:hover {
    background-color: #424242;
    border-color: #424242;
    color: white;
}

.btn-outline-primary {
    background-color: transparent;
    border-color: #1976d2;
    color: #1976d2;
}

.btn-outline-primary:hover {
    background-color: #1976d2;
    border-color: #1976d2;
    color: white;
}

/* ===== 表单元素统一 ===== */
.form-control {
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    color: #212121;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #1976d2;
    box-shadow: 0 0 0 0.2rem rgba(25, 118, 210, 0.25);
    outline: none;
}

.form-control::placeholder {
    color: #9e9e9e;
    opacity: 1;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: #616161;
    margin-bottom: 0.5rem;
}

/* ===== 卡片统一样式 ===== */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.card-header {
    background-color: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem;
    font-weight: 500;
    font-size: 14px;
}

.card-body {
    padding: 1rem;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.card-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ===== 导航栏统一样式 ===== */
.navbar {
    background-color: var(--navbar-bg);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    padding: 0.5rem 0;
}

.navbar-nav .nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.navbar-nav .nav-link:hover {
    color: var(--color-primary-600);
    background-color: var(--color-primary-50);
}

/* ===== 页脚统一样式 ===== */
.footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 2rem 0 1rem;
    border-top: 1px solid var(--footer-border);
}

.footer h5 {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer p {
    font-size: 14px;
    color: #bdbdbd;
    line-height: 1.6;
}

.footer a {
    color: #bdbdbd;
    transition: color 0.15s ease-in-out;
}

.footer a:hover {
    color: #ffffff;
}

/* ===== 可切换主题调色板（通过 html[data-theme] 控制） ===== */
[data-theme="teal"] {
    --color-primary-50: #e6fffa;
    --color-primary-100: #b2f5ea;
    --color-primary-200: #81e6d9;
    --color-primary-300: #4fd1c5;
    --color-primary-400: #38b2ac;
    --color-primary-500: #319795;
    --color-primary-600: #2c7a7b;
    --color-primary-700: #285e61;
    --color-primary-800: #234e52;
    --color-primary-900: #1f3f44;
}

[data-theme="violet"] {
    --color-primary-50: #f5f3ff;
    --color-primary-100: #ede9fe;
    --color-primary-200: #ddd6fe;
    --color-primary-300: #c4b5fd;
    --color-primary-400: #a78bfa;
    --color-primary-500: #8b5cf6;
    --color-primary-600: #7c3aed;
    --color-primary-700: #6d28d9;
    --color-primary-800: #5b21b6;
    --color-primary-900: #4c1d95;
}

/* 可选：显式 blue 主题，便于切换回默认值 */
[data-theme="blue"] {
    --color-primary-50: #e3f2fd;
    --color-primary-100: #bbdefb;
    --color-primary-200: #90caf9;
    --color-primary-300: #64b5f6;
    --color-primary-400: #42a5f5;
    --color-primary-500: #2196f3;
    --color-primary-600: #1976d2;
    --color-primary-700: #1565c0;
    --color-primary-800: #0d47a1;
    --color-primary-900: #0a3d91;
}

/* ===== 响应式设计系统 ===== */

/* 超大屏幕 (≥1400px) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }

    h1, .h1 { font-size: var(--font-size-4xl); }
    h2, .h2 { font-size: var(--font-size-3xl); }

    .navbar-nav .nav-link {
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: var(--font-size-base);
    }
}

/* 大屏幕 (≥1200px) */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .container {
        max-width: 1140px;
    }
}

/* 桌面端 (≥992px) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }

    .navbar-nav .nav-link {
        padding: var(--spacing-sm) var(--spacing-md);
    }
}

/* 平板端 (≥768px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .container {
        max-width: 720px;
    }

    h1, .h1 { font-size: var(--font-size-2xl); }
    h2, .h2 { font-size: var(--font-size-xl); }
    h3, .h3 { font-size: var(--font-size-lg); }

    .navbar-nav .nav-link {
        padding: var(--spacing-sm);
        font-size: var(--font-size-sm);
    }

    .btn {
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .card-body {
        padding: var(--spacing-md);
    }
}

/* 移动端 (≥576px) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .container {
        max-width: 540px;
    }

    html {
        font-size: 15px;
    }

    h1, .h1 { font-size: var(--font-size-xl); }
    h2, .h2 { font-size: var(--font-size-lg); }
    h3, .h3 { font-size: var(--font-size-base); }

    .lead {
        font-size: var(--font-size-base);
    }

    .btn {
        font-size: var(--font-size-sm);
        padding: var(--spacing-sm);
    }

    .card-body {
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .navbar-nav .nav-link {
        padding: var(--spacing-sm);
        margin: var(--spacing-xs) 0;
    }
}

/* 小屏移动端 (<576px) */
@media (max-width: 575.98px) {
    .container {
        width: 100%;
        padding-left: var(--spacing-md);
        padding-right: var(--spacing-md);
    }

    html {
        font-size: 14px;
    }

    h1, .h1 {
        font-size: var(--font-size-lg);
        margin-bottom: var(--spacing-md);
    }
    h2, .h2 {
        font-size: var(--font-size-base);
        margin-bottom: var(--spacing-sm);
    }
    h3, .h3 {
        font-size: var(--font-size-sm);
        margin-bottom: var(--spacing-sm);
    }

    .lead {
        font-size: var(--font-size-sm);
    }

    .btn {
        font-size: var(--font-size-xs);
        padding: var(--spacing-xs) var(--spacing-sm);
        width: 100%;
        margin-bottom: var(--spacing-sm);
    }

    .btn-group .btn {
        width: auto;
        margin-bottom: 0;
    }

    .card-body {
        padding: var(--spacing-sm);
    }

    .navbar-nav .nav-link {
        padding: var(--spacing-sm);
        margin: var(--spacing-xs) 0;
        text-align: center;
    }

    .navbar-collapse {
        text-align: center;
    }

    /* 搜索模态框移动端优化 */
    #searchModal .modal-dialog {
        margin: var(--spacing-sm);
        max-width: none;
    }

    #searchModal .modal-content {
        border-radius: var(--radius-lg);
    }

    /* 表格响应式 */
    .table-responsive {
        font-size: var(--font-size-xs);
    }

    /* 图片响应式 */
    img {
        max-width: 100%;
        height: auto;
    }
}
