/* =============================================
   Prime Dish - USER PAGES STYLESHEET
============================================= */

/* ---- User Layout ---- */
.user-layout {
  display: flex;
  min-height: calc(100vh - 72px);
  margin-top: 72px;
}

.user-sidebar {
  width: 260px;
  min-width: 260px;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  padding: 24px 12px;
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  overflow-y: auto;
}

.user-profile-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  text-align: center;
}

.user-cell {
  display: flex !important;
  justify-content: space-between;
}

.user-avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-avatar-lg img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid #ff66004d;
  object-fit: center;
}

.user-profile-mini h4 {
  font-size: 15px;
  font-weight: 700;
}

.user-profile-mini span {
  font-size: 12px;
  color: var(--text-muted);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-muted);
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.sidebar-nav a i {
  font-size: 18px;
  width: 20px;
  text-align: center;
}

.sidebar-nav a:hover {
  background: #ff66001a;
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}

.sidebar-nav a.active {
  background: #f4690d1a;
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}

.user-main {
  flex: 1;
  padding: 32px 28px;
}

.user-page-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
}

.user-page-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* ========================================
   Mobile dashboard pill bar (mobile nav)
   Moved from user_base.html <style> to external file
   ======================================== */
.mobile-dash-bar {
  display: none;
}

/* Mobile Modal Styles */
.mobile-nav-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-nav-modal.show {
  display: block;
  opacity: 1;
  transition: var(--transition);
}

.mobile-nav-content {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100%;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.2);
}

.mobile-nav-modal.show .mobile-nav-content {
  transform: translateX(0);
}

.mobile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 12px 4px;
  margin-bottom: 0;
}

.mobile-nav-header h3 {
  color: var(--text);
  margin: 0;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-nav-header h3 i {
  font-size: calc(1.5rem);
}

.mobile-nav-close {
  background: none;
  color: var(--text-muted);
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 5px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: var(--transition);
}

.mobile-nav-close:hover {
  background: var(--card-bg);
}

.mobile-nav-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.mobile-nav-items a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-muted);
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.mobile-nav-items a i {
  font-size: 18px;
  width: 20px;
  text-align: center;
}

/* Mobile: column layout + pill bar, hide PC sidebar */
@media (max-width: 768px) {
  .user-layout {
    flex-direction: column;
  }

  .user-layout .user-sidebar {
    display: none;
  }

  .mobile-dash-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 7px 8px 7px 9px;
    margin: 10px 12px 4px;
  }

  .mobile-dash-menu {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
  }

  .mobile-dash-title {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-dash-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    flex-shrink: 0;
  }
}

/* PC Styles */
@media (min-width: 769px) {

  .mobile-dash-bar,
  .mobile-nav-modal {
    display: none !important;
  }
}

/* ---- Profile (My Profile link) ---- */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ---- Avatar upload (My Profile link) ---- */
.profile-box {
  width: 140px;
  height: 140px;
  position: relative;
}

.profile-box #my_image {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 4px solid var(--border);
  object-fit: cover;
}

.profile-box #upload_file {
  display: none;
}

.profile-box .camera-icon {
  width: 45px;
  height: 45px;
  background: white;
  border-radius: 50%;
  position: absolute;
  bottom: 5px;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  color: var(--primary);
}

@media(max-width:640px) {
  .profile-grid {
    grid-template-columns: 1fr !important
  }
}

@media(max-width:480px) {
  [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important
  }
}

@media(max-width:768px) {
  .user-main {
    padding: 20px 16px;
  }
}

/* ---- Orders (My Orders link) ---- */
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.order-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: var(--transition);
}

.order-card:hover {
  border-color: rgba(255, 102, 0, 0.2);
}

/* ========================================
   Orders page (My Orders link — moved from orders.html <style>)
   ======================================== */
.orders-page {
  max-width: 100%;
}

.orders-breadcrumb {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.orders-breadcrumb a {
  color: var(--text-muted);
}

.orders-breadcrumb a:hover {
  color: var(--primary);
}

.orders-breadcrumb i {
  font-size: 10px;
}

.orders-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 4px;
}

.orders-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 16px;
}

