/* ============== المتغيرات العامة ============== */
:root {
  --primary-color: #2c3e50;       /* اللون الأساسي - أزرق داكن */
  --secondary-color: #e74c3c;     /* اللون الثانوي - أحمر */
  --accent-color: #3498db;        /* لون التمييز - أزرق */
  --light-color: #f5f7fa;         /* لون خلفية فاتح */
  --dark-color: #2c3e50;          /* لون نص داكن */
  --text-color: #333;             /* لون النص الأساسي */
  --border-radius: 10px;          /* زوايا دائرية للعناصر */
  --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); /* ظل عام للعناصر */
  --transition: all 0.3s ease;    /* تأثيرات الحركة */
}

/* ============== إعادة الضبط الأساسية ============== */
* {
    outline: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
  font-family: 'Tajawal', sans-serif;
  background-color: var(--light-color);
  color: var(--text-color);
  line-height: 1.6;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* ============== رأس الصفحة ============== */
.account-header {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  padding: 100px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.account-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('https://images.unsplash.com/photo-1547658719-da2b51169166?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1528&q=80') no-repeat center center/cover;
  opacity: 0.15;
  z-index: 0;
}

.account-header .container {
  position: relative;
  z-index: 1;
}

.account-header h1 {
  font-size: 2.8rem;
  margin-bottom: 15px;
  animation: fadeInDown 1s ease;
}

.breadcrumb {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: white;
  margin: 0 10px;
  position: relative;
  text-decoration: none;
  transition: var(--transition);
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb a::after {
  content: '/';
  position: absolute;
  left: -15px;
  opacity: 0.7;
}

.breadcrumb a:first-child::after {
  display: none;
}
/* أنماط رسائل التنبيه */
.alert-message {
  --success-bg: rgba(46, 204, 113, 0.9);
  --error-bg: rgba(231, 76, 60, 0.9);
  --warning-bg: rgba(241, 196, 15, 0.9);
  --info-bg: rgba(52, 152, 219, 0.9);
  color: white;
  font-family: 'Tajawal', sans-serif;
}

.alert-success {
  background: var(--success-bg);
  border-left: 4px solid #27ae60;
}

.alert-error {
  background: var(--error-bg);
  border-left: 4px solid #c0392b;
}

.alert-warning {
  background: var(--warning-bg);
  border-left: 4px solid #f39c12;
  color: #333;
}

.alert-info {
  background: var(--info-bg);
  border-left: 4px solid #2980b9;
}

.alert-close-btn {
  color: inherit;
}

.alert-close-btn:hover {
  opacity: 1 !important;
}

/* تأثيرات الحركة للرسائل */

@keyframes alertSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes alertSlideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

@keyframes alertFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes alertShake {
  0%, 100% {
    transform: translateX(0);
  }
  20%, 60% {
    transform: translateX(-5px);
  }
  40%, 80% {
    transform: translateX(5px);
  }
}
/* ============== قسم الحساب الرئيسي ============== */
.account-section {
  padding: 60px 0;
}

.account-container {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 30px;
}

/* ============== الشريط الجانبي ============== */
.account-sidebar {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
}

.user-profile {
  padding: 30px 20px;
  text-align: center;
  border-bottom: 1px solid #eee;
}

.user-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent-color);
  margin-bottom: 15px;
}

.user-name {
  font-size: 1.3rem;
  margin-bottom: 5px;
  color: var(--primary-color);
}

.user-email {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.account-menu {
  list-style: none;
}

.account-menu li {
  border-bottom: 1px solid #eee;
}

.account-menu li:last-child {
  border-bottom: none;
}

.account-menu a {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition);
}

.account-menu a:hover, 
.account-menu a.active {
  background-color: var(--light-color);
  color: var(--accent-color);
}

.account-menu a i {
  margin-left: 10px;
  font-size: 1.1rem;
}

