/* ==========================================================================
   AKASH UDYOG — HIGH-DENSITY ERP ADMIN ORDER WORKBENCH
   Zero Empty Space · Single Command Bar · Balanced 2x2 Grid
   ========================================================================== */

body.admin-ui main {
  max-width: 1400px;
}

/* 1. Outer Admin Order Card & Summary Row */
.admin-order-card {
  border: 1px solid #cbd5e1 !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05) !important;
  margin-bottom: 8px !important;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-order-card:hover {
  border-color: #94a3b8 !important;
}

.admin-order-card[open] {
  border: 1.5px solid #0e6a5c !important;
  box-shadow: 0 6px 18px rgba(14, 106, 92, 0.09) !important;
  margin-bottom: 14px !important;
}

.admin-order-card > summary.order-line-summary {
  padding: 9px 14px !important;
  background: #ffffff;
  border-bottom: 1px solid transparent;
}

.admin-order-card[open] > summary.order-line-summary {
  background: #f0fdf9;
  border-bottom: 1px solid #ccebd7;
}

.admin-order-card > .order-expanded-body {
  padding: 10px 12px 12px !important;
  background: #f1f5f9;
  border-top: none !important;
  margin-top: 0 !important;
}

/* 2. Zone 1: Single Sleek Command & Progress Bar (No Duplicate Identity!) */
.admin-command-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 7px 12px;
  margin-bottom: 10px;
}

.command-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.order-weight-badge {
  background: #f8fafc;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.order-bulk-badge {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

/* Inline Compact Progress Stepper inside Command Bar */
.command-bar-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-left: 6px;
  border-left: 1.5px solid #e2e8f0;
}

.command-bar-progress .order-progress {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 4px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}

.command-bar-progress .order-progress li {
  padding: 2px 8px !important;
  border-top: none !important;
  border-radius: 999px;
  font-size: 11px !important;
  font-weight: 600;
  background: #f1f5f9;
  color: #64748b !important;
  border: 1px solid #e2e8f0;
  white-space: nowrap;
}

.command-bar-progress .order-progress li.done {
  background: #ecfdf5;
  color: #047857 !important;
  border-color: #a7f3d0;
  font-weight: 700;
}

.command-bar-progress .payment-state {
  margin: 0 !important;
  font-size: 11.5px !important;
  color: #475569;
  font-weight: 600;
  background: #f8fafc;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.command-bar-tracking {
  font-size: 11.5px;
  color: #0369a1;
  background: #e0f2fe;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
}

.command-bar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: auto;
}

.command-warn-pill {
  font-size: 11px;
  font-weight: 700;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fde68a;
  padding: 3px 8px;
  border-radius: 6px;
}

.command-warn-pill.danger {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}

.primary-cta-btn {
  padding: 5px 12px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
  box-shadow: 0 1px 2px rgba(14, 106, 92, 0.15);
  white-space: nowrap;
}

.command-btn,
.command-bar-actions .button.secondary,
.command-bar-actions a.button.secondary,
a.button.whatsapp-share,
button.whatsapp-share {
  padding: 4px 10px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  margin: 0 !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
}

a.button.whatsapp-share:hover,
button.whatsapp-share:hover {
  background: #1ebe5d !important;
  border-color: #1ebe5d !important;
  color: #fff !important;
}

.command-bar-actions .more-order-actions {
  position: relative;
  margin: 0;
}

.command-bar-actions .more-order-actions > summary {
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}

.command-bar-actions .more-order-actions > summary::-webkit-details-marker {
  display: none;
}

.command-bar-actions .more-order-actions[open] > div {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 185px;
}

/* 3. Zone 2: Balanced 7-Step Vertical Linear Sequence (Top to Bottom) */
.admin-order-steps-vertical {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
  width: 100%;
}

.order-step-section {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 12px 14px;
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}

.order-step-section:focus-within,
.order-step-section:hover {
  border-color: #94a3b8;
}

details.order-step-section {
  padding: 0 !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  overflow: hidden;
  margin: 0 !important;
}

details.order-step-section > summary.order-step-summary {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 12px 14px !important;
  cursor: pointer !important;
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  margin: 0 !important;
  user-select: none;
}

details.order-step-section > summary::-webkit-details-marker {
  display: none;
}

details.order-step-section:not([open]) > summary.order-step-summary {
  border-bottom: none !important;
}

