.colis-app {
  padding: 40px 0 96px;
  position: relative;
  z-index: 2;
}

.colis-hero,
.track-result,
.login-card,
.dash-card,
.colis-form,
.parcel-row {
  background: hsl(var(--card, 0 0% 100%));
  border: 1px solid hsl(215 25% 88% / 0.7);
  border-radius: 0.75rem;
  padding: 28px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.colis-hero { margin-bottom: 24px; }

.colis-hero h1 {
  font-family: inherit;
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 8px;
  letter-spacing: -0.025em;
  font-weight: 700;
  color: hsl(222 47% 11%);
}

.colis-hero p {
  color: hsl(215 16% 47%);
  margin: 0;
  max-width: 640px;
}

.track-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 22px;
}

.track-box input,
.colis-form input,
.colis-form select,
.colis-form textarea,
.login-card input,
.toolbar input,
.toolbar select {
  flex: 1;
  min-width: 200px;
  border: 1px solid hsl(215 25% 88%);
  background: #fff;
  border-radius: 0.5rem;
  padding: 12px 14px;
  font: inherit;
  outline: none;
  height: 44px;
}
.track-box input:focus,
.colis-form input:focus,
.login-card input:focus {
  box-shadow: 0 0 0 2px hsl(217 91% 60% / 0.35);
}

.track-box button[type="submit"],
.btn-soft,
.colis-form button[type="submit"],
.login-card button[type="submit"] {
  border: 0;
  border-radius: 0.5rem;
  padding: 12px 18px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  font-size: 14px;
  background: var(--cl-accent, #f97316);
  color: #fff;
  cursor: pointer;
  height: 44px;
}

.btn-ghost,
.btn-jin-cta.btn-ghost {
  background: transparent !important;
  border: 1px solid hsl(215 25% 88%) !important;
  color: hsl(222 47% 11%) !important;
}

.demo-codes {
  margin-top: 14px;
  font-size: 13px;
  color: hsl(215 16% 47%);
}

.demo-codes button {
  border: 0;
  background: hsl(217 91% 60% / 0.12);
  color: hsl(217 91% 35%);
  border-radius: 0.5rem;
  padding: 4px 10px;
  margin: 0 4px 4px 0;
  cursor: pointer;
  font-weight: 600;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.st-transit, .st-livraison { color: hsl(217 91% 35%); background: hsl(217 91% 60% / 0.12); }
.st-livre, .st-receptionne { color: #3f7a1c; background: #5a9f2a22; }
.st-enregistre, .st-collecte { color: #1a4ba5; background: #1a4ba51a; }
.st-arrive { color: hsl(217 91% 35%); background: hsl(217 91% 95%); }
.st-incident { color: #b91c1c; background: #fee2e2; }

.timeline {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  border-left: 2px solid hsl(217 91% 60% / 0.35);
}

.timeline li {
  position: relative;
  padding: 0 0 22px 22px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--cl-accent, #f97316);
}

.timeline strong { display: block; }
.timeline span { color: hsl(215 16% 47%); font-size: 13px; }

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.meta-grid div {
  background: hsl(220 20% 97%);
  border: 1px solid hsl(215 25% 88% / 0.7);
  border-radius: 0.5rem;
  padding: 12px 14px;
}
.meta-grid small {
  color: hsl(215 16% 47%);
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0;
  margin-bottom: 20px;
  overflow: hidden;
  border-radius: 0.75rem;
}

.dash-card {
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.dash-card:nth-child(odd) { background: var(--cl-accent, #f97316); }
.dash-card:nth-child(even) { background: var(--cl-dark, #0f172a); }
.dash-card h3 {
  margin: 0 0 4px;
  font-size: 28px;
  color: #fff;
}
.dash-card span {
  color: rgba(255, 255, 255, 0.9);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0;
}

.parcel-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.parcel-row h4 { margin: 0 0 4px; font-size: 16px; }
.parcel-row p { margin: 0; color: hsl(215 16% 47%); font-size: 13px; }

.login-wrap {
  min-height: 50vh;
  display: grid;
  place-items: center;
}

.login-card { max-width: 420px; width: 100%; }
.login-card h2 { margin-top: 0; }

.alert {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 0.5rem;
  font-weight: 600;
}
.alert.err { background: #fee2e2; color: #b91c1c; }
.alert.ok { background: #dcfce7; color: #166534; }

.hidden { display: none !important; }

.rdc-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: hsl(215 16% 47%);
  margin-bottom: 6px;
}

.rdc-block {
  border: 1px solid hsl(215 25% 88% / 0.8);
  border-radius: 0.75rem;
  padding: 16px 16px 18px;
  margin: 18px 0 0;
}

.rdc-block legend {
  float: none;
  width: auto;
  font-size: 13px;
  font-weight: 700;
  padding: 0 8px;
  color: hsl(222 47% 11%);
}

.rdc-other {
  margin-top: 8px;
  width: 100%;
}

.colis-form select:disabled {
  opacity: 0.65;
  background: #f8fafc;
  cursor: not-allowed;
}
.colis-form select:focus,
.colis-form .rdc-other:focus {
  box-shadow: 0 0 0 2px hsl(217 91% 60% / 0.35);
}

.meta-grid span {
  display: block;
  margin-top: 4px;
  color: hsl(215 16% 47%);
  font-size: 12px;
  font-weight: 500;
}

.track-alert .alert {
  padding: 14px 18px;
  border-radius: 0.75rem;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.track-alert .alert.err { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.track-alert .alert.ok { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.track-alert .alert.loading { background: #fff7ed; color: #c2410c; border: 1px solid rgba(249, 115, 22, 0.3); }

@media (max-width: 768px) {
  .parcel-row { grid-template-columns: 1fr; }
}
