* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: #f5f5f5;
}

/* 登录页面 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #666;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-login {
    width: 100%;
    padding: 1rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-login:hover {
    background: #5568d3;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.login-footer a {
    color: #667eea;
    text-decoration: none;
}

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

.sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h2 {
    font-size: 1.3rem;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.5rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.nav-item span {
    font-size: 1.2rem;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.logout-btn {
    display: block;
    text-align: center;
    padding: 0.8rem;
    background: rgba(231, 76, 60, 0.8);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: #e74c3c;
}

/* 主内容区 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.admin-header {
    background: white;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    color: #2c3e50;
}

.user-info {
    color: #666;
}

.content-area {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-info h3 {
    color: #666;
    font-size: 0.9rem;
    font-weight: normal;
    margin-bottom: 0.3rem;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c3e50;
}

/* 面板 */
.panel {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.panel-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h2 {
    color: #2c3e50;
}

.view-all {
    color: #667eea;
    text-decoration: none;
}

.btn-add {
    padding: 0.5rem 1rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* 数据表格 */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 1rem 1.5rem;
    text-align: left;
}

.data-table th {
    background: #f8f9fa;
    color: #666;
    font-weight: 500;
}

.data-table tbody tr {
    border-bottom: 1px solid #eee;
}

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

.badge {
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.85rem;
}

.badge-pending {
    background: #fff3cd;
    color: #856404;
}

.badge-processing {
    background: #cfe2ff;
    color: #084298;
}

.badge-completed {
    background: #d1e7dd;
    color: #0f5132;
}

/* 产品列表 */
.product-list {
    padding: 1.5rem;
}

.product-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.product-icon-small {
    font-size: 2rem;
}

.product-details {
    flex: 1;
}

.product-details h3 {
    color: #2c3e50;
    margin-bottom: 0.3rem;
}

.product-details p {
    color: #666;
    font-size: 0.9rem;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-edit,
.btn-delete {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

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

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

/* 响应式 */
@media (max-width: 768px) {
    .admin-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: #2c3e50;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #000;
}

.modal-content form {
    padding: 2rem;
}

.modal-content .form-group {
    margin-bottom: 1.5rem;
}

.modal-content .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.modal-content .form-group input[type="text"],
.modal-content .form-group input[type="email"],
.modal-content .form-group input[type="tel"],
.modal-content .form-group select,
.modal-content .form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.modal-content .form-group input[type="checkbox"] {
    margin-right: 0.5rem;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.btn-secondary {
    padding: 0.8rem 1.5rem;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* 内容区域切换 */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

/* 案例卡片 */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.case-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #eee;
    position: relative;
}

.case-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.case-card p {
    color: #666;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.case-card .badge {
    margin-top: 1rem;
    display: inline-block;
}

.case-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

/* 客户评价卡片 */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.testimonial-card-admin {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #eee;
    position: relative;
}

.testimonial-card-admin .testimonial-text {
    color: #555;
    font-style: italic;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.testimonial-card-admin .badge {
    margin-top: 1rem;
    display: inline-block;
}

.testimonial-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

/* 设置表单 */
.settings-form {
    max-width: 600px;
    padding: 2rem;
}

.settings-form .form-group {
    margin-bottom: 1.5rem;
}

.settings-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.settings-form input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.settings-form .btn-primary {
    margin-top: 1rem;
}
