.production-page{--production-border:#e3e8ef;--production-muted:#667085;--production-ink:#172033;--production-blue:#2767d8;max-width:1680px;margin:0 auto;color:var(--production-ink)}
.production-header{display:flex;align-items:flex-start;justify-content:space-between;gap:2rem;margin-bottom:1.25rem}
.production-header h1{margin:.15rem 0 .35rem;font-size:clamp(1.7rem,2.3vw,2.35rem);font-weight:750;letter-spacing:-.035em}
.production-header p{max-width:820px;margin:0;color:var(--production-muted)}
.production-eyebrow{color:var(--production-blue);font-size:.73rem;font-weight:800;letter-spacing:.12em}
.production-header-actions{display:flex;flex-wrap:wrap;gap:.65rem;padding-top:.25rem}
.production-default-alert{padding:.75rem 1rem}
.production-inline-button{padding:0;border:0;background:none;color:inherit}
.production-toolbar{display:flex;align-items:center;justify-content:space-between;gap:1.25rem;padding:.75rem;margin-bottom:1rem;border:1px solid var(--production-border);border-radius:14px;background:#fff;box-shadow:0 5px 20px rgba(23,32,51,.035)}
.production-tabs{display:flex;align-items:center;gap:.25rem;overflow:auto;padding:.1rem}
.production-tab{display:inline-flex;align-items:center;gap:.45rem;white-space:nowrap;padding:.55rem .7rem;border-radius:9px;color:#4b5565;text-decoration:none;font-size:.86rem;font-weight:650}
.production-tab:hover{background:#f2f5fa;color:#1f2937}
.production-tab.is-active{background:#e9f0ff;color:#184eae}
.production-tab-count{display:inline-flex;align-items:center;justify-content:center;min-width:1.45rem;height:1.45rem;padding:0 .35rem;border-radius:999px;background:rgba(95,113,145,.12);font-size:.7rem}
.production-tab.is-active .production-tab-count{background:#fff;color:#184eae}
.production-search{display:flex;gap:.45rem;min-width:min(100%,460px)}
.production-search .form-control{min-width:250px}
.production-courier-toolbar{display:flex;align-items:center;gap:.8rem;margin:-.25rem 0 1rem;padding:.65rem .75rem;border:1px solid var(--production-border);border-radius:12px;background:#f8fafc}
.production-courier-label{display:grid;min-width:112px;line-height:1.1}
.production-courier-label>span{color:#334155;font-size:.77rem;font-weight:800}
.production-courier-label small{margin-top:.2rem;color:#8a94a5;font-size:.62rem}
.production-courier-filters{display:flex;align-items:center;gap:.35rem;min-width:0;overflow:auto;padding:.05rem}
.production-courier-filter{display:inline-flex;align-items:center;gap:.45rem;min-height:34px;padding:.35rem .55rem;border:1px solid #dce3ec;border-radius:8px;background:#fff;color:#526078;text-decoration:none;white-space:nowrap;font-size:.73rem;font-weight:700}
.production-courier-filter:hover{border-color:#b8c5d6;color:#27364e}
.production-courier-filter strong{display:inline-flex;align-items:center;justify-content:center;min-width:1.35rem;height:1.35rem;padding:0 .3rem;border-radius:999px;background:#eef2f7;color:#4f5f75;font-size:.65rem}
.production-courier-filter.is-active{border-color:#4c75b8;background:#edf4ff;color:#1f559e;box-shadow:inset 0 0 0 1px rgba(51,98,170,.08)}
.production-courier-filter.is-inpost.is-active{border-color:#d3ae28;background:#fff8d9;color:#715600}
.production-courier-filter.is-other.is-active{border-color:#7b8da9;background:#f0f3f7;color:#34445c}
.production-courier-filter.is-unknown.is-active{border-color:#c68a66;background:#fff4ec;color:#81421f}
.production-courier-select{display:flex;align-items:center;gap:.45rem;margin-left:auto}
.production-courier-select label{color:#667085;font-size:.67rem;white-space:nowrap}
.production-courier-select .form-select{width:auto;min-width:170px;max-width:235px}
.production-packages{display:grid;gap:1rem}
.production-package{overflow:hidden;border:1px solid var(--production-border);border-radius:16px;background:#fff;box-shadow:0 6px 24px rgba(23,32,51,.045);transition:border-color .2s,box-shadow .2s}
.production-package.state-partial{border-color:#f0ca78}
.production-package.state-done{border-color:#98d5b0}
.production-package-head{display:flex;align-items:center;justify-content:space-between;gap:1.25rem;padding:1rem 1.15rem;border-bottom:1px solid var(--production-border);background:linear-gradient(180deg,#fff,#fbfcfe)}
.production-package-title{display:flex;align-items:center;flex-wrap:wrap;gap:.6rem}
.production-order-identity{display:grid;gap:.14rem;min-width:0;color:#18243a;text-decoration:none}
.production-order-identity:hover .production-order-customer{color:var(--production-blue);text-decoration:underline}
.production-order-customer{overflow:hidden;text-overflow:ellipsis;color:#18243a;font-size:1.04rem;font-weight:780;line-height:1.2;white-space:nowrap}
.production-order-meta{display:flex;align-items:center;flex-wrap:wrap;gap:.35rem;color:#748095;font-size:.72rem;font-weight:550}
.production-order-meta strong{color:#526078;font-weight:720}
.production-order-meta time{white-space:nowrap}
.production-state-badge{display:inline-flex;align-items:center;min-height:1.55rem;padding:.2rem .55rem;border-radius:999px;background:#edf1f6;color:#596579;font-size:.7rem;font-weight:750}
.production-state-badge.is-partial{background:#fff3d4;color:#875805}
.production-state-badge.is-done{background:#e7f7ed;color:#18723c}
.production-state-badge.is-warning{background:#fff0df;color:#a14b00}
.production-state-badge.is-held{background:#fff1d6;color:#8a4b08;box-shadow:inset 0 0 0 1px #f0c987}
.production-package-side{display:grid;justify-items:end;gap:.5rem;min-width:300px}
.production-package-courier{display:flex;align-items:center;justify-content:flex-end;gap:.45rem;max-width:420px;color:#40506a;text-align:right}
.production-package-courier-icon{display:inline-flex;align-items:center;justify-content:center;width:1.7rem;height:1.7rem;border:1px solid #d4dde9;border-radius:8px;background:#f5f7fa;color:#65758c;font-size:.7rem;font-weight:850}
.production-package-courier>span:last-child{display:grid;justify-items:end;min-width:0}
.production-package-courier small{color:#8a94a5;font-size:.58rem;font-weight:800;letter-spacing:.06em;line-height:1;text-transform:uppercase}
.production-package-courier strong{max-width:330px;overflow:hidden;color:#314159;font-size:.78rem;font-weight:800;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}
.production-package-courier em{max-width:330px;overflow:hidden;color:#7a8597;font-size:.62rem;font-style:normal;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}
.production-package-courier.courier-inpost .production-package-courier-icon{border-color:#ecd778;background:#fff8d8;color:#725800}
.production-package-courier.courier-other .production-package-courier-icon{border-color:#cbd5e1;background:#f1f5f9;color:#475569}
.production-package-courier.courier-pickup .production-package-courier-icon{border-color:#c7ddcf;background:#eef8f1;color:#39704b}
.production-package-courier.courier-unknown .production-package-courier-icon{border-color:#ead4c7;background:#fff7f1;color:#946044}
.production-package-progress{display:flex;align-items:center;gap:.8rem;width:300px}
.production-package-progress>div:first-child{display:flex;align-items:baseline;gap:.3rem;white-space:nowrap}
.production-package-progress strong{font-size:.85rem}
.production-package-progress span{color:var(--production-muted);font-size:.74rem}
.production-package-progress .progress{flex:1;height:.42rem;background:#edf0f5}
.production-package-progress .progress-bar{background:#2d6cdf;transition:width .25s}
.state-done .production-package-progress .progress-bar{background:#25975a}
.production-package-notes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.7rem;padding:.8rem 1.15rem;border-bottom:1px solid var(--production-border);background:#fbfcff}
.production-note{padding:.7rem .8rem;border:1px solid #dfe6f0;border-left:4px solid #7aa5e8;border-radius:9px;background:#fff}
.production-note-seller{border-left-color:#9a86dc}
.production-note-label{display:block;margin-bottom:.35rem;color:#3f5f93;font-size:.69rem;font-weight:800;letter-spacing:.045em;text-transform:uppercase}
.production-note-seller .production-note-label{color:#6952ad}
.production-note p{margin:.1rem 0;color:#313b4d;font-size:.87rem;line-height:1.4}
.production-items{display:grid}
.production-item{display:grid;grid-template-columns:84px minmax(190px,1.1fr) minmax(290px,1.55fr) minmax(185px,.65fr);align-items:center;gap:1rem;padding:1rem 1.15rem;border-bottom:1px solid var(--production-border);cursor:pointer;transition:background .2s,opacity .2s}
.production-item:last-child{border-bottom:0}
.production-item:hover{background:#fcfdff}
.production-item.is-completed{background:#f5fbf7}
.production-item.is-missing-details:not(.is-completed){background:#fffaf3}
.production-thumb{display:flex;align-items:center;justify-content:center;width:78px;height:78px;overflow:hidden;border:1px solid #e1e7ef;border-radius:10px;background:#f7f8fa;color:#8a94a5;text-align:center;text-decoration:none;font-size:.67rem}
.production-thumb img{width:100%;height:100%;object-fit:contain;background:#fff}
.production-product{min-width:0}
.production-product-name{display:block;color:#1f2b40;text-decoration:none;font-size:.94rem;font-weight:720;line-height:1.3}
.production-product-name:hover{color:var(--production-blue);text-decoration:underline}
.production-product-codes{display:flex;flex-wrap:wrap;gap:.3rem .75rem;margin-top:.5rem;color:#758094;font-size:.71rem}
.production-product-codes strong{color:#455165;font-weight:700}
.production-column-label{display:block;margin-bottom:.42rem;color:#7b8494;font-size:.65rem;font-weight:800;letter-spacing:.055em;text-transform:uppercase}
.production-attributes{display:flex;flex-wrap:wrap;gap:.35rem}
.production-attributes>div{display:inline-flex;align-items:baseline;gap:.3rem;padding:.34rem .5rem;border:1px solid #d8e2f3;border-radius:7px;background:#f7faff;font-size:.78rem}
.production-attributes span{color:#65738b}
.production-attributes strong{color:#1e365e;font-weight:750}
.production-fallback-note,.production-missing-note{padding:.55rem .65rem;border-radius:8px;font-size:.78rem;line-height:1.35}
.production-fallback-note{border:1px solid #f0d59a;background:#fff8e8;color:#765313}
.production-missing-note{border:1px solid #edba9d;background:#fff2e9;color:#8a3711;font-weight:650}
.production-item-action{text-align:right}
.production-item-action form{display:flex;justify-content:flex-end}
.production-complete-button{display:inline-flex;align-items:center;justify-content:center;gap:.42rem;min-width:174px;min-height:42px;padding:.55rem .8rem;border:1px solid #bac8dd;border-radius:9px;background:#fff;color:#294264;font-size:.8rem;font-weight:750;transition:all .16s}
.production-complete-button:hover{border-color:#4d7bc8;background:#f3f7ff;color:#174c9f}
.production-complete-button:disabled{opacity:.62;cursor:wait}
.production-complete-button.is-completed{border-color:#65ba83;background:#e9f8ee;color:#176d38}
.production-check{display:inline-flex;align-items:center;justify-content:center;width:1.15rem;height:1.15rem;border:1.5px solid currentColor;border-radius:50%;font-size:.72rem;line-height:1}
.production-completed-meta{min-height:1.1rem;margin-top:.33rem;color:#708079;font-size:.64rem}
.production-completed-meta span{display:block;color:#8a938f}
.production-live-alert{position:sticky;z-index:1020;top:72px;margin-bottom:.75rem;padding:.7rem .9rem;border:1px solid transparent;border-radius:10px;box-shadow:0 8px 22px rgba(23,32,51,.12);font-size:.84rem}
.production-live-alert.is-success{border-color:#9ddab4;background:#edfaf2;color:#176437}
.production-live-alert.is-warning{border-color:#efcf8c;background:#fff8e7;color:#79520a}
.production-live-alert.is-danger{border-color:#e7a4aa;background:#fff0f1;color:#8d2530}
.production-empty{padding:4.5rem 1.5rem;border:1px dashed #cbd5e2;border-radius:16px;background:#fff;text-align:center}
.production-empty-mark{display:inline-flex;align-items:center;justify-content:center;width:3.2rem;height:3.2rem;margin-bottom:.8rem;border-radius:50%;background:#e9f8ee;color:#23834b;font-size:1.55rem}
.production-empty h2{margin:0 0 .35rem;font-size:1.18rem}
.production-empty p{margin:0;color:var(--production-muted)}
.production-pagination{display:flex;justify-content:center;gap:.35rem;margin:1.2rem 0}
.production-pagination a{display:inline-flex;align-items:center;justify-content:center;min-width:2.25rem;height:2.25rem;padding:0 .5rem;border:1px solid var(--production-border);border-radius:8px;background:#fff;color:#43506a;text-decoration:none;font-size:.8rem}
.production-pagination a.is-active{border-color:#2f6fda;background:#2f6fda;color:#fff}
.production-status-picker{display:grid;gap:1rem}
.production-status-picker fieldset{padding:.8rem;border:1px solid #e0e6ef;border-radius:10px}
.production-status-picker legend{float:none;width:auto;margin:0 0 .55rem;padding:0 .25rem;color:#5f6c80;font-size:.72rem;font-weight:800;text-transform:uppercase}
.production-status-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.35rem .8rem}
.production-status-grid label{display:flex;align-items:center;gap:.45rem;padding:.35rem .25rem;font-size:.82rem;cursor:pointer}
.production-status-dot{width:.65rem;height:.65rem;border-radius:50%;background:var(--status-color,#94a3b8);box-shadow:inset 0 0 0 1px rgba(0,0,0,.08)}
.production-settings-note{padding:1rem;border-radius:10px;background:#f1f5fb;color:#3d4e68}
.production-settings-note p{margin:.35rem 0 0;font-size:.82rem;line-height:1.5}
@media(max-width:1199.98px){
    .production-toolbar{align-items:stretch;flex-direction:column}
    .production-search{width:100%}
    .production-search .form-control{min-width:0}
    .production-courier-toolbar{align-items:flex-start;flex-wrap:wrap}
    .production-courier-label{min-width:100%}
    .production-courier-filters{max-width:calc(100% - 250px)}
    .production-item{grid-template-columns:76px minmax(180px,.9fr) minmax(250px,1.2fr)}
    .production-item-action{grid-column:2/4;display:flex;align-items:center;justify-content:flex-end;gap:.75rem}
    .production-completed-meta{max-width:260px}
}
@media(max-width:767.98px){
    .production-header{flex-direction:column;gap:1rem}
    .production-header-actions{width:100%}
    .production-header-actions .btn{flex:1}
    .production-toolbar{padding:.55rem}
    .production-search{flex-wrap:wrap}
    .production-search .form-control{flex-basis:100%}
    .production-courier-toolbar{gap:.55rem;padding:.55rem}
    .production-courier-filters{max-width:100%;width:100%}
    .production-courier-select{width:100%;margin-left:0}
    .production-courier-select label{min-width:88px}
    .production-courier-select .form-select{flex:1;max-width:none}
    .production-package-head{align-items:flex-start;flex-direction:column}
    .production-package-side{justify-items:stretch;width:100%;min-width:0}
    .production-package-courier{justify-content:flex-start;text-align:left}
    .production-package-courier>span:last-child{justify-items:start}
    .production-package-courier strong,.production-package-courier em{max-width:calc(100vw - 125px)}
    .production-package-progress{width:100%;min-width:0}
    .production-package-notes{grid-template-columns:1fr}
    .production-item{grid-template-columns:68px minmax(0,1fr);gap:.75rem;padding:.85rem}
    .production-thumb{width:64px;height:64px}
    .production-personalization,.production-item-action{grid-column:1/3}
    .production-item-action{display:block}
    .production-item-action form{justify-content:stretch}
    .production-complete-button{width:100%}
    .production-completed-meta{max-width:none;text-align:center}
    .production-status-grid{grid-template-columns:1fr}
}

/* IrisDesk 1.5.0 Etap 34 — wiadomości SMS i e-mail w Produkcji */
.production-communication-trigger{display:inline-flex;align-items:center;gap:.55rem;min-height:42px;padding:.42rem .65rem;border:1px solid #cbd5e1;border-radius:.7rem;background:#fff;color:#334155;text-align:left;transition:border-color .15s ease,box-shadow .15s ease,background .15s ease}
.production-communication-trigger:hover,.production-communication-trigger:focus-visible{border-color:#64748b;box-shadow:0 0 0 3px rgba(100,116,139,.14);outline:0}
.production-communication-trigger.has-communication{border-color:#93c5fd;background:#eff6ff;color:#1e3a8a}
.production-communication-trigger.no-communication{border-style:dashed;color:#64748b}
.production-communication-icon{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;flex:0 0 28px;border-radius:50%;background:#e2e8f0;font-size:.82rem}
.has-communication .production-communication-icon{background:#dbeafe;color:#1d4ed8}
.production-communication-copy{display:flex;flex-direction:column;gap:.15rem;line-height:1.1}
.production-communication-copy strong{font-size:.75rem}
.production-communication-copy>span{display:flex;flex-wrap:wrap;gap:.25rem}
.production-communication-copy em{font-size:.65rem;font-style:normal;font-weight:650;opacity:.82}
.production-communication-copy em+em::before{content:"·";margin-right:.25rem}
.production-hold-form{margin:0}
.production-hold-trigger{display:inline-flex;align-items:center;justify-content:center;gap:.42rem;min-height:42px;padding:.42rem .72rem;border:1px solid #e7a83e;border-radius:.7rem;background:#fff8e8;color:#8a4b08;font-size:.74rem;transition:border-color .15s ease,box-shadow .15s ease,background .15s ease}
.production-hold-trigger:hover,.production-hold-trigger:focus-visible{border-color:#c97912;background:#fff1d6;box-shadow:0 0 0 3px rgba(201,121,18,.14);outline:0}
.production-hold-trigger:disabled{opacity:.62;cursor:wait}
.production-communication-modal .modal-body{background:#f8fafc}
.production-communication-loading{display:flex;align-items:center;justify-content:center;gap:.65rem;min-height:240px;color:#64748b}
.production-communication-summary{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem;margin-bottom:.85rem}
.production-communication-summary>span{padding:.35rem .65rem;border:1px solid #dbeafe;border-radius:999px;background:#eff6ff;color:#1e40af;font-size:.75rem;font-weight:750}
.production-communication-summary small{margin-left:auto;color:#64748b}
.production-communication-history-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.85rem}
.production-communication-panel{overflow:hidden;border:1px solid #e2e8f0;border-radius:.9rem;background:#fff}
.production-communication-panel>header{display:flex;align-items:center;justify-content:space-between;gap:.75rem;min-height:48px;padding:.65rem .8rem;border-bottom:1px solid #e2e8f0}
.production-communication-panel>header>div{display:flex;align-items:center;gap:.55rem}
.production-channel-actions{margin-left:auto}
.production-channel-actions button,.production-empty-compose{padding:.28rem .52rem;border:1px solid #93c5fd;border-radius:.45rem;background:#eff6ff;color:#1d4ed8;font-size:.68rem;font-weight:750}
.production-channel-actions button:hover,.production-channel-actions button:focus-visible,.production-empty-compose:hover,.production-empty-compose:focus-visible{border-color:#2563eb;background:#dbeafe;outline:0}
.production-channel-mark{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:.55rem;font-size:.68rem;font-weight:850}
.production-channel-mark.sms{background:#dcfce7;color:#166534}
.production-channel-mark.email{background:#dbeafe;color:#1d4ed8;font-size:.9rem}
.production-channel-mark.allegro{background:#fee2e2;color:#b91c1c;font-size:.82rem}
.production-communication-history{display:flex;flex-direction:column;gap:.55rem;height:300px;padding:.75rem;overflow:auto;background:#f8fafc}
.production-communication-empty{display:grid;place-items:center;align-content:center;gap:.65rem;min-height:100%;padding:1rem;color:#64748b;font-size:.8rem;text-align:center}
.production-message{width:min(88%,520px);padding:.6rem .7rem;border:1px solid #e2e8f0;border-radius:.75rem .75rem .75rem .2rem;background:#fff;box-shadow:0 1px 2px rgba(15,23,42,.03)}
.production-message.is-outbound{align-self:flex-end;border-color:#bfdbfe;border-radius:.75rem .75rem .2rem .75rem;background:#eff6ff}
.production-message-meta{display:flex;align-items:center;justify-content:space-between;gap:.6rem;margin-bottom:.3rem;color:#64748b;font-size:.63rem}
.production-message-meta strong{color:#334155}
.production-message-subject{margin-bottom:.3rem;font-size:.76rem;font-weight:750}
.production-message-body{white-space:pre-wrap;overflow-wrap:anywhere;font-size:.76rem;line-height:1.42}
.production-message-details{margin-top:.35rem;color:#64748b;font-size:.62rem}
.production-message-error{margin-top:.35rem;color:#b91c1c;font-size:.66rem}
.production-message-attachments{display:flex;flex-wrap:wrap;gap:.35rem;margin-top:.45rem}
.production-message-attachment{display:inline-flex;max-width:100%;padding:.26rem .45rem;border:1px solid #cbd5e1;border-radius:.42rem;background:rgba(255,255,255,.75);color:#334155;font-size:.66rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.production-compose{margin-top:.85rem;padding:.85rem;border:1px solid #e2e8f0;border-radius:.9rem;background:#fff}
.production-compose-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:.85rem}
.production-compose-head>div:first-child{display:flex;flex-direction:column}
.production-compose-head span{color:#64748b;font-size:.72rem}
.production-compose-tabs{display:inline-flex;padding:.2rem;border-radius:.65rem;background:#f1f5f9}
.production-compose-tabs button{padding:.38rem .7rem;border:0;border-radius:.48rem;background:transparent;color:#64748b;font-size:.74rem;font-weight:750}
.production-compose-tabs button.is-active{background:#fff;color:#0f172a;box-shadow:0 1px 3px rgba(15,23,42,.12)}
.production-paste-zone{padding:.7rem;border:1px dashed #94a3b8;border-radius:.65rem;background:#f8fafc;color:#64748b;font-size:.76rem;text-align:center}
.production-paste-zone.is-dragging,.production-paste-zone:focus{border-color:#2563eb;background:#eff6ff;outline:0}
.production-mms-preview{display:flex;flex-wrap:wrap;gap:.4rem;margin-top:.5rem}
.production-mms-chip{display:inline-flex;align-items:center;gap:.4rem;max-width:240px;padding:.3rem .4rem .3rem .55rem;border-radius:999px;background:#e2e8f0;font-size:.68rem}
.production-mms-chip>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.production-mms-chip button{display:inline-grid;place-items:center;width:20px;height:20px;padding:0;border:0;border-radius:50%;background:#cbd5e1;line-height:1}
@media(max-width:991.98px){
    .production-communication-history-grid{grid-template-columns:1fr}
    .production-communication-history{height:260px}
}
@media(max-width:767.98px){
    .production-communication-trigger{width:100%}
    .production-hold-form,.production-hold-trigger{width:100%}
    .production-communication-summary small{width:100%;margin-left:0}
    .production-compose-head{align-items:flex-start;flex-direction:column}
    .production-compose-tabs{width:100%}
    .production-compose-tabs button{flex:1}
}
