/* 管理后台全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* 管理后台布局 */
.admin-container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: 260px;
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    padding: 0 20px 30px;
    border-bottom: 1px solid #34495e;
    margin-bottom: 20px;
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

.logo h2 {
    font-size: 20px;
    color: #4a6cf7;
}

.nav-menu {
    list-style: none;
}

.nav-menu li {
    margin-bottom: 5px;
}

.nav-menu a {
    display: block;
    padding: 15px 20px;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 16px;
}

.nav-menu a:hover {
    background-color: #34495e;
    color: #fff;
}

.nav-menu li.active a {
    background-color: #4a6cf7;
    color: #fff;
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 20px;
}

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

.header h1 {
    font-size: 28px;
    color: #2c3e50;
}

.user-info {
    font-size: 16px;
    color: #666;
}

.user-info span {
    font-weight: bold;
    color: #4a6cf7;
}

/* 内容区域 */
.content {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 14px;
}

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

.btn-primary:hover {
    background-color: #3a5bd9;
}

.btn-outline {
    background-color: transparent;
    color: #4a6cf7;
    border: 2px solid #4a6cf7;
}

.btn-outline:hover {
    background-color: #4a6cf7;
    color: white;
}

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

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-success {
    background-color: #2ecc71;
    color: white;
}

.btn-success:hover {
    background-color: #27ae60;
}

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

.btn-warning:hover {
    background-color: #e67e22;
}

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

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background-color: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e0e6ed;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid #e0e6ed;
}

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

/* 操作按钮 */
.action-btn {
    padding: 5px 10px;
    margin-right: 5px;
    font-size: 12px;
    border-radius: 3px;
}

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

.pagination button {
    padding: 8px 15px;
    border: 1px solid #ddd;
    background-color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination button:hover:not(:disabled) {
    background-color: #f8f9fa;
}

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

#page-info {
    color: #666;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4a6cf7;
}

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

.form-group .help-text {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

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

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.modal-content h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #2c3e50;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e6ed;
}

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

/* 页面操作区 */
.page-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

/* 筛选区 */
.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: center;
}

.filters select,
.filters input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.filters select {
    min-width: 150px;
}

.filters input {
    min-width: 200px;
}

/* 仪表盘样式 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background-color: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    font-size: 48px;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background-color: #f0f4ff;
    color: #4a6cf7;
}

.stat-info h3 {
    font-size: 16px;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #2c3e50;
}

.dashboard-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
}

.section {
    background-color: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.section h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #2c3e50;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e6ed;
}

/* 设置页面样式 */
.settings-tabs {
    margin-bottom: 30px;
}

.tabs-header {
    display: flex;
    border-bottom: 1px solid #e0e6ed;
    margin-bottom: 30px;
}

.tab-btn {
    padding: 12px 25px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.tab-btn.active {
    color: #4a6cf7;
    border-bottom-color: #4a6cf7;
}

.tab-btn:hover {
    color: #4a6cf7;
}

.tabs-content {
    padding: 20px 0;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.tab-pane h2 {
    font-size: 24px;
    margin-bottom: 30px;
    color: #2c3e50;
}

/* 二维码上传 */
.qr-upload {
    display: flex;
    align-items: center;
    gap: 20px;
}

.qr-upload img {
    width: 150px;
    height: 150px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.qr-upload input[type="file"] {
    display: none;
}

/* 管理员列表 */
.admin-list {
    margin-bottom: 40px;
}

.admin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
}

.admin-info h3 {
    font-size: 18px;
    margin-bottom: 5px;
    color: #2c3e50;
}

.admin-info p {
    color: #666;
    font-size: 14px;
}

.add-admin {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
}

.add-admin h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #2c3e50;
}

/* 管理员登录页 */
.admin-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
}

.login-container {
    background-color: white;
    border-radius: 10px;
    width: 100%;
    max-width: 400px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

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

.login-header img {
    height: 60px;
    margin-bottom: 15px;
}

.login-header h1 {
    font-size: 24px;
    color: #2c3e50;
}

.login-form h2 {
    font-size: 22px;
    margin-bottom: 25px;
    color: #2c3e50;
    text-align: center;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .dashboard-sections {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .page-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filters select,
    .filters input {
        width: 100%;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }

    .tabs-header {
        flex-wrap: wrap;
    }

    .qr-upload {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 576px) {
    .content {
        padding: 20px 15px;
    }

    .table-container {
        margin: 0 -15px;
    }

    .data-table {
        font-size: 14px;
    }

    .data-table th,
    .data-table td {
        padding: 10px;
    }

    .action-btn {
        padding: 3px 6px;
        font-size: 11px;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .stat-icon {
        width: 60px;
        height: 60px;
        font-size: 36px;
    }

    .stat-value {
        font-size: 24px;
    }
}