.order-step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.step-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.step-badge-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0e6a5c;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  box-shadow: 0 1px 2px rgba(14, 106, 92, 0.25);
  flex-shrink: 0;
  line-height: 1.2;
}

.step-heading-text {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.3;
}

details.order-step-section > .step-content-body,
details.order-step-section > .pi-panel-body,
details.order-step-section > .payment-step-body {
  padding: 12px 14px;
}

div.order-step-section > .step-content-body {
  padding: 0;
}

.admin-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.admin-panel-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.panel-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 7px;
  margin-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.panel-card-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.panel-card-title h4 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}

/* Compact Items Table & Compact Bill inside Left Panel */
.admin-order-card .tally-scroll.tally-compact {
  margin: 0 0 8px 0 !important;
  border-radius: 6px;
}

.admin-order-card .tally-compact th,
.admin-order-card .tally-compact td {
  padding: 5px 8px !important;
  font-size: 12.5px !important;
}

.admin-order-card .order-sample-summary {
  margin: 0 0 6px 0 !important;
  padding: 5px 10px !important;
  font-size: 12px;
}

.admin-order-card .order-bill-summary .bill {
  margin: 0 !important;
  padding: 8px 12px !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 6px !important;
}

.admin-order-card .order-bill-summary .bill .row.between {
  margin: 2px 0 !important;
  padding: 1px 0 !important;
  font-size: 12.5px !important;
  color: #334155;
}

.admin-order-card .order-bill-summary .bill hr {
  margin: 5px 0 !important;
  border: none;
  border-top: 1px dashed #cbd5e1;
}

.admin-order-card .order-bill-summary .bill .row.between[style*="font-size:17px"] {
  font-size: 14.5px !important;
  color: #0f172a;
  padding-top: 2px !important;
}

.admin-order-card .freight-quote-card {
  margin: 6px 0 0 0 !important;
  padding: 7px 10px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
}

.admin-order-card .material-ready {
  margin: 6px 0 0 0 !important;
  padding: 6px 10px !important;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-order-card .order-history {
  margin: 6px 0 0 0 !important;
  padding: 5px 10px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
}

/* Right Panel: Bill-to / Ship-to & Party Assignment */
.admin-order-card .order-address-card {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
}

.admin-order-card .order-address-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.admin-order-card .order-address-columns > div {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 7px 10px;
}

.admin-order-card .order-address-columns > div > strong {
  display: inline-block;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0e6a5c;
  background: #ecfdf5;
  padding: 1px 6px;
  border-radius: 4px;
  margin-bottom: 4px;
}

.admin-order-card .order-address-columns > div > p {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: #1e293b;
}

.admin-order-card .order-address-editor,
.admin-order-card .order-party-correction {
  margin: 5px 0 0 0 !important;
  padding: 5px 10px !important;
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  font-size: 12px;
}

.admin-order-card .order-address-editor > summary,
.admin-order-card .order-party-correction > summary {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
}

.order-inline-note {
  margin-top: 6px;
  font-size: 12px;
  color: #475569;
  background: #f8fafc;
  padding: 5px 9px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.order-inline-tracking {
  margin-top: 6px;
  font-size: 12px;
  color: #065f46;
  background: #ecfdf5;
  padding: 5px 9px;
  border-radius: 6px;
  border: 1px solid #a7f3d0;
}

/* 4. Zone 3: Full-Width 2-Column Document Workbench (Step 2 PI Left | Step 3 Invoice Right) */
.admin-documents-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 10px;
  align-items: stretch;
  margin-top: 10px;
}

.admin-doc-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-doc-col > details.order-tool-panel {
  flex: 1;
  margin: 0 !important;
  padding: 10px 12px !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

.admin-doc-col > details.order-tool-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 7px;
  margin-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
  cursor: pointer;
  font-size: 13.5px;
}

.admin-doc-col > details.order-tool-panel:not([open]) > summary {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}

.admin-doc-col .order-step-summary h4 {
  margin: 0;
  font-size: 13.5px;
  color: #0f172a;
}

.pi-meta-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 7px;
}

.pi-meta-badge {
  font-size: 11.5px;
  background: #f1f5f9;
  color: #0f172a;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
}

