.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--regal-blue);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-logo {
  padding: 28px 24px 24px;
  border-bottom: 1px solid rgba(133, 204, 255, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.sidebar-logo-arabic {
  font-family: var(--font-arabic);
  font-size: 2rem;
  color: var(--pastel-blue);
  line-height: 1;
  font-weight: 700;
}

.sidebar-logo-latin {
  font-family: var(--font-ui);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  padding: 20px 12px;
  overflow-y: auto;
}

.sidebar-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(133, 204, 255, 0.6);
  padding: 0 12px;
  margin-bottom: 6px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: rgba(255, 255, 255, 0.75);
  transition: all 0.15s ease;
  margin-bottom: 2px;
}

.sidebar-link:hover {
  background: rgba(133, 204, 255, 0.12);
  color: var(--white);
}

.sidebar-link--active {
  background: rgba(133, 204, 255, 0.2);
  color: var(--white);
  box-shadow: inset 3px 0 0 var(--pastel-blue);
}

.sidebar-link-icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-link-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.sidebar-link-latin {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.2;
}

.sidebar-link-arabic {
  font-family: var(--font-arabic);
  font-size: 0.8rem;
  color: rgba(133, 204, 255, 0.7);
  line-height: 1.4;
  direction: rtl;
}

.sidebar-footer {
  padding: 16px 24px 24px;
  border-top: 1px solid rgba(133, 204, 255, 0.2);
  flex-shrink: 0;
}

.sidebar-footer-text {
  font-family: var(--font-arabic);
  font-size: 0.85rem;
  color: rgba(133, 204, 255, 0.8);
  direction: rtl;
  text-align: right;
  line-height: 1.8;
  margin-bottom: 2px;
}

.sidebar-footer-sub {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.3);
  font-style: italic;
}

/* Below 768px, BottomNav.jsx takes over navigation entirely —
   the sidebar is hidden rather than converted into its own bar,
   so there's only one nav bar fixed to the bottom on mobile. */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
}

.sidebar-wa-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--pastel-blue);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--regal-blue);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
  transition: background 0.2s ease;
}

.sidebar-wa-btn:hover {
  background: #6bbdf5;
}
.sidebar-user {
  margin-bottom: 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
}

.sidebar-user-name {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-signout {
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  color: rgba(255,255,255,0.6);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: all 0.15s;
  width: 100%;
}

.sidebar-signout:hover {
  background: rgba(255,255,255,0.1);
  color: #ffffff;
  border-color: rgba(255,255,255,0.4);
}
.sidebar-wa-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
}


.sidebar-wa-icon svg {
  width: 100%;
  height: 100%;
}/* ============================================
   Toolbar
   ============================================ */

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.toolbar-btn {
  padding: 5px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
}

.toolbar-btn:hover:not(:disabled) {
  background: var(--pastel-blue);
  border-color: var(--pastel-blue);
  color: var(--regal-blue);
}

.toolbar-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.toolbar-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0 4px;
  min-width: 16px;
  text-align: center;
}

.toolbar-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 4px;
}

/* Dark mode toggle */
.toolbar-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.toolbar-toggle:hover {
  background: var(--pastel-blue);
  border-color: var(--pastel-blue);
}

.toolbar-toggle--active {
  background: var(--regal-blue);
  border-color: var(--regal-blue);
  color: white;
}

.toolbar-toggle--active:hover {
  background: var(--regal-blue);
  opacity: 0.9;
}

.toolbar-toggle-icon {
  font-size: 0.9rem;
}

.toolbar-toggle-label {
  font-size: 0.78rem;
}

/* Mobile */
@media (max-width: 768px) {
  .toolbar {
    padding: 6px 12px;
    gap: 6px;
  }

  .toolbar-toggle-label {
    display: none;
  }
}/* ── Bottom bar itself ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: #ffffff;
  border-top: 1px solid #e0e8f0;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  box-shadow: 0 -2px 12px rgba(9, 69, 112, 0.06);
}

.bottom-nav-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
  padding: 6px 2px;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  color: #7d93a6;
  font-family: var(--font-ui, inherit);
}

.bottom-nav-card--active {
  color: #094570;
}

.bottom-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}

.bottom-nav-icon svg {
  width: 100%;
  height: 100%;
}

.bottom-nav-label {
  font-size: 0.62rem;
  font-weight: 600;
}

/* Only show this bar on small/mobile screens -- desktop uses the Sidebar */
@media (min-width: 900px) {
  .bottom-nav {
    display: none;
  }
}

/* Keep page content from hiding behind the fixed bar on mobile */
@media (max-width: 899px) {
  .page-content {
    padding-bottom: 76px;
  }
}

/* ── Dark mode for the bar ── */
[data-theme="dark"] .bottom-nav {
  background: #0f1f2e;
  border-top-color: #1e3448;
}

[data-theme="dark"] .bottom-nav-card {
  color: #5c7a90;
}

[data-theme="dark"] .bottom-nav-card--active {
  color: #85CCFF;
}

/* ── More sheet ── */
.bottom-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 300;
  display: flex;
  align-items: flex-end;
}

.bottom-nav-sheet {
  width: 100%;
  background: #ffffff;
  border-radius: 20px 20px 0 0;
  padding: 12px 20px 28px;
  animation: sheetUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes sheetUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.bottom-nav-sheet-handle {
  width: 40px;
  height: 4px;
  background: #d0d8e2;
  border-radius: 100px;
  margin: 0 auto 16px;
}

.bottom-nav-sheet-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #4a6080;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 16px;
}

.bottom-nav-sheet-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.bottom-nav-sheet-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.bottom-nav-sheet-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f4f8;
  border-radius: 14px;
  color: #094570;
}

.bottom-nav-sheet-icon svg {
  width: 22px;
  height: 22px;
}

.bottom-nav-sheet-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: #24374a;
  text-align: center;
}

[data-theme="dark"] .bottom-nav-sheet {
  background: #0f1f2e;
}

[data-theme="dark"] .bottom-nav-sheet-handle {
  background: #2c3f54;
}

[data-theme="dark"] .bottom-nav-sheet-title {
  color: #7d93a6;
}

[data-theme="dark"] .bottom-nav-sheet-icon {
  background: #0a1825;
  color: #85CCFF;
}

[data-theme="dark"] .bottom-nav-sheet-label {
  color: #c8e0f5;
}/* ============================================
   Splash Screen
   ============================================ */

.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--regal-blue);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, transform 0.6s ease;
  opacity: 1;
}

.splash--exit {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
}

/* ---- Content block ---- */
.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateY(24px) scale(0.95);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.splash-content--visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ---- Decorative ring ---- */
.splash-ring {
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 1px solid rgba(133, 204, 255, 0.15);
  animation: pulse-ring 2.5s ease-in-out infinite;
}

@keyframes pulse-ring {
  0%   { transform: scale(0.9); opacity: 0.4; }
  50%  { transform: scale(1.05); opacity: 0.15; }
  100% { transform: scale(0.9); opacity: 0.4; }
}

/* ---- Arabic word ---- */
.splash-arabic {
  font-family: var(--font-arabic);
  font-size: 6rem;
  color: var(--pastel-blue);
  line-height: 1.2;
  text-shadow: 0 0 60px rgba(133, 204, 255, 0.4);
  position: relative;
  z-index: 1;
}

/* ---- Divider line ---- */
.splash-line {
  width: 0;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--pastel-blue), transparent);
  transition: width 0.8s ease 0.3s;
  border-radius: 100px;
}

.splash-line--drawn {
  width: 180px;
}

/* ---- Latin name ---- */
.splash-latin {
  font-family: var(--font-ui);
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

/* ---- Tagline ---- */
.splash-tagline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.6s ease 0.5s, transform 0.6s ease 0.5s;
  font-family: var(--font-arabic);
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 2;
}

.splash-tagline--visible {
  opacity: 1;
  transform: translateY(0);
}

.splash-tagline-sub {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.08em;
  font-style: italic;
}

/* ---- Bottom bismillah ---- */
.splash-bottom {
  position: absolute;
  bottom: 40px;
  font-family: var(--font-arabic);
  font-size: 0.9rem;
  color: rgba(133, 204, 255, 0.4);
  opacity: 0;
  transition: opacity 0.8s ease 0.6s;
  letter-spacing: 0.02em;
}

.splash-bottom--visible {
  opacity: 1;
}

/* Mobile */
@media (max-width: 768px) {
  .splash-arabic {
    font-size: 4.5rem;
  }

  .splash-ring {
    width: 220px;
    height: 220px;
  }
}.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #062f4a, #094570);
  padding: 24px;
}

.auth-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 40px 36px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  text-align: center;
}

.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 20px;
}

.auth-logo-arabic {
  font-family: var(--font-arabic, 'Amiri', serif);
  font-size: 2.4rem;
  color: #094570;
  line-height: 1;
}

.auth-logo-latin {
  font-family: var(--font-ui, sans-serif);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #094570;
}

.auth-tagline {
  font-size: 0.9rem;
  color: #6a8090;
  margin-bottom: 24px;
  line-height: 1.5;
}

.auth-tabs {
  display: flex;
  gap: 8px;
  background: #f0f4f8;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  padding: 10px 0;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #6a8090;
  cursor: pointer;
  transition: all 0.15s ease;
}

.auth-tab--active {
  background: #094570;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(9, 69, 112, 0.25);
}

.auth-field {
  text-align: left;
  margin-bottom: 16px;
}

.auth-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #4a6080;
  margin-bottom: 6px;
}

.auth-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #c8d8e8;
  border-radius: 8px;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.auth-input:focus {
  outline: none;
  border-color: #85CCFF;
  box-shadow: 0 0 0 3px rgba(133, 204, 255, 0.2);
}

/* Wrapper for password fields so the eye-toggle button can sit
   inside the input on the right without a separate layout row. */
.auth-input-wrap {
  position: relative;
}

.auth-input-wrap .auth-input {
  padding-right: 42px;
}

.auth-input--error {
  border-color: #c0392b;
}

.auth-input--error:focus {
  border-color: #c0392b;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.15);
}

.auth-eye-btn {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a9ab0;
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.15s ease;
}

.auth-eye-btn:hover {
  color: #094570;
}

.auth-eye-btn:focus {
  outline: none;
}

.auth-field-hint {
  margin-top: 6px;
  font-size: 0.78rem;
}

.auth-field-hint--error {
  color: #a02b1f;
}

.auth-error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(192, 57, 43, 0.08);
  border: 1px solid rgba(192, 57, 43, 0.25);
  color: #a02b1f;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.85rem;
  text-align: left;
  margin-bottom: 14px;
}

.auth-info {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(46, 125, 50, 0.08);
  border: 1px solid rgba(46, 125, 50, 0.25);
  color: #1e6b22;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.85rem;
  text-align: left;
  margin-bottom: 14px;
}

.auth-submit-btn {
  width: 100%;
  padding: 13px 0;
  background: #094570;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s ease;
  margin-bottom: 14px;
}

.auth-submit-btn:hover:not(:disabled) {
  background: #062f4a;
}

.auth-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* FIX: JSX uses class "auth-forgot-link", this file previously
   defined "auth-forgot" — the mismatch meant this button never
   matched any rule at all and fell back to plain default browser
   button styling, rendering bunched against the submit button above
   with no spacing of its own. */
.auth-forgot-link {
  display: block;
  width: 100%;
  background: none;
  border: none;
  padding: 8px 0 20px;
  color: #4a6080;
  font-size: 0.85rem;
  cursor: pointer;
  text-align: center;
}

.auth-forgot-link:hover {
  color: #094570;
  text-decoration: underline;
}

.auth-quote {
  border-top: 1px solid #e8f0f8;
  padding-top: 18px;
  margin-top: 4px;
}

.auth-quote-text {
  font-size: 0.82rem;
  font-style: italic;
  color: #4a6080;
  line-height: 1.6;
  margin-bottom: 6px;
}

.auth-quote-source {
  font-size: 0.75rem;
  color: #8a9ab0;
  font-weight: 600;
}/* ============================================
   Level Select Page
   ============================================ */

.level-select-page {
  min-height: 100vh;
  background: linear-gradient(160deg, #062f4a, #094570, #0d6fa8);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 40px 20px;
}

.level-select-bg {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.level-select-bg-arabic {
  font-family: var(--font-arabic);
  font-size: 50vw;
  color: rgba(255,255,255,0.03);
  white-space: nowrap;
  user-select: none;
}

.level-select-inner {
  max-width: 960px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.level-select-header {
  text-align: center;
  margin-bottom: 40px;
}

.level-select-logo {
  font-size: 3rem;
  color: #ffffff;
  margin-bottom: 16px;
  text-shadow: 0 0 40px rgba(133,204,255,0.6);
}

.level-select-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.level-select-subtitle {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto;
}

.level-select-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.level-card {
  background: rgba(255,255,255,0.95);
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 18px;
  padding: 24px;
  text-align: left;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-family: var(--font-ui);
  position: relative;
}

.level-card:hover:not(:disabled) {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.25);
  border-color: var(--level-color);
}

.level-card:disabled {
  cursor: not-allowed;
}

.level-card--selected {
  border-color: var(--level-color) !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 4px var(--level-bg), 0 16px 40px rgba(0,0,0,0.2);
  transform: translateY(-4px);
}

.level-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.level-card-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--level-color);
}

.level-card-icon svg {
  width: 100%;
  height: 100%;
}

.level-card-titles { flex: 1; }

.level-card-label {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--level-color);
  margin-bottom: 2px;
}

.level-card-arabic {
  font-size: 1rem;
  color: #6a8090;
}

.level-card-check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #c8d8e8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: #ffffff;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.level-card-check--active {
  background: var(--level-color);
  border-color: var(--level-color);
}

.level-card-desc {
  font-size: 0.85rem;
  color: #4a6080;
  line-height: 1.7;
}

.level-card-includes {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.level-card-includes-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #8a9ab0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.level-card-include-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.8rem;
  color: #0d1b2a;
  line-height: 1.5;
}

.level-card-include-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}

.level-card-req {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.level-card-req-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #8a9ab0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.level-card-req-text {
  font-size: 0.78rem;
  color: #0d1b2a;
  font-weight: 500;
}

.level-card-cta {
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  padding-top: 4px;
}

.level-select-error {
  text-align: center;
  padding: 12px;
  background: rgba(231,76,60,0.15);
  border: 1px solid rgba(231,76,60,0.3);
  border-radius: 10px;
  color: #ff6b6b;
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.level-select-note {
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  font-style: italic;
  line-height: 1.7;
  padding-bottom: 40px;
}

.level-select-note span {
  font-style: normal;
  font-weight: 600;
  color: rgba(255,255,255,0.4);
}

@media (max-width: 768px) {
  .level-select-cards {
    grid-template-columns: 1fr;
  }

  .level-select-page {
    padding: 24px 16px;
  }
}.quick-actions {
  margin-bottom: 40px;
}

.quick-actions-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--regal-blue, #094570);
  margin-bottom: 16px;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.quick-action-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 16px;
  border-radius: 14px;
  background: #0f2c40;
  border: 1px solid rgba(133, 204, 255, 0.12);
  text-decoration: none;
  transition: all 0.18s ease;
}

.quick-action-card:hover {
  transform: translateY(-2px);
  border-color: rgba(133, 204, 255, 0.3);
}

.quick-action-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.quick-action-icon svg {
  width: 18px;
  height: 18px;
}

.quick-action-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f2e8d3;
}

.quick-action-desc {
  font-size: 0.78rem;
  color: #7d93a6;
}

@media (max-width: 480px) {
  .quick-actions-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .quick-action-card {
    padding: 14px;
  }
}.home-page {
  padding-top: 40px;
}

.home-hero {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-bottom: 24px;
  padding: 40px;
  background: linear-gradient(135deg, var(--regal-blue) 0%, #1a6fa3 100%);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
}

.home-hero::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(133, 204, 255, 0.1);
  pointer-events: none;
}

.home-hero-mark {
  font-family: var(--font-arabic);
  font-size: 5rem;
  color: var(--pastel-blue);
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.9;
  text-shadow: 0 4px 24px rgba(133, 204, 255, 0.4);
}

.home-hero-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.home-hero-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.7;
  max-width: 480px;
}

.home-today-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.home-today-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: #eef6fc;
  border: 1px solid #d0e8f8;
  border-left: 3px solid #1a6fa8;
  border-radius: 12px;
  text-decoration: none;
}

.home-today-item--prayer {
  border-left-color: #c8952f;
  cursor: pointer;
}

.home-today-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5c7186;
}

.home-today-value {
  font-size: 0.92rem;
  font-weight: 600;
  color: #0d1b2a;
}

.home-today-countdown {
  font-size: 0.78rem;
  font-weight: 400;
  color: #a97a1f;
}

[data-theme="dark"] .home-today-item {
  background: #0f2c40;
  border-color: rgba(255, 255, 255, 0.06);
  border-left-color: #1a6fa8;
}

[data-theme="dark"] .home-today-item--prayer {
  border-left-color: #c8952f;
}

[data-theme="dark"] .home-today-label {
  color: #7d93a6;
}

[data-theme="dark"] .home-today-value {
  color: #f2e8d3;
}

[data-theme="dark"] .home-today-countdown {
  color: #c8952f;
}

.home-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.home-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 14px 8px;
  background: #eef6fc;
  border: 1px solid #d0e8f8;
  border-radius: 12px;
  text-decoration: none;
  text-align: center;
  transition: transform 0.15s ease;
}

.home-stat-card:hover {
  transform: translateY(-2px);
}

.home-stat-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0d1b2a;
}

.home-stat-label {
  font-size: 0.68rem;
  color: #5c7186;
}

[data-theme="dark"] .home-stat-card {
  background: #0f2c40;
  border-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .home-stat-value {
  color: #f2e8d3;
}

[data-theme="dark"] .home-stat-label {
  color: #7d93a6;
}

.home-divider {
  text-align: center;
  margin: 0 0 36px;
}

.home-divider-arabic {
  font-family: var(--font-arabic);
  font-size: 1.4rem;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .home-hero {
    flex-direction: column;
    gap: 20px;
    padding: 28px 24px;
  }

  .home-hero-mark { font-size: 3.5rem; }
  .home-hero-title { font-size: 1.7rem; }

  .home-today-strip {
    grid-template-columns: 1fr;
  }
}/* ============================================
   Discipline Page
   ============================================ */

.discipline-page {
  padding-top: 32px;
}

.discipline-back {
  display: inline-block;
  color: #4a6080;
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 20px;
  transition: color 0.15s;
}

.discipline-back:hover {
  color: #094570;
}

.discipline-header {
  margin-bottom: 28px;
}

.discipline-header-inner {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.discipline-header-icon {
  font-size: 3rem;
  margin-top: 4px;
  flex-shrink: 0;
}

.discipline-header-arabic {
  color: #4a6080;
  margin-bottom: 4px;
}

/* ============================================
   Level Tabs
   ============================================ */

.disc-level-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.disc-level-tab {
  flex: 1;
  min-width: 100px;
  padding: 10px 12px;
  border: 2px solid #c8d8e8;
  border-radius: 10px;
  background: #f5f8fb;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  color: #6a8090;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.disc-level-tab:hover:not(.disc-level-tab--locked) {
  border-color: #094570;
  color: #094570;
  background: #eef5fb;
}

.disc-level-tab--active {
  background: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(9, 69, 112, 0.10);
}

.disc-level-tab--locked {
  opacity: 0.45;
  cursor: not-allowed;
}

.disc-level-tab-arabic {
  font-size: 0.72rem;
  font-family: var(--font-arabic, 'Scheherazade New', serif);
  color: inherit;
}

/* ============================================
   Search
   ============================================ */

.discipline-search {
  position: relative;
  margin-bottom: 10px;
}

.discipline-search-input {
  width: 100%;
  padding: 12px 44px 12px 16px;
  border: 1.5px solid #c8d8e8;
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  background: #ffffff;
  color: #0d1b2a;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.discipline-search-input:focus {
  outline: none;
  border-color: #85CCFF;
  box-shadow: 0 0 0 3px rgba(133, 204, 255, 0.2);
}

.discipline-search-input::placeholder {
  color: #8a9ab0;
}

.discipline-search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #8a9ab0;
  font-size: 0.875rem;
  padding: 4px;
  transition: color 0.15s;
}

.discipline-search-clear:hover {
  color: #094570;
}

.discipline-count {
  font-size: 0.8rem;
  color: #8a9ab0;
  margin-bottom: 16px;
}

/* ============================================
   Q&A List
   ============================================ */

.qa-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
}

