/* ==========================================================================
   GyanRank — Master Design System & Stylesheet (v2.0)
   100% Light Theme • Clean SaaS Panels • Subtle Public Glassmorphism • Mobile Friendly
   ========================================================================== */
@import url('./modern-brand-update.css');

:root {
  /* Brand Palette */
  --gr-primary: #4f46e5;
  --gr-primary-hover: #4338ca;
  --gr-primary-light: #6366f1;
  --gr-primary-subtle: #eef2ff;
  --gr-accent: #06b6d4;
  --gr-secondary: #7c3aed;
  
  /* Status Colors */
  --gr-success: #10b981;
  --gr-success-subtle: #ecfdf5;
  --gr-warning: #f59e0b;
  --gr-warning-subtle: #fffbeb;
  --gr-danger: #ef4444;
  --gr-danger-subtle: #fef2f2;
  --gr-info: #0ea5e9;
  --gr-info-subtle: #f0f9ff;
  
  /* Light Theme Surface & Structure */
  --gr-bg: #f8fafc;
  --gr-surface: #ffffff;
  --gr-surface-muted: #f1f5f9;
  --gr-border: #e2e8f0;
  --gr-border-light: #f1f5f9;
  
  /* Typography */
  --gr-text: #0f172a;
  --gr-text-secondary: #475569;
  --gr-text-muted: #64748b;
  --gr-text-light: #94a3b8;
  
  /* Shadows */
  --gr-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --gr-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --gr-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --gr-shadow-lg: 0 10px 25px -3px rgba(79, 70, 229, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --gr-shadow-xl: 0 20px 35px -5px rgba(79, 70, 229, 0.12), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Radii */
  --gr-radius-sm: 8px;
  --gr-radius-md: 12px;
  --gr-radius-lg: 16px;
  --gr-radius-xl: 22px;
  --gr-radius-full: 9999px;
  
  /* Transitions */
  --gr-transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Base & Resets
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Image reset: "image ke niche saddo nahi hoga" */
img, svg, picture, .gr-logo, .brand-link img, .hero-img, .auth-logo img {
  box-shadow: none !important;
  filter: none !important;
  -webkit-filter: none !important;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--gr-bg);
  color: var(--gr-text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--gr-primary);
  text-decoration: none;
  transition: var(--gr-transition);
}
a:hover {
  color: var(--gr-primary-hover);
}

/* ==========================================================================
/* ==========================================================================
   PANEL LAYOUT (Hostinger & Razorpay Inspired Framed Canvas)
   "isame charo tarf paty he. hame vi yesa chahiye panal me only"
   Outer dark perimeter frame (patti) with inner rounded solid light workspace.
   ========================================================================== */
.dashboard-body {
  background-color: #0b0e1e !important;
  color: #0f172a !important;
  min-height: 100vh;
  height: 100vh;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box;
  overflow: hidden;
}

@media (max-width: 991.98px) {
  .dashboard-body {
    padding: 0 !important;
  }
}

.app-container {
  display: flex;
  height: 100vh !important;
  max-height: 100vh !important;
  width: 100%;
  position: relative;
  background-color: #ffffff;
  border-radius: 0 !important;
  overflow: hidden;
  box-shadow: none !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

@media (max-width: 991.98px) {
  .app-container {
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
  }
}

/* Left Sidebar */
.gr-sidebar {
  width: 260px;
  flex-shrink: 0;
  background-color: #ffffff;
  border-right: 1px solid var(--gr-border);
  min-height: 100%;
  display: flex;
  flex-direction: column;
  z-index: 1040;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-brand {
  height: 68px;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #0b0e1e !important;
  border: none !important;
  border-top: none !important;
  border-bottom: none !important;
  border-right: none !important;
  box-shadow: none !important;
  outline: none !important;
  position: relative;
  z-index: 1045;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #0f172a;
}
.brand-link:hover {
  color: #0f172a;
}

.brand-logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  color: #ffffff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.15rem;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
}

.brand-text-wrapper {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 800;
  font-size: 1.15rem;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.brand-subtext {
  font-size: 0.72rem;
  color: var(--gr-primary);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Navigation items */
.sidebar-nav {
  padding: 1.25rem 0.85rem;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.nav-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.9rem 0.85rem 0.35rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.65rem 0.95rem;
  border-radius: 10px;
  color: #475569;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.18s ease;
  margin-bottom: 2px;
  white-space: nowrap;
}

.sidebar-link i {
  font-size: 1.15rem;
  width: 22px;
  text-align: center;
  color: #64748b;
  transition: color 0.18s ease;
}

.sidebar-link:hover {
  background-color: #f1f5f9;
  color: #4f46e5;
}
.sidebar-link:hover i {
  color: #4f46e5;
}

.sidebar-link.active {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
  font-weight: 600;
  border-left: 3px solid #4f46e5;
}
.sidebar-link.active i {
  color: #4f46e5 !important;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--gr-border-light);
  font-size: 0.78rem;
  color: #94a3b8;
}

/* Main Content Wrapper */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  background-color: #f8fafc;
}

/* Topbar Header for Dashboard Panels (68px) */
header.gr-topbar {
  height: 68px;
  flex-shrink: 0;
  background-color: #0b0e1e !important;
  border: none !important;
  border-top: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  outline: none !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  z-index: 1020;
}

/* Public Page Topbar / Black Patti (Compact 36px) */
div.gr-topbar,
.gr-public-topbar {
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  flex-shrink: 0;
  background-color: #0b0e1e !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 !important;
  font-size: 0.8rem !important;
  line-height: 1.4 !important;
  z-index: 1020;
}

div.gr-topbar .container,
.gr-public-topbar .container {
  height: 100%;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sidebar-toggle-btn {
  display: none;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  width: 42px;
  height: 42px;
  border-radius: 10px;
  font-size: 1.5rem;
  color: #ffffff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: var(--gr-transition);
}
.sidebar-toggle-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.page-title-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #6366f1;
  box-shadow: 0 0 10px #6366f1;
}

.topbar-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff !important;
  margin: 0;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topbar-icon-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--gr-transition);
}
.topbar-icon-btn:hover {
  background-color: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: #ef4444;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  min-width: 18px;
  height: 18px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0f172a;
  line-height: 1;
}

.user-profile-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 5px 12px 5px 6px;
  border-radius: 9999px;
  cursor: pointer;
  transition: var(--gr-transition);
}
.user-profile-btn:hover {
  background-color: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.25);
}

