/* 分组管理页面专用样式 */

.group-management-page {
    background: #f5f7fa;
}

/* 工具栏 */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: white;
    margin-bottom: 0;
    border-bottom: 1px solid #e4e7ed;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-create-group {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-create-group:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-create-group .btn-svg {
    width: 18px;
    height: 18px;
}

.toolbar-stats {
    color: #606266;
    font-size: 13px;
    padding: 0 8px;
}

/* 搜索框 */
.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    background: white;
    transition: all 0.3s;
}

.search-box:focus-within {
    border-color: #409eff;
    box-shadow: 0 0 0 3px rgba(64, 158, 255, 0.1);
}

.search-icon {
    width: 16px;
    height: 16px;
    color: #909399;
}

.search-input {
    border: none;
    outline: none;
    font-size: 13px;
    width: 200px;
    background: transparent;
}

.search-input::placeholder {
    color: #c0c4cc;
}

/* 分组列表容器 */
.group-list-container {
    padding: 20px;
}

.group-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* 加载状态 */
.loading-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #909399;
}

.loading-icon {
    margin-bottom: 12px;
}

/* 空状态 */
.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #909399;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-text {
    font-size: 14px;
    margin-bottom: 20px;
}

.btn-create-first {
    background: #409eff;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-create-first:hover {
    background: #66b1ff;
    transform: translateY(-2px);
}

/* 分组卡片 */
.group-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
}

.group-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    border-color: #409eff;
}

.group-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.group-card-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.group-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.group-name {
    font-size: 16px;
    font-weight: 600;
    color: #303133;
}

.group-card-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s;
}

.group-card:hover .group-card-actions {
    opacity: 1;
}

.btn-group-action {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f7fa;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    color: #606266;
}

.btn-group-action svg {
    width: 16px;
    height: 16px;
}

.btn-group-action:hover {
    background: #ecf5ff;
    color: #409eff;
}

.btn-group-action.danger:hover {
    background: #fef0f0;
    color: #f56c6c;
}

.group-card-body {
    margin-bottom: 16px;
}

.group-stats {
    display: flex;
    gap: 20px;
    padding: 12px;
    background: #f5f7fa;
    border-radius: 8px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 12px;
    color: #909399;
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
    color: #409eff;
}

.group-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.group-time {
    font-size: 12px;
    color: #c0c4cc;
}

/* 弹窗样式 */
.group-modal,
.confirm-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.group-modal.show,
.confirm-modal.show {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    position: relative;
    z-index: 2;
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease-out;
}

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

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

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #303133;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    color: #909399;
    transition: all 0.2s;
    padding: 0;
}

.modal-close:hover {
    background: #f5f7fa;
    color: #303133;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 16px 24px;
    border-top: none;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-cancel,
.btn-confirm,
.btn-danger {
    padding: 9px 28px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 400;
}

.btn-cancel {
    background: transparent;
    color: #909399;
    border: none;
}

.btn-cancel:hover {
    background: #f5f7fa;
    color: #606266;
}

.btn-confirm {
    background: #409eff;
    color: white;
}

.btn-confirm:hover {
    background: #66b1ff;
}

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

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

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

.form-label {
    display: block;
    font-size: 13px;
    color: #909399;
    margin-bottom: 6px;
    font-weight: 400;
}

.required {
    color: #f56c6c;
    margin-right: 4px;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 8px 0;
    border: none;
    border-bottom: 1px solid #dcdfe6;
    border-radius: 0;
    font-size: 14px;
    color: #606266;
    transition: all 0.3s;
    box-sizing: border-box;
    font-family: inherit;
    background: transparent;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-bottom-color: #409eff;
    box-shadow: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #c0c4cc;
}

.form-textarea {
    resize: vertical;
}

.char-count {
    text-align: right;
    font-size: 11px;
    color: #c0c4cc;
    margin-top: 4px;
}

.char-count span {
    color: #606266;
}

/* 确认删除弹窗 */
.confirm-modal .modal-content {
    max-width: 400px;
}

.confirm-modal .modal-header {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    border-bottom: none;
}

.warning-icon {
    margin: 0 auto;
}

.confirm-modal .modal-body {
    text-align: center;
    padding: 16px 24px 24px;
}

.confirm-modal .modal-body p {
    margin: 0;
    font-size: 14px;
    color: #606266;
    line-height: 1.6;
}

/* Toast 提示样式 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 280px;
    padding: 16px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.hiding {
    animation: slideOutRight 0.3s ease-out forwards;
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.toast-success {
    border-left: 4px solid #67c23a;
}

.toast-success .toast-icon {
    color: #67c23a;
}

.toast-error {
    border-left: 4px solid #f56c6c;
}

.toast-error .toast-icon {
    color: #f56c6c;
}

.toast-warning {
    border-left: 4px solid #e6a23c;
}

.toast-warning .toast-icon {
    color: #e6a23c;
}

.toast-info {
    border-left: 4px solid #409eff;
}

.toast-info .toast-icon {
    color: #409eff;
}

.toast-message {
    flex: 1;
    color: #606266;
    font-size: 14px;
    line-height: 1.5;
}

/* 响应式 */
@media (max-width: 768px) {
    .group-cards {
        grid-template-columns: 1fr;
    }
    
    .toolbar {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .toolbar-left,
    .toolbar-right {
        justify-content: space-between;
    }
    
    .search-input {
        width: 100%;
    }
    
    .toast-container {
        left: 10px;
        right: 10px;
        top: 10px;
    }
    
    .toast {
        min-width: auto;
        width: 100%;
    }
}