/* ============== محتوى الحساب ============== */
.account-content {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 30px;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.content-header h2 {
  font-size: 1.8rem;
  color: var(--primary-color);
}

.logout-btn {
  background-color: var(--secondary-color);
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Tajawal', sans-serif;
}

.logout-btn:hover {
  background-color: #c0392b;
}

/* ============== قسم الطلبات ============== */
.orders-container {
  padding: 20px;
}

.order-item {
  border: 1px solid #eee;
  border-radius: var(--border-radius);
  padding: 15px;
  margin-bottom: 15px;
  background: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  transition: var(--transition);
}

.order-item:hover {
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 10px;
}

.order-id {
  font-weight: bold;
  color: var(--primary-color);
}

.order-date {
  color: #666;
  font-size: 0.9em;
}

.order-status {
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.8em;
  font-weight: bold;
}

.order-status.pending {
  background-color: #fff3cd;
  color: #856404;
}

.order-status.processing {
  background-color: #cce5ff;
  color: #004085;
}

.order-status.completed {
  background-color: #d4edda;
  color: #155724;
}

.order-status.cancelled {
  background-color: #f8d7da;
  color: #721c24;
}

.order-details {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.order-actions {
  text-align: left;
}

/* زر عرض التفاصيل المحسن */
.btn-details-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  background-color: var(--accent-color);
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  min-width: 150px;
}

.btn-details-toggle:hover {
  background-color: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-details-toggle .toggle-icon {
  transition: transform 0.3s ease;
}

.btn-details-toggle.active .toggle-icon {
  transform: rotate(180deg);
}

.btn-details-toggle .toggle-text::after {
  content: "عرض التفاصيل";
}

.btn-details-toggle.active .toggle-text::after {
  content: "إخفاء التفاصيل";
}

/* تفاصيل الطلب مع تأثيرات الحركة */
.order-details-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  background-color: #f9f9f9;
  border-radius: 0 0 8px 8px;
  margin-top: 10px;
}

.order-details-content.open {
  max-height: 2000px;
  padding: 20px;
  border: 1px solid #eee;
  border-top: none;
}

/* عناصر تفاصيل الطلب */
.order-items-list {
  margin-bottom: 15px;
}

.order-item-detail {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.order-item-detail:last-child {
  border-bottom: none;
}

.item-image {
  width: 60px;
  height: 60px;
  margin-left: 15px;
  flex-shrink: 0;
  border-radius: 5px;
  overflow: hidden;
}

.item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-info {
  flex: 1;
}

.item-name {
  font-weight: bold;
  margin-bottom: 5px;
}

.item-price {
  color: var(--secondary-color);
  font-weight: bold;
}

.item-quantity {
  color: #666;
  font-size: 0.9em;
}

.order-summary {
  background: #f9f9f9;
  padding: 15px;
  border-radius: var(--border-radius);
  margin-top: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.summary-row.total {
  font-weight: bold;
  font-size: 1.1em;
  border-top: 1px solid #ddd;
  padding-top: 10px;
  margin-top: 10px;
}

.customer-info {
  margin-top: 20px;
  padding: 15px;
  background: #f9f9f9;
  border-radius: var(--border-radius);
}

.customer-info h4 {
  margin-bottom: 15px;
  color: var(--primary-color);
}

/* ============== قسم الإشعارات ============== */
.notifications-container {
  padding: 20px;
}

.notification-item {
  display: flex;
  padding: 15px;
  margin-bottom: 15px;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  cursor: pointer;
  transition: var(--transition);
}

.notification-item.unread {
  border-right: 3px solid var(--accent-color);
  background-color: #f8f9fa;
}

.notification-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.notification-icon {
  width: 40px;
  height: 40px;
  background-color: var(--accent-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 15px;
  flex-shrink: 0;
}

.notification-content {
  flex: 1;
}

.notification-title {
  font-weight: bold;
  margin-bottom: 5px;
  color: var(--primary-color);
}

.notification-message {
  color: #555;
  margin-bottom: 5px;
}

.notification-date {
  color: #888;
  font-size: 0.8em;
}

/* ============== صفحة الملف الشخصي ============== */
.profile-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.profile-picture-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.avatar-upload {
  position: relative;
  max-width: 150px;
}

.avatar-edit {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 1;
}

.avatar-edit input {
  display: none;
}

.avatar-edit label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--accent-color);
  color: white;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: var(--transition);
}

.avatar-edit label:hover {
  background: #2980b9;
  transform: scale(1.1);
}

.avatar-preview {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 3px solid var(--accent-color);
  overflow: hidden;
}

#imagePreview {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.upload-hint {
  color: #666;
  font-size: 0.9rem;
  text-align: center;
}

.profile-form {
  width: 100%;
}

.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  flex: 1;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--primary-color);
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-family: 'Tajawal', sans-serif;
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--accent-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.form-hint {
  display: block;
  margin-top: 5px;
  color: #666;
  font-size: 0.8rem;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.save-btn, .cancel-btn {
  padding: 12px 25px;
  border-radius: var(--border-radius);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.save-btn {
  background: #2ecc71;
  color: white;
  border: none;
}

.save-btn:hover {
  background: #27ae60;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(46, 204, 113, 0.3);
}

.cancel-btn {
  background: #f5f5f5;
  color: #666;
  border: 1px solid #ddd;
}

.cancel-btn:hover {
  background: #e0e0e0;
}
/* ============== تصميم زر عرض التفاصيل ============== */
.btn-outline.view-order-details {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  background-color: transparent;
  color: var(--accent-color);
  border: 2px solid var(--accent-color);
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  font-weight: 600;
  position: relative;
  overflow: hidden;
  min-width: 150px;
}

.btn-outline.view-order-details:hover {
  background-color: var(--accent-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-outline.view-order-details:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
}

.btn-outline.view-order-details i {
  transition: transform 0.3s ease;
}

.btn-outline.view-order-details.active i {
  transform: rotate(180deg);
}

/* تأثير عند النقر */
.btn-outline.view-order-details::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%, -50%);
  transform-origin: 50% 50%;
}

.btn-outline.view-order-details:focus:not(:active)::after {
  animation: ripple 0.6s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  100% {
    transform: scale(20, 20);
    opacity: 0;
  }
}

/* حالة الزر عند الفتح */
.btn-outline.view-order-details.active {
  background-color: var(--accent-color);
  color: white;
}

/* التكيف مع الشاشات الصغيرة */
@media (max-width: 768px) {
  .btn-outline.view-order-details {
    width: 100%;
    padding: 12px;
  }
}
/* ============== صفحات المصادقة ============== */
.auth-container {
  max-width: 500px;
  margin: 0 auto;
  padding: 40px;
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  text-align: center;
}

.auth-container h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.auth-container p {
  margin-bottom: 30px;
  color: #666;
}

.auth-form .form-group {
  margin-bottom: 20px;
  text-align: right;
}

.auth-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.auth-form input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-family: 'Tajawal', sans-serif;
  font-size: 1rem;
  transition: var(--transition);
}

