/* 后台“外卖”页 */
.tko-badge { display: inline-block; min-width: 20px; height: 20px; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: #e1182f; color: #fff; font-size: 12px; font-weight: 800; line-height: 20px; text-align: center; vertical-align: middle; }
.tko-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.tko-head h2 { margin: 0 auto 0 0; }
.tko-link { font-weight: 600; }
.tko-pill { border: 1px solid #ccc; background: #fff; color: #222; border-radius: 999px; padding: 8px 14px; cursor: pointer; font: inherit; }
.tko-pill.on { background: #222; color: #fff; border-color: #222; }
.tko-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tko-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.tko-card { background: #fff; color: #222; border: 1px solid #ddd; border-radius: 16px; padding: 14px; display: grid; gap: 8px; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.tko-card.new { border: 2px solid #e1182f; box-shadow: 0 0 0 3px rgba(225,24,47,.15); }
.tko-card.done, .tko-card.cancelled { opacity: .6; }
.tko-top { display: flex; align-items: baseline; gap: 8px; }
.tko-code { font: 800 20px ui-monospace, monospace; letter-spacing: 2px; color: #b5121b; }
.tko-sub { color: #777; font-size: 13px; }
.tko-top .tko-sub { margin-right: auto; }
.tko-st { font-size: 13px; padding: 3px 10px; border-radius: 999px; background: #eee; white-space: nowrap; }
.tko-st.new { background: #e1182f; color: #fff; } .tko-st.accepted { background: #b26a00; color: #fff; } .tko-st.ready { background: #2e7d32; color: #fff; }
.tko-who a { font-weight: 700; color: inherit; }
.tko-mode { font-weight: 700; }
.tko-items { list-style: none; margin: 0; padding: 0; border-top: 1px solid #eee; }
.tko-items li { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid #eee; }
.tko-qty { color: #b5121b; }
.tko-amt { white-space: nowrap; }
.tko-total { display: flex; justify-content: space-between; gap: 8px; font-size: 17px; font-weight: 800; }
.tko-gift { background: #fff4dd; border: 1px solid #f0b65a; color: #8a5300; border-radius: 10px; padding: 8px 10px; font-weight: 700; }
.tko-note { background: #f6f3ef; border-radius: 10px; padding: 8px 10px; }
.tko-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.tko-acts button { flex: 1; min-height: 46px; border-radius: 12px; border: 1px solid #ccc; background: #fff; color: #222; font: inherit; font-weight: 700; cursor: pointer; }
.tko-acts .go { background: #e1182f; border-color: #e1182f; color: #fff; }
.tko-acts .ok { background: #2e7d32; border-color: #2e7d32; color: #fff; }
.tko-empty { padding: 40px; text-align: center; color: #777; border: 1px dashed #ccc; border-radius: 16px; }
.tko-br { color: #b5121b; font-weight: 700; font-size: 14px; }
.tko-acts .del { background: #fff; border-color: #b5121b; color: #b5121b; }
.tko-earn { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 0 0 14px; }
.tko-earn-c { background: #1f7a3a; color: #fff; border-radius: 16px; padding: 14px 16px; display: grid; gap: 2px; }
.tko-earn-c strong { font-size: 30px; line-height: 1.1; }
.tko-earn-l { font-weight: 700; opacity: .9; }
.tko-earn-c small { opacity: .85; }
.tko-pay { background: #e8f0ff; border: 1px solid #9db7ef; color: #1d3f8a; border-radius: 10px; padding: 8px 10px; font-weight: 800; font-size: 16px; }
.tko-pay.cash { background: #e9f7ec; border-color: #8fd09d; color: #1f6b33; }
.tko-acts .print { background: #222; border-color: #222; color: #fff; flex: 3; }
.tko-acts .print4 { flex: 1; }
.tko-sauce { background: #fdeef0; border: 1px solid #f0a8b0; color: #8a1220; border-radius: 10px; padding: 8px 10px; font-weight: 700; }

.tko-acts .edit { background: #fff8e1; border-color: #e0a800; color: #6b4e00; }
.tko-chg { background: #fff8e1; border: 1px solid #e0a800; color: #5a4100; border-radius: 10px; padding: 8px 10px; font-size: 14px; display: grid; gap: 2px; }
/* 修改订单窗口 */
.tko-ov { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.45); display: flex; align-items: flex-start; justify-content: center; padding: 12px; overflow: auto; }
.tko-ed { background: #fff; color: #222; border-radius: 16px; padding: 16px; width: min(620px, 100%); max-height: calc(100vh - 24px); overflow: auto; display: grid; gap: 8px; }
.tko-ed h3 { margin: 0; } .tko-ed h4 { margin: 8px 0 0; }
.tko-ed-h { display: flex; align-items: center; gap: 8px; } .tko-ed-h h3 { margin-right: auto; }
.tko-x { border: 0; background: #eee; border-radius: 999px; width: 40px; height: 40px; font-size: 18px; cursor: pointer; }
.tko-ed-list { display: grid; gap: 6px; }
.tko-ed-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid #eee; }
.tko-ed-n { flex: 1; min-width: 0; display: grid; }
.tko-step { display: inline-flex; align-items: center; gap: 6px; }
.tko-step button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid #ccc; background: #fff; font-size: 20px; font-weight: 800; cursor: pointer; }
.tko-step b { min-width: 22px; text-align: center; font-size: 17px; }
.tko-out { min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid #b5121b; background: #fff; color: #b5121b; font-weight: 800; cursor: pointer; }
.tko-ed-add { border: 1px solid #ddd; border-radius: 12px; padding: 8px 10px; }
.tko-ed-add summary { font-weight: 800; cursor: pointer; padding: 4px 0; font-size: 16px; }
.tko-ed-add input { width: 100%; box-sizing: border-box; margin: 6px 0; padding: 10px; border: 1px solid #ccc; border-radius: 10px; font: inherit; }
.tko-picks { display: flex; flex-wrap: wrap; gap: 6px; max-height: 320px; overflow: auto; }
.tko-cat { width: 100%; font-weight: 800; color: #777; margin-top: 6px; font-size: 13px; }
.tko-pick { border: 1px solid #ccc; background: #fff; border-radius: 999px; padding: 8px 12px; font: inherit; cursor: pointer; }
.tko-pick.off { opacity: .45; cursor: not-allowed; }
.tko-broth-pick { width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; background: #fdeef0; border-radius: 10px; padding: 8px; }
.tko-broth-pick select, .tko-ed-list select { padding: 8px; border-radius: 8px; border: 1px solid #ccc; font: inherit; }
.tko-broth-pick .ok { background: #2e7d32; color: #fff; border: 0; border-radius: 8px; padding: 8px 14px; font-weight: 800; cursor: pointer; }
.tko-cash { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.tko-cash input { width: 120px; padding: 10px; border: 1px solid #ccc; border-radius: 10px; font: inherit; }
.tko-warn { background: #fdeef0; color: #8a1220; border-radius: 10px; padding: 8px 10px; font-weight: 700; }
.tko-ed-sum { display: grid; gap: 2px; font-size: 16px; } .tko-ed-sum strong { font-size: 22px; }
.tko-acts button.on { background: #222; border-color: #222; color: #fff; }
.tko-unlock { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 9999; max-width: calc(100% - 32px); border: 0; border-radius: 999px; padding: 14px 22px; background: #e1182f; color: #fff; font-family: inherit; font-size: 17px; font-weight: 700; line-height: 1.3; box-shadow: 0 6px 24px rgba(0,0,0,.35); cursor: pointer; animation: tko-pulse 1.4s ease-in-out infinite; }
.tko-unlock[hidden] { display: none; }
@keyframes tko-pulse { 50% { transform: translateX(-50%) scale(1.05); } }
.tko-stop { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 10000; border: 4px solid #fff; border-radius: 24px; padding: 28px 44px; background: #e1182f; color: #fff; font-family: inherit; font-size: 32px; font-weight: 800; box-shadow: 0 10px 40px rgba(0,0,0,.5); cursor: pointer; }
.tko-stop[hidden] { display: none; }
