/* 宾客管理页面特定样式 */

/* Tab导航样式 */
.tab-container {
    display: flex;
    background-color: #f5f5f5;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 24px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tab-btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    background-color: transparent;
    color: #666;
    font-size: 16px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    outline: none;
}

.tab-btn:hover {
    background-color: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.tab-btn.active {
    background-color: white;
    color: #4CAF50;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 3px;
    background-color: #4CAF50;
    border-radius: 3px 3px 0 0;
}

/* Tab内容区域 */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

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

/* 淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 搜索和添加区域 */
.search-add {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.search-container {
    display: flex;
    flex: 1;
    min-width: 250px;
}

.search-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    border-color: #4CAF50;
}

.search-btn {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background-color: #45a049;
}

.add-btn {
    padding: 10px 20px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.add-btn:hover {
    background-color: #0b7dda;
}

/* 筛选条件 */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

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

.filter-item label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s ease;
}

.filter-select:focus {
    border-color: #4CAF50;
}

/* 卡片容器 */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* 宾客卡片 */
.user-card {
    background-color: white;
    border: none;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
}

.user-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4CAF50 0%, #8BC34A 100%);
}

.user-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: rgba(76, 175, 80, 0.3);
}

.user-card h3 {
    margin-top: 0;
    margin-bottom: 16px;
    color: #2d3748;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-card h3::before {
    content: '👤';
    font-size: 16px;
}

.user-card p {
    margin: 12px 0;
    color: #4a5568;
    font-size: 15px;
    line-height: 1.5;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.user-card p:last-of-type {
    border-bottom: none;
}

.user-card p strong {
    color: #2d3748;
    font-weight: 600;
    min-width: 60px;
    display: inline-block;
}

/* 卡片操作按钮 */
.card-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.card-actions .btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.card-actions .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
    z-index: -1;
}

.card-actions .btn:hover::before {
    left: 100%;
}

.edit-guest-btn {
    background-color: #2196F3;
    color: white;
    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.3);
}

.edit-guest-btn:hover {
    background-color: #0b7dda;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.delete-guest-btn {
    background-color: #f44336;
    color: white;
    box-shadow: 0 2px 6px rgba(244, 67, 54, 0.3);
}

.delete-guest-btn:hover {
    background-color: #da190b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}

/* 关系管理卡片编辑按钮样式 */
.edit-guest-relation-btn {
    background-color: #2196F3;
    color: white;
    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.3);
}

.edit-guest-relation-btn:hover {
    background-color: #0b7dda;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

/* 随礼事由卡片编辑按钮样式 */
.edit-gift-reason-btn {
    background-color: #2196F3;
    color: white;
    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.3);
}

.edit-gift-reason-btn:hover {
    background-color: #0b7dda;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

/* 宾客关系卡片特殊样式 */
.user-card.relation-card {
    border-left: 4px solid #9c27b0;
}

.user-card.relation-card::before {
    background: linear-gradient(90deg, #9c27b0 0%, #673ab7 100%);
}

.user-card.relation-card h3::before {
    content: '👥';
}

/* 为卡片添加动态效果 */
@keyframes pulse-border {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

.user-card:hover {
    animation: pulse-border 1.5s infinite;
}

.placeholder-text {
    color: #999;
    font-size: 13px;
}

/* 分页控件 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.pagination-control {
    display: flex;
    align-items: center;
}

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

.pagination-btn:hover:not(:disabled) {
    background-color: #f5f5f5;
    border-color: #4CAF50;
}

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

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

/* 空数据状态 */
.no-data {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 16px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

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

.modal-active {
    display: flex;
}

.modal-content {
    background-color: white;
    margin: 20px;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.close-btn:hover {
    background-color: #f5f5f5;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    background-color: #f9f9f9;
    border-radius: 0 0 8px 8px;
}

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

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

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

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

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

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

.btn-primary:hover {
    background-color: #45a049;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

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

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

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

.btn-back {
    background-color: #6c757d;
    color: white;
}

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

/* 错误消息 */
.error-message {
    color: #f44336;
    font-size: 13px;
    margin-top: 5px;
    min-height: 18px;
}

/* 高亮文本 */
.highlight {
    color: #f44336;
    font-weight: bold;
}

.warning-note {
    color: #ff9800;
    font-size: 12px;
    margin-top: 8px;
    display: block;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .search-add {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-container {
        width: 100%;
    }
    
    .cards-container {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 10px;
        width: calc(100% - 20px);
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-item {
        justify-content: space-between;
    }
}