.auth-form input:focus {
  border-color: var(--accent-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.auth-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

.remember-me {
  display: flex;
  align-items: center;
}

.remember-me input {
  width: auto;
  margin-left: 8px;
}

.forgot-password {
  color: var(--accent-color);
  text-decoration: none;
  transition: var(--transition);
}

.forgot-password:hover {
  text-decoration: underline;
}

.auth-btn {
  width: 100%;
  padding: 12px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1rem;
  margin-top: 15px;
}

.auth-btn:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 25px 0;
  color: #999;
}

.auth-divider::before, 
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #ddd;
}

.auth-divider::before {
  margin-left: 10px;
}

.auth-divider::after {
  margin-right: 10px;
}

.social-auth {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.google-auth {
  background-color: #fff;
  color: #333;
  border: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
}

.google-auth:hover {
  background-color: #f5f5f5;
}

.google-auth img {
  width: 20px;
  margin-left: 10px;
}

.auth-switch {
  margin-top: 20px;
  color: #666;
}

.auth-switch a {
  color: var(--accent-color);
  text-decoration: none;
  transition: var(--transition);
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* ============== تأثيرات الحركة ============== */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ============== التكيف مع الشاشات الصغيرة ============== */
@media (max-width: 768px) {
  .account-container {
    grid-template-columns: 1fr;
  }
  
  .account-header h1 {
    font-size: 2rem;
  }
  
  .order-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .form-row {
    flex-direction: column;
  }
  
  .auth-container {
    padding: 30px 20px;
  }
}

@media (max-width: 480px) {
  .account-header {
    padding: 80px 0;
  }
  
  .account-header h1 {
    font-size: 1.8rem;
  }
  
  .auth-actions {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
  
  .btn-details-toggle {
    width: 100%;
  }
}