@import url("variables.css");
@import url("glass.css");

/* Base dashboard reset and page background. */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, Segoe UI, Arial, sans-serif;
  color: var(--text);
  background: #07080d;
  min-height: 100vh;
  overflow-x: hidden;
}

.dashboard-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 12% 15%, rgba(229,9,20,.18), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(30,167,255,.10), transparent 32%),
    radial-gradient(circle at 50% 90%, rgba(124,9,18,.22), transparent 35%),
    linear-gradient(135deg, #06070c, #0b0b10 45%, #13050a);
}

.dashboard-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent);
}

/* Shared glass panel treatment used across admin pages. */
.glass {
  background: rgba(255,255,255,.075);
  border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 24px 70px rgba(0,0,0,.34);
}

.glass-hover {
  transition: .25s ease;
}

.glass-hover:hover {
  transform: translateY(-6px);
  border-color: rgba(229,9,20,.45);
  box-shadow: 0 24px 80px rgba(229,9,20,.20);
}

/* Fixed admin sidebar and branding. */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 286px;
  padding: 24px 18px;
  background: rgba(5,6,10,.74);
  border-right: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(24px);
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 30px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  font-size: 25px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: 0 0 36px rgba(229,9,20,.45);
}

.logo {
  font-size: 31px;
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 1;
}

.logo span {
  color: var(--red);
}

.logo-sub {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 2px;
  margin-top: 5px;
}

.nav-section {
  margin: 24px 0 9px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.nav-linkx {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,.86);
  text-decoration: none;
  padding: 13px 14px;
  margin-top: 8px;
  border-radius: 16px;
  transition: .25s ease;
  overflow: hidden;
}

.nav-linkx span {
  width: 26px;
  display: inline-flex;
  justify-content: center;
}

.nav-linkx:hover,
.nav-linkx.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(229,9,20,.95), rgba(124,9,18,.45));
  box-shadow: 0 0 28px rgba(229,9,20,.34);
}

.nav-linkx.active::before {
  content: "";
  position: absolute;
  left: 0;
  width: 4px;
  height: 60%;
  border-radius: 20px;
  background: #fff;
}

.logout-link {
  margin-bottom: 25px;
}

.main {
  margin-left: 286px;
  padding: 24px 30px 46px;
}

.topbar {
  height: 72px;
  border-radius: 24px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 22px;
}

.search {
  flex: 1;
  max-width: 540px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  height: 48px;
  border-radius: 18px;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.10);
}

.search span {
  color: var(--muted);
  font-size: 22px;
}

.search input {
  width: 100%;
  background: transparent;
  border: none;
  color: white;
  outline: none;
  font-size: 14px;
}

.search input::placeholder {
  color: rgba(255,255,255,.45);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.notification-btn {
  position: relative;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(255,255,255,.065);
  border: 1px solid rgba(255,255,255,.12);
}

.notification-btn span {
  position: absolute;
  right: 11px;
  top: 10px;
  width: 9px;
  height: 9px;
  background: var(--red);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--red);
}

.user-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-box small {
  color: var(--muted);
}

.avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 900;
  background: linear-gradient(135deg, #fff, #8b8f99);
  color: #121318;
  border: 2px solid rgba(255,255,255,.18);
}

.hero {
  min-height: 245px;
  border-radius: 32px;
  padding: 34px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
}

.hero::after {
  content: "VIPEX";
  position: absolute;
  right: -25px;
  bottom: -35px;
  font-size: 130px;
  font-weight: 900;
  letter-spacing: 4px;
  color: rgba(255,255,255,.035);
}

.eyebrow {
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  font-weight: 700;
  margin: 0 0 12px;
}

.hero h1 {
  font-size: 42px;
  margin: 0;
  line-height: 1.1;
}

.hero-text {
  max-width: 650px;
  color: var(--muted);
  line-height: 1.7;
  margin: 16px 0 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.btn-red,
.btn-glass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 17px;
  border-radius: 15px;
  color: #fff;
  text-decoration: none;
  transition: .25s ease;
}

.btn-red {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: 0 16px 40px rgba(229,9,20,.32);
}

.btn-glass {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
}

.btn-red:hover,
.btn-glass:hover {
  transform: translateY(-2px);
}

