/* =====================================================================
   Paslogistik Ekspedisi - Custom Stylesheet
   ===================================================================== */

:root {
  /* Primary Brand */
  --brand-primary: #0B3D91;
  --brand-primary-dark: #072a65;
  --brand-primary-light: #1e5bb8;

  /* Accent */
  --brand-accent: #F97316;
  --brand-accent-dark: #c85a0c;

  /* Status */
  --status-success: #16A34A;
  --status-warning: #F59E0B;
  --status-danger:  #DC2626;
  --status-info:    #0EA5E9;

  /* Neutrals */
  --neutral-900: #0F172A;
  --neutral-700: #334155;
  --neutral-500: #64748B;
  --neutral-300: #CBD5E1;
  --neutral-100: #F1F5F9;
  --neutral-50:  #F8FAFC;
  --white: #FFFFFF;

  --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,0.06);
  --shadow-md: 0 4px 12px rgba(15,23,42,0.08);
  --shadow-lg: 0 10px 30px rgba(15,23,42,0.12);

  --sidebar-width: 260px;
  --sidebar-collapsed: 72px;
  --topbar-height: 60px;
  --bottomnav-height: 60px;

  /* Bootstrap overrides */
  --bs-primary: var(--brand-primary);
  --bs-primary-rgb: 11, 61, 145;
}

/* ------------- Base ------------- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  font-family: var(--font-sans);
  color: var(--neutral-900);
  background-color: var(--neutral-50);
  -webkit-font-smoothing: antialiased;
}

.font-mono { font-family: var(--font-mono); }

a { color: var(--brand-primary); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--brand-primary-light); }

/* ------------- Buttons ------------- */
.btn {
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
}
.btn-sm { min-height: 36px; padding: 0.35rem 0.75rem; font-size: 0.875rem; }
.btn-lg { min-height: 52px; font-size: 1.0625rem; }

.btn-primary {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
  color: var(--white);
}
.btn-primary:hover, .btn-primary:focus {
  background-color: var(--brand-primary-dark);
  border-color: var(--brand-primary-dark);
  color: var(--white);
}

.btn-accent {
  background-color: var(--brand-accent);
  border-color: var(--brand-accent);
  color: var(--white);
}
.btn-accent:hover, .btn-accent:focus {
  background-color: var(--brand-accent-dark);
  border-color: var(--brand-accent-dark);
  color: var(--white);
}

.btn-outline-primary { color: var(--brand-primary); border-color: var(--brand-primary); }
.btn-outline-primary:hover { background: var(--brand-primary); color: var(--white); }

.btn:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 2px; }

/* ------------- Forms ------------- */
.form-label { font-size: 0.8125rem; font-weight: 500; color: var(--neutral-700); margin-bottom: 0.35rem; }
.form-label .required { color: var(--status-danger); margin-left: 2px; }

.form-control, .form-select {
  min-height: 44px;
  border-radius: var(--radius-sm);
  border-color: var(--neutral-300);
  color: var(--neutral-900);
  font-size: 0.9375rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-control:focus, .form-select:focus {
  border-color: var(--brand-primary-light);
  box-shadow: 0 0 0 3px rgba(11,61,145,0.15);
}
.form-control.is-invalid, .form-select.is-invalid {
  border-color: var(--status-danger);
}
.invalid-feedback { font-size: 0.8125rem; }

.form-switch .form-check-input { width: 2.75rem; height: 1.5rem; }
.form-switch .form-check-input:checked { background-color: var(--brand-primary); border-color: var(--brand-primary); }

textarea.form-control { min-height: 80px; }

/* ------------- Layout Admin ------------- */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, var(--brand-primary-dark) 0%, var(--brand-primary) 100%);
  color: var(--white);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 1030;
  overflow-y: auto;
}

.app-sidebar__brand {
  padding: 1.25rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.app-sidebar__brand img, .app-sidebar__brand svg { width: 34px; height: 34px; }
.app-sidebar__brand-text {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.15;
}
.app-sidebar__brand-text small {
  display: block;
  font-size: 0.7rem;
  opacity: 0.75;
  font-weight: 400;
  letter-spacing: 0.03em;
}

.app-sidebar__nav {
  flex: 1;
  padding: 0.75rem 0.5rem;
}
.sidebar-section-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.55;
  padding: 0.5rem 0.85rem;
  margin-top: 0.5rem;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.82);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s ease;
  margin-bottom: 2px;
}
.sidebar-link i { font-size: 1.05rem; width: 20px; text-align: center; }
.sidebar-link:hover { background-color: rgba(255,255,255,0.08); color: var(--white); }
.sidebar-link.active {
  background-color: rgba(255,255,255,0.15);
  color: var(--white);
  box-shadow: inset 3px 0 0 var(--brand-accent);
}

