:root{
  --ow-surface:#ffffff;
  --ow-surface-soft:#f8fafc;
  --ow-border:#dbe4ee;
  --ow-text:#0f172a;
  --ow-text-soft:#64748b;
  --ow-primary:#2563eb;
  --ow-success:#16a34a;
  --ow-danger:#dc2626;
  --ow-shadow:0 18px 45px rgba(15,23,42,.08);
}

.onwebs-tracker-wrap{
  display:grid;
  gap:18px;
}

.onwebs-tracker-form{
  display:flex;
  gap:10px;
  align-items:center;
  padding:16px;
  border:1px solid var(--ow-border);
  border-radius:18px;
  background:linear-gradient(135deg,#f8fbff 0%,#eef6ff 100%);
  box-shadow:var(--ow-shadow);
}

.onwebs-tracker-input{
  flex:1;
  min-height:46px;
  border:1px solid #c7d5e5;
  border-radius:14px;
  padding:0 14px;
  font-size:15px;
  color:var(--ow-text);
  background:#fff;
}

.onwebs-tracker-button{
  min-height:46px;
  padding:0 18px;
  border:0;
  border-radius:14px;
  background:linear-gradient(135deg,#1d4ed8 0%,#2563eb 100%);
  color:#fff;
  font-weight:700;
  cursor:pointer;
}

.onwebs-tracker-card{
  border:1px solid var(--ow-border);
  border-radius:22px;
  background:var(--ow-surface);
  box-shadow:var(--ow-shadow);
  padding:20px;
  color:var(--ow-text);
}

.otv2-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:16px;
}

.otv2-order{
  font-size:20px;
  font-weight:800;
}

.otv2-stepline{
  margin-top:6px;
  color:var(--ow-text-soft);
}

.otv2-badge{
  flex-shrink:0;
  padding:8px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
}

.otv2-badge.is-paid{
  background:#ecfdf3;
  color:#15803d;
}

.otv2-badge.is-unpaid{
  background:#fef2f2;
  color:#b91c1c;
}

.onwebs-tracker-timeline{
  margin:16px 0 18px;
  padding:16px;
  border:1px solid var(--ow-border);
  border-radius:20px;
  background:
    radial-gradient(circle at top right,rgba(37,99,235,.08),transparent 35%),
    linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
}

.tl-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:18px;
}

.tl-eyebrow{
  font-size:12px;
  font-weight:700;
  color:var(--ow-primary);
  margin-bottom:4px;
}

.tl-current{
  font-size:16px;
  font-weight:800;
  color:var(--ow-text);
}

.tl-progress-badge{
  padding:8px 12px;
  border-radius:999px;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:12px;
  font-weight:700;
}

.tl-track{
  --tl-progress:0%;
  position:relative;
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:12px;
  padding-top:10px;
}

.timeline-line,
.timeline-progress{
  position:absolute;
  top:28px;
  right:calc(10% + 18px);
  left:calc(10% + 18px);
  height:6px;
  border-radius:999px;
}

.timeline-line{
  background:#e2e8f0;
}

.timeline-progress{
  width:var(--tl-progress);
  max-width:100%;
  background:linear-gradient(90deg,#22c55e 0%,#2563eb 100%);
  right:auto;
}

.tl-node{
  position:relative;
  z-index:1;
  text-align:center;
}

.tl-dot-wrap{
  display:flex;
  justify-content:center;
  margin-bottom:12px;
}

.tl-dot{
  --tl-node-color:var(--ow-primary);
  width:24px;
  height:24px;
  border-radius:50%;
  border:5px solid #dbeafe;
  background:#fff;
  box-shadow:0 12px 24px rgba(37,99,235,.12);
}

.tl-node.is-done .tl-dot,
.tl-node.is-active .tl-dot{
  background:var(--tl-node-color);
}

.tl-node.is-upcoming{
  opacity:.72;
}

.tl-node.is-upcoming .tl-dot{
  border-color:#e2e8f0;
  box-shadow:none;
}

.tl-content{
  display:grid;
  gap:6px;
  justify-items:center;
}

.tl-icon{
  font-size:20px;
  line-height:1;
}

.tl-title{
  font-size:14px;
  font-weight:800;
  color:var(--ow-text);
}

.tl-subtitle{
  font-size:12px;
  color:var(--ow-text-soft);
}

.tl-node.is-done .tl-subtitle{
  color:var(--ow-success);
}

.tl-node.is-active .tl-subtitle{
  color:var(--ow-primary);
  font-weight:700;
}

.tl-footer{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-top:16px;
  padding-top:14px;
  border-top:1px dashed #d7e1eb;
  color:var(--ow-text-soft);
  font-size:12px;
}

.onwebs-tracker-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin-bottom:18px;
}

.onwebs-tracker-box,
.onwebs-tracker-item,
.onwebs-tracker-totals{
  border:1px solid var(--ow-border);
  border-radius:16px;
  background:var(--ow-surface-soft);
}

.onwebs-tracker-box{
  padding:14px;
}

.onwebs-tracker-box .label{
  font-size:12px;
  color:var(--ow-text-soft);
  margin-bottom:6px;
}

.onwebs-tracker-box .value{
  font-weight:800;
  color:var(--ow-text);
}

.onwebs-tracker-card h4{
  margin:18px 0 10px;
  font-size:15px;
}

.onwebs-tracker-items{
  display:grid;
  gap:10px;
}

.onwebs-tracker-item{
  padding:14px;
}

.item-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:6px;
  font-weight:700;
}

.item-price{
  color:var(--ow-text-soft);
  font-size:13px;
}

.onwebs-tracker-totals{
  padding:12px 14px;
}

.onwebs-tracker-totals .row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:8px 0;
  color:var(--ow-text);
}

.onwebs-tracker-totals .row + .row{
  border-top:1px dashed #d7e1eb;
}

.onwebs-tracker-totals .row.total{
  font-weight:800;
}

.onwebs-tracker-alert{
  padding:12px 14px;
  border-radius:14px;
  font-weight:700;
}

.onwebs-tracker-error{
  background:#fef2f2;
  color:#b91c1c;
  border:1px solid #fecaca;
}

@media (max-width: 820px){
  .onwebs-tracker-form,
  .otv2-head,
  .tl-header,
  .tl-footer{
    flex-direction:column;
  }

  .onwebs-tracker-grid{
    grid-template-columns:1fr;
  }

  .tl-track{
    grid-template-columns:1fr;
    gap:16px;
    padding-right:8px;
  }

  .timeline-line,
  .timeline-progress{
    top:0;
    right:18px;
    left:auto;
    width:6px;
    height:calc(100% - 24px);
  }

  .timeline-progress{
    width:6px;
    height:var(--tl-progress);
    max-height:100%;
    background:linear-gradient(180deg,#22c55e 0%,#2563eb 100%);
  }

  .tl-node{
    display:grid;
    grid-template-columns:40px 1fr;
    align-items:center;
    text-align:right;
    gap:10px;
  }

  .tl-dot-wrap{
    margin-bottom:0;
  }

  .tl-content{
    justify-items:start;
  }
}
