/* =====================================================================
   E-Quran Study — Complete Stylesheet v6.0
   Warm orange-brown palette · Poppins font · Premium light mode
   ===================================================================== */

/* ---------- Design Tokens ---------- */
:root {
  --primary: #99BC85;
  --primary-dark: #7DA36A;
  --primary-darker: #638A52;
  --primary-light: #B3D4A0;
  --primary-lighter: #E8F3E2;
  --primary-lightest: #F4F9F0;

  --secondary: #A8C99A;
  --secondary-light: #C5DEBB;
  --secondary-dark: #7DA36A;

  --accent: #0EA5A9;
  --accent-light: #D5F5F6;
  --accent-dark: #0B7E82;

  --bg-body: #F9FAFB;
  --bg-white: #FFFFFF;
  --bg-off-white: #FAFBFC;
  --bg-subtle: #F3F4F6;
  --text-primary: #1F2937;
  --text-body: #4B5563;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  --border: #E5E7EB;
  --border-light: #F3F4F6;
  --border-dark: #D1D5DB;

  --success: #059669;
  --success-light: #D1FAE5;
  --warning: #D97706;
  --warning-light: #FEF3C7;
  --danger: #DC2626;
  --danger-light: #FEE2E2;
  --info: #99BC85;
  --info-light: #DBEAFE;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-round: 50px;

  --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 56px rgba(0, 0, 0, 0.14);

  --gradient-primary: linear-gradient(135deg, #99BC85, #B3D4A0);
  --gradient-primary-reverse: linear-gradient(135deg, #B3D4A0, #99BC85);
  --gradient-secondary: linear-gradient(135deg, #B3D4A0, #A8C99A);
  --gradient-accent: linear-gradient(135deg, #0EA5A9, #14C7CC);
  --gradient-dark: linear-gradient(135deg, #638A52, #7DA36A);
  --gradient-sidebar: linear-gradient(180deg, #638A52 0%, #7DA36A 50%, #99BC85 100%);

  --font: 'Poppins', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', 'Consolas', monospace;

  --ease: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: 350ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-body);
  background: var(--bg-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

a:hover {
  color: var(--primary-dark);
}

ul,
ol {
  padding-left: 1.25rem;
}

::selection {
  background: var(--primary);
  color: #fff;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-subtle);
}

::-webkit-scrollbar-thumb {
  background: var(--text-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--text-light) var(--bg-subtle);
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-primary);
  line-height: 1.3;
  font-weight: 700;
}

h1 {
  font-size: clamp(1.5rem, 3.2vw, 2.4rem);
}

h2 {
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
}

h3 {
  font-size: clamp(1.15rem, 2vw, 1.5rem);
}

h4 {
  font-size: clamp(1rem, 1.6vw, 1.25rem);
}

h5 {
  font-size: 1.05rem;
}

h6 {
  font-size: 0.925rem;
}

p {
  margin-top: 0;
  margin-bottom: 0.85rem;
}

.text-muted {
  color: var(--text-muted) !important;
}

.text-primary {
  color: var(--primary) !important;
}

.text-orange {
  color: var(--primary-light) !important;
}

.text-accent {
  color: var(--accent) !important;
}

.text-success {
  color: var(--success) !important;
}

.text-danger {
  color: var(--danger) !important;
}

.text-warning {
  color: var(--warning) !important;
}

/* ---------- Focus ---------- */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* ---------- Container ---------- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

@media (max-width: 767.98px) {
  .container {
    padding: 0 1.2rem;
  }
}

/* ---------- Section Layouts ---------- */
.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin: 3rem 0 1rem 0;
  color: var(--text-primary);
}

.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 4px;
  margin: 10px auto 0;
}

.section-sub {
  text-align: center;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 2rem auto;
}

.page-section {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

@media (max-width: 767.98px) {
  .section-title {
    font-size: 1.8rem;
  }

  .page-section {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

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

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

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

@keyframes floaty {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes pulse {

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

  50% {
    transform: scale(1.03);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

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

.fade-in-up {
  animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.fade-in {
  animation: fadeIn 0.4s ease both;
}

.fade-in-down {
  animation: fadeInDown 0.4s ease both;
}

.scale-in {
  animation: scaleIn 0.35s var(--ease-bounce) both;
}

.slide-in-right {
  animation: slideInRight 0.4s ease both;
}

.slide-in-left {
  animation: slideInLeft 0.4s ease both;
}

.stagger-fade>* {
  opacity: 0;
  animation: fadeInUp 0.4s var(--ease-out) forwards;
}

.stagger-fade>*:nth-child(1) {
  animation-delay: 0.04s;
}

.stagger-fade>*:nth-child(2) {
  animation-delay: 0.08s;
}

.stagger-fade>*:nth-child(3) {
  animation-delay: 0.12s;
}

.stagger-fade>*:nth-child(4) {
  animation-delay: 0.16s;
}

.stagger-fade>*:nth-child(5) {
  animation-delay: 0.2s;
}

.stagger-fade>*:nth-child(6) {
  animation-delay: 0.24s;
}

.stagger-fade>*:nth-child(7) {
  animation-delay: 0.28s;
}

.stagger-fade>*:nth-child(8) {
  animation-delay: 0.32s;
}

/* =================================================================
   PUBLIC NAVBAR
   ================================================================= */
.navbar-rm {
  background: #FFFFFF;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--primary) !important;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-brand i {
  font-size: 1.8rem;
  color: var(--primary-light);
}

.navbar-brand span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-brand img {
  height: 34px;
  width: auto;
}

.navbar-rm .navbar-nav.ms-auto {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-link i, .nav-item button, .nav-link svg {
  color: #99BC85 !important;
}

.navbar-rm .nav-link {
  text-decoration: none;
  color: var(--text-primary) !important;
  font-weight: 500;
  transition: color 0.2s ease;
  font-size: 1rem;
  padding: 8px 0 !important;
  position: relative;
}

.navbar-rm .nav-link:hover {
  color: var(--primary-light);
}

.navbar-rm .nav-item {
  list-style: none;
}

/* Navbar dropdown */
.navbar-rm .dropdown-menu {
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  margin-top: 8px;
  min-width: 210px;
  border: 1px solid var(--border-light);
}

.navbar-rm .dropdown-menu .dropdown-item {
  border-radius: 8px;
  padding: 9px 14px;
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--text-body);
  transition: all var(--ease);
}

.navbar-rm .dropdown-menu .dropdown-item:hover {
  background: var(--primary-lighter);
  color: var(--primary);
  transform: translateX(3px);
}

.navbar-rm .dropdown-menu .dropdown-item i {
  width: 20px;
  text-align: center;
  color: var(--primary);
}

.navbar-rm .dropdown-menu .dropdown-divider {
  border-color: var(--border-light);
  margin: 4px 0;
}

.navbar-rm .navbar-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}

.navbar-toggler {
  border: none !important;
  padding: 8px;
  border-radius: var(--radius-sm);
}

.navbar-toggler:hover {
  background: var(--primary-lighter);
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* Mobile navbar */
@media (max-width: 991.98px) {
  .navbar-rm {
    padding: 0.75rem 1rem;
  }

  .navbar-rm .navbar-brand img {
    height: 28px;
  }

  .navbar-rm .container {
    padding: 0;
  }

  .navbar-rm .navbar-collapse {
    margin-top: 0.75rem;
    padding: 1rem;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-light);
    min-height: calc(100vh - 100px);
  }

  .navbar-rm .navbar-nav.ms-auto {
    gap: 0.25rem;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .navbar-rm .navbar-nav .nav-link {
    padding: 12px 14px !important;
    border-radius: 10px;
    font-size: 0.95rem;
  }

  .navbar-rm .navbar-nav .nav-link:hover {
    background: var(--primary-lighter);
  }

  .navbar-rm .navbar-nav .nav-item:first-child .nav-link {
    padding-top: 12px !important;
  }

  .navbar-rm .navbar-cta {
    margin-left: 0;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .navbar-rm .navbar-cta .btn {
    width: 100%;
    justify-content: center;
    padding: 10px 20px;
  }

  .navbar-rm .dropdown-menu {
    box-shadow: none;
    border: none;
    padding: 0 0 0 12px;
    background: transparent;
    margin-top: 0;
    position: static !important;
  }

  .navbar-rm .dropdown-menu .dropdown-item {
    color: var(--text-body);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.88rem;
  }

  .navbar-rm .dropdown-menu .dropdown-item:hover {
    background: var(--primary-lighter);
  }

  .navbar-rm .dropdown-menu .dropdown-item i {
    width: 18px;
  }

  .navbar-rm .dropdown-menu .dropdown-divider {
    border-color: var(--border);
    margin: 4px 0;
  }

  .navbar-rm .dropdown-toggle::after {
    margin-left: auto;
  }
}

/* =================================================================
   BUTTONS — Gradient with Shine
   ================================================================= */
.btn {
  font-weight: 600;
  font-family: var(--font);
  border-radius: 2rem;
  padding: 0.75rem 1.8rem;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-rm-primary {
  background: linear-gradient(105deg, #B3D4A0 0%, #99BC85 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
  z-index: 1;
  box-shadow: 0 4px 10px rgba(153, 188, 133, 0.2);
}

.btn-rm-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transition: left 0.55s ease;
  z-index: -1;
  border-radius: 2rem;
}

.btn-rm-primary:hover::before {
  left: 100%;
}

.btn-rm-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(179, 212, 160, 0.3);
  background: linear-gradient(105deg, #A8C99A 0%, #B3D4A0 100%);
  color: #fff;
}

.btn-rm-primary:active {
  transform: translateY(0);
}

.btn-rm-primary.btn-sm {
  padding: 6px 18px;
  font-size: 0.85rem;
}

.btn-rm-gold {
  background: linear-gradient(105deg, #B3D4A0 0%, #99BC85 100%);
  color: #fff;
  box-shadow: 0 4px 10px rgba(153, 188, 133, 0.2);
}

.btn-rm-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(234, 88, 12, 0.3);
  color: #fff;
}

.btn-rm-gold:active {
  transform: translateY(0);
}

.btn-rm-accent {
  background: linear-gradient(135deg, #0EA5A9, #14C7CC);
  border: none;
  color: #fff;
  box-shadow: 0 4px 14px rgba(14, 165, 169, 0.2);
}

.btn-rm-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(14, 165, 169, 0.3);
  color: #fff;
}

.btn-rm-outline {
  background: transparent;
  border: 1.5px solid var(--primary-light);
  color: var(--primary);
}

.btn-rm-outline:hover {
  background: var(--primary-lighter);
  transform: translateY(-2px);
  border-color: var(--primary);
  color: var(--primary-dark);
}

.btn-rm-outline:active {
  transform: translateY(0);
}

.btn-rm-outline.btn-sm {
  padding: 5px 16px;
  font-size: 0.85rem;
  border-width: 1.5px;
}

.btn-outline-light {
  border-width: 2px;
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-outline-light:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-outline-success {
  color: var(--success);
  border-color: var(--success);
}

.btn-outline-success:hover {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
  transform: translateY(-2px);
}

.btn-outline-danger {
  color: var(--danger);
  border-color: var(--danger);
}

.btn-outline-danger:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 6px 16px;
  font-size: 0.85rem;
  border-radius: 30px;
}

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

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* =================================================================
   HERO SECTION
   ================================================================= */
.hero-primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4rem 0 3rem 0;
  gap: 3rem;
  flex-wrap: wrap;
}

.hero-content {
  flex: 1;
}

.hero-content h1 {
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1.2;
  background: linear-gradient(135deg, #99BC85, #B3D4A0, #A8C99A);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 1rem 0 1.8rem 0;
  max-width: 90%;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}

.hero-stats .stat-item h3 {
  font-size: 1.8rem;
  color: var(--text-primary);
  font-weight: 700;
}

.hero-stats .stat-item p {
  font-size: 0.85rem;
  color: var(--text-light);
  margin: 0;
}

.hero-image {
  flex: 1;
  background: var(--primary-lighter);
  border-radius: 2rem;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 20px 30px -15px rgba(153, 188, 133, 0.12);
}

.hero-image i {
  font-size: 12rem;
  color: var(--primary-light);
  opacity: 0.85;
}

@media (max-width: 768px) {
  .hero-primary {
    flex-direction: column;
    text-align: center;
  }

  .hero-content p {
    max-width: 100%;
  }

  .hero-stats {
    justify-content: center;
  }
}

/* =================================================================
   PUBLIC CARDS — Grid
   ================================================================= */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0 3rem 0;
}

.card {
  background: #FFFFFF;
  border-radius: 1.5rem;
  padding: 1.8rem;
  border: 1px solid var(--border);
  transition: all 0.25s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 30px -12px rgba(0, 0, 0, 0.08);
  border-color: #FED7AA;
}

.card-icon {
  background: var(--primary-lighter);
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1.2rem;
  margin-bottom: 1.2rem;
  color: var(--primary-light);
  font-size: 1.8rem;
}

.card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

/* ---------- Premium RM Card ---------- */
.rm-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--ease-out);
  overflow: hidden;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
}

.rm-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--ease-out);
}

.rm-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.rm-card:hover::before {
  opacity: 1;
}

.rm-card img {
  height: 180px;
  object-fit: cover;
  width: 100%;
}

.rm-card-profile img {
  height: 210px;
  object-fit: cover;
  width: 210px;
}

.rm-card .card-body {
  padding: 1.5rem;
  flex: 1;
}

.rm-card .card-body:last-child {
  padding-bottom: 1.5rem;
}

.rm-card .card-footer {
  background: var(--bg-off-white);
  border-top: 1px solid var(--border-light);
  padding: 1rem 1.5rem;
}

.rm-card-flat {
  box-shadow: none;
  border: 1px solid var(--border);
}

.rm-card-flat:hover {
  box-shadow: var(--shadow);
  border-color: transparent;
}

.rm-card-accent {
  border-top: 3px solid var(--primary);
}

.rm-card-compact {
  border-radius: var(--radius);
}

.rm-card-compact .card-body {
  padding: 1.25rem;
}

/* ---------- Dua Cards ---------- */
.dua-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: all var(--ease-out);
  height: 100%;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.dua-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(153, 188, 133, 0.12);
  border-color: transparent;
}

.dua-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: var(--gradient-primary);
  border-radius: 0 2px 2px 0;
}

.dua-card .dua-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-lighter);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1rem;
  flex-shrink: 0;
}

.dua-card .dua-category {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  background: var(--primary-lighter);
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-block;
}

.dua-card .dua-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.dua-card .dua-title-ur {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.dua-card .dua-content-en {
  color: var(--text-body);
  font-size: 0.88rem;
  line-height: 1.7;
}

.dua-card .dua-content-ur {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-primary);
  border-top: 1px solid var(--border-light);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
}

.dua-card-horizontal {
  display: flex;
  flex-direction: row;
  align-items: stretch;
}
.dua-card-horizontal .dua-image {
  width: 160px;
  flex-shrink: 0;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  align-self: center;
  margin: 1rem 0 1rem 1rem;
  border-radius: 12px;
}
.dua-card-horizontal .dua-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dua-card-horizontal .dua-card-body {
  flex: 1;
  min-width: 0;
}
@media (max-width: 576px) {
  .dua-card-horizontal {
    flex-direction: column;
  }
  .dua-card-horizontal .dua-image {
    width: 100%;
    height: 200px;
  }
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.course-card {
  background: white;
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.1);
}

.course-img {
  background: var(--primary-lighter);
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--primary-light);
}

.course-info {
  padding: 1.2rem;
}

.course-info h4 {
  font-size: 1.2rem;
  font-weight: 600;
}

.course-meta {
  display: flex;
  justify-content: space-between;
  margin: 0.8rem 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ---------- Testimonials ---------- */
.testimonial-grid {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin: 2rem 0;
}

.testimonial-card {
  background: #FFFFFF;
  border-radius: 1.5rem;
  padding: 1.8rem;
  flex: 1;
  border: 1px solid var(--border);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.testimonial-card i.fa-quote-left {
  color: #FED7AA;
  font-size: 1.8rem;
  margin-bottom: 0.8rem;
}

.testimonial-text {
  font-style: normal;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.student-name {
  font-weight: 600;
  color: var(--text-primary);
}

/* ---------- Public Badge ---------- */
.public-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--primary-lighter);
  color: var(--primary);
}

/* ---------- CTA Section ---------- */
.cta-section {
  background: linear-gradient(115deg, #F9FAFB 0%, #FFFFFF 100%);
  border-radius: 2rem;
  padding: 3rem;
  text-align: center;
  margin: 4rem 0;
  border: 1px solid #FED7AA;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.02);
}

.cta-section h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.8rem;
}

@media (max-width: 768px) {
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
}

/* =================================================================
   FOOTER
   ================================================================= */
.footer-rm {
  background: var(--primary-lightest);
  padding: 4rem 2rem 0;
  margin-top: 4rem;
  position: relative;
  border-top: 1px solid var(--border-light);
}

.footer-rm::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
}

.footer-rm .footer-content {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: 2.5rem;
}

.footer-rm .footer-col p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.7;
  max-width: 320px;
}

.footer-rm .footer-col h4 {
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
  font-size: 1.05rem;
  position: relative;
  padding-bottom: 0.6rem;
}

.footer-rm .footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 28px;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.footer-rm .footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-rm .footer-links li {
  margin-bottom: 0.6rem;
}

.footer-rm .footer-links a {
  text-decoration: none;
  color: var(--text-muted);
  transition: all 0.2s;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-rm .footer-links a::before {
  content: '\f105';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 0.7rem;
  color: var(--primary);
  opacity: 0;
  transition: all 0.2s;
}

.footer-rm .footer-links a:hover {
  color: var(--primary);
  padding-left: 4px;
}

.footer-rm .footer-links a:hover::before {
  opacity: 1;
}

.footer-rm hr {
  border-color: var(--border-light);
}

.footer-rm .btn-outline-light {
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50% !important;
  font-size: 0.95rem;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  transition: all var(--ease-out);
  background: transparent;
}

.footer-rm .btn-outline-light:hover {
  background: var(--gradient-primary);
  border-color: transparent;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(153, 188, 133, 0.3);
}

.copyright {
  text-align: center;
  padding: 1.5rem 0;
  margin-top: 3rem;
  color: var(--text-light);
  font-size: 0.8rem;
  border-top: 1px solid var(--border-light);
}

/* =================================================================
   ADMIN, STUDENT & TEACHER PORTAL — Redesigned v6
   ================================================================= */

/* ---------- Sidebar — Foldable + Advanced ---------- */
.sidebar-rm {
  background: var(--gradient-sidebar);
  min-height: 100vh;
  color: #fff;
  border-radius: 0 24px 24px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  display: flex;
  flex-direction: column;
  z-index: 1020;
  width: 260px;
  transition: width var(--ease-out);
}

.sidebar-rm::-webkit-scrollbar {
  display: none;
}

.sidebar-rm .sidebar-brand {
  padding: 1.2rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: padding var(--ease-out);
}

.sidebar-rm .sidebar-brand a {
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-rm .sidebar-brand img {
  height: 30px;
  width: auto;
  flex-shrink: 0;
}

.sidebar-rm .sidebar-brand .brand-text {
  transition: opacity var(--ease-out);
}

.sidebar-rm .sidebar-section {
  padding: 1.2rem 1rem 0.25rem 1rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 700;
  overflow: hidden;
  white-space: nowrap;
  transition: padding var(--ease-out), opacity var(--ease-out);
}

.sidebar-rm .nav-link {
  color: rgba(255, 255, 255, 0.7);
  border-radius: 10px;
  margin: 2px 10px;
  padding: 10px 14px;
  font-weight: 500;
  transition: all var(--ease);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.sidebar-rm .nav-link i {
  width: 20px;
  text-align: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.sidebar-rm .nav-link .nav-text {
  transition: opacity var(--ease-out);
}

.sidebar-rm .nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transform: translateX(3px);
}

.sidebar-rm .nav-link.active {
  background: rgba(179, 212, 160, 0.15);
  color: #C5DEBB;
  box-shadow: inset 3px 0 0 #C5DEBB;
}

.sidebar-rm .nav-link.active i {
  color: #C5DEBB;
}

.sidebar-rm .nav-link.has-notif i {
  color: #B3D4A0;
}

.sidebar-rm .nav-link .nav-badge {
  margin-left: auto;
  background: #dc3545;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  line-height: 1.4;
  animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.5);
  }

  50% {
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.2);
  }
}

/* Folded state */
.sidebar-folded .sidebar-rm {
  width: 70px;
  border-radius: 0 16px 16px 0;
  overflow-x: hidden;
}

.sidebar-folded .sidebar-rm nav {
  flex-direction: row !important;
  flex-wrap: wrap;
}

.sidebar-folded .sidebar-rm .sidebar-brand {
  padding: 1rem 0.75rem;
}

.sidebar-folded .sidebar-rm .sidebar-brand .brand-text {
  opacity: 0;
  width: 0;
}

.sidebar-folded .sidebar-rm .sidebar-brand a {
  justify-content: center;
  padding: 0;
}

.sidebar-folded .sidebar-rm .sidebar-section {
  opacity: 0;
  height: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
}

.sidebar-folded .sidebar-rm .nav-link {
  margin: 2px 6px;
  padding: 10px;
  justify-content: center;
  border-radius: 12px;
  gap: 0;
}

.sidebar-folded .sidebar-rm .nav-link .nav-text {
  display: none;
}

.sidebar-folded .sidebar-rm .nav-link .nav-badge {
  display: none;
}

.sidebar-folded .sidebar-rm .nav-link i {
  margin: 0;
  width: auto;
  font-size: 1.15rem;
}

.sidebar-folded .sidebar-rm .sidebar-brand img {
  margin: 0 auto;
}

/* Tooltip on hover when folded */
.sidebar-folded .sidebar-rm .nav-link:hover::after {
  content: attr(data-title);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 12px;
  background: var(--primary-dark);
  color: #fff;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  z-index: 1060;
  pointer-events: none;
}

.sidebar-folded .sidebar-rm .nav-link:hover::before {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 4px;
  border: 6px solid transparent;
  border-right-color: var(--primary-dark);
  z-index: 1060;
  pointer-events: none;
}

/* Sidebar toggle button */
.sidebar-toggle-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all var(--ease);
  font-size: 1.1rem;
}

.sidebar-toggle-btn:hover {
  background: var(--primary-lighter);
  color: var(--primary);
}

/* Main content shift when folded */
.sidebar-folded .flex-grow-1 {
  transition: margin-left var(--ease-out);
}

/* ---------- Topbar — Advanced ---------- */
.topbar-rm {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  padding: 12px 22px;
  border: 1px solid var(--border-light);
  transition: all var(--ease-out);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  min-height: 64px;
  position: relative;
  z-index: 5;
}

.topbar-rm:hover {
  box-shadow: var(--shadow);
  border-color: transparent;
}

.topbar-rm .topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.topbar-rm .page-title-area {
  display: flex;
  flex-direction: column;
}

.topbar-rm .page-title-area h5 {
  margin-bottom: 0;
  line-height: 1.2;
}

.topbar-rm .page-title-area .breadcrumb-rm {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.topbar-rm .page-title-area .breadcrumb-rm a {
  color: var(--text-muted);
}

.topbar-rm .page-title-area .breadcrumb-rm a:hover {
  color: var(--primary);
}

.topbar-rm .topbar-search {
  position: relative;
}

.topbar-rm .topbar-search input {
  border-radius: 20px;
  padding: 6px 14px 6px 34px;
  font-size: 0.82rem;
  border: 1.5px solid var(--border);
  background: var(--bg-off-white);
  width: 200px;
  transition: all var(--ease);
}

.topbar-rm .topbar-search input:focus {
  width: 260px;
  border-color: var(--primary);
}

.topbar-rm .topbar-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 0.8rem;
}

.topbar-rm .topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Topbar notification bell */
.topbar-rm .notif-bell {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-body);
  cursor: pointer;
  transition: all var(--ease);
  font-size: 1.1rem;
}

