/* ============================================
   学生素质拓展系统 - 全局样式
   ============================================ */

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* 顶部导航栏 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0 30px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo {
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 2px;
}

.nav {
    display: flex;
    gap: 5px;
}

.nav-item {
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.nav-item:hover {
    background: rgba(255,255,255,0.2);
}

.nav-item.active {
    background: white;
    color: #667eea;
    font-weight: bold;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
}

.user-info button {
    padding: 6px 16px;
    border: 1px solid white;
    background: transparent;
    color: white;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.user-info button:hover {
    background: white;
    color: #667eea;
}

/* 主内容区域 */
.main-container {
    margin-top: 60px;
    padding: 25px;
    min-height: calc(100vh - 60px);
}

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

.card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.card-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 按钮样式 */
.btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd6;
    transform: translateY(-1px);
}

.btn-success {
    background: #52c41a;
    color: white;
}

.btn-success:hover {
    background: #46a617;
}

.btn-danger {
    background: #ff4d4f;
    color: white;
}

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

.btn-warning {
    background: #faad14;
    color: white;
}

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

.btn-secondary {
    background: #f0f0f0;
    color: #666;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-info {
    background: #1890ff;
    color: white;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

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

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

thead {
    background: #fafafa;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

th {
    font-weight: 600;
    color: #666;
}

tr:hover {
    background: #fafafa;
}

/* 状态标签 */
.tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}

.tag-pending {
    background: #fff7e6;
    color: #fa8c16;
}

.tag-approved {
    background: #f6ffed;
    color: #52c41a;
}

.tag-rejected {
    background: #fff1f0;
    color: #f5222d;
}

.tag-info {
    background: #e6f7ff;
    color: #1890ff;
}

/* 弹窗样式 */
.modal {
    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: 2000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-content h2 {
    margin-bottom: 20px;
    color: #333;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.hint {
    margin-top: 15px;
    padding: 10px;
    background: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: 6px;
    font-size: 13px;
    color: #ad6800;
}

/* 网格布局 */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* 统计卡片 */
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #667eea;
    margin: 10px 0;
}

.stat-label {
    color: #888;
    font-size: 14px;
}

/* 进度条 */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin: 8px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* 搜索栏 */
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-bar input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
}

.search-bar select {
    padding: 10px 15px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    min-width: 120px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.pagination button {
    padding: 6px 12px;
    border: 1px solid #d9d9d9;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination button:hover,
.pagination button.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

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

    .header {
        padding: 0 15px;
    }

    .nav {
        display: none;
    }

    .main-container {
        padding: 15px;
    }
}

/* 动画 */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 15px;
}

/* 消息提示 */
.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    z-index: 3000;
    animation: toastSlideIn 0.3s ease;
    max-width: 300px;
}

.toast-success {
    background: #52c41a;
}

.toast-error {
    background: #ff4d4f;
}

.toast-info {
    background: #1890ff;
}

.toast-warning {
    background: #faad14;
}

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