/* =====================================================
   TRACKING.CSS — DLH Bombana
===================================================== */

/* ── Form ─────────────────────────────────────────── */

.tracking-form {
  display: flex;
  gap: 10px;
  max-width: 560px;
  margin: 0 auto 28px;
}

.tracking-form input {
  flex: 1;
  padding: 11px 16px;
  border: 1.5px solid #dde8e0;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color .18s;
}

.tracking-form input:focus {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22,163,74,.10);
}

.tracking-form button {
  padding: 11px 22px;
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}

.tracking-form button:hover {
  background: #166534;
}

/* ── State (loading / info / not found) ────────────── */

.tr-state {
  text-align: center;
  padding: 40px 20px;
  color: #5a6b60;
  font-size: 14px;
  line-height: 1.7;
}

.tr-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #dde8e0;
  border-top-color: #16a34a;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto 14px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Card ─────────────────────────────────────────── */

.tr-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  border: 1px solid #dde8e0;
  overflow: hidden;
  max-width: 760px;
  margin: 0 auto;
  animation: fadeUp .25s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* ── Header ───────────────────────────────────────── */

.tr-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: #166534;
  flex-wrap: wrap;
  gap: 10px;
}

.tr-label {
  font-size: 11px;
  color: rgba(255,255,255,.65);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 3px;
}

.tr-tiket {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .5px;
}

/* ── Status badge ─────────────────────────────────── */

.tr-badge {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}

.badge-menunggu   { background: #fef3c7; color: #92400e; }
.badge-diproses   { background: #dbeafe; color: #1e40af; }
.badge-penanganan { background: #ffedd5; color: #9a3412; }
.badge-selesai    { background: #dcfce7; color: #166534; }
.badge-ditolak    { background: #fee2e2; color: #991b1b; }
.badge-default    { background: #f1f5f9; color: #64748b; }

/* ── Info grid ────────────────────────────────────── */

.tr-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  padding: 4px 0;
  border-bottom: 1px solid #eef2ef;
}

.tr-info {
  padding: 14px 24px;
  border-bottom: 1px solid #f1f5f1;
}

.tr-info strong {
  display: block;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: #8a9e90;
  margin-bottom: 3px;
}

.tr-info p {
  font-size: 13.5px;
  color: #2d3a32;
  font-weight: 500;
}

/* ── Section ──────────────────────────────────────── */

.tr-section {
  padding: 18px 24px;
  border-bottom: 1px solid #eef2ef;
}

.tr-section:last-of-type {
  border-bottom: none;
}

.tr-section h3 {
  font-size: 13px;
  font-weight: 700;
  color: #166534;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 10px;
}

.tr-section > p {
  font-size: 13.5px;
  color: #2d3a32;
  line-height: 1.65;
}

.tr-note {
  background: #f0fdf4;
}

.tr-note p {
  font-style: italic;
}

/* ── Media ────────────────────────────────────────── */

.tr-media-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tr-media-thumb {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #dde8e0;
  display: inline-block;
  transition: border-color .15s, transform .15s;
}

.tr-media-thumb:hover {
  border-color: #16a34a;
  transform: scale(1.04);
}

.tr-media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tr-media-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #f8fafc;
  border: 1.5px solid #dde8e0;
  border-radius: 8px;
  color: #4a7c59;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}

.tr-media-file:hover {
  background: #f0fdf4;
  border-color: #16a34a;
}

/* ── Timeline ─────────────────────────────────────── */

.tr-timeline {
  position: relative;
  padding-left: 4px;
}

.tl-item {
  display: flex;
  gap: 14px;
  padding: 10px 0;
  position: relative;
}

.tl-item::after {
  content: '';
  position: absolute;
  left: 10px;
  top: 26px;
  bottom: -4px;
  width: 1.5px;
  background: #dde8e0;
}

.tl-item:last-child::after { display: none; }

.tl-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #9ec4ae;
  border: 3px solid #f0fdf4;
  flex-shrink: 0;
  margin-top: 2px;
  position: relative;
  z-index: 1;
}

.tl-dot-active {
  background: #16a34a;
  border-color: #dcfce7;
  box-shadow: 0 0 0 3px rgba(22,163,74,.15);
}

.tl-body { flex: 1; }

.tl-body h4 {
  font-size: 13.5px;
  font-weight: 600;
  color: #2d3a32;
}

.tl-date {
  font-size: 11.5px;
  color: #8a9e90;
  margin-top: 2px;
}

.tl-note {
  font-size: 12.5px;
  color: #4a6258;
  margin-top: 4px;
  font-style: italic;
  line-height: 1.5;
}

.tl-by {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  color: #16a34a;
  font-weight: 600;
  background: #f0fdf4;
  padding: 2px 8px;
  border-radius: 20px;
}

.tl-empty {
  font-size: 13px;
  color: #8a9e90;
  font-style: italic;
}

/* ── Realtime indicator ───────────────────────────── */

.tr-realtime {
  text-align: center;
  padding: 12px;
  font-size: 11.5px;
  color: #8a9e90;
  background: #f8faf8;
  border-top: 1px solid #eef2ef;
}

/* ── Responsive ───────────────────────────────────── */

@media (max-width: 600px) {

  .tracking-form {
    flex-direction: column;
  }

  .tr-grid {
    grid-template-columns: 1fr;
  }

  .tr-header {
    padding: 16px;
  }

  .tr-section,
  .tr-info {
    padding: 14px 16px;
  }

  .tr-tiket {
    font-size: 15px;
  }

}


/* =====================================================
   MEDIA TINDAK LANJUT BIDANG
===================================================== */

.tr-tindak-section {
  background: #f0fdf4;
  border-left: 3px solid #16a34a;
}

.tr-tindak-sub {
  font-size: 12px;
  color: #5a7a62;
  margin-bottom: 12px;
  font-style: italic;
}

.tr-tindak-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.tr-tindak-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* Tombol download */
.tr-dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  background: #166534;
  color: #ffffff;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}

.tr-dl-btn:hover {
  background: #14532d;
}

/* Error image placeholder */
.tr-img-err {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 11px;
  border-radius: 8px;
}
