/* === DEEN DAILY — Modern Luxe === */

@font-face {
  font-family: "Omar Naskh";
  src: url("/fonts/omar-naskh-medium.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "LPMQ Isyarat";
  src: url("/fonts/lpmq-isyarat.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Ink (deep emeralds, near black) */
  --ink-950: #061811;
  --ink-900: #0A1F18;
  --ink-800: #0F2A20;
  --ink-700: #163828;
  --ink-600: #1F4E3A;
  --ink-500: #2C7058;
  --ink-400: #4A8C77;
  --ink-300: #79AC9B;
  --ink-200: #B8D2C7;
  --ink-100: #DCE9E2;

  /* Champagne / gold accents */
  --gold-50:  #FAF4E2;
  --gold-100: #F2E5BC;
  --gold-200: #E5D195;
  --gold-300: #D4B86A;
  --gold-400: #C9A961;
  --gold-500: #B89248;
  --gold-600: #8E6D2C;

  /* Cream / surface */
  --cream-50:  #FBF8F0;
  --cream-100: #F6F0E1;
  --cream-200: #EDE3CB;
  --cream-300: #E0D2B0;

  /* Charcoal / text */
  --ink-text:  #1B1F1D;
  --text-1:    #1B1F1D;
  --text-2:    #4F5651;
  --text-3:    #7A8079;
  --text-4:    #A8ADA6;

  /* Lines & surfaces */
  --line:        rgba(11, 31, 24, 0.06);
  --line-strong: rgba(11, 31, 24, 0.10);
  --surface:     #FFFFFF;
  --surface-2:   #FBFAF6;
  --surface-3:   #F6F0E1;
  --bg:          #F5F1E8;
  --bg-warm:     #F8F4EA;

  /* Shadows — multi-layer, soft */
  --sh-xs: 0 1px 2px rgba(11, 31, 24, 0.04);
  --sh-sm: 0 1px 2px rgba(11, 31, 24, 0.04), 0 1px 1px rgba(11, 31, 24, 0.03);
  --sh-md: 0 2px 4px rgba(11, 31, 24, 0.04), 0 8px 24px rgba(11, 31, 24, 0.06);
  --sh-lg: 0 4px 8px rgba(11, 31, 24, 0.04), 0 24px 64px rgba(11, 31, 24, 0.10);
  --sh-xl: 0 8px 16px rgba(11, 31, 24, 0.05), 0 40px 96px rgba(11, 31, 24, 0.12);
  --sh-glow: 0 0 0 1px rgba(212, 184, 106, 0.15), 0 8px 32px rgba(212, 184, 106, 0.18);

  /* Radius */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 999px;

  /* Type */
  --font-display: "Fraunces", "Source Serif Pro", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-arabic: "Omar Naskh", "LPMQ Isyarat", "Amiri", "Scheherazade New", serif;

  /* Easing */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
}

* { box-sizing: border-box; }
*::selection { background: var(--gold-200); color: var(--ink-900); }
html, body { margin: 0; padding: 0; }

html { font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-1);
  font-size: 15px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 20% 0%, rgba(212, 184, 106, 0.08), transparent 50%),
    radial-gradient(circle at 80% 100%, rgba(15, 42, 32, 0.05), transparent 50%);
  background-attachment: fixed;
}

a { color: var(--ink-500); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--ink-700); }
hr { border: none; border-top: 1px solid var(--line); margin: var(--s-5) 0; }

/* === LAYOUT === */
.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, var(--ink-900) 0%, var(--ink-950) 100%);
  color: var(--cream-100);
  padding: var(--s-6) var(--s-4);
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  border-right: 1px solid rgba(212, 184, 106, 0.08);
  overflow-y: auto;
}
.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(212, 184, 106, 0.06), transparent 60%);
  pointer-events: none;
}
.sidebar > * { position: relative; }

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-2) var(--s-3);
  margin-bottom: var(--s-6);
}
.sidebar .brand-mark {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--gold-300) 0%, var(--gold-500) 100%);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-900);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(212, 184, 106, 0.25), inset 0 1px 0 rgba(255,255,255,0.3);
}
.sidebar .brand-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--cream-50);
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 10px 14px;
  border-radius: var(--r-sm);
  color: rgba(246, 240, 225, 0.65);
  font-size: 13.5px;
  font-weight: 450;
  letter-spacing: -0.005em;
  transition: all 0.2s var(--ease);
  position: relative;
}
.sidebar nav a:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--cream-50);
}
.sidebar nav a.active {
  background: linear-gradient(90deg, rgba(212, 184, 106, 0.12) 0%, rgba(212, 184, 106, 0.04) 100%);
  color: var(--gold-200);
}
.sidebar nav a.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--gold-300), var(--gold-500));
  border-radius: 0 2px 2px 0;
}
.sidebar nav a .ic {
  width: 18px;
  text-align: center;
  font-size: 14px;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.sidebar nav a:hover .ic, .sidebar nav a.active .ic { opacity: 1; }

.sidebar .nav-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(246, 240, 225, 0.35);
  padding: var(--s-4) 14px var(--s-2);
}

