/* CRM_SPRINT07B_UNIFIED_ORDER_WORKFLOW_UI_V1 */
.order-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}.order-tabs button{border:1px solid var(--line);background:#fff;border-radius:999px;padding:9px 14px;font-weight:700;color:var(--muted);cursor:pointer}.order-tabs button.active{background:#1f2937;color:#fff;border-color:#1f2937}
.order-metrics{grid-template-columns:repeat(6,minmax(145px,1fr))}.order-filter{display:grid;grid-template-columns:minmax(220px,1fr) 190px 210px 180px auto auto;gap:10px;margin:14px 0;align-items:end}.order-filter .check{display:flex;align-items:center;gap:7px;white-space:nowrap;border:1px solid var(--line);border-radius:10px;padding:10px 12px;background:#fff}
.order-status,.payment-status,.return-status{display:inline-flex;padding:5px 9px;border-radius:999px;font-size:11px;font-weight:800;background:#eef2f7;color:#52606d;white-space:nowrap}.order-status.CONFIRMED{background:#eaf2ff;color:#245ba7}.order-status.PROCESSING{background:#fff3d8;color:#8b5b00}.order-status.READY_TO_DELIVER{background:#f4eafe;color:#6f42c1}.order-status.DELIVERED,.order-status.COMPLETED{background:#e8f8f1;color:#257a59}.order-status.CANCELLED{background:#fdebec;color:#b42318}.payment-status.UNPAID{background:#fdebec;color:#b42318}.payment-status.PARTIAL{background:#fff3d8;color:#8b5b00}.payment-status.PAID{background:#e8f8f1;color:#257a59}.payment-status.REFUNDED{background:#eef2f7;color:#52606d}.return-status{background:#f4eafe;color:#6f42c1}
.workflow-age{display:inline-flex;flex-direction:column;gap:2px;padding:7px 9px;border:1px solid var(--line);border-radius:10px;background:#f8fafc;min-width:140px;margin-top:6px}.workflow-age small{font-size:10px;color:var(--muted);margin:0}.workflow-age b{font-size:12px}.workflow-age em{font-size:10px;font-style:normal;font-weight:800}.workflow-age.warning{background:#fff8e8;border-color:#f6d88b;color:#8b5b00}.workflow-age.breached{background:#fff0f1;border-color:#f6b5ba;color:#b42318}.row-sla-breached td{background:#fff9f9}.balance-risk{color:#b42318}.positive-money{color:#16794b}.negative-money{color:#b42318}
.order-dialog,.order-dialog.order-wide{width:min(1480px,calc(100vw - 24px));max-width:none}.order-dialog .modal-card{width:100%;max-height:calc(100vh - 24px);overflow:auto;padding-bottom:0}.order-form{display:grid;gap:14px}.order-form>.form-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.order-form>.form-grid .span-2{grid-column:span 2}.order-head{display:flex;justify-content:space-between;gap:18px;padding-right:30px}.order-head h3{margin:5px 0}.order-head-badges{display:flex;gap:8px;align-items:flex-start;flex-wrap:wrap;justify-content:flex-end}
.order-footer,.order-actions{position:sticky;bottom:0;z-index:10;display:flex;justify-content:flex-end;gap:8px;margin:0 -23px;padding:14px 23px;border-top:1px solid var(--line);background:rgba(255,255,255,.97);backdrop-filter:blur(12px);flex-wrap:wrap}.danger-soft{border:1px solid #efb6bb;background:#fff2f3;color:#b42318;border-radius:10px;padding:9px 12px;font-weight:700;cursor:pointer}
.order-totals{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;margin:16px 0}.order-totals>div,.order-info-grid>div,.order-money-grid>div{border:1px solid var(--line);border-radius:12px;padding:12px}.order-totals small,.order-info-grid small,.order-money-grid small{display:block;color:var(--muted);margin-bottom:6px}.order-totals strong,.order-money-grid strong{font-size:19px}.order-totals .risk,.order-money-grid .risk{border-color:#f0b7bb;background:#fff7f8;color:#b42318}.order-info-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:14px 0}.order-list-table td small{display:block;color:var(--muted);margin-top:4px}.order-list-table td{vertical-align:top}.order-section{margin:18px 0;padding:14px;border:1px solid var(--line);border-radius:14px;background:#fff}.order-money-grid{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:10px;margin:12px 0}.order-debt-alert{display:flex;justify-content:space-between;gap:14px;padding:12px 14px;border:1px solid #b7d2f1;background:#f3f8ff;border-radius:12px;margin:14px 0}.order-debt-alert.risk{border-color:#f0b7bb;background:#fff7f8;color:#8f1d27}.timeline-list{display:grid;gap:12px}.timeline-list article{position:relative;display:grid;grid-template-columns:18px 1fr;gap:10px}.timeline-dot{width:10px;height:10px;border-radius:50%;background:#64748b;margin-top:6px}.timeline-list small{display:block;color:var(--muted);margin-top:4px}.timeline-list p{margin:5px 0 0}.return-card{display:flex;justify-content:space-between;gap:14px;border:1px solid var(--line);border-radius:12px;padding:12px;margin-top:10px}.return-card b{margin-right:8px}.return-card small{display:block;color:var(--muted)}
.accounting-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.accounting-card{border:1px solid var(--line);border-radius:14px;padding:14px}.accounting-card header{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.accounting-card header small{display:block;color:var(--muted);margin-top:3px}.accounting-permissions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:14px 0}.accounting-permissions label{display:flex;gap:7px;align-items:flex-start;padding:8px;border:1px solid var(--line);border-radius:9px;background:#fafafa}.accounting-card .save-accounting{width:100%}.sla-row input[type=number]{width:110px}
@media(max-width:1250px){.order-filter{grid-template-columns:1fr 180px 190px 170px}.order-filter .check,.order-filter button{grid-column:auto}.order-totals{grid-template-columns:repeat(3,1fr)}.order-money-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:1100px){.order-metrics{grid-template-columns:repeat(3,1fr)}.order-form>.form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.order-info-grid{grid-template-columns:repeat(2,1fr)}.accounting-grid{grid-template-columns:1fr}}
@media(max-width:720px){.order-metrics{grid-template-columns:repeat(2,1fr)}.order-filter{grid-template-columns:1fr}.order-filter .check,.order-filter button{grid-column:auto}.order-dialog,.order-dialog.order-wide{width:calc(100vw - 12px)}.order-form>.form-grid,.order-info-grid{grid-template-columns:1fr}.order-form>.form-grid .span-2{grid-column:auto}.order-head{flex-direction:column}.order-head-badges{justify-content:flex-start}.order-totals,.order-money-grid{grid-template-columns:1fr 1fr}.order-footer,.order-actions{flex-wrap:wrap}.order-footer button,.order-actions button{flex:1}.order-debt-alert,.return-card{flex-direction:column}.accounting-permissions{grid-template-columns:1fr}}
/* CRM_ORDER_MINUTE_BADGE_4DIGIT_V1 */
.order-minute-head,.order-minute-cell{width:62px;min-width:62px;text-align:center;padding-left:6px!important;padding-right:6px!important}.order-minute-badge{display:inline-flex;align-items:center;justify-content:center;width:48px;min-width:48px;height:28px;padding:0 5px;border:0;border-radius:7px;font:800 12px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;letter-spacing:.4px;cursor:help;box-shadow:inset 0 0 0 1px rgba(15,23,42,.08)}.order-minute-badge.green{background:#dcfce7;color:#166534}.order-minute-badge.yellow{background:#fef3c7;color:#92400e}.order-minute-badge.red{background:#fee2e2;color:#b91c1c}.order-minute-badge:focus-visible{outline:2px solid #2563eb;outline-offset:2px}.order-list-table{min-width:1380px}