.hero-status {
  min-width: 210px;
  padding: 22px;
  border-radius: 24px;
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(255,255,255,.12);
  position: relative;
  z-index: 2;
}

.hero-status strong,
.hero-status small {
  display: block;
}

.hero-status small {
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.4;
}

.live-pulse {
  width: 18px;
  height: 18px;
  background: var(--success);
  border-radius: 50%;
  margin-bottom: 14px;
  box-shadow: 0 0 0 0 rgba(0,210,106,.65);
  animation: pulse 1.8s infinite;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.stat-card {
  min-height: 178px;
  padding: 23px;
  border-radius: 25px;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -38px;
  top: -38px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
}

.stat-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-top span {
  color: var(--muted);
  font-size: 12px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: rgba(229,9,20,.16);
  border: 1px solid rgba(229,9,20,.40);
}

.stat-icon.blue {
  background: rgba(30,167,255,.15);
  border-color: rgba(30,167,255,.35);
}

.stat-icon.green {
  background: rgba(0,210,106,.13);
  border-color: rgba(0,210,106,.35);
}

.stat-icon.purple {
  background: rgba(155,92,255,.14);
  border-color: rgba(155,92,255,.35);
}

.stat-card h6 {
  color: var(--muted);
  margin: 22px 0 6px;
  font-size: 14px;
}

.stat-card h2 {
  font-size: 37px;
  margin: 0;
}

.red-glow {
  box-shadow: 0 24px 85px rgba(229,9,20,.18);
}

.mini-line {
  position: absolute;
  left: 23px;
  right: 23px;
  bottom: 21px;
  height: 5px;
  border-radius: 20px;
  background: linear-gradient(90deg, var(--red), transparent);
}

.blue-line {
  background: linear-gradient(90deg, var(--info), transparent);
}

.green-line {
  background: linear-gradient(90deg, var(--success), transparent);
}

.purple-line {
  background: linear-gradient(90deg, var(--purple), transparent);
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.mini-card {
  padding: 16px;
  border-radius: 19px;
}

.mini-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.mini-card strong {
  font-size: 24px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.25fr .95fr;
  gap: 18px;
  margin-bottom: 18px;
}

.panel,
.wide-panel {
  border-radius: 25px;
  padding: 24px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.panel-head h3 {
  margin: 0;
  font-size: 20px;
}

.panel-head p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.panel-badge {
  padding: 7px 10px;
  border-radius: 12px;
  color: var(--success);
  background: rgba(0,210,106,.12);
  border: 1px solid rgba(0,210,106,.30);
  font-size: 12px;
}

.workflow {
  position: relative;
}

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

.workflow-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 40px;
  bottom: -8px;
  width: 1px;
  background: rgba(255,255,255,.15);
}

.workflow-item span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.2);
  margin-top: 2px;
}

.workflow-item.active span {
  background: var(--red);
  box-shadow: 0 0 22px rgba(229,9,20,.65);
}

.workflow-item strong {
  display: block;
}

.workflow-item small {
  color: var(--muted);
  display: block;
  margin-top: 5px;
}

.security-ring {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--success);
  border: 4px solid rgba(0,210,106,.35);
  box-shadow: inset 0 0 20px rgba(0,210,106,.12);
  font-size: 14px;
  font-weight: 800;
}

.security-box {
  padding: 18px;
  border-radius: 19px;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.10);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.security-box small {
  color: var(--muted);
  display: block;
  margin-top: 6px;
  line-height: 1.5;
}

.verified {
  color: var(--success);
  background: rgba(0,210,106,.12);
  border: 1px solid rgba(0,210,106,.25);
  padding: 8px 11px;
  border-radius: 12px;
  font-size: 13px;
}

.security-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
  margin-top: 16px;
}

.security-grid div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.08);
}

.security-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 7px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.table-dark-glass {
  width: 100%;
  min-width: 850px;
  border-collapse: collapse;
}

.table-dark-glass th,
.table-dark-glass td {
  padding: 15px 13px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: 14px;
  text-align: left;
}

.table-dark-glass th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .8px;
}

.table-dark-glass tbody tr {
  transition: .2s ease;
}

.table-dark-glass tbody tr:hover {
  background: rgba(255,255,255,.04);
}

