/* ==========================================================================
   milestone-countdown-calc · 项目里程碑倒计时
   视觉概念：「甘特看板」—— 石板蓝底板 + 橙红进度 + 青色时间轴
   字体层级：粗黑标题 / 无衬线正文 / 等宽日期与天数
   特色构件：三列看板、横向甘特时间轴、状态色条、阶段筛选胶囊
   ========================================================================== */

.mcc-page {
    --mcc-slate: #1e2b45;
    --mcc-slate-d: #142038;
    --mcc-orange: #ea580c;
    --mcc-orange-s: #fdece1;
    --mcc-cyan: #0284c7;
    --mcc-cyan-s: #e4f2fb;
    --mcc-green: #15803d;
    --mcc-green-s: #e5f4ea;
    --mcc-red: #dc2626;
    --mcc-red-s: #fdeaea;
    --mcc-amber: #b45309;
    --mcc-amber-s: #fdf1de;
    --mcc-ink: #16203a;
    --mcc-ink2: #4a5878;
    --mcc-ink3: #8593ae;
    --mcc-line: #dde3ee;
    --mcc-line2: #edf0f6;
    --mcc-card: #ffffff;
    --mcc-card2: #f6f8fc;

    --tk-bg: #edf0f6;
    --tk-card: var(--mcc-card);
    --tk-card2: var(--mcc-card2);
    --tk-ink: var(--mcc-ink);
    --tk-ink2: var(--mcc-ink2);
    --tk-ink3: var(--mcc-ink3);
    --tk-line: var(--mcc-line);
    --tk-line2: var(--mcc-line2);
    --tk-accent: var(--mcc-cyan);
    --tk-accent2: #0369a1;
    --tk-accent-soft: var(--mcc-cyan-s);
    --tk-ok: var(--mcc-green);
    --tk-ok-soft: var(--mcc-green-s);
    --tk-warn: var(--mcc-amber);
    --tk-warn-soft: var(--mcc-amber-s);
    --tk-danger: var(--mcc-red);
    --tk-danger-soft: var(--mcc-red-s);

    background:
        linear-gradient(180deg, rgba(30, 43, 69, .06), transparent 260px),
        repeating-linear-gradient(90deg, transparent 0 79px, rgba(30, 43, 69, .035) 79px 80px),
        var(--tk-bg);
}

[data-theme="dark"] .mcc-page {
    --mcc-slate: #9fb4d8;
    --mcc-slate-d: #c2d2ec;
    --mcc-orange: #fb923c;
    --mcc-orange-s: #33210f;
    --mcc-cyan: #38bdf8;
    --mcc-cyan-s: #0e2c3d;
    --mcc-green: #4ade80;
    --mcc-green-s: #12301c;
    --mcc-red: #f87171;
    --mcc-red-s: #341a1a;
    --mcc-amber: #fbbf24;
    --mcc-amber-s: #33270f;
    --mcc-ink: #e4eaf5;
    --mcc-ink2: #a8b5cc;
    --mcc-ink3: #74839c;
    --mcc-line: #26334c;
    --mcc-line2: #1d2840;
    --mcc-card: #131c2e;
    --mcc-card2: #182238;

    --tk-bg: #0b1220;
    --tk-accent2: #7dd3fc;
    background:
        linear-gradient(180deg, rgba(56, 189, 248, .07), transparent 260px),
        repeating-linear-gradient(90deg, transparent 0 79px, rgba(255, 255, 255, .02) 79px 80px),
        var(--tk-bg);
}

