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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #f5f5f5;
}

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

.login-box {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 30px;
    width: 100%;
    max-width: 400px;
}

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

.login-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-top: 15px;
}

.login-header p {
    color: #666;
    margin-top: 5px;
}

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

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.login-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.login-form input:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-primary {
    color: #fff;
    background-color: #1890ff;
    border-color: #1890ff;
}

.btn-primary:hover {
    background-color: #40a9ff;
    border-color: #40a9ff;
}

.btn-primary:disabled {
    background-color: #d9d9d9;
    border-color: #d9d9d9;
    cursor: not-allowed;
}

.btn-default {
    color: #333;
    background-color: #fff;
    border-color: #d9d9d9;
}

.btn-default:hover {
    color: #1890ff;
    border-color: #1890ff;
}

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

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

.btn-sm {
    padding: 4px 12px;
    font-size: 12px;
}

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

.sidebar {
    width: 240px;
    background: #001529;
    color: #fff;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #002140;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.logo-text {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    margin-left: 10px;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    display: block;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: all 0.3s ease;
}

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

.nav-item.active {
    color: #fff;
    background: #1890ff;
}

.nav-icon {
    margin-right: 10px;
    font-size: 16px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #002140;
    position: absolute;
    bottom: 0;
    width: 100%;
}

.logout-btn {
    display: block;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    padding: 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.main-content {
    margin-left: 240px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f0f2f5;
    min-height: 100vh;
}

/* 顶部栏 */
.top-header {
    background: #fff;
    padding: 0 20px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.header-left .page-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
}

.welcome-text {
    color: #666;
    margin-right: 20px;
}

/* 内容包装器 */
.content-wrapper {
    flex: 1;
    display: flex;
    margin: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

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

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

.stat-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.stat-info {
    margin-top: 10px;
}

.stat-number {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

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

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

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

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    font-size: 14px;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

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

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

.table th {
    background-color: #fafafa;
    font-weight: 600;
    color: #333;
}

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

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 20px;
    gap: 8px;
}

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

.pagination button:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.pagination button.active {
    background: #1890ff;
    color: #fff;
    border-color: #1890ff;
}

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

/* 模态框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

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

.modal-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.btn-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

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

.tag-success {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #52c41a;
}

.tag-warning {
    background: #fffbe6;
    border: 1px solid #ffe58f;
    color: #faad14;
}

.tag-danger {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #f5222d;
}

.tag-info {
    background: #e6f7ff;
    border: 1px solid #91d5ff;
    color: #1890ff;
}

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

.status-0 {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #f5222d;
}

.status-1 {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #52c41a;
}

/* 默认图片样式 */
.default-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 16px;
}

/* 默认图片样式（通用） */
.default-image {
    width: 100%;
    height: 100%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 24px;
    border-radius: 4px;
}

/* 地址有误图片样式 */
.address-error-image {
    width: 100%;
    height: 200px;
    background: #fff2f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f5222d;
    font-size: 32px;
    border-radius: 4px;
    border: 1px solid #ffccc7;
}

/* 图片预览样式 */
.image-preview {
    position: relative;
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 10px;
}

.image-preview img {
    max-width: 100px;
    max-height: 100px;
    border-radius: 4px;
}

.image-preview .image-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4d4f;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 详情页面样式 */
.detail-section {
    margin-bottom: 20px;
}

.detail-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

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

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-item label {
    font-size: 12px;
    color: #999;
    margin-bottom: 4px;
}

.detail-item span {
    font-size: 14px;
    color: #333;
}

.detail-content {
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    white-space: pre-wrap;
}

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

.search-bar .search-input {
    flex: 1;
    max-width: 300px;
}

/* 按钮组样式 */
.btn-group {
    display: flex;
    gap: 8px;
}

/* 数据表格样式 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.data-table th,
.data-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.data-table th {
    background-color: #fafafa;
    font-weight: 600;
    color: #333;
    font-size: 13px;
}

.data-table td {
    font-size: 13px;
    color: #333;
}

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

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

.empty-state span {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

/* 加载状态 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
    color: #666;
}

.loading::after {
    content: '';
    width: 24px;
    height: 24px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #1890ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 上传组件样式 */
.upload-component {
    margin: 8px 0;
}

.upload-button {
    display: inline-block;
    margin-bottom: 8px;
    padding: 8px 16px;
    font-size: 13px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #f8f9fa;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-button:hover {
    background-color: #e9ecef;
    border-color: #007bff;
}



.file-list {
    margin-top: 12px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    margin-bottom: 6px;
    background-color: #f9f9f9;
}

.file-preview {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    margin-right: 12px;
}

.file-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-info {
    flex: 1;
}

.file-name {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.file-size {
    font-size: 11px;
    color: #999;
}

.file-actions {
    margin-left: 12px;
}

.progress {
    margin: 8px 0;
    height: 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.upload-progress-bar {
    height: 100%;
    background-color: #28a745;
    transition: width 0.3s ease;
}

.error-message {
    margin: 8px 0;
    padding: 8px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    font-size: 13px;
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    border-radius: 4px;
    font-size: 14px;
    z-index: 9999;
    animation: slideIn 0.3s ease;
}

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

/* 按钮样式扩展 */
.btn-success {
    color: #fff;
    background-color: #52c41a;
    border-color: #52c41a;
}

.btn-success:hover {
    background-color: #73d13d;
    border-color: #73d13d;
}

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

.btn-info:hover {
    background-color: #40a9ff;
    border-color: #40a9ff;
}

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

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

/* 过滤选择器 */
.filter-select {
    padding: 8px 12px;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
}

/* 表单控件 */
.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.form-control:readonly {
    background: #f5f5f5;
    color: #999;
}

/* 必填标记 */
.required {
    color: #ff4d4f;
}

/* 设置区域 */
.settings-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;
}

.settings-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.settings-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

/* 复选框标签 */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
}

/* 卡片样式 */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

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

.card-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.card-body {
    padding: 20px;
}

/* 头部操作区 */
.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.header-actions .search-input {
    min-width: 200px;
}

/* 仪表盘图表区域 */
.dashboard-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

/* 页面内容样式 */
.page-content {
    padding: 20px;
    background: #f0f2f5;
    min-height: 100vh;
}

/* 状态样式扩展 */
.status-2 {
    background: #fffbe6;
    border: 1px solid #ffe58f;
    color: #faad14;
}

.status-3 {
    background: #f5f5f5;
    border: 1px solid #d9d9d9;
    color: #666;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        margin-left: 200px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
        gap: 16px;
    }
    
    .modal {
        margin: 20px;
        max-height: calc(100vh - 40px);
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 100%;
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .header-left .page-title {
        font-size: 16px;
    }
}