.topbar-rm .notif-bell:hover {
  background: var(--primary-lighter);
  color: var(--primary);
}

/* Topbar avatar dropdown */
.topbar-rm .avatar-dropdown {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 8px 4px 4px;
  border-radius: 30px;
  transition: background var(--ease);
  border: none;
  background: transparent;
}

.topbar-rm .avatar-dropdown:hover {
  background: var(--primary-lighter);
}

.topbar-rm .avatar-dropdown img {
  border: 2px solid var(--border-light);
}

/* ---------- Stat Widgets ---------- */
.stat-widget {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--border-light);
  transition: all var(--ease-out);
  position: relative;
  overflow: hidden;
}

.stat-widget::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--ease-out);
}

.stat-widget:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.stat-widget:hover::after {
  transform: scaleX(1);
}

.stat-widget .stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(153, 188, 133, 0.15);
}

.stat-widget h3 {
  font-weight: 800;
  margin: 0;
  font-size: 1.5rem;
  color: var(--text-primary);
  line-height: 1.15;
}

.stat-widget p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.82rem;
  font-weight: 500;
}

/* ---------- Dashboard Panels ---------- */
.dashboard-panel {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  padding: 1.5rem;
  border: 1px solid var(--border-light);
  transition: all var(--ease-out);
}