.qa-item {
  overflow: hidden;
  border: 1.5px solid #c8d8e8;
  border-radius: 10px;
  background: #ffffff;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.qa-item:hover {
  border-color: #a8c8e8;
  box-shadow: 0 2px 8px rgba(9, 69, 112, 0.07);
}

.qa-item--open {
  border-color: #85CCFF;
  box-shadow: 0 4px 16px rgba(9, 69, 112, 0.12);
}

.qa-question-btn {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-ui);
  color: #0d1b2a;
  transition: background 0.15s;
}

.qa-question-btn:hover {
  background: #f0f7ff;
}

.qa-num {
  font-size: 0.72rem;
  font-weight: 700;
  color: #85CCFF;
  background: #094570;
  padding: 3px 7px;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 3px;
  letter-spacing: 0.02em;
  min-width: 24px;
  text-align: center;
}

.qa-question-text {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 600;
  color: #094570;
  line-height: 1.55;
}

.qa-chevron {
  font-size: 0.65rem;
  color: #8a9ab0;
  flex-shrink: 0;
  margin-top: 5px;
  transition: transform 0.2s ease;
}

.qa-item--open .qa-chevron {
  color: #094570;
}

/* ============================================
   Answer Panel (legacy accordion — kept for
   reference in case any old link/bookmark
   still points at an in-page anchor)
   ============================================ */

.qa-answer {
  border-top: 1.5px solid #d8e8f5;
  padding: 20px 24px 22px 54px;
  background: #f5f9fd;
  animation: slideDown 0.18s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.qa-answer-body p {
  font-size: 0.925rem;
  color: #0d1b2a;
  line-height: 1.85;
  margin-bottom: 14px;
  white-space: pre-line;
}

.qa-source {
  font-size: 0.8rem;
  margin-top: 4px;
  margin-bottom: 12px;
  color: #4a6080;
  font-style: italic;
  line-height: 1.5;
  padding: 8px 12px;
  background: #eef4fb;
  border-left: 3px solid #85CCFF;
  border-radius: 0 6px 6px 0;
}

.qa-source-label {
  font-weight: 700;
  font-style: normal;
  color: #094570;
  margin-right: 6px;
}

.qa-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.qa-tag {
  text-transform: lowercase;
  background: #e8f4ff;
  color: #094570;
  border: 1px solid #c0ddf5;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* ============================================
   Empty / Locked States
   ============================================ */

.discipline-empty {
  text-align: center;
  padding: 56px 24px;
  color: #4a6080;
}

.discipline-empty p {
  font-size: 0.95rem;
  line-height: 1.6;
}

.disc-locked-msg {
  text-align: center;
  padding: 56px 24px;
  color: #6a8090;
}

.disc-locked-icon {
  font-size: 2.8rem;
  margin-bottom: 14px;
}

.disc-locked-msg h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0d1b2a;
  margin-bottom: 10px;
}

.disc-locked-msg p {
  font-size: 0.875rem;
  line-height: 1.7;
  max-width: 360px;
  margin: 0 auto;
}

.disc-empty {
  text-align: center;
  padding: 56px 24px;
  color: #6a8090;
  font-size: 0.875rem;
}

/* ============================================
   Quiz Link
   ============================================ */

.discipline-quiz-link {
  padding: 28px 0 16px;
  text-align: center;
}

/* ============================================
   Dark mode
   ============================================ */

[data-theme="dark"] .qa-item {
  background: #0f1f2e;
  border-color: #1e3448;
}

[data-theme="dark"] .qa-item:hover {
  border-color: #2a4a68;
}

[data-theme="dark"] .qa-item--open {
  border-color: #85CCFF;
  box-shadow: 0 4px 16px rgba(133, 204, 255, 0.10);
}

[data-theme="dark"] .qa-question-btn:hover {
  background: #132030;
}

[data-theme="dark"] .qa-question-text {
  color: #c8e0f5;
}

[data-theme="dark"] .qa-answer {
  background: #0a1825;
  border-top-color: #1e3448;
}

[data-theme="dark"] .qa-answer-body p {
  color: #c8d8e8;
}

[data-theme="dark"] .qa-source {
  background: #0f2035;
  border-left-color: #85CCFF;
  color: #8aaac8;
}

[data-theme="dark"] .qa-source-label {
  color: #85CCFF;
}

[data-theme="dark"] .qa-tag {
  background: #0f2035;
  color: #85CCFF;
  border-color: #1e3a58;
}

[data-theme="dark"] .disc-level-tab {
  background: #0f1f2e;
  border-color: #1e3448;
  color: #6a8090;
}

[data-theme="dark"] .disc-level-tab:hover:not(.disc-level-tab--locked) {
  border-color: #85CCFF;
  color: #85CCFF;
  background: #0a1825;
}

[data-theme="dark"] .disc-level-tab--active {
  background: #0a1825;
  box-shadow: 0 2px 8px rgba(133, 204, 255, 0.10);
}

[data-theme="dark"] .discipline-search-input {
  background: #0f1f2e;
  border-color: #1e3448;
  color: #c8d8e8;
}

[data-theme="dark"] .discipline-search-input:focus {
  border-color: #85CCFF;
}

[data-theme="dark"] .discipline-search-input::placeholder {
  color: #3a5068;
}

[data-theme="dark"] .disc-locked-msg h3 {
  color: #c8e0f5;
}

/* ============================================
   Mobile
   ============================================ */

@media (max-width: 768px) {
  .discipline-header-inner {
    gap: 14px;
  }

  .discipline-header-icon {
    font-size: 2.2rem;
  }

  .qa-answer {
    padding-left: 20px;
  }

  .disc-level-tab {
    min-width: 80px;
    font-size: 0.78rem;
    padding: 8px 8px;
  }

  .qa-question-text {
    font-size: 0.88rem;
  }
}

/* ── Discipline.css additions ──────────────────────────────── */

.qa-bookmark-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid #85CCFF;
  background: transparent;
  color: #094570;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.qa-bookmark-btn:hover {
  background: #e8f4ff;
}

.qa-bookmark-btn--active {
  background: #094570;
  color: #ffffff;
  border-color: #094570;
}

.qa-bookmark-btn--active:hover {
  background: #062f4a;
}

.discipline-bookmark-count {
  color: #094570;
  font-weight: 600;
}

.icon-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
}

.icon-inline svg {
  width: 100%;
  height: 100%;
}

/* ============================================
   Q&A List — flat link rows (overview page)
   ============================================ */

.qa-item--link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  text-decoration: none;
  color: inherit;
}

.qa-item--link:hover {
  background: #f0f7ff;
}

.qa-item--link .qa-chevron {
  font-size: 0.9rem;
  color: #8a9ab0;
  margin-top: 0;
  transition: transform 0.15s ease;
}

.qa-item--link:hover .qa-chevron {
  transform: translateX(3px);
  color: #094570;
}

.qa-bookmark-btn--inline {
  margin-top: 0;
  padding: 6px 8px;
  flex-shrink: 0;
}

[data-theme="dark"] .qa-item--link:hover {
  background: #132030;
}

/* ============================================
   Knowledge Reader — dedicated question page
   ============================================ */

.reader-page {
  max-width: 720px;
}

.reader-article {
  background: #ffffff;
  border: 1.5px solid #c8d8e8;
  border-radius: 12px;
  padding: 32px 36px;
  margin-bottom: 20px;
}

.reader-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #4a6080;
  margin-bottom: 14px;
}

.reader-question {
  font-size: 1.4rem;
  font-weight: 700;
  color: #094570;
  line-height: 1.5;
  margin-bottom: 24px;
}

/* Reading-first measure: capped line length and generous line
   height so long-form evidence reads comfortably rather than
   feeling like UI chrome. Worth reusing on the blog's article
   template so the reading experience matches in both places. */
.reader-translation {
  max-width: 62ch;
}

.reader-answer p {
  font-size: 1.02rem;
  color: #0d1b2a;
  line-height: 1.9;
  margin-bottom: 20px;
  white-space: pre-line;
}

.reader-quiz-link {
  margin-top: 28px;
}

.reader-pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 4px 40px;
}

.reader-pager-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: #094570;
  text-decoration: none;
}

.reader-pager-link:hover {
  text-decoration: underline;
}

[data-theme="dark"] .reader-article {
  background: #0f1f2e;
  border-color: #1e3448;
}

[data-theme="dark"] .reader-question {
  color: #c8e0f5;
}

[data-theme="dark"] .reader-answer p {
  color: #c8d8e8;
}

[data-theme="dark"] .reader-pager-link {
  color: #85CCFF;
}

@media (max-width: 768px) {
  .reader-article {
    padding: 24px 20px;
  }

  .reader-question {
    font-size: 1.15rem;
  }
}.quiz-page {
  padding-top: 32px;
  max-width: 720px;
}

.quiz-select-card {
  padding: 32px;
}

.quiz-select-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--regal-blue);
  margin-bottom: 20px;
}

.quiz-discipline-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 28px;
}

.quiz-disc-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-ui);
  text-align: center;
}

.quiz-disc-btn:hover {
  border-color: var(--pastel-blue);
  background: var(--border-light);
}

.quiz-disc-btn--active {
  border-color: var(--regal-blue);
  background: rgba(9, 69, 112, 0.06);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.quiz-disc-icon { font-size: 1.6rem; }

.quiz-disc-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--regal-blue);
}

.quiz-disc-arabic {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.quiz-start-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
  gap: 16px;
  flex-wrap: wrap;
}

.quiz-start-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.quiz-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.quiz-progress-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.quiz-score-badge { font-size: 0.8rem; }

.quiz-progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 100px;
  margin-bottom: 24px;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pastel-blue), var(--regal-blue));
  border-radius: 100px;
  transition: width 0.4s ease;
}

.quiz-question-card { padding: 28px; }

.quiz-question-text {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--regal-blue);
  line-height: 1.6;
  margin-bottom: 24px;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  text-align: left;
  color: var(--text-primary);
  transition: all 0.15s ease;
}

.quiz-option:not(:disabled):hover {
  border-color: var(--pastel-blue);
  background: var(--border-light);
}

.quiz-option:disabled { cursor: default; }

.quiz-option--correct {
  border-color: #27ae60;
  background: rgba(39, 174, 96, 0.1);
  color: #1a7a45;
}

.quiz-option--wrong {
  border-color: #e74c3c;
  background: rgba(231, 76, 60, 0.1);
  color: #c0392b;
}

.quiz-option-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--border-light);
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  color: var(--regal-blue);
}

.quiz-option--correct .quiz-option-letter { background: #27ae60; color: white; }
.quiz-option--wrong .quiz-option-letter { background: #e74c3c; color: white; }

.quiz-explanation {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  animation: slideDown 0.2s ease;
}

.quiz-explanation--correct {
  background: rgba(39, 174, 96, 0.1);
  border: 1px solid rgba(39, 174, 96, 0.3);
}

.quiz-explanation--wrong {
  background: rgba(231, 76, 60, 0.08);
  border: 1px solid rgba(231, 76, 60, 0.25);
}

.quiz-explanation-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 2px; }

.quiz-explanation p {
  font-size: 0.875rem;
  color: var(--text-primary);
  line-height: 1.6;
}

.quiz-next-row { display: flex; justify-content: flex-end; }

.quiz-result-card { padding: 32px; }

.quiz-result-header {
  text-align: center;
  margin-bottom: 32px;
}

.quiz-result-icon { font-size: 3rem; display: block; margin-bottom: 12px; }

.quiz-result-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--regal-blue);
  margin-bottom: 8px;
}

.quiz-result-score {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.quiz-result-percent {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.quiz-result-msg {
  font-family: var(--font-arabic);
  font-size: 1.2rem;
  color: var(--text-secondary);
}

.quiz-review {
  border-top: 1px solid var(--border-light);
  padding-top: 24px;
  margin-bottom: 24px;
}

.quiz-review-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--regal-blue);
  margin-bottom: 16px;
}

.quiz-review-item {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  border-left: 4px solid transparent;
}

.quiz-review-item--correct {
  background: rgba(39, 174, 96, 0.06);
  border-left-color: #27ae60;
}

.quiz-review-item--wrong {
  background: rgba(231, 76, 60, 0.06);
  border-left-color: #e74c3c;
}

.quiz-review-q {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  display: flex;
  gap: 8px;
}

.quiz-review-ans {
  font-size: 0.825rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.quiz-review-exp {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.5;
}

.correct-text { color: #27ae60; font-style: normal; font-weight: 600; }
.wrong-text   { color: #e74c3c; font-style: normal; font-weight: 600; }

.quiz-result-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .quiz-select-card { padding: 20px; }
  .quiz-discipline-options { grid-template-columns: repeat(2, 1fr); }
  .quiz-question-card { padding: 20px; }
}

/* Level selector */
.quiz-level-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.quiz-level-btn {
  flex: 1;
  min-width: 100px;
  padding: 10px 12px;
  border: 2px solid var(--border-color, #c8d8e8);
  border-radius: 10px;
  background: var(--bg-soft, #f5f8fb);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted, #6a8090);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: all 0.2s ease;
}

.quiz-level-btn:hover:not(.quiz-level-btn--locked) {
  border-color: #094570;
  color: #094570;
}

.quiz-level-btn--active {
  background: #ffffff;
  font-weight: 700;
}

.quiz-level-btn--locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.quiz-level-arabic {
  font-size: 0.75rem;
  color: inherit;
}

/* ── Quiz.css additions ────────────────────────────────────── */
 
/* Level unlock banner — shown in result phase */
.quiz-unlock-banner {
  background: linear-gradient(135deg, #094570, #0a6fa8);
  color: #ffffff;
  border-radius: 12px;
  padding: 16px 20px;
  margin: 0 0 24px;
  font-size: 1.05rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 16px rgba(9, 69, 112, 0.3);
  animation: slideDown 0.4s ease;
}
 
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.icon-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
}

.icon-inline svg {
  width: 100%;
  height: 100%;
}

/* ── Book Quiz additions ──────────────────────────────────── */

.book-quiz-status {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.book-quiz-field {
  margin-bottom: 16px;
}

.book-quiz-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 4px;
}

.book-quiz-input {
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-ui);
}

.book-quiz-input:disabled {
  opacity: 0.6;
}

.book-quiz-error {
  padding: 10px 14px;
  margin-bottom: 14px;
  background: rgba(231, 76, 60, 0.08);
  border: 1px solid rgba(231, 76, 60, 0.25);
  border-radius: 10px;
  color: #c0392b;
  font-size: 0.85rem;
}

.book-quiz-paywall {
  padding: 16px 18px;
  margin-bottom: 16px;
  background: rgba(9, 69, 112, 0.08);
  border: 1px solid rgba(9, 69, 112, 0.25);
  border-radius: 12px;
}

.book-quiz-paywall p {
  color: var(--regal-blue);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.book-quiz-paywall-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.book-quiz-section-btn {
  text-align: right;
  padding: 12px 16px;
  width: 100%;
}

.book-quiz-section-btn--garbled {
  opacity: 0.5;
  cursor: not-allowed;
}

.book-quiz-section-warning {
  font-size: 0.85rem;
  margin-top: 4px;
  color: #e74c3c;
}

.book-quiz-section-preview {
  font-size: 0.85rem;
  margin-top: 4px;
  color: var(--text-secondary);
}

.book-quiz-past-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.book-quiz-past-btn {
  text-align: left;
  padding: 10px 14px;
  width: 100%;
}

.book-quiz-generating {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
}

.book-quiz-fillblank-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-primary);
  font-size: 1rem;
  margin-top: 10px;
  font-family: var(--font-ui);
}

.book-quiz-actions-row {
  display: flex;
  gap: 10px;
}/* ============================================
   Flashcards Page
   ============================================ */

.flashcards-page {
  padding-top: 32px;
  max-width: 720px;
}

/* ---- Deck Selection ---- */
.fc-decks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.fc-deck-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: var(--white);
  border: none;
  text-align: left;
  font-family: var(--font-ui);
  transition: all 0.2s ease;
  border-left: 4px solid transparent;
}

.fc-deck-card:hover {
  border-left-color: var(--pastel-blue);
  box-shadow: var(--shadow-md);
}

.fc-deck-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.fc-deck-info {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.fc-deck-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--regal-blue);
  margin-bottom: 2px;
}

.fc-deck-arabic {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.fc-deck-count {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ---- Deck card actions (Browse All / Review Due) ---- */
.fc-deck-actions {
  display: flex;
  gap: 8px;
}

.fc-deck-action {
  flex: 1;
  padding: 8px 10px;
  font-size: 0.82rem;
}

.fc-deck-action:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---- Active Deck Header ---- */
.fc-header {
  margin-bottom: 20px;
}

.fc-header-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

.fc-deck-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--regal-blue);
}

/* ---- Flashcard ---- */
.fc-card-wrapper {
  perspective: 1200px;
  height: 320px;
  cursor: pointer;
  margin-bottom: 28px;
}

.fc-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.4, 0.2, 0.2, 1);
  border-radius: var(--radius);
}

.fc-card-wrapper--flipped .fc-card {
  transform: rotateY(180deg);
}

.fc-card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow-md);
}

/* Front face */
.fc-card-front {
  background: linear-gradient(135deg, var(--regal-blue) 0%, #1a6fa3 100%);
  color: var(--white);
}

/* Back face */
.fc-card-back {
  background: var(--white);
  border: 2px solid var(--pastel-blue);
  color: var(--text-primary);
  transform: rotateY(180deg);
}

.fc-card-hint {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
  opacity: 0.6;
}

.fc-card-front .fc-card-hint {
  color: var(--pastel-blue);
}

.fc-card-back .fc-card-hint {
  color: var(--text-muted);
}

.fc-card-arabic {
  font-family: var(--font-arabic);
  font-size: 3rem;
  color: var(--pastel-blue);
  line-height: 1.4;
  margin-bottom: 8px;
}

.fc-card-arabic--sm {
  font-size: 1.6rem;
  color: var(--regal-blue);
  margin-bottom: 12px;
}

.fc-card-translit {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
  margin-bottom: 20px;
}

.fc-card-tap {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
  margin-top: auto;
}

.fc-card-definition {
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.7;
  max-width: 480px;
}

/* ---- Controls (Browse mode) ---- */
.fc-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
}

.fc-controls .btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

/* ---- Controls (Review mode) ---- */
.fc-review-hint {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.fc-review-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
}

.fc-review-btn {
  flex: 1;
  max-width: 220px;
  padding: 12px 16px;
}

/* ---- Review finished / empty states ---- */
.fc-done {
  text-align: center;
  padding: 40px 24px;
}

.fc-done-icon {
  font-size: 2.4rem;
  margin-bottom: 12px;
}

.fc-done-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--regal-blue);
  margin-bottom: 10px;
}

.fc-done-score {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.fc-done-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- Progress Dots ---- */
.fc-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  padding-bottom: 32px;
}

.fc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.fc-dot--active {
  background: var(--regal-blue);
  transform: scale(1.3);
}

.fc-dot--done {
  background: var(--pastel-blue);
}

