/* ==========================================================================
   寒暑假作业分配计划器 /tool/holiday-homework-planner
   视觉主题：紫水晶作业本 —— 紫罗兰 #6d4aa8 + 蜜橘 #ef8a3c + 亚麻白方格纸
   （独立色系，与站内其它工具页完全错开；深浅双主题跟随导航栏 #themeToggle）
   ========================================================================== */

.hhp-page {
    --hhp-bg: #f5f1fb;
    --hhp-paper: #ffffff;
    --hhp-paper-2: #faf7fe;
    --hhp-paper-3: #f1ebfa;
    --hhp-ink: #241b38;
    --hhp-ink-2: #5a4d75;
    --hhp-ink-3: #8d81a8;
    --hhp-line: #e4dcf3;
    --hhp-line-2: #cec2e6;
    --hhp-violet: #6d4aa8;
    --hhp-violet-2: #563a89;
    --hhp-violet-soft: #efe8fb;
    --hhp-orange: #ef8a3c;
    --hhp-orange-2: #d97226;
    --hhp-orange-soft: #fdf0e3;
    --hhp-green: #2f8f6b;
    --hhp-green-soft: #e2f3ec;
    --hhp-red: #d64d5e;
    --hhp-red-soft: #fbe9ec;
    --hhp-blue: #3d6fb4;
    --hhp-blue-soft: #e7effa;
    --hhp-shadow: 0 14px 38px rgba(60, 42, 100, .12);
    --hhp-shadow-sm: 0 3px 12px rgba(60, 42, 100, .08);
    --hhp-radius: 16px;
}

:root[data-theme="dark"] .hhp-page {
    --hhp-bg: #14101f;
    --hhp-paper: #1c1730;
    --hhp-paper-2: #241d3c;
    --hhp-paper-3: #2b2346;
    --hhp-ink: #ece7f7;
    --hhp-ink-2: #b4aad0;
    --hhp-ink-3: #857a9e;
    --hhp-line: #2f2648;
    --hhp-line-2: #3e3259;
    --hhp-violet: #ab90e2;
    --hhp-violet-2: #c3abf0;
    --hhp-violet-soft: #2a2142;
    --hhp-orange: #f5a35f;
    --hhp-orange-2: #ffb87c;
    --hhp-orange-soft: #3a2617;
    --hhp-green: #5fc39a;
    --hhp-green-soft: #1b3a30;
    --hhp-red: #f0838f;
    --hhp-red-soft: #3c1f26;
    --hhp-blue: #7ea9e6;
    --hhp-blue-soft: #1c2c45;
    --hhp-shadow: 0 14px 38px rgba(0, 0, 0, .45);
    --hhp-shadow-sm: 0 3px 12px rgba(0, 0, 0, .35);
}

.hhp-page {
    color: var(--hhp-ink);
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.75;
    font-variant-numeric: tabular-nums;
    padding-bottom: 48px;
}

.hhp-page * { box-sizing: border-box; }

.hhp-page h1,
.hhp-page h2,
.hhp-page h3,
.hhp-page h4 {
    font-family: "Songti SC", "SimSun", "PingFang SC", serif;
    margin: 0;
    letter-spacing: .4px;
}

/* ===================== 首屏 ===================== */
.hhp-hero {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg, var(--hhp-paper-2), var(--hhp-paper)),
        var(--hhp-paper);
    border: 1px solid var(--hhp-line);
    border-radius: 20px;
    box-shadow: var(--hhp-shadow);
    padding: 30px 30px 24px;
    margin-bottom: 20px;
}

/* 顶部方格纸装饰条 */
.hhp-hero::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 14px;
    background:
        repeating-linear-gradient(90deg, var(--hhp-line-2) 0 1px, transparent 1px 22px),
        repeating-linear-gradient(0deg, var(--hhp-line-2) 0 1px, transparent 1px 22px),
        var(--hhp-violet-soft);
    opacity: .85;
}

.hhp-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 26px;
    align-items: start;
    padding-top: 14px;
}

.hhp-kicker {
    display: inline-block;
    font-size: 12px;
    letter-spacing: 3px;
    font-weight: 700;
    color: var(--hhp-violet);
    border: 1px solid var(--hhp-violet);
    background: var(--hhp-violet-soft);
    border-radius: 999px;
    padding: 3px 14px;
    margin-bottom: 12px;
}

.hhp-hero-copy h1 {
    font-size: 31px;
    line-height: 1.28;
    color: var(--hhp-violet-2);
    margin-bottom: 10px;
}

