@charset "UTF-8";
/* xnx_quest 任务中心样式（1.4.28）
 * 任务列表从「卡片堆叠」改为「任务行」布局：
 *   图标 + 标题/徽标 + 描述/进度 + 奖励 chips + 右侧操作按钮
 * 作用域限定在 .xq-shell / .xq-row 内，避免污染全局
 * 明暗模式通过 [data-bs-theme="dark"] 覆写内部变量
 */

.xq-shell {
    --xq-card: var(--bs-body-bg);
    --xq-border: rgba(0, 0, 0, .08);
    --xq-sunken: var(--bs-tertiary-bg);
    --xq-text-1: var(--bs-body-color);
    --xq-text-2: var(--bs-secondary-color);
    --xq-text-3: var(--bs-secondary-color);
    --xq-action-bg: #1a1a1a;
    --xq-action-text: #fff;
    --xq-radius-xl: 24px;
    --xq-radius-lg: 12px;
    --xq-radius-pill: 9999px;
    --xq-soft: rgba(var(--bs-primary-rgb), .12);

    background: var(--xq-card);
    border: 1px solid var(--xq-border);
    border-radius: var(--xq-radius-xl);
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

[data-bs-theme="dark"] .xq-shell {
    --xq-border: rgba(255, 255, 255, .10);
    --xq-sunken: #212121;
    --xq-action-bg: #f0f0f0;
    --xq-action-text: #1b1a24;
}

/* ========== 分组标题 ========== */

.xq-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.xq-group-title {
    font-size: 16px;
    line-height: 22px;
    font-weight: 600;
    color: var(--xq-text-1);
}

.xq-rows {
    display: flex;
    flex-direction: column;
}

/* ========== 任务行 ========== */

.xq-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid var(--xq-border);
}

.xq-rows > .xq-row:first-child {
    border-top: 0;
}

/* 含多步骤表单的行：按钮顶部对齐，避免长内容时按钮垂直居中 */
.xq-row.has-steps {
    align-items: flex-start;
}

.xq-left {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    min-width: 0;
}

.xq-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 26px;
    background: var(--xq-sunken);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bs-primary);
    font-size: 20px;
    overflow: hidden;
}

.xq-icon img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.xq-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.xq-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.xq-title {
    font-size: 16px;
    line-height: 22px;
    font-weight: 600;
    color: var(--xq-text-1);
}

.xq-desc-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.xq-desc {
    font-size: 14px;
    line-height: 20px;
    color: var(--xq-text-3);
    min-width: 0;
}

/* ========== 进度条（行内紧凑型）========== */

.xq-progress {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.xq-progress-text {
    font-size: 13px;
    line-height: 20px;
    color: var(--xq-text-3);
    white-space: nowrap;
}

.xq-track {
    position: relative;
    width: 64px;
    height: 8px;
    border-radius: 999px;
    background: var(--xq-sunken);
    overflow: hidden;
}

.xq-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    max-width: 100%;
    border-radius: inherit;
    background: var(--bs-primary);
    transition: width .3s ease;
}

/* ========== 徽标 / 标签 ========== */

.xq-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 12px;
    line-height: 18px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    color: var(--bs-primary);
    background-color: var(--xq-soft);
}

