/* ================= GLOBAL ================= */

body.account_page {
  font-family: "Cairo", sans-serif;
  background: #f2f5f7;
  color: #222;
  margin: 0;
}

/* hidden */
.hidden {
  display: none !important;
}

/* container */
.container {
  width: 94%;
  margin: auto;
  max-width: 1200px;
}

/* ================= LAYOUT ================= */

.account_layout {
  display: flex;
  min-height: calc(100vh - 180px);
  gap: 20px;
}

/* ================= SIDEBAR ================= */

.account_sidebar {
  width: 250px;
  background: #222;
  color: #fff;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-radius: 12px;
}

/* user */
.user_box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* menu */
.menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.menu_item {
  background: none;
  border: none;
  padding: 9px 10px;
  border-radius: 8px;
  text-align: right;
  font-size: 14px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: 0.2s ease;
}

.menu_item:hover,
.menu_item.active {
  background: #5f9ea0;
}

/* logout */
.menu_item.logout {
  background: #c0392b;
  margin-top: auto;
}

/* badge */
.side_badge {
  background: #ff5c5c;
  color: #fff;
  padding: 1px 5px;
  font-size: 10px;
  border-radius: 4px;
  margin-right: auto;
}

/* ================= STATUS ================= */

.status.pending { color: orange; }
.status.shipped { color: #3498db; }
.status.delivered { color: #27ae60; }
.status.cancelled { color: #e74c3c; }

/* ================= MAIN ================= */

.account_main {
  flex: 1;
  padding: 24px;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
}

/* header */
.account_header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

/* notifications */
.notif_icon {
  position: relative;
  cursor: pointer;
  font-size: 18px;
}

.notif_badge {
  position: absolute;
  top: -6px;
  right: -5px;
  background: #ff4757;
  padding: 1px 5px;
  font-size: 10px;
  border-radius: 6px;
  color: #fff;
}

/* ================= TABS ================= */

.tab_content {
  display: none;
}

.tab_content.active {
  display: block;
}

/* ================= MOBILE ================= */

@media (max-width: 768px) {

  .account_layout {
    flex-direction: column;
  }

  /* 🔥 أهم تعديل: السايدبار تبقى فوق */
  .account_sidebar {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    gap: 10px;
    padding: 10px;
  }

  .menu {
    flex-direction: row;
    gap: 8px;
    width: 100%;
    overflow-x: auto;
  }

  .menu_item {
    white-space: nowrap;
    font-size: 13px;
    padding: 8px 10px;
  }

  /* نخبي user box عشان المساحة */
  .user_box {
    display: none;
  }

  /* main */
  .account_main {
    padding: 16px;
  }

}
/* ================= CARDS ================= */

.card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-soft);
}

.card h3 {
  margin-top: 0;
  font-size: 1rem;
}

/* stat cards */
.card.stat {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #5f9ea0;
  color: #fff;
  cursor: pointer;
  transition: 0.25s ease;
}

.card.stat:hover {
  transform: translateY(-3px);
}

/* grid */
.grid_3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

/* ================= FORMS ================= */

.address_form input {
  width: 100%;
  border: 1px solid var(--border);
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: 0.2s;
}

.address_form input:focus {
  border-color: var(--main-color);
  outline: none;
}

/* ================= BUTTONS ================= */

.btn_primary {
  background: linear-gradient(135deg,#1b6ca8,#0f4c75,#2ec4b6);
  color: #fff;
  border: none;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: 0.25s ease;
}

.btn_primary:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

/* wishlist */
.wishlist_btn i {
  color: #555;
  font-size: 18px;
}

.wishlist_btn.active i {
  color: #e53935;
}

/* ================= TOAST (UNIFIED 🔥) ================= */

.toast {
  position: fixed;
  bottom: 20px;
  inset-inline-start: 20px;

  background: #111;
  color: #fff;

  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;

  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;

  transition: 0.3s ease;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ================= MOBILE ================= */

@media (max-width: 768px) {

  /* cards */
  .card {
    padding: 14px;
  }

  .card h3 {
    font-size: 0.9rem;
  }

  /* grid */
  .grid_3 {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  /* inputs */
  .address_form input {
    font-size: 0.85rem;
    padding: 9px;
  }

  /* button */
  .btn_primary {
    width: 100%;
    font-size: 0.85rem;
  }

}
/* ================= DELETE BUTTON ================= */

.btn_danger {
  background: linear-gradient(135deg, #c0392b, #e74c3c);
  color: #fff;
  border: none;

  padding: 9px 14px;
  border-radius: 10px;

  font-size: 0.9rem;
  font-weight: 600;

  cursor: pointer;
  transition: 0.25s ease;

  display: inline-flex;
  align-items: center;
  gap: 6px;

  box-shadow: 0 6px 15px rgba(231, 76, 60, 0.25);
}

.btn_danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(231, 76, 60, 0.3);
}

.btn_danger:active {
  transform: scale(0.96);
}

.btn_danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ================= ORDER ACTIONS ================= */

.order_actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

/* ================= NOTIFICATIONS ================= */

.notif_item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  padding: 8px 10px;
  border-radius: 8px;
  transition: 0.2s ease;
}

.notif_item:hover {
  background: #f5f5f5;
}

.notif_text {
  flex: 1;
  font-size: 0.9rem;
}

/* delete icon */
.notif_delete {
  background: transparent;
  border: none;
  color: #999;
  font-size: 15px;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: 0.2s ease;
}

.notif_delete:hover {
  background: rgba(231, 76, 60, 0.12);
  color: #e74c3c;
  transform: scale(1.1);
}

.notif_delete:active {
  transform: scale(0.9);
}

/* ================= MOBILE ================= */

@media (max-width: 768px) {

  /* buttons */
  .btn_danger {
    width: 100%;
    justify-content: center;
    font-size: 0.85rem;
  }

  /* actions */
  .order_actions {
    flex-direction: column;
    gap: 6px;
  }

  /* notifications */
  .notif_text {
    font-size: 0.85rem;
  }

}