
/* =========================================================
   IQRANIX — MY HIFZ JOURNEY
   Theme: Midnight Navy • Ivory • Champagne Gold
========================================================= */

:root {
  --navy: #081321;
  --navy-deep: #050d18;
  --navy-light: #101f32;
  --navy-card: #14253a;
  --navy-soft: #1b3048;
  --navy-border: rgba(216, 184, 117, 0.16);

  --gold: #d8b875;
  --gold-light: #f0dba9;
  --gold-dark: #a9874b;

  --ivory: #f5f0e6;
  --muted: #a9b2bd;
  --white: #ffffff;

  --success: #8bbd9c;
  --danger: #d98d8d;

  --radius: 20px;
  --radius-small: 13px;

  --shadow: 0 12px 35px rgba(0, 0, 0, 0.22);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  width: 100%;
  overflow-x: clip;
}

body {
  width: 100%;
  min-height: 100vh;
  overflow-x: clip;
  background: var(--navy);
  color: var(--ivory);
  font-family: "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.hifz-app {
  width: 100%;
  max-width: 900px;
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: 105px;
}

/* =========================================================
   LOADING SCREEN
========================================================= */

.hifz-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--navy-deep);
  text-align: center;
}

.loader-symbol {
  width: 75px;
  height: 75px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold-dark);
  border-radius: 50%;
  color: var(--gold);
  font-size: 38px;
  animation: loaderRotate 5s linear infinite;
}

.hifz-loader h2 {
  margin-top: 22px;
  color: var(--gold-light);
  font-family: "Playfair Display", serif;
  letter-spacing: 5px;
  font-size: 23px;
}

.hifz-loader p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

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

/* =========================================================
   AUTHENTICATION
========================================================= */

.auth-required {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: grid;
  place-items: center;
  padding: 22px;
  background: var(--navy);
}

.auth-required-card {
  width: 100%;
  max-width: 390px;
  padding: 38px 25px;
  border: 1px solid var(--navy-border);
  border-radius: 24px;
  background: var(--navy-card);
  text-align: center;
  box-shadow: var(--shadow);
}

.auth-icon {
  color: var(--gold);
  font-size: 48px;
}

.auth-required-card h2 {
  margin: 18px 0 10px;
  font-family: "Playfair Display", serif;
  font-size: 27px;
}

.auth-required-card p {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.back-link {
  display: block;
  margin-top: 20px;
  color: var(--gold);
  font-size: 13px;
}

/* =========================================================
   HEADER
========================================================= */

.hifz-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(216, 184, 117, 0.09);
  background: rgba(8, 19, 33, 0.94);
  backdrop-filter: blur(18px);
}

.header-back,
.header-icon-button {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border: 1px solid var(--navy-border);
  border-radius: 13px;
  background: var(--navy-light);
  color: var(--gold);
}

.header-back span {
  margin-top: -4px;
  font-size: 32px;
}

.header-title {
  flex: 1;
  min-width: 0;
}

.eyebrow {
  display: block;
  color: var(--gold);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.8px;
  line-height: 1.6;
}

.header-title h1 {
  margin-top: 3px;
  overflow: hidden;
  color: var(--ivory);
  font-family: "Playfair Display", serif;
  font-size: 19px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-icon-button {
  font-size: 19px;
}

/* =========================================================
   HERO
========================================================= */

.hifz-hero {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 390px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(5, 13, 24, 0.92), rgba(5, 13, 24, 0.25)),
    url("hifz-background.jpg") center / cover no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, var(--navy) 0%, transparent 38%),
    linear-gradient(90deg, rgba(5, 13, 24, 0.48), transparent);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 620px;
  padding: 65px 27px 75px;
}

.hero-label {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--gold-light);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.5px;
}

.hero-content h2 {
  color: var(--ivory);
  font-family: "Playfair Display", serif;
  font-size: clamp(36px, 8vw, 53px);
  font-weight: 600;
  line-height: 1.15;
}

.hero-content p {
  max-width: 340px;
  margin-top: 17px;
  color: rgba(245, 240, 230, 0.8);
  font-size: 14px;
  line-height: 1.8;
}

.hero-decoration {
  margin-top: 28px;
  color: var(--gold);
  font-size: 34px;
  opacity: 0.85;
}

/* =========================================================
   GENERAL SECTIONS
========================================================= */