/* Mobile */
@media (max-width: 768px) {
  .fc-decks-grid {
    grid-template-columns: 1fr;
  }

  .fc-card-wrapper {
    height: 280px;
  }

  .fc-card-arabic {
    font-size: 2.2rem;
  }

  .fc-card-face {
    padding: 24px 20px;
  }

  .fc-card-definition {
    font-size: 0.85rem;
  }

  .fc-controls {
    flex-wrap: wrap;
  }

  .fc-deck-actions {
    flex-direction: column;
  }
}/* ============================================
   Stories Page
   ============================================ */

.stories-page {
  padding-top: 32px;
}

.stories-back {
  display: inline-block;
  color: #4a6080;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  margin-bottom: 20px;
  padding: 0;
  transition: color 0.15s;
  font-family: var(--font-ui);
}

.stories-back:hover {
  color: #094570;
}

/* Filters */
.stories-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.stories-filter-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.stories-filter-btn {
  padding: 7px 16px;
  border: 1.5px solid #c8d8e8;
  border-radius: 100px;
  background: #ffffff;
  color: #4a6080;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-ui);
}

.stories-filter-btn:hover {
  border-color: #094570;
  color: #094570;
}

.stories-filter-btn--active {
  background: #094570;
  border-color: #094570;
  color: #ffffff;
}

.stories-search {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.stories-search-input {
  width: 100%;
  padding: 8px 36px 8px 14px;
  border: 1.5px solid #c8d8e8;
  border-radius: 100px;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  background: #ffffff;
  color: #0d1b2a;
  transition: border-color 0.15s;
}

.stories-search-input:focus {
  outline: none;
  border-color: #85CCFF;
}

.stories-search-input::placeholder {
  color: #8a9ab0;
}

.stories-search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #8a9ab0;
  font-size: 0.8rem;
  padding: 2px;
}

.stories-count {
  font-size: 0.8rem;
  color: #8a9ab0;
  margin-bottom: 20px;
}

/* Badges */
.stories-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-prophets {
  background: #1f6b4a;
  color: #b8e8cf;
}

.badge-sahabah {
  background: #094570;
  color: #85CCFF;
}

.badge-tabieen {
  background: #1a5276;
  color: #aed6f1;
}

.badge-tabi-tabieen {
  background: #2e6da4;
  color: #d4ecfc;
}

.badge-ulul-azm {
  background: #8a6d1f;
  color: #f8e7b0;
}

.badge-battles {
  background: #7a2b28;
  color: #f5cac8;
}

.badge-category {
  background: #e8f4ff;
  color: #094570;
  border: 1px solid #c0ddf5;
}

/* Grid */
.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

/* Story Card */
.story-card {
  background: #ffffff;
  border: 1.5px solid #c8d8e8;
  border-radius: 12px;
  padding: 20px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-ui);
}

.story-card:hover {
  border-color: #85CCFF;
  box-shadow: 0 4px 16px rgba(9, 69, 112, 0.12);
  transform: translateY(-2px);
}

.story-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 4px;
}

.story-card-icon {
  font-size: 2rem;
}

.story-card-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.story-card-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #094570;
  margin: 0;
}

.story-card-arabic {
  font-size: 1rem;
  color: #4a6080;
  margin: 0;
}

.story-card-title {
  font-size: 0.8rem;
  color: #6a8090;
  font-style: italic;
  margin: 0;
}

.story-card-lifespan {
  font-size: 0.75rem;
  color: #8a9ab0;
  margin: 0;
}

.story-card-summary {
  font-size: 0.85rem;
  color: #2a3a4a;
  line-height: 1.6;
  margin: 4px 0 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.story-card-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #e8f0f8;
}

.story-card-read {
  font-size: 0.8rem;
  font-weight: 700;
  color: #094570;
}

/* Empty */
.stories-empty {
  text-align: center;
  padding: 48px 24px;
  color: #4a6080;
}

/* Detail View */
.story-detail {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 780px;
}

.story-detail-header {
  padding: 28px;
  background: #ffffff;
  border: 1.5px solid #c8d8e8;
  border-radius: 12px;
}

.story-detail-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.story-detail-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.story-detail-name {
  font-size: 1.8rem;
  font-weight: 800;
  color: #094570;
  margin-bottom: 4px;
}

.story-detail-arabic {
  font-size: 1.4rem;
  color: #4a6080;
  margin-bottom: 6px;
}

.story-detail-title {
  font-size: 0.9rem;
  color: #6a8090;
  font-style: italic;
  margin-bottom: 4px;
}

.story-detail-lifespan {
  font-size: 0.8rem;
  color: #8a9ab0;
  margin-bottom: 14px;
}

.story-detail-summary {
  font-size: 0.95rem;
  color: #1a2a3a;
  line-height: 1.7;
  padding: 14px;
  background: #f0f7ff;
  border-radius: 8px;
  border-left: 4px solid #85CCFF;
}

.story-detail-body {
  padding: 28px;
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 12px;
}

.story-para {
  font-size: 0.93rem;
  color: #0d1b2a !important;
  line-height: 1.9;
  margin-bottom: 16px;
}

.story-para {
  font-size: 0.93rem;
  color: #0d1b2a;
  line-height: 1.9;
  margin-bottom: 16px;
}

.story-para:last-child {
  margin-bottom: 0;
}

/* Lessons */
.story-detail-lessons {
  padding: 28px;
  background: #ffffff;
  border: 1.5px solid #c8d8e8;
  border-radius: 12px;
}

.story-lessons-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.story-lesson-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px;
  background: #f5f8fb;
  border-radius: 8px;
}

.story-lesson-num {
  font-size: 0.7rem;
  font-weight: 800;
  color: #85CCFF;
  background: #094570;
  padding: 3px 7px;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 2px;
  letter-spacing: 0.02em;
}

.story-lesson-item p {
  font-size: 0.875rem;
  color: #0d1b2a;
  line-height: 1.7;
  margin: 0;
}

/* Sources */
.story-detail-sources {
  padding: 24px;
  background: #ffffff;
  border: 1.5px solid #c8d8e8;
  border-radius: 12px;
}

.story-sources-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.story-source-chip {
  padding: 6px 14px;
  background: #e8f4ff;
  border: 1px solid #c0ddf5;
  border-radius: 100px;
  font-size: 0.8rem;
  color: #094570;
  font-weight: 500;
}

/* Mobile */
@media (max-width: 768px) {
  .stories-grid {
    grid-template-columns: 1fr;
  }

  .stories-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .story-detail-name {
    font-size: 1.4rem;
  }

  .story-detail-body {
    padding: 20px;
  }

  .story-para {
    font-size: 0.88rem;
  }
}
.story-card { background: #ffffff !important; }
.story-detail-header { background: #ffffff !important; }
.story-detail-lessons { background: #ffffff !important; }
.story-detail-sources { background: #ffffff !important; }/* ============================================
   Duas Page
   ============================================ */

.duas-page {
  padding-top: 32px;
}

.duas-back {
  display: inline-block;
  color: #4a6080;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  margin-bottom: 20px;
  padding: 0;
  transition: color 0.15s;
  font-family: var(--font-ui);
}

.duas-back:hover {
  color: #094570;
}

/* Search */
.duas-search {
  position: relative;
  margin-bottom: 14px;
}

.duas-search-input {
  width: 100%;
  padding: 12px 40px 12px 16px;
  border: 1.5px solid #c8d8e8;
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  background: #ffffff;
  color: #0d1b2a;
  transition: border-color 0.15s;
}

.duas-search-input:focus {
  outline: none;
  border-color: #85CCFF;
  box-shadow: 0 0 0 3px rgba(133, 204, 255, 0.2);
}

.duas-search-input::placeholder {
  color: #8a9ab0;
}

.duas-search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #8a9ab0;
  font-size: 0.8rem;
  padding: 2px;
}

/* Categories */
.duas-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.duas-cat-btn {
  padding: 6px 14px;
  border: 1.5px solid #c8d8e8;
  border-radius: 100px;
  background: #ffffff;
  color: #4a6080;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-ui);
}

.duas-cat-btn:hover {
  border-color: #094570;
  color: #094570;
}

.duas-cat-btn--active {
  background: #094570;
  border-color: #094570;
  color: #ffffff;
}

.duas-count {
  font-size: 0.8rem;
  color: #8a9ab0;
  margin-bottom: 20px;
}

/* Empty */
.duas-empty {
  text-align: center;
  padding: 48px 24px;
  color: #4a6080;
}

/* Grid */
.duas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
  margin-bottom: 40px;
}

/* Dua Card */
.dua-card {
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 12px;
  padding: 18px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-ui);
}

.dua-card:hover {
  border-color: #85CCFF;
  box-shadow: 0 4px 16px rgba(9, 69, 112, 0.1);
  transform: translateY(-2px);
}

.dua-card-top {
  display: flex;
  justify-content: flex-end;
}

.dua-grade-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.dua-category-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  background: #e8f4ff;
  color: #094570;
  border: 1px solid #c0ddf5;
  text-transform: capitalize;
}

.dua-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #094570;
  margin: 0;
  line-height: 1.4;
}

.dua-card-arabic-title {
  font-size: 0.95rem;
  color: #4a6080;
  margin: 0;
}

.dua-card-arabic {
  font-size: 1rem;
  color: #0d1b2a;
  line-height: 1.8;
  margin: 4px 0;
  direction: rtl;
}

.dua-card-when {
  font-size: 0.75rem;
  color: #6a8090;
  margin: 0;
  font-style: italic;
}

.dua-card-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #e8f0f8;
}

.dua-card-read {
  font-size: 0.8rem;
  font-weight: 700;
  color: #094570;
}

/* ============================================
   Detail View
   ============================================ */

.dua-detail {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 720px;
}

.dua-detail-header {
  padding: 24px;
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 12px;
}

.dua-detail-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.dua-detail-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #094570;
  margin-bottom: 6px;
}

.dua-detail-arabic-title {
  font-size: 1.1rem;
  color: #4a6080;
  margin-bottom: 10px;
}

.dua-detail-when {
  font-size: 0.82rem;
  color: #6a8090;
  font-style: italic;
  padding: 8px 12px;
  background: #f5f8fb;
  border-radius: 6px;
  display: inline-block;
}

/* Arabic card */
.dua-detail-arabic-card {
  padding: 24px;
  background: linear-gradient(135deg, rgba(9,69,112,0.04), #ffffff) !important;
  border: 1.5px solid #c8d8e8;
  border-left: 4px solid #094570;
  border-radius: 12px;
}

.dua-detail-arabic-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.dua-copy-btn {
  padding: 5px 14px;
  border: 1.5px solid #c8d8e8;
  border-radius: 100px;
  background: #ffffff;
  color: #094570;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-ui);
}

.dua-copy-btn:hover {
  background: #094570;
  color: #ffffff;
  border-color: #094570;
}

.dua-arabic-text {
  font-size: 1.6rem;
  color: #0d1b2a;
  line-height: 2.4;
  direction: rtl;
  text-align: right;
}

/* Section cards */
.dua-detail-section {
  padding: 20px 24px;
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 12px;
}

.dua-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #4a6080;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 12px;
}

.dua-translit-text {
  font-size: 0.9rem;
  color: #1a2a3a;
  line-height: 1.8;
  font-style: italic;
}

.dua-translation-text {
  font-size: 0.95rem;
  color: #0d1b2a;
  line-height: 1.8;
}

/* Context */
.dua-context-card {
  border-left: 4px solid #85CCFF !important;
  background: #f5f8fb !important;
}

.dua-context-text {
  font-size: 0.9rem;
  color: #0d1b2a;
  line-height: 1.9;
}

.dua-source-text {
  font-size: 0.875rem;
  color: #4a6080;
  font-style: italic;
}

/* Mobile */
@media (max-width: 768px) {
  .duas-grid {
    grid-template-columns: 1fr;
  }

  .dua-arabic-text {
    font-size: 1.3rem;
  }

  .dua-detail-title {
    font-size: 1.2rem;
  }
}

/* ─── Adhkar Tabs ─────────────────────────────────────────────── */
/* Fixed: previously used var(--bg-soft)/var(--text-primary) with light
   fallbacks. The app's dark theme overrides --text-primary to a light
   color, but nothing overrides --bg-soft for this component, so the
   background stayed light while the text turned light too — invisible.
   Now hardcoded, like every other card in this file, so it's always
   readable regardless of the app-wide theme. */
.adhkar-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.adhkar-tab {
  flex: 1;
  min-width: 120px;
  padding: 10px 12px;
  border: 2px solid #c8d8e8;
  border-radius: 12px;
  background: #f5f8fb;
  cursor: pointer;
  font-family: var(--font-ui);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: all 0.2s ease;
}

.adhkar-tab:hover {
  border-color: #094570;
}

.adhkar-tab--active {
  border-color: #094570;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(9,69,112,0.12);
}

.adhkar-tab-icon {
  font-size: 1.3rem;
}

.adhkar-tab-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0d1b2a;
}

.adhkar-tab-arabic {
  font-size: 0.72rem;
  color: #6a8090;
}

/* ─── Section Intro ───────────────────────────────────────────── */
.adhkar-section-intro {
  margin-bottom: 20px;
  padding: 20px;
  border-left: 4px solid #094570;
}

.adhkar-intro-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary, #0d1b2a);
  margin-bottom: 10px;
}

.adhkar-intro-text {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-secondary, #2d4a5a);
  margin-bottom: 8px;
}

.adhkar-intro-text:last-child {
  margin-bottom: 0;
}

/* ─── Ruqyah ──────────────────────────────────────────────────── */
.ruqyah-intro-card {
  border-left-color: #b71c1c;
}

.ruqyah-warning {
  background: #fff3e0;
  border: 1px solid #ffb74d;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #e65100;
  margin: 12px 0;
}

.ruqyah-card {
  border-left: 3px solid #b71c1c;
}

.ruqyah-condition-preview {
  font-size: 0.75rem;
  color: #b71c1c;
  margin-top: 6px;
  font-style: italic;
}

.ruqyah-condition-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  background: #fce4ec;
  color: #b71c1c;
  font-size: 0.72rem;
  font-weight: 600;
  margin-left: 6px;
}

.ruqyah-method-card {
  border-left: 3px solid #1565c0;
}

/* ─── Adhkar count badge ──────────────────────────────────────── */
.adhkar-count-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 0.72rem;
  font-weight: 700;
  margin-left: 6px;
}

.adhkar-virtue-preview {
  font-size: 0.75rem;
  color: var(--text-muted, #6a8090);
  margin-top: 6px;
  font-style: italic;
  line-height: 1.5;
}

/* ─── Subsections ─────────────────────────────────────────────── */
.adhkar-subsection {
  margin-top: 28px;
}

.adhkar-subsection-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary, #0d1b2a);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-color, #c8d8e8);
}

.adhkar-categories {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.adhkar-cat-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 12px;
  border-radius: 14px;
  border: 2px solid #e0eaf2;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.adhkar-cat-btn:hover {
  border-color: #85CCFF;
  background: #f0f8ff;
}

.adhkar-cat-btn--active {
  border-color: #094570;
  background: #094570;
  color: #fff;
}

.adhkar-cat-icon {
  font-size: 1.6rem;
}

.adhkar-cat-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
}

.adhkar-cat-arabic {
  font-family: 'Amiri', serif;
  font-size: 0.85rem;
  text-align: center;
  direction: rtl;
}

.adhkar-item {
  background: #fff;
  border-radius: 14px;
  border: 1.5px solid #e0eaf2;
  margin-bottom: 16px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.adhkar-item:hover {
  box-shadow: 0 2px 12px rgba(9, 69, 112, 0.08);
}

.adhkar-arabic {
  font-family: 'Amiri', serif;
  font-size: 1.5rem;
  line-height: 2.1;
  direction: rtl;
  text-align: right;
  color: #094570;
  padding: 20px 20px 12px;
  border-bottom: 1px solid #f0f4f8;
}

.adhkar-transliteration {
  padding: 8px 20px;
  font-size: 0.88rem;
  color: #555;
  font-style: italic;
  line-height: 1.6;
}

.adhkar-translation {
  padding: 8px 20px 16px;
  font-size: 0.92rem;
  color: #1a1a1a;
  line-height: 1.7;
}

.adhkar-source {
  padding: 8px 20px 12px;
  font-size: 0.78rem;
  color: #094570;
  font-weight: 500;
}

.adhkar-note {
  margin: 0 20px 14px;
  padding: 10px 14px;
  background: #f0f8ff;
  border-left: 3px solid #85CCFF;
  border-radius: 6px;
  font-size: 0.82rem;
  color: #333;
  line-height: 1.6;
}

.adhkar-situational-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #094570;
  background: #e8f4ff;
  padding: 4px 20px;
}/* ============================================
   Islamic Calendar — blue & white
   ============================================ */

:root {
  --cal-navy:        #094570;
  --cal-navy-light:  #1a6fa8;
  --cal-blue-pale:   #e8f4ff;
  --cal-border:      #d0e8f8;
  --cal-border-soft: #e8f0f8;
  --cal-ink:         #0d1b2a;
  --cal-text-body:   #2c3e50;
  --cal-muted:       #6a8090;
  --cal-muted-light: #8a9ab0;
}

.cal-page {
  padding-top: 32px;
  max-width: 720px;
}

/* Today Banner — solid navy, not a gradient. Flat fills read
   as more deliberate and keep the banner from competing with the
   event colors used throughout the rest of the calendar. */
.cal-today-banner {
  background: var(--cal-navy);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.cal-today-hijri {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.cal-today-day {
  font-size: 2.6rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
}

.cal-today-month {
  font-size: 1.25rem;
  color: #85CCFF;
}

.cal-today-year {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
}

.cal-today-greg {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
  text-align: right;
}

/* Calendar Card — forced light card regardless of app-wide theme,
   so all text inside it needs its own explicit colors (see below) */
.cal-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 4px 24px rgba(9, 69, 112, 0.1);
  border: 1.5px solid var(--cal-border);
  margin-bottom: 20px;
  color-scheme: light;
}

/* Month Navigation */
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.cal-nav-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1.5px solid #c8d8e8;
  background: #f5f8fb;
  color: var(--cal-navy);
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
}

.cal-nav-btn:hover {
  background: var(--cal-navy);
  color: #ffffff;
  border-color: var(--cal-navy);
  box-shadow: 0 4px 12px rgba(9, 69, 112, 0.3);
}

.cal-nav-center {
  text-align: center;
}

.cal-month-arabic {
  font-size: 1.6rem;
  color: var(--cal-navy);
  margin-bottom: 2px;
}

.cal-month-latin {
  font-size: 0.85rem;
  color: var(--cal-muted);
  font-weight: 600;
}

/* Weekdays */
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 8px;
  gap: 3px;
}

.cal-weekday {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--cal-muted-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 0;
}

.cal-weekday--friday {
  color: var(--cal-navy);
}

/* Days Grid — tighter gap than before so the grid reads as one
   cohesive block instead of a loose scatter of tiles */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 20px;
}

/* Cube / rounded-square cells (previously perfect circles via
   border-radius: 50%). aspect-ratio: 1 keeps them square; the smaller
   corner radius gives a "cube" feel while still reading as soft/friendly
   rather than sharp. */
.cal-cell {
  aspect-ratio: 1;
  border-radius: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.2s ease;
  font-family: var(--font-ui);
  padding: 0;
}

.cal-cell--empty {
  cursor: default;
}

.cal-cell:not(.cal-cell--empty):hover {
  background: #f0f7ff;
  transform: scale(1.08);
}

.cal-cell-day {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--cal-ink);
  line-height: 1;
}

.cal-cell-icon {
  font-size: 0.55rem;
  line-height: 1;
  margin-top: 1px;
}

.cal-cell-dot {
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 2px;
}

/* Today — solid fill, unmistakable */
.cal-cell--today {
  background: var(--cal-navy) !important;
}

.cal-cell--today .cal-cell-day {
  color: #ffffff !important;
  font-weight: 700;
}