.admin-order-card .order-tool-note {
  margin: 2px 0 !important;
  font-size: 11.5px !important;
  line-height: 1.35 !important;
  color: #64748b !important;
}

.admin-order-card .document-buttons,
.admin-order-card .document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px !important;
  margin: 6px 0 !important;
}

.admin-order-card .document-buttons > *,
.admin-order-card .document-actions > * {
  padding: 5px 10px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  margin: 0 !important;
}

/* Compact PI Attach Strip */
.admin-order-card details.pi-attach {
  margin-top: 8px !important;
  padding: 8px 10px !important;
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
}

.admin-order-card details.pi-attach > summary {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
}

.pi-attach-grid {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 7px;
}

.pi-attach-row {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.pi-num-field {
  flex: 1 1 180px;
  margin: 0 !important;
  font-size: 11.5px !important;
  font-weight: 600;
  color: #334155;
}

.pi-num-field input {
  margin-top: 3px !important;
  padding: 5px 8px !important;
  font-size: 12px !important;
  height: 31px;
  box-sizing: border-box;
}

.pi-attach-row button {
  padding: 5px 10px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  height: 31px;
  margin: 0 !important;
  white-space: nowrap;
}

.pi-attach-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 6px;
  border-top: 1px dashed #cbd5e1;
}

.admin-order-card .pi-file-label,
.admin-order-card .document-upload {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin: 4px 0 0 0 !important;
  padding: 5px 8px !important;
  background: #ffffff;
  border: 1px dashed #94a3b8;
  border-radius: 6px;
  font-size: 11.5px !important;
  font-weight: 600;
  color: #1e293b;
}

.admin-order-card .pi-file-label input[type="file"],
.admin-order-card .document-upload input[type="file"] {
  font-size: 11px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  width: auto !important;
  max-width: 210px;
}

/* Step 3: Tax Invoice & e-Way Bill Cards */
.admin-order-card .document-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px !important;
  margin-top: 6px !important;
}

.admin-order-card .document-card {
  padding: 8px 10px !important;
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  margin: 0 !important;
}

.admin-order-card .document-card-heading {
  margin-bottom: 4px !important;
}

.admin-order-card .document-card-heading h4 {
  font-size: 13px !important;
  margin: 0 !important;
}

.admin-order-card .document-reference {
  margin: 2px 0 6px 0 !important;
  font-size: 12.5px !important;
  font-weight: 700;
  color: #0f172a;
}

/* Inline Invoice Lookup Form (Input + Read from Tally on ONE row!) */
.admin-order-card .invoice-lookup {
  display: flex !important;
  align-items: flex-end;
  gap: 6px !important;
  margin: 4px 0 6px 0 !important;
}

.admin-order-card .invoice-lookup label {
  flex: 1 1 160px;
  margin: 0 !important;
  font-size: 11.5px !important;
  font-weight: 600;
  color: #334155;
}

.admin-order-card .invoice-lookup input {
  margin-top: 3px !important;
  padding: 5px 8px !important;
  font-size: 12px !important;
  height: 31px;
  box-sizing: border-box;
}

.admin-order-card .invoice-lookup button {
  padding: 5px 10px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  height: 31px;
  margin: 0 !important;
  white-space: nowrap;
}

/* 5. Zone 4: Conditional Bottom Workbench (Step 4 Courier / Local Bilty & Payment Proof) */
.admin-bottom-workbench {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.admin-bottom-workbench:empty {
  display: none;
}

.admin-bottom-workbench > * {
  margin: 0 !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 10px 12px !important;
}

.admin-courier-footnote {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding: 4px 8px;
  font-size: 11.5px;
  color: #64748b;
}

/* 6. Responsive Breakpoints (Tablet & Mobile View) */
@media (max-width: 980px) {
  .admin-overview-grid,
  .admin-documents-workbench,
  .admin-bottom-workbench {
    grid-template-columns: 1fr;
  }
}

/* Mobile rules relocated to end of stylesheet */


/* ===== UNIFIED STEP 3 INVOICE & SAMPLE CONTAINER STYLES ===== */
.unified-invoice-container {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px 14px;
  margin: 8px 0;
}

.inline-invoice-review {
  background: transparent;
  border: none;
  padding: 0;
  margin-bottom: 8px;
}

.inline-invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f1f5f9;
}

.inline-invoice-header h5 {
  margin: 0;
  font-size: 13.5px;
  color: #0f172a;
  font-weight: 700;
}

