/* ============================================
   Nuqd - Dr Accounting SYSTEM - Professional Dashboard CSS
   Modern, Responsive & Professional Design
   ============================================ */

/* ===== CSS Variables ===== */
:root {
  /* Primary Colors */
  --primary-color: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #3b82f6;

  /* Secondary Colors */
  --secondary-color: #6366f1;
  --accent-color: #8b5cf6;

  /* Neutral Colors */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-dark: #0f172a;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-light: #94a3b8;

  /* Borders & Shadows */
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);

  /* Sidebar */
  --sidebar-width: 280px;
  --sidebar-collapsed-width: 80px;
  --navbar-height: 70px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.4s ease;
}

/* ===== Global Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== Scrollbar Styling ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 10px;
  transition: var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-light);
}

/* ===== Main Layout Container ===== */
.dashboard-wrapper {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* ===== Sidebar Styles ===== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  transition: all var(--transition-base);
  z-index: 1000;
  box-shadow: var(--shadow-lg);
  overflow-x: hidden;
  overflow-y: auto;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--navbar-height);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #ffffff;
  transition: var(--transition-fast);
}

.sidebar-logo:hover {
  opacity: 0.9;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 1;
  transition: var(--transition-fast);
}

.sidebar.collapsed .logo-text {
  opacity: 0;
  width: 0;
}


/* Sidebar Navigation */
.sidebar-nav {
  padding: 1.5rem 0;
}

.nav-section {
  margin-bottom: 2rem;
}

.nav-section-title {
  padding: 0 1.5rem;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.5rem;
  transition: var(--transition-fast);
}

.sidebar.collapsed .nav-section-title {
  opacity: 0;
  height: 0;
  padding: 0;
  margin: 0;
}

.nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-item {
  margin: 0.25rem 0.75rem;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  border-radius: 10px;
  transition: var(--transition-fast);
  position: relative;
  gap: 12px;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transform: translateX(2px);
}

.nav-link.active {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.nav-link i {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.nav-link-text {
  white-space: nowrap;
  opacity: 1;
  transition: var(--transition-fast);
}

.sidebar.collapsed .nav-link-text {
  opacity: 0;
  width: 0;
}

.nav-badge {
  margin-left: auto;
  background: var(--accent-color);
  color: #ffffff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
  transition: var(--transition-fast);
}

.sidebar.collapsed .nav-badge {
  display: none;
}

/* ===== Dropdown Menu Styles ===== */
.nav-item.has-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  position: relative;
}

.dropdown-arrow {
  margin-left: auto;
  font-size: 12px;
  transition: transform var(--transition-base);
}

.nav-item.has-dropdown.active .dropdown-arrow {
  transform: rotate(180deg);
}

.sidebar.collapsed .dropdown-arrow {
  display: none;
}

.nav-dropdown {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base) ease;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  margin-top: 0.25rem;
}

.nav-item.has-dropdown.active .nav-dropdown {
  max-height: 5000px;
  padding: 0.5rem 0;
}

.nav-dropdown li {
  margin: 0;
}

.nav-dropdown-link {
  display: block;
  padding: 0.65rem 1rem 0.65rem 3rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition-fast);
  border-radius: 6px;
  margin: 0.15rem 0.5rem;
  position: relative;
}

.nav-dropdown-link:before {
  content: '';
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: var(--transition-fast);
}

.nav-dropdown-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding-left: 3.25rem;
}

.nav-dropdown-link:hover:before {
  background: var(--primary-color);
  width: 6px;
  height: 6px;
}

.nav-dropdown-link.active {
  background: rgba(37, 99, 235, 0.2);
  color: #ffffff;
}

.sidebar.collapsed .nav-dropdown {
  display: none;
}

/* ===== Main Content Area ===== */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  width: calc(100% - var(--sidebar-width));
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
}

.sidebar.collapsed ~ .main-content {
  margin-left: var(--sidebar-collapsed-width);
  width: calc(100% - var(--sidebar-collapsed-width));
}

/* ===== Navbar Styles ===== */
.navbar-custom {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--navbar-height);
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: var(--shadow-sm);
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: var(--transition-fast);
}

.mobile-menu-toggle:hover {
  background: var(--bg-primary);
}

.search-bar {
  position: relative;
  width: 400px;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 3rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font-size: 14px;
  transition: var(--transition-fast);
  background: var(--bg-primary);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background: var(--bg-secondary);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.navbar-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar-btn {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.navbar-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-secondary);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.5rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.user-profile:hover {
  background: var(--bg-secondary);
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.2;
}

.user-role {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.2;
}

/* ===== Page Content ===== */
.page-content {
  flex: 1;
  padding: 2rem;
}

.page-header {
  margin-bottom: 2rem;
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ===== Cards ===== */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  opacity: 0;
  transition: var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(99, 102, 241, 0.1));
  color: var(--primary-color);
}

.stat-card.purple .stat-icon {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(168, 85, 247, 0.1));
  color: var(--accent-color);
}