.sidebar .footer-area {
  padding-top: var(--s-4);
  border-top: 1px solid rgba(246, 240, 225, 0.06);
  margin-top: var(--s-3);
}
.sidebar .user-chip {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--r-sm);
  margin-bottom: var(--s-2);
  border: 1px solid rgba(246, 240, 225, 0.05);
}
.sidebar .user-chip .name {
  color: var(--cream-50);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: -0.005em;
}
.sidebar .user-chip .email {
  color: rgba(246, 240, 225, 0.45);
  font-size: 11px;
  margin-top: 2px;
}
.sidebar .footer-area a {
  display: block;
  padding: 6px 14px;
  font-size: 12px;
  color: rgba(246, 240, 225, 0.55);
  border-radius: var(--r-sm);
  transition: all 0.2s var(--ease);
}
.sidebar .footer-area a:hover { color: var(--gold-200); background: rgba(255,255,255,0.03); }

/* === MAIN === */
.main {
  padding: var(--s-7) var(--s-7) var(--s-9);
  max-width: 1080px;
  width: 100%;
  animation: fadeIn 0.4s var(--ease-out);
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-head {
  margin-bottom: var(--s-6);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
}
.page-head h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.025em;
  line-height: 1.1;
  font-variation-settings: "opsz" 60, "SOFT" 50;
  color: var(--ink-900);
}
.page-head p {
  color: var(--text-3);
  margin: 6px 0 0;
  font-size: 14px;
  letter-spacing: -0.005em;
}

/* === CARDS === */
.card {
  background: var(--surface);
  border-radius: var(--r-md);
  padding: var(--s-5);
  box-shadow: var(--sh-sm);
  border: 1px solid var(--line);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.card.tight { padding: var(--s-4); }
.card.lg { padding: var(--s-6); }
.card h2, .card h3 {
  margin: 0 0 var(--s-3);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  color: var(--ink-900);
  letter-spacing: -0.015em;
}
.card-row { display: flex; gap: var(--s-4); flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4); }
@media (max-width: 720px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 22px;
  border-radius: var(--r-sm);
  border: none;
  background: var(--ink-900);
  color: var(--cream-50);
  font-weight: 500;
  font-size: 13.5px;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  font-family: inherit;
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, transparent 100%);
  pointer-events: none;
}
.btn:hover { background: var(--ink-800); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(11, 31, 24, 0.18); }
.btn:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(11, 31, 24, 0.15); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

.btn.ghost {
  background: var(--surface);
  color: var(--ink-900);
  border: 1px solid var(--line-strong);
  box-shadow: var(--sh-xs);
}
.btn.ghost::before { display: none; }
.btn.ghost:hover { background: var(--cream-50); border-color: var(--ink-300); }

.btn.gold {
  background: linear-gradient(180deg, var(--gold-300) 0%, var(--gold-500) 100%);
  color: var(--ink-900);
  font-weight: 600;
  box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset, 0 4px 12px rgba(212, 184, 106, 0.3);
}
.btn.gold:hover {
  background: linear-gradient(180deg, var(--gold-200) 0%, var(--gold-400) 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, 0 8px 20px rgba(212, 184, 106, 0.4);
}

.btn.sm { padding: 7px 14px; font-size: 12.5px; }
.btn.lg { padding: 14px 28px; font-size: 15px; border-radius: var(--r-md); }
.btn.full { width: 100%; }
.btn.danger {
  background: transparent;
  color: #b34141;
  border: 1px solid rgba(179, 65, 65, 0.3);
}
.btn.danger::before { display: none; }
.btn.danger:hover { background: rgba(179, 65, 65, 0.06); border-color: #b34141; transform: translateY(-1px); }

/* === FORMS === */
.field { margin-bottom: var(--s-4); }
.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0;
  margin-bottom: 6px;
}
.field input, .field textarea, .field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-family: inherit;
  font-size: 14px;
  color: var(--text-1);
  transition: all 0.2s var(--ease);
  letter-spacing: -0.005em;
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-4); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--ink-500);
  box-shadow: 0 0 0 4px rgba(31, 78, 58, 0.08);
}
.field textarea { resize: vertical; min-height: 88px; line-height: 1.55; }
.field .hint { font-size: 12px; color: var(--text-3); margin-top: 6px; line-height: 1.45; }

/* === LANDING === */
.landing {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 50% -20%, rgba(212, 184, 106, 0.18), transparent 60%),
    radial-gradient(ellipse at 100% 100%, rgba(15, 42, 32, 0.08), transparent 50%),
    linear-gradient(180deg, var(--bg-warm) 0%, var(--cream-100) 100%);
  display: flex;
  flex-direction: column;
}
.landing header {
  padding: var(--s-5) var(--s-7);
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}
.landing .brand {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
  color: var(--ink-900);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.015em;
}
.landing .brand .mark {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--ink-700) 0%, var(--ink-900) 100%);
  color: var(--gold-300);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 4px 16px rgba(11, 31, 24, 0.2);
}
.landing .auth-links { display: flex; gap: var(--s-3); }

