:root {
    --primary: hsl(16, 90%, 55%);
    --primary-dark: hsl(16, 90%, 45%);
    --secondary: hsl(174, 62%, 47%);
    --background: hsl(0, 0%, 98%);
    --foreground: hsl(222, 47%, 11%);
    --card: hsl(0, 0%, 100%);
    --border: hsl(214, 32%, 91%);
    --muted: hsl(210, 40%, 96%);
    --muted-foreground: hsl(215, 16%, 47%);
    --success: hsl(142, 71%, 45%);
    --warning: hsl(38, 92%, 50%);
    --destructive: hsl(0, 84%, 60%);
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  background-color: #f9f9f9;
}

/* LOADER OVERLAY */
.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loader-overlay.active {
  display: flex;
}

/* SPINNER */
.loader {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border-top: 3px solid var(--primary);
  border-right: 3px solid transparent;
  animation: rotation-2 1s linear infinite;
}

@keyframes rotation-2 {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* icon Number*/
.hub-card {
  position: relative;
}

.hub-badge {
  position: absolute;
  top: 8px;
  right: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  padding: 4px 7px;
  border-radius: 50px;
  min-width: 20px;
  text-align: center;
}

.dashboard {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 220px;
  background-color: #f5f5f5;
  padding: 15px;
}

.sidebar h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 1.2rem;
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar li {
  padding: 12px;
  cursor: pointer;
  border-radius: 4px;
  margin-bottom: 8px;
  transition: background 0.2s;
  color: #333;
}

.sidebar li:hover, .sidebar li.active {
  background-color: #f5f5f5;
}

.content {
  flex: 1;
  padding: 20px;
  background-color: #fff;
  overflow-y: auto;
}


.order-detail {
  margin-top: 20px;
  padding: 15px;
  background-color: white;
  border-radius: 5px;
  border: 1px solid #ddd;
}

.hidden {
  display: none;
}



.dashboard button {
  padding: 8px 12px;
  margin: 5px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.dashboard button.cancel {
  background-color: #e74c3c;
  color: white;
}

button.retry {
  background-color: #27ae60;
  color: white;
}

.fa-solid{
  color:var(--primary);

}


/* ==========================
   Profile Tab & Form Styling
   ========================== */

/* Tab content */
.tab {
  display: none;
  padding: 20px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tab.active {
  display: block;
}



/* ==========================
   ENHANCED Profile Styling
   ========================== */

#profile-info {
    max-width: 600px;
    margin: 0 auto;
}

.profile-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.profile-header {
    background: var(--muted);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 12px;
    
}

.profile-header h3 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--foreground);
}

.profile-header p {
    margin: 4px 0 0;
    color: var(--muted-foreground);
    font-size: 0.95rem;
}

.profile-body {
    padding: 24px;
}

.form-grid {
    display: grid;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.85rem;
    color: var(--muted-foreground) !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Override your existing #profile-info input styles for a cleaner look */
#profile-info .profile-body input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--background);
    transition: all 0.2s ease;
}

#profile-info .profile-body input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px hsla(16, 90%, 55%, 0.1);
}

.profile-footer {
    padding: 0 24px 24px;
}

/* Reuse your gradient button style but make it full width */
#update-profile-btn {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* Update status messages */
#update-status {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #16a34a; /* green for success */
  transition: opacity 0.3s;
}

#update-status.error {
  color: #dc2626; /* red for errors */
}

/* Responsive adjustments */
@media screen and (max-width: 600px) {
  #profile-info {
    width: 90%;
  }

  #profile-info button {
    width: 100%;
  }
}

.status-message {
  margin-top: 10px;
  font-size: 14px;
  display: none;
}

.status-message.success {
  color: #16a34a;
}

.status-message.error {
  color: #dc2626;
}
.return-section {
  border: 1px solid #ddd;
  padding: 20px;
  border-radius: 8px;
  background-color: #fafafa;
  max-width: 600px;
  margin: 20px auto;
  font-family: Arial, sans-serif;
}

.return-section h3 {
  margin-bottom: 15px;
  color: #333;
}

.return-section label {
  margin-top: 10px;
  display: block;
  font-weight: 500;
}