.app-sidebar__footer {
  padding: 0.85rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.sidebar-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--brand-accent);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; font-size: 0.85rem; }
.sidebar-user-info strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-info small { opacity: 0.7; }

.app-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-topbar {
  height: var(--topbar-height);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  position: sticky;
  top: 0;
  z-index: 1020;
  gap: 1rem;
}
.topbar-title { font-size: 1rem; font-weight: 600; color: var(--neutral-900); flex: 1; }
.topbar-title small { font-weight: 400; color: var(--neutral-500); display: block; font-size: 0.75rem; }
.topbar-actions { display: flex; align-items: center; gap: 0.6rem; }

.btn-hamburger {
  background: none; border: none;
  width: 42px; height: 42px;
  display: none;
  align-items: center; justify-content: center;
  font-size: 1.3rem;
  color: var(--neutral-700);
  border-radius: var(--radius-sm);
}
.btn-hamburger:hover { background: var(--neutral-100); }

.app-content { padding: 1.5rem; flex: 1; }

.app-bottomnav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottomnav-height);
  background: var(--white);
  border-top: 1px solid var(--neutral-300);
  z-index: 1020;
  box-shadow: 0 -2px 8px rgba(15,23,42,0.05);
}
.app-bottomnav__list { display: flex; justify-content: space-around; height: 100%; margin: 0; padding: 0; list-style: none; }
.app-bottomnav__item { flex: 1; }
.app-bottomnav__link {
  height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px;
  color: var(--neutral-500);
  font-size: 0.7rem;
  font-weight: 500;
  text-decoration: none;
}
.app-bottomnav__link i { font-size: 1.2rem; }
.app-bottomnav__link.active { color: var(--brand-primary); }
.app-bottomnav__link.accent-btn {
  position: relative;
  top: -16px;
  width: 48px; height: 48px;
  background: var(--brand-accent);
  color: var(--white);
  border-radius: 50%;
  margin: 0 auto;
  font-size: 0.65rem;
  box-shadow: var(--shadow-md);
}
.app-bottomnav__link.accent-btn i { font-size: 1.3rem; }

/* ------------- Cards ------------- */
.card {
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  background: var(--white);
}
.card-header {
  background: var(--white);
  border-bottom: 1px solid var(--neutral-100);
  padding: 0.9rem 1.15rem;
  font-weight: 600;
  color: var(--neutral-900);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.card-header i { color: var(--brand-primary); }
.card-header .section-letter {
  width: 26px; height: 26px;
  border-radius: 6px;
  background: var(--brand-primary);
  color: var(--white);
  font-size: 0.8rem;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.card-body { padding: 1.15rem; }

/* ------------- Badges ------------- */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge-status--success { background: rgba(22,163,74,0.12); color: var(--status-success); }
.badge-status--warning { background: rgba(245,158,11,0.14); color: var(--status-warning); }
.badge-status--danger  { background: rgba(220,38,38,0.12); color: var(--status-danger); }
.badge-status--info    { background: rgba(14,165,233,0.12); color: var(--status-info); }
.badge-status--neutral { background: var(--neutral-100); color: var(--neutral-700); }

/* AWB Badge */
.awb-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.7rem;
  background: var(--neutral-100);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--neutral-900);
  border: 1px solid var(--neutral-300);
}
.awb-badge__copy {
  border: none; background: none;
  color: var(--neutral-500);
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
}
.awb-badge__copy:hover { color: var(--brand-primary); }

/* Step indicator */
.step-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.step-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.step-circle {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center; justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  background: var(--neutral-100);
  color: var(--neutral-500);
  border: 2px solid var(--neutral-300);
}
.step-item.active .step-circle {
  background: var(--brand-primary);
  color: var(--white);
  border-color: var(--brand-primary);
}
.step-item.done .step-circle {
  background: var(--status-success);
  color: var(--white);
  border-color: var(--status-success);
}
.step-label { font-size: 0.85rem; font-weight: 500; color: var(--neutral-700); }
.step-item.active .step-label { color: var(--brand-primary); font-weight: 600; }
.step-connector { flex: 1; height: 2px; background: var(--neutral-300); min-width: 24px; }
.step-item.done ~ .step-connector { background: var(--status-success); }

