/* ========== 蓝天白云主题变量（浅色 / 低刺眼 / 长时间阅读友好） ========== */
:root {
    /* 圆角：统一 12px */
    --radius: 12px;
    --radius-lg: 12px;
    --radius-sm: 12px;
    --radius-xs: 12px;
    /* 动效时长 */
    --motion-duration-slow: 0.2s;
    --motion-duration-mid: 0.1s;
    --motion-duration-fast: 0.05s;
    /* 主色（清爽蓝） */
    --primary: #1d66d6;
    --primary-hover: #2f7cff;
    --primary-light: rgba(29, 102, 214, 0.14);
    --primary-gradient: linear-gradient(135deg, #2f7cff 0%, #3cb7ff 100%);
    --secondary-gradient: linear-gradient(135deg, #66a6ff 0%, #89f7fe 100%);
    /* 玻璃效果（浅色） */
    --bg-glass: rgba(255, 255, 255, 0.78);
    --bg-glass-strong: rgba(255, 255, 255, 0.90);
    --glass-border: rgba(29, 102, 214, 0.14);
    --glass-shadow: 0 10px 30px rgba(10, 40, 90, 0.10);
    --shadow-glow: 0 0 18px rgba(47, 124, 255, 0.12);
    /* 文本（浅色主题） */
    --text-light: rgba(16, 24, 40, 0.55);
    --text-primary: rgba(16, 24, 40, 0.92);
    --text-secondary: rgba(16, 24, 40, 0.72);

    /* 页面表面层 */
    --surface-0: rgba(255, 255, 255, 0.58);
    --surface-1: rgba(255, 255, 255, 0.86);
    --surface-2: rgba(255, 255, 255, 0.95);
    --surface-border: rgba(29, 102, 214, 0.16);
}

/* --- 全局和基础样式（暗色玻璃背景） --- */
body {
    margin: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background: radial-gradient(1200px 800px at 12% 10%, rgba(47, 124, 255, 0.16) 0%, rgba(255, 255, 255, 0) 58%),
                radial-gradient(1000px 700px at 88% 18%, rgba(60, 183, 255, 0.14) 0%, rgba(255, 255, 255, 0) 62%),
                linear-gradient(180deg, #eaf6ff 0%, #f6fbff 40%, #ffffff 100%);
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: color var(--motion-duration-mid) ease;
}

a:hover {
    text-decoration: underline;
}

/* 浅色主题 */
* { color-scheme: light; }

/* --- 现代化按钮样式（玻璃主题：12px 圆角 + 0.2s 动效） --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    border-radius: var(--radius);
    color: #fff;
    background: var(--primary);
    transition: all var(--motion-duration-slow) cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    min-width: 100px;
    box-shadow: 0 2px 8px rgba(22, 119, 255, 0.25);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.2);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(22, 119, 255, 0.35);
    text-decoration: none;
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-info {
    background: #17a2b8;
}

.btn-info:hover {
    background: #138496;
}

/* 按钮尺寸变体 */
.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
    min-width: 80px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
    min-width: 140px;
}

/* 按钮禁用状态 */
.btn:disabled,
.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn:disabled:hover,
.btn.disabled:hover {
    transform: none;
    box-shadow: none;
}


/* --- 现代化表单设计 --- */
.form-group {
    margin-bottom: 25px;
    animation: fadeInUp 0.6s ease-out;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.form-group label:hover {
    color: var(--primary);
}

/* 输入框现代化设计 */
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group input[type="url"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 500;
    box-sizing: border-box;
    transition: all var(--motion-duration-slow) cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-glass-strong);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-primary);
    position: relative;
    outline: none;
}

/* 输入框聚焦效果 */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
    transform: translateY(-2px);
    background: rgba(17, 25, 40, 0.85);
}

/* 输入框悬停效果 */
.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 119, 255, 0.12);
}

/* 只读输入框样式 */
.form-group input[readonly],
.form-group textarea[readonly] {
    background: rgba(17, 25, 40, 0.55);
    color: var(--text-light);
    cursor: not-allowed;
    opacity: 0.8;
}

