/* Orders are the unit of this desk; the production phase belongs to each card. */
.production-order-cards{container:production-order-cards/inline-size;display:flex;flex:1;flex-direction:column;gap:14px;width:100%;min-width:0;min-height:0;overflow:auto;overflow-x:hidden;overscroll-behavior:contain;padding:2px 5px 14px 2px;color:var(--txt)}
.poc-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;min-width:0;align-items:stretch}
.poc-card{--poc-phase:var(--blue);--poc-phase-rgb:138,183,217;display:flex;flex-direction:column;min-width:0;margin:0;border:1px solid var(--steel);border-top:3px solid var(--poc-phase);border-radius:10px;background:var(--bg2);overflow:hidden}
.poc-card:focus-within{border-color:var(--gold)}
.poc-open{display:flex;flex:1;flex-direction:column;align-items:stretch;gap:10px;width:100%;min-width:0;padding:15px 16px;border:0;border-radius:0;background:transparent;color:var(--txt);font:inherit;text-align:left;cursor:pointer}
.poc-open:hover{background:var(--surface-raised)}
.poc-status{display:inline-flex;align-items:center;align-self:flex-start;gap:7px;max-width:100%;padding:5px 8px;border-radius:6px;background:color-mix(in srgb,var(--poc-phase) 14%,var(--bg2));color:var(--txt-hi);font-size:12px;font-weight:650;line-height:1.4;overflow-wrap:anywhere}
.poc-status i{width:5px;height:5px;flex:none;border-radius:50%;background:var(--poc-phase)}
.poc-title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;color:var(--txt-hi);font-size:16px;font-weight:650;line-height:1.45}
.poc-description{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;white-space:normal;font-size:14px;line-height:1.6;color:var(--txt)}
.poc-description.is-empty{color:var(--txt-lo);font-size:12px}
.poc-client{color:var(--txt-lo);font-size:13px;line-height:1.5;overflow-wrap:anywhere}
.poc-facts{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:7px 12px;margin-top:3px}
.poc-date{font-size:12px;line-height:1.5;color:var(--txt-lo)}
.poc-budget{font-size:13px;line-height:1.5;font-weight:650;color:var(--txt-hi);white-space:nowrap;font-variant-numeric:tabular-nums}
.poc-team-line{display:flex;justify-content:space-between;align-items:baseline;flex-wrap:wrap;gap:5px 12px;font-size:12px;line-height:1.5;color:var(--txt-lo)}
.poc-team-line>span{min-width:0;overflow-wrap:anywhere}
.poc-next{display:flex;flex-direction:column;gap:4px;padding:9px 11px;border-left:2px solid var(--poc-phase);background:var(--steel-lo);font-size:14px;line-height:1.55}
.poc-next small{color:var(--gold-hi);font-size:12px;line-height:1.5}
.poc-next>span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.poc-comment{display:block;min-width:0;margin-top:2px;padding:10px 11px;border-left:2px solid var(--poc-phase);border-radius:0 6px 6px 0;background:var(--steel-lo)}
.poc-dates{display:flex;flex-direction:column;gap:3px;min-width:0}
.poc-comment-text{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;quotes:'«' '»';font-size:13px;line-height:1.6;color:var(--txt)}
.poc-comment-byline{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:4px 8px;margin-top:6px;color:var(--txt-lo);font-size:12px;line-height:1.5}
.poc-comment-byline>span{min-width:0;overflow-wrap:anywhere}.poc-comment-byline time{font-variant-numeric:tabular-nums}
.poc-stage-control{display:flex;align-items:center;gap:10px;min-width:0;padding:9px 14px;border-top:1px solid var(--steel);font-size:12px;color:var(--txt-lo)}
.poc-stage-control>span{flex:none}.poc-stage-control select{flex:1;min-width:0;max-width:100%;min-height:34px;margin:0;padding:6px 9px;border:1px solid var(--steel-hi);border-radius:6px;background:var(--bg);color:var(--txt);font:12px var(--font-ui);box-sizing:border-box}
.poc-pagination{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px;padding:8px 0 2px;margin-top:2px;font-size:12px;color:var(--txt-lo)}
.poc-pagination .po-button{min-height:36px;min-width:78px;padding:7px 12px;font-size:12px}
.poc-feedback{margin:0;padding:16px 4px;color:var(--txt-lo);font-size:13px;line-height:1.6;overflow-wrap:anywhere}
.poc-error{display:flex;align-items:center;gap:12px;flex-wrap:wrap;color:var(--red)}
.production-order-cards button:focus-visible,.production-order-cards select:focus-visible{outline:2px solid var(--gold);outline-offset:-3px}
.production-order-cards button:disabled,.production-order-cards select:disabled{cursor:default}
.production-order-cards[aria-busy=true] .poc-grid{opacity:.65}
@container production-order-cards (max-width:560px){.poc-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:600px){.production-order-cards{padding-right:2px}.poc-grid{grid-template-columns:minmax(0,1fr);gap:10px}.poc-open{padding:13px;gap:9px}.poc-title{font-size:16px}.poc-stage-control{padding:9px 12px}.poc-stage-control select{min-height:44px;font-size:16px}.poc-pagination .po-button{min-height:42px}.poc-feedback{padding:12px 2px}}
@media(max-width:850px){.crm-dashboard-orders .production-order-cards{overflow:visible;min-height:auto;padding-right:0}}

