/* ==========================================================
   MODERN GLOBAL RESET & ENHANCEMENT
   ========================================================== */
/* 1. Global Reset: Eliminates browser differences and ensures consistent box-sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased; /* Makes text crisp */
  -moz-osx-font-smoothing: grayscale;
}
/* 2. Document Level: Enables smooth scrolling and fixes height issues on mobile */
html {
  scroll-behavior: smooth;
  height: -webkit-fill-available; /* Mobile browser fix */
}
/* 3. Body: Integrates with your existing CSS; optimizes text and prevents horizontal scroll */
body {
  font-family: var(--font-family-sans-serif);
  background-color: var(--background-color);
  color: var(--text-color-dark);
  padding-top: var(--header-height); /* Space for fixed header */
  font-size: var(--base-font-size);
  text-rendering: optimizeLegibility;
  overflow-x: hidden; /* Prevents horizontal scroll */
  min-height: 100vh;
}
/* 4. Media Elements: Makes images, videos, etc., responsive */
img, picture, svg, video, canvas {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: cover;
}
/* 5. Typography Fixes: Balances headlines and paragraphs for better readability */
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance; /* Prevents awkward line breaks in headlines */
}
p {
  text-wrap: pretty; /* Manages paragraph endings */
}
/* 6. Form & Button Elements: Inherits styles to avoid conflicts */
input, button, textarea, select {
  font: inherit;
  color: inherit;
}
/* 7. Custom Scrollbar: Gives an "app-like" feel */ ::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--background-color);
}
::-webkit-scrollbar-thumb {
  background: var(--text-color-light);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}
/* ==========================================================
   CSS VARIABLES & THEME
   ========================================================== */ :root {
  /* Base Colors */
  --blue: #7979ff;
  --indigo: #6610f2;
  --purple: #5d2cb4;
  --pink: #e83e8c;
  --red: #f63b55;
  --orange: #fd7e14;
  --yellow: #f5a811;
  --green: #0fd793;
  --teal: #20c997;
  --cyan: #17a2b8;
  --white: #fff;
  /* Theme Colors */
  --primary-color: #8226f5; /* Purple */
  --secondary-color: #e625ea; /* Pink */
  --background-color: #f0f2f6;
  --card-bg: #ffffff;
  --bg-light: #fafafc;
  /* Text Colors */
  --text-color-dark: #333333;
  --text-color-medium: #666666;
  --text-color-light: #888888;
  /* Status & Accent Colors */
  --success-color: #4CAF50; /* Green */
  --warning-color: #FF9800; /* Orange */
  --error-color: #F44336; /* Red */
  /* Shadows */
  --shadow-light: 0 0.0625rem 0.25rem rgba(0, 0, 0, 0.1);
  --shadow-card: 0 0.25rem 0.625rem rgba(0, 0, 0, 0.05);
  /* Font/Sizing Configuration */
  --base-font-size: 1rem; /* 16px */
  --font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --header-height: 2.75rem; /* 44px */
}
/* FontAwesome Icon Sizing */
.fa {
  font-size: 1rem;
}
/* ==========================================================
   REUSABLE COMPONENTS
   ========================================================== */