.orders-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.orders-page .filter-btn {
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 100px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.orders-page .filter-btn.active {
  background: rgba(255, 102, 0, 0.12);
  color: var(--primary);
  border-color: var(--primary);
}

.orders-page .filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.count-badge {
  font-size: 11px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 20px;
  line-height: 1.2;
}

.orders-page .filter-btn.active .count-badge {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Card — dark, bigger image without box */
.screenshot-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  padding: 12px 16px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: border-color .15s;
}

.screenshot-card:hover {
  border-color: rgba(255, 102, 0, .25);
}

.screenshot-img {
  width: 96px;
  height: 96px;
  border: none;
  border-radius: 8px;
  object-fit: cover;
  background: transparent;
  flex-shrink: 0;
  padding: 0;
}

.screenshot-img.ph {
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  background: var(--bg-3);
  border-radius: 8px;
  flex-shrink: 0;
}

.screenshot-content {
  flex: 1;
  min-width: 0;
}

.screenshot-title {
  font-size: 13px;
  color: var(--text);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.screenshot-order {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

.screenshot-badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  background: #2e8de1;
  padding: 2px 6px;
  border-radius: 2px;
  letter-spacing: .3px;
  line-height: 1.4;
}

.screenshot-badge.pending {
  background: #75757a;
}

.screenshot-badge.confirmed {
  background: #f59e0b;
}

.screenshot-badge.preparing {
  background: #f68b1e;
}

.screenshot-badge.shipped {
  background: #2e8de1;
}

.screenshot-badge.delivered {
  background: #00a652;
}

.screenshot-badge.cancelled {
  background: #ed1c24;
}

.screenshot-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.screenshot-link {
  font-size: 12px;
  color: var(--primary);
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
  padding: 7px 16px;
  border: 1.5px solid var(--primary);
  border-radius: 100px;
  background: transparent;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.screenshot-link:hover {
  color: #fff;
  background: var(--primary);
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(255, 102, 0, .25);
  transform: translateY(-1px);
}

.cancel-btn {
  font-size: 11px;
  font-weight: 700;
  color: var(--danger);
  background: transparent;
  border: 1.5px solid rgba(239, 68, 68, .3);
  border-radius: 100px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}

.cancel-btn:hover {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
  box-shadow: 0 4px 12px rgba(239, 68, 68, .25);
  transform: translateY(-1px);
}

.orders-empty {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 48px 20px;
  text-align: center;
  box-shadow: var(--shadow);
}

@media(max-width:768px) {
  .user-main {
    padding: 16px 12px !important;
  }

  .screenshot-card {
    padding: 10px 12px;
  }

  .screenshot-img {
    width: 80px;
    height: 80px;
  }

  .screenshot-img.ph {
    width: 80px;
    height: 80px;
  }
}

/* ========================================
   Order detail (My Orders link — moved from order_detail.html <style>)
   ======================================== */
.jd-header-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px
}

.jd-header-left h1 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px
}

.jd-header-left h1 span {
  color: var(--primary)
}

.jd-meta {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center
}

.jd-meta b {
  color: var(--text)
}

.jd-badge {
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid
}

.jd-badge.pending {
  background: rgba(234, 179, 8, .12);
  color: #eab308;
  border-color: rgba(234, 179, 8, .3)
}

.jd-badge.confirmed {
  background: rgba(59, 130, 246, .12);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, .3)
}

.jd-badge.preparing {
  background: rgba(249, 115, 22, .12);
  color: #fb923c;
  border-color: rgba(249, 115, 22, .3)
}

.jd-badge.delivery {
  background: rgba(168, 85, 247, .12);
  color: #c084fc;
  border-color: rgba(168, 85, 247, .3)
}

.jd-badge.delivered {
  background: rgba(34, 197, 94, .12);
  color: #22c55e;
  border-color: rgba(34, 197, 94, .3)
}

.jd-badge.cancelled {
  background: rgba(239, 68, 68, .12);
  color: #ef4444;
  border-color: rgba(239, 68, 68, .3)
}

.od-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start
}

@media(max-width:992px) {
  .od-grid {
    grid-template-columns: 1fr
  }
}

.od-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0
}