.stat-card.green .stat-icon {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(16, 185, 129, 0.1));
  color: #10b981;
}

.stat-card.orange .stat-icon {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.1), rgba(249, 115, 22, 0.1));
  color: #f97316;
}

.stat-trend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

.stat-trend.up {
  background: rgba(34, 197, 94, 0.1);
  color: #10b981;
}

.stat-trend.down {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  line-height: 1;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

/* ===== Content Card ===== */
.content-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.content-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.content-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.content-card-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-icon {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #ffffff;
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 1.5rem 2rem;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-text {
  color: var(--text-secondary);
  font-size: 14px;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary-color);
}

/* ===== Language Toggle Button ===== */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.5rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  height: 44px;
}

.lang-toggle:hover {
  background: var(--bg-secondary);
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.lang-toggle i {
  font-size: 18px;
}

.lang-toggle span {
  white-space: nowrap;
  font-weight: 600;
}

/* ===== RTL Support ===== */
[dir="rtl"] .sidebar {
  left: auto;
  right: 0;
}

[dir="rtl"] .main-content {
  margin-left: 0;
  margin-right: var(--sidebar-width);
}

[dir="rtl"] .sidebar.collapsed ~ .main-content {
  margin-left: 0;
  margin-right: var(--sidebar-collapsed-width);
}

[dir="rtl"] .nav-link:hover {
  transform: translateX(-2px);
}

[dir="rtl"] .search-icon {
  left: auto;
  right: 1rem;
}

[dir="rtl"] .search-input {
  padding: 0.75rem 3rem 0.75rem 1rem;
}

[dir="rtl"] .notification-badge {
  right: auto;
  left: -4px;
}

[dir="rtl"] .nav-badge {
  margin-left: 0;
  margin-right: auto;
}

/* RTL Mobile */
@media (max-width: 992px) {
  [dir="rtl"] .sidebar {
    transform: translateX(100%);
  }

  [dir="rtl"] .sidebar.active {
    transform: translateX(0);
  }

  [dir="rtl"] .main-content {
    margin-right: 0;
  }
}

/* ===== Responsive Design ===== */
@media (max-width: 1200px) {
  .search-bar {
    width: 300px;
  }
}

@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    width: 100%;
  }

  .sidebar.collapsed ~ .main-content {
    margin-left: 0;
    width: 100%;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .navbar-custom {
    padding: 1rem 1.5rem;
  }

  .search-bar {
    display: none;
  }
}

@media (max-width: 768px) {
  .page-content {
    padding: 1.5rem;
  }

  .page-title {
    font-size: 24px;
  }

  .stat-cards {
    grid-template-columns: 1fr;
  }

  .user-info {
    display: none;
  }

  .navbar-right {
    gap: 0.5rem;
  }

  .navbar-btn {
    width: 40px;
    height: 40px;
  }

  .lang-toggle {
    padding: 0.5rem 0.75rem;
    height: 40px;
  }

  .lang-toggle span {
    font-size: 13px;
  }

  .footer {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 576px) {
  .navbar-custom {
    padding: 1rem;
  }

  .page-content {
    padding: 1rem;
  }

  .stat-card {
    padding: 1.25rem;
  }

  .content-card {
    padding: 1.25rem;
  }
}

/* ===== Animations ===== */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

.animate-slide-in {
  animation: slideInRight 0.4s ease forwards;
}

[dir="rtl"] .animate-slide-in {
  animation: slideInLeft 0.4s ease forwards;
}

.animate-fade-in {
  animation: fadeIn 0.3s ease forwards;
}

/* ===== Utility Classes ===== */
.text-primary { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-light { color: var(--text-light) !important; }
.bg-primary { background-color: var(--bg-primary) !important; }
.bg-secondary { background-color: var(--bg-secondary) !important; }

/* ===== Additional RTL Fixes ===== */
[dir="rtl"] .content-card-header {
  flex-direction: row-reverse;
}

[dir="rtl"] .stat-card-header {
  flex-direction: row-reverse;
}

[dir="rtl"] .navbar-left {
  margin-left: auto;
  margin-right: 0;
}

[dir="rtl"] .navbar-right {
  margin-right: auto;
  margin-left: 0;
}

[dir="rtl"] .footer {
  direction: rtl;
}

[dir="rtl"] .user-profile {
  flex-direction: row-reverse;
}

[dir="rtl"] .lang-toggle {
  flex-direction: row-reverse;
}

/* Arabic Font Optimization */
[dir="rtl"] body,
[dir="rtl"] p,
[dir="rtl"] span,
[dir="rtl"] div,
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] h5,
[dir="rtl"] h6,
[dir="rtl"] a,
[dir="rtl"] li,
[dir="rtl"] td,
[dir="rtl"] th,
[dir="rtl"] label,
[dir="rtl"] input,
[dir="rtl"] button {
  font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  letter-spacing: 0;
}

[dir="rtl"] .page-title {
  text-align: right;
}

[dir="rtl"] .page-subtitle {
  text-align: right;
}

[dir="rtl"] .stat-value {
  direction: ltr;
  text-align: left;
}

/* RTL Table Fixes */
[dir="rtl"] .table {
  text-align: right;
}

[dir="rtl"] .table thead th {
  text-align: right;
}

[dir="rtl"] .table tbody td {
  text-align: right;
}

/* RTL Dropdown Fixes */
[dir="rtl"] .dropdown-arrow {
  margin-left: 0;
  margin-right: auto;
}

[dir="rtl"] .nav-dropdown-link {
  padding: 0.65rem 3rem 0.65rem 1rem;
}

[dir="rtl"] .nav-dropdown-link:before {
  left: auto;
  right: 1.5rem;
}

[dir="rtl"] .nav-dropdown-link:hover {
  padding-left: 1rem;
  padding-right: 3.25rem;
}

/* ===== Navbar Dropdown Menus ===== */
.navbar-item.dropdown {
  position: relative;
}

.dropdown-menu {
  min-width: 320px;
  border: none;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  padding: 0;
  margin-top: 10px;
  animation: dropdownFadeIn 0.3s ease;
}

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

.dropdown-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-primary);
  border-radius: 12px 12px 0 0;
}