.user-avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.user-name-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.2;
  text-align: left;
}

.user-role-badge {
  font-size: 0.65rem;
  color: #a5b4fc;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: left;
}

.user-caret {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* Page Content ("and bicha me page scrole hoga") */
.page-content {
  flex: 1;
  overflow-y: auto; /* Middle page content scrolls smoothly */
  overflow-x: hidden;
  padding: 2rem 1.75rem;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

/* Panel Welcome Card */
.welcome-card {
  background: #ffffff;
  border: 1px solid var(--gr-border);
  border-radius: var(--gr-radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: var(--gr-shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.welcome-badge {
  display: inline-flex;
  align-items: center;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 50px;
  margin-bottom: 0.5rem;
}

.welcome-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.welcome-desc {
  color: #64748b;
  font-size: 0.92rem;
  margin: 0;
  max-width: 620px;
}

.welcome-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Panel Stat KPI Cards */
.stat-card {
  background: #ffffff;
  border: 1px solid var(--gr-border);
  border-radius: var(--gr-radius-md);
  padding: 1.35rem;
  box-shadow: var(--gr-shadow-xs);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--gr-shadow-md);
}

.stat-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: block;
}

.stat-value {
  font-size: 1.65rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0.2rem 0;
  line-height: 1.15;
}

.stat-trend {
  font-size: 0.78rem;
  font-weight: 600;
}

/* Panel Card / Tables */
.panel-card {
  background: #ffffff;
  border: 1px solid var(--gr-border);
  border-radius: var(--gr-radius-lg);
  box-shadow: var(--gr-shadow-xs);
  overflow: hidden;
}

.panel-card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gr-border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.panel-card-body {
  padding: 1.5rem;
}

/* Mobile Drawer Overlay */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1030;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.sidebar-backdrop.show {
  display: block;
  opacity: 1;
}

/* Mobile Breakpoint for Panel */
@media (max-width: 991.98px) {
  .sidebar-toggle-btn {
    display: flex !important;
  }
  .gr-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    z-index: 1050;
    transform: translateX(-100%);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    background-color: #ffffff;
  }
  .gr-sidebar.show {
    transform: translateX(0);
  }
  .page-content {
    padding: 1.25rem 1rem;
    -webkit-overflow-scrolling: touch;
  }
  .welcome-card {
    padding: 1.25rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .welcome-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .welcome-actions .btn {
    flex: 1 1 auto;
    text-align: center;
    justify-content: center;
  }
}

/* Enhanced Device-Friendly Breakpoints for Phone & Tablet */
@media (max-width: 767.98px) {
  .gr-topbar {
    height: 60px;
    padding: 0 0.85rem;
  }
  .topbar-title {
    font-size: 1.05rem;
  }
  .page-content {
    padding: 1rem 0.75rem;
  }
  .welcome-title {
    font-size: 1.3rem;
  }
  .welcome-desc {
    font-size: 0.84rem;
  }
  .stat-card {
    padding: 0.85rem 0.75rem;
    gap: 0.65rem;
  }
  .stat-icon-wrapper {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
    border-radius: 8px;
    flex-shrink: 0;
  }
  .stat-value {
    font-size: 1.25rem;
    margin: 0.15rem 0;
  }
  .stat-label {
    font-size: 0.74rem;
    line-height: 1.2;
  }
  .stat-trend {
    font-size: 0.68rem;
  }
  .content-panel {
    border-radius: var(--gr-radius-md);
  }
  .panel-header {
    padding: 0.85rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .panel-title {
    font-size: 0.95rem;
  }
  .table {
    font-size: 0.82rem;
  }
  .table th, .table td {
    padding: 0.6rem 0.65rem;
    white-space: nowrap;
  }
}

@media (max-width: 575.98px) {
  .welcome-actions .btn {
    width: 100%;
    flex: 1 1 100%;
  }
  #dashPlanQuotasCard .card-body {
    padding: 1rem !important;
  }
}


/* ==========================================================================
   PUBLIC PAGES (Light Theme + Subtle Frosted Glass Effect)
   "buttun and other me halaka glassik effect publick page me"
   ========================================================================== */
.gr-public-body {
  background-color: #f8fafc;
  color: #0f172a;
}

/* Public Light Glass Navbar */
.navbar-glass-light {
  background: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 4px 20px -2px rgba(99, 102, 241, 0.05);
  padding: 0.85rem 0;
  transition: all 0.3s ease;
}

.navbar-glass-light .nav-link {
  color: #475569 !important;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0.85rem !important;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.navbar-glass-light .nav-link:hover,
.navbar-glass-light .nav-link.active {
  color: #4f46e5 !important;
  background-color: rgba(238, 242, 255, 0.7);
}

/* Public Hero Section */
.hero-section-light {
  padding: 5.5rem 0 4.5rem;
  background: radial-gradient(circle at 85% 15%, rgba(99, 102, 241, 0.09) 0%, transparent 45%),
              radial-gradient(circle at 15% 85%, rgba(6, 182, 212, 0.08) 0%, transparent 45%),
              #f8fafc;
  position: relative;
}

.hero-badge-light {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.45rem 1.15rem;
  border-radius: 50px;
  background: rgba(238, 242, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(199, 210, 254, 0.85);
  color: #4338ca;
  font-size: 0.88rem;
  font-weight: 600;
}

.hero-title-light {
  font-size: clamp(2.3rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.gradient-text-light {
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glassmorphic Buttons (Public Pages) */
.btn-glass-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 0.75rem 1.6rem;
  border-radius: var(--gr-radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.22s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-glass-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.42);
  color: #ffffff !important;
}

.btn-glass-secondary {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #3730a3 !important;
  border: 1px solid rgba(99, 102, 241, 0.3) !important;
  padding: 0.75rem 1.6rem;
  border-radius: var(--gr-radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.08);
  transition: all 0.22s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-glass-secondary:hover {
  background: #ffffff !important;
  border-color: #6366f1 !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(99, 102, 241, 0.16);
  color: #4338ca !important;
}

/* Glassmorphic Feature Cards (Public Pages) */
.card-glass-light {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--gr-radius-xl);
  padding: 2rem;
  box-shadow: 0 10px 30px -5px rgba(99, 102, 241, 0.07), 0 4px 12px rgba(0, 0, 0, 0.02);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
}
.card-glass-light:hover {
  transform: translateY(-6px);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 16px 36px -4px rgba(79, 70, 229, 0.14);
}

.feature-icon-glass {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
  border: 1px solid rgba(79, 70, 229, 0.2);
  color: var(--gr-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
}

/* Stats Glass Counter */
.stat-card-glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: var(--gr-radius-lg);
  padding: 1.75rem;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.stat-number-light {
  font-size: 2.75rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
}

/* Pricing Light Cards */
.pricing-card-light {
  background: #ffffff;
  border: 1px solid var(--gr-border);
  border-radius: var(--gr-radius-xl);
  padding: 2.5rem 2rem;
  box-shadow: var(--gr-shadow-md);
  transition: all 0.3s ease;
  height: 100%;
  position: relative;
}
.pricing-card-light:hover {
  transform: translateY(-5px);
  box-shadow: var(--gr-shadow-lg);
}

.pricing-card-featured {
  border: 2px solid #4f46e5 !important;
  box-shadow: 0 12px 35px -5px rgba(79, 70, 229, 0.18) !important;
}

.pricing-badge-featured {
  position: absolute;
  top: -14px;
  right: 24px;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 4px 14px;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Footer Light */
.gr-footer-light {
  background-color: #ffffff;
  border-top: 1px solid var(--gr-border);
  padding: 4.5rem 0 2rem;
  color: #475569;
}
.gr-footer-light a {
  color: #64748b;
  text-decoration: none;
}
.gr-footer-light a:hover {
  color: var(--gr-primary);
}

/* ==========================================================================
   NOTES & VIDEO LECTURES — ULTRA-PREMIUM REDESIGN (v3.0)
   ========================================================================== */

/* Hero Banner */
.study-hub-hero {
  position: relative;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #4338ca 100%);
  border-radius: 20px;
  padding: 2.2rem 2.2rem 2rem;
  color: #ffffff;
  overflow: hidden;
  box-shadow: 0 14px 34px -8px rgba(67, 56, 202, 0.35);
  margin-bottom: 1.75rem;
}
.study-hub-hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -40px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.35) 0%, rgba(129, 140, 248, 0) 70%);
  pointer-events: none;
}
.study-hub-hero::after {
  content: '';
  position: absolute;
  bottom: -50px;
  left: 20%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.25) 0%, rgba(6, 182, 212, 0) 70%);
  pointer-events: none;
}
.study-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e0e7ff;
  margin-bottom: 0.75rem;
}
.study-hero-title {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
  line-height: 1.25;
}
.study-hero-subtitle {
  font-size: 0.92rem;
  color: #c7d2fe;
  max-width: 620px;
  margin-bottom: 1.25rem;
}

/* Stat Cards */
.study-stat-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.15rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: all 0.25s ease;
  height: 100%;
}
.study-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}
.study-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}
.study-stat-icon.primary {
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  color: #4f46e5;
}
.study-stat-icon.success {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  color: #059669;
}
.study-stat-icon.info {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  color: #0284c7;
}
.study-stat-icon.purple {
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
  color: #7c3aed;
}
.study-stat-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.15;
}
.study-stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Toolbar & Filter Bar */
.study-toolbar-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.15rem 1.25rem;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
  margin-bottom: 1.5rem;
}
.study-search-wrap {
  position: relative;
  flex: 1;
}
.study-search-wrap .bi-search {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.95rem;
}
.study-search-input {
  width: 100%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.65rem 2.2rem 0.65rem 2.4rem;
  font-size: 0.88rem;
  color: #0f172a;
  transition: all 0.2s ease;
}
.study-search-input:focus {
  background: #ffffff;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
  outline: none;
}
.study-search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0;
  font-size: 0.95rem;
  display: none;
}
.study-search-clear:hover {
  color: #475569;
}

