/* ============================================================
   ImentorAfrica — Modern Theme  (imentor.css)
   ============================================================ */

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
  --im-primary: #1A4B8C;
  --im-primary-dark: #0F2F5A;
  --im-primary-light: #3A7BD5;
  --im-secondary: #E85D26;
  --im-accent: #27AE60;
  --im-dark: #0D1B2A;
  --im-light: #F4F7FF;
  --im-sidebar-w: 260px;
  --im-sidebar-bg: linear-gradient(160deg, #0f2027 0%, #1a3a4a 55%, #2c5364 100%);
  --im-card-shadow: 0 8px 32px rgba(26, 75, 140, 0.12);
  --im-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --im-transition: all 0.3s var(--im-ease);
}

/* ── Base Reset helpers ─────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ── Typography ─────────────────────────────────────────────── */
body {
  font-family: 'Inter', 'Open Sans', sans-serif;
  color: #2d3748;
  line-height: 1.6;
}

/* ============================================================
   PUBLIC PAGES — Abstract Animated Backgrounds
   ============================================================ */

/* Floating blob helper */
.im-blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
  opacity: 0.55;
  animation: im-float 12s ease-in-out infinite;
}

.im-blob-1 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle at 40% 40%, #3A7BD5, #1A4B8C);
  top: -180px;
  right: -80px;
  animation-delay: 0s;
}

.im-blob-2 {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle at 60% 60%, #E85D26, #c0392b);
  bottom: -100px;
  left: -60px;
  animation-delay: -5s;
}

.im-blob-3 {
  width: 260px;
  height: 260px;
  background: radial-gradient(circle at 50% 50%, #27AE60, #1a7a45);
  top: 50%;
  left: 45%;
  animation-delay: -9s;
}

@keyframes im-float {

  0%,
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }

  33% {
    transform: translateY(-40px) rotate(6deg) scale(1.05);
  }

  66% {
    transform: translateY(20px) rotate(-4deg) scale(0.97);
  }
}

/* Grid / mesh overlay */
.im-mesh-bg {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0f2027 0%, #203a43 55%, #2c5364 100%);
}

.im-mesh-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}

/* Animated particles ring (purely CSS) */
.im-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: im-ring-expand 8s ease-out infinite;
  pointer-events: none;
}

.im-ring-1 {
  width: 300px;
  height: 300px;
  animation-delay: 0s;
}

.im-ring-2 {
  width: 500px;
  height: 500px;
  animation-delay: 2.5s;
}

.im-ring-3 {
  width: 700px;
  height: 700px;
  animation-delay: 5s;
}

@keyframes im-ring-expand {
  0% {
    opacity: 0.6;
    transform: scale(0.6);
  }

  100% {
    opacity: 0;
    transform: scale(1.6);
  }
}

/* ── Public Navbar ──────────────────────────────────────────── */
.im-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(26, 75, 140, 0.08);
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.07);
  transition: var(--im-transition);
}

.im-navbar.transparent {
  background: transparent;
  border-bottom-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.im-navbar .brand {
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--im-primary);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.im-navbar.transparent .brand {
  color: #fff;
}

.im-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  border-radius: 8px;
  text-decoration: none;
  transition: var(--im-transition);
}

.im-nav-link:hover {
  color: var(--im-primary);
  background: rgba(26, 75, 140, 0.07);
  text-decoration: none;
}

.im-navbar.transparent .im-nav-link {
  color: rgba(255, 255, 255, 0.87);
}

.im-navbar.transparent .im-nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.im-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition: var(--im-transition);
  cursor: pointer;
  border: none;
}

.im-nav-btn-outline {
  border: 2px solid var(--im-primary);
  color: var(--im-primary);
  background: transparent;
}

.im-nav-btn-outline:hover {
  background: var(--im-primary);
  color: #fff;
  text-decoration: none;
}