.landing .hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--s-7) var(--s-5) var(--s-9);
  text-align: center;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}
.hero-inner { max-width: 820px; width: 100%; }
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(212, 184, 106, 0.12);
  border: 1px solid rgba(212, 184, 106, 0.25);
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--gold-600);
  letter-spacing: 0.02em;
  margin-bottom: var(--s-5);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 6.5vw, 68px);
  line-height: 1.02;
  margin: 0 0 var(--s-4);
  letter-spacing: -0.035em;
  color: var(--ink-900);
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 30;
}
.hero h1 em {
  color: var(--ink-600);
  font-style: italic;
  font-weight: 400;
  background: linear-gradient(135deg, var(--ink-600) 0%, var(--gold-500) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .lede {
  font-size: 18px;
  color: var(--text-2);
  margin: 0 auto var(--s-6);
  line-height: 1.55;
  max-width: 600px;
  letter-spacing: -0.005em;
}
.hero .cta-row {
  display: flex;
  gap: var(--s-3);
  justify-content: center;
  flex-wrap: wrap;
}
.hero .preview {
  margin: var(--s-8) auto 0;
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  box-shadow: var(--sh-xl);
  border: 1px solid var(--line);
  text-align: left;
  max-width: 760px;
  position: relative;
  overflow: hidden;
}
.hero .preview::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 184, 106, 0.4), transparent);
}
.hero .preview h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 4px;
  color: var(--ink-900);
  letter-spacing: -0.02em;
}
.hero .preview .sub {
  color: var(--text-3);
  font-size: 13px;
  margin-bottom: var(--s-5);
  letter-spacing: -0.005em;
}
.preview-times {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
@media (max-width: 600px) { .preview-times { grid-template-columns: repeat(3, 1fr); } }
.pt-cell {
  background: var(--cream-50);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px 8px;
  text-align: center;
  transition: all 0.25s var(--ease);
}
.pt-cell .lbl {
  font-size: 10px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}
.pt-cell .tm {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink-900);
  margin-top: 4px;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  font-variation-settings: "opsz" 60;
}
.pt-cell.next {
  background: linear-gradient(160deg, var(--ink-900) 0%, var(--ink-800) 100%);
  border-color: var(--ink-700);
  box-shadow: 0 8px 24px rgba(11, 31, 24, 0.2);
}
.pt-cell.next .lbl { color: var(--gold-300); }
.pt-cell.next .tm { color: var(--gold-200); }

.feature-grid {
  margin-top: var(--s-9);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}
@media (max-width: 720px) { .feature-grid { grid-template-columns: 1fr; } }
.feature {
  background: var(--surface);
  border-radius: var(--r-md);
  padding: var(--s-5);
  border: 1px solid var(--line);
  text-align: left;
  transition: all 0.3s var(--ease);
}
.feature:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-md);
  border-color: var(--line-strong);
}
.feature h4 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  color: var(--ink-900);
  letter-spacing: -0.015em;
}
.feature p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.55;
  letter-spacing: -0.005em;
}
.feature .ic-pill {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--cream-100) 0%, var(--cream-200) 100%);
  color: var(--ink-700);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: var(--s-3);
  border: 1px solid var(--line);
}
.landing footer {
  text-align: center;
  padding: var(--s-6) var(--s-5);
  color: var(--text-4);
  font-size: 12px;
  letter-spacing: -0.005em;
}

/* === AUTH FORMS === */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(212, 184, 106, 0.12), transparent 50%),
    linear-gradient(180deg, var(--bg-warm) 0%, var(--cream-100) 100%);
  padding: var(--s-5);
}
.auth-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--s-7);
  width: 100%;
  max-width: 440px;
  box-shadow: var(--sh-xl);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.auth-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 184, 106, 0.5), transparent);
}
.auth-card .brand {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  color: var(--ink-900);
  text-align: center;
  margin-bottom: 6px;
  letter-spacing: -0.025em;
}
.auth-card .sub {
  text-align: center;
  color: var(--text-3);
  margin-bottom: var(--s-6);
  font-size: 14px;
  letter-spacing: -0.005em;
}
.auth-card .switch {
  text-align: center;
  margin-top: var(--s-5);
  font-size: 13px;
  color: var(--text-3);
}
.auth-card .switch a { color: var(--ink-600); font-weight: 500; }

/* === DASHBOARD === */
.welcome-card {
  background: linear-gradient(135deg, var(--ink-900) 0%, var(--ink-700) 60%, var(--ink-600) 100%);
  color: var(--cream-50);
  padding: var(--s-6);
  border-radius: var(--r-lg);
  margin-bottom: var(--s-5);
  position: relative;
  overflow: hidden;
  box-shadow: var(--sh-lg);
}
.welcome-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 0%, rgba(212, 184, 106, 0.18), transparent 50%);
  pointer-events: none;
}
.welcome-card::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 184, 106, 0.4), transparent);
}
.welcome-card > * { position: relative; z-index: 1; }
.welcome-card .greet {
  font-size: 13px;
  opacity: 0.7;
  margin-bottom: 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
}
.welcome-card h2 {
  font-family: var(--font-display);
  font-size: 26px;
  margin: 0 0 var(--s-5);
  color: var(--cream-50);
  font-weight: 500;
  letter-spacing: -0.025em;
}
.welcome-card .next-prayer {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  background: rgba(0, 0, 0, 0.18);
  border-radius: var(--r-md);
  border: 1px solid rgba(212, 184, 106, 0.12);
  backdrop-filter: blur(8px);
}
.welcome-card .next-prayer .label {
  font-size: 11px;
  opacity: 0.65;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}