/* ------------- Tables ------------- */
.table { margin-bottom: 0; }
.table thead th {
  background: var(--neutral-100);
  color: var(--neutral-700);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  border-bottom: 1px solid var(--neutral-300);
  padding: 0.75rem 0.85rem;
}
.table tbody td {
  padding: 0.8rem 0.85rem;
  vertical-align: middle;
  color: var(--neutral-900);
  font-size: 0.9rem;
  border-bottom: 1px solid var(--neutral-100);
}
.table tbody tr:hover { background: var(--neutral-50); }

/* ------------- Modal ------------- */
.modal-header {
  border-bottom: 1px solid var(--neutral-100);
  padding: 1rem 1.25rem;
}
.modal-title { font-weight: 600; }
.modal-footer { border-top: 1px solid var(--neutral-100); padding: 0.85rem 1.25rem; }

/* ------------- Empty State ------------- */
.empty-state {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--neutral-500);
}
.empty-state i { font-size: 3rem; opacity: 0.5; display: block; margin-bottom: 0.75rem; }
.empty-state h5 { color: var(--neutral-700); font-weight: 600; }
.empty-state p { font-size: 0.9rem; }

/* ------------- Alert/Flash ------------- */
.alert-flash {
  border-radius: var(--radius-md);
  border: none;
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  box-shadow: var(--shadow-sm);
}
.alert-flash.alert-success { background: rgba(22,163,74,0.08); color: #0e6b32; }
.alert-flash.alert-danger  { background: rgba(220,38,38,0.08); color: #922121; }
.alert-flash.alert-warning { background: rgba(245,158,11,0.12); color: #8a5a0a; }
.alert-flash.alert-info    { background: rgba(14,165,233,0.1); color: #0b6285; }

/* ------------- Public Tracing ------------- */
.public-hero {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
  color: var(--white);
  padding: 3rem 1rem 6rem;
  position: relative;
}
.public-hero h1 {
  font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem;
}
.public-hero p { opacity: 0.9; font-size: 1rem; }
.public-brand {
  display: flex; align-items: center; gap: 0.5rem;
  font-weight: 700; font-size: 1.1rem;
  margin-bottom: 2rem;
}
.public-brand img, .public-brand svg { width: 36px; height: 36px; }

.public-search-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
  margin-top: -3.5rem;
  position: relative;
  z-index: 2;
}

/* Footer publik — petunjuk login kurir & admin */
.public-footer {
  border-top: 1px solid var(--neutral-100);
  background: var(--white);
  padding: 1.5rem 1rem 2rem;
  color: var(--neutral-500);
  font-size: 0.85rem;
  margin-top: 2rem;
}
.public-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}
.public-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}
.public-footer__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--neutral-300);
  background: var(--white);
  color: var(--neutral-700);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85rem;
  min-height: 40px;
  transition: all 0.2s ease;
}
.public-footer__link:hover,
.public-footer__link:focus-visible {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: var(--neutral-50);
  outline: none;
}
.public-footer__link--kurir {
  background: var(--brand-accent);
  border-color: var(--brand-accent);
  color: #fff;
}
.public-footer__link--kurir:hover,
.public-footer__link--kurir:focus-visible {
  background: var(--brand-accent-dark);
  border-color: var(--brand-accent-dark);
  color: #fff;
}
.public-footer__copy {
  text-align: center;
  font-size: 0.78rem;
  color: var(--neutral-500);
}
@media (max-width: 480px) {
  .public-footer__link { width: 100%; justify-content: center; }
  .public-footer__links { width: 100%; }
}
.public-search-card .form-control {
  min-height: 56px;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
}

/* Timeline */
.tracking-timeline {
  position: relative;
  padding-left: 2rem;
  margin: 1rem 0 0;
}
.tracking-timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: var(--neutral-300);
}
.timeline-item {
  position: relative;
  padding-bottom: 1.5rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--neutral-300);
}
.timeline-item.latest::before {
  background: var(--status-success);
  border-color: var(--status-success);
  box-shadow: 0 0 0 4px rgba(22,163,74,0.15);
}
.timeline-date { font-size: 0.8rem; color: var(--neutral-500); margin-bottom: 0.15rem; }
.timeline-status { font-weight: 600; color: var(--neutral-900); font-size: 0.95rem; margin-bottom: 0.15rem; }
.timeline-desc { font-size: 0.85rem; color: var(--neutral-700); }

