/* ============================================
   我的砍价/砍价控制台专用样式
   设计理念：主任务驱动 + 分组管理 + 挽回转化
   ============================================ */

/* ============================================
   吸顶进度条
   ============================================ */
.sticky-progress-bar {
    position: sticky;
    top: 56px;
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    padding: 0 20px;
    background: linear-gradient(90deg, #1E3A5F 0%, #2D4A6F 100%);
    border-radius: 0 0 10px 10px;
    margin: -16px -16px 16px -16px;
    width: calc(100% + 32px);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.2);
}

.sticky-progress-bar.show {
    display: flex;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.sticky-progress-info {
    display: flex;
    align-items: center;
    gap: 16px;
    color: white;
}

.sticky-progress-tag {
    padding: 4px 10px;
    background: rgba(227, 77, 89, 0.9);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.sticky-progress-text {
    font-size: 13px;
}

.sticky-progress-text strong {
    color: #F0C674;
    font-weight: 600;
}

.sticky-progress-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.sticky-progress-btns {
    display: flex;
    gap: 8px;
}

.sticky-progress-btn {
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.sticky-progress-btn.primary {
    background: #E34D59;
    color: white;
    border: none;
}

.sticky-progress-btn.primary:hover {
    background: #C73845;
}

.sticky-progress-btn.ghost {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
}

.sticky-progress-btn.ghost:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ============================================
   主任务卡（进行中）
   ============================================ */
.main-task-card {
    background: linear-gradient(135deg, #1E3A5F 0%, #2D4A6F 100%);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.main-task-card::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(227, 77, 89, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.main-task-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.main-task-badge {
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-task-status {
    padding: 4px 12px;
    background: linear-gradient(135deg, #E34D59, #F06B77);
    color: white;
    font-size: 12px;
    font-weight: 600;
    border-radius: 100px;
    animation: pulse-status 2s ease-in-out infinite;
}

@keyframes pulse-status {
    0%, 100% { box-shadow: 0 0 0 0 rgba(227, 77, 89, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(227, 77, 89, 0); }
}

.main-task-timer {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
}

.main-task-timer-icon {
    font-size: 14px;
}

.main-task-timer-value {
    font-family: "DIN Alternate", monospace;
    font-weight: 600;
    color: #F0C674;
}

.main-task-content {
    display: flex;
    gap: 24px;
}

.main-task-info {
    flex: 1;
}

.main-task-product {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.main-task-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.main-task-name {
    font-size: 18px;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
}

.main-task-specs {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

/* 关键差距（核心！） */
.main-task-gap {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.main-task-gap-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
}

.main-task-gap-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.main-task-gap-value {
    font-size: 28px;
    font-weight: 700;
    color: #F0C674;
    font-family: "DIN Alternate", -apple-system, sans-serif;
}

.main-task-gap-unit {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.main-task-gap-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.main-task-progress {
    margin-bottom: 8px;
}

.main-task-progress-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    overflow: hidden;
}

.main-task-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #E34D59, #F0C674);
    border-radius: 100px;
    transition: width 0.5s ease;
    position: relative;
}

.main-task-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4));
}

.main-task-progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 6px;
}

/* 行动区 */
.main-task-action {
    width: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.main-task-btn-primary {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #E34D59, #C73845);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(227, 77, 89, 0.4);
}

.main-task-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(227, 77, 89, 0.5);
}

.main-task-btns-row {
    display: flex;
    gap: 8px;
}

.main-task-btn-secondary {
    flex: 1;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.main-task-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
}

.main-task-link-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.main-task-link-action {
    flex: 1;
    height: 32px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.main-task-link-action.switch {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.36);
}

.main-task-link-action.switch:hover {
    background: rgba(255, 255, 255, 0.26);
}

.main-task-link-action.danger {
    color: #FFE6E9;
    background: rgba(227, 77, 89, 0.14);
    border: 1px solid rgba(255, 160, 170, 0.55);
}

.main-task-link-action.danger:hover {
    background: rgba(227, 77, 89, 0.24);
}

.main-task-tip {
    margin-top: 12px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}

/* ============================================
   开砍引导卡（无进行中时显示）
   ============================================ */
.start-guide-card {
    background: linear-gradient(135deg, #F8F9FB 0%, #E8F4FD 100%);
    border: 2px dashed #1E3A5F;
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 20px;
    text-align: center;
}

.start-guide-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.start-guide-title {
    font-size: 18px;
    font-weight: 600;
    color: #1A1A1A;
    margin-bottom: 8px;
}

.start-guide-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.start-guide-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: #1E3A5F;
    color: white;
    border: none;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.start-guide-btn:hover {
    background: #162D4A;
    transform: translateY(-2px);
}

/* ============================================
   列表分组
   ============================================ */
.bargain-list-card {
    background: white;
    border: 1px solid #E9EDF3;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.bargain-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #E9EDF3;
}

.bargain-tabs {
    display: flex;
    gap: 4px;
}

.bargain-tab {
    padding: 6px 16px;
    font-size: 13px;
    color: #666;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.bargain-tab:hover {
    background: #F5F7FA;
    color: #1E3A5F;
}

.bargain-tab.active {
    background: #1E3A5F;
    color: white;
}

.bargain-count {
    font-size: 12px;
    color: #8C8C8C;
}

/* 分组标题 */
.bargain-group {
    padding: 0 20px;
}

.bargain-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    border-bottom: 1px dashed #E9EDF3;
}

.bargain-group-count {
    padding: 2px 8px;
    background: #F0F0F0;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 500;
    color: #8C8C8C;
}

/* ============================================
   砍价项卡片
   ============================================ */
.bargain-item {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid #F0F0F0;
    gap: 16px;
    transition: all 0.15s;
    cursor: pointer;
}

.bargain-item:hover {
    background: #FAFBFC;
}

.bargain-item:focus-visible {
    outline: 2px solid rgba(30, 58, 95, 0.35);
    outline-offset: -2px;
}

.bargain-item:last-child {
    border-bottom: none;
}

.bargain-item-icon {
    width: 52px;
    height: 52px;
    background: #F0F7FF;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
}

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

.bargain-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.bargain-item-status {
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 4px;
}

.bargain-item-status.ongoing {
    background: #FFF1F2;
    color: #E34D59;
}

.bargain-item-status.success {
    background: #F0F9EB;
    color: #52C41A;
}

.bargain-item-status.expired {
    background: #F5F5F5;
    color: #8C8C8C;
}

.bargain-item-name {
    font-size: 15px;
    font-weight: 600;
    color: #1A1A1A;
}

.bargain-item-meta {
    font-size: 12px;
    color: #8C8C8C;
}

/* 成功状态 */
.bargain-item-result {
    text-align: center;
    min-width: 120px;
    padding: 0 16px;
}

.bargain-item-result-status {
    font-size: 14px;
    font-weight: 600;
    color: #52C41A;
    margin-bottom: 2px;
}

.bargain-item-result-date {
    font-size: 11px;
    color: #8C8C8C;
}

.bargain-item-result-save {
    font-size: 13px;
    color: #E34D59;
    font-weight: 500;
    margin-top: 4px;
}

/* 失效状态 */
.bargain-item.expired {
    background: #FAFAFA;
}

.bargain-item.expired .bargain-item-icon {
    filter: grayscale(0.5);
    opacity: 0.7;
}

.bargain-item-expired-info {
    text-align: center;
    min-width: 120px;
    padding: 0 16px;
}

.bargain-item-expired-progress {
    font-size: 13px;
    color: #8C8C8C;
    margin-bottom: 2px;
}

.bargain-item-expired-gap {
    font-size: 12px;
    color: #E34D59;
}

/* 操作按钮 */
.bargain-item-action {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 120px;
}

.bargain-item-btn {
    height: 34px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.bargain-item-btn.primary {
    background: #1E3A5F;
    color: white;
    border: none;
}

.bargain-item-btn.primary:hover {
    background: #162D4A;
}

.bargain-item-btn.pay {
    background: #E34D59;
    color: white;
    border: none;
}

.bargain-item-btn.pay:hover {
    background: #C73845;
}

.bargain-item-btn.success {
    background: #52C41A;
    color: white;
    border: none;
}

.bargain-item-btn.success:hover {
    background: #389E0D;
}

.bargain-item-btn.revive {
    background: linear-gradient(135deg, #E34D59, #F06B77);
    color: white;
    border: none;
}

.bargain-item-btn.revive:hover {
    box-shadow: 0 2px 8px rgba(227, 77, 89, 0.3);
}

.bargain-item-btn.ghost {
    background: transparent;
    color: #666;
    border: 1px solid #E9EDF3;
}

.bargain-item-btn.ghost:hover {
    border-color: #1E3A5F;
    color: #1E3A5F;
}

.bargain-item-btn.switch-outline {
    background: #F4F8FF;
    color: #1E3A5F;
    border: 1px solid #A8C5E8;
}

.bargain-item-btn.switch-outline:hover {
    background: #E8F1FF;
    border-color: #1E3A5F;
}

.bargain-item-btn.danger-outline {
    background: #FFF5F6;
    color: #C73845;
    border: 1px solid #F4B8BF;
}

.bargain-item-btn.danger-outline:hover {
    background: #FFE9EC;
    border-color: #E34D59;
}

/* ============================================
   右侧快捷操作卡
   ============================================ */
.quick-ops-card {
    background: white;
    border: 1px solid #E9EDF3;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.quick-ops-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 15px;
    font-weight: 600;
    color: #1A1A1A;
}

.quick-ops-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quick-ops-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.quick-ops-btn.primary {
    background: linear-gradient(135deg, #E34D59, #C73845);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(227, 77, 89, 0.3);
}

.quick-ops-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(227, 77, 89, 0.4);
}

.quick-ops-btn.secondary {
    background: #F8F9FB;
    color: #4A4A4A;
    border: 1px solid #E9EDF3;
}

.quick-ops-btn.secondary:hover {
    background: #E8F4FD;
    border-color: #1E3A5F;
    color: #1E3A5F;
}

.quick-ops-tip {
    margin-top: 12px;
    font-size: 11px;
    color: #8C8C8C;
    text-align: center;
}

/* ============================================
   统计成就卡
   ============================================ */
.stats-card {
    background: white;
    border: 1px solid #E9EDF3;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.stats-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.stats-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #1A1A1A;
}

.stats-link {
    font-size: 12px;
    color: #8C8C8C;
    text-decoration: none;
}

.stats-link:hover {
    color: #1E3A5F;
}

.stats-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.stats-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: #F8F9FB;
    border-radius: 8px;
}

.stats-item-label {
    font-size: 13px;
    color: #666;
}

.stats-item-value {
    font-size: 16px;
    font-weight: 600;
    color: #1A1A1A;
}

.stats-item-value.highlight {
    color: #52C41A;
}

/* 目标进度 */
.stats-goal {
    background: linear-gradient(135deg, #FDF8ED 0%, #FFF7ED 100%);
    border-radius: 10px;
    padding: 14px;
}

.stats-goal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.stats-goal-title {
    font-size: 12px;
    color: #8B6914;
}

.stats-goal-progress-text {
    font-size: 12px;
    color: #D4A853;
    font-weight: 600;
}

.stats-goal-bar {
    height: 8px;
    background: rgba(212, 168, 83, 0.2);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 8px;
}

.stats-goal-fill {
    height: 100%;
    background: linear-gradient(90deg, #D4A853, #F0C674);
    border-radius: 100px;
}

.stats-goal-desc {
    font-size: 12px;
    color: #8B6914;
}

.stats-goal-desc strong {
    color: #D4A853;
}

/* ============================================
   空状态
   ============================================ */
.bargain-empty {
    text-align: center;
    padding: 60px 20px;
}

.bargain-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.bargain-empty-title {
    font-size: 16px;
    color: #1A1A1A;
    margin-bottom: 8px;
}

.bargain-empty-desc {
    font-size: 13px;
    color: #8C8C8C;
    margin-bottom: 20px;
}

/* ============================================
   159 - 我的砍价空状态与左右高度对齐
   ============================================ */
.start-guide-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 52px;
    box-sizing: border-box;
    min-height: 248px;
    padding: 32px 46px;
    overflow: hidden;
    border: 1px solid #E3EAF5;
    border-radius: 14px;
    background:
        radial-gradient(circle at 10% 46%, rgba(29, 78, 216, 0.10) 0 1px, transparent 2px),
        radial-gradient(circle at 38% 88%, rgba(29, 78, 216, 0.16) 0 3px, transparent 4px),
        radial-gradient(circle at 90% 34%, rgba(29, 78, 216, 0.16) 0 3px, transparent 4px),
        linear-gradient(135deg, #F8FBFF 0%, #F1F6FF 100%);
    background-size: auto, auto, auto, auto;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    text-align: left;
}

.start-guide-card::before {
    content: '';
    position: absolute;
    inset: 22px 30px;
    border-bottom: 1px dashed rgba(37, 99, 235, 0.18);
    border-radius: 50%;
    transform: rotate(-7deg);
    pointer-events: none;
}

.start-guide-card > * {
    position: relative;
    z-index: 1;
}

.start-guide-art {
    flex: 0 0 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.start-guide-art img {
    width: 230px;
    height: 176px;
    object-fit: contain;
    display: block;
}

.start-guide-copy {
    flex: 0 1 360px;
    min-width: 0;
}

.start-guide-title {
    margin-bottom: 12px;
    color: #071832;
    font-size: 28px;
    line-height: 36px;
    font-weight: 800;
}

.start-guide-desc {
    margin-bottom: 28px;
    color: #475569;
    font-size: 16px;
    line-height: 24px;
}

.start-guide-btn {
    min-width: 244px;
    height: 54px;
    justify-content: center;
    padding: 0 32px;
    border-radius: 999px;
    background: linear-gradient(135deg, #164A8A 0%, #092C63 100%);
    box-shadow: 0 10px 24px rgba(9, 44, 99, 0.22);
    font-size: 17px;
    line-height: 54px;
}

.start-guide-btn:hover {
    background: linear-gradient(135deg, #0F3F7B 0%, #08285A 100%);
}

.bargain-list-card {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

#bargain-list {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

#bargain-list .bargain-group {
    flex: 1 1 auto;
}

.bargain-empty {
    flex: 1 1 auto;
    display: flex;
    min-height: 240px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 34px 20px;
    text-align: center;
}

.bargain-empty-icon {
    width: 132px;
    height: 112px;
    object-fit: contain;
    display: block;
    margin-bottom: 18px;
    opacity: 1;
}

.bargain-empty-title {
    margin-bottom: 10px;
    color: #111827;
    font-size: 24px;
    line-height: 32px;
    font-weight: 800;
}

.bargain-empty-desc {
    margin-bottom: 24px;
    color: #64748B;
    font-size: 16px;
    line-height: 24px;
}

.bargain-empty .btn {
    min-width: 150px;
    height: 48px;
    padding: 0 28px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #F04455 0%, #E12C43 100%);
    box-shadow: 0 10px 22px rgba(225, 44, 67, 0.22);
    color: #fff;
    font-size: 16px;
    line-height: 48px;
    font-weight: 700;
}

@media (max-width: 900px) {
    .start-guide-card {
        height: auto !important;
        flex-direction: column;
        gap: 18px;
        padding: 28px 20px;
        text-align: center;
    }

    .start-guide-art {
        flex-basis: auto;
    }

    .start-guide-art img {
        width: 180px;
        height: 138px;
    }

    .start-guide-copy {
        flex-basis: auto;
        width: 100%;
    }

    .start-guide-title {
        font-size: 24px;
        line-height: 32px;
    }

    .start-guide-btn {
        width: 100%;
        min-width: 0;
    }

    .bargain-list-card {
        height: auto !important;
    }

    .main-task-action {
        width: 100%;
        margin-top: 18px;
    }

    .main-task-content {
        flex-direction: column;
        gap: 0;
    }
}