.welcome-card .next-prayer .name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-top: 2px;
}
.welcome-card .next-prayer .countdown {
  margin-left: auto;
  text-align: right;
}
.welcome-card .next-prayer .countdown .time {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  color: var(--gold-200);
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.welcome-card .next-prayer .countdown .left {
  font-size: 12px;
  opacity: 0.7;
  margin-top: 4px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--r-md);
  padding: var(--s-4) var(--s-5);
  border: 1px solid var(--line);
  transition: all 0.25s var(--ease);
}
.stat-card:hover { border-color: var(--line-strong); transform: translateY(-1px); box-shadow: var(--sh-sm); }
.stat-card .lbl {
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 8px;
}
.stat-card .val {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
  color: var(--ink-900);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.stat-card .val .small {
  font-size: 13px;
  color: var(--text-3);
  font-weight: 400;
  letter-spacing: 0;
  margin-left: 4px;
}

.progress-bar {
  height: 4px;
  background: var(--cream-200);
  border-radius: var(--r-full);
  overflow: hidden;
  margin-top: var(--s-3);
}
.progress-bar > div {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-300), var(--gold-500));
  transition: width 0.6s var(--ease-out);
  border-radius: var(--r-full);
}

/* === SHOLAT TRACKER === */
.prayer-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-top: var(--s-3);
}
@media (max-width: 600px) { .prayer-grid { grid-template-columns: repeat(3, 1fr); } }
.prayer-cell {
  background: var(--cream-50);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s-3) 8px;
  text-align: center;
  transition: all 0.25s var(--ease);
}
.prayer-cell .lbl {
  font-size: 10px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}
.prayer-cell .tm {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  color: var(--ink-900);
  margin-top: 4px;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}
.prayer-cell.next {
  background: linear-gradient(160deg, var(--ink-900) 0%, var(--ink-800) 100%);
  border-color: var(--ink-700);
  box-shadow: 0 4px 16px rgba(11, 31, 24, 0.2);
}
.prayer-cell.next .lbl { color: var(--gold-300); }
.prayer-cell.next .tm { color: var(--gold-200); }

.checklist { display: flex; flex-direction: column; gap: 6px; }
.check-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  user-select: none;
}
.check-row:hover {
  border-color: var(--line-strong);
  background: var(--cream-50);
}
.check-row.done {
  background: linear-gradient(90deg, rgba(31, 78, 58, 0.04), rgba(212, 184, 106, 0.04));
  border-color: rgba(31, 78, 58, 0.15);
}
.check-row .check {
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--text-4);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s var(--ease);
  color: transparent;
  font-size: 13px;
  font-weight: 700;
}
.check-row.done .check {
  background: linear-gradient(135deg, var(--ink-600), var(--ink-800));
  border-color: var(--ink-700);
  color: var(--cream-50);
  box-shadow: 0 2px 6px rgba(11, 31, 24, 0.15);
}
.check-row .lbl { flex: 1; font-weight: 500; font-size: 14px; letter-spacing: -0.005em; }
.check-row .meta {
  font-size: 12px;
  color: var(--text-3);
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--gold-200) 0%, var(--gold-400) 100%);
  color: var(--ink-900);
  border-radius: var(--r-full);
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: -0.005em;
  box-shadow: 0 4px 16px rgba(212, 184, 106, 0.25), inset 0 1px 0 rgba(255,255,255,0.4);
}

/* === DZIKIR === */
.dzikir-counter {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: var(--s-7) var(--s-5);
  background: linear-gradient(160deg, var(--cream-50) 0%, var(--cream-100) 100%);
  border-radius: var(--r-lg);
  margin: var(--s-4) 0;
  border: 1px solid var(--line);
}
.dzikir-counter .num {
  font-family: var(--font-display);
  font-size: 96px;
  font-weight: 400;
  color: var(--ink-900);
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  font-variation-settings: "opsz" 144;
}
.dzikir-counter .label {
  color: var(--text-3);
  margin-top: var(--s-3);
  font-size: 13px;
  letter-spacing: 0.02em;
}
.dzikir-counter button {
  margin-top: var(--s-5);
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--ink-700) 0%, var(--ink-900) 100%);
  color: var(--cream-50);
  border: none;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: -0.005em;
  box-shadow: 0 16px 40px rgba(11, 31, 24, 0.25), inset 0 1px 0 rgba(255,255,255,0.1);
  transition: all 0.15s var(--ease);
  font-family: inherit;
}
.dzikir-counter button:hover {
  transform: scale(1.04);
  box-shadow: 0 20px 50px rgba(11, 31, 24, 0.32), inset 0 1px 0 rgba(255,255,255,0.15);
}
.dzikir-counter button:active { transform: scale(0.96); }