.cal-cell--today:hover {
  transform: scale(1.08);
}

/* Event day — softer tint + a light ring in the event color,
   tuned down from the previous 10%/30% mix so the fill reads as a
   quiet highlight rather than competing with the "today" fill.
   Ayyam al-Bid (the White Days) now pass --event-color: #1a6fa8
   (blue) instead of the old mustard/gold, and their day number
   inherits the same bold weight as every other event day below. */
.cal-cell--event {
  background: color-mix(in srgb, var(--event-color) 12%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--event-color) 45%, transparent);
}

.cal-cell--event .cal-cell-day {
  color: var(--event-color);
  font-weight: 700;
}

/* Friday */
.cal-cell--friday .cal-cell-day {
  color: var(--cal-navy);
  font-weight: 700;
}

/* Selected — outlined ring, deliberately different from "today" so the
   two states can never be confused with each other */
.cal-cell--selected {
  border: 2.5px solid var(--cal-navy);
  background: var(--cal-blue-pale) !important;
}

.cal-cell--selected .cal-cell-day {
  color: var(--cal-navy) !important;
}

.cal-cell--today.cal-cell--selected {
  box-shadow: 0 0 0 3px var(--cal-blue-pale);
}

/* Legend */
.cal-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--cal-border-soft);
}

.cal-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--cal-muted);
}

/* Legend swatches now match the cube cells — small rounded squares
   instead of circles, so the legend and the grid read as one system. */
.cal-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.cal-legend-dot--today {
  background: var(--cal-navy);
}

.cal-legend-dot--event {
  background: #c0392b;
}

.cal-legend-dot--friday {
  background: var(--cal-navy);
  opacity: 0.5;
}

/* Selected Day Detail */
.cal-detail-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px 24px;
  border: 1.5px solid var(--cal-border);
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(9, 69, 112, 0.08);
  animation: slideDown 0.2s ease;
  color-scheme: light;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.cal-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}

.cal-detail-hijri {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.cal-detail-day {
  font-size: 2rem;
  font-weight: 800;
  color: var(--cal-navy);
}

.cal-detail-month {
  font-size: 1.1rem;
  color: var(--cal-text-body);
}

.cal-detail-year {
  font-size: 0.85rem;
  color: var(--cal-muted-light);
}

.cal-detail-greg {
  font-size: 0.85rem;
  color: var(--cal-muted);
}

.cal-detail-event {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #f5f8fb;
  border-radius: 10px;
}

.cal-detail-event-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.cal-detail-event-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--cal-ink);
  margin-bottom: 4px;
}

.cal-detail-event-arabic {
  font-size: 0.95rem;
  color: var(--cal-text-body);
  margin-bottom: 6px;
}

/* Description text — was previously missing a color rule entirely
   (silently inherited the app's global theme color). Also now clamped
   to 4 lines so a long entry can't blow out the card's height; the
   full text is still in the DOM/accessible to screen readers. */
.cal-detail-event-desc {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--cal-text-body);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cal-detail-no-event {
  font-size: 0.875rem;
  color: var(--cal-muted-light);
  font-style: italic;
  text-align: center;
  padding: 12px;
}

/* Events Section */
.cal-events-section {
  margin-bottom: 40px;
}

.cal-events-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--cal-text-body);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 12px;
}

.cal-events-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cal-event-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #ffffff;
  border-radius: 12px;
  border: 1.5px solid var(--cal-border);
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 8px rgba(9, 69, 112, 0.06);
  color-scheme: light;
}

.cal-event-item:hover {
  box-shadow: 0 4px 16px rgba(9, 69, 112, 0.12);
  transform: translateX(4px);
}

.cal-event-item-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.cal-event-item-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--cal-ink);
  margin-bottom: 2px;
}

.cal-event-item-arabic {
  font-size: 0.88rem;
  color: var(--cal-text-body);
  margin-bottom: 4px;
}

.cal-event-item-date {
  font-size: 0.75rem;
  color: var(--cal-muted-light);
}

/* Same missing-rule bug as above, same fix */
.cal-event-item-desc {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--cal-text-body);
}

/* Mobile */
@media (max-width: 768px) {
  .cal-today-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .cal-today-greg {
    text-align: left;
  }

  .cal-card {
    padding: 16px;
  }

  .cal-cell-day {
    font-size: 0.78rem;
  }

  .cal-month-arabic {
    font-size: 1.3rem;
  }
}/* ============================================
   Tajweed Page
   ============================================ */

.tj-page {
  padding-top: 32px;
  max-width: 860px;
}

.tj-back {
  display: inline-block;
  color: #4a6080;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  margin-bottom: 20px;
  padding: 0;
  transition: color 0.15s;
  font-family: var(--font-ui);
}

.tj-back:hover {
  color: #094570;
}

/* Intro Banner */
.tj-intro-banner {
  background: linear-gradient(135deg, #094570, #1a6fa8);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(9, 69, 112, 0.25);
}

.tj-intro-ayah {
  font-size: 1.8rem;
  color: #ffffff;
  line-height: 2;
  margin-bottom: 8px;
  direction: rtl;
  text-align: right;
}

.tj-intro-trans {
  font-size: 0.9rem;
  color: #85CCFF;
  margin-bottom: 12px;
  font-style: italic;
}

.tj-intro-note {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.7;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.15);
}

/* Level Guide */
.tj-level-guide {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.tj-level-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
}

.tj-level-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Sections Grid */
.tj-sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 40px;
}

.tj-section-card {
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 14px;
  padding: 20px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-ui);
}

.tj-section-card:hover {
  border-color: #85CCFF;
  box-shadow: 0 6px 20px rgba(9, 69, 112, 0.12);
  transform: translateY(-3px);
}

.tj-section-card-icon {
  font-size: 2rem;
  margin-bottom: 4px;
}

.tj-section-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #094570;
  margin: 0;
  line-height: 1.4;
}

.tj-section-card-arabic {
  font-size: 0.95rem;
  color: #4a6080;
  margin: 0;
}

.tj-section-card-overview {
  font-size: 0.82rem;
  color: #2a3a4a;
  line-height: 1.6;
  margin: 4px 0 0 0;
  flex: 1;
}

.tj-section-card-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #e8f0f8;
  margin-top: auto;
}

.tj-section-card-count {
  font-size: 0.75rem;
  color: #8a9ab0;
  font-weight: 600;
}

.tj-section-card-levels {
  display: flex;
  gap: 4px;
  flex: 1;
}

.tj-section-level-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  opacity: 0.7;
}

.tj-section-card-read {
  font-size: 0.8rem;
  font-weight: 700;
  color: #094570;
  margin-left: auto;
}

/* Section detail header */
.tj-section-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.tj-section-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.tj-section-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #094570;
  margin-bottom: 4px;
}

.tj-section-arabic {
  font-size: 1.1rem;
  color: #4a6080;
}

.tj-section-overview {
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(9,69,112,0.04), #ffffff) !important;
  border: 1.5px solid #c8d8e8;
  border-left: 4px solid #094570;
  border-radius: 12px;
  margin-bottom: 20px;
}

.tj-overview-text {
  font-size: 0.92rem;
  color: #0d1b2a;
  line-height: 1.8;
}

/* Filter row */
.tj-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.tj-filter-btn {
  padding: 6px 14px;
  border: 1.5px solid #c8d8e8;
  border-radius: 100px;
  background: #ffffff;
  color: #4a6080;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-ui);
}

.tj-filter-btn:hover {
  border-color: #094570;
  color: #094570;
}

.tj-filter-btn--active {
  font-weight: 700;
}

/* Rules list */
.tj-rules-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}

.tj-rule-card {
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 12px;
  padding: 20px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-ui);
  width: 100%;
}

.tj-rule-card:hover {
  border-color: #85CCFF;
  box-shadow: 0 4px 16px rgba(9, 69, 112, 0.1);
  transform: translateX(4px);
}

.tj-rule-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tj-level-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.tj-examples-count {
  font-size: 0.72rem;
  color: #8a9ab0;
  font-weight: 600;
}

.tj-rule-card-name {
  font-size: 1rem;
  font-weight: 700;
  color: #094570;
  margin: 0;
  line-height: 1.4;
}

.tj-rule-card-arabic {
  font-size: 0.95rem;
  color: #4a6080;
  margin: 0;
}

.tj-rule-card-preview {
  font-size: 0.82rem;
  color: #2a3a4a;
  line-height: 1.6;
  margin: 0;
}

.tj-rule-card-footer {
  padding-top: 10px;
  border-top: 1px solid #e8f0f8;
}

.tj-rule-card-read {
  font-size: 0.8rem;
  font-weight: 700;
  color: #094570;
}

/* Rule detail */
.tj-rule-detail {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tj-rule-header {
  padding: 24px;
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 14px;
}

.tj-rule-header-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.tj-section-ref {
  font-size: 0.75rem;
  color: #8a9ab0;
  font-weight: 600;
}

.tj-rule-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: #094570;
  margin-bottom: 6px;
  line-height: 1.4;
}

.tj-rule-arabic {
  font-size: 1.2rem;
  color: #4a6080;
}

.tj-rule-body {
  padding: 24px;
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 12px;
}

.tj-section-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #4a6080;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 14px;
}

.tj-rule-para {
  font-size: 0.92rem;
  color: #0d1b2a;
  line-height: 1.9;
  margin-bottom: 14px;
}

.tj-rule-para:last-child {
  margin-bottom: 0;
}

/* Examples */
.tj-rule-examples {
  padding: 24px;
  background: #f5f8fb !important;
  border: 1.5px solid #c8d8e8;
  border-left: 4px solid #85CCFF;
  border-radius: 12px;
}

.tj-examples-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tj-example-item {
  background: #ffffff;
  border: 1px solid #d8e8f5;
  border-radius: 10px;
  padding: 14px 18px;
}

.tj-example-arabic {
  font-size: 1.6rem;
  color: #094570;
  line-height: 2;
  margin-bottom: 4px;
  direction: rtl;
  text-align: right;
}

.tj-example-translit {
  font-size: 0.875rem;
  color: #4a6080;
  font-style: italic;
  margin-bottom: 6px;
}

.tj-example-note {
  font-size: 0.8rem;
  color: #0d1b2a;
  padding: 6px 10px;
  background: #e8f4ff;
  border-radius: 6px;
  line-height: 1.5;
}

/* Source */
.tj-rule-source {
  padding: 18px 24px;
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 12px;
}

.tj-source-text {
  font-size: 0.875rem;
  color: #4a6080;
  font-style: italic;
}

/* Scholars */
.tj-scholars-section {
  margin-bottom: 48px;
}

.tj-scholars-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #4a6080;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 14px;
}

.tj-scholars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.tj-scholar-card {
  padding: 20px;
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 12px;
}

.tj-scholar-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #094570;
  margin-bottom: 4px;
}

.tj-scholar-arabic {
  font-size: 0.95rem;
  color: #4a6080;
  margin-bottom: 4px;
}

.tj-scholar-lifespan {
  font-size: 0.75rem;
  color: #8a9ab0;
  margin-bottom: 10px;
}

.tj-scholar-contribution {
  font-size: 0.82rem;
  color: #0d1b2a;
  line-height: 1.7;
}

/* Mobile */
@media (max-width: 768px) {
  .tj-sections-grid {
    grid-template-columns: 1fr;
  }

  .tj-scholars-grid {
    grid-template-columns: 1fr;
  }

  .tj-intro-ayah {
    font-size: 1.4rem;
  }

  .tj-rule-name {
    font-size: 1.2rem;
  }

  .tj-example-arabic {
    font-size: 1.3rem;
  }
}/* ============================================
   Fiqh Page
   ============================================ */

.fq-page {
  padding-top: 32px;
  max-width: 860px;
}

.fq-back {
  display: inline-block;
  color: #4a6080;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  margin-bottom: 20px;
  padding: 0;
  transition: color 0.15s;
  font-family: var(--font-ui);
}

.fq-back:hover {
  color: #094570;
}

/* Intro Banner */
.fq-intro-banner {
  background: linear-gradient(135deg, #094570, #1a6fa8);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(9, 69, 112, 0.25);
}

.fq-intro-ayah {
  font-size: 1.8rem;
  color: #ffffff;
  line-height: 2;
  margin-bottom: 8px;
  direction: rtl;
  text-align: right;
}

.fq-intro-trans {
  font-size: 0.9rem;
  color: #85CCFF;
  margin-bottom: 12px;
  font-style: italic;
}

.fq-intro-note {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.7;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.15);
}

/* Level Guide */
.fq-level-guide {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.fq-level-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
}

.fq-level-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Sections Grid */
.fq-sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 40px;
}

.fq-section-card {
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 14px;
  padding: 20px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-ui);
}

.fq-section-card:hover {
  border-color: #85CCFF;
  box-shadow: 0 6px 20px rgba(9, 69, 112, 0.12);
  transform: translateY(-3px);
}

.fq-section-card-icon {
  font-size: 2rem;
  margin-bottom: 4px;
}

.fq-section-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #094570;
  margin: 0;
  line-height: 1.4;
}

.fq-section-card-arabic {
  font-size: 0.95rem;
  color: #4a6080;
  margin: 0;
}

.fq-section-card-overview {
  font-size: 0.82rem;
  color: #2a3a4a;
  line-height: 1.6;
  margin: 4px 0 0 0;
  flex: 1;
}

.fq-section-card-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #e8f0f8;
  margin-top: auto;
}

.fq-section-card-count {
  font-size: 0.75rem;
  color: #8a9ab0;
  font-weight: 600;
}

.fq-section-card-levels {
  display: flex;
  gap: 4px;
  flex: 1;
}

.fq-section-level-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  opacity: 0.7;
}

.fq-section-card-read {
  font-size: 0.8rem;
  font-weight: 700;
  color: #094570;
  margin-left: auto;
}

/* Section detail header */
.fq-section-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.fq-section-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.fq-section-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #094570;
  margin-bottom: 4px;
}

.fq-section-arabic {
  font-size: 1.1rem;
  color: #4a6080;
}

.fq-section-overview {
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(9,69,112,0.04), #ffffff) !important;
  border: 1.5px solid #c8d8e8;
  border-left: 4px solid #094570;
  border-radius: 12px;
  margin-bottom: 20px;
}

.fq-overview-text {
  font-size: 0.92rem;
  color: #0d1b2a;
  line-height: 1.8;
}

/* Filter row */
.fq-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.fq-filter-btn {
  padding: 6px 14px;
  border: 1.5px solid #c8d8e8;
  border-radius: 100px;
  background: #ffffff;
  color: #4a6080;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-ui);
}

.fq-filter-btn:hover {
  border-color: #094570;
  color: #094570;
}

.fq-filter-btn--active {
  font-weight: 700;
}

/* Rules list */
.fq-rules-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}

.fq-rule-card {
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 12px;
  padding: 20px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-ui);
  width: 100%;
}

.fq-rule-card:hover {
  border-color: #85CCFF;
  box-shadow: 0 4px 16px rgba(9, 69, 112, 0.1);
  transform: translateX(4px);
}

.fq-rule-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fq-level-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.fq-examples-count {
  font-size: 0.72rem;
  color: #8a9ab0;
  font-weight: 600;
}

.fq-rule-card-name {
  font-size: 1rem;
  font-weight: 700;
  color: #094570;
  margin: 0;
  line-height: 1.4;
}

.fq-rule-card-arabic {
  font-size: 0.95rem;
  color: #4a6080;
  margin: 0;
}

.fq-rule-card-preview {
  font-size: 0.82rem;
  color: #2a3a4a;
  line-height: 1.6;
  margin: 0;
}

.fq-rule-card-footer {
  padding-top: 10px;
  border-top: 1px solid #e8f0f8;
}

.fq-rule-card-read {
  font-size: 0.8rem;
  font-weight: 700;
  color: #094570;
}

/* Rule detail */
.fq-rule-detail {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fq-rule-header {
  padding: 24px;
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 14px;
}

.fq-rule-header-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.fq-section-ref {
  font-size: 0.75rem;
  color: #8a9ab0;
  font-weight: 600;
}

.fq-rule-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: #094570;
  margin-bottom: 6px;
  line-height: 1.4;
}

.fq-rule-arabic {
  font-size: 1.2rem;
  color: #4a6080;
}

.fq-rule-body {
  padding: 24px;
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 12px;
}

.fq-section-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #4a6080;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 14px;
}

.fq-rule-para {
  font-size: 0.92rem;
  color: #0d1b2a;
  line-height: 1.9;
  margin-bottom: 14px;
}

.fq-rule-para:last-child {
  margin-bottom: 0;
}

/* Examples */
.fq-rule-examples {
  padding: 24px;
  background: #f5f8fb !important;
  border: 1.5px solid #c8d8e8;
  border-left: 4px solid #85CCFF;
  border-radius: 12px;
}

.fq-examples-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fq-example-item {
  background: #ffffff;
  border: 1px solid #d8e8f5;
  border-radius: 10px;
  padding: 14px 18px;
}

.fq-example-arabic {
  font-size: 1.6rem;
  color: #094570;
  line-height: 2;
  margin-bottom: 4px;
  direction: rtl;
  text-align: right;
}

.fq-example-translit {
  font-size: 0.875rem;
  color: #4a6080;
  font-style: italic;
  margin-bottom: 6px;
}

.fq-example-note {
  font-size: 0.8rem;
  color: #0d1b2a;
  padding: 6px 10px;
  background: #e8f4ff;
  border-radius: 6px;
  line-height: 1.5;
}

/* Source */
.fq-rule-source {
  padding: 18px 24px;
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 12px;
}

.fq-source-text {
  font-size: 0.875rem;
  color: #4a6080;
  font-style: italic;
}

/* Scholars */
.fq-scholars-section {
  margin-bottom: 48px;
}

.fq-scholars-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #4a6080;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 14px;
}

.fq-scholars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.fq-scholar-card {
  padding: 20px;
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 12px;
}

.fq-scholar-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #094570;
  margin-bottom: 4px;
}

.fq-scholar-arabic {
  font-size: 0.95rem;
  color: #4a6080;
  margin-bottom: 4px;
}

.fq-scholar-lifespan {
  font-size: 0.75rem;
  color: #8a9ab0;
  margin-bottom: 10px;
}

.fq-scholar-contribution {
  font-size: 0.82rem;
  color: #0d1b2a;
  line-height: 1.7;
}

/* Mobile */
@media (max-width: 768px) {
  .fq-sections-grid {
    grid-template-columns: 1fr;
  }

  .fq-scholars-grid {
    grid-template-columns: 1fr;
  }

  .fq-intro-ayah {
    font-size: 1.4rem;
  }

  .fq-rule-name {
    font-size: 1.2rem;
  }

  .fq-example-arabic {
    font-size: 1.3rem;
  }
}/* ============================================
   Tawheed Page
   ============================================ */

.tw-page {
  padding-top: 32px;
  max-width: 860px;
}

.tw-back {
  display: inline-block;
  color: #4a6080;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  margin-bottom: 20px;
  padding: 0;
  transition: color 0.15s;
  font-family: var(--font-ui);
}

.tw-back:hover {
  color: #094570;
}

/* Intro Banner */
.tw-intro-banner {
  background: linear-gradient(135deg, #094570, #1a6fa8);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(9, 69, 112, 0.25);
}

.tw-intro-ayah {
  font-size: 1.8rem;
  color: #ffffff;
  line-height: 2;
  margin-bottom: 8px;
  direction: rtl;
  text-align: right;
}

.tw-intro-trans {
  font-size: 0.9rem;
  color: #85CCFF;
  margin-bottom: 12px;
  font-style: italic;
}

.tw-intro-note {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.7;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.15);
}

/* Level Guide */
.tw-level-guide {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.tw-level-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
}

.tw-level-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Sections Grid */
.tw-sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 40px;
}

.tw-section-card {
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 14px;
  padding: 20px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-ui);
}

