/**
 * 个人中心页面专属样式
 */

/* ==================== T型布局 ==================== */
.profile-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    flex: 1;
}

/* ==================== 左侧导航栏 ==================== */
.sidebar-nav {
    background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
    border-right: 1px solid #e2e8f0;
    padding: 24px 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 0 24px 24px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 16px;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* 限定在 sidebar-nav 内部的 nav-item，避免影响 header 导航 */
.sidebar-nav .nav-item {
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
}

.sidebar-nav .nav-item:hover {
    background: #e0e7ff;
    color: #3730a3;
}

.sidebar-nav .nav-item.active {
    background: #e0e7ff;
    color: #3730a3;
    border-left: 4px solid #3730a3;
}

.sidebar-nav .nav-item i {
    width: 20px;
    text-align: center;
}

/* ==================== 右侧主内容区 ==================== */
.main-content {
    padding: 32px;
    background: #f8fafc;
    overflow-y: auto;
}

/* ==================== 个人中心概况面板 ==================== */
.profile-overview-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* ==================== 简历式个人信息展示 ==================== */
.profile-resume {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.resume-avatar {
    flex-shrink: 0;
}

.avatar-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 40px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.resume-details {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.resume-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.resume-item label {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.resume-item .value {
    font-size: 16px;
    color: #1e293b;
    font-weight: 600;
    word-break: break-all;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.overview-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.overview-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* 占位功能灰显样式 */
.overview-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(50%);
}

.overview-item.disabled:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
    transform: none;
    box-shadow: none;
}

.overview-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.overview-content {
    flex: 1;
    min-width: 0;
}

.overview-label {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
    font-weight: 500;
}

.overview-value {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.overview-subtext {
    font-size: 12px;
    color: #94a3b8;
}

.overview-subtext a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s;
}

.overview-subtext a:hover {
    color: #2563eb;
}

/* 会员徽章 */
.member-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.member-free {
    background: #f1f5f9;
    color: #64748b;
}

.member-active {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.member-expired {
    background: #fee2e2;
    color: #dc2626;
}

.member-premium {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.member-vip {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* ==================== 内容卡片 ==================== */
.content-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header {
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left h2 {
    margin: 0;
}

.header-left p {
    margin: 4px 0 0;
}

.card-body {
    padding: 24px;
}

/* ==================== 表单样式 ==================== */
.profile-form {
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
}

.form-input {
    height: 48px;
    padding: 0 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    color: #1e293b;
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    background: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-input::placeholder {
    color: #94a3b8;
}

.form-select {
    height: 48px;
    padding: 0 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    color: #1e293b;
    transition: all 0.3s ease;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.form-select:focus {
    background: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* 输入框带按钮组 */
.input-with-btn {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-search {
    min-width: 90px;
    height: 48px;
    padding: 0 16px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    color: #3b82f6;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-search:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.form-actions {
    margin-top: 8px;
}

.btn-submit {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.35);
}

.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ==================== 按钮样式 ==================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.35);
}

.btn-action {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-download {
    background: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
}

.btn-download:hover {
    background: #dbeafe;
    border-color: #3b82f6;
}

.btn-edit {
    background: #ffffff;
    color: #2563eb;
    border-color: #b9d0f8;
}

.btn-edit:hover {
    background: #eff6ff;
    border-color: #3b82f6;
}

.btn-delete {
    background: #ffffff;
    color: #dc2626;
    border-color: #ffe2e2;
}

.btn-delete:hover {
    background: #fef2f2;
    border-color: #f87171;
}

/* ==================== 表格样式 ==================== */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background-color: #f8fafc;
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #1f2937;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
}

.data-table td {
    padding: 12px 16px;
    text-align: left;
    color: #4b5563;
    border-top: 1px solid #e2e8f0;
    vertical-align: middle;
    font-size: 14px;
}

.data-table tbody tr:hover {
    background-color: #f8fafc;
}

.text-center {
    text-align: center !important;
}

/* 状态徽章 */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-success {
    background: #e3f9ee;
    color: #0c6e41;
}

.status-pending {
    background: #ffefdf;
    color: #b45309;
}

.status-failed {
    background: #fee2e2;
    color: #dc2626;
}

.status-processing {
    background: #dbeafe;
    color: #1e40af;
}

.status-approved {
    background: #e3f9ee;
    color: #0c6e41;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state h3 {
    margin: 0 0 12px;
    font-size: 18px;
    color: #374151;
}

.empty-state p {
    margin: 0;
    font-size: 14px;
}

.table-footer-note {
    margin-top: 16px;
    padding: 12px;
    font-size: 13px;
    color: #6b7280;
    text-align: right;
}

/* ==================== 解决方案列表 ==================== */
.solution-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.solution-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.solution-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.solution-info {
    flex: 1;
    min-width: 0;
}

.solution-name {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.solution-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: #64748b;
}

.solution-tag {
    background: #eef2ff;
    color: #1e40af;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.update-time {
    color: #94a3b8;
}

.solution-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 20px;
}

/* ==================== 分页样式 ==================== */
.pagination-wrapper {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    gap: 8px;
    align-items: center;
}

.page-btn, .page-num {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: #475569;
}

.page-btn:hover:not(:disabled), .page-num:hover:not(.active) {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-num.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.page-dots {
    padding: 8px 12px;
    color: #94a3b8;
}

/* ==================== 占位卡片（未来功能） ==================== */
.placeholder-card {
    background: white;
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
}

.placeholder-icon {
    font-size: 64px;
    margin-bottom: 24px;
}

.placeholder-title {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 12px;
}

.placeholder-desc {
    font-size: 16px;
    color: #64748b;
    margin: 0 0 24px;
}

.placeholder-hint {
    font-size: 14px;
    color: #94a3b8;
    margin: 0 0 12px;
}

.placeholder-features {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
    display: inline-block;
}

.placeholder-features li {
    padding: 8px 0;
    font-size: 14px;
    color: #64748b;
}

/* ==================== 弹窗样式 ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* 组织搜索弹窗需要更高层级（在编辑弹窗之上） */
#orgSearchModal {
    z-index: 1010;
}

.modal-container {
    background: #ffffff;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-content-large {
    max-width: 1200px;
    max-height: 90vh;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 24px;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid #e2e8f0;
}

.btn-cancel {
    flex: 1;
    height: 44px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-confirm {
    flex: 1;
    height: 44px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-confirm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* 组织列表 */
.org-list-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.org-list-item {
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.org-list-item:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.org-list-item.selected {
    background: #eff6ff;
    border-color: #3b82f6;
}

.org-radio {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.org-list-item.selected .org-radio {
    border-color: #3b82f6;
}

.org-list-item.selected .org-radio::after {
    content: '';
    width: 10px;
    height: 10px;
    background: #3b82f6;
    border-radius: 50%;
}

.org-info {
    flex: 1;
    min-width: 0;
}

.org-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.org-code {
    font-size: 12px;
    color: #64748b;
}

.org-list-empty {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
    font-size: 14px;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar-nav {
        position: relative;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .main-content {
        padding: 16px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .solution-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .solution-actions {
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
    }
}

/* ==================== 解决方案卡片样式 ==================== */
.solution-list {
    display: grid;
    gap: 16px;
}

.solution-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.solution-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.solution-info {
    flex: 1;
    min-width: 0;
}

.solution-name {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.solution-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.solution-tag {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    color: #475569;
    font-weight: 500;
}

.solution-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #64748b;
}

.solution-time {
    color: #94a3b8;
}

.solution-actions {
    display: flex;
    gap: 8px;
    margin-left: 16px;
    flex-shrink: 0;
}
