.mc-dialog{box-sizing:border-box;width:min(1050px,96vw);max-height:92vh;margin:auto;padding:28px;border:1px solid #9e8ce255;border-radius:24px;background:radial-gradient(ellipse at top right,#55327235,transparent 60%),#111b2d;color:#edf3ff;box-shadow:0 32px 120px #0009;color-scheme:dark;overflow-y:auto}
.mc-dialog::backdrop{background:#050917be;backdrop-filter:blur(7px)}
.mc-queue-tabs{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:22px 0}.mc-queue-tabs button{display:grid;grid-template-columns:1fr auto;gap:8px;text-align:left;padding:20px;border:1px solid #b798e847;border-radius:18px;color:#d6dfef;background:linear-gradient(125deg,#253048,#2c2343)}.mc-queue-tabs button>span{font-size:16px;font-weight:700}.mc-queue-tabs button>b{font-size:26px;grid-row:span 2;color:#ffc967}.mc-queue-tabs button>small{grid-column:1;font-size:12px}.mc-queue-tabs button[aria-pressed=true]{border:2px solid #ffc967;background:linear-gradient(125deg,#6e461b40,#302342);box-shadow:0 0 24px #ffc96713}.mc-queue-tabs button[data-bucket=PROCESS]>b{color:#64f5cd}.mc-queue-tabs button[data-bucket=PROCESS][aria-pressed=true]{border-color:#64f5cd;background:linear-gradient(125deg,#15473e,#252342);box-shadow:0 0 24px #64f5cd14}.mc-queue-heading{display:flex;justify-content:space-between;align-items:center;gap:15px}.mc-queue-heading p{margin:0;font-size:13px}.mc-queue-card{display:grid;grid-template-columns:minmax(0,1fr) minmax(240px,1fr) auto;border-left:3px solid #ffc967}.mc-queue-ready{border-left-color:#64f5cd}.mc-queue-identity .mc-pill{margin:9px 0 4px}.mc-queue-progress{display:flex;gap:14px;align-items:center}.mc-queue-progress>b{color:#ffe0a0}.mc-mini-ring{display:grid;place-items:center;position:relative;isolation:isolate;width:58px;height:58px;flex-shrink:0;border-radius:50%;background:conic-gradient(#64f5cd var(--mc-progress),#54627840 0);font-size:16px;font-weight:750}.mc-mini-ring:before{content:"";position:absolute;inset:4px;border-radius:50%;background:#1d2940;z-index:-1}.mc-eye-tags{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}.mc-eye-tags>span{font-size:11px;border-radius:9px;padding:5px 7px;background:#ffc96712;color:#ffcf83}.mc-eye-tags>.assigned{background:#64f5cd15;color:#91ffe0}.mc-queue-action{font-size:12px;color:#c6b2ff}.mc-queue-empty{padding:30px 18px;text-align:center;border:1px dashed #a998dc55;border-radius:16px;margin:18px 0}.mc-queue-empty p{font-size:13px}
@media(max-width:850px){.mc-queue-card{grid-template-columns:1fr 1fr}.mc-queue-action{grid-column:1/-1;text-align:right}}
@media(max-width:540px){.mc-queue-tabs{gap:9px}.mc-queue-tabs button{padding:13px;grid-template-columns:1fr}.mc-queue-tabs button>span{font-size:14px}.mc-queue-tabs button>b{grid-row:auto;grid-row-start:2}.mc-queue-tabs button>small{grid-row:3}.mc-queue-card{grid-template-columns:1fr}.mc-queue-progress{margin-top:5px}.mc-queue-heading{align-items:flex-start}.mc-queue-tabs button>small{font-size:11px}}
.mc-dialog *,.mc-metrics *{box-sizing:border-box}.mc-dialog [hidden],.mc-metrics [hidden]{display:none!important}
.mc-header,.mc-section-head,.mc-order-line,.mc-eye-head,.mc-actions,.mc-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.mc-header{border-bottom:1px solid #a89cdf33;padding-bottom:18px;margin-bottom:20px}.mc-header h2{margin:4px 0;font-size:26px}.mc-kicker{color:#9ee8ff;font-size:11px;letter-spacing:2px;font-weight:700}.mc-dialog h3{margin:14px 0 8px}.mc-dialog h4{font-size:16px;line-height:1.5;margin:18px 0 10px}.mc-dialog p,.mc-metrics p{line-height:1.65;color:#b9c6dc}.mc-lead{margin-top:7px}.mc-dialog small{display:block;color:#aabbd5;line-height:1.5;font-weight:400}.mc-dialog label{display:grid;gap:8px;font-weight:600;color:#e1eaff;min-width:0}.mc-dialog input,.mc-dialog select,.mc-dialog textarea{width:100%;border-radius:11px;border:1px solid #a191da44;background:#0b1326;color:#f1f6ff;padding:12px 13px;min-height:46px;font:inherit}.mc-dialog textarea{min-height:96px;resize:vertical}.mc-dialog button{font:inherit;min-height:44px;cursor:pointer}.mc-dialog button:disabled{cursor:not-allowed;opacity:.5}.mc-dialog button:focus-visible,.mc-dialog input:focus-visible,.mc-dialog select:focus-visible,.mc-dialog summary:focus-visible,.mc-metrics summary:focus-visible{outline:3px solid #47ddff;outline-offset:3px}.mc-dialog .primary-button,.mc-metrics .primary-button{background:linear-gradient(120deg,#fff06f,#ffd229);color:#231d00;border:0;border-radius:12px;padding:12px 20px;font-weight:750}.mc-dialog .secondary-button,.mc-metrics .secondary-button{background:#ac8cf818;color:#eee9ff;border:1px solid #b497ee48;border-radius:12px;padding:10px 15px}.mc-dialog .secondary-button:hover{background:#ac8cf831}
#mc-error{color:#ffb7c8;white-space:pre-wrap;line-height:1.6}#mc-error:not(:empty){padding:14px;border:1px solid #ff7b9c77;border-radius:12px;background:#ff4f8912;margin-bottom:18px}
.mc-search{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:end;margin:22px 0}.mc-result,.mc-ref{display:flex;width:100%;align-items:center;justify-content:space-between;gap:16px;text-align:left;background:linear-gradient(125deg,#1d2d47,#25203c);color:#edf4ff;border:1px solid #9e8ce233;border-radius:15px;padding:18px;margin:10px 0;overflow-wrap:anywhere}.mc-result:hover,.mc-ref:hover,.mc-ref.selected{border-color:#42e6dd;background:linear-gradient(125deg,#164348,#302444)}.mc-result b,.mc-ref b{display:block;font-size:15px}.mc-stock{flex-shrink:0;font-size:12px;color:#8ff2d5}.mc-stock b{font-size:23px}.mc-pill{display:inline-block;background:#a47cf91c;border:1px solid #aa8aea3b;border-radius:30px;padding:7px 12px;color:#d8c6ff;font-size:12px}.mc-order-line{justify-content:flex-start}.mc-steps{display:flex;gap:10px;flex-wrap:wrap;margin:24px 0}.mc-steps span{padding:9px 13px;border-radius:20px;background:#7486a516;color:#98a5be;font-size:12px}.mc-steps .done{color:#84ffe0;background:#20e2b51a;border:1px solid #20e2b52e}.mc-note{border:1px solid #ffda694f;background:linear-gradient(130deg,#a17b1614,#4c2a681c);padding:20px;border-radius:16px;margin:18px 0}.mc-note p:last-child{margin-bottom:0}.mc-note form{display:grid;grid-template-columns:1fr auto;align-items:end;gap:15px;margin-top:15px}.mc-eyes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:22px 0}.mc-eye{min-width:0;border:1px solid #be8cfd57;border-radius:22px;padding:23px;background:radial-gradient(ellipse at 0 0,#ae5af729,transparent 75%),#1b243a}.mc-eye.mc-ready{border-color:#33eec353;background:radial-gradient(ellipse at 0 0,#19e8c023,transparent 75%),#18273a}.mc-eye-head{justify-content:flex-start;flex-wrap:nowrap}.mc-eye-head h3{margin:0 0 8px}.mc-eye-symbol{display:grid;place-items:center;width:68px;height:68px;flex-shrink:0;border:3px solid #b07eff;border-radius:50%;color:#d9b7ff;font-size:21px;font-weight:700;box-shadow:0 0 20px #a05cff24}.mc-ready .mc-eye-symbol{border-color:#35ecc7;color:#8bffe4;box-shadow:0 0 24px #22ecc728}.mc-actions{justify-content:flex-start;margin-top:22px}.mc-actions button{font-size:12px;padding:10px 11px}.mc-summary{display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap;padding:20px;background:#96c2ff0a;border-radius:14px;color:#bac9df}.mc-summary b{color:#fff;display:block;font-size:23px;margin-bottom:5px}.mc-history{border:1px solid #ad94e32d;background:#9b7ded08;border-radius:16px;padding:18px;margin-top:20px}.mc-history summary{cursor:pointer;font-weight:600;color:#d9d3f8;line-height:1.6}.mc-history-item{padding:18px 0;border-bottom:1px solid #a68fe829;overflow-wrap:anywhere}.mc-history-item:last-child{border:0}.mc-history-item p{font-size:13px;margin:7px 0}.mc-damage-note{margin:10px 0;padding:16px;border-radius:12px;background:#f56ba010;border-left:3px solid #fca773}.mc-form{display:grid;gap:20px;margin-top:20px}.mc-fields{display:grid;grid-template-columns:1fr 1fr;gap:18px}.mc-form .mc-footer{justify-content:flex-end}.mc-check{display:flex!important;align-items:center;gap:10px!important}.mc-check input{width:20px;min-height:20px;flex-shrink:0}.mc-help{font-size:12px;color:#a7b8d1}.mc-photo{display:block;max-width:100%;max-height:450px;object-fit:contain;margin-top:15px}.mc-metrics{margin:28px 0;padding:24px;background:radial-gradient(ellipse at 90% 0,#7047b21c,transparent 65%),#182136;border:1px solid #af8ee83b;border-radius:24px}.mc-metrics h2{margin:7px 0}.mc-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:22px 0}.mc-kpis article{padding:21px;border:1px solid #9c7eef40;border-radius:19px;background:linear-gradient(135deg,#8760df24,#1c31421a);overflow-wrap:anywhere}.mc-kpis article:nth-child(2){border-color:#27ddbb44;background:linear-gradient(135deg,#20bc9a20,#1c31421a)}.mc-kpis article:nth-child(3){border-color:#f3bd5844;background:linear-gradient(135deg,#c1922922,#1c31421a)}.mc-kpis article:nth-child(4){border-color:#3ec4ff44}.mc-kpis span,.mc-kpis small{display:block;color:#b2bfd8;font-size:12px}.mc-kpis strong{display:block;color:#fff;font-size:28px;margin:14px 0}.mc-rank-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}.mc-rank-grid h3{font-size:14px;color:#cdb4fd}.mc-rank{display:flex;gap:16px;justify-content:space-between;border-bottom:1px solid #ffffff0c;padding:11px 0;font-size:12px}.mc-rank b{color:#78f5d8}.mc-rank span{overflow-wrap:anywhere}.mc-metrics .mc-result{font:inherit;cursor:pointer}
@media(max-width:720px){.mc-dialog{padding:18px;width:97vw;max-height:94dvh;border-radius:18px}.mc-header h2{font-size:21px}.mc-eyes,.mc-fields,.mc-rank-grid{grid-template-columns:1fr}.mc-eye{padding:19px}.mc-search,.mc-note form{grid-template-columns:1fr}.mc-kpis{grid-template-columns:1fr 1fr}.mc-metrics{padding:16px}.mc-kpis article{padding:14px}.mc-kpis strong{font-size:22px}.mc-result{flex-wrap:wrap;padding:15px}.mc-eye-symbol{width:58px;height:58px}.mc-dialog input,.mc-dialog select,.mc-dialog textarea{font-size:16px}.mc-form .mc-footer button{width:100%}.mc-summary{gap:14px}.mc-ref{gap:10px;padding:14px}.mc-ref b{font-size:13px}}

/* Unified production board: all work sources, explicit stage/material counters. */
#production-board.production-unified{display:block;min-width:0}
.production-filters{display:flex;align-items:end;gap:14px;flex-wrap:wrap;margin:18px 0}
.production-filters label{display:grid;gap:7px;flex:1;min-width:180px;color:#bfcbe0}
.production-filters input,.production-filters select{width:100%;min-width:0;padding:13px;background:#11182c;border:1px solid #75658f;border-radius:12px;color:#edf2ff}
.production-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.production-tabs button{display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left;padding:18px;border-radius:18px;border:1px solid #76628f;background:linear-gradient(140deg,#342a4a,#19243b);color:#e6edff;cursor:pointer;font:inherit}
.production-tabs button b{font-size:25px;color:#54f4cf}.production-tabs button[aria-pressed=true]{border:2px solid #ffcf40;box-shadow:0 0 22px #ffcf401b}.production-tabs button[aria-pressed=true] b{color:#ffcf40}
.production-reconcile{background:#18303366;border:1px solid #54f4cf55;padding:16px;border-radius:14px;line-height:1.65;color:#c4d6e8}.production-reconcile small{display:block;color:#a7b8ce}
.production-stage{padding:18px;border-radius:20px;border:1px solid #7d65a1;background:linear-gradient(140deg,#28203c99,#131c2e99)}
.production-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.production-cards .workflow-card{margin:0;min-width:0}.production-open{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:9px;border:0;background:none;width:100%;color:inherit;font:inherit;padding:0;cursor:pointer;overflow-wrap:anywhere}.production-open .workflow-order{width:100%;flex-wrap:wrap}.production-open .status-pill{white-space:normal}
.production-pager{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:20px}.production-pager button:disabled{opacity:.45}
@media(max-width:1000px){.production-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.production-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}.production-tabs button{padding:12px;font-size:13px}.production-cards{grid-template-columns:1fr}.production-stage{padding:12px}.production-filters{display:grid;grid-template-columns:1fr}.production-pager{flex-wrap:wrap}.production-pager button{padding:10px}.production-reconcile{font-size:13px}}

.inv-detail-toggle{margin:22px 0}.mc-delivery-head{display:flex;align-items:center;justify-content:space-between;gap:18px}.mc-delivery-head p{color:#bdc9e2;line-height:1.6}.mc-delivery-head h3{font-size:22px}.mc-delivery-head #mc-pending-count{color:#ffcf40;font-size:30px}#inv-details[hidden]{display:none!important}@media(max-width:600px){.mc-delivery-head{align-items:stretch;flex-direction:column}.inv-detail-toggle{width:100%}}
