/**
 * Mind Bridge Institute — All Batches Stylesheet
 * File: all-batches.css
 * 
 * Premium NEET 360 card architecture with Obsidian & Gold design system.
 */

:root {
  --obsidian-bg:       #08090C;
  --obsidian-surface:  #0D1019;
  --obsidian-card:     #131722;
  --obsidian-hover:    #181D2B;
  --obsidian-line:     rgba(212, 175, 55, 0.18);
  --obsidian-input:    #0A0C13;

  --gold-primary:      #D4AF37;
  --gold-bright:       #F5C842;
  --gold-glow:         rgba(212, 175, 55, 0.28);

  --accent-blue:       #38BDF8;
  --accent-purple:     #A855F7;
  --accent-green:      #10B981;

  --text-main:         #F8FAFC;
  --text-secondary:    #CBD5E1;
  --text-muted:        #94A3B8;
  --text-dim:          #64748B;

  --radius-sm:         8px;
  --radius-md:         12px;
  --radius-lg:         16px;
  --radius-xl:         20px;

  --shadow-card:       0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-hover:      0 18px 45px rgba(0, 0, 0, 0.65), 0 0 25px rgba(212, 175, 55, 0.15);
}

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

body {
  background-color: var(--obsidian-bg);
  color: var(--text-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-x: clip;
}

/* ============================================================
   TOPBAR
============================================================ */
.dash-topbar {
  background: rgba(13, 16, 25, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--obsidian-line);
  height: 68px;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-crest {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(212, 175, 55, 0.4);
  box-shadow: 0 0 15px var(--gold-glow);
  overflow: hidden;
  background: #000;
}

.brand-crest img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-names {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--gold-primary);
  font-weight: 600;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.portal-badge {
  font-size: 0.76rem;
  font-weight: 700;
  color: #fff;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 5px 12px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.site-link-btn:hover {
  color: #fff;
  border-color: rgba(212, 175, 55, 0.35);
  background: rgba(212, 175, 55, 0.05);
}

.header-avatar-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid var(--gold-primary);
  display: block;
}

.header-avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================================
   MAIN CONTAINER & FILTER BAR
============================================================ */
.all-batches-container {
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 20px 72px;
  flex: 1;
  box-sizing: border-box;
}

.inpage-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.back-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--obsidian-surface);
  border: 1px solid var(--obsidian-line);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.back-btn:hover {
  border-color: var(--gold-primary);
  color: var(--gold-bright);
  transform: translateX(-2px);
}

.inpage-title-wrap h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.inpage-title-wrap p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Controls: Search & Category Filter Pills */
.controls-bar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 30px;
}

.search-input-wrap {
  position: relative;
  max-width: 460px;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.95rem;
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--obsidian-input);
  border: 1px solid var(--obsidian-line);
  border-radius: var(--radius-md);
  padding: 12px 16px 12px 42px;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  font-family: inherit;
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
  background: #0E121E;
}

.category-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}

.category-filter-group::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  background: var(--obsidian-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.filter-pill:hover {
  color: #fff;
  border-color: rgba(212, 175, 55, 0.3);
}

.filter-pill.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.22), rgba(184, 134, 11, 0.22));
  border-color: var(--gold-primary);
  color: var(--gold-bright);
  box-shadow: 0 0 16px var(--gold-glow);
}

/* Batch card grid & card styling live centrally in batch-card.css */

/* ============================================================
   LOADING SKELETON & EMPTY STATES
============================================================ */
.loading-state-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 20px;
  text-align: center;
  color: var(--text-muted);
}

.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(212, 175, 55, 0.2);
  border-radius: 50%;
  border-top-color: var(--gold-primary);
  animation: spin 0.8s linear infinite;
  margin-bottom: 14px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-state-box {
  background: var(--obsidian-surface);
  border: 1px dashed var(--obsidian-line);
  border-radius: var(--radius-xl);
  padding: 56px 24px;
  text-align: center;
  max-width: 520px;
  margin: 36px auto;
}

.empty-icon {
  font-size: 2.8rem;
  margin-bottom: 12px;
}

.empty-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}

.empty-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.btn-enroll-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border-radius: 10px;
  background: #ffffff;
  color: #070b14;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn-enroll-main:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
}