.tracking-id {
  color: #fff;
  font-weight: 800;
}

.route-arrow {
  color: var(--red);
  margin: 0 6px;
}

.badge-status {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-delivered {
  background: rgba(0,210,106,.15);
  color: var(--success);
}

.status-registered {
  background: rgba(155,92,255,.15);
  color: var(--purple);
}

.status-dispatched {
  background: rgba(255,159,26,.15);
  color: var(--warning);
}

.status-intransit {
  background: rgba(30,167,255,.16);
  color: var(--info);
}

.status-arrived,
.status-ready {
  background: rgba(255,255,255,.12);
  color: #fff;
}

.status-cancelled {
  background: rgba(229,9,20,.16);
  color: #ff7b84;
}

.status-default {
  background: rgba(255,255,255,.10);
  color: var(--muted);
}

.empty {
  color: var(--muted);
  text-align: center;
}

.view-all {
  color: #fff;
  text-decoration: none;
  padding: 9px 13px;
  border-radius: 13px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0,210,106,.55);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(0,210,106,0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0,210,106,0);
  }
}

@media(max-width: 1180px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mini-stats {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .hero {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media(max-width: 900px) {
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
  }

  .main {
    margin-left: 0;
    padding: 18px;
  }

  .topbar {
    flex-direction: column;
    height: auto;
    align-items: stretch;
    padding: 16px;
  }

  .search {
    max-width: none;
  }
}

@media(max-width: 620px) {
  .stats-grid,
  .mini-stats {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero {
    padding: 24px;
  }

  .topbar-actions {
    justify-content: space-between;
  }
}

.page-hero {
  min-height: 190px;
}

.alert-glass {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 18px;
  margin-bottom: 18px;
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.14);
}

.alert-success {
  background: rgba(0,210,106,.12);
  color: #b8ffd9;
  border-color: rgba(0,210,106,.32);
}

.alert-danger {
  background: rgba(229,9,20,.13);
  color: #ffb6bd;
  border-color: rgba(229,9,20,.35);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.form-panel {
  padding: 24px;
  border-radius: 25px;
}

.form-wide {
  grid-column: 1 / -1;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  color: rgba(255,255,255,.88);
  font-size: 14px;
  margin-bottom: 8px;
}

.form-group label span {
  color: var(--red);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  color: #fff;
  outline: none;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.065);
  padding: 15px 16px;
  font-size: 14px;
  font-family: inherit;
  transition: .25s ease;
}

.form-group textarea {
  resize: vertical;
  min-height: 125px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255,255,255,.38);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: rgba(229,9,20,.75);
  box-shadow: 0 0 0 4px rgba(229,9,20,.12);
}

.form-group select option {
  background: #11131a;
  color: #fff;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.submit-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.submit-panel h3 {
  margin: 0;
}

.submit-panel p {
  color: var(--muted);
  margin: 8px 0 0;
  line-height: 1.6;
}

.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.form-actions button {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
}

@media(max-width: 900px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .submit-panel {
    flex-direction: column;
    align-items: flex-start;
  }
}
.filter-bar {
  display: grid;
  grid-template-columns: 1.6fr .8fr auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 22px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.09);
}

.filter-field label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.filter-field input,
.filter-field select {
  width: 100%;
  height: 48px;
  color: #fff;
  outline: none;
  border-radius: 15px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.065);
  padding: 0 15px;
  font-family: inherit;
}

.filter-field input::placeholder {
  color: rgba(255,255,255,.38);
}

.filter-field select option {
  background: #11131a;
  color: #fff;
}

.filter-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-actions button {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
}

.parcels-table td {
  vertical-align: top;
}

.table-sub {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
  line-height: 1.4;
}

.table-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 31px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 12px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,.10);
  transition: .2s ease;
}

.action-btn:hover {
  transform: translateY(-2px);
}

.view-btn {
  color: var(--info);
  background: rgba(30,167,255,.12);
}

.edit-btn {
  color: var(--warning);
  background: rgba(255,159,26,.12);
}

.delete-btn {
  color: #ff7b84;
  background: rgba(229,9,20,.13);
}

@media(max-width: 900px) {
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .filter-actions {
    justify-content: flex-start;
  }
}

.tracking-search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: end;
}