.hhp-lead {
    margin: 0 0 14px;
    font-size: 15px;
    color: var(--hhp-ink-2);
    max-width: 64ch;
    line-height: 1.9;
}

.hhp-lead b { color: var(--hhp-ink); font-weight: 700; }

.hhp-tags {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hhp-tags li {
    font-size: 12.5px;
    color: var(--hhp-ink-2);
    background: var(--hhp-paper-3);
    border: 1px solid var(--hhp-line);
    border-radius: 999px;
    padding: 4px 12px;
    font-weight: 600;
}

/* 右侧负荷仪表 */
.hhp-gauge {
    background: var(--hhp-paper);
    border: 1px solid var(--hhp-line-2);
    border-radius: 14px;
    box-shadow: var(--hhp-shadow-sm);
    overflow: hidden;
}

.hhp-gauge-head {
    background: linear-gradient(135deg, var(--hhp-violet), var(--hhp-violet-2));
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 2px;
    padding: 9px 14px;
}

:root[data-theme="dark"] .hhp-gauge-head { color: #17102a; }

.hhp-gauge-body { padding: 12px 14px 14px; }

.hhp-gauge-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px dashed var(--hhp-line);
    font-size: 13px;
}

.hhp-gauge-row:last-of-type { border-bottom: none; }
.hhp-gauge-row span { color: var(--hhp-ink-3); font-weight: 600; }
.hhp-gauge-row b { font-size: 15px; font-weight: 800; }
.hhp-gauge-row b.warn { color: var(--hhp-orange); }
.hhp-gauge-row b.bad { color: var(--hhp-red); }
.hhp-gauge-row b.good { color: var(--hhp-green); }

.hhp-bar {
    height: 9px;
    border-radius: 999px;
    background: var(--hhp-paper-3);
    overflow: hidden;
    margin: 12px 0 4px;
    border: 1px solid var(--hhp-line);
}

.hhp-bar i {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--hhp-violet), var(--hhp-orange));
    transition: width .35s ease;
}

.hhp-bar i.over { background: linear-gradient(90deg, var(--hhp-orange), var(--hhp-red)); }

.hhp-bar-note {
    font-size: 11.5px;
    color: var(--hhp-ink-3);
    line-height: 1.6;
}

/* ===================== 面板 ===================== */
.hhp-panel {
    background: var(--hhp-paper);
    border: 1px solid var(--hhp-line);
    border-radius: var(--hhp-radius);
    box-shadow: var(--hhp-shadow-sm);
    margin-bottom: 20px;
    overflow: hidden;
}

.hhp-panel-head {
    padding: 16px 22px 14px;
    border-bottom: 1px solid var(--hhp-line);
    background: var(--hhp-paper-2);
}

.hhp-panel-kicker {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--hhp-orange);
    margin-bottom: 4px;
}

.hhp-panel-head h2 { font-size: 19px; color: var(--hhp-ink); margin-bottom: 4px; }

.hhp-panel-head p {
    margin: 0;
    font-size: 13px;
    color: var(--hhp-ink-3);
    line-height: 1.8;
}

.hhp-panel-body { padding: 18px 22px 22px; }

/* ===================== 表单 ===================== */
.hhp-field { display: block; }

.hhp-label {
    display: block;
    font-size: 12px;
    font-weight: 800;
    color: var(--hhp-ink-3);
    letter-spacing: .4px;
    margin-bottom: 6px;
}

.hhp-input,
.hhp-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--hhp-line-2);
    border-radius: 10px;
    background: var(--hhp-paper-2);
    color: var(--hhp-ink);
    font-size: 14px;
    font-family: inherit;
    transition: border-color .16s, box-shadow .16s;
}

.hhp-input:focus,
.hhp-select:focus {
    outline: none;
    border-color: var(--hhp-violet);
    box-shadow: 0 0 0 3px var(--hhp-violet-soft);
}

.hhp-input::placeholder { color: var(--hhp-ink-3); }

.hhp-setup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
    gap: 14px;
}

/* 学习时段 */
.hhp-slots { margin-top: 18px; }

.hhp-sub-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.hhp-sub-head h3 { font-size: 15px; color: var(--hhp-ink); }
.hhp-sub-head .hint { font-size: 12px; color: var(--hhp-ink-3); }

.hhp-slot-list { display: grid; gap: 8px; }

.hhp-slot-row {
    display: grid;
    grid-template-columns: 118px 150px 150px 84px 34px;
    gap: 8px;
    align-items: center;
    justify-content: start;
}

