/* Volunteer portal - additions on top of the live site's styles.css + css/shared.css.
   Same rule as shared.css: ADD selectors, reuse the tokens, never redefine a colour. */

/* ------------------------------------------------------------------ shell */
.view[hidden] { display: none !important; }
.is-signed-out .vp-in, .is-signed-out .nav { display: none !important; }
.vp-tag { font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--leaf-dark); background: var(--sage); padding: 5px 10px; border-radius: 999px; }
.is-signed-out .vp-tag { margin-right: auto; }
.nav__list a[aria-current="page"] { background: var(--forest); color: var(--white); }
.nav__count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--yellow); color: var(--ink); font-size: .72rem; font-weight: 800; vertical-align: 1px; }
#main:focus { outline: none; }

.vp-me { position: relative; }
.vp-me__btn { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; }
.vp-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--sage); color: var(--forest); display: grid; place-items: center; font-weight: 800; font-size: .9rem; border: 2px solid var(--sage-3); transition: border-color var(--dur-1) var(--ease-out); }
.vp-me__btn:hover .vp-avatar, .vp-me__btn[aria-expanded="true"] .vp-avatar { border-color: var(--leaf); }
.vp-me__menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; min-width: 240px; background: var(--warm-white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 8px; display: grid; }
.vp-me__menu a, .vp-me__menu button { display: flex; align-items: center; gap: 8px; text-align: left; padding: 10px 12px; border-radius: var(--radius-sm); border: 0; background: none; font: inherit; font-size: .92rem; font-weight: 600; color: var(--ink); text-decoration: none; cursor: pointer; }
.vp-me__menu a:hover, .vp-me__menu button:hover { background: var(--sage-2); color: var(--forest); }
.vp-me__who { margin: 0 0 6px; padding: 8px 12px 12px; border-bottom: 1px solid var(--line); display: grid; }
.vp-me__who span { font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }

@media (max-width: 899px) {
  .vp-tag { display: none; }
  .navbar__cta.vp-in { margin-left: auto; }
}
@media (max-width: 599px) {
  .navbar__cta.vp-in { display: none; }
  .vp-me { margin-left: auto; }
}

/* ------------------------------------------------------------------ sign in */
.vp-signin { margin: 0 0 22px; max-width: 460px; padding: 22px; }
.vp-signin .btn { width: 100%; }
.vp-signin__sent { font-size: .92rem; margin: 0 0 14px; }
.vp-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.vp-row .btn { width: auto; }
.vp-demo { max-width: 460px; }
.vp-demo__title { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.vp-demo__list { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.vp-persona { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); background: var(--white); font: inherit; cursor: pointer; transition: border-color var(--dur-1) var(--ease-out), background-color var(--dur-1) var(--ease-out); }
.vp-persona:hover { border-color: var(--leaf); background: var(--sage-2); }
.vp-persona .vp-avatar { width: 34px; height: 34px; font-size: .78rem; flex: none; }
.vp-persona strong { display: block; font-size: .9rem; color: var(--forest); line-height: 1.2; }
.vp-persona span span { display: block; font-size: .75rem; color: var(--muted); }

/* ------------------------------------------------------------------ overview */
.vp-hello { background: var(--cream); }
.vp-hello__inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--gap-lg); align-items: center; padding-block: clamp(28px, 3.6vw, 56px); }
.vp-hello__title { font-size: clamp(2rem, 1.2rem + 2.6vw, 3.4rem); line-height: 1.05; letter-spacing: -.026em; margin: 0 0 .35em; }
.vp-hello__title em { font-style: normal; color: var(--leaf); }
.vp-hello .lead { margin: 0; }

