/* ==========================================================================
   卤味卤制时间表 · braised-food-time
   独立设计系统「老卤铺」：牛皮纸 / 酱棕 / 卤红 / 八角金
   卤锅液面、三段火候条、印章式工单、药材标签，与前面所有页面区隔。
   ========================================================================== */
.bft-page, .bft-modal, .bft-sheet, .bft-toast {
    --bft-bg: #f6efe3;
    --bft-card: #fffaf1;
    --bft-card2: #f3e9d9;
    --bft-ink: #3b281c;
    --bft-ink2: #7a634e;
    --bft-ink3: #a48e76;
    --bft-line: #e0cfb6;
    --bft-line2: #eee2cf;
    --bft-brown: #6b3a1f;
    --bft-red: #a83a26;
    --bft-gold: #b8892a;
    --bft-green: #567a43;
    --bft-shadow: 0 12px 30px rgba(100, 62, 30, .12);
    --bft-shadow-s: 0 3px 12px rgba(100, 62, 30, .08);
    --bft-mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    --bft-serif: "Songti SC", "Noto Serif CJK SC", Georgia, serif;
}
:root[data-theme="dark"] .bft-page,
:root[data-theme="dark"] .bft-modal,
:root[data-theme="dark"] .bft-sheet,
:root[data-theme="dark"] .bft-toast {
    --bft-bg: #17110c;
    --bft-card: #221911;
    --bft-card2: #2c2116;
    --bft-ink: #f4e7d5;
    --bft-ink2: #c6ac8d;
    --bft-ink3: #90795f;
    --bft-line: #3d2f20;
    --bft-line2: #31261a;
    --bft-brown: #e0b185;
    --bft-red: #ff8b72;
    --bft-gold: #e8c374;
    --bft-green: #96c486;
    --bft-shadow: 0 12px 30px rgba(0, 0, 0, .42);
    --bft-shadow-s: 0 3px 12px rgba(0, 0, 0, .32);
}
.bft-page { background: var(--bft-bg); color: var(--bft-ink); font-size: 15px; line-height: 1.82;
    padding-bottom: 60px; -webkit-font-smoothing: antialiased; }
.bft-page b { color: var(--bft-red); }
.bft-wrap { max-width: 1200px; margin: 0 auto; padding: 0 22px; }
.detail-breadcrumb { font-size: 13px; color: var(--bft-ink2); padding: 18px 0 14px; }
.detail-breadcrumb a { color: var(--bft-ink2); text-decoration: none; }
.detail-breadcrumb a:hover { color: var(--bft-red); }
.detail-breadcrumb .sep { margin: 0 8px; color: var(--bft-ink3); }
.detail-breadcrumb .current { color: var(--bft-ink); font-weight: 700; }

/* ---------- 首屏 ---------- */
.bft-hero { display: grid; grid-template-columns: .78fr 1.22fr; gap: 0;
    background: var(--bft-card); border: 1px solid var(--bft-line); border-radius: 10px;
    box-shadow: var(--bft-shadow); overflow: hidden; }
