/* Biuro 1.3 — controls sized for touch, cards instead of wide tables. */
#office-panel[hidden],#office-nav[hidden],[data-office-pane][hidden]{display:none!important}
.md-office main{max-width:1120px!important;padding:24px 20px 110px!important;margin:auto;box-sizing:border-box}
.md-office nav{display:flex!important;gap:6px!important;max-width:720px!important;width:100%;box-sizing:border-box;padding:10px 10px calc(10px + env(safe-area-inset-bottom))!important}
.md-office nav button{flex:1;min-width:0;padding:12px 4px;font-size:13px;min-height:48px;border-radius:12px}
.md-office nav #office-nav{order:-2}.md-office nav [data-view="jobs"]{order:-1}
.md-office nav button.active{background:#17263b;color:white;border-color:#17263b}
#office-panel,#office-order-dialog{color:#17263b;font-family:inherit}
#office-panel button,#office-order-dialog button{cursor:pointer;min-height:46px;touch-action:manipulation;font:inherit}
#office-panel input,#office-panel select,#office-order-dialog input,#office-order-dialog select,#office-order-dialog textarea{font:inherit;font-size:16px;max-width:100%;box-sizing:border-box}
#office-panel button:focus-visible,#office-order-dialog button:focus-visible,#office-panel summary:focus-visible,#office-order-dialog summary:focus-visible{outline:3px solid #d99000;outline-offset:3px}
#office-panel button:disabled,#office-order-dialog button:disabled{opacity:.5;cursor:default}
.office-search-row{display:flex;gap:8px;align-items:stretch}.office-search-label{flex:1;min-width:0;margin:0}
#office-search{width:100%;margin:0;min-height:52px;padding:12px 14px;border:1px solid #cbd4df;border-radius:12px;background:white}
.office-primary{background:#17263b!important;color:#fff!important;border:1px solid #17263b!important;border-radius:10px;padding:12px 18px}
#office-filter-details{margin-top:12px;background:#fff;border:1px solid #dce3eb;border-radius:12px}
#office-filter-details summary{padding:14px;cursor:pointer;font-weight:600}
.office-filter-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:0 14px 16px}
.office-filter-grid label{font-size:13px;display:block}.office-filter-grid input,.office-filter-grid select{display:block;width:100%;min-height:46px;margin-top:6px}
#office-message{font-size:14px;margin:18px 0;color:#526175;overflow-wrap:anywhere}
.office-order-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
#office-panel .office-order-card{display:block;width:100%;text-align:left;background:#fff;border:1px solid #dce3eb;border-radius:16px;padding:18px;color:#17263b;box-shadow:0 3px 12px #17263b06;white-space:normal;overflow-wrap:anywhere}
#office-panel .office-order-card:hover{border-color:#9aaabe}.office-card-top,.office-card-bottom{display:flex;justify-content:space-between;gap:12px;align-items:center}
.office-card-top strong{font-size:18px}.office-card-top>span{font-size:12px;color:#637084}
.office-card-title{display:block;font-size:18px;line-height:1.35;font-weight:700;margin:14px 0 7px}
.office-card-customer{display:block;color:#526175;font-size:14px}
.office-card-statuses{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:16px 0}
.office-card-statuses>span{display:block;background:#f1f4f8;border-radius:10px;padding:10px;min-width:0;overflow-wrap:anywhere}
.office-card-statuses small{display:block;color:#637084;font-size:11px;margin-bottom:4px}.office-card-statuses b{font-size:13px;font-weight:600}
.office-card-bottom{font-size:13px;border-top:1px solid #e9edf2;padding-top:12px}.office-card-bottom>span{flex:1}.office-card-bottom strong{font-size:19px;white-space:nowrap}
.office-card-link{display:block;font-size:12px;color:#526175;margin-top:12px;text-align:right}
#office-pages{display:flex;align-items:center;justify-content:center;gap:10px;margin:22px 0;font-size:13px}#office-pages[hidden]{display:none}
#office-pages button{padding:10px;border-radius:10px}.office-empty{text-align:center;padding:36px 18px;background:white;border-radius:16px}
#office-order-dialog{width:min(820px,94vw);max-width:94vw;max-height:92dvh;overflow:auto;padding:0;border:0;border-radius:18px;box-sizing:border-box;background:#fff}
#office-order-dialog::backdrop{background:#17263b88}
#office-order-dialog>.dialog-head{position:sticky;top:0;z-index:2;background:#fff;display:flex;justify-content:space-between;align-items:center;padding:12px 20px;border-bottom:1px solid #e5eaf0}
#office-order-dialog>.dialog-head h2{font-size:15px;margin:0}#office-order-dialog>.dialog-head button{padding:8px 12px;font-size:14px}
#office-order-body{padding:20px}.office-detail-heading{display:flex;justify-content:space-between;gap:12px;align-items:center}.office-detail-heading h2{font-size:28px;margin:5px 0}.office-detail-heading small{color:#637084}.office-detail-heading>strong{font-size:22px;white-space:nowrap}.office-detail-heading p{margin:5px 0}.office-delivery{color:#637084;font-size:14px}
.office-tabs{display:grid;grid-template-columns:1fr 1fr 1.3fr;gap:4px;background:#edf1f6;padding:4px;border-radius:12px;margin:20px 0}
#office-order-dialog .office-tabs button{min-width:0;border:0;background:transparent;border-radius:9px;padding:9px 5px;font-size:14px;color:#526175}
#office-order-dialog .office-tabs button.active{background:#fff;color:#17263b;box-shadow:0 2px 5px #17263b15;font-weight:700}
#office-order-dialog h3{font-size:18px;margin:18px 0 10px}.office-help{font-size:13px;color:#526175;line-height:1.5}
.office-item{padding:16px;border:1px solid #dce3eb;border-radius:12px;margin:14px 0}.office-item-meta{display:flex;justify-content:space-between;flex-wrap:wrap;gap:6px;font-size:12px;color:#637084}.office-item h4{font-size:17px;line-height:1.4;margin:12px 0;overflow-wrap:anywhere}
.office-item summary,.office-section summary{padding:12px 0;min-height:24px;cursor:pointer;font-size:14px;font-weight:600}.office-item label{display:block;font-size:13px}.office-item textarea{display:block;width:100%;padding:12px;border:1px solid #b7c3d1;border-radius:10px;margin:8px 0 12px;resize:vertical}
.office-status-box{border:1px solid #dce3eb;border-radius:12px;padding:16px;margin:16px 0}.office-status-box label{display:block;margin:12px 0;font-size:14px}.office-status-box select{display:block;width:100%;min-height:48px;margin-top:6px}.office-status-box .office-primary{width:100%}
#office-order-dialog .office-checkbox{display:flex;gap:10px;align-items:center;min-height:44px}.office-checkbox input{width:22px!important;height:22px!important;min-height:22px!important;flex-shrink:0;margin:0}
.office-summary{display:grid;grid-template-columns:1fr 1fr;gap:12px}.office-summary section{padding:14px;border:1px solid #dce3eb;border-radius:12px;overflow-wrap:anywhere}.office-summary p{font-size:14px;line-height:1.6}
.office-section{border-top:1px solid #e5eaf0;margin-top:18px}.office-history{padding:10px 0;border-bottom:1px solid #e5eaf0}.office-history p{margin:4px 0;font-size:13px;overflow-wrap:anywhere}.office-history small{color:#637084}.office-note{white-space:pre-wrap;overflow-wrap:anywhere}.office-refresh{width:100%;margin-top:24px;font-size:13px!important}
.office-sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
@media(max-width:640px){.md-office main{padding:18px 14px 112px!important}.md-office header{padding:12px 16px!important}.md-office header .logo{max-width:125px}.md-office #title{font-size:25px}.office-order-grid{grid-template-columns:1fr;gap:12px}.office-filter-grid{grid-template-columns:1fr 1fr}.office-filter-grid label:nth-child(-n+2){grid-column:1/-1}#office-panel .office-order-card{padding:16px}#office-order-dialog{width:100%;max-width:100%;height:100dvh;max-height:100dvh;margin:0;border-radius:0}#office-order-body{padding:16px 16px calc(24px + env(safe-area-inset-bottom))}.office-summary{grid-template-columns:1fr}.office-detail-heading>strong{font-size:20px}.md-office nav button{font-size:12px}.office-search-row .office-primary{padding:12px}.office-card-title{font-size:17px}}
/* 1.4 — consistent section colours and visible document/cash actions. */
.md-office{background:#eef3f8}.md-office header{border-bottom:3px solid #f2b526;background:linear-gradient(100deg,#fff 70%,#fff7dc)}
.md-office nav{border-top:2px solid #e5bd4c;box-shadow:0 -5px 20px #17263b0c}
.md-office nav #office-nav.active{background:#174c78;border-color:#174c78}.md-office nav [data-view="jobs"].active{background:#226651;border-color:#226651}.md-office nav [data-view="alt"].active{background:#805518;border-color:#805518}
#office-panel .office-order-card{border-top:4px solid #e4af32}.office-card-top strong{color:#174c78}.office-card-bottom strong{color:#174c78}.office-card-link{color:#174c78;font-weight:650}
.office-card-statuses>span:first-child{background:#e9f1fb;border-left:3px solid #4283bd}.office-card-statuses>span:last-child{background:#fff3db;border-left:3px solid #d7a127}
.office-card-statuses>span[data-tone="done"]{background:#e4f4eb;border-color:#299269;color:#155a40}.office-card-statuses>span[data-tone="warning"]{background:#fff0d6;border-color:#d79822;color:#76510c}.office-card-statuses>span[data-tone="problem"]{background:#fde9e9;border-color:#c95757;color:#8a2929}
.office-tabs{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;background:transparent;padding:0}
#office-order-dialog .office-tabs button{border:1px solid #d9e2ee;background:#f1f5fa;font-weight:600;padding:12px 7px}
#office-order-dialog .office-tabs button.active{background:#174c78;color:#fff;border-color:#174c78;box-shadow:none}
#office-order-dialog .office-tabs button[data-office-tab="documents"].active{background:#67529b;border-color:#67529b}
#office-order-dialog .office-tabs button[data-office-tab="status"].active{background:#226651;border-color:#226651}
.office-document{margin:12px 0;padding:16px;border:1px solid #d6cbea;border-left:4px solid #8060af;background:#faf7ff;border-radius:12px}.office-document small{display:block;color:#637084;margin-top:5px}.office-doc-buttons{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.office-doc-buttons button{flex:1;font-size:14px!important}
.office-cash{padding:18px;border:1px solid #e5bd61;border-left:5px solid #d7a127;border-radius:12px;background:#fff7e3;margin:20px 0}
.office-cash .office-primary{width:100%;background:#226651!important;border-color:#226651!important}.office-cash label{font-size:14px}
.office-preview-frame{display:block;width:100%;height:520px;border:1px solid #cbd4df;border-radius:10px;background:white;margin:16px 0}
.office-mail-preview{margin:18px 0;padding:16px;background:#f3effb;border:1px solid #d6cbea;border-radius:12px;overflow-wrap:anywhere}
.office-address-edit summary{padding:12px 0;font-weight:650;color:#174c78;cursor:pointer}.office-address-edit label{font-size:13px}.office-address-edit input{font-weight:400}
@media(min-width:700px){.office-tabs{grid-template-columns:repeat(4,minmax(0,1fr))}}

/* 1.4.1 — office navigation below the persistent 80px header. */
.md-office header{height:80px;box-sizing:border-box}
.md-office nav{position:fixed;top:80px;bottom:auto;left:50%;transform:translateX(-50%);max-width:1120px!important;padding:10px!important;border-top:0;border-bottom:2px solid #e5bd4c;box-shadow:0 5px 18px #17263b0c;z-index:3}
.md-office main{padding:100px 20px 32px!important;scroll-padding-top:170px}
@media(max-width:640px){.md-office nav{gap:5px!important;padding:8px!important}.md-office nav button{padding:10px 3px;min-height:46px}.md-office main{padding:88px 14px 28px!important}}

/* 1.4.2 staff identity, shared comments and timeline */
#identity-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:12px 0;padding:12px;border:1px solid #cbd5e1;border-radius:12px;background:#f8fafc;color:#17263b}
#identity-bar[hidden]{display:none}#identity-bar button{padding:8px 10px;font-size:13px;min-height:40px}.md-collaboration{margin-top:20px;padding-top:16px;border-top:1px solid #cbd5e1}.md-collaboration summary{font-weight:700;padding:12px 0}.md-note{white-space:pre-wrap;overflow-wrap:anywhere;background:#f1f5f9;color:#17263b;padding:12px;border-radius:8px;max-height:350px;overflow:auto}.md-collaboration textarea{width:100%;box-sizing:border-box}.office-tabs{flex-wrap:wrap}#job-history{max-height:450px;overflow:auto}.office-history{overflow-wrap:anywhere}
@media print{#identity-bar,.md-collaboration{display:none!important}}

.office-remove-item{margin-top:12px!important;border:1px solid #fecaca!important;color:#b91c1c!important;background:#fff1f2!important;min-height:44px}#office-add-item-box summary{font-size:17px;font-weight:700;color:#0f766e;padding:12px 0}#office-items-result{white-space:pre-wrap}

/* Inline status controls: colors keep the same meaning as the order cards. */
.office-inline-status{box-sizing:border-box;min-width:0;border-radius:10px!important;color:#17263b;gap:3px;transition:filter .15s,box-shadow .15s}
.office-inline-status:hover{filter:brightness(.97);box-shadow:0 1px 5px #17263b22}
.office-inline-status:focus-visible{outline:3px solid #24608d;outline-offset:2px}
.office-inline-status[data-tone="neutral"]{background:#edf2f7!important;color:#294b68}
.office-inline-status[data-tone="warning"]{background:#fff0d8!important;color:#765013}
.office-inline-status[data-tone="done"]{background:#e4f4ec!important;color:#1e674b}
.office-inline-status[data-tone="problem"]{background:#fde9ea!important;color:#9f3037}
.office-cash-label{display:inline-block;margin-left:8px;padding:3px 8px;border-radius:999px;background:#e9efff;color:#284a7d;font-size:11px;font-weight:700;white-space:nowrap}
#office-inline-status-dialog{width:min(480px,92vw);max-width:92vw;max-height:90dvh;overflow:auto;padding:22px;border:0;border-radius:18px;box-sizing:border-box;background:#fff;color:#17263b;box-shadow:0 20px 60px #17263b44}
#office-inline-status-dialog::backdrop{background:#14223888}
#office-inline-status-dialog h2{margin:0 0 8px;font-size:21px}
#office-inline-status-dialog label{display:flex;flex-direction:column;gap:6px;margin:14px 0;font-weight:600}
#office-inline-status-dialog select{width:100%;min-height:44px;padding:10px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;color:#17263b;font:inherit}
#office-inline-status-dialog .office-dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}
#office-inline-status-dialog button{min-height:42px;padding:9px 14px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;color:#17263b;font:inherit;cursor:pointer}
#office-inline-status-dialog button.office-primary{background:#1d527a;color:white;border-color:#1d527a}
@media(max-width:520px){#office-inline-status-dialog{padding:18px}.office-card-statuses{gap:7px}.office-inline-status{padding:10px!important}}

/* Controls remain styled with the panel CSP blocking inline style attributes. */
#office-panel .office-inline-status{display:flex;flex-direction:column;align-items:flex-start;text-align:left;width:100%;min-width:0;box-sizing:border-box;border:0;border-radius:10px;padding:12px;cursor:pointer;font:inherit}
#office-panel .office-inline-status[data-tone="neutral"]{background:#edf2f7!important;color:#294b68}
#office-panel .office-inline-status[data-tone="warning"]{background:#fff0d8!important;color:#765013}
#office-panel .office-inline-status[data-tone="done"]{background:#e4f4ec!important;color:#1e674b}
#office-panel .office-inline-status[data-tone="problem"]{background:#fde9ea!important;color:#9f3037}
#office-panel .office-card-link{width:100%;padding:0;border:0!important;background:transparent!important;text-align:right;cursor:pointer;font:inherit}

/* md-cargoboard-v1 (2026-11-09) */
.md-cb-links{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.md-cb-link{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:8px 14px;border:1px solid #f2c4c4;border-radius:10px;background:#fff5f5;color:#b91c1c;font-weight:700;text-decoration:none}
.md-cb-link:hover{background:#ffe9e9}
.md-cb-link.md-cb-ret{border-color:#cbd5e1;background:#f1f5f9;color:#1f2937}
.md-cb-link.md-cb-ret:hover{background:#e2e8f0}
.md-cb-link img{width:24px;height:24px;flex:0 0 24px}

/* MotorDoktor Biuro — modern compact queues, accessible touch targets (2026-11). */
#md-queue-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:10px 0 18px}
#md-queue-tabs button{border:1px solid #d7e0ea;border-radius:14px;background:#fff;color:#223149;padding:14px 6px;font-size:15px;font-weight:700;min-height:64px;box-shadow:0 2px 8px #17263b08}
#md-queue-tabs button span{display:inline-block;margin-left:4px;border-radius:20px;background:#eef2f6;padding:2px 7px;font-size:12px}
#md-queue-tabs button.active{background:#203c58;color:#fff;border-color:#203c58;box-shadow:0 4px 12px #17263b25}
#md-queue-tabs button.active span{background:#ffffff25;color:#fff}
#md-dispatch-queue[hidden],#md-alt-review-queue[hidden],#md-alt-deposit-queue[hidden]{display:none!important}
#md-dispatch-queue,#md-alt-review-queue,#md-alt-deposit-queue{margin:0 0 24px}
#office-panel .office-order-card{box-shadow:0 4px 16px #17263b0a;border-radius:18px}
.md-order-actions{display:flex;justify-content:flex-end;align-items:center;gap:12px;margin-top:12px}
#office-panel .md-order-actions .office-card-link{width:auto;flex:1;min-width:0;text-align:right;margin:0;min-height:48px}
.md-phone-slot{flex:0 0 54px;display:flex;justify-content:flex-end}
.md-phone-direct,.md-phone-unavailable,.md-phone-loading{width:52px;height:52px;display:inline-flex;align-items:center;justify-content:center;border-radius:14px;font-size:27px;box-sizing:border-box;text-decoration:none}
.md-phone-direct{background:#e2f4e9;color:#17663f;border:1px solid #a9d9bd;touch-action:manipulation}
.md-phone-direct:active{background:#c6ebd6}
.md-phone-unavailable,.md-phone-loading{background:#edf0f3;color:#aab4bf;border:1px solid #dbe2e9}
@media(max-width:640px){#md-queue-tabs{gap:7px}#md-queue-tabs button{font-size:13px;padding:10px 3px;min-height:58px}}
