/* ========== 全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============================================
   CSS 变量 - 默认主题（蓝色，顶部导航）
   ============================================ */
:root {
    /* 主色系 */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;

    /* 次要色 */
    --secondary-color: #8b5cf6;
    --secondary-light: #ede9fe;
    --secondary-dark: #7c3aed;

    /* 成功色 */
    --success-color: #10b981;
    --success-light: #dcfce7;
    --success-dark: #166534;

    /* 警告色 */
    --warning-color: #f59e0b;
    --warning-light: #fef3c7;
    --warning-dark: #92400e;

    /* 危险色 */
    --danger-color: #ef4444;
    --danger-light: #fee2e2;
    --danger-dark: #991b1b;

    /* 信息色 */
    --info-color: #3b82f6;
    --info-light: #dbeafe;
    --info-dark: var(--primary-color);

    /* 严重色 */
    --critical-color: #dc2626;

    /* 文字色 */
    --text-primary: #1f2937;
    --text-secondary: #303030;
    --text-muted: #6b7280;
    --text-dark: #111827;
    --text-link: #0969da;

    /* 背景色 */
    --bg-page: #ffffff;
    --bg-gray: #f3f4f6;
    --bg-card: #ffffff;
    --bg-hover: #f3f4f6;

    /* 边框（light 比默认更浅） */
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;

    /* 阴影 */
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);

    /* 渐变 */
    --primary-gradient: linear-gradient(135deg, #1e3a8a 0%, var(--primary-color) 100%);
    --secondary-gradient: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);

    /* 导航栏文字色（深色背景上用白色） */
    --nav-text: rgba(255, 255, 255, 0.9);
    --nav-text-hover: #ffffff;
    --nav-text-active: var(--primary-color);
    --nav-bg: rgba(255, 255, 255, 0.12);
    --nav-bg-hover: rgba(255, 255, 255, 0.22);
    --nav-bg-active: #ffffff;
    --nav-border: rgba(255, 255, 255, 0.2);
}


/* ============================================
   主题：浅色 + 左侧菜单
   ============================================ */
body.theme-light-sidebar {
    /* 主色系 */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;

    /* 次要色 */
    --secondary-color: #8b5cf6;
    --secondary-light: #ede9fe;
    --secondary-dark: #7c3aed;

    /* 成功色 */
    --success-color: #10b981;
    --success-light: #dcfce7;
    --success-dark: #166534;

    /* 警告色 */
    --warning-color: #f59e0b;
    --warning-light: #fef3c7;
    --warning-dark: #92400e;

    /* 危险色 */
    --danger-color: #ef4444;
    --danger-light: #fee2e2;
    --danger-dark: #991b1b;

    /* 信息色 */
    --info-color: #3b82f6;
    --info-light: #dbeafe;
    --info-dark: var(--primary-color);

    /* 严重色 */
    --critical-color: #dc2626;

    /* 文字色 */
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --text-dark: #111827;
    --text-link: #1d4ed8;

    /* 背景色 */
    --bg-page: #f8fafc;
    --bg-gray: #f1f5f9;        /* 比 bg-page 略深，提供层次 */
    --bg-card: #ffffff;
    --bg-hover: #eff6ff;       /* 蓝色调 hover，符合主题 */

    /* 边框（light 比默认更浅） */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;

    /* 阴影 */
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 10px 25px rgba(15, 23, 42, 0.08);

    /* 渐变（浅色顶栏用白色渐变） */
    --primary-gradient: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    --secondary-gradient: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);

    /* 侧边栏导航文字色（浅色背景上用深色） */
    --nav-text: #334155;
    --nav-text-hover: #0f172a;
    --nav-text-active: #1d4ed8;
    --nav-bg: #ffffff;
    --nav-bg-hover: #f8fafc;
    --nav-bg-active: #eff6ff;
    --nav-border: var(--border-color);
    --nav-border-active: #bfdbfe;

    background: var(--bg-page);
    padding-left: 248px;
    padding-top: 86px;
}

