/* ============================================================
   Supplier orders (FSM list)
   ============================================================ */

.so-main { padding: 28px 0 80px; }

.so-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.so-head h1 {
  font-size: 32px;
  letter-spacing: -0.03em;
  line-height: 1.0;
  font-family: var(--font);
  font-weight: 600;
}
.so-head .greet {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* KPI strip 5 col */
.so-kpi {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.so-kpi .k {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  position: relative;
}
.so-kpi .k.urgent {
  background: var(--wait-soft);
  border-color: rgba(180, 83, 9, 0.3);
}
.so-kpi .l {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
.so-kpi .l .ms { font-size: 14px; }
.so-kpi .k.urgent .l { color: var(--wait); }
.so-kpi .v {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.03em;
  margin-top: 4px;
  line-height: 1;
}
.so-kpi .k.urgent .v { color: var(--wait); }
.so-kpi .sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* status tabs */
.so-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.so-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
}
.so-tab:hover { border-color: var(--text); }
.so-tab.active {
  background: var(--dark);
  color: var(--text-on-dark);
  border-color: var(--dark);
}
.so-tab .dot {
  width: 6px; height: 6px; border-radius: 50%;
}
.so-tab .c {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 6px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  color: var(--text-2);
}
.so-tab.active .c { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.9); }

/* search + tools */
.so-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.so-tools .search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--line);
}
.so-tools .search .ms { color: var(--text-muted); }
.so-tools .search input {
  flex: 1;
  border: 0; outline: 0; background: transparent;
  font-family: inherit; font-size: 14px;
  padding: 4px 0;
}

/* table */
.so-table {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.so-row {
  display: grid;
  grid-template-columns: 140px 110px 1fr 80px 130px 150px 130px 40px;
  gap: 14px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  transition: background 100ms ease;
}
.so-row:last-child { border-bottom: 0; }
.so-row:not(.head):hover { background: var(--surface-2); cursor: pointer; }
.so-row.head {
  background: var(--surface-2);
  padding: 10px 20px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-muted);
}
.so-row.head:hover { background: var(--surface-2); cursor: default; }
.so-row.urgent {
  background: var(--wait-soft);
  box-shadow: inset 3px 0 0 0 var(--wait);
}
.so-row.urgent:hover { background: #fbe2bf; }
.so-row.disputed {
  background: var(--busy-soft);
  box-shadow: inset 3px 0 0 0 var(--busy);
}

.so-when {
  font-family: var(--font-mono);
  color: var(--text-2);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.so-when .ago {
  color: var(--text-muted);
  font-size: 11px;
}
.so-id {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  color: var(--text);
}

.so-customer { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.so-customer .n {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.so-customer .meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  gap: 6px;
  align-items: center;
}
.so-customer .meta .ms { font-size: 12px; }
.so-customer .meta .star { color: var(--signal); font-variation-settings: 'opsz' 20, 'wght' 600, 'FILL' 1, 'GRAD' 0; }

.so-items {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-2);
  font-weight: 500;
  text-align: center;
}

.so-amount {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  text-align: right;
}
.so-amount .vat {
  display: block;
  font-size: 10px;
  font-family: var(--font);
  color: var(--text-muted);
  font-weight: 500;
}

.so-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 8px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 600;
  width: fit-content;
  letter-spacing: 0.01em;
}
.so-status .dot { width: 6px; height: 6px; border-radius: 50%; }
.so-st-pending { background: var(--wait-soft); color: var(--wait); }
.so-st-pending .dot { background: var(--wait); }
.so-st-accepted { background: var(--info-soft); color: var(--info); }
.so-st-accepted .dot { background: var(--info); }
.so-st-transit { background: rgba(91, 91, 214, 0.12); color: #5b5bd6; }
.so-st-transit .dot { background: #5b5bd6; }
.so-st-delivered { background: rgba(30, 158, 150, 0.12); color: #1e9e96; }
.so-st-delivered .dot { background: #1e9e96; }
.so-st-completed { background: var(--go-soft); color: var(--go); }
.so-st-completed .dot { background: var(--go); }
.so-st-partial { background: rgba(110, 157, 46, 0.14); color: #5b8021; }
.so-st-partial .dot { background: #5b8021; }
.so-st-cancelled { background: var(--surface-3); color: var(--text-muted); }
.so-st-cancelled .dot { background: var(--text-muted); }
.so-st-disputed { background: var(--busy-soft); color: var(--busy); }
.so-st-disputed .dot { background: var(--busy); }

/* timer / action cell */
.so-timer {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.so-timer.action {
  display: flex;
  gap: 4px;
  flex-direction: row;
  align-items: center;
}
.so-timer .countdown {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: var(--wait);
  color: white;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.so-timer .countdown .ms { font-size: 12px; }
.so-timer .countdown.urgent {
  background: var(--busy);
  animation: pulse-urgent 1.6s ease-in-out infinite;
}
@keyframes pulse-urgent {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
.so-timer .next {
  font-size: 11px;
  color: var(--text-muted);
}
.so-timer .accept {
  background: var(--dark);
  color: var(--text-on-dark);
  border: 0;
  border-radius: var(--r-pill);
  padding: 6px 10px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.so-timer .accept .ms { font-size: 14px; }
.so-timer .decline {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  width: 28px; height: 28px;
  display: grid; place-items: center;
  cursor: pointer;
}

.so-menu {
  width: 28px; height: 28px;
  border-radius: var(--r-pill);
  background: transparent;
  border: 0;
  cursor: pointer;
  display: grid; place-items: center;
  color: var(--text-muted);
}
.so-menu:hover { background: var(--surface-3); color: var(--text); }

.so-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: var(--surface-2);
  border-top: 1px dashed var(--line);
  font-size: 13px;
  color: var(--text-muted);
}
.so-foot .v { font-family: var(--font-mono); color: var(--text); font-weight: 500; }