.form-group input[readonly]:hover,
.form-group textarea[readonly]:hover {
    transform: none;
    box-shadow: none;
}

/* 表单验证状态 */
.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: #e74c3c;
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.1);
}

.form-group.has-success input,
.form-group.has-success select,
.form-group.has-success textarea {
    border-color: #27ae60;
    box-shadow: 0 0 0 4px rgba(39, 174, 96, 0.1);
}

/* 表单帮助文本 */
.form-group .form-text {
    margin-top: 8px;
    font-size: 13px;
    color: #6c757d;
    font-style: italic;
}

/* 表单错误信息 */
.form-group .form-error {
    margin-top: 8px;
    font-size: 13px;
    color: #e74c3c;
    font-weight: 500;
}

/* 表单成功信息 */
.form-group .form-success {
    margin-top: 8px;
    font-size: 13px;
    color: #27ae60;
    font-weight: 500;
}

/* --- Flash 消息样式 --- */
.flash-messages {
    margin-bottom: 15px;
    padding: 0;
    list-style: none;
}
.alert {
    padding: 12px 18px;
    margin-bottom: 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: opacity var(--motion-duration-mid) ease;
}
.alert-success { color: rgba(255, 255, 255, 0.88); background: rgba(82, 196, 26, 0.14); border-color: rgba(82, 196, 26, 0.28); }
.alert-danger { color: rgba(255, 255, 255, 0.88); background: rgba(255, 77, 79, 0.14); border-color: rgba(255, 77, 79, 0.28); }
.alert-warning { color: rgba(255, 255, 255, 0.88); background: rgba(250, 173, 20, 0.16); border-color: rgba(250, 173, 20, 0.30); }
.alert-info { color: rgba(255, 255, 255, 0.88); background: rgba(22, 119, 255, 0.12); border-color: rgba(22, 119, 255, 0.24); }

/* --- 登录页面特定样式（玻璃风格） --- */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: radial-gradient(900px 600px at 15% 15%, rgba(22, 119, 255, 0.22) 0%, rgba(0, 0, 0, 0) 60%),
                linear-gradient(135deg, #0b1220 0%, #0f172a 45%, #111827 100%);
}

.login-container {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--glass-border);
    width: 320px;
    text-align: center;
}

.login-container h2 {
    margin-bottom: 25px;
    color: var(--primary);
    font-weight: 300;
}

.login-container .btn {
    width: 100%;
    box-sizing: border-box;
}

/* --- 后台管理页面布局 --- */
.admin-body {
    display: flex;
}

.admin-container {
    display: flex;
    width: 100vw;
    height: 100vh;
}

/* 左侧菜单栏 - 玻璃风格 */
.sidebar {
    width: 240px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 4px 0 28px rgba(10, 40, 90, 0.10);
    border-right: 1px solid rgba(29, 102, 214, 0.14);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    transition: all var(--motion-duration-slow) cubic-bezier(0.4, 0, 0.2, 1);
}

/* 菜单栏背景装饰 */
/* 长时间使用减少“持续动效”疲劳：背景轻纹理，不做持续动画 */
.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(47, 124, 255, 0.06);
    z-index: 0;
}

@keyframes backgroundShimmer {
    0%, 100% { 
        opacity: 0.8;
        transform: translateX(0px);
    }
    50% { 
        opacity: 1;
        transform: translateX(10px);
    }
}

.sidebar .logo {
    padding: 30px 20px;
    font-size: 28px;
    font-weight: 800;
    text-align: center;
    color: var(--text-primary);
    border-bottom: none;
    background: rgba(47, 124, 255, 0.10);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    z-index: 1;
    text-shadow: none;
    letter-spacing: 2px;
    text-transform: uppercase;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.sidebar .logo .logo-mark {
    width: 26px;
    height: 26px;
    display: inline-block;
    flex: 0 0 auto;
}

.sidebar .logo::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: rgba(29, 102, 214, 0.55);
    border-radius: 2px;
    /* 取消持续呼吸动画，减少视觉疲劳 */
    animation: none;
}

