﻿/* ط¥ط¹ط¯ط§ط¯ ط¹ط§ظ… ظ„ظ„ظ…ظˆظ‚ط¹ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Cairo", Arial, sans-serif;
  direction: rtl;
  text-align: right;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
}

/* Prevent horizontal shifting when vertical scrollbar appears/disappears */
html, body { overflow-x: hidden; }
body { overflow-y: scroll; -webkit-overflow-scrolling: touch; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: linear-gradient(135deg, #2c3e50, #34495e, #2c3e50);
  color: white;
  padding: 0.5rem 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  border-bottom: 3px solid rgba(52, 152, 219, 0.3);
  position: relative;
  /* Allow dropdowns to escape header area (so menus aren't clipped) */
  overflow: visible !important;
}

.header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(52, 152, 219, 0.1),
    transparent
  );
  animation: headerGlow 4s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes headerGlow {
  0% {
    opacity: 0.3;
    transform: translateX(-100%);
  }
  100% {
    opacity: 0.7;
    transform: translateX(100%);
  }
}

.header .container {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 1rem;
  max-width: 1400px;
  padding: 0 1rem;
}

.logo {
  text-align: right;
  flex: 0 0 auto;
  order: 1;
  margin-left: 1.5rem;
}

.logo h1 {
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(45deg, #ffd700, #ffa500, #ff6b35);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  line-height: 1;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  animation: logoGlow 3s ease-in-out infinite alternate;
  letter-spacing: 1px;
}

@keyframes logoGlow {
  0% {
    filter: brightness(1);
  }
  100% {
    filter: brightness(1.2);
  }
}

.tagline {
  color: #ecf0f1;
  font-size: 0.75rem;
  margin: 0.2rem 0 0 0;
  opacity: 0.9;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.header-actions {
  text-align: left;
  flex: 0 0 auto;
  min-width: 120px;
  order: 3;
  margin-right: auto;
}

.nav {
  display: flex;
  justify-content: flex-start;
  flex: 1 1 auto;
  order: 2;
  position: relative; /* ensure absolute children are positioned correctly */
  z-index: 2000;
}

.nav ul {
  list-style: none;
  display: flex;
  gap: 0.3rem;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  padding: 0.6rem 1.2rem;
  border-radius: 40px;
  backdrop-filter: blur(15px);
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  /* keep items in a single line and allow dropdowns to overflow without creating scrollbars */
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow: visible;
}

/* Ensure admin nav item is always visible and prominent */
#admin-nav-link {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  visibility: visible !important;
  opacity: 1 !important;
  margin: 0 4px;
}

#admin-nav-link a {
  background: linear-gradient(135deg, #f1c40f, #f39c12) !important;
  color: #1f2d3d !important;
  font-weight: 800 !important;
  border: 1px solid rgba(0,0,0,0.08) !important;
  box-shadow: 0 6px 18px rgba(243,156,18,0.18) !important;
}

/* Make the nav scrollbar visible and easier to use on desktop */
.nav ul::-webkit-scrollbar {
  height: 8px;
}
.nav ul::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
}
.nav ul::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.03);
}

.nav a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  padding: 0.7rem 1rem;
  border-radius: 22px;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
  white-space: nowrap;
  text-align: center;
  min-width: 110px; /* slightly wider for consistent pill look */
  letter-spacing: 0.3px;
  font-family: "Cairo", Arial, sans-serif;
}

.nav a::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.nav a:hover::before {
  left: 100%;
}

