:root {
  --quran-green: #4f8f52;
  --quran-green-dark: #34743a;
  --quran-green-soft: #eef8ef;
  --quran-bg: #fbfbfb;
  --quran-border: #e9ecef;
  --quran-text: #161616;
  --quran-muted: #6c757d;
  --quran-radius: 1.125rem;
  --quran-shadow: 0 0.875rem 2.1875rem rgba(0, 0, 0, 0.06);

  --font-ui:
    "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;

  --font-kfgqpc_hafs:
    "KFGQPC Hafs", "Amiri Quran", "Quran Symbols Backup", "Scheherazade New",
    "Noto Naskh Arabic", serif;
}

/*
  IMPORTANT:
  Your CSS file is loaded as assets/css/iqra.css.
  Your fonts folder is assets/fonts/.
  Therefore the correct CSS font path is ../fonts/filename.ttf
*/
/* ==============================
   Quran Font Fix
   ============================== */

@font-face {
  font-family: "KFGQPC Hafs";
  src:
    url("../fonts/kfgqpc_hafs.woff2") format("woff2"),
    url("../fonts/kfgqpc_hafs.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Backup font for Quran signs */
@font-face {
  font-family: "Quran Symbols Backup";
  src: url("../fonts/AmiriQuran-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Main Arabic Quran text */
.quran-arabic,
.ayah-text,
.surah-ayah,
.quran-text {
  font-family:
    "KFGQPC Hafs", "Quran Symbols Backup", "Amiri Quran", "Scheherazade New",
    "Noto Naskh Arabic", serif !important;
  font-size: 1.75rem;
  line-height: 2.2;
  direction: rtl;
  text-align: right;
  unicode-bidi: isolate;
}

/* Quranic symbols / waqf / ruku / ayah signs */
.quran-symbol,
.ayah-symbol,
.ruku-symbol {
  font-family:
    "Quran Symbols Backup", "Amiri Quran", "Scheherazade New",
    "Noto Naskh Arabic", serif !important;
  font-size: 1.25em;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
  margin: 0 0.15rem;
}
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--quran-bg);
  font-family: var(--font-ui);
  color: var(--quran-text);
}

a {
  text-decoration: none;
}

.arabic-font {
  font-family: var(--font-kfgqpc_hafs);
}

/* ================= TOP NAVBAR ================= */

.quran-navbar {
  min-height: 4.5rem;
  background: var(--quran-green);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 0.375rem 1.25rem rgba(0, 0, 0, 0.06);
}

.quran-brand-logo {
  width: 2.625rem;
  height: 2.625rem;
  border-radius: 50%;
  border: 0.0625rem solid rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-kfgqpc_hafs);
  font-size: 1.4375rem;
  line-height: 1;
  background: rgba(255, 255, 255, 0.08);
}

.quran-brand-title {
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.0125rem;
}

.quran-top-btn {
  border-radius: 999rem;
  padding: 0.625rem 1.25rem;
  font-weight: 700;
  font-size: 0.875rem;
}

.quran-btn-outline {
  color: #fff;
  border: 0.0625rem solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

.quran-btn-outline:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.quran-btn-white {
  background: #fff;
  color: #111;
  border: 0.0625rem solid #fff;
}

.quran-btn-white:hover {
  background: #f6f6f6;
  color: #111;
}

.iqra-user-chip {
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 999rem;
  padding: 0.35rem 0.9rem 0.35rem 0.45rem;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.iqra-user-chip:hover,
.iqra-user-chip:focus,
.iqra-user-chip.show {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.iqra-user-avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  flex-shrink: 0;
}

.iqra-user-chip-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}

.iqra-user-chip-text strong {
  font-size: 0.85rem;
}

.iqra-user-chip-text small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
}

.iqra-user-menu {
  border: 0;
  border-radius: 1rem;
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.12);
  min-width: 14rem;
  padding: 0.65rem;
}

.iqra-user-menu .dropdown-item {
  border-radius: 0.7rem;
  padding: 0.6rem 0.8rem;
}

.iqra-mobile-user {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem;
  background: #f7f9f7;
  border-radius: 1rem;
  margin-bottom: 1rem;
}

.iqra-auth-canvas {
  width: min(100%, 27rem) !important;
}

.iqra-auth-header {
  padding: 1.35rem 1.35rem 0.75rem;
}

.iqra-auth-kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--quran-green);
  margin-bottom: 0.35rem;
}

.iqra-auth-body {
  padding: 0 1.35rem 1.35rem;
}

.iqra-auth-form {
  display: grid;
  gap: 0.85rem;
}

.iqra-auth-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #243024;
  margin-bottom: -0.35rem;
}

.iqra-auth-input {
  min-height: 3rem;
  border-radius: 0.95rem;
  border: 0.0625rem solid #d6e1d7;
  padding: 0.8rem 0.95rem;
}

.iqra-auth-input:focus {
  border-color: var(--quran-green);
  box-shadow: 0 0 0 0.2rem rgba(79, 143, 82, 0.12);
}

.iqra-auth-primary,
.iqra-auth-secondary,
.iqra-auth-google {
  min-height: 3rem;
  border-radius: 999rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.iqra-auth-primary {
  background: var(--quran-green);
  color: #fff;
}

.iqra-auth-primary:hover {
  background: var(--quran-green-dark);
  color: #fff;
}

.iqra-auth-secondary {
  background: #f3f6f3;
  color: #203320;
}

.iqra-auth-secondary:hover {
  background: #e8efe8;
  color: #203320;
}

.iqra-auth-google {
  background: #fff;
  color: #1f1f1f;
  border: 0.0625rem solid #d9dfda;
}

.iqra-auth-google:hover {
  background: #f6f8f6;
  color: #1f1f1f;
}

.bookmark-hero,
.bookmark-summary-section,
.bookmark-panel-card {
  margin-bottom: 1.5rem;
}

.bookmark-hero {
  background: linear-gradient(135deg, #ffffff 0%, #f4fbf4 100%);
  border: 0.0625rem solid var(--quran-border);
  border-radius: 1.5rem;
  padding: 1.75rem;
  box-shadow: var(--quran-shadow);
}

.bookmark-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999rem;
  background: rgba(79, 143, 82, 0.1);
  color: var(--quran-green-dark);
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 0.9rem;
}

.bookmark-hero h1 {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  font-weight: 800;
  margin-bottom: 0.7rem;
}

.bookmark-hero p {
  color: var(--quran-muted);
  line-height: 1.7;
  margin-bottom: 0;
}

.bookmark-hero-card,
.bookmark-stat-card,
.bookmark-panel-card,
.bookmark-item-card,
.bookmark-last-read-card {
  background: #fff;
  border: 0.0625rem solid var(--quran-border);
  border-radius: 1.35rem;
}

.bookmark-hero-card {
  padding: 1.35rem;
  min-height: 100%;
}

.bookmark-hero-card span,
.bookmark-stat-card p,
.bookmark-section-header p,
.bookmark-item-card p,
.bookmark-last-read-card p,
.bookmark-last-read-empty {
  color: var(--quran-muted);
}

.bookmark-hero-card h3,
.bookmark-stat-card h4,
.bookmark-section-header h2,
.bookmark-item-card h3,
.bookmark-last-read-card h3 {
  color: var(--quran-text);
  font-weight: 800;
}

.bookmark-stat-card {
  padding: 1.2rem;
  box-shadow: 0 0.5rem 1.4rem rgba(0, 0, 0, 0.03);
  min-height: 100%;
}

.bookmark-stat-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(79, 143, 82, 0.1);
  color: var(--quran-green-dark);
  margin-bottom: 0.8rem;
  font-size: 1rem;
}