.im-nav-btn-solid {
  background: linear-gradient(135deg, var(--im-secondary), #c0392b);
  color: #fff;
  box-shadow: 0 4px 16px rgba(232, 93, 38, 0.35);
}

.im-nav-btn-solid:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232, 93, 38, 0.4);
  text-decoration: none;
  color: #fff;
}

.im-navbar.transparent .im-nav-btn-outline {
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
}

.im-navbar.transparent .im-nav-btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Dropdown */
.im-dropdown {
  position: relative;
}

.im-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 210px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 6px;
  z-index: 1001;
  animation: im-dropdown-in 0.18s var(--im-ease);
}

.im-dropdown:hover .im-dropdown-menu,
.im-dropdown:focus-within .im-dropdown-menu {
  display: block;
}

.im-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  transition: var(--im-transition);
}

.im-dropdown-item:hover {
  background: var(--im-light);
  color: var(--im-primary);
  text-decoration: none;
}

@keyframes im-dropdown-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile hamburger */
.im-hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
  background: none;
  border: none;
}

.im-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #374151;
  border-radius: 2px;
  transition: var(--im-transition);
}

.im-navbar.transparent .im-hamburger span {
  background: #fff;
}

.im-desktop-nav {
  display: none;
}

@media (min-width: 992px) {
  .im-hamburger {
    display: none !important;
  }

  .im-desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
  }
}

/* ── Hero Section ───────────────────────────────────────────── */
.im-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 120px 0 80px;
  margin-top: -65px;
}

.im-hero-content {
  position: relative;
  z-index: 2;
  animation: im-fade-up 0.9s var(--im-ease) both;
}

.im-hero-title {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  color: #fff;
  letter-spacing: -0.03em;
}

.im-hero-title span {
  color: var(--im-secondary);
}

.im-hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255, 255, 255, 0.8);
  margin-top: 1.2rem;
  line-height: 1.7;
}

/* ── Section backgrounds (public pages) ────────────────────── */
.im-section {
  padding: 80px 0;
}

.im-section-alt {
  background: var(--im-light);
  position: relative;
  overflow: hidden;
}

.im-section-alt::before {
  content: '';
  position: absolute;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26, 75, 140, 0.06) 0%, transparent 70%);
  right: -300px;
  top: -300px;
  pointer-events: none;
}

.im-section-dark {
  background: var(--im-dark);
  color: #fff;
  position: relative;
  overflow: hidden;
}

/* ── Cards ─────────────────────────────────────────────────── */
.im-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--im-card-shadow);
  overflow: hidden;
  transition: var(--im-transition);
  border: 1px solid rgba(26, 75, 140, 0.06);
}

.im-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(26, 75, 140, 0.18);
}

.im-card-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.im-card-icon-primary {
  background: rgba(26, 75, 140, 0.1);
  color: var(--im-primary);
}

.im-card-icon-secondary {
  background: rgba(232, 93, 38, 0.1);
  color: var(--im-secondary);
}

.im-card-icon-accent {
  background: rgba(39, 174, 96, 0.1);
  color: var(--im-accent);
}

/* Profile card */
.im-profile-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--im-card-shadow);
  border: 1px solid rgba(26, 75, 140, 0.06);
  transition: var(--im-transition);
}

.im-profile-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(26, 75, 140, 0.16);
}

.im-profile-card-header {
  height: 80px;
  background: linear-gradient(135deg, var(--im-primary-dark), var(--im-primary-light));
  position: relative;
}

.im-profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid #fff;
  object-fit: cover;
  position: absolute;
  bottom: -36px;
  left: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* ── Buttons ────────────────────────────────────────────────── */
.im-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--im-transition);
  line-height: 1.4;
}

.im-btn-primary {
  background: linear-gradient(135deg, var(--im-primary), var(--im-primary-light));
  color: #fff;
  box-shadow: 0 4px 16px rgba(26, 75, 140, 0.3);
}

