/* =============================================
   ShipHawkr — Custom Stylesheet
   ============================================= */

/* Sidebar */
.sidebar {
  min-height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  overflow-y: auto;
  transition: transform 0.25s ease;
}
.sidebar .sidebar-brand {
  padding: 1.25rem 1.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.sidebar .nav-link {
  padding: 0.55rem 1.25rem;
  font-size: 0.875rem;
  border-radius: 6px;
  margin: 2px 8px;
  transition: background 0.15s, color 0.15s;
}
.sidebar .nav-link:hover {
  background: rgba(255,255,255,0.08);
}
.sidebar .nav-link.active {
  background: rgba(255,255,255,0.15);
  font-weight: 600;
}
.sidebar .nav-link i {
  width: 18px;
  text-align: center;
}

/* Collapsible sidebar caret */
.sidebar-caret {
  transition: transform 0.2s ease;
  font-size: 10px;
}
a[aria-expanded="true"] .sidebar-caret {
  transform: rotate(180deg);
}

/* Main content offset for sidebar */
.main-content {
  margin-left: 240px;
  min-height: 100vh;
}
@media (max-width: 767.98px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.show {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
}

/* Top Navbar */
.top-navbar {
  height: 60px;
  border-bottom: 1px solid #e9ecef;
  position: sticky;
  top: 0;
  z-index: 999;
  background: #fff;
}

/* Timeline (tracking page) */
.timeline {
  position: relative;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: #dee2e6;
}
.timeline-item {
  position: relative;
  padding-bottom: 1.25rem;
}
.timeline-dot {
  position: absolute;
  left: -1.6rem;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #dee2e6;
}
.timeline-item.active .timeline-dot {
  box-shadow: 0 0 0 3px #0d6efd55;
  width: 16px;
  height: 16px;
  left: -1.65rem;
  top: 3px;
}
.timeline-content {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 0.75rem 1rem;
}
.timeline-item.active .timeline-content {
  background: #e8f0fe;
  border-left: 3px solid #0d6efd;
}

/* Status badges override */
.badge-status-pending     { background-color: #6c757d; }
.badge-status-picked      { background-color: #0dcaf0; }
.badge-status-in_transit  { background-color: #0d6efd; }
.badge-status-out_for_delivery { background-color: #ffc107; color:#000; }
.badge-status-delivered   { background-color: #198754; }
.badge-status-rto         { background-color: #dc3545; }
.badge-status-lost        { background-color: #212529; }
.badge-status-cancelled   { background-color: #adb5bd; }

/* Font monospace override */
.font-monospace {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.875em;
}

/* Card hover lift */
.card-lift {
  transition: transform 0.15s, box-shadow 0.15s;
}
.card-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08) !important;
}

/* Auto-dismiss flash */
.alert-auto-dismiss {
  animation: fadeOut 0.5s ease forwards 4s;
}
@keyframes fadeOut {
  to { opacity: 0; pointer-events: none; }
}

/* ── Page layouts ── */
.page-dark {
  background: #1a1d23;
}

/* ── Sidebar dimensions ── */
.master-sidebar {
  width: 250px;
  min-width: 250px;
  min-height: 100vh;
  overflow-y: auto;
}
.tenant-sidebar {
  width: 240px;
  min-width: 240px;
  min-height: 100vh;
}
.sidebar-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.sidebar-brand-icon {
  width: 36px;
  height: 36px;
}
.sidebar-icon-fw {
  width: 18px;
  text-align: center;
}
.sidebar-logo {
  height: 32px;
  max-width: 80px;
  object-fit: contain;
}
.master-sidebar-avatar {
  width: 34px;
  height: 34px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.15);
}

/* ── Avatars ── */
.avatar-sm {
  width: 34px;
  height: 34px;
  font-size: 13px;
}
.avatar-xs {
  width: 32px;
  height: 32px;
  font-size: 13px;
}

/* ── Icon boxes ── */
.icon-box {
  width: 40px;
  height: 40px;
}
.store-icon {
  width: 40px;
  height: 40px;
  font-size: 18px;
}

/* ── Payment gateway brand colors ── */
.gw-razorpay  { background: #2d81f7; }
.gw-payu      { background: #f26522; }
.gw-ccavenue  { background: #c01818; }

/* ── Settings / branding ── */
.store-logo {
  height: 56px;
  max-width: 180px;
  object-fit: contain;
}
.store-logo-placeholder {
  width: 56px;
  height: 56px;
  font-size: 22px;
  flex-shrink: 0;
}
.card-dark {
  background: #252830;
}

/* ── Tracking public pages ── */
.tracking-header {
  background: #fff;
  border-bottom: 1px solid #e9ecef;
}
.timeline-event-dot {
  width: 36px;
  height: 36px;
  min-width: 36px;
}

/* ── Table utilities ── */
.cell-truncate {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Filter pills (status tabs) ── */
.filter-pill {
  font-size: 13px;
  padding: 6px 12px;
}

/* ── Scrollable containers ── */
.scroll-box {
  max-height: 300px;
  overflow-y: auto;
}

/* ── Misc ── */
.cursor-pointer {
  cursor: pointer;
}

/* ── Sidebar text sizes ── */
.sidebar-brand-name { font-size: 14px; }
.sidebar-sub-icon   { font-size: 11px; }

/* ── Badge extra-small ── */
.badge-xs { font-size: 9px !important; }

/* ── Impersonation / banner bar ── */
.impersonation-bar { font-size: 13px; }

/* ── Powered-by / helper small text ── */
.powered-by-text { font-size: 10px; }

/* ── Decorative icon extra-small ── */
.icon-xs { font-size: 10px; }

/* ── Typography utilities ── */
.text-xs  { font-size: 10px; }
.fs-12    { font-size: 12px; }

/* ── Progress bar height variants ── */
.progress-xs { height: 6px; }
.progress-5  { height: 5px; }
.progress-sm { height: 8px; }

/* ── Chart canvas constraint ── */
.canvas-chart { max-height: 280px; }

/* ── Input group minimum width ── */
.input-group-min { min-width: 260px; }

/* ── Large icon badge (marketplace / ecommerce) ── */
.badge-icon { font-size: 1.1rem; }

/* ── Truncated link ── */
.link-truncate-sm {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Narrow table cell (reference IDs etc.) ── */
.cell-sm {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Form container max-width ── */
.container-max-md { max-width: 700px; }

/* ── Brand purple colour ── */
.text-purple { color: #7c3aed; }

/* ── 8px decorative dot icon ── */
.icon-8 { font-size: 8px; }

/* ── Fixed-width utilities for rating bars ── */
.w-20 { width: 20px; flex-shrink: 0; }
.w-30 { width: 30px; flex-shrink: 0; }