.od-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start
}

@media(max-width:768px) {
  .od-duo {
    grid-template-columns: 1fr
  }
}

.od-rail {
  min-width: 0
}

.od-rail-card {
  position: sticky;
  top: 90px
}

.od-vsteps {
  display: flex;
  flex-direction: column
}

.od-vstep {
  display: flex;
  gap: 12px;
  position: relative;
  padding-bottom: 20px
}

.od-vstep:last-child {
  padding-bottom: 0
}

.od-vstep::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 34px;
  bottom: 0;
  width: 2px;
  background: #2a2d33
}

.od-vstep:last-child::before {
  display: none
}

.od-vstep.done::before {
  background: var(--primary)
}

.od-vicon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1c1e22;
  border: 2px solid #2a2d33;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
  color: #7a7d85
}

.od-vstep.done .od-vicon {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff
}

.od-vstep.active .od-vicon {
  box-shadow: 0 0 0 5px rgba(255, 102, 0, .18)
}

.od-vlabel {
  font-weight: 800;
  font-size: 13px;
  color: #fff
}

.od-vstep:not(.done) .od-vlabel {
  color: #7a7d85
}

.od-vsub {
  font-size: 11.5px;
  color: #7a7d85;
  margin-top: 2px
}

.jd-card {
  background: #111214;
  border: 1px solid #232428;
  border-radius: 12px;
  padding: 24px
}

.jd-card h3 {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px
}

.jd-card h3 i {
  color: var(--primary);
  font-size: 16px
}

.od-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #7a7d85;
  margin: 0 0 12px
}

.od-block {
  margin-bottom: 24px
}

.od-block:last-of-type {
  margin-bottom: 0
}

.od-method {
  display: flex;
  align-items: center;
  gap: 12px
}

.od-method>i {
  font-size: 26px;
  color: var(--primary);
  flex-shrink: 0
}

.od-method-name {
  font-weight: 800;
  font-size: 14px;
  color: #fff
}

.od-method-sub {
  font-size: 12.5px;
  color: #9aa0aa;
  margin-top: 2px
}

.od-ship-name {
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  margin-bottom: 6px
}

.od-ship-line {
  font-size: 13px;
  color: #9aa0aa;
  line-height: 1.65
}

.od-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  font-size: 13.5px
}

.od-row .k {
  color: #9aa0aa
}

.od-row .v {
  color: #fff;
  font-weight: 700;
  text-align: right
}

.od-row .v.mono {
  font-size: 12.5px;
  letter-spacing: .3px
}

.od-paid {
  background: rgba(34, 197, 94, .15);
  color: #22c55e;
  padding: 3px 12px;
  border-radius: 100px;
  font-weight: 800;
  font-size: 12px
}

.od-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 4px
}

.od-total-row .k {
  font-weight: 800;
  font-size: 15px;
  color: #fff
}

.od-total-row .v {
  font-weight: 800;
  font-size: 17px;
  color: var(--primary)
}

.od-track-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 22px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  border: none;
  border-radius: 100px;
  padding: 15px 20px;
  cursor: pointer;
  text-decoration: none;
  transition: .25s
}

.od-track-btn:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px)
}

.od-help-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px
}

.od-help-title i {
  color: var(--primary)
}

.od-help p {
  font-size: 13px;
  color: #9aa0aa;
  margin-bottom: 16px;
  line-height: 1.6
}

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

.od-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 100px;
  border: 1px solid #33353b;
  background: #17181c;
  color: #fff;
  text-decoration: none;
  transition: .25s
}

.od-btn-ghost:hover {
  border-color: var(--primary);
  color: #fff
}

.od-btn-orange {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 100px;
  border: 1px solid rgba(255, 102, 0, .4);
  background: rgba(255, 102, 0, .08);
  color: var(--primary);
  text-decoration: none;
  transition: .25s
}

.od-btn-orange:hover {
  background: rgba(255, 102, 0, .16)
}

.od-rail .od-help-actions a {
  flex: 1;
  justify-content: center
}

.jd-item-row {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border)
}

.jd-item-row:last-child {
  border-bottom: none
}