.im-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(26, 75, 140, 0.38);
  color: #fff;
  text-decoration: none;
}

.im-btn-secondary {
  background: linear-gradient(135deg, var(--im-secondary), #c0392b);
  color: #fff;
  box-shadow: 0 4px 16px rgba(232, 93, 38, 0.3);
}

.im-btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(232, 93, 38, 0.4);
  color: #fff;
  text-decoration: none;
}

.im-btn-outline-primary {
  background: transparent;
  border: 2px solid var(--im-primary);
  color: var(--im-primary);
}

.im-btn-outline-primary:hover {
  background: var(--im-primary);
  color: #fff;
  text-decoration: none;
}

.im-btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.im-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  text-decoration: none;
}

.im-btn-sm {
  padding: 6px 16px;
  font-size: 0.8rem;
}

.im-btn-lg {
  padding: 14px 36px;
  font-size: 1rem;
}

/* ── Tabs ───────────────────────────────────────────────────── */
.im-tabs {
  display: flex;
  gap: 4px;
  background: #eef2ff;
  border-radius: 12px;
  padding: 4px;
}

.im-tab {
  flex: 1;
  padding: 9px 18px;
  border-radius: 9px;
  border: none;
  background: transparent;
  font-size: 0.875rem;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  transition: var(--im-transition);
  text-align: center;
  text-decoration: none;
  display: block;
}

.im-tab.active,
.im-tab:hover {
  background: #fff;
  color: var(--im-primary);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  text-decoration: none;
}

/* ── Badges ─────────────────────────────────────────────────── */
.im-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.im-badge-primary {
  background: rgba(26, 75, 140, 0.1);
  color: var(--im-primary);
}

.im-badge-secondary {
  background: rgba(232, 93, 38, 0.1);
  color: var(--im-secondary);
}

.im-badge-success {
  background: rgba(39, 174, 96, 0.1);
  color: var(--im-accent);
}

.im-badge-mentor {
  background: #eff6ff;
  color: #1d4ed8;
}

.im-badge-mentee {
  background: #f0fdf4;
  color: #166534;
}

.im-badge-coach {
  background: #fef3c7;
  color: #92400e;
}

/* ── Lists ──────────────────────────────────────────────────── */
.im-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.im-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: var(--im-transition);
}

.im-list-item:last-child {
  border-bottom: none;
}

.im-list-item:hover {
  color: var(--im-primary);
}

/* ── Stats ──────────────────────────────────────────────────── */
.im-stat {
  text-align: center;
  padding: 28px 20px;
}

.im-stat-number {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--im-primary);
  line-height: 1;
  letter-spacing: -0.03em;
}

.im-stat-label {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 6px;
  font-weight: 500;
}

/* ============================================================
   AUTHENTICATED LAYOUT — Left Sidebar
   ============================================================ */

.im-app-wrapper {
  display: flex;
  min-height: 100vh;
  background: #f1f5f9;
}

/* ── Sidebar ────────────────────────────────────────────────── */
.im-sidebar {
  width: var(--im-sidebar-w);
  flex-shrink: 0;
  background: var(--im-sidebar-bg);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform 0.3s var(--im-ease);
  box-shadow: 4px 0 32px rgba(0, 0, 0, 0.2);
}

.im-sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(58, 123, 213, 0.2) 0%, transparent 55%),
    radial-gradient(circle at 80% 80%, rgba(232, 93, 38, 0.12) 0%, transparent 50%);
  pointer-events: none;
}

.im-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

.im-sidebar-brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
}

.im-sidebar-brand-text {
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.im-sidebar-brand-sub {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
  display: block;
}

/* Sidebar user panel */
.im-sidebar-user {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.im-sidebar-user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

.im-sidebar-user-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.im-sidebar-user-role {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.5);
  display: block;
}

/* Sidebar nav */
.im-sidebar-nav {
  flex: 1;
  padding: 12px 0;
  position: relative;
}

.im-sidebar-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  padding: 16px 20px 6px;
}

