/**
 * BCAuth - 卡通风格CSS
 * 使用Google Fonts卡通风格字体
 */

/* ============================================
   字体导入 - 卡通风格字体
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&family=Fredoka+One&family=Comic+Neue:wght@400;700&display=swap');

/* ============================================
   CSS变量 - 卡通色彩方案
   ============================================ */
:root {
    /* 主色调 - 活泼的糖果色 */
    --primary-color: #FF6B6B;
    --primary-hover: #FF5252;
    --primary-light: #FFB8B8;
    
    /* 辅助色 */
    --secondary-color: #4ECDC4;
    --secondary-hover: #45B7AA;
    --secondary-light: #A8E6CF;
    
    /* 强调色 */
    --accent-color: #FFE66D;
    --accent-hover: #FFD93D;
    --accent-light: #FFF9C4;
    
    /* 背景色 - 柔和的浅色 */
    --bg-primary: #FFF5F5;
    --bg-secondary: #F0F8FF;
    --bg-card: #FFFFFF;
    
    /* 文字颜色 */
    --text-primary: #2D3436;
    --text-secondary: #636E72;
    --text-muted: #141516;
    --text-light: #FFFFFF;
    
    /* 状态颜色 */
    --success-color: #00B894;
    --warning-color: #FDCB6E;
    --danger-color: #E17055;
    --info-color: #74B9FF;
    
    /* 边框和阴影 */
    --border-radius: 20px;
    --border-radius-sm: 12px;
    --border-radius-lg: 30px;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.15);
    --shadow-cartoon: 4px 4px 0px rgba(0, 0, 0, 0.1);
    
    /* 字体 */
    --font-family-base: 'Nunito', 'Comic Neue', -apple-system, sans-serif;
    --font-family-heading: 'Fredoka One', 'Nunito', cursive;
    --font-family-fun: 'Comic Neue', cursive;
    
    /* 过渡 */
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ============================================
   基础样式重置
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

/* ============================================
   自定义滚动条 - 卡通风格
   ============================================ */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    border: 3px solid var(--bg-primary);
    transition: var(--transition-base);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--secondary-hover));
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
}

::-webkit-scrollbar-thumb:active {
    background: linear-gradient(135deg, #E84545, #3DA69E);
}

/* 横向滚动条 */
::-webkit-scrollbar-corner {
    background: var(--bg-primary);
}

/* Firefox 滚动条样式 */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--bg-primary);
}

/* 侧边栏滚动条 */
.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-light), var(--secondary-light));
    border-radius: 8px;
    border: 2px solid var(--bg-primary);
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
}

/* 内容区域滚动条 */
.layout-content::-webkit-scrollbar {
    width: 10px;
}

.layout-content::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 8px;
}

.layout-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--secondary-color), var(--accent-color));
    border-radius: 8px;
    border: 2px solid var(--bg-secondary);
}

/* 表格容器滚动条 */
.table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 6px;
}

.table-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
    border-radius: 6px;
    border: 2px solid var(--bg-primary);
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}

/* 下拉框滚动条 */
.custom-select-dropdown::-webkit-scrollbar {
    width: 6px;
}

.custom-select-dropdown::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 5px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-light), var(--secondary-light));
    border-radius: 5px;
}

body {
    font-family: var(--font-family-base);
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    background-attachment: fixed;
}

/* 背景装饰 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 107, 107, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(78, 205, 196, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 230, 109, 0.08) 0%, transparent 40%);
    pointer-events: none;
    z-index: -1;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-base);
}

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

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   排版
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* ============================================
   容器
   ============================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-sm {
    max-width: 500px;
}

.container-md {
    max-width: 700px;
}

/* ============================================
   卡片 - 卡通风格
   ============================================ */
.card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-cartoon);
    padding: 30px;
    border: 3px solid transparent;
    transition: var(--transition-base);
    position: relative;
    /* 默认不裁剪内容，让下拉菜单可以正常显示 */
    overflow: visible;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

/* 只有非筛选卡片的卡片才有 hover 效果 */
.card:not(.filter-card):not(.no-hover):hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* 需要裁剪内容的卡片（如表格容器） */
.card.overflow-hidden {
    overflow: hidden;
}

.card-header {
    text-align: center;
    margin-bottom: 30px;
}

.card-title {
    font-family: var(--font-family-heading);
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.card-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ============================================
   表单 - 卡通风格
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    font-family: var(--font-family-base);
    font-size: 1rem;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    border: 3px solid #E8E8E8;
    border-radius: var(--border-radius-sm);
    outline: none;
    transition: var(--transition-base);
}

.form-control:focus {
    border-color: var(--primary-color);
    background-color: var(--bg-card);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control.error {
    border-color: var(--danger-color);
}

.form-error {
    color: var(--danger-color);
    font-size: 0.85rem;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.form-error::before {
    content: '⚠️';
    font-size: 0.9rem;
}

.form-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 6px;
}

/* 输入框图标 */
.input-group {
    position: relative;
}

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

.input-group-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
}

/* 复选框 - 卡通风格 */
.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.form-check input[type="checkbox"] {
    display: none;
}

.form-check-label {
    position: relative;
    padding-left: 32px;
    cursor: pointer;
    user-select: none;
}

.form-check-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: 3px solid #E8E8E8;
    border-radius: 8px;
    background: var(--bg-primary);
    transition: var(--transition-base);
}

