/* ---------------- GEO 诊断入口（官网弹窗） ---------------- */
.geo-diag-overlay {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(4px);
}
.geo-diag-overlay.is-open { display: flex; }

.geo-diag-card {
    width: 100%;
    max-width: 520px;
    max-height: 92vh;
    overflow: auto;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, .35);
    animation: geoDiagPop .22s ease;
}
[data-theme="dark"] .geo-diag-card { background: #1e293b; color: #e2e8f0; }
@keyframes geoDiagPop { from { transform: translateY(12px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }

.geo-diag-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid #eef2f7;
}
[data-theme="dark"] .geo-diag-head { border-color: #334155; }
.geo-diag-head h3 { margin: 0; font-size: 17px; font-weight: 700; }
.geo-diag-close {
    border: 0; background: #f1f5f9; color: #64748b;
    width: 34px; height: 34px; border-radius: 10px; cursor: pointer; font-size: 18px; line-height: 1;
}
[data-theme="dark"] .geo-diag-close { background: #334155; color: #cbd5e1; }
.geo-diag-close:hover { background: #e2e8f0; }

.geo-diag-body { padding: 20px 22px 24px; }
.geo-diag-field { margin-bottom: 14px; }
.geo-diag-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #334155; }
[data-theme="dark"] .geo-diag-field label { color: #cbd5e1; }
.geo-diag-field input {
    width: 100%; padding: 11px 13px; font-size: 14px;
    border: 1px solid #d8dee9; border-radius: 12px; background: #f8fafc; color: #0f172a;
    outline: none; transition: border-color .15s, box-shadow .15s;
}
[data-theme="dark"] .geo-diag-field input { background: #0f172a; border-color: #334155; color: #e2e8f0; }
.geo-diag-field input:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.18); }
.geo-diag-hint { font-size: 12px; color: #94a3b8; margin-top: 6px; }

.geo-diag-actions { display: flex; gap: 10px; margin-top: 6px; }
.geo-diag-actions .btn { flex: 1; }

.geo-diag-msg { font-size: 13px; margin-top: 12px; min-height: 18px; }
.geo-diag-msg.is-error { color: #dc2626; }
.geo-diag-msg.is-ok { color: #16a34a; }

.geo-diag-loading { text-align: center; padding: 30px 10px; }
.geo-diag-spinner {
    width: 38px; height: 38px; margin: 0 auto 14px;
    border: 4px solid #e2e8f0; border-top-color: #6366f1; border-radius: 50%;
    animation: geoDiagSpin .8s linear infinite;
}
@keyframes geoDiagSpin { to { transform: rotate(360deg); } }
.geo-diag-loading p { font-size: 14px; color: #475569; margin: 4px 0; }
[data-theme="dark"] .geo-diag-loading p { color: #cbd5e1; }
.geo-diag-dots::after { content: ''; animation: geoDiagDots 1.4s steps(4, end) infinite; }
@keyframes geoDiagDots { 0% { content: ''; } 25% { content: '·'; } 50% { content: '··'; } 75% { content: '···'; } }

.geo-diag-iframe {
    width: 100%; height: 78vh; border: 0; border-radius: 12px; background: #f8fafc;
}
[data-theme="dark"] .geo-diag-iframe { background: #0f172a; }

/* 宽版弹窗：展示诊断报告时放宽，避免报告页被挤在 520px 里 */
.geo-diag-card.is-wide {
    max-width: min(1120px, 94vw);
    display: flex;
    flex-direction: column;
}
.geo-diag-card.is-wide .geo-diag-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.geo-diag-card.is-wide .geo-diag-iframe {
    flex: 1 1 auto;
    height: auto;
    min-height: 320px;
}

/* 结果工具条（完成态） */
.geo-diag-result-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    text-align: left;
}
[data-theme="dark"] .geo-diag-result-bar { background: #1e1b4b; border-color: #4338ca; }
.geo-diag-result-bar__main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.geo-diag-result-bar__icon {
    flex: 0 0 30px; width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: #dcfce7; color: #16a34a; font-size: 15px;
}
[data-theme="dark"] .geo-diag-result-bar__icon { background: #14532d; color: #86efac; }
.geo-diag-result-bar__text { font-size: 13.5px; font-weight: 700; color: #312e81; line-height: 1.4; }
[data-theme="dark"] .geo-diag-result-bar__text { color: #c7d2fe; }
.geo-diag-result-bar__score { font-size: 19px; font-weight: 800; color: #4f46e5; line-height: 1.2; }
[data-theme="dark"] .geo-diag-result-bar__score { color: #a5b4fc; }
.geo-diag-result-bar__unit { font-size: 12px; color: #64748b; margin-left: 2px; }
.geo-diag-result-bar__level {
    display: inline-block; margin-left: 8px; padding: 2px 8px;
    font-size: 12px; font-weight: 600; border-radius: 6px;
    color: #4338ca; background: #e0e7ff;
}
[data-theme="dark"] .geo-diag-result-bar__level { color: #c7d2fe; background: #312e81; }

/* 关闭提示条（开始诊断后告知可关闭窗口） */
.geo-diag-notice {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 16px;
    padding: 12px 14px;
    font-size: 12.5px;
    line-height: 1.7;
    text-align: left;
    color: #4338ca;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 12px;
}
.geo-diag-notice__icon { font-size: 14px; line-height: 1.5; flex: 0 0 auto; }
.geo-diag-notice strong { font-weight: 700; }
[data-theme="dark"] .geo-diag-notice { background: #1e1b4b; border-color: #4338ca; color: #c7d2fe; }

.geo-diag-loading-sub { font-size: 12px !important; color: #94a3b8 !important; }
.geo-diag-loading-actions { display: flex; gap: 10px; margin-top: 18px; }
.geo-diag-loading-actions .btn { flex: 1; }
.geo-diag-btn-ghost {
    background: #fff;
    border: 1px solid #cbd5e1;
    color: #475569;
}
.geo-diag-btn-ghost:hover { background: #f1f5f9; color: #1e293b; border-color: #94a3b8; }
[data-theme="dark"] .geo-diag-btn-ghost { background: #0f172a; border-color: #475569; color: #cbd5e1; }
[data-theme="dark"] .geo-diag-btn-ghost:hover { background: #334155; color: #e2e8f0; }

/* 右下角任务提醒条 */
.geo-diag-toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1090;
    display: none;
    align-items: flex-start;
    gap: 10px;
    max-width: min(360px, calc(100vw - 32px));
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 18px 46px rgba(15, 23, 42, .18);
    text-align: left;
}
.geo-diag-toast.is-open { display: flex; animation: geoDiagToastIn .24s var(--ease-apple, ease); }
[data-theme="dark"] .geo-diag-toast { background: #1e293b; border-color: #334155; }
@keyframes geoDiagToastIn { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

.geo-diag-toast__spinner {
    flex: 0 0 16px; width: 16px; height: 16px; margin-top: 2px;
    border: 2px solid #e2e8f0; border-top-color: #6366f1; border-radius: 50%;
    animation: geoDiagSpin .8s linear infinite;
}
.geo-diag-toast__icon {
    flex: 0 0 20px; width: 20px; height: 20px; margin-top: 1px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; font-size: 12px; font-weight: 700;
}
.geo-diag-toast__icon.is-done { background: #dcfce7; color: #16a34a; }
.geo-diag-toast__icon.is-failed { background: #fee2e2; color: #dc2626; }
.geo-diag-toast__body { flex: 1; min-width: 0; }
.geo-diag-toast__title { font-size: 13px; font-weight: 700; color: #0f172a; line-height: 1.4; }
[data-theme="dark"] .geo-diag-toast__title { color: #e2e8f0; }
.geo-diag-toast__desc { font-size: 12px; color: #64748b; margin-top: 2px; line-height: 1.5; }
[data-theme="dark"] .geo-diag-toast__desc { color: #94a3b8; }
.geo-diag-toast__actions { margin-top: 8px; }
.geo-diag-toast__link { font-size: 12px; font-weight: 600; color: #4f46e5; text-decoration: none; }
.geo-diag-toast__link:hover { text-decoration: underline; }
[data-theme="dark"] .geo-diag-toast__link { color: #a5b4fc; }
.geo-diag-toast__close {
    flex: 0 0 auto; border: 0; background: transparent; color: #94a3b8;
    font-size: 16px; line-height: 1; padding: 0 2px; cursor: pointer;
}
.geo-diag-toast__close:hover { color: #475569; }

@media (max-width: 540px) {
    .geo-diag-card { border-radius: 16px; }
    .geo-diag-iframe { height: 70vh; }
    .geo-diag-card.is-wide { max-width: 100%; }
    .geo-diag-card.is-wide .geo-diag-iframe { min-height: 240px; }
    .geo-diag-toast { right: 12px; left: 12px; bottom: 12px; max-width: none; }
    .geo-diag-loading-actions { flex-direction: column; }
}


/* ---------------- 任务中心 ---------------- */
/* 任务中心 — 最小高度保证中间内容区 + 底部预留一排空间 */
.task-center {
    min-height: 65vh;
}

.task-center-header h1 { color: #0f172a; }
[data-theme="dark"] .task-center-header h1 { color: #f1f5f9; }

/* 匿名用户提示横幅 */
.task-anon-alert {
    background: #f0f0ff;
    border-color: #c7d2fe;
    color: #3730a3;
}
.task-anon-alert__icon { color: #4f46e5; }
.task-anon-alert__title { color: #312e81; }
.task-anon-alert__text { color: #4338ca; }

[data-theme="dark"] .task-anon-alert {
    background: #1e1b4b;
    border-color: #4338ca;
    color: #e0e7ff;
}
[data-theme="dark"] .task-anon-alert__icon { color: #818cf8; }
[data-theme="dark"] .task-anon-alert__title { color: #c7d2fe; }
[data-theme="dark"] .task-anon-alert__text { color: #a5b4fc; }

/* 筛选按钮 */
.task-filter-btn {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid transparent;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    transition: all .2s var(--ease-apple, ease);
}
[data-theme="dark"] .task-filter-btn {
    background: #1e293b;
    color: #94a3b8;
}
.task-filter-btn:hover {
    background: #e2e8f0;
    color: #334155;
}
[data-theme="dark"] .task-filter-btn:hover {
    background: #334155;
    color: #cbd5e1;
}
.task-filter-btn.is-active {
    background: #6366f1;
    color: #fff;
    border-color: #6366f1;
}
[data-theme="dark"] .task-filter-btn.is-active {
    background: #818cf8;
    color: #0f172a;
    border-color: #818cf8;
}

/* 任务卡片 */
.task-card {
    transition: transform .2s var(--ease-apple, ease), box-shadow .2s var(--ease-apple, ease);
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    height: 100%;
}
[data-theme="dark"] .task-card {
    background: #1e293b;
}
.task-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover, 0 12px 40px rgba(15,23,42,.12)) !important;
}
[data-theme="dark"] .task-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,.3) !important;
}
.task-card--pending {
    opacity: .85;
    border: 1px dashed #cbd5e1;
}
[data-theme="dark"] .task-card--pending {
    border-color: #475569;
}

/* 状态徽章 */
.task-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    letter-spacing: .02em;
}
.task-badge--done {
    background: #dcfce7;
    color: #166534;
}
[data-theme="dark"] .task-badge--done {
    background: #14532d;
    color: #86efac;
}
.task-badge--inprogress {
    background: #fef3c7;
    color: #92400e;
}
[data-theme="dark"] .task-badge--inprogress {
    background: #422006;
    color: #fcd34d;
}
.task-badge--failed {
    background: #fce4ec;
    color: #b71c1c;
}
[data-theme="dark"] .task-badge--failed {
    background: #3b0a0a;
    color: #fca5a5;
}

/* 评分 & 等级 */
.task-score {
    font-size: 18px;
    font-weight: 800;
    color: #6366f1;
    line-height: 1;
}
[data-theme="dark"] .task-score { color: #a5b4fc; }
.task-level {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 6px;
}
[data-theme="dark"] .task-level {
    color: #94a3b8;
    background: #334155;
}

/* 摘要截断 */
.task-summary {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 日期 */
.task-date {
    font-size: 12px;
    color: #94a3b8;
}

/* 小轮播器 */
.task-spinner {
    width: 16px; height: 16px;
    border: 2px solid #e2e8f0;
    border-top-color: #6366f1;
    border-radius: 50%;
    display: inline-block;
    animation: geoDiagSpin .8s linear infinite;
    flex-shrink: 0;
}

/* 查看按钮 */
.task-view-btn {
    font-size: 13px;
    padding: 6px 18px;
}