.jd-item-img {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--bg-3);
  flex-shrink: 0;
  border: 1px solid var(--border)
}

.jd-item-img.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px
}

.jd-item-name {
  font-weight: 700;
  font-size: 14px
}

.jd-item-qty {
  font-size: 12px;
  color: var(--text-muted)
}

.jd-price {
  font-weight: 800;
  color: var(--primary)
}

/* ---- Order Tracking (Track Order link) ---- */
.tracking-map-placeholder {
  height: 220px;
  background: var(--bg-3);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.map-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 102, 0, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 102, 0, 0.05) 1px, transparent 1px);
  background-size: 30px 30px;
}

.map-pin {
  position: absolute;
  font-size: 32px;
  animation: float 2s ease-in-out infinite;
}

.map-pin.pin-rider {
  top: 40%;
  left: 45%;
  color: var(--primary);
}

.map-pin.pin-dest {
  top: 25%;
  left: 65%;
  color: var(--success);
}

.track-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.track-step h5 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 3px;
}

.track-step span {
  font-size: 12px;
  color: var(--text-muted);
}

.driver-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-3);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.driver-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 102, 0, 0.15);
  border: 2px solid rgba(255, 102, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

.driver-info h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 3px;
}

.driver-info span {
  font-size: 13px;
  color: var(--text-muted);
}

.driver-actions {
  margin-left: auto;
  display: flex;
  gap: 10px;
}

.driver-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text);
}

.driver-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ========================================
   Track order (Track Order link — moved from track_order.html <style>)
   ======================================== */
.tr-eta {
  background: linear-gradient(135deg, rgba(255, 102, 0, .14), rgba(255, 102, 0, .04));
  border: 1px solid rgba(255, 102, 0, .3);
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px
}

.tr-timeline {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px
}

.tr-step {
  display: flex;
  gap: 14px;
  position: relative;
  padding-bottom: 22px
}

.tr-step:last-child {
  padding-bottom: 0
}

.tr-step::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 34px;
  bottom: -2px;
  width: 2px;
  background: var(--border)
}

.tr-step:last-child::before {
  display: none
}

.tr-step.done::before {
  background: var(--primary)
}

.tr-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 16px
}

.tr-step.done .tr-icon {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff
}

.tr-step.active .tr-icon {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 6px rgba(255, 102, 0, .18)
}

.tr-step.cancelled .tr-icon {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff
}

.tr-label {
  font-weight: 700;
  font-size: 14px
}

.tr-desc {
  font-size: 12px;
  color: var(--text-muted)
}

.tr-time {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap
}

@media(max-width:576px) {
  .tr-time {
    display: block;
    margin-top: 4px
  }
}

/* ---- Settings (Settings link) ---- */
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}

.settings-row:last-child {
  border-bottom: none;
}

.settings-row-info h5 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 3px;
}

.settings-row-info p {
  font-size: 12px;
  color: var(--text-muted);
}

/* ---- Sidebar logout (merged Settings link removed) ---- */
.sidebar-nav .logout-link,
.mobile-nav-items .logout-link {
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

/* =============================================
   PROFILE PAGE — external only (no inline CSS)
   (same full content width as all other user pages)
   ============================================= */

.profile-flash {
  margin-bottom: 16px;
}

.profile-head {
  margin-bottom: 20px;
}

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

.profile-stat {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
}

.profile-stat-num {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1.1;
}

.profile-stat-num.is-primary { color: var(--primary); }
.profile-stat-num.is-success { color: var(--success); }
.profile-stat-num.is-warning { color: var(--warning); }
.profile-stat-num.is-info { color: var(--info); }

.profile-stat-num .star-ico { font-size: 16px; }

.profile-stat-label {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.profile-card {
  margin-bottom: 24px;
}

.profile-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 16px;
}

.profile-card-title .title-ico {
  color: var(--primary);
  margin-right: 8px;
}

.profile-card-title.is-danger,
.profile-card.is-danger .profile-card-title {
  color: var(--danger);
}

.profile-card.is-danger {
  border-color: rgba(239, 68, 68, 0.3);
}

.card-head-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.card-head-split .profile-card-title { margin: 0; }

/* Avatar upload */
.avatar-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.avatar-upload {
  width: 140px;
  height: 140px;
  position: relative;
}

.avatar-upload .camera-btn {
  width: 45px;
  height: 45px;
  background: white;
  border-radius: 50%;
  position: absolute;
  bottom: 5px;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  color: var(--primary);
  margin: 0;
}

/* Forms */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.dob-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.dob-current {
  font-size: 12px;
  color: var(--text-muted);
}

.form-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

/* Addresses */
.address-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.address-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: var(--bg-3);
  border-radius: var(--radius);
  border: 1px solid transparent;
}

