
:root {
  --bg-clr: var(--bg-clr, #ff5722);
  --text-clr: var(--text-clr, #ffffff);
  --surface: #ffffff;
  --surface-alt: #f8f9fb;
  --border-soft: #eaeaf0;
  --text-primary: #1c1d21;
  --text-secondary: #7a7a86;
  --success: #1aa251;
  --danger: #e53935;
  --warning: #f5a524;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 4px 20px rgba(20, 20, 40, 0.05);
  --shadow-hover: 0 10px 30px rgba(20, 20, 40, 0.09);
  --transition: all 0.2s ease;
}

body {
  background: var(--surface-alt) !important;
  font-family: 'Nunito Sans', 'Inter', sans-serif;
  color: var(--text-primary);
}

/* ================================================================== */
/* SHARED: HEADER                                                      */
/* ================================================================== */
#header {
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.dashboard-header { padding: 14px 0; }

.db-store-btn {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  padding: 9px 18px;
  border-radius: 30px;
  border: 1.5px solid var(--border-soft);
  transition: var(--transition);
  text-decoration: none;
}

.db-store-btn:hover {
  border-color: var(--bg-clr);
  color: var(--bg-clr);
}

.logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--bg-clr);
  padding: 9px 18px;
  border-radius: 30px;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.logout-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  filter: brightness(0.95);
}

/* ================================================================== */
/* SHARED: PAGE CONTAINER + TITLE ROW                                  */
/* ================================================================== */
.dashboard-container,
.order-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

.order-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: none !important;
  padding-bottom: 20px !important;
}

.order-heading h3.order-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
}

.acc-holder-name {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--text-secondary) !important;
  background: var(--surface);
  padding: 6px 14px;
  border-radius: 20px;
  box-shadow: var(--shadow-card);
}

/* ================================================================== */
/* SHARED: SIDEBAR NAV                                                  */
/* ================================================================== */
.nav-links-container,
.nav-links-container.space-order {
  background: var(--surface);
  border: 1px solid var(--border-soft) !important;
  border-radius: var(--radius-lg);
  height: auto !important;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.space-order {
  gap: 0 !important;
  height: auto !important;
  border-right: none !important;
  padding: 10px !important;
}

.space-order li {
  padding: 0 !important;
  border-bottom: none !important;
  list-style: none;
  margin-bottom: 4px;
}

.space-order li:last-child { margin-bottom: 0; }

.space-order li a {
  display: block !important;
  width: 100% !important;
  padding: 13px 16px !important;
  font-size: 14.5px !important;
  font-weight: 600 !important;
  color: var(--text-secondary) !important;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  text-decoration: none;
  text-transform: capitalize;
}

.space-order li a:hover {
  background: var(--surface-alt);
  color: var(--text-primary) !important;
}

.space-order li a.active-dash,
.space-order li a.active {
  background: var(--bg-clr) !important;
  color: var(--text-clr) !important;
  border-bottom: none !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

@media (max-width: 768px) {
  .space-order {
    display: flex !important;
    gap: 8px;
    overflow-x: auto;
  }
  .space-order li { flex: 0 0 auto; }
  .space-order li a { white-space: nowrap; padding: 10px 16px !important; }
}

/* ================================================================== */
/* MY ACCOUNT: profile-section / address-section                       */
/* ================================================================== */
.profile-section,
.address-section {
  background: var(--surface);
  border: 1px solid var(--border-soft) !important;
  border-radius: var(--radius-lg) !important;
  margin: 0 0 20px 0 !important;
  padding: 24px !important;
  box-shadow: var(--shadow-card);
}

.my-acc-inner { padding-left: 24px; }

@media (max-width: 991px) {
  .my-acc-inner { padding-left: 0; margin-top: 20px; }
}

.profile-heading,
.address-heading {
  border-bottom: 1px solid var(--border-soft) !important;
  padding-bottom: 14px !important;
  margin-bottom: 18px;
}

.profile-title,
.address-title {
  font-size: 17px !important;
  font-weight: 700 !important;
  color: var(--text-primary) !important;
  border-bottom: none !important;
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

.icon-cont-radius button {
  width: auto !important;
  padding: 0 18px;
  height: 34px !important;
  font-size: 13px !important;
  font-weight: 600;
  border-radius: 20px !important;
  background: var(--surface-alt) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-soft) !important;
  transition: var(--transition);
}

.icon-cont-radius button:hover {
  background: var(--bg-clr) !important;
  color: var(--text-clr) !important;
  border-color: var(--bg-clr) !important;
}

.profile-name-div,
.profile-mobile-no,
.profile-email {
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-soft);
}

.profile-name-div:last-child,
.profile-mobile-no:last-child,
.profile-email:last-child { border-bottom: none; }

.fix-width {
  width: 130px !important;
  font-size: 13.5px;
  color: var(--text-secondary) !important;
  font-weight: 600;
}

.add-address-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--bg-clr);
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1.5px dashed var(--bg-clr);
  transition: var(--transition);
}

