/* Premium order tracking — mobile-app style */

.ot-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  border-radius: 20px;
  padding: 1.5rem;
  color: #fff;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
}

.ot-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(236,72,153,0.25) 0%, transparent 70%);
  pointer-events: none;
}

.ot-hero__code {
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 0.25rem;
}

.ot-hero__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.ot-hero__status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: ot-pulse 2s infinite;
}

@keyframes ot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.ot-hero__product {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.ot-hero__img {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
}

.ot-hero__title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.3;
}

.ot-hero__meta {
  font-size: 0.75rem;
  opacity: 0.75;
  line-height: 1.5;
}

.ot-card {
  background: var(--surface, #fff);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.ot-card__title {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted, #64748b);
  margin-bottom: 1rem;
}

.ot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.ot-grid__item label {
  display: block;
  font-size: 0.625rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.ot-grid__item span {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary, #0f172a);
}

/* Timeline */
.ot-timeline__track {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ot-step {
  display: grid;
  grid-template-columns: 32px 1fr;
  grid-template-rows: auto 1fr;
  column-gap: 12px;
  position: relative;
  padding-bottom: 1.25rem;
}

.ot-step:last-child { padding-bottom: 0; }

.ot-step__marker {
  grid-row: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border: 2px solid #e2e8f0;
  position: relative;
  z-index: 1;
}

.ot-step--done .ot-step__marker {
  background: #dcfce7;
  border-color: #22c55e;
  color: #16a34a;
}

.ot-step--active .ot-step__marker {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  border-color: transparent;
  color: #fff;
}

.ot-step--terminal .ot-step__marker {
  background: #fef2f2;
  border-color: #ef4444;
  color: #dc2626;
}

.ot-step__pulse {
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
  animation: ot-pulse 1.5s infinite;
}

.ot-step__dot {
  width: 8px;
  height: 8px;
  background: #cbd5e1;
  border-radius: 50%;
}

.ot-step__terminal {
  font-weight: 800;
  font-size: 0.875rem;
}

.ot-step__line {
  position: absolute;
  left: 15px;
  top: 32px;
  bottom: 0;
  width: 2px;
  background: #e2e8f0;
}

.ot-step--done .ot-step__line { background: #22c55e; }

.ot-step__content { grid-column: 2; padding-top: 4px; }

.ot-step__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.ot-step--upcoming .ot-step__label { color: var(--text-muted); }

.ot-step__time {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.ot-step__note {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.ot-events {
  margin-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
}

.ot-events summary {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent, #ec4899);
  cursor: pointer;
  list-style: none;
}

.ot-events summary::-webkit-details-marker { display: none; }

.ot-events__list { margin-top: 0.75rem; }

.ot-event {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.ot-event__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 5px;
  flex-shrink: 0;
}

.ot-event__label { font-size: 0.8125rem; font-weight: 500; }
.ot-event__time { font-size: 0.6875rem; color: var(--text-muted); }
.ot-event__note { font-size: 0.75rem; color: var(--text-secondary); margin-top: 2px; }

/* Order list tabs */
.ot-tabs {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  -webkit-overflow-scrolling: touch;
}

.ot-tabs__btn {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s;
}

.ot-tabs__btn.is-active,
.ot-tabs__btn:hover {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #fff;
  border-color: transparent;
}

.ot-order-card {
  display: flex;
  gap: 12px;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  margin-bottom: 0.75rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
}

.ot-order-card:hover {
  box-shadow: 0 8px 24px rgba(15,23,42,0.08);
  transform: translateY(-1px);
}

.ot-order-card__img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  background: #f1f5f9;
  flex-shrink: 0;
}

.ot-order-card__body { flex: 1; min-width: 0; }

.ot-order-card__code {
  font-size: 0.625rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.ot-order-card__title {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ot-order-card__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 0.6875rem;
}

.ot-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
}

.ot-badge--active { background: #fef3c7; color: #b45309; }
.ot-badge--delivered { background: #dcfce7; color: #15803d; }
.ot-badge--cancelled { background: #fee2e2; color: #b91c1c; }
.ot-badge--returned { background: #fce7f3; color: #be185d; }

/* Summary */
.ot-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.8125rem;
}

.ot-summary-row--total {
  border-top: 1px solid var(--border-subtle);
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  font-weight: 700;
  font-size: 1rem;
}

.ot-summary-row--discount { color: #16a34a; }

/* Delivery panel */
.ot-delivery-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.ot-delivery-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.ot-delivery-actions a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  background: #f1f5f9;
  color: #0f172a;
}

.ot-delivery-actions a.ot-btn-call { background: #dcfce7; color: #15803d; }
.ot-delivery-actions a.ot-btn-nav { background: #dbeafe; color: #1d4ed8; }

/* Admin order KPIs */
.adm-order-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.adm-order-kpi {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.75rem;
  text-align: center;
}

.adm-order-kpi__val {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
}

.adm-order-kpi__lbl {
  font-size: 0.625rem;
  color: #64748b;
  text-transform: uppercase;
  margin-top: 2px;
}

@media (min-width: 768px) {
  .ot-hero { padding: 2rem; }
  .ot-hero__img { width: 88px; height: 88px; }
}
