/* ========== 周报生成器 weekly-report ========== */

.wr-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    padding: 34px 36px 26px;
    margin: 22px 0 18px;
    background: linear-gradient(135deg, #eaf1ff 0%, #f6f0ff 55%, #fff0f5 100%);
    border: 1px solid var(--c-border);
    box-shadow: var(--shadow-md);
}
:root[data-theme="dark"] .wr-hero {
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.14), rgba(124, 92, 255, 0.14), rgba(255, 107, 157, 0.10));
    border-color: rgba(255, 255, 255, 0.08);
}

.wr-hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.35;
    pointer-events: none;
}
.wr-hero-glow-1 { width: 200px; height: 200px; background: #7c5cff; top: -80px; right: 12%; }
.wr-hero-glow-2 { width: 150px; height: 150px; background: #00d4ff; bottom: -60px; left: 30%; }
:root[data-theme="dark"] .wr-hero-glow { opacity: 0.22; }

.wr-hero-inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.wr-hero-icon {
    width: 72px; height: 72px;
    display: flex; align-items: center; justify-content: center;
    font-size: 38px;
    background: var(--c-surface);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--c-border);
    flex-shrink: 0;
}
.wr-hero-text { flex: 1; min-width: 220px; }
.wr-hero-text h1 {
    font-size: 28px; font-weight: 800;
    color: var(--c-text);
    letter-spacing: 1px;
    margin-bottom: 6px;
}
.wr-hero-sub { font-size: 14px; color: var(--c-text-sub); }
.wr-hero-badges { display: flex; gap: 8px; flex-wrap: wrap; }

.wr-badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 12px; font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--c-surface);
    color: var(--c-text-sub);
    border: 1px solid var(--c-border);
    box-shadow: var(--shadow-sm);
}
.wr-badge-new { background: var(--c-primary-soft); color: var(--c-primary); border-color: transparent; }
.wr-badge-hot { background: rgba(255, 107, 157, 0.12); color: #e0457e; border-color: transparent; }
:root[data-theme="dark"] .wr-badge-hot { background: rgba(255, 107, 157, 0.18); color: #ff85b0; }

.wr-hero-week {
    position: relative;
    margin-top: 18px;
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; color: var(--c-primary);
    background: var(--c-surface);
    border: 1px dashed var(--c-border);
    border-radius: 999px;
    padding: 6px 16px;
}

/* ========== 步骤条 ========== */
.wr-steps {
    display: flex; align-items: center;
    justify-content: center;
    gap: 0;
    margin: 6px 0 22px;
    padding: 16px 20px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}
.wr-step { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 84px; }
.wr-step-num {
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--c-surface-2);
    color: var(--c-text-muted);
    font-weight: 700; font-size: 14px;
    transition: all .25s ease;
}
.wr-step.active .wr-step-num {
    background: var(--c-primary);
    color: #fff;
    box-shadow: 0 0 0 5px var(--c-primary-soft);
}
.wr-step-name { font-size: 13px; font-weight: 600; color: var(--c-text); }
.wr-step-tip { font-size: 11px; color: var(--c-text-muted); }
.wr-step-line {
    width: 48px; height: 2px;
    background: var(--c-surface-2);
    margin: 0 6px 20px;
    border-radius: 2px;
}

/* ========== 主体网格 ========== */
.wr-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 20px;
    margin-bottom: 22px;
    align-items: start;
}
@media (max-width: 900px) {
    .wr-grid { grid-template-columns: 1fr; }
}