.form-check input[type="checkbox"]:checked + .form-check-label::before {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check input[type="checkbox"]:checked + .form-check-label::after {
    content: '✓';
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-weight: bold;
    font-size: 14px;
}

/* ============================================
   按钮 - 卡通风格
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-family: var(--font-family-base);
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-bounce);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: 0.5s;
}

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

.btn:active {
    transform: scale(0.96);
}

/* 主按钮 */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: var(--text-light);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), #E84545);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.5);
}

/* 辅助按钮 */
.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-hover));
    color: var(--text-light);
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--secondary-hover), #3DA69E);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.5);
}

/* 强调按钮 */
.btn-accent {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(255, 230, 109, 0.4);
}

.btn-accent:hover {
    background: linear-gradient(135deg, var(--accent-hover), #FFC800);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 230, 109, 0.5);
}

/* 边框按钮 */
.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 3px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--text-light);
}

/* 危险按钮 */
.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #D63031);
    color: var(--text-light);
    box-shadow: 0 4px 15px rgba(225, 112, 85, 0.4);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #D63031, #C0392B);
    transform: translateY(-2px);
}

/* 成功按钮 */
.btn-success {
    background: linear-gradient(135deg, var(--success-color), #00A884);
    color: var(--text-light);
    box-shadow: 0 4px 15px rgba(0, 184, 148, 0.4);
}

.btn-success:hover {
    background: linear-gradient(135deg, #00A884, #009874);
    transform: translateY(-2px);
}

/* 按钮大小 */
.btn-sm {
    padding: 10px 20px;
    font-size: 0.9rem;
    border-radius: 10px;
}

.btn-lg {
    padding: 18px 36px;
    font-size: 1.1rem;
    border-radius: var(--border-radius);
}

.btn-block {
    width: 100%;
}

/* ============================================
   提示消息 - 卡通风格
   ============================================ */
.alert {
    padding: 16px 20px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease-out;
}

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

.alert-success {
    background: linear-gradient(135deg, #D4EDDA, #C3E6CB);
    color: #155724;
    border-left: 5px solid var(--success-color);
}

.alert-danger {
    background: linear-gradient(135deg, #F8D7DA, #F5C6CB);
    color: #721C24;
    border-left: 5px solid var(--danger-color);
}

.alert-warning {
    background: linear-gradient(135deg, #FFF3CD, #FFEAA7);
    color: #856404;
    border-left: 5px solid var(--warning-color);
}

.alert-info {
    background: linear-gradient(135deg, #D1ECF1, #BEE5EB);
    color: #0C5460;
    border-left: 5px solid var(--info-color);
}

/* ============================================
   导航栏 - 卡通风格
   ============================================ */
.navbar {
    background: var(--bg-card);
    padding: 16px 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    font-family: var(--font-family-heading);
    font-size: 1.5rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand:hover {
    color: var(--primary-hover);
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    list-style: none;
}

.nav-link {
    padding: 10px 16px;
    color: var(--text-secondary);
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-base);
}

.nav-link:hover {
    color: var(--primary-color);
    background: var(--bg-primary);
}

.nav-link.active {
    color: var(--primary-color);
    background: var(--primary-light);
}

/* 用户下拉菜单 */
.navbar-user {
    position: relative;
}

.navbar-user-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: var(--bg-primary);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-base);
}

.navbar-user-toggle:hover {
    background: var(--primary-light);
}

.navbar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.navbar-user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: var(--bg-card);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-md);
    min-width: 200px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-base);
}

.navbar-user:hover .navbar-user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.navbar-user-dropdown-item {
    display: block;
    padding: 12px 16px;
    color: var(--text-secondary);
    transition: var(--transition-base);
}

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

.navbar-user-dropdown-divider {
    height: 1px;
    background: #E8E8E8;
    margin: 5px 0;
}

/* ============================================
   侧边栏 - 卡通风格
   ============================================ */
.sidebar {
    width: 260px;
    background: var(--bg-card);
    min-height: calc(100vh - 70px);
    box-shadow: var(--shadow-sm);
    padding: 20px 0;
}

.sidebar-menu {
    list-style: none;
    padding: 0 15px;
}

.sidebar-menu-item {
    margin-bottom: 5px;
}

.sidebar-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: var(--text-secondary);
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    transition: var(--transition-base);
}

.sidebar-menu-link:hover {
    background: var(--bg-primary);
    color: var(--primary-color);
}

.sidebar-menu-link.active {
    background: linear-gradient(135deg, var(--primary-light), #FFD4D4);
    color: var(--primary-color);
}

.sidebar-menu-icon {
    font-size: 1.3rem;
}

.sidebar-divider {
    height: 1px;
    background: #E8E8E8;
    margin: 20px 15px;
}

.sidebar-title {
    padding: 10px 31px;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
    font-weight: 700;
}

/* ============================================
   布局
   ============================================ */
.layout {
    display: flex;
    min-height: 100vh;
}

.layout-content {
    flex: 1;
    padding: 30px;
    background: var(--bg-primary);
}

.layout-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

/* ============================================
   表格 - 卡通风格
   ============================================ */
.table-container {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.table th {
    background: var(--bg-primary);
    padding: 16px 20px;
    text-align: left;
    font-weight: 700;
    color: var(--text-primary);
    border-bottom: 3px solid #E8E8E8;
    white-space: nowrap;
}

.table td {
    padding: 16px 20px;
    border-bottom: 1px solid #F0F0F0;
    color: var(--text-secondary);
    white-space: nowrap;
}

.table tbody tr {
    transition: var(--transition-base);
}

.table tbody tr:hover {
    background: var(--bg-primary);
}

/* 表格响应式包装器 */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--border-radius);
}

