/* Base styles */
body {
  font-family: 'Vazirmatn', serif;
  background-color: #f9fafb;
  color: #111827;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Nav dropdown */
.nav-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  width: 12rem;
  border-radius: 0.5rem;
  background-color: #fff;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  border: 1px solid rgb(0 0 0 / 0.05);
  transition: opacity 0.15s, visibility 0.15s;
  z-index: 50;
}

/* Mobile menu */
.mobile-menu {
  position: fixed !important;
  top: 0 !important;
  bottom: 0 !important;
  right: 0 !important;
  width: 18rem;
  background-color: #fff;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  z-index: 50;
  transform: translateX(100%);
  transition: transform 0.3s;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
.mobile-menu.show {
  transform: translateX(0);
}
.mobile-menu .mobile-menu-header {
  flex-shrink: 0 !important;
}
.mobile-menu .mobile-menu-scroll {
  flex: 1 !important;
  overflow-y: auto !important;
  min-height: 0 !important;
  -webkit-overflow-scrolling: touch;
}

/* Glass card */
.glass-card {
  border-radius: 1rem;
  background-color: rgb(255 255 255 / 0.7);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Primary button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background-color: #2c5bb8;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  transition: all 0.2s ease;
}
.btn-primary:hover {
  background-color: #244895;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgb(44 91 184 / 0.3);
}
.btn-primary:focus {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #3d74d4;
}
.btn-primary:active {
  transform: translateY(0);
}

/* Outline button */
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  border: 1px solid #2c5bb8;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #2c5bb8;
  transition: all 0.2s ease;
}
.btn-outline:hover {
  background-color: #f0f5ff;
  transform: translateY(-1px);
}
.btn-outline:focus {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #3d74d4;
}
.btn-outline:active {
  transform: translateY(0);
}

/* Input field */
.input-field {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  background-color: #fff;
  padding: 0.75rem 1rem;
  line-height: 1.5;
  font-size: 0.875rem;
  color: #111827;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.input-field::placeholder {
  color: #9ca3af;
}
.input-field:focus {
  border-color: #3d74d4;
  outline: none;
  box-shadow: 0 0 0 3px rgb(61 116 212 / 0.15);
}

/* Notification enter animation */
.notification-enter {
  animation: notificationSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes notificationSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Modern select */
.modern-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1.5px solid #d1d5db;
  background-color: #f9fafb;
  font-weight: 600;
  font-size: 0.875rem;
  color: #1f2937;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.5;
  width: 100%;
}
.modern-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background-color: #fff;
}

/* Text balance */
.text-balance {
  text-wrap: balance;
}

/* Admin panel mobile */
@media (max-width: 1023px) {
  .admin-topbar {
    padding-left: 3.5rem;
  }
}

/* Spin animation for loading states */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.animate-spin {
  animation: spin 1s linear infinite;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: #2c5bb8;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(44, 91, 184, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 40;
  cursor: pointer;
  border: none;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}
.back-to-top:hover {
  background: #244895;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(44, 91, 184, 0.4);
}