/* Switcher Pill */
.study-view-toggle {
  display: inline-flex;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 4px;
  gap: 3px;
}
.study-view-toggle button {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 9px;
  transition: all 0.18s ease;
  cursor: pointer;
}
.study-view-toggle button.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

/* Category Filter Pills */
.study-filter-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.study-filter-pills::-webkit-scrollbar {
  display: none;
}
.study-filter-pill {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 9999px;
  white-space: nowrap;
  transition: all 0.18s ease;
  cursor: pointer;
}
.study-filter-pill:hover {
  border-color: #cbd5e1;
  color: #0f172a;
  background: #f8fafc;
}
.study-filter-pill.active {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

/* Folder Cards */
.study-folder-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  height: 100%;
  width: 100%;
  text-align: left;
}
.study-folder-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--folder-accent, #4f46e5);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.study-folder-card:hover {
  transform: translateY(-4px);
  border-color: #cbd5e1;
  box-shadow: 0 12px 24px -4px rgba(15, 23, 42, 0.08);
}
.study-folder-card:hover::before {
  opacity: 1;
}
.study-folder-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--folder-bg, #eef2ff);
  color: var(--folder-accent, #4f46e5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  flex-shrink: 0;
  transition: transform 0.22s ease;
}
.study-folder-card:hover .study-folder-icon {
  transform: scale(1.08);
}
.study-folder-title {
  font-weight: 700;
  font-size: 0.96rem;
  color: #0f172a;
  margin-bottom: 2px;
}
.study-folder-meta {
  font-size: 0.78rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Note Document Card */
.study-note-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.24s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}
.study-note-card:hover {
  transform: translateY(-4px);
  border-color: #cbd5e1;
  box-shadow: 0 14px 28px -4px rgba(15, 23, 42, 0.09);
}
.study-note-head {
  padding: 1.25rem 1.25rem 0.75rem;
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}
.study-file-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}
.study-file-badge.pdf {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #dc2626;
}
.study-file-badge.doc {
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  color: #4338ca;
}
.study-file-badge.link {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #d97706;
}
.study-file-badge.img {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  color: #16a34a;
}
.study-note-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.study-note-desc {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.study-note-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0 1.25rem 0.75rem;
}
.study-pill-tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
}
.study-pill-tag.accent {
  background: #eef2ff;
  color: #4f46e5;
}
.study-pill-tag.subject {
  background: #ecfdf5;
  color: #059669;
}
.study-note-footer {
  margin-top: auto;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid #f1f5f9;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Video Lecture Card */
.study-lecture-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.24s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.study-lecture-card:hover {
  transform: translateY(-4px);
  border-color: #cbd5e1;
  box-shadow: 0 14px 30px -4px rgba(15, 23, 42, 0.1);
}
.study-video-thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #090d16;
  overflow: hidden;
  cursor: pointer;
}
.study-video-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0.92;
}
.study-lecture-card:hover .study-video-thumb-img {
  transform: scale(1.05);
  opacity: 1;
}
.study-video-play-btn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(79, 70, 229, 0.92);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.22s ease, background 0.22s ease;
}
.study-lecture-card:hover .study-video-play-btn {
  transform: scale(1.15);
  background: #4338ca;
}
.study-video-badge-duration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.78);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}
.study-video-body {
  padding: 1.15rem 1.25rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.study-video-title {
  font-weight: 700;
  font-size: 0.96rem;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 0.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.study-video-desc {
  font-size: 0.82rem;
  color: #64748b;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.study-video-footer {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #94a3b8;
}

/* Breadcrumb Navigation */
.study-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  flex-wrap: wrap;
}
.study-breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-weight: 600;
  background: #f1f5f9;
  padding: 4px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}