.dashboard-panel:hover {
  box-shadow: var(--shadow);
  border-color: var(--border);
}

.dashboard-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dashboard-panel-title {
  font-weight: 700;
  margin-bottom: 0;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ---------- Tables ---------- */
.table-rm-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  padding: 1.5rem;
  border: 1px solid var(--border-light);
  transition: box-shadow var(--ease-out);
}

.table-rm-card:hover {
  box-shadow: var(--shadow);
}

.table-rm {
  margin-bottom: 0;
}

.table-rm thead {
  background: var(--gradient-primary);
  color: #fff;
}

.table-rm thead th {
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 16px;
  border: none;
  white-space: nowrap;
}

.table-rm td {
  vertical-align: middle;
  padding: 11px 16px;
  border-color: var(--border-light);
  font-size: 0.88rem;
}

.table-rm tbody tr {
  transition: background var(--ease);
}

.table-rm tbody tr:hover {
  background: var(--primary-lighter);
}

/* ---------- Pagination ---------- */
.pagination {
  gap: 4px;
}

.page-link {
  border: none;
  border-radius: 8px !important;
  padding: 8px 16px;
  font-weight: 500;
  color: var(--text-body);
  transition: all var(--ease);
}

.page-link:hover {
  background: var(--primary-lighter);
  color: var(--primary);
}