@keyframes logoGlow {
    0%, 100% { 
        opacity: 0.6;
        transform: translateX(-50%) scaleX(1);
    }
    50% { 
        opacity: 1;
        transform: translateX(-50%) scaleX(1.2);
    }
}

/* Hover 更克制，避免跳动 */
.sidebar .logo:hover {
    color: #ffffff;
    transform: none;
    text-shadow: 0 2px 12px rgba(255, 255, 255, 0.18);
}

.sidebar .menu {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    z-index: 1;
}

.sidebar .menu ul {
    list-style: none;
    padding: 0;
    margin: 30px 0;
    position: relative;
    z-index: 1;
}

.sidebar .menu li {
    margin: 8px 20px;
    border-radius: var(--radius);
    overflow: hidden;
    animation: menuItemSlideIn 0.6s ease-out;
    animation-fill-mode: both;
    position: relative;
}

/* 去掉可折叠菜单下方的横杠 */
.sidebar .menu li.has-submenu {
    border-bottom: none;
}

.sidebar .menu li.has-submenu::after {
    display: none;
}

/* 菜单项依次出现动画 */
.sidebar .menu li:nth-child(1) { animation-delay: 0.1s; }
.sidebar .menu li:nth-child(2) { animation-delay: 0.2s; }
.sidebar .menu li:nth-child(3) { animation-delay: 0.3s; }
.sidebar .menu li:nth-child(4) { animation-delay: 0.4s; }
.sidebar .menu li:nth-child(5) { animation-delay: 0.5s; }
.sidebar .menu li:nth-child(6) { animation-delay: 0.6s; }
.sidebar .menu li:nth-child(7) { animation-delay: 0.7s; }

@keyframes menuItemSlideIn {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.sidebar .menu li a {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    color: rgba(16, 24, 40, 0.88);
    transition: all var(--motion-duration-slow) cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 15px;
    text-decoration: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* 菜单项背景效果 */
.sidebar .menu li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(47, 124, 255, 0.10);
    border-radius: var(--radius);
    opacity: 0;
    transition: opacity var(--motion-duration-mid) ease;
    z-index: -1;
}

/* 菜单项左侧指示条 */
.sidebar .menu li a::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: rgba(29, 102, 214, 0.65);
    border-radius: 0 2px 2px 0;
    transition: height 0.3s ease;
}

.sidebar .menu li a:hover::before {
    opacity: 1;
}

.sidebar .menu li a:hover::after {
    height: 60%;
}

