/* ==========================================================================
   ELITE GROUP · views-orders.css  (orders, receive goods, deliveries,
   payments & dues, delivery issues). Colours come only from the CSS
   variables of app.css, so the dark theme works.
   ========================================================================== */

/* ---- lists ---- */
.vo-toggle { min-height: 40px; font-size: 13.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.vo-toggle input { width: 20px; height: 20px; }
.vo-deliv { display: flex; flex-direction: column; gap: 6px; min-width: 130px; }
.vo-deliv .progress { max-width: 160px; }
.vo-rowacts { justify-content: flex-end; align-items: center; }
.vo-rowacts .btn.sm { min-height: 40px; }
td.vo-wide { min-width: 200px; }
/* long delivery labels wrap inside the badge instead of widening the whole table */
@media (min-width: 721px) { .vo-deliv .badge { white-space: normal; border-radius: 10px; line-height: 1.3; } }

/* ---- order page ---- */
.vo-stepper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.vo-recv { display: flex; flex-direction: column; gap: 5px; min-width: 110px; }
.vo-totals { padding: 6px 18px 14px; border-top: 1px solid var(--line); }
.vo-total { font-family: var(--font-display); font-size: 19px; color: var(--ink); }
.vo-amount { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.vo-amount > .strong { font-size: 17px; color: var(--ink); white-space: nowrap; }
.vo-voided { opacity: .68; }
.vo-voided .card-title { text-decoration: line-through; }
.vo-review { border: 1.5px solid var(--amber); }
.vo-bill.vo-review { border-color: var(--red); }
.vo-problems { margin: 6px 0 0; padding-left: 18px; }
.vo-problems li { margin: 2px 0; overflow-wrap: anywhere; }
.vo-pay { padding: 12px 0; border-top: 1px solid var(--line); }
.vo-pay:first-child { border-top: 0; padding-top: 0; }
.vo-fold > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; font-weight: 650; font-size: 13.5px; color: var(--muted); list-style: none; }
.vo-fold > summary::-webkit-details-marker { display: none; }
.vo-fold > summary::after { content: "+"; margin-left: auto; font-size: 20px; transition: transform .2s var(--ease); }
.vo-fold[open] > summary::after { transform: rotate(45deg); }

/* ---- forms: revise, bill, payment ---- */
.vo-rev-line { align-items: end; }
.vo-rev-name { grid-column: 1 / -1; min-width: 0; overflow-wrap: anywhere; }
.vo-line-amt { grid-column: 1 / -1; }
.vo-newtotal { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 15px; overflow-wrap: anywhere; }
.vo-newtotal > .strong { font-size: 18px; color: var(--ink); }
.vo-paybox { padding: 4px 14px; margin-bottom: 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }

/* ---- receive goods ---- */
.vo-receive { max-width: 820px; }
.vo-rline { transition: transform .2s var(--ease); }
.vo-pending { color: var(--ink); }
.vo-rline-note { display: flex; flex-wrap: wrap; gap: 6px; min-height: 4px; margin-top: 6px; }
.vo-rest { border: 1.5px solid var(--amber); }
.vo-preview { background: var(--surface-2); }
.vo-report { padding: 10px 12px; border-radius: 12px; background: var(--amber-bg); color: var(--amber-ink); }
.vo-receive .form-error { display: flex; gap: 8px; align-items: flex-start; }
.vo-receive .form-error[hidden] { display: none; }

/* ---- print (purchase order) ---- */
.vo-print-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 8px 0 12px; line-height: 1.5; }
.vo-print-cap { font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .65; margin-bottom: 2px; }
.vo-print-terms { margin-top: 10px; line-height: 1.6; }

@media (max-width: 720px) {
  .vo-deliv, .vo-recv { align-items: flex-end; min-width: 0; }
  .vo-deliv .progress, .vo-recv .progress { width: 120px; }
  td.vo-wide { min-width: 0; }
  .vo-rowacts { flex-wrap: wrap; }
  .vo-rowacts .btn.sm { min-height: 46px; flex: 1 1 auto; }
  .vo-amount > .strong { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .vo-rline, .vo-fold > summary::after { transition: none; }
}

/* Bill and revise forms: each material is one tidy block: name on top, then quantity, rate and amount
   as three even columns that line up across every material. */
.vo-rev-line { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(7.5rem, .8fr); align-items: start; gap: 10px 14px; padding: 14px 16px; }
.vo-rev-line > .field { margin: 0; }
.vo-rev-line > .field input { width: 100%; }
.vo-rev-name { padding-bottom: 6px; margin-bottom: 2px; border-bottom: 1px dashed var(--line); }
.vo-rev-name .strong { font-size: 15.5px; }
.vo-line-amt { grid-column: auto; align-self: start; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.vo-line-amt .muted { font-size: 13px; font-weight: 600; line-height: 1.25; color: var(--text); }
.vo-line-amt .strong { display: flex; align-items: center; justify-content: flex-end; min-height: var(--ctl-h, 44px); width: 100%; padding: 0 12px;
  border-radius: 12px; background: var(--surface-3); font-size: 16px; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .vo-rev-line { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .vo-line-amt { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
  .vo-line-amt .strong { width: auto; min-width: 8rem; }
}