.page-item.active .page-link {
  background: var(--gradient-primary);
  box-shadow: 0 4px 12px rgba(153, 188, 133, 0.2);
}

/* ---------- Loaders ---------- */
.rm-loader {
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  animation: spin 0.7s linear infinite;
  margin: 32px auto;
}

.rm-loader-sm {
  width: 18px;
  height: 18px;
  border-width: 2px;
  margin: 0 auto;
}

/* ---------- Skeleton Loading ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--border-light) 25%, var(--border) 50%, var(--border-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}

.skeleton-text {
  height: 13px;
  margin-bottom: 8px;
  width: 80%;
}

.skeleton-text:last-child {
  width: 60%;
}

.skeleton-title {
  height: 18px;
  margin-bottom: 12px;
  width: 60%;
}

/* ---------- Floating WhatsApp ---------- */
.floating-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 54px;
  height: 54px;
  background: linear-gradient(135deg, #25D366, #128C7E);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
  z-index: 9999;
  animation: floaty 3s ease-in-out infinite;
  transition: all var(--ease-out);
}

.floating-whatsapp:hover {
  transform: scale(1.1);
  color: #fff;
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.4);
}

/* ---------- Live Chat Widget ---------- */
.live-chat-toggle {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 54px;
  height: 54px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  box-shadow: 0 6px 20px rgba(153, 188, 133, 0.3);
  z-index: 9999;
  border: none;
  cursor: pointer;
  transition: all var(--ease-out);
}