.company-pill {
  font-size: 11px;
  color: #0369a1;
  background: #e0f2fe;
  padding: 2px 7px;
  border-radius: 4px;
}

.inline-rule-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.eway-rule-pill {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 5px;
}

.eway-rule-pill.not-required {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.eway-rule-pill.required {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.btn-xs {
  font-size: 11px !important;
  padding: 3px 8px !important;
  min-height: 26px !important;
  height: 26px !important;
  border-radius: 4px !important;
}

.unified-voucher-box {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 10px 0;
}

.voucher-num-label {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #1e293b;
  margin: 0 !important;
}

.voucher-field-wrap {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 4px;
}

.voucher-field-wrap input {
  flex: 1;
  min-width: 140px;
  height: 34px !important;
  font-size: 13px !important;
  font-weight: 700;
  color: #0f172a;
  border: 1.5px solid #94a3b8 !important;
  border-radius: 6px !important;
}

.voucher-field-wrap button {
  height: 34px !important;
  padding: 0 12px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  margin: 0 !important;
}

.voucher-status-note {
  font-size: 11px;
  color: #475569;
  margin-top: 5px;
}

.invoice-btn-group {
  margin-top: 10px;
}

.create-invoice-cta {
  background: #059669 !important;
  color: #ffffff !important;
  border: 1px solid #047857 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  height: 36px !important;
  box-shadow: 0 1px 2px rgba(5, 150, 105, 0.2);
  cursor: pointer;
}

.create-invoice-cta:hover {
  background: #047857 !important;
}

.invoice-ready-card {
  background: #f0fdf4 !important;
  border: 1.5px solid #86efac !important;
}

/* Fix table and edit item horizontal overflow */
body.admin-ui .admin-review-item-card {
  min-width: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.tally-compact th:first-child,
.tally-compact td:first-child {
  min-width: 120px !important;
}

.tally-scroll {
  max-width: 100% !important;
}

.packing-summary {
  max-width: 100% !important;
  overflow: hidden !important;
}


/* ===== SUPER COMPACT STEP 3, STEP 4 & ADDRESS LAYOUTS ===== */
.compact-invoice-form {
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
}

.compact-invoice-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.compact-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.compact-transport-grid {
  display: grid !important;
  grid-template-columns: 130px 1.4fr 1.1fr 1fr !important;
  gap: 8px !important;
  align-items: end !important;
  margin: 0 !important;
}

.compact-transport-grid label {
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #475569 !important;
  margin: 0 !important;
}

.compact-transport-grid input {
  height: 32px !important;
  padding: 4px 8px !important;
  font-size: 12px !important;
  margin-top: 2px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  background: #ffffff !important;
}

.super-compact-invoice-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  margin-top: 8px !important;
  padding-top: 8px !important;
  border-top: 1px dashed #cbd5e1 !important;
}

.super-compact-invoice-bar .unified-voucher-box {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.super-compact-invoice-bar .voucher-num-label {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 !important;
  font-size: 11.5px !important;
  white-space: nowrap !important;
}

.super-compact-invoice-bar .voucher-field-wrap {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  margin: 0 !important;
}

.super-compact-invoice-bar .voucher-field-wrap input {
  width: 130px !important;
  height: 32px !important;
  padding: 4px 8px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  border: 1.5px solid #0284c7 !important;
  border-radius: 6px !important;
}

.super-compact-invoice-bar .voucher-field-wrap button {
  height: 32px !important;
  padding: 0 8px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  margin: 0 !important;
}

.super-compact-invoice-bar .voucher-status-note {
  font-size: 10.5px !important;
  color: #64748b !important;
  margin: 0 !important;
  white-space: nowrap !important;
}

.super-compact-invoice-bar .invoice-btn-group {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
}

.super-compact-invoice-bar .create-invoice-cta {
  height: 34px !important;
  padding: 0 14px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  background: #059669 !important;
  color: #ffffff !important;
  border: 1px solid #047857 !important;
  border-radius: 6px !important;
  white-space: nowrap !important;
  cursor: pointer !important;
}

.super-compact-invoice-bar .find-invoice-btn {
  height: 34px !important;
  padding: 0 12px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  white-space: nowrap !important;
}

/* Step 4 Super Compact */
.compact-booking-row {
  display: grid !important;
  grid-template-columns: 1fr 1fr 140px !important;
  gap: 8px !important;
  align-items: end !important;
  margin: 6px 0 !important;
}

.compact-booking-row label {
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #334155 !important;
  margin: 0 !important;
}

.compact-booking-row select,
.compact-booking-row input {
  height: 32px !important;
  font-size: 12px !important;
  padding: 4px 8px !important;
  margin-top: 2px !important;
}

.shipment-panel fieldset.shipment-receiver {
  display: grid !important;
  grid-template-columns: 1fr 1fr 120px !important;
  gap: 8px !important;
  padding: 8px 10px !important;
  margin: 8px 0 !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 6px !important;
}

.shipment-panel fieldset.shipment-receiver .receiver-address {
  grid-column: 1 / -1 !important;
}

.shipment-panel fieldset.shipment-receiver label {
  font-size: 11px !important;
  margin: 0 !important;
}

.shipment-panel fieldset.shipment-receiver input {
  height: 30px !important;
  font-size: 12px !important;
  padding: 4px 6px !important;
}

/* Edit Bill-to / Ship-to Compact */
.order-address-columns {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
}

.order-address-columns fieldset {
  padding: 8px 10px !important;
  border-radius: 6px !important;
  border: 1px solid #cbd5e1 !important;
  margin: 0 !important;
}

.order-address-columns label {
  font-size: 11px !important;
  margin-bottom: 4px !important;
}

.order-address-columns input,
.order-address-columns select {
  height: 30px !important;
  font-size: 12px !important;
  padding: 3px 6px !important;
}

.order-address-columns textarea {
  min-height: 44px !important;
  height: 44px !important;
  font-size: 11.5px !important;
}


/* ========================================================
   Visual Order Stepper Pipeline & Next Action Hero
   ======================================================== */
.order-pipeline-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 8px 0 14px;
  overflow-x: auto;
}

.stepper-step {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.stepper-step:hover {
  transform: translateY(-1px);
}

.stepper-node {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: #e2e8f0;
  color: #64748b;
  border: 2px solid #cbd5e1;
}

.step-done .stepper-node {
  background: #059669;
  color: #fff;
  border-color: #047857;
}

.step-active .stepper-node {
  background: #f59e0b;
  color: #fff;
  border-color: #d97706;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
  animation: pulse-node 2s infinite;
}

@keyframes pulse-node {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.stepper-label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.step-done .stepper-label {
  color: #065f46;
}

.step-active .stepper-label {
  color: #b45309;
  font-weight: 700;
}

.stepper-connector {
  flex: 1;
  height: 2px;
  background: #e2e8f0;
  margin: 0 8px;
  min-width: 16px;
}

.connector-done {
  background: #059669;
}

.connector-active {
  background: linear-gradient(90deg, #059669, #f59e0b);
}

/* Mini stepper inside collapsed summary */
.mini-stepper {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  vertical-align: middle;
  margin-left: 8px;
}

.mini-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #cbd5e1;
  display: inline-block;
}

.mini-dot.is-done {
  background: #059669;
}

.mini-dot.is-active {
  background: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3);
}

.mini-line {
  width: 8px;
  height: 1.5px;
  background: #e2e8f0;
  display: inline-block;
}

.mini-line.is-done {
  background: #059669;
}

.mini-line.is-active {
  background: #f59e0b;
}

/* Order Next Action Hero Banner */
.order-next-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-action {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.hero-ready {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.hero-in-transit {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0369a1;
}

.hero-completed {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
}

.hero-rejected {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.hero-text {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-badge-icon {
  font-size: 20px;
}

.hero-text strong {
  display: block;
  font-size: 13.5px;
}

.hero-text small {
  display: block;
  font-size: 11.5px;
  opacity: 0.9;
}

.hero-btn {
  background: #0e6a5c;
  color: #fff;
  border: none;
  font-weight: 600;
  font-size: 12.5px;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.hero-btn:hover {
  background: #0b5348;
}

.hero-btn-dispatch {
  background: #2563eb;
}

.hero-btn-dispatch:hover {
  background: #1d4ed8;
}

.hero-btn-sm {
  font-size: 11px;
  padding: 4px 10px;
}

/* Quick Filter Pills Bar */
.quick-filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 6px 0 10px;
  margin-bottom: 8px;
}

.filter-pill {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.filter-pill:hover {
  background: #e2e8f0;
}

.filter-pill.active {
  background: #0e6a5c;
  border-color: #0e6a5c;
  color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.filter-pill.pill-warn {
  border-color: #f59e0b;
  color: #b45309;
}

.filter-pill.pill-warn.active {
  background: #d97706;
  border-color: #d97706;
  color: #fff;
}

/* Redundant duplicate command bar elements cleanup */
.admin-command-bar .command-bar-progress,
.admin-command-bar .dispatch-cta,
.admin-command-bar [data-payment-order] {
  display: none !important;
}



/* ========================================================= */
/* COMPREHENSIVE RESPONSIVE RULES FOR MOBILE (MAX-WIDTH 640PX) */
/* Placed at end of file so all mobile styles win over desktop */
/* ========================================================= */
@media (max-width: 640px) {
  .order-step-section {
    padding: 10px 10px !important;
    border-radius: 8px !important;
  }
  details.order-step-section > summary.order-step-summary {
    padding: 10px 10px !important;
  }
  .step-badge-number {
    font-size: 11.5px !important;
    padding: 2px 7px !important;
  }
  .step-heading-text {
    font-size: 13.5px !important;
  }
  details.order-step-section > .step-content-body,
  details.order-step-section > .pi-panel-body,
  details.order-step-section > .payment-step-body {
    padding: 10px !important;
  }
  .admin-order-card > .order-expanded-body {
    padding: 8px !important;
  }
  .admin-command-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 8px 10px !important;
  }
  .command-bar-progress {
    display: none !important;
  }
  .command-bar-actions {
    margin-left: 0 !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  .admin-order-card .order-address-columns {
    grid-template-columns: 1fr !important;
  }
  .pi-attach-row,
  .admin-order-card .invoice-lookup {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .compact-transport-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }

  /* Step 3: Super Compact Invoice Bar Responsive */
  .super-compact-invoice-bar {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    gap: 10px !important;
    margin-top: 8px !important;
    padding-top: 8px !important;
  }
  .super-compact-invoice-bar .unified-voucher-box {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    gap: 6px !important;
  }
  .super-compact-invoice-bar .voucher-num-label {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    font-size: 12px !important;
    white-space: normal !important;
  }
  .super-compact-invoice-bar .voucher-field-wrap {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    gap: 4px !important;
  }
  .super-compact-invoice-bar .voucher-field-wrap input {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    height: 36px !important;
    font-size: 14px !important;
  }
  .super-compact-invoice-bar .voucher-field-wrap button {
    height: 36px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
    flex-shrink: 0 !important;
  }
  .super-compact-invoice-bar .voucher-status-note {
    width: 100% !important;
    white-space: normal !important;
    font-size: 11px !important;
    color: #64748b !important;
  }
  .super-compact-invoice-bar .invoice-btn-group {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 8px !important;
    margin: 0 !important;
  }
  .super-compact-invoice-bar .create-invoice-cta,
  .super-compact-invoice-bar .find-invoice-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 42px !important;
    height: auto !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    white-space: normal !important;
    text-align: center !important;
    box-sizing: border-box !important;
    border-radius: 6px !important;
  }
  .super-compact-invoice-bar .find-invoice-btn {
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
  }

  /* Step 4: Bigship Booking Responsive */
  .compact-booking-row {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }
  .shipment-panel fieldset.shipment-receiver {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }
}


/* ==========================================================================
   Order Summary Line Copy Buttons & Phone Link Removal (User Request)
   ========================================================================== */
.order-line-name-row {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  min-width: 0 !important;
}

.order-phone-wrap {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.order-phone-text {
  color: #0284c7 !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  user-select: text !important;
}

.copy-line-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 4px !important;
  padding: 2px 4px !important;
  margin: 0 !important;
  cursor: pointer !important;
  color: #64748b !important;
  line-height: 1 !important;
  vertical-align: middle !important;
  transition: all 0.15s ease !important;
  opacity: 0.65 !important;
  box-shadow: none !important;
  outline: none !important;
}

.copy-line-btn:hover {
  opacity: 1 !important;
  color: #0e6a5c !important;
  background: #e6f4f1 !important;
  border-color: #bbf0e4 !important;
  transform: scale(1.1) !important;
}

.copy-line-btn.copied {
  opacity: 1 !important;
  color: #059669 !important;
  background: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
}

.copy-icon-svg {
  display: block !important;
  pointer-events: none !important;
}

/* ==========================================================================
   Step 7 & Accordion Chevron Indicators & Badge Specificity Fix
   ========================================================================== */
#order-list .shipment-panel > summary {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 12px 14px !important;
  cursor: pointer !important;
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  margin: 0 !important;
  list-style: none !important;
  user-select: none !important;
}

#order-list .shipment-panel > summary::-webkit-details-marker {
  display: none !important;
}

#order-list details.shipment-panel:not([open]) > summary {
  border-bottom: none !important;
}

#order-list .shipment-panel > summary span.step-badge-number,
#order-list .step-badge-number,
.step-badge-number {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #0e6a5c !important;
  color: #ffffff !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  padding: 3px 10px !important;
  border-radius: 6px !important;
  letter-spacing: 0.5px !important;
  box-shadow: 0 1px 2px rgba(14, 106, 92, 0.25) !important;
  flex-shrink: 0 !important;
  line-height: 1.2 !important;
  margin: 0 !important;
}

#order-list .shipment-panel > summary .step-heading-text,
.step-heading-text {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin: 0 !important;
}

.step-summary-right {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
}

.step-toggle-chevron {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 11px !important;
  color: #64748b !important;
  margin-left: 4px !important;
  transition: transform 0.2s ease !important;
  user-select: none !important;
}

details.order-step-section[open] > summary .step-toggle-chevron {
  transform: rotate(90deg) !important;
}

.order-line-alias-row {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  margin-top: 1px !important;
}

.order-line-alias-row .order-line-alias {
  color: #64748b !important;
  font-size: 11.5px !important;
  line-height: 1.2 !important;
  user-select: text !important;
}

.order-line-alias-row .copy-line-btn {
  padding: 1px 3px !important;
  opacity: 0.55 !important;
}

.order-line-alias-row .copy-line-btn:hover {
  opacity: 1 !important;
}


/* ==========================================================================
   Tighten Spacing Between Order Party Names (User Request: Remove excess space)
   ========================================================================== */
.order-line-party {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.15 !important;
  min-width: fit-content !important;
  flex-shrink: 0 !important;
}

.order-line-name-row {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  height: auto !important;
  min-height: 0 !important;
}

.order-line-name {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  line-height: 1.2 !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: nowrap !important;
}

.order-line-alias-row {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  height: auto !important;
  min-height: 0 !important;
}

.order-line-alias {
  color: #64748b !important;
  font-size: 11.5px !important;
  line-height: 1.15 !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  user-select: text !important;
}

/* Explicitly strip global button min-height from inline copy buttons */
.copy-line-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 3px !important;
  padding: 0 1px !important;
  margin: 0 !important;
  cursor: pointer !important;
  color: #64748b !important;
  line-height: 1 !important;
  height: 14px !important;
  min-height: 14px !important;
  max-height: 14px !important;
  width: 14px !important;
  min-width: 14px !important;
  vertical-align: middle !important;
  transition: all 0.15s ease !important;
  opacity: 0.6 !important;
  box-shadow: none !important;
  outline: none !important;
  flex-shrink: 0 !important;
}

.copy-line-btn:hover {
  opacity: 1 !important;
  color: #0e6a5c !important;
  background: #e6f4f1 !important;
  border-color: #bbf0e4 !important;
  transform: scale(1.1) !important;
}

.copy-line-btn.copied {
  opacity: 1 !important;
  color: #059669 !important;
  background: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
}

.copy-line-btn .copy-icon-svg {
  display: block !important;
  width: 11px !important;
  height: 11px !important;
}

/* Allow mouse text selection and highlight on party name, alias, phone, order number */
summary.order-line-summary .order-line-party,
summary.order-line-summary .order-line-party *,
summary.order-line-summary .order-line-name,
summary.order-line-summary .order-line-alias,
summary.order-line-summary .sku.order-line-id,
summary.order-line-summary .order-phone-wrap,
summary.order-line-summary .order-phone-text {
  user-select: text !important;
  -webkit-user-select: text !important;
  cursor: text !important;
}

summary.order-line-summary .copy-line-btn,
summary.order-line-summary .copy-line-btn * {
  cursor: pointer !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}
