/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* 登录页面样式 */
.login-container {
    max-width: 480px;
    margin: 80px auto;
    padding: 40px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-top: 4px solid #4CAF50;
}

.login-container:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.login-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 24px;
    font-weight: 600;
    position: relative;
}

.login-container h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #4CAF50;
    margin: 10px auto 0;
    border-radius: 2px;
}

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

.login-container .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

.login-container .form-group input,
.login-container .form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: #f9f9f9;
}

.login-container .form-group input:focus,
.login-container .form-group select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.1);
    background-color: white;
}

.login-container .btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.login-container .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.login-container .error-message,
.login-container .success-message {
    margin-bottom: 20px;
    padding: 12px 16px;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
}

.login-container .error-message {
    background-color: #fef2f2;
    color: #dc2626;
    border-left: 4px solid #dc2626;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.1);
}

.login-container .success-message {
    background-color: #f0fdf4;
    color: #15803d;
    border-left: 4px solid #15803d;
    box-shadow: 0 2px 8px rgba(21, 128, 61, 0.1);
}

/* 响应式登录页面 */
@media (max-width: 768px) {
    .login-container {
        max-width: 90%;
        margin: 40px auto;
        padding: 30px 20px;
    }
    
    .login-container h2 {
        font-size: 20px;
    }
    
    .login-container .form-group input,
    .login-container .form-group select {
        padding: 12px 14px;
    }
    
    .login-container .btn {
        padding: 12px;
    }
}

/* 头部样式 */
.header {
    background-color: #2c3e50;
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: 80px;
}

.header h1 {
    font-size: 20px;
    font-weight: 600;
}

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

.header .user-info .username {
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.header .user-info .username:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.header .user-info .password-btn {
    color: white;
    text-decoration: none;
    background-color: #95a5a6;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.header .user-info .password-btn:hover {
    background-color: #7f8c8d;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(149, 165, 166, 0.3);
}

.header .user-info .logout-btn {
    color: white;
    text-decoration: none;
    background-color: #4CAF50;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.header .user-info .logout-btn:hover {
    background-color: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

/* 容器布局 */
.container {
    display: flex;
    min-height: calc(100vh - 80px);
}

/* 侧边栏样式 */
.sidebar {
    width: 150px;
    background-color: #34495e;
    color: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    padding: 15px 20px;
    border-bottom: 1px solid #2c3e50;
    transition: all 0.3s ease;
}

.sidebar ul li:hover {
    background-color: #2c3e50;
    padding-left: 25px;
}

.sidebar ul li a {
    color: white;
    text-decoration: none;
    display: block;
    font-size: 14px;
    font-weight: 500;
}

.sidebar ul li.active {
    background-color: #4CAF50;
}

.sidebar ul li.active:hover {
    background-color: #45a049;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    background-color: #f5f7fa;
}

/* 表单容器 */
.form-container {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    transition: all 0.3s ease;
    border-top: 4px solid #4CAF50;
}

.form-container:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.form-container h2 {
    margin-bottom: 25px;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.form-container h2::before {
    content: '';
    display: inline-block;
    width: 2px;
    height: 20px;
    background-color: #4CAF50;
    margin-right: 10px;
    border-radius: 1px;
}

/* 表单行 */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

/* 表单组 */
.form-group {
    margin-bottom: 15px;
    flex: 1;
    min-width: 220px;
}

.form-group.half {
    flex: 1;
    min-width: 220px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: #f9f9f9;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
    background-color: white;
}

/* 按钮样式 */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
    min-width: 70px;
    text-align: center;
}

.btn-primary {
    background-color: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background-color: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-secondary {
    background-color: #3498db;
    color: white;
}

.btn-secondary:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

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

.btn-danger:hover {
    background-color: #c0392b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

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

.btn-info:hover {
    background-color: #138496;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

/* 操作按钮组 */
.action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* 区域样式 */
.section {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    transition: all 0.3s ease;
    overflow-x: auto;
}

.section:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.section h2 {
    margin-bottom: 25px;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.section h2::before {
    content: '';
    display: inline-block;
    width: 2px;
    height: 20px;
    background-color: #3498db;
    margin-right: 10px;
    border-radius: 1px;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

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

th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

 tr:hover {
    background-color: #f8f9fa;
}

 tr:last-child td {
    border-bottom: none;
}

/* 仪表盘卡片 */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 25px;
}

.card {
    background-color: white;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-top: 3px solid #4CAF50;
}

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

.card:nth-child(2) {
    border-top-color: #3498db;
}

.card:nth-child(3) {
    border-top-color: #e74c3c;
}

.card:nth-child(4) {
    border-top-color: #f39c12;
}

.card h3 {
    margin-bottom: 8px;
    color: #666;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card .value {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    line-height: 1.2;
}

.card:nth-child(1) .value {
    color: #4CAF50;
}

.card:nth-child(2) .value {
    color: #3498db;
}

.card:nth-child(3) .value {
    color: #e74c3c;
}

.card:nth-child(4) .value {
    color: #f39c12;
}

.card .label {
    color: #999;
    font-size: 10px;
}

/* 筛选容器 */
.filter-container {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    transition: all 0.3s ease;
    border-top: 4px solid #3498db;
}

.filter-container:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.filter-form {
    display: flex;
    gap: 15px;
    align-items: end;
    flex-wrap: wrap;
}

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

.stat-card {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-card h3 {
    margin-bottom: 10px;
    color: #666;
    font-size: 14px;
}

.stat-card .value {
    font-size: 24px;
    font-weight: bold;
    color: #4CAF50;
}

/* 消息提示 */
.error-message {
    background-color: #fef2f2;
    color: #dc2626;
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
    border-left: 4px solid #dc2626;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.1);
}

.success-message {
    background-color: #f0fdf4;
    color: #15803d;
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
    border-left: 4px solid #15803d;
    box-shadow: 0 2px 8px rgba(21, 128, 61, 0.1);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    z-index: 1000;
    backdrop-filter: blur(2px);
    transition: all 0.3s ease;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    width: 80%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border-top: 4px solid #4CAF50;
}

.modal-content.edit-modal {
    width: 50%;
    max-width: 500px;
}

@media (max-width: 768px) {
    .modal-content.edit-modal {
        width: 90%;
    }
}

.modal-content h3 {
    margin-bottom: 25px;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.modal-content h3::before {
    content: '';
    display: inline-block;
    width: 2px;
    height: 20px;
    background-color: #4CAF50;
    margin-right: 10px;
    border-radius: 1px;
}

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

/* 分页样式 */
.pagination {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.pagination-info {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    text-align: center;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: #f8f9fa;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.pagination-controls .btn {
    min-width: 100px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.pagination-controls .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.pagination-controls .btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.pagination-controls .page-info {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    min-width: 120px;
    text-align: center;
}

.page-size-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #666;
}

.page-size-selector select {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-size-selector select:hover {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        width: 130px;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
    
    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-group {
        min-width: auto;
    }
    
    .modal-content {
        width: 90%;
        margin: 10% auto;
        position: relative;
        top: 0;
        left: 0;
        transform: none;
    }
    
    /* 响应式分页 */
    .pagination {
        gap: 15px;
    }
    
    .pagination-controls {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
        width: 100%;
        max-width: 400px;
    }
    
    .pagination-controls .btn {
        min-width: 120px;
        width: 100%;
    }
    
    .pagination-controls .page-info {
        min-width: auto;
        width: 100%;
    }
    
    .page-size-selector {
        width: 100%;
        justify-content: center;
    }
    
    .page-size-selector select {
        width: 120px;
    }
}