.live-chat-toggle:hover {
  transform: scale(1.1);
  color: #fff;
  box-shadow: 0 8px 28px rgba(153, 188, 133, 0.4);
}

.live-chat-box {
  position: fixed;
  bottom: 90px;
  left: 24px;
  width: 350px;
  max-height: 470px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 9999;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: scaleIn 0.25s var(--ease-bounce) both;
}

.live-chat-box.show {
  display: flex;
}

.live-chat-header {
  background: var(--gradient-primary);
  color: #fff;
  padding: 14px 18px;
  font-weight: 600;
}

.live-chat-body {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  max-height: 310px;
  background: var(--bg-off-white);
}

.live-chat-footer {
  border-top: 1px solid var(--border);
  padding: 10px 14px;
  display: flex;
  gap: 8px;
  background: #fff;
}

.live-chat-footer .form-control {
  border-radius: 24px;
  font-size: 0.875rem;
  padding: 8px 14px;
}

/* ---------- Chat (Portal) ---------- */
.chat-contact {
  transition: background 0.15s ease, transform 0.15s ease;
  cursor: pointer;
  border-left: 3px solid transparent;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-light);
}

.chat-contact:hover {
  background: var(--primary-lighter) !important;
}

.chat-contact.active {
  background: #e3f0da !important;
  border-left-color: var(--primary);
}

