/* Tajweed Lessons — design tokens.
   Calm, airy light theme (students, login) + soft dark theme (teacher/owner dashboards).
   One main accent (teal), one sparing secondary (soft coral). */

:root {
  --bg: #FBFAF6;
  --card: #FFFFFF;
  --border: #EAE4D6;
  --text: #2B2A35;
  --text-soft: #8A8698;
  --accent: #1F8A80;
  --accent-strong: #177A71;
  --accent-soft: #E7F2F0;
  --accent2: #DE6B5E;
  --accent2-soft: #FBEAE7;
  --note: #FCF5DF;
  --radius-lg: 18px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow-card: 0 1px 3px rgba(43, 42, 53, .06), 0 8px 24px rgba(43, 42, 53, .05);
  --shadow-pop: 0 12px 40px rgba(43, 42, 53, .16);
  --font-ui: "IBM Plex Sans Arabic", "Quicksand", sans-serif;
  --font-quran: "Amiri Quran", serif;
}

body.dark {
  --bg: #14161B;
  --card: #1C2027;
  --border: #2B303C;
  --text: #ECEAF4;
  --text-soft: #9B98AC;
  --accent: #4FBBB0;
  --accent-strong: #63C6BC;
  --accent-soft: rgba(79, 187, 176, .13);
  --accent2: #E08175;
  --accent2-soft: rgba(224, 129, 117, .13);
  --note: #262B35;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, .3), 0 10px 28px rgba(0, 0, 0, .25);
  --shadow-pop: 0 12px 40px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  min-height: 100vh;
}

.page { max-width: 780px; margin: 0 auto; padding: 22px 18px 64px; }

h1, h2, h3, h4 { margin: 0 0 10px; }
.section-title { font-size: 1.3rem; font-weight: 700; text-align: center; margin: 24px 0 16px; }
.muted { color: var(--text-soft); }

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 22px;
  margin: 14px 0;
}
.card.center { text-align: center; }

/* Small neutral tag (lesson titles, statuses) */
.tag {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
  padding: 7px 20px;
  border-radius: 999px;
  font-size: 1.02rem;
}

/* Buttons */
.btn {
  border: none;
  border-radius: 999px;
  padding: 11px 24px;
  font-family: var(--font-ui);
  font-size: .97rem;
  font-weight: 700;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  transition: filter .12s ease, transform .12s ease;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(1px); }
.btn-accent2 { background: var(--accent2); }
.btn-ghost { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); filter: none; }
.btn.mini { padding: 7px 15px; font-size: .83rem; }

/* Round icon button (bell, sign out, play…) */
.icon-btn {
  position: relative;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text);
  display: grid; place-items: center;
  cursor: pointer;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn .badge {
  position: absolute; top: -5px; right: -5px;
  background: var(--accent2); color: #fff;
  border-radius: 999px; min-width: 18px; height: 18px;
  display: grid; place-items: center;
  font-size: .68rem; font-weight: 700; padding: 0 5px;
}

/* Inputs */
.input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  padding: 12px 16px;
  font-family: var(--font-ui);
  font-size: .97rem;
  color: var(--text);
}
.input:focus { outline: none; border-color: var(--accent); }
textarea.input { min-height: 110px; }

/* Topbar */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 4px 0 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand img { width: 38px; height: 38px; }
.tabs {
  display: flex; gap: 4px; flex-wrap: wrap; justify-content: center;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 999px; padding: 5px;
}
.tab {
  border: none; background: transparent;
  color: var(--text-soft);
  font-family: var(--font-ui); font-weight: 700; font-size: .9rem;
  padding: 8px 15px; border-radius: 999px; cursor: pointer;
}
.tab.active { background: var(--accent); color: #fff; }
.side { display: flex; align-items: center; gap: 10px; }
.who {
  display: flex; align-items: center; gap: 8px;
  background: none; border: none; padding: 0;
  font-family: var(--font-ui); font-weight: 700; font-size: .95rem;
  color: var(--text); cursor: pointer;
}
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; font-weight: 700;
  background: var(--accent);
}

