/* ===== MODERN LIGHT DESIGN SYSTEM ===== */

:root {
  --primary-purple: #667eea;
  --primary-purple-dark: #764ba2;
  --success-green: #11998e;
  --success-green-light: #38ef7d;
  --accent-pink: #f093fb;
  --accent-red: #f5576c;
  --text-dark: #2d3748;
  --text-secondary: #718096;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --border-light: #e2e8f0;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.12);
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-light);
  margin: 0;
  padding: 0;
  color: var(--text-dark);
}

/* ===== MODERN LIGHT SIDEBAR ===== */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 250px;
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.05);
  padding-top: 0;
  z-index: 1000;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  padding: 25px 20px;
  color: var(--text-dark);
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid var(--border-light);
  background: white;
}

.sidebar-brand i {
  margin-right: 12px;
  font-size: 1.6rem;
  background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-brand:hover {
  color: var(--primary-purple);
}

.sidebar-menu {
  list-style: none;
  padding: 20px 10px;
  margin: 0;
}

.sidebar-menu li {
  margin: 5px 0;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 0.95rem;
}

.sidebar-menu a:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  color: var(--primary-purple);
  transform: translateX(3px);
}

.sidebar-menu a.active {
  background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-dark) 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.sidebar-menu a i {
  margin-right: 12px;
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
}

/* ===== MODERN TOP NAVBAR ===== */

.top-navbar {
  position: fixed;
  top: 0;
  left: 250px;
  right: 0;
  height: 70px;
  background: white;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 25px;
  z-index: 999;
}

.top-navbar .search-box {
  flex: 1;
  max-width: 500px;
}

.top-navbar .search-box input {
  border: 1px solid var(--border-light);
  border-radius: 15px;
  padding: 12px 20px;
  width: 100%;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background: var(--bg-light);
}

.top-navbar .search-box input:focus {
  outline: none;
  border-color: var(--primary-purple);
  background: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.top-navbar .navbar-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.top-navbar .icon-btn {
  background: var(--bg-light);
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-secondary);
}

.top-navbar .icon-btn:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  color: var(--primary-purple);
  transform: translateY(-2px);
}

/* ===== MAIN CONTENT ===== */

.main-content {
  margin-left: 250px;
  margin-top: 70px;
  padding: 30px;
  min-height: calc(100vh - 70px);
  background: var(--bg-light);
}

/* ===== STAT CARDS ===== */

.stat-card {
  background: white;
  border-radius: 15px;
  box-shadow: var(--shadow-md);
  padding: 20px;
  border: none;
  transition: all 0.3s ease;
  margin-bottom: 20px;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.stat-card .stat-title {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}

.stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-dark);
}

/* ===== TABLE CARD ===== */

.table-card {
  background: white;
  border-radius: 15px;
  box-shadow: var(--shadow-md);
  padding: 25px;
  margin-top: 25px;
}

.table-card h5 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-dark);
}

/* ===== USER PROFILE ===== */

.user-profile img,
.user-profile i {
  border-radius: 50%;
}

.user-profile .dropdown-toggle {
  background: var(--bg-light);
  padding: 8px 15px;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.user-profile .dropdown-toggle:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  color: var(--primary-purple) !important;
}

/* ===== MOBILE RESPONSIVE STYLES ===== */

.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1001;
  background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-dark) 100%);
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  font-weight: 600;
}

.mobile-menu-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Tablets and below (991px and down) */
@media (max-width: 991px) {
  .mobile-menu-toggle {
    display: block;
  }
  
  .sidebar {
    left: -250px;
    transition: left 0.3s ease;
  }
  
  .sidebar.active {
    left: 0;
    box-shadow: 2px 0 30px rgba(0,0,0,0.2);
  }
  
  .top-navbar {
    left: 0;
    width: 100%;
    padding-left: 60px;
  }
  
  .main-content {
    margin-left: 0;
    margin-top: 70px;
    padding: 15px;
  }
}

