@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Core fixes and responsive adjustments */
:root {
  --pm-primary: #ffc107;
  --pm-primary-dark: #ffb300;
  --pm-secondary: #ffcd38;
  --pm-bg: #f8fafc;
  --pm-text: #1e293b;
  --pm-text-muted: #64748b;
  --pm-card-bg: rgba(255, 255, 255, 0.85);
  --pm-glass-border: rgba(255, 255, 255, 0.4);
}

body {
  font-family: 'Inter', sans-serif !important;
  color: var(--pm-text);
  background: #0f172a !important; 
}

/* Glassmorphism utility */
.glass-panel {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: var(--pm-card-bg);
  border: 1px solid var(--pm-glass-border);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

/* Prevent background layers from covering UI */
.firstSec {
  position: relative;
}
.firstSec .container,
.firstSec .row,
.firstSec .loginform,
.firstSec .signup_form {
  position: relative;
  z-index: 2;
}

/* Hero text sizing and wrapping */
.firstSec .firstcont h1 {
  font-size: clamp(28px, 5vw, 54px);
  line-height: 1.15;
  margin: 8px 0 16px;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  color: #0f172a;
}
.firstSec .firstcont p {
  color: #334155;
  font-weight: 500;
}
.firstSec .firstcont .toplabel {
  display: inline-block;
  margin-bottom: 8px;
}

/* Space for fixed navbar on auth pages */
.marginforfixed {
  padding-top: 50px;
}

/* Premium Buttons */
.btn {
  font-family: 'Inter', sans-serif !important;
  letter-spacing: 0.025em;
  transition: all 0.3s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--pm-primary), var(--pm-primary-dark)) !important;
  border: none !important;
  box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4) !important;
  color: #1e293b !important;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 193, 7, 0.6) !important;
  background: linear-gradient(135deg, var(--pm-primary-dark), var(--pm-primary)) !important;
}

/* Dashboard structural fix: remove negative stacking */
#main_container .content_area {
  z-index: 0;
}
#main_container .content_area .top_header {
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
#main_container .sidebar {
  z-index: 101;
  background: #1e1e2f;
  border-right: 1px solid rgba(255,255,255,0.05);
}

/* Tweak cards and widgets spacing for tighter, aligned grid */
.card {
  border-radius: 16px !important;
  border: none !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.03) !important;
  background: rgba(255, 255, 255, 0.95) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.06) !important;
}
.card-body {
  padding: 24px !important;
}

/* Inputs */
.form-control {
  border-radius: 10px !important;
  border: 1px solid #e2e8f0 !important;
  padding: 12px 16px !important;
  transition: all 0.3s ease !important;
}
.form-control:focus {
  border-color: var(--pm-primary) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}

.formwrap {
  display: flex !important;
  align-items: center !important;
  padding: 0 15px !important;
  background: #fff !important;
  border-radius: 12px !important;
  border: 1px solid #e2e8f0 !important;
  height: 50px !important;
  overflow: hidden !important;
}

.formwrap i {
  position: static !important;
  flex-shrink: 0 !important;
  margin: 0 10px 0 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 25px !important;
  height: auto !important;
  box-shadow: none !important;
}

.formwrap .form-control {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 15px 10px !important;
  height: auto !important;
  line-height: 1.2 !important;
  width: 100% !important;
  flex: 1 !important;
  border-radius: 0 !important;
  color: #1a202c !important;
  font-weight: 500 !important;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.login-card {
  animation: fadeIn 0.6s ease-out forwards;
}

/* Avoid horizontal scrollbars on small/legacy layouts */
html, body {
  overflow-x: hidden;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  #main_container .content_area {
    padding-left: 0 !important;
  }
  #main_container .content_area .top_header {
    width: 100% !important;
  }
}

@media (max-width: 575px) {
  .marginforfixed {
    padding-top: 50px;
  }
}
/* Dashboard Fixes: Sidebar and Layout */
.navbarbottom {
  position: fixed !important;
  top: 0 !important;
  left: -280px; /* Hidden by default for toggle */
  width: 280px !important;
  min-width: 280px !important;
  height: 100vh !important;
  background: #1e293b !important; /* Sidebar dark color */
  border-right: 1px solid rgba(255,255,255,0.05) !important;
  z-index: 1040 !important;
  overflow-y: auto !important;
  transition: left 0.3s ease !important;
  padding-top: 80px !important;
}
.navbarbottom p {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.navbarbottom::-webkit-scrollbar {
  width: 6px;
}
.navbarbottom::-webkit-scrollbar-track {
  background: #1e293b; 
}
.navbarbottom::-webkit-scrollbar-thumb {
  background: #ffb300; 
  border-radius: 10px;
}
.navbarbottom::-webkit-scrollbar-thumb:hover {
  background: #e6a200; 
}
.navbarbottom.expanded {
  left: 0 !important;
}
#main_container, .main-content, .userbody {
  margin-left: 0 !important;
  transition: margin-left 0.3s ease !important;
}
@media (min-width: 992px) {
  .navbarbottom { left: 0 !important; }
  #main_container, .main-content, .userbody { margin-left: 280px !important; }
  .usernav .sidebarbtn { display: none !important; }
}
@media (max-width: 991px) {
  .usernav .sidebarbtn {
    display: inline-flex !important;
    flex-direction: column !important;
    justify-content: center !important;
  }
}
/* User Sidebar Profile Card Fix */
.navbarbottom .userprofilecardnew {
  padding: 20px !important;
  text-align: center !important;
  border-bottom: 1px solid rgba(255,255,255,0.05) !important;
}
.navbarbottom .userprofilecardnew img.profilePicture {
  width: 80px !important;
  height: 80px !important;
  border-radius: 50% !important;
  border: 3px solid #ffb300 !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important;
}
.navbarbottom .userprofilecardnew .upcname {
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 1.1rem !important;
  margin-top: 15px !important;
  margin-bottom: 5px !important;
}
.navbarbottom .userprofilecardnew .upcfund {
  color: #ffb300 !important;
  font-weight: 800 !important;
  font-size: 1.2rem !important;
}
/* Sidebar List Items */
.navbarbottom ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
.navbarbottom ul li a {
  display: flex !important;
  align-items: center !important;
  padding: 15px 25px !important;
  color: #94a3b8 !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
}
.navbarbottom ul li a:hover, .navbarbottom ul li.active a {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border-left: 4px solid #ffb300 !important;
}
.navbarbottom ul li a i {
  font-size: 1.1rem !important;
  margin-right: 15px !important;
  width: 25px !important;
  text-align: center !important;
  color: #ffb300 !important;
}
/* Top Hamburger Nav */
.usernav {
  background: #0f172a !important; /* Dark topnav */
  border-bottom: 1px solid rgba(255,255,255,0.05) !important;
  z-index: 1045 !important;
  height: 70px !important;
}
.usernav .sidebarbtn {
  background: transparent !important;
  border: none !important;
  padding: 10px !important;
  margin-top: 15px !important;
  margin-left: 15px !important;
  cursor: pointer !important;
}
.usernav .sidebarbtn .icon {
  width: 25px !important;
  height: 3px !important;
  background-color: #ffb300 !important;
  margin: 5px 0 !important;
  transition: 0.4s !important;
}
.usernav .sidebarbtn.tog .icon1 { transform: rotate(-45deg) translate(-5px, 6px); }
.usernav .sidebarbtn.tog .icon2 { opacity: 0; }
.usernav .sidebarbtn.tog .icon3 { transform: rotate(45deg) translate(-5px, -6px); }