.dropdown-header h6 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.dropdown-body {
  max-height: 400px;
  overflow-y: auto;
}

.dropdown-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
  background: var(--bg-primary);
  border-radius: 0 0 12px 12px;
}

.dropdown-footer a {
  color: var(--primary-color);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition-fast);
}

.dropdown-footer a:hover {
  color: var(--primary-dark);
}

/* Notification Dropdown */
.notification-dropdown {
  min-width: 360px;
}

.notification-item {
  display: flex;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  text-decoration: none;
  transition: var(--transition-fast);
}

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

.notification-item:hover {
  background: var(--bg-primary);
}

.notification-item.unread {
  background: #f0f7ff;
}

.notification-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  flex-shrink: 0;
}

.notification-icon i {
  color: white;
  font-size: 1.1rem;
}

.notification-content {
  flex: 1;
}

.notification-content h6 {
  margin: 0 0 0.25rem 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.notification-content p {
  margin: 0 0 0.25rem 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.notification-content small {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* Message Dropdown */
.message-dropdown {
  min-width: 360px;
}

.message-item {
  display: flex;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  text-decoration: none;
  transition: var(--transition-fast);
  align-items: center;
}

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

.message-item:hover {
  background: var(--bg-primary);
}

.message-item.unread {
  background: #f0f7ff;
}

.message-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 1rem;
  flex-shrink: 0;
}

.message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message-content {
  flex: 1;
  min-width: 0;
}

.message-content h6 {
  margin: 0 0 0.25rem 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.message-content p {
  margin: 0 0 0.25rem 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-content small {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* Settings Dropdown */
.settings-dropdown {
  min-width: 280px;
}

.settings-dropdown .dropdown-item {
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  transition: var(--transition-fast);
}

.settings-dropdown .dropdown-item i {
  margin-right: 0.75rem;
  font-size: 1rem;
}

.settings-dropdown .dropdown-item:hover {
  background: var(--bg-primary);
  color: var(--primary-color);
}

/* Profile Dropdown */
.profile-dropdown {
  min-width: 300px;
}

.user-avatar-large {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 600;
  color: white;
  margin: 0 auto 0.75rem auto;
}

.profile-dropdown .dropdown-header {
  padding: 1.5rem 1.25rem;
}

.profile-dropdown .dropdown-header h6 {
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
  font-weight: 600;
}

.profile-dropdown .dropdown-header p {
  margin: 0;
  font-size: 0.85rem;
}

.profile-dropdown .dropdown-item {
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition-fast);
}

.profile-dropdown .dropdown-item i {
  margin-right: 0.75rem;
  font-size: 1rem;
}

.profile-dropdown .dropdown-item:hover {
  background: var(--bg-primary);
  color: var(--primary-color);
}

.profile-dropdown .dropdown-item.text-danger:hover {
  background: #fee;
  color: #dc3545;
}

/* User Profile with Chevron */
.user-profile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-profile .fa-chevron-down {
  font-size: 0.75rem;
  color: var(--text-light);
  transition: var(--transition-fast);
}

.user-profile:hover .fa-chevron-down {
  color: var(--primary-color);
}

.dropdown.show .user-profile .fa-chevron-down {
  transform: rotate(180deg);
}

/* RTL Support for Dropdowns */
[dir="rtl"] .notification-icon,
[dir="rtl"] .message-avatar {
  margin-right: 0;
  margin-left: 1rem;
}

[dir="rtl"] .settings-dropdown .dropdown-item i,
[dir="rtl"] .profile-dropdown .dropdown-item i {
  margin-right: 0;
  margin-left: 0.75rem;
}

[dir="rtl"] .dropdown-menu-end {
  left: 0 !important;
  right: auto !important;
}