.hhp-slot-row .hhp-input { padding: 8px 10px; font-size: 13.5px; }
.hhp-slot-min {
    font-size: 13px;
    font-weight: 800;
    color: var(--hhp-violet);
    text-align: right;
    white-space: nowrap;
}

.hhp-slot-del {
    border: 1px solid var(--hhp-line-2);
    background: var(--hhp-paper-2);
    color: var(--hhp-ink-3);
    width: 30px;
    height: 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    transition: .16s;
}

.hhp-slot-del:hover { color: var(--hhp-red); border-color: var(--hhp-red); }

/* 作业清单表 */
.hhp-items { margin-top: 6px; }

.hhp-items-table { width: 100%; border-collapse: collapse; max-width: 900px; }

.hhp-items-table th {
    text-align: left;
    font-size: 11.5px;
    font-weight: 800;
    color: var(--hhp-ink-3);
    letter-spacing: .4px;
    padding: 0 8px 8px;
    border-bottom: 1px solid var(--hhp-line-2);
    white-space: nowrap;
}

.hhp-items-table td { padding: 6px 8px; border-bottom: 1px dashed var(--hhp-line); vertical-align: middle; }
.hhp-items-table td .hhp-input,
.hhp-items-table td .hhp-select { padding: 8px 10px; font-size: 13.5px; }
.hhp-items-table tr:hover td { background: var(--hhp-paper-2); }

.hhp-del {
    border: none;
    background: transparent;
    color: var(--hhp-ink-3);
    font-size: 15px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
}

.hhp-del:hover { color: var(--hhp-red); background: var(--hhp-red-soft); }

.hhp-items-foot {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--hhp-line-2);
}

.hhp-items-total {
    font-size: 13px;
    color: var(--hhp-ink-2);
    margin-left: auto;
}

.hhp-items-total b { color: var(--hhp-orange); font-size: 15px; }

/* 按钮 */
.hhp-btn {
    border: 1px solid var(--hhp-line-2);
    background: var(--hhp-paper-2);
    color: var(--hhp-ink);
    padding: 10px 18px;
    border-radius: 11px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: transform .14s, box-shadow .16s, border-color .16s, background .16s;
}

.hhp-btn:hover { transform: translateY(-1px); border-color: var(--hhp-violet); }
.hhp-btn:active { transform: translateY(0); }

.hhp-btn--primary {
    background: linear-gradient(135deg, var(--hhp-violet), var(--hhp-violet-2));
    border-color: var(--hhp-violet-2);
    color: #fff;
    box-shadow: 0 6px 18px rgba(109, 74, 168, .28);
}

:root[data-theme="dark"] .hhp-btn--primary { color: #17102a; }

.hhp-btn--accent {
    background: linear-gradient(135deg, var(--hhp-orange), var(--hhp-orange-2));
    border-color: var(--hhp-orange-2);
    color: #fff;
    box-shadow: 0 6px 18px rgba(239, 138, 60, .26);
}

:root[data-theme="dark"] .hhp-btn--accent { color: #2a1708; }

.hhp-btn--ghost { background: transparent; }
.hhp-btn--sm { padding: 7px 13px; font-size: 13px; border-radius: 9px; }
.hhp-btn--danger:hover { border-color: var(--hhp-red); color: var(--hhp-red); }

/* 提示条 */
.hhp-msg {
    margin: 14px 0 0;
    font-size: 13.5px;
    font-weight: 700;
    min-height: 0;
}

.hhp-msg:empty { display: none; }
.hhp-msg.err { color: var(--hhp-red); }
.hhp-msg.ok { color: var(--hhp-green); }

.hhp-note {
    margin: 10px 0 0;
    font-size: 12.5px;
    color: var(--hhp-ink-3);
    line-height: 1.85;
}

/* ===================== 承载力校验 ===================== */
.hhp-alert {
    display: flex;
    gap: 13px;
    align-items: flex-start;
    padding: 15px 18px;
    border-radius: 14px;
    border: 1px solid var(--hhp-line-2);
    background: var(--hhp-paper);
    box-shadow: var(--hhp-shadow-sm);
    margin-bottom: 20px;
    font-size: 13.5px;
    line-height: 1.85;
}

.hhp-alert .ico {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    font-size: 15px;
    background: var(--hhp-paper-3);
}

.hhp-alert h4 { font-size: 15px; margin-bottom: 3px; }
.hhp-alert p { margin: 0; color: var(--hhp-ink-2); }
.hhp-alert p b { color: var(--hhp-ink); }
.hhp-alert--ok { border-color: var(--hhp-green); background: var(--hhp-green-soft); }
.hhp-alert--ok .ico { background: rgba(47, 143, 107, .16); }
.hhp-alert--warn { border-color: var(--hhp-orange); background: var(--hhp-orange-soft); }
.hhp-alert--warn .ico { background: rgba(239, 138, 60, .18); }
.hhp-alert--err { border-color: var(--hhp-red); background: var(--hhp-red-soft); }
.hhp-alert--err .ico { background: rgba(214, 77, 94, .16); }

/* ===================== KPI ===================== */
.hhp-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(146px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.hhp-kpi {
    background: var(--hhp-paper);
    border: 1px solid var(--hhp-line);
    border-radius: 13px;
    padding: 14px 16px;
    box-shadow: var(--hhp-shadow-sm);
    position: relative;
    overflow: hidden;
}

.hhp-kpi::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--hhp-violet);
}

.hhp-kpi.c2::before { background: var(--hhp-orange); }
.hhp-kpi.c3::before { background: var(--hhp-green); }
.hhp-kpi.c4::before { background: var(--hhp-blue); }

.hhp-kpi .k { font-size: 12px; color: var(--hhp-ink-3); font-weight: 700; }
.hhp-kpi .v { font-size: 25px; font-weight: 800; line-height: 1.3; margin-top: 1px; }
.hhp-kpi .v small { font-size: 12.5px; color: var(--hhp-ink-3); font-weight: 700; margin-left: 2px; }
.hhp-kpi .n { font-size: 11.5px; color: var(--hhp-ink-3); }

/* ===================== 视图切换 ===================== */
.hhp-viewbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 16px;
}

