@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Amiri:ital,wght@0,400;0,700;1,400&display=swap');

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
}

body.has-sidenav {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body.has-sidenav > *:not(.sidenav) {
  margin-left: 220px;
  flex: 1;
  min-width: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
}

button {
  cursor: pointer;
  font-family: var(--font-body);
  border: none;
  outline: none;
  transition: all var(--transition);
}

input, select, textarea {
  font-family: var(--font-body);
  outline: none;
  transition: border var(--transition), box-shadow var(--transition);
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.container--wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Side Navigation ── */
.sidenav {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  height: 100vh;
  background: var(--nav-bg);
  border-right: 1px solid var(--nav-border);
  display: flex;
  flex-direction: column;
  z-index: 200;
  overflow-y: auto;
}

.sidenav__header {
  padding: 20px 16px 12px;
  border-bottom: 1px solid var(--nav-border);
}

.sidenav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.sidenav__logo:hover {
  text-decoration: none;
  opacity: 0.85;
}

.sidenav__links {
  list-style: none;
  padding: 12px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidenav__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition);
}

.sidenav__link:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
  text-decoration: none;
}

.sidenav__link.active {
  color: var(--accent);
  background: var(--accent-light);
  font-weight: 600;
}

.sidenav__footer {
  padding: 12px 10px 20px;
  border-top: 1px solid var(--nav-border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidenav__theme-btn,
.sidenav__logout-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  transition: all var(--transition);
}

.sidenav__theme-btn:hover,
.sidenav__logout-btn:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.sidenav__logout-btn:hover {
  color: #b91c1c;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

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

.btn--secondary {
  background: var(--accent-light);
  color: var(--accent-text);
}

.btn--secondary:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--danger {
  background: #fee2e2;
  color: #b91c1c;
}

.btn--danger:hover {
  background: #fca5a5;
}

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

.btn--full {
  width: 100%;
}

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

.btn--white {
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.4);
  backdrop-filter: blur(4px);
}

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

.btn--white-outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.6);
}

.btn--white-outline:hover {
  background: rgba(255,255,255,0.12);
}

/* ── Cards ── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}

.card--flat {
  box-shadow: none;
}

/* ── Forms ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.9rem;
  color: var(--text-primary);
  width: 100%;
}

.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(29,158,117,0.12);
}

.form-select {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.9rem;
  color: var(--text-primary);
  width: 100%;
  cursor: pointer;
}

.form-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(29,158,117,0.12);
}

.form-checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.form-checkbox-row:last-child {
  border-bottom: none;
}

.form-checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.form-checkbox-row label {
  font-size: 0.9rem;
  color: var(--text-primary);
  cursor: pointer;
}

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

.badge--memorized {
  background: var(--badge-memorized-bg);
  color: var(--badge-memorized-text);
}

.badge--in_progress {
  background: var(--badge-in-progress-bg);
  color: var(--badge-in-progress-text);
}

.badge--not_started {
  background: var(--badge-not-started-bg);
  color: var(--badge-not-started-text);
}

/* ── Progress bar ── */
.progress-bar {
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: var(--accent);
  border-radius: 10px;
  transition: width 0.4s ease;
}

.progress-bar--thick {
  height: 10px;
}

/* ── Page structure ── */
.page-header {
  padding: 28px 0 20px;
}

.page-header__title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.page-header__subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.section {
  margin-bottom: 28px;
}

.section__title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text-primary);
  color: var(--bg-primary);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  transition: transform 0.3s ease;
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.toast--success {
  background: var(--accent);
  color: #fff;
}

.toast--error {
  background: #b91c1c;
  color: #fff;
}

/* ── Spinner ── */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 40px auto;
  display: block;
}

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

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}

.empty-state__icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.empty-state__text {
  font-size: 0.95rem;
}

/* ── Tab bar ── */
.tab-bar {
  display: flex;
  gap: 4px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 20px;
}