.im-sidebar-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 20px;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0;
  transition: var(--im-transition);
  position: relative;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.im-sidebar-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.im-sidebar-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.im-sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--im-secondary);
  border-radius: 0 3px 3px 0;
}

.im-sidebar-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.07);
  transition: var(--im-transition);
}

.im-sidebar-link:hover .im-sidebar-icon,
.im-sidebar-link.active .im-sidebar-icon {
  background: rgba(255, 255, 255, 0.15);
}

.im-sidebar-link-text {
  flex: 1;
  white-space: nowrap;
}

.im-sidebar-link-badge {
  font-size: 0.68rem;
  background: var(--im-secondary);
  color: #fff;
  border-radius: 50px;
  padding: 1px 7px;
  font-weight: 700;
}

.im-sidebar-arrow {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  transition: transform 0.2s var(--im-ease);
}

.im-sidebar-link.open .im-sidebar-arrow {
  transform: rotate(90deg);
}

/* Sub-nav */
.im-sidebar-sub {
  display: none;
  padding-left: 0;
  background: rgba(0, 0, 0, 0.15);
}

.im-sidebar-sub.open {
  display: block;
}

.im-sidebar-sub-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px 9px 68px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.82rem;
  font-weight: 400;
  text-decoration: none;
  transition: var(--im-transition);
}

.im-sidebar-sub-link:hover {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
}

.im-sidebar-sub-link.active {
  color: #fff;
  font-weight: 600;
}

/* Sidebar footer */
.im-sidebar-footer {
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ── Main Content Area ─────────────────────────────────────── */
.im-main-content {
  flex: 1;
  margin-left: var(--im-sidebar-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top bar */
.im-topbar {
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 400;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
}

.im-topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.im-topbar-toggle {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: none;
  background: #f1f5f9;
  cursor: pointer;
  font-size: 1.1rem;
  color: #374151;
  transition: var(--im-transition);
}

.im-topbar-toggle:hover {
  background: #e2e8f0;
}

.im-topbar-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--im-dark);
}

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

.im-topbar-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #374151;
  font-size: 1rem;
  transition: var(--im-transition);
  text-decoration: none;
  position: relative;
}

.im-topbar-icon-btn:hover {
  background: #e2e8f0;
  color: var(--im-primary);
  text-decoration: none;
}

.im-topbar-notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--im-secondary);
  border: 2px solid #fff;
}

.im-topbar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid rgba(26, 75, 140, 0.15);
  transition: var(--im-transition);
}

.im-topbar-avatar:hover {
  border-color: var(--im-primary);
}

/* User dropdown in topbar */
.im-topbar-user {
  position: relative;
}

.im-topbar-user-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 200px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 6px;
  z-index: 600;
  animation: im-dropdown-in 0.18s var(--im-ease);
}

.im-topbar-user:hover .im-topbar-user-menu,
.im-topbar-user:focus-within .im-topbar-user-menu {
  display: block;
}

.im-topbar-user-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  transition: var(--im-transition);
}

.im-topbar-user-item:hover {
  background: var(--im-light);
  color: var(--im-primary);
  text-decoration: none;
}

.im-topbar-user-item.danger {
  color: #dc2626;
}

.im-topbar-user-item.danger:hover {
  background: #fef2f2;
  color: #dc2626;
}

/* Page content */
.im-page-content {
  flex: 1;
  padding: 28px;
}

.im-page-header {
  margin-bottom: 24px;
}

.im-page-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--im-dark);
  margin: 0 0 4px;
}

.im-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: #9ca3af;
}

.im-breadcrumb a {
  color: var(--im-primary);
  text-decoration: none;
}

.im-breadcrumb a:hover {
  text-decoration: underline;
}

/* App cards */
.im-app-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: var(--im-transition);
}

.im-app-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.09);
}

.im-app-card-header {
  padding: 18px 22px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.im-app-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--im-dark);
}

