.orders-workspace{display:grid;gap:20px;max-width:1440px;margin:0 auto}
.orders-heading,.order-section-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}
.orders-heading h1,.order-section-heading h2{margin:4px 0}
.orders-heading .subtitle{margin:6px 0 0;color:var(--muted,#64748b)}
.order-kpis,.order-money-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}
.order-kpis article,.order-money-cards article{display:grid;gap:8px;padding:16px;border:1px solid var(--border,#e2e8f0);border-radius:12px;background:var(--surface,#fff)}
.order-kpis article span,.order-money-cards article span{color:var(--muted,#64748b);font-size:.82rem}
.order-kpis article strong,.order-money-cards article strong{font-size:1.2rem}
.order-kpis .order-kpi-wide{grid-column:span 2}
.is-warning{border-color:#f5c275!important;background:#fffaf0!important}
.order-filters{display:flex;align-items:end;gap:10px;flex-wrap:wrap;padding:16px;border:1px solid var(--border,#e2e8f0);border-radius:12px;background:var(--surface,#fff)}
.order-filters label,.assign-form label{display:grid;gap:5px;font-size:.82rem;color:var(--muted,#64748b)}
.order-filters input,.order-filters select,.assign-form select,.inline-action input,.order-note-form textarea{min-height:38px;max-width:230px;padding:8px 10px;border:1px solid var(--border,#cbd5e1);border-radius:8px;background:#fff;color:inherit}
.order-table-wrap{max-width:100%;overflow:auto;border:1px solid var(--border,#e2e8f0);border-radius:12px;background:var(--surface,#fff)}
.order-table{width:100%;border-collapse:collapse;min-width:820px}
.order-table th,.order-table td{padding:12px 14px;border-bottom:1px solid var(--border,#edf0f4);text-align:left;vertical-align:middle}
.order-table th{color:var(--muted,#64748b);font-size:.78rem;font-weight:650;background:#f8fafc;white-space:nowrap}
.order-table td small{display:block;margin-top:4px;color:var(--muted,#64748b);font-size:.78rem}
.order-number{font-weight:700;text-decoration:none}
.order-number:hover{text-decoration:underline}
.step-chip,.payment-chip,.operation-status{display:inline-flex;align-items:center;width:max-content;padding:4px 9px;border-radius:999px;background:#eef2ff;color:#334155;font-size:.77rem;font-weight:650}
.payment-paid,.payment-overpaid,.operation-completed,.operation-skipped,.progress-completed,.progress-skipped{background:#e9f8ef;color:#17643b}
.payment-partial,.operation-active{background:#fff4dc;color:#8a4b08}
.payment-unpaid,.payment-void,.operation-cancelled{background:#f1f5f9;color:#475569}
.operation-pending{background:#f1f5f9;color:#64748b}
.text-danger{color:#b42318;font-weight:700}
.finance-locked-inline{color:var(--muted,#64748b);font-size:.8rem}
.empty-state{padding:25px!important;text-align:center!important;color:var(--muted,#64748b)}
.button-quiet{background:#f1f5f9;color:#334155;border-color:#e2e8f0}
.button-small{min-height:32px;padding:6px 10px;font-size:.8rem}
.pagination{display:flex;justify-content:center;align-items:center;gap:18px;padding:12px}
.pagination a,.back-link{color:#2456a6;text-decoration:none}
.back-link{width:max-content}
.order-detail-heading{margin-top:-8px}
.order-actions{display:flex;gap:8px;flex-wrap:wrap}
.order-tabs{display:flex;gap:8px;flex-wrap:wrap;border-bottom:1px solid var(--border,#e2e8f0);padding-bottom:8px}
.order-tabs a{padding:8px 12px;border-radius:8px;background:#f8fafc;color:#334155;text-decoration:none;font-size:.88rem}
.order-section{display:grid;gap:15px;padding:18px;border:1px solid var(--border,#e2e8f0);border-radius:14px;background:var(--surface,#fff);scroll-margin-top:20px}
.order-section-heading{margin-bottom:2px}
.order-section-heading .eyebrow{color:var(--muted,#64748b);font-size:.75rem;text-transform:uppercase;letter-spacing:.05em}
.order-progress-track{display:flex;gap:4px}
.progress-segment{height:7px;flex:1;border-radius:10px;background:#e2e8f0}
.progress-segment.progress-active{background:#f2b84b}
.progress-segment.progress-completed,.progress-segment.progress-skipped{background:#37a76f}
.workflow-list,.order-history{display:grid;gap:0;list-style:none;margin:0;padding:0}
.workflow-step{display:grid;grid-template-columns:32px minmax(0,1fr);gap:12px;position:relative;padding:14px 0}
.workflow-step:not(:last-child):after{content:"";position:absolute;left:15px;top:42px;bottom:-8px;width:2px;background:#e2e8f0}
.workflow-marker{z-index:1;display:grid;place-items:center;width:32px;height:32px;border:2px solid #d7dee8;border-radius:50%;background:#fff;color:#64748b;font-size:.78rem;font-weight:700}
.workflow-active .workflow-marker{border-color:#e4a62b;background:#fff7e6;color:#704500}
.workflow-completed .workflow-marker,.workflow-skipped .workflow-marker{border-color:#3b9a68;background:#e9f8ef;color:#17643b}
.workflow-step-main{min-width:0}
.workflow-step-title{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.workflow-step-main>p{margin:6px 0;color:var(--muted,#64748b);font-size:.83rem}
.step-actions,.assign-form,.inline-action,.form-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.step-actions{margin:8px 0}
.inline-action{display:inline-flex}
.inline-action input{max-width:220px;min-height:32px;padding:5px 8px}
.assign-form{margin-top:9px}
.assign-form select{min-height:32px}
.order-info-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 28px;margin:0}
.order-info-grid>div{min-width:0}
.order-info-grid dt{margin-bottom:5px;color:var(--muted,#64748b);font-size:.8rem}
.order-info-grid dd{margin:0;overflow-wrap:anywhere}
.order-info-grid .order-address{grid-column:1/-1}
.order-table tfoot th,.order-table tfoot td{background:#fafbfd}
.payment-row-void td{color:#718096;background:#fafafa}
.order-note-form{display:grid;gap:8px;padding:14px;border:1px solid var(--border,#e2e8f0);border-radius:10px;background:#fafbfd}
.order-note-form textarea{width:100%;max-width:720px;resize:vertical}
.schedule-form{display:flex;align-items:end;gap:10px;flex-wrap:wrap;padding:14px;border:1px solid var(--border,#e2e8f0);border-radius:10px;background:#fafbfd}
.schedule-form label{display:grid;gap:5px;color:var(--muted,#64748b);font-size:.82rem}
.schedule-form input{min-height:36px;padding:7px 9px;border:1px solid var(--border,#cbd5e1);border-radius:8px;background:#fff;color:inherit}
.schedule-overdue{color:#b42318;font-weight:700}
.schedule-due{color:#8a4b08;font-weight:700}
.schedule-paid{color:#17643b;font-weight:700}
.schedule-upcoming{color:#475569}
.checkbox-label{display:flex;align-items:center;gap:8px;font-size:.84rem}
.order-history li{display:grid;grid-template-columns:18px minmax(0,1fr);gap:12px;padding:12px 0}
.history-dot{width:10px;height:10px;margin:5px 0 0 4px;border-radius:50%;background:#7996c7}
.order-history p{margin:5px 0}
.order-history small{color:var(--muted,#64748b)}
.order-create-form{display:grid;gap:18px}
.form-grid{display:grid;grid-template-columns:minmax(170px,220px) minmax(200px,1fr);align-items:center;gap:12px}
.form-grid input,.form-grid select,.form-grid textarea,.order-lines input{width:100%;max-width:640px;min-height:38px;padding:8px 10px;border:1px solid var(--border,#cbd5e1);border-radius:8px;background:#fff}
.form-grid textarea{resize:vertical}
.order-lines{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px}
.order-lines fieldset{min-width:0;border:1px solid var(--border,#e2e8f0);border-radius:10px}
.order-lines legend{padding:0 6px;font-weight:650}
.order-lines p{display:grid;gap:5px}
.field-error{color:#b42318}
@media(max-width:760px){
  .orders-heading,.order-section-heading{align-items:flex-start;flex-direction:column}
  .order-kpis,.order-money-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
  .order-kpis .order-kpi-wide{grid-column:1/-1}
  .order-filters{align-items:stretch}
  .order-filters label{width:100%}
  .order-filters input,.order-filters select{max-width:none;width:100%}
  .order-info-grid{grid-template-columns:1fr}
  .order-info-grid .order-address{grid-column:auto}
  .form-grid{grid-template-columns:1fr;gap:6px}
  .form-grid label{margin-top:8px}
  .order-detail-heading{align-items:flex-start}
  .order-actions{width:100%}
}