/* 表格滚动提示 */
.table-scroll-hint {
    display: none;
    text-align: center;
    padding: 8px;
    background: var(--bg-primary);
    color: var(--text-muted);
    font-size: 0.85rem;
    border-radius: 0 0 var(--border-radius-sm) var(--border-radius-sm);
}

/* 操作按钮组 */
.table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
}

.table-actions .btn {
    padding: 8px 12px;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* ============================================
   徽章 - 卡通风格
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 20px;
}

.badge-success {
    background: linear-gradient(135deg, #D4EDDA, #C3E6CB);
    color: #155724;
}

.badge-danger {
    background: linear-gradient(135deg, #F8D7DA, #F5C6CB);
    color: #721C24;
}

.badge-warning {
    background: linear-gradient(135deg, #FFF3CD, #FFEAA7);
    color: #856404;
}

.badge-info {
    background: linear-gradient(135deg, #D1ECF1, #BEE5EB);
    color: #0C5460;
}

.badge-primary {
    background: linear-gradient(135deg, var(--primary-light), #FFD4D4);
    color: var(--primary-color);
}

/* ============================================
   头像
   ============================================ */
.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.avatar-sm {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
}

.avatar-lg {
    width: 80px;
    height: 80px;
    font-size: 1.8rem;
}

/* ============================================
   统计卡片
   ============================================ */
.stat-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.stat-icon.primary {
    background: linear-gradient(135deg, var(--primary-light), #FFD4D4);
}

.stat-icon.secondary {
    background: linear-gradient(135deg, var(--secondary-light), #D4F5F0);
}

.stat-icon.accent {
    background: linear-gradient(135deg, var(--accent-light), #FFF4C4);
}

.stat-content h3 {
    font-size: 1.8rem;
    color: var(--text-primary);
    font-family: var(--font-family-heading);
}

.stat-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* ============================================
   页脚
   ============================================ */
.footer {
    background: var(--bg-card);
    padding: 20px 0;
    text-align: center;
    color: var(--text-muted);
    border-top: 1px solid #E8E8E8;
}

/* ============================================
   动画
   ============================================ */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-bounce {
    animation: bounce 2s infinite;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* ============================================
   工具类
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }
.text-warning { color: var(--warning-color); }
.text-muted { color: var(--text-muted); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.w-100 { width: 100%; }

.hidden { display: none; }

/* ============================================
   响应式
   ============================================ */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .card {
        padding: 20px;
    }
    
    .sidebar {
        display: none;
    }
    
    .layout-content {
        padding: 15px;
    }
    
    .navbar-nav {
        display: none;
    }
    
    .container {
        padding: 0 15px;
    }
    
    /* 表格响应式 */
    .table-container {
        margin: 0 -15px;
        border-radius: 0;
        padding: 0 15px;
    }
    
    .table {
        min-width: 500px;
    }
    
    .table th,
    .table td {
        padding: 12px 14px;
    }
    
    .table-scroll-hint {
        display: block;
    }
    
    .table-actions {
        flex-direction: column;
        gap: 6px;
    }
    
    .table-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* 更小屏幕 - 手机竖屏 */
@media (max-width: 480px) {
    .table {
        min-width: 400px;
    }
    
    .table th,
    .table td {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    /* 分页响应式 */
    .pagination {
        flex-wrap: wrap;
    }
    
    .pagination-item {
        min-width: 36px;
        height: 36px;
    }
}

/* ============================================
   登录/注册页面特殊样式
   ============================================ */
.auth-wrapper {
    width: 100%;
    max-width: 450px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
    color: white;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
    animation: float 3s ease-in-out infinite;
}

.auth-logo h1 {
    font-family: var(--font-family-heading);
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.auth-logo p {
    color: var(--text-muted);
    margin: 0;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, #E8E8E8, transparent);
}

.auth-divider span {
    padding: 0 15px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #E8E8E8;
}

.auth-footer p {
    color: var(--text-muted);
    margin: 0;
}

.auth-footer a {
    color: var(--primary-color);
    font-weight: 600;
}

/* 密码强度指示器 */
.password-strength {
    display: flex;
    gap: 5px;
    margin-top: 8px;
}

.password-strength-bar {
    height: 4px;
    flex: 1;
    border-radius: 2px;
    background: #E8E8E8;
    transition: var(--transition-base);
}

.password-strength-bar.weak {
    background: var(--danger-color);
}

.password-strength-bar.medium {
    background: var(--warning-color);
}

.password-strength-bar.strong {
    background: var(--success-color);
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-muted);
}

/* 分页 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.pagination-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--bg-card);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-weight: 600;
    transition: var(--transition-base);
    cursor: pointer;
}

.pagination-item:hover {
    background: var(--bg-primary);
    color: var(--primary-color);
}

.pagination-item.active {
    background: var(--primary-color);
    color: white;
}

.pagination-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: auto;
    transform: scale(0.9);
    transition: var(--transition-base);
}

.modal-overlay.show .modal {
    transform: scale(1);
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #E8E8E8;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-family: var(--font-family-heading);
    font-size: 1.25rem;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: var(--primary-color);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 15px 25px;
    border-top: 1px solid #E8E8E8;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ============================================
   Mac 风格 Toast 提示
   ============================================ */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
    min-width: 280px;
    max-width: 420px;
    pointer-events: auto;
    animation: toastSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: top right;
}

.toast.hide {
    animation: toastSlideOut 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes toastSlideIn {
    0% {
        opacity: 0;
        transform: translateX(100%) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes toastSlideOut {
    0% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(100%) scale(0.8);
    }
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.2s;
    font-size: 18px;
    line-height: 1;
}

.toast-close:hover {
    opacity: 1;
}

/* Toast 类型样式 */
.toast.toast-success {
    background: rgba(255, 255, 255, 0.95);
}

.toast.toast-success .toast-icon {
    background: linear-gradient(135deg, #34c759, #30d158);
    color: white;
}

.toast.toast-error {
    background: rgba(255, 255, 255, 0.95);
}

.toast.toast-error .toast-icon {
    background: linear-gradient(135deg, #ff3b30, #ff453a);
    color: white;
}

.toast.toast-warning {
    background: rgba(255, 255, 255, 0.95);
}

.toast.toast-warning .toast-icon {
    background: linear-gradient(135deg, #ff9500, #ff9f0a);
    color: white;
}

.toast.toast-info {
    background: rgba(255, 255, 255, 0.95);
}

.toast.toast-info .toast-icon {
    background: linear-gradient(135deg, #007aff, #0a84ff);
    color: white;
}

/* Mac 风格进度条 */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #007aff, #5856d6);
    border-radius: 0 0 12px 12px;
    animation: toastProgress 3s linear forwards;
}

@keyframes toastProgress {
    0% {
        width: 100%;
    }
    100% {
        width: 0%;
    }
}

/* 响应式 Toast */
@media (max-width: 480px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
        width: 100%;
    }
}

/* 暗色模式 Toast */
@media (prefers-color-scheme: dark) {
    .toast {
        background: rgba(40, 40, 40, 0.9);
        color: #ffffff;
        box-shadow:
            0 4px 24px rgba(0, 0, 0, 0.3),
            0 0 0 1px rgba(255, 255, 255, 0.1);
    }
    
    .toast-close {
        color: #ffffff;
    }
}

/* ============================================
   自定义模态对话框 - 卡通风格
   ============================================ */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
}

.modal-container.show {
    opacity: 1;
    visibility: visible;
}

.modal-container .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-container .modal-dialog {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    max-width: 420px;
    width: 90%;
    max-height: 90vh;
    transform: scale(0.9) translateY(20px);
    transition: var(--transition-bounce);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-container.show .modal-dialog {
    transform: scale(1) translateY(0);
}

.modal-container .modal-header {
    padding: 20px 24px;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    flex-shrink: 0;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-container .modal-title {
    font-family: var(--font-family-heading);
    font-size: 1.25rem;
    color: var(--text-primary);
    margin: 0;
}

.modal-container .modal-close {
    background: var(--bg-card);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
}

.modal-container .modal-close:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.modal-container .modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    /* flex 布局关键：让 modal-body 可以收缩并处理滚动 */
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    /* 滚动条紧贴右侧边缘 */
    padding: 30px 0 30px 24px;
    /* 让滚动条显示在右侧边缘 */
    scrollbar-gutter: stable;
}

/* 内容区域右侧留出空间 */
.modal-container .modal-body > * {
    padding-right: 24px;
}

/* 当 modal-body 内容不是居中布局时（如编辑表单） */
.modal-container .modal-body:not(:has(.modal-icon)) {
    align-items: stretch;
    text-align: left;
}

.modal-container .modal-icon {
    margin-bottom: 20px;
    animation: modalIconBounce 0.5s ease-out;
}

@keyframes modalIconBounce {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.modal-container .modal-message {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.modal-container .modal-footer {
    padding: 16px 24px 24px;
    border-top: none;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-shrink: 0;
}

.modal-container .modal-btn-cancel {
    min-width: 100px;
}

.modal-container .modal-btn-confirm {
    min-width: 100px;
}

/* 危险确认模态框特殊样式 */
.modal-container .modal-dialog.danger .modal-header {
    background: linear-gradient(135deg, #FFEAEA, #FFF0F0);
}

.modal-container .modal-dialog.danger .modal-icon svg {
    stroke: var(--danger-color);
}

/* ============================================
   下拉选择框 - 卡通风格
   ============================================ */
select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23636E72' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 44px;
    cursor: pointer;
    transition: var(--transition-base);
}

select.form-control:hover {
    border-color: var(--secondary-color);
    background-color: var(--bg-card);
    box-shadow: 0 2px 8px rgba(78, 205, 196, 0.2);
}

select.form-control:focus {
    border-color: var(--primary-color);
    background-color: var(--bg-card);
    box-shadow: 0 0 0 4px var(--primary-light);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23FF6B6B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

/* 下拉选项样式 - 注意：原生 option 样式受限，建议使用自定义下拉组件 */
select.form-control option {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 12px 16px;
    font-family: var(--font-family-base);
    font-weight: 500;
}

/* ============================================
   自定义下拉选择框 - 卡通风格
   ============================================ */
.custom-select {
    position: relative;
    display: inline-block;
    width: 100%;
    vertical-align: middle;
    /* 确保下拉菜单不影响其他元素 */
    flex-shrink: 0;
}

.custom-select-trigger {
    width: 100%;
    padding: 14px 44px 14px 18px;
    font-family: var(--font-family-base);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    border: 3px solid #E8E8E8;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}

.custom-select-trigger:hover {
    border-color: var(--secondary-color);
    background-color: var(--bg-card);
    box-shadow: 0 2px 8px rgba(78, 205, 196, 0.2);
}

.custom-select.open .custom-select-trigger {
    border-color: var(--primary-color);
    background-color: var(--bg-card);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.custom-select-trigger::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid var(--text-secondary);
    transition: var(--transition-base);
}

.custom-select.open .custom-select-trigger::after {
    transform: translateY(-50%) rotate(180deg);
    border-top-color: var(--primary-color);
}

.custom-select-placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.custom-select-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--bg-card);
    border: 3px solid #E8E8E8;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    max-height: 280px;
    overflow-y: auto;
    overflow-x: visible;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    /* 确保下拉菜单内容不被裁剪 */
    contain: none;
}

.custom-select.open .custom-select-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-select-option {
    padding: 14px 18px;
    font-family: var(--font-family-base);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.custom-select-option:first-child {
    border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
}

.custom-select-option:last-child {
    border-radius: 0 0 var(--border-radius-sm) var(--border-radius-sm);
}

/* 占位符选项样式 */
.custom-select-option.placeholder-option {
    color: var(--text-muted);
    font-weight: 400;
    font-style: italic;
}

.custom-select-option.placeholder-option:hover {
    color: var(--text-secondary);
}

/* 悬停状态 - 使用青色系 */
.custom-select-option:hover {
    background: linear-gradient(135deg, var(--secondary-light), #D4F5F0);
    color: var(--secondary-color);
    padding-left: 22px;
}

/* 选中状态 - 使用粉色系 */
.custom-select-option.selected {
    background: linear-gradient(135deg, var(--primary-light), #FFD4D4);
    color: var(--primary-color);
    font-weight: 700;
}

.custom-select-option.selected::before {
    content: '✓';
    font-weight: bold;
    color: var(--primary-color);
}

/* 选中项悬停时 - 混合效果 */
.custom-select-option.selected:hover {
    background: linear-gradient(135deg, var(--primary-light), #FFD4D4);
    color: var(--primary-color);
    padding-left: 22px;
}

/* 键盘聚焦状态 - 使用淡黄色 */
.custom-select-option.focused {
    background: linear-gradient(135deg, var(--accent-light), #FFF4C4);
    color: #D4A800;
}

/* 聚焦且选中 */
.custom-select-option.focused.selected {
    background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
    color: var(--primary-color);
}

/* 自定义下拉框样式变体 */
.custom-select-sm .custom-select-trigger {
    padding: 10px 40px 10px 14px;
    font-size: 0.9rem;
}

.custom-select-sm .custom-select-option {
    padding: 10px 14px;
    font-size: 0.9rem;
}

/* 带图标的选项 */
.custom-select-option-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 分组标题 */
.custom-select-group-title {
    padding: 10px 18px 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
    pointer-events: none;
}

/* 搜索框 */
.custom-select-search {
    padding: 12px;
    border-bottom: 2px solid #E8E8E8;
}

.custom-select-search input {
    width: 100%;
    padding: 10px 14px;
    font-family: var(--font-family-base);
    font-size: 0.95rem;
    border: 2px solid #E8E8E8;
    border-radius: 10px;
    outline: none;
    transition: var(--transition-base);
}

.custom-select-search input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* 空状态 */
.custom-select-empty {
    padding: 30px 20px;
    text-align: center;
    color: var(--text-muted);
}

/* 禁用状态 */
.custom-select.disabled .custom-select-trigger {
    background-color: #F5F5F5;
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.7;
}

.custom-select.disabled .custom-select-trigger::after {
    border-top-color: var(--text-muted);
}

/* 宽度限制 - 继承原生 select 的 max-width */
.custom-select[data-max-width] {
    max-width: attr(data-max-width);
}

/* 固定宽度的下拉框 */
.custom-select.custom-select-sm,
select.form-control[style*="max-width"] + .custom-select {
    max-width: 180px;
}

/* 下拉面板宽度自适应 */
.custom-select-dropdown {
    min-width: max-content;
    min-width: -moz-max-content;
    /* 确保下拉菜单至少和触发器一样宽 */
    min-width: 100%;
}

/* ============================================
   日期选择器 - 卡通风格
   ============================================ */
input[type="date"].form-control,
input[type="time"].form-control,
input[type="datetime-local"].form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    position: relative;
}

/* 日期选择器图标 */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    position: absolute;
    right: 14px;
    width: 24px;
    height: 24px;
    cursor: pointer;
}

/* 自定义日期图标背景 */
input[type="date"].form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23636E72' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
    padding-right: 44px;
}

input[type="time"].form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23636E72' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
    padding-right: 44px;
}

input[type="datetime-local"].form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23636E72' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
    padding-right: 44px;
}

/* 日期选择器悬停效果 */
input[type="date"].form-control:hover,
input[type="time"].form-control:hover,
input[type="datetime-local"].form-control:hover {
    border-color: var(--primary-color);
}

/* 日期选择器聚焦效果 */
input[type="date"].form-control:focus,
input[type="time"].form-control:focus,
input[type="datetime-local"].form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-light);
}

/* Webkit 日期选择器内部样式 */
input[type="date"]::-webkit-date-and-time-value,
input[type="time"]::-webkit-date-and-time-value,
input[type="datetime-local"]::-webkit-date-and-time-value {
    font-family: var(--font-family-base);
    font-weight: 600;
    color: var(--text-primary);
}

/* 日期选择器日历弹出层样式 (仅 Chrome/Safari 支持) */
input[type="date"]::-webkit-datetime-edit {
    font-family: var(--font-family-base);
    padding: 0;
}

input[type="date"]::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
}

input[type="date"]::-webkit-datetime-edit-text,
input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-day-field,
input[type="date"]::-webkit-datetime-edit-year-field {
    color: var(--text-secondary);
    font-weight: 600;
}

input[type="date"]::-webkit-datetime-edit-month-field:focus,
input[type="date"]::-webkit-datetime-edit-day-field:focus,
input[type="date"]::-webkit-datetime-edit-year-field:focus {
    color: var(--primary-color);
    background: var(--primary-light);
    border-radius: 4px;
    padding: 2px 4px;
}

/* 数字输入框样式 */
input[type="number"].form-control {
    appearance: textfield;
    -moz-appearance: textfield;
}

input[type="number"].form-control::-webkit-outer-spin-button,
input[type="number"].form-control::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"].form-control:hover,
input[type="number"].form-control:focus {
    border-color: var(--primary-color);
}

/* ============================================
   表单控件通用增强样式
   ============================================ */
.form-control:hover:not(:disabled):not(:read-only) {
    border-color: var(--primary-color);
}

.form-control:disabled {
    background-color: #F5F5F5;
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.7;
}

.form-control:read-only {
    background-color: var(--bg-secondary);
    cursor: default;
}

/* 成功状态 */
.form-control.is-valid,
.form-control.success {
    border-color: var(--success-color);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2300B894' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.form-control.is-valid:focus,
.form-control.success:focus {
    border-color: var(--success-color);
    box-shadow: 0 0 0 4px rgba(0, 184, 148, 0.2);
}

/* 错误状态 */
.form-control.is-invalid,
.form-control.error {
    border-color: var(--danger-color);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23E17055' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='15' y1='9' x2='9' y2='15'%3E%3C/line%3E%3Cline x1='9' y1='9' x2='15' y2='15'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.form-control.is-invalid:focus,
.form-control.error:focus {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 4px rgba(225, 112, 85, 0.2);
}

/* ============================================
   搜索输入框特殊样式
   ============================================ */
input[type="search"].form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23B2BEC3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 14px center;
    padding-left: 44px;
}

input[type="search"].form-control:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23FF6B6B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
}

/* 清除搜索按钮 */
input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23B2BEC3' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px;
    cursor: pointer;
    margin-right: 8px;
    transition: var(--transition-base);
}

input[type="search"]::-webkit-search-cancel-button:hover {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23FF6B6B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
    transform: scale(1.1);
}

/* ============================================
   响应式表单样式
   ============================================ */
@media (max-width: 768px) {
    select.form-control,
    input[type="date"].form-control,
    input[type="time"].form-control,
    input[type="datetime-local"].form-control,
    input[type="number"].form-control {
        font-size: 16px; /* 防止 iOS 缩放 */
    }
    
    /* 移动端表单组横向排列 */
    .d-flex.gap-2:has(select.form-control),
    .d-flex.gap-2:has(input[type="date"]) {
        flex-direction: column;
        gap: 10px;
    }
    
    .d-flex.gap-2:has(select.form-control) .form-control,
    .d-flex.gap-2:has(input[type="date"]) .form-control {
        max-width: none !important;
    }
}

/* ============================================
   自定义日期选择器组件 - 卡通风格
   ============================================ */
.date-picker {
    position: relative;
    display: inline-block;
    width: 100%;
    vertical-align: middle;
    /* 固定高度，防止打开日历时高度变化 */
    overflow: visible;
}

.date-picker-trigger {
    width: 100%;
    padding: 14px 18px;
    font-family: var(--font-family-base);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    border: 3px solid #E8E8E8;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    user-select: none;
    box-sizing: border-box;
    line-height: 1.6;
}

.date-picker-trigger > span:first-child {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.date-picker-trigger:hover {
    border-color: var(--secondary-color);
    background-color: var(--bg-card);
    box-shadow: 0 2px 8px rgba(78, 205, 196, 0.2);
}

.date-picker.open .date-picker-trigger {
    border-color: var(--primary-color);
    background-color: var(--bg-card);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.date-picker-placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.date-picker-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition-base);
}

.date-picker-trigger:hover .date-picker-icon {
    color: var(--secondary-color);
}

.date-picker.open .date-picker-icon {
    color: var(--primary-color);
}

/* 日历面板 */
.date-picker-calendar {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 320px;
    background: var(--bg-card);
    border: 3px solid #E8E8E8;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 16px;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.date-picker.open .date-picker-calendar {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Fixed 定位模式（用于模态框中） */
.date-picker-calendar.fixed-position {
    position: fixed;
    transform: none;
    opacity: 1;
    visibility: visible;
}

/* 向上弹出的日历面板 */
.date-picker.open-up .date-picker-calendar:not(.fixed-position) {
    top: auto;
    bottom: calc(100% + 8px);
    transform: translateY(10px);
}

.date-picker.open-up .date-picker-calendar:not(.fixed-position) {
    transform: translateY(0);
}

/* 日历头部 */
.date-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #E8E8E8;
}

.date-picker-nav {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-primary);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition-base);
}

.date-picker-nav:hover {
    background: linear-gradient(135deg, var(--secondary-light), #D4F5F0);
    color: var(--secondary-color);
}

.date-picker-month-year {
    font-family: var(--font-family-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* 星期标题 */
.date-picker-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.date-picker-weekdays span {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    padding: 8px 0;
}

/* 日期网格 */
.date-picker-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

/* 日期按钮 */
.date-picker-day {
    width: 100%;
    aspect-ratio: 1;
    border: none;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font-family-base);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: var(--transition-base);
}

.date-picker-day:hover:not(.disabled),
.date-picker-day.hover:not(.disabled) {
    background: linear-gradient(135deg, var(--secondary-light), #D4F5F0);
    color: var(--secondary-color);
    transform: scale(1.05);
}

.date-picker-day.prev-month,
.date-picker-day.next-month {
    color: var(--text-muted);
    opacity: 0.5;
}

.date-picker-day.today {
    background: linear-gradient(135deg, var(--accent-light), #FFF4C4);
    color: #D4A800;
    font-weight: 700;
}

.date-picker-day.today:hover:not(.disabled) {
    background: linear-gradient(135deg, var(--accent-hover), #FFC800);
    color: #B8860B;
}

.date-picker-day.selected {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
}

.date-picker-day.selected:hover:not(.disabled) {
    background: linear-gradient(135deg, var(--primary-hover), #E84545);
    transform: scale(1.05);
}

.date-picker-day.disabled {
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.4;
}

/* 日期选择器响应式 */
@media (max-width: 480px) {
    .date-picker-calendar {
        width: 290px;
        padding: 12px;
    }
    
    .date-picker-day {
        font-size: 0.85rem;
    }
    
    .date-picker-month-year {
        font-size: 1rem;
    }
}

/* 右侧弹出（用于窄宽度情况）*/
.date-picker.right .date-picker-calendar {
    left: auto;
    right: 0;
}

/* ============================================
   后台管理页面通用组件 - 卡通风格
   ============================================ */

/* 页面头部 */
.admin-page-header {
    margin-bottom: 24px;
}

.admin-page-title {
    font-family: var(--font-family-heading);
    font-size: 1.75rem;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-page-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* 统计卡片网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    border: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-cartoon);
    border-color: var(--primary-light);
}

.stat-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-card-content {
    flex: 1;
}

.stat-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-family-heading);
}

.stat-card-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* 工具栏 - 卡通风格 */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
    transition: var(--transition-base);
}

.toolbar:hover {
    border-color: var(--primary-light);
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* 工具栏行 - 用于筛选表单横向排列 */
.toolbar-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
}

.toolbar-row .form-group {
    margin-bottom: 0;
    min-width: 0;
    width: auto;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.toolbar-row .form-control {
    height: 42px;
    width: auto !important;
    min-width: 120px;
}

.toolbar-row select.form-control {
    min-width: 140px;
}

.toolbar-row input[type="date"].form-control {
    min-width: 150px;
}

.toolbar-row input[type="text"].form-control {
    min-width: 120px;
}

.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* 搜索表单样式 */
.search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.search-form .form-control {
    height: 48px;
    padding: 12px 16px;
    min-width: 0;
    width: auto !important;
    flex-shrink: 0;
}

.search-form select.form-control {
    min-width: 120px !important;
    width: auto !important;
}

.search-form input[type="text"].form-control {
    min-width: 150px;
}

/* 搜索表单内的原生select元素确保水平排列 */
.search-form select {
    display: inline-block;
    vertical-align: middle;
}

/* 搜索表单内的自定义选择框 */
.search-form .custom-select {
    width: auto !important;
    min-width: 160px;
    flex-shrink: 0;
}

.search-form .custom-select-trigger {
    height: 48px;
    width: 100%;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    width: auto !important;
}

.search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 1;
}

.search-input {
    padding-left: 40px !important;
    min-width: 200px;
    width: auto !important;
    max-width: none;
}

.search-form .btn {
    height: 48px;
    padding: 12px 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 数据表格容器 - 卡通风格 */
.data-table-container {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-cartoon);
    /* 启用横向滚动 */
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    border: 3px solid transparent;
    position: relative;
    /* 滚动条样式 - Firefox */
    scrollbar-width: auto;
    scrollbar-color: var(--primary-color) var(--bg-primary);
}

/* 数据表格容器顶部装饰条 - 使用固定定位避免影响滚动 */
.data-table-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    z-index: 1;
    pointer-events: none;
}

/* 数据表格容器滚动条样式 - Webkit浏览器 */
.data-table-container::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.data-table-container::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 6px;
}

.data-table-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 6px;
    border: 2px solid var(--bg-primary);
}

.data-table-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--secondary-hover));
}

.data-table-container::-webkit-scrollbar-corner {
    background: var(--bg-primary);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    /* 设置较大的最小宽度确保触发横向滚动 */
    min-width: 1000px;
    /* 确保表格不会被压缩 */
    table-layout: auto;
}

/* 确保表格单元格不会被压缩 */
.data-table th,
.data-table td {
    white-space: nowrap;
}

.data-table th {
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    padding: 16px 20px;
    text-align: left;
    font-weight: 700;
    font-family: var(--font-family-heading);
    color: var(--text-primary);
    border-bottom: 3px solid var(--primary-light);
    white-space: nowrap;
}

.data-table td {
    padding: 16px 20px;
    border-bottom: 2px dashed #F0F0F0;
    color: var(--text-secondary);
}

.data-table tbody tr {
    transition: var(--transition-bounce);
}

.data-table tbody tr:hover {
    background: linear-gradient(135deg, var(--primary-light), #FFD4D4);
    transform: scale(1.005);
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    gap: 4px;
}

.action-buttons .btn-sm {
    padding: 6px 8px;
}

/* 卡通风格复选框 */
.data-table input[type="checkbox"] {
    width: 20px;
    height: 20px;
    appearance: none;
    -webkit-appearance: none;
    background: var(--bg-card);
    border: 3px solid #E8E8E8;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    transition: var(--transition-bounce);
    vertical-align: middle;
}

.data-table input[type="checkbox"]:hover {
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.data-table input[type="checkbox"]:checked {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border-color: var(--primary-color);
}

.data-table input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
}

.data-table input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 4px var(--primary-light);
}

/* 徽章样式增强 - 卡通风格 */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: var(--font-family-base);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: var(--transition-base);
    white-space: nowrap;
    flex-wrap: nowrap;
}

.badge svg {
    flex-shrink: 0;
}

.badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.badge-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 2px solid #a6e9b5;
}

.badge-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeeba);
    color: #856404;
    border: 2px solid #ffe083;
}

.badge-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.badge-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
    border: 2px solid #a6d8e0;
}

