﻿/* ========================
   全局重置与基础设置
======================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ========================
   通用工具类
======================== */
.text-center { text-align: center; }
.text-muted { color: #6c757d !important; }
.fw-bold { font-weight: 700 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.py-5 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
.gap-4 > * { margin: 0 !important; }
.gap-4 { gap: 1.5rem; display: flex; flex-wrap: wrap; justify-content: center; }

/* ========================
   按钮样式
======================== */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.btn-primary {
    background-color: #0066cc;
    color: white;
    border-color: #0066cc;
}
.btn-primary:hover {
    background-color: #0052a3;
    border-color: #004d99;
}

/* CTA 按钮（橙色） */
.btn-cta {
    background-color: #ff6a00;
    border-color: #ff6a00;
    color: white;
    padding: 12px 30px;
    font-size: 1.2rem;
    border-radius: 0.5rem;
}
.btn-cta:hover {
    background-color: #e65d00;
    border-color: #cc5200;
    color: white;
}

.btn-outline-light {
    background: transparent;
    border-color: rgba(255,255,255,0.6);
    color: white;
}
.btn-outline-light:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
}

/* ========================
   卡片与阴影
======================== */
.rounded {
    border-radius: 0.5rem !important;
}
.rounded-3 {
    border-radius: 0.75rem !important;
}
.shadow {
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075) !important;
}
.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.1) !important;
}

/* ========================
   首页专属样式
======================== */
.hero-section {
    background: linear-gradient(135deg, #0066cc 0%, #004080 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.feature-icon {
    font-size: 2.5rem;
    color: #0066cc;
    margin-bottom: 1rem;
}

.client-logo {
    opacity: 0.6;
    transition: all 0.3s ease;
    max-height: 50px;
    filter: grayscale(100%);
}
.client-logo:hover {
    opacity: 1;
    transform: scale(1.05);
    filter: grayscale(0%);
}

.stat-item {
    font-size: 2rem;
    font-weight: bold;
    color: #0066cc;
}

/* ========================
   导航栏样式（优化版：现代、清爽、差异化）
======================== */
.header-navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: none;
    border-bottom: 1px solid #f0f0f0;
    background-color: #ffffff;
}

.header-navbar .navbar {
    min-height: 64px;
    padding: 0;
}

/* Logo */
.header-navbar .navbar-brand {
    font-weight: 600;
    color: #1677ff !important;
    font-size: 1.25rem;
    padding-left: 0;
    display: flex;
    align-items: center;
}
.header-navbar .navbar-brand img.logo {
    height: 36px;
    opacity: 0.9;
    margin-right: 8px;
}

/* 导航链接 */
.header-navbar .nav-link {
    color: #595959 !important;
    font-size: 15px;
    padding: 0 16px;
    height: 64px;
    display: flex;
    align-items: center;
    font-weight: 500;
    transition: color 0.2s;
}
.header-navbar .nav-link:hover,
.header-navbar .nav-link.active {
    color: #1677ff !important;
}
.header-navbar .nav-link i {
    font-size: 14px;
    margin-right: 6px;
}

/* 下拉菜单 */
.header-navbar .dropdown-menu {
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 8px 0;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    min-width: 180px;
    margin-top: 8px;
}
.header-navbar .dropdown-item {
    font-size: 14px;
    padding: 8px 16px;
    color: #333;
}
.header-navbar .dropdown-item:hover {
    background-color: #f9f9f9;
}
.header-navbar .dropdown-divider {
    margin: 6px 0;
}

/* 用户头像 */
.avatar {
    width: 32px;
    height: 32px;
    font-size: 14px;
    background-color: #e6f4ff !important;
    color: #1677ff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* 搜索框 */
#searchContainer {
    min-width: 220px;
}
#searchContainer .input-group {
    border-radius: 4px;
    border: 1px solid #d9d9d9;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}
#searchContainer .input-group:focus-within {
    border-color: #1677ff;
    box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.15);
}
#searchContainer .form-control {
    border: none;
    padding: 6px 12px;
    font-size: 14px;
    height: auto;
    outline: none;
}
#searchContainer .input-group-text {
    background: transparent;
    border: none;
    padding: 6px 12px;
    color: #8c8c8c;
    cursor: pointer;
}

/* 未登录状态文本 */
.header-navbar .text-muted.small {
    font-size: 14px;
    color: #8c8c8c;
}
.header-navbar .text-muted.small + a {
    font-size: 14px;
}

/* 移动端适配 */
@media (max-width: 991.98px) {
    .header-navbar .navbar-nav {
        margin-top: 12px;
    }
    .header-navbar .d-flex.align-items-center {
        margin-top: 12px;
    }
    #searchContainer {
        min-width: auto;
        width: 100%;
        margin-bottom: 12px;
    }
    .avatar span.d-none.d-md-inline {
        display: none !important;
    }
}

/* ========================
   提示框容器（配合 show_txt 函数）
======================== */
#global-message-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
    width: auto;
    max-width: 90%;
}

.alert {
    min-width: 200px;
    padding: 0.75rem 1.25rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    position: relative;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.btn-close {
    float: right;
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1;
    color: #000;
    text-shadow: 0 1px 0 #fff;
    opacity: 0.5;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
}
.btn-close:hover {
    opacity: 0.75;
}

/* ========================
   响应式调整（补充）
======================== */
@media (max-width: 768px) {
    .hero-section .display-4 {
        font-size: 2.2rem;
    }
    .hero-section .lead {
        font-size: 1rem;
    }
    .btn-cta, .btn-outline-light {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }
    .btn-outline-light:last-child {
        margin-bottom: 0;
    }
    .stat-item {
        font-size: 1.5rem;
    }
    .gap-4 {
        justify-content: space-around;
    }
}