/* 主样式文件 - 后台管理系统 */

/* 基础样式已在index.html中内联定义，这里提供备用样式 */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 确保基础组件正常显示 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 10px;
    margin-bottom: 10px;
    display: inline-block;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #1e7e34;
}

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

.btn-danger:hover {
    background: #bd2130;
}

/* 表单样式 */
.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 10px;
}

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

/* 消息样式 */
.success-message, .error-message {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    display: none;
}

.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 99999;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 8px;
    min-width: 400px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-body {
    padding: 20px;
}

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

.modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

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

/* 确保页面内容区域正常显示 */
.content-section {
    display: none;
}

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

/* 选项卡样式 - 现代化设计 */
.tab-container {
    display: flex;
    gap: 4px;
    margin-bottom: 28px;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 4px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
}

.tab-btn {
    background: transparent;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: #64748b;
    font-weight: 600;
    font-size: 14px;
    position: relative;
    flex: 1;
    text-align: center;
}

.tab-btn:hover {
    background: rgba(255,255,255,0.8);
    color: #334155;
}

.tab-btn.active {
    background: white;
    color: #1e293b;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
}

/* 待认证状态特殊样式 */
.tab-btn.active[onclick*="pending"] {
    color: #d97706;
    box-shadow: 0 1px 3px rgba(217, 119, 6, 0.2), inset 0 -2px 0 #f59e0b;
}

/* 已认证状态特殊样式 */
.tab-btn.active[onclick*="verified"] {
    color: #059669;
    box-shadow: 0 1px 3px rgba(5, 150, 105, 0.2), inset 0 -2px 0 #10b981;
}

/* 已拒绝状态特殊样式 */
.tab-btn.active[onclick*="rejected"] {
    color: #dc2626;
    box-shadow: 0 1px 3px rgba(220, 38, 38, 0.2), inset 0 -2px 0 #ef4444;
}

/* 业主认证详情样式 */
.owner-auth-details {
    max-height: 400px;
    overflow-y: auto;
}

.detail-group {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
}

.detail-group h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.detail-group p {
    margin: 5px 0;
    color: #666;
}

.auth-documents {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.document-item {
    text-align: center;
}

.document-item img {
    border: 2px solid #dee2e6;
    border-radius: 5px;
    cursor: pointer;
}

.document-item img:hover {
    border-color: #007bff;
}

/* 业主认证页面 - 全新设计 */
.owner-auth-section {
    background: #f5f7fa;
    min-height: 100vh;
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.owner-auth-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 32px;
    border-radius: 20px;
    margin-bottom: 32px;
    box-shadow: 0 20px 40px rgba(79, 70, 229, 0.15);
    position: relative;
    overflow: hidden;
}

.owner-auth-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transform: translate(50px, -50px);
}

.owner-auth-header h2 {
    margin: 0 0 12px 0;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
    position: relative;
}

.owner-auth-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
    font-weight: 400;
    position: relative;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    padding: 28px 24px;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.stat-card.pending::before {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.stat-card.verified::before {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.stat-card.rejected::before {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.stat-number {
    font-size: 40px;
    font-weight: 800;
    margin: 12px 0 8px 0;
    color: #1f2937;
    line-height: 1;
}

.stat-label {
    color: #6b7280;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.community-management-section {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    margin-bottom: 25px;
    overflow: hidden;
}

.section-header-enhanced {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header-enhanced h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.add-community-btn {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.add-community-btn:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-2px);
}

.search-bar-enhanced {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.search-bar-enhanced input,
.search-bar-enhanced select {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.search-bar-enhanced input:focus,
.search-bar-enhanced select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.search-btn-enhanced {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.search-btn-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,123,255,0.3);
}

.auth-table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.auth-table-header {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
    padding: 20px 25px;
}

.auth-table-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

/* 数据导出功能样式 */
.export-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.export-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
}

.export-btn {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.export-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 24px rgba(17,153,142,0.4);
}

/* 业主认证表格样式 - 现代化设计 */
.auth-table {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    margin-top: 24px;
    border: 1px solid rgba(0,0,0,0.04);
}

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

.auth-table thead {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.auth-table th {
    padding: 20px 16px;
    text-align: left;
    font-weight: 700;
    font-size: 13px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    position: relative;
}

.auth-table th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
}

.auth-table td {
    padding: 18px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    vertical-align: middle;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
}

.auth-table tbody tr {
    transition: all 0.2s ease;
}

.auth-table tbody tr:hover {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.02) 0%, rgba(124, 58, 237, 0.01) 100%);
    transform: translateX(2px);
}

.auth-table tbody tr:last-child td {
    border-bottom: none;
}

/* 状态标签样式 */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 80px;
    justify-content: center;
    transition: all 0.2s ease;
}