.dzikir-arabic {
  font-family: var(--font-arabic);
  font-size: 30px;
  line-height: 2.1;
  text-align: right;
  direction: rtl;
  color: var(--ink-900);
  padding: var(--s-3) 0;
  font-feature-settings: "liga", "calt", "kern";
  text-rendering: optimizeLegibility;
}
.dzikir-translit {
  font-style: italic;
  color: var(--text-2);
  margin-top: var(--s-2);
  font-size: 14px;
  font-family: var(--font-display);
  letter-spacing: -0.005em;
}
.dzikir-meaning { color: var(--text-1); margin-top: 6px; font-size: 14px; line-height: 1.55; }

/* === HABITS === */
.habit-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-bottom: 8px;
  transition: all 0.2s var(--ease);
}
.habit-row:hover {
  border-color: var(--line-strong);
  box-shadow: var(--sh-sm);
}
.habit-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--cream-100), var(--cream-200));
  color: var(--ink-700);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  border: 1px solid var(--line);
}
.habit-name { flex: 1; font-weight: 500; font-size: 14px; letter-spacing: -0.005em; }
.habit-week { display: flex; gap: 4px; }
.habit-day {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--cream-50);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-4);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  font-weight: 600;
}
.habit-day:hover { background: var(--cream-100); border-color: var(--line-strong); }
.habit-day.done {
  background: linear-gradient(135deg, var(--ink-600), var(--ink-800));
  color: var(--cream-50);
  border-color: var(--ink-700);
  box-shadow: 0 2px 6px rgba(11, 31, 24, 0.15);
}
.habit-day.today { box-shadow: 0 0 0 2px var(--gold-300); }
.habit-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}
.habit-row:hover .habit-actions { opacity: 1; }

/* === GOALS === */
.goal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s-5);
  margin-bottom: var(--s-3);
  position: relative;
  transition: all 0.25s var(--ease);
}
.goal-card:hover { border-color: var(--line-strong); box-shadow: var(--sh-sm); }
.goal-card.done { opacity: 0.55; }
.goal-card.done .goal-title { text-decoration: line-through; }
.goal-card .cat-pill {
  display: inline-block;
  font-size: 10px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 10px;
}
.cat-pill.dunia { background: rgba(31, 78, 58, 0.08); color: var(--ink-600); }
.cat-pill.akhirat { background: rgba(31, 78, 58, 0.12); color: var(--ink-700); }
.cat-pill.keluarga { background: rgba(212, 184, 106, 0.18); color: var(--gold-600); }
.cat-pill.ilmu { background: rgba(11, 31, 24, 0.08); color: var(--ink-800); }
.goal-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  margin: 0 0 var(--s-3);
  color: var(--ink-900);
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.goal-niat {
  font-style: italic;
  color: var(--text-2);
  font-size: 14px;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--cream-50), var(--cream-100));
  border-left: 2px solid var(--gold-400);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin: 0 0 var(--s-3);
  line-height: 1.55;
  letter-spacing: -0.005em;
}
.goal-niat::before {
  content: "نِيَّة ";
  font-style: normal;
  color: var(--gold-500);
  font-weight: 600;
  font-family: var(--font-arabic);
}
.goal-meta { font-size: 12px; color: var(--text-3); }
.goal-actions { display: flex; gap: 8px; margin-top: var(--s-3); }

/* === POMODORO === */
.pom-display {
  text-align: center;
  padding: var(--s-9) var(--s-5);
  background:
    radial-gradient(circle at 50% 20%, rgba(212, 184, 106, 0.18), transparent 50%),
    linear-gradient(160deg, var(--ink-900) 0%, var(--ink-800) 100%);
  color: var(--cream-50);
  border-radius: var(--r-lg);
  position: relative;
  overflow: hidden;
  box-shadow: var(--sh-lg);
  border: 1px solid var(--ink-700);
}
.pom-display::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 184, 106, 0.5), transparent);
}
.pom-time {
  font-family: var(--font-display);
  font-size: clamp(96px, 15vw, 144px);
  font-weight: 400;
  color: var(--gold-200);
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  text-shadow: 0 4px 30px rgba(212, 184, 106, 0.2);
}
.pom-state {
  font-size: 12px;
  opacity: 0.65;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: var(--s-4);
  font-weight: 600;
}
.pom-controls {
  display: flex;
  gap: var(--s-3);
  justify-content: center;
  margin-top: var(--s-6);
}
.pom-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-3);
  margin-top: var(--s-4);
}

/* === JOURNAL === */
.journal-q { margin-bottom: var(--s-5); }
.journal-q label {
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--ink-900);
  display: block;
  margin-bottom: 10px;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.ai-reflection {
  margin-top: var(--s-5);
  padding: var(--s-5);
  background:
    radial-gradient(circle at 100% 0%, rgba(212, 184, 106, 0.08), transparent 50%),
    linear-gradient(135deg, var(--cream-50) 0%, var(--cream-100) 100%);
  border-radius: var(--r-md);
  border: 1px solid rgba(212, 184, 106, 0.2);
  position: relative;
  overflow: hidden;
}
.ai-reflection::before {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--gold-300), var(--gold-500));
}
.ai-reflection .label {
  font-size: 11px;
  color: var(--gold-600);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}
