/* "My account" page for the Tajweed course. Uses course.css variables, so it follows light and dark. */
.dash { max-width: 920px; margin: 0 auto; padding: 28px 20px 56px; }
.dash-head h1 { font-family: var(--font-head); font-size: clamp(1.8rem, 5vw, 2.4rem); margin: 4px 0 2px; color: var(--green); }
.dash-hello { color: var(--gold); font-family: var(--font-head); font-style: italic; min-height: 1.4em; margin: 0; }
.dash-head .lead { color: var(--muted); margin: 6px 0 0; max-width: 640px; }
.dash h2 { font-family: var(--font-head); font-size: 1.3rem; margin: 0 0 12px; }
.dash h3 { font-family: var(--font-head); font-size: 1.2rem; margin: 0 0 12px; }
.dash-muted { color: var(--muted); margin: 0 0 10px; }
.dash-small { color: var(--muted); font-size: 0.86rem; margin: 0; }
.dash-kicker { margin: 0 0 4px; font-weight: 700; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); }

.dash-card {
  margin-top: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
#dash-body > .dash-card:first-child { margin-top: 24px; }

/* Today */
.dash-today { position: relative; overflow: hidden; }
.dash-today::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--green); }
.dash-today-grid { display: grid; gap: 24px; }
@media (min-width: 720px) { .dash-today-grid { grid-template-columns: minmax(0, 1fr) 230px; align-items: start; } }
.dash-routine { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.dash-routine li { display: flex; align-items: center; gap: 12px; }
.dash-routine a { color: var(--ink); font-weight: 600; }
.dash-tick {
  flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--line); font-weight: 700; font-size: 0.85rem; color: var(--muted);
}
.dash-routine li.is-done .dash-tick { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.dash-routine li.is-done > span:last-child { color: var(--muted); }
.dash-go {
  display: inline-flex; align-items: center; min-height: 44px; padding: 10px 22px; border-radius: 999px;
  background: var(--green); color: var(--green-ink); font-weight: 700; text-decoration: none;
}
.dash-go:hover { filter: brightness(1.08); }
.dash-goal { text-align: center; }
.dash-ring-wrap { position: relative; width: 150px; height: 150px; margin: 0 auto; }
.dash-ring { width: 100%; height: 100%; }
.dash-ring circle { fill: none; stroke-width: 10; stroke-linecap: round; }
.dash-ring-track { stroke: var(--band); }
.dash-ring-fill { stroke: var(--green); transition: stroke-dasharray 0.6s ease; }
.dash-ring-mid { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.dash-ring-mid strong { font-family: var(--font-head); font-size: 2.2rem; line-height: 1; }
.dash-ring-mid span { color: var(--muted); font-size: 0.85rem; }
.dash-goal-msg { font-weight: 600; margin: 10px 0 12px; }
.dash-goal-label { margin: 0 0 6px; font-size: 0.82rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.dash-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.dash-chip {
  border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 999px;
  padding: 6px 12px; font: 600 0.88rem/1 var(--font-body); cursor: pointer;
}
.dash-chip.on { background: var(--green); border-color: var(--green); color: var(--green-ink); }

/* Streak + calendar */
.dash-streak-head { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.dash-streak-num { display: grid; width: 110px; height: 110px; border-radius: 50%; background: var(--band); text-align: center; align-content: center; }
.dash-streak-num strong { font-family: var(--font-head); font-size: 2.6rem; line-height: 1; color: var(--green); }
.dash-streak-num span { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.dash-streak-side { flex: 1; min-width: 220px; }
.dash-streak-msg { font-family: var(--font-head); font-size: 1.15rem; margin: 0 0 6px; }
.dash-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; max-width: 420px; }
.dash-cal-h { text-align: center; font-size: 0.75rem; font-weight: 700; color: var(--muted); }
.dash-cal-d {
  aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px; font-size: 0.8rem; color: var(--muted);
  background: var(--bg); border: 1px solid var(--line);
}
.dash-cal-d.is-on { background: var(--green); border-color: var(--green); color: var(--green-ink); font-weight: 700; }
.dash-cal-d.is-today { box-shadow: 0 0 0 2px var(--gold); }

/* Go over these again */
.dash-review-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.dash-review-list li { border: 1px solid var(--line); border-left: 4px solid var(--amber, #c77a1e); border-radius: 10px; padding: 14px 16px; background: var(--bg); }
.dash-review-where { margin: 0 0 4px; font-size: 0.8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.dash-review-q { margin: 0 0 6px; font-weight: 600; }
.dash-review-a { margin: 0 0 6px; }
.dash-review-a .ar { font-family: var(--font-ar); font-size: 1.4rem; font-weight: 400; }
.dash-again { font-weight: 700; color: var(--green); }

/* Milestones */
.dash-badges { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.dash-badges li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--line); color: var(--muted); font-weight: 600; font-size: 0.92rem; }
.dash-badge-star { flex: none; width: 26px; height: 26px; background: var(--line); -webkit-mask: url(/assets/star.svg) center / contain no-repeat; mask: url(/assets/star.svg) center / contain no-repeat; }
.dash-badges li.is-earned { border-style: solid; border-color: var(--gold); color: var(--ink); background: var(--bg); }
.dash-badges li.is-earned .dash-badge-star { background: var(--gold); }

/* Numbers */
.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 20px; }
.dash-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 4px; }
.dash-tile strong { font-family: var(--font-head); font-size: 1.5rem; color: var(--ink); }
.dash-tile span { color: var(--muted); font-size: 0.9rem; line-height: 1.35; }

/* Lessons */
.dash-lessons { margin-top: 28px; }
.dash-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.dash-list li + li { border-top: 1px solid var(--line); }
.dash-list a, .dash-list div { display: flex; align-items: center; gap: 14px; padding: 12px 16px; color: var(--ink); text-decoration: none; }
.dash-list a:hover { background: var(--band); }
.dash-n { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); font-weight: 700; font-size: 0.85rem; color: var(--gold); }
.dash-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.dash-t { font-weight: 600; }
.dash-s { color: var(--muted); font-size: 0.86rem; }
.dash-tags { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.dash-tags .is-ok { color: var(--green); font-weight: 600; }
.dash-tag { flex: none; font-weight: 700; font-size: 0.85rem; color: var(--green); }
.dash-list .is-done .dash-n { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.dash-list .is-going .dash-n { border-color: var(--green); color: var(--green); }
.dash-list .is-soon { opacity: 0.55; }

/* Account */
.dash > .dash-account { margin-top: 20px; }
.dash-account { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.dash-account:empty { display: none; }
.dash-account p { margin: 0 0 10px; }
.dash-account .acct-row { margin-top: 12px; }
.dash-account dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 12px; }
.dash-account dt { color: var(--muted); }
.dash-account dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.dash-soon { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--band); color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.acct-btn.is-link { text-decoration: none; display: inline-flex; align-items: center; }
@media (max-width: 520px) {
  .dash-card { padding: 18px; }
  .dash-cal { gap: 4px; }
}

/* Calendar: missed days + key */
.dash-cal-d.is-missed { background: rgba(199, 122, 30, 0.14); border-color: rgba(199, 122, 30, 0.45); color: var(--amber, #c77a1e); }
.dash-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 0; font-size: 0.85rem; color: var(--muted); }
.dash-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dash-legend .dash-cal-d { width: 16px; height: 16px; border-radius: 5px; aspect-ratio: auto; font-size: 0; }

/* Tabs: Overview | Account settings */
.dash-tabs { display: flex; gap: 4px; max-width: 920px; margin: 18px auto 0; padding: 0 20px; border-bottom: 1px solid var(--line); }
.dash-tabs a { padding: 10px 16px; color: var(--muted); font-weight: 700; text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.dash-tabs a:hover { color: var(--ink); }
.dash-tabs a[aria-current="page"] { color: var(--green); border-bottom-color: var(--green); }
.dash-tabs + .dash, .dash-tabs + main { padding-top: 18px; }

/* Overview: account line / sign-in prompt */
.dash-signin:empty { display: none; }
.dash-signin { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 18px; border-radius: var(--radius); background: var(--band); }
.dash-signin p { margin: 0; }
.dash-signin.is-in { background: transparent; border: 1px solid var(--line); }
.dash-signin a { color: var(--green); font-weight: 700; }
#dash-settings .dash-card { margin-top: 20px; }

/* Reminders (Account settings) */
.dash-reminders:empty { display: none; }
.rem-block { padding: 14px 0; border-top: 1px solid var(--line); }
.rem-title { margin: 0 0 8px; font-weight: 700; }
.rem-time { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-weight: 600; }
.rem-time select { min-height: 40px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font: inherit; }
.rem-check { display: flex; align-items: center; gap: 10px; margin: 8px 0; cursor: pointer; }
.rem-check input { width: 20px; height: 20px; accent-color: var(--green); }
.rem-check input:disabled + * , .rem-check:has(input:disabled) { opacity: 0.6; cursor: not-allowed; }
