/* Pinebridge · the signed-in applications: the learner workspace and the staff office.
   Loaded after site.css, whose tokens, buttons, forms, cards, tables and chips it reuses.
   Shell → page furniture → dashboard pieces → records → responsive. */

.app-body { background: #F3F6F1; color: var(--body); font-size: 15px; overflow-x: visible; }
.app { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100vh; }

/* Sidebar ------------------------------------------------------------------ */
.app-side { position: sticky; top: 0; z-index: 40; display: flex; flex-direction: column; gap: 4px; height: 100vh; padding: 22px 16px 16px; overflow-y: auto; background: #fff; box-shadow: 1px 0 0 var(--line); scrollbar-width: thin; }
.app-brand { display: block; padding: 4px 10px 20px; }
.app-brand img { height: 40px; width: auto; }
.app-group { margin: 18px 12px 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.app-nav { display: grid; gap: 3px; }
.app-link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px; border-radius: 12px; color: var(--ink); font-size: 14.5px; font-weight: 500; transition: background .18s, color .18s; }
.app-link .ico { font-size: 19px; color: var(--muted); transition: color .18s; }
.app-link:hover { background: var(--green-50); }
.app-link:hover .ico { color: var(--green-700); }
.app-link[aria-current="page"] { background: var(--navy-900); color: #fff; font-weight: 600; }
.app-link[aria-current="page"] .ico { color: var(--green); }
.app-link .count { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--green); color: var(--navy-900); font-size: 12px; font-weight: 700; text-align: center; }
.app-id { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 14px; border-radius: var(--r); background: var(--soft); }
.app-id b { display: block; color: var(--ink); font-size: 14.5px; line-height: 1.3; }
.app-id span:not(.avatar) { font-size: 12.5px; color: var(--muted); }
.avatar { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 50%; background: var(--navy-900); color: var(--green); font-weight: 700; font-size: 14.5px; letter-spacing: .02em; }
.avatar--lg { width: 64px; height: 64px; font-size: 22px; }
.app-side__help { margin-top: auto; padding: 18px; border-radius: var(--r); background: linear-gradient(150deg, var(--navy-950), var(--navy-700)); color: rgba(255, 255, 255, .8); font-size: 13.5px; line-height: 1.5; }
.app-side__help b { display: block; color: #fff; font-size: 15px; margin-bottom: 4px; }
.app-side__help a { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; color: var(--green); font-weight: 600; }

/* Top bar ------------------------------------------------------------------- */
.app-col { min-width: 0; display: flex; flex-direction: column; }
.app-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; min-height: 70px; padding: 0 clamp(16px, 2.6vw, 34px); background: rgba(243, 246, 241, .86); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); box-shadow: 0 1px 0 var(--line); }
.app-top .where { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.app-top .end { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.icon-btn { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); font-size: 19px; transition: background .2s, color .2s; }
.icon-btn:hover { background: var(--navy-900); color: #fff; box-shadow: none; }
.app-menu { display: none; }
.pip { position: absolute; right: -3px; top: -3px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--green); color: var(--navy-900); font-size: 11.5px; font-weight: 700; line-height: 20px; text-align: center; box-shadow: 0 0 0 2px #F3F6F1; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bell-wrap { position: relative; }
.bell-list { position: absolute; right: 0; top: calc(100% + 12px); width: min(380px, 88vw); max-height: 70vh; overflow-y: auto; padding: 8px; border-radius: var(--r); background: #fff; box-shadow: var(--shadow-2); }
.bell-list[hidden] { display: none; }
.bell-list li { padding: 12px 14px; border-radius: 12px; }
.bell-list li:hover { background: var(--green-50); }
.bell-list li b { color: var(--ink); font-size: 14.5px; }
.bell-list li p { margin: 2px 0 4px; font-size: 13.5px; line-height: 1.45; }
.bell-list time, .note { font-size: 12.5px; color: var(--muted); }
.bell-foot { padding: 10px 14px 6px; border-top: 1px solid var(--line); margin-top: 6px; }
.empty-line { margin: 0; padding: 18px 14px; color: var(--muted); font-size: 14.5px; }
.textbtn { color: var(--green-700); font-weight: 600; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.textbtn:hover { color: var(--navy-700); }

.app-main { flex: 1; width: 100%; max-width: 1400px; margin: 0 auto; padding: clamp(18px, 2.6vw, 34px) clamp(16px, 2.6vw, 34px) 60px; }
.app-notice { margin-bottom: 20px; }
.app-notice form { display: inline; }

/* Page furniture -------------------------------------------------------------- */
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px 24px; margin-bottom: 24px; }
.page-head h1 { font-size: clamp(24px, 2.4vw, 32px); }
.page-head p { margin: 6px 0 0; color: var(--muted); max-width: 640px; }
.page-head__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; font-size: 14px; font-weight: 600; color: var(--muted); }
.back:hover { color: var(--green-700); }
.pan { padding: 24px; border-radius: var(--r); background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.pan + .pan { margin-top: 20px; }
.pan-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; margin-bottom: 18px; }
.pan-head h2 { font-size: 19px; letter-spacing: -.01em; }
.pan-head .link { font-size: 14px; }
.pan-foot { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.cols { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.cols--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols > * { min-width: 0; }
.cols > .pan + .pan { margin-top: 0; }
.app-top > .icon-btn, .app-top .end { flex-shrink: 0; }
.app-main .btn { min-height: 46px; padding: 0 20px; font-size: 14.5px; }
.app-main .btn--sm { min-height: 38px; padding: 0 16px; font-size: 13.5px; }
.app-main .empty { padding: 34px 20px; }
.app-main .empty p { margin-bottom: 14px; }
.app-main h3 { font-size: 16.5px; }

/* Compact status labels: colour supports the words, without a coloured card. */
.status { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 2px 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); color: var(--navy-700); font-size: 12.5px; font-weight: 600; line-height: 1.4; white-space: normal; }
.status::before { content: ""; flex: 0 0 5px; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status--navy { color: var(--navy-900); }
.status--ok { color: var(--green-700); }
.status--warn { color: #7A5407; }
.status--bad { color: #A32C1B; }
.status--quiet { color: var(--body); }

/* Dashboard · welcome ------------------------------------------------------------ */
.welcome { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: clamp(24px, 3vw, 38px); border-radius: var(--r-lg); overflow: hidden; color: rgba(255, 255, 255, .82); background: linear-gradient(120deg, var(--navy-950), #0B2E50 55%, var(--navy-700)); }
.welcome::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .9;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='480' height='360' viewBox='0 0 480 360'%3E%3Cg fill='%23fff'%3E%3Crect x='0' y='60' width='60' height='60' opacity='.035'/%3E%3Crect x='120' y='0' width='60' height='60' opacity='.025'/%3E%3Crect x='180' y='120' width='60' height='60' opacity='.04'/%3E%3Crect x='300' y='60' width='60' height='60' opacity='.03'/%3E%3Crect x='60' y='240' width='60' height='60' opacity='.03'/%3E%3Crect x='360' y='180' width='60' height='60' opacity='.04'/%3E%3Crect x='420' y='300' width='60' height='60' opacity='.025'/%3E%3Crect x='240' y='300' width='60' height='60' opacity='.03'/%3E%3C/g%3E%3C/svg%3E"); }
.welcome::after { content: ""; position: absolute; right: -8%; top: -60%; z-index: -1; width: 46%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgba(140, 198, 63, .3), transparent); }
.welcome h1 { color: #fff; font-size: clamp(26px, 2.8vw, 38px); margin-bottom: 10px; }
.welcome__meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; }
.welcome__meta span { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: #fff; }
.welcome__meta .ico { color: var(--green); font-size: 15px; }
.welcome__next { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; margin-top: 24px; padding: 18px 20px; border-radius: var(--r); background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.welcome__next > div:not(.datetile) { flex: 1; min-width: 220px; }
.welcome__next h2 { color: #fff; font-size: 20px; margin: 2px 0 4px; }
.welcome__next p { margin: 0; font-size: 14.5px; }
.caps { margin: 0; font-size: 11.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--green); }
.pan .caps, .kpi .caps { color: var(--muted); }
.datetile { display: grid; place-items: center; flex: none; width: 74px; padding: 10px 0 11px; border-radius: 14px; background: #fff; color: var(--ink); line-height: 1.1; text-align: center; }
.datetile i { font-style: normal; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--green-700); }
.datetile b { font-size: 28px; font-weight: 600; letter-spacing: -.03em; }
.datetile span { font-size: 11.5px; color: var(--muted); }
.datetile--soft { background: var(--soft); }
.welcome__ring { position: relative; display: grid; place-items: center; width: 190px; height: 190px; }
.welcome__ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.welcome__ring circle { fill: none; stroke-width: 12; stroke-linecap: round; }
.welcome__ring .track { stroke: rgba(255, 255, 255, .13); }
.welcome__ring .fill { stroke: var(--green); stroke-dasharray: var(--len) 1000; transition: stroke-dasharray 1.4s var(--ease); }
.welcome__ring div { position: absolute; text-align: center; }
.welcome__ring b { display: block; color: #fff; font-size: 40px; font-weight: 600; line-height: 1; letter-spacing: -.03em; }
.welcome__ring span { font-size: 12.5px; }

/* Dashboard · figures ---------------------------------------------------------------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 20px 0; }
.kpi { position: relative; display: block; padding: 22px; border-radius: var(--r); background: #fff; box-shadow: inset 0 0 0 1px var(--line); color: var(--body); transition: transform .3s var(--ease), box-shadow .3s; }
a.kpi:hover { transform: translateY(-4px); box-shadow: var(--shadow-1); }
.kpi .orb { margin-bottom: 16px; }
.kpi__go { position: absolute; right: 18px; top: 18px; font-size: 18px; color: var(--line-2); transition: color .2s, transform .3s var(--ease); }
a.kpi:hover .kpi__go { color: var(--green-600); transform: translate(3px, -3px); }
.kpi > b { display: block; margin: 6px 0 4px; color: var(--ink); font-size: 34px; font-weight: 600; line-height: 1.1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kpi > b small { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.kpi > span:last-child { display: block; font-size: 13.5px; line-height: 1.45; }
.kpi .up { color: var(--green-700); font-weight: 600; }

/* Learning cards: a programme with its picture and progress. */
.lcard { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 18px; align-items: center; padding: 12px; border-radius: var(--r); background: #fff; box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .3s, transform .3s var(--ease); }
.lcard + .lcard { margin-top: 12px; }
.lcard:hover { box-shadow: var(--shadow-1), inset 0 0 0 1px transparent; transform: translateY(-2px); }
.lcard__pic { position: relative; align-self: stretch; min-height: 112px; border-radius: 12px; overflow: hidden; background: var(--navy-800); }
.lcard__pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lcard__body { display: grid; gap: 8px; padding: 4px 8px 4px 0; min-width: 0; }
.lcard__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px 14px; }
.lcard h3 { font-size: 16.5px; line-height: 1.3; }
.lcard h3 a:hover { color: var(--green-700); }
.lcard__meta { margin: 0; font-size: 13px; color: var(--muted); }
.lcard__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; }
.lcard__foot p { margin: 0; font-size: 13.5px; }
.lcard__foot p b { color: var(--ink); font-weight: 600; }
.pbar { position: relative; height: 8px; border-radius: 999px; background: var(--navy-100); overflow: hidden; }
.pbar i { position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); border-radius: inherit; background: linear-gradient(90deg, var(--green-600), var(--green)); transition: width 1.2s var(--ease); }
.pbar--lg { height: 12px; }
.pbar-row { display: flex; align-items: center; gap: 12px; }
.pbar-row .pbar { flex: 1; }
.pbar-row b { font-size: 13.5px; color: var(--ink); font-variant-numeric: tabular-nums; }

/* The programme in hand, drawn large: one segment for each module. */
.journey { padding: 20px; border-radius: var(--r); background: var(--soft); margin-bottom: 14px; }
.journey__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; margin-bottom: 14px; }
.journey__head b { color: var(--ink); font-size: 17px; }
.journey__head span { font-size: 13.5px; color: var(--muted); }
.journey__mods { display: grid; gap: 8px; margin-top: 14px; }
.journey__mod { display: grid; gap: 7px; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.journey__mod b { display: block; color: var(--ink); font-size: 12.5px; }
.journey__mod.done b::after { content: " ✓"; color: var(--green-700); }
.journey__mod.now b { color: var(--green-700); }

/* Rows: bookings, saved runs, certificates, recommendations. */
.rowlist { display: grid; }
.rowitem { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.rowitem:first-child { border-top: 0; padding-top: 0; }
.rowitem:last-child { padding-bottom: 0; }
.rowitem__main { flex: 1; min-width: 0; }
.rowitem__main p { margin: 0; }
.rowitem .t { color: var(--ink); font-weight: 600; font-size: 15px; line-height: 1.35; }
.rowitem .t a:hover { color: var(--green-700); }
.rowitem .s { font-size: 13px; color: var(--muted); line-height: 1.45; }
.rowitem .s--ink { color: var(--body); }
.rowitem__end { display: flex; align-items: center; gap: 10px; flex: none; }
.thumb { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 14px; background: var(--green-100); color: var(--green-700); font-size: 22px; }
.thumb b { font-size: 17px; font-weight: 700; color: var(--navy-900); }
.thumb--navy { background: var(--navy-900); color: var(--green); }

/* The proverb of the day. */
.methali { margin: 0 0 20px; padding: 22px; border-radius: var(--r); background: var(--green); color: var(--navy-900); }
.methali .caps { color: var(--navy-800); }
.methali blockquote { margin: 10px 0 6px; font-size: 20px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
.methali blockquote p { margin: 0; }
.methali figcaption { font-size: 14.5px; }
.methali .tie { margin: 10px 0 0; font-size: 12.5px; opacity: .75; }

/* Getting started */
.checklist { display: grid; gap: 4px; }
.checklist li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; font-size: 14.5px; }
.checklist li:hover { background: var(--soft); }
.checklist a { color: var(--ink); font-weight: 600; flex: 1; }
.checklist a:hover { color: var(--green-700); }
.checklist .is-done { color: var(--muted); text-decoration: line-through; }
.tick { flex: none; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--line-2); }
.tick.done { box-shadow: none; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2307203A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.500 10 16.500 18 8'/%3E%3C/svg%3E") center / 14px no-repeat; }
.help-line { margin: 18px 4px 0; font-size: 13.5px; color: var(--muted); }
.help-line a { color: var(--green-700); font-weight: 600; }

/* Phone tab bar */
.app-tabs { display: none; }

/* Responsive ---------------------------------------------------------------------- */
@media (max-width: 1180px) {
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cols { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
    .app { grid-template-columns: 1fr; }
    .app-side { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .35s var(--ease); box-shadow: var(--shadow-2); }
    .app-side.is-open { transform: none; }
    .app-shade { position: fixed; inset: 0; z-index: 35; background: rgba(4, 20, 36, .5); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
    .app-shade.is-open { opacity: 1; visibility: visible; }
    .app-menu { display: grid; }
    .app-main { padding-bottom: 96px; }
    .app-tabs { position: fixed; inset: auto 0 0 0; z-index: 30; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -1px 0 var(--line), 0 -10px 30px rgba(7, 32, 58, .08); }
    .app-tabs a { display: grid; justify-items: center; gap: 3px; padding: 8px 4px; border-radius: 12px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
    .app-tabs a .ico { font-size: 21px; }
    .app-tabs a[aria-current="page"] { color: var(--navy-900); background: var(--green-100); }
    .app-tabs a[aria-current="page"] .ico { color: var(--green-700); }
}
@media (max-width: 680px) {
    .welcome { grid-template-columns: 1fr; }
    .welcome__ring { width: 150px; height: 150px; justify-self: start; }
    .kpis { gap: 12px; }
    .kpi { padding: 16px; }
    .kpi > b { font-size: 26px; }
    .lcard { grid-template-columns: 1fr; }
    .lcard__pic { min-height: 140px; }
    .lcard__body { padding: 0 6px 6px; }
    .pan { padding: 18px; }
    .cols--even { grid-template-columns: 1fr; }
    .rowitem { flex-wrap: wrap; }
    .rowitem__main { flex-basis: calc(100% - 90px); overflow-wrap: anywhere; }
    .rowitem__end { flex-wrap: wrap; max-width: 100%; }
    .app-top .where { font-size: 16px; }
    .app-top .end .btn span.hide-s { display: none; }
}
@media print {
    .app-side, .app-top, .app-tabs, .app-shade { display: none !important; }
    .app { display: block; }
    .app-body { background: #fff; }
}