.status-badge.pending {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

.status-badge.verified {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.status-badge.rejected {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.status-badge:hover {
    transform: translateY(-1px) scale(1.05);
}

/* 操作按钮样式 */
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    margin-right: 6px;
}

.action-btn.view {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.action-btn.approve {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.action-btn.reject {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.action-btn.edit {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* 弹窗样式重新设计 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: modalFadeIn 0.3s ease forwards;
}

@keyframes modalFadeIn {
    to { opacity: 1; }
}

.modal-content {
    background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.95) 100%);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    min-width: 500px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 24px 32px;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.modal-body {
    padding: 32px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 24px 32px;
    border-top: 1px solid rgba(0,0,0,0.05);
    background: rgba(248,250,252,0.5);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* 小区管理卡片样式 */
.community-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.95) 100%);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    border: 1px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.community-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4f46e5, #7c3aed, #06b6d4);
}

.community-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.12);
}

.community-card h4 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.community-card h4::before {
    content: '🏘️';
    font-size: 18px;
}

/* 礼包配置样式 */
.gift-package-config {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(5, 150, 105, 0.03) 100%);
    border: 2px solid rgba(16, 185, 129, 0.1);
    border-radius: 16px;
    padding: 24px;
    margin-top: 20px;
    position: relative;
}

.gift-package-config::before {
    content: '🎁';
    position: absolute;
    top: -12px;
    left: 24px;
    background: linear-gradient(135deg, #10b981, #059669);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.gift-package-config h5 {
    margin: 0 0 16px 0;
    color: #065f46;
    font-weight: 700;
    font-size: 16px;
}

/* 分页容器样式 */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 15px 0;
    border-top: 1px solid #f0f0f0;
}

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

.pagination {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pagination button {
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    background: white;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.pagination button:hover:not(:disabled) {
    border-color: #0077be;
    color: #0077be;
}

.pagination button.active {
    background: linear-gradient(135deg, #0077be, #0081cf);
    border-color: #0077be;
    color: white;
}

.pagination button:disabled {
    background: #f5f5f5;
    color: #ccc;
    cursor: not-allowed;
}

/* 响应式设计优化 */
@media (max-width: 768px) {
    .owner-auth-section {
        padding: 16px;
    }
    
    .owner-auth-header {
        padding: 24px 20px;
        text-align: center;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .auth-table {
        font-size: 12px;
    }
    
    .auth-table th,
    .auth-table td {
        padding: 12px 8px;
    }
    
    .modal-content {
        min-width: 95vw;
        margin: 10px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .pagination-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .pagination {
        justify-content: center;
    }
}

/* VIP管理样式 */
.stats-row {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.stat-card {
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    min-width: 150px;
    flex: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.9em;
    color: #666;
    font-weight: 500;
}

.status-text {
    font-weight: 500;
    color: #666;
}

.flex-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* VIP统计卡片特殊样式 */
.stat-card:nth-child(1) .stat-number {
    color: #28a745; /* 活跃VIP - 绿色 */
}

.stat-card:nth-child(2) .stat-number {
    color: #ffc107; /* 即将过期 - 黄色 */
}

.stat-card:nth-child(3) .stat-number {
    color: #dc3545; /* 已过期 - 红色 */
}

.stat-card:nth-child(4) .stat-number {
    color: #6c757d; /* 非VIP - 灰色 */
}

@media (max-width: 768px) {
    .stats-row {
        flex-direction: column;
    }

    .stat-card {
        min-width: unset;
    }
}