.return-section select,
.return-section textarea {
  width: 100%;
  padding: 10px 12px;
  margin-top: 5px;
  margin-bottom: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 14px;
}

.return-section button {
  padding: 12px 25px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.return-section button:hover {
  background-color: #218838;
}



.status-message {
  position: fixed;       /* float above everything */
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.status-message.show {
  display: block;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.status-message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}





.review-btn:hover {
    background-color: #e65c00;
}

/* Add Review Form */
#add-review {
    background: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

#add-review label {
    display: block;
    margin-top: 10px;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

#add-review select,
#add-review textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    resize: vertical;
    font-family: inherit;
    font-size: 14px;
}

#submit-review {
    margin-top: 12px;
    background-color: #28a745;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s ease;
}

#submit-review:hover {
    background-color: #218838;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    #reviews {
        padding: 15px;
        margin: 10px;
    }

    .order-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .review-btn {
        margin-top: 8px;
        width: 100%;
        text-align: center;
    }

    #add-review select,
    #add-review textarea {
        font-size: 14px;
    }
}



#returns {
  max-width: 520px;
  margin: 30px auto;
  padding: 20px 24px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

#returns h3 {
  text-align: center;
  font-size: 20px;
  margin-bottom: 18px;
  color: #1f2937;
}

#returns label {
  display: block;
  margin-top: 12px;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

#returns select,
#returns textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  font-size: 14px;
  box-sizing: border-box;
}

#returns select:focus,
#returns textarea:focus {
  outline: none;
  border-color: #2563eb;
  background: #fff;
}

#returns textarea {
  min-height: 90px;
  resize: none;
}

#returns button {
  margin-top: 16px;
  width: 100%;
  padding: 12px;
  font-size: 15px;
  font-weight: bold;
  border-radius: 10px;
 background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}


#returns button:active {
  transform: scale(0.97);
}

#return-status {
  margin-top: 12px;
  font-size: 14px;
  text-align: center;
}

.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(0,0,0,0.6);
}

.modal-content {
  background: #fff;
  width: 90%;
  max-width: 650px;
  margin: 5% auto;
  padding: 20px;
  border-radius: 10px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 22px;
  cursor: pointer;
  color: red;
}


/* ================= MODAL BACKDROP ================= */
#orderModal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 12px;
}

/* ================= MODAL CARD ================= */
#orderModal .modal-content {
  background: var(--card);
  color: var(--foreground);
  width: 100%;
  max-width: 600px;
  border-radius: 16px;
  padding: 22px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  overflow-y: auto;
  max-height: 90vh;
  position: relative;
}

/* ================= CLOSE BUTTON ================= */
#orderModal .close {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 22px;
  cursor: pointer;
  color: var(--destructive);
}

/* ================= HEADINGS ================= */
#order-detail h4 {
  color: var(--primary);
  margin-bottom: 10px;
  font-size: 18px;
}

#order-detail h5 {
  margin-top: 16px;
  margin-bottom: 6px;
  color: var(--secondary);
  font-size: 15px;
}

/* ================= TEXT ================= */
#order-detail p {
  margin: 6px 0;
  font-size: 14px;
  color: var(--foreground);
}

#order-detail strong {
  color: var(--muted-foreground);
}

/* ================= ITEMS LIST ================= */
#order-detail ul {
  list-style: none;
  padding: 10px;
  margin: 0;
  background: var(--muted);
  border-radius: 12px;
}

#order-detail li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

#order-detail li:last-child {
  border-bottom: none;
}

/* ================= DELIVERY PROGRESS ================= */
#delivery-progress {
  background: var(--muted);
  padding: 12px;
  border-radius: 12px;
  margin-top: 8px;
}

#delivery-progress p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  font-size: 14px;
}

/* ================= CANCEL BUTTON ================= */
#order-detail .cancel {
  background: var(--destructive);
  color: white;
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 12px;
  transition: background 0.2s ease;
}

#order-detail .cancel:hover {
  background: hsl(0, 84%, 50%);
}


.order-id {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
}

.order-number {
  font-weight: 600;
}

.copy-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.85rem;
  color: #1976d2;
  font-weight: 500;
  padding: 2px 6px;
}

.copy-btn:hover {
  text-decoration: underline;
}
.review-btn {
  background-color: var(--primary);
}