.sidebar .menu li a:hover {
    color: rgba(16, 24, 40, 0.92);
    text-decoration: none;
    transform: translateX(10px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* 菜单项激活状态 */
.sidebar .menu li a.active {
    background: rgba(47, 124, 255, 0.14);
    color: rgba(16, 24, 40, 0.92);
    transform: translateX(10px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    font-weight: 600;
}

.sidebar .menu li a.active::after {
    height: 80%;
    background: #ffffff;
}

.sidebar .menu li a.active::before {
    opacity: 1;
}

/* 子菜单现代化设计（玻璃） */
.sidebar .menu .submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.70);
    border-radius: var(--radius);
    margin: 0;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(29, 102, 214, 0.14);
}

/* 去掉可折叠菜单下方的横杠 - 全面修复 */
.sidebar .menu li.has-submenu {
    border-bottom: none !important;
    border-top: none !important;
    margin-bottom: 8px !important;
    position: relative;
}

/* 移除所有可能的伪元素横杠 */
.sidebar .menu li.has-submenu::after {
    display: none !important;
    content: none !important;
    border: none !important;
}

.sidebar .menu li.has-submenu::before {
    display: none !important;
    content: none !important;
    border: none !important;
}

/* 移除菜单链接的下边框 */
.sidebar .menu li.has-submenu > a {
    border-bottom: none !important;
    border-top: none !important;
}

/* 保留左侧指示条，但移除下边框 */
.sidebar .menu li.has-submenu > a::after {
    border-bottom: none !important;
    border-top: none !important;
}

.sidebar .menu li.has-submenu > a::before {
    border-bottom: none !important;
    border-top: none !important;
}

/* 移除子菜单的上下边框，只保留左右边框 */
.sidebar .menu li.has-submenu .submenu {
    border-top: none !important;
    border-bottom: none !important;
    border-left: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.sidebar .menu li.has-submenu .submenu::after {
    display: none !important;
    content: none !important;
    border: none !important;
}

.sidebar .menu li.has-submenu .submenu::before {
    display: none !important;
    content: none !important;
    border: none !important;
}

/* 确保子菜单展开后也没有横杠 */
.sidebar .menu li.has-submenu.open {
    border-bottom: none !important;
    border-top: none !important;
}

.sidebar .menu li.has-submenu.open > a {
    border-bottom: none !important;
    border-top: none !important;
}

.sidebar .menu li.has-submenu.open .submenu {
    border-top: none !important;
    border-bottom: none !important;
}

/* 确保子菜单项之间也没有横杠 */
.sidebar .menu li.has-submenu .submenu li {
    border-bottom: none !important;
    border-top: none !important;
}

.sidebar .menu li.has-submenu .submenu li:last-child {
    border-bottom: none !important;
}

.sidebar .menu li.has-submenu.open .submenu {
    max-height: 400px;
    margin: 8px 0;
}

.sidebar .menu .submenu li {
    margin: 4px 15px;
    animation: none;
}

/* ========== 浅色主题补充（替换之前的强制暗色覆盖） ========== */
body.admin-body,
body.admin-body .main-content,
body.admin-body .main-content-wrapper,
body.admin-body .content-area {
    color: var(--text-primary);
}

body.admin-body .text-muted,
body.admin-body .form-text,
body.admin-body .form-label,
body.admin-body label {
    color: var(--text-secondary) !important;
}

body.admin-body .form-control,
body.admin-body .form-select,
body.admin-body textarea.form-control,
body.admin-body input.form-control {
    background: rgba(255, 255, 255, 0.90) !important;
    border-color: rgba(29, 102, 214, 0.16) !important;
    color: var(--text-primary) !important;
}

body.admin-body .form-control::placeholder {
    color: rgba(16, 24, 40, 0.45) !important;
}

body.admin-body .edit-form-container {
    background: var(--surface-1) !important;
    border: 1px solid var(--surface-border) !important;
    box-shadow: var(--glass-shadow) !important;
}

body.admin-body .form-fields-grid .form-group,
body.admin-body .form-fields-grid .form-group:hover {
    background: rgba(255, 255, 255, 0.82) !important;
    border-bottom-color: rgba(29, 102, 214, 0.10) !important;
}

body.admin-body .alert {
    color: var(--text-primary) !important;
    border: 1px solid rgba(29, 102, 214, 0.16) !important;
    background: rgba(255, 255, 255, 0.86) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

body.admin-body .alert-info { border-color: rgba(47, 124, 255, 0.22) !important; }
body.admin-body .alert-warning { border-color: rgba(250, 173, 20, 0.30) !important; }
body.admin-body .alert-danger { border-color: rgba(255, 77, 79, 0.28) !important; }
body.admin-body .alert-success { border-color: rgba(82, 196, 26, 0.26) !important; }

.sidebar .menu .submenu li a {
    padding: 12px 20px;
    font-size: 14px;
    margin-left: 25px;
    border-radius: 8px;
    color: rgba(16, 24, 40, 0.82);
    background: rgba(47, 124, 255, 0.06);
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.sidebar .menu .submenu li a:hover {
    background: rgba(47, 124, 255, 0.12);
    color: rgba(16, 24, 40, 0.92);
    transform: translateX(8px) scale(1.01);
    border-left-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.sidebar .menu .submenu li a.active {
    background: rgba(47, 124, 255, 0.14);
    color: rgba(16, 24, 40, 0.92);
    transform: translateX(8px) scale(1.01);
    border-left-color: #ffffff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    font-weight: 600;
}

/* 子菜单图标动画 */
.sidebar .menu li.has-submenu > a i:last-child {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: auto;
    font-size: 12px;
}

.sidebar .menu li.has-submenu.open > a i:last-child {
    transform: rotate(180deg);
}

/* 菜单图标样式 */
.sidebar .menu li a i {
    margin-right: 12px;
    width: 18px;
    text-align: center;
    font-size: 16px;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.sidebar .menu li a:hover i,
.sidebar .menu li a.active i {
    opacity: 1;
    transform: scale(1.1);
}

.sidebar .menu .submenu li a i {
    margin-right: 10px;
    font-size: 14px;
    opacity: 0.8;
}

.sidebar .menu .submenu li a:hover i,
.sidebar .menu .submenu li a.active i {
    opacity: 1;
    transform: scale(1.05);
}

/* 右侧主内容区 */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* 顶部 Header（玻璃） */
.top-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.80);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(29, 102, 214, 0.14);
    box-shadow: var(--glass-shadow);
    flex-shrink: 0;
}

.welcome-message {
    margin-right: 20px;
    color: var(--text-secondary);
}

/* 主内容区域包装器 (用于滚动) */
.main-content-wrapper {
    padding: 20px;
    flex-grow: 1;
    overflow-y: auto;
    background: radial-gradient(900px 600px at 40% 0%, rgba(47, 124, 255, 0.12) 0%, rgba(255,255,255,0) 62%),
                linear-gradient(180deg, rgba(255,255,255,0.78) 0%, rgba(255,255,255,0.95) 100%);
}

/* 内容区域内的通用卡片样式（玻璃） */
.content-area {
    background: var(--surface-1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--surface-border);
    margin-bottom: 20px;
}

/* 覆盖Bootstrap的CSS变量 */
:root {
    --bs-heading-color: var(--primary) !important;
}

/* 使用最强的选择器优先级覆盖Bootstrap样式 */
body.admin-body .admin-container .main-content .main-content-wrapper .content-area h1,
body.admin-body .main-content-wrapper .content-area h1,
body .main-content-wrapper .content-area h1,
body .content-area h1,
.main-content-wrapper .content-area h1,
.content-area h1 {
    margin-top: 0 !important;
    margin-bottom: 20px !important; /* Default margin for h1 */
    color: var(--primary) !important;
    font-weight: 400 !important;
    font-size: 24px !important;
    border-bottom: 1px solid #eee !important;
    padding-bottom: 10px !important;
    line-height: 1.2 !important;
}

/* 覆盖Bootstrap的媒体查询样式（针对大屏幕） */
@media (min-width: 1200px) {
    body.admin-body .admin-container .main-content .main-content-wrapper .content-area h1,
    body.admin-body .main-content-wrapper .content-area h1,
    body .main-content-wrapper .content-area h1,
    body .content-area h1,
    .main-content-wrapper .content-area h1,
    .content-area h1 {
        font-size: 24px !important;
    }
}

/* 卡片式容器（玻璃） */
.card {
    background: var(--surface-1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--surface-border);
    margin-bottom: 20px;
}

.card:hover { background: var(--surface-2); }


/* --- 现代化搜索表单样式（玻璃） --- */
.search-form-container {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    margin-bottom: 30px;
    border: 1px solid var(--glass-border);
}

.search-form-container .form-row {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
}

.search-form-container .form-group {
    margin-bottom: 0;
    flex: 1;
    min-width: 180px;
}

.search-form-container .form-group:last-child { 
    flex-grow: 0; 
}

.search-form-container label { 
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-form-container input[type="text"],
.search-form-container select { 
    width: 100%; 
    box-sizing: border-box;
    height: 48px;
    padding: 12px 18px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--motion-duration-slow) ease;
    background: var(--bg-glass-strong);
    backdrop-filter: blur(8px);
}

.search-form-container input[type="text"]:focus,
.search-form-container select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
    transform: translateY(-1px);
}

.search-form-container .btn {
    height: 48px;
    padding: 12px 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
}


/* --- 现代化表格容器设计（玻璃） --- */
.table-container {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--glass-border);
    overflow: hidden;
    margin-bottom: 30px;
    position: relative;
}

.table-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary);
    z-index: 1;
}