.hhp-tab {
    border: 1px solid var(--hhp-line-2);
    background: var(--hhp-paper);
    color: var(--hhp-ink-2);
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: .16s;
}

.hhp-tab:hover { border-color: var(--hhp-violet); color: var(--hhp-violet); }

.hhp-tab.active {
    background: var(--hhp-violet);
    border-color: var(--hhp-violet);
    color: #fff;
    box-shadow: 0 4px 12px rgba(109, 74, 168, .24);
}

:root[data-theme="dark"] .hhp-tab.active { color: #17102a; }
.hhp-viewbar .spacer { flex: 1 1 auto; }

/* ===================== 按天打卡表 ===================== */
.hhp-days { display: grid; gap: 14px; }

.hhp-day {
    background: var(--hhp-paper);
    border: 1px solid var(--hhp-line);
    border-radius: 14px;
    box-shadow: var(--hhp-shadow-sm);
    overflow: hidden;
    transition: border-color .16s, box-shadow .16s;
}

.hhp-day:hover { border-color: var(--hhp-line-2); box-shadow: var(--hhp-shadow); }
.hhp-day.today { border-color: var(--hhp-orange); box-shadow: 0 0 0 3px var(--hhp-orange-soft); }
.hhp-day.done { border-color: var(--hhp-green); }

.hhp-day-head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 11px 16px;
    background: var(--hhp-paper-2);
    border-bottom: 1px solid var(--hhp-line);
}

.hhp-day-idx {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--hhp-violet-soft);
    color: var(--hhp-violet);
    font-weight: 800;
    font-size: 13px;
}

.hhp-day.done .hhp-day-idx { background: var(--hhp-green-soft); color: var(--hhp-green); }
.hhp-day-title { font-size: 15px; font-weight: 800; }
.hhp-day-title small { font-size: 12px; color: var(--hhp-ink-3); font-weight: 600; margin-left: 6px; }
.hhp-day-meta { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.hhp-chip {
    font-size: 11.5px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--hhp-paper-3);
    color: var(--hhp-ink-2);
    border: 1px solid var(--hhp-line);
}

.hhp-chip--time { background: var(--hhp-blue-soft); color: var(--hhp-blue); border-color: transparent; }
.hhp-chip--over { background: var(--hhp-red-soft); color: var(--hhp-red); border-color: transparent; }
.hhp-chip--week { background: var(--hhp-orange-soft); color: var(--hhp-orange-2); border-color: transparent; }

.hhp-day-body { padding: 12px 16px 14px; }

.hhp-task {
    display: grid;
    grid-template-columns: 26px 96px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 9px 10px;
    border-radius: 10px;
    background: var(--hhp-paper-2);
    border: 1px solid var(--hhp-line);
    margin-bottom: 8px;
    font-size: 14px;
}

