/* 基础样式 */
body {
    background-color: #f0f2f5;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* 导航栏优化 */
.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 0.8rem 0;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.3rem;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
    padding: 1rem 1.25rem;
    font-weight: 600;
}

/* 统计卡片 */
.card.bg-primary, .card.bg-warning, .card.bg-info, .card.bg-success {
    border-radius: 12px;
    transition: transform 0.2s;
}

.card.bg-primary:hover, .card.bg-warning:hover, .card.bg-info:hover, .card.bg-success:hover {
    transform: scale(1.02);
}

.card.bg-primary .card-title, .card.bg-warning .card-title, 
.card.bg-info .card-title, .card.bg-success .card-title {
    font-size: 0.9rem;
    opacity: 0.9;
}

.card.bg-primary .display-6, .card.bg-warning .display-6, 
.card.bg-info .display-6, .card.bg-success .display-6 {
    font-weight: 700;
}

/* 表格样式 */
.table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    padding: 1rem;
}

.table tbody td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

/* 按钮样式 */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
}

/* 表单样式 */
.form-control, .form-select {
    border-radius: 8px;
    padding: 0.6rem 0.85rem;
    border: 1px solid #ced4da;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

/* 徽章样式 */
.badge {
    padding: 0.5em 0.8em;
    font-weight: 500;
    border-radius: 6px;
}

/* 头像样式 */
.avatar-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-circle-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.avatar-text {
    font-size: 28px;
    color: white;
    font-weight: bold;
}

.avatar-text-sm {
    font-size: 14px;
    color: white;
    font-weight: 600;
}

/* 登录页面 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    border-radius: 16px;
    overflow: hidden;
}

.login-card .card-header {
    background: white;
    padding: 2rem 1.5rem 1rem;
    text-align: center;
}

.login-card .card-body {
    padding: 2rem;
}

/* 页面标题 */
.page-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.page-header h2 {
    margin: 0;
    color: #333;
    font-weight: 600;
}

/* 搜索框 */
.search-box {
    position: relative;
    max-width: 300px;
}

.search-box input {
    padding-left: 2.5rem;
    border-radius: 20px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

/* 筛选按钮组 */
.btn-group-filter .btn {
    border-radius: 20px;
    margin-right: 5px;
    padding: 0.4rem 1rem;
}

/* 分页样式 */
.pagination {
    margin-top: 1rem;
}

.page-link {
    border-radius: 6px;
    margin: 0 2px;
    color: #495057;
}

.page-item.active .page-link {
    background-color: #667eea;
    border-color: #667eea;
}

/* 提示框优化 */
.alert {
    border-radius: 8px;
    border: none;
}

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

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

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

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

/* 表格图片 */
.table img {
    max-width: 80px;
    height: auto;
    border-radius: 6px;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .card {
        margin-bottom: 15px;
    }
    
    .table {
        font-size: 0.9rem;
    }
    
    .btn-group-filter .btn {
        margin-bottom: 5px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}
/* iOS Safari专用修复 */
@media screen and (max-width: 768px) {
    /* 修复iOS点击延迟 */
    * {
        -webkit-tap-highlight-color: rgba(0,0,0,0);
        -webkit-touch-callout: none;
    }
    
    /* 确保所有可点击元素都有足够的触摸区域 */
    a, button, [role="button"], .btn, .clickable {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 16px;
    }
    
    /* 修复iOS :active状态 */
    a:active, button:active, [role="button"]:active {
        opacity: 0.7;
        transform: scale(0.98);
    }
    
    /* 防止iOS橡皮筋效果干扰 */
    body {
        overscroll-behavior-y: none;
        -webkit-overflow-scrolling: touch;
    }
    
    /* 修复iOS滚动条隐藏时的触摸区域 */
    ::-webkit-scrollbar {
        width: 0;
        background: transparent;
    }
}


/* iOS Safari模态框专用修复 */
@media (max-width: 768px) {
    /* 修复模态框背景遮罩层 */
    .modal-backdrop {
        z-index: 1040;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,0.5);
    }
    
    /* 修复模态框在iOS中的位置 */
    .modal {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1050;
        display: none;
        width: 100%;
        height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
        outline: 0;
        -webkit-overflow-scrolling: touch;
    }
    
    /* 修复模态框对话框 */
    .modal-dialog {
        position: relative;
        width: auto;
        margin: 0.5rem;
        pointer-events: none;
    }
    
    /* 修复模态框内容 */
    .modal-content {
        position: relative;
        display: flex;
        flex-direction: column;
        width: 100%;
        pointer-events: auto;
        background-color: #fff;
        background-clip: padding-box;
        border: 1px solid rgba(0,0,0,0.2);
        border-radius: 0.3rem;
        outline: 0;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    /* 修复模态框关闭按钮 */
    .modal-header .btn-close {
        padding: 0.5rem;
        margin: -0.5rem -0.5rem -0.5rem auto;
    }
    
    /* 修复模态框滚动 */
    .modal-body {
        position: relative;
        flex: 1 1 auto;
        padding: 1rem;
        overflow-y: auto;
    }
}

/* iOS Safari模态框JavaScript修复 */