/* Buttons: Gradient styles with hover effects */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease-in-out;
  color: var(--card-bg);
  background-color: var(--primary-color);
  font-weight: 400;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  will-change: transform, box-shadow; /* Optimizes animations */
}
.btn:hover {
  background: var(--card-bg) !important;
  color: var(--primary-color);
  border-color: var(--primary-color);
}
.btn:focus {
  box-shadow: 0 0 0 0.2rem rgba(130, 38, 245, 0.25); /* Accessibility: focus ring */
}
.pink-gradient, .pink-gradient-active.active {
  background: linear-gradient(45deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
  color: #ffffff !important;
}
.btn.pink-gradient:hover {
  background-image: linear-gradient(45deg, #680ade 0%, #c513c9 100%) !important;
  color: #ffffff !important;
}
.btn-icon {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
}
.home-btn {
  border-radius: 0;
  padding: 5px 0;
}
/* ==========================================================
   HEADER LAYOUT
   ========================================================== */
.top-header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  min-height: 44px;
  background-color: var(--card-bg);
  box-shadow: var(--shadow-light);
  position: fixed;
  top: 0;
  width: 100%;
  box-sizing: border-box;
  z-index: 1000;
}
.header-left-group, .header-right-group {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 0px;
}
.logo {
  font-weight: 300;
  color: #888888;
  font-size: 1.2em;
  display: inline-block;
  vertical-align: middle;
  text-decoration: none;
  margin-left: 0.5rem;
  margin-right: 0.5rem;
  line-height: 34px;
}
.logo img {
  max-height: 34px;
  border: 0;
  float: left;
  margin-top: 0;
  vertical-align: top;
  margin-right: 0.5rem;
}
.logo span {
  margin-top: -2px;
  vertical-align: middle;
  float: none;
  display: inline-block;
  line-height: 16px;
}
.logo b {
  color: #000000;
  font-weight: 600;
}
.logo span .small {
  font-size: 10px;
}
.header-icon {
  color: var(--text-color-medium);
  cursor: pointer;
}
/* Message Icon Container */
/* Message Icon Container (Same as before) */
.message-icon {
    position: relative;
    display: inline-block;
    cursor: pointer;
    z-index: 50;
    margin-right: 10px; /* Gap between message and notification icons */
}

/* Status Number for Messages */
.status-num {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--error-color); /* Red */
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.75rem;
    font-weight: normal;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 60;
}

/* Notification Icon Container */
.notification-icon {
    position: relative;
    display: inline-block;
    cursor: pointer;
    z-index: 50;
    margin-right: 15px; /* Gap before profile */
}

/* Notification Dot (Small indicator for new notifications) */
.notification-dot {
    position: absolute;
    top: -5px; /* Icon ke upar */
    right: -5px; /* Icon ke right side */
    width: 8px; /* Chhota dot */
    height: 8px;
    background-color: var(--warning-color); /* Orange ya green for new */
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 60;
}

/* Hover Effects (Optional) */
.message-icon:hover .status-num,
.notification-icon:hover .notification-dot {
    background-color: var(--success-color); /* Green on hover */
}

/* Agar status-num empty ho (sirf dot for unread indicator) */
.status-num:empty {
    width: 8px;
    height: 8px;
    padding: 0;
    min-width: 0;
}

/* Hover Effect */
.message-icon:hover .status-num {
    background-color: var(--warning-color); /* Orange on hover */
}
/* User Profile Section */
.user-profile-section {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-name {
  font-size: 0.875rem; /* 14px */
  color: var(--text-color-dark);
}
.user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-avatar figure {
  margin: 0; /* Reset margins */
  display: flex;
  align-items: center;
  justify-content: center;
    background: url('border.jpg') center/cover no-repeat;
    padding: 4px;
}
.user-avatar figcaption {
  font-size: 0.8rem;
  color: var(--text-color-light);
  margin-top: 5px;
}
.user-avatar img {
  width: 100%;
  height: 100%;
  background: white;
  border-radius: 50%;
  object-fit: cover;
}
.user-profile-section .dropdown-menu {
  position: absolute;
  top: calc(100% + 0px);
  right: 0px;
  min-width: 180px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px); /* Glassmorphism effect */
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateY(-10px);
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 100;
  padding: 8px 0;
}
.user-profile-section .dropdown-menu.show {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}
.user-profile-section .dropdown-menu a {
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.2s;
  justify-content: space-between;
}
.user-profile-section .dropdown-menu a:hover {
  background: #f5f5f5;
}
.user-profile-section .dropdown-menu a i {
  font-size: 16px;
  opacity: 0.7;
}
/* ==========================================================
   SIDEBAR LAYOUT
   ========================================================== */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 225px;
  height: 100vh;
  background-image: url('sidebar-2.png'); /* Replace with actual image or CSS gradient */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--purple); /* Fallback */
  transform: translateX(-100%);
  z-index: 1001;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0px 7px 25px 0px rgba(0, 0, 0, 0.15);
  will-change: transform;
}
.sidebar.open {
  transform: translateX(0);
}
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.3);
  display: none;
  z-index: 1000;
  backdrop-filter: blur(2px);
  transition: opacity 0.3s ease;
}
.sidebar-overlay.visible {
  display: block;
}
.sidebar-header {
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  background-image: url('singer-690117_640.jpg'); /* Replace with actual image */
  background-size: cover;
  background-repeat: repeat;
  background-color: var(--purple);
}
.sidebar-logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-left: 0.9375rem;
}
.sidebar-nav {
  background: rgba(93, 44, 180, 0.65);
}
.nav-list, .submenu {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: 0.3s;
  color: rgba(255, 255, 255, 0.8);
}
.nav-item > a {
  justify-content: space-between;
  padding: 12px 20px;
  gap: 15px;
}
.sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.submenu {
  max-height: 0;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.1);
  transition: max-height 0.4s ease-out;
}
.submenu.open {
  max-height: 500px;
}
.submenu li a {
  display: block;
  padding: 10px 20px 10px 55px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}