.hhp-task:last-child { margin-bottom: 0; }

.hhp-task input[type="checkbox"] {
    width: 19px;
    height: 19px;
    accent-color: var(--hhp-violet);
    cursor: pointer;
}

.hhp-task .sub {
    font-weight: 800;
    font-size: 13px;
    color: var(--hhp-violet);
    background: var(--hhp-violet-soft);
    border-radius: 6px;
    padding: 2px 8px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hhp-task .txt { color: var(--hhp-ink); overflow-wrap: anywhere; }
.hhp-task .txt .qty { color: var(--hhp-orange-2); font-weight: 800; }
.hhp-task .mins { font-size: 12px; color: var(--hhp-ink-3); white-space: nowrap; }

.hhp-task.finished { background: var(--hhp-green-soft); border-color: transparent; }
.hhp-task.finished .txt { color: var(--hhp-ink-3); text-decoration: line-through; }
.hhp-task.finished .sub { background: rgba(47, 143, 107, .14); color: var(--hhp-green); }

.hhp-day-empty {
    font-size: 13px;
    color: var(--hhp-ink-3);
    padding: 10px 2px;
    line-height: 1.8;
}

/* ===================== 按周汇总 ===================== */
.hhp-weeks { display: grid; gap: 14px; }

.hhp-week {
    background: var(--hhp-paper);
    border: 1px solid var(--hhp-line);
    border-radius: 14px;
    box-shadow: var(--hhp-shadow-sm);
    overflow: hidden;
}

.hhp-week-head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 11px 16px;
    background: var(--hhp-paper-2);
    border-bottom: 1px solid var(--hhp-line);
}

.hhp-week-head .w { font-size: 15px; font-weight: 800; }
.hhp-week-head .range { font-size: 12.5px; color: var(--hhp-ink-3); }
.hhp-week-head .chip { margin-left: auto; }

.hhp-week-body { padding: 12px 16px 14px; }

.hhp-wk-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.hhp-wk-table th {
    text-align: left;
    font-size: 11.5px;
    color: var(--hhp-ink-3);
    font-weight: 800;
    padding: 0 8px 7px;
    border-bottom: 1px solid var(--hhp-line-2);
}
.hhp-wk-table td { padding: 8px; border-bottom: 1px dashed var(--hhp-line); }
.hhp-wk-table tr:last-child td { border-bottom: none; }
.hhp-wk-table td b { color: var(--hhp-ink); }
.hhp-wk-table .num { text-align: right; white-space: nowrap; }

/* ===================== 进度偏差 ===================== */
.hhp-dev-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.hhp-dev-card {
    background: var(--hhp-paper-2);
    border: 1px solid var(--hhp-line);
    border-radius: 13px;
    padding: 15px 17px;
}

.hhp-dev-card h4 { font-size: 14.5px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.hhp-dev-card h4 .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hhp-violet); }
.hhp-dev-card h4 .dot.warn { background: var(--hhp-orange); }
.hhp-dev-card h4 .dot.bad { background: var(--hhp-red); }
.hhp-dev-card h4 .dot.good { background: var(--hhp-green); }

.hhp-prog {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 9px;
    font-size: 13px;
}

.hhp-prog .nm { flex: 0 0 76px; color: var(--hhp-ink-3); font-weight: 700; }
.hhp-prog .track { flex: 1 1 auto; height: 10px; border-radius: 999px; background: var(--hhp-paper); border: 1px solid var(--hhp-line); overflow: hidden; }
.hhp-prog .track i { display: block; height: 100%; border-radius: 999px; transition: width .3s; }
.hhp-prog .track i.time { background: linear-gradient(90deg, var(--hhp-violet), var(--hhp-violet-2)); }
.hhp-prog .track i.task { background: linear-gradient(90deg, var(--hhp-orange), var(--hhp-orange-2)); }
.hhp-prog .track i.task.lag { background: linear-gradient(90deg, var(--hhp-red), var(--hhp-orange)); }
.hhp-prog .track i.task.ahead { background: linear-gradient(90deg, var(--hhp-green), #52c39a); }
.hhp-prog .pv { flex: 0 0 48px; text-align: right; font-weight: 800; }

.hhp-dev-card p { margin: 8px 0 0; font-size: 13px; color: var(--hhp-ink-2); line-height: 1.85; }
.hhp-dev-card p b { color: var(--hhp-ink); }
.hhp-dev-card p.warn { color: var(--hhp-orange-2); }
.hhp-dev-card p.bad { color: var(--hhp-red); }
.hhp-dev-card p.good { color: var(--hhp-green); }

/* ===================== 表格 / 预览 ===================== */
.hhp-table-wrap { overflow-x: auto; }

.hhp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    min-width: 460px;
}

.hhp-table th {
    text-align: left;
    font-size: 11.5px;
    font-weight: 800;
    color: var(--hhp-ink-3);
    padding: 0 10px 9px;
    border-bottom: 1px solid var(--hhp-line-2);
    white-space: nowrap;
}

.hhp-table td {
    padding: 9px 10px;
    border-bottom: 1px dashed var(--hhp-line);
    color: var(--hhp-ink-2);
}

.hhp-table tr:last-child td { border-bottom: none; }
.hhp-table td b { color: var(--hhp-ink); }
.hhp-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

.hhp-pre {
    margin: 0;
    background: var(--hhp-paper-2);
    border: 1px solid var(--hhp-line);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 12.5px;
    line-height: 1.85;
    color: var(--hhp-ink-2);
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 320px;
    overflow: auto;
    font-family: "Consolas", "Monaco", "Courier New", monospace;
}

/* ===================== 批量导入 ===================== */
.hhp-batch-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 16px;
    align-items: start;
}