.wr-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 20px 22px;
}
.wr-card-head {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.wr-card-title { font-size: 16px; font-weight: 700; color: var(--c-text); margin-right: auto; }

.wr-demo-btn, .wr-clear-btn {
    font-size: 12px; font-weight: 600;
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid var(--c-border);
    background: var(--c-surface-soft);
    color: var(--c-text-sub);
    cursor: pointer;
    transition: all .2s ease;
}
.wr-demo-btn:hover { color: var(--c-primary); border-color: var(--c-primary); background: var(--c-primary-soft); }
.wr-clear-btn:hover { color: #e0457e; border-color: #ff6b9d; background: rgba(255, 107, 157, 0.08); }

/* ========== 表单字段 ========== */
.wr-field { margin-bottom: 16px; }
.wr-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .wr-field-row { grid-template-columns: 1fr; } }

.wr-label {
    display: block;
    font-size: 13px; font-weight: 600;
    color: var(--c-text);
    margin-bottom: 7px;
}
.wr-req {
    font-style: normal; font-size: 11px; font-weight: 600;
    color: #e0457e;
    background: rgba(255, 107, 157, 0.12);
    padding: 1px 7px; border-radius: 999px;
    margin-left: 6px;
}
.wr-opt {
    font-style: normal; font-size: 11px; font-weight: 500;
    color: var(--c-text-muted);
    background: var(--c-surface-2);
    padding: 1px 7px; border-radius: 999px;
    margin-left: 6px;
}

.wr-input {
    width: 100%;
    font-size: 14px; line-height: 1.6;
    color: var(--c-text);
    background: var(--c-surface-soft);
    border: 1px solid var(--c-border);
    border-radius: 10px;
    padding: 10px 12px;
    transition: border-color .2s ease, box-shadow .2s ease;
    font-family: var(--font);
}
.wr-input:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px var(--c-primary-soft);
}
.wr-input::placeholder { color: var(--c-text-muted); }

.wr-count {
    text-align: right;
    font-size: 11px; color: var(--c-text-muted);
    margin-top: 4px;
}

.wr-week-row { display: flex; align-items: center; gap: 10px; }
.wr-week-row .wr-input { flex: 1; }
.wr-week-sep { color: var(--c-text-muted); font-size: 13px; }

/* ========== 风格选择 ========== */
.wr-style-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 600px) { .wr-style-pick { grid-template-columns: 1fr; } }

.wr-style-card {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 12px 8px;
    background: var(--c-surface-soft);
    border: 2px solid var(--c-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all .2s ease;
    text-align: center;
}
.wr-style-card:hover { border-color: var(--c-primary); transform: translateY(-2px); }
.wr-style-card.active {
    border-color: var(--c-primary);
    background: var(--c-primary-soft);
    box-shadow: var(--shadow-sm);
}
.wr-style-emoji { font-size: 24px; }
.wr-style-name { font-size: 14px; font-weight: 700; color: var(--c-text); }
.wr-style-desc { font-size: 11px; color: var(--c-text-sub); }

/* ========== 预览 ========== */
.wr-preview-card { position: sticky; top: 86px; }
@media (max-width: 900px) { .wr-preview-card { position: static; } }

.wr-preview-tip { font-size: 12px; color: var(--c-text-muted); }

.wr-preview {
    background: var(--c-surface-soft);
    border: 1px dashed var(--c-border);
    border-radius: 12px;
    padding: 18px 20px;
    min-height: 380px;
    max-height: 560px;
    overflow-y: auto;
    font-size: 13.5px;
    line-height: 1.8;
    color: var(--c-text);
}
.wr-preview h1 {
    font-size: 20px; font-weight: 800;
    color: var(--c-text);
    text-align: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--c-primary);
    letter-spacing: 2px;
}
.wr-preview .wr-meta {
    text-align: center;
    font-size: 11.5px;
    color: var(--c-text-muted);
    margin-bottom: 12px;
}
.wr-preview .wr-meta b { color: var(--c-text-sub); font-weight: 600; }
.wr-preview .wr-intro {
    font-size: 12.5px; color: var(--c-text-sub);
    background: var(--c-surface-2);
    border-left: 3px solid var(--c-primary);
    padding: 8px 12px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 14px;
}
.wr-preview .wr-sec { margin: 12px 0 6px; }
.wr-preview .wr-sec h2 {
    font-size: 14px; font-weight: 700;
    color: var(--c-primary);
    margin-bottom: 6px;
    padding-bottom: 3px;
    border-bottom: 1px solid var(--c-border);
}
.wr-preview ol { margin-left: 20px; }
.wr-preview ol li { margin-bottom: 3px; }
.wr-preview .wr-footer {
    margin-top: 16px;
    padding-top: 10px;
    border-top: 1px solid var(--c-border);
    font-size: 12px; color: var(--c-text-sub);
    display: flex; justify-content: space-between; align-items: center;
}
.wr-preview .wr-footer b { color: var(--c-text); }
.wr-preview .wr-footer span { color: var(--c-text-muted); font-size: 11px; }