.im-app-card-body {
  padding: 22px;
}

.im-app-card-footer {
  padding: 14px 22px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  background: #fafafa;
}

/* Stat cards */
.im-stat-card {
  background: #fff;
  border-radius: 16px;
  padding: 22px 24px 18px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  transition: var(--im-transition);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  position: relative;
}

.im-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.1);
  border-color: rgba(26, 75, 140, 0.15);
  text-decoration: none;
  color: inherit;
}

.im-stat-card-arrow {
  position: absolute;
  bottom: 14px;
  right: 16px;
  font-size: 0.75rem;
  color: #9ca3af;
  transition: color .2s, transform .2s;
}

.im-stat-card:hover .im-stat-card-arrow {
  color: var(--im-primary);
  transform: translateX(3px);
}

.im-stat-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.im-stat-card-value {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  color: var(--im-dark);
  margin-top: 12px;
}

.im-stat-card-label {
  font-size: 0.82rem;
  color: #6b7280;
  font-weight: 500;
  margin-top: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  padding-bottom: 22px;
}

/* ── Flash messages ─────────────────────────────────────────── */
.im-alert {
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  animation: im-fade-up 0.4s var(--im-ease);
}

.im-alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.im-alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.im-alert-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.im-alert-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

/* ── Footer (public) ────────────────────────────────────────── */
.im-footer {
  background: var(--im-dark);
  color: rgba(255, 255, 255, 0.75);
  position: relative;
  overflow: hidden;
}

.im-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 10% 50%, rgba(26, 75, 140, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 90% 30%, rgba(232, 93, 38, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.im-footer-link {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.875rem;
  transition: var(--im-transition);
}

.im-footer-link:hover {
  color: #fff;
  text-decoration: none;
}

.im-footer-social {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  transition: var(--im-transition);
  font-size: 0.9rem;
}

.im-footer-social:hover {
  background: var(--im-secondary);
  border-color: var(--im-secondary);
  color: #fff;
  text-decoration: none;
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes im-fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes im-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes im-slide-right {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.im-anim-up {
  animation: im-fade-up 0.7s var(--im-ease) both;
}

.im-anim-fade {
  animation: im-fade-in 0.7s var(--im-ease) both;
}

.im-anim-right {
  animation: im-slide-right 0.6s var(--im-ease) both;
}

.im-delay-1 {
  animation-delay: 0.1s;
}

.im-delay-2 {
  animation-delay: 0.2s;
}

.im-delay-3 {
  animation-delay: 0.35s;
}

.im-delay-4 {
  animation-delay: 0.5s;
}

/* Scroll-triggered animation base */
.im-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--im-ease), transform 0.7s var(--im-ease);
}

.im-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Forms ──────────────────────────────────────────────────── */
.im-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  font-size: 0.9rem;
  color: #374151;
  background: #fff;
  transition: var(--im-transition);
  outline: none;
}

.im-input:focus {
  border-color: var(--im-primary);
  box-shadow: 0 0 0 3px rgba(26, 75, 140, 0.12);
}

.im-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 5px;
}

.im-form-group {
  margin-bottom: 18px;
}

/* ── Scrollbar ─────────────────────────────────────────────── */
.im-sidebar::-webkit-scrollbar {
  width: 4px;
}

.im-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.im-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .im-sidebar {
    transform: translateX(calc(-1 * var(--im-sidebar-w)));
  }

  .im-sidebar.open {
    transform: translateX(0);
  }

  .im-main-content {
    margin-left: 0;
  }

  .im-topbar-toggle {
    display: flex;
  }

  .im-hamburger {
    display: flex;
  }
}

@media (max-width: 768px) {
  .im-page-content {
    padding: 16px;
  }

  .im-topbar {
    padding: 0 16px;
  }

  .im-hero-title {
    font-size: 2rem;
  }

  .im-sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 499;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
  }

  .im-sidebar-overlay.active {
    opacity: 1;
    pointer-events: all;
  }
}