.address-item.is-default {
  border-color: var(--primary);
}

.address-ico {
  font-size: 20px;
  color: var(--primary);
  flex-shrink: 0;
}

.address-info {
  flex: 1;
  min-width: 0;
}

.address-name {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 600;
}

.badge-default {
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 700;
}

.address-text {
  color: var(--text-muted);
  font-size: 13px;
}

.address-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.address-actions .inline-form {
  display: inline;
}

/* Preferences */
.pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
}

.pref-row + .pref-row {
  border-top: 1px solid var(--border);
}

.pref-name {
  font-size: 14px;
  font-weight: 600;
}

.pref-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.pref-switch {
  cursor: pointer;
}

/* Danger zone */
.danger-text {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

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

.btn-danger-outline {
  border-color: var(--danger);
  color: var(--danger);
}

.empty-state {
  text-align: center;
  padding: 24px 12px;
  color: var(--text-muted);
}

.empty-state .empty-ico {
  font-size: 32px;
  display: block;
  margin-bottom: 8px;
}

.empty-state p {
  margin: 0;
  font-size: 14px;
}

/* =============================================
   FAVOURITES PAGE — external only (no inline CSS)
   ============================================= */
.fav-page {
  max-width: 100%;
}

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

.fav-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.fav-card-media {
  position: relative;
  height: 150px;
  background: var(--bg-3);
}

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

.fav-card-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
}

.fav-unavailable {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}

.fav-badge {
  position: absolute;
  left: 10px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fav-badge-new {
  top: 10px;
  background: #22c55e;
  color: #fff;
}

.fav-badge-off {
  top: 38px;
  background: #dc3545;
  color: #fff;
}

.fav-card-cat {
  font-size: 12px;
  color: var(--text-muted);
}

.fav-old-price {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: line-through;
  font-weight: 400;
}

.fav-card-heart {
  position: absolute;
  top: 10px;
  right: 10px;
}

.fav-card-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.fav-card-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}

.fav-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.fav-card-rating i {
  color: var(--warning);
}

.fav-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}

.fav-card-price {
  font-weight: 800;
  font-size: 16px;
  color: var(--primary);
}

/* Modals (replaces inline modal styles) */
.modal-card {
  border-radius: 16px;
  border: none;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-card-head {
  border-bottom: 1px solid var(--border);
}

.modal-card-body {
  padding: 20px 24px;
}

.modal-card-foot {
  border-top: 1px solid var(--border);
}

.btn-pill {
  border-radius: 50px;
  min-width: 90px;
  font-size: 0.87rem;
}

.btn-pill-light {
  border: 1px solid #dee2e6;
}

.modal-confirm-emoji {
  font-size: 48px;
  margin-bottom: 10px;
}

.modal-confirm-title {
  color: var(--text);
  font-weight: 700;
}

.modal-confirm-text {
  font-size: 13px;
  color: var(--text-muted);
}

.modal-confirm-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

.modal-confirm-actions .inline-form {
  display: inline;
}

.btn-delete-shadow {
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

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

  .fav-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .profile-stats {
    grid-template-columns: 1fr 1fr;
  }

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

  .profile-stat-num {
    font-size: 22px;
  }

  /* Orders tabs stay on one line on all phones */
  .orders-tabs {
    flex-wrap: nowrap;
    gap: 6px;
  }

  .orders-page .filter-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 2px;
    font-size: clamp(9px, 3vw, 11px);
    white-space: nowrap;
    justify-content: center;
  }

  .count-badge {
    font-size: 9px;
    padding: 0 4px;
    flex-shrink: 0;
  }
}