/* --- 现代化数据表格设计 --- */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
    background: transparent;
    position: relative;
    z-index: 0;
    table-layout: fixed;
}

/* ========== 表格：斑马纹 + 字体大小 ========== */
.data-table th,
.data-table td {
    font-size: 14px !important;
}

.data-table tbody tr:nth-child(odd) {
    background: rgba(255, 255, 255, 0.92);
}

.data-table tbody tr:nth-child(even) {
    background: rgba(47, 124, 255, 0.06);
}

.data-table tbody tr:hover {
    background: rgba(47, 124, 255, 0.14) !important;
}

/* 表格内按钮文字 13px */
.data-table .btn,
.data-table .btn-sm,
.data-table button.btn,
.data-table a.btn {
    font-size: 12px !important;
}

/* ========== 分页：支持在 ul 内放“总数/每页” ========== */
.pagination {
    flex-wrap: wrap;
    gap: 6px;
}

.pagination .page-link.page-meta,
.pagination .page-link.page-meta:hover {
    background: transparent !important;
    border-color: transparent !important;
    color: var(--text-secondary) !important;
    cursor: default;
}

.pagination .page-link .per-page-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.pagination .page-link select.form-select {
    display: inline-block;
    width: auto;
}

/* ========== 全局设置页：service-username 输入列宽度（AJAX 首次进入也生效） ========== */
@media (min-width: 768px) {
    #service-username-container .gs-col-md-1-5 {
        flex: 0 0 auto;
        width: 12.5%;
    }

    #service-username-container .gs-col-md-1-5-input {
        flex: 0 0 auto;
        width: 18.75%;
    }
}