/* ==========================
   MOBILE VIEW (PHONE)
   ========================== */
@media (max-width: 768px) {

  body {
    overflow-x: hidden;
  }

  /* Layout */
  .dashboard {
    flex-direction: row;
    width: 100%;
  }

 



  

  .sidebar ul li i {
    font-size: 16px;
    min-width: 16px;
    text-align: center;
  }

  .sidebar ul li.active {
    background: #dcdcdc;;
    border-radius: 6px;
  }

  .sidebar ul li:hover {
    background: #e5e7eb;
  }

  .sidebar ul li.show-text span {
    display: inline;
    margin-left: 6px;
  }

  .content {
    margin-left: 5px;
    padding: 12px;
    width: calc(100% - 5px);
    box-sizing: border-box;
  }

  /* Tabs */
  .tab {
    padding: 12px;
    border-radius: 8px;
  }

  .tab h3 {
    font-size: 16px;
  }

  /* Forms */
  select,
  textarea,
  input {
    width: 100%;
    font-size: 14px;
    box-sizing: border-box;
    max-width: 100%;
    white-space: normal;
  }

  .dashboard button {
    width: 100%;
    margin: 6px 0;
  }

  

  .header-actions button {
    padding: 6px 8px;
    font-size: 12px;
  }


  /* =========================
     RETURNS TAB
     ========================= */
  #returns {
    padding: 14px;
    margin: 8px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  }

  #returns h3 {
    font-size: 16px;
    text-align: center;
    margin-bottom: 12px;
  }

  #returns label {
    font-size: 13px;
    margin-top: 10px;
    display: block;
  }

  #returns select,
  #returns textarea {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #f9fafb;
  }

  #returns textarea {
    min-height: 80px;
    resize: none;
  }

  #returns button {
    margin-top: 14px;
    padding: 12px;
    font-size: 15px;
    font-weight: bold;
    border-radius: 10px;
    color: white;
    border: none;
    transition: transform 0.2s ease;
  }

  #returns button:active {
    transform: scale(0.97);
  }

  #return-status {
    margin-top: 12px;
    font-size: 13px;
    text-align: center;
  }

  /* Wrap long order IDs */
  #order-select option {
    word-break: break-all;
  }

  /* =========================
   REVIEWS TAB (MOBILE)
   ========================= */

/* Review section container */
#reviews {
  padding: 12px;
  margin: 8px;
}

/* Product card */
.order-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  margin-bottom: 12px;
}

.order-item p {
  font-size: 14px;
  margin: 0;
  word-break: break-word;
}

/* Write Review button */
.review-btn {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: white;
  border: none;
}

/* Review form */
#add-review {
  padding: 14px;
  margin-top: 10px;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

#add-review h3 {
  font-size: 15px;
  margin-bottom: 10px;
}

/* Rating dropdown */
#review-rating {
  padding: 10px;
  border-radius: 8px;
  background: #f9fafb;
  border: 1px solid #ddd;
}

/* Comment box */
#review-comment {
  min-height: 110px;
  padding: 10px;
  border-radius: 8px;
  resize: none;
}

/* Submit review button */
#add-review button {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  font-weight: bold;
  border-radius: 10px;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: white;
  border: none;
  margin-top: 10px;
}

#add-review button:active {
  transform: scale(0.97);
}


}

/* ================= PHONE VIEW ================= */
@media (max-width: 600px) {
  #orderModal .modal-content {
    max-width: 100%;
    border-radius: 12px;
    padding: 16px;
  }

  #order-detail h4 {
    font-size: 16px;
  }

  #order-detail h5 {
    font-size: 14px;
  }

  #order-detail p,
  #order-detail li,
  #delivery-progress p {
    font-size: 13px;
  }

  #order-detail .cancel {
    width: 100%;
    padding: 12px;
  }
}


.order-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.order-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    border-bottom: 1px solid #f9f9f9;
    padding-bottom: 8px;
}

/* Status Badge Colors */
.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: capitalize;
}

/* Update these in your CSS */

.status-badge.pending { background: var(--warning); color: white; }
.status-badge.shipped { background: var(--secondary); color: white; }
.status-badge.cancelled { background: var(--destructive); color: white; }