/* Tracing Timeline (rich — dipakai di halaman public tracing) */
.tracing-log {
  position: relative;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}
.tracing-log::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 16px;
  bottom: 16px;
  width: 3px;
  background: linear-gradient(180deg, var(--status-success) 0%, var(--neutral-300) 30%, var(--neutral-300) 100%);
  border-radius: 3px;
}
.tracing-log__item {
  position: relative;
  padding: 0.25rem 0 1.5rem 64px;
  min-height: 52px;
}
.tracing-log__item:last-child { padding-bottom: 0.25rem; }
.tracing-log__dot {
  position: absolute;
  left: 10px;
  top: 4px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--neutral-300);
  color: var(--neutral-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  z-index: 1;
  box-shadow: var(--shadow-sm);
}
.tracing-log__item--latest .tracing-log__dot {
  background: var(--status-success);
  border-color: var(--status-success);
  color: var(--white);
  box-shadow: 0 0 0 5px rgba(22,163,74,0.18);
  animation: pulse-dot 2.4s ease-out infinite;
}
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(22,163,74,0.35); }
  70% { box-shadow: 0 0 0 10px rgba(22,163,74,0); }
  100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); }
}
.tracing-log__item--delivered .tracing-log__dot {
  background: var(--status-success);
  border-color: var(--status-success);
  color: var(--white);
}
.tracing-log__item--transit .tracing-log__dot {
  background: var(--status-info);
  border-color: var(--status-info);
  color: var(--white);
}
.tracing-log__item--warning .tracing-log__dot {
  background: var(--status-warning);
  border-color: var(--status-warning);
  color: var(--white);
}
.tracing-log__item--danger .tracing-log__dot {
  background: var(--status-danger);
  border-color: var(--status-danger);
  color: var(--white);
}

.tracing-log__card {
  background: var(--white);
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
}
.tracing-log__card:hover { box-shadow: var(--shadow-md); }
.tracing-log__item--latest .tracing-log__card {
  border-color: rgba(22,163,74,0.3);
  background: rgba(22,163,74,0.04);
}

.tracing-log__header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem 0.75rem;
  margin-bottom: 0.35rem;
}
.tracing-log__status {
  font-size: 1rem;
  font-weight: 700;
  color: var(--neutral-900);
  letter-spacing: 0.01em;
  line-height: 1.3;
}
.tracing-log__item--latest .tracing-log__status { color: var(--status-success); }
.tracing-log__time {
  font-size: 0.78rem;
  color: var(--neutral-500);
  font-weight: 500;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.tracing-log__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  margin-top: 0.4rem;
  font-size: 0.82rem;
  color: var(--neutral-700);
}
.tracing-log__meta span { display: inline-flex; align-items: center; gap: 0.3rem; }
.tracing-log__meta i { color: var(--brand-primary); }
.tracing-log__desc {
  font-size: 0.88rem;
  color: var(--neutral-700);
  line-height: 1.5;
}
.tracing-log__route {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--neutral-500);
  margin-top: 0.25rem;
}
.tracing-log__route strong { color: var(--neutral-700); font-weight: 600; }

@media (max-width: 575.98px) {
  .tracing-log::before { left: 18px; }
  .tracing-log__item { padding-left: 52px; }
  .tracing-log__dot { left: 4px; width: 28px; height: 28px; font-size: 0.9rem; }
  .tracing-log__status { font-size: 0.95rem; }
  .tracing-log__header { flex-direction: column; align-items: flex-start; gap: 0.2rem; }
}

/* ------------- Sticky Form Actions (Mobile) ------------- */
.form-actions-sticky {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  padding: 1rem 0;
}

/* ------------- Responsive ------------- */
@media (max-width: 991.98px) {
  .app-sidebar { display: none; }
  .app-main { margin-left: 0; }
  .btn-hamburger { display: inline-flex; }
}