.add-address-btn:hover {
  background: var(--bg-clr);
  color: var(--text-clr);
  border-style: solid;
}

.no-address-div { text-align: center; padding: 40px 20px; color: var(--text-secondary); }

.no-address-text {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 14px; font-weight: 500;
}

/* ================================================================== */
/* SHARED: address-container (used in My Account AND Order detail)     */
/* ================================================================== */
.address-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.address-container {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 16px;
  background: var(--surface-alt);
  transition: var(--transition);
}

.address-container:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--bg-clr);
  transform: translateY(-2px);
}

.address-type-text {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--bg-clr);
  margin-bottom: 6px;
}

.delete_address { color: var(--text-secondary); transition: var(--transition); }
.delete_address:hover { color: var(--danger); transform: scale(1.1); }

.address-grid-name { font-weight: 700; font-size: 14px; margin-bottom: 4px; color: var(--text-primary); }
.address-grid-add { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 6px; }
.address-grid-mobile { font-size: 13px; font-weight: 600; color: var(--text-primary); }

/* ================================================================== */
/* MY ORDERS: accordion order cards                                    */
/* ================================================================== */
#accordionOrders { display: flex; flex-direction: column; gap: 16px; }

.accordion-item {
  background: var(--surface);
  border: 1px solid var(--border-soft) !important;
  border-radius: var(--radius-lg) !important;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.accordion-item:hover { box-shadow: var(--shadow-hover); }

.accordion-header { padding: 0 !important; }

.accordion-button {
  border: 0 !important;
  padding: 18px 20px !important;
  background: transparent !important;
}

.accordion-button::after { filter: none; }

.order-pr-delivery {
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px dashed var(--border-soft);
}

.order-pr-status,
.order-stat {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 0 !important;
}

.order-pr-status svg,
.order-stat svg {
  width: 20px !important;
  height: 20px !important;
}

.order-rate-and-review {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--danger);
  cursor: pointer;
  transition: var(--transition);
}

.order-rate-and-review:hover { text-decoration: underline; }

.order-pr-details-cont {
  background: var(--surface-alt) !important;
  padding: 14px !important;
  border-radius: var(--radius-md);
}

.order-img-wrapper {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border-soft);
  flex-shrink: 0;
}

.order-pr-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.order-pr-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.order-pr-att {
  font-size: 12.5px;
  color: var(--text-secondary);
}

.order-pr-att span {
  font-weight: 600;
  color: var(--text-primary);
}

.order-price {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
}

/* Accordion body / detail panel */
.accordion-body {
  padding: 20px !important;
  border-top: 1px solid var(--border-soft);
  background: var(--surface);
}

.or-pr-title {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

.or-id-no {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

/* Progress / tracking bar */
.progress-bar {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 20px 0;
  width: 100%;
  counter-reset: step;
}

.progress-bar li {
  flex: 1;
  text-align: center;
  position: relative;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.progress-bar li::before {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border-soft);
  display: block;
  margin: 0 auto 8px;
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--border-soft);
  position: relative;
  z-index: 2;
}

.progress-bar li::after {
  content: '';
  position: absolute;
  top: 5px;
  left: -50%;
  width: 100%;
  height: 2px;
 /* background: var(--border-soft);*/
  z-index: 1;
}

.progress-bar li:first-child::after { display: none; }

.progress-bar li.is-complete { color: var(--success); }
.progress-bar li.is-complete::before {
  background: var(--success);
  box-shadow: 0 0 0 1px var(--success);
}
.progress-bar li.is-complete::after { background: var(--success); }

.progress-bar li.is-active {
  color: var(--bg-clr);
  font-weight: 800;
}
.progress-bar li.is-active::before {
  background: var(--bg-clr);
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.06);
  width: 14px;
  height: 14px;
}

/* Items in this order */
.other-item-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}

.other-item-div {
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border-soft);
}

.other-item-div:last-child { border-bottom: none; }

.order-pr-return-btn {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--bg-clr);
  text-decoration: none;
}

.order-pr-return-btn:hover { text-decoration: underline; }

/* Status text colors */
.text-warning { color: var(--warning) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--bg-clr) !important; }
.text-cancel { color: var(--danger) !important; }