.bookmark-panel-card {
  padding: 1.35rem;
  box-shadow: 0 0.75rem 1.8rem rgba(0, 0, 0, 0.035);
}

.bookmark-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.bookmark-clear-btn,
.bookmark-remove-btn {
  border: 0;
  border-radius: 999rem;
  padding: 0.7rem 1rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.bookmark-clear-btn {
  background: #fff3f3;
  color: #b42318;
}

.bookmark-remove-btn {
  background: #f5f6f8;
  color: #3e4c59;
}

.bookmark-last-read-empty,
.bookmark-last-read-card,
.bookmark-empty-state {
  padding: 1.25rem;
}

.bookmark-last-read-empty,
.bookmark-empty-state {
  border: 0.0625rem dashed #d8e4d8;
  border-radius: 1.2rem;
  background: #f9fcf9;
  text-align: center;
}

.bookmark-last-read-card {
  box-shadow: 0 0.7rem 1.6rem rgba(79, 143, 82, 0.07);
}

.bookmark-card-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999rem;
  background: rgba(79, 143, 82, 0.12);
  color: var(--quran-green-dark);
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0.35rem 0.65rem;
  margin-bottom: 0.75rem;
}

.bookmark-open-reader-btn {
  text-decoration: none;
  border: 0;
  border-radius: 999rem;
  padding: 0.75rem 1rem;
  background: var(--quran-green);
  color: #fff;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.bookmark-open-reader-btn:hover {
  background: var(--quran-green-dark);
  color: #fff;
}

.bookmark-list-wrap {
  display: grid;
  gap: 1rem;
}

.bookmark-item-card {
  padding: 1.15rem;
  box-shadow: 0 0.65rem 1.5rem rgba(0, 0, 0, 0.03);
}