.chat-contact .chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--border-light);
}

.chat-contact .chat-info {
  flex: 1;
  min-width: 0;
}

.chat-contact .chat-name {
  font-weight: 600;
  font-size: 0.85rem;
  display: block;
  color: var(--text-primary);
}

.chat-contact .chat-role {
  font-size: 0.68rem;
  text-transform: capitalize;
}

.chat-contact .unread-badge {
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 700;
  min-width: 18px;
  text-align: center;
  margin-left: auto;
  flex-shrink: 0;
}

/* Messages container — chat-bg */
#chatMessages {
  display: flex;
  flex-direction: column;
  padding: 16px 18px !important;
  background: #eef1f5;
}

/* Chat bubbles */
.chat-bubble {
  max-width: 78%;
  padding: 10px 16px;
  border-radius: 18px;
  font-size: 0.88rem;
  word-break: break-word;
  line-height: 1.5;
  position: relative;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.chat-bubble.chat-sent {
  background: linear-gradient(135deg, #7DA36A, #99BC85);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-bubble.chat-received {
  background: #fff;
  color: #1a1a2e;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
}

.chat-bubble .msg-text {
  white-space: pre-wrap;
}

.chat-bubble .msg-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  margin-top: 3px;
}

.chat-bubble .msg-time {
  font-size: 0.6rem;
  opacity: 0.65;
  letter-spacing: 0.02em;
}

.chat-bubble.chat-sent .msg-time {
  color: rgba(255, 255, 255, 0.7);
}

.chat-bubble .msg-read {
  font-size: 0.55rem;
  line-height: 1;
}

.chat-bubble .msg-read i {
  color: rgba(255, 255, 255, 0.4);
}

.chat-bubble .msg-read.read i {
  color: #6fcf97;
}

/* Grouping */
.chat-msg.grouped .chat-bubble {
  border-radius: 18px;
  margin-top: 2px;
}

.chat-msg.grouped-first .chat-bubble.chat-sent {
  border-bottom-right-radius: 4px;
}

.chat-msg.grouped-first .chat-bubble.chat-received {
  border-bottom-left-radius: 4px;
}

.chat-msg.grouped-last .chat-bubble.chat-sent {
  border-top-right-radius: 4px;
}

.chat-msg.grouped-last .chat-bubble.chat-received {
  border-top-left-radius: 4px;
}

.chat-msg.grouped-single .chat-bubble.chat-sent {
  border-bottom-right-radius: 4px;
}

.chat-msg.grouped-single .chat-bubble.chat-received {
  border-bottom-left-radius: 4px;
}

/* Contact search */
.chat-search {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.chat-search input {
  border: none;
  background: var(--bg-off-white);
  border-radius: 20px;
  padding: 7px 14px;
  font-size: 0.8rem;
  width: 100%;
  outline: none;
  transition: background 0.2s;
}

.chat-search input:focus {
  background: #e4e6e8;
}

/* Empty state */
.chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.chat-empty i {
  font-size: 3.5rem;
  margin-bottom: 12px;
  color: var(--border);
}

.chat-empty p {
  font-size: 0.85rem;
  color: var(--text-light);
  margin: 0;
}

/* New message animation */
@keyframes msgSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

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

.chat-msg {
  animation: msgSlideIn 0.2s ease-out;
}

/* Scrollable panels */
.chat-scroll {
  overflow-y: auto;
  min-height: 0;
}

.chat-scroll::-webkit-scrollbar {
  width: 4px;
}

.chat-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.chat-scroll::-webkit-scrollbar-thumb {
  background: #d0d2d4;
  border-radius: 4px;
}

.chat-scroll::-webkit-scrollbar-thumb:hover {
  background: #b0b2b4;
}

/* Chat header with partner info */
.chat-partner-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-partner-header img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--border-light);
}

.chat-partner-header .chat-partner-info {
  line-height: 1.25;
}

.chat-partner-header .chat-partner-info strong {
  font-size: 0.9rem;
  display: block;
  color: var(--text-primary);
}

.chat-partner-header .chat-partner-info small {
  font-size: 0.7rem;
  color: var(--text-light);
}

/* Send form polish */
#chatSendForm .form-control {
  border-radius: 24px;
  padding: 8px 16px;
  font-size: 0.88rem;
  border: 1.5px solid var(--border);
}

#chatSendForm .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(153, 188, 133, 0.15);
}

#chatSendForm .btn {
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---------- Forms ---------- */
.form-control,
.form-select {
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  font-size: 0.9rem;
  transition: all var(--ease);
  background: #fff;
  color: var(--text-body);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(153, 188, 133, 0.08);
}