.ai-reflection .body {
  font-style: italic;
  color: var(--text-1);
  line-height: 1.7;
  white-space: pre-wrap;
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: -0.005em;
}

/* === HADITH === */
.hadith-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(212, 184, 106, 0.08), transparent 60%),
    linear-gradient(160deg, var(--surface) 0%, var(--cream-50) 100%);
  border-radius: var(--r-lg);
  padding: var(--s-7);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  box-shadow: var(--sh-md);
}
.hadith-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 184, 106, 0.4), transparent);
}
.hadith-arabic {
  font-family: var(--font-arabic);
  font-size: 32px;
  line-height: 2.2;
  text-align: right;
  direction: rtl;
  color: var(--ink-900);
  margin-bottom: var(--s-5);
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--line);
  font-feature-settings: "liga", "calt", "kern";
  text-rendering: optimizeLegibility;
}
.hadith-text {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-900);
  margin-bottom: var(--s-3);
  letter-spacing: -0.015em;
  font-weight: 400;
}
.hadith-source {
  font-size: 13px;
  color: var(--gold-600);
  font-weight: 600;
  margin-bottom: var(--s-5);
  letter-spacing: 0.02em;
}
.hadith-tadabbur {
  background: rgba(31, 78, 58, 0.04);
  padding: var(--s-5);
  border-radius: var(--r-md);
  border-left: 2px solid var(--ink-600);
  font-style: italic;
  color: var(--text-1);
  line-height: 1.7;
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: -0.005em;
}
.hadith-tadabbur .label {
  font-size: 11px;
  color: var(--ink-700);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-style: normal;
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-body);
}

/* === CHAT === */
.chat-shell {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 200px);
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: var(--sh-sm);
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.chat-bubble {
  max-width: 80%;
  padding: 14px 18px;
  border-radius: var(--r-md);
  line-height: 1.6;
  font-size: 14px;
  white-space: pre-wrap;
  letter-spacing: -0.005em;
  animation: bubbleIn 0.25s var(--ease-out);
}
@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.chat-bubble.user {
  background: linear-gradient(160deg, var(--ink-800), var(--ink-900));
  color: var(--cream-50);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(11, 31, 24, 0.15);
}
.chat-bubble.assistant {
  background: var(--cream-50);
  color: var(--text-1);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  border: 1px solid var(--line);
}
.chat-bubble.assistant.thinking { color: var(--text-3); font-style: italic; }
.chat-input-row {
  display: flex;
  gap: 10px;
  padding: var(--s-4);
  border-top: 1px solid var(--line);
  background: var(--cream-50);
}
.chat-input-row input {
  flex: 1;
  padding: 12px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-family: inherit;
  font-size: 14px;
  letter-spacing: -0.005em;
}
.chat-input-row input:focus {
  outline: none;
  border-color: var(--ink-500);
  box-shadow: 0 0 0 4px rgba(31, 78, 58, 0.08);
}

/* === SETTINGS === */
.settings-section { margin-bottom: var(--s-6); }
.settings-section h3 {
  font-family: var(--font-display);
  color: var(--ink-900);
  margin: 0 0 var(--s-3);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.015em;
}