.hhp-textarea {
    width: 100%;
    min-height: 168px;
    padding: 12px 14px;
    border: 1px solid var(--hhp-line-2);
    border-radius: 12px;
    background: var(--hhp-paper-2);
    color: var(--hhp-ink);
    font-size: 13.5px;
    line-height: 1.8;
    font-family: inherit;
    resize: vertical;
}

.hhp-textarea:focus { outline: none; border-color: var(--hhp-violet); box-shadow: 0 0 0 3px var(--hhp-violet-soft); }

.hhp-format {
    font-size: 12.5px;
    color: var(--hhp-ink-2);
    line-height: 1.9;
    background: var(--hhp-paper-2);
    border: 1px solid var(--hhp-line);
    border-radius: 12px;
    padding: 13px 15px;
}

.hhp-format code {
    background: var(--hhp-violet-soft);
    color: var(--hhp-violet-2);
    padding: 1px 6px;
    border-radius: 5px;
    font-size: 12px;
}

.hhp-format b { color: var(--hhp-ink); }

/* ===================== 方案槽位 ===================== */
.hhp-slots-save { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hhp-slot-chip {
    border: 1px solid var(--hhp-line-2);
    background: var(--hhp-paper-2);
    border-radius: 9px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    color: var(--hhp-ink-2);
    transition: .16s;
}

.hhp-slot-chip:hover { border-color: var(--hhp-violet); color: var(--hhp-violet); }
.hhp-slot-chip.load { border-color: var(--hhp-green); color: var(--hhp-green); }

/* ===================== 导出预览表 ===================== */
.hhp-csv-scroll {
    overflow-x: auto;
    border: 1px solid var(--hhp-line);
    border-radius: 12px;
    background: var(--hhp-paper-2);
}

.hhp-csv-table { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 640px; }
.hhp-csv-table th {
    text-align: left;
    font-size: 11.5px;
    font-weight: 800;
    color: var(--hhp-ink-3);
    padding: 9px 11px;
    background: var(--hhp-paper-3);
    border-bottom: 1px solid var(--hhp-line-2);
    white-space: nowrap;
}
.hhp-csv-table td {
    padding: 8px 11px;
    border-bottom: 1px dashed var(--hhp-line);
    color: var(--hhp-ink-2);
    white-space: nowrap;
}
.hhp-csv-table tr:last-child td { border-bottom: none; }
.hhp-csv-table td:first-child { color: var(--hhp-ink); font-weight: 700; }

.hhp-csv-more {
    margin: 10px 0 0;
    font-size: 12.5px;
    color: var(--hhp-ink-3);
    line-height: 1.8;
}
.hhp-csv-more b { color: var(--hhp-violet); }

.hhp-export-tip {
    margin: 14px 0 0;
    font-size: 12.5px;
    line-height: 1.9;
    color: var(--hhp-ink-3);
    background: var(--hhp-paper-2);
    border: 1px dashed var(--hhp-line-2);
    border-radius: 12px;
    padding: 11px 14px;
}

/* ===================== 口径说明表 ===================== */
.hhp-panel-sub {
    float: right;
    font-size: 12px;
    font-weight: 600;
    color: var(--hhp-ink-3);
    letter-spacing: 0;
}

.hhp-note-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.hhp-note-table th,
.hhp-note-table td {
    text-align: left;
    padding: 11px 12px;
    border-bottom: 1px solid var(--hhp-line);
    vertical-align: top;
    line-height: 1.85;
}
.hhp-note-table th { width: 104px; color: var(--hhp-ink); font-weight: 700; white-space: nowrap; }
.hhp-note-table td { color: var(--hhp-ink-2); }
.hhp-note-table td b { color: var(--hhp-ink); }
.hhp-note-table tr:last-child th,
.hhp-note-table tr:last-child td { border-bottom: none; }

/* ===================== 底部信息标签页 ===================== */
.hhp-tabs {
    display: flex;
    gap: 4px;
    margin: 26px 0 14px;
    border-bottom: 1px solid var(--hhp-line);
    flex-wrap: wrap;
}

.hhp-tab {
    border: 0;
    background: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    color: var(--hhp-ink-3);
    padding: 10px 16px;
    position: relative;
    transition: color .18s;
}

.hhp-tab:hover { color: var(--hhp-violet); }
.hhp-tab.active { color: var(--hhp-violet); }

.hhp-tab.active::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: -1px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: linear-gradient(90deg, var(--hhp-violet), var(--hhp-orange));
}