.vp-next { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--forest); color: var(--white); min-height: 250px; display: grid; }
.vp-next img { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.vp-next__body { grid-area: 1 / 1; position: relative; padding: clamp(20px, 2.4vw, 32px); display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; background: linear-gradient(180deg, rgba(8, 39, 29, 0) 0%, rgba(8, 39, 29, .82) 70%); }
.vp-next__label { font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--yellow); margin: 0; }
.vp-next h2 { color: var(--white); font-size: clamp(1.4rem, 1rem + 1vw, 1.9rem); margin: 0; }
.vp-next__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .92rem; color: var(--on-dark); margin: 0 0 8px; }
.vp-next__meta span { display: inline-flex; align-items: center; gap: 6px; }
.vp-next__meta .icon { width: 17px; height: 17px; color: var(--yellow); }
.vp-next .vp-actions { margin-top: 4px; }
.vp-next :focus-visible { outline-color: var(--yellow); }
.vp-next--empty .vp-next__body { background: none; justify-content: center; }

.vp-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--gap-lg); align-items: start; }
.vp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
.vp-head--gap { margin-top: 32px; }
.vp-h2 { font-size: 1.35rem; margin: 0; }
.vp-h2--sp { margin: 30px 0 12px; }
.vp-stack { display: grid; gap: 12px; }
.vp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }

@media (max-width: 999px) {
  .vp-hello__inner, .vp-cols { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ shift card */
.vp-shift { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; background: var(--warm-white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; transition: border-color var(--dur-1) var(--ease-out), box-shadow var(--dur-2) var(--ease-out); }
.vp-shift:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.vp-shift--ask { border-color: var(--amber-line); background: #FFFCF3; }
.vp-shift--muted { background: var(--cream); }
.vp-date { width: 64px; border-radius: var(--radius-sm); overflow: hidden; text-align: center; border: 1px solid var(--line); background: var(--white); flex: none; }
.vp-date__m { display: block; background: var(--forest); color: var(--white); font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; padding: 4px 0; }
.vp-date__d { display: block; font-size: 1.55rem; font-weight: 800; color: var(--forest); line-height: 1.1; padding-top: 5px; font-variant-numeric: tabular-nums; }
.vp-date__w { display: block; font-size: .7rem; font-weight: 700; color: var(--muted); padding-bottom: 6px; }
.vp-shift--muted .vp-date__m { background: var(--muted); }
.vp-shift__body { min-width: 0; }
.vp-shift__top { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-bottom: 4px; }
.vp-shift__title { font-size: 1.05rem; margin: 0; }
.vp-shift__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; font-size: .86rem; color: var(--muted); }
.vp-shift__meta span { display: inline-flex; align-items: center; gap: 5px; }
.vp-shift__meta .icon { width: 15px; height: 15px; color: var(--leaf); }
.vp-shift__note { font-size: .82rem; color: var(--muted); margin: 6px 0 0; }
.vp-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.vp-actions .btn { padding: .6em 1.05em; font-size: .88rem; }
.vp-chip { display: inline-flex; align-items: center; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--sage-2); color: var(--forest); border: 1px solid var(--sage-3); }
.vp-chip--match { background: var(--yellow-tint); border-color: var(--amber-line); color: var(--ink); }

/* extra badge flavours (shared.css has --active circle / --upcoming diamond / --past bar) */
.badge--no { color: var(--error); border-color: #F3C6C1; }
.badge--no::before { width: 10px; height: 2.5px; border-radius: 2px; transform: rotate(45deg); box-shadow: 0 0 0 0 currentColor; }
.badge--done { color: var(--forest); border-color: var(--sage-3); background: var(--sage-2); }
.badge--done::before { border-radius: 2px; }

@media (max-width: 699px) {
  .vp-shift { grid-template-columns: auto minmax(0, 1fr); }
  .vp-shift .vp-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* find-a-shift card */
.vp-open { background: var(--warm-white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out); }
.vp-open:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.vp-open__media { position: relative; }
.vp-open__media img { width: 100%; aspect-ratio: 2.4 / 1; object-fit: cover; background: var(--sage); }
.vp-open__media .vp-date { position: absolute; left: 14px; bottom: -22px; box-shadow: var(--shadow); }
.vp-open__body { padding: 30px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.vp-open__body h3 { font-size: 1.05rem; margin: 0; }
.vp-open__fill { display: flex; align-items: center; gap: 10px; font-size: .8rem; color: var(--muted); }
.vp-open__fill .bar__fill { transform: scaleX(var(--p, 0)); }
.vp-open__foot { margin-top: auto; padding-top: 6px; display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

/* ------------------------------------------------------------------ tasks */
.vp-tasks { list-style: none; display: grid; gap: 10px; }
.vp-task { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start; background: var(--warm-white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.vp-task__tick { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--white); display: grid; place-items: center; cursor: pointer; margin-top: 1px; transition: border-color var(--dur-1) var(--ease-out), background-color var(--dur-1) var(--ease-out); }
.vp-task__tick:hover { border-color: var(--leaf); background: var(--sage-2); }
.vp-task__tick .icon { width: 16px; height: 16px; stroke-width: 2.6; color: var(--leaf); opacity: 0; transition: opacity var(--dur-1) var(--ease-out); }
.vp-task__tick:hover .icon { opacity: .5; }
.vp-task__tick[disabled] { cursor: default; }
.is-done .vp-task__tick { background: var(--leaf); border-color: var(--leaf); }
.is-done .vp-task__tick .icon { color: var(--white); opacity: 1; }
.vp-task__title { font-weight: 700; color: var(--forest); margin: 0; line-height: 1.35; }
.is-done .vp-task__title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-2); }
.vp-task__note { font-size: .84rem; color: var(--muted); margin: 3px 0 0; }
.vp-task__due { font-size: .78rem; font-weight: 700; white-space: nowrap; color: var(--muted); padding-top: 4px; }
.vp-task__due--soon { color: var(--amber-ink); }
.vp-task__due--late { color: var(--error); }
.vp-task__go { margin-top: 6px; padding: 4px 0; font-size: .86rem; }
.vp-tasks--done .vp-task { background: var(--cream); }
.vp-empty { background: var(--cream); border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 18px; color: var(--muted); font-size: .92rem; margin: 0; }
.vp-narrow { max-width: 860px; }
@media (max-width: 559px) {
  .vp-task { grid-template-columns: auto minmax(0, 1fr); }
  .vp-task__due { grid-column: 2; padding-top: 0; }
}

/* ------------------------------------------------------------------ payments */
.vp-page { padding-block: clamp(24px, 3vw, 44px) clamp(56px, 6vw, 88px); }
.vp-page__title { font-size: clamp(1.9rem, 1.2rem + 2.2vw, 3rem); line-height: 1.08; letter-spacing: -.024em; margin: 0 0 .35em; max-width: 22ch; }
.vp-page .lead { margin-bottom: 8px; max-width: 70ch; }
.vp-kpis { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 24px 0 32px; }
.vp-kpi { background: var(--warm-white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 4px; min-width: 0; }
.vp-kpi--lead { background: var(--forest); border-color: var(--forest); }
.vp-kpi__label { font-size: .78rem; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.vp-kpi__num { font-size: clamp(1.5rem, 1rem + 1vw, 2.1rem); font-weight: 800; letter-spacing: -.02em; color: var(--forest); font-variant-numeric: tabular-nums; line-height: 1.1; overflow-wrap: anywhere; }
.vp-kpi__sub { font-size: .78rem; color: var(--muted); }
.vp-kpi--lead .vp-kpi__label, .vp-kpi--lead .vp-kpi__sub { color: var(--on-dark-muted); }
.vp-kpi--lead .vp-kpi__num { color: var(--yellow); }
@media (max-width: 999px) { .vp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 419px) { .vp-kpis { grid-template-columns: 1fr; } }

.vp-paygrid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--gap-lg); align-items: start; }
.vp-side { display: grid; gap: 14px; }
@media (max-width: 1099px) { .vp-paygrid { grid-template-columns: 1fr; } .vp-side { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); } }
.vp-table td .link-btn { padding: 0; font-size: .86rem; }
.vp-table tfoot td { font-weight: 800; color: var(--forest); background: var(--sage-2); border-bottom: 0; }
@media (max-width: 699px) { .vp-table tfoot, .vp-table tfoot tr, .vp-table tfoot td { display: block; } .vp-table tfoot td { display: flex; justify-content: space-between; } }

.vp-claims { list-style: none; display: grid; gap: 8px; margin: 12px 0 16px; }
.vp-claims li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--cream); font-size: .86rem; }
.vp-claims strong { color: var(--forest); }
.vp-claims .num { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.vp-claims small { color: var(--muted); grid-column: 1 / -1; }
.vp-dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; margin: 10px 0 12px; font-size: .9rem; }
.vp-dl dt { color: var(--muted); font-weight: 600; }
.vp-dl dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }

/* payslip dialog + print */
.vp-slip { max-width: min(720px, calc(100% - 32px)); }
.vp-slip__head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; border-bottom: 2px solid var(--forest); padding-bottom: 14px; margin-bottom: 16px; }
.vp-slip__head .brand { pointer-events: none; }
.vp-slip__ref { text-align: right; font-size: .82rem; color: var(--muted); }
.vp-slip__ref strong { display: block; color: var(--forest); font-size: 1rem; }
.vp-slip .dtable { font-size: .86rem; }
.vp-slip .dtable th, .vp-slip .dtable td { padding: 8px 10px; }
@media print {
  body > *:not(#slip-dialog) { display: none !important; }
  #slip-dialog { position: static; box-shadow: none; max-width: none; width: 100%; opacity: 1; transform: none; }
  #slip-dialog::backdrop { display: none; }
  .dialog__x, .vp-slip .dialog__actions { display: none !important; }
}

/* ------------------------------------------------------------------ profile */
.vp-profile { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin-top: 24px; align-items: start; }
.vp-profile .card h2 { font-size: 1.1rem; margin: 0 0 12px; }
.vp-days { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.vp-skills { display: flex; flex-wrap: wrap; gap: 6px; }
.vp-meter { display: flex; align-items: center; gap: 10px; font-size: .86rem; color: var(--muted); }
.vp-meter .bar__fill { transform: scaleX(var(--p, 0)); }
.vp-contact { margin-top: 24px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.vp-contact p { margin: 0; }

/* ------------------------------------------------------------------ toast */
.vp-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; background: var(--forest); color: var(--white); padding: 12px 18px; border-radius: 999px; box-shadow: var(--shadow-lg); font-weight: 600; font-size: .92rem; display: flex; gap: 8px; align-items: center; max-width: calc(100% - 32px); }
.vp-toast .icon { color: var(--yellow); }
.js-reveal .vp-toast:not([hidden]) { animation: rise-in var(--dur-2) var(--ease-out); }

.vp-foot { border-top: 0; }

@media (prefers-reduced-motion: reduce) {
  .vp-open:hover { transform: none; }
  .js-reveal .vp-toast:not([hidden]) { animation: none; }
}

.vp-paycard .vp-dl { margin: 0; }

/* ------------------------------------------------------------------ live data: preview bar, loading */
.vp-preview { background: var(--yellow-tint); border-bottom: 1px solid var(--amber-line); position: sticky; top: var(--header-h); z-index: 45; }
.vp-preview__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding-block: 10px; }
.vp-preview p { margin: 0; display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--ink); }
.vp-preview .icon { color: var(--amber-ink); flex: none; margin-top: 2px; }
.vp-preview .btn--light { color: var(--forest); border-color: var(--amber-line); padding: .5em 1em; font-size: .85rem; }
.vp-preview .btn--light:hover { background: var(--warm-white); border-color: var(--amber-ink); }
.vp-ro { font-size: .8rem; color: var(--muted); font-weight: 600; }
.vp-next .vp-ro { color: var(--on-dark-muted); }
.vp-loading { padding-block: 120px; text-align: center; color: var(--muted); }
.vp-loading::before { content: ""; display: block; width: 28px; height: 28px; margin: 0 auto 14px; border-radius: 50%; border: 3px solid var(--sage-3); border-top-color: var(--leaf); animation: spin .8s linear infinite; }