/* Team orders keep the squad identity above the card; the next action stays in the reading area. */
.is-team-cards .poc-grid{padding-top:25px;row-gap:38px}
.poc-team-card{container:team-order-card/inline-size;position:relative;border:1px solid var(--steel);border-radius:14px;background:var(--bg2);overflow:visible;box-shadow:0 2px 8px rgb(0 0 0 / .05)}
.poc-team-card:hover{border-color:var(--steel-hi)}
.poc-team-card:focus-within{border-color:var(--gold)}
.poc-team-card .poc-open{min-height:346px;padding:18px;gap:10px;border-radius:14px}
.poc-team-card .poc-open:hover{background:transparent}
.poc-team-header{display:grid;grid-template-columns:minmax(0,1fr) 112px minmax(0,1fr);gap:8px;align-items:start;min-height:79px;width:100%;min-width:0}
.poc-team-header .poc-status{grid-column:1;display:flex;justify-content:center;gap:5px;align-items:center;min-height:44px;width:100%;margin-top:6px;padding:7px 6px;text-align:center;font-size:12px;font-weight:650;line-height:1.4}
.poc-team-header .poc-status>span{min-width:0;overflow-wrap:anywhere}
.poc-team-header .poc-status>svg{flex:none}
.poc-team-avatar-stack{grid-column:2;position:relative;display:flex;align-items:center;justify-content:center;width:112px;height:112px;margin-top:-43px}
.poc-team-avatar.identity-avatar,.poc-team-fallback{display:flex;align-items:center;justify-content:center;flex:none;width:112px;height:112px;border:3px solid var(--bg2);border-radius:50%;background:color-mix(in srgb,var(--poc-team-color,var(--gold)) 22%,var(--bg2));color:var(--txt-hi);font-size:36px;box-shadow:0 5px 13px rgb(0 0 0 / .12)}
.poc-team-avatar.identity-avatar img{border-radius:50%}
.poc-team-avatar-stack.is-multiple{height:88px}
.poc-team-avatar-stack.is-multiple .identity-avatar{width:72px;height:72px;font-size:26px}
.poc-team-avatar-stack.is-multiple .identity-avatar+.identity-avatar{margin-left:-32px}
.poc-team-extra{position:absolute;right:-4px;bottom:0;display:grid;place-items:center;min-width:28px;height:28px;padding:0 5px;border:2px solid var(--bg2);border-radius:50%;background:var(--surface-raised);color:var(--txt-hi);font-size:11px;font-weight:650;line-height:1}
.poc-team-deadline{grid-column:3;display:flex;flex-direction:column;align-items:flex-end;gap:4px;min-width:0;margin-top:6px;text-align:right;color:var(--txt-hi);font-size:12px;line-height:1.45;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.poc-team-deadline small{font-size:11px;color:var(--txt-lo)}
.poc-team-card .poc-title{text-align:center;font-size:18px;line-height:1.45;-webkit-line-clamp:3}
.poc-team-identity{display:block;max-width:100%;margin-top:-5px;text-align:center;color:var(--txt-lo);font-size:12px;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.poc-team-card .poc-description{-webkit-line-clamp:2;margin-top:4px;font-size:13px}
.poc-team-card .poc-next{padding:8px 10px;font-size:13px}
.poc-team-card .poc-comment{padding:8px 10px}
.poc-team-bottom{display:flex;flex-direction:column;gap:5px;min-width:0;margin-top:auto;padding-top:9px}
.poc-team-card .poc-stage-control{position:absolute;z-index:2;top:24px;left:18px;width:calc((100% - 164px)/2);height:56px;min-width:0;margin:0;padding:0;border:0;cursor:pointer}
.poc-team-card .poc-stage-control>span{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.poc-team-card .poc-stage-control select{position:absolute;inset:0;width:100%;height:100%;min-height:44px;margin:0;padding:0;opacity:0;cursor:pointer;font-size:16px}
.poc-team-card:has(.poc-stage-control select:focus-visible) .poc-status{outline:2px solid var(--gold);outline-offset:3px}
@container team-order-card (max-width:340px){.poc-team-card .poc-open{padding:16px 12px}.poc-team-header{grid-template-columns:minmax(0,1fr) 72px minmax(0,1fr);gap:7px;min-height:72px}.poc-team-avatar-stack{width:72px;height:72px;margin-top:-41px}.poc-team-avatar.identity-avatar,.poc-team-fallback{width:72px;height:72px;font-size:26px}.poc-team-avatar-stack.is-multiple{height:72px}.poc-team-avatar-stack.is-multiple .identity-avatar{width:50px;height:50px;font-size:21px}.poc-team-avatar-stack.is-multiple .identity-avatar+.identity-avatar{margin-left:-28px}.poc-team-card .poc-stage-control{top:22px;left:12px;width:calc((100% - 110px)/2)}.poc-team-card .poc-title{font-size:17px}.poc-team-header .poc-status{font-size:11px}.poc-team-deadline{font-size:11px}}
/* Native phase menus follow both light palettes, including dark OS/browser chrome. */
:root:is([data-theme="light"],[data-theme="burgundy"]) :is(.poc-stage-control select,.ow-status select){color-scheme:light}
