/* ===================== ROOT VARIABLES ===================== */
:root {
  --red: #e01c2c;
  --red-dark: #b51525;
  --red-light: #f8d7da;
  --gray-bg: #f5f6fa;
  --white: #fff;
  --text: #222;
  --text-muted: #6c757d;
  --border: #e5e7eb;
  --sidebar-w: 240px;
  --font: 'Cairo', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--text); background: var(--gray-bg); direction: rtl; }

/* ===================== BUTTONS ===================== */
.btn-red {
  background: var(--red); color: #fff; border: none; border-radius: 8px;
  padding: .5rem 1.3rem; font-family: var(--font); font-weight: 700;
  font-size: .93rem; cursor: pointer; transition: background .2s, transform .1s;
}
.btn-red:hover { background: var(--red-dark); transform: translateY(-1px); }
.btn-outline-red {
  background: transparent; color: var(--red); border: 2px solid var(--red);
  border-radius: 8px; padding: .45rem 1.2rem; font-family: var(--font);
  font-weight: 700; font-size: .93rem; cursor: pointer; transition: all .2s;
}
.btn-outline-red:hover { background: var(--red); color: #fff; }

/* ===================== PUBLIC NAVBAR ===================== */
.pub-nav {
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  position: sticky; top: 0; z-index: 1000;
  padding: 0 2rem;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.pub-nav .logo { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.pub-nav .logo-icon {
  width: 44px; height: 44px; background: var(--red); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.pub-nav .logo-icon i { color: #fff; font-size: 1.3rem; }
.pub-nav .logo-text { font-weight: 900; font-size: 1.3rem; color: var(--red); line-height: 1; }
.pub-nav .logo-text small { display: block; font-size: .62rem; color: #555; font-weight: 500; }
.pub-nav .nav-links { display: flex; align-items: center; gap: 2rem; list-style: none; }
.pub-nav .nav-links a { text-decoration: none; color: var(--text); font-weight: 600; font-size: .93rem; transition: color .2s; }
.pub-nav .nav-links a:hover,
.pub-nav .nav-links a.active { color: var(--red); }
.pub-nav .nav-actions { display: flex; gap: .7rem; }

/* ===================== HOME PAGE ===================== */
.hero {
  background: linear-gradient(135deg, #fff 50%, #fef2f3 100%);
  padding: 5rem 0 3rem;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -80px; left: -80px;
  width: 350px; height: 350px; background: rgba(224,28,44,.06); border-radius: 50%;
}
.hero-title { font-size: 3.5rem; font-weight: 900; line-height: 1.15; color: var(--text); }
.hero-title span { color: var(--red); }
.hero-sub { font-size: 1.1rem; color: #555; margin: 1rem 0 2rem; line-height: 1.8; max-width: 440px; }

.truck-placeholder {
  width: 100%; max-width: 520px; height: 280px;
  background: linear-gradient(135deg, #e01c2c 0%, #b51525 100%);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.truck-placeholder::before {
  content: ''; position: absolute;
  width: 200px; height: 200px; background: rgba(255,255,255,.08);
  border-radius: 50%; top: -60px; right: -60px;
}
.truck-placeholder i { font-size: 6rem; color: rgba(255,255,255,.9); }

.features-bar { background: var(--red); padding: 2rem 0; }
.feat-item { display: flex; align-items: center; gap: .8rem; color: #fff; }
.feat-item i { font-size: 1.5rem; opacity: .9; }
.feat-item h6 { font-weight: 700; margin: 0; font-size: .95rem; }
.feat-item p { margin: 0; font-size: .8rem; opacity: .85; }

.stats-bar { background: #222; padding: 1.5rem 0; }
.stat-item { text-align: center; color: #fff; }
.stat-item .num { font-size: 2rem; font-weight: 900; color: var(--red); }
.stat-item .lbl { font-size: .85rem; opacity: .75; }

/* ===================== AUTH PAGES ===================== */
#page-login.active,
#page-register.active {
  display: flex !important;
  align-items: stretch;
  min-height: 100vh;
}

.auth-left {
  background: linear-gradient(160deg, var(--red) 0%, var(--red-dark) 100%);
  width: 42%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 3rem;
  position: relative; overflow: hidden;
}
.auth-left::before {
  content: ''; position: absolute;
  width: 300px; height: 300px; background: rgba(255,255,255,.07);
  border-radius: 50%; bottom: -80px; left: -80px;
}
.auth-left .auth-title { color: #fff; font-weight: 900; font-size: 1.8rem; text-align: center; margin-bottom: .5rem; }
.auth-left .auth-sub { color: rgba(255,255,255,.8); text-align: center; font-size: .95rem; line-height: 1.7; }
.auth-left .auth-illustration {
  width: 220px; height: 180px; background: rgba(255,255,255,.1);
  border-radius: 20px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.5rem;
}
.auth-left .auth-illustration i { font-size: 5rem; color: rgba(255,255,255,.9); }
.auth-right { flex: 1; display: flex; align-items: center; justify-content: center; background: #fff; padding: 3rem; }
.auth-form-box { width: 100%; max-width: 420px; }
.auth-form-box h2 { font-weight: 900; font-size: 1.9rem; margin-bottom: .3rem; }
.auth-divider { width: 50px; height: 4px; background: var(--red); border-radius: 2px; margin-bottom: 2rem; }
.form-label { font-weight: 700; font-size: .88rem; margin-bottom: .4rem; }
.form-control {
  border: 1.5px solid var(--border); border-radius: 10px;
  padding: .65rem 1rem; font-family: var(--font); font-size: .93rem;
  transition: border-color .2s, box-shadow .2s;
}
.form-control:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(224,28,44,.1); outline: none; }
.input-icon { position: relative; }
.input-icon i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--red); }
.input-icon .form-control { padding-right: 2.5rem; }
.auth-link { color: var(--red); font-weight: 700; cursor: pointer; text-decoration: none; }
.auth-link:hover { text-decoration: underline; }

/* ===================== TRACK PAGE ===================== */
.track-hero { background: var(--gray-bg); padding: 3rem 0 2rem; text-align: center; }
.track-hero h1 { font-weight: 900; font-size: 2.2rem; }
.track-hero p { color: #666; margin-top: .5rem; }
.track-input-box {
  display: flex; max-width: 560px; margin: 1.5rem auto 0;
  box-shadow: 0 4px 20px rgba(0,0,0,.1); border-radius: 12px; overflow: hidden;
}
.track-input-box input {
  flex: 1; padding: .85rem 1.2rem; border: none; font-family: var(--font);
  font-size: 1rem; outline: none; background: #fff;
}
.track-input-box button { border-radius: 0 12px 12px 0; padding: .85rem 2rem; white-space: nowrap; }

.track-result {
  max-width: 780px; margin: 2rem auto;
  background: #fff; border-radius: 16px;
  border: 1.5px solid var(--border);
  padding: 2rem; box-shadow: 0 4px 20px rgba(0,0,0,.06);
}
.track-result .shipment-id { font-weight: 900; color: var(--red); font-size: 1.1rem; }

.track-status-badge {
  background: #fff3cd; color: #856404;
  border-radius: 20px; padding: .3rem .9rem; font-size: .82rem; font-weight: 700;
}
.track-status-badge.on-way { background: #cfe2ff; color: #084298; }
.track-status-badge.delivered { background: #d1e7dd; color: #0a3622; }
.track-status-badge.cancelled { background: #f8d7da; color: #842029; }

.timeline {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin: 1.5rem 0; position: relative; padding: 0 1rem;
}
.timeline::before {
  content: ''; position: absolute; top: 20px; right: 60px; left: 60px;
  height: 3px; background: #e5e7eb; z-index: 0;
}
.tl-item { flex: 1; text-align: center; position: relative; z-index: 1; }
.tl-icon {
  width: 42px; height: 42px; border-radius: 50%;
  background: #e5e7eb; display: flex; align-items: center; justify-content: center;
  margin: 0 auto .5rem; font-size: 1.1rem; color: #aaa;
}
.tl-icon.done { background: var(--red); color: #fff; }
.tl-icon.active { background: #fff; border: 3px solid var(--red); color: var(--red); }
.tl-label { font-size: .78rem; font-weight: 700; color: #555; }
.tl-date { font-size: .7rem; color: #999; }

.track-details { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 1.5rem; }
.detail-box { background: var(--gray-bg); border-radius: 12px; padding: 1.2rem; }
.detail-box h6 { font-weight: 800; margin-bottom: .8rem; font-size: .92rem; }
.detail-row { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; font-size: .88rem; }
.detail-row i { color: var(--red); width: 16px; }

/* ===================== DASHBOARD LAYOUT ===================== */
.dash-wrap { display: flex; min-height: 100vh; background: var(--gray-bg); }

.sidebar {
  width: var(--sidebar-w); background: #fff;
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto; flex-shrink: 0;
}
.sidebar-logo {
  padding: 1.2rem 1.5rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: .7rem; cursor: pointer;
}
.sidebar-logo .s-logo-icon {
  width: 36px; height: 36px; background: var(--red); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.sidebar-logo .s-logo-icon i { color: #fff; font-size: 1rem; }
.sidebar-logo .s-logo-text { font-weight: 900; color: var(--red); font-size: 1.1rem; line-height: 1.1; }
.sidebar-logo .s-logo-text small { display: block; font-size: .6rem; color: #777; font-weight: 500; }
.sidebar nav { flex: 1; padding: 1rem 0; }
.sidebar nav a {
  display: flex; align-items: center; gap: .75rem;
  padding: .7rem 1.5rem; text-decoration: none; color: #555;
  font-weight: 600; font-size: .9rem; transition: all .2s;
  border-right: 3px solid transparent; margin-bottom: 2px;
}
.sidebar nav a i { width: 20px; text-align: center; font-size: 1rem; }
.sidebar nav a:hover { background: #fef2f3; color: var(--red); }
.sidebar nav a.active { background: #fef2f3; color: var(--red); border-right-color: var(--red); }
.sidebar-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); }
.sidebar-footer a {
  display: flex; align-items: center; gap: .7rem;
  color: #888; font-size: .88rem; font-weight: 600;
  text-decoration: none; padding: .5rem 0;
}
.sidebar-footer a:hover { color: var(--red); }

.dash-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dash-topbar {
  background: #fff; border-bottom: 1px solid var(--border);
  padding: .9rem 2rem; display: flex; align-items: center;
  justify-content: space-between; position: sticky; top: 0; z-index: 100;
}
.dash-topbar .breadcrumb { margin: 0; font-size: .88rem; }
.breadcrumb-item a { color: #888; text-decoration: none; }
.breadcrumb-item.active { color: var(--text); font-weight: 700; }
.user-info { display: flex; align-items: center; gap: .8rem; }
.user-avatar {
  width: 36px; height: 36px; background: var(--red); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700;
}
.user-name { font-weight: 700; font-size: .88rem; }
.user-role { font-size: .75rem; color: #888; }
.notif-btn { position: relative; background: none; border: none; cursor: pointer; font-size: 1.2rem; color: #555; }
.notif-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--red); color: #fff; border-radius: 50%;
  width: 16px; height: 16px; font-size: .6rem;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}

.dash-content { padding: 1.8rem 2rem; flex: 1; }
.page-title { font-weight: 900; font-size: 1.5rem; margin-bottom: 1.5rem; }

/* ===================== STAT CARDS ===================== */
.stat-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; margin-bottom: 1.8rem; }
.stat-card {
  background: #fff; border-radius: 14px; padding: 1.2rem 1rem;
  border: 1px solid var(--border); display: flex; align-items: center;
  gap: .9rem; box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.stat-card-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0;
}
.stat-card-icon.red    { background: #fef2f3; color: var(--red); }
.stat-card-icon.blue   { background: #eff6ff; color: #2563eb; }
.stat-card-icon.green  { background: #f0fdf4; color: #16a34a; }
.stat-card-icon.yellow { background: #fffbeb; color: #d97706; }
.stat-card-icon.purple { background: #faf5ff; color: #7c3aed; }
.stat-card-num { font-size: 1.6rem; font-weight: 900; line-height: 1; }
.stat-card-lbl { font-size: .78rem; color: #888; font-weight: 600; margin-top: .15rem; }
.stat-card-pct { font-size: .75rem; font-weight: 700; margin-top: .2rem; }
.stat-card-pct.up   { color: #16a34a; }
.stat-card-pct.down { color: var(--red); }
.stat-card-pct.warn { color: #d97706; }

/* ===================== FILTER BAR ===================== */
.filter-bar {
  background: #fff; border-radius: 14px; padding: 1.2rem 1.5rem;
  border: 1px solid var(--border); margin-bottom: 1.5rem;
}
.filter-row { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.filter-field { display: flex; flex-direction: column; gap: .35rem; min-width: 160px; flex: 1; }
.filter-field label { font-size: .8rem; font-weight: 700; color: #555; }
.filter-field input,
.filter-field select {
  padding: .5rem .9rem; border: 1.5px solid var(--border);
  border-radius: 9px; font-family: var(--font); font-size: .88rem;
  background: #fff; color: var(--text); outline: none;
}
.filter-field input:focus,
.filter-field select:focus { border-color: var(--red); }
.filter-field.search-field { flex: 2; }
.filter-actions { display: flex; gap: .7rem; align-items: flex-end; }

/* ===================== TABLE ===================== */
.table-box {
  background: #fff; border-radius: 14px;
  border: 1px solid var(--border); overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.table-header {
  padding: 1rem 1.5rem; display: flex; align-items: center;
  justify-content: space-between; border-bottom: 1px solid var(--border);
}
.table-header h5 { font-weight: 800; margin: 0; }
.table-actions { display: flex; gap: .7rem; align-items: center; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table thead th {
  background: var(--red); color: #fff; padding: .8rem 1rem;
  font-size: .82rem; font-weight: 700; text-align: right; white-space: nowrap;
}
.data-table tbody tr { border-bottom: 1px solid #f0f0f0; transition: background .15s; }
.data-table tbody tr:hover { background: #fef9f9; }
.data-table tbody td { padding: .75rem 1rem; font-size: .88rem; vertical-align: middle; }

.badge-status {
  padding: .28rem .8rem; border-radius: 20px; font-size: .75rem;
  font-weight: 700; display: inline-block; white-space: nowrap;
}
.badge-status.delivered  { background: #d1e7dd; color: #0a3622; }
.badge-status.on-way     { background: #cfe2ff; color: #084298; }
.badge-status.processing { background: #fff3cd; color: #664d03; }
.badge-status.cancelled  { background: #f8d7da; color: #842029; }
.badge-status.active     { background: #d1e7dd; color: #0a3622; }
.badge-status.inactive   { background: #f8d7da; color: #842029; }

.action-btns { display: flex; gap: .4rem; }
.action-btns button {
  width: 30px; height: 30px; border: 1.5px solid var(--border);
  border-radius: 7px; background: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; color: #555; transition: all .15s;
}
.action-btns button:hover { background: var(--red); color: #fff; border-color: var(--red); }

.table-footer {
  padding: .8rem 1.5rem; display: flex; align-items: center;
  justify-content: space-between; border-top: 1px solid var(--border);
  background: #fafafa;
}
.table-footer .info { font-size: .82rem; color: #888; }
.pagination-custom { display: flex; gap: .35rem; }
.pagination-custom button {
  width: 32px; height: 32px; border: 1.5px solid var(--border);
  border-radius: 7px; background: #fff; cursor: pointer;
  font-family: var(--font); font-size: .82rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  color: #555; transition: all .15s;
}
.pagination-custom button.active { background: var(--red); color: #fff; border-color: var(--red); }
.pagination-custom button:hover:not(.active) { border-color: var(--red); color: var(--red); }
.per-page-select {
  padding: .3rem .6rem; border: 1.5px solid var(--border);
  border-radius: 7px; font-family: var(--font); font-size: .82rem; font-weight: 700;
  background: #fff; color: var(--text); cursor: pointer; outline: none;
}

/* ===================== AGENT FORM ===================== */
.form-section {
  background: #fff; border-radius: 14px; padding: 1.8rem;
  border: 1px solid var(--border); margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.form-section-title { font-weight: 900; color: var(--red); font-size: 1.05rem; margin-bottom: 1.3rem; }
.photo-upload {
  width: 170px; height: 170px; border: 2px dashed #d0d0d0;
  border-radius: 14px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; cursor: pointer;
  transition: border-color .2s; background: #fafafa;
}
.photo-upload:hover { border-color: var(--red); }
.photo-upload i { font-size: 2.5rem; color: var(--red); margin-bottom: .5rem; }
.photo-upload span { font-size: .78rem; color: #888; text-align: center; line-height: 1.4; }

/* ===================== MODALS ===================== */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 2000;
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: #fff; border-radius: 16px; padding: 2rem;
  max-width: 520px; width: 95%; box-shadow: 0 20px 60px rgba(0,0,0,.2);
  animation: modalIn .2s ease;
}
@keyframes modalIn { from { transform: scale(.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-box h5 { font-weight: 900; font-size: 1.2rem; margin-bottom: 1.2rem; }
.modal-close { float: left; background: none; border: none; font-size: 1.3rem; cursor: pointer; color: #888; }

/* ===================== TOAST ===================== */
.toast-container {
  position: fixed; bottom: 1.5rem; left: 1.5rem;
  z-index: 9999; display: flex; flex-direction: column; gap: .5rem;
}
.toast-msg {
  background: #222; color: #fff; padding: .7rem 1.2rem;
  border-radius: 10px; font-size: .88rem; font-weight: 600;
  animation: toastIn .3s ease; display: flex; align-items: center; gap: .6rem;
}
.toast-msg.success { background: #16a34a; }
.toast-msg.error   { background: var(--red); }
@keyframes toastIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ===================== SEARCH INPUT (agents header) ===================== */
.search-inline {
  padding: .4rem .9rem; border: 1.5px solid var(--border);
  border-radius: 8px; font-family: var(--font); font-size: .85rem; outline: none;
}
.search-inline:focus { border-color: var(--red); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 992px) {
  .stat-cards { grid-template-columns: repeat(3, 1fr); }
  .auth-left  { display: none; }
  .auth-right { padding: 2rem 1rem; }
  .sidebar    { display: none; }
}
@media (max-width: 768px) {
  .hero-title   { font-size: 2.2rem; }
  .stat-cards   { grid-template-columns: repeat(2, 1fr); }
  .track-details { grid-template-columns: 1fr; }
}


/* ===================== PROJECT COMPATIBILITY ===================== */
.brand-name { font-weight:900; color:var(--red); }
.main-alert { border-radius:12px; padding:12px 14px; margin:12px 0; font-weight:700; }
.main-alert.error { background:#fee4e2; color:#b42318; }
.main-alert.success { background:#e8f7ee; color:#168a42; }
.form-control, .form-select { font-family: var(--font); }
.public-page { min-height:100vh; background:var(--gray-bg); }
.pub-section { padding:4rem 0; }
.pub-card { background:#fff; border:1px solid var(--border); border-radius:18px; box-shadow:0 8px 24px rgba(0,0,0,.06); padding:1.4rem; }
.logo a { text-decoration:none; display:flex; align-items:center; gap:8px; }
.footer a { color:inherit; }
.track-result-empty { text-align:center; background:#fff; border:1px solid var(--border); border-radius:16px; padding:2rem; margin:2rem auto; max-width:740px; }
.track-status-badge.created, .track-status-badge.waiting { background:#fff3cd; color:#664d03; }
.track-status-badge.assigned, .track-status-badge.out { background:#cfe2ff; color:#084298; }
.track-status-badge.delivered { background:#d1e7dd; color:#0a3622; }
.track-status-badge.failed { background:#f8d7da; color:#842029; }
.progress-steps .step.pending .step-icon { background:#e5e7eb; color:#777; }
.progress-steps .step.active .step-icon { background:var(--red); color:#fff; }
.timeline .tl-item.pending .tl-dot { background:#ddd; }
.timeline .tl-item.active .tl-dot { background:var(--red); }

@media (max-width: 768px) {
  .pub-nav { height:auto; padding: .8rem 1rem; gap: 12px; flex-wrap: wrap; }
  .pub-nav .nav-links { width:100%; order:3; justify-content:center; flex-wrap:wrap; gap:1rem; padding: .7rem 0 0; }
  .pub-nav .nav-actions { margin-inline-start:auto; }
  .hero-title { font-size:2.2rem; }
}


/* ===================== HOME LOWER SECTIONS / FOOTER THEME PATCH ===================== */
html { scroll-behavior: smooth; }
#services, #prices, #contact { scroll-margin-top: 90px; }
.section-panels {
  background: linear-gradient(180deg, #f5f6fa 0%, #ffffff 100%);
  padding-top: 4.5rem;
  padding-bottom: 4.5rem;
}
.section-head .section-badge {
  display:inline-block;
  padding:.45rem .9rem;
  border-radius:999px;
  background:#fdecef;
  color:var(--red);
  font-weight:800;
  font-size:.82rem;
  margin-bottom:.8rem;
}
.section-head h2 {
  font-size:2rem;
  font-weight:900;
  color:var(--text);
  margin-bottom:.6rem;
}
.section-head p {
  color:var(--text-muted);
  max-width:680px;
  margin:0 auto;
  line-height:1.9;
}
.action-card {
  position:relative;
  overflow:hidden;
  padding:1.8rem;
  min-height:270px;
}
.action-card::before {
  content:'';
  position:absolute;
  width:180px;
  height:180px;
  border-radius:50%;
  background:rgba(224,28,44,.05);
  left:-50px;
  bottom:-60px;
}
.action-card-icon {
  width:60px;
  height:60px;
  border-radius:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.5rem;
  margin-bottom:1rem;
}
.action-card-icon.red-soft { background:#fdecef; color:var(--red); }
.action-card-icon.dark-soft { background:#eef2ff; color:#4338ca; }
.home-track-box {
  display:flex;
  gap:.75rem;
  flex-wrap:wrap;
  margin-top:1rem;
}
.home-track-box .form-control {
  flex:1;
  min-width:200px;
}
.home-track-box .btn-red { min-width:130px; }

.footer {
  background: linear-gradient(135deg, #111827 0%, #0f172a 100%);
  color:#fff;
  margin-top:0;
  position:relative;
  overflow:hidden;
}
.footer::before {
  content:'';
  position:absolute;
  top:-120px;
  left:-80px;
  width:320px;
  height:320px;
  border-radius:50%;
  background:rgba(255,255,255,.04);
}
.footer::after {
  content:'';
  position:absolute;
  bottom:-120px;
  right:-80px;
  width:260px;
  height:260px;
  border-radius:50%;
  background:rgba(224,28,44,.10);
}
.footer-top {
  position:relative;
  z-index:1;
  padding-top:4rem;
  padding-bottom:2.5rem;
}
.footer-cta {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:2rem;
  border:1px solid rgba(255,255,255,.10);
  background:linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border-radius:24px;
  padding:1.6rem 1.7rem;
  margin-bottom:2rem;
  backdrop-filter: blur(8px);
}
.footer-mini {
  display:inline-block;
  color:#fecdd3;
  font-weight:800;
  margin-bottom:.35rem;
}
.footer-cta h3 {
  font-weight:900;
  margin-bottom:.55rem;
}
.footer-cta p {
  color:rgba(255,255,255,.75);
  margin:0;
  line-height:1.9;
}
.footer-cta-actions {
  display:flex;
  gap:.75rem;
  flex-wrap:wrap;
}
.btn-outline-light {
  background:transparent;
  color:#fff;
  border:1.8px solid rgba(255,255,255,.45);
  border-radius:10px;
  padding:.55rem 1.2rem;
  text-decoration:none;
  font-weight:800;
}
.btn-outline-light:hover {
  background:#fff;
  color:#111827;
}
.footer-grid {
  display:grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap:1.5rem;
}
.footer-brand,
.footer-col {
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.08);
  border-radius:20px;
  padding:1.35rem;
}
.footer-logo-box {
  display:flex;
  align-items:center;
  gap:.8rem;
  margin-bottom:1rem;
}
.footer-logo-icon {
  width:52px;
  height:52px;
  border-radius:14px;
  background:var(--red);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.3rem;
}
.footer-brand-title {
  font-weight:900;
  font-size:1.25rem;
}
.logo-sub-footer {
  color:rgba(255,255,255,.65);
  font-size:.82rem;
}
.footer-brand p {
  color:rgba(255,255,255,.75);
  line-height:1.95;
  margin:0;
}
.footer-col h4 {
  font-weight:900;
  margin-bottom:1rem;
  font-size:1.08rem;
}
.footer-col ul {
  list-style:none;
  padding:0;
  margin:0;
}
.footer-col li {
  margin-bottom:.7rem;
  color:rgba(255,255,255,.82);
}
.footer-col a {
  color:rgba(255,255,255,.82);
  text-decoration:none;
  transition:.2s;
}
.footer-col a:hover {
  color:#fff;
  padding-right:4px;
}
.contact-list li {
  display:flex;
  align-items:center;
  gap:.55rem;
}
.contact-list i {
  color:#fca5a5;
  width:16px;
}
.footer-bottom {
  position:relative;
  z-index:1;
  border-top:1px solid rgba(255,255,255,.10);
  padding:1rem 0;
}
.footer-bottom-inner {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  flex-wrap:wrap;
}
.footer-bottom p {
  margin:0;
  color:rgba(255,255,255,.72);
}
.footer-bottom-links {
  display:flex;
  gap:1rem;
  flex-wrap:wrap;
}
.footer-bottom-links a {
  color:rgba(255,255,255,.72);
  text-decoration:none;
}
.footer-bottom-links a:hover { color:#fff; }

@media (max-width: 992px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-cta { flex-direction:column; align-items:flex-start; }
}
@media (max-width: 768px) {
  .section-head h2 { font-size:1.55rem; }
  .footer-grid { grid-template-columns:1fr; }
  .footer-top { padding-top:3rem; }
  .footer-brand, .footer-col { padding:1.1rem; }
  .footer-bottom-inner { flex-direction:column; align-items:flex-start; }
}
/* ===================== FINAL RESPONSIVE PATCH - PUBLIC ===================== */
@media (max-width: 992px) {
  .pub-nav {
    height: auto;
    min-height: 64px;
    padding: .85rem 1rem;
    gap: .8rem;
    flex-wrap: wrap;
  }

  .pub-nav .logo {
    order: 1;
  }

  .pub-nav .nav-actions {
    order: 2;
    margin-inline-start: auto;
  }

  .pub-nav .nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: .75rem;
    margin: 0;
  }

  .hero {
    padding: 3.5rem 0 2.5rem;
    text-align: center;
  }

  .hero-sub {
    margin-left: auto;
    margin-right: auto;
  }

  .truck-placeholder {
    height: 240px;
  }

  .features-bar .feat-item {
    justify-content: flex-start;
  }

  .track-hero-new {
    padding-top: 3rem;
  }

  .auth-card-new,
  .courier-login-card,
  .admin-login-card {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  .pub-nav {
    align-items: center;
  }

  .pub-nav .logo-text {
    font-size: 1.05rem;
  }

  .pub-nav .logo-text small {
    font-size: .55rem;
  }

  .pub-nav .logo-icon {
    width: 38px;
    height: 38px;
  }

  .pub-nav .nav-actions {
    width: 100%;
    order: 4;
    justify-content: center;
  }

  .pub-nav .nav-actions .btn-red,
  .pub-nav .nav-actions .btn-outline-red,
  .pub-nav .nav-actions button {
    flex: 1;
    min-width: 130px;
  }

  .pub-nav .nav-links {
    gap: .75rem;
  }

  .pub-nav .nav-links a {
    font-size: .82rem;
  }

  .hero-title {
    font-size: 2.2rem !important;
  }

  .hero-sub {
    font-size: .95rem;
  }

  .truck-placeholder {
    max-width: 100%;
    height: 210px;
  }

  .truck-placeholder i {
    font-size: 4rem;
  }

  .features-bar {
    padding: 1.4rem 0;
  }

  .feat-item {
    align-items: flex-start;
  }

  .feat-item h6 {
    font-size: .86rem;
  }

  .feat-item p {
    font-size: .72rem;
  }

  .stats-bar .stat-item .num {
    font-size: 1.35rem;
  }

  .stats-bar .stat-item .lbl {
    font-size: .72rem;
  }

  .pub-section,
  .section-panels {
    padding: 2.7rem 0 !important;
  }

  .pub-card,
  .action-card {
    padding: 1.15rem !important;
  }

  .home-track-box {
    flex-direction: column;
  }

  .home-track-box .form-control,
  .home-track-box .btn-red {
    width: 100%;
    max-width: none;
  }

  .track-search-card {
    flex-direction: column;
    padding: .75rem;
  }

  .track-search-card input {
    width: 100%;
  }

  .track-search-card button {
    width: 100%;
  }

  .track-steps {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .track-step {
    padding: .85rem .45rem;
  }

  .step-label {
    font-size: .76rem;
  }

  .track-grid {
    grid-template-columns: 1fr !important;
  }

  .info-row {
    flex-direction: column;
    gap: .25rem;
  }

  .auth-page-new {
    padding: 1rem !important;
  }

  .auth-card-new {
    border-radius: 18px !important;
  }

  .auth-brand-new,
  .auth-form-new {
    padding: 1.35rem !important;
  }

  .auth-brand-new {
    min-height: auto !important;
  }

  .auth-brand-new h1 {
    font-size: 1.65rem !important;
  }

  .auth-brand-features {
    grid-template-columns: 1fr !important;
  }

  .auth-form-title {
    font-size: 1.55rem !important;
  }

  .footer-cta {
    padding: 1.15rem !important;
  }

  .footer-grid {
    grid-template-columns: 1fr !important;
  }

  .footer-bottom-inner {
    align-items: center !important;
    text-align: center;
  }

  .footer-bottom-links {
    justify-content: center;
  }
}

@media (max-width: 420px) {
  .pub-nav .nav-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    text-align: center;
  }

  .pub-nav .nav-actions {
    flex-direction: column;
  }

  .pub-nav .nav-actions .btn-red,
  .pub-nav .nav-actions .btn-outline-red,
  .pub-nav .nav-actions button {
    width: 100%;
  }

  .hero-title {
    font-size: 1.85rem !important;
  }

  .track-steps {
    grid-template-columns: 1fr !important;
  }

  .tracking-number {
    font-size: 1.05rem !important;
    word-break: break-all;
  }
}
