/* 全局样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #f8f9fa;
}

/* 卡片样式 */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border-radius: 0.25rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    animation: fadeIn 0.3s ease-in-out;
}

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

.card-header {
    font-weight: 600;
}

/* 表格样式 */
.table {
    font-size: 14px;
}

.table th {
    font-weight: 600;
    color: #495057;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* 表单样式 */
.form-control {
    font-size: 14px;
    border-radius: 0.25rem;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* 按钮样式 */
.btn {
    font-size: 14px;
    border-radius: 0.25rem;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0069d9;
    border-color: #0062cc;
}

/* 统计卡片样式 */
.card.border-left-primary {
    border-left: 0.25rem solid #4e73df;
}

.card.border-left-warning {
    border-left: 0.25rem solid #f6c23e;
}

.card.border-left-danger {
    border-left: 0.25rem solid #e74a3b;
}

.card.border-left-success {
    border-left: 0.25rem solid #1cc88a;
}

.card.border-left-info {
    border-left: 0.25rem solid #36b9cc;
}

.card.border-left-secondary {
    border-left: 0.25rem solid #858796;
}

/* 卡片间距调整 */
@media (min-width: 768px) {
    .event-card {
        margin: 0 0.5rem;
    }
    
    .col-md-2 {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* 模态框样式 */
.modal-content {
    border-radius: 0.3rem;
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.modal-title {
    font-weight: 600;
    color: #495057;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .card-body {
        padding: 1rem;
    }

    .table-responsive {
        font-size: 12px;
        -webkit-overflow-scrolling: touch;
    }

    .navbar-brand {
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 200px;
    }

    .nav-link {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }

    .card-header {
        font-size: 1.1rem;
    }

    .btn {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
        min-width: 80px;
    }

    /* 按钮组响应式调整 */
    .btn-group-vertical > .btn-group {
        display: flex;
        flex-wrap: wrap;
    }

    .btn-group-vertical > .btn-group > .btn {
        flex: 1 1 45%;
        margin: 0.25rem;
    }

    /* 统计卡片响应式调整 */
    .card.border-left-primary,
    .card.border-left-warning,
    .card.border-left-danger,
    .card.border-left-success,
    .card.border-left-info,
    .card.border-left-secondary {
        margin-bottom: 1rem;
    }

    /* 表格响应式调整 */
    table th,
    table td {
        padding: 0.5rem;
    }

    /* 表单响应式调整 */
    .form-group {
        margin-bottom: 1rem;
    }

    /* 页脚响应式调整 */
    footer {
        text-align: center;
    }

    footer .col-md-6 {
        margin-bottom: 1rem;
    }

    footer .col-md-6.text-right {
        text-align: center;
    }

    /* 模态框响应式调整 */
    .modal-dialog {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }

    /* 通知响应式调整 */
    .alert {
        position: relative;
        top: auto;
        right: auto;
        margin: 1rem 0;
        min-width: auto;
        max-width: 100%;
    }
}

/* 小屏幕手机响应式调整 */
@media (max-width: 480px) {
    .navbar-brand {
        font-size: 0.9rem;
        max-width: 150px;
    }

    .btn-group-vertical > .btn-group > .btn {
        flex: 1 1 100%;
    }

    .card-header {
        font-size: 1rem;
    }

    .table-responsive {
        font-size: 11px;
    }

    table th,
    table td {
        padding: 0.4rem;
    }

    .btn {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
        min-width: 70px;
    }

    h1, h2, h3, h4, h5, h6 {
        font-size: 1.2rem;
    }
}

/* 表单验证样式 */
.is-invalid {
    border-color: #dc3545;
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* 通知样式增强 */
.alert {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 导航栏样式 */
.navbar {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

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

.nav-link {
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
}

/* 页脚样式 */
footer {
    margin-top: 2rem;
    border-top: 1px solid #dee2e6;
}

/* 状态标签样式 */
.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35em 0.65em;
    border-radius: 0.375rem;
}

.badge-success {
    background-color: #1cc88a;
}

.badge-warning {
    background-color: #f6c23e;
}

.badge-danger {
    background-color: #e74a3b;
}

.badge-info {
    background-color: #36b9cc;
}

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

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

/* 图表容器样式 */
.chart-container {
    position: relative;
    height: 250px;
    width: 100%;
}

/* 文件预览样式 */
.file-preview-container {
    transition: all 0.3s ease;
}

.file-preview-content {
    position: relative;
    overflow: hidden;
}

.max-height-200 {
    max-height: 200px;
    object-fit: contain;
}

/* 自定义文件输入样式 */
.custom-file {
    position: relative;
    display: inline-block;
    width: 100%;
    height: calc(1.5em + 0.75rem + 2px);
}

.custom-file-input {
    position: relative;
    z-index: 2;
    width: 100%;
    height: calc(1.5em + 0.75rem + 2px);
    margin: 0;
    opacity: 0;
}

.custom-file-label {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1;
    height: calc(1.5em + 0.75rem + 2px);
    padding: 0.375rem 0.75rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
}

.custom-file-label::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: block;
    height: calc(1.5em + 0.75rem);
    padding: 0.375rem 0.75rem;
    line-height: 1.5;
    color: #495057;
    content: "浏览";
    background-color: #e9ecef;
    border-left: inherit;
    border-radius: 0 0.25rem 0.25rem 0;
}