.wr-preview-placeholder {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    height: 100%; min-height: 340px; gap: 8px;
    color: var(--c-text-muted);
    text-align: center;
}
.wr-preview-placeholder .wr-ph-emoji { font-size: 40px; }

/* ========== 操作按钮 ========== */
.wr-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}
.wr-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    font-size: 14px; font-weight: 600;
    padding: 11px 14px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all .2s ease;
}
.wr-btn:disabled { opacity: .5; cursor: not-allowed; }
.wr-btn-copy {
    background: var(--c-surface-2);
    color: var(--c-text-sub);
    border: 1px solid var(--c-border);
}
.wr-btn-copy:hover { color: var(--c-primary); border-color: var(--c-primary); background: var(--c-primary-soft); }
.wr-btn-word {
    background: linear-gradient(135deg, #2f6fed, #2b4fd8);
    color: #fff;
    box-shadow: 0 4px 14px rgba(47, 111, 237, 0.3);
}
.wr-btn-word:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(47, 111, 237, 0.4); }
.wr-btn-pdf {
    background: linear-gradient(135deg, #ff6b9d, #e0457e);
    color: #fff;
    box-shadow: 0 4px 14px rgba(224, 69, 126, 0.3);
}
.wr-btn-pdf:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(224, 69, 126, 0.4); }

.wr-safe-tip {
    margin-top: 10px;
    font-size: 11.5px;
    color: var(--c-text-muted);
    text-align: center;
}

/* ========== Tab 区 ========== */
.wr-tab-card { margin-bottom: 26px; }
.wr-tabs {
    display: flex; gap: 6px;
    border-bottom: 1px solid var(--c-border);
    padding-bottom: 0;
    margin-bottom: 16px;
}
.wr-tab {
    font-size: 14px; font-weight: 600;
    padding: 9px 18px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--c-text-muted);
    cursor: pointer;
    transition: all .2s ease;
}
.wr-tab:hover { color: var(--c-primary); }
.wr-tab.active { color: var(--c-primary); border-bottom-color: var(--c-primary); }

.wr-tab-panel { display: none; font-size: 14px; line-height: 1.9; color: var(--c-text-sub); }
.wr-tab-panel.active { display: block; animation: wrFadeIn .3s ease; }
@keyframes wrFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.wr-tab-panel ul, .wr-tab-panel ol { margin-left: 22px; margin-top: 6px; }
.wr-tab-panel li { margin-bottom: 5px; }
.wr-tab-panel b { color: var(--c-text); }
.wr-tab-panel code {
    background: var(--c-surface-2);
    color: var(--c-primary);
    padding: 1px 6px;
    border-radius: 5px;
    font-size: 13px;
}
.wr-tip {
    margin-top: 12px;
    background: rgba(255, 159, 67, 0.10);
    border: 1px dashed rgba(255, 159, 67, 0.4);
    color: #b26a1c;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
}
:root[data-theme="dark"] .wr-tip { background: rgba(255, 159, 67, 0.12); color: #ffb566; }

.wr-changelog { list-style: none; margin-left: 0 !important; }
.wr-changelog li {
    background: var(--c-surface-soft);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 8px;
    border: 1px solid var(--c-border);
}

/* 导出中状态 */
.wr-btn.loading { opacity: .6; pointer-events: none; }
.wr-btn.loading::after {
    content: "";
    width: 14px; height: 14px;
    margin-left: 6px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wrSpin .7s linear infinite;
}
@keyframes wrSpin { to { transform: rotate(360deg); } }