.submenu li a:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: #fff;
}
.nav-item {
  position: relative;
  display: block;
}
.nav-item.active .arrow {
  transform: rotate(180deg);
  transition: 0.3s;
}
.btn-close-menu {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.8);
}
/* ==========================================================
   MAIN CONTENT LAYOUT
   ========================================================== */
.main-content-container {
  padding: 1.25rem; /* 20px */
  max-width: 75rem; /* 1200px */
  margin: 0 auto;
}
.main-header-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  gap: 10px;
  margin-bottom: 1.5625rem; /* 25px */
  padding: 1.25rem;
  background-color: var(--bg-light);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-card);
}
.main-title-group {
  flex: 1;
  min-width: 0;
  margin-right: 10px;
}
.main-title {
  font-size: clamp(1.1rem, 4vw, 1.5rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.subtitle {
  margin: 0.3125rem 0 0 0;
  color: var(--text-color-light);
  font-size: 0.8rem;
}
.transfer-btn {
  border-radius: 1.56rem;
  font-size: 1rem;
  font-family: var(--font-family-sans-serif);
  flex-shrink: 0;
  text-transform: uppercase;
}
.transfer-btn i {
  margin-right: 8px;
  font-size: 0.9rem;
}
/* Cards Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  align-items: stretch;
}
.card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  background: var(--card-bg);
  padding: 1.25rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.9375rem;
}
.card-title {
  font-size: 0.875rem;
  color: var(--text-color-medium);
}
.card-figure {
  font-size: 0.875rem;
  font-weight: bold;
  color: var(--success-color);
}
.card-content {}
.card-content-icon {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.left-group {
  flex: 1;
  margin-right: 15px;
}
.card-amount {
  display: block;
  font-size: 1rem;
  font-weight: bold;
  color: var(--text-color-dark);
  margin-bottom: 0.625rem;
}
.card-icon-box {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}
/* Progress Bars */
.progress-container {
  width: 100%;
  background-color: #e9ecef;
  border-radius: 0.1875rem;
  height: 0.375rem;
  overflow: hidden;
  margin-top: 0.5rem;
}
.progress-bar {
  height: 100%;
  border-radius: 0.1875rem;
  transition: width 0.6s ease;
}
.green-progress {
  background-color: var(--success-color);
}
.red-progress {
  background-color: var(--error-color);
  width: 50%;
}
.orange-progress {
  background-color: var(--warning-color);
  width: 80%;
}
.purple-progress {
  background-color: var(--primary-color);
  width: 40%;
}
/* Cards with Icons */
.orange-bg {
  background-color: var(--warning-color);
}
.purple-bg {
  background-color: var(--primary-color);
}
/* ==========================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================== */
@media (max-width: 48rem) { /* 768px */
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .card {
    padding: 1rem;
  }
  .user-profile-section, .header-left-group, .header-right-group {
    gap: 5px;
  }
}
@media (max-width: 37.5rem) { /* 600px */
  
  .user-name {
    font-size: 0.8125rem;
       display: none;
    /* 13px */
  }
}
@media (min-width: 576px) {
  .subtitle {
    display: block; /* Tablet/Desktop par wapas dikhayega */
  }