.hhp-tabpane {
    display: none;
    background: var(--hhp-paper);
    border: 1px solid var(--hhp-line);
    border-radius: var(--hhp-radius);
    padding: 24px 26px;
    box-shadow: var(--hhp-shadow-sm);
}

.hhp-tabpane.active { display: block; animation: hhpFade .26s ease; }

@keyframes hhpFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hhp-tabpane h2 { font-size: 17px; margin: 0 0 12px; color: var(--hhp-ink); }
.hhp-tabpane h2:not(:first-child) { margin-top: 24px; }
.hhp-tabpane p,
.hhp-tabpane li { font-size: 14px; line-height: 1.95; color: var(--hhp-ink-2); }
.hhp-tabpane p b,
.hhp-tabpane li b { color: var(--hhp-ink); }
.hhp-tabpane ol { padding-left: 20px; margin: 0; }

.hhp-timeline { list-style: none; padding: 0; margin: 0; }
.hhp-timeline li { display: flex; gap: 12px; align-items: baseline; margin-bottom: 12px; }
.hhp-timeline .ver { font-weight: 800; color: var(--hhp-violet); flex: none; }
.hhp-timeline .date { color: var(--hhp-ink-3); font-size: 12.5px; flex: none; width: 86px; }
.hhp-timeline .txt { font-size: 13.5px; line-height: 1.8; color: var(--hhp-ink-2); }

.hhp-tabpane .hhp-faq { padding: 0; }
.hhp-tabpane .hhp-faq details { border: 1px solid var(--hhp-line); border-radius: 12px; padding: 0 16px; margin-bottom: 10px; background: var(--hhp-paper-2); }
.hhp-tabpane .hhp-faq summary { cursor: pointer; font-size: 14px; font-weight: 700; padding: 13px 0; list-style: none; color: var(--hhp-ink); }
.hhp-tabpane .hhp-faq summary::-webkit-details-marker { display: none; }
.hhp-tabpane .hhp-faq summary::after { content: "＋"; float: right; color: var(--hhp-violet); font-weight: 800; }
.hhp-tabpane .hhp-faq details[open] summary::after { content: "－"; }
.hhp-tabpane .hhp-faq .a { padding: 0 0 14px; font-size: 13.5px; line-height: 1.95; color: var(--hhp-ink-2); }
.hhp-tabpane .hhp-faq .a b { color: var(--hhp-ink); }

/* ===================== 相关工具 ===================== */
.hhp-related { margin-top: 26px; }
.hhp-related h2 { font-size: 18px; margin-bottom: 14px; color: var(--hhp-ink); }
.hhp-rel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.hhp-rel {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 14px 16px;
    background: var(--hhp-paper);
    border: 1px solid var(--hhp-line);
    border-radius: 14px;
    text-decoration: none;
    color: var(--hhp-ink);
    box-shadow: var(--hhp-shadow-sm);
    transition: transform .18s, border-color .18s;
}
.hhp-rel:hover { transform: translateY(-3px); border-color: var(--hhp-violet); }
.hhp-rel .ri { font-size: 22px; }
.hhp-rel b { font-size: 14px; display: block; }
.hhp-rel small { font-size: 12px; color: var(--hhp-ink-3); }

/* ===================== FAQ ===================== */
.hhp-faq { padding: 6px 22px 16px; }