/* 表格单元格空间最大化设计 */
.data-table td {
    padding: 6px 8px;
    text-align: center;
    vertical-align: middle;
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
    border: none;
    position: relative;
    transition: all 0.3s ease;
    word-wrap: break-word;
    overflow: hidden;
}

/* 表头也使用紧凑padding */
.data-table th {
    padding: 12px 8px;
    text-align: center !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border: none !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    position: relative;
    background: transparent !important;
}

/* 特殊列的空间优化 */
.data-table td.address-cell {
    padding: 4px 6px;
    font-size: 14px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-table td.number-cell {
    padding: 4px 6px;
    font-size: 14px;
    font-weight: 600;
}

.data-table td.button-cell {
    padding: 4px 6px;
}

.data-table td.badge-cell {
    padding: 4px 6px;
}

/* 长文本列的优化 */
.data-table td.long-text-cell {
    padding: 4px 6px;
    font-size: 14px;
    line-height: 1.3;
    text-align: left;
    white-space: normal;
    word-break: break-all;
}

/* 表格按钮紧凑设计 */
.data-table .btn-sm {
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    min-width: 50px;
    position: relative;
    overflow: hidden;
}

/* 徽章紧凑设计 */
.data-table .badge {
    padding: 3px 8px;
    font-size: 12px !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    color: #ffffff !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15) !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 40px !important;
    line-height: 1.2 !important;
}

/* 兼容：有些页面把 badge 写在 td 内（非 data-table 场景）也统一 13px */
.badge {
    font-size: 13px !important;
}

/* 表头圆角和悬停效果 */
.data-table th:first-child {
    border-top-left-radius: 12px;
}

.data-table th:last-child {
    border-top-right-radius: 12px;
}

.data-table th:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    transform: translateY(-1px);
    transition: all 0.3s ease;
}

/* 可排序表头样式 */
.data-table th a {
    color: #ffffff !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.data-table th a:hover {
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none;
    transform: scale(1.05);
}

/* 表格主体现代化设计 */
.data-table thead {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    position: relative;
}

.data-table tbody {
    background: rgba(0, 0, 0, 0.08);
}

.data-table tbody tr {
    transition: all var(--motion-duration-slow) cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(22, 119, 255, 0.08);
    position: relative;
}

.data-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.03);
}

.data-table tbody tr:hover {
    background: rgba(22, 119, 255, 0.14);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(22, 119, 255, 0.12);
    border-left: 4px solid var(--primary);
    z-index: 1;
}

.data-table td:hover {
    color: var(--text-primary);
}

/* 表格按钮颜色变体 */
.data-table .btn-edit {
    background: #17a2b8;
    color: white;
}