.progress-section,
.continue-section,
.daily-goal-section,
.streak-section,
.quick-access-section,
.hifz-content-section {
  width: 100%;
  padding: 25px 20px 5px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 19px;
}

.section-heading h2 {
  margin-top: 5px;
  color: var(--ivory);
  font-family: "Playfair Display", serif;
  font-size: 23px;
  font-weight: 600;
}

.progress-tag,
.revision-count {
  flex-shrink: 0;
  padding: 8px 11px;
  border: 1px solid var(--navy-border);
  border-radius: 30px;
  color: var(--gold);
  background: var(--navy-light);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

/* =========================================================
   OVERALL PROGRESS
========================================================= */

.progress-main-card {
  padding: 25px 19px;
  border: 1px solid var(--navy-border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, #152940, #0d1b2d);
  box-shadow: var(--shadow);
}

.progress-ring-area {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  padding: 8px 0 25px;
}

.hifz-progress-circle {
  position: relative;
  flex-shrink: 0;
  width: 185px;
  height: 185px;
}

.progress-ring {
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotate(-90deg);
}

.progress-ring circle {
  fill: none;
  stroke-width: 10;
}

.progress-ring-track {
  stroke: rgba(216, 184, 117, 0.13);
}

.progress-ring-fill {
  stroke: var(--gold);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s ease;
  filter: drop-shadow(0 0 5px rgba(216, 184, 117, 0.25));
}

.progress-circle-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.circle-small-label,
.circle-bottom-label {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.4px;
}

.progress-circle-content strong {
  margin: 5px 0;
  color: var(--gold-light);
  font-family: "Playfair Display", serif;
  font-size: 36px;
}

.progress-description {
  max-width: 220px;
}

.progress-description h3 {
  color: var(--ivory);
  font-family: "Playfair Display", serif;
  font-size: 19px;
}

.progress-description p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.progress-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  padding-top: 20px;
  border-top: 1px solid var(--navy-border);
}

.progress-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.stat-icon {
  color: var(--gold);
  font-size: 20px;
}

.progress-stat strong {
  color: var(--ivory);
  font-family: "Playfair Display", serif;
  font-size: 23px;
}

.progress-stat > span:last-child {
  color: var(--muted);
  font-size: 10px;
}

/* =========================================================
   BUTTONS
========================================================= */

.primary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 49px;
  padding: 13px 18px;
  border: 1px solid var(--gold);
  border-radius: 13px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--navy-deep);
  font-size: 13px;
  font-weight: 700;
  transition: 0.2s ease;
}

.primary-button:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
}

.primary-button:active {
  transform: scale(0.98);
}

.primary-button span {
  font-size: 19px;
}

.text-button {
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
}

/* =========================================================
   CONTINUE HIFZ
========================================================= */

.continue-card {
  padding: 23px;
  border: 1px solid rgba(216, 184, 117, 0.24);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(216, 184, 117, 0.12), transparent 45%),
    var(--navy-card);
  box-shadow: var(--shadow);
}

.continue-card-top {
  display: flex;
  align-items: center;
  gap: 11px;
}

.continue-icon {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border-radius: 12px;
  background: rgba(216, 184, 117, 0.12);
  color: var(--gold);
  font-size: 22px;
}

.continue-status {
  color: var(--gold);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
}

.continue-card h3 {
  margin-top: 20px;
  color: var(--ivory);
  font-family: "Playfair Display", serif;
  font-size: 25px;
}

.continue-card > p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.continue-progress-track,
.daily-goal-track,
.surah-progress-track,
.juz-progress-track {
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(245, 240, 230, 0.1);
}

.continue-progress-track {
  margin-top: 24px;
}

.continue-progress-fill,
.daily-goal-fill,
.surah-progress-fill,
.juz-progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
  transition: width 0.4s ease;
}

.continue-progress-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0 20px;
  color: var(--muted);
  font-size: 10px;
}

/* =========================================================
   DAILY GOAL
========================================================= */

.daily-goal-card {
  padding: 22px;
  border: 1px solid var(--navy-border);
  border-radius: var(--radius);
  background: var(--navy-card);
}

.daily-goal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.goal-date {
  color: var(--gold);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.4px;
}

.daily-goal-top h3 {
  margin-top: 7px;
  font-family: "Playfair Display", serif;
  font-size: 20px;
}

.goal-symbol {
  color: var(--gold);
  font-size: 34px;
}

