/* Custom styles for Harmoni Dashboard */

/* Arabic font optimization */
body {
  font-family: "Cairo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  line-height: 1.6;
}

.fas , .fa{
   z-index: 11;
}
/* Smooth transitions */
* {
  transition: all 0.2s ease-in-out;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Sidebar animations */
.sidebar-item {
  position: relative;
  overflow: hidden;
}

.sidebar-item::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1));
  transition: width 0.3s ease;
}

.sidebar-item:hover::before {
  width: 100%;
}

/* Card hover effects */
.card-hover {
  transform: translateY(0);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Button animations */
.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

/* Stats animation */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-number {
  animation: countUp 0.6s ease-out;
}

/* Loading states */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Table enhancements */
.table-row {
  transition: all 0.2s ease;
}

.table-row:hover {
  background-color: #f8fafc;
  transform: scale(1.01);
}

/* Form enhancements */
.form-input {
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.form-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  transform: translateY(-1px);
}

/* Notification styles */
.notification {
  animation: slideIn 0.3s ease-out;
}

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

/* Mobile responsive enhancements */
@media (max-width: 1024px) {
  #main-content {
    margin-right: 0 !important;
  }

  .nav-item span {
    font-size: 0.9rem;
  }
}

@media (max-width: 640px) {
  header {
    padding: 1rem;
  }

  .nav-item {
    padding: 0.625rem 0.75rem;
  }

  .nav-item span {
    font-size: 0.875rem;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .dark-mode {
    background-color: #1f2937;
    color: #f9fafb;
  }

  .dark-mode .bg-white {
    background-color: #374151;
  }

  .dark-mode .text-gray-900 {
    color: #f9fafb;
  }

  .dark-mode .border-gray-200 {
    border-color: #4b5563;
  }
}

/* Navigation items enhanced */
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-item i {
  min-width: 1.25rem;
  text-align: center;
  flex-shrink: 0;
}

.nav-item span {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sidebar enhancements */

.nav-item::before {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: #3b82f6;
  border-radius: 2px;
  transition: height 0.2s ease;
}

.nav-item.bg-blue-50::before {
  height: 20px;
}

.nav-item:hover {
  transform: translateX(-2px);
}

/* Header backdrop blur */
.backdrop-blur-sm {
  backdrop-filter: blur(8px);
}

/* Smooth transitions for all interactive elements */
.nav-item,
button,
.card-hover {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced button hover states */
button:hover {
  transform: translateY(-1px);
}

/* User menu dropdown */
#user-menu:hover {
  background-color: #f8fafc;
}

/* Notification badge animation */
@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.notification-badge {
  animation: pulse 2s infinite;
}

/* Sidebar shadow enhancement */
#sidebar {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Mobile optimizations */
@media (max-width: 1024px) {
  #sidebar {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  }
}

/* Dropdown menus */
.dropdown-menu {
  animation: dropdownFadeIn 0.2s ease-out;
  transform-origin: top;
}

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

/* Notification badge pulse */
.notification-badge {
  animation: pulse 2s infinite;
}

/* Dropdown shadows */
#notifications-menu,
#user-menu {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Hover effects for dropdown items */
.dropdown-item {
  transition: all 0.15s ease;
}

.dropdown-item:hover {
  transform: translateX(-2px);
}

/* Mobile dropdown adjustments */
@media (max-width: 640px) {
  /* #notifications-menu {
        width: 90vw;
        left: -200px;
    }
    
    #user-menu {
        width: 250px;
        left: -180px;
    } */
}

/* Custom gradient backgrounds */
.gradient-blue {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-green {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.gradient-purple {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Icon animations */
.icon-bounce {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  20%,
  53%,
  80%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  40%,
  43% {
    transform: translate3d(0, -30px, 0);
  }
  70% {
    transform: translate3d(0, -15px, 0);
  }
  90% {
    transform: translate3d(0, -4px, 0);
  }
}

/* Authentication pages styles */
.auth-container {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

.auth-card {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-input {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-input:focus {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.25);
}

.auth-button {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  transition: all 0.3s ease;
}

.auth-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.4);
}

.auth-button:active {
  transform: translateY(0);
}

/* Profile image upload */
.profile-upload {
  transition: all 0.3s ease;
}

.profile-upload:hover {
  transform: scale(1.05);
}

/* Password strength indicator */
.password-strength {
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  overflow: hidden;
  margin-top: 8px;
}

.password-strength-bar {
  height: 100%;
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* Form validation styles */
.field-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.field-success {
  border-color: #22c55e !important;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1) !important;
}

.error-message {
  animation: slideDown 0.3s ease;
}

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

/* Loading spinner */
.loading-spinner {
  border: 3px solid #f3f4f6;
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Notification animations */
.notification {
  animation: slideInRight 0.3s ease;
}

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

/* Mobile optimizations for auth pages */
@media (max-width: 640px) {
  .auth-container {
    padding: 1rem;
  }

  .auth-card {
    padding: 1.5rem;
  }

  .auth-input {
    padding: 0.75rem 1rem;
    padding-right: 2.5rem;
  }
}

/* Custom Checkbox */
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--brand-primary);
  cursor: pointer;
}

input[type="checkbox"]:focus {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

input[type="checkbox"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