.data-table .btn-edit:hover {
    background: #138496;
}

.data-table .btn-danger {
    background: #dc3545;
    color: white;
}

.data-table .btn-danger:hover {
    background: #c82333;
}

.data-table .btn-success {
    background: #28a745;
    color: white;
}

.data-table .btn-success:hover {
    background: #218838;
}

.data-table .btn-warning {
    background: #ffc107;
    color: #212529;
}

.data-table .btn-warning:hover {
    background: #e0a800;
}

.data-table .btn-info {
    background: #6f42c1;
    color: white;
}

.data-table .btn-info:hover {
    background: #5a32a3;
}

/* 徽章颜色变体 */
.data-table .badge.bg-primary {
    background: var(--primary) !important;
}

.data-table .badge.bg-secondary {
    background: #6c757d !important;
}

.data-table .badge.bg-success {
    background: #28a745 !important;
}

.data-table .badge.bg-danger {
    background: #dc3545 !important;
}

.data-table .badge.bg-warning {
    background: #ffc107 !important;
    color: #212529 !important;
}

.data-table .badge.bg-info {
    background: #17a2b8 !important;
}

/* 表格分页现代化设计（玻璃） */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 25px;
    padding: 20px;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
}

.pagination .page-link {
    padding: 10px 16px;
    border: 1px solid rgba(22, 119, 255, 0.25);
    border-radius: var(--radius-sm);
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--motion-duration-mid) ease;
    background: var(--bg-glass-strong);
}

.pagination .page-link:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 119, 255, 0.3);
}

.pagination .page-item.active .page-link {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(22, 119, 255, 0.3);
}

.pagination .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.pagination .page-item.disabled .page-link:hover {
    background: var(--bg-glass-strong);
    color: var(--primary);
    border-color: rgba(22, 119, 255, 0.25);
    transform: none;
    box-shadow: none;
}

.data-table .badge.bg-danger {
    background: #dc3545 !important;
}

.data-table .badge.bg-warning {
    background: #ffc107 !important;
    color: #212529 !important;
}

.data-table .badge.bg-info {
    background: #17a2b8 !important;
}

/* 地址字段统一样式 - 已移除特殊样式，使用通用表格样式 */

/* --- 现代化编辑/添加表单样式 --- */
.edit-form-container {
    background: #ffffff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.edit-form-container .form-group { 
    margin-bottom: 25px; 
}

.edit-form-container .form-actions { 
    margin-top: 40px; 
    padding-top: 25px; 
    border-top: 2px solid rgba(102, 126, 234, 0.1); 
    text-align: left; 
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.edit-form-container .form-actions .btn { 
    margin-right: 0;
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
    min-width: 120px;
}

/* 表单字段网格布局现代化 */
.form-fields-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 30px;
    padding-bottom: 25px;
}

.form-fields-grid .form-group {
    margin-bottom: 0;
    flex: 0 1 calc(33.333% - 20px);
    min-width: 200px;
    border-bottom: 2px dashed rgba(102, 126, 234, 0.2);
    padding-bottom: 15px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.5);
    padding: 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.form-fields-grid .form-group:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.form-fields-grid .form-group label { 
    margin-bottom: 8px; 
    display: block; 
    font-weight: 600; 
    color: #2c3e50;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.readonly-value { 
    padding: 12px 0; 
    font-size: 15px; 
    color: #2c3e50; 
    word-wrap: break-word; 
    line-height: 1.5; 
    min-height: 24px;
    font-weight: 500;
}

.long-text { 
    display: inline-block; 
    max-width: 100%; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    white-space: nowrap; 
    vertical-align: bottom; 
    cursor: help; 
}

.editable-section { 
    border-bottom: none !important; 
    padding-bottom: 0 !important; 
    background: rgba(102, 126, 234, 0.05);
}

.editable-section select { 
    width: 100%; 
    box-sizing: border-box; 
}


/* --- 现代化Flash消息样式 --- */
.flash-messages {
    margin-bottom: 20px;
    padding: 0;
    list-style: none;
}