.bookmark-item-top,
.bookmark-item-actions,
.bookmark-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.bookmark-item-top {
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.bookmark-item-top h3 {
  margin: 0;
}

.bookmark-item-top h3 small {
  font-size: 0.88rem;
  color: var(--quran-muted);
  font-weight: 700;
}

.bookmark-item-number {
  min-width: 3rem;
  height: 3rem;
  border-radius: 0.95rem;
  background: #f5f8f5;
  color: var(--quran-green-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.bookmark-item-meta {
  flex-wrap: wrap;
  justify-content: flex-start;
  color: #556372;
  font-size: 0.9rem;
  margin-bottom: 0.95rem;
}

.bookmark-item-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.bookmark-item-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.bookmark-empty-state i {
  font-size: 2rem;
  color: var(--quran-green);
  margin-bottom: 0.75rem;
}

@media (max-width: 61.9375rem) {
  .bookmark-section-header,
  .bookmark-item-top,
  .bookmark-item-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .bookmark-item-number {
    width: 3rem;
  }
}

.iqra-auth-links {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.iqra-auth-text-btn {
  border: 0;
  background: transparent;
  color: var(--quran-green-dark);
  font-weight: 700;
  padding: 0;
  text-align: center;
}

/* ================= LAYOUT ================= */

.quran-layout {
  display: flex;
  min-height: calc(100vh - 4.5rem);
}

.quran-sidebar-desktop {
  width: 4.75rem;
  background: #fff;
  border-right: 0.0625rem solid var(--quran-border);
  position: sticky;
  top: 4.5rem;
  height: calc(100vh - 4.5rem);
  padding: 1rem 0.5rem;
  flex-shrink: 0;
  z-index: 10;
}

.quran-side-item {
  width: 3.75rem;
  min-height: 3.875rem;
  border-radius: 0.8125rem;
  color: #7b7f86;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
  margin-bottom: 0.875rem;
}

.quran-side-item i {
  font-size: 1.0625rem;
}

.quran-side-item:hover,
.quran-side-item.active {
  background: #f5f7f5;
  color: var(--quran-green);
}

.quran-main {
  flex: 1;
  padding: 1.75rem 2rem 3.75rem;
  overflow: hidden;
}

/* ================= COMMON ================= */

.section-title-sm {
  font-size: 0.875rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 0.6875rem;
}

.quran-soft-card {
  background: #fff;
  border: 0.0625rem solid var(--quran-border);
  border-radius: var(--quran-radius);
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.025);
}

.quran-mini-btn {
  min-width: 8.75rem;
  height: 2.375rem;
  border: 0.0625rem solid #ced4da;
  background: #fff;
  color: var(--quran-green);
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 800;
  text-transform: uppercase;
  transition: 0.2s ease;
}

.quran-mini-btn:hover {
  border-color: var(--quran-green);
  background: var(--quran-green-soft);
  color: var(--quran-green-dark);
}

.quran-search {
  height: 2.75rem;
  border-radius: 0.75rem;
  border: 0.0625rem solid var(--quran-border);
  font-size: 0.875rem;
}

.quran-search:focus {
  border-color: var(--quran-green);
  box-shadow: 0 0 0 0.2rem rgba(79, 143, 82, 0.12);
}

/* ================= HOME ================= */

.quran-tab-pills {
  background: #f1f2f3;
  border-radius: 999rem;
  padding: 0.4375rem;
  display: inline-flex;
  gap: 0.25rem;
  max-width: 100%;
  overflow-x: auto;
}

.quran-tab-pills .nav-link {
  border-radius: 999rem;
  color: #7b7f86;
  font-size: 0.8125rem;
  padding: 0.5rem 1.125rem;
  white-space: nowrap;
}

.quran-tab-pills .nav-link.active {
  background: #fff;
  color: #111;
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.08);
}

.surah-card,
.quran-surah-card {
  background: #fff;
  border: 0.0625rem solid var(--quran-border) !important;
  border-radius: 1.0625rem !important;
  min-height: 5.75rem;
  cursor: pointer;
  transition: 0.22s ease;
  height: 100%;
}

.surah-card {
  padding: 1.375rem 1.125rem;
}

.quran-surah-card {
  padding: 0;
}

.surah-card:hover,
.quran-surah-card:hover {
  border-color: rgba(79, 143, 82, 0.6) !important;
  box-shadow: var(--quran-shadow) !important;
  transform: translateY(-0.1875rem);
}

.surah-number {
  width: 2.375rem;
  color: #111;
  font-size: 1.375rem;
  font-weight: 500;
}

.surah-name {
  color: var(--quran-green);
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.surah-subtitle {
  color: #555;
  font-size: 0.8125rem;
  font-weight: 500;
}

.surah-arabic,
.surah-card-arabic-name {
  font-family: var(--font-kfgqpc_hafs);
  direction: rtl;
  color: #111;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.surah-arabic {
  font-size: 1.8125rem;
  line-height: 1.6em;
  white-space: nowrap;
}

.surah-card-arabic-name {
  font-size: 1.5rem;
  line-height: 1.6em;
}

.quick-wrapper {
  margin-bottom: 2.125rem;
}

.last-read-wrapper {
  margin-bottom: 2.125rem;
}

/* ================= READER ================= */

.reader-view {
  display: none;
}

.reader-hero {
  background: linear-gradient(
    135deg,
    var(--quran-green),
    var(--quran-green-dark)
  );
  color: #fff;
  border-radius: 1.5rem;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.reader-hero::after {
  content: "";
  position: absolute;
  width: 13.75rem;
  height: 13.75rem;
  border-radius: 50%;
  right: -4.375rem;
  top: -4.375rem;
  background: rgba(255, 255, 255, 0.08);
}

.reader-hero h1 {
  font-size: 1.875rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
  position: relative;
  z-index: 1;
}

.reader-hero p {
  margin: 0;
  opacity: 0.9;
  font-size: 0.875rem;
  position: relative;
  z-index: 1;
}

.reader-control-btn {
  border-radius: 999rem;
  padding: 0.625rem 1rem;
  border: none;
  background: #fff;
  color: var(--quran-green);
  font-weight: 800;
  font-size: 0.8125rem;
  position: relative;
  z-index: 1;
}

.reader-control-btn:hover {
  background: #f8f9fa;
  color: var(--quran-green-dark);
}

.ayah-card {
  background: #fffdf7 !important;
  border: 0.0625rem solid var(--quran-border) !important;
  border-radius: 1.125rem !important;
  padding: 0;
  margin-bottom: 1.125rem;
  transition: 0.22s ease;
}

.ayah-card:hover {
  box-shadow: var(--quran-shadow);
}

.ayah-card .card-body {
  padding: 1.5rem;
}

.ayah-number {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--quran-green-soft);
  color: var(--quran-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8125rem;
}

.ayah-menu {
  color: #999;
  cursor: pointer;
}

.ayah-arabic,
.ayah-arabic-text {
  font-family: var(--font-kfgqpc_hafs);
  direction: rtl;
  text-align: right;
  font-size: 2.75rem;
  line-height: 1.6em;
  color: #111827;
  font-weight: 400;
  letter-spacing: 0;
  word-spacing: 0.15rem;
  padding: 0.875rem 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.ayah-arabic {
  margin: 1.375rem 0 1.125rem;
}

.translation-source {
  color: #9aa0a6;
  font-size: 0.8125rem;
  margin-bottom: 0.4375rem;
}

.ayah-translation {
  color: #374151;
  font-size: 1rem;
  line-height: 1.8em;
  margin-bottom: 1.125rem;
  border-top: 0.0625rem solid #eee7d8;
  padding-top: 0.875rem;
}

.ayah-actions {
  display: flex;
  align-items: center;
  gap: 1.375rem;
  color: #9aa0a6;
  font-size: 1.0625rem;
}

.ayah-actions i {
  cursor: pointer;
  transition: 0.2s ease;
}

.ayah-actions i:hover {
  color: var(--quran-green);
}

.ayah-highlighted {
  border: 0.125rem solid #198754 !important;
  box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.12) !important;
}

.word-row {
  direction: rtl;
  text-align: right;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1.125rem;
  margin-bottom: 1.125rem;
  border-bottom: 0.0625rem dashed #e4e7eb;
  padding-bottom: 1.125rem;
}

.word-item {
  text-align: center;
  min-width: 4.375rem;
}

.word-ar {
  font-family: var(--font-kfgqpc_hafs);
  font-size: 1.625rem;
  line-height: 1.6em;
  color: #111;
  font-weight: 400;
}

.word-en {
  direction: ltr;
  font-size: 0.75rem;
  color: #4f5b67;
  margin-top: 0.25rem;
}

/* ================= OFFCANVAS ================= */

.mobile-offcanvas {
  width: 16.25rem !important;
}

.mobile-menu-link {
  padding: 0.8125rem 0.875rem;
  border-radius: 0.75rem;
  color: #555;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  cursor: pointer;
}

.mobile-menu-link.active,
.mobile-menu-link:hover {
  background: var(--quran-green-soft);
  color: var(--quran-green);
}

/* ================= RESPONSIVE ================= */

@media (max-width: 61.9375rem) {
  .quran-sidebar-desktop {
    display: none;
  }

  .quran-main {
    padding: 1.375rem 1rem 3.125rem;
  }

  .quran-navbar {
    min-height: 4.25rem;
  }

  .reader-hero {
    padding: 1.375rem;
  }

  .reader-hero h1 {
    font-size: 1.5rem;
  }

  .ayah-arabic,
  .ayah-arabic-text {
    font-size: 1.625rem;
    line-height: 1.7em;
  }
}

@media (max-width: 35.9375rem) {
  .quran-brand-title {
    font-size: 1rem;
  }

  .quran-brand-logo {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1.25rem;
  }

  .quran-mini-btn {
    min-width: 7.5rem;
    font-size: 0.75rem;
  }

  .surah-card {
    padding: 1.125rem 0.9375rem;
  }

  .surah-arabic {
    font-size: 1.5625rem;
  }

  .surah-card-arabic-name {
    font-size: 1.3125rem;
  }

  .ayah-card .card-body {
    padding: 1.125rem;
  }

  .ayah-arabic,
  .ayah-arabic-text {
    font-size: 1.5rem;
    line-height: 1.75em;
    word-spacing: 0.1rem;
  }

  .top-action-desktop {
    display: none !important;
  }
}

/* ================= PLANNER PAGE ================= */

.planner-hero {
  background: linear-gradient(
    135deg,
    var(--quran-green),
    var(--quran-green-dark)
  );
  color: #fff;
  border-radius: 1.75rem;
  padding: 2.125rem;
  margin-bottom: 1.75rem;
  position: relative;
  overflow: hidden;
}

.planner-hero::after {
  content: "";
  position: absolute;
  width: 16.25rem;
  height: 16.25rem;
  right: -5rem;
  top: -5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.planner-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  padding: 0.5rem 0.875rem;
  border-radius: 999rem;
  font-size: 0.8125rem;
  font-weight: 700;
  margin-bottom: 1.125rem;
  position: relative;
  z-index: 1;
}

.planner-hero h1 {
  font-size: 2.25rem;
  line-height: 1.2em;
  font-weight: 800;
  max-width: 42.5rem;
  margin: 0 0 0.75rem;
  position: relative;
  z-index: 1;
}

.planner-hero p {
  font-size: 0.9375rem;
  line-height: 1.7em;
  opacity: 0.92;
  max-width: 40.625rem;
  margin: 0;
  position: relative;
  z-index: 1;
}

.planner-goal-card {
  background: #fff;
  color: #111;
  border-radius: 1.375rem;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1.125rem;
  align-items: center;
  position: relative;
  z-index: 1;
  box-shadow: 0 1.125rem 2.5rem rgba(0, 0, 0, 0.12);
}

.planner-goal-card span {
  color: var(--quran-muted);
  font-size: 0.8125rem;
  font-weight: 700;
}

.planner-goal-card h3 {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--quran-green);
  margin: 0.4375rem 0 0.25rem;
}

.planner-goal-card p {
  color: #555;
  margin: 0;
  font-size: 0.875rem;
}

.planner-goal-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 1.25rem;
  background: var(--quran-green-soft);
  color: var(--quran-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.625rem;
  flex-shrink: 0;
}

.planner-stats-section {
  margin-bottom: 1.75rem;
}

.planner-stat-card {
  background: #fff;
  border: 0.0625rem solid var(--quran-border);
  border-radius: 1.25rem;
  padding: 1.375rem;
  height: 100%;
  transition: 0.22s ease;
}

.planner-stat-card:hover {
  box-shadow: var(--quran-shadow);
  transform: translateY(-0.1875rem);
}

.planner-stat-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.875rem;
  background: var(--quran-green-soft);
  color: var(--quran-green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.875rem;
  font-size: 1.125rem;
}

.planner-stat-card h4 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #111;
  margin: 0 0 0.25rem;
}

.planner-stat-card p {
  color: var(--quran-muted);
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
}

.planner-card {
  background: #fff;
  border: 0.0625rem solid var(--quran-border);
  border-radius: 1.375rem;
  padding: 1.5rem;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.025);
}

.planner-section-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.375rem;
}