.goal-numbers {
  display: flex;
  gap: 35px;
  margin: 24px 0 18px;
}

.goal-numbers > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.goal-numbers strong {
  color: var(--gold-light);
  font-family: "Playfair Display", serif;
  font-size: 29px;
}

.goal-numbers span {
  color: var(--muted);
  font-size: 10px;
}

.daily-goal-card > p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
}

/* =========================================================
   STREAK
========================================================= */

.streak-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--navy-border);
  border-radius: var(--radius);
  background: linear-gradient(110deg, #192c41, #102035);
}

.streak-symbol {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 55px;
  height: 55px;
  border: 1px solid rgba(216, 184, 117, 0.25);
  border-radius: 17px;
  color: var(--gold);
  background: rgba(216, 184, 117, 0.09);
  font-size: 29px;
}

.streak-content {
  position: relative;
  z-index: 1;
}

.streak-content h3 {
  margin-top: 4px;
  font-family: "Playfair Display", serif;
  font-size: 23px;
}

.streak-content h3 span {
  color: var(--gold-light);
}

.streak-content p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.streak-decoration {
  margin-left: auto;
  color: var(--gold);
  font-size: 40px;
  opacity: 0.25;
}

/* =========================================================
   QUICK ACCESS
========================================================= */

.quick-access-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.quick-access-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 145px;
  padding: 17px;
  border: 1px solid var(--navy-border);
  border-radius: 17px;
  background: var(--navy-card);
  color: var(--ivory);
  text-align: left;
  transition: 0.2s ease;
}

.quick-access-card:hover {
  border-color: rgba(216, 184, 117, 0.45);
  background: var(--navy-soft);
  transform: translateY(-2px);
}

.quick-access-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  border-radius: 11px;
  background: rgba(216, 184, 117, 0.1);
  color: var(--gold);
  font-size: 21px;
}

.quick-access-card strong {
  font-size: 13px;
}

.quick-access-card > span:nth-last-child(2) {
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
}

.quick-arrow {
  position: absolute;
  right: 15px;
  bottom: 15px;
  color: var(--gold);
  font-size: 17px;
}

/* =========================================================
   CONTENT WORKSPACE
========================================================= */

.hifz-content-section {
  scroll-margin-top: 85px;
}

.workspace-card {
  padding: 20px;
  border: 1px solid var(--navy-border);
  border-radius: var(--radius);
  background: var(--navy-card);
  box-shadow: var(--shadow);
}

.workspace-intro {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 23px;
}

.workspace-symbol {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 45px;
  height: 45px;
  border-radius: 14px;
  background: rgba(216, 184, 117, 0.1);
  color: var(--gold);
  font-size: 25px;
}

.workspace-intro h3 {
  font-family: "Playfair Display", serif;
  font-size: 18px;
}

.workspace-intro p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.workspace-card > label,
.reminder-card label {
  display: block;
  margin-bottom: 9px;
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 600;
}

.hifz-select,
.hifz-time-input {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--navy-border);
  border-radius: 12px;
  background: var(--navy-light);
  color: var(--ivory);
  font-size: 12px;
  color-scheme: dark;
}

.hifz-select option {
  background: var(--navy-light);
  color: var(--ivory);
}

/* =========================================================
   SELECTED SURAH
========================================================= */

.selected-surah-info {
  margin-top: 22px;
  padding: 17px;
  border: 1px solid var(--navy-border);
  border-radius: 15px;
  background: rgba(8, 19, 33, 0.55);
}

.surah-info-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.surah-info-heading h3 {
  margin-top: 5px;
  font-family: "Playfair Display", serif;
  font-size: 18px;
}

.arabic-surah-name {
  color: var(--gold-light);
  font-family: "Amiri", serif;
  font-size: 24px;
  text-align: right;
}

.ayah-progress-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 20px 0;
}

.ayah-progress-summary > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ayah-progress-summary strong {
  color: var(--gold-light);
  font-family: "Playfair Display", serif;
  font-size: 21px;
}

.ayah-progress-summary span {
  color: var(--muted);
  font-size: 9px;
}

/* =========================================================
   AYAH LIST
========================================================= */

.ayah-workspace-heading {
  margin: 25px 0 14px;
}

.ayah-workspace-heading h3 {
  font-family: "Playfair Display", serif;
  font-size: 19px;
}