.tracking-search-form .btn-red {
  border: none;
  cursor: pointer;
  font-family: inherit;
  height: 50px;
}

.tracking-search-input {
  margin-bottom: 0;
}

.parcel-overview {
  padding: 25px;
  border-radius: 26px;
  margin-top: 18px;
  margin-bottom: 18px;
}

.parcel-overview-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.parcel-overview h2 {
  margin: 0 0 12px;
  font-size: 31px;
}

.parcel-info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.info-card {
  padding: 18px;
  border-radius: 19px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
}

.info-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.info-card strong {
  display: block;
  font-size: 15px;
  line-height: 1.4;
}

.info-card small {
  display: block;
  color: var(--muted);
  margin-top: 7px;
}

.tracking-update-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 18px;
}

.compact-submit {
  margin-top: 8px;
}

.mini-timeline {
  position: relative;
}

.mini-timeline-item {
  position: relative;
  display: flex;
  gap: 14px;
  padding: 0 0 22px;
}

.mini-timeline-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 22px;
  bottom: 0;
  width: 1px;
  background: rgba(255,255,255,.14);
}

.mini-timeline-item > span {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 22px rgba(229,9,20,.55);
  flex: 0 0 auto;
  margin-top: 2px;
}

.mini-timeline-item strong {
  display: block;
}

.mini-timeline-item small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
}

.mini-timeline-item p {
  margin: 9px 0 0;
  color: rgba(255,255,255,.72);
  line-height: 1.5;
}

@media(max-width: 1100px) {
  .parcel-info-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tracking-update-grid {
    grid-template-columns: 1fr;
  }
}

@media(max-width: 700px) {
  .tracking-search-form {
    grid-template-columns: 1fr;
  }

  .parcel-info-grid {
    grid-template-columns: 1fr;
  }

  .parcel-overview-head {
    flex-direction: column;
  }
}

.history-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.tracking-history-grid {
  display: grid;
  grid-template-columns: 1.25fr .95fr;
  gap: 18px;
  margin-top: 18px;
}

.history-panel {
  padding: 24px;
  border-radius: 26px;
}

.history-timeline {
  position: relative;
}

.history-timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 15px;
  padding-bottom: 24px;
}

.history-timeline-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 28px;
  bottom: -2px;
  width: 2px;
  border-radius: 10px;
  background: rgba(255,255,255,.13);
}

.timeline-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 0 20px rgba(255,255,255,.08);
}

.history-timeline-item.latest .timeline-dot {
  background: var(--red);
  border-color: rgba(229,9,20,.55);
  box-shadow: 0 0 28px rgba(229,9,20,.65);
}

.timeline-content {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.09);
}

.timeline-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.timeline-top strong {
  display: inline-block;
  margin-right: 8px;
}

.timeline-top small {
  color: var(--muted);
  white-space: nowrap;
}

.timeline-content p {
  color: rgba(255,255,255,.74);
  line-height: 1.6;
  margin: 13px 0;
}

.timeline-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.timeline-meta span {
  font-size: 12px;
  color: var(--muted);
  padding: 7px 10px;
  border-radius: 11px;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.08);
}

.audit-list {
  display: grid;
  gap: 13px;
}

.audit-item {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.09);
}

.audit-item strong {
  display: block;
}

.audit-item small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
  margin-bottom: 13px;
}

.hash-row {
  display: grid;
  grid-template-columns: 75px 1fr;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.hash-row span {
  color: var(--muted);
  font-size: 12px;
}

.hash-row code {
  display: block;
  color: #b8ffd9;
  background: rgba(0,210,106,.09);
  border: 1px solid rgba(0,210,106,.16);
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
  overflow-wrap: anywhere;
}

@media(max-width: 1100px) {
  .tracking-history-grid {
    grid-template-columns: 1fr;
  }
}

@media(max-width: 700px) {
  .timeline-top {
    flex-direction: column;
  }

  .timeline-top small {
    white-space: normal;
  }

  .history-actions {
    flex-direction: column;
    width: 100%;
  }

  .history-actions a {
    width: 100%;
  }
}

.public-main {
  width: min(1180px, 92%);
  margin: 0 auto;
  padding: 42px 0;
}

.public-hero {
  min-height: 390px;
  border-radius: 34px;
  padding: 42px;
  display: grid;
  grid-template-columns: 1.4fr .7fr;
  gap: 30px;
  align-items: center;
  margin-bottom: 22px;
}

.public-hero h1 {
  font-size: 50px;
  margin: 55px 0 14px;
}

.public-hero p {
  color: var(--muted);
  max-width: 650px;
  line-height: 1.7;
}

.public-track-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  margin-top: 28px;
  max-width: 760px;
}

