/* =============================================================================
   پارسی شو — سفارش‌های من / Order tracking pro
   ============================================================================= */

/* ---------- نوار جستجو و فیلتر ---------- */
.op-bar {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid #e3eaf3;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 14px 30px -28px rgba(15, 34, 55, .55);
}
.op-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.op-search {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}
.op-search svg {
  position: absolute;
  inset-inline-start: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #9aa6b5;
  pointer-events: none;
}
.op-search input {
  width: 100%;
  height: 40px;
  padding: 0 38px 0 12px;
  border: 1px solid #e3eaf3;
  border-radius: 11px;
  background: #fff;
  font: inherit;
  font-size: 12.5px;
  color: #16283b;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.op-search input::placeholder { color: #9aa6b5; }
.op-search input:focus {
  border-color: #93b4f0;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.op-count {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  color: #1d4ed8;
  background: #e8f1ff;
  border: 1px solid #d6e6ff;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.op-chips {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.op-chips::-webkit-scrollbar { display: none; }
.op-chip {
  flex: 0 0 auto;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #e3eaf3;
  background: #fff;
  color: #4b5b6e;
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease;
}
.op-chip:hover { border-color: #c9d8e8; color: #1d4ed8; }
.op-chip.is-on {
  border-color: #1d4ed8;
  background: #1d4ed8;
  color: #fff;
  box-shadow: 0 8px 18px -12px rgba(29, 78, 216, .9);
}
.op-empty {
  margin: 10px 0 0;
  padding: 16px;
  text-align: center;
  font-size: 12px;
  color: #6b7c90;
  border: 1px dashed #dbe5f1;
  border-radius: 14px;
  background: #fbfdff;
}

/* ---------- تایم‌لاین وضعیت ---------- */
.op-track {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin: 10px 0 2px;
  padding: 10px 4px 2px;
  border-top: 1px dashed #eef2f7;
}
.op-step {
  position: relative;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.op-step::before {
  content: "";
  position: absolute;
  top: 11px;
  inset-inline-end: 50%;
  width: 100%;
  height: 2px;
  background: #e8eef6;
  z-index: 0;
}
.op-step:first-child::before { display: none; }
.op-step i {
  position: relative;
  z-index: 1;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-size: 10.5px;
  font-weight: 800;
  background: #fff;
  border: 2px solid #dfe8f3;
  color: #9aa6b5;
}
.op-step b {
  font-size: 10px;
  font-weight: 700;
  color: #9aa6b5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.op-step.is-done i { background: #16a34a; border-color: #16a34a; color: #fff; }
.op-step.is-done::before { background: #b9e6cd; }
.op-step.is-done b { color: #0d7a5f; }
.op-step.is-now i {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(29, 78, 216, .14);
}
.op-step.is-now b { color: #1d4ed8; font-weight: 800; }
.op-step.is-off i { background: #fff; border-color: #e3eaf3; color: #c2cbd8; }
.op-cancel {
  align-self: center;
  margin-inline-start: 8px;
  font-size: 10.5px;
  font-weight: 800;
  color: #b91c1c;
  background: #fee2e2;
  border: 1px solid #fecaca;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.op-track.is-cancelled .op-step.is-off { opacity: .5; }

/* ---------- night ---------- */
html.ph-night .op-bar { background: #101f2f; border-color: #23394f; box-shadow: none; }
html.ph-night .op-search input { background: #13263b; border-color: #24384d; color: #e6eef8; }
html.ph-night .op-search input::placeholder { color: #7f93a8; }
html.ph-night .op-count { background: rgba(37, 99, 235, .18); border-color: rgba(37, 99, 235, .38); color: #93c5fd; }
html.ph-night .op-chip { background: #13263b; border-color: #24384d; color: #b9cbdd; }
html.ph-night .op-chip.is-on { background: #2563eb; border-color: #2563eb; color: #fff; }
html.ph-night .op-empty { background: #0f1e2e; border-color: #24384d; color: #9fb3c8; }
html.ph-night .op-track { border-color: #23394f; }
html.ph-night .op-step::before { background: #24384d; }
html.ph-night .op-step i { background: #0f1e2e; border-color: #2c4560; color: #7f93a8; }
html.ph-night .op-step b { color: #7f93a8; }
html.ph-night .op-step.is-done i { background: #16a34a; border-color: #16a34a; color: #fff; }
html.ph-night .op-step.is-done::before { background: #1d5c4b; }
html.ph-night .op-step.is-done b { color: #6ee7b7; }
html.ph-night .op-step.is-now i { background: #2563eb; border-color: #2563eb; }
html.ph-night .op-step.is-now b { color: #93c5fd; }
html.ph-night .op-cancel { background: rgba(185, 28, 28, .2); border-color: rgba(248, 113, 113, .4); color: #fca5a5; }

@media (max-width: 639.98px) {
  .op-bar-row { flex-wrap: wrap; }
  .op-count { order: -1; }
  .op-step b { font-size: 9px; }
  .op-step i { width: 20px; height: 20px; }
  .op-step::before { top: 10px; }
}

/* ---------- رهگیری سفارش (کارت جستجو) ---------- */
.op-track-card{margin:0 0 14px;padding:18px;border:1px solid #e3eaf3;border-radius:18px;background:linear-gradient(180deg,#fff,#f7fbff);box-shadow:0 18px 40px -34px rgba(15,34,55,.6)}
.op-tc-head{text-align:center;margin-bottom:12px}
.op-tc-head b{display:block;font-size:14px;font-weight:900;color:#16283b}
.op-tc-head i{display:block;font-style:normal;font-size:11px;color:#7b8797;margin-top:4px;line-height:1.8}
.op-tc-form{display:flex;gap:8px;max-width:520px;margin:0 auto}
.op-tc-form input{flex:1 1 auto;min-width:0;height:42px;padding:0 12px;border:1px solid #e3eaf3;border-radius:11px;background:#fff;font:inherit;font-size:13px;color:#16283b;outline:none;direction:ltr;text-align:left}
.op-tc-form input:focus{border-color:#93b4f0;box-shadow:0 0 0 3px rgba(37,99,235,.12)}
.op-tc-form button{flex:0 0 auto;padding:0 20px;height:42px;border:0;border-radius:11px;background:linear-gradient(120deg,#0ea5b7,#0891a1);color:#fff;font:inherit;font-size:12.5px;font-weight:800;cursor:pointer;box-shadow:0 10px 22px -14px rgba(8,145,161,.9)}
.op-tc-form button:disabled{opacity:.6;cursor:default}
.op-tc-msg{min-height:16px;margin-top:8px;text-align:center;font-size:11px;color:#b91c1c}

/* ---------- نتیجهٔ رهگیری ---------- */
.op-result{margin-top:14px}
.op-meta{display:flex;flex-wrap:wrap;gap:6px 16px;justify-content:center;font-size:11.5px;color:#6b7c90;margin-bottom:10px}
.op-meta b{color:#16283b;font-weight:800}
.op-num{font-variant-numeric:tabular-nums}
.op-tbl{border:1px solid #e3eaf3;border-radius:12px;overflow:hidden;background:#fff}
.op-tbl-head,.op-tbl-row{display:grid;grid-template-columns:1fr 1.4fr 1fr 1fr 1fr;align-items:center}
.op-tbl-head{background:linear-gradient(120deg,#0ea5b7,#0891a1);color:#fff;font-size:11.5px;font-weight:800}
.op-tbl-head span,.op-tbl-row span{padding:10px 12px;text-align:center;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.op-tbl-row{font-size:12px;color:#26313f;border-top:1px solid #eef2f7}
.op-tbl-row span+span,.op-tbl-head span+span{border-inline-start:1px solid rgba(255,255,255,.18)}
.op-tbl-row span+span{border-inline-start:1px solid #eef2f7}

/* ---------- تایم‌لاین ۵ مرحله‌ای ---------- */
.op-flow{position:relative;display:flex;align-items:flex-start;margin:22px 0 6px;padding:0 4px}
.op-flow::before{content:"";position:absolute;top:19px;inset-inline:9%;height:4px;border-radius:99px;background:#e3eaf3}
.op-flow-step{position:relative;z-index:1;flex:1 1 0;display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0}
.op-flow-dot{width:38px;height:38px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:#fff;border:3px solid #e3eaf3;color:#c2cbd8}
.op-flow-dot svg{width:16px;height:16px}
.op-flow-step b{font-size:11px;font-weight:700;color:#9aa6b5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.op-flow-step.is-done .op-flow-dot{background:#16a34a;border-color:#16a34a;color:#fff}
.op-flow-step.is-done b{color:#0d7a5f}
.op-flow-step.is-now .op-flow-dot{background:#fff;border-color:#1d4ed8;border-style:dashed;color:#1d4ed8;box-shadow:0 0 0 5px rgba(29,78,216,.10)}
.op-flow-step.is-now b{color:#1d4ed8;font-weight:900}
.op-flow.is-cancelled .op-flow-step.is-off{opacity:.45}

html.ph-night .op-track-card{background:#101f2f;border-color:#23394f;box-shadow:none}
html.ph-night .op-tc-head b,html.ph-night .op-meta b{color:#e6eef8}
html.ph-night .op-tc-head i,html.ph-night .op-meta{color:#9fb3c8}
html.ph-night .op-tc-form input{background:#13263b;border-color:#24384d;color:#e6eef8}
html.ph-night .op-tbl{background:#101f2f;border-color:#23394f}
html.ph-night .op-tbl-row{color:#dbe7f3;border-color:#23394f}
html.ph-night .op-tbl-row span+span{border-color:#23394f}
html.ph-night .op-flow::before{background:#23394f}
html.ph-night .op-flow-dot{background:#0f1e2e;border-color:#2c4560}
html.ph-night .op-flow-step b{color:#7f93a8}
html.ph-night .op-flow-step.is-done b{color:#6ee7b7}
html.ph-night .op-flow-step.is-now .op-flow-dot{background:#0f1e2e;border-color:#3b82f6;color:#93c5fd}
html.ph-night .op-flow-step.is-now b{color:#93c5fd}

@media (max-width:639.98px){
  .op-tbl-head,.op-tbl-row{grid-template-columns:1fr 1fr}
  .op-tbl-head span:nth-child(3),.op-tbl-row span:nth-child(3),
  .op-tbl-head span:nth-child(4),.op-tbl-row span:nth-child(4){display:none}
  .op-flow-step b{font-size:9px}
  .op-flow-dot{width:32px;height:32px}
  .op-flow::before{top:16px}
}