/* ================================================================== */
/* SHARED: MODALS (Profile edit / Add address / Reviews)               */
/* ================================================================== */
.modal-content {
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.modal-header {
  border-bottom: 1px solid var(--border-soft);
  padding: 20px 24px;
}

.modal-title { font-weight: 700 !important; font-size: 17px !important; }
.modal-body { padding: 24px; }
.modal-footer { border-top: 1px solid var(--border-soft); padding: 16px 24px; }

.modal .form-control,
.modal .form-select {
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-soft);
  padding: 11px 14px;
  font-size: 14.5px;
  transition: var(--transition);
}

.modal .form-control:focus,
.modal .form-select:focus {
  border-color: var(--bg-clr);
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.04);
}

.modal .form-control:disabled { background: var(--surface-alt); color: var(--text-secondary); }

.btn-check + .btn-outline-secondary {
  border-radius: 20px !important;
  padding: 7px 20px;
  font-size: 13.5px;
  font-weight: 600;
  border-color: var(--border-soft);
  color: var(--text-secondary);
  margin-right: 8px;
}

.btn-check:checked + .btn-outline-secondary {
  background: var(--bg-clr);
  border-color: var(--bg-clr);
  color: var(--text-clr);
}

.save-changes,
#save_profile,
#saveAddress,
#saveRating {
  background: var(--bg-clr) !important;
  color: var(--text-clr) !important;
  border: none !important;
  border-radius: 25px !important;
  padding: 10px 24px !important;
  font-weight: 700 !important;
  font-size: 14px;
  transition: var(--transition);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.save-changes:hover,
#save_profile:hover,
#saveAddress:hover,
#saveRating:hover {
  transform: translateY(-1px);
  filter: brightness(0.95);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
}

.btn-outline-dark {
  border-radius: 25px !important;
  padding: 10px 24px !important;
  font-weight: 600 !important;
  font-size: 14px;
  border-color: var(--border-soft) !important;
  color: var(--text-primary) !important;
}

.btn-outline-dark:hover {
  background: var(--surface-alt) !important;
  border-color: var(--text-secondary) !important;
  color: var(--text-primary) !important;
}

/* Star rating */
.rating input[type="radio"],
.star-rating input[type="radio"] { display: none; }

.rating,
.star-rating { display: flex; flex-direction: row-reverse; gap: 4px; }

.rating label,
.star-rating label {
  cursor: pointer;
  font-size: 26px;
  color: var(--border-soft);
  transition: var(--transition);
}

.rating label::before,
.star-rating label::before { content: "★"; }

.rating input:checked ~ label,
.rating label:hover,
.rating label:hover ~ label,
.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
  color: var(--warning);
}

.rating-review-select-page textarea.form-control {
  min-height: 90px;
  border-radius: var(--radius-sm);
}

/* Loading spinner */
.btn-progress {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-progress::after {
  content: "";
  position: absolute;
  width: 16px; height: 16px;
  top: 50%; left: 50%;
  margin: -8px 0 0 -8px;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.is-invalid { border-color: var(--danger) !important; }
.invalid-feedback,
.error-message { font-size: 12.5px; color: var(--danger); margin-top: 4px; }

/* ================================================================== */
/* WALLET (generic — reuses profile-section card style + these)        */
/* ================================================================== */
.wallet-balance-card {
  background: linear-gradient(135deg, var(--bg-clr), rgba(0,0,0,0.15));
  color: var(--text-clr);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-hover);
}

.wallet-balance-label {
  font-size: 13px;
  opacity: 0.85;
  font-weight: 600;
  margin-bottom: 6px;
}

.wallet-balance-amount {
  font-size: 32px;
  font-weight: 800;
}

.wallet-txn-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px dashed var(--border-soft);
}

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

.wallet-txn-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.wallet-txn-date { font-size: 12px; color: var(--text-secondary); }
.wallet-txn-amount.credit { color: var(--success); font-weight: 700; }
.wallet-txn-amount.debit { color: var(--danger); font-weight: 700; }

/* ================================================================== */
/* MOBILE RESPONSIVE                                                    */
/* ================================================================== */
@media (max-width: 768px) {
  .dashboard-container,
  .order-container { padding: 20px 14px 40px; }

  .order-heading h3.order-title { font-size: 20px; }

  .profile-section,
  .address-section { padding: 18px !important; margin-bottom: 16px !important; }

  .fix-width { width: 110px !important; font-size: 12.5px; }

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

  .order-pr-details-cont { flex-direction: column; align-items: flex-start; gap: 10px; }

  .order-price-details { width: 100% !important; flex-wrap: wrap; }

  .progress-bar { font-size: 10px; }

  .wallet-balance-amount { font-size: 26px; }
}
