/* ==================== 登录页样式 ==================== */
body.login-page {
    margin: 0;
    padding: 0;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
}

.login-card {
    width: 400px;
    padding: 40px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-card h2 {
    text-align: center;
    margin: 0 0 8px 0;
    font-size: 24px;
    color: #303133;
}

.login-card .subtitle {
    text-align: center;
    margin: 0 0 30px 0;
    font-size: 14px;
    color: #909399;
}

.login-card .el-button {
    width: 100%;
}

/* ==================== 管理后台整体布局 ==================== */
.admin-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* 左侧导航 */
.admin-aside {
    width: 220px;
    background: #304156;
    color: #fff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.admin-aside .logo {
    height: 60px;
    line-height: 60px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    background: #263445;
    letter-spacing: 2px;
}

.admin-aside .el-menu {
    border-right: none;
    flex: 1;
}

/* 右侧主区域 */
.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.admin-header {
    height: 50px;
    line-height: 50px;
    padding: 0 20px;
    background: #fff;
    border-bottom: 1px solid #e6e6e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.admin-header .left {
    font-size: 14px;
    color: #606266;
}

.admin-header .right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f0f2f5;
}

/* ==================== 仪表盘卡片样式 ==================== */
.stat-cards {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-card {
    flex: 1;
    min-width: 200px;
    background: #fff;
    border-radius: 8px;
    padding: 20px 24px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-card .icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    color: #fff;
}

.stat-card .icon.blue {
    background: linear-gradient(135deg, #409eff, #337ecc);
}

.stat-card .icon.green {
    background: linear-gradient(135deg, #67c23a, #529b2e);
}

.stat-card .icon.orange {
    background: linear-gradient(135deg, #e6a23c, #cf9236);
}

.stat-card .icon.purple {
    background: linear-gradient(135deg, #a855f7, #7c3aed);
}

.stat-card .icon.teal {
    background: linear-gradient(135deg, #14b8a6, #0d9488);
}

.stat-card .icon.gray {
    background: linear-gradient(135deg, #94a3b8, #64748b);
}

.stat-card .icon.red {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.stat-card .info .delta {
    font-size: 12px;
    margin-top: 2px;
    font-weight: 500;
}

.stat-card .info .delta.delta-up   { color: #f56c6c; }
.stat-card .info .delta.delta-down { color: #67c23a; }
.stat-card .info .delta.delta-neutral { color: #909399; }

.stat-card .info .label {
    font-size: 13px;
    color: #909399;
    margin-bottom: 4px;
}

.stat-card .info .value {
    font-size: 24px;
    font-weight: 600;
    color: #303133;
}

/* ==================== 统计图表容器 ==================== */
.stats-panel {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stats-panel .chart-box {
    flex: 1;
    min-width: 400px;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.stats-panel .chart-box .chart-title {
    font-size: 16px;
    font-weight: 600;
    color: #303133;
    margin-bottom: 12px;
}

.chart-container {
    width: 100%;
    height: 360px;
}

/* ==================== 表格区域通用 ==================== */
.section-box {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.section-box .section-title {
    font-size: 16px;
    font-weight: 600;
}
.form-tip {
    margin-left: 12px;
    font-size: 12px;
    color: #909399;
    color: #303133;
    margin-bottom: 12px;
}

/* 操作栏 */
.toolbar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.toolbar .left {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.toolbar .right {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ==================== 配置管理 ==================== */
.config-info p {
    margin: 8px 0;
    font-size: 14px;
    color: #606266;
}

.config-info p strong {
    display: inline-block;
    width: 100px;
}

.json-editor {
    margin-top: 16px;
}

/* ==================== 资源管理 ==================== */
.type-tag {
    text-transform: capitalize;
}

/* ==================== 通用工具 ==================== */
.text-center {
    text-align: center;
}

.mb-16 {
    margin-bottom: 16px;
}

.mt-16 {
    margin-top: 16px;
}

/* ==================== 富文本编辑器 ==================== */
.rich-editor-toolbar {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #fafafa;
    border: 1px solid #dcdfe6;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    flex-wrap: wrap;
    gap: 4px;
}

.rich-editor-content {
    min-height: 250px;
    max-height: 500px;
    overflow-y: auto;
    padding: 12px 16px;
    border: 1px solid #dcdfe6;
    border-radius: 0 0 4px 4px;
    font-size: 14px;
    line-height: 1.8;
    color: #303133;
    outline: none;
    background: #fff;
}

.rich-editor-content:focus {
    border-color: #409eff;
}

.rich-editor-content[placeholder]:empty::before {
    content: attr(placeholder);
    color: #c0c4cc;
}

.rich-editor-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 12px 0 8px;
    color: #303133;
}

.rich-editor-content ul,
.rich-editor-content ol {
    padding-left: 24px;
    margin: 8px 0;
}

.rich-editor-content a {
    color: #409eff;
    text-decoration: underline;
}

.rich-editor-content a:hover {
    color: #66b1ff;
}

/* ==================== 网盘优先级 ==================== */
.pan-priority-page .page-desc {
    color: #909399;
    font-size: 13px;
    margin-top: 4px;
}
.pan-priority-page .pan-actions {
    margin: 16px 0;
    display: flex;
    gap: 8px;
}
.pan-list {
    max-width: 800px;
}
.pan-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border: 1px solid #ebeef5;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #fff;
    transition: all 0.2s;
    cursor: grab;
}
.pan-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.pan-item.pan-disabled {
    opacity: 0.5;
    background: #fafafa;
}
.pan-item.drag-over {
    border-color: #409eff;
    background: #ecf5ff;
}
.pan-drag-handle {
    cursor: grab;
    color: #c0c4cc;
    margin-right: 8px;
}
.pan-drag-handle:active {
    cursor: grabbing;
}
.pan-priority-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #606266;
    margin-right: 12px;
    flex-shrink: 0;
}
.pan-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
}
.pan-info {
    flex: 1;
    min-width: 0;
}
.pan-info .pan-name {
    font-size: 14px;
    font-weight: 500;
    color: #303133;
}
.pan-info .pan-key {
    font-size: 12px;
    color: #909399;
    margin-top: 2px;
}
.pan-status {
    margin: 0 16px;
}
.pan-actions-inline {
    display: flex;
    gap: 4px;
}
.domain-patterns .pattern-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.domain-patterns .pattern-row .el-input {
    flex: 1;
}

/* ==================== 批量导入对话框 ==================== */
.import-step-body {
    min-height: 320px;
    display: flex;
    flex-direction: column;
}
.step-indicator {
    margin-bottom: 24px;
}
.import-tips {
    background: #f0f7ff;
    border: 1px solid #d6e8ff;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 16px;
    line-height: 1.8;
    font-size: 13px;
    color: #303133;
}
.import-tips .tips-title {
    font-size: 14px;
    font-weight: 600;
    color: #409eff;
    margin-bottom: 8px;
}
.import-tips p {
    margin: 4px 0;
}

/* Excel 示例表格 */
.import-example {
    background: #fafbfc;
    border: 1px solid #e4e7ed;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 16px;
}
.import-example .example-title {
    font-size: 13px;
    font-weight: 600;
    color: #606266;
    margin-bottom: 10px;
}
.example-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.example-table th, .example-table td {
    border: 1px solid #dcdfe6;
    padding: 10px 14px;
    text-align: left;
}
.example-table th {
    background: #409eff;
    color: #fff;
    font-weight: 500;
}
.example-table td {
    background: #fff;
    color: #606266;
    font-family: 'Consolas', 'Courier New', monospace;
    word-break: break-all;
}
.example-table td:first-child {
    color: #303133;
    font-family: inherit;
}

.import-upload {
    width: 100%;
}
.import-upload .el-upload {
    width: 100%;
}
.import-upload .el-upload-dragger {
    width: 100%;
    padding: 40px 20px;
}
.import-upload .el-upload__tip {
    margin-top: 8px;
}

/* 结果页"继续导入"按钮 */
.dialog-footer {
    margin-top: 20px;
    text-align: right;
    padding-top: 16px;
    border-top: 1px solid #ebeef5;
}

.error-more-tip {
    text-align: center;
    margin-top: 8px;
    color: #909399;
    font-size: 13px;
}

/* ==================== 标准查新组件 ==================== */
.standard-check { max-width: 1200px; }
.standard-check .mode-tabs { margin-bottom: 20px; }
.standard-check .mode-panel { margin-bottom: 20px; }

/* 速查 */
.standard-check .search-row { position: relative; }
.standard-check .search-hint { color: #909399; font-size: 12px; margin-top: 8px; }

/* 批量 */
.standard-check .batch-hint { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; font-size: 13px; color: #606266; }
.standard-check .batch-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.standard-check .count-info { color: #67c23a; font-size: 13px; }
.standard-check .count-warn { color: #f56c6c; font-size: 13px; font-weight: bold; }

/* Excel */
.standard-check .excel-hint { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; padding: 10px 16px; background: #f0f7ff; border: 1px solid #d6e8ff; border-radius: 8px; font-size: 13px; }
.standard-check .upload-area { padding: 30px 0; text-align: center; }
.standard-check .upload-area p { margin: 8px 0 0; color: #606266; }
.standard-check .excel-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }

/* 结果 */
.standard-check .results-section { margin-top: 24px; }
.standard-check .summary-row { display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.standard-check .summary-card { flex: 1; min-width: 120px; text-align: center; padding: 16px; border-radius: 8px; background: #fff; border: 1px solid #ebeef5; }
.standard-check .summary-card .num { font-size: 28px; font-weight: bold; margin-bottom: 4px; }
.standard-check .summary-card .label { font-size: 13px; color: #606266; }
.standard-check .summary-card.current .num { color: #67c23a; }
.standard-check .summary-card.abolished .num { color: #f56c6c; }
.standard-check .summary-card.pending .num { color: #e6a23c; }
.standard-check .summary-card.unknown .num { color: #909399; }
.standard-check .filter-row { margin-bottom: 12px; }
.standard-check .empty-result { text-align: center; padding: 60px 0; color: #909399; }

/* 骨架屏 */
.skeleton-area { padding: 20px 0; }
.skeleton-tip { text-align: center; color: #909399; font-size: 13px; margin-top: 12px; }
.skeleton-row { display: flex; gap: 12px; padding: 12px 16px; align-items: center; }
.skeleton-row + .skeleton-row { border-top: 1px solid #f5f5f5; }
.sk-block {
    height: 14px; border-radius: 4px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}
.sk-block.w10 { width: 10%; }
.sk-block.w15 { width: 15%; }
.sk-block.w30 { width: 30%; }
.sk-block.w60 { width: 60%; }
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* 状态反馈条 */
.status-bar { padding: 8px 14px; border-radius: 6px; font-size: 13px; margin-bottom: 12px; }
.status-ok { background: #e1f3d8; color: #67c23a; }
.status-warn { background: #fef7e0; color: #e6a23c; }
.status-err { background: #fef0f0; color: #f56c6c; }
.status-info { background: #ecf5ff; color: #409eff; }

/* ==================== 替代提示样式 ==================== */
.replace-alert {
    padding: 5px 8px;
    border-radius: 5px;
    font-size: 12px;
    line-height: 1.5;
    border-left: 3px solid;
}

.replace-alert.warning {
    background: #fef7e0;
    border-color: #f0a020;
}

.replace-alert.danger {
    background: #fef0f0;
    border-color: #e64340;
}

.replace-alert .replace-text {
    font-size: 12px;
    line-height: 1.5;
    color: #606266;
}

.replace-alert .replace-text b {
    color: #303133;
    font-family: 'Consolas', 'Courier New', monospace;
}

.replace-alert.warning .replace-text b.end { color: #b88230; font-family: inherit; }
.replace-alert.danger  .replace-text b.end { color: #c45656; font-family: inherit; }

/* ==================== 二维码管理 ==================== */
.qrcode-preview {
    width: 170px;
    min-height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafbfc;
    border: 1px dashed #dcdfe6;
    border-radius: 8px;
}
.qrcode-empty {
    text-align: center;
    color: #c0c4cc;
    font-size: 13px;
}

/* ==================== 资源链接单元格 ==================== */
.resource-link-cell {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 6px 12px;
    background: #ecf5ff;
    border: 1px solid #d9ecff;
    border-radius: 6px;
    color: #409eff;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
    cursor: pointer;
}
.resource-link-cell:hover {
    background: #d9ecff;
    border-color: #409eff;
    color: #337ecc;
}
.resource-link-cell .link-icon {
    flex-shrink: 0;
    font-size: 14px;
}
.resource-link-cell .link-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 260px;
}
.resource-link-empty {
    color: #c0c4cc;
    font-size: 13px;
    padding: 6px 12px;
    display: inline-block;
    background: #fafafa;
    border-radius: 6px;
    border: 1px dashed #e4e7ed;
}

/* ==================== 爬取周报组件 ==================== */
.crawl-weekly {
    max-width: 1300px;
}

/* 异动提示条 */
.anomaly-bar {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    background: #fef0f0;
    border: 1px solid #fde2e2;
    border-radius: 8px;
    font-size: 13px;
    color: #e64340;
    line-height: 1.7;
}

.anomaly-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f56c6c;
    flex-shrink: 0;
    margin-top: 5px;
}

.anomaly-item {
    flex: 1;
    min-width: 0;
}

/* 极简柱状图（不引入 echarts） */
.mini-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 170px;
    padding: 0 8px;
    gap: 4px;
}

.mini-chart .bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.mini-chart .bar-wrapper {
    display: flex;
    gap: 3px;
    align-items: flex-end;
    height: 150px;
}

.mini-chart .bar {
    width: 20px;
    border-radius: 3px 3px 0 0;
    transition: height 0.4s ease;
    min-height: 2px;
}

.mini-chart .bar.added {
    background: linear-gradient(180deg, #409eff, #66b1ff);
}

.mini-chart .bar.updated {
    background: linear-gradient(180deg, #a0cfff, #c6e2ff);
}

.mini-chart .bar-week {
    font-size: 11px;
    color: #909399;
    margin-top: 6px;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 8px;
}

.legend-item {
    font-size: 12px;
    color: #606266;
    display: flex;
    align-items: center;
    gap: 4px;
}

.chart-legend .dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
}

.chart-legend .added-dot   { background: #409eff; }
.chart-legend .updated-dot { background: #a0cfff; }

/* 来源分布 */
.source-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.source-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.source-label {
    width: 70px;
    font-size: 13px;
    color: #606266;
    flex-shrink: 0;
}

.source-bar-track {
    flex: 1;
    height: 20px;
    background: #f0f2f5;
    border-radius: 10px;
    overflow: hidden;
}

.source-bar-fill {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, #409eff, #66b1ff);
    transition: width 0.5s ease;
}

.source-count {
    width: 36px;
    font-size: 13px;
    font-weight: 600;
    color: #303133;
    text-align: right;
    flex-shrink: 0;
}

.empty-tip {
    text-align: center;
    color: #c0c4cc;
    padding: 40px 0;
    font-size: 13px;
}

/* 任务执行状态卡片 */
.task-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.task-card {
    background: #fff;
    border-radius: 8px;
    padding: 14px 16px;
    border: 1px solid #e4e7ed;
    border-left: 4px solid #909399;
}
.task-card.status-ready, .task-card.status-completed { border-left-color: #67c23a; }
.task-card.status-running { border-left-color: #409eff; }
.task-card.status-failed { border-left-color: #f56c6c; }

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.task-source { font-size: 14px; font-weight: 600; color: #303133; }
.task-badge {
    font-size: 11px; padding: 2px 8px; border-radius: 10px;
    background: #f0f2f5; color: #909399;
}
.badge-ok { background: #e1f3d8; color: #67c23a; }
.badge-err { background: #fef0f0; color: #f56c6c; }
.badge-warn { background: #fef7e0; color: #e6a23c; }

.task-body { font-size: 12px; }
.task-row {
    display: flex; justify-content: space-between;
    padding: 3px 0;
    color: #606266;
}