/* === MODAL === */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 31, 24, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(8px);
  animation: fadeIn 0.2s var(--ease-out);
}
.modal {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  width: 100%;
  max-width: 500px;
  margin: var(--s-5);
  box-shadow: var(--sh-xl);
  border: 1px solid var(--line);
  animation: modalIn 0.3s var(--ease-out);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal h3 {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 0 0 var(--s-4);
  color: var(--ink-900);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: var(--s-4);
}

/* === TOAST === */
.toast-stack {
  position: fixed;
  bottom: var(--s-5);
  right: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}
.toast {
  background: var(--ink-900);
  color: var(--cream-50);
  padding: 12px 18px;
  border-radius: var(--r-md);
  box-shadow: var(--sh-lg);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  animation: slideUp 0.3s var(--ease-out);
  max-width: 360px;
  border: 1px solid var(--ink-700);
}
.toast.success {
  background: linear-gradient(135deg, var(--ink-700), var(--ink-900));
  border-color: var(--ink-600);
}
.toast.error { background: #8b3838; border-color: #6e2c2c; }
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* === MOBILE NAV === */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
  padding: 8px 12px env(safe-area-inset-bottom);
  z-index: 50;
}
.mobile-nav-row { display: flex; justify-content: space-around; }
.mobile-nav a {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
  font-size: 10px;
  color: var(--text-3);
  border-radius: var(--r-sm);
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: all 0.2s var(--ease);
}
.mobile-nav a .ic { display: block; font-size: 16px; margin-bottom: 2px; }
.mobile-nav a.active { color: var(--ink-700); background: var(--cream-100); font-weight: 600; }

@media (max-width: 880px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .mobile-nav { display: block; }
  .main { padding: var(--s-5) var(--s-4) calc(var(--s-9) + var(--s-5)); }
  .page-head h1 { font-size: 26px; }
  .welcome-card { padding: var(--s-5); }
  .welcome-card h2 { font-size: 22px; }
  .hero { padding: var(--s-5) var(--s-4) var(--s-7); }
  .landing header { padding: var(--s-4); }
  .auth-card { padding: var(--s-5); }
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  opacity: 0.6;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty {
  text-align: center;
  padding: var(--s-7) var(--s-5);
  color: var(--text-3);
}
.empty .icn { font-size: 32px; margin-bottom: 8px; opacity: 0.4; }

.muted { color: var(--text-3); font-size: 13px; letter-spacing: -0.005em; }
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 11px;
  background: var(--cream-100);
  color: var(--text-2);
  font-weight: 500;
  border: 1px solid var(--line);
}

/* === SUBTLE DIVIDER ORNAMENT === */
.ornament {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  color: var(--text-4);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  margin: var(--s-5) 0;
}
.ornament::before, .ornament::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

/* === MOOD TRACKER === */
.mood-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: var(--s-5);
}
.mood-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 20px 16px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.25s var(--ease);
  position: relative;
  overflow: hidden;
}
.mood-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, var(--mood-bg-1, rgba(11,31,24,0.04)), var(--mood-bg-2, rgba(11,31,24,0.01)));
  pointer-events: none;
  transition: opacity 0.25s var(--ease);
}
.mood-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-md);
  border-color: var(--mood-accent, var(--ink-300));
}
.mood-card > * { position: relative; z-index: 1; }
.mood-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: var(--mood-icon-bg, var(--cream-100));
  color: var(--mood-icon-fg, var(--ink-700));
  margin-bottom: 12px;
  border: 1px solid rgba(11,31,24,0.06);
}
.mood-label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  color: var(--ink-900);
  letter-spacing: -0.015em;
}
.mood-sub {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
  letter-spacing: -0.005em;
}