/* ============================================================
   DESKTOP LEFT SIDEBAR (1024px and above)
============================================================ */
.desktop-sidebar {
  display: none;
}

@media (min-width: 1024px) {
  .desktop-sidebar {
    display: flex;
    flex-direction: column;
    width: 250px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    background: #090B11;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 150;
    padding: 20px 14px;
    box-sizing: border-box;
  }

  .sidebar-brand {
    padding-bottom: 18px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  }

  .sidebar-brand-group {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #FFFFFF;
  }

  .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
  }

  .sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    color: #94A3B8;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.18s ease;
  }

  .sidebar-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #FFFFFF;
  }

  .sidebar-nav-item.active {
    background: rgba(212, 175, 55, 0.14);
    color: #F5C842;
    font-weight: 700;
    border: 1px solid rgba(212, 175, 55, 0.35);
    box-shadow: 0 0 14px rgba(212, 175, 55, 0.12);
  }

  .sidebar-nav-icon {
    font-size: 1.15rem;
    flex-shrink: 0;
  }

  .sidebar-footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
  }

  .sidebar-user-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-decoration: none;
    color: inherit;
    transition: all 0.18s ease;
  }

  .sidebar-user-pill:hover {
    background: rgba(255, 255, 255, 0.07);
  }

  .sidebar-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1.5px solid var(--gold-primary);
    object-fit: cover;
  }

  .sidebar-user-meta {
    display: flex;
    flex-direction: column;
  }

  .sidebar-user-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.2;
  }

  .sidebar-user-inst {
    font-size: 0.68rem;
    color: var(--gold-primary);
    font-weight: 500;
  }

  /* Body adjustments for Desktop Sidebar */
  body.has-desktop-sidebar {
    padding-left: 250px;
    padding-bottom: 0;
  }

  body.has-desktop-sidebar .dash-topbar {
    left: 250px;
    width: calc(100% - 250px);
    box-sizing: border-box;
  }

  body.has-desktop-sidebar .dash-topbar .brand-group {
    display: none; /* Brand is in the sidebar */
  }

  body.has-desktop-sidebar .all-batches-container,
  body.has-desktop-sidebar .dash-container {
    max-width: 1180px;
    width: calc(100% - 40px);
    margin: 20px auto 40px;
  }

  body.has-desktop-sidebar .bottom-nav {
    display: none !important;
  }
}

/* ============================================================
   RESPONSIVE NAVIGATION & GRIDS (MOBILE, TABLET, DESKTOP)
============================================================ */

/* Tablet: 768px - 1023px */
@media (min-width: 768px) and (max-width: 1023px) {
  .desktop-sidebar {
    display: none !important;
  }

  body.has-desktop-sidebar {
    padding-left: 0 !important;
    padding-bottom: 74px !important;
  }

  body.has-desktop-sidebar .dash-topbar {
    left: 0 !important;
    width: 100% !important;
  }

  body.has-desktop-sidebar .dash-topbar .brand-group {
    display: flex !important;
  }

  .bottom-nav {
    display: flex !important;
  }
}

/* Mobile: up to 767px */
@media (max-width: 767px) {
  .all-batches-container {
    padding: 16px 14px 72px;
  }

  /* Remove duplicate top navigation items */
  .portal-badge,
  .site-link-btn {
    display: none !important;
  }

  /* Desktop sidebar hidden */
  .desktop-sidebar {
    display: none !important;
  }

  body.has-desktop-sidebar {
    padding-left: 0 !important;
    padding-bottom: 74px !important;
  }

  body.has-desktop-sidebar .dash-topbar {
    left: 0 !important;
    width: 100% !important;
  }

  body.has-desktop-sidebar .dash-topbar .brand-group {
    display: flex !important;
  }

  /* Bottom nav visible and fixed */
  .bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 62px;
    z-index: 1000;
  }
}

/* Bottom Navigation Bar for Mobile */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 62px;
  background: rgba(13, 16, 25, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--obsidian-line);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 1000;
  padding: 0 10px;
}

@media (min-width: 1024px) {
  .bottom-nav {
    display: none !important;
  }
}

.bnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.bnav-item.active {
  color: var(--gold-bright);
}

.bnav-icon {
  font-size: 1.15rem;
}

