/* =============================================================================
   MASTER STYLESHEET - WINGO PRO (ADVANCED LIGHT GLOW THEME)
   ============================================================================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
  /* --- Colors --- */
  --bg-body: #f3f4f6;
  --bg-card: #ffffff;
  --text-main: #333;
  --text-muted: #64748b;
  
  /* --- Glowing Brand Colors --- */
  --primary: #7367f0;
  --primary-shadow: rgba(115, 103, 240, 0.4);
  
  --success: #28c76f;
  --success-shadow: rgba(40, 199, 111, 0.4);
  
  --danger: #ea5455;
  --danger-shadow: rgba(234, 84, 85, 0.4);
  
  --warning: #ff9f43;
  --warning-shadow: rgba(255, 159, 67, 0.4);
  
  --info: #00cfe8;
  --info-shadow: rgba(0, 207, 232, 0.4);

  /* --- Layout --- */
  --sidebar-width: 260px;
  --navbar-height: 70px;
  --border-radius: 16px;
}

* { box-sizing: border-box; outline: none; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0; padding: 0;
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #e2e8f0; }
::-webkit-scrollbar-thumb { 
  background: linear-gradient(var(--primary), var(--info)); 
  border-radius: 10px; 
}

a { text-decoration: none; transition: 0.3s; color: inherit; }

/* ==============================================
   1. NAVBAR (Glassy White)
   ============================================= */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--navbar-height);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1030; display: flex; align-items: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.03); padding: 0 20px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.navbar-brand-wrapper {
  width: var(--sidebar-width); display: flex; align-items: center;
}
.navbar-brand img { height: 45px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); }

/* 3-Dot Toggle Animation */
.navbar-toggler {
  border: none; background: transparent; cursor: pointer;
  color: #333; font-size: 1.6rem; padding: 8px;
  border-radius: 8px; transition: 0.3s;
}
.navbar-toggler:hover {
  background: rgba(115, 103, 240, 0.1);
  color: var(--primary);
  transform: scale(1.1);
}
.navbar-toggler:active { transform: scale(0.95); }

.navbar-menu-wrapper {
  flex-grow: 1; display: flex; justify-content: flex-end; align-items: center;
}

/* Logout Button */
.btn-logout {
  background: rgba(234, 84, 85, 0.1);
  color: var(--danger); padding: 8px 15px;
  border-radius: 30px; font-weight: 600; font-size: 0.9rem;
  display: flex; align-items: center; gap: 8px;
}
.btn-logout:hover {
  background: var(--danger); color: #fff;
  box-shadow: 0 4px 15px var(--danger-shadow);
  transform: translateY(-2px);
}

/* ==============================================
   2. SIDEBAR (Fixed Scroll & Colorful Hover)
   ============================================= */
.container-fluid.page-body-wrapper {
  padding-top: var(--navbar-height); min-height: 100vh; display: flex;
}

.sidebar {
  width: var(--sidebar-width);
  min-height: calc(100vh - var(--navbar-height));
  background: #fff;
  position: fixed; top: var(--navbar-height); left: 0; bottom: 0;
  overflow-y: auto; /* SCROLL ENABLED */
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 4px 0 25px rgba(0,0,0,0.03);
  border-right: 1px solid #f1f5f9;
  padding-bottom: 60px;
}

/* User Profile */
.sidebar .user-profile {
  text-align: center; padding: 30px 15px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border-bottom: 1px dashed #e2e8f0; margin-bottom: 10px;
}
.sidebar .user-profile img {
  width: 80px; height: 80px; border-radius: 50%;
  border: 3px solid #fff; padding: 2px;
  box-shadow: 0 0 0 3px var(--primary), 0 10px 20px var(--primary-shadow);
}
.sidebar .user-profile .user-name {
  font-weight: 700; margin-top: 15px; color: #1e293b; font-size: 1.1rem;
}
.sidebar .user-profile .user-designation {
  font-size: 0.8rem; color: var(--text-muted); background: #f1f5f9;
  padding: 4px 12px; border-radius: 20px; display: inline-block; margin-top: 5px;
}

/* Nav Items */
.sidebar .nav { padding: 0 12px; display: flex; flex-direction: column; gap: 6px; }

.sidebar .nav-item .nav-link {
  display: flex; align-items: center;
  padding: 12px 15px; color: #475569;
  font-size: 0.95rem; font-weight: 600;
  border-radius: 12px; transition: all 0.3s;
  position: relative; overflow: hidden;
}

/* Icons */
.sidebar .nav-item .nav-link i.menu-icon {
  font-size: 1.3rem; margin-right: 15px; width: 24px; text-align: center;
  color: #94a3b8; transition: 0.3s;
}
.sidebar .nav-item .nav-link i.menu-arrow {
  margin-left: auto; font-size: 0.8rem; transition: 0.3s; color: #cbd5e1;
}
.sidebar .nav-link[aria-expanded="true"] i.menu-arrow { transform: rotate(90deg); color: var(--primary); }

