/* Student Portal > My Progress dashboard (student-progress.js). Phone-first: every grid shrinks to the screen, text wraps, nothing overlaps. */
.pg { background: #eef2f7; border-radius: 20px; padding: 14px; --pg-ink: #0f172a; --pg-mut: #64748b; --pg-line: #e2e8f0; --pg-bg: #f8fafc; --pg-teal: #167d9a; --pg-navy: #0b1f3a; --pg-gold: #d99a2b; color: var(--pg-ink); }
.pg *, .pg *::before, .pg *::after { box-sizing: border-box; }
.pg :where(b, small, span, p, li, dd, dt, h4, h5, em, strong, button) { overflow-wrap: anywhere; }
.pg button { font: inherit; cursor: pointer; }
.pg-active { align-self: center; padding: 5px 12px; border-radius: 999px; background: #dcfce7; color: #166534; font-size: 12px; font-weight: 800; }
.pg-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; justify-content: space-between; margin-bottom: 12px; }
.pg-sel { display: grid; gap: 4px; flex: 1 1 220px; font-size: 11px; font-weight: 800; color: var(--pg-mut); text-transform: uppercase; letter-spacing: .04em; }
.pg-sel select { padding: 9px 10px; border: 1px solid #cbd5e1; border-radius: 12px; font-size: 14px; color: #0f172a; -webkit-text-fill-color: #0f172a; background: #fff; max-width: 100%; text-transform: none; letter-spacing: 0; font-weight: 600; }
.pg-btn { padding: 10px 16px; border-radius: 12px; border: 0; background: var(--pg-navy); color: #fff; font-weight: 800; font-size: 13px; }
.pg-btn:hover { background: #12345c; }
.pg-ghost { background: #fff; color: #0b1f3a; border: 1px solid #cbd5e1; }
.pg-ghost:hover { background: var(--pg-bg); }
.pg-link { flex: 0 0 auto; white-space: nowrap; background: none; border: 0; color: var(--pg-teal); font-weight: 800; font-size: 13px; padding: 6px 0; text-decoration: underline; }
.pg-nav { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 2px 0 10px; margin-bottom: 8px; scrollbar-width: thin; }
.pg-nav button { flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; border: 1px solid #cbd5e1; background: #fff; color: #0f172a; font-size: 13px; font-weight: 700; white-space: nowrap; }
.pg-nav button.on { background: var(--pg-navy); color: #fff; border-color: var(--pg-navy); }
.pg-body { display: grid; gap: 14px; min-width: 0; }
.pg-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 18px; align-items: center; padding: 18px; border-radius: 18px; color: #fff; background: linear-gradient(135deg, #0b1f3a, #167d9a); }
.pg-hero-t small { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #fcd68a; }
.pg-hero-t h4 { margin: 4px 0 2px; font-size: 20px; font-weight: 800; line-height: 1.2; }
.pg-hero-t p { margin: 0 0 10px; color: #cfe3ee; font-size: 13px; }
.pg-hero dl, .pg-row-b dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(120px, 100%), 1fr)); gap: 10px; margin: 0; }
.pg-hero dt, .pg-row-b dt { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; opacity: .75; }
.pg-hero dd, .pg-row-b dd { margin: 2px 0 0; font-size: 13px; font-weight: 700; }
.pg-hero-s { grid-column: 1 / -1; margin: 0; font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pg-ring { position: relative; width: 132px; height: 132px; border: 0; background: none; padding: 0; color: #fff; display: grid; place-items: center; }
.pg-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.pg-ring circle { fill: none; stroke-width: 10; }
.pg-ring .t { stroke: rgba(255, 255, 255, .2); }
.pg-ring .v { stroke: #fcd68a; stroke-linecap: round; transition: stroke-dashoffset .6s; }
.pg-ring strong { font-size: 30px; font-weight: 800; line-height: 1; }
.pg-ring span { position: absolute; bottom: 34px; font-size: 10px; opacity: .85; text-transform: uppercase; letter-spacing: .05em; }
.pg-ring strong { margin-bottom: 14px; }
.pg-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 10px; }
.pg-stat { display: grid; gap: 2px; align-content: start; text-align: left; padding: 14px; border: 1px solid var(--pg-line); border-radius: 16px; background: #fff; min-width: 0; color: var(--pg-ink); }
.pg-stat b { font-size: 24px; font-weight: 800; color: var(--pg-navy); line-height: 1.1; }
.pg-stat span { font-size: 12px; font-weight: 700; color: var(--pg-mut); }
.pg-stat small { font-size: 11px; color: var(--pg-mut); }
.pg-stat em { font-style: normal; font-size: 11px; color: var(--pg-teal); font-weight: 700; margin-top: 4px; }
button.pg-stat:hover, button.pg-stat.on { border-color: var(--pg-teal); box-shadow: 0 0 0 2px rgba(22, 125, 154, .15); }
.pg-why { padding: 14px 16px; border: 1px solid #bae6fd; background: #f0f9ff; border-radius: 16px; font-size: 13px; }
.pg-why-h { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 4px; }
.pg-why p { margin: 6px 0; } .pg-why ul { margin: 6px 0; padding-left: 18px; } .pg-why li { margin: 3px 0; }
.pg-x { width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%; border: 0; background: #e0f2fe; color: var(--pg-navy); font-weight: 800; }
.pg-note { font-size: 12px; color: var(--pg-mut); margin: 6px 0; }
.pg-card { padding: 16px; border: 1px solid var(--pg-line); border-radius: 18px; background: #fff; min-width: 0; }
.pg-card h4, .pg-sub { margin: 0 0 10px; font-size: 15px; font-weight: 800; }
.pg-sub { margin-top: 6px; }
.pg-card-h { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pg-card-h h4 { margin: 0; }
.pg-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 14px; }
.pg-status { list-style: none; margin: 0; padding: 0; display: grid; }
.pg-status li { display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--pg-line); font-size: 14px; }
.pg-status li:last-child { border-bottom: 0; }
.pg-next { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; counter-reset: n; }
.pg-next li { display: flex; gap: 10px; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--pg-bg); border: 1px solid var(--pg-line); counter-increment: n; }
.pg-next li > div { min-width: 0; flex: 1 1 auto; } .pg-next b { display: block; font-size: 13px; } .pg-next small { display: block; font-size: 12px; color: var(--pg-mut); }
.pg-alert { padding: 12px 14px; border-radius: 14px; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; font-size: 13px; }
.pg-alert ul { margin: 6px 0 0; padding-left: 18px; }
.pg-empty { padding: 16px; border: 1px dashed #cbd5e1; border-radius: 14px; background: var(--pg-bg); font-size: 13px; color: #475569; }
.pg-empty b { display: block; margin-bottom: 2px; color: var(--pg-ink); }
.pg-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: normal; text-align: center; line-height: 1.3; }
.pg-green { background: #dcfce7; color: #166534; } .pg-blue { background: #dbeafe; color: #1e40af; } .pg-amber { background: #fef3c7; color: #92400e; } .pg-red { background: #fee2e2; color: #991b1b; } .pg-gray { background: #e2e8f0; color: #475569; }
.pg-bar { height: 8px; border-radius: 99px; background: #e2e8f0; overflow: hidden; }
.pg-bar i { display: block; height: 100%; background: var(--pg-teal); border-radius: 99px; } .pg-bar.done i { background: #16a34a; }
/* modules + expandable rows */
.pg-mods, .pg-list { display: grid; gap: 10px; }
.pg-mod, .pg-row { border: 1px solid var(--pg-line); border-radius: 16px; background: #fff; overflow: hidden; }
.pg-mod-h, .pg-row-h { width: 100%; display: grid; align-items: center; gap: 10px 12px; padding: 12px 14px; border: 0; background: none; text-align: left; color: var(--pg-ink); }
.pg-mod-h { grid-template-columns: auto minmax(0, 1fr) auto; }
.pg-row-h { grid-template-columns: minmax(0, 1fr) auto auto; }
.pg-row-h.static { grid-template-columns: minmax(0, 1fr) auto; }
.pg-mod-n { width: 30px; height: 30px; border-radius: 50%; background: #e0f2fe; color: var(--pg-navy); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.pg-mod-t, .pg-row-t { display: grid; gap: 6px; min-width: 0; } .pg-row-t { gap: 2px; }
.pg-row-t small { font-size: 12px; color: var(--pg-mut); }
.pg-mod-s { display: grid; gap: 4px; justify-items: end; } .pg-mod-s strong { font-size: 15px; }
.pg-score { font-size: 16px; color: var(--pg-navy); min-width: 3ch; text-align: right; }
.pg-mod-b, .pg-row-b { padding: 4px 14px 14px; border-top: 1px solid var(--pg-line); font-size: 13px; display: grid; gap: 6px; }
.pg-row-b dt { color: var(--pg-mut); opacity: 1; } .pg-mod-b h5, .pg-row-b h5 { margin: 6px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--pg-mut); }
.pg-mod-b ul, .pg-row-b ul { margin: 0; padding-left: 18px; }
.pg-lessons { list-style: none; padding: 0 !important; display: grid; gap: 6px; }
.pg-lessons li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; background: var(--pg-bg); }
.pg-lessons li.ok { background: #f0fdf4; } .pg-lessons li > span { color: #16a34a; font-weight: 800; } .pg-lessons li b { display: block; } .pg-lessons small { color: var(--pg-mut); }
.pg-result, .pg-fb, .pg-fix { margin: 0; padding: 10px 12px; border-radius: 12px; background: #f0fdf4; } .pg-fb { background: #f0f9ff; } .pg-fix { background: #fff7ed; }
.pg-s3 { grid-template-columns: repeat(auto-fit, minmax(min(120px, 100%), 1fr)); }
/* attendance calendar */
.pg-cals { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 12px; }
.pg-cal { padding: 12px; border: 1px solid var(--pg-line); border-radius: 16px; background: #fff; } .pg-cal h5 { margin: 0 0 8px; font-size: 13px; }
.pg-cal-g { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; font-size: 11px; }
.pg-cal-g u { text-decoration: none; font-weight: 800; color: var(--pg-mut); } .pg-cal-g i { font-style: normal; color: #94a3b8; padding: 5px 0; } .pg-cal-g i.e { visibility: hidden; }
.pg-cal-g .d { border: 0; border-radius: 8px; padding: 5px 0; font-weight: 800; font-size: 11px; color: #fff; }
.d.green { background: #16a34a; } .d.amber { background: #d97706; } .d.red { background: #dc2626; } .d.gray { background: #94a3b8; } .d.blue { background: #2563eb; }
.pg-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 12px; color: var(--pg-mut); margin: 0; }
.pg-lg { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; } .pg-lg .d { display: inline-block; width: 12px; height: 12px; padding: 0; border-radius: 4px; }
.pg-chart { width: 100%; height: auto; max-height: 200px; display: block; }
.pg-chart .g { stroke: #e2e8f0; } .pg-chart text { font-size: 9px; fill: #64748b; } .pg-chart .l { fill: none; stroke: var(--pg-teal); stroke-width: 2.5; } .pg-chart circle { fill: #fff; stroke: var(--pg-navy); stroke-width: 2; }
.pg-grade { margin: 0; font-size: 18px; font-weight: 800; color: var(--pg-navy); }
/* milestones, certificate, history */
.pg-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 10px; }
.pg-badge { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 14px 10px; border: 1px solid var(--pg-line); border-radius: 16px; background: #fff; opacity: .6; }
.pg-badge.on { opacity: 1; border-color: #fcd68a; background: #fffbeb; } .pg-badge-i { font-size: 30px; filter: grayscale(1); } .pg-badge.on .pg-badge-i { filter: none; } .pg-badge b { font-size: 13px; } .pg-badge small { font-size: 11px; color: var(--pg-mut); }
.pg-reqs { list-style: none; margin: 0 0 12px; padding: 0; display: grid; }
.pg-reqs li, .pg-timeline li { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--pg-line); }
.pg-reqs li:last-child, .pg-timeline li:last-child { border-bottom: 0; } .pg-reqs li > div, .pg-timeline li > div { min-width: 0; flex: 1 1 200px; } .pg-reqs b, .pg-timeline b { display: block; font-size: 13px; } .pg-reqs small, .pg-timeline small { display: block; font-size: 12px; color: var(--pg-mut); }
.pg-timeline { list-style: none; margin: 0 0 10px; padding: 0 0 0 4px; } .pg-timeline time { flex: 0 0 96px; font-size: 12px; font-weight: 700; color: var(--pg-mut); }
@media (max-width: 520px) {
  .pg-hero { grid-template-columns: minmax(0, 1fr); justify-items: start; padding: 14px; } .pg-ring { justify-self: center; order: -1; width: 120px; height: 120px; }
  .pg-mod-h { grid-template-columns: auto minmax(0, 1fr); } .pg-mod-s { grid-column: 1 / -1; grid-auto-flow: column; justify-content: space-between; justify-items: start; align-items: center; }
  .pg-row-h { grid-template-columns: minmax(0, 1fr) auto; } .pg-row-h .pg-pill { grid-column: 1; justify-self: start; } .pg-row-h .pg-score { grid-row: 1; grid-column: 2; }
  .pg-timeline time { flex-basis: 100%; } .pg-btn { width: 100%; }
}
.pg-row > .pg-fb { margin: 0 14px 14px; }
