/* ========== Talent Module Styles ========== */

/* ========================================
   达人信息页面 - 上下双独立分区布局
   ======================================== */

/* --- 页面容器 --- */
#page-talent-accounts {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 56px);
    overflow: hidden;
    padding: 0;
    margin: -7px -24px -20px;
    background: var(--bg);
}

/* ========================================
   上半区：顶部功能操作区（固定不动）
   ======================================== */
.talent-top-section {
    flex-shrink: 0;
    width: 100%;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

/* 功能按钮栏 */
.talent-action-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    background: #fafbfc;
}

/* 表单操作区 */
.talent-form-area {
    padding: 12px 16px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}
.talent-form-area.mode-single {
    height: 160px;
}
.talent-form-area.mode-batch {
    height: 160px;
}

/* 单个登记表单 */
.talent-single-form {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.talent-single-form .form-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
}
.talent-single-form .form-row-bottom {
    flex: 0 0 auto;
    justify-content: flex-start;
    padding-top: 8px;
}
.talent-single-form .form-group {
    flex: 0 0 auto;
    min-width: 100px;
}
.talent-single-form label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 2px;
    display: block;
}
.talent-single-form input,
.talent-single-form select {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    box-sizing: border-box;
    background: #fff;
    color: var(--text);
}
.talent-single-form input:focus,
.talent-single-form select:focus {
    border-color: var(--primary);
    outline: none;
}

/* 批量登记区域 */
#talentBatchRegisterMode {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.talent-batch-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}
.talent-batch-header {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
    flex-shrink: 0;
    background: var(--card-bg);
}
.batch-header-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 100px;
    text-align: left;
}
.talent-batch-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    min-height: 0;
}
.talent-batch-msg {
    font-size: 12px;
    padding: 4px 0;
    margin-top: 4px;
    flex-shrink: 0;
}

/* 批量表格 */
.batch-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.batch-table th {
    padding: 4px 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
    background: #fafbfc;
    position: sticky;
    top: 0;
    z-index: 1;
}
.batch-table td {
    padding: 4px;
    border-bottom: 1px solid var(--border-light);
}
.batch-table input,
.batch-table select {
    width: 100%;
    padding: 5px 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 12px;
    box-sizing: border-box;
    background: #fff;
    color: var(--text);
    min-width: 100px;
}
.batch-table input:focus,
.batch-table select:focus {
    border-color: var(--primary);
    outline: none;
}

/* ========================================
   下半区：底部查询列表区（独立滚动）
   ======================================== */
.talent-bottom-section {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    background: var(--bg);
}

/* 查询筛选栏 */
.talent-filter-bar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 16px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
}
.talent-filter-bar select,
.talent-filter-bar input[type="text"] {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: #fff;
    outline: none;
    min-width: 100px;
    color: var(--text);
}
.talent-filter-bar select:focus,
.talent-filter-bar input[type="text"]:focus {
    border-color: var(--primary);
}
.talent-filter-bar input[type="text"] {
    min-width: 160px;
}
.talent-filter-bar .filter-checkbox {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    user-select: none;
}
.talent-filter-bar .filter-checkbox input[type="checkbox"] {
    margin: 0;
}

/* 数据列表区 */
.talent-list-area {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 0 16px 16px;
}
.talent-list-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: auto;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.talent-list-area .pagination {
    flex-shrink: 0;
    padding: 12px 0 0;
}

/* 数据表格 */
.talent-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: var(--card-bg);
    min-width: 1000px;
}
.talent-table thead {
    background: #F8FAFB;
    position: sticky;
    top: 0;
    z-index: 1;
}
.talent-table th {
    padding: 10px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.talent-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.talent-table tbody tr:hover {
    background: var(--bg-hover);
}
.talent-table .td-actions {
    white-space: nowrap;
}
.talent-table .td-actions .btn {
    margin-right: 4px;
}
.talent-table .td-uid {
    font-family: 'SFMono-Regular', monospace;
    font-size: 12px;
    color: var(--text-secondary);
}

/* 状态标签 */
.talent-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.5;
}
.talent-badge-protected {
    background: #dcfce7;
    color: #166534;
}
.talent-badge-expired {
    background: #fff7ed;
    color: #c2410c;
}
.talent-badge-unassigned {
    background: #f3f4f6;
    color: #6b7280;
}
.talent-badge-yes {
    background: #dbeafe;
    color: #1e40af;
}
.talent-badge-no {
    background: #f3f4f6;
    color: #9ca3af;
}

/* 汇总信息 */
.talent-summary {
    text-align: center;
    padding: 10px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* ========================================
   详情模态框
   ======================================== */
.talent-detail-section {
    margin-bottom: 20px;
}
.talent-detail-section h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text);
}
.talent-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 20px;
    font-size: 13px;
}
.talent-info-grid .info-label {
    color: var(--text-secondary);
    font-size: 12px;
}
.talent-info-grid .info-value {
    color: var(--text);
    font-weight: 500;
    word-break: break-all;
}

/* 沟通记录时间线 */
.comm-timeline {
    position: relative;
    padding-left: 20px;
}
.comm-timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}
.comm-item {
    position: relative;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: var(--bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.comm-dot {
    position: absolute;
    left: -18px;
    top: 14px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid #fff;
}
.comm-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}
.comm-meta .comm-author {
    font-weight: 500;
    color: var(--text);
}
.comm-content {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text);
    white-space: pre-wrap;
    word-break: break-all;
}
.comm-actions {
    margin-top: 6px;
    display: flex;
    gap: 8px;
}
.comm-add-form {
    margin-bottom: 16px;
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.comm-add-form textarea {
    width: 100%;
    min-height: 60px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
}
.comm-add-form .comm-form-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

/* 流转历史 */
.transfer-timeline {
    position: relative;
    padding-left: 20px;
}
.transfer-timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}
.transfer-item {
    position: relative;
    margin-bottom: 12px;
}
.transfer-dot {
    position: absolute;
    left: -18px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f59e0b;
    border: 2px solid #fff;
}
.transfer-info {
    font-size: 13px;
}
.transfer-names {
    font-weight: 500;
    color: var(--text);
}
.transfer-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ========================================
   达人设置页面
   ======================================== */
.platform-manager {
    margin-bottom: 24px;
}
.platform-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.platform-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
}
.platform-tag-remove {
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    opacity: 0.6;
    margin-left: 2px;
}
.platform-tag-remove:hover {
    opacity: 1;
    color: #dc2626;
}
.platform-add-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.platform-add-row input {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    width: 160px;
}

.talent-setting-section {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}
.talent-setting-section h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}
.talent-setting-section .setting-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}
.talent-setting-section .setting-row input[type="number"] {
    width: 80px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
}
.talent-setting-section .setting-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* ========================================
   响应式布局
   ======================================== */
@media (max-width: 768px) {
    .talent-action-bar {
        gap: 6px;
        padding: 8px 12px;
    }
    .talent-form-area {
        padding: 8px 12px;
    }
    .talent-single-form .form-group {
        min-width: 90px;
    }
    .talent-filter-bar {
        gap: 6px;
        padding: 8px 12px;
    }
    .talent-filter-bar select,
    .talent-filter-bar input[type="text"] {
        min-width: 80px;
        font-size: 12px;
    }
    .talent-table {
        font-size: 12px;
    }
    .talent-table th,
    .talent-table td {
        padding: 8px;
    }
    .talent-info-grid {
        grid-template-columns: 1fr;
    }
    .talent-batch-scroll {
        max-height: none;
    }
}