/* --- HOVER EFFECTS (Colorful & Glowing) --- */
.sidebar .nav-item:hover > .nav-link,
.sidebar .nav-item.active > .nav-link {
  background: linear-gradient(45deg, var(--primary), #a69bf5);
  color: #fff;
  box-shadow: 0 5px 15px var(--primary-shadow);
}
.sidebar .nav-item:hover i.menu-icon,
.sidebar .nav-item.active i.menu-icon { color: #fff; transform: scale(1.1); }

/* Sub-Menu (Dropdown) */
.sidebar .collapse { visibility: visible; }
.sidebar .collapse:not(.show) { display: none; }

.sidebar .sub-menu {
  background: #f8fafc; margin-top: 5px; border-radius: 12px;
  padding: 5px; overflow: hidden; border: 1px solid #f1f5f9;
}
.sidebar .sub-menu .nav-item .nav-link {
  padding: 10px 10px 10px 45px; font-size: 0.85rem; color: #64748b;
  background: transparent; box-shadow: none;
}
.sidebar .sub-menu .nav-item .nav-link:hover {
  color: var(--primary); background: rgba(115, 103, 240, 0.08);
  padding-left: 50px;
}
.sidebar .sub-menu .nav-item .nav-link::before {
  content: '✦'; position: absolute; left: 25px; font-size: 10px; color: #cbd5e1;
}
.sidebar .sub-menu .nav-item .nav-link:hover::before { color: var(--primary); }

/* ==============================================
   3. DASHBOARD CONTENT (Advanced Functions)
   ============================================= */
.main-panel {
  width: calc(100% - var(--sidebar-width));
  margin-left: var(--sidebar-width);
  padding: 30px; transition: 0.3s;
}

.page-header { margin-bottom: 25px; }
.page-title { font-size: 1.5rem; font-weight: 700; color: #1e293b; margin: 0; }
.page-subtitle { color: var(--text-muted); font-size: 0.9rem; }

/* Grid Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px; margin-bottom: 30px;
}

/* 3D Colorful Cards */
.card-3d {
  border-radius: 20px; border: none;
  position: relative; overflow: hidden;
  color: #fff; min-height: 160px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.card-3d:hover { transform: translateY(-10px); }

/* Card Content */
.card-body { padding: 25px; position: relative; z-index: 2; }
.card-title { font-size: 0.85rem; text-transform: uppercase; font-weight: 700; opacity: 0.9; margin-bottom: 5px; letter-spacing: 0.5px; }
.card-amount { font-size: 2.2rem; font-weight: 800; margin: 5px 0; text-shadow: 0 4px 10px rgba(0,0,0,0.15); }

/* Glowing Link Button */
.card-link {
  display: inline-block; margin-top: 15px; font-size: 0.8rem; font-weight: 600;
  color: #fff; padding: 8px 20px; border-radius: 30px;
  background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(5px); text-decoration: none; transition: 0.3s;
}
.card-link:hover {
  background: #fff; color: var(--primary);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1); transform: scale(1.05);
}

/* Background Icons */
.card-icon {
  position: absolute; right: 15px; bottom: 10px;
  font-size: 5rem; opacity: 0.2; color: #fff;
  transform: rotate(-15deg); transition: 0.3s;
}
.card-3d:hover .card-icon { transform: rotate(0deg) scale(1.2); opacity: 0.3; }

/* Gradients with Glow Shadow */
.grad-blue { background: linear-gradient(135deg, #00b09b, #00cfe8); box-shadow: 0 10px 25px var(--info-shadow); }
.grad-green { background: linear-gradient(135deg, #11998e, #38ef7d); box-shadow: 0 10px 25px var(--success-shadow); }
.grad-red { background: linear-gradient(135deg, #ff416c, #ff4b2b); box-shadow: 0 10px 25px var(--danger-shadow); }
.grad-purple { background: linear-gradient(135deg, #8e2de2, #4a00e0); box-shadow: 0 10px 25px rgba(139, 92, 246, 0.4); }
.grad-orange { background: linear-gradient(135deg, #f7971e, #ffd200); box-shadow: 0 10px 25px var(--warning-shadow); }
.grad-dark { background: linear-gradient(135deg, #232526, #414345); box-shadow: 0 10px 25px rgba(0,0,0,0.3); }

/* --- ADVANCED ACTION CARDS (New) --- */
.action-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px;
}
.action-card {
  background: #fff; border-radius: 16px; padding: 20px;
  text-align: center; transition: 0.3s;
  border: 1px solid #f1f5f9; box-shadow: 0 4px 6px rgba(0,0,0,0.02);
  cursor: pointer; position: relative; overflow: hidden;
}
.action-card:hover {
  transform: translateY(-5px); box-shadow: 0 15px 30px rgba(115, 103, 240, 0.15);
  border-color: var(--primary);
}
.action-icon {
  width: 50px; height: 50px; margin: 0 auto 15px;
  background: rgba(115, 103, 240, 0.1); color: var(--primary);
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; transition: 0.3s;
}
.action-card:hover .action-icon {
  background: var(--primary); color: #fff; transform: rotateY(180deg);
}
.action-title { font-weight: 600; color: #333; font-size: 0.95rem; }

/* ==============================================
   4. MOBILE RESPONSIVENESS
   ============================================= */
@media (max-width: 991px) {
  .navbar-brand-wrapper { width: 60px; }
  .navbar-menu-wrapper { width: calc(100% - 60px); }
  .navbar-brand h3 { display: none; }
  
  .main-panel { width: 100%; margin-left: 0; }
  
  /* Sidebar Logic */
  .sidebar-offcanvas {
    position: fixed; top: var(--navbar-height); bottom: 0;
    left: -280px; width: 260px; height: calc(100vh - var(--navbar-height));
    z-index: 1040; background: #fff;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 10px 0 40px rgba(0,0,0,0.1);
  }
  .sidebar-offcanvas.active { left: 0; }
}