.public-track-form input {
  height: 54px;
  color: #fff;
  outline: none;
  border-radius: 17px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.065);
  padding: 0 18px;
  font-family: inherit;
}

.public-track-form input::placeholder {
  color: rgba(255,255,255,.38);
}

.public-track-form button {
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.public-side-card {
  padding: 28px;
  border-radius: 26px;
  background: rgba(0,0,0,.23);
  border: 1px solid rgba(255,255,255,.13);
}

.public-side-card strong,
.public-side-card small {
  display: block;
}

.public-side-card small {
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.6;
}

.public-alert {
  margin-top: 20px;
}

.public-history {
  margin-top: 18px;
}

@media(max-width: 850px) {
  .public-hero {
    grid-template-columns: 1fr;
    padding: 28px;
  }

  .public-hero h1 {
    font-size: 36px;
    margin-top: 38px;
  }

  .public-track-form {
    grid-template-columns: 1fr;
  }
}

.station-active {
  background: rgba(0,210,106,.15);
  color: var(--success);
}

.station-inactive {
  background: rgba(229,9,20,.16);
  color: #ff7b84;
}

.table-actions form button {
  font-family: inherit;
  cursor: pointer;
}

.payment-note {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255,159,26,.10);
  border: 1px solid rgba(255,159,26,.22);
  color: rgba(255,255,255,.78);
  line-height: 1.5;
}

.payment-note strong {
  display: block;
  color: var(--warning);
  margin-bottom: 5px;
}

.payment-note span {
  display: block;
  color: var(--muted);
}

.print-btn {
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.receipt-box {
  width: min(760px, 100%);
  margin: 0 auto 40px;
}

.receipt-card {
  background: #fff;
  color: #111;
  border-radius: 22px;
  padding: 32px;
  box-shadow: 0 30px 90px rgba(0,0,0,.35);
}

.receipt-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.receipt-header h2 {
  margin: 0;
  font-size: 36px;
  letter-spacing: 1px;
}

.receipt-header h2 span {
  color: #e50914;
}

.receipt-header p {
  margin: 6px 0 0;
  font-size: 11px;
  letter-spacing: 4px;
  color: #555;
}

.receipt-meta {
  text-align: right;
}

.receipt-meta strong,
.receipt-meta small {
  display: block;
}

.receipt-meta small {
  margin-top: 6px;
  color: #555;
}

.receipt-line {
  height: 3px;
  margin: 24px 0;
  border-radius: 20px;
  background: linear-gradient(90deg, #e50914, #111);
}

.receipt-main,
.receipt-payment {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.receipt-main div,
.receipt-payment div {
  background: #f5f5f5;
  border: 1px solid #e3e3e3;
  padding: 14px;
  border-radius: 14px;
}

.receipt-main span,
.receipt-payment span {
  display: block;
  font-size: 12px;
  color: #666;
  margin-bottom: 6px;
}

.receipt-section {
  margin-top: 22px;
}

.receipt-section h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.receipt-section p {
  margin: 0;
  font-weight: 700;
  line-height: 1.5;
}

.receipt-section small {
  display: block;
  color: #666;
  margin-top: 4px;
}

.receipt-footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px dashed #999;
}

.receipt-footer p {
  color: #555;
  line-height: 1.5;
}

.signature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 35px;
  margin-top: 35px;
}

.signature-row div {
  padding-top: 35px;
  border-top: 1px solid #111;
  color: #555;
  font-size: 13px;
}

@media print {
  body {
    background: #fff !important;
  }

  .no-print,
  .sidebar,
  .topbar,
  .dashboard-bg {
    display: none !important;
  }

  .main {
    margin-left: 0 !important;
    padding: 0 !important;
  }

  .receipt-box {
    width: 100% !important;
    margin: 0 !important;
  }

  .receipt-card {
    box-shadow: none !important;
    border-radius: 0 !important;
  }

  @page {
    margin: 12mm;
  }
}

.payment-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.payment-status {
  display: inline-flex;
  margin-top: 5px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.payment-paid {
  background: rgba(31, 214, 126, .16);
  color: #66ffb0;
  border: 1px solid rgba(31, 214, 126, .32);
}

.payment-pending {
  background: rgba(255, 159, 26, .16);
  color: #ffd18a;
  border: 1px solid rgba(255, 159, 26, .32);
}

.intransit-panel {
  margin-top: 24px;
  padding: 26px;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: center;
  overflow: hidden;
}

.intransit-text h2 {
  margin: 8px 0 10px;
  color: #fff;
}

.intransit-text p {
  color: var(--muted);
  line-height: 1.5;
}

.intransit-text strong {
  color: #fff;
}

.eta-countdown {
  display: inline-flex;
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(229,9,20,.14);
  border: 1px solid rgba(229,9,20,.35);
  color: #fff;
  font-weight: 800;
  letter-spacing: .5px;
}

.tracking-truck-scene {
  position: relative;
  height: 170px;
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 60%, rgba(229,9,20,.22), transparent 48%),
    linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.12);
}