.tw-section-card:hover {
  border-color: #85CCFF;
  box-shadow: 0 6px 20px rgba(9, 69, 112, 0.12);
  transform: translateY(-3px);
}

.tw-section-card-icon {
  font-size: 2rem;
  margin-bottom: 4px;
}

.tw-section-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #094570;
  margin: 0;
  line-height: 1.4;
}

.tw-section-card-arabic {
  font-size: 0.95rem;
  color: #4a6080;
  margin: 0;
}

.tw-section-card-overview {
  font-size: 0.82rem;
  color: #2a3a4a;
  line-height: 1.6;
  margin: 4px 0 0 0;
  flex: 1;
}

.tw-section-card-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #e8f0f8;
  margin-top: auto;
}

.tw-section-card-count {
  font-size: 0.75rem;
  color: #8a9ab0;
  font-weight: 600;
}

.tw-section-card-levels {
  display: flex;
  gap: 4px;
  flex: 1;
}

.tw-section-level-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  opacity: 0.7;
}

.tw-section-card-read {
  font-size: 0.8rem;
  font-weight: 700;
  color: #094570;
  margin-left: auto;
}

/* Section detail header */
.tw-section-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.tw-section-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.tw-section-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #094570;
  margin-bottom: 4px;
}

.tw-section-arabic {
  font-size: 1.1rem;
  color: #4a6080;
}

.tw-section-overview {
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(9,69,112,0.04), #ffffff) !important;
  border: 1.5px solid #c8d8e8;
  border-left: 4px solid #094570;
  border-radius: 12px;
  margin-bottom: 20px;
}

.tw-overview-text {
  font-size: 0.92rem;
  color: #0d1b2a;
  line-height: 1.8;
}

/* Filter row */
.tw-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.tw-filter-btn {
  padding: 6px 14px;
  border: 1.5px solid #c8d8e8;
  border-radius: 100px;
  background: #ffffff;
  color: #4a6080;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-ui);
}

.tw-filter-btn:hover {
  border-color: #094570;
  color: #094570;
}

.tw-filter-btn--active {
  font-weight: 700;
}

/* Rules list */
.tw-rules-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}

.tw-rule-card {
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 12px;
  padding: 20px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-ui);
  width: 100%;
}

.tw-rule-card:hover {
  border-color: #85CCFF;
  box-shadow: 0 4px 16px rgba(9, 69, 112, 0.1);
  transform: translateX(4px);
}

.tw-rule-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tw-level-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.tw-examples-count {
  font-size: 0.72rem;
  color: #8a9ab0;
  font-weight: 600;
}

.tw-rule-card-name {
  font-size: 1rem;
  font-weight: 700;
  color: #094570;
  margin: 0;
  line-height: 1.4;
}

.tw-rule-card-arabic {
  font-size: 0.95rem;
  color: #4a6080;
  margin: 0;
}

.tw-rule-card-preview {
  font-size: 0.82rem;
  color: #2a3a4a;
  line-height: 1.6;
  margin: 0;
}

.tw-rule-card-footer {
  padding-top: 10px;
  border-top: 1px solid #e8f0f8;
}

.tw-rule-card-read {
  font-size: 0.8rem;
  font-weight: 700;
  color: #094570;
}

/* Rule detail */
.tw-rule-detail {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tw-rule-header {
  padding: 24px;
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 14px;
}

.tw-rule-header-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.tw-section-ref {
  font-size: 0.75rem;
  color: #8a9ab0;
  font-weight: 600;
}

.tw-rule-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: #094570;
  margin-bottom: 6px;
  line-height: 1.4;
}

.tw-rule-arabic {
  font-size: 1.2rem;
  color: #4a6080;
}

.tw-rule-body {
  padding: 24px;
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 12px;
}

.tw-section-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #4a6080;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 14px;
}

.tw-rule-para {
  font-size: 0.92rem;
  color: #0d1b2a;
  line-height: 1.9;
  margin-bottom: 14px;
}

.tw-rule-para:last-child {
  margin-bottom: 0;
}

/* Examples */
.tw-rule-examples {
  padding: 24px;
  background: #f5f8fb !important;
  border: 1.5px solid #c8d8e8;
  border-left: 4px solid #85CCFF;
  border-radius: 12px;
}

.tw-examples-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tw-example-item {
  background: #ffffff;
  border: 1px solid #d8e8f5;
  border-radius: 10px;
  padding: 14px 18px;
}

.tw-example-arabic {
  font-size: 1.6rem;
  color: #094570;
  line-height: 2;
  margin-bottom: 4px;
  direction: rtl;
  text-align: right;
}

.tw-example-translit {
  font-size: 0.875rem;
  color: #4a6080;
  font-style: italic;
  margin-bottom: 6px;
}

.tw-example-note {
  font-size: 0.8rem;
  color: #0d1b2a;
  padding: 6px 10px;
  background: #e8f4ff;
  border-radius: 6px;
  line-height: 1.5;
}

/* Source */
.tw-rule-source {
  padding: 18px 24px;
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 12px;
}

.tw-source-text {
  font-size: 0.875rem;
  color: #4a6080;
  font-style: italic;
}

/* Scholars */
.tw-scholars-section {
  margin-bottom: 48px;
}

.tw-scholars-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #4a6080;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 14px;
}

.tw-scholars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.tw-scholar-card {
  padding: 20px;
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 12px;
}

.tw-scholar-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #094570;
  margin-bottom: 4px;
}

.tw-scholar-arabic {
  font-size: 0.95rem;
  color: #4a6080;
  margin-bottom: 4px;
}

.tw-scholar-lifespan {
  font-size: 0.75rem;
  color: #8a9ab0;
  margin-bottom: 10px;
}

.tw-scholar-contribution {
  font-size: 0.82rem;
  color: #0d1b2a;
  line-height: 1.7;
}

/* ── Dark mode ── */
[data-theme="dark"] .tw-section-card,
[data-theme="dark"] .tw-rule-card,
[data-theme="dark"] .tw-rule-header,
[data-theme="dark"] .tw-rule-body,
[data-theme="dark"] .tw-rule-source,
[data-theme="dark"] .tw-scholar-card {
  background: #0f1f2e !important;
  border-color: #1e3448;
}

[data-theme="dark"] .tw-section-overview {
  background: linear-gradient(135deg, rgba(133,204,255,0.06), #0f1f2e) !important;
  border-color: #1e3448;
  border-left-color: #85CCFF;
}

[data-theme="dark"] .tw-rule-examples {
  background: #0a1825 !important;
  border-color: #1e3448;
  border-left-color: #85CCFF;
}

[data-theme="dark"] .tw-example-item {
  background: #0f1f2e;
  border-color: #1e3448;
}

[data-theme="dark"] .tw-example-note {
  background: rgba(133,204,255,0.1);
  color: #c8e0f5;
}

[data-theme="dark"] .tw-section-card-title,
[data-theme="dark"] .tw-section-title,
[data-theme="dark"] .tw-rule-name,
[data-theme="dark"] .tw-rule-card-name,
[data-theme="dark"] .tw-scholar-name,
[data-theme="dark"] .tw-section-card-read,
[data-theme="dark"] .tw-rule-card-read,
[data-theme="dark"] .tw-example-arabic {
  color: #85CCFF;
}

[data-theme="dark"] .tw-section-card-arabic,
[data-theme="dark"] .tw-section-arabic,
[data-theme="dark"] .tw-rule-arabic,
[data-theme="dark"] .tw-rule-card-arabic,
[data-theme="dark"] .tw-scholar-arabic,
[data-theme="dark"] .tw-back,
[data-theme="dark"] .tw-example-translit,
[data-theme="dark"] .tw-source-text {
  color: #7f97ae;
}

[data-theme="dark"] .tw-back:hover {
  color: #85CCFF;
}

[data-theme="dark"] .tw-section-card-overview,
[data-theme="dark"] .tw-rule-card-preview,
[data-theme="dark"] .tw-overview-text,
[data-theme="dark"] .tw-rule-para,
[data-theme="dark"] .tw-scholar-contribution {
  color: #c8e0f5;
}

[data-theme="dark"] .tw-section-card-count,
[data-theme="dark"] .tw-examples-count,
[data-theme="dark"] .tw-section-ref,
[data-theme="dark"] .tw-scholar-lifespan,
[data-theme="dark"] .tw-section-label {
  color: #7f97ae;
}

[data-theme="dark"] .tw-section-card-footer,
[data-theme="dark"] .tw-rule-card-footer {
  border-top-color: #1e3448;
}

[data-theme="dark"] .tw-filter-btn {
  background: #0f1f2e;
  border-color: #1e3448;
  color: #7f97ae;
}

[data-theme="dark"] .tw-filter-btn:hover {
  border-color: #85CCFF;
  color: #85CCFF;
}

[data-theme="dark"] .tw-section-card:hover,
[data-theme="dark"] .tw-rule-card:hover {
  border-color: #85CCFF;
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}

/* Mobile */
@media (max-width: 768px) {
  .tw-sections-grid {
    grid-template-columns: 1fr;
  }

  .tw-scholars-grid {
    grid-template-columns: 1fr;
  }

  .tw-intro-ayah {
    font-size: 1.4rem;
  }

  .tw-rule-name {
    font-size: 1.2rem;
  }

  .tw-example-arabic {
    font-size: 1.3rem;
  }
}/* ============================================
   Profile Page
   ============================================ */

.profile-page {
  padding-top: 32px;
  max-width: 600px;
}

/* Hero / Avatar Section */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px;
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.profile-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.profile-avatar-img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #094570;
  box-shadow: 0 4px 16px rgba(9,69,112,0.2);
}

.profile-avatar-initials {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, #094570, #1a6fa8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(9,69,112,0.3);
  letter-spacing: 0.05em;
}

.profile-avatar-loading {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(9,69,112,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.profile-hero-info { flex: 1; }

.profile-display-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: #094570;
  margin-bottom: 4px;
}

.profile-email {
  font-size: 0.825rem;
  color: #6a8090;
  margin-bottom: 4px;
}

.profile-member-since {
  font-size: 0.75rem;
  color: #8a9ab0;
  margin-bottom: 12px;
}

.profile-avatar-btn {
  padding: 8px 18px;
  background: #f0f7ff;
  border: 1.5px solid #c8d8e8;
  border-radius: 100px;
  color: #094570;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-ui);
}

.profile-avatar-btn:hover:not(:disabled) {
  background: #094570;
  color: #ffffff;
  border-color: #094570;
}

.profile-avatar-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Subscription Card */
.profile-sub-card {
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
  border: 1.5px solid;
}

.profile-sub-card--active {
  background: linear-gradient(135deg, rgba(13,110,74,0.05), #ffffff);
  border-color: rgba(13,110,74,0.25);
}

.profile-sub-card--inactive {
  background: #f5f8fb;
  border-color: #c8d8e8;
}

.profile-sub-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.profile-sub-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #6a8090;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 4px;
}

.profile-sub-status {
  font-size: 1rem;
  font-weight: 700;
  color: #0d1b2a;
}

.profile-sub-badge {
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.profile-sub-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
  background: rgba(255,255,255,0.7);
  border-radius: 10px;
}

.profile-sub-detail-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #8a9ab0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.profile-sub-detail-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0d1b2a;
}

.profile-sub-bar-wrapper {
  height: 6px;
  background: rgba(0,0,0,0.08);
  border-radius: 100px;
  overflow: hidden;
}

.profile-sub-bar {
  height: 100%;
  background: linear-gradient(90deg, #0d6e4a, #1aa870);
  border-radius: 100px;
  transition: width 0.8s ease;
}

.profile-sub-cta { margin-top: 4px; }

.profile-sub-cta-text {
  font-size: 0.825rem;
  color: #4a6080;
  line-height: 1.6;
  margin-bottom: 12px;
}

.profile-sub-cta-btn {
  display: inline-block;
  padding: 10px 20px;
  background: #094570;
  color: #ffffff;
  border-radius: 100px;
  font-size: 0.825rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.profile-sub-cta-btn:hover {
  background: #0d5a8a;
  transform: translateY(-1px);
}

/* Tabs */
.profile-tabs {
  display: flex;
  background: #f0f7ff;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 16px;
  gap: 4px;
}

.profile-tab {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #6a8090;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-ui);
}

.profile-tab--active {
  background: #094570;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(9,69,112,0.3);
}

/* Messages */
.profile-error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  background: rgba(231,76,60,0.08);
  border: 1px solid rgba(231,76,60,0.25);
  border-radius: 10px;
  font-size: 0.82rem;
  color: #c0392b;
  line-height: 1.5;
  margin-bottom: 14px;
}

.profile-success {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  background: rgba(39,174,96,0.08);
  border: 1px solid rgba(39,174,96,0.25);
  border-radius: 10px;
  font-size: 0.82rem;
  color: #1e8449;
  line-height: 1.5;
  margin-bottom: 14px;
}

/* Form */
.profile-form {
  padding: 28px;
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
}

.profile-form-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #4a6080;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.profile-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #4a6080;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.profile-input {
  padding: 12px 16px;
  border: 1.5px solid #c8d8e8;
  border-radius: 10px;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: #0d1b2a;
  background: #ffffff;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.profile-input:focus {
  border-color: #094570;
  box-shadow: 0 0 0 3px rgba(9,69,112,0.12);
}

.profile-input--disabled {
  background: #f5f8fb;
  color: #8a9ab0;
  cursor: not-allowed;
}

.profile-field-note {
  font-size: 0.73rem;
  color: #a0b0c0;
  font-style: italic;
}

/* Password rules */
.profile-password-rules {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  background: #f5f8fb;
  border-radius: 8px;
}

.profile-rule {
  font-size: 0.78rem;
  color: #8a9ab0;
  transition: color 0.2s;
}

.profile-rule--met {
  color: #1e8449;
  font-weight: 600;
}

/* Save button */
.profile-save-btn {
  padding: 13px;
  background: linear-gradient(135deg, #094570, #1a6fa8);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(9,69,112,0.25);
}

.profile-save-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(9,69,112,0.35);
}

.profile-save-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Mobile */
@media (max-width: 600px) {
  .profile-hero {
    flex-direction: column;
    text-align: center;
    align-items: center;
    padding: 20px;
  }
  .profile-hero-info {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .profile-sub-details { grid-template-columns: 1fr; }
  .profile-form { padding: 20px; }
}/* src/components/Badges.css */

/* ── Badge Section ──────────────────────────────────────────── */

.badges-section {
  margin-top: 20px;
  padding: 20px;
}

.badges-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.badges-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #094570;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badges-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: #888;
  background: #f0f7ff;
  padding: 2px 10px;
  border-radius: 99px;
}

.badges-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.badges-loading,
.badges-empty {
  font-size: 0.88rem;
  color: #888;
  text-align: center;
  padding: 16px 0;
  margin: 0;
}

/* ── Badge Card ─────────────────────────────────────────────── */

.badge-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border-radius: 12px;
  border: 1.5px solid #e0eaf2;
  background: #fff;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  user-select: none;
}

.badge-card--earned {
  border-color: #094570;
  background: #f0f7ff;
}

.badge-card--earned:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(9, 69, 112, 0.12);
}

.badge-card--locked {
  opacity: 0.45;
  filter: grayscale(1);
}

.badge-card-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.badge-card-name {
  font-size: 0.7rem;
  font-weight: 600;
  color: #094570;
  text-align: center;
  margin: 0;
  line-height: 1.3;
}

/* ── Badge Tooltip ──────────────────────────────────────────── */

.badge-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #0d1b2a;
  color: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  width: 140px;
  z-index: 100;
  pointer-events: none;
}

.badge-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #0d1b2a;
}

.badge-tooltip-text {
  font-size: 0.75rem;
  line-height: 1.4;
  margin: 0 0 4px;
}

.badge-tooltip-locked {
  font-size: 0.7rem;
  color: #aaa;
  margin: 0;
}

/* ── Toast Notification ─────────────────────────────────────── */

.badge-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: #0d1b2a;
  color: #fff;
  border-radius: 14px;
  padding: 16px 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  max-width: 320px;
  animation: badge-slide-in 0.35s ease;
}

@keyframes badge-slide-in {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.badge-toast-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.badge-toast-text {
  flex: 1;
}

.badge-toast-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #85CCFF;
  margin: 0 0 2px;
}

.badge-toast-name {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 2px;
}

.badge-toast-desc {
  font-size: 0.78rem;
  color: #aaa;
  margin: 0;
}

.badge-toast-close {
  background: none;
  border: none;
  color: #888;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  align-self: flex-start;
}

/* ── Badge Strip (Spaces) ───────────────────────────────────── */

.badge-strip {
  display: flex;
  align-items: center;
  gap: 4px;
}

.badge-strip-item {
  font-size: 0.95rem;
  line-height: 1;
}

.badge-strip-more {
  font-size: 0.7rem;
  color: #888;
  font-weight: 600;
}

/* ── Responsive ─────────────────────────────────────────────── */

@media (max-width: 480px) {
  .badges-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .badge-card {
    padding: 10px 6px;
  }

  .badge-card-icon {
    font-size: 1.3rem;
  }

  .badge-toast {
    bottom: 16px;
    right: 16px;
    left: 16px;
    max-width: unset;
  }
}.journey-page {
  padding-top: 32px;
  max-width: 820px;
}

.journey-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
}

.journey-warning {
  border-left: 4px solid #e65100;
  color: #6a4a20;
  font-size: 0.875rem;
}

.journey-loading {
  text-align: center;
  color: var(--text-muted);
}

.journey-section {
  margin-bottom: 40px;
}

.journey-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--regal-blue);
  margin-bottom: 16px;
}

.journey-strongest-note {
  font-size: 0.85rem;
  color: #2e7d32;
  margin-bottom: 12px;
}

/* ---- Milestones stat row ---- */
.journey-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.journey-stat {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 12px;
  text-align: center;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.journey-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--regal-blue);
}

.journey-stat-value--level {
  text-transform: capitalize;
  font-size: 1.15rem;
}

.journey-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ---- Hifdh collection grid ---- */
.journey-hifdh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.journey-hifdh-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.15s ease;
}

.journey-hifdh-card:hover {
  transform: translateY(-2px);
}