.ayah-workspace-heading p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.ayah-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ayah-card {
  padding: 17px;
  border: 1px solid var(--navy-border);
  border-radius: 15px;
  background: var(--navy-light);
}

.ayah-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 17px;
}

.ayah-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--navy-border);
  border-radius: 10px;
  color: var(--gold);
  font-size: 11px;
}

.ayah-status {
  padding: 6px 9px;
  border-radius: 20px;
  background: rgba(216, 184, 117, 0.1);
  color: var(--gold);
  font-size: 9px;
  font-weight: 700;
}

.ayah-arabic {
  margin: 15px 0;
  color: var(--ivory);
  font-family: "Amiri", serif;
  font-size: 27px;
  line-height: 2.1;
  text-align: right;
  direction: rtl;
}

.ayah-reference {
  margin-top: 10px;
  color: var(--muted);
  font-size: 10px;
}

.ayah-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 17px;
}

.ayah-actions button {
  flex: 1 1 90px;
  min-height: 36px;
  padding: 8px;
  border: 1px solid var(--navy-border);
  border-radius: 9px;
  background: var(--navy-card);
  color: var(--ivory);
  font-size: 10px;
}

.ayah-actions button.active,
.ayah-actions button[data-status="memorised"] {
  border-color: rgba(139, 189, 156, 0.45);
  color: var(--success);
}

.ayah-actions button[data-status="revision"] {
  color: var(--gold-light);
}

.ayah-actions button[data-status="pending"] {
  color: var(--muted);
}

/* =========================================================
   REVISION CENTRE
========================================================= */

.revision-intro-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 19px;
  border: 1px solid var(--navy-border);
  border-radius: 16px;
  background: var(--navy-card);
}

.revision-symbol {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 43px;
  height: 43px;
  border-radius: 13px;
  background: rgba(216, 184, 117, 0.1);
  color: var(--gold);
  font-size: 25px;
}

.revision-intro-card h3 {
  font-family: "Playfair Display", serif;
  font-size: 17px;
}

.revision-intro-card p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.revision-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 14px;
}

.revision-controls label {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 11px;
}

.revision-controls .hifz-select {
  flex: 1;
}

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

.revision-item {
  padding: 16px;
  border: 1px solid var(--navy-border);
  border-radius: 13px;
  background: var(--navy-card);
}

.revision-item h3 {
  font-size: 13px;
}

.revision-item p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}

#startRevision {
  margin-top: 18px;
}

/* =========================================================
   TRACKER SUMMARY
========================================================= */

.tracker-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-bottom: 20px;
  padding: 18px 10px;
  border: 1px solid var(--navy-border);
  border-radius: 16px;
  background: var(--navy-card);
}

.tracker-summary > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.tracker-summary strong {
  color: var(--gold-light);
  font-family: "Playfair Display", serif;
  font-size: 23px;
}

.tracker-summary span {
  color: var(--muted);
  font-size: 9px;
}

/* =========================================================
   SEARCH
========================================================= */

.surah-search-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--navy-border);
  border-radius: 12px;
  background: var(--navy-card);
}

.surah-search-wrapper > span {
  color: var(--gold);
  font-size: 22px;
}

.surah-search-wrapper input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ivory);
  font-size: 12px;
}

.surah-search-wrapper input::placeholder {
  color: #82909f;
}

/* =========================================================
   FILTER TABS
========================================================= */

.filter-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 15px 0;
  scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar {
  display: none;
}

.filter-tab {
  flex-shrink: 0;
  padding: 9px 13px;
  border: 1px solid var(--navy-border);
  border-radius: 30px;
  background: var(--navy-card);
  color: var(--muted);
  font-size: 10px;
}

.filter-tab.active {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--navy-deep);
  font-weight: 700;
}

/* =========================================================
   SURAH TRACKER
========================================================= */

.all-surahs-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.surah-tracker-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px;
  border: 1px solid var(--navy-border);
  border-radius: 14px;
  background: var(--navy-card);
}

.surah-tracker-number {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 39px;
  height: 39px;
  border: 1px solid var(--navy-border);
  border-radius: 12px;
  color: var(--gold);
  font-size: 11px;
}

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

.surah-tracker-details strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.surah-tracker-details span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.surah-tracker-arabic {
  color: var(--gold-light);
  font-family: "Amiri", serif;
  font-size: 19px;
}

.surah-tracker-status {
  flex-shrink: 0;
  color: var(--gold);
  font-size: 9px;
}