.tab-bar__tab {
  flex: 1;
  padding: 7px 12px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.tab-bar__tab.active {
  background: var(--card-bg);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

/* ── Search bar ── */
.search-bar {
  display: flex;
  align-items: center;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  gap: 10px;
  margin-bottom: 20px;
}

.search-bar__icon {
  color: var(--text-muted);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.search-bar__input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px 0;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.search-bar__input::placeholder {
  color: var(--text-muted);
}

.search-bar:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(29,158,117,0.12);
}

/* ── Surah cards ── */
.surah-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: box-shadow var(--transition), border-color var(--transition);
}

.surah-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.surah-card__number {
  min-width: 36px;
  height: 36px;
  background: var(--accent-light);
  color: var(--accent-text);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.surah-card__body {
  flex: 1;
  min-width: 0;
}

.surah-card__name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.surah-card__arabic {
  font-family: var(--font-arabic);
  font-size: 1.2rem;
  color: var(--text-secondary);
  direction: rtl;
}

.surah-card__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.surah-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Surah viewer header ── */
.surah-viewer-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 95;
  box-shadow: 0 1px 8px rgba(0,0,0,0.05);
}

.surah-viewer-header__inner {
  max-width: 840px;
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.svh-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.svh-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: all var(--transition);
  text-decoration: none;
}

.svh-back:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  text-decoration: none;
}

.svh-title-block {
  min-width: 0;
}

.svh-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.svh-num {
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--accent-light);
  color: var(--accent-text);
  padding: 2px 7px;
  border-radius: 20px;
  flex-shrink: 0;
}

.svh-name {
  font-weight: 700;
  color: var(--text-primary);
}

.svh-arabic {
  font-family: var(--font-arabic);
  font-size: 1.1rem;
  color: var(--text-secondary);
  direction: rtl;
}

.svh-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 1px;
}

.svh-verses, .svh-progress-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.svh-dot {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.svh-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.svh-prog-ring {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.svh-prog-pct {
  position: absolute;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--accent-text);
  pointer-events: none;
}

.goal-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #FFF8E1;
  color: #7a5800;
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 0.68rem;
  font-weight: 600;
}

[data-theme="dark"] .goal-badge {
  background: #2e2200;
  color: #f5c842;
}

.view-toggle {
  display: flex;
  gap: 4px;
}

.toggle-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-btn.active {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent-text);
}

/* ── Surah content layout ── */
.surah-content {
  max-width: 840px;
  margin: 0 auto;
  padding: 24px 20px 200px;
}

/* ── Bismillah card ── */
.bismillah-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.bismillah-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(29,158,117,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.bismillah-card.reciting {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245,158,11,0.15);
}

.bismillah-card__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.bismillah-card__text-block {
  flex: 1;
  text-align: center;
}

.bismillah-card__arabic {
  font-family: var(--font-arabic);
  font-size: 2rem;
  line-height: 1.8;
  direction: rtl;
  color: var(--text-primary);
}

.bismillah-card__translit {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.01em;
  margin-top: 6px;
}

.bismillah-card__trans {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.bismillah-play-btn {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  margin-top: 2px;
}

.bismillah-play-btn:hover,
.bismillah-play-btn.active {
  border-color: #f59e0b;
  color: #f59e0b;
  background: rgba(245,158,11,0.1);
}

/* ── Verse grid ── */
.verse-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Verse cards ── */
.verse-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  position: relative;
}

.verse-card.memorized {
  border-color: var(--accent);
  background: var(--accent-light);
}

.verse-card.in-goal {
  box-shadow: 0 0 0 2px rgba(29,158,117,0.25);
}

.verse-card.reciting {
  border-color: #f59e0b !important;
  background: rgba(245,158,11,0.06) !important;
  box-shadow: 0 0 0 3px rgba(245,158,11,0.18) !important;
}

.verse-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.verse-card__header-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.verse-card__num {
  width: 30px;
  height: 30px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}

.verse-card.memorized .verse-card__num {
  background: var(--accent);
  color: #fff;
}

.verse-card.reciting .verse-card__num {
  background: #f59e0b;
  color: #fff;
}