@media (max-width: 767.98px) {
  .app-content { padding: 1rem; padding-bottom: calc(var(--bottomnav-height) + 1rem); }
  .app-bottomnav { display: block; }
  .app-topbar { height: 56px; padding: 0 0.85rem; }
  .topbar-title { font-size: 0.95rem; }
  .public-hero { padding: 2rem 1rem 5rem; }
  .public-hero h1 { font-size: 1.5rem; }
  .card-header { padding: 0.75rem 1rem; font-size: 0.95rem; }
  .card-body { padding: 1rem; }

  .form-actions-sticky {
    position: sticky;
    bottom: var(--bottomnav-height);
    background: var(--white);
    padding: 0.85rem 1rem;
    margin: 1.25rem -1rem -1rem;
    border-top: 1px solid var(--neutral-100);
    box-shadow: 0 -4px 12px rgba(15,23,42,0.06);
    justify-content: stretch;
    flex-direction: column-reverse;
  }
  .form-actions-sticky .btn { width: 100%; }

  /* Table to card view */
  .table-responsive-cards { border: none; }
  .table-responsive-cards thead { display: none; }
  .table-responsive-cards tbody tr {
    display: block;
    padding: 0.85rem;
    border: 1px solid var(--neutral-300);
    border-radius: var(--radius-md);
    margin-bottom: 0.65rem;
    background: var(--white);
  }
  .table-responsive-cards tbody td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.3rem 0;
    border: none;
    font-size: 0.88rem;
    gap: 0.75rem;
  }
  .table-responsive-cards tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--neutral-500);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
  }
}

/* Print style for Airway Bill */
@media print {
  .no-print, .app-sidebar, .app-topbar, .app-bottomnav, .btn { display: none !important; }
  .app-main { margin-left: 0 !important; }
  .app-content { padding: 0 !important; }
  body { background: #fff !important; }
  .card { box-shadow: none !important; border: none !important; }
}

/* Toast positioning override */
.toast-container { z-index: 1090; }

/* ------------- Workspace Tabs (3-stage workflow) ------------- */
.workspace-tabs {
  display: flex;
  gap: 0;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 0.35rem;
  border: 1px solid var(--neutral-300);
  box-shadow: var(--shadow-sm);
  list-style: none;
  margin: 0 0 1.25rem;
  overflow-x: auto;
}
.workspace-tabs__item { flex: 1; min-width: 0; }
.workspace-tabs__link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--neutral-500);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  background: transparent;
  border: none;
  width: 100%;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: center;
}
.workspace-tabs__link:hover {
  background: var(--neutral-100);
  color: var(--neutral-900);
}
.workspace-tabs__link.active {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.workspace-tabs__link .wt-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--neutral-100);
  color: var(--neutral-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.workspace-tabs__link.active .wt-num {
  background: rgba(255,255,255,0.22);
  color: var(--white);
}
.workspace-tabs__link .wt-label-short { display: none; }

@media (max-width: 575.98px) {
  .workspace-tabs__link { padding: 0.55rem 0.6rem; font-size: 0.82rem; gap: 0.35rem; }
  .workspace-tabs__link .wt-label-long { display: none; }
  .workspace-tabs__link .wt-label-short { display: inline; }
  .workspace-tabs__link .wt-num { width: 20px; height: 20px; font-size: 0.7rem; }
}

/* ------------- Pagination (Bootstrap 5 override) ------------- */
.app-pager {
  background: var(--white);
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.9rem;
  box-shadow: var(--shadow-sm);
}
.app-pager .pagination { --bs-pagination-color: var(--brand-primary); }
.app-pager .page-link {
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm) !important;
  margin: 0 2px;
  color: var(--brand-primary);
  border: 1px solid var(--neutral-300);
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.15s ease;
  padding: 0.35rem 0.75rem;
}
.app-pager .page-link:hover {
  background: var(--neutral-100);
  border-color: var(--brand-primary-light);
  color: var(--brand-primary-dark);
}
.app-pager .page-item.active .page-link {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: var(--white);
  box-shadow: 0 2px 6px rgba(11,61,145,0.25);
}
.app-pager .page-item.disabled .page-link {
  color: var(--neutral-500);
  background: var(--neutral-50);
  border-color: var(--neutral-300);
  opacity: 0.65;
  cursor: not-allowed;
}
.app-pager small { font-size: 0.8rem; }

@media (max-width: 575.98px) {
  .app-pager { flex-direction: column; align-items: stretch !important; gap: 0.6rem; }
  .app-pager .pagination { justify-content: center; }
  .app-pager .page-link { min-width: 44px; height: 44px; }
}

/* Tom Select basic tweaks */
.ts-wrapper.single .ts-control {
  min-height: 44px;
  border-radius: var(--radius-sm);
  border-color: var(--neutral-300);
  padding-left: 0.75rem;
}
.ts-wrapper.single .ts-control.focus {
  border-color: var(--brand-primary-light);
  box-shadow: 0 0 0 3px rgba(11,61,145,0.15);
}