/* If you prefer the light background look (Ghost style): */
.status-badge.delivered { 
    background: hsl(142, 71%, 95%); 
    color: var(--success); 
    border: 1px solid var(--success); 
}
.view-detail-text {
    font-size: 0.85rem;
    color: #007bff;
    text-decoration: underline;
}


.order-body p:first-child {
    font-size: 1.1rem; /* Slightly larger */
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 4px;
}

/* You could even wrap the Ksh in a span in your JS to do this: */
.currency-symbol {
    font-size: 0.85rem;
    color: var(--muted-foreground);
    font-weight: 400;
    margin-right: 2px;
}

/* ======================
   ORDER PRICING SECTION
   ====================== */

.order-pricing {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
}

.total-row,
.payment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Total Label */
.total-label {
    font-size: 0.85rem;
    color: var(--muted-foreground);
    font-weight: 500;
}

/* Total Amount */
.total-amount {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--foreground);
}

.currency {
    font-size: 0.8rem;
    color: var(--muted-foreground);
    font-weight: 500;
    margin-right: 4px;
}

/* Payment Label */
.payment-label {
    font-size: 0.85rem;
    color: var(--muted-foreground);
}

/* Payment Badge */
.payment-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

/* Payment Status Colors */
.payment-badge.paid {
    background: hsl(142, 71%, 95%);
    color: var(--success);
    border: 1px solid var(--success);
}

.payment-badge.pending {
    background: hsl(38, 92%, 95%);
    color: var(--warning);
    border: 1px solid var(--warning);
}

.payment-badge.failed {
    background: hsl(0, 84%, 95%);
    color: var(--destructive);
    border: 1px solid var(--destructive);
}


/* ======================
   ORDERS GRID
   ====================== */

#order-list {
    display: grid;
    gap: 20px;
    margin-top: 15px;
}

/* Desktop */
@media (min-width: 1024px) {
    #order-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
    #order-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 767px) {
    #order-list {
        grid-template-columns: 1fr;
    }
}

/* Container for order items inside reviews */
#delivered-orders {
  display: grid;
  gap: 20px;
}

/* Desktop: 3 columns */
@media (min-width: 1024px) {
  #delivered-orders {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tablet: 2 columns */
@media (min-width: 768px) and (max-width: 1023px) {
  #delivered-orders {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile: 1 column */
@media (max-width: 767px) {
  #delivered-orders {
    grid-template-columns: 1fr;
  }
}

/* Optional: make each order-item stretch nicely in grid */
#delivered-orders .order-item {
  display: flex;
  flex-direction: column;
}




/* Container for order items */
#delivered-orders {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* responsive grid */
}

/* Individual order item cards */
.order-item {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}

.order-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}

/* Text inside the order card */
.order-item p {
  margin: 6px 0;
  font-size: 0.95rem;
  color: #374151;
  word-break: break-word;
}

/* Review Button */
.review-btn {
  background: var(--primary);
  color: white;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
  transition: background 0.2s ease, transform 0.15s ease;
  margin-top: 10px;
}

.review-btn:hover {
  background: hsl(16, 90%, 45%);
  transform: translateY(-2px);
}

/* Add Review Form */
#add-review {
  background: #fff;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 6px 18px rgba(0,0,0,0.04);
  margin-top: 24px;
}

#add-review h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: #111827;
}

.logout-action.mobile-only{
  display: none;
}
/* Responsive adjustments */
@media (max-width: 767px) {
  #delivered-orders {
    grid-template-columns: 1fr; /* stack on mobile */
  }

  #reviews {
    padding: 15px;
    margin: 15px;
  }

  .order-item {
    padding: 14px;
  }

  .review-btn {
    width: 100%;
  }



/* Optional: make the text span show nicely */
.sidebar ul li.active span {
    display: inline;
    margin-left: 0; /* remove extra space from icon */
}

.logout-action.mobile-only {
    background-color: var(--muted);
    color: var(--muted-foreground);
    border: none;
  
    padding: 6px 13px;
    width: 100%;
    cursor: pointer;
    display: block;
}
}



.review-btn {
  background: hsl(174, 60%, 55%); /* soft teal */
  color: white;
}
.review-btn:hover {
  background: hsl(174, 60%, 45%);
}


