/* 管理员后台统一样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
}
.header {
    background: #4a90e2;
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.header h1 {
    font-size: 20px;
    font-weight: bold;
}
.header .user-info {
    display: flex;
    align-items: center;
}
.header .user-info span {
    margin-right: 15px;
}
.header .user-info a {
    color: #fff;
    text-decoration: none;
    padding: 5px 10px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    transition: background 0.3s;
}
.header .user-info a:hover {
    background: rgba(255,255,255,0.3);
}
.container {
    display: flex;
    min-height: calc(100vh - 60px);
}
.sidebar {
    width: 200px;
    background: #333;
    color: #fff;
}
.nav-menu {
    list-style: none;
}
.nav-menu li {
    border-bottom: 1px solid #444;
}
.nav-menu a {
    display: block;
    padding: 15px 20px;
    color: #fff;
    text-decoration: none;
    transition: background 0.3s;
}
.nav-menu a:hover {
    background: #4a90e2;
}
.nav-menu a.active {
    background: #4a90e2;
    border-left: 4px solid #fff;
}
.main-content {
    flex: 1;
    padding: 20px;
}
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}
.card h3 {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}
.card .value {
    font-size: 28px;
    font-weight: bold;
    color: #4a90e2;
}
.card .desc {
    color: #999;
    font-size: 12px;
    margin-top: 5px;
}
.section {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}
.section h2 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}
.table {
    width: 100%;
    border-collapse: collapse;
}
.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}
.table th {
    background: #f5f7fa;
    font-weight: bold;
    color: #666;
}
.table tr:hover {
    background: #f5f7fa;
}
.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
}
.status-pending {
    background: #ffc107;
    color: #fff;
}
.status-processing {
    background: #17a2b8;
    color: #fff;
}
.status-completed {
    background: #28a745;
    color: #fff;
}
/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-decoration: none;
}
.btn-primary {
    color: #fff;
    background-color: #4a90e2;
    border-color: #4a90e2;
}
.btn-primary:hover {
    background-color: #357abd;
    border-color: #357abd;
}
.btn-success {
    color: #fff;
    background-color: #5cb85c;
    border-color: #5cb85c;
}
.btn-success:hover {
    background-color: #449d44;
    border-color: #449d44;
}
.btn-danger {
    color: #fff;
    background-color: #d9534f;
    border-color: #d9534f;
}
.btn-danger:hover {
    background-color: #c9302c;
    border-color: #c9302c;
}
.btn-secondary {
    color: #333;
    background-color: #f8f9fa;
    border-color: #ddd;
}
.btn-secondary:hover {
    background-color: #e9ecef;
    border-color: #ccc;
}
/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}
.form-control {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #555;
    background-color: #fff;
    background-image: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}
.form-control:focus {
    border-color: #4a90e2;
    outline: 0;
    box-shadow: inset 0 1px 1px rgba(0,0,0,0.075), 0 0 8px rgba(74,144,226,0.6);
}
/* 搜索栏样式 */
.search-bar {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}
.search-bar form {
    display: flex;
    gap: 10px;
    align-items: center;
}
.search-bar input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.search-bar button {
    padding: 8px 16px;
}
/* 状态消息样式 */
.status-message {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}
.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
/* 分页样式 */
.pagination {
    display: inline-block;
    padding-left: 0;
    margin: 20px 0;
    border-radius: 4px;
}
.pagination a {
    display: inline-block;
    padding: 6px 12px;
    margin-right: 5px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #4a90e2;
    text-decoration: none;
    transition: all 0.3s ease;
}
.pagination a:hover {
    background-color: #f5f5f5;
    border-color: #ddd;
}
.pagination a.active {
    background-color: #4a90e2;
    border-color: #4a90e2;
    color: #fff;
}
/* 会员状态样式 */
.member-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}
.status-active {
    background-color: #d4edda;
    color: #155724;
}
.status-disabled {
    background-color: #f8d7da;
    color: #721c24;
}
/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
    }
    .nav-menu {
        display: flex;
        overflow-x: auto;
    }
    .nav-menu li {
        border-bottom: none;
        border-right: 1px solid #444;
    }
    .nav-menu a {
        white-space: nowrap;
    }
    .search-bar form {
        flex-direction: column;
        align-items: stretch;
    }
    .search-bar input,
    .search-bar button {
        width: 100%;
    }
    .table {
        font-size: 13px;
    }
    .table th,
    .table td {
        padding: 8px;
    }
}