/* Login page specific */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
  padding: 1rem;
}
.login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 460px;
  width: 100%;
  padding: 2rem;
}
.login-brand {
  text-align: center;
  margin-bottom: 1.5rem;
}
/* Logo banner — beri ruang horizontal yang lapang supaya logo apapun
   (kotak / wide / mirip banner) tetap proporsional dan tidak terlihat
   mepet. Lebar mengisi card, tinggi dibatasi agar tetap rapi.            */
.login-brand__logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  padding: 0.85rem 1rem;
  background: var(--neutral-50);
  border: 1px solid var(--neutral-100);
  border-radius: var(--radius-md);
}
.login-brand__logo {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 88px;
  object-fit: contain;
}

@media (max-width: 480px) {
  .login-brand__logo-wrap { max-width: 100%; padding: 0.65rem 0.85rem; }
  .login-brand__logo { max-height: 72px; }
}

/* Detail label-value pair */
.dl-grid { display: grid; grid-template-columns: 1fr; gap: 0.85rem; }
@media (min-width: 768px) {
  .dl-grid { grid-template-columns: 1fr 1fr; }
}
.dl-grid .dl-item { display: flex; flex-direction: column; gap: 0.15rem; }
.dl-grid .dl-label { font-size: 0.75rem; color: var(--neutral-500); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.dl-grid .dl-value { font-size: 0.95rem; color: var(--neutral-900); font-weight: 500; }

/* ============================================================= */
/*                KURIR (mobile-first UI)                        */
/* ============================================================= */
.kurir-body {
    font-family: var(--font-sans);
    background: var(--neutral-50);
    color: var(--neutral-900);
    min-height: 100vh;
    -webkit-tap-highlight-color: transparent;
}
.kurir-topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.7rem 1rem;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
    color: #fff;
    box-shadow: var(--shadow-md);
    padding-top: calc(0.7rem + env(safe-area-inset-top, 0));
}
.kurir-topbar__brand {
    display: flex; align-items: center; gap: 0.6rem;
    color: #fff; text-decoration: none;
}
.kurir-topbar__brand img { width: 32px; height: 32px; }
.kurir-topbar__brand-text div { font-weight: 700; font-size: 1rem; line-height: 1.1; }
.kurir-topbar__brand-text small { opacity: 0.85; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; }
.kurir-topbar__user { display: flex; align-items: center; gap: 0.6rem; font-size: 0.82rem; }
.kurir-topbar__user-name { max-width: 110px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kurir-topbar__logout {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%;
    color: #fff; background: rgba(255,255,255,0.15);
    text-decoration: none; transition: background 0.2s ease;
}
.kurir-topbar__logout:hover, .kurir-topbar__logout:focus { background: rgba(255,255,255,0.3); color: #fff; }

.kurir-main {
    max-width: 680px; margin: 0 auto;
    padding: 1rem; padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0));
}
.kurir-flash { display: flex; gap: 0.5rem; align-items: center; border-radius: var(--radius-md); }

/* ---- Login (kurir) ---- konsisten dengan /login admin ---- */
.kurir-login__brand {
    text-align: center;
    padding: 0.5rem 0 0.5rem;
    margin-bottom: 0.75rem;
}
.kurir-login__brand .login-brand__logo-wrap { margin-bottom: 0.75rem; }
.kurir-login__mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.85rem;
    background: var(--brand-accent);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.25);
}
.kurir-login__subtitle {
    color: var(--neutral-500);
    margin: 0.6rem 0 0;
    font-size: 0.9rem;
}
.kurir-login__card {
    background: #fff; padding: 1.25rem; border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md); margin-top: 0.25rem;
}
.kurir-login__card .btn-primary { min-height: 52px; font-weight: 600; font-size: 1.05rem; }
.kurir-login__card .input-group-text { min-width: 48px; justify-content: center; }
.kurir-login__hint {
    margin-top: 1rem; padding: 0.75rem; font-size: 0.82rem;
    background: var(--neutral-100); border-radius: var(--radius-sm); color: var(--neutral-700);
    display: flex; gap: 0.5rem; align-items: flex-start;
}

