/**
 * 分组中心 - 极简纯文字列表
 */

/* 主容器 */
.group-management-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 32px;
}

/* 页面头部 */
.page-header {
    margin-bottom: 24px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title-section {
    flex: 1;
}

.page-title {
    font-size: 32px;
    font-weight: 600;
    color: white;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-subtitle {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    margin: 8px 0 0 0;
}

.btn-create-group-large {
    background: white;
    color: #667eea;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-create-group-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* 隐藏统计卡片和工具栏 */
.stats-container,
.toolbar-modern {
    display: none !important;
}

/* 分组列表容器 */
.group-list-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.group-cards {
    display: flex;
    flex-direction: column;
}

/* 加载状态 */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: #6b7280;
    font-size: 14px;
}

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

.loading-icon circle {
    stroke: #e0e0e0 !important;
}

.loading-icon path {
    stroke: #667eea !important;
}

/* 空状态 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: #9ca3af;
}

.empty-state svg {
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state p {
    font-size: 14px;
    margin-bottom: 20px;
    color: #6b7280;
}

/* 分组卡片 - 纯文字列表 */
.group-card {
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.15s;
    cursor: pointer;
}

.group-card:last-child {
    border-bottom: none;
}

.group-card:hover {
    background: #f9fafb;
}

/* 左侧内容 */
.group-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    margin: 0;
}

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

.group-icon {
    font-size: 20px;
}

.group-card-body {
    flex: 1;
    margin: 0;
}

.group-name {
    font-size: 16px;
    font-weight: 500;
    color: #1f2937;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.group-description {
    font-size: 13px;
    color: #9ca3af;
    margin: 0;
    line-height: 1.4;
}

/* 窗口数量和日期 */
.group-card-footer {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 0;
    border: none;
    margin: 0;
}

.group-count {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    color: #667eea !important;
    font-weight: 600;
    min-width: 60px;
}

.group-count * {
    color: #667eea !important;
}

.group-count svg {
    width: 18px;
    height: 18px;
    opacity: 0.8;
}

.group-date {
    font-size: 13px;
    color: #9ca3af;
    min-width: 100px;
    text-align: right;
}

/* 操作按钮 */
.group-actions {
    display: flex;
    gap: 8px;
    margin-left: 20px;
}

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

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

.group-action-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

.group-action-btn.delete {
    color: #ef4444;
}

.group-action-btn.delete:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* 模态框 */
.group-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.group-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2);
}

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

.modal-header h3 {
    font-size: 17px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.modal-close {
    width: 28px;
    height: 28px;
    border: none;
    background: #f3f4f6;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #e5e7eb;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 12px 20px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

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

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

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

.form-input,
.form-textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1.5px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    color: #1f2937;
    transition: all 0.2s;
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

.char-count {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
    text-align: right;
}

/* 按钮 */
.btn-secondary,
.btn-primary,
.btn-danger {
    padding: 9px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-secondary {
    background: #f3f4f6;
    color: #6b7280;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

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

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

/* 响应式 */
@media (max-width: 768px) {
    .group-management-page {
        padding: 20px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .btn-create-group-large {
        width: 100%;
        justify-content: center;
    }
    
    .group-card {
        flex-wrap: wrap;
        padding: 16px 20px;
    }
    
    .group-card-header {
        flex: 1 1 100%;
    }
    
    .group-card-footer {
        flex: 1 1 100%;
        margin-top: 8px;
        justify-content: space-between;
    }
    
    .group-actions {
        margin-left: 0;
    }
}