.study-breadcrumb-item:hover {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #0f172a;
}
.study-breadcrumb-sep {
  color: #cbd5e1;
  font-size: 0.75rem;
}

/* Crucial Folder Tree Level Toggle */
.content-tree-level.is-hidden,
.is-hidden {
  display: none !important;
}
.content-tree-level {
  animation: contentTreeFadeIn 0.22s ease-in-out;
}
@keyframes contentTreeFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.content-back-btn {
  border: 1px solid #e2e8f0 !important;
  background: #ffffff !important;
  border-radius: 9999px !important;
  padding: 6px 16px !important;
  font-weight: 600 !important;
  font-size: 0.82rem !important;
  color: #475569 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
  transition: all 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  cursor: pointer !important;
  outline: none !important;
  text-decoration: none !important;
}
.content-back-btn:hover {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
  transform: translateX(-3px) !important;
}

/* ==========================================================================
   COMPREHENSIVE MOBILE-FRIENDLY RESPONSIVE SYSTEM
   Fixes: Header, Buttons, Tables, Tests, Bottom Navigation Bar & Content Spacing
   ========================================================================== */

/* 1. Prevent Horizontal Viewport Overflow on ALL Devices */
html, body {
  max-width: 100vw !important;
  overflow-x: hidden !important;
}