/* ---- Home (input AWB manual) ---- */
.kurir-home__hero {
    text-align: center; padding: 1.5rem 0.5rem 1rem;
    color: var(--brand-primary);
}
.kurir-home__hero i { font-size: 3rem; display: block; margin-bottom: 0.5rem; color: var(--brand-accent); }
.kurir-home__hero h1 { font-size: 1.4rem; font-weight: 700; margin: 0; }
.kurir-home__hero p { color: var(--neutral-500); margin: 0.3rem 0 0; font-size: 0.9rem; }
.kurir-home__card {
    background: #fff; padding: 1.25rem; border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}
.kurir-home__card .btn-primary { min-height: 52px; font-weight: 600; }

/* ---- Empty / Not Found ---- */
.kurir-empty {
    text-align: center; padding: 2rem 1rem;
    background: #fff; border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}
.kurir-empty i { font-size: 3rem; color: var(--status-warning); display: block; margin-bottom: 0.5rem; }
.kurir-empty h2 { font-size: 1.2rem; font-weight: 700; }

/* ---- AWB Card (ringkasan) ---- */
.kurir-awb-card {
    background: #fff; border-radius: var(--radius-lg);
    padding: 1rem; margin-bottom: 1rem;
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--brand-accent);
}
.kurir-awb-card__label { font-size: 0.7rem; text-transform: uppercase; color: var(--neutral-500); letter-spacing: 0.05em; font-weight: 600; }
.kurir-awb-card__awb { font-family: var(--font-mono); font-size: 1.25rem; font-weight: 600; color: var(--brand-primary); word-break: break-all; }
.kurir-awb-card__route { display: flex; align-items: center; flex-wrap: wrap; gap: 0.2rem; margin-top: 0.5rem; font-size: 0.9rem; color: var(--neutral-700); font-weight: 500; }
.kurir-awb-card__route .bi-geo-alt-fill { color: var(--status-info); }
.kurir-awb-card__route .bi-flag-fill { color: var(--status-success); }
.kurir-awb-card__meta { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.4rem; font-size: 0.85rem; color: var(--neutral-700); }
.kurir-awb-card__phone { color: var(--brand-primary); font-weight: 600; text-decoration: none; }
.kurir-awb-card__phone:hover { text-decoration: underline; }
.kurir-awb-card__status {
    display: flex; align-items: center; gap: 0.75rem;
    margin-top: 0.85rem; padding: 0.6rem 0.75rem;
    border-radius: var(--radius-sm); background: var(--neutral-100);
}
.kurir-awb-card__status i { font-size: 1.5rem; }
.kurir-awb-card__status small { display: block; font-size: 0.7rem; color: var(--neutral-500); text-transform: uppercase; letter-spacing: 0.05em; }
.kurir-awb-card__status strong { display: block; font-size: 0.95rem; font-weight: 600; color: var(--neutral-900); }
.kurir-awb-card__status--delivered { background: #ecfdf5; }
.kurir-awb-card__status--delivered i { color: var(--status-success); }
.kurir-awb-card__status--transit { background: #eff6ff; }
.kurir-awb-card__status--transit i { color: var(--status-info); }
.kurir-awb-card__status--warning { background: #fffbeb; }
.kurir-awb-card__status--warning i { color: var(--status-warning); }
.kurir-awb-card__status--danger { background: #fef2f2; }
.kurir-awb-card__status--danger i { color: var(--status-danger); }

/* ---- Form Kurir ---- */
.kurir-form {
    background: #fff; border-radius: var(--radius-lg);
    padding: 1rem; margin-bottom: 1rem;
    box-shadow: var(--shadow-md);
}
.kurir-form__title { font-size: 1.05rem; font-weight: 700; margin: 0 0 0.75rem; color: var(--brand-primary); display: flex; align-items: center; gap: 0.4rem; }
.kurir-form__group { margin-bottom: 0.85rem; }
.kurir-form .form-control { min-height: 48px; }
.kurir-form .form-control-lg { min-height: 52px; font-size: 1rem; }
.kurir-form__submit { min-height: 56px; font-size: 1.05rem; font-weight: 700; margin-top: 0.25rem; }

/* Quick-select chips */
.kurir-chips {
    display: flex; flex-wrap: wrap; gap: 0.4rem;
    margin-bottom: 0.6rem;
}
.kurir-chip {
    border: 1px solid var(--neutral-300);
    background: #fff;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    font-size: 0.82rem;
    color: var(--neutral-700);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    min-height: 36px;
}
.kurir-chip:hover, .kurir-chip:focus {
    border-color: var(--brand-primary-light);
    color: var(--brand-primary);
}
.kurir-chip.is-active {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #fff;
}

/* History */
.kurir-history {
    background: #fff; border-radius: var(--radius-lg);
    padding: 1rem; box-shadow: var(--shadow-md);
}
.kurir-history__title { font-size: 1.05rem; font-weight: 700; margin: 0 0 0.75rem; color: var(--brand-primary); display: flex; align-items: center; gap: 0.4rem; }
.kurir-history__count {
    display: inline-block; margin-left: auto;
    background: var(--neutral-100); color: var(--neutral-700);
    font-size: 0.75rem; font-weight: 600;
    padding: 0.15rem 0.55rem; border-radius: 999px;
}
.kurir-log { margin-bottom: 0; }

/* Toast mini (fallback) */
.kurir-toast {
    position: fixed; top: 16px; left: 50%;
    transform: translate(-50%, -120%);
    background: var(--neutral-900); color: #fff;
    padding: 0.7rem 1rem; border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 2000; font-size: 0.9rem;
    transition: transform 0.3s ease; max-width: 90vw;
}
.kurir-toast.show { transform: translate(-50%, 0); }
.kurir-toast--danger { background: var(--status-danger); }
.kurir-toast--success { background: var(--status-success); }

/* ------------- Tom Select integration (Pihak Terkait) ------------- */
.d-flex > .ts-wrapper { flex: 1 1 auto; min-width: 0; }
.ts-wrapper.single .ts-control {
    min-height: 44px;
    border-color: var(--neutral-300);
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.75rem;
    font-size: 0.95rem;
}
.ts-wrapper.single.focus .ts-control {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 0.2rem rgba(11,61,145,0.15);
}
.ts-dropdown { border-radius: var(--radius-sm); box-shadow: var(--shadow-md); }
.ts-dropdown .active { background: var(--brand-primary); color: #fff; }
.ts-dropdown .no-results { font-size: 0.85rem; }

/* ------------- Bukti Foto Uploader ------------- */
.bukti-uploader { width: 100%; }
.bukti-uploader__drop {
    display: block;
    position: relative;
    width: 100%;
    min-height: 170px;
    padding: 1.25rem;
    border: 2px dashed var(--neutral-300);
    border-radius: var(--radius-md);
    background: var(--neutral-50);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}
.bukti-uploader__drop:hover { border-color: var(--brand-primary-light); background: #eef4ff; }
.bukti-uploader__drop.is-dragover { border-color: var(--brand-primary); background: #e3efff; box-shadow: 0 0 0 4px rgba(11,61,145,0.12); }
.bukti-uploader__drop.is-filled {
    border-style: solid;
    border-color: var(--status-success);
    background: var(--white);
    padding: 0.75rem;
    text-align: left;
}
.bukti-uploader__drop.is-error { border-color: var(--status-danger); background: #fef2f2; }
.bukti-uploader__placeholder { padding: 1rem 0.5rem; }
.bukti-uploader__placeholder .bi { display: inline-block; }
.bukti-uploader__preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.bukti-uploader__img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--neutral-300);
    flex-shrink: 0;
}
.bukti-uploader__info {
    flex: 1 1 180px;
    min-width: 0;
    overflow: hidden;
}
.bukti-uploader__name {
    font-weight: 600;
    color: var(--neutral-900);
    word-break: break-all;
    font-size: 0.9rem;
}
.bukti-uploader__remove {
    flex-shrink: 0;
    z-index: 2;
    position: relative;
}
@media (max-width: 575.98px) {
    .bukti-uploader__drop.is-filled { padding: 0.6rem; }
    .bukti-uploader__img { width: 72px; height: 72px; }
    .bukti-uploader__preview { gap: 0.6rem; }
}

/* ------------- Bukti Viewer (modal image) ------------- */
.bukti-viewer {
    position: relative;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bukti-viewer__img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    background: #fff;
}
.bukti-viewer__spinner {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}

/* "Lihat Bukti" button di dalam timeline */
.tracing-log__meta .btn-lihat-bukti {
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    line-height: 1.2;
    border-radius: 999px;
}
.tracing-log__meta .btn-lihat-bukti .bi { margin-right: 0.15rem; }

/* Hover-shadow utility — kartu pilihan (mis. modal Pilih Ukuran Cetak) */
.hover-shadow {
    transition: all 0.2s ease;
    border-color: var(--bs-border-color, var(--neutral-300)) !important;
}
.hover-shadow:hover,
.hover-shadow:focus-visible {
    box-shadow: 0 4px 16px rgba(11, 61, 145, 0.15);
    border-color: var(--brand-primary) !important;
    transform: translateY(-2px);
    outline: none;
}