.nav a:hover {
  background: linear-gradient(135deg, #3498db, #2980b9, #1abc9c);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(52, 152, 219, 0.5);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.nav a:active {
  transform: translateY(-1px) scale(1.02);
}

.nav a.active {
  background: linear-gradient(135deg, #27ae60, #2ecc71, #16a085) !important;
  color: white !important;
  box-shadow: 0 8px 25px rgba(39, 174, 96, 0.5) !important;
  border-color: rgba(255, 255, 255, 0.6) !important;
}

/* Auth dropdown styles */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  background: rgba(255,255,255,0.12);
  color: white;
  border: 1px solid rgba(255,255,255,0.22);
  padding: 0.6rem 1rem;
  border-radius: 22px;
  cursor: pointer;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav-dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: #fff;
  color: #222;
  min-width: 180px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  overflow: hidden;
  z-index: 1200;
}
.nav-dropdown-menu a {
  display: block;
  padding: 10px 14px;
  color: #222;
  text-decoration: none;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.nav-dropdown-menu a:hover { background: #f6f8fa; }
.nav-dropdown.open .nav-dropdown-menu { display: block; }

/* Fallback: open dropdown when focused (no-JS fallback for accessibility) */
.nav-dropdown:focus-within .nav-dropdown-menu { display: block; }
.nav-dropdown-toggle:focus { outline: 2px solid rgba(102,126,234,0.6); }

/* Hover fallback: show dropdown on hover for immediate UX if JS is blocked */
.nav-dropdown .nav-dropdown-toggle { cursor: pointer; }
.nav-dropdown .nav-dropdown-menu { z-index: 9999; }

/* Ensure auth dropdown links are black (user requested) */
.nav-dropdown-menu a { color: #000 !important; }

/* Stronger, specific selectors to guarantee dropdown link color overrides other nav rules */
.nav .nav-dropdown .nav-dropdown-menu a,
.nav .nav-dropdown .nav-dropdown-menu a:link,
.nav .nav-dropdown .nav-dropdown-menu a:visited,
.nav .nav-dropdown .nav-dropdown-menu a:hover,
.nav .nav-dropdown .nav-dropdown-menu a:active {
  color: #000 !important;
}

/* Navigation Menu Enhanced Effects */
.nav ul {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.nav a:nth-child(odd) {
  animation-delay: 0.1s;
}

.nav a:nth-child(even) {
  animation-delay: 0.2s;
}

/* Hover Effect for entire navigation */
.nav:hover ul {
  box-shadow: 0 15px 50px rgba(52, 152, 219, 0.3);
  background: rgba(255, 255, 255, 0.15);
}

/* Logo Enhancement */
.logo:hover h1 {
  animation: logoScale 0.6s ease-in-out;
  filter: brightness(1.3);
}

@keyframes logoScale {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* Loading state for navigation links */
.nav a.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 10px;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  transform: translateY(-50%);
}

/* Menu item counter animation */
.nav a[data-count]::after {
  content: attr(data-count);
  position: absolute;
  top: -8px;
  right: -8px;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: bold;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4);
}

.cart-link {
  background: linear-gradient(135deg, #e74c3c, #c0392b, #e67e22) !important;
  color: white !important;
  position: relative;
  padding: 0.7rem 1.2rem !important;
  border-radius: 25px !important;
  font-weight: 700 !important;
  letter-spacing: 0.3px !important;
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4) !important;
  border: 2px solid rgba(255, 255, 255, 0.4) !important;
  animation: cartPulse 2s ease-in-out infinite alternate !important;
  min-width: 120px !important;
  text-align: center !important;
  font-size: 0.9rem !important;
}

/* Make the admin nav visible even when not logged in; visually indicate read-only */
.disabled-admin {
  opacity: 0.95;
  filter: grayscale(10%);
  pointer-events: auto; /* keep clickable so tooltip or info can appear */
}

.disabled-admin a {
  opacity: 0.95;
  font-weight: 700; /* match others */
}

/* Ensure menu items have equal vertical rhythm */
.nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
}

@keyframes cartPulse {
  0% {
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
    transform: scale(1);
  }
  100% {
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.6);
    transform: scale(1.02);
  }
}

.cart-link:hover {
  background: linear-gradient(135deg, #c0392b, #a93226, #d35400) !important;
  transform: translateY(-4px) scale(1.08) !important;
  box-shadow: 0 12px 30px rgba(231, 76, 60, 0.7) !important;
  animation: none !important;
}

.cart-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.cart-icon {
  font-size: 1rem;
}

.cart-text {
  font-size: 0.7rem;
  font-weight: 600;
}

.cart-badge {
  background: linear-gradient(135deg, #f39c12, #e67e22, #d68910);
  color: white;
  border-radius: 50%;
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 900;
  min-width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(243, 156, 18, 0.5);
  border: 3px solid #fff;
  position: absolute;
  top: -8px;
  right: -8px;
  animation: badgeBounce 0.6s ease-in-out;
  z-index: 10;
}

@keyframes badgeBounce {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
}

.cart-badge.updated {
  animation: badgeUpdate 0.8s ease-in-out;
}

@keyframes badgeUpdate {
  0% {
    transform: scale(1);
    background: linear-gradient(135deg, #f39c12, #e67e22);
  }
  50% {
    transform: scale(1.4);
    background: linear-gradient(135deg, #e74c3c, #c0392b);
  }
  100% {
    transform: scale(1);
    background: linear-gradient(135deg, #f39c12, #e67e22);
  }
}

/* Sections */
.section {
  display: none;
  padding: 3rem 0;
  min-height: calc(100vh - 200px);
}

.section.active {
  display: block;
}

.section h2 {
  text-align: center;
  margin-bottom: 2.5rem;
  font-size: 2.8rem;
  background: linear-gradient(45deg, #2c3e50, #34495e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 1px;
}

.section h3 {
  margin: 2.5rem 0 1.5rem 0;
  font-size: 2rem;
  color: #2c3e50;
  text-align: center;
  position: relative;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.5px;
}

.section h3:after {
  content: "";
  display: block;
  width: 100px;
  height: 3px;
  background: linear-gradient(45deg, #3498db, #2980b9);
  margin: 0.5rem auto;
  border-radius: 2px;
}

/* Grid Layout */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 3rem 0;
  padding: 0 1rem;
}

/* Home Page Grids */
#my-ads-home-grid,
#user-ads-home-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 3rem 0;
  padding: 0 1rem;
}

/* Product Cards */
.product-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  margin: 12px 0;
  padding: 16px;
  max-width: 100%;
  overflow: hidden;
  position: relative;
  border: 2px solid transparent;
}

.product-card .image-container {
  width: 100%;
  text-align: center;
}

.product-card img,
.product-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

@media (max-width: 600px) {
  .product-card {
    padding: 10px;
    font-size: 15px;
  }
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border-color: #3498db;
}

.product-image-container {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.product-image.active {
  opacity: 1;
}

.product-image:only-child {
  opacity: 1;
  position: relative;
}

.image-counter {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  z-index: 2;
}

.product-info {
  padding: 1.5rem;
}

.product-category {
  font-size: 0.85rem;
  color: #3498db;
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  margin-bottom: 0.5rem;
  display: inline-block;
  font-weight: 500;
}

.product-name {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: #2c3e50;
  line-height: 1.4;
  letter-spacing: 0.3px;
}

.product-description {
  color: #555;
  margin-bottom: 1.2rem;
  line-height: 1.7;
  font-size: 0.95rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  letter-spacing: 0.2px;
}

.product-price {
  font-size: 1.6rem;
  font-weight: 800;
  color: #e74c3c;
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
}

.product-contact {
  color: #27ae60;
  font-weight: 700;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  letter-spacing: 0.3px;
}

.btn {
  padding: 0.8rem 1.6rem;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  line-height: 1.2;
  font-family: "Cairo", Arial, sans-serif;
}

.btn-primary {
  background: linear-gradient(45deg, #3498db, #2980b9);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(45deg, #2980b9, #21618c);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.btn-success {
  background: linear-gradient(45deg, #27ae60, #229954);
  color: white;
}

.btn-success:hover {
  background: linear-gradient(45deg, #229954, #1e8449);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
}

.btn-danger {
  background: linear-gradient(45deg, #e74c3c, #c0392b);
  color: white;
}

.btn-danger:hover {
  background: linear-gradient(45deg, #c0392b, #a93226);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

.btn-warning {
  background: linear-gradient(45deg, #f39c12, #e67e22);
  color: white;
}

.btn-warning:hover {
  background: linear-gradient(45deg, #e67e22, #d68910);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(243, 156, 18, 0.4);
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  min-height: 50px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-lg:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.btn-checkout-large {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  padding: 1.2rem 3rem;
  font-size: 1.4rem;
  font-weight: 700;
  border: none;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
  width: 100%;
  margin: 2rem 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-checkout-large:hover {
  background: linear-gradient(135deg, #c0392b, #a93226);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(231, 76, 60, 0.6);
  animation: pulse 0.6s infinite alternate;
}

@keyframes pulse {
  from {
    box-shadow: 0 10px 30px rgba(231, 76, 60, 0.6);
  }
  to {
    box-shadow: 0 15px 40px rgba(231, 76, 60, 0.8);
  }
}

/* Modal Images Gallery */
.modal-images-gallery {
  margin-bottom: 2rem;
  display: grid;
  gap: 1rem;
  border-radius: 15px;
  overflow: hidden;
}

/* ط¹ط±ط¶ طµظˆط±ط© ظˆط§ط­ط¯ط© */
.modal-images-gallery:has(.modal-gallery-image:only-child) {
  grid-template-columns: 1fr;
}

/* ط¹ط±ط¶ طµظˆط±طھظٹظ† */
.modal-images-gallery:has(.modal-gallery-image:nth-child(2):last-child) {
  grid-template-columns: 1fr 1fr;
}

/* ط¹ط±ط¶ ط«ظ„ط§ط« طµظˆط± */
.modal-images-gallery:has(.modal-gallery-image:nth-child(3):last-child) {
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.modal-images-gallery:has(.modal-gallery-image:nth-child(3):last-child)
  .modal-gallery-image:first-child {
  grid-row: 1 / 3;
}

/* ط¹ط±ط¶ ط£ط±ط¨ط¹ طµظˆط± */
.modal-images-gallery:has(.modal-gallery-image:nth-child(4):last-child) {
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.modal-images-gallery:has(.modal-gallery-image:nth-child(4):last-child)
  .modal-gallery-image:first-child {
  grid-row: 1 / 3;
}

.modal-images-gallery:has(.modal-gallery-image:nth-child(4):last-child)
  .modal-gallery-image:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}

.modal-images-gallery:has(.modal-gallery-image:nth-child(4):last-child)
  .modal-gallery-image:nth-child(3) {
  grid-column: 3;
  grid-row: 1;
}

.modal-images-gallery:has(.modal-gallery-image:nth-child(4):last-child)
  .modal-gallery-image:nth-child(4) {
  grid-column: 2 / 4;
  grid-row: 2;
}

.modal-gallery-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.modal-gallery-image:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* ظ„ظ„طµظˆط±ط© ط§ظ„ط£ظˆظ„ظ‰ ظپظٹ ط­ط§ظ„ط© 3 طµظˆط± */
.modal-images-gallery:has(.modal-gallery-image:nth-child(3):last-child)
  .modal-gallery-image:first-child {
  height: 100%;
}

/* ط¹ط±ط¶ ظ…طھط¬ط§ظˆط¨ */
@media (max-width: 1024px) and (min-width: 769px) {
  .grid,
  #my-ads-home-grid,
  #user-ads-home-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .grid,
  #my-ads-home-grid,
  #user-ads-home-grid {
    grid-template-columns: 1fr !important;
  }

  .categories-grid {
    grid-template-columns: 1fr !important;
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .social-icons {
    grid-template-columns: 1fr;
  }

  .cart-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .cart-summary {
    flex-direction: column;
    gap: 0.5rem;
  }

  .cart-item {
    flex-direction: column;
    text-align: center;
  }

  .checkout-form .form-row {
    grid-template-columns: 1fr;
  }

  .checkout-buttons {
    flex-direction: column;
    gap: 1.5rem;
  }

  .main-checkout-button {
    max-width: 100%;
  }

  .actions-row {
    flex-direction: column;
  }

  .modal-images-gallery {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
  }

  .modal-gallery-image {
    height: 200px;
  }

  .modal-images-gallery:has(.modal-gallery-image:nth-child(3):last-child)
    .modal-gallery-image:first-child {
    grid-row: auto !important;
    height: 200px !important;
  }

  /* ط£ط²ط±ط§ط± ط§ظ„ظ…ظ†طھط¬ ظپظٹ ط§ظ„ظ…ظˆط¨ط§ظٹظ„ */
  .product-actions {
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .product-actions .btn {
    font-size: 0.85rem;
    padding: 0.6rem 0.8rem;
    min-height: 38px;
    flex: 1;
  }

  .product-actions .btn i {
    font-size: 0.9rem;
  }
}

/* Edit Modal */
#edit-ad-modal .modal-content {
  max-width: 700px;
  margin: 3% auto;
}

/* Current Images Display */
.current-images {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 10px;
  border: 2px dashed #ddd;
}

.current-image {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.current-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.current-image .remove-image {
  position: absolute;
  top: 5px;
  right: 5px;
  background: #e74c3c;
  color: white;
  border: none;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.current-image .remove-image:hover {
  background: #c0392b;
  transform: scale(1.1);
}

.edit-images-note {
  background: #e3f2fd;
  padding: 1rem;
  border-radius: 8px;
  border-right: 4px solid #2196f3;
  margin-top: 1rem;
}

.edit-images-note p {
  margin: 0;
  color: #1976d2;
  font-size: 0.9rem;
}

.no-current-images {
  text-align: center;
  color: #666;
  font-style: italic;
  padding: 2rem;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  border-radius: 10px 10px 0 0;
  margin: -2rem -2rem 2rem -2rem;
}

.modal-header h3 {
  margin: 0;
  color: white;
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

.btn-secondary {
  background: linear-gradient(45deg, #95a5a6, #7f8c8d);
  color: white;
}

.btn-secondary:hover {
  background: linear-gradient(45deg, #7f8c8d, #6c7b7d);
}

/* Product Action Buttons */
.product-actions {
  display: flex;
  gap: 0.3rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
  flex-wrap: nowrap;
}

.product-actions .btn {
  flex: 1;
  padding: 0.6rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  text-decoration: none;
}

.btn-details {
  background: linear-gradient(45deg, #3498db, #2980b9);
  color: white;
}

.btn-details:hover {
  background: linear-gradient(45deg, #2980b9, #21618c);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.btn-cart {
  background: linear-gradient(45deg, #27ae60, #229954);
  color: white;
}

.btn-cart:hover {
  background: linear-gradient(45deg, #229954, #1e8449);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
}

.btn-edit {
  background: linear-gradient(45deg, #f39c12, #e67e22);
  color: white;
}

.btn-edit:hover {
  background: linear-gradient(45deg, #e67e22, #d68910);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(243, 156, 18, 0.4);
}

.product-actions .btn i {
  font-size: 0.8rem;
}

.product-actions .btn span {
  font-size: 0.7rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #2c3e50;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid #ddd;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Add Ad Form */
.ad-form {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.image-uploads {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.image-upload {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 10px;
  border: 2px dashed #ddd;
  transition: all 0.3s ease;
}

.image-upload:hover {
  border-color: #3498db;
  background: #ebf3fd;
}

.image-upload input[type="file"] {
  flex: 1;
}

.file-status {
  color: #666;
  font-style: italic;
}

/* Agreement Section */
.agreement {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 2rem;
  border-radius: 15px;
  border: 3px solid #3498db;
  box-shadow: 0 10px 30px rgba(52, 152, 219, 0.2);
  margin: 2rem 0;
}

.agreement h3 {
  color: #2c3e50;
  font-size: 1.4rem;
  margin-bottom: 1rem;
  text-align: center;
  font-weight: 700;
}

.agreement-text {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  max-height: 300px;
  overflow-y: auto;
  border: 2px solid #e9ecef;
  font-size: 1rem;
  line-height: 1.8;
}

.agreement-text p {
  margin-bottom: 1rem;
}

.agreement-text p:first-child {
  text-align: center;
  font-weight: 700;
  color: #27ae60;
  font-size: 1.1rem;
  border-bottom: 2px solid #27ae60;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.agreement-text p:nth-child(2) {
  text-align: center;
  font-style: italic;
  color: #3498db;
  font-size: 1rem;
  background: #ebf3fd;
  padding: 1rem;
  border-radius: 8px;
  border-right: 4px solid #3498db;
}

.agreement-text p:contains("ط§طھط¹ظ‡ط¯") {
  color: #e74c3c;
  font-weight: 600;
  background: #fff5f5;
  padding: 0.8rem;
  border-radius: 6px;
  border-right: 3px solid #e74c3c;
}

.agreement-text p:contains("ظƒظ…ط§ ط£طھط¹ظ‡ط¯") {
  color: #e67e22;
  font-weight: 600;
  background: #fef9e7;
  padding: 0.8rem;
  border-radius: 6px;
  border-right: 3px solid #e67e22;
}

.agreement-text p strong {
  color: #c0392b;
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
  font-weight: 700;
  color: #2c3e50;
  background: #ffffff;
  padding: 1rem;
  border-radius: 10px;
  border: 2px solid #3498db;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.checkbox-container:hover {
  background: #ebf3fd;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.checkbox-container input[type="checkbox"] {
  width: auto;
  margin: 0;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  inset: 0; /* top:0; right:0; bottom:0; left:0 */
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  /* use flex centering so modal content is centered on small screens */
  align-items: center;
  justify-content: center;
  padding: 1rem; /* keep some breathing room on very small viewports */
  overflow-y: auto; /* allow scrolling if modal content is tall */
}

.modal-content {
  background-color: white;
  margin: 0 auto;
  padding: 1.25rem;
  border-radius: 12px;
  width: 92vw;
  max-width: 800px;
  position: relative;
  max-height: 90vh; /* ensure modal never exceeds viewport height */
  overflow-y: auto; /* internal scroll for long content */
}

/* Ensure modal content uses box-sizing and smooth touch scrolling on mobile */
.modal-content, .modal-content * {
  box-sizing: border-box;
}
.modal {
  -webkit-overflow-scrolling: touch; /* smooth scrolling on iOS */
}

/* Footer/account number: allow long numbers and content to wrap on small screens */
.footer, .footer * {
  box-sizing: border-box;
}
.footer-value {
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: normal !important;
}

/* Defensive: ensure grid containers don't create horizontal overflow */
.container, .grid {
  min-width: 0; /* allow children to shrink and wrap inside flex/grid */
}

/* Ensure any fixed-position overlays (dynamic modals) are centered and constrained */
div[style*="position: fixed"][style*="z-index"] {
  box-sizing: border-box;
  max-width: 100vw;
}

.close {
  color: #aaa;
  float: left;
  font-size: 28px;
  font-weight: bold;
  position: absolute;
  top: 10px;
  left: 20px;
  cursor: pointer;
}

.close:hover {
  color: #e74c3c;
}

/* Product Images in Modal */
.modal-images {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.modal-image {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.modal-image:hover {
  transform: scale(1.05);
}

/* Cart Styles */
.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 1.5rem 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.cart-header h2 {
  margin: 0;
  color: #2c3e50;
  font-size: 1.5rem;
}

.cart-header h2 i {
  color: #3498db;
  margin-left: 0.5rem;
}

.cart-summary {
  display: flex;
  gap: 2rem;
  color: #7f8c8d;
  font-weight: 600;
}

.total-items,
.total-price {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-content {
  min-height: 300px;
}

.cart-items-container {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  border: 1px solid #ecf0f1;
  border-radius: 12px;
  margin-bottom: 1rem;
  background: #fafbfc;
  transition: all 0.3s ease;
}

.cart-item:hover {
  border-color: #3498db;
  box-shadow: 0 5px 15px rgba(52, 152, 219, 0.1);
}

.cart-item:last-child {
  margin-bottom: 0;
}

.cart-item-image {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid #ecf0f1;
}

.cart-item-info {
  flex: 1;
}

.cart-item-info h4 {
  margin: 0 0 0.5rem 0;
  color: #2c3e50;
  font-size: 1.1rem;
}

.cart-item-info p {
  margin: 0;
  color: #7f8c8d;
  font-size: 0.9rem;
}

.cart-item-price {
  color: #e74c3c;
  font-weight: bold;
  font-size: 1.1rem;
  margin-left: 1rem;
}

.empty-cart {
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.empty-cart-icon {
  font-size: 4rem;
  color: #bdc3c7;
  margin-bottom: 1rem;
}

.empty-cart h3 {
  color: #7f8c8d;
  margin-bottom: 0.5rem;
}

.empty-cart p {
  color: #95a5a6;
  margin-bottom: 2rem;
}

.cart-actions {
  background: white;
  padding: 1.5rem 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.actions-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.checkout-section {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  margin-top: 2rem;
}

.checkout-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #ecf0f1;
}

.checkout-header h3 {
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.checkout-header i {
  color: #27ae60;
  margin-left: 0.5rem;
}

.checkout-header p {
  color: #7f8c8d;
  margin: 0;
}

.checkout-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.checkout-form label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #2c3e50;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.checkout-form label i {
  color: #3498db;
}

.checkout-summary {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 10px;
  border: 2px solid #ecf0f1;
  margin: 2rem 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.8rem;
  color: #2c3e50;
}

.summary-row:last-child {
  margin-bottom: 0;
}

.summary-row.total {
  font-weight: bold;
  font-size: 1.1rem;
  color: #27ae60;
  padding-top: 0.8rem;
  border-top: 2px solid #ecf0f1;
}

.checkout-buttons {
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
}

.main-checkout-button {
  flex: 1;
  text-align: center;
  max-width: 400px;
}

.checkout-note {
  color: #7f8c8d;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.btn-main-checkout {
  width: 100%;
  padding: 1.5rem 2rem !important;
  font-size: 1.2rem !important;
  font-weight: 600 !important;
  border-radius: 15px !important;
  background: linear-gradient(135deg, #27ae60, #2ecc71) !important;
  box-shadow: 0 8px 25px rgba(39, 174, 96, 0.3) !important;
  transition: all 0.3s ease !important;
  border: none !important;
  position: relative;
  overflow: hidden;
}

.btn-main-checkout:hover {
  background: linear-gradient(135deg, #219a52, #27ae60) !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 12px 35px rgba(39, 174, 96, 0.4) !important;
}

.btn-main-checkout:active {
  transform: translateY(-1px) !important;
}

.checkout-guarantee {
  color: #27ae60;
  margin-top: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.btn-large {
  padding: 1rem 2rem !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
}

.clear-cart {
  background: linear-gradient(45deg, #e74c3c, #c0392b);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.clear-cart:hover {
  background: linear-gradient(45deg, #c0392b, #a93226);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

/* Buyer Info */
.buyer-info {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  margin-top: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 2rem 0;
}

.pagination button {
  padding: 0.7rem 1.2rem;
  border: 2px solid #3498db;
  background: white;
  color: #3498db;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.pagination button:hover,
.pagination button.active {
  background: #3498db;
  color: white;
  transform: translateY(-2px);
}

/* Admin Panel */
.admin-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  background: white;
  padding: 1rem;
  border-radius: 10px;
}

.admin-tab {
  flex: 1;
  padding: 0.7rem;
  border: none;
  background: #f8f9fa;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.admin-tab.active,
.admin-tab:hover {
  background: linear-gradient(45deg, #3498db, #2980b9);
  color: white;
}

.admin-section {
  display: none;
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.admin-section.active {
  display: block;
}

/* Orders and Messages */
.order-item,
.message-item {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  border-right: 4px solid #3498db;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #ddd;
}

.invoice-number {
  background: #3498db;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

.order-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.buyer-info,
.order-summary {
  background: white;
  padding: 1rem;
  border-radius: 6px;
}

.order-product {
  background: white;
  padding: 0.5rem;
  margin: 0.25rem 0;
  border-radius: 4px;
  border-right: 3px solid #27ae60;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.item-status {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 15px;
  background: #f8f9fa;
}

.order-actions {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.5rem;
  justify-content: flex-end;
  flex-wrap: wrap;
  padding: 1rem 0;
  border-top: 1px solid #eee;
}

/* Terms Content */
.terms-content {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  line-height: 1.8;
}

.terms-content ul {
  padding-right: 2rem;
  margin-bottom: 2rem;
}

.terms-content li {
  margin-bottom: 0.5rem;
  color: #666;
}

/* Contact Section */
.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 2rem;
}

.contact-info {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #eee;
}

.info-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.info-item i {
  font-size: 1.5rem;
  color: #3498db;
  margin-top: 0.2rem;
  min-width: 24px;
}

.info-item h3 {
  color: #2c3e50;
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.info-item p {
  color: #7f8c8d;
  margin: 0;
  line-height: 1.5;
}

.social-links {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
}

.social-links h3 {
  color: #2c3e50;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.social-icons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem;
  background: #f8f9fa;
  border-radius: 8px;
  text-decoration: none;
  color: #2c3e50;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: #3498db;
  color: white;
  transform: translateY(-2px);
}

.social-link i {
  font-size: 1.2rem;
}

.contact-form-container {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.contact-form-container h3 {
  color: #2c3e50;
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
  text-align: center;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.required {
  color: #e74c3c;
}

/* Contact Form */
.contact-form,
.login-form {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  margin: 0 auto;
}

/* Login Button */
.btn-login {
  width: 100%;
  padding: 1rem 2rem;
  font-size: 1.2rem;
  font-weight: 600;
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.btn-login:hover {
  background: linear-gradient(135deg, #2980b9, #1f5f99);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
}

/* Login Status */
#login-status {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
}

.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* User Dashboard */
.user-dashboard {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-radius: 15px;
  padding: 2rem;
  margin-top: 1rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.user-avatar {
  font-size: 3rem;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3498db, #2980b9);
  border-radius: 50%;
  color: white;
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.user-details h3 {
  margin: 0;
  font-size: 1.5rem;
  color: #2c3e50;
  font-weight: 700;
}

.user-role {
  color: #3498db;
  font-weight: 600;
  font-size: 1rem;
  margin: 0.5rem 0;
}

.user-email {
  color: #666;
  font-size: 0.9rem;
  margin: 0;
}

.user-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.user-actions .btn {
  flex: 1;
  min-width: 150px;
  padding: 0.8rem 1.2rem;
}

/* Password Strength Indicator */
.password-strength {
  margin-top: 0.5rem;
  padding: 0.5rem;
  border-radius: 5px;
  font-size: 0.9rem;
  font-weight: 600;
}

.strength-ط¶ط¹ظٹظپ {
  background: #ffebee;
  color: #c62828;
}

.strength-ظ…طھظˆط³ط· {
  background: #fff3e0;
  color: #ef6c00;
}

.strength-ظ‚ظˆظٹ {
  background: #e8f5e8;
  color: #2e7d32;
}

.strength-ظ‚ظˆظٹ-ط¬ط¯ط§ظ‹ {
  background: #e3f2fd;
  color: #1565c0;
}

/* Password Requirements */
.password-requirements {
  margin: 1rem 0;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-right: 4px solid #3498db;
}

.password-requirements h4 {
  margin: 0 0 0.5rem 0;
  color: #2c3e50;
  font-size: 1rem;
}

.password-requirements ul {
  margin: 0;
  padding-right: 1.5rem;
  list-style: none;
}

.password-requirements li {
  margin: 0.3rem 0;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.requirement-met {
  color: #27ae60;
  font-weight: 600;
}

.requirement-unmet {
  color: #e74c3c;
}

/* Admin Tools Styling */
.admin-only {
  display: none;
}

.admin-tools-panel {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 1.5rem;
  border-radius: 10px;
  margin: 1rem 0;
}

.admin-tools-panel h3 {
  color: white;
  margin-bottom: 1rem;
}

/* Enhanced Modal for Password Change */
#change-password-modal .modal-content {
  max-width: 600px;
}

#change-password-modal .form-group {
  margin-bottom: 1.5rem;
}

#change-password-modal input {
  padding: 0.8rem;
  font-size: 1rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  transition: border-color 0.3s ease;
}

#change-password-modal input:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Footer */
.footer {
  background: linear-gradient(135deg, #2c3e50, #34495e);
  color: white;
  padding: 0.8rem 0 0.4rem 0;
  margin-top: 2rem;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 0.3rem 0;
}

.footer-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.footer-label {
  color: #ffd700;
  font-weight: 600;
  white-space: nowrap;
}

.footer-value {
  color: #ecf0f1;
  opacity: 0.95;
}

.footer-section h3 {
  margin-bottom: 0.4rem;
  color: #ffd700;
  font-size: 1rem;
  font-weight: 700;
}

.footer-section p {
  margin: 0.2rem 0;
  font-size: 0.8rem;
  line-height: 1.4;
  opacity: 0.95;
}

.footer-bottom {
  text-align: center;
  padding-top: 0.4rem;
  border-top: 1px solid #555;
  margin-top: 0.5rem;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.75rem;
  opacity: 0.9;
}

/* Mobile Navigation Improvements */
@media (max-width: 1024px) {
  .header .container {
    flex-direction: column;
    gap: 1.5rem;
  }

  .nav ul {
    padding: 0.5rem 1rem;
    gap: 0.3rem;
  }

  .nav a {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .header {
    padding: 0.8rem 0;
  }

  .nav ul {
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
  }

  .nav a {
    width: 100%;
    text-align: center;
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    border-radius: 15px;
  }

  .cart-link {
    padding: 1rem 1.5rem !important;
    font-size: 1rem !important;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .logo h1 {
    font-size: 1.8rem;
  }

  .image-upload {
    flex-direction: column;
    align-items: stretch;
  }

  .modal-content {
    width: 95%;
    margin: 2% auto;
    padding: 1rem;
  }

  .pagination {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 10px;
  }

  .section h2 {
    font-size: 2rem;
  }

  .header {
    padding: 0.6rem 0;
  }

  .logo h1 {
    font-size: 1.6rem;
  }

  .tagline {
    font-size: 0.75rem;
  }

  .nav ul {
    gap: 0.4rem;
    padding: 0.8rem;
    border-radius: 15px;
  }

  .nav a {
    padding: 0.7rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 12px;
  }

  .cart-link {
    padding: 0.8rem 1.2rem !important;
    font-size: 0.9rem !important;
  }

  .cart-badge {
    min-width: 20px;
    height: 20px;
    font-size: 0.7rem;
    top: -6px;
    right: -6px;
  }

  .cart-content {
    gap: 0.2rem;
  }

  .cart-text {
    font-size: 0.7rem;
  }

  .product-card {
    margin: 0.5rem 0;
  }

  /* Compact mobile navigation */
  .nav ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
  }

  .cart-link {
    grid-column: 1 / -1;
  }
}

/* Animation Classes */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in {
  animation: slideIn 0.3s ease-in-out;
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Success Messages */
.success-message {
  background: linear-gradient(45deg, #27ae60, #229954);
  color: white;
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
  text-align: center;
  font-weight: 600;
}

/* Error Messages */
.error-message {
  background: linear-gradient(45deg, #e74c3c, #c0392b);
  color: white;
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
  text-align: center;
  font-weight: 600;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: #666;
}

.empty-state i {
  font-size: 4rem;
  margin-bottom: 1rem;
  color: #ddd;
}

/* Tooltip */
.tooltip {
  position: relative;
  cursor: help;
}

.tooltip:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  right: 50%;
  transform: translateX(50%);
  background: #333;
  color: white;
  padding: 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  white-space: nowrap;
  z-index: 1000;
}

/* Invoice Styles */
.invoice-content {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  font-family: "Cairo", Arial, sans-serif;
}

.invoice-header {
  text-align: center;
  border-bottom: 2px solid #3498db;
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}

.invoice-header h2 {
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.invoice-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.invoice-section h4 {
  color: #3498db;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.25rem;
}

.invoice-items {
  margin: 2rem 0;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.invoice-table th,
.invoice-table td {
  border: 1px solid #ddd;
  padding: 0.75rem;
  text-align: center;
}

.invoice-table th {
  background: #3498db;
  color: white;
}

.invoice-table tr:nth-child(even) {
  background: #f8f9fa;
}

.invoice-total {
  text-align: left;
  margin-top: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.invoice-total .total-row {
  display: flex;
  justify-content: space-between;
  margin: 0.5rem 0;
}

.invoice-total .final-total {
  font-size: 1.2rem;
  font-weight: bold;
  border-top: 2px solid #3498db;
  padding-top: 0.5rem;
  color: #2c3e50;
}

.invoice-footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #ddd;
  color: #666;
}

.invoice-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

@media print {
  .invoice-actions {
    display: none;
  }

  .modal {
    position: static;
    background: none;
  }

  .modal-content {
    box-shadow: none;
    margin: 0;
    width: 100%;
  }
}

/* ط²ط± ط¥ط¶ط§ظپط© ط§ظ„ط¥ط¹ظ„ط§ظ† ط§ظ„ظ…ط­ط³ظ† */
#add-ad-form button[type="submit"] {
  width: 100%;
  padding: 1.2rem 2rem;
  font-size: 1.3rem;
  font-weight: 700;
  background: linear-gradient(135deg, #27ae60 0%, #2ecc71 50%, #16a085 100%);
  color: white;
  border: none;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.4s ease;
  box-shadow: 0 8px 25px rgba(39, 174, 96, 0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2rem;
}

#add-ad-form button[type="submit"]:hover {
  background: linear-gradient(135deg, #229954 0%, #27ae60 50%, #138d75 100%);
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(39, 174, 96, 0.5);
}

#add-ad-form button[type="submit"]:active {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(39, 174, 96, 0.4);
}

/* طھط­ط³ظٹظ† ظ†طµ ط§ظ„طھط¹ظ‡ط¯ط§طھ */
.agreement-text p:nth-child(3),
.agreement-text p:nth-child(4) {
  color: #e74c3c !important;
  font-weight: 600 !important;
  background: linear-gradient(135deg, #fff5f5 0%, #ffeaea 100%) !important;
  padding: 1rem !important;
  border-radius: 8px !important;
  border-right: 4px solid #e74c3c !important;
  margin: 0.8rem 0 !important;
  font-size: 1rem !important;
}

/* طھط­ط³ظٹظ† ط¹ط±ط¶ ظ†ط§ظپط°ط© ط§ظ„ظپط§طھظˆط±ط© */
#invoice-modal {
  z-index: 10000 !important;
}

#invoice-modal .modal-content {
  max-width: 900px;
  margin: 3% auto;
  max-height: 90vh;
  overflow-y: auto;
}

/* طھط­ط³ظٹظ† طھطµظ…ظٹظ… ط§ظ„ظپط§طھظˆط±ط© */
.invoice-content {
  font-family: "Cairo", Arial, sans-serif;
  direction: rtl;
  text-align: right;
}

.invoice-header {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  padding: 2rem;
  border-radius: 10px 10px 0 0;
  text-align: center;
  margin: -2rem -2rem 2rem -2rem;
}

.invoice-header h2 {
  color: white !important;
  margin: 0;
  font-size: 2rem;
}

/* Categories Section */
.categories-section {
  margin: 4rem 0;
  padding: 3rem;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-radius: 25px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

.categories-section h2 {
  text-align: center;
  color: #2c3e50;
  margin-bottom: 2rem;
  font-size: 2rem;
  font-weight: 700;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 2rem 0;
}

.category-card {
  background: white;
  border-radius: 20px;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  transition: all 0.4s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  border-color: #3498db;
}

.category-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.category-card h3 {
  color: #2c3e50;
  margin: 1.2rem 0 0.8rem 0;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.4px;
}

.category-card p {
  color: #666;
  margin: 0 0 0.8rem 0;
  font-size: 0.95rem;
  line-height: 1.5;
  letter-spacing: 0.2px;
}

.category-count {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 0.5rem;
  display: inline-block;
}

.category-results {
  margin-top: 3rem;
  padding: 2rem;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-radius: 15px;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #ddd;
}

.results-header h3 {
  color: #2c3e50;
  margin: 0;
  font-size: 1.5rem;
}

/* Select styling */
select {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  font-family: "Cairo", Arial, sans-serif;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
}

select option {
  padding: 0.5rem;
  font-family: "Cairo", Arial, sans-serif;
}

/* Responsive Categories */
@media (max-width: 768px) {
  .categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
  }

  .category-card {
    padding: 1.2rem 0.8rem;
  }

  .category-icon {
    font-size: 2.2rem;
  }

  .category-card h3 {
    font-size: 1rem;
  }

  .category-card p {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }

  .category-card {
    padding: 1rem 0.6rem;
  }

  .category-icon {
    font-size: 2rem;
  }

  .category-card h3 {
    font-size: 0.9rem;
  }
}

.show-all-btn {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px dashed #ddd;
}

/* Site Ads and Visitors Ads Sections */
.my-ads-section,
.user-ads-section {
  margin: 3.5rem 0;
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.my-ads-section {
  background: linear-gradient(135deg, #fff3cd, #ffeaa7);
  border-right: 4px solid #f39c12;
}

.user-ads-section {
  background: linear-gradient(135deg, #e3f2fd, #f1f8ff);
  border-right: 4px solid #3498db;
}

.my-ads-section h2,
.user-ads-section h2 {
  color: #2c3e50;
  margin-bottom: 2rem;
  font-size: 2.2rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.3;
  letter-spacing: 0.8px;
  position: relative;
  padding-bottom: 1rem;
}

.my-ads-section h2 {
  color: #f39c12;
}

.my-ads-section h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 50%;
  transform: translateX(50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #f39c12, #e67e22);
  border-radius: 2px;
}

.user-ads-section h2 {
  color: #3498db;
}

.user-ads-section h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 50%;
  transform: translateX(50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #3498db, #2980b9);
  border-radius: 2px;
}

/* طھط­ط³ظٹظ†ط§طھ ظ„ظˆط§ط¬ظ‡ط© ط§ظ„ظ…ط³طھط®ط¯ظ… */
.user-dashboard {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 15px;
  padding: 25px;
  color: white;
  margin: 20px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.user-avatar {
  font-size: 4rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid rgba(255, 255, 255, 0.3);
}

.user-details h3 {
  margin: 0 0 5px 0;
  font-size: 1.8rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.user-role {
  color: rgba(255, 255, 255, 0.9);
  font-weight: bold;
  margin: 5px 0;
}

.user-email,
.user-username {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  margin: 3px 0;
}

.user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.user-actions .btn {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.user-actions .btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.user-actions .btn-primary {
  background: rgba(52, 152, 219, 0.8);
  border-color: rgba(52, 152, 219, 0.9);
}

.user-actions .btn-success {
  background: rgba(39, 174, 96, 0.8);
  border-color: rgba(39, 174, 96, 0.9);
}

.user-actions .btn-info {
  background: rgba(26, 188, 156, 0.8);
  border-color: rgba(26, 188, 156, 0.9);
}

.user-actions .btn-warning {
  background: rgba(243, 156, 18, 0.8);
  border-color: rgba(243, 156, 18, 0.9);
}

.user-stats {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid rgba(255, 255, 255, 0.2);
}

.stat-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 15px 20px;
  border-radius: 10px;
  text-align: center;
  flex: 1;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: bold;
  color: #f1c40f;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.stat-label {
  display: block;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 5px;
}

/* ط£ط²ط±ط§ط± ط§ظ„ط¯ط®ظˆظ„ ط§ظ„ط³ط±ظٹط¹ */
.quick-login-section {
  margin-top: 30px;
  padding: 20px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 10px;
  border: 2px dashed #3498db;
}

.quick-login-section h4 {
  text-align: center;
  color: #2c3e50;
  margin-bottom: 20px;
  font-size: 1.2rem;
}

.quick-login-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 15px;
}

.quick-login-group {
  background: white;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.quick-login-group h5 {
  margin: 0 0 10px 0;
  text-align: center;
  font-size: 1rem;
  color: #34495e;
}

.btn-quick {
  width: 100%;
  margin: 5px 0;
  padding: 10px;
  font-size: 0.9rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.admin-btn {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
}

.admin-btn:hover {
  background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.user-btn {
  background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
  color: white;
}

.user-btn:hover {
  background: linear-gradient(135deg, #229954 0%, #1e8449 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.quick-login-help {
  background: rgba(52, 152, 219, 0.1);
  padding: 12px;
  border-radius: 6px;
  text-align: center;
  border: 1px solid rgba(52, 152, 219, 0.2);
}

.quick-login-help p {
  margin: 0;
  font-size: 0.9rem;
  color: #2980b9;
}

/* طھط­ط³ظٹظ†ط§طھ ظ„ظ„ط´ط§ط´ط§طھ ط§ظ„طµط؛ظٹط±ط© */
@media (max-width: 768px) {
  .user-info {
    flex-direction: column;
    text-align: center;
  }

  .user-avatar {
    width: 60px;
    height: 60px;
    font-size: 2.5rem;
  }

  .user-actions {
    justify-content: center;
  }

  .user-stats {
    flex-direction: column;
    gap: 10px;
  }

  .quick-login-buttons {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .quick-login-section {
    padding: 15px;
  }
}

/* ط£ط²ط±ط§ط± ط§ظ„طھط­ظƒظ… ظپظٹ ط§ظ„ط¥ط¹ظ„ط§ظ†ط§طھ */
.btn-delete {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
  border: none;
  padding: 8px 15px;
  margin: 2px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-delete:hover {
  background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(231, 76, 60, 0.3);
}

.btn-edit {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
  color: white;
  border: none;
  padding: 8px 15px;
  margin: 2px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-edit:hover {
  background: linear-gradient(135deg, #e67e22 0%, #d68910 100%);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(243, 156, 18, 0.3);
}

/* ًں›،ï¸ڈ ظˆط§ط¬ظ‡ط© طھظ‚ط±ظٹط± ط§ظ„ط£ظ…ط§ظ† */
.security-dashboard {
  padding: 20px;
  background: #f8f9fa;
  border-radius: 10px;
  margin-top: 20px;
}

.security-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-right: 4px solid #dc3545;
}

.stat-card h4 {
  color: #dc3545;
  margin-bottom: 15px;
  font-size: 16px;
}

.security-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.security-log-item {
  background: #fff3cd;
  border-right: 3px solid #ffc107;
  padding: 10px;
  margin: 10px 0;
  border-radius: 5px;
  font-size: 14px;
}

.security-log-item.danger {
  background: #f8d7da;
  border-right-color: #dc3545;
}

.security-log-item.warning {
  background: #fff3cd;
  border-right-color: #ffc107;
}

.security-log-item.info {
  background: #d1ecf1;
  border-right-color: #17a2b8;
}

/* ط­ظ…ط§ظٹط© ظ…ظ† ط§ظ„ظ†ط³ط® */
.protected-content {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* ط¶ظ…ط§ظ† ط¹ظ…ظ„ ط§ظ„طھظ†ظ‚ظ„ */
.nav,
.nav *,
nav,
nav *,
.btn,
button,
a {
  pointer-events: auto !important;
  cursor: pointer !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  user-select: none !important;
}

.nav a:hover,
nav a:hover,
.btn:hover,
button:hover {
  opacity: 0.8;
  transform: scale(1.02);
}

