/* Suhavi Order Tracking — scoped .sot-*, SuhaviMart palette (gold / charcoal / cream) */
.sot-wrap, .sot-card, .sot-mini, .sot-dash {
  --sot-ink: #202827; --sot-muted: #68716e; --sot-gold: #d6ad3b; --sot-gold-d: #8a6800; --sot-cream: #fffaf0;
  --sot-line: #eadcae; --sot-card: #fff; --sot-go: #1f7a4d; --sot-warn: #b45309; --sot-bad: #b42318; --sot-done: #1f7a4d;
  color: var(--sot-ink); font-size: 15px; line-height: 1.45;
}
.sot-wrap { display: grid; gap: 16px; }
.sot-i { width: 18px; height: 18px; flex: none; }
.sot-h { font-size: 18px; margin: 10px 0 0; }

/* card */
.sot-card { background: var(--sot-card); border: 1px solid var(--sot-line); border-radius: 16px; padding: 20px; margin: 0 0 18px;
  box-shadow: 0 1px 2px rgba(32,40,39,.04), 0 6px 24px rgba(138,104,0,.06); }
.sot-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.sot-kicker { margin: 0 0 4px; font-size: 13px; color: var(--sot-muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sot-title { margin: 0; font-size: 24px; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
.sot-sub { margin: 6px 0 0; color: var(--sot-muted); max-width: 52ch; }
.sot-tone-go .sot-title { color: var(--sot-go); }
.sot-tone-warn .sot-title { color: var(--sot-warn); }
.sot-tone-bad .sot-title { color: var(--sot-bad); }
.sot-tone-done .sot-title { color: var(--sot-done); }
.sot-eta { background: var(--sot-cream); border: 1px solid var(--sot-line); border-radius: 12px; padding: 10px 14px; min-width: 160px; text-align: right; }
.sot-eta span { display: block; font-size: 12px; color: var(--sot-muted); text-transform: uppercase; letter-spacing: .06em; }
.sot-eta b { display: block; font-size: 18px; }
.sot-eta small { color: var(--sot-gold-d); font-size: 12px; }
.sot-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 9px; }
.sot-badge .sot-i { width: 14px; height: 14px; }
.sot-badge--bolt { background: #202827; color: #e6b900; }

/* stepper */
.sot-steps { list-style: none; margin: 22px 0 6px; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: relative; }
.sot-steps::before, .sot-steps::after { content: ""; position: absolute; top: 17px; left: calc(100% / var(--n, 7) / 2); right: calc(100% / var(--n, 7) / 2); height: 3px; border-radius: 3px; background: #efe6c9; }
.sot-steps::after { background: linear-gradient(90deg, var(--sot-gold), #e6b900); right: auto; width: calc((100% - 100% / var(--n, 7)) * var(--p, 0)); }
.sot-steps li { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; min-width: 0; }
.sot-dot { width: 37px; height: 37px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid #e8dcb4; color: #b9ad8a; transition: .2s; }
.sot-steps li.is-done .sot-dot { background: var(--sot-gold); border-color: var(--sot-gold); color: #fff; }
.sot-steps li.is-now .sot-dot { background: #202827; border-color: #202827; color: #e6b900; box-shadow: 0 0 0 5px rgba(214,173,59,.25); animation: sot-pulse 2s infinite; }
.sot-lbl { font-size: 12.5px; font-weight: 600; color: var(--sot-muted); line-height: 1.2; }
.sot-steps li.is-done .sot-lbl { color: var(--sot-ink); }
.sot-lbl small { display: block; font-weight: 400; color: var(--sot-muted); font-size: 11.5px; margin-top: 2px; }
@keyframes sot-pulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(214,173,59,.28); } 50% { box-shadow: 0 0 0 9px rgba(214,173,59,.08); } }
.sot-steps--sm { margin: 12px 0 2px; }
.sot-steps--sm .sot-dot { width: 26px; height: 26px; }
.sot-steps--sm .sot-dot .sot-i { width: 14px; height: 14px; }
.sot-steps--sm::before, .sot-steps--sm::after { top: 12px; }
.sot-steps--sm .sot-lbl { font-size: 11px; }

/* facts + actions */
.sot-facts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.sot-fact { display: flex; align-items: center; gap: 8px; background: var(--sot-cream); border: 1px solid var(--sot-line); border-radius: 10px; padding: 8px 12px; font-size: 14px; flex-wrap: wrap; }
.sot-fact span { color: var(--sot-muted); font-size: 12.5px; }
.sot-fact--cash { border-color: #f5c87a; background: #fff6e0; }
.sot-fact--ok { border-color: #bfe3cf; background: #f0faf4; color: var(--sot-go); }
.sot-fact--ok span { color: var(--sot-go); }
.sot-awb { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .03em; }
.sot-copy { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; font-size: 12px; color: var(--sot-gold-d); padding: 2px 6px; border-radius: 6px; }
.sot-copy:hover, .sot-copy:focus-visible { background: #f6ecc8; }
.sot-copy em { font-style: normal; }
.sot-copy .sot-i { width: 14px; height: 14px; }
.sot-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.sot-btn, a.sot-btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--sot-ink); color: var(--sot-ink); background: #fff; border-radius: 999px; padding: 8px 16px; font-size: 14px; font-weight: 600; text-decoration: none; line-height: 1.2; cursor: pointer; }
.sot-btn:hover { background: var(--sot-ink); color: #fff; }
.sot-btn--wa { border-color: #1f7a4d; color: #1f7a4d; }
.sot-btn--wa:hover { background: #1f7a4d; color: #fff; }
.sot-btn--main { background: var(--sot-ink); color: #fff; }
.sot-btn--main:hover { background: #000; }
.sot-review { margin-top: 14px; display: flex; gap: 8px; align-items: center; color: var(--sot-gold-d); font-size: 14px; }
.sot-review a { color: inherit; font-weight: 600; }

/* journey */
.sot-journey { margin-top: 20px; border-top: 1px dashed var(--sot-line); padding-top: 14px; }
.sot-journey h4 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--sot-muted); }
.sot-tl { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid #efe6c9; }
.sot-tl li { position: relative; padding: 0 0 14px 14px; display: grid; gap: 1px; }
.sot-tl li::before { content: ""; position: absolute; left: -25px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid #d9c98f; }
.sot-tl li.is-latest::before { background: var(--sot-gold); border-color: var(--sot-gold); box-shadow: 0 0 0 4px rgba(214,173,59,.22); }
.sot-tl time { font-size: 12px; color: var(--sot-muted); }
.sot-tl span { font-size: 13.5px; color: var(--sot-muted); }
.sot-tl li.sot-more { display: none; }
.sot-tl.is-open li.sot-more { display: grid; }
.sot-toggle { all: unset; cursor: pointer; color: var(--sot-gold-d); font-weight: 600; font-size: 14px; }

/* items */
.sot-items { margin-top: 16px; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.sot-item { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.sot-item em { color: var(--sot-muted); font-style: normal; }
.sot-thumb { width: 48px !important; height: 48px !important; object-fit: contain; border-radius: 8px; border: 1px solid var(--sot-line); background: #fff; }
.sot-addr { font-size: 13px; color: var(--sot-muted); font-style: normal; }
.sot-addr span { display: block; font-weight: 600; color: var(--sot-ink); }
.sot-note { margin: 12px 0 0; font-size: 13px; color: var(--sot-muted); }

/* orders table */
.sot-mini { min-width: 150px; display: grid; gap: 4px; }
.sot-mini b { font-size: 13.5px; }
.sot-mini small { font-size: 12px; color: var(--sot-muted); }
.sot-bar { display: block; height: 5px; border-radius: 5px; background: #efe6c9; overflow: hidden; }
.sot-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--sot-gold), #e6b900); border-radius: 5px; }
.sot-mini.sot-tone-bad b { color: var(--sot-bad); }
.sot-mini.sot-tone-done b, .sot-mini.sot-tone-go b { color: var(--sot-go); }
.sot-mini.sot-tone-warn b { color: var(--sot-warn); }

/* tab: summary + past */
.sot-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.sot-tile { background: linear-gradient(160deg, #202827, #2e3836); color: #fff; border-radius: 14px; padding: 14px 16px; }
.sot-tile span { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: #e6d39a; }
.sot-tile b { display: block; font-size: 26px; line-height: 1.2; color: #fff; }
.sot-tile small { color: #c9cfcc; }
.sot-past { display: grid; gap: 6px; }
.sot-past-row { display: grid; grid-template-columns: 80px 130px 1fr auto; gap: 10px; align-items: center; padding: 10px 14px; border: 1px solid var(--sot-line); border-radius: 10px; text-decoration: none; color: var(--sot-ink); background: #fff; }
.sot-past-row:hover { border-color: var(--sot-gold); }
.sot-past-row small { color: var(--sot-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sot-past-row em { font-style: normal; font-weight: 600; }
.sot-past-row.sot-tone-done b { color: var(--sot-go); }
.sot-past-row.sot-tone-bad b { color: var(--sot-bad); }
.sot-empty { text-align: center; padding: 30px 16px; border: 1px dashed var(--sot-line); border-radius: 14px; background: var(--sot-cream); }
.sot-empty--sm { padding: 14px; }
.sot-foot { font-size: 13px; color: var(--sot-muted); }

/* dashboard */
.sot-dash { border: 1px solid var(--sot-line); border-radius: 14px; padding: 14px 16px; margin: 0 0 20px; background: var(--sot-cream); }
.sot-dash-top { display: flex; justify-content: space-between; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--sot-muted); }
.sot-dash-top a { color: var(--sot-gold-d); text-transform: none; letter-spacing: 0; font-weight: 600; }
.sot-dash-body { display: block; text-decoration: none; color: var(--sot-ink); margin-top: 6px; }
.sot-dash-body b { font-size: 18px; }
.sot-dash-body small { color: var(--sot-muted); }

/* public form */
.sot-form { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 10px; align-items: end; background: var(--sot-cream); border: 1px solid var(--sot-line); padding: 16px; border-radius: 14px; }
.sot-form label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.sot-form input { padding: 10px 12px; border: 1px solid #d9c98f; border-radius: 10px; font-size: 15px; background: #fff; }
.sot-err { color: var(--sot-bad); font-weight: 600; }

@media (max-width: 640px) {
  .sot-card { padding: 16px; border-radius: 14px; }
  .sot-title { font-size: 20px; }
  .sot-eta { text-align: left; width: 100%; }
  .sot-steps { grid-auto-flow: row; grid-auto-columns: auto; gap: 0; margin-left: 4px; }
  .sot-steps::before, .sot-steps::after { display: none; }
  .sot-steps li { flex-direction: row; text-align: left; gap: 12px; padding-bottom: 12px; }
  .sot-steps li:not(:last-child)::after { content: ""; position: absolute; left: 17px; top: 38px; bottom: 0; width: 3px; background: #efe6c9; z-index: -1; }
  .sot-steps li.is-done:not(:last-child)::after { background: var(--sot-gold); }
  .sot-steps--sm { grid-auto-flow: column; grid-auto-columns: 1fr; }
  .sot-steps--sm li { flex-direction: column; text-align: center; gap: 4px; padding: 0; }
  .sot-steps--sm li::after { display: none; }
  .sot-steps--sm .sot-lbl { display: none; }
  .sot-lbl { font-size: 14px; }
  .sot-lbl small { display: inline; margin-left: 6px; }
  .sot-form { grid-template-columns: 1fr; }
  .sot-past-row { grid-template-columns: auto 1fr auto; }
  .sot-past-row small { display: none; }
  /* Woo's responsive orders table */
  .woocommerce-orders-table__cell-sot-track .sot-mini { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .sot-steps li.is-now .sot-dot { animation: none; } }
.sot-fact b *, .sot-eta b *, .sot-tile b * { font-size: inherit !important; color: inherit; }