/* ── Login page ─────────────────────────────────────────────── */
.im-login-page {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}

.im-login-visual {
  flex: 1;
  background: var(--im-sidebar-bg);
  position: relative;
  overflow: hidden;
  display: none;
}

@media (min-width: 768px) {
  .im-login-visual {
    display: flex;
  }
}

.im-login-visual-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
  color: #fff;
}

.im-login-form-panel {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 36px;
  background: #fff;
}

@media (min-width: 768px) {
  .im-login-form-panel {
    min-width: 440px;
  }
}

.im-login-logo {
  text-align: center;
  margin-bottom: 32px;
}

/* Override CakePHP/Porto flash to use im-alert */
.alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  border-radius: 12px;
}

.alert-danger,
.alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 12px;
}

/* Ensure Porto page-section typography */
.im-section h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--im-dark);
  letter-spacing: -0.02em;
}

.im-section-dark h2 {
  color: #fff;
}

/* ── Breadcrumb: mobile nav toggle ─────────────────────────────── */
/* On mobile: hide hamburger, show breadcrumb as the toggle trigger */
@media (max-width: 767px) {
  .page-header ul.breadcrumb {
    display: flex !important;
    cursor: pointer;
    user-select: none;
    padding-right: 32px;
    position: relative;
  }

  .page-header ul.breadcrumb::after {
    content: '\f0c9';
    /* fa-bars */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--im-primary);
    font-size: 0.85rem;
    transition: transform .2s;
  }

  .page-header ul.breadcrumb.menu-open::after {
    transform: translateY(-50%) rotate(90deg);
  }
}

/* On desktop: normal nav is visible, breadcrumb hidden */
@media (min-width: 768px) {
  .page-header ul.breadcrumb {
    display: none !important;
  }
}

/* ── Modern footer ─────────────────────────────────────────────── */
.im-footer {
  background: var(--im-dark);
  color: rgba(255, 255, 255, 0.75);
  padding: 60px 0 0;
  font-family: 'Inter', 'Open Sans', sans-serif;
}

.im-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 0 0 48px;
}

@media (max-width: 991px) {
  .im-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 575px) {
  .im-footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

.im-footer h5 {
  color: #fff;
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.im-footer p,
.im-footer li {
  font-size: .85rem;
  line-height: 1.7;
}

.im-footer a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  transition: color .2s;
  display: block;
  margin-bottom: 8px;
}

.im-footer a:hover {
  color: var(--im-secondary);
}

.im-footer-brand-desc {
  font-size: .85rem;
  line-height: 1.7;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.im-footer-social {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.im-footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  font-size: .85rem;
  transition: background .2s, color .2s;
  margin-bottom: 0;
}

.im-footer-social a:hover {
  background: var(--im-secondary);
  color: #fff;
}

.im-footer-newsletter-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 9px 14px;
  color: #fff;
  font-size: .85rem;
  outline: none;
}

.im-footer-newsletter-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.im-footer-newsletter-input:focus {
  border-color: var(--im-secondary);
}

.im-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: .78rem;
  color: rgba(255, 255, 255, 0.4);
}

.im-footer-bottom a {
  color: rgba(255, 255, 255, 0.5);
  display: inline;
  margin-bottom: 0;
}

.im-footer-bottom a:hover {
  color: var(--im-secondary);
}

/* Optimized Avatar for Meet Our Community */
.im-optimized-avatar {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: 0 8px 24px rgba(26, 75, 140, 0.12);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.im-optimized-avatar:hover {
  transform: scale(1.08) translateY(-4px);
  box-shadow: 0 16px 32px rgba(26, 75, 140, 0.22);
}

/* Fix for topbar menu hover gap */
.im-topbar-user-menu::before {
  content: "";
  position: absolute;
  top: -15px;
  left: 0;
  right: 0;
  height: 15px;
}