.journey-hifdh-title {
  font-weight: 700;
  color: var(--regal-blue);
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.journey-hifdh-arabic {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.journey-hifdh-stats {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.journey-hifdh-due {
  color: #e65100;
  font-weight: 600;
}

/* ---- Strengths & weaknesses bars ---- */
.journey-breakdown {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.journey-breakdown-row {
  display: grid;
  grid-template-columns: 120px 1fr 48px;
  align-items: center;
  gap: 12px;
}

.journey-breakdown-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.journey-breakdown-bar-track {
  height: 8px;
  border-radius: 4px;
  background: #eef4fb;
  overflow: hidden;
}

.journey-breakdown-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.journey-breakdown-pct {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: right;
}

/* ---- Recommendations ---- */
.journey-recs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.journey-rec {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.journey-rec-text {
  font-size: 0.9rem;
  color: var(--text-primary);
  flex: 1;
  min-width: 200px;
}

.journey-rec-btn {
  white-space: nowrap;
}

[data-theme="dark"] .journey-card,
[data-theme="dark"] .journey-stat,
[data-theme="dark"] .journey-hifdh-card,
[data-theme="dark"] .journey-breakdown,
[data-theme="dark"] .journey-rec {
  background: #0f1f2e;
}

[data-theme="dark"] .journey-breakdown-bar-track {
  background: #0a1825;
}

@media (max-width: 768px) {
  .journey-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .journey-breakdown-row {
    grid-template-columns: 90px 1fr 40px;
  }
}/* Positioned as a floating fixed element since it isn't wired into
   Toolbar.jsx's own layout yet — safe to move once that file is
   available, just drop the position/top/right rules below. */

.notif-bell-wrapper {
  position: fixed;
  top: 16px;
  right: 20px;
  z-index: 500;
}

.notif-bell-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid #c8d8e8;
  background: #ffffff;
  color: #094570;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(9, 69, 112, 0.10);
  transition: all 0.15s ease;
}

.notif-bell-btn:hover {
  border-color: #85CCFF;
  background: #f0f7ff;
}

.notif-bell-btn svg {
  width: 20px;
  height: 20px;
}

.notif-bell-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: #c0392b;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.notif-bell-panel {
  position: absolute;
  top: 48px;
  right: 0;
  width: 300px;
  max-width: calc(100vw - 40px);
  background: #ffffff;
  border: 1px solid #c8d8e8;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(9, 69, 112, 0.18);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notif-bell-panel-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #4a6080;
  margin-bottom: 2px;
}

.notif-bell-empty {
  font-size: 0.85rem;
  color: #8a9ab0;
  padding: 8px 0;
}

.notif-bell-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
}

.notif-bell-item:hover {
  background: #f0f7ff;
}

.notif-bell-item-cat {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #094570;
  opacity: 0.7;
}

.notif-bell-item-title {
  font-size: 0.87rem;
  font-weight: 600;
  color: #0d1b2a;
  line-height: 1.4;
}

.notif-bell-viewall {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid #e8f0f8;
  font-size: 0.82rem;
  font-weight: 600;
  color: #094570;
  text-decoration: none;
  text-align: center;
}

.notif-bell-viewall:hover {
  text-decoration: underline;
}

[data-theme="dark"] .notif-bell-btn {
  background: #0f1f2e;
  border-color: #1e3448;
  color: #85CCFF;
}

[data-theme="dark"] .notif-bell-btn:hover {
  background: #132030;
  border-color: #85CCFF;
}

[data-theme="dark"] .notif-bell-panel {
  background: #0f1f2e;
  border-color: #1e3448;
}

[data-theme="dark"] .notif-bell-item:hover {
  background: #132030;
}

[data-theme="dark"] .notif-bell-item-title {
  color: #c8e0f5;
}

[data-theme="dark"] .notif-bell-viewall {
  color: #85CCFF;
  border-top-color: #1e3448;
}

@media (max-width: 768px) {
  .notif-bell-wrapper {
    top: auto;
    bottom: 76px; /* clear of BottomNav */
    right: 16px;
  }

  .notif-bell-panel {
    top: auto;
    bottom: 48px;
  }
}/* ============================================
   Spaces Page
   ============================================ */

.spaces-page {
  padding-top: 32px;
  max-width: 720px;
}

.spaces-back {
  display: inline-block;
  color: #4a6080;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  margin-bottom: 20px;
  padding: 0;
  transition: color 0.15s;
  font-family: var(--font-ui);
}

.spaces-back:hover { color: #094570; }

/* Loading */
.spaces-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  gap: 16px;
  color: #6a8090;
  font-size: 0.875rem;
}

.spaces-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e8f0f8;
  border-top-color: #094570;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Header */
.spaces-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 4px;
  gap: 12px;
}

.spaces-new-btn {
  padding: 10px 20px;
  background: #094570;
  color: #ffffff;
  border: none;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-ui);
  flex-shrink: 0;
  margin-top: 8px;
  box-shadow: 0 4px 12px rgba(9,69,112,0.2);
}

.spaces-new-btn:hover {
  background: #0d5a8a;
  transform: translateY(-1px);
}

/* Categories */
.spaces-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.spaces-cat-btn {
  padding: 6px 14px;
  border: 1.5px solid #c8d8e8;
  border-radius: 100px;
  background: #ffffff;
  color: #4a6080;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-ui);
}

.spaces-cat-btn:hover { border-color: #094570; color: #094570; }

.spaces-cat-btn--active {
  background: #094570;
  border-color: #094570;
  color: #ffffff;
}

/* Posts */
.spaces-posts {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}

.spaces-post-card {
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 14px;
  padding: 20px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-ui);
  width: 100%;
}

.spaces-post-card:hover {
  border-color: #85CCFF;
  box-shadow: 0 4px 16px rgba(9,69,112,0.1);
  transform: translateY(-2px);
}

.spaces-post-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.spaces-cat-badge {
  display: inline-block;
  padding: 3px 10px;
  background: #e8f4ff;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #094570;
  text-transform: capitalize;
}

.spaces-post-date {
  font-size: 0.72rem;
  color: #8a9ab0;
}

.spaces-post-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #094570;
  line-height: 1.4;
}

.spaces-post-preview {
  font-size: 0.825rem;
  color: #4a6080;
  line-height: 1.6;
}

.spaces-post-footer {
  padding-top: 10px;
  border-top: 1px solid #e8f0f8;
}

.spaces-post-read {
  font-size: 0.8rem;
  font-weight: 700;
  color: #094570;
}

/* Empty */
.spaces-empty {
  padding: 48px 24px;
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 14px;
  text-align: center;
}

.spaces-empty-icon { font-size: 2.5rem; margin-bottom: 12px; }
.spaces-empty-text { font-size: 1rem; font-weight: 700; color: #094570; margin-bottom: 6px; }
.spaces-empty-sub { font-size: 0.825rem; color: #8a9ab0; }

/* Error */
.spaces-error {
  padding: 10px 14px;
  background: rgba(231,76,60,0.08);
  border: 1px solid rgba(231,76,60,0.25);
  border-radius: 8px;
  font-size: 0.82rem;
  color: #c0392b;
  margin-bottom: 12px;
}

/* Post detail */
.spaces-post-detail {
  padding: 24px;
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 14px;
  margin-bottom: 20px;
}

.spaces-post-detail-header { margin-bottom: 16px; }

.spaces-post-detail-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #094570;
  margin: 8px 0 4px;
  line-height: 1.4;
}

.spaces-post-detail-date { font-size: 0.75rem; color: #8a9ab0; }

.spaces-post-detail-body {
  font-size: 0.9rem;
  color: #0d1b2a;
  line-height: 1.8;
}

/* Replies */
.spaces-replies { margin-bottom: 20px; }

.spaces-replies-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #4a6080;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 12px;
}

.spaces-no-replies {
  font-size: 0.825rem;
  color: #8a9ab0;
  font-style: italic;
  padding: 16px 0;
}

.spaces-reply {
  padding: 16px 20px;
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 12px;
  margin-bottom: 10px;
}

.spaces-reply--scholar {
  border-color: #094570 !important;
  background: linear-gradient(135deg, rgba(9,69,112,0.03), #ffffff) !important;
  border-left: 4px solid #094570 !important;
}

.spaces-reply-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.spaces-reply-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  flex-shrink: 0;
}

.spaces-reply-author {
  font-size: 0.82rem;
  font-weight: 700;
  color: #094570;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.spaces-scholar-badge {
  display: inline-block;
  padding: 1px 8px;
  background: #094570;
  color: #ffffff;
  border-radius: 100px;
  font-size: 0.65rem;
  font-weight: 700;
}

.spaces-reply-date { font-size: 0.72rem; color: #8a9ab0; }

.spaces-reply-body {
  font-size: 0.875rem;
  color: #0d1b2a;
  line-height: 1.7;
}

/* Reply input */
.spaces-reply-input {
  padding: 20px 24px;
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 14px;
  margin-bottom: 40px;
}

.spaces-reply-input-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #4a6080;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 12px;
}

/* Form elements */
.spaces-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }

.spaces-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #4a6080;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.spaces-input, .spaces-select {
  padding: 11px 14px;
  border: 1.5px solid #c8d8e8;
  border-radius: 10px;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: #0d1b2a;
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s;
}

.spaces-input:focus, .spaces-select:focus, .spaces-textarea:focus {
  border-color: #094570;
  box-shadow: 0 0 0 3px rgba(9,69,112,0.1);
}

.spaces-textarea {
  padding: 11px 14px;
  border: 1.5px solid #c8d8e8;
  border-radius: 10px;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: #0d1b2a;
  background: #ffffff;
  outline: none;
  resize: vertical;
  transition: border-color 0.15s;
  width: 100%;
}

.spaces-submit-btn {
  padding: 12px 24px;
  background: linear-gradient(135deg, #094570, #1a6fa8);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(9,69,112,0.2);
}

.spaces-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(9,69,112,0.3);
}

.spaces-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.spaces-cancel-btn {
  padding: 12px 24px;
  background: #f0f4f8;
  color: #4a6080;
  border: 1.5px solid #c8d8e8;
  border-radius: 10px;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.spaces-cancel-btn:hover { background: #e8f0f8; }

/* Modal */
.spaces-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.spaces-modal {
  background: #ffffff !important;
  border-radius: 18px;
  padding: 28px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,0.25);
  animation: modalIn 0.25s cubic-bezier(0.16,1,0.3,1) both;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.spaces-modal-title {
  font-size: 1rem;
  font-weight: 800;
  color: #094570;
  margin-bottom: 20px;
}

.spaces-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 4px;
}

/* Paywall */
.spaces-paywall {
  background: #ffffff;
  border: 1.5px solid #c8d8e8;
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(9,69,112,0.08);
}

.spaces-paywall-icon { font-size: 3rem; margin-bottom: 16px; }

.spaces-paywall-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #094570;
  margin-bottom: 12px;
}

.spaces-paywall-desc {
  font-size: 0.9rem;
  color: #4a6080;
  line-height: 1.7;
  max-width: 480px;
  margin: 0 auto 28px;
}

.spaces-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 28px;
  text-align: left;
}

.spaces-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #f5f8fb;
  border-radius: 10px;
  font-size: 0.825rem;
  color: #0d1b2a;
}

.spaces-price-card {
  background: linear-gradient(135deg, #094570, #1a6fa8);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 24px;
}

.spaces-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin-bottom: 6px;
}

.spaces-currency { font-size: 1.5rem; font-weight: 700; color: #85CCFF; }
.spaces-amount { font-size: 3rem; font-weight: 800; color: #ffffff; line-height: 1; }
.spaces-period { font-size: 1rem; color: rgba(255,255,255,0.6); }

.spaces-price-note {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 20px;
}

.spaces-pay-btn {
  padding: 14px 36px;
  background: #ffffff;
  color: #094570;
  border: none;
  border-radius: 100px;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.spaces-pay-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.spaces-paywall-hadith {
  font-size: 0.82rem;
  color: #6a8090;
  font-style: italic;
  line-height: 1.7;
}

.spaces-paywall-hadith span {
  font-size: 0.75rem;
  color: #8a9ab0;
  font-style: normal;
  font-weight: 600;
}

/* Mobile */
@media (max-width: 600px) {
  .spaces-paywall { padding: 24px 20px; }
  .spaces-features { grid-template-columns: 1fr; }
  .spaces-modal { padding: 20px; }
}

/* ── Main tabs ── */
.spaces-main-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.spaces-main-tab {
  flex: 1;
  min-width: 110px;
  padding: 11px 14px;
  border: 2px solid #c8d8e8;
  border-radius: 10px;
  background: #f5f8fb;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  color: #6a8090;
  transition: all 0.2s ease;
}

.spaces-main-tab:hover {
  border-color: #094570;
  color: #094570;
}

.spaces-main-tab--active {
  border-color: #094570;
  color: #094570;
  background: #fff;
  box-shadow: 0 2px 8px rgba(9,69,112,0.10);
}

/* ── Class page ── */
.spaces-class-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.spaces-class-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  border: 2px solid #094570;
  border-radius: 14px;
  background: linear-gradient(135deg, #f0f7ff 0%, #fff 100%);
}

.spaces-class-icon {
  font-size: 2.4rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.spaces-class-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0d1b2a;
  margin-bottom: 2px;
}

.spaces-class-arabic {
  font-size: 1rem;
  color: #094570;
  margin-bottom: 6px;
}

.spaces-class-desc {
  font-size: 0.875rem;
  color: #4a6080;
  line-height: 1.6;
}

/* ── Level buttons ── */
.spaces-class-levels {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.spaces-class-level-btn {
  flex: 1;
  min-width: 100px;
  padding: 10px 12px;
  border: 2px solid #c8d8e8;
  border-radius: 10px;
  background: #f5f8fb;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  color: #6a8090;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.spaces-class-level-btn:hover {
  border-color: #094570;
  color: #094570;
}

.spaces-class-level-btn--active {
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(9,69,112,0.10);
}

.spaces-class-level-arabic {
  font-size: 0.72rem;
  font-family: var(--font-arabic, 'Scheherazade New', serif);
}

/* ── Class content ── */
.spaces-class-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.spaces-class-content-header {
  padding: 20px;
}

.spaces-class-content-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.spaces-class-level-badge {
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 100px;
}

.spaces-class-duration,
.spaces-class-commitment {
  font-size: 0.78rem;
  color: #4a6080;
  font-weight: 600;
}

.spaces-class-content-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0d1b2a;
  margin-bottom: 3px;
}

.spaces-class-content-arabic {
  font-size: 0.95rem;
  color: #094570;
  margin-bottom: 10px;
}

.spaces-class-content-desc {
  font-size: 0.875rem;
  color: #2a3a4a;
  line-height: 1.7;
}

/* ── Sections ── */
.spaces-class-section {
  padding: 18px 20px;
}

.spaces-class-section-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: #094570;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.spaces-class-curriculum {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  margin: 0;
}

.spaces-class-curriculum-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.875rem;
  color: #1a2a3a;
  line-height: 1.6;
}

.spaces-class-curriculum-num {
  background: #094570;
  color: #85CCFF;
  font-size: 0.72rem;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.spaces-class-outcome-card {
  background: linear-gradient(135deg, #f0f7ff 0%, #fff 100%);
  border: 1.5px solid #85CCFF;
}

.spaces-class-outcome-text {
  font-size: 0.9rem;
  color: #0d1b2a;
  line-height: 1.7;
  font-weight: 500;
}

/* ── Hadith list ── */
.spaces-class-hadith-note {
  font-size: 0.82rem;
  color: #4a6080;
  margin-bottom: 14px;
  font-style: italic;
}

.spaces-hadith-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.spaces-hadith-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: #f5f8fb;
  border-radius: 8px;
  border: 1px solid #dde8f2;
}

.spaces-hadith-num {
  background: #7b3f00;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.spaces-hadith-arabic {
  font-size: 1rem;
  color: #0d1b2a;
  line-height: 1.8;
  margin-bottom: 4px;
}

.spaces-hadith-translation {
  font-size: 0.8rem;
  color: #4a6080;
  font-style: italic;
}

/* ── CTA ── */
.spaces-class-cta {
  padding: 20px;
  text-align: center;
  background: linear-gradient(135deg, #f0f7ff 0%, #fff 100%);
}

.spaces-class-cta-text {
  font-size: 0.875rem;
  color: #2a3a4a;
  line-height: 1.7;
  margin-bottom: 16px;
}

/* ── Dark mode ── */
[data-theme="dark"] .spaces-main-tab {
  background: #0f1f2e;
  border-color: #1e3448;
  color: #6a8090;
}

[data-theme="dark"] .spaces-main-tab:hover,
[data-theme="dark"] .spaces-main-tab--active {
  border-color: #85CCFF;
  color: #85CCFF;
  background: #0a1825;
}

[data-theme="dark"] .spaces-class-header {
  background: linear-gradient(135deg, #0a1825 0%, #0f1f2e 100%);
}

[data-theme="dark"] .spaces-class-title {
  color: #c8e0f5;
}

[data-theme="dark"] .spaces-class-level-btn {
  background: #0f1f2e;
  border-color: #1e3448;
  color: #6a8090;
}

[data-theme="dark"] .spaces-class-level-btn:hover,
[data-theme="dark"] .spaces-class-level-btn--active {
  border-color: #85CCFF;
  color: #85CCFF;
  background: #0a1825;
}

[data-theme="dark"] .spaces-class-content-header {
  background: #0f1f2e;
}

[data-theme="dark"] .spaces-class-content-title {
  color: #c8e0f5;
}

[data-theme="dark"] .spaces-class-content-desc,
[data-theme="dark"] .spaces-class-outcome-text {
  color: #8aaac8;
}

[data-theme="dark"] .spaces-class-curriculum-item {
  color: #a8c0d8;
}

[data-theme="dark"] .spaces-hadith-item {
  background: #0a1825;
  border-color: #1e3448;
}

[data-theme="dark"] .spaces-hadith-arabic {
  color: #c8e0f5;
}

[data-theme="dark"] .spaces-class-outcome-card {
  background: linear-gradient(135deg, #0a1825 0%, #0f1f2e 100%);
  border-color: #1e4a70;
}

[data-theme="dark"] .spaces-class-cta {
  background: linear-gradient(135deg, #0a1825 0%, #0f1f2e 100%);
}

[data-theme="dark"] .spaces-class-cta-text {
  color: #8aaac8;
}

/* Telegram CTA */
.spaces-telegram-btn {
  display: inline-block;
  text-decoration: none;
  text-align: center;
  margin-bottom: 12px;
  background: #0088cc;
  border-color: #0088cc;
}

.spaces-telegram-btn:hover {
  background: #006fa8;
  border-color: #006fa8;
}

.spaces-class-cta-note {
  font-size: 0.78rem;
  color: #6a8090;
  line-height: 1.6;
  margin-top: 4px;
  font-style: italic;
}

[data-theme="dark"] .spaces-class-cta-note {
  color: #4a6080;
}
.spaces-post-author {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.spaces-post-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e8f0f8;
  color: #094570;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.spaces-post-author-name {
  font-size: 0.78rem;
  color: #666;
  font-weight: 500;
}

/* ── Class schedule strip ── */
.spaces-schedule-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #4a6080;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 16px 0 10px;
}

.spaces-schedule {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.spaces-schedule-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #ffffff;
  border: 1.5px solid #c8d8e8;
  border-radius: 14px;
  text-align: left;
  font-family: var(--font-ui);
  transition: all 0.2s ease;
}

.spaces-schedule-card:hover {
  border-color: #85CCFF;
  box-shadow: 0 4px 16px rgba(9,69,112,0.1);
}

.spaces-schedule-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.spaces-schedule-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex-grow: 1;
}

.spaces-schedule-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #094570;
}

.spaces-schedule-when {
  font-size: 0.72rem;
  color: #8a9ab0;
}

.spaces-schedule-countdown {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: #7a5a13;
  background: #fdf3dd;
  border: 1px solid #ecd9a8;
  padding: 4px 10px;
  border-radius: 100px;
  white-space: nowrap;
}

/* ── Featured scholar answer ── */
.spaces-featured {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 20px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(9,69,112,0.04), #ffffff) !important;
  border: 1.5px solid #094570;
  border-radius: 14px;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: all 0.2s ease;
}

.spaces-featured:hover {
  box-shadow: 0 6px 20px rgba(9,69,112,0.15);
  transform: translateY(-2px);
}

.spaces-featured-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.spaces-featured-tag {
  display: inline-block;
  padding: 3px 10px;
  background: #094570;
  color: #ffffff;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
}

.spaces-featured-title {
  font-size: 1rem;
  font-weight: 800;
  color: #094570;
  line-height: 1.4;
}

.spaces-featured-answer {
  font-size: 0.85rem;
  color: #4a6080;
  line-height: 1.7;
  font-style: italic;
}

/* ── Category color dots ── */
.spaces-cat-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  flex-shrink: 0;
}

.spaces-cat-btn {
  display: inline-flex;
  align-items: center;
}

.spaces-cat-badge {
  display: inline-flex;
  align-items: center;
}

/* ── New-post indicator ── */
.spaces-new-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e65100;
  margin-right: 6px;
  vertical-align: middle;
  animation: newPulse 2s ease-in-out infinite;
}

@keyframes newPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── Post footer with reply count ── */
.spaces-post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.spaces-post-replies {
  font-size: 0.75rem;
  font-weight: 600;
  color: #4a6080;
}

/* ── Dark mode for new elements ── */
[data-theme="dark"] .spaces-schedule-card {
  background: #0f1f2e;
  border-color: #1e3448;
}

[data-theme="dark"] .spaces-schedule-card:hover {
  border-color: #85CCFF;
}

[data-theme="dark"] .spaces-schedule-title {
  color: #85CCFF;
}

[data-theme="dark"] .spaces-schedule-when {
  color: #6a8090;
}

[data-theme="dark"] .spaces-schedule-countdown {
  color: #f0d089;
  background: rgba(200,149,47,0.14);
  border-color: rgba(200,149,47,0.35);
}

[data-theme="dark"] .spaces-schedule-label {
  color: #6a8090;
}

[data-theme="dark"] .spaces-featured {
  background: linear-gradient(135deg, #0a1825, #0f1f2e) !important;
  border-color: #1e4a70;
}

[data-theme="dark"] .spaces-featured-title {
  color: #85CCFF;
}

[data-theme="dark"] .spaces-featured-answer {
  color: #8aaac8;
}

[data-theme="dark"] .spaces-post-replies {
  color: #6a8090;
}

@media (max-width: 600px) {
  .spaces-schedule {
    grid-template-columns: 1fr;
  }
}

.spaces-schedule-live {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffffff;
  background: #c62828;
  padding: 4px 10px;
  border-radius: 100px;
  white-space: nowrap;
  animation: newPulse 1.5s ease-in-out infinite;
}

[data-theme="dark"] .spaces-schedule-live {
  background: #b71c1c;
}

/* ═══════════════════════════════════════════════
   New tabs: Accountability Partners, Sahaabah
   Circles, Daily Tafseer
   ═══════════════════════════════════════════════ */

/* ── Shared section intro card ── */
.spaces-section-intro {
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(9,69,112,0.04), #ffffff) !important;
  border: 1.5px solid #c8d8e8;
  border-left: 4px solid #094570;
  border-radius: 12px;
  margin-bottom: 20px;
}

.spaces-section-intro-title {
  font-size: 1rem;
  font-weight: 800;
  color: #094570;
  margin-bottom: 8px;
}

.spaces-section-intro-text {
  font-size: 0.85rem;
  color: #2a3a4a;
  line-height: 1.7;
}

/* ── Accountability partners ── */
.spaces-pair-card {
  padding: 20px;
  background: #ffffff !important;
  border: 1.5px solid #a5d6a7;
  border-radius: 14px;
  margin-bottom: 20px;
}

.spaces-pair-badge {
  display: inline-block;
  padding: 3px 10px;
  background: #e8f5e9;
  color: #2e7d32;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.spaces-pair-member {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.spaces-pair-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #094570;
}

.spaces-pair-since {
  font-size: 0.78rem;
  color: #8a9ab0;
}

.spaces-available-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #4a6080;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.spaces-available-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.spaces-available-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 12px;
  flex-wrap: wrap;
}

/* ── Sahaabah circles ── */
.spaces-circle-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.spaces-circle-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 14px;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: all 0.2s ease;
}