.badge-secondary {
    background: linear-gradient(135deg, #e2e3e5, #d6d8db);
    color: #383d41;
    border: 2px solid #c5c7c9;
}

/* 等级徽章样式 - 卡通风格 */
.level-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: var(--transition-base);
}

.level-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.level-badge.level-1 {
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
    color: #2E7D32;
    border: 2px solid #A5D6A7;
}

.level-badge.level-2 {
    background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
    color: #1565C0;
    border: 2px solid #90CAF9;
}

.level-badge.level-3 {
    background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
    color: #E65100;
    border: 2px solid #FFCC80;
}

.level-badge.level-4 {
    background: linear-gradient(135deg, #F3E5F5, #E1BEE7);
    color: #7B1FA2;
    border: 2px solid #CE93D8;
}

.level-badge.level-0 {
    background: linear-gradient(135deg, #FFEBEE, #FFCDD2);
    color: #C62828;
    border: 2px solid #EF9A9A;
}

/* 表单行 */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* 详情网格 - 卡通风格 */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.detail-item {
    padding: 16px;
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    border-radius: var(--border-radius-sm);
    border: 2px solid transparent;
    transition: var(--transition-base);
}

.detail-item:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.detail-item.full-width {
    grid-column: span 2;
}

.detail-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-weight: 600;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 500;
}

/* 开关样式 */
.form-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.form-switch input[type="checkbox"] {
    width: 48px;
    height: 24px;
    appearance: none;
    -webkit-appearance: none;
    background: #e0e0e0;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
    flex-shrink: 0;
}

.form-switch input[type="checkbox"]:checked {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
}

.form-switch input[type="checkbox"]::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.form-switch input[type="checkbox"]:checked::before {
    transform: translateX(24px);
}

/* 页面自定义模态框样式 - 卡通风格 */
.gv-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
}