/* Notifications panel (opens from the bell) */
.notif-panel {
  position: fixed; top: 74px; right: max(18px, calc(50% - 380px));
  width: min(340px, 92vw); max-height: 60vh; overflow: auto;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-pop);
  z-index: 60; padding: 8px 16px;
}
.notif { padding: 11px 2px; border-bottom: 1px solid var(--border); font-size: .92rem; }
.notif:last-child { border-bottom: none; }
.notif.unread { font-weight: 700; }

/* Toasts (slide-in banners for new notifications) */
.toast-wrap {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 100; display: grid; gap: 10px; width: min(420px, 92vw);
}
.toast {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-pop);
  padding: 13px 16px; font-size: .93rem;
  animation: toast-in .3s ease both;
}
.toast .t-icon { color: var(--accent); flex: 0 0 auto; margin-top: 1px; }
.toast.out { transition: all .3s ease; transform: translateY(-14px); opacity: 0; }
@keyframes toast-in { from { transform: translateY(-14px); opacity: 0 } to { transform: none; opacity: 1 } }

/* Note strip */
.note { background: var(--note); border-radius: var(--radius-md); padding: 13px 18px; font-weight: 600; text-align: center; font-size: .93rem; }

/* Lesson list item */
.lesson { display: flex; align-items: center; gap: 14px; cursor: pointer; transition: border-color .12s ease; }
.lesson:hover { border-color: var(--accent); }
.lesson .num {
  width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-strong); font-weight: 700;
}
.lesson .state { margin-left: auto; color: var(--accent); display: grid; place-items: center; }
.lesson h3 { margin: 0 0 3px; font-size: 1.05rem; }
.lesson p { margin: 0; color: var(--text-soft); font-size: .9rem; }

/* Arabic letter circles */
.letter-circle {
  width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; font-size: 1.6rem; font-family: var(--font-quran);
  background: var(--accent);
}

/* Play button */
.play-btn {
  width: 46px; height: 46px; flex: 0 0 46px;
  border: none; border-radius: 50%;
  background: var(--accent2); cursor: pointer;
  display: grid; place-items: center;
  transition: transform .12s ease;
}
.play-btn:hover { transform: scale(1.06); }

/* Quran verse: roomy line height so tashkeel never collides */
.verse { font-family: var(--font-quran); font-size: 1.85rem; line-height: 2.6; word-spacing: .12em; padding: .25em 0; }
.verse-row { display: flex; align-items: center; gap: 14px; }
.verse-row .ref { margin-left: auto; color: var(--text-soft); font-size: .85rem; }

/* Quiz feedback — gentle, never angry */
.feedback-good { background: var(--accent-soft); color: var(--accent-strong); border-radius: var(--radius-md); padding: 18px; text-align: center; font-weight: 700; }
.feedback-sad { background: var(--note); border-radius: var(--radius-md); padding: 18px; text-align: center; font-weight: 600; }

/* Tables (dashboards) */
table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-card); }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: .93rem; }
tr:last-child td { border-bottom: none; }
th { background: var(--note); font-size: .85rem; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--accent-soft); }

/* Forms */
.grid-form { display: grid; gap: 12px; max-width: 380px; margin: 0 auto; }
.row-form { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; margin: 12px 0; }
.row-form .full { grid-column: 1 / -1; }
.swatches { display: flex; gap: 10px; justify-content: center; }
.swatch { width: 34px; height: 34px; border-radius: 50%; cursor: pointer; border: 3px solid transparent; }
.swatch.picked { border-color: var(--text); }

/* Footer (on every page) */
.site-footer { text-align: center; padding: 22px 12px 28px; color: var(--text-soft); font-size: .83rem; font-weight: 600; }
.site-footer .line { width: 64px; height: 3px; border-radius: 3px; margin: 0 auto 10px; background: var(--accent); opacity: .6; }

.hidden { display: none !important; }
@keyframes pop-in { from { transform: scale(.97); opacity: 0 } to { transform: scale(1); opacity: 1 } }
.pop { animation: pop-in .22s ease both; }

/* ===== Skill system layer (his design file: landing-page-design SKILL.md) ===== */
:root {
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 40px; --sp-8: 48px;
}
body.dark {
  --bg: #181818;
  --card: #1F1F1F;
  --raised: #272727;
  --border: #313131;
  --text: #ECEAF4;
  --text-soft: #9B98AC;
}