.xq-tag.is-daily    { color: #2563eb; background: rgba(37, 99, 235, .12); }
.xq-tag.is-newbie   { color: #16a34a; background: rgba(22, 163, 74, .12); }
.xq-tag.is-longterm { color: #0891b2; background: rgba(8, 145, 178, .12); }
.xq-tag.is-event    { color: #d97706; background: rgba(217, 119, 6, .14); }
.xq-tag.is-muted    { color: var(--xq-text-3); background: var(--xq-sunken); }

/* ========== 奖励 chips ========== */

.xq-chips {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.xq-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 24px;
    padding: 0 8px;
    border-radius: var(--xq-radius-lg);
    border: 1px solid var(--xq-border);
    font-size: 12px;
    line-height: 1;
    color: var(--xq-text-3);
    white-space: nowrap;
}

.xq-chip.is-credits {
    color: var(--bs-primary);
    background-color: var(--xq-soft);
    border-color: transparent;
}

.xq-chip.is-warn {
    color: #d97706;
    background: rgba(217, 119, 6, .12);
    border-color: transparent;
}

/* ========== 提示行（前置条件 / 自定义条件）========== */

.xq-note {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    font-size: 13px;
    line-height: 18px;
    color: var(--xq-text-3);
    min-width: 0;
}

.xq-note.is-danger { color: var(--bs-danger); }
.xq-note.is-info   { color: var(--bs-info); }

/* ========== 操作按钮 ========== */

.xq-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    gap: 6px;
    min-width: 84px;
    height: 34px;
    padding: 0 18px;
    border: 0;
    border-radius: var(--xq-radius-lg);
    background: var(--xq-action-bg);
    color: var(--xq-action-text);
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    transition: opacity .15s ease, transform .15s ease;
}

.xq-action:hover {
    color: var(--xq-action-text);
    opacity: .88;
}

.xq-action:active { transform: scale(.97); }

.xq-action:disabled,
.xq-action.is-disabled {
    background: var(--xq-sunken);
    color: var(--xq-text-3);
    cursor: not-allowed;
    opacity: 1;
}

.xq-action:disabled:hover,
.xq-action.is-disabled:hover { opacity: 1; }

/* 待领取：品牌色实心，突出可操作 */
.xq-action.is-brand {
    background: var(--bs-primary);
    color: #fff;
}

/* 审核中：描边弱化 */
.xq-action.is-ghost {
    background: transparent;
    border: 1px solid var(--xq-border);
    color: var(--xq-text-2);
}

.xq-action.is-ghost:hover { color: var(--xq-text-1); }

/* ========== 已完成行：整体弱化 ========== */

.xq-row.is-done .xq-title { color: var(--xq-text-2); }
.xq-row.is-done .xq-icon  { opacity: .6; }

/* ========== 自定义任务：多步骤 ========== */

.xq-steps {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: var(--xq-radius-lg);
    background: var(--xq-sunken);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.xq-steps-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 2px;
}

.xq-steps-head-label {
    font-size: 13px;
    color: var(--xq-text-2);
}

.xq-steps-head-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--xq-text-1);
}

.xq-step {
    padding: 8px 10px;
    border-radius: var(--xq-radius-lg);
    background: var(--xq-card);
    border: 1px solid var(--xq-border);
}

.xq-step.is-locked { opacity: .65; }

.xq-step-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.xq-step-no {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--xq-text-1);
}

.xq-step-desc {
    font-size: 13px;
    line-height: 18px;
    color: var(--xq-text-3);
    margin: 4px 0 6px;
}

.xq-step-form { margin-top: 4px; }

.xq-step-snapshot {
    font-size: 13px;
    line-height: 18px;
    color: var(--xq-text-3);
    margin-top: 4px;
}

.xq-step-snapshot img {
    max-height: 80px;
    border-radius: 6px;
    border: 1px solid var(--xq-border);
}

/* ========== 空状态 ========== */

.xq-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 48px 16px;
    color: var(--xq-text-3);
}

.xq-empty .ti { font-size: 40px; }

/* ========== 响应式 ========== */

@media (max-width: 768px) {
    .xq-shell {
        padding: 16px 14px;
        border-radius: 16px;
        gap: 14px;
    }
    .xq-row { gap: 12px; padding: 12px 0; }
    .xq-left { gap: 10px; }
    .xq-icon { width: 34px; height: 34px; font-size: 17px; }
    .xq-title { font-size: 15px; }
    .xq-desc { font-size: 13px; }
    .xq-action { min-width: 68px; padding: 0 12px; font-size: 13px; height: 32px; }
}

@media (max-width: 480px) {
    .xq-shell { padding: 12px 10px; }
    .xq-group-title { font-size: 14px; }
    .xq-title { font-size: 14px; }
    .xq-desc { font-size: 12px; line-height: 18px; }
    .xq-desc-row { gap: 8px; }
    .xq-progress-text { font-size: 12px; }
    .xq-track { width: 48px; }
    .xq-chip { font-size: 11px; height: 22px; padding: 0 6px; }
    /* 窄屏操作按钮移到内容下方，避免挤压标题 */
    .xq-row { flex-direction: column; align-items: stretch; }
    .xq-action { align-self: flex-end; }
}