.form-control::placeholder {
  color: var(--text-light);
}

.form-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 5px;
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

.trial-assign-select,
.admission-assign-select,
.course-status-select,
.course-action-select,
.attendance-select,
.status-select {
  min-width: 120px;
}

/* ---------- Modals ---------- */
.modal-content {
  border-radius: var(--radius-lg);
  border: none;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.modal-header {
  border-bottom-color: var(--border-light);
  padding: 1.25rem 1.5rem;
}

.modal-header .modal-title {
  font-weight: 700;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top-color: var(--border-light);
  padding: 1rem 1.5rem;
}

.modal-backdrop {
  backdrop-filter: blur(4px);
  background: rgba(0, 0, 0, 0.3);
}

/* ---------- Badges (bootstrap overrides) ---------- */
.badge {
  border-radius: 6px;
  font-weight: 500;
  padding: 4px 10px;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.badge.bg-success {
  background: var(--success) !important;
}

.badge.bg-warning {
  background: var(--warning) !important;
  color: #fff !important;
}

.badge.bg-danger {
  background: var(--danger) !important;
}

.badge.bg-info {
  background: var(--info) !important;
}

.badge.bg-primary {
  background: var(--primary) !important;
}

.badge.rounded-pill {
  padding-left: 12px;
  padding-right: 12px;
  border-radius: 2rem !important;
}

/* ---------- Alerts ---------- */
.alert {
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px 17px;
}

.alert-success {
  background: var(--success-light);
  color: #065f46;
}

.alert-danger {
  background: var(--danger-light);
  color: #991b1b;
}

.alert-warning {
  background: var(--warning-light);
  color: #92400e;
}

.alert-info {
  background: var(--info-light);
  color: #155e75;
}

/* ---------- Dropdown ---------- */
.dropdown-menu {
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 6px;
}

.dropdown-item {
  border-radius: 6px;
  padding: 8px 14px;
  font-weight: 500;
  transition: all var(--ease);
  font-size: 0.88rem;
}

.dropdown-item:hover {
  background: var(--primary-lighter);
  color: var(--primary);
}

.dropdown-item i {
  width: 18px;
  text-align: center;
}

.dropdown-divider {
  border-color: var(--border-light);
}

/* ---------- Nav Pills ---------- */
.nav-pills .nav-link {
  border-radius: 30px;
  padding: 8px 22px;
  font-weight: 500;
  color: var(--text-body);
  transition: all var(--ease);
}

.nav-pills .nav-link:hover {
  background: var(--primary-lighter);
  color: var(--primary);
}

.nav-pills .nav-link.active {
  background: var(--gradient-primary) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(153, 188, 133, 0.2);
}

/* ---------- Progress Bars ---------- */
.progress {
  border-radius: 10px;
  background: var(--border-light);
  height: 8px;
  overflow: hidden;
}

.progress-bar {
  border-radius: 10px;
  background: var(--gradient-primary);
  transition: width 0.6s ease;
}

.progress-bar.bg-success {
  background: var(--gradient-accent);
}

/* ---------- Toast ---------- */
#toastContainer {
  z-index: 1080 !important;
}

.toast {
  border-radius: var(--radius-sm);
}

.toast.text-bg-success {
  background: var(--success) !important;
}

.toast.text-bg-danger {
  background: var(--danger) !important;
}

.toast.text-bg-warning {
  background: var(--warning) !important;
}

.toast.text-bg-info {
  background: var(--info) !important;
}

/* ---------- Offcanvas ---------- */
.offcanvas.sidebar-rm {
  position: fixed;
  background: var(--gradient-sidebar);
  z-index: 1065;
}

/* ---------- Certificate ---------- */
.certificate-box {
  max-width: 900px;
  margin: 40px auto;
  background: #fff;
  border: 12px solid var(--primary);
  padding: 60px;
  text-align: center;
  position: relative;
}

.certificate-box::before {
  content: '';
  position: absolute;
  inset: 15px;
  border: 2px solid var(--secondary);
  pointer-events: none;
}

.cert-title {
  font-size: clamp(26px, 4vw, 40px);
  color: var(--primary);
  font-weight: 800;
  letter-spacing: 4px;
}

.cert-name {
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 2px solid var(--secondary);
  display: inline-block;
  padding: 0 18px 8px;
  margin: 18px 0;
}

.cert-serial {
  position: absolute;
  bottom: 20px;
  right: 40px;
  font-size: 11px;
  color: var(--text-light);
}

/* ---------- Portal Welcome Header ---------- */
.portal-welcome {
  background: var(--gradient-primary);
  border-radius: var(--radius-xl);
  padding: 1.75rem 2rem;
  color: #fff;
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}

.portal-welcome::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(179, 212, 160, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.portal-welcome h4 {
  color: #fff;
  margin-bottom: 2px;
  font-weight: 700;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.portal-welcome p {
  opacity: 0.85;
  margin-bottom: 0;
  font-size: 0.9rem;
}

/* ---------- Quick Action Cards ---------- */
.quick-action-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  padding: 1.25rem;
  border: 1px solid var(--border-light);
  transition: all var(--ease-out);
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.quick-action-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gradient-primary);
  transform: scaleY(0);
  transition: transform var(--ease-out);
}

.quick-action-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.quick-action-card:hover::before {
  transform: scaleY(1);
}

.quick-action-card .qa-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-lighter);
  color: var(--primary);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.quick-action-card h6 {
  margin-bottom: 2px;
  font-size: 0.95rem;
}

.quick-action-card small {
  color: var(--text-muted);
}

/* ---------- Course Progress Card ---------- */
.course-progress-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  padding: 1.25rem;
  border: 1px solid var(--border-light);
  transition: all var(--ease-out);
}