.verse-play-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.verse-play-btn:hover,
.verse-play-btn.active {
  border-color: #f59e0b;
  color: #f59e0b;
  background: rgba(245,158,11,0.1);
}

.verse-card__checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.verse-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.verse-card__arabic {
  font-family: var(--font-arabic);
  font-size: 1.65rem;
  line-height: 2;
  text-align: right;
  direction: rtl;
  color: var(--text-primary);
}

.verse-card__transliteration {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.8;
  letter-spacing: 0.01em;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.verse-card__translation {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  padding-left: 2px;
}

/* ── Continue bar ── */
.continue-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.continue-bar__info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ── Bulk bar ── */
.bulk-bar {
  position: fixed;
  bottom: 66px;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  padding: 10px 20px 10px 240px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 190;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
}

.bulk-bar__info {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ── Dashboard ── */
.dashboard-layout {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.dashboard-hero {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 28px;
  box-shadow: var(--shadow-md);
  color: #fff;
}

.dashboard-hero__greeting {
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.85;
  margin-bottom: 2px;
}

.dashboard-hero__name {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.dashboard-hero__date {
  font-size: 0.85rem;
  opacity: 0.75;
  margin-top: 6px;
}

.dashboard-hero__quran-icon {
  color: #fff;
  opacity: 0.5;
}

.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.dash-stat {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dash-stat--fire .dash-stat__icon {
  color: var(--streak-fire);
}

.dash-stat__icon {
  color: var(--text-muted);
  line-height: 1;
}

.dash-stat__val {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
}

.dash-stat__label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dash-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.dash-progress-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.dash-progress-card__ring {
  flex-shrink: 0;
}

.dash-progress-card__fraction {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.dash-progress-card__fraction span {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.dash-progress-card__sub {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.dpill {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.dpill--green {
  background: var(--badge-memorized-bg);
  color: var(--badge-memorized-text);
}

.dpill--yellow {
  background: var(--badge-in-progress-bg);
  color: var(--badge-in-progress-text);
}

.dpill--gray {
  background: var(--badge-not-started-bg);
  color: var(--badge-not-started-text);
}

/* ── Recommendation card (new) ── */
.rec-card-new {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.rec-card-new__top {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  padding: 22px 24px;
  color: #fff;
}

.rec-card-new__eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.85;
  margin-bottom: 10px;
}

.rec-card-new__surah {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 3px;
}

.rec-card-new__arabic {
  font-family: var(--font-arabic);
  font-size: 1.3rem;
  opacity: 0.9;
  direction: rtl;
  text-align: left;
  margin-bottom: 8px;
}

.rec-card-new__range {
  font-size: 0.9rem;
  opacity: 0.85;
  font-weight: 500;
  margin-bottom: 4px;
}

.rec-card-new__reason {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-top: 4px;
}

.rec-card-new__actions {
  padding: 16px 24px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* ── Done card ── */
.rec-done-card {
  background: var(--card-bg);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-align: center;
}

.rec-done-card__icon {
  color: var(--accent);
  margin: 0 auto 12px;
  line-height: 1;
}

.rec-done-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-text);
  margin-bottom: 6px;
}

.rec-done-card__sub {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ── Auth ── */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.auth-tagline {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.auth-error {
  background: #fee2e2;
  color: #b91c1c;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.85rem;
  margin-bottom: 14px;
}

/* ── Settings ── */
.settings-section {
  margin-bottom: 28px;
}

.settings-section__title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.drag-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drag-item {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: grab;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.drag-item:active {
  cursor: grabbing;
}

.drag-item__handle {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.drag-item__name {
  flex: 1;
}

.drag-item__number {
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* ── History / Calendar ── */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-top: 10px;
}

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

.calendar-month-label {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}

.calendar-day-label {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 4px 0;
}

.calendar-day {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  cursor: pointer;
  position: relative;
  transition: background var(--transition);
  color: var(--text-secondary);
}

.calendar-day:hover {
  background: var(--bg-tertiary);
}

.calendar-day.active {
  background: var(--accent-light);
  color: var(--accent-text);
  font-weight: 600;
}

.calendar-day.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.calendar-day.selected {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.calendar-day.selected::after {
  background: rgba(255,255,255,0.6);
}

.calendar-day.today {
  font-weight: 700;
  color: var(--text-primary);
  outline: 1.5px solid var(--border);
}

.calendar-day.empty {
  cursor: default;
}

.history-detail {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 16px;
}

.history-detail__date {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.history-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.history-entry:last-child {
  border-bottom: none;
}

.history-entry__name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.history-entry__arabic {
  font-family: var(--font-arabic);
  font-size: 1rem;
  color: var(--text-secondary);
  direction: rtl;
}

.history-entry__stats {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: right;
}

.history-total {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1.5px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ── Stat row (legacy — kept for settings page compatibility) ── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  text-align: center;
}

.stat-card__value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.stat-card__label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-card--accent .stat-card__value {
  color: var(--accent);
}

.stat-card__icon {
  color: var(--accent);
  margin-bottom: 6px;
  opacity: 0.85;
}

.stat-card--streak .stat-card__icon {
  color: #f59e0b;
}

.calendar-legend {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--card-border);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.calendar-legend__item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.calendar-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.calendar-legend__dot--active {
  background: var(--accent);
}

.calendar-legend__dot--today {
  background: transparent;
  border: 2px solid var(--accent);
}

/* ── Page content ── */
.page-content {
  padding: 0 0 80px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  body.has-sidenav > *:not(.sidenav) {
    margin-left: 0;
  }

  .sidenav {
    display: none;
  }

  .bulk-bar {
    left: 0;
    bottom: 82px;
  }

  .dash-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .two-col {
    grid-template-columns: 1fr;
  }

  .surah-card {
    flex-wrap: wrap;
  }

  .rec-card-new__actions {
    flex-direction: column;
  }

  .bulk-bar {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }

  .dashboard-hero {
    padding: 20px;
  }

  .dash-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .dash-progress-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── RTL ── */
[dir="rtl"] .verse-card__arabic,
[dir="rtl"] .recommendation-card__arabic,
[dir="rtl"] .surah-card__arabic {
  text-align: right;
}

[dir="rtl"] .sidenav__links {
  direction: rtl;
}

[dir="rtl"] .form-label,
[dir="rtl"] .form-input,
[dir="rtl"] .form-select {
  direction: rtl;
  text-align: right;
}

/* ── Dashboard: two-col layout ── */
.dash-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 720px) {
  .dash-two-col {
    grid-template-columns: 1fr;
  }
}

/* ── Dashboard: hero logo ── */
.dashboard-hero__logo-wrap {
  flex-shrink: 0;
  opacity: 0.85;
}

.dashboard-hero__logo-img {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}

/* ── Dashboard: lifetime stats card ── */
.dash-lifetime-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  height: 100%;
  box-sizing: border-box;
}

.dash-lifetime-row {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 20px;
}

.dash-lifetime-item {
  flex: 1;
  text-align: center;
}

.dash-lifetime-item__val {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
}

.dash-lifetime-item__label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.dash-lifetime-sep {
  width: 1px;
  height: 36px;
  background: var(--border);
  flex-shrink: 0;
}

.dash-week-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.dash-week-chart {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  height: 52px;
}

.week-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  justify-content: flex-end;
}

.week-bar {
  width: 100%;
  height: 32px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  transition: background var(--transition);
}

.week-bar--active {
  background: var(--accent);
  opacity: 0.85;
}

.week-bar--today.week-bar--active {
  opacity: 1;
  box-shadow: 0 0 0 2px var(--accent);
}

.week-bar--today:not(.week-bar--active) {
  outline: 1.5px solid var(--border);
}

.week-bar-label {
  font-size: 0.62rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
}

.week-bar-label--today {
  color: var(--accent);
  font-weight: 700;
}

/* ── History: layout ── */
.history-stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

@media (max-width: 860px) {
  .history-stat-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .history-stat-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.history-stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.history-stat-card__icon {
  color: var(--text-muted);
  margin-bottom: 6px;
  line-height: 1;
}

.history-stat-card--streak .history-stat-card__icon {
  color: #f59e0b;
}

.history-stat-card__val {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
}

.history-stat-card__label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 4px;
}

.history-stat-card__sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.history-main-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 860px) {
  .history-main-grid {
    grid-template-columns: 1fr;
  }
}

.history-calendar-card {
  padding: 20px;
}

.history-jump-card {
  margin-top: 12px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.history-jump-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.history-detail-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 12px;
  color: var(--text-muted);
}

.history-detail-placeholder__text {
  font-size: 0.875rem;
  text-align: center;
}

/* ── History: day detail card ── */
.history-detail-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.history-detail-card__header {
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.history-detail-card__day {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}

.history-detail-card__date {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.history-detail-card__badge {
  background: var(--accent-light);
  color: var(--accent-text);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  margin-top: 4px;
}

.history-detail-summary {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
  gap: 0;
}

.history-detail-summary__item {
  flex: 1;
  text-align: center;
}

.history-detail-summary__val {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.history-detail-summary__label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.history-detail-summary__divider {
  width: 1px;
  height: 32px;
  background: var(--border);
  flex-shrink: 0;
}

.history-detail-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 14px 20px 8px;
}

.history-entries-list {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-entry-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.history-entry-card__left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.history-entry-card__num {
  min-width: 28px;
  height: 28px;
  background: var(--accent-light);
  color: var(--accent-text);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}

.history-entry-card__name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.history-entry-card__arabic {
  font-family: var(--font-arabic);
  font-size: 0.95rem;
  color: var(--text-secondary);
  direction: rtl;
}

.history-entry-card__right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.history-entry-card__stat {
  text-align: center;
}

.history-entry-card__stat-val {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.history-entry-card__stat-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
}

.history-entry-card__bar-wrap {
  width: 60px;
  height: 5px;
  background: var(--bg-tertiary);
  border-radius: 10px;
  overflow: hidden;
}

.history-entry-card__bar {
  height: 100%;
  background: var(--accent);
  border-radius: 10px;
  min-width: 4px;
  transition: width 0.4s ease;
}

/* ── Progress: overview grid ── */
.progress-overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

@media (max-width: 600px) {
  .progress-overview-grid {
    grid-template-columns: 1fr;
  }
}

.progress-overview-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
}

.progress-overview-card__label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.progress-overview-card__fraction {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.04em;
  line-height: 1;
}

.progress-overview-card__fraction span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.progress-overview-card__pct {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: 6px;
}

.progress-overview-card__sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.progress-bar__fill--verses {
  background: linear-gradient(90deg, var(--accent) 0%, #22c9a0 100%);
}

/* ── Progress: juz grid ── */
.juz-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

@media (max-width: 600px) {
  .juz-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (max-width: 400px) {
  .juz-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.juz-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: default;
}

.juz-cell__num {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
}

.juz-cell__bar {
  width: 100%;
  height: 36px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.juz-cell__fill {
  width: 100%;
  background: var(--accent);
  opacity: 0.5;
  border-radius: 4px;
  transition: height 0.6s ease;
}

.juz-cell--done .juz-cell__fill {
  opacity: 1;
}

.juz-cell--partial .juz-cell__fill {
  opacity: 0.65;
}

.juz-cell__pct {
  font-size: 0.58rem;
  color: var(--text-muted);
  font-weight: 600;
}

.juz-cell--done .juz-cell__pct {
  color: var(--accent);
}

/* ── Tab count pill ── */
.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border-radius: 10px;
  padding: 0 5px;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 18px;
  margin-left: 4px;
}

.tab-bar__tab.active .tab-count {
  background: var(--accent-light);
  color: var(--accent-text);
}

/* ── Audio bar ── */
.audio-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 190;
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.08);
}

.audio-bar__inner {
  padding: 0 20px 0 240px;
}

.audio-bar__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 56px;
}

.audio-bar__settings {
  display: flex;
  align-items: center;
  gap: 14px;
}

.audio-bar__icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.audio-bar__reciter-wrap,
.audio-bar__loop-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
}

.audio-bar__loop-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.audio-bar__sel {
  font-size: 0.78rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  cursor: pointer;
  max-width: 160px;
}

.audio-bar__sel--sm {
  max-width: 72px;
}

.audio-bar__save-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
}

.audio-bar__save-btn:hover,
.audio-bar__save-btn.unsaved {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.audio-bar__playback {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ap-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.ap-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.ap-btn--active {
  background: var(--accent-light);
  color: var(--accent-text);
  border-color: var(--accent);
}

.ap-btn--stop {
  border-color: #f87171;
  color: #dc2626;
}

.ap-btn--stop:hover {
  background: #fee2e2;
}

.audio-bar__status {
  font-size: 0.73rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-style: italic;
  min-width: 80px;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .audio-bar {
    left: 0;
  }

  .audio-bar__inner {
    padding: 0 16px;
  }

  .audio-bar__controls {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 0;
    gap: 8px;
  }

  .audio-bar__sel {
    max-width: 130px;
  }

  .bulk-bar {
    left: 0;
    padding: 10px 16px;
  }

  .surah-content {
    padding-bottom: 220px;
  }

  .svh-arabic {
    display: none;
  }

  .audio-bar__status {
    display: none;
  }

  .svh-prog-ring {
    display: none;
  }
}
/* ── Find Peace Button ── */
.peace-btn {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 250;
  display: flex;
  align-items: center;
  cursor: pointer;
  overflow: hidden;
  border-radius: 12px 0 0 12px;
  background: var(--accent);
  box-shadow: -2px 0 20px rgba(29, 158, 117, 0.35);
  transition: box-shadow 0.25s ease, width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 40px;
  height: 44px;
  animation: peace-pulse 3s ease-in-out infinite;
}

.peace-btn:hover {
  width: 140px;
  box-shadow: -4px 0 28px rgba(29, 158, 117, 0.5);
  animation: none;
}

.peace-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 60%);
  pointer-events: none;
}

@keyframes peace-pulse {
  0%, 100% { box-shadow: -2px 0 20px rgba(29, 158, 117, 0.35); }
  50%       { box-shadow: -2px 0 30px rgba(29, 158, 117, 0.62); }
}

.peace-btn__icon {
  flex-shrink: 0;
  width: 40px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  position: relative;
  z-index: 1;
}

.peace-btn__label {
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s ease 0.1s, transform 0.2s ease 0.1s;
  pointer-events: none;
  padding-right: 14px;
}

.peace-btn:hover .peace-btn__label {
  opacity: 1;
  transform: translateX(0);
}

/* ── Peace Modal Overlay ── */
.peace-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  pointer-events: none;
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
  padding: 20px;
}

.peace-overlay--open {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  pointer-events: all;
}

.peace-modal {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 36px 40px 32px;
  max-width: 520px;
  width: 100%;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
  opacity: 0;
  transform: translateY(20px) scale(0.97);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.peace-overlay--open .peace-modal {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.peace-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.peace-modal__close:hover {
  background: var(--border);
  color: var(--text-primary);
}

.peace-modal__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.peace-modal__crescent {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.peace-modal__eyebrow {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.peace-modal__divider {
  height: 1px;
  background: var(--border);
  margin: 0 0 20px;
}

.peace-modal__verse {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-primary);
  font-style: italic;
  margin-bottom: 14px;
  min-height: 60px;
}

.peace-modal__ref {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.03em;
  margin-bottom: 20px;
}

.peace-modal__theme-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--accent-light);
  color: var(--accent-text);
  border-radius: 6px;
  padding: 4px 10px;
  margin-bottom: 24px;
}

.peace-modal__another {
  display: block;
  width: 100%;
  padding: 11px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  letter-spacing: 0.01em;
}

.peace-modal__another:hover {
  background: var(--accent-hover);
}

.peace-modal__another:active {
  transform: scale(0.98);
}

@media (max-width: 768px) {
  .peace-btn {
    top: auto;
    bottom: 80px;
    transform: none;
  }

  .peace-modal {
    padding: 28px 24px 24px;
  }
}