.bft-pot-box { background: linear-gradient(160deg, #6b3a1f, #462513); color: #f6e6cd; padding: 26px 24px;
    display: flex; flex-direction: column; align-items: center; }
:root[data-theme="dark"] .bft-pot-box { background: linear-gradient(160deg, #3b2415, #26170d); }
.bft-pot-title { width: 100%; display: flex; justify-content: space-between; align-items: baseline;
    font: 700 10px/1 var(--bft-mono); letter-spacing: .16em; color: #d9b58e; margin-bottom: 16px; }
.bft-pot-title b { font: 700 18px/1 var(--bft-mono); color: var(--bft-gold); }
.bft-pot { width: 190px; height: 150px; border: 4px solid #a37a4e; border-top: none;
    border-radius: 0 0 40% 40% / 0 0 30% 30%; position: relative; overflow: hidden;
    background: rgba(0,0,0,.24); }
.bft-pot-rim { position: absolute; left: -10px; right: -10px; top: 0; height: 12px;
    background: #a37a4e; border-radius: 6px; }
.bft-pot-steam { position: absolute; top: 16px; left: 0; right: 0; text-align: center;
    font: 700 13px/1 var(--bft-mono); color: #e8cba2; opacity: .7; z-index: 2; }
.bft-pot-liquid { position: absolute; left: 4px; right: 4px; bottom: 4px; height: 72%;
    background: linear-gradient(180deg, #a9582a, #6d2f14); border-radius: 0 0 38% 38% / 0 0 30% 30%;
    display: grid; place-items: center; font: 700 12px/1.4 var(--bft-mono); color: #ffdfae; }
.bft-timeline-mini { display: flex; width: 100%; max-width: 220px; height: 12px; border-radius: 6px;
    overflow: hidden; margin-top: 20px; }
.bft-timeline-mini i { display: block; height: 100%; }
.bft-pot-cap { margin-top: 12px; font-size: 11px; color: #d9b58e; text-align: center; line-height: 1.7; }
.bft-hero-copy { padding: 38px 40px; display: flex; flex-direction: column; justify-content: center; }
.bft-kicker { display: inline-block; align-self: flex-start; font: 700 10px/1 var(--bft-mono); letter-spacing: .14em;
    color: var(--bft-red); border: 2px solid var(--bft-red); border-radius: 50%; padding: 8px 12px; margin-bottom: 18px; }
.bft-hero h1 { font: 700 clamp(25px, 2.8vw, 35px)/1.4 var(--bft-serif); margin: 0 0 14px; }
.bft-sub { font-size: 14.5px; line-height: 2; color: var(--bft-ink2); margin: 0 0 22px; }
.bft-hero-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.bft-fact { border: 1px solid var(--bft-line); border-radius: 7px; padding: 12px 14px; background: var(--bft-card2); }
.bft-fact.hot { border-top: 3px solid var(--bft-red); }
.bft-fact b { display: block; font: 700 20px/1.3 var(--bft-mono); color: var(--bft-brown); }
.bft-fact.hot b { color: var(--bft-red); }
.bft-fact span { font-size: 11.5px; color: var(--bft-ink2); }

/* ---------- 操作台 ---------- */
.bft-console { margin-top: 20px; background: var(--bft-card); border: 1px solid var(--bft-line);
    border-radius: 10px; padding: 24px 28px 26px; box-shadow: var(--bft-shadow-s); }
.bft-console-head, .bft-block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.bft-console-head h2, .bft-block-head h2 { font: 700 17px/1.5 var(--bft-serif); margin: 0; }
.bft-console-head span, .bft-block-head p { font-size: 12px; color: var(--bft-ink3); }
.bft-food-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 16px 0 22px; }
.bft-food { border: 1px solid var(--bft-line); border-radius: 7px; background: var(--bft-card2);
    padding: 10px 8px; text-align: center; cursor: pointer; font-family: inherit; transition: .15s; }
.bft-food:hover { border-color: var(--bft-red); }
.bft-food.is-on { background: var(--bft-brown); border-color: var(--bft-brown); color: #fff3df; }
:root[data-theme="dark"] .bft-food.is-on { background: var(--bft-red); border-color: var(--bft-red); color: #27120c; }
.bft-food b { display: block; font-size: 12.5px; }
.bft-food small { font: 10.5px/1.4 var(--bft-mono); opacity: .85; }
.bft-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.bft-field--wide { grid-column: span 2; }
.bft-field label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; }
.bft-field label em { font-style: normal; font-weight: 400; color: var(--bft-ink3); }
.bft-field input, .bft-field select, .bft-table input { width: 100%; box-sizing: border-box;
    border: 1px solid var(--bft-line); border-radius: 6px; background: var(--bft-card2);
    color: var(--bft-ink); padding: 9px 11px; font-size: 14px; font-family: inherit; outline: none; }
.bft-field input:focus, .bft-field select:focus { border-color: var(--bft-red); box-shadow: 0 0 0 3px rgba(168,58,38,.12); }
.bft-field small { display: block; margin-top: 6px; font-size: 11.5px; color: var(--bft-ink3); }
.bft-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.bft-btn { font: 600 13.5px/1.4 inherit; padding: 10px 18px; border-radius: 6px; cursor: pointer;
    border: 1px solid var(--bft-line); background: var(--bft-card2); color: var(--bft-ink); transition: .15s; }
.bft-btn:hover { border-color: var(--bft-red); }
.bft-btn--main { background: var(--bft-red); border-color: var(--bft-red); color: #fff; padding: 11px 24px; font-size: 14px; }
:root[data-theme="dark"] .bft-btn--main { color: #27120c; }
.bft-btn--ai { border-color: var(--bft-gold); color: var(--bft-gold); }
.bft-btn--ghost { border-style: dashed; }
.bft-err { margin-top: 12px; padding: 10px 14px; border-radius: 6px; font-size: 13px;
    background: rgba(168,58,38,.09); border: 1px solid var(--bft-red); color: var(--bft-red); }
.bft-ai { margin-top: 16px; border: 1px solid var(--bft-gold); border-radius: 8px; overflow: hidden; }
.bft-ai-head { display: flex; justify-content: space-between; padding: 9px 14px; background: rgba(184,137,42,.13); font-size: 13px; }
.bft-ai-head span { font-size: 12px; color: var(--bft-ink3); }
.bft-ai-out { padding: 14px 16px; font-size: 13.5px; line-height: 1.9; white-space: pre-wrap; }

/* ---------- 工单 ---------- */
.bft-report { display: grid; grid-template-columns: 1.45fr .85fr; gap: 0; margin-top: 20px;
    background: var(--bft-card); border: 1px solid var(--bft-line); border-radius: 10px; overflow: hidden; box-shadow: var(--bft-shadow-s); }
.bft-report-main { padding: 26px 30px 30px; }
.bft-report-side { padding: 26px 26px 30px; background: var(--bft-card2); border-left: 1px dashed var(--bft-line); }
.bft-report-no { font: 700 10px/1 var(--bft-mono); letter-spacing: .18em; color: var(--bft-gold); }
.bft-report h2 { font: 700 20px/1.5 var(--bft-serif); margin: 8px 0; }
.bft-report-main > p { font-size: 13.5px; color: var(--bft-ink2); line-height: 1.9; margin: 0 0 20px; }
.bft-report-side h3 { font: 700 15px/1.5 var(--bft-serif); margin: 0 0 4px; }
.bft-report-side > p { font-size: 11.5px; color: var(--bft-ink3); margin: 0 0 14px; }
.bft-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.bft-kpis div { border: 1px solid var(--bft-line2); border-bottom: 3px solid var(--bft-gold); border-radius: 7px;
    padding: 11px 12px; background: var(--bft-card2); }
.bft-kpis b { display: block; font: 700 16px/1.35 var(--bft-mono); color: var(--bft-brown); }
.bft-kpis span { font-size: 11.5px; color: var(--bft-ink2); }
.bft-flavor { margin-top: 22px; }
.bft-flavor-top { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--bft-ink2); }
.bft-flavor-top b { color: var(--bft-green); }
.bft-flavor-track { height: 12px; border-radius: 7px; background: var(--bft-line2); margin-top: 7px; overflow: hidden; }
.bft-flavor-track i { display: block; height: 100%; border-radius: 7px;
    background: linear-gradient(90deg, var(--bft-gold), var(--bft-red)); transition: width .3s; }
.bft-flavor-scale { display: flex; justify-content: space-between; font: 10px/1.6 var(--bft-mono); color: var(--bft-ink3); margin-top: 4px; }
.bft-ingredients { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.bft-ing { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--bft-ink2);
    border-bottom: 1px dashed var(--bft-line); padding-bottom: 5px; }
.bft-ing b { font-family: var(--bft-mono); color: var(--bft-ink); }
.bft-salt { margin-top: 14px; padding: 11px 13px; border-left: 3px solid var(--bft-brown);
    background: rgba(107,58,31,.08); border-radius: 6px; font-size: 12px; color: var(--bft-ink2); line-height: 1.8; }

/* ---------- 时刻表 / 复卤 ---------- */
.bft-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.bft-block { margin-top: 20px; background: var(--bft-card); border: 1px solid var(--bft-line);
    border-radius: 10px; padding: 22px 26px 26px; box-shadow: var(--bft-shadow-s); }
.bft-block-head { border-bottom: 2px solid var(--bft-brown); padding-bottom: 10px; margin-bottom: 16px; }
.bft-schedule { display: grid; gap: 0; }
.bft-sch { display: grid; grid-template-columns: 74px 1fr 60px; gap: 10px; align-items: center;
    padding: 8px 0; border-bottom: 1px dashed var(--bft-line2); font-size: 12.5px; }
.bft-sch > b { font: 700 12px/1.5 var(--bft-mono); color: var(--bft-red); }
.bft-sch > div b { color: var(--bft-ink); }
.bft-sch > div p { font-size: 11.5px; color: var(--bft-ink2); margin: 1px 0 0; }
.bft-sch > span { font: 700 12px/1.5 var(--bft-mono); color: var(--bft-brown); text-align: right; }
.bft-reuse { display: grid; gap: 10px; }
.bft-reuse-item { display: grid; grid-template-columns: 26px 1fr; gap: 10px;
    font-size: 12.5px; color: var(--bft-ink2); line-height: 1.8; }
.bft-reuse-item > i { width: 24px; height: 24px; border-radius: 50%; background: rgba(184,137,42,.16);
    color: var(--bft-gold); display: grid; place-items: center; font-style: normal; font: 700 11px/1 var(--bft-mono); }
.bft-reuse-item b { color: var(--bft-ink); }

/* ---------- 表格 ---------- */
.bft-table-scroll { overflow-x: auto; }
.bft-table { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 620px; }
.bft-table th { text-align: left; font-size: 11px; color: var(--bft-ink2); background: var(--bft-card2);
    padding: 9px 10px; border-bottom: 2px solid var(--bft-line); white-space: nowrap; }
.bft-table td { padding: 9px 10px; border-bottom: 1px solid var(--bft-line2); }
.bft-table .num { text-align: right; font-family: var(--bft-mono); }
.bft-table tbody tr { cursor: pointer; }
.bft-table tbody tr:hover, .bft-table tr.is-on td { background: rgba(168,58,38,.07); }
.bft-table--batch input { padding: 5px 7px; font-size: 12px; min-width: 66px; }
.bft-table tfoot td { background: var(--bft-card2); border-top: 2px solid var(--bft-line); }
.bft-del { border: none; background: transparent; color: var(--bft-red); cursor: pointer; font-size: 18px; }
.bft-batch-actions { margin-top: 12px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.bft-batch-actions span { font-size: 12px; color: var(--bft-ink3); }

/* ---------- 浮层 ---------- */
.bft-modal[hidden], .bft-toast[hidden], .bft-err[hidden], .bft-ai[hidden] { display: none !important; }
.bft-modal { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: center; justify-content: center;
    padding: 20px; background: rgba(42, 24, 14, .64); }
.bft-sheet { position: relative; width: min(520px, 100%); background: var(--bft-card); color: var(--bft-ink);
    border: 1px solid var(--bft-line); border-radius: 10px; padding: 28px 30px; box-shadow: var(--bft-shadow); }
.bft-sheet h3 { font: 700 19px/1.5 var(--bft-serif); margin: 0 0 8px; }
.bft-sheet p { font-size: 13px; color: var(--bft-ink2); line-height: 1.85; margin: 0 0 16px; }
.bft-code { display: block; font: 12px/1.7 var(--bft-mono); word-break: break-all; background: var(--bft-card2);
    border: 1px dashed var(--bft-line); border-radius: 6px; padding: 11px 13px; color: var(--bft-red); }
.bft-modal-x { position: absolute; right: 14px; top: 10px; border: none; background: transparent;
    font-size: 25px; color: var(--bft-ink3); cursor: pointer; }
.bft-sheet-actions { margin-top: 18px; display: flex; justify-content: flex-end; }
.bft-toast { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); z-index: 9100;
    background: #462513; color: #fff2dd; padding: 11px 20px; border-radius: 8px; font-size: 13px; box-shadow: var(--bft-shadow); }

@media (max-width: 1000px) {
    .bft-hero { grid-template-columns: 1fr; }
    .bft-hero-copy { padding: 28px 24px; }
    .bft-food-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .bft-fields { grid-template-columns: 1fr 1fr; }
    .bft-report { grid-template-columns: 1fr; }
    .bft-report-side { border-left: none; border-top: 1px dashed var(--bft-line); }
    .bft-cols { grid-template-columns: 1fr; }
    .bft-kpis { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
    .bft-wrap { padding: 0 12px; }
    .bft-console, .bft-report-main, .bft-block, .bft-hero-copy { padding-left: 16px; padding-right: 16px; }
    .bft-hero h1 { font-size: 23px; }
    .bft-food-grid { grid-template-columns: 1fr 1fr; }
    .bft-fields, .bft-field--wide { grid-template-columns: 1fr; grid-column: auto; }
    .bft-hero-facts { grid-template-columns: 1fr; }
    .bft-ingredients { grid-template-columns: 1fr; }
    .bft-actions .bft-btn { flex: 1 1 45%; }
}
@media print { .bft-page { background: #fff; } .bft-actions, .bft-modal, .bft-toast, .bft-batch-actions { display: none !important; } }

/* ===== 窄屏溢出兜底：grid/flex 子项 min-width:0，公共推荐位不撑宽页面 ===== */
.tool-rec-item { min-width: 0; max-width: 100%; box-sizing: border-box; }
@media (max-width: 1000px) {
    .bft-cols > *, .bft-two-col > *, .bft-c > *, .bft-report > *, .bft-hero > *,
    .bft-grid-wrap > *, .bft-console-grid > *, .bft-dual > *, .bft-report-grid > * { min-width: 0; }
}
@media (max-width: 620px) {
    .bft-page, .bft-wrap, .bft-block, .bft-report, .bft-console, .bft-hero { max-width: 100%; }
    .bft-table-scroll { max-width: 100%; }
    .bft-cols > *, .bft-two-col > *, .bft-report > *, .bft-grid-wrap > *, .bft-block { min-width: 0; max-width: 100%; }
    .bft-page .tskb-related .tskb-rel-grid { grid-template-columns: 1fr 1fr; min-width: 0; }
}