/* Tablets (768px and down) */
@media (max-width: 768px) {
  .top-navbar {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    padding: 10px 15px;
    padding-left: 60px;
  }
  
  .search-box {
    max-width: 100%;
    margin-bottom: 10px;
  }
  
  .navbar-actions {
    justify-content: flex-end;
    width: 100%;
  }
  
  .user-profile span {
    display: none;
  }
  
  .row > [class*="col-"] {
    margin-bottom: 15px;
  }
  
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Mobile phones (576px and down) */
@media (max-width: 576px) {
  .mobile-menu-toggle {
    padding: 8px 12px;
    font-size: 0.9rem;
    top: 10px;
    left: 10px;
  }
  
  .top-navbar {
    padding: 8px 10px;
    padding-left: 55px;
  }
  
  .search-box input {
    font-size: 0.85rem;
    padding: 8px 12px;
  }
  
  .navbar-actions {
    gap: 8px;
  }
  
  .icon-btn {
    font-size: 1rem;
    width: 36px;
    height: 36px;
  }
  
  .main-content {
    padding: 10px;
  }
  
  h1 { font-size: 1.5rem !important; }
  h2 { font-size: 1.25rem !important; }
  h3 { font-size: 1.1rem !important; }
  h4 { font-size: 1rem !important; }
  
  table {
    font-size: 0.8rem;
  }
  
  th, td {
    padding: 6px 4px !important;
  }
  
  .btn:not(.btn-group .btn) {
    width: 100%;
    margin-bottom: 8px;
  }
  
  .dropdown-menu {
    width: 280px !important;
    max-width: 90vw;
  }
  
  .card-body {
    padding: 12px !important;
  }
}

/* Extra small devices (420px and down) */
@media (max-width: 420px) {
  .sidebar {
    width: 220px;
    left: -220px;
  }
  
  h1 { font-size: 1.25rem !important; }
  h2 { font-size: 1.1rem !important; }
  h3 { font-size: 1rem !important; }
}

/* Print styles */
@media print {
  .sidebar,
  .top-navbar,
  .mobile-menu-toggle {
    display: none !important;
  }
  
  .main-content {
    margin-left: 0 !important;
    margin-top: 0 !important;
  }
}
/* ===== ULTRA-MODERN MOBILE DESIGN ===== */

/* Bottom Navigation Bar (Mobile Only) */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  border-radius: 30px 30px 0 0;
  padding: 15px 20px;
}

.bottom-nav-items {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 500px;
  margin: 0 auto;
  position: relative;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.7rem;
  transition: all 0.3s ease;
  padding: 8px 12px;
  border-radius: 12px;
}

.bottom-nav-item i {
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.bottom-nav-item.active {
  color: var(--primary-purple);
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.bottom-nav-item span {
  font-weight: 500;
}

/* Floating Action Button (Mobile Only) */
.fab {
  display: none;
  position: fixed;
  bottom: 85px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-dark) 100%);
  border-radius: 50%;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 999;
  border: none;
}

.fab:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5);
}

.fab:active {
  transform: scale(0.95);
}

/* Mobile Header (Replaces top navbar on mobile) */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 15px 20px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
  z-index: 998;
  border-radius: 0 0 25px 25px;
}

.mobile-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-header-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
}

.mobile-header-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 2px solid var(--primary-purple);
  object-fit: cover;
}

/* Mobile-Optimized Stat Cards */
@media (max-width: 768px) {
  /* Hide desktop navigation elements */
  .sidebar {
    display: none !important;
  }
  
  .top-navbar {
    display: none !important;
  }
  
  .mobile-menu-toggle {
    display: none !important;
  }
  
  /* Show mobile navigation */
  .bottom-nav {
    display: block;
  }
  
  .fab {
    display: flex;
  }
  
  .mobile-header {
    display: block;
  }
  
  /* Adjust main content for mobile */
  .main-content {
    margin-left: 0 !important;
    margin-top: 80px !important;
    margin-bottom: 90px !important;
    padding: 15px !important;
    background: var(--bg-light);
  }
  
  /* Mobile-optimized welcome banner */
  .dashboard-welcome {
    padding: 20px;
    border-radius: 20px;
    margin-bottom: 20px;
  }
  
  .dashboard-welcome h2 {
    font-size: 1.3rem;
  }
  
  .dashboard-welcome p {
    font-size: 0.85rem;
  }
  
  /* Mobile stat cards - full width, stacked */
  .modern-stat-card {
    margin-bottom: 15px;
    padding: 20px;
  }
  
  .stat-icon {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  /* Mobile table card */
  .modern-table-card {
    padding: 20px;
    margin-bottom: 20px;
  }
  
  .modern-table-card h5 {
    font-size: 1.1rem;
  }
  
  /* Mobile action button */
  .modern-action-btn {
    padding: 12px 30px;
    font-size: 0.95rem;
    width: 100%;
    justify-content: center;
  }
}

/* Extra small devices optimization */
@media (max-width: 576px) {
  .mobile-header {
    padding: 12px 15px;
  }
  
  .mobile-header-title {
    font-size: 1.2rem;
  }
  
  .mobile-header-avatar {
    width: 40px;
    height: 40px;
  }
  
  .bottom-nav {
    padding: 12px 15px;
  }
  
  .bottom-nav-item {
    padding: 6px 8px;
  }
  
  .bottom-nav-item i {
    font-size: 1.2rem;
  }
  
  .bottom-nav-item span {
    font-size: 0.65rem;
  }
  
  .fab {
    width: 55px;
    height: 55px;
    bottom: 75px;
    right: 15px;
    font-size: 1.3rem;
  }
  
  .main-content {
    margin-top: 70px !important;
    padding: 12px !important;
  }
  
  .dashboard-welcome {
    padding: 15px;
  }
  
  .modern-stat-card {
    padding: 15px;
  }
  
  .stat-number {
    font-size: 1.8rem;
  }
}