/* Tone palettes */
.mood-ember    { --mood-bg-1: rgba(202,90,60,.10); --mood-bg-2: rgba(202,90,60,.02); --mood-icon-bg: rgba(202,90,60,.14); --mood-icon-fg: #8a3a1f; --mood-accent: rgba(202,90,60,.3); }
.mood-indigo   { --mood-bg-1: rgba(60,75,135,.10); --mood-bg-2: rgba(60,75,135,.02); --mood-icon-bg: rgba(60,75,135,.14); --mood-icon-fg: #2c386b; --mood-accent: rgba(60,75,135,.3); }
.mood-violet   { --mood-bg-1: rgba(120,80,170,.10); --mood-bg-2: rgba(120,80,170,.02); --mood-icon-bg: rgba(120,80,170,.14); --mood-icon-fg: #5e3f8c; --mood-accent: rgba(120,80,170,.3); }
.mood-slate    { --mood-bg-1: rgba(80,95,110,.10); --mood-bg-2: rgba(80,95,110,.02); --mood-icon-bg: rgba(80,95,110,.14); --mood-icon-fg: #3d4a59; --mood-accent: rgba(80,95,110,.3); }
.mood-ocean    { --mood-bg-1: rgba(40,110,140,.10); --mood-bg-2: rgba(40,110,140,.02); --mood-icon-bg: rgba(40,110,140,.14); --mood-icon-fg: #1e5573; --mood-accent: rgba(40,110,140,.3); }
.mood-ash      { --mood-bg-1: rgba(110,110,110,.10); --mood-bg-2: rgba(110,110,110,.02); --mood-icon-bg: rgba(110,110,110,.14); --mood-icon-fg: #555; --mood-accent: rgba(110,110,110,.3); }
.mood-rose     { --mood-bg-1: rgba(180,90,120,.10); --mood-bg-2: rgba(180,90,120,.02); --mood-icon-bg: rgba(180,90,120,.14); --mood-icon-fg: #8a3f5a; --mood-accent: rgba(180,90,120,.3); }
.mood-midnight { --mood-bg-1: rgba(35,50,90,.12); --mood-bg-2: rgba(35,50,90,.02); --mood-icon-bg: rgba(35,50,90,.18); --mood-icon-fg: #1a2548; --mood-accent: rgba(35,50,90,.35); }
.mood-umber    { --mood-bg-1: rgba(140,90,50,.10); --mood-bg-2: rgba(140,90,50,.02); --mood-icon-bg: rgba(140,90,50,.14); --mood-icon-fg: #6b4220; --mood-accent: rgba(140,90,50,.3); }
.mood-gold     { --mood-bg-1: rgba(212,184,106,.16); --mood-bg-2: rgba(212,184,106,.04); --mood-icon-bg: rgba(212,184,106,.22); --mood-icon-fg: #8a6d2c; --mood-accent: rgba(212,184,106,.4); }
.mood-amber    { --mood-bg-1: rgba(220,150,50,.12); --mood-bg-2: rgba(220,150,50,.02); --mood-icon-bg: rgba(220,150,50,.18); --mood-icon-fg: #8a5b1c; --mood-accent: rgba(220,150,50,.35); }
.mood-emerald  { --mood-bg-1: rgba(13,92,63,.10); --mood-bg-2: rgba(13,92,63,.02); --mood-icon-bg: rgba(13,92,63,.14); --mood-icon-fg: var(--ink-700); --mood-accent: rgba(13,92,63,.3); }

/* Verse card */
.mood-verse-card {
  margin-top: 8px;
  background:
    radial-gradient(circle at 100% 0%, var(--mood-bg-1), transparent 60%),
    var(--surface);
  border-color: var(--mood-accent, var(--line-strong));
  animation: fadeIn 0.4s var(--ease-out);
}
.mood-verse-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.mood-verse-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: var(--mood-icon-bg);
  color: var(--mood-icon-fg);
  border: 1px solid rgba(11,31,24,0.08);
}
.mood-verse-mood-label {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink-900);
  letter-spacing: -0.015em;
}
.mood-verse-ref {
  font-size: 12px;
  color: var(--gold-600);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}
.mood-verse-arabic {
  margin-bottom: 16px !important;
  padding-bottom: 16px !important;
  border-bottom: 1px solid var(--line);
}
.mood-verse-snippet {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-900);
  font-style: italic;
  letter-spacing: -0.01em;
  font-weight: 400;
  padding: 4px 0;
}
.mood-verse-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.mood-log-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: var(--mood-icon-bg);
  color: var(--mood-icon-fg);
  border: 1px solid rgba(11,31,24,0.06);
  flex-shrink: 0;
}

/* === AUDIO LIBRARY === */
.qari-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.qari-chip {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  padding: 10px 16px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all 0.2s var(--ease);
  min-width: 140px;
}
.qari-chip:hover { border-color: var(--ink-300); background: var(--cream-50); transform: translateY(-1px); }
.qari-chip.active {
  background: linear-gradient(160deg, var(--ink-900), var(--ink-700));
  border-color: var(--ink-700);
  color: var(--cream-50);
  box-shadow: 0 4px 12px rgba(11, 31, 24, 0.18);
}
.qari-chip-name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink-900);
}
.qari-chip.active .qari-chip-name { color: var(--gold-200); }
.qari-chip-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.qari-chip.active .qari-chip-sub { color: rgba(246, 240, 225, 0.6); }

.audio-bar {
  position: fixed;
  bottom: -100px;
  left: 0;
  right: 0;
  background: rgba(10, 31, 24, 0.96);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  color: var(--cream-50);
  padding: 12px 20px env(safe-area-inset-bottom);
  z-index: 60;
  border-top: 1px solid rgba(212, 184, 106, 0.15);
  transition: bottom 0.3s var(--ease-out);
  box-shadow: 0 -8px 32px rgba(11, 31, 24, 0.3);
}
.audio-bar.open { bottom: 0; }
.audio-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 20px;
  align-items: center;
}
.audio-meta { display: flex; align-items: center; gap: 12px; min-width: 0; }
.audio-thumb {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink-900);
  font-size: 15px;
  flex-shrink: 0;
}
.audio-text { min-width: 0; flex: 1; }
.audio-title {
  font-weight: 500;
  font-size: 13.5px;
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.audio-sub {
  font-size: 11.5px;
  color: rgba(246, 240, 225, 0.6);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.audio-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.audio-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--gold-300);
  color: var(--ink-900);
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
  transition: all 0.15s var(--ease);
  font-family: inherit;
}
.audio-btn:hover { background: var(--gold-200); transform: scale(1.04); }
.audio-time-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.audio-time {
  font-family: var(--font-display);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: rgba(246, 240, 225, 0.7);
  flex-shrink: 0;
}
.audio-seek-wrap { flex: 1; min-width: 60px; display: flex; }
.audio-seek {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 4px;
  background: rgba(246, 240, 225, 0.15);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.audio-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  background: var(--gold-300);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--ink-900);
}
.audio-seek::-moz-range-thumb {
  width: 14px; height: 14px;
  background: var(--gold-300);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--ink-900);
}
.audio-actions { display: flex; gap: 6px; flex-shrink: 0; }
.audio-btn-sm {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(246, 240, 225, 0.08);
  color: rgba(246, 240, 225, 0.85);
  border: none;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s var(--ease);
}
.audio-btn-sm:hover { background: rgba(246, 240, 225, 0.15); color: var(--gold-200); }

body.has-audio-bar { padding-bottom: 90px; }
@media (max-width: 880px) {
  .audio-bar.open { bottom: 60px; }
  body.has-audio-bar { padding-bottom: 150px; }
  .audio-bar-inner { grid-template-columns: 1fr auto; gap: 8px; }
  .audio-controls { grid-column: 1 / -1; order: 2; padding-top: 4px; }
  .audio-actions { order: 1; }
  .audio-thumb { width: 38px; height: 38px; }
}

/* === SCROLLBARS === */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: var(--r-full); border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--text-4); }