.gv-modal-overlay[style*="display: flex"] {
    opacity: 1;
    visibility: visible;
}

.gv-modal-container {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: auto;
    box-shadow: var(--shadow-cartoon);
    transform: scale(0.9) translateY(20px);
    transition: var(--transition-bounce);
    border: 3px solid var(--primary-light);
    position: relative;
}

.gv-modal-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.gv-modal-overlay[style*="display: flex"] .gv-modal-container {
    transform: scale(1) translateY(0);
}

.gv-modal-header {
    padding: 20px 24px;
    border-bottom: 3px dashed #F0F0F0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
}

.gv-modal-title {
    font-family: var(--font-family-heading);
    font-size: 1.3rem;
    margin: 0;
    color: var(--primary-color);
}

.gv-modal-close {
    width: 32px;
    height: 32px;
    background: var(--bg-card);
    border: 2px solid #E8E8E8;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    line-height: 1;
    transition: var(--transition-bounce);
}

.gv-modal-close:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: rotate(90deg);
}

.gv-modal-body {
    padding: 24px;
}

.gv-modal-footer {
    padding: 16px 24px;
    border-top: 3px dashed #F0F0F0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
}

/* 分页样式增强 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding: 16px 20px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
    gap: 12px;
}

.pagination-info {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.pagination-buttons {
    display: flex;
    gap: 8px;
}

/* 快捷操作区域 */
.quick-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* 响应式 */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-item.full-width {
        grid-column: span 1;
    }
    
    .search-form {
        flex-direction: column;
        width: 100%;
    }
    
    .search-form .search-input,
    .search-form select.form-control {
        width: 100%;
    }
    
    .search-form .btn {
        width: 100%;
    }
    
    .toolbar {
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
    }
    
    .toolbar-left,
    .toolbar-right {
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* 分页保持水平排列，允许换行 */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    
    .pagination-info {
        width: 100%;
        text-align: center;
        margin-bottom: 8px;
    }
    
    .pagination-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .gv-modal-container {
        width: 95%;
        max-height: 85vh;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-card-value {
        font-size: 1.25rem;
    }
}

/* 许可证管理页面分页样式 */
.license-pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-top: 1px solid #E8E8E8;
    flex-wrap: wrap;
    gap: 16px;
}

/* 许可证管理页面分页样式 - 覆盖默认居中样式 */
.license-pagination-wrapper .pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    flex-wrap: wrap;
}

.license-pagination-wrapper .pagination-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--bg-card);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-weight: 600;
    transition: var(--transition-base);
    cursor: pointer;
    border: 2px solid transparent;
}

.license-pagination-wrapper .pagination-item:hover {
    background: var(--bg-primary);
    color: var(--primary-color);
    border-color: var(--primary-light);
}

.license-pagination-wrapper .pagination-item.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.license-pagination-wrapper .pagination-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}