/* Named text styles (B1) */
.heading-4 { font-size: 36px; line-height: 40px; font-weight: 600; text-wrap: balance; }
.heading-5 { font-size: 24px; line-height: 32px; font-weight: 600; text-wrap: balance; }
.heading-6 { font-size: 20px; line-height: 28px; font-weight: 600; text-wrap: balance; }
.title-1 { font-size: 20px; line-height: 28px; font-weight: 500; }
.title-2 { font-size: 18px; line-height: 28px; font-weight: 500; }
.title-3 { font-size: 16px; line-height: 24px; font-weight: 500; }
.title-4 { font-size: 14px; line-height: 20px; font-weight: 500; }
.body-2 { font-size: 16px; line-height: 24px; font-weight: 500; text-wrap: pretty; }
.body-3 { font-size: 16px; line-height: 24px; font-weight: 400; text-wrap: pretty; }
.body-5 { font-size: 14px; line-height: 20px; font-weight: 500; text-wrap: pretty; }
.body-6 { font-size: 14px; line-height: 20px; font-weight: 400; text-wrap: pretty; }
.button-sm { font-size: 14px; line-height: 20px; font-weight: 600; }
.button-md { font-size: 16px; line-height: 24px; font-weight: 600; }
.caption-1 { font-size: 14px; line-height: 20px; font-weight: 500; }
.caption-2 { font-size: 14px; line-height: 20px; font-weight: 400; }
.caption-4 { font-size: 12px; line-height: 16px; font-weight: 500; }

/* Skill-aligned component tuning */
.btn { padding: 8px 12px; border-radius: 999px; transition: transform .3s var(--ease), filter .3s var(--ease); }
.btn:active { transform: scale(.98); }
.btn:focus-visible, .icon-btn:focus-visible, .tab:focus-visible, .input:focus-visible, .who:focus-visible, .person-row:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.card { padding: var(--sp-5); }
.topbar { padding-bottom: var(--sp-4); }
.avatar { width: 40px; height: 40px; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.icon-btn { width: 40px; height: 40px; transition: border-color .3s var(--ease), color .3s var(--ease); }

/* People lists: large rows with an end arrow, whole row tappable */
.person-row {
  display: flex; align-items: center; gap: var(--sp-4);
  width: 100%; text-align: left;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow-card);
  padding: var(--sp-4) var(--sp-5);
  margin: var(--sp-3) 0;
  font-family: var(--font-ui); color: var(--text);
  cursor: pointer;
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.person-row:hover { transform: translateY(-2px); border-color: var(--accent); }
.person-row .grow { flex: 1; min-width: 0; }
.person-row .arrow { color: var(--text-soft); display: grid; place-items: center; flex: 0 0 auto; }
.person-row:hover .arrow { color: var(--accent); }

/* Centered blurred modal (attendance system style) */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(15, 15, 20, .42);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: var(--sp-4);
}
.modal {
  width: min(460px, 94vw); max-height: 86vh; overflow: auto;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow-pop);
  padding: var(--sp-5);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-4); }
.modal-body { display: grid; gap: var(--sp-3); }
.modal-actions { display: flex; gap: var(--sp-3); justify-content: flex-end; margin-top: var(--sp-2); }

/* Scroll reveal + toasts on the skill motion curve */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.toast { animation: toast-in .5s var(--ease) both; }
@keyframes toast-in { from { transform: translateY(-16px); opacity: 0 } to { transform: none; opacity: 1 } }
.pop { animation: pop-in .4s var(--ease) both; }

/* Tagline reveal (B11): words activate one by one */
.tagline { text-align: center; margin: var(--sp-8) auto; max-width: 680px; }
.tagline .w { opacity: .3; transition: opacity .5s var(--ease); display: inline-block; margin-right: .28em; }
.tagline .w.on { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .tagline .w { opacity: 1; transition: none; }
  .pop { animation: none; }
}

/* Small screens: tidy topbar */
@media (max-width: 640px) {
  .topbar { justify-content: center; }
  .tabs { order: 3; width: 100%; }
}