.course-progress-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--border);
}

.course-progress-card .course-thumb {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
}

.course-progress-card .course-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
}

.course-progress-card .course-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---------- Utilities ---------- */
.rounded-rm {
  border-radius: var(--radius) !important;
}

.rounded-rm-lg {
  border-radius: var(--radius-lg) !important;
}

.cursor-pointer {
  cursor: pointer;
}

.fw-800 {
  font-weight: 800 !important;
}

.opacity-90 {
  opacity: 0.9;
}

.shadow-soft {
  box-shadow: var(--shadow) !important;
}

.bg-soft-primary {
  background: var(--primary-lighter) !important;
}

.bg-soft-accent {
  background: var(--accent-light) !important;
}

.bg-soft-orange {
  background: rgba(179, 212, 160, 0.08) !important;
}

.bg-subtle {
  background: var(--bg-subtle) !important;
}

.text-gradient-primary {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-gold {
  background: var(--gradient-secondary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-accent {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius);
}

.list-group-item {
  border-color: var(--border-light);
  border-radius: var(--radius-sm) !important;
  margin-bottom: 4px;
}

.list-group-item-action {
  transition: all var(--ease);
}

.list-group-item-action:hover {
  background: var(--primary-lighter);
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .navbar-rm {
    background: #fff;
    backdrop-filter: none;
  }

  .sidebar-rm {
    border-radius: 0;
    position: static;
    height: auto;
    min-height: auto;
    width: 100% !important;
  }

  .sidebar-folded .sidebar-rm {
    width: 100% !important;
  }

  .sidebar-folded .sidebar-rm .nav-link {
    justify-content: flex-start;
    padding: 10px 14px;
  }

  .sidebar-folded .sidebar-rm .nav-link .nav-text {
    opacity: 1;
    width: auto;
  }

  .sidebar-folded .sidebar-rm .nav-link i {
    margin-right: 10px;
  }

  .sidebar-folded .sidebar-rm .sidebar-brand a {
    justify-content: flex-start;
    padding-left: 0;
  }

  .sidebar-folded .sidebar-rm .sidebar-brand .brand-text {
    opacity: 1;
    width: auto;
  }

  .sidebar-folded .sidebar-rm .sidebar-section {
    opacity: 1;
    height: auto;
    padding: 1.2rem 1rem 0.25rem;
  }

  .sidebar-folded .sidebar-rm .nav-link:hover::after,
  .sidebar-folded .sidebar-rm .nav-link:hover::before {
    display: none;
  }

  .sidebar-folded .sidebar-rm .sidebar-brand {
    padding: 1.2rem 1.25rem;
  }

  .topbar-rm {
    padding: 10px 16px;
    border-radius: var(--radius);
  }

  .topbar-rm .topbar-search input {
    width: 140px;
  }

  .topbar-rm .topbar-search input:focus {
    width: 180px;
  }

  .live-chat-box {
    width: calc(100% - 32px);
    left: 16px;
    right: 16px;
    bottom: 88px;
  }
}

@media (max-width: 767.98px) {
  .table-rm-card {
    padding: 0.75rem;
  }

  .table-rm thead {
    display: none;
  }

  .table-rm,
  .table-rm tbody,
  .table-rm tr,
  .table-rm td {
    display: block;
  }

  .table-rm tr {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    padding: 10px;
    background: #fff;
  }

  .table-rm td {
    padding: 6px 8px;
    border: none;
    text-align: right;
    font-size: 0.875rem;
  }

  .table-rm td::before {
    content: attr(data-label);
    float: left;
    font-weight: 600;
    color: var(--text-primary);
  }

  .stat-widget {
    padding: 1rem;
  }

  .stat-widget .stat-icon {
    width: 38px;
    height: 38px;
    font-size: 15px;
  }

  .footer-rm {
    margin-top: 40px;
    padding: 3rem 1.25rem 0;
  }

  .footer-rm .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-rm .footer-col p {
    max-width: 100%;
  }

  .certificate-box {
    padding: 30px 20px;
    border-width: 8px;
    margin: 20px;
  }

  .certificate-box::before {
    inset: 10px;
  }

  .cert-serial {
    position: static;
    margin-top: 20px;
  }

  .portal-welcome {
    padding: 1.25rem 1.25rem;
    border-radius: var(--radius-lg);
  }
}

@media (max-width: 991.98px) and (min-width: 768px) {
  .footer-rm .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 575.98px) {
  .hero-content h1 {
    font-size: 1.8rem;
  }

  .rm-card img {
    height: 140px;
  }
}

/* =================================================================
   PRINT
   ================================================================= */
@media print {

  .navbar-rm,
  .footer-rm,
  .floating-whatsapp,
  .live-chat-toggle,
  .live-chat-box,
  .btn,
  .topbar-rm,
  .sidebar-rm,
  .offcanvas {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }

  .rm-card,
  .stat-widget,
  .table-rm-card,
  .dashboard-panel {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }

  .hero-primary {
    background: #fff !important;
  }

  .container {
    max-width: 100% !important;
  }

  .certificate-box {
    border: 12px solid #99BC85 !important;
    margin: 0 !important;
  }

  .certificate-box::before {
    border: 2px solid #B3D4A0 !important;
  }

  .cert-title {
    color: #99BC85 !important;
  }

  .cert-name {
    border-bottom-color: #B3D4A0 !important;
  }
}

/* =================================================================
   REDUCED MOTION
   ================================================================= */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ===== Missing utility classes (added patch) ===== */
.section-title-centered {
  text-align: center;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.section-title-centered::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 4px;
  margin: 10px auto 0;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 2rem auto;
  font-size: 0.95rem;
  line-height: 1.7;
}