*, *::before, *::after {
  box-sizing: border-box;
}

img, video, canvas, iframe {
  max-width: 100%;
}

/* 2. Panel Pages Bottom Space (Prevents Mobile Bottom Bar from Covering Page Content) */
@media (max-width: 991.98px) {
  body.dashboard-body,
  .dashboard-body .app-container,
  .dashboard-body .main-wrapper {
    height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
  }

  .page-content,
  .content-area,
  .main-content,
  .dashboard-body main {
    padding-bottom: 95px !important; /* Space for fixed bottom bar so full page is seen */
    padding-left: 14px !important;
    padding-right: 14px !important;
    -webkit-overflow-scrolling: touch;
  }

  /* 3. Panel Header / Topbar Mobile Polish */
  header.gr-topbar {
    height: 58px !important;
    padding: 0 12px !important;
  }

  .topbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }

  .topbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }

  .sidebar-toggle-btn {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    font-size: 1.35rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    cursor: pointer !important;
  }

  .topbar-title {
    font-size: 0.92rem !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: calc(100vw - 165px) !important;
  }

  .page-title-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
  }

  .user-avatar-circle {
    width: 34px !important;
    height: 34px !important;
  }

  .topbar-icon-btn {
    width: 36px !important;
    height: 36px !important;
  }

  /* 4. Table Responsiveness */
  .table-responsive {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 1rem;
    background: #ffffff;
  }

  .table-responsive table {
    min-width: 580px;
    margin-bottom: 0 !important;
  }

  .table th, .table td {
    padding: 10px 12px !important;
    font-size: 0.85rem !important;
  }

  /* 5. Buttons & Action Rows on Mobile */
  .btn {
    touch-action: manipulation;
  }

  .btn-group,
  .d-flex.flex-wrap,
  .welcome-actions {
    gap: 8px !important;
  }

  /* 6. Cards and Grids Mobile Layout */
  .card, .panel-box, .kpi-card {
    border-radius: 14px !important;
    margin-bottom: 12px;
  }

  .card-body, .panel-box-header, .panel-box-body {
    padding: 14px !important;
  }

  /* 7. Floating WhatsApp Widget adjusted for Bottom Bar */
  .gr-whatsapp-wrapper {
    bottom: 72px !important; /* Floats directly above mobile bottom bar */
    right: 12px !important;
    padding: 0 !important;
  }

  .gr-wa-btn {
    width: 48px !important;
    height: 48px !important;
  }

  .gr-wa-btn svg {
    width: 26px !important;
    height: 26px !important;
  }

  .gr-back-to-top {
    bottom: 74px !important;
    right: 68px !important;
    width: 42px !important;
    height: 42px !important;
  }
}

/* Extra Mobile Phone Optimization (< 576px) */
@media (max-width: 575.98px) {
  .hero-welcome-banner .row,
  .welcome-card {
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  .hero-welcome-actions,
  .welcome-actions {
    width: 100% !important;
  }

  .hero-welcome-actions .btn,
  .welcome-actions .btn {
    flex: 1 1 auto;
    font-size: 0.82rem !important;
    padding: 8px 12px !important;
  }

  .quick-launch-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .quick-action-card {
    padding: 10px 8px !important;
    min-height: 82px !important;
  }

  .quick-action-card .icon-box {
    width: 34px !important;
    height: 34px !important;
    font-size: 1.1rem !important;
  }

  .quick-action-card .title {
    font-size: 0.72rem !important;
  }
}



