/* ===== 稀释涂布菌落计数 · 培养皿 ===== */
.cfu {
    background: #faf9fd;
    border: 1px solid #e6e0f0;
    border-radius: 12px;
    padding: 24px 22px;
    margin-bottom: 26px;
    box-shadow: 0 10px 30px rgba(70, 45, 120, .07);
}

.cfu-stage {
    display: grid;
    grid-template-columns: 216px 1fr;
    gap: 24px;
    align-items: center;
}

/* ---- 培养皿 ---- */
.cfu-dish-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cfu-dish {
    position: relative;
    width: 196px; height: 196px; border-radius: 50%;
    background: radial-gradient(circle at 34% 28%, #fffdf2, #f7ead0 62%, #eadbbd 100%);
    border: 7px solid #e8edf2;
    box-shadow:
        0 6px 20px rgba(70, 55, 30, .16),
        inset 0 0 24px rgba(160, 130, 80, .22),
        inset 0 6px 12px rgba(255, 255, 255, .8);
    overflow: hidden;
}
.cfu-dish::after {
    content: '';
    position: absolute; inset: 0; border-radius: 50%;
    background: linear-gradient(125deg, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, 0) 38%);
    pointer-events: none;
}
.cfu-colony {
    position: absolute; border-radius: 50%;
    background: radial-gradient(circle at 34% 30%, #fde68a, #ca8a04 78%);
    box-shadow: 0 0 2px rgba(120, 80, 0, .35);
}
.cfu-colony:nth-child(3n) { background: radial-gradient(circle at 34% 30%, #fff1c2, #a16207 80%); }
.cfu-colony:nth-child(4n) { background: radial-gradient(circle at 34% 30%, #fef9c3, #d97706 80%); }
.cfu-dish-label {
    font: 700 11px/1.3 ui-monospace, monospace; color: #7c5aa6; text-align: center;
}
.cfu-dish-label em { display: block; font-style: normal; font-size: 9px; color: #a49ab8; font-weight: 400; }

/* ---- 读数 ---- */
.cfu-read {
    background: #fff; border: 1px solid #e6e0f0; border-radius: 10px;
    padding: 16px 18px; display: flex; flex-direction: column; gap: 12px;
}
.cfu-big { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.cfu-big b {
    font: 700 36px/1 ui-monospace, Consolas, monospace; color: #7c3aed;
    font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.cfu-big i { font-style: normal; font-size: 11px; color: #a49ab8; }
.cfu-big span {
    margin-left: auto; font: 700 11px/1.4 ui-monospace, monospace;
    padding: 4px 9px; border-radius: 4px;
    background: #f3f0fa; color: #6d5a8f; border: 1px solid #e6e0f0;
}
.cfu-big span.ok { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.cfu-big span.bad { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }

.cfu-gauge {
    position: relative; height: 34px; border-radius: 6px;
    background: linear-gradient(90deg, #f3f0fa 0%, #ede9fe 100%);
    border: 1px solid #e6e0f0; overflow: hidden;
}
.cfu-gauge-ok {
    position: absolute; top: 0; bottom: 0;
    background: rgba(16, 185, 129, .18);
    border-left: 1px solid rgba(16, 185, 129, .45);
    border-right: 1px solid rgba(16, 185, 129, .45);
}
.cfu-gauge-pin {
    position: absolute; top: -2px; bottom: -2px; width: 3px;
    background: #7c3aed; border-radius: 2px;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, .16);
    transition: left .35s;
}
.cfu-gauge-txt {
    position: absolute; left: 8px; bottom: 3px;
    font: 700 8.5px/1 ui-monospace, monospace; color: #a49ab8;
}
.cfu-gauge-txt.right { left: auto; right: 8px; }
.cfu-gauge-ok-txt {
    position: absolute; left: 50%; transform: translateX(-50%); bottom: 3px;
    font: 700 8.5px/1 ui-monospace, monospace; color: #059669;
}

.cfu-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cfu-cell {
    background: #f8f6fc; border: 1px solid #eee9f6; border-radius: 7px; padding: 8px 10px;
}
.cfu-cell span { display: block; font-size: 9.5px; color: #a49ab8; }
.cfu-cell b {
    font: 700 13px/1.35 ui-monospace, monospace; color: #4c3575;
    font-variant-numeric: tabular-nums;
}

/* ---- 稀释梯度 ---- */
.cfu-steps { margin-top: 20px; }
.cfu-steps-head {
    display: flex; justify-content: space-between; align-items: baseline;
    font-size: 10.5px; color: #a49ab8; margin-bottom: 8px;
}
.cfu-steps-head b { color: #7c3aed; font-family: ui-monospace, monospace; }
.cfu-tubes { display: flex; gap: 6px; }
.cfu-tube {
    flex: 1 1 0; text-align: center; padding: 8px 2px 7px;
    background: #fff; border: 1px solid #e6e0f0; border-radius: 6px;
    font: 700 10.5px/1.2 ui-monospace, monospace; color: #a49ab8;
    position: relative;
}
.cfu-tube::before {
    content: ''; position: absolute; left: 50%; top: -1px; width: 1px; height: 4px;
    background: #e6e0f0;
}
.cfu-tube.active {
    background: linear-gradient(180deg, #f5f3ff, #ede9fe);
    border-color: #c4b5fd; color: #6d28d9;
    box-shadow: 0 2px 8px rgba(124, 58, 237, .12);
}
.cfu-tube small { display: block; font-size: 8px; font-weight: 400; color: #b3a8c6; margin-top: 2px; }
.cfu-tube.active small { color: #8b5cf6; }

/* ---- 参数 ---- */
.cfu-params { margin-top: 20px; border-top: 1px solid #e6e0f0; padding-top: 15px; }
.cfu-params h2 { font-size: 12px; letter-spacing: .07em; color: #5b4a75; margin: 0 0 11px; }
.cfu-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; }
.cfu-grid label { display: flex; flex-direction: column; gap: 4px; }
.cfu-grid span { font-size: 10.5px; color: #a49ab8; }
.cfu-grid input, .cfu-grid select {
    font: inherit; font-size: 12px; padding: 7px 9px; border: 1px solid #e6e0f0;
    border-radius: 5px; background: #fff; color: #4c3575; font-variant-numeric: tabular-nums;
    min-width: 0;
}
.cfu-grid input:focus, .cfu-grid select:focus { outline: 2px solid rgba(124, 58, 237, .16); border-color: #7c3aed; }
.cfu-grid input.is-bad { border-color: #dc2626; background: #fff1f2; }

.cfu-verdict {
    margin: 16px 0 0; padding: 10px 13px; border-radius: 8px;
    font-size: 11.5px; line-height: 1.7; color: #4c3575; background: #f7f4fe;
    border-left: 3px solid #8b5cf6;
}
.cfu-verdict.bad { color: #9f1239; background: #fff5f7; border-left-color: #e11d48; }
.cfu-note { margin: 12px 0 0; font-size: 11px; line-height: 1.8; color: #a49ab8; }

@media (max-width: 820px) {
    .cfu-stage { grid-template-columns: 1fr; justify-items: center; }
    .cfu-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .cfu { padding: 16px 13px; }
    .cfu-dish { width: 160px; height: 160px; }
    .cfu-meta { grid-template-columns: 1fr; }
    .cfu-tubes { flex-wrap: wrap; }
    .cfu-tube { flex: 1 1 28%; }
}

/* ---- 深色 ---- */
[data-theme="dark"] .cfu { background: #100e16; border-color: #2a2436; box-shadow: none; }
[data-theme="dark"] .cfu-read { background: #171420; border-color: #2a2436; }
[data-theme="dark"] .cfu-dish { border-color: #2f2a3c; background: radial-gradient(circle at 34% 28%, #2b2518, #221d14 62%, #1a1610 100%); }
[data-theme="dark"] .cfu-big b { color: #c4b5fd; }
[data-theme="dark"] .cfu-big i, [data-theme="dark"] .cfu-cell span, [data-theme="dark"] .cfu-grid span, [data-theme="dark"] .cfu-steps-head { color: #8f85a3; }
[data-theme="dark"] .cfu-gauge { background: linear-gradient(90deg, #1d1a26, #241f30); border-color: #2a2436; }
[data-theme="dark"] .cfu-cell { background: #1b1725; border-color: #2a2436; }
[data-theme="dark"] .cfu-cell b { color: #d6c8f5; }
[data-theme="dark"] .cfu-tube { background: #171420; border-color: #2a2436; color: #8f85a3; }
[data-theme="dark"] .cfu-tube.active { background: linear-gradient(180deg, #241d33, #2a2140); border-color: #6d28d9; color: #c4b5fd; }
[data-theme="dark"] .cfu-params { border-color: #2a2436; }
[data-theme="dark"] .cfu-params h2 { color: #c0b4d8; }
[data-theme="dark"] .cfu-grid input, [data-theme="dark"] .cfu-grid select { background: #171420; border-color: #2a2436; color: #d6c8f5; }
[data-theme="dark"] .cfu-verdict { background: rgba(139, 92, 246, .1); color: #d6c8f5; }
[data-theme="dark"] .cfu-verdict.bad { background: rgba(190, 18, 60, .12); color: #fda4af; }