.hhp-faq details {
    border-bottom: 1px dashed var(--hhp-line);
}

.hhp-faq details:last-child { border-bottom: none; }

.hhp-faq summary {
    list-style: none;
    cursor: pointer;
    padding: 13px 22px 13px 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--hhp-ink);
    position: relative;
}

.hhp-faq summary::-webkit-details-marker { display: none; }

.hhp-faq summary::after {
    content: "＋";
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--hhp-ink-3);
    font-weight: 800;
}

.hhp-faq details[open] summary::after { content: "－"; color: var(--hhp-violet); }

.hhp-faq .a {
    padding: 0 0 14px;
    font-size: 13.5px;
    line-height: 1.95;
    color: var(--hhp-ink-2);
}

.hhp-faq .a b { color: var(--hhp-ink); }

.hhp-foot {
    margin: 26px 0 0;
    text-align: center;
    font-size: 12.5px;
    color: var(--hhp-ink-3);
    line-height: 1.9;
}

/* ===================== 空状态 ===================== */
.hhp-empty {
    text-align: center;
    padding: 54px 22px;
    color: var(--hhp-ink-3);
}

.hhp-empty .ic { font-size: 42px; }
.hhp-empty p { margin: 12px 0 0; font-size: 14px; line-height: 1.95; }
.hhp-empty p b { color: var(--hhp-violet); }

/* ===================== Toast ===================== */
.hhp-toast {
    position: fixed;
    left: 50%;
    bottom: 30px;
    transform: translate(-50%, 12px);
    background: rgba(30, 20, 52, .95);
    color: #f2ecff;
    padding: 11px 20px;
    border-radius: 12px;
    font-size: 14px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .3);
    opacity: 0;
    pointer-events: none;
    transition: .22s;
    z-index: 99998;
    max-width: 88vw;
    text-align: center;
}

.hhp-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===================== 响应式 ===================== */
@media (max-width: 1000px) {
    .hhp-hero-grid { grid-template-columns: 1fr; }
    .hhp-batch-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
    .hhp-hero { padding: 22px 18px 20px; }
    .hhp-hero-copy h1 { font-size: 24px; }
    .hhp-panel-head { padding: 14px 16px 12px; }
    .hhp-panel-body { padding: 14px 16px 18px; }
    .hhp-slot-row { grid-template-columns: 1fr 1fr 1fr 62px 30px; gap: 6px; }
    .hhp-slot-row .hhp-input { font-size: 12.5px; padding: 7px 8px; }
    .hhp-items-table th:nth-child(4),
    .hhp-items-table td:nth-child(4) { display: none; }
    .hhp-task { grid-template-columns: 24px 78px minmax(0, 1fr); }
    .hhp-task .mins { grid-column: 3; }
    .hhp-day-meta { width: 100%; margin-left: 44px; }
    .hhp-faq { padding: 4px 16px 14px; }
}

/* ===================== 打印 ===================== */
.hhp-print-only { display: none; }

@media print {
    @page { size: A4 portrait; margin: 12mm 10mm; }
    .hhp-page { background: #fff !important; }
    .hhp-hero,
    .hhp-panel:not(.hhp-print-panel),
    .hhp-kpis,
    .hhp-alert,
    .hhp-viewbar,
    .hhp-toast,
    .hhp-foot { display: none !important; }
    .hhp-print-only { display: block !important; }
    .hhp-panel { border: none; box-shadow: none; margin: 0; }
    .hhp-panel-head { background: none; border-bottom: 2px solid #6d4aa8; padding: 0 0 6px; }
    .hhp-days { gap: 0; }
    .hhp-day {
        break-inside: avoid;
        page-break-inside: avoid;
        border: 1px solid #bbb;
        border-radius: 0;
        box-shadow: none;
        margin-bottom: 4mm;
    }
    .hhp-day-head { background: #f4f0fa; border-bottom: 1px solid #bbb; }
    .hhp-day-idx { background: #6d4aa8; color: #fff; }
    .hhp-task { background: #fff; border: 1px solid #ddd; }
    .hhp-task input[type="checkbox"] { -webkit-appearance: none; appearance: none; border: 1.5px solid #444; border-radius: 3px; background: #fff; }
    .hhp-print-head {
        display: block !important;
        text-align: center;
        margin-bottom: 5mm;
        font-size: 15px;
        font-weight: 800;
    }
    .hhp-print-head small { display: block; font-size: 11px; font-weight: 600; color: #555; margin-top: 2mm; }
}