/* =========================================================
   JUZ TRACKER
========================================================= */

.juz-summary-card {
  margin-bottom: 18px;
  padding: 21px;
  border: 1px solid var(--navy-border);
  border-radius: 16px;
  background: var(--navy-card);
}

.juz-summary-number {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-bottom: 16px;
}

.juz-summary-number strong {
  color: var(--gold-light);
  font-family: "Playfair Display", serif;
  font-size: 31px;
}

.juz-summary-number span {
  color: var(--muted);
  font-size: 11px;
}

.juz-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.juz-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 112px;
  padding: 12px 7px;
  border: 1px solid var(--navy-border);
  border-radius: 14px;
  background: var(--navy-card);
  text-align: center;
}

.juz-card strong {
  color: var(--gold-light);
  font-family: "Playfair Display", serif;
  font-size: 24px;
}

.juz-card span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 9px;
}

.juz-card.completed {
  border-color: rgba(139, 189, 156, 0.4);
  background: rgba(139, 189, 156, 0.07);
}

.juz-card.completed span {
  color: var(--success);
}

/* =========================================================
   ACTIVITY HISTORY
========================================================= */

.activity-summary-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 6px 17px;
  border: 1px solid var(--navy-border);
  border-radius: 16px;
  background: var(--navy-card);
}

.activity-summary-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
}

.activity-summary-item + .activity-summary-item {
  border-top: 1px solid var(--navy-border);
}

.activity-summary-icon {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border-radius: 12px;
  background: rgba(216, 184, 117, 0.1);
  color: var(--gold);
  font-size: 20px;
}

.activity-summary-item div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.activity-summary-item strong {
  color: var(--ivory);
  font-size: 14px;
}

.activity-summary-item div span {
  color: var(--muted);
  font-size: 10px;
}

.history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 13px;
}

.history-heading h3 {
  font-family: "Playfair Display", serif;
  font-size: 18px;
}

.history-heading > span {
  color: var(--muted);
  font-size: 10px;
}

.hifz-activity-history {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--navy-border);
  border-radius: 13px;
  background: var(--navy-card);
}

.activity-item-icon {
  color: var(--gold);
  font-size: 19px;
}

.activity-item strong {
  font-size: 11px;
}

.activity-item p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

/* =========================================================
   REMINDERS
========================================================= */

.reminder-card {
  padding: 23px;
  border: 1px solid var(--navy-border);
  border-radius: var(--radius);
  background: var(--navy-card);
}

.reminder-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 17px;
  border-radius: 14px;
  background: rgba(216, 184, 117, 0.1);
  color: var(--gold);
  font-size: 26px;
}

.reminder-card h3 {
  font-family: "Playfair Display", serif;
  font-size: 21px;
}

.reminder-card > p {
  margin: 9px 0 20px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.reminder-card .hifz-time-input {
  margin-bottom: 15px;
}

.reminder-card .primary-button {
  margin-top: 2px;
}

.reminder-card .reminder-status {
  margin: 14px 0 0;
  color: var(--success);
  font-size: 11px;
}

.reminder-card .reminder-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

/* =========================================================
   SETTINGS PANEL
========================================================= */

.hifz-settings-panel {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  justify-content: flex-end;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(5px);
}

.settings-panel-content {
  width: min(100%, 430px);
  height: 100%;
  overflow-y: auto;
  padding: 25px 21px;
  border-left: 1px solid var(--navy-border);
  background: var(--navy);
  animation: panelSlide 0.25s ease;
}

@keyframes panelSlide {
  from {
    transform: translateX(35px);
    opacity: 0;
  }

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

.settings-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 25px;
}

.settings-heading h2 {
  margin-top: 6px;
  font-family: "Playfair Display", serif;
  font-size: 25px;
}

.close-button {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border: 1px solid var(--navy-border);
  border-radius: 12px;
  background: var(--navy-card);
  color: var(--gold);
  font-size: 25px;
}

.settings-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 19px 0;
  border-bottom: 1px solid var(--navy-border);
}

.settings-option strong {
  font-size: 12px;
}

.settings-option p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

/* =========================================================
   EMPTY STATES
========================================================= */

.empty-state {
  padding: 30px 17px;
  border: 1px dashed rgba(216, 184, 117, 0.2);
  border-radius: 15px;
  background: rgba(20, 37, 58, 0.45);
  text-align: center;
}