.spaces-circle-card:hover:not(:disabled) {
  border-color: #85CCFF;
  box-shadow: 0 6px 20px rgba(9,69,112,0.1);
  transform: translateY(-2px);
}

.spaces-circle-card:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.spaces-circle-icon { font-size: 1.8rem; }

.spaces-circle-name {
  font-size: 1rem;
  font-weight: 800;
  color: #094570;
  margin: 0;
}

.spaces-circle-arabic {
  font-size: 0.95rem;
  color: #4a6080;
  margin: 0;
}

.spaces-circle-blurb {
  font-size: 0.8rem;
  color: #2a3a4a;
  line-height: 1.6;
  flex: 1;
}

.spaces-circle-count {
  font-size: 0.72rem;
  font-weight: 600;
  color: #8a9ab0;
  padding-top: 8px;
  border-top: 1px solid #e8f0f8;
}

.spaces-circle-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 14px;
  margin-bottom: 16px;
}

.spaces-circle-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

/* ── Daily tafseer ── */
.spaces-tafseer-view {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.spaces-tafseer-card {
  padding: 22px 24px;
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 14px;
}

.spaces-tafseer-ref {
  font-size: 0.78rem;
  font-weight: 700;
  color: #4a6080;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.spaces-tafseer-arabic {
  color: #094570;
  line-height: 2.2;
  margin-bottom: 10px;
}

.spaces-tafseer-translation {
  font-size: 0.9rem;
  color: #4a6080;
  font-style: italic;
  line-height: 1.7;
}

.spaces-tafseer-body {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-primary);
  white-space: pre-wrap;
}

.spaces-tafseer-start {
  width: 100%;
  padding: 16px;
  font-size: 0.95rem;
}

.spaces-tafseer-note {
  font-size: 0.8rem;
  color: #8a9ab0;
  font-style: italic;
  text-align: center;
  padding: 12px 0;
}

.spaces-tafseer-quiz-context {
  font-size: 1.05rem;
  color: #4a6080;
  line-height: 1.9;
  direction: rtl;
  text-align: right;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #dde8f2;
}

.spaces-alldone {
  padding: 18px;
  background: #f0f9f2 !important;
  border: 1.5px solid #a5d6a7;
  border-radius: 12px;
  color: #2e7d32;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

.spaces-result-actions {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

@media (max-width: 600px) {
  .spaces-circle-grid { grid-template-columns: 1fr; }
  .spaces-available-item { flex-direction: column; align-items: flex-start; }
}

/* ── Dark mode for new tabs ── */
[data-theme="dark"] .spaces-section-intro {
  background: linear-gradient(135deg, rgba(133,204,255,0.06), #0f1f2e) !important;
  border-color: #1e3448;
  border-left-color: #85CCFF;
}

[data-theme="dark"] .spaces-section-intro-title {
  color: #85CCFF;
}

[data-theme="dark"] .spaces-section-intro-text {
  color: #a8c0d8;
}

[data-theme="dark"] .spaces-pair-card {
  background: #0f1f2e !important;
  border-color: rgba(46,125,50,0.4);
}

[data-theme="dark"] .spaces-pair-badge {
  background: rgba(46,125,50,0.15);
  color: #7fc98a;
}

[data-theme="dark"] .spaces-pair-name {
  color: #85CCFF;
}

[data-theme="dark"] .spaces-available-label {
  color: #7f97ae;
}

[data-theme="dark"] .spaces-available-item {
  background: #0f1f2e !important;
  border-color: #1e3448;
}

[data-theme="dark"] .spaces-circle-card {
  background: #0f1f2e !important;
  border-color: #1e3448;
}

[data-theme="dark"] .spaces-circle-card:hover:not(:disabled) {
  border-color: #85CCFF;
}

[data-theme="dark"] .spaces-circle-name {
  color: #85CCFF;
}

[data-theme="dark"] .spaces-circle-arabic {
  color: #7f97ae;
}

[data-theme="dark"] .spaces-circle-blurb {
  color: #a8c0d8;
}

[data-theme="dark"] .spaces-circle-count {
  color: #7f97ae;
  border-top-color: #1e3448;
}

[data-theme="dark"] .spaces-circle-header {
  background: #0f1f2e !important;
  border-color: #1e3448;
}

[data-theme="dark"] .spaces-tafseer-card {
  background: #0f1f2e !important;
  border-color: #1e3448;
}

[data-theme="dark"] .spaces-tafseer-ref {
  color: #7f97ae;
}

[data-theme="dark"] .spaces-tafseer-arabic {
  color: #85CCFF;
}

[data-theme="dark"] .spaces-tafseer-translation {
  color: #a8c0d8;
}

[data-theme="dark"] .spaces-tafseer-body {
  color: #c8e0f5;
}

[data-theme="dark"] .spaces-tafseer-note {
  color: #7f97ae;
}

[data-theme="dark"] .spaces-tafseer-quiz-context {
  color: #a8c0d8;
  border-bottom-color: #1e3448;
}

[data-theme="dark"] .spaces-alldone {
  background: rgba(46,125,50,0.1) !important;
  border-color: rgba(46,125,50,0.4);
  color: #7fc98a;
}/* ============================================
   Prayer Times Page
   ============================================ */

.pt-page {
  padding-top: 32px;
  max-width: 860px;
}

.pt-location-banner {
  background: rgba(9,69,112,0.06);
  border: 1px solid #c8d8e8;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 0.825rem;
  color: #4a6080;
  margin-bottom: 20px;
}

/* Wrapper */
.pt-wrapper {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items: start;
}

/* Clock */
.pt-clock-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pt-clock-face {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #0d5a8a, #062f4a);
  box-shadow:
    0 0 0 6px rgba(133,204,255,0.15),
    0 0 0 12px rgba(9,69,112,0.2),
    0 24px 60px rgba(9,69,112,0.4),
    inset 0 2px 4px rgba(255,255,255,0.1);
  position: relative;
  flex-shrink: 0;
}

.pt-clock-svg { width: 100%; height: 100%; }

/* Panel */
.pt-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Time display */
.pt-time-display {
  background: linear-gradient(135deg, #094570, #1a6fa8);
  border-radius: 14px;
  padding: 20px 24px;
  box-shadow: 0 4px 20px rgba(9,69,112,0.2);
}

.pt-time {
  font-size: 2.4rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.05em;
  line-height: 1;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}

.pt-date {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 4px;
}

.pt-hijri {
  font-size: 1rem;
  color: #85CCFF;
}

/* Next prayer — was rgba(9,69,112,0.06), a near-transparent background that
   let the dark page show through, making the navy text on top unreadable.
   Now a solid light tint so the box (and its text) is always legible. */
.pt-next {
  background: #eaf3fb;
  border: 1.5px solid #c8d8e8;
  border-left: 4px solid #094570;
  border-radius: 12px;
  padding: 16px 20px;
}

.pt-next-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #6a8090;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.pt-next-name {
  font-size: 1.5rem;
  color: #094570;
  margin-bottom: 4px;
}

.pt-next-countdown {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0d1b2a;
  font-variant-numeric: tabular-nums;
}

/* Prayer list */
.pt-prayer-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pt-prayer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #ffffff;
  border: 1.5px solid #c8d8e8;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.pt-prayer-row--active {
  background: linear-gradient(135deg, #094570, #1a6fa8) !important;
  border-color: #094570 !important;
  box-shadow: 0 4px 16px rgba(9,69,112,0.25);
}

/* Was rgba(9,69,112,0.04) !important — nearly fully transparent, so on a
   dark page this row went almost black while its text stayed dark navy,
   making the row (and its prayer time, e.g. Dhuhr) look blank/missing.
   Now a solid light tint, consistent with the default white row. */
.pt-prayer-row--next {
  background: #eaf3fb !important;
  border-color: #094570 !important;
}

.pt-prayer-arabic {
  font-size: 1.05rem;
  color: #0d1b2a;
  margin-bottom: 2px;
}

.pt-prayer-row--active .pt-prayer-arabic {
  color: #ffffff;
}

.pt-prayer-en {
  font-size: 0.72rem;
  color: #8a9ab0;
  font-weight: 500;
}

.pt-prayer-row--active .pt-prayer-en {
  color: rgba(255,255,255,0.6);
}

.pt-prayer-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.pt-prayer-time {
  font-size: 0.9rem;
  font-weight: 700;
  color: #094570;
  font-variant-numeric: tabular-nums;
}

.pt-prayer-row--active .pt-prayer-time {
  color: #ffffff;
}

/* Badges */
.pt-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
}

.pt-badge--now {
  background: rgba(255,255,255,0.25);
  color: #ffffff;
}

/* Was rgba(9,69,112,0.1) — low-contrast text on a near-transparent chip,
   easy to misread ("Next" looking like "New") at this font size. Now solid. */
.pt-badge--next {
  background: #dbe9f6;
  color: #094570;
}

/* Mobile */
@media (max-width: 768px) {
  .pt-wrapper {
    grid-template-columns: 1fr;
  }

  .pt-clock-face {
    width: 240px;
    height: 240px;
  }

  .pt-time {
    font-size: 2rem;
  }
}.disciplines-header {
  margin-bottom: 28px;
}

.disciplines-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.disciplines-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: #eef6fc;
  border: 1px solid #d0e8f8;
  border-radius: 14px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.disciplines-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(13, 74, 115, 0.12);
}

.disciplines-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.disciplines-card-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.disciplines-card-arabic {
  font-size: 1.15rem;
  color: #1a6fa8;
}

.disciplines-card-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0d1b2a;
  margin: 0;
}

.disciplines-card-desc {
  font-size: 0.85rem;
  line-height: 1.6;
  color: #5c7186;
  margin: 0;
  flex-grow: 1;
}

.disciplines-card-count {
  font-size: 0.72rem;
  font-weight: 600;
  color: #1a6fa8;
  background: #dcedf9;
  padding: 3px 10px;
  border-radius: 999px;
  align-self: flex-start;
  margin-top: 4px;
}

[data-theme="dark"] .disciplines-card {
  background: #0f2c40;
  border-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .disciplines-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .disciplines-card-arabic {
  color: #85ccff;
}

[data-theme="dark"] .disciplines-card-name {
  color: #f2e8d3;
}

[data-theme="dark"] .disciplines-card-desc {
  color: #7d93a6;
}

[data-theme="dark"] .disciplines-card-count {
  color: #85ccff;
  background: rgba(133, 204, 255, 0.12);
}

@media (max-width: 600px) {
  .disciplines-grid {
    grid-template-columns: 1fr;
  }
}/* ============================================
   Hifdh Simulator — full stylesheet
   (replaces the previous Hifdh.css entirely)
   ============================================ */

.hifdh-page {
  padding-top: 32px;
  max-width: 720px;
}

/* ── Collection chooser ──
   NOTE: selectors below cover both `.hifdh-collection` and the
   `.hifdh-collection-card` / `.hifdh-collection-body` /
   `.hifdh-collection-subtitle` names actually rendered by Hifdh.jsx,
   so styling (and the dark-mode overrides) apply no matter which
   version of the component markup is in place. */
.hifdh-collections {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.hifdh-collection,
.hifdh-collection-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 18px;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: all 0.2s ease;
}

.hifdh-collection:hover,
.hifdh-collection-card:hover {
  border-color: #85CCFF;
  box-shadow: 0 10px 32px rgba(9,69,112,0.1);
  transform: translateY(-3px);
}

.hifdh-collection-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Wraps the title/arabic/subtitle/stats text column when the card
   markup nests them in a body div (`.hifdh-collection-body`). */
.hifdh-collection-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}

.hifdh-collection-icon { font-size: 2rem; }

.hifdh-collection-arabic {
  font-size: 1.3rem;
  color: #094570;
}

.hifdh-collection-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #094570;
  margin: 0;
}

.hifdh-collection-sub,
.hifdh-collection-subtitle {
  font-size: 0.82rem;
  color: #4a6080;
  margin: 0;
  flex-grow: 1;
}

.hifdh-collection-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #8a9ab0;
  padding-top: 10px;
  border-top: 1px solid #e8f0f8;
}

.hifdh-collection-due { color: #e65100; }

.hifdh-back-choose { margin-bottom: 12px; display: inline-block; }

/* ── Difficulty toggle ── */
.hifdh-mode {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 8px;
}

.hifdh-mode-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #4a6080;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hifdh-mode-toggle {
  display: inline-flex;
  background: #f0f4f8;
  border: 1.5px solid #c8d8e8;
  border-radius: 100px;
  padding: 3px;
  gap: 3px;
}

.hifdh-mode-btn {
  padding: 7px 18px;
  border: none;
  border-radius: 100px;
  background: transparent;
  color: #6a8090;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hifdh-mode-btn--active {
  background: #094570;
  color: #ffffff;
}

.hifdh-mode-btn--hard {
  background: #b3400f;
}

.hifdh-mode-note {
  font-size: 0.78rem;
  color: #8a5a2b;
  background: #fdf3e3;
  border: 1px solid #ecd9a8;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 8px;
  line-height: 1.6;
}

/* ── Stats row ── */
.hifdh-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.hifdh-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 8px;
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 14px;
  text-align: center;
}

.hifdh-stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: #094570;
}

.hifdh-stat-label {
  font-size: 0.72rem;
  color: #8a9ab0;
}