.planner-section-header h2 {
  font-size: 1.3125rem;
  font-weight: 800;
  margin: 0 0 0.3125rem;
  color: #111;
}

.planner-section-header p {
  margin: 0;
  color: var(--quran-muted);
  font-size: 0.875rem;
  line-height: 1.5em;
}

.planner-primary-btn,
.planner-outline-btn {
  border-radius: 999rem;
  padding: 0.625rem 1rem;
  font-size: 0.8125rem;
  font-weight: 800;
  border: 0.0625rem solid var(--quran-green);
  transition: 0.2s ease;
  white-space: nowrap;
}

.planner-primary-btn {
  background: var(--quran-green);
  color: #fff;
}

.planner-primary-btn:hover {
  background: var(--quran-green-dark);
}

.planner-outline-btn {
  background: #fff;
  color: var(--quran-green);
}

.planner-outline-btn:hover {
  background: var(--quran-green-soft);
}

.planner-task-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.planner-task-item {
  border: 0.0625rem solid var(--quran-border);
  border-radius: 1.125rem;
  padding: 1.125rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: 0.22s ease;
}

.planner-task-item:hover,
.planner-task-item.active {
  border-color: rgba(79, 143, 82, 0.45);
  background: #fcfffc;
}

.planner-task-check {
  width: 2.375rem;
  height: 2.375rem;
  border-radius: 50%;
  background: var(--quran-green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.planner-task-check.empty {
  background: #fff;
  border: 0.125rem solid #d7dde2;
}

.planner-task-content {
  flex: 1;
}

.planner-task-content h4 {
  font-size: 1rem;
  font-weight: 800;
  margin: 0.375rem 0 0.25rem;
  color: #111;
}

.planner-task-content p {
  margin: 0;
  color: var(--quran-muted);
  font-size: 0.875rem;
}

.planner-task-type {
  display: inline-flex;
  padding: 0.3125rem 0.625rem;
  border-radius: 999rem;
  font-size: 0.6875rem;
  font-weight: 800;
}

.planner-task-type.reading {
  background: var(--quran-green-soft);
  color: var(--quran-green);
}

.planner-task-type.memorization {
  background: #fff4df;
  color: #b7791f;
}

.planner-task-type.revision {
  background: #eef2ff;
  color: #4f46e5;
}

.planner-task-status {
  font-size: 0.75rem;
  font-weight: 800;
  border-radius: 999rem;
  padding: 0.4375rem 0.6875rem;
  white-space: nowrap;
}

.planner-task-status.completed {
  background: var(--quran-green-soft);
  color: var(--quran-green);
}

.planner-task-status.pending {
  background: #f8f9fa;
  color: #777;
}

.weekly-planner-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.875rem;
}

.weekly-day-card {
  border: 0.0625rem solid var(--quran-border);
  border-radius: 1.125rem;
  padding: 1rem 0.75rem;
  text-align: center;
  min-height: 8rem;
  transition: 0.22s ease;
}

.weekly-day-card:hover {
  box-shadow: var(--quran-shadow);
  transform: translateY(-0.1875rem);
}

.weekly-day-card span {
  display: inline-flex;
  padding: 0.375rem 0.625rem;
  border-radius: 999rem;
  background: #f4f5f6;
  color: #666;
  font-size: 0.75rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.weekly-day-card h4 {
  font-size: 0.875rem;
  font-weight: 800;
  color: #111;
  margin: 0 0 0.375rem;
}

.weekly-day-card p {
  color: var(--quran-muted);
  font-size: 0.75rem;
  margin: 0;
}

.weekly-day-card.active {
  border-color: var(--quran-green);
  background: var(--quran-green-soft);
}

.weekly-day-card.active span {
  background: var(--quran-green);
  color: #fff;
}

.weekly-day-card.completed {
  background: #fcfffc;
}

.planner-summary-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.planner-summary-item {
  display: flex;
  justify-content: space-between;
  gap: 0.875rem;
  padding-bottom: 0.875rem;
  border-bottom: 0.0625rem solid var(--quran-border);
}

.planner-summary-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.planner-summary-item span {
  color: var(--quran-muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.planner-summary-item strong {
  font-size: 0.8125rem;
  color: #111;
  text-align: right;
}

.planner-progress-box {
  text-align: center;
}

.planner-progress-circle {
  width: 8.625rem;
  height: 8.625rem;
  border-radius: 50%;
  margin: 0 auto 1.125rem;
  background: conic-gradient(
    var(--quran-green) 0deg 245deg,
    #edf0f2 245deg 360deg
  );
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.planner-progress-circle::after {
  content: "";
  position: absolute;
  width: 6.5rem;
  height: 6.5rem;
  border-radius: 50%;
  background: #fff;
}

.planner-progress-circle span {
  position: relative;
  z-index: 1;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--quran-green);
}

.planner-progress-box h3 {
  font-size: 1.125rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
}

.planner-progress-box p {
  color: var(--quran-muted);
  font-size: 0.875rem;
  line-height: 1.6em;
  margin-bottom: 1.125rem;
}

.upcoming-review-box {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.upcoming-review-date {
  width: 4.125rem;
  height: 4.875rem;
  border-radius: 1.125rem;
  background: var(--quran-green-soft);
  color: var(--quran-green);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.upcoming-review-date span {
  font-size: 0.75rem;
  font-weight: 800;
}

.upcoming-review-date strong {
  font-size: 1.625rem;
  font-weight: 800;
  line-height: 1em;
}

.upcoming-review-box h4 {
  font-size: 1rem;
  font-weight: 800;
  color: #111;
  margin: 0 0 0.3125rem;
}

.upcoming-review-box p {
  color: var(--quran-muted);
  font-size: 0.8125rem;
  line-height: 1.5em;
  margin: 0;
}

/* ================= PLANNER RESPONSIVE ================= */

@media (max-width: 74.9375rem) {
  .weekly-planner-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 47.9375rem) {
  .planner-hero {
    padding: 1.5rem;
    border-radius: 1.375rem;
  }

  .planner-hero h1 {
    font-size: 1.625rem;
  }

  .planner-section-header {
    flex-direction: column;
  }

  .planner-primary-btn,
  .planner-outline-btn {
    width: 100%;
  }

  .planner-task-item {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .planner-task-status {
    margin-left: 3.375rem;
  }

  .weekly-planner-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .planner-summary-item {
    flex-direction: column;
    gap: 0.25rem;
  }

  .planner-summary-item strong {
    text-align: left;
  }
}

@media (max-width: 26.25rem) {
  .weekly-planner-grid {
    grid-template-columns: 1fr;
  }
}

/* ================= LIBRARY PAGE ================= */

.library-hero {
  background: linear-gradient(
    135deg,
    var(--quran-green),
    var(--quran-green-dark)
  );
  color: #fff;
  border-radius: 1.75rem;
  padding: 2.125rem;
  margin-bottom: 1.75rem;
  position: relative;
  overflow: hidden;
}

.library-hero::after {
  content: "";
  position: absolute;
  width: 16.25rem;
  height: 16.25rem;
  right: -5rem;
  top: -5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.library-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  padding: 0.5rem 0.875rem;
  border-radius: 999rem;
  font-size: 0.8125rem;
  font-weight: 700;
  margin-bottom: 1.125rem;
  position: relative;
  z-index: 1;
}

.library-hero h1 {
  font-size: 2.25rem;
  line-height: 1.2em;
  font-weight: 800;
  max-width: 45rem;
  margin: 0 0 0.75rem;
  position: relative;
  z-index: 1;
}

.library-hero p {
  font-size: 0.9375rem;
  line-height: 1.7em;
  opacity: 0.92;
  max-width: 42.5rem;
  margin: 0;
  position: relative;
  z-index: 1;
}

.library-feature-card {
  background: #fff;
  color: #111;
  border-radius: 1.375rem;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1.125rem;
  align-items: center;
  position: relative;
  z-index: 1;
  box-shadow: 0 1.125rem 2.5rem rgba(0, 0, 0, 0.12);
}

.library-feature-card span {
  color: var(--quran-muted);
  font-size: 0.8125rem;
  font-weight: 700;
}

.library-feature-card h3 {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--quran-green);
  margin: 0.4375rem 0 0.25rem;
}

.library-feature-card p {
  color: #555;
  margin: 0;
  font-size: 0.875rem;
}

.library-feature-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 1.25rem;
  background: var(--quran-green-soft);
  color: var(--quran-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.625rem;
  flex-shrink: 0;
}

.library-search-section {
  background: #fff;
  border: 0.0625rem solid var(--quran-border);
  border-radius: 1.375rem;
  padding: 1.25rem;
  margin-bottom: 1.75rem;
}

.library-search-group .input-group-text {
  background: #fff;
  border-color: var(--quran-border);
  border-right: 0;
  border-radius: 0.875rem 0 0 0.875rem;
  color: var(--quran-muted);
}

.library-search-group .form-control {
  height: 2.875rem;
  border-color: var(--quran-border);
  border-left: 0;
  border-radius: 0 0.875rem 0.875rem 0;
  font-size: 0.875rem;
}

.library-search-group .form-control:focus {
  border-color: var(--quran-green);
  box-shadow: none;
}

.library-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.library-filter {
  border: 0.0625rem solid var(--quran-border);
  background: #fff;
  color: #555;
  border-radius: 999rem;
  padding: 0.5625rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 800;
  transition: 0.2s ease;
}

.library-filter:hover,
.library-filter.active {
  background: var(--quran-green);
  border-color: var(--quran-green);
  color: #fff;
}

.library-category-section {
  margin-bottom: 1.75rem;
}

.library-section-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.375rem;
}

.library-section-header h2 {
  font-size: 1.3125rem;
  font-weight: 800;
  margin: 0 0 0.3125rem;
  color: #111;
}

.library-section-header p {
  margin: 0;
  color: var(--quran-muted);
  font-size: 0.875rem;
  line-height: 1.5em;
}

.library-category-card {
  background: #fff;
  border: 0.0625rem solid var(--quran-border);
  border-radius: 1.375rem;
  padding: 1.5rem;
  height: 100%;
  transition: 0.22s ease;
}

.library-category-card:hover {
  box-shadow: var(--quran-shadow);
  transform: translateY(-0.1875rem);
  border-color: rgba(79, 143, 82, 0.5);
}

.library-category-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  background: var(--quran-green-soft);
  color: var(--quran-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.library-category-card h4 {
  font-size: 1.0625rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
  color: #111;
}

.library-category-card p {
  color: var(--quran-muted);
  font-size: 0.875rem;
  line-height: 1.6em;
  margin: 0 0 0.875rem;
}

.library-category-card span {
  color: var(--quran-green);
  font-size: 0.8125rem;
  font-weight: 800;
}

.library-card {
  background: #fff;
  border: 0.0625rem solid var(--quran-border);
  border-radius: 1.375rem;
  padding: 1.5rem;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.025);
}

.library-primary-btn,
.library-outline-btn,
.library-open-btn {
  border-radius: 999rem;
  padding: 0.625rem 1rem;
  font-size: 0.8125rem;
  font-weight: 800;
  border: 0.0625rem solid var(--quran-green);
  transition: 0.2s ease;
  white-space: nowrap;
}

.library-primary-btn {
  background: var(--quran-green);
  color: #fff;
}

.library-primary-btn:hover {
  background: var(--quran-green-dark);
}

.library-outline-btn,
.library-open-btn {
  background: #fff;
  color: var(--quran-green);
}

.library-outline-btn:hover,
.library-open-btn:hover {
  background: var(--quran-green-soft);
}

.library-resource-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.library-resource-item {
  border: 0.0625rem solid var(--quran-border);
  border-radius: 1.25rem;
  padding: 1.125rem;
  display: flex;
  align-items: center;
  gap: 1.125rem;
  transition: 0.22s ease;
}

.library-resource-item:hover {
  border-color: rgba(79, 143, 82, 0.45);
  background: #fcfffc;
}

.library-resource-thumb {
  width: 4rem;
  height: 4rem;
  border-radius: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4375rem;
  flex-shrink: 0;
}

.library-resource-thumb.quran {
  background: var(--quran-green-soft);
  color: var(--quran-green);
}

.library-resource-thumb.tajweed {
  background: #fff4df;
  color: #b7791f;
}

.library-resource-thumb.dua {
  background: #eef2ff;
  color: #4f46e5;
}

.library-resource-thumb.notes {
  background: #f3f4f6;
  color: #374151;
}

.library-resource-content {
  flex: 1;
}

.library-resource-tag {
  display: inline-flex;
  padding: 0.3125rem 0.625rem;
  border-radius: 999rem;
  background: var(--quran-green-soft);
  color: var(--quran-green);
  font-size: 0.6875rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.library-resource-content h4 {
  font-size: 1.0625rem;
  font-weight: 800;
  margin: 0 0 0.375rem;
  color: #111;
}

.library-resource-content p {
  margin: 0 0 0.625rem;
  color: var(--quran-muted);
  font-size: 0.875rem;
  line-height: 1.6em;
}

.library-resource-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
}

.library-resource-meta span {
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 700;
}

.library-mini-resource {
  border: 0.0625rem solid var(--quran-border);
  border-radius: 1.125rem;
  padding: 1rem;
  display: flex;
  gap: 0.875rem;
  align-items: center;
  height: 100%;
  transition: 0.22s ease;
}

.library-mini-resource:hover {
  box-shadow: var(--quran-shadow);
  transform: translateY(-0.1875rem);
}

.library-mini-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.875rem;
  background: var(--quran-green-soft);
  color: var(--quran-green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.library-mini-resource h4 {
  font-size: 0.9375rem;
  font-weight: 800;
  margin: 0 0 0.3125rem;
  color: #111;
}

.library-mini-resource p {
  margin: 0;
  color: var(--quran-muted);
  font-size: 0.8125rem;
}

.library-summary-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.library-summary-item {
  display: flex;
  justify-content: space-between;
  gap: 0.875rem;
  padding-bottom: 0.875rem;
  border-bottom: 0.0625rem solid var(--quran-border);
}

.library-summary-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.library-summary-item span {
  color: var(--quran-muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.library-summary-item strong {
  font-size: 1.125rem;
  color: var(--quran-green);
  text-align: right;
}

.continue-learning-box {
  text-align: center;
}

.continue-learning-icon {
  width: 5.125rem;
  height: 5.125rem;
  border-radius: 1.625rem;
  background: var(--quran-green-soft);
  color: var(--quran-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin: 0 auto 1.125rem;
}

.continue-learning-box h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
}

.continue-learning-box p {
  color: var(--quran-muted);
  font-size: 0.875rem;
  line-height: 1.6em;
  margin-bottom: 1.125rem;
}

.teacher-resource-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.teacher-resource-item {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
  padding-bottom: 0.875rem;
  border-bottom: 0.0625rem solid var(--quran-border);
}

.teacher-resource-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.teacher-resource-icon {
  width: 2.375rem;
  height: 2.375rem;
  border-radius: 0.8125rem;
  background: var(--quran-green-soft);
  color: var(--quran-green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.teacher-resource-item h4 {
  font-size: 0.9375rem;
  font-weight: 800;
  margin: 0 0 0.3125rem;
  color: #111;
}

.teacher-resource-item p {
  margin: 0;
  color: var(--quran-muted);
  font-size: 0.8125rem;
  line-height: 1.5em;
}

/* ================= LIBRARY RESPONSIVE ================= */

@media (max-width: 61.9375rem) {
  .library-filter-tabs {
    justify-content: flex-start;
  }
}

@media (max-width: 47.9375rem) {
  .library-hero {
    padding: 1.5rem;
    border-radius: 1.375rem;
  }

  .library-hero h1 {
    font-size: 1.625rem;
  }

  .library-section-header {
    flex-direction: column;
  }

  .library-primary-btn,
  .library-outline-btn {
    width: 100%;
  }

  .library-resource-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .library-open-btn {
    width: 100%;
  }

  .library-search-section {
    padding: 1rem;
  }
}

/* ================= PROFILE PAGE ================= */

.profile-hero {
  background: linear-gradient(
    135deg,
    var(--quran-green),
    var(--quran-green-dark)
  );
  color: #fff;
  border-radius: 1.75rem;
  padding: 2.125rem;
  margin-bottom: 1.75rem;
  position: relative;
  overflow: hidden;
}

.profile-hero::after {
  content: "";
  position: absolute;
  width: 16.25rem;
  height: 16.25rem;
  right: -5rem;
  top: -5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.profile-user-wrap {
  display: flex;
  align-items: center;
  gap: 1.375rem;
  position: relative;
  z-index: 1;
}

.profile-avatar {
  width: 6.5rem;
  height: 6.5rem;
  border-radius: 1.875rem;
  background: rgba(255, 255, 255, 0.16);
  border: 0.0625rem solid rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-avatar span {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
}

.profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  padding: 0.5rem 0.875rem;
  border-radius: 999rem;
  font-size: 0.8125rem;
  font-weight: 700;
  margin-bottom: 0.875rem;
}

.profile-hero h1 {
  font-size: 2.25rem;
  line-height: 1.2em;
  font-weight: 800;
  margin: 0 0 0.5rem;
}

.profile-hero p {
  font-size: 0.9375rem;
  line-height: 1.7em;
  opacity: 0.92;
  max-width: 42.5rem;
  margin: 0;
}

.profile-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin-top: 0.875rem;
}

.profile-hero-meta span {
  font-size: 0.8125rem;
  font-weight: 700;
  opacity: 0.95;
}

.profile-level-card {
  background: #fff;
  color: #111;
  border-radius: 1.375rem;
  padding: 1.5rem;
  position: relative;
  z-index: 1;
  box-shadow: 0 1.125rem 2.5rem rgba(0, 0, 0, 0.12);
}

.profile-level-card span {
  color: var(--quran-muted);
  font-size: 0.8125rem;
  font-weight: 700;
}

.profile-level-card h3 {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--quran-green);
  margin: 0.4375rem 0 0.25rem;
}

.profile-level-card p {
  color: #555;
  margin: 0 0 0.875rem;
  font-size: 0.875rem;
}

.profile-level-card small {
  color: var(--quran-muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.profile-level-progress {
  height: 0.5625rem;
  background: #edf0f2;
  border-radius: 999rem;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.profile-level-progress-fill {
  width: 68%;
  height: 100%;
  background: var(--quran-green);
  border-radius: 999rem;
}

.profile-stats-section {
  margin-bottom: 1.75rem;
}

.profile-stat-card {
  background: #fff;
  border: 0.0625rem solid var(--quran-border);
  border-radius: 1.25rem;
  padding: 1.375rem;
  height: 100%;
  transition: 0.22s ease;
}

.profile-stat-card:hover {
  box-shadow: var(--quran-shadow);
  transform: translateY(-0.1875rem);
}

.profile-stat-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.875rem;
  background: var(--quran-green-soft);
  color: var(--quran-green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.875rem;
  font-size: 1.125rem;
}

.profile-stat-card h4 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #111;
  margin: 0 0 0.25rem;
}

.profile-stat-card p {
  color: var(--quran-muted);
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
}

.profile-card {
  background: #fff;
  border: 0.0625rem solid var(--quran-border);
  border-radius: 1.375rem;
  padding: 1.5rem;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.025);
}

.profile-section-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.375rem;
}

.profile-section-header h2 {
  font-size: 1.3125rem;
  font-weight: 800;
  margin: 0 0 0.3125rem;
  color: #111;
}

.profile-section-header p {
  margin: 0;
  color: var(--quran-muted);
  font-size: 0.875rem;
  line-height: 1.5em;
}

.profile-primary-btn,
.profile-outline-btn {
  border-radius: 999rem;
  padding: 0.625rem 1rem;
  font-size: 0.8125rem;
  font-weight: 800;
  border: 0.0625rem solid var(--quran-green);
  transition: 0.2s ease;
  white-space: nowrap;
}

.profile-primary-btn {
  background: var(--quran-green);
  color: #fff;
}

.profile-primary-btn:hover {
  background: var(--quran-green-dark);
}

.profile-outline-btn {
  background: #fff;
  color: var(--quran-green);
}

.profile-outline-btn:hover {
  background: var(--quran-green-soft);
}

.profile-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.125rem;
}

.profile-info-item {
  border: 0.0625rem solid var(--quran-border);
  border-radius: 1.125rem;
  padding: 1rem;
  background: #fcfcfc;
}

.profile-info-item span {
  display: block;
  color: var(--quran-muted);
  font-size: 0.8125rem;
  font-weight: 700;
  margin-bottom: 0.375rem;
}

.profile-info-item strong {
  color: #111;
  font-size: 0.9375rem;
  font-weight: 800;
}

.profile-progress-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.profile-progress-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.profile-progress-top h4 {
  font-size: 1rem;
  font-weight: 800;
  color: #111;
  margin: 0 0 0.3125rem;
}

.profile-progress-top p {
  color: var(--quran-muted);
  margin: 0;
  font-size: 0.875rem;
}

.profile-progress-top strong {
  color: var(--quran-green);
  font-size: 1.125rem;
}

.profile-progress-bar {
  height: 0.625rem;
  background: #edf0f2;
  border-radius: 999rem;
  overflow: hidden;
}

.profile-progress-fill {
  height: 100%;
  border-radius: 999rem;
  background: var(--quran-green);
}

.profile-progress-fill.reading {
  width: 72%;
}

.profile-progress-fill.memorization {
  width: 48%;
}

.profile-progress-fill.revision {
  width: 83%;
}

.profile-activity-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profile-activity-item {
  border: 0.0625rem solid var(--quran-border);
  border-radius: 1.125rem;
  padding: 1.125rem;
  display: flex;
  gap: 1rem;
  transition: 0.22s ease;
}

.profile-activity-item:hover {
  border-color: rgba(79, 143, 82, 0.45);
  background: #fcfffc;
}

.profile-activity-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.875rem;
  background: var(--quran-green-soft);
  color: var(--quran-green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-activity-item h4 {
  font-size: 1rem;
  font-weight: 800;
  margin: 0 0 0.3125rem;
  color: #111;
}

.profile-activity-item p {
  margin: 0 0 0.375rem;
  color: var(--quran-muted);
  font-size: 0.875rem;
}

.profile-activity-item span {
  color: #9aa0a6;
  font-size: 0.75rem;
  font-weight: 700;
}

.profile-teacher-card {
  text-align: center;
}

.profile-teacher-avatar {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 1.75rem;
  background: var(--quran-green-soft);
  color: var(--quran-green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.profile-teacher-avatar span {
  font-size: 1.75rem;
  font-weight: 800;
}

.profile-teacher-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #111;
  margin: 0 0 0.375rem;
}

.profile-teacher-card p {
  color: var(--quran-muted);
  font-size: 0.875rem;
  margin: 0 0 0.875rem;
}

.profile-teacher-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-bottom: 1.125rem;
}

.profile-teacher-meta span {
  background: #f8f9fa;
  color: #555;
  padding: 0.4375rem 0.625rem;
  border-radius: 999rem;
  font-size: 0.75rem;
  font-weight: 800;
}

.profile-plan-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.profile-plan-item {
  display: flex;
  justify-content: space-between;
  gap: 0.875rem;
  padding-bottom: 0.875rem;
  border-bottom: 0.0625rem solid var(--quran-border);
}

.profile-plan-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.profile-plan-item span {
  color: var(--quran-muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.profile-plan-item strong {
  font-size: 0.8125rem;
  color: #111;
  text-align: right;
}

.profile-achievement-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.profile-achievement-item {
  display: flex;
  gap: 0.875rem;
  align-items: center;
}

.profile-achievement-icon {
  width: 2.625rem;
  height: 2.625rem;
  border-radius: 0.875rem;
  background: var(--quran-green-soft);
  color: var(--quran-green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-achievement-item h4 {
  font-size: 0.9375rem;
  font-weight: 800;
  margin: 0 0 0.25rem;
  color: #111;
}

.profile-achievement-item p {
  margin: 0;
  color: var(--quran-muted);
  font-size: 0.8125rem;
}

.profile-settings-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.profile-settings-item {
  width: 100%;
  border: 0.0625rem solid var(--quran-border);
  background: #fff;
  border-radius: 1rem;
  padding: 0.875rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #111;
  font-size: 0.875rem;
  font-weight: 800;
  transition: 0.22s ease;
}

.profile-settings-item span {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.profile-settings-item span i {
  color: var(--quran-green);
}

.profile-settings-item:hover {
  background: var(--quran-green-soft);
  border-color: rgba(79, 143, 82, 0.45);
}

/* ================= PROFILE RESPONSIVE ================= */

@media (max-width: 61.9375rem) {
  .profile-user-wrap {
    align-items: flex-start;
  }
}

@media (max-width: 47.9375rem) {
  .profile-hero {
    padding: 1.5rem;
    border-radius: 1.375rem;
  }

  .profile-user-wrap {
    flex-direction: column;
  }

  .profile-avatar {
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 1.5rem;
  }

  .profile-avatar span {
    font-size: 1.75rem;
  }

  .profile-hero h1 {
    font-size: 1.75rem;
  }

  .profile-section-header {
    flex-direction: column;
  }

  .profile-primary-btn,
  .profile-outline-btn {
    width: 100%;
  }

  .profile-info-grid {
    grid-template-columns: 1fr;
  }

  .profile-activity-item {
    flex-direction: column;
  }

  .profile-progress-top {
    flex-direction: column;
    gap: 0.375rem;
  }
}

/* ==========================================================
   AYAH / RUKU SYMBOL FIX
   Put this at the very end.
   ========================================================== */

.ayah-arabic-text,
.ayah-arabic {
  font-family:
    "KFGQPC Hafs", "Amiri Quran", "Quran Symbols Backup", "Scheherazade New",
    "Noto Naskh Arabic", serif !important;
  direction: rtl;
  unicode-bidi: isolate;
  text-align: right;
  font-feature-settings:
    "liga" 1,
    "calt" 1,
    "mark" 1,
    "mkmk" 1;
}

.quran-line {
  font-family: inherit !important;
}

.ayah-end-mark {
  width: 2.15rem;
  height: 2.15rem;
  border: 0.09rem solid #111827;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family:
    "Amiri Quran", "Scheherazade New", "Noto Naskh Arabic", serif !important;
  font-size: 1.05rem;
  line-height: 1;
  margin-inline-start: 0.45rem;
  vertical-align: middle;
  color: #111827;
  background: transparent;
}

.ruku-symbol,
.quran-symbol,
.ayah-symbol,
.waqf-symbol {
  font-family:
    "Amiri Quran", "Scheherazade New", "Noto Naskh Arabic", serif !important;
}
/* ================= TAJWEED HIGHLIGHT COLORS ================= */

.tj-ghunnah {
  color: #f28c28 !important;
  font-weight: 600;
}

.tj-qalqalah {
  color: #d71920 !important;
  font-weight: 600;
}

.tj-ikhfa-noon {
  color: #29b6f6 !important;
  font-weight: 600;
}

.tj-idgham-noon {
  color: #26a69a !important;
  font-weight: 600;
}

.tj-iqlab {
  color: #7e57c2 !important;
  font-weight: 600;
}

.tj-idgham-meem {
  color: #7a963a !important;
  font-weight: 600;
}

.tj-ikhfa-meem {
  color: #e843a6 !important;
  font-weight: 600;
}

/* Tajweed legend */
.tajweed-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 1rem;
  padding: 1rem;
  background: #fff;
  border: 0.0625rem solid var(--quran-border);
  border-radius: 1rem;
}

.tajweed-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #555;
  font-weight: 600;
}

.tajweed-dot {
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 50%;
  display: inline-block;
}

.tajweed-dot.iqlab {
  background: #7e57c2;
}

.tajweed-dot.idgham-noon {
  background: #26a69a;
}

.tajweed-dot.ikhfa-noon {
  background: #29b6f6;
}

.tajweed-dot.idgham-meem {
  background: #7a963a;
}

.tajweed-dot.ikhfa-meem {
  background: #e843a6;
}

.tajweed-dot.qalqalah {
  background: #d71920;
}

.tajweed-dot.ghunnah {
  background: #f28c28;
}

/* Ayah hover effect */
.ayah-card:hover {
  background: #eef8ef !important;
  border-color: #4f8f52 !important;
}

.ayah-card:hover .ayah-arabic,
.ayah-card:hover .ayah-arabic-text {
  color: #123f18;
}

/* ================= WORD HOVER HIGHLIGHT ================= */

.quran-word-hover {
  display: inline-block;
  padding: 0 0.12em;
  border-radius: 0.18em;
  transition: 0.18s ease;
  cursor: pointer;
}

.quran-word-hover:hover {
  background: #4f8f52 !important;
  color: #ffffff !important;
}

/* Make tajweed-colored words also become white on hover */
.quran-word-hover:hover *,
.tj-iqlab:hover,
.tj-idgham-noon:hover,
.tj-ikhfa-noon:hover,
.tj-idgham-meem:hover,
.tj-ikhfa-meem:hover,
.tj-qalqalah:hover,
.tj-ghunnah:hover {
  color: #ffffff !important;
}

/* Keep ayah ending mark clean */
.ayah-end-mark,
.ayah-end-mark:hover {
  background: transparent !important;
  color: inherit !important;
  cursor: default;
}
/* API Tajweed tag base */
.ayah-arabic-text tajweed {
  font-family: inherit !important;
  font-weight: 600;
}

/* Iqlab */
.ayah-arabic-text tajweed.iqlab {
  color: #7e57c2 !important;
}

/* Idgham Noon / Tanween */
.ayah-arabic-text tajweed.idgham_ghunnah,
.ayah-arabic-text tajweed.idgham_without_ghunnah,
.ayah-arabic-text tajweed.idgham_mutajanisayn,
.ayah-arabic-text tajweed.idgham_mutaqaribayn {
  color: #26a69a !important;
}

/* Ikhfa Noon / Tanween */
.ayah-arabic-text tajweed.ikhfa,
.ayah-arabic-text tajweed.ikhfa_haqiqi {
  color: #29b6f6 !important;
}

/* Idgham Meem */
.ayah-arabic-text tajweed.idgham_shafawi {
  color: #7a963a !important;
}

/* Ikhfa Meem */
.ayah-arabic-text tajweed.ikhfa_shafawi {
  color: #e843a6 !important;
}

/* Qalqalah */
.ayah-arabic-text tajweed.qalqalah {
  color: #d71920 !important;
}

/* Ghunnah */
.ayah-arabic-text tajweed.ghunnah {
  color: #f28c28 !important;
}

/* Extra API classes: keep visible but soft */
.ayah-arabic-text tajweed.ham_wasl,
.ayah-arabic-text tajweed.laam_shamsiyah,
.ayah-arabic-text tajweed.madda_normal,
.ayah-arabic-text tajweed.madda_permissible,
.ayah-arabic-text tajweed.madda_necessary,
.ayah-arabic-text tajweed.madda_obligatory {
  color: inherit;
}

/* Word hover */
.quran-word-hover,
.ayah-arabic-text tajweed {
  display: inline-block;
  padding: 0 0.12em;
  border-radius: 0.18em;
  transition: 0.18s ease;
}

.quran-word-hover:hover,
.ayah-arabic-text tajweed:hover {
  background: #4f8f52 !important;
  color: #ffffff !important;
}