.tracking-truck-scene img {
  position: absolute;
  width: 250px;
  right: 35px;
  bottom: 32px;
  z-index: 3;
  animation: truckFloat 2.4s ease-in-out infinite;
  filter:
    drop-shadow(0 18px 25px rgba(0,0,0,.65))
    drop-shadow(0 0 18px rgba(229,9,20,.35));
}

.road-line {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 28px;
  height: 4px;
  border-radius: 30px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
}

.speed-line {
  position: absolute;
  height: 3px;
  border-radius: 20px;
  background: linear-gradient(90deg, transparent, rgba(229,9,20,.95), transparent);
  animation: speedMove 1.5s linear infinite;
}

.speed-one {
  width: 190px;
  left: 20px;
  top: 58px;
}

.speed-two {
  width: 140px;
  left: 55px;
  top: 88px;
  animation-delay: .25s;
  opacity: .65;
}

.speed-three {
  width: 110px;
  left: 95px;
  top: 120px;
  animation-delay: .45s;
  opacity: .45;
}

@keyframes truckFloat {
  0%, 100% {
    transform: translateY(0) translateX(0);
  }

  50% {
    transform: translateY(-5px) translateX(8px);
  }
}

@keyframes speedMove {
  0% {
    transform: translateX(-40px);
    opacity: 0;
  }

  30% {
    opacity: .9;
  }

  100% {
    transform: translateX(180px);
    opacity: 0;
  }
}

@media(max-width: 850px) {
  .intransit-panel {
    grid-template-columns: 1fr;
  }

  .tracking-truck-scene {
    height: 150px;
  }

  .tracking-truck-scene img {
    width: 220px;
    right: 25px;
  }
}

.chart-card {
    min-height: 360px;
}

.chart-box {
    position: relative;
    height: 260px;
    width: 100%;
}

.map-panel {
    min-height: 520px;
}

.dashboard-map {
    width: 100%;
    height: 420px;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(0,0,0,.28);
}

.map-note {
    margin-top: 12px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .dashboard-map {
        height: 320px;
    }
}

.public-map-panel {
    margin-top: 24px;
    padding: 24px;
    border-radius: 28px;
}

.public-tracking-map {
    width: 100%;
    height: 420px;
    margin-top: 18px;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(0,0,0,.25);
}

@media (max-width: 768px) {
    .public-tracking-map {
        height: 320px;
    }
}

/* Dashboard complete chart layout additions. */
.chart-card {
  min-height: 380px;
}

.chart-box {
  position: relative;
  height: 285px;
  width: 100%;
}

.map-panel {
  min-height: 545px;
}

.dashboard-map {
  width: 100%;
  height: 430px;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.28);
}

.dashboard-map.map-empty::after {
  content: "No in-transit parcels with station coordinates available.";
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--muted);
  text-align: center;
  padding: 20px;
}

.map-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .chart-box {
    height: 250px;
  }

  .dashboard-map {
    height: 320px;
  }
}