/* ── Buttons ── */
.hifdh-btn {
  padding: 12px 24px;
  background: #f0f4f8;
  color: #094570;
  border: 1.5px solid #c8d8e8;
  border-radius: 100px;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hifdh-btn--primary {
  background: linear-gradient(135deg, #094570, #1a6fa8);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 12px rgba(9,69,112,0.2);
}

.hifdh-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(9,69,112,0.3);
}

.hifdh-start {
  width: 100%;
  padding: 16px;
  font-size: 1rem;
  margin-bottom: 32px;
}

.hifdh-alldone {
  padding: 20px;
  background: #f0f9f2 !important;
  border: 1.5px solid #a5d6a7;
  border-radius: 14px;
  margin-bottom: 32px;
  font-size: 0.9rem;
  color: #2e7d32;
  text-align: center;
}

/* ── Session ── */
.hifdh-session-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.hifdh-quit {
  background: none;
  border: none;
  color: #8a9ab0;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: var(--font-ui);
}

.hifdh-quit:hover { color: #c0392b; }

.hifdh-progress-text {
  font-size: 0.8rem;
  font-weight: 700;
  color: #4a6080;
}

.hifdh-progress-bar {
  height: 6px;
  background: #e8f0f8;
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 24px;
}

.hifdh-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #094570, #1a6fa8);
  border-radius: 100px;
  transition: width 0.3s ease;
}

.hifdh-question {
  padding: 24px;
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 14px;
  margin-bottom: 20px;
}

.hifdh-question-prompt {
  font-size: 0.8rem;
  font-weight: 700;
  color: #4a6080;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.hifdh-question-arabic {
  font-size: 1.35rem;
  line-height: 2.3;
  color: #0d1b2a;
  direction: rtl;
  text-align: right;
}

.hifdh-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.hifdh-option {
  padding: 16px 18px;
  background: #ffffff;
  border: 1.5px solid #c8d8e8;
  border-radius: 12px;
  font-family: var(--font-ui);
  font-size: 1rem;
  color: #0d1b2a;
  cursor: pointer;
  text-align: right;
  direction: rtl;
  transition: all 0.15s ease;
  line-height: 1.9;
}

.hifdh-option .arabic { font-size: 1.1rem; }

.hifdh-option--latin {
  direction: ltr;
  text-align: left;
  font-weight: 600;
}

.hifdh-option:hover:not(:disabled) {
  border-color: #85CCFF;
  background: #f5faff;
}

.hifdh-option--correct {
  border-color: #2e7d32 !important;
  background: #f0f9f2 !important;
}

.hifdh-option--wrong {
  border-color: #c62828 !important;
  background: #fdf0f0 !important;
}

.hifdh-option--faded { opacity: 0.45; }

.hifdh-next {
  width: 100%;
  padding: 14px;
}

/* ── Typed free-recall ── */
.hifdh-typed {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.hifdh-typed-input {
  padding: 16px 18px;
  background: #ffffff;
  border: 1.5px solid #c8d8e8;
  border-radius: 12px;
  font-family: var(--font-ui);
  font-size: 1.1rem;
  line-height: 1.9;
  color: #0d1b2a;
  resize: vertical;
}

.hifdh-typed-input:focus {
  outline: none;
  border-color: #85CCFF;
  box-shadow: 0 0 0 3px rgba(133,204,255,0.25);
}

.hifdh-typed-input:disabled {
  opacity: 0.7;
  background: #f5f8fb;
}

.hifdh-typed-feedback {
  padding: 16px 18px;
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1.7;
}

.hifdh-typed-feedback--correct {
  background: #f0f9f2;
  border: 1.5px solid #a5d6a7;
  color: #2e7d32;
}

.hifdh-typed-feedback--wrong {
  background: #fdf0f0;
  border: 1.5px solid #f0b8b8;
  color: #c0392b;
}

.hifdh-typed-answer {
  margin-top: 8px;
  font-size: 1.05rem;
  line-height: 2;
  direction: rtl;
  text-align: right;
  color: #0d1b2a;
}

/* ── Order drill ── */
.hifdh-order-built {
  min-height: 64px;
  padding: 14px 16px;
  background: #f5f8fb;
  border: 1.5px dashed #c8d8e8;
  border-radius: 12px;
  direction: rtl;
  text-align: right;
  font-size: 1.1rem;
  line-height: 2.1;
  color: #0d1b2a;
}

.hifdh-order-built--correct {
  border-style: solid;
  border-color: #2e7d32;
  background: #f0f9f2;
}

.hifdh-order-built--wrong {
  border-style: solid;
  border-color: #c62828;
  background: #fdf0f0;
}

.hifdh-order-hint {
  font-size: 0.82rem;
  color: #8a9ab0;
  font-style: italic;
  direction: ltr;
  display: block;
  text-align: left;
}

.hifdh-option--segment {
  border-style: dashed;
}

.hifdh-undo {
  margin-bottom: 20px;
}

.hifdh-order-answer {
  padding: 16px 18px;
  background: #f0f9f2;
  border: 1.5px solid #a5d6a7;
  border-radius: 12px;
  margin-bottom: 20px;
  direction: rtl;
  text-align: right;
  font-size: 1.05rem;
  line-height: 2.1;
}

.hifdh-order-answer-label {
  direction: ltr;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  color: #2e7d32;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

/* ── Done screen ── */
.hifdh-done {
  padding: 40px 24px;
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 18px;
  text-align: center;
  margin-top: 20px;
}

.hifdh-done-icon { font-size: 3rem; margin-bottom: 12px; }

.hifdh-done-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #094570;
  margin-bottom: 8px;
}

.hifdh-done-score {
  font-size: 1rem;
  font-weight: 700;
  color: #4a6080;
  margin-bottom: 10px;
}

.hifdh-done-note {
  font-size: 0.85rem;
  color: #8a9ab0;
  margin-bottom: 24px;
  line-height: 1.7;
}

.hifdh-done-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Memorization map ── */
.hifdh-section-title {
  font-size: 1rem;
  font-weight: 800;
  color: #094570;
  margin: 8px 0 10px;
}

.hifdh-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.72rem;
  color: #4a6080;
  margin-bottom: 14px;
}

.hifdh-legend span { display: inline-flex; align-items: center; gap: 5px; }

.hifdh-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.hifdh-dot--strong   { background: #2e7d32; }
.hifdh-dot--building { background: #e6a817; }
.hifdh-dot--weak     { background: #c62828; }
.hifdh-dot--new      { background: #c8d8e8; }

.hifdh-map {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.hifdh-map-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1.5px solid transparent;
}

.hifdh-map-cell--strong   { background: #e6f4e8; color: #2e7d32; border-color: #a5d6a7; }
.hifdh-map-cell--building { background: #fdf6e3; color: #9a7010; border-color: #ecd9a8; }
.hifdh-map-cell--weak     { background: #fdf0f0; color: #c62828; border-color: #f0b8b8; }
.hifdh-map-cell--new      { background: #f0f4f8; color: #8a9ab0; border-color: #dde8f2; }
.hifdh-map-cell--locked   { background: transparent; color: #c8d8e8; border: 1.5px dashed #dde8f2; }

.hifdh-coming {
  font-size: 0.78rem;
  color: #8a9ab0;
  font-style: italic;
  margin-bottom: 28px;
}

.hifdh-reset {
  background: none;
  border: none;
  color: #c0392b;
  font-size: 0.78rem;
  cursor: pointer;
  font-family: var(--font-ui);
  text-decoration: underline;
  opacity: 0.7;
  margin-bottom: 40px;
}

/* ── Dark mode ── */
[data-theme="dark"] .hifdh-collection,
[data-theme="dark"] .hifdh-collection-card,
[data-theme="dark"] .hifdh-stat,
[data-theme="dark"] .hifdh-question,
[data-theme="dark"] .hifdh-done {
  background: #0f1f2e !important;
  border-color: #1e3448;
}

[data-theme="dark"] .hifdh-collection-arabic,
[data-theme="dark"] .hifdh-collection-title,
[data-theme="dark"] .hifdh-stat-value,
[data-theme="dark"] .hifdh-done-title,
[data-theme="dark"] .hifdh-section-title {
  color: #85CCFF;
}

[data-theme="dark"] .hifdh-collection-sub,
[data-theme="dark"] .hifdh-collection-subtitle {
  color: #7f97ae;
}

[data-theme="dark"] .hifdh-collection-stats {
  border-top-color: #1e3448;
  color: #7f97ae;
}

[data-theme="dark"] .hifdh-question-arabic {
  color: #c8e0f5;
}

[data-theme="dark"] .hifdh-option {
  background: #0f1f2e;
  border-color: #1e3448;
  color: #c8e0f5;
}

[data-theme="dark"] .hifdh-option:hover:not(:disabled) {
  border-color: #85CCFF;
  background: #0a1825;
}

[data-theme="dark"] .hifdh-option--correct {
  background: rgba(46,125,50,0.15) !important;
  border-color: #2e7d32 !important;
}

[data-theme="dark"] .hifdh-option--wrong {
  background: rgba(198,40,40,0.15) !important;
  border-color: #c62828 !important;
}

[data-theme="dark"] .hifdh-typed-input {
  background: #0f1f2e;
  border-color: #1e3448;
  color: #c8e0f5;
}

[data-theme="dark"] .hifdh-typed-input:disabled {
  background: #0a1825;
}

[data-theme="dark"] .hifdh-typed-feedback--correct {
  background: rgba(46,125,50,0.12);
  border-color: #2e7d32;
  color: #7fc98a;
}

[data-theme="dark"] .hifdh-typed-feedback--wrong {
  background: rgba(198,40,40,0.12);
  border-color: #c62828;
  color: #e08080;
}

[data-theme="dark"] .hifdh-typed-answer {
  color: #c8e0f5;
}

[data-theme="dark"] .hifdh-order-built {
  background: #0a1825;
  border-color: #1e3448;
  color: #c8e0f5;
}

[data-theme="dark"] .hifdh-order-built--correct {
  border-color: #2e7d32;
  background: rgba(46,125,50,0.12);
}

[data-theme="dark"] .hifdh-order-built--wrong {
  border-color: #c62828;
  background: rgba(198,40,40,0.12);
}

[data-theme="dark"] .hifdh-order-answer {
  background: rgba(46,125,50,0.12);
  border-color: rgba(46,125,50,0.4);
  color: #c8e0f5;
}

[data-theme="dark"] .hifdh-mode-toggle {
  background: #0f1f2e;
  border-color: #1e3448;
}

[data-theme="dark"] .hifdh-mode-note {
  background: rgba(200,149,47,0.1);
  border-color: rgba(200,149,47,0.3);
  color: #d9b36a;
}

[data-theme="dark"] .hifdh-btn {
  background: #0f1f2e;
  border-color: #1e3448;
  color: #85CCFF;
}

[data-theme="dark"] .hifdh-btn--primary {
  background: linear-gradient(135deg, #094570, #1a6fa8);
  color: #ffffff;
  border: none;
}

[data-theme="dark"] .hifdh-progress-bar {
  background: #1e3448;
}

[data-theme="dark"] .hifdh-alldone {
  background: rgba(46,125,50,0.1) !important;
  border-color: rgba(46,125,50,0.4);
  color: #7fc98a;
}

[data-theme="dark"] .hifdh-map-cell--strong   { background: rgba(46,125,50,0.15); }
[data-theme="dark"] .hifdh-map-cell--building { background: rgba(230,168,23,0.12); }
[data-theme="dark"] .hifdh-map-cell--weak     { background: rgba(198,40,40,0.12); }
[data-theme="dark"] .hifdh-map-cell--new      { background: #0f1f2e; border-color: #1e3448; }
[data-theme="dark"] .hifdh-map-cell--locked   { border-color: #1e3448; color: #2c3f54; }

@media (max-width: 600px) {
  .hifdh-collections { grid-template-columns: 1fr; }
  .hifdh-question-arabic { font-size: 1.15rem; }
}

/* ── Memorization scope ── */
.hifdh-scope {
  padding: 16px 18px;
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 14px;
  margin: 14px 0 6px;
}

.hifdh-scope-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.hifdh-scope-current {
  font-size: 0.85rem;
  color: #0d1b2a;
}

.hifdh-scope-current strong { color: #094570; }

.hifdh-scope-meta {
  font-size: 0.75rem;
  color: #8a9ab0;
}

.hifdh-scope-slider {
  width: 100%;
  accent-color: #094570;
  cursor: pointer;
}

.hifdh-scope-note {
  font-size: 0.72rem;
  color: #8a9ab0;
  margin: 8px 0 0;
}

.hifdh-stat-of {
  font-size: 0.85rem;
  font-weight: 600;
  color: #8a9ab0;
}

.hifdh-map-cell--outscope {
  background: transparent;
  color: #d5dfe9;
  border: 1.5px dashed #e2eaf2;
}

[data-theme="dark"] .hifdh-scope {
  background: #0f1f2e !important;
  border-color: #1e3448;
}

[data-theme="dark"] .hifdh-scope-current { color: #c8e0f5; }
[data-theme="dark"] .hifdh-scope-current strong { color: #85CCFF; }
[data-theme="dark"] .hifdh-scope-slider { accent-color: #85CCFF; }

[data-theme="dark"] .hifdh-map-cell--outscope {
  border-color: #1a2c3e;
  color: #23374a;
}.admin-page {
  padding-top: 32px;
  max-width: 800px;
}

.admin-loading {
  padding: 40px 0;
  text-align: center;
  color: #8a9ab0;
  font-size: 0.9rem;
}

.admin-denied {
  padding: 40px 24px;
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 14px;
  text-align: center;
  color: #4a6080;
}

.admin-error {
  padding: 12px 16px;
  background: rgba(231,76,60,0.08);
  border: 1px solid rgba(231,76,60,0.25);
  border-radius: 10px;
  color: #c0392b;
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  margin: 20px 0 24px;
}

.admin-tab {
  padding: 10px 18px;
  border: 1.5px solid #c8d8e8;
  border-radius: 10px;
  background: #f5f8fb;
  color: #6a8090;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-tab:hover { border-color: #094570; color: #094570; }

.admin-tab--active {
  background: #ffffff;
  border-color: #094570;
  color: #094570;
  box-shadow: 0 2px 8px rgba(9,69,112,0.1);
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.admin-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px 8px;
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 14px;
  text-align: center;
}

.admin-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #094570;
}

.admin-stat-label {
  font-size: 0.7rem;
  color: #8a9ab0;
  line-height: 1.4;
}

.admin-moderation {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-post {
  background: #ffffff !important;
  border: 1.5px solid #c8d8e8;
  border-radius: 14px;
  overflow: hidden;
}

.admin-post-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.admin-post-cat {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #094570;
  background: #e8f4ff;
  padding: 2px 8px;
  border-radius: 100px;
  margin-bottom: 6px;
}

.admin-post-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0d1b2a;
  margin: 0;
}

.admin-post-toggle {
  color: #8a9ab0;
  font-size: 0.8rem;
}

.admin-post-body {
  padding: 0 18px 18px;
  border-top: 1px solid #e8f0f8;
}

.admin-post-text {
  font-size: 0.85rem;
  color: #24374a;
  line-height: 1.7;
  margin: 14px 0;
}

.admin-replies {
  margin-top: 16px;
}

.admin-replies-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #8a9ab0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.admin-reply {
  padding: 12px 14px;
  background: #f5f8fb;
  border: 1px solid #dde8f2;
  border-radius: 10px;
  margin-bottom: 8px;
}

.admin-reply--scholar {
  border-color: #094570;
  border-left: 3px solid #094570;
  background: rgba(9,69,112,0.03);
}

.admin-reply-body {
  font-size: 0.82rem;
  color: #0d1b2a;
  line-height: 1.6;
  margin: 0 0 10px;
}

.admin-reply-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-scholar-btn {
  padding: 6px 12px;
  border: 1.5px solid #c8d8e8;
  border-radius: 100px;
  background: #ffffff;
  color: #4a6080;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.admin-scholar-btn--active {
  background: #094570;
  border-color: #094570;
  color: #ffffff;
}

.admin-delete-btn {
  padding: 8px 14px;
  border: 1.5px solid rgba(231,76,60,0.35);
  border-radius: 8px;
  background: rgba(231,76,60,0.05);
  color: #c0392b;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
}

.admin-delete-btn--small {
  padding: 6px 12px;
  font-size: 0.72rem;
  margin-top: 0;
}

[data-theme="dark"] .admin-stat,
[data-theme="dark"] .admin-post,
[data-theme="dark"] .admin-denied {
  background: #0f1f2e !important;
  border-color: #1e3448;
}

[data-theme="dark"] .admin-stat-value { color: #85CCFF; }
[data-theme="dark"] .admin-post-title { color: #c8e0f5; }
[data-theme="dark"] .admin-post-text { color: #a8c0d8; }

[data-theme="dark"] .admin-tab {
  background: #0f1f2e;
  border-color: #1e3448;
  color: #6a8090;
}

[data-theme="dark"] .admin-tab--active {
  background: #0a1825;
  border-color: #85CCFF;
  color: #85CCFF;
}

[data-theme="dark"] .admin-reply {
  background: #0a1825;
  border-color: #1e3448;
}

[data-theme="dark"] .admin-reply--scholar {
  background: rgba(133,204,255,0.06);
  border-color: #85CCFF;
}

@media (max-width: 700px) {
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
}.a2hs-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 500;
  background: #ffffff;
  border: 1px solid #d0e0ec;
  border-radius: 14px;
  padding: 16px 40px 16px 18px;
  box-shadow: 0 8px 28px rgba(9, 69, 112, 0.18);
  max-width: 420px;
  margin: 0 auto;
}

.a2hs-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: #8a9ab0;
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.a2hs-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #094570;
  margin-bottom: 4px;
}

.a2hs-text {
  font-size: 0.85rem;
  color: #33424f;
  line-height: 1.5;
}

.a2hs-icon-inline {
  display: inline-flex;
  vertical-align: middle;
  color: #094570;
  margin: 0 2px;
}

.a2hs-install-btn {
  margin-top: 10px;
  background: #094570;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.a2hs-install-btn:disabled {
  opacity: 0.6;
  cursor: default;
}.lms-course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.lms-course-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.lms-course-card:hover {
  border-color: var(--pastel-blue);
  box-shadow: 0 6px 20px rgba(9,69,112,0.1);
  transform: translateY(-2px);
}

.lms-course-cover {
  height: 110px;
  background: linear-gradient(135deg, #094570, #1a6fa8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  position: relative;
}

.lms-course-level-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0,0,0,0.35);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  text-transform: capitalize;
}

.lms-course-body {
  padding: 14px 16px;
}

.lms-course-class-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lms-course-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--regal-blue);
  margin: 6px 0 2px;
}

.lms-course-teacher {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.lms-progress-bar-track {
  height: 6px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 6px;
}

.lms-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pastel-blue), var(--regal-blue));
  border-radius: 100px;
}

.lms-progress-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Course detail — persistent sidebar layout */
.lms-detail-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.lms-detail-sidebar {
  flex: 0 0 260px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.lms-section-group {
  margin-bottom: 6px;
}

.lms-section-header {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--regal-blue);
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 8px;
}

.lms-section-header:hover { background: var(--border-light); }

.lms-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px 7px 20px;
  font-size: 0.82rem;
  color: var(--text-primary);
  cursor: pointer;
  border-radius: 8px;
}

.lms-item-row:hover { background: var(--border-light); }
.lms-item-row--active { background: rgba(9,69,112,0.08); font-weight: 700; }

.lms-detail-main {
  flex: 1;
  min-width: 0;
}

@media (max-width: 800px) {
  .lms-detail-layout { flex-direction: column; }
  .lms-detail-sidebar { position: static; width: 100%; max-height: none; }
}/* ============================================
   SUAL — Global Styles
   Brand: Pastel Blue #85CCFF | Regal Blue #094570 | White #FFFFFF
   ============================================ */

:root {
  --pastel-blue: #85CCFF;
  --regal-blue: #094570;
  --white: #FFFFFF;
  --bg: #F0F8FF;
  --bg-card: #FFFFFF;
  --bg-sidebar: #094570;
  --text-primary: #0a2e47;
  --text-secondary: #4a7a9b;
  --text-muted: #8ab0c8;
  --border: #d0e8f8;
  --border-light: #e8f4fd;
  --accent-glow: rgba(133, 204, 255, 0.3);
  --shadow-sm: 0 1px 3px rgba(9, 69, 112, 0.08);
  --shadow-md: 0 4px 16px rgba(9, 69, 112, 0.12);
  --shadow-lg: 0 8px 32px rgba(9, 69, 112, 0.16);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --font-arabic: 'Amiri', 'Traditional Arabic', serif;
  --font-ui: 'Inter', system-ui, sans-serif;
  --sidebar-width: 260px;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-ui);
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.arabic {
  font-family: var(--font-arabic);
  direction: rtl;
  text-align: right;
  line-height: 2;
}

.arabic-lg {
  font-family: var(--font-arabic);
  font-size: 1.5rem;
  direction: rtl;
  line-height: 2.2;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--border-light); }
::-webkit-scrollbar-thumb { background: var(--pastel-blue); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--regal-blue); }

:focus-visible { outline: 2px solid var(--pastel-blue); outline-offset: 2px; }

.app-layout { display: flex; min-height: 100vh; }

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-content {
  flex: 1;
  padding: 32px;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary { background: var(--regal-blue); color: var(--white); }
.btn-primary:hover { background: #073d63; box-shadow: var(--shadow-md); transform: translateY(-1px); }

.btn-secondary { background: var(--pastel-blue); color: var(--regal-blue); }
.btn-secondary:hover { background: #6bbdf5; transform: translateY(-1px); }

.btn-ghost { background: transparent; color: var(--text-secondary); border: 1.5px solid var(--border); }
.btn-ghost:hover { background: var(--border-light); color: var(--text-primary); }

.card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-md); }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.badge-blue { background: var(--pastel-blue); color: var(--regal-blue); }
.badge-regal { background: var(--regal-blue); color: var(--white); }

.page-title { font-size: 1.75rem; font-weight: 700; color: var(--regal-blue); margin-bottom: 4px; }
.page-subtitle { font-size: 0.95rem; color: var(--text-secondary); margin-bottom: 28px; }

@media (max-width: 768px) {
  .main-content { margin-left: 0; padding-bottom: 80px; }
  .page-content { padding: 20px 16px; }
  .page-title { font-size: 1.4rem; }
}
/* ============================================
   Dark Mode
   ============================================ */
html[data-theme="dark"] {
  --white: #1a1a2e;
  --background: #16213e;
  --border: #2a2a4a;
  --border-light: #222240;
  --text-primary: #e8eaf6;
  --text-secondary: #9fa8da;
  --text-muted: #5c6bc0;
  --regal-blue: #85CCFF;
  --pastel-blue: #1a237e;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
}

html[data-theme="dark"] body {
  background: #16213e;
  color: #e8eaf6;
}

html[data-theme="dark"] .sidebar {
  background: #0d1b2a;
}

html[data-theme="dark"] .card {
  background: #1e2a3a;
  border-color: #2a3a4a;
}

html[data-theme="dark"] .toolbar {
  background: #1a1a2e;
  border-color: #2a2a4a;
}

/* ============================================
   Font Size
   ============================================ */
html[data-fontsize="small"] { font-size: 13px; }
html[data-fontsize="medium"] { font-size: 16px; }
html[data-fontsize="large"] { font-size: 19px; }
html[data-fontsize="xlarge"] { font-size: 22px; }