/* DZ Exams – RTL educational theme (blues / greens / soft whites) */
.dz-app, .dz-app * { box-sizing: border-box; }
.dz-app {
  --blue: #2563eb; --blue-d: #1e40af; --green: #16a34a; --red: #dc2626; --amber: #f59e0b;
  --bg: #f6f9ff; --card: #ffffff; --text: #1f2937; --muted: #6b7280; --line: #e5e7eb; --radius: 16px;
  font-family: 'Tajawal', system-ui, sans-serif; color: var(--text); line-height: 1.8;
  direction: rtl; display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start;
  background: var(--bg); padding: 20px; border-radius: var(--radius);
}
.dz-app.dz-dash { grid-template-columns: minmax(0, 1fr); }
.dz-main { min-width: 0; }
.dz-app h2, .dz-app h3 { margin: 0 0 .5rem; color: var(--blue-d); }

.dz-sidebar { position: sticky; top: 96px; background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: 0 4px 14px rgba(37,99,235,.08); }
.dz-sidebar h3 { font-size: 1.05rem; }
.dz-sidebar details { border-top: 1px solid var(--line); padding: 6px 0; }
.dz-sidebar summary { cursor: pointer; font-weight: 700; padding: 8px 4px; list-style: none; }
.dz-sidebar summary::before { content: '▸'; margin-inline-end: 6px; display: inline-block; transition: transform .2s; }
.dz-sidebar details[open] summary::before { transform: rotate(90deg); }
.dz-sidebar ul { list-style: none; margin: 0; padding: 0; }
.dz-sidebar a { display: block; padding: 8px 14px; border-radius: 10px; color: var(--text); text-decoration: none; transition: background .2s, color .2s; }
.dz-sidebar a:hover { background: #eff6ff; color: var(--blue); }
.dz-sidebar a.is-active { background: var(--blue); color: #fff; }

.dz-crumb { color: var(--muted); margin-bottom: 12px; font-weight: 500; }
.dz-card { background: var(--card); border-radius: var(--radius); padding: 1.4rem; margin-bottom: 16px; box-shadow: 0 4px 14px rgba(37,99,235,.08); }
.dz-center { text-align: center; }
.dz-muted { color: var(--muted); }
.dz-error { color: var(--red); font-weight: 700; }

.dz-btn { display: inline-block; border: 0; cursor: pointer; background: var(--blue); color: #fff; font: inherit; font-weight: 700;
  padding: .65rem 1.3rem; min-height: 44px; border-radius: 12px; text-decoration: none; transition: transform .15s, background .2s, opacity .2s; }
.dz-btn:hover { background: var(--blue-d); transform: translateY(-2px); color: #fff; }
.dz-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.dz-btn-ghost { background: #eff6ff; color: var(--blue-d); }
.dz-btn-ghost:hover { background: #dbeafe; color: var(--blue-d); }
.dz-btn-submit { background: var(--green); }
.dz-btn-submit:hover { background: #15803d; }

.dz-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.dz-subject { background: var(--card); border-radius: var(--radius); padding: 1.1rem .7rem; text-align: center;
  box-shadow: 0 4px 14px rgba(37,99,235,.08); transition: transform .25s, box-shadow .25s; display: flex; flex-direction: column; gap: 6px;
  border-top: 4px solid transparent; }
.dz-subject:hover { transform: translateY(-6px); box-shadow: 0 12px 28px rgba(37,99,235,.18); border-top-color: var(--green); }
.dz-subject h3 { font-size: 1rem; line-height: 1.5; min-height: 3em; display: flex; align-items: center; justify-content: center; margin: 0; }
.dz-icon { font-size: 2.2rem; line-height: 1.2; }
.dz-subject .dz-btn { font-size: .85rem; padding: .35rem .5rem; min-height: 38px; width: 100%; line-height: 1.4; }
.dz-subject .dz-btn small { display: block; font-weight: 500; opacity: .85; }

.dz-facts { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.dz-facts li { background: #eff6ff; padding: .4rem 1rem; border-radius: 999px; }
.dz-rules { background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; padding: 1rem 1.2rem; margin: 1rem 0; }
.dz-agree { display: block; margin: 1rem 0; cursor: pointer; }

.dz-bar { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--blue-d); color: #fff; padding: .7rem 1.1rem; border-radius: var(--radius); margin-bottom: 10px; }
.dz-timer { font-variant-numeric: tabular-nums; font-size: 1.3rem; font-weight: 700; direction: ltr; display: inline-block; }
.dz-timer.danger { color: #fecaca; animation: dz-pulse 1s infinite; }
.dz-viol.danger { color: #fde68a; font-weight: 700; }
.dz-progress { height: 8px; background: #dbeafe; border-radius: 99px; overflow: hidden; margin-bottom: 14px; }
#dz-progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--green)); transition: width .4s; }
.dz-qmeta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; color: var(--muted); margin-bottom: 8px; }
.dz-tag { background: #dcfce7; color: #166534; padding: 0 .8rem; border-radius: 999px; font-size: .9rem; }
.dz-qtext {
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 1rem;
  /* Keep written order of math/digits inside RTL page */
  direction: ltr;
  text-align: right;
  unicode-bidi: isolate;
  -webkit-unicode-bidi: isolate;
}
.dz-qtext p,
.dz-qtext div,
.dz-qtext span {
  direction: inherit;
  unicode-bidi: inherit;
  text-align: inherit;
}
.dz-qtext img { max-width: 100%; height: auto; }
/* Media inside questions (images / video / audio) */
.dz-qtext img,.dz-opt-html img{display:block;max-width:100%;height:auto;max-height:70vh;object-fit:contain;margin:12px auto;border-radius:8px}
.dz-qtext figure,.dz-opt-html figure{max-width:100%;margin:12px auto;text-align:center}
.dz-qtext video,.dz-opt-html video,.dz-qtext audio,.dz-opt-html audio{display:block;max-width:100%;height:auto;margin:12px auto}
.dz-qtext iframe{display:block;width:100%;max-width:800px;aspect-ratio:16/9;height:auto;margin:12px auto;border:0;border-radius:8px}
.dz-qtext{min-width:0;overflow-wrap:anywhere}

.dz-qtext img,
.dz-qtext video,
.dz-option .dz-opt-html img,
.dz-option .dz-opt-html video {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 12px auto;
  border-radius: 10px;
  background: #f1f5f9;
}
.dz-qtext video,
.dz-option .dz-opt-html video {
  width: 100%;
  max-height: 360px;
  background: #0f172a;
}
.dz-qtext audio,
.dz-option .dz-opt-html audio {
  width: 100%;
  max-width: 420px;
  display: block;
  margin: 12px auto;
}
.dz-qtext figure {
  margin: 12px 0;
  text-align: center;
}
.dz-qtext figcaption {
  font-size: .85rem;
  color: var(--muted, #64748b);
  margin-top: 6px;
}
.dz-dark .dz-qtext img,
.dz-dark .dz-qtext video {
  background: #1e293b;
}

/* Arabic-only lines still read RTL via nested spans if needed; numbers/operators stay LTR */
.dz-option .dz-opt-html {
  direction: ltr;
  text-align: right;
  unicode-bidi: isolate;
  -webkit-unicode-bidi: isolate;
  flex: 1;
  line-height: 1.6;
}
.dz-anim { animation: dz-slide .35s ease both; }
.dz-options { display: grid; gap: 10px; }
.dz-option { display: flex; align-items: center; gap: .75rem; padding: .9rem 1.1rem; min-height: 48px; border: 2px solid var(--line);
  border-radius: 12px; cursor: pointer; transition: border-color .2s, background .2s; }
.dz-option:hover { border-color: #93c5fd; }
.dz-option:has(input:checked) { border-color: var(--blue); background: #eff6ff; }
.dz-option input { width: 20px; height: 20px; accent-color: var(--blue); flex-shrink: 0; }
.dz-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.dz-actions .dz-btn-submit { margin-inline-start: auto; }
.dz-navgrid { display: flex; flex-wrap: wrap; gap: 8px; }
.dz-nav { width: 44px; height: 44px; border-radius: 10px; border: 2px solid var(--line); background: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.dz-nav.is-done { background: #dcfce7; border-color: var(--green); }
.dz-nav.is-current { box-shadow: 0 0 0 3px #93c5fd; }

.dz-modal { position: fixed; inset: 0; background: rgba(15,23,42,.65); z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 16px; direction: rtl; font-family: 'Tajawal', sans-serif; }
.dz-modal-box { background: #fff; border-radius: var(--radius, 16px); padding: 1.6rem; max-width: 420px; text-align: center; animation: dz-slide .3s ease both; }
.dz-modal-box h3 { margin: 0 0 .5rem; color: #b45309; }

.dz-summary { text-align: center; border-top: 6px solid var(--green); }
.dz-summary.dz-fail { border-top-color: var(--red); }
.dz-score { font-size: 2.8rem; font-weight: 700; color: var(--blue-d); direction: ltr; }
.dz-detail { border-inline-start: 6px solid var(--line); }
.dz-detail.dz-ok { border-inline-start-color: var(--green); }
.dz-detail.dz-bad { border-inline-start-color: var(--red); }
.dz-detail-head { display: flex; justify-content: space-between; margin-bottom: .4rem; }
.dz-expl { background: #f0fdf4; padding: .6rem 1rem; border-radius: 10px; }

.dz-stats { display: flex; gap: 16px; margin-bottom: 16px; }
.dz-stats > div { flex: 1; background: var(--card); border-radius: var(--radius); padding: 1rem; text-align: center; box-shadow: 0 4px 14px rgba(37,99,235,.08); }
.dz-stats b { display: block; font-size: 1.8rem; color: var(--blue); }
.dz-table { width: 100%; border-collapse: collapse; }
.dz-table th, .dz-table td { padding: .6rem; text-align: right; border-bottom: 1px solid var(--line); }

@keyframes dz-pulse { 50% { transform: scale(1.08); } }
@keyframes dz-slide { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }

@media (max-width: 1280px) { .dz-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1024px) { .dz-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .dz-app { grid-template-columns: 220px minmax(0, 1fr); } }
@media (max-width: 800px) {
  .dz-app, .dz-app.dz-dash { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .dz-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dz-sidebar { position: static; }
  .dz-actions .dz-btn-submit { margin-inline-start: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .dz-app *, .dz-modal * { animation: none !important; transition: none !important; } }

/* ===== شهادة v1.1.3 ===== */
.dz-cert-head { text-align: center; margin-bottom: 1rem; }
.dz-cert-logo { font-size: 3.5rem; line-height: 1; margin-bottom: .4rem; }
.dz-cert-head h2 { font-size: 1.6rem; color: var(--blue-d); margin: 0; }
.dz-cert-sub { color: var(--muted); font-size: 1.05rem; margin-top: .2rem; }
.dz-cert-student { font-weight: 700; margin-top: .5rem; font-size: 1.1rem; }
.dz-cert-date { font-size: .9rem; }
.dz-percent { font-size: 1.6rem; font-weight: 700; color: var(--green); margin: .2rem 0 .6rem; }
.dz-verdict {
  display: inline-block; padding: .4rem 1.4rem; border-radius: 999px;
  background: #dcfce7; color: #166534; font-weight: 700; margin-bottom: .6rem;
}
.dz-verdict.is-fail { background: #fee2e2; color: #991b1b; }
.dz-section-title { margin: 1.5rem 0 .8rem; color: var(--blue-d); }

/* ===== طباعة v1.1.3 ===== */
@media print {
  body * { visibility: hidden !important; }
  #dz-exam-root, #dz-exam-root * { visibility: visible !important; }
  #dz-exam-root {
    position: absolute; inset: 0; padding: 0; margin: 0;
    background: #fff !important;
  }
  .dz-no-print, .dz-actions, .dz-bar, .dz-sidebar,
  .dz-progress, .dz-navgrid, .dz-modal { display: none !important; }

  .dz-app { padding: 0 !important; background: #fff !important;
    grid-template-columns: 1fr !important; }

  .dz-card {
    box-shadow: none !important;
    border: 1px solid #d1d5db !important;
    page-break-inside: avoid;
    break-inside: avoid;
    margin-bottom: 10px !important;
  }

  #dz-certificate {
    border: 3px double var(--blue-d) !important;
    border-top: 8px solid var(--green) !important;
    padding: 2.5rem 1.5rem !important;
    text-align: center;
    page-break-after: always;
    break-after: page;
  }
  #dz-certificate.dz-fail {
    border-top-color: #dc2626 !important;
    border-color: #dc2626 !important;
  }
  .dz-cert-logo { font-size: 5rem !important; }
  .dz-cert-head h2 { font-size: 2rem !important; }
  .dz-score { font-size: 4rem !important; color: #1e40af !important; }
  .dz-percent { font-size: 2rem !important; }
  .dz-verdict { font-size: 1.1rem !important; padding: .6rem 2rem !important; }

  .dz-detail { border-inline-start-width: 8px !important; }
  .dz-detail.dz-ok  { border-inline-start-color: #16a34a !important; }
  .dz-detail.dz-bad { border-inline-start-color: #dc2626 !important; }
  .dz-expl { background: #f0fdf4 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  @page { margin: 1.2cm; size: A4; }
}
/* streams (3AS) */
.dz-sidebar ul.dz-streams { margin: 2px 0 6px; padding-inline-start: 14px; border-inline-start: 2px solid var(--line); }
.dz-sidebar ul.dz-streams a { padding: 6px 12px; font-size: .92rem; }
.dz-pick { margin: 0 0 14px; }
.dz-stream { text-decoration: none; color: inherit; cursor: pointer; display: block; }
.dz-stream h3 { min-height: 0; padding-top: .3rem; }
.dz-streams-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 800px) { .dz-streams-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* --- Soft polish (keeps original sizing) --- */
.dz-sel-ctx {
  font-size: 13px;
  margin: 0 0 12px;
  padding: 10px 12px;
  background: #eff6ff;
  border-radius: 12px;
  border: 1px solid #dbeafe;
  line-height: 1.6;
}
.dz-sel-ctx a { color: var(--blue); font-weight: 600; text-decoration: none; }
.dz-sel-ctx a:hover { text-decoration: underline; }
.dz-option:has(input:checked),
.dz-opt:has(input:checked) {
  border-color: var(--blue);
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

/* Accessibility toolbar */
.dz-a11y {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-bottom: 12px; justify-content: flex-end;
}
.dz-a11y-btn {
  border: 1px solid var(--line); background: #fff; border-radius: 8px;
  padding: 6px 12px; cursor: pointer; font: inherit; font-size: .85rem; font-weight: 700;
}
.dz-a11y-btn:hover { background: #eff6ff; border-color: #93c5fd; }
.dz-save-ind { font-size: .82rem; color: var(--muted); margin-inline-start: 8px; }
.dz-save-ind.is-ok { color: var(--green); }
.dz-save-ind.is-err { color: var(--red); }

/* Type stats on result */
.dz-type-stats {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 14px;
}
.dz-type-stat {
  background: rgba(255,255,255,.7); border-radius: 12px; padding: 8px 14px;
  font-size: .88rem; border: 1px solid rgba(0,0,0,.06);
}
.dz-type-stat b { display: block; margin-bottom: 2px; }

/* Dark mode during exam */
.dz-dark, .dz-dark .dz-card, .dz-dark .dz-sidebar, .dz-dark .dz-option {
  background: #0f172a !important; color: #e2e8f0 !important; border-color: #334155 !important;
}
.dz-dark .dz-qtext, .dz-dark h2, .dz-dark h3 { color: #f1f5f9 !important; }
.dz-dark .dz-option:hover, .dz-dark .dz-option:has(input:checked) {
  background: #1e293b !important; border-color: #3b82f6 !important;
}
.dz-dark .dz-a11y-btn { background: #1e293b; color: #e2e8f0; border-color: #334155; }
.dz-dark .dz-tag { background: #14532d; color: #bbf7d0; }
.dz-dark .dz-muted { color: #94a3b8 !important; }
.dz-dark .dz-rules { background: #422006; border-color: #a16207; color: #fde68a; }
.dz-dark .dz-bar { background: #020617 !important; }

/* Notifications list on dashboard */
.dz-notifs { margin-bottom: 16px; }
.dz-notif {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 8px; border-right: 4px solid var(--blue);
}
.dz-notif b { display: block; margin-bottom: 4px; }
.dz-notif time { font-size: .8rem; color: var(--muted); }

.dz-option .dz-opt-html { flex: 1; line-height: 1.6; }
.dz-option .dz-opt-html img { max-height: 140px; width: auto; vertical-align: middle; border-radius: 6px; }

/* Selection steps 1 & 2 — homepage-like cards */
.dz-app-step {
  grid-template-columns: minmax(0, 1fr) !important;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}
.dz-main-step {
  max-width: none !important;
  width: 100%;
  margin: 0;
}
.dz-step-wrap {
  padding: 2.6rem 2rem 2.8rem !important;
  max-width: none;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}
.dz-step-badge {
  display: inline-block;
  background: #eff6ff;
  color: #1e40af;
  font-size: .8rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.dz-step-wrap h2 { margin-bottom: 8px !important; }
.dz-step-sub { margin: 0 0 28px; color: #64748b; font-size: .95rem; }
.dz-step-sub a { color: #2563eb; }
.dz-step-cards {
  display: grid;
  gap: 18px;
  margin: 0 auto;
  justify-content: center;
}
.dz-step-cards-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 900px;
  width: 100%;
}
.dz-step-cards-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 100%;
  width: 100%;
}
.dz-step-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none !important;
  color: inherit;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 1.6rem 1.1rem 1.3rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  min-height: 210px;
}
.dz-step-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px color-mix(in srgb, var(--sc, #2563eb) 22%, transparent);
  border-color: color-mix(in srgb, var(--sc, #2563eb) 45%, #e2e8f0);
}
.dz-step-card-sm { min-height: 180px; padding: 1.2rem .8rem 1rem; }
.dz-step-art {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 14px;
  border-radius: 24px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--sc, #2563eb) 16%, #fff), #fff);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--sc, #2563eb) 18%, transparent);
  display: grid;
  place-items: center;
}
.dz-step-art-sm { width: 72px; height: 72px; border-radius: 18px; margin-bottom: 10px; }
.dz-step-ico { font-size: 2.4rem; line-height: 1; }
.dz-step-art-sm .dz-step-ico { font-size: 1.8rem; }
.dz-step-float {
  position: absolute;
  bottom: -4px;
  left: -8px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15,23,42,.12);
  display: grid;
  place-items: center;
  font-size: 1rem;
}
.dz-step-card h3 {
  margin: 0 0 6px !important;
  font-size: 1.15rem;
  color: #0f172a;
  min-height: auto !important;
}
.dz-step-card p {
  margin: 0 0 10px;
  font-size: .88rem;
  color: #64748b;
  line-height: 1.45;
}
.dz-step-go {
  margin-top: auto;
  font-size: .88rem;
  font-weight: 700;
  color: var(--sc, #2563eb);
}
@media (max-width: 800px) {
  .dz-step-cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .dz-step-cards-2 { grid-template-columns: 1fr; max-width: 320px; }
  .dz-step-cards-4 { grid-template-columns: 1fr 1fr; }
}

#dz-start:disabled { opacity: .55; cursor: not-allowed; }
#dz-start:not(:disabled) { cursor: pointer; }
.dz-agree { display: flex; align-items: center; gap: 8px; margin: 12px 0; cursor: pointer; user-select: none; }
.dz-step-card { position: relative; z-index: 1; cursor: pointer; pointer-events: auto; }
.dz-step-card * { pointer-events: none; } /* clicks go to the <a> */
.dz-step-card { pointer-events: auto; }

/* Professional cards for the legacy Y Exams student notification stream */
.dz-notifs{margin:18px 0 22px}.dz-notifs>h3{font-size:1.15rem;margin:0 0 12px}.dz-notif{display:flex;gap:12px;align-items:flex-start;padding:15px 16px;margin:10px 0;border:1px solid #e2e8f0;border-right:4px solid #3b82f6;border-radius:14px;background:#fff;box-shadow:0 5px 18px rgba(15,23,42,.045)}.dz-notif-content{min-width:0;flex:1}.dz-notif b{display:block;margin:0 0 6px;font-size:1rem}.dz-notif time{display:block;margin-top:8px;font-size:.78rem;color:#64748b}.dz-notif-image{width:64px;height:64px;object-fit:cover;border-radius:10px}.dz-notif a{display:inline-block;margin-top:8px;font-weight:700}.dz-notif-success{border-right-color:#16a34a;background:#f0fdf4}.dz-notif-warning{border-right-color:#d97706;background:#fffbeb}.dz-notif-error{border-right-color:#dc2626;background:#fef2f2}.dz-notif-custom{border-right-color:#9333ea;background:#faf5ff}.dz-notif-glow{box-shadow:0 0 0 1px rgba(59,130,246,.12),0 0 20px rgba(59,130,246,.14)}


/* Y Exams 2.0 development phase: calmer responsive dashboard and search controls. */
.dz-exam-search-form{margin:0 0 18px;padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--card)}
.dz-exam-search-form>label{display:block;font-weight:700;margin-bottom:8px}
.dz-exam-search-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.dz-exam-search-row input[type=search],.dz-history-filters input[type=search],.dz-history-filters select{min-height:44px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;color:#1f2937;padding:8px 12px;font:inherit;max-width:100%;box-sizing:border-box}
.dz-exam-search-row input[type=search]{flex:1 1 240px;min-width:0}
.dz-notifs-head,.dz-history-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.dz-notifs-head h3,.dz-history-head h3{margin:0}
.dz-notifs-head p{margin:2px 0 0;color:#64748b;font-size:.9rem}
.dz-notifs-count{display:inline-grid;place-items:center;min-width:32px;height:32px;padding:0 8px;border-radius:999px;background:#eaf1fb;color:#254a7b;font-weight:700}
.dz-notifs-list{display:grid;gap:10px}
.dz-notif{display:flex;gap:12px;align-items:flex-start;margin:0!important;box-shadow:0 2px 8px rgba(15,23,42,.035)}
.dz-notif-image{width:44px;height:44px;object-fit:cover;border-radius:10px;flex:0 0 auto}
.dz-notif-content{flex:1;min-width:0}
.dz-notif-title-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:4px}
.dz-notif-source{font-size:11px;padding:2px 8px;border-radius:999px;background:#f1f5f9;color:#475569}
.dz-notif-body{line-height:1.7;overflow-wrap:anywhere}
.dz-notif-content time{display:block;color:#64748b;font-size:12px;margin-top:7px}
.dz-notif-link{display:inline-block;margin-top:7px;font-weight:700}
.dz-stats-progress{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0}
.dz-stats-progress>div{min-width:0;border:1px solid var(--line);box-shadow:none!important;background:#fff!important}
.dz-subject-progress-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 22px;margin-top:12px}
.dz-subject-progress-item>div:first-child{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:7px}
.dz-subject-progress-item>div:first-child span{color:#64748b;font-size:.9rem}
.dz-progress-track{height:8px;background:#e8edf4;border-radius:999px;overflow:hidden}
.dz-progress-track span{display:block;height:100%;background:#5686c5;border-radius:999px}
.dz-history-head{align-items:flex-start}
.dz-history-filters{display:flex;gap:8px;flex-wrap:wrap}
.dz-table-wrap{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.dz-table-wrap .dz-table{min-width:620px}
.dz-history-empty{margin:12px 0;color:#64748b;text-align:center}
.dz-app .dz-card,.dz-app .dz-subject,.dz-app .dz-sidebar{box-shadow:0 2px 10px rgba(15,23,42,.045)}
.dz-app .dz-subject:hover{transform:translateY(-2px);box-shadow:0 6px 16px rgba(15,23,42,.08)}
.dz-app a:focus-visible,.dz-app button:focus-visible,.dz-app input:focus-visible,.dz-app select:focus-visible{outline:3px solid #93c5fd;outline-offset:2px}
@media(max-width:700px){.dz-stats-progress{grid-template-columns:1fr}.dz-subject-progress-list{grid-template-columns:1fr}.dz-exam-search-row .dz-btn{flex:1 1 auto;text-align:center}.dz-history-filters{width:100%}.dz-history-filters input[type=search],.dz-history-filters select{width:100%}.dz-notif{padding:12px}.dz-notif-image{width:36px;height:36px}}
@media(prefers-reduced-motion:reduce){.dz-app .dz-subject,.dz-app .dz-btn{transition:none!important;transform:none!important}}

/* Y Exams 2.0.1: readable notification states and expanded attempt filters. */
.dz-notifs-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.dz-notifs-count{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-width:34px;height:auto;min-height:34px;padding:6px 10px;border-radius:999px;background:#e8edf4;color:#475569;font-weight:800}
.dz-notifs-count small{font-size:11px;font-weight:700}
.dz-notifs-count.has-unread{background:#dc2626;color:#fff;box-shadow:0 0 0 3px rgba(220,38,38,.12)}
.dz-mark-notifications-form{margin:0}
.dz-notif-unread{border-right-color:#dc2626;background:#fffafa;box-shadow:0 0 0 1px rgba(220,38,38,.08)}
.dz-notif-read{opacity:.88}
.dz-notif-new{display:inline-flex;align-items:center;border-radius:999px;padding:2px 8px;background:#dc2626;color:#fff;font-size:11px;font-weight:800}
.dz-notif-title-row b{display:inline!important;margin:0!important}
.dz-notif-error,.dz-notif-unread.dz-notif-error{border-right-color:#dc2626;background:#fff1f2}
.dz-history-filters{display:flex;gap:8px;flex-wrap:wrap;width:100%;margin-top:6px}
.dz-history-filters input[type=search]{flex:1 1 220px;min-width:160px}
.dz-history-filters select{flex:1 1 155px;min-width:140px}
.dz-history-visible-count{margin:8px 0 0;color:#64748b;font-size:.85rem}
.dz-attempt-history .dz-table tr[hidden]{display:none!important}
@media(max-width:640px){.dz-notifs-actions{width:100%;align-items:stretch}.dz-mark-notifications-form{flex:1}.dz-mark-notifications-form .dz-btn{width:100%;white-space:normal}.dz-history-filters>*{flex:1 1 100%!important;min-width:0!important}.dz-stats-progress{grid-template-columns:1fr}}

/* Y Exams 2.1.0: paginated full history and student learning insights. */
.dz-history-total{color:#64748b;font-size:.9rem}
.dz-history-filters{align-items:center;margin:10px 0 16px}
.dz-history-filters .dz-btn{min-height:44px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;white-space:nowrap}
.dz-history-pagination{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;margin:18px 0 2px}
.dz-history-pagination a{min-width:38px;height:38px;display:inline-flex;align-items:center;justify-content:center;border:1px solid #dbe3ed;border-radius:9px;background:#fff;color:#334155;text-decoration:none;font-weight:700}
.dz-history-pagination a.is-current{background:#1d4ed8;border-color:#1d4ed8;color:#fff}
.dz-history-pagination a:focus-visible{outline:3px solid #93c5fd;outline-offset:2px}
.dz-study-tip{margin-top:16px;padding:12px 14px;border:1px solid #dbeafe;border-right:4px solid #60a5fa;border-radius:10px;background:#f8fbff;color:#334155;line-height:1.8}
.dz-monthly-bars{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;align-items:end;margin-top:16px}
.dz-monthly-bar{display:flex;min-width:0;min-height:160px;flex-direction:column;align-items:center;justify-content:flex-end;gap:5px;text-align:center}
.dz-monthly-bar-value{font-weight:800;font-size:.9rem;color:#334155}
.dz-monthly-bar-track{height:100px;width:min(100%,42px);display:flex;align-items:flex-end;overflow:hidden;border-radius:8px;background:#edf2f7}
.dz-monthly-bar-track span{display:block;width:100%;min-height:2px;border-radius:8px 8px 0 0;background:#5b8fd1}
.dz-monthly-bar small{font-size:.75rem;color:#64748b;overflow-wrap:anywhere}
.dz-notif-unread{position:relative;border-right-width:5px}
.dz-notif-unread:before{content:"";display:inline-block;width:8px;height:8px;flex:0 0 8px;border-radius:50%;background:#dc2626;margin-top:7px}
.dz-notifs-count.has-unread{animation:dzUnreadPulse 2.2s ease-in-out infinite}
@keyframes dzUnreadPulse{0%,100%{box-shadow:0 0 0 2px rgba(220,38,38,.10)}50%{box-shadow:0 0 0 5px rgba(220,38,38,.06)}}
@media(max-width:700px){.dz-monthly-bars{grid-template-columns:repeat(3,minmax(0,1fr));row-gap:20px}.dz-monthly-bar{min-height:140px}.dz-history-filters .dz-btn{width:100%}}
@media(prefers-reduced-motion:reduce){.dz-notifs-count.has-unread{animation:none}}

html[dir="ltr"] .dz-app{direction:ltr;text-align:left}
html[dir="ltr"] .dz-app .dz-notif,html[dir="ltr"] .dz-app .dz-study-tip{border-right-width:1px;border-left:4px solid #60a5fa}
html[dir="ltr"] .dz-app .dz-notif-error,html[dir="ltr"] .dz-app .dz-notif-unread{border-left-color:#dc2626}
html[dir="ltr"] .dz-app .dz-notifs-count,html[dir="ltr"] .dz-app .dz-history-filters{direction:ltr}

/* ========== Dark Mode support (Phase 1 – inherits from html.dark) ========== */
html.dark .dz-app {
  --blue: #60a5fa; --blue-d: #93c5fd; --green: #4ade80; --red: #f87171; --amber: #fbbf24;
  --bg: #0f172a; --card: #1e293b; --text: #e2e8f0; --muted: #94a3b8; --line: #334155;
  background: var(--bg);
}
html.dark .dz-sidebar,
html.dark .dz-card,
html.dark .dz-subject,
html.dark .dz-exam-search-form,
html.dark .dz-notif { background: var(--card) !important; border-color: var(--line); color: var(--text); }
html.dark .dz-sidebar a { color: var(--text); }
html.dark .dz-sidebar a:hover { background: #1e3a5f; color: var(--blue); }
html.dark .dz-sidebar a.is-active { background: var(--blue); color: #0f172a; }
html.dark .dz-facts li { background: #1e3a5f; color: var(--text); }
html.dark .dz-rules { background: #422006; border-color: #92400e; color: #fde68a; }
html.dark .dz-btn-ghost { background: #1e3a5f; color: var(--blue-d); }
html.dark .dz-btn-ghost:hover { background: #1e40af; color: #fff; }
html.dark .dz-progress { background: #1e3a5f; }
html.dark .dz-tag { background: #14532d; color: #86efac; }
html.dark .dz-option { background: var(--card); border-color: var(--line); color: var(--text); }
html.dark .dz-option:hover { border-color: var(--blue); background: #1e3a5f; }
html.dark .dz-option.on,
html.dark .dz-option.selected { border-color: var(--blue); background: #1e3a5f; }
html.dark .dz-exam-search-row input[type=search],
html.dark .dz-history-filters input[type=search],
html.dark .dz-history-filters select {
  background: #0f172a; border-color: #475569; color: var(--text);
}
html.dark .dz-notifs-count { background: #1e3a5f; color: #93c5fd; }
html.dark .dz-notif-source { background: #334155; color: #94a3b8; }
html.dark .dz-progress-track { background: #334155; }
html.dark .dz-stats-progress > div { background: var(--card) !important; border-color: var(--line); }
html.dark .dz-table th { background: #1e3a5f; color: var(--text); }
html.dark .dz-table td { border-color: var(--line); color: var(--text); }
html.dark .dz-notif-success { background: #052e16 !important; border-right-color: #16a34a; }
html.dark .dz-notif-warning { background: #422006 !important; border-right-color: #d97706; }
html.dark .dz-notif-error { background: #450a0a !important; border-right-color: #dc2626; }
html.dark .dz-notif-custom { background: #2e1065 !important; border-right-color: #9333ea; }


/* Progress page expanded layout */
.dz-app.dz-dash {
  max-width: none;
  width: 100%;
  padding: 8px 4px 28px;
}
.dz-app.dz-dash .dz-main { width: 100%; max-width: none; }
.dz-app.dz-dash > .dz-main > h2 { font-size: clamp(1.45rem, 2.2vw, 1.85rem); margin-bottom: 1rem; }
.dz-stats-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0 22px;
}
.dz-stats-progress > div {
  padding: 18px 16px;
  border-radius: 16px;
  text-align: center;
}
.dz-stats-progress > div b { font-size: clamp(1.5rem, 2.5vw, 2rem); display: block; color: var(--blue-d); }
.dz-stats-progress > div span { color: var(--muted); font-size: .95rem; }

.dz-subject-progress-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 24px;
  margin-top: 14px;
}
.dz-progress-track { height: 12px; }
.dz-subject-progress-item > div:first-child b { font-size: 1.05rem; }

.dz-monthly-bars {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
  margin-top: 18px;
  min-height: 220px;
}
.dz-monthly-bar { min-height: 200px; gap: 8px; }
.dz-monthly-bar-track { height: 140px; width: min(100%, 56px); border-radius: 10px; }
.dz-monthly-bar-value { font-size: 1.05rem; }

.dz-attempt-history { margin-top: 8px; }
.dz-history-filters {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) repeat(3, minmax(120px, 1fr)) auto auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  margin: 12px 0 16px;
}
.dz-history-filters input[type=search],
.dz-history-filters select {
  width: 100%;
  min-width: 0;
}
.dz-table-wrap .dz-table { min-width: 760px; }
.dz-table th, .dz-table td { padding: .75rem .9rem; font-size: .98rem; }

@media (max-width: 1100px) {
  .dz-subject-progress-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dz-history-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dz-history-filters .dz-btn { width: 100%; }
}
@media (max-width: 700px) {
  .dz-stats-progress { grid-template-columns: 1fr; }
  .dz-subject-progress-list { grid-template-columns: 1fr; }
  .dz-monthly-bars { grid-template-columns: repeat(3, minmax(0, 1fr)); min-height: 0; }
  .dz-monthly-bar { min-height: 160px; }
  .dz-monthly-bar-track { height: 110px; }
  .dz-history-filters { grid-template-columns: 1fr; }
}