/* ---------------- 首屏 ---------------- */
.mcc-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, .9fr);
    gap: 28px;
    padding: 28px 30px;
    border-radius: 20px;
    background: linear-gradient(120deg, var(--mcc-slate-d), var(--mcc-slate));
    color: #eef3ff;
    overflow: hidden;
    box-shadow: 0 26px 54px -44px rgba(20, 32, 56, .8);
}
[data-theme="dark"] .mcc-hero { background: linear-gradient(120deg, #16223a, #1d2b46); }
.mcc-hero::after {
    content: "";
    position: absolute;
    right: -60px; top: -60px;
    width: 240px; height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(234, 88, 12, .28), transparent 68%);
}
.mcc-flag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: 7px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .16);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    color: #ffd7bd;
}
.mcc-hero h1 {
    margin: 14px 0 10px;
    font-size: 34px;
    font-weight: 800;
    line-height: 1.24;
    letter-spacing: -.02em;
    color: #fff;
}
.mcc-sub { margin: 0 0 12px; font-size: 15.5px; line-height: 1.78; color: #cfdcf3; max-width: 60ch; }
.mcc-leadtext { margin: 0 0 16px; font-size: 14px; line-height: 1.85; color: #b9c8e2; max-width: 64ch; }
.mcc-leadtext b { color: #ffd7bd; }
.mcc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; }
.mcc-chips li {
    padding: 4px 11px;
    border-radius: 7px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    font-size: 12.5px;
    color: #d6e2f7;
}
.mcc-hero .tk-btn--line { background: rgba(255, 255, 255, .1); color: #eaf1ff; border-color: rgba(255, 255, 255, .24); }
.mcc-hero .tk-btn--line:hover { background: rgba(255, 255, 255, .2); color: #fff; }

/* 右侧进度仪表 */
.mcc-gauge {
    align-self: center;
    padding: 20px 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .14);
    text-align: center;
}
.mcc-gauge-label { font-size: 12px; letter-spacing: .16em; color: #a9bade; font-weight: 700; }
.mcc-gauge-num {
    font-family: var(--tk-mono);
    font-size: 52px;
    font-weight: 700;
    line-height: 1.1;
    color: #ffb37a;
    font-variant-numeric: tabular-nums;
}
.mcc-gauge-num small { font-size: 16px; color: #a9bade; margin-left: 4px; }
.mcc-gauge-note { font-size: 12.5px; color: #b9c8e2; margin-top: 4px; }
.mcc-gauge-bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .16); margin-top: 12px; overflow: hidden; }
.mcc-gauge-bar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #fb923c, #facc15); transition: width .45s ease; }

/* ---------------- 统计条 ---------------- */
.mcc-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: 18px 0;
    border-radius: 16px;
    overflow: hidden;
    background: var(--mcc-card);
    border: 1px solid var(--mcc-line);
    box-shadow: var(--tk-shadow-s);
}
.mcc-stat { padding: 14px 16px; border-right: 1px solid var(--mcc-line2); }
.mcc-stat:last-child { border-right: none; }
.mcc-stat span { display: block; font-size: 12.5px; color: var(--mcc-ink3); }
.mcc-stat strong { font-family: var(--tk-mono); font-size: 25px; font-weight: 700; color: var(--mcc-ink); }
.mcc-stat.is-over strong { color: var(--mcc-red); }
.mcc-stat.is-soon strong { color: var(--mcc-amber); }
.mcc-stat.is-done strong { color: var(--mcc-green); }

/* ---------------- 主区 ---------------- */
.mcc-main { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 18px; align-items: start; }
.mcc-side { display: grid; gap: 18px; align-content: start; }

/* 甘特时间轴 */
.mcc-timeline {
    position: relative;
    padding: 34px 0 8px;
    overflow-x: auto;
}
.mcc-tl-track {
    position: relative;
    min-width: 560px;
    height: 12px;
    border-radius: 99px;
    background: var(--mcc-line2);
}
.mcc-tl-fill {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--mcc-cyan), var(--mcc-orange));
}
.mcc-tl-now {
    position: absolute;
    top: -22px;
    bottom: -18px;
    width: 2px;
    background: var(--mcc-red);
}
.mcc-tl-now::after {
    content: "今天";
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 700;
    color: var(--mcc-red);
    background: var(--mcc-card);
    padding: 0 4px;
    border-radius: 4px;
}
.mcc-tl-marks { position: relative; min-width: 560px; height: 84px; margin-top: 8px; }
.mcc-tl-mark {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    text-align: center;
    width: 110px;
}
.mcc-tl-dot {
    width: 13px; height: 13px;
    border-radius: 50%;
    margin: 0 auto 6px;
    border: 3px solid var(--mcc-card);
    box-shadow: 0 0 0 2px var(--mcc-line);
}
.mcc-tl-mark.is-done .mcc-tl-dot { background: var(--mcc-green); box-shadow: 0 0 0 2px var(--mcc-green); }
.mcc-tl-mark.is-soon .mcc-tl-dot { background: var(--mcc-amber); box-shadow: 0 0 0 2px var(--mcc-amber); }
.mcc-tl-mark.is-over .mcc-tl-dot { background: var(--mcc-red); box-shadow: 0 0 0 2px var(--mcc-red); }
.mcc-tl-mark.is-next .mcc-tl-dot { background: var(--mcc-cyan); box-shadow: 0 0 0 3px var(--mcc-cyan); }
.mcc-tl-mark b { display: block; font-size: 11.5px; color: var(--mcc-ink2); font-weight: 700; line-height: 1.4; }
.mcc-tl-mark i { display: block; font-style: normal; font-size: 10.5px; color: var(--mcc-ink3); font-family: var(--tk-mono); }

/* 看板 */
.mcc-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mcc-lane {
    border: 1px solid var(--mcc-line);
    border-radius: 14px;
    background: var(--mcc-card2);
    padding: 12px;
    min-height: 120px;
}
.mcc-lane-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 800;
    color: var(--mcc-ink2);
}
.mcc-lane-head i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.mcc-lane-head span { margin-left: auto; font-family: var(--tk-mono); font-size: 12px; color: var(--mcc-ink3); }
.mcc-lane.is-over { border-color: color-mix(in srgb, var(--mcc-red) 40%, var(--mcc-line)); }
.mcc-lane.is-over .mcc-lane-head { color: var(--mcc-red); }
.mcc-lane.is-done .mcc-lane-head { color: var(--mcc-green); }
.mcc-lane.is-soon .mcc-lane-head { color: var(--mcc-amber); }
.mcc-item {
    padding: 10px 11px;
    margin-bottom: 8px;
    border-radius: 11px;
    background: var(--mcc-card);
    border: 1px solid var(--mcc-line2);
    border-left: 3px solid var(--mcc-cyan);
    cursor: default;
    transition: transform .14s, box-shadow .16s;
}
.mcc-item:hover { transform: translateY(-1px); box-shadow: var(--tk-shadow-s); }
.mcc-item.is-over { border-left-color: var(--mcc-red); }
.mcc-item.is-soon { border-left-color: var(--mcc-amber); }
.mcc-item.is-done { border-left-color: var(--mcc-green); }
.mcc-item b { display: block; font-size: 13.5px; color: var(--mcc-ink); line-height: 1.45; }
.mcc-item .mcc-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin-top: 5px;
    font-size: 11.5px;
    color: var(--mcc-ink3);
}
.mcc-item .mcc-item-meta .d { font-family: var(--tk-mono); }
.mcc-item .mcc-item-foot { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.mcc-item .mcc-del {
    border: none;
    background: transparent;
    color: var(--mcc-ink3);
    cursor: pointer;
    font-size: 13px;
    padding: 1px 5px;
    border-radius: 5px;
}
.mcc-item .mcc-del:hover { color: var(--mcc-red); background: var(--mcc-red-s); }
.mcc-empty-lane { font-size: 12.5px; color: var(--mcc-ink3); text-align: center; padding: 14px 0; }

/* 阶段筛选 */
.mcc-filters { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-bottom: 12px; }
.mcc-filters .tk-select, .mcc-filters .tk-input { width: auto; min-width: 120px; flex: none; padding: 7px 11px; font-size: 13px; }

/* 表格 */
.mcc-table td.d { font-family: var(--tk-mono); }
.mcc-table tr.is-over td { background: var(--mcc-red-s); }
.mcc-table tr.is-soon td { background: var(--mcc-amber-s); }

/* 清单 */
.mcc-todo { display: grid; gap: 8px; }
.mcc-todo-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px;
    border-radius: 11px;
    background: var(--mcc-card2);
    border: 1px solid var(--mcc-line2);
    font-size: 13.5px;
    color: var(--mcc-ink2);
    line-height: 1.7;
}
.mcc-todo-item .ic { flex: none; font-size: 15px; line-height: 1.5; }
.mcc-todo-item b { color: var(--mcc-ink); }

/* 说明 */
.mcc-spec { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.mcc-spec th, .mcc-spec td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--mcc-line2); }
.mcc-spec th { width: 128px; color: var(--mcc-cyan); font-weight: 700; background: var(--mcc-card2); }
.mcc-spec td { color: var(--mcc-ink2); line-height: 1.8; }
.mcc-spec tr:last-child th, .mcc-spec tr:last-child td { border-bottom: none; }

@media (max-width: 1080px) {
    .mcc-main { grid-template-columns: minmax(0, 1fr); }
    .mcc-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
    .mcc-hero { grid-template-columns: minmax(0, 1fr); padding: 22px 20px 24px; }
    .mcc-hero h1 { font-size: 26px; }
    .mcc-gauge-num { font-size: 40px; }
    .mcc-board { grid-template-columns: minmax(0, 1fr); }
    .mcc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mcc-spec th { width: auto; display: block; border-bottom: none; padding-bottom: 2px; }
    .mcc-spec td { padding-top: 2px; }
}