@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -260px; /* Hidden off-screen */
        top: 0;
        height: 100%;
        z-index: 1000;
        width: 250px;
        transition: left 0.3s ease;
    }

    .sidebar.open {
        left: 0; /* Slides in when you click the menu button */
    }

    .content {
        width: 100%;
        margin-left: 0;
    }
}

/* ==========================================
   DESKTOP VIEW (Screens wider than 768px)
   ========================================== */
@media screen and (min-width: 769px) {
    /* Hide the mobile hamburger and logout from top bar */
    .m-drawer-trigger, 
    .mobile-only, 
    #drawer-overlay {
        display: none !important;
    }

    /* Force the sidebar to be visible and static on desktop */
    .sidebar {
        display: block !important;
        position: relative;
        left: 0 !important;
        width: 250px;
        min-height: 100vh;
    }

    /* Ensure text is always visible in desktop sidebar */
    .sidebar ul li span, 
    .sidebar h2 {
        display: inline-block !important;
    }

    .dashboard {
        display: flex;
    }
}

/* ==========================================
   MOBILE VIEW (Screens 768px and below)
   ========================================== */
@media screen and (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    /* Setup the Drawer */
    .sidebar {
        position: fixed;
        top: 0;
        left: -280px; /* Hide off-screen by default */
        width: 260px;
        height: 100%;
        z-index: 1100;
        background: white;
        transition: left 0.3s ease-in-out;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }

    /* When mobile menu is toggled open */
    .sidebar.open {
        left: 0;
    }

    /* Show text in the drawer when it's open */
    .sidebar span, .sidebar h2 {
        display: block !important;
    }

    .m-drawer-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1050;
        display: none;
    }
}


@media screen and (max-width: 768px) {
    /* 1. Change the grid to a vertical stack */
    #dashboard-hub .hub-grid {
        display: flex;
        flex-direction: column;
        gap: 0; /* No gap because we will use borders for separation */
        background: var(--card);
        border-radius: 12px;
        overflow: hidden;
        border: 1px solid var(--border);
    }

    /* 2. Transform the card into a horizontal row */
    #dashboard-hub .hub-card {
        display: flex;
        align-items: center; /* Vertically center icon and text */
        padding: 16px 20px;
        background: white;
        border-bottom: 1px solid var(--border);
        transition: background 0.2s;
        text-align: left; /* Ensure text is left-aligned */
        cursor: pointer;
        position: relative;
    }

    /* Remove the bottom border from the last item */
    #dashboard-hub .hub-card:last-child {
        border-bottom: none;
    }

    /* 3. Style the Icon on the left */
    #dashboard-hub .hub-card i {
        font-size: 20px;
        width: 30px; /* Fixed width to keep text aligned */
        margin-right: 15px;
        color: var(--primary); /* Using your orange hsl theme */
        display: flex;
        justify-content: center;
    }

    /* 4. Style the Text (H3 and P) */
    #dashboard-hub .hub-card h3 {
        margin: 0;
        font-size: 1rem;
        font-weight: 500;
        color: var(--foreground);
        flex-grow: 1; /* Pushes the arrow to the right if you add one */
    }

    /* Hide the description paragraph for a cleaner list look, 
       or style it small below the H3 */
    #dashboard-hub .hub-card p {
        display: none; /* In the reference image, it's just one line of text */
    }

    /* 5. Optional: Add the Chevron (Arrow) on the right like the image */
    #dashboard-hub .hub-card::after {
        content: '\f054'; /* FontAwesome Chevron-Right */
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        font-size: 12px;
        color: var(--muted-foreground);
        margin-left: auto;
    }

    /* Hover/Active State */
    #dashboard-hub .hub-card:active {
        background-color: var(--muted);
    }
    .back-to-hub.mobile-only{
      margin: 6px;
      width: fit-content;
    }
}

.section-view {
  display: block;
}

@media (max-width: 768px) {

  .section-view {
    display: none;
  }

  .section-view.active {
    display: block;
  }

  .dashboard {
    min-height: auto; 
    margin-bottom: 80px;
    
  }
  
  .hub-title {
    margin-bottom: 10px;
  }

}