.empty-state > span {
  display: block;
  margin-bottom: 12px;
  color: var(--gold);
  font-size: 30px;
}

.empty-state h3 {
  color: var(--ivory);
  font-family: "Playfair Display", serif;
  font-size: 17px;
}

.empty-state p {
  max-width: 280px;
  margin: 8px auto 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

/* =========================================================
   MODALS
========================================================= */

.hifz-modal {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(5px);
}

.hifz-modal-content {
  width: 100%;
  max-width: 390px;
  padding: 25px;
  border: 1px solid var(--navy-border);
  border-radius: 20px;
  background: var(--navy-card);
  box-shadow: var(--shadow);
}

.hifz-modal-content h2 {
  margin-bottom: 10px;
  font-family: "Playfair Display", serif;
  font-size: 23px;
}

.hifz-modal-content p {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.hifz-modal-content input {
  width: 100%;
  min-height: 47px;
  margin-bottom: 16px;
  padding: 0 13px;
  border: 1px solid var(--navy-border);
  border-radius: 11px;
  background: var(--navy-light);
  color: var(--ivory);
}

.modal-actions {
  display: flex;
  gap: 10px;
}

.modal-actions button {
  flex: 1;
}

.secondary-button {
  min-height: 45px;
  padding: 10px 14px;
  border: 1px solid var(--navy-border);
  border-radius: 11px;
  background: var(--navy-light);
  color: var(--ivory);
  font-size: 11px;
}

.modal-feedback {
  margin-top: 10px;
  color: var(--gold);
  font-size: 11px;
}

/* =========================================================
   TOAST
========================================================= */

.hifz-toast {
  position: fixed;
  z-index: 1000;
  right: 18px;
  bottom: 95px;
  left: 18px;
  width: fit-content;
  max-width: calc(100% - 36px);
  margin: 0 auto;
  padding: 13px 19px;
  border: 1px solid rgba(216, 184, 117, 0.35);
  border-radius: 12px;
  background: var(--navy-soft);
  color: var(--ivory);
  font-size: 11px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: 0.25s ease;
}

.hifz-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   BOTTOM NAVIGATION
========================================================= */

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-around;
  min-height: 72px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--navy-border);
  background: rgba(8, 19, 33, 0.97);
  backdrop-filter: blur(18px);
}

.bottom-nav a {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  color: #8994a2;
  font-size: 9px;
}

.bottom-nav a span {
  font-size: 19px;
}

.bottom-nav a.active {
  color: var(--gold-light);
}

.bottom-nav a.active span {
  color: var(--gold);
}

/* =========================================================
   RESPONSIVE DESIGN
========================================================= */

@media (min-width: 700px) {
  .hifz-app {
    padding-bottom: 35px;
  }

  .hifz-header {
    padding-right: 30px;
    padding-left: 30px;
  }

  .progress-section,
  .continue-section,
  .daily-goal-section,
  .streak-section,
  .quick-access-section,
  .hifz-content-section {
    padding-right: 30px;
    padding-left: 30px;
  }

  .hifz-hero {
    min-height: 450px;
  }

  .hero-content {
    padding-left: 45px;
  }

  .progress-main-card {
    padding: 32px;
  }

  .hifz-progress-circle {
    width: 210px;
    height: 210px;
  }

  .quick-access-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .juz-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .bottom-nav {
    position: static;
    width: 100%;
    max-width: 650px;
    min-height: 65px;
    margin: 25px auto 0;
    border: 1px solid var(--navy-border);
    border-radius: 18px;
  }
}

@media (max-width: 420px) {
  .hifz-header {
    gap: 10px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .header-title h1 {
    font-size: 17px;
  }

  .progress-section,
  .continue-section,
  .daily-goal-section,
  .streak-section,
  .quick-access-section,
  .hifz-content-section {
    padding-right: 14px;
    padding-left: 14px;
  }

  .progress-main-card {
    padding: 20px 13px;
  }

  .progress-ring-area {
    flex-direction: column;
    gap: 17px;
    text-align: center;
  }

  .progress-description {
    max-width: 280px;
  }

  .progress-stat-grid {
    gap: 4px;
  }

  .progress-stat strong {
    font-size: 20px;
  }

  .progress-stat > span:last-child {
    font-size: 9px;
  }

  .quick-access-card {
    min-height: 135px;
    padding: 13px;
  }

  .juz-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .workspace-card {
    padding: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