.alert {
    padding: 16px 20px;
    margin-bottom: 15px;
    border-radius: 12px;
    border: 2px solid transparent;
    font-weight: 500;
    font-size: 14px;
    position: relative;
    overflow: hidden;
    animation: slideInDown 0.5s ease-out;
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: currentColor;
    opacity: 0.8;
}

.alert-success { 
    color: #155724; 
    background: #d4edda; 
    border-color: #c3e6cb; 
}

.alert-danger { 
    color: #721c24; 
    background: #f8d7da; 
    border-color: #f5c6cb; 
}

.alert-warning { 
    color: #856404; 
    background: #fff3cd; 
    border-color: #ffeeba; 
}

.alert-info { 
    color: #0c5460; 
    background: #d1ecf1; 
    border-color: #bee5eb; 
}

/* Flash消息容器 */
.flash-messages-container { 
    margin-bottom: 20px; 
}

.flash-messages-container .alert { 
    margin-bottom: 15px; 
}

/* --- 新增：列表页面标题和操作按钮布局 --- */
.list-header-action {
    display: flex;                 /* Enable Flexbox */
    justify-content: space-between; /* Push Title left, Button div right */
    align-items: center;           /* Vertically align Title and Button */
    margin-bottom: 20px;           /* Space below this header row */
    /* border-bottom: 1px solid #eee; Optional: if you want a line under the title/button row */
    /* padding-bottom: 10px; */
}

/* Optional: Adjust h1 margin within the flex container if needed */
.list-header-action h1 {
    margin-bottom: 0; /* Remove default bottom margin of h1 if it interferes */
}

/* Ensure button container doesn't add extra margin */
.list-header-action > div {
    margin-bottom: 0;
}

/* --- 新增：提币状态颜色 --- */
.bg-light-yellow { background-color: #fffacd; } /* lightgoldenrodyellow */
.bg-light-blue { background-color: #add8e6; } /* lightblue */
.bg-light-green { background-color: #90ee90; } /* lightgreen */
.bg-light-gray { background-color: #d3d3d3; } /* lightgray */

/* --- 响应式设计调整 --- */
@media (max-width: 768px) {
    .sidebar {
        width: 220px;
        transition: all 0.3s ease;
    }
    
    .sidebar .logo {
        font-size: 24px;
        padding: 25px 15px;
        letter-spacing: 1px;
    }
    
    .sidebar .menu li {
        margin: 6px 15px;
    }
    
    .sidebar .menu li a {
        padding: 14px 18px;
        font-size: 14px;
    }
    
    .sidebar .menu li a:hover {
        transform: translateX(8px) scale(1.01);
    }
    
    .sidebar .menu li a.active {
        transform: translateX(8px) scale(1.01);
    }
    
    .sidebar .menu .submenu li a {
        padding: 10px 18px;
        margin-left: 20px;
    }
    
    /* 移动端减少动画强度 */
    .sidebar::before {
        animation-duration: 15s;
    }
    
    .sidebar .logo::after {
        animation-duration: 4s;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 200px;
    }
    
    .sidebar .logo {
        font-size: 22px;
        padding: 20px 12px;
        letter-spacing: 0.5px;
    }
    
    .sidebar .menu li {
        margin: 4px 12px;
    }
    
    .sidebar .menu li a {
        padding: 12px 15px;
        font-size: 13px;
    }
    
    .sidebar .menu .submenu li a {
        padding: 8px 15px;
        margin-left: 18px;
        font-size: 12px;
    }
    
    /* 小屏幕设备禁用部分动画 */
    .sidebar::before {
        animation: none;
    }
    
    .sidebar .logo::after {
        animation: none;
    }
    
    .sidebar .menu li a:hover {
        transform: translateX(5px);
    }
    
    .sidebar .menu li a.active {
        transform: translateX(5px);
    }
}

/* 减少动画偏好设置 */
@media (prefers-reduced-motion: reduce) {
    .sidebar::before,
    .sidebar .logo,
    .sidebar .menu li {
        animation: none !important;
    }
    
    .sidebar .menu li a:hover,
    .sidebar .menu li a.active {
        transform: none !important;
    }
    
    .sidebar .menu .submenu {
        transition: none !important;
    }
}