/* 顶部栏 */
body.theme-light-sidebar .top-header {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 86px;
    z-index: 1000;
    padding: 14px 0;
    background: var(--primary-gradient);
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

body.theme-light-sidebar .header-content {
    max-width: 100%;
    margin: 0;
    padding: 0 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

body.theme-light-sidebar .header-left h1 {
    color: var(--text-primary);
    font-size: 20px;
    line-height: 1.4;
}

body.theme-light-sidebar .header-left p {
    color: var(--text-secondary);
}

/* 左侧菜单 */
body.theme-light-sidebar .header-nav {
    position: fixed;
    left: 0;
    top: 86px;
    width: 248px;
    height: calc(100vh - 86px);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
}

body.theme-light-sidebar .nav-link {
    width: 100%;
    justify-content: flex-start;
    color: var(--nav-text);
    background: var(--nav-bg);
    border: 1px solid var(--nav-border);
}

body.theme-light-sidebar .nav-link:hover {
    color: var(--nav-text-hover);
    background: var(--nav-bg-hover);
    border-color: var(--border-light);
    transform: none;
}

body.theme-light-sidebar .nav-link.active {
    color: var(--nav-text-active);
    background: var(--nav-bg-active);
    border-color: var(--nav-border-active);
}

body.theme-light-sidebar .nav-dropdown {
    width: 100%;
}

body.theme-light-sidebar .dropdown-toggle .arrow-icon {
    margin-left: auto;
}

body.theme-light-sidebar .nav-dropdown-menu {
    position: static;
    margin-top: 6px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: none;
    padding-top: 0;
    background: var(--bg-page);
}

body.theme-light-sidebar .nav-dropdown::before {
    display: none;
}

body.theme-light-sidebar .nav-dropdown:hover .nav-dropdown-menu {
    display: none;
}

body.theme-light-sidebar .nav-dropdown.active .nav-dropdown-menu {
    display: block;
}

body.theme-light-sidebar .dropdown-item:hover,
body.theme-light-sidebar .dropdown-item.active {
    border-left-color: var(--primary-color);
    color: var(--nav-text-active);
}

/* 用户头像 */
body.theme-light-sidebar .header-user {
    margin-left: auto;
}

body.theme-light-sidebar .user-avatar {
    background: #e2e8f0;
    color: #334155;
}

body.theme-light-sidebar .user-avatar:hover,
body.theme-light-sidebar .user-avatar.active {
    background: #cbd5e1;
    border-color: #94a3b8;
}

body.theme-light-sidebar .user-menu {
    right: 0;
    left: auto;
    top: calc(100% + 8px);
}

body.theme-light-sidebar .main-content {
    padding: 24px 20px;
}



/* ============================================
   主题：深军绿色（顶部导航）
   ============================================ */
body.theme-green {
    /* 主色系 */
    --primary-color: #2f4a34;
    --primary-hover: #24392a;

    /* 次要色（卡其棕） */
    --secondary-color: #8a7452;
    --secondary-light: #f6f1e7;
    --secondary-dark: #6b593f;

    /* 成功色 */
    --success-color: #2f7a45;
    --success-light: #e7f6eb;
    --success-dark: #205532;

    /* 警告色 */
    --warning-color: #b7822f;
    --warning-light: #fff6e5;
    --warning-dark: #875f20;

    /* 危险色 */
    --danger-color: #9b3b3b;
    --danger-light: #fdeaea;
    --danger-dark: #6d2929;

    /* 信息色 */
    --info-color: #556b4d;
    --info-light: #eef3eb;
    --info-dark: #3f5039;

    /* 严重色 */
    --critical-color: #1f2f23;

    /* 文字色 */
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --text-dark: #111827;
    --text-link: #2f4a34;

    /* 背景色 */
    --bg-page: #ffffff;
    --bg-gray: #fafbf9;
    --bg-card: #ffffff;
    --bg-hover: #f2f5f1;

    /* 边框 */
    --border-color: #e8eee7;
    --border-light: #f5f7f4;

    /* 阴影 */
    --shadow: 0 1px 3px rgba(47, 74, 52, 0.10);
    --shadow-lg: 0 12px 28px rgba(47, 74, 52, 0.14);

    /* 渐变 */
    --primary-gradient: linear-gradient(135deg, #3b5b42 0%, #24392a 100%);
    --secondary-gradient: linear-gradient(135deg, #5d7a63 0%, #2f4a34 100%);

    /* 导航文字色 */
    --nav-text: rgba(255, 255, 255, 0.88);
    --nav-text-hover: #ffffff;
    --nav-text-active: var(--primary-color);

    --nav-bg: rgba(255, 255, 255, 0.08);
    --nav-bg-hover: rgba(255, 255, 255, 0.16);
    --nav-bg-active: #ffffff;

    --nav-border: rgba(255, 255, 255, 0.14);

    background: var(--bg-page);
}

/* 顶部栏 */
body.theme-green .top-header {
    background: var(--primary-gradient);
    box-shadow: 0 4px 14px rgba(47, 74, 52, 0.22);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.theme-green .header-left h1 {
    color: var(--nav-text-hover);
}

body.theme-green .header-left p {
    color: var(--nav-text);
}

/* 导航链接 */
body.theme-green .nav-link {
    background: var(--nav-bg);
    border: 1px solid var(--nav-border);
    color: var(--nav-text);
}

body.theme-green .nav-link:hover {
    background: var(--nav-bg-hover);
    color: var(--nav-text-hover);
    transform: translateY(-1px);
}

body.theme-green .nav-link.active {
    background: var(--nav-bg-active);
    color: var(--nav-text-active);
    font-weight: 600;
}

/* 主内容 */
body.theme-green .main-content {
    padding: 40px 0;
    flex: 1;
}


body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: #f5f7fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}
/* ========== 顶部导航栏（专业配色） ========== */
.top-header {
    background: var(--primary-gradient);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-left h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
    color: white;
}

.header-left h1 i {
    margin-right: 10px;
    font-size: 22px;
}

.header-left p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
}

/* 顶栏标题：右上角「试用版」角标（不占文档流宽度，对齐标题末尾上方） */
.header-title-with-corner-badge {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.header-title-with-corner-badge .header-title-text {
    display: inline;
}

.header-demo-corner-badge {
    position: absolute;
    top: -2px;
    right: 0;
    transform: translate(calc(100% + 6px), -18%);
    z-index: 1;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    line-height: 1.2;
    padding: 3px 7px;
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.42);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 1px 3px rgba(0, 0, 0, 0.12);
}

body.theme-light-sidebar .header-demo-corner-badge {
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.35);
}

/* 登录页品牌区试用角标 */
.brand-title-with-corner-badge {
    position: relative;
    display: inline-block;
}

.brand-demo-corner-badge {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(calc(100% + 10px), -12%);
    z-index: 1;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    line-height: 1.2;
    padding: 4px 8px;
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.42);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 1px 4px rgba(0, 0, 0, 0.15);
}

body.theme-light-sidebar .brand-demo-corner-badge {
    color: #92400e;
    background: #fef3c7;
    border-color: rgba(146, 64, 14, 0.28);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.header-nav {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-1px);
}

.nav-link.active {
    background: white;
    color: var(--primary-color);
    /*border-color: white;*/
    /*font-weight: 600;*/
}

.nav-link i {
    font-size: 14px;
}
.nav-link.active {
    background: white;
}

/* 主内容 */
.main-content {
    padding: 40px 0;
    flex: 1;
}


/* 按钮 */
.btn {
    text-decoration: none;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-large {
    width: 100%;
    justify-content: center;
    padding: 16px;
    font-size: 1.1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #9ca3af !important;
    transform: none !important;
    box-shadow: none !important;
}


/* 页脚 */
.footer {
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    margin-top: auto;
    text-align: center;
}

.footer p {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* ========== 通用表单样式 ========== */
 .form-input,
 .form-select,
 .form-textarea {
     width: 100%;
     padding: 10px 14px;
     border: 2px solid #e0e0e0;
     border-radius: 6px;
     font-size: 14px;
     font-family: inherit;
     transition: all 0.3s;
     background-color: white;
     color: var(--text-dark);
 }

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #999;
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
    font-family: inherit;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-group label i {
    margin-right: 4px;
    color: #667eea;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

/* 输入框前缀图标 */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group i {
    position: absolute;
    left: 12px;
    color: #999;
    pointer-events: none;
}

.input-group .form-input {
    padding-left: 36px;
}

/* 错误状态 */
.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: #f44336;
}

.form-input.error:focus,
.form-select.error:focus,
.form-textarea.error:focus {
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1);
}

.form-error-message {
    color: #f44336;
    font-size: 12px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 成功状态 */
.form-input.success,
.form-select.success,
.form-textarea.success {
    border-color: #4caf50;
}

/* 必填标记 */
.form-group label.required::after {
    content: '*';
    color: #f44336;
    margin-left: 4px;
}

/* 帮助文本 */
.form-help-text {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    line-height: 1.4;
}

/* 响应式 */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}



/* 用户菜单样式 */
.header-user {
    position: relative;
    margin-left: 24px;
}

.header-content > .header-user {
    margin-left: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.user-avatar:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.user-avatar.active {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.6);
}

.user-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    display: none;
    overflow: hidden;
    z-index: 1000;
}

.user-menu.show {
    display: block;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #dc2626;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.menu-item:hover {
    background: #fef2f2;
}

.menu-item i {
    font-size: 18px;
}



/* ========== 移动端适配 ========== */
@media (max-width: 768px) {
    body.theme-light-sidebar {
        padding-left: 0;
        padding-top: 0;
    }

    body.theme-light-sidebar .top-header {
        position: static;
        width: 100%;
        height: auto;
        padding: 12px 0;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    body.theme-light-sidebar .header-content {
        flex-direction: column;
        gap: 16px;
        padding: 0 12px;
    }

    body.theme-light-sidebar .header-nav {
        position: static;
        width: 100%;
        height: auto;
        padding: 0;
        border-right: none;
        background: transparent;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        overflow-y: visible;
    }

    body.theme-light-sidebar .nav-dropdown-menu,
    body.theme-light-sidebar .user-menu {
        left: 12px;
        right: 12px;
        top: auto;
        margin-left: 0;
    }

    body.theme-light-sidebar .nav-dropdown-menu {
        position: fixed;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
        background: white;
    }

    /* 顶部导航栏 */
    .top-header {
        padding: 12px 0;
    }

    .header-content {
        flex-direction: column;
        gap: 16px;
        padding: 0 12px;
    }

    .header-left {
        text-align: center;
        width: 100%;
    }

    .header-left h1 {
        font-size: 18px;
        margin-bottom: 2px;
    }

    .header-left p {
        font-size: 12px;
    }

    /* 导航菜单 */
    .header-nav {
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }

    .nav-link {
        padding: 6px 10px;
        font-size: 12px;
        flex: 0 0 auto;
    }

    .nav-link i {
        font-size: 12px;
    }

    /* 隐藏部分导航文字，只显示图标 */
    .nav-link span {
        display: none;
    }

    /* 或者让每个导航项占一行 */
    /* .nav-link {
        flex: 1 1 calc(50% - 6px);
        justify-content: center;
    } */

    /* 用户菜单 */
    .header-user {
        position: absolute;
        top: 12px;
        right: 12px;
        margin-left: 0;
    }

    .user-avatar {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .user-menu {
        right: 0;
    }
}

/* 更小的屏幕 */
@media (max-width: 480px) {
    .header-left h1 {
        font-size: 16px;
    }

    .header-left p {
        font-size: 11px;
    }

    .nav-link {
        padding: 5px 8px;
        font-size: 11px;
    }
}

/* ========== 下拉菜单样式 ========== */
.nav-dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    user-select: none;
}

.dropdown-toggle .arrow-icon {
    font-size: 16px;
    transition: transform 0.2s;
    margin-left: 2px;
}

.nav-dropdown:hover .arrow-icon,
.nav-dropdown.active .arrow-icon {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%; /* 🔥 去掉间隙 */
    left: 0;
    min-width: 160px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    display: none;
    overflow: hidden;
    z-index: 1000;
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 8px; /* 🔥 用 padding 代替 top 间隙 */
}

/* 🔥 增加鼠标悬停区域，防止下拉框消失 */
.nav-dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 8px; /* 桥接区域 */
    background: transparent;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.active .nav-dropdown-menu {
    display: block;
    animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.dropdown-item:hover {
    background: var(--bg-hover);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
}

.dropdown-item.active {
    background: var(--info-light);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}

.dropdown-item i {
    font-size: 16px;
}

/* 🔥 父级 active 样式优化 */
.dropdown-toggle.active {
    /*background: rgba(255, 255, 255, 0.25);*/
    border-color: rgba(255, 255, 255, 0.3);
}

/* 移动端优化 */
@media (max-width: 768px) {
    .nav-dropdown-menu {
        position: fixed;
        left: 12px;
        right: 12px;
        top: auto;
        min-width: auto;
        max-width: calc(100vw - 24px);
        padding-top: 0;
    }

    .nav-dropdown::before {
        display: none; /* 移动端不需要桥接区域 */
    }

    .dropdown-item {
        padding: 10px 14px;
        font-size: 13px;
    }

    /* 移动端点击模式 */
    .nav-dropdown:hover .nav-dropdown-menu {
        display: none;
    }

    .nav-dropdown.active .nav-dropdown-menu {
        display: block;
    }
}