/* home-ui.css — Frenzon member portal: the Home page (redesign, 5 Nov 2026).
   Hero with "needs your attention" chips, icon stat tiles, rolling Quick Actions,
   shorter Obligations and Activity lists. Same look as the Payments page.
   Load after pay-ui.css. No inline styles are used (the portal CSP is style-src 'self'). */

/* ============ HERO ============ */
.hm-hero { position: relative; overflow: hidden; border-radius: 24px;
  background:
    radial-gradient(90% 120% at 100% -10%, rgba(224, 176, 74, .38) 0, rgba(224, 176, 74, 0) 55%),
    radial-gradient(120% 140% at 0% 110%, #2b8a62 0, rgba(43, 138, 98, 0) 60%),
    linear-gradient(160deg, #14432f 0%, #0b2c1e 100%);
  box-shadow: var(--pay-glow, 0 18px 40px -22px rgba(20, 67, 47, .55)); }
.hm-hero-glow { position: absolute; right: -40px; top: -40px; width: 170px; height: 170px; border-radius: 50%; z-index: 0;
  border: 1px solid rgba(255,255,255,.14); box-shadow: 0 0 0 26px rgba(255,255,255,.04), 0 0 0 54px rgba(255,255,255,.03); pointer-events: none; }
.hm-hero-badge { display: inline-flex; align-items: center; padding: 5px 11px; border-radius: 99px; background: rgba(255,255,255,.14);
  font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #f6e3b0; }
.hm-hero .page-title { margin-top: 10px; font-size: 1.45rem; font-weight: 800; }
.hm-hero .hero-main { margin-top: 18px; }
.hm-hero .hero-main .stat-value { color: #fff; }
.hm-hero .hero-mini { background: rgba(255,255,255,.12); backdrop-filter: blur(4px); }
.hm-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.hm-chips:empty { display: none; }
.hm-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 5px 13px; border: 0; border-radius: 99px; font: inherit; font-size: .8rem; font-weight: 750;
  color: #fff; background: rgba(255,255,255,.16); cursor: pointer; transition: transform .12s, background .15s; }
button.hm-chip:hover { filter: brightness(1.1); }
button.hm-chip:active { transform: scale(.97); }
.hm-chip.warn { background: rgba(224,176,74,.92); color: #3b2a02; }
.hm-chip.bad { background: #ffd9d4; color: #8a1a10; }
.hm-chip.info { background: rgba(255,255,255,.92); color: #174a85; }
.hm-chip.good { background: rgba(255,255,255,.18); color: #d9f5e6; cursor: default; }
.hm-chip.good::before { content: "\2713"; font-weight: 900; }
@media (min-width: 900px) { .hm-hero { padding: 28px 30px 24px; } }

/* ============ STAT TILES ============ */
.hm-stats { gap: 10px; }
.hm-stat { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border-radius: 18px; border: 1.5px solid var(--pay-line, var(--border-color)); }
.hm-stat-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; color: #fff;
  background: linear-gradient(145deg, var(--fc), color-mix(in srgb, var(--fc) 70%, #000)); box-shadow: 0 8px 14px -8px var(--fc); }
.hm-stat-ic svg, .hm-qa-ic svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hm-stat-txt { min-width: 0; }
.hm-stat .stat-label { font-size: .72rem; line-height: 1.25; }
.hm-stat .stat-value { margin-top: 3px; font-size: clamp(.98rem, 4.2vw, 1.25rem); }
.hm-stat .stat-value.is-pending { font-size: .9rem; }
.hm-stat .form-help { margin-top: 2px; font-size: .7rem; line-height: 1.3; }

/* ============ CARDS: header bands (see the end of this file) ============ */

/* ============ QUICK ACTIONS: tiles that roll on a phone ============ */
.quick-actions.hm-roll { display: flex; gap: 10px; margin: 0 -18px; padding: 4px 18px 8px; overflow-x: auto; scrollbar-width: none; }
.quick-actions.hm-roll::-webkit-scrollbar { display: none; }
.hm-qa { position: relative; flex: none; width: 138px; min-height: 112px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px; text-align: left;
  background: var(--surface); border: 1.5px solid var(--pay-line, var(--border-color)); border-radius: 20px; box-shadow: var(--shadow-sm); cursor: pointer;
  transition: transform .14s, box-shadow .18s, border-color .18s; }
.hm-qa:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--primary-500); }
.hm-qa:active { transform: scale(.97); }
.hm-qa-ic { width: 38px; height: 38px; margin-bottom: 8px; border-radius: 13px; color: #fff;
  background: linear-gradient(145deg, var(--fc), color-mix(in srgb, var(--fc) 70%, #000)); box-shadow: 0 8px 14px -8px var(--fc); }
.hm-qa .quick-action-title { font-size: .9rem; font-weight: 800; line-height: 1.15; }
.hm-qa .quick-action-description { font-size: .72rem; }
@media (min-width: 900px) {
  .quick-actions.hm-roll { display: grid; grid-template-columns: repeat(6, 1fr); margin: 0; padding: 0; overflow: visible; }
  .hm-qa { width: auto; }
}

/* ============ ACTIVITY / OBLIGATIONS: a little tighter ============ */
.hm-card .obl-more { margin-top: 10px; }

@media (prefers-reduced-motion: reduce) { .hm-qa, .hm-chip { transition: none; } }

/* Stat tiles: icon + label on one line, the amount gets the full width underneath */
.hm-stat { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "ic lab" "val val" "note note"; align-items: center; gap: 8px 10px; }
.hm-stat-txt { display: contents; }
.hm-stat-ic { grid-area: ic; width: 32px; height: 32px; border-radius: 11px; }
.hm-stat .stat-label { grid-area: lab; }
.hm-stat .stat-value { grid-area: val; margin-top: 0; }
.hm-stat .form-help { grid-area: note; margin-top: -4px; }
.hm-stat .form-help:empty { display: none; }


/* ====================================================================
   SECOND PASS (5 Nov): hero art, header bands, tap-to-exact-part
   ==================================================================== */

/* ---- Hero: dotted texture, coin-and-trend art, gold edge ---- */
.hm-hero {
  background:
    radial-gradient(rgba(255,255,255,.075) 1px, transparent 1.3px) 0 0 / 16px 16px,
    radial-gradient(90% 120% at 100% -10%, rgba(224, 176, 74, .42) 0, rgba(224, 176, 74, 0) 55%),
    radial-gradient(120% 140% at 0% 110%, #2b8a62 0, rgba(43, 138, 98, 0) 60%),
    linear-gradient(160deg, #14432f 0%, #0b2c1e 100%);
}
.hm-hero::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; z-index: 1;
  background: linear-gradient(90deg, rgba(224,176,74,0), #e0b04a 30%, #f6e3b0 55%, #e0b04a 80%, rgba(224,176,74,0)); }
.hm-hero-art { position: absolute; right: 12px; top: 40px; width: 132px; height: auto; z-index: 0; pointer-events: none; opacity: .75; }
.hm-hero .hero-main .stat-label::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%;
  background: #e0b04a; box-shadow: 0 0 0 4px rgba(224,176,74,.25); vertical-align: 1px; }

/* ---- Card headings: a green band with a gold icon, like the Account page but sweeter ---- */
.hm-card { --cp: 18px; padding: var(--cp); overflow: hidden; }
.hm-card > .card-header { position: relative; align-items: center; gap: 12px; margin: calc(var(--cp) * -1) calc(var(--cp) * -1) 14px; padding: 14px var(--cp); overflow: hidden;
  background:
    radial-gradient(140px 100px at 100% 0, rgba(224,176,74,.38), transparent 70%),
    linear-gradient(100deg, #14432f 0%, #1c6a49 72%, #2b8a62 100%); }
.hm-card > .card-header::after { content: ""; position: absolute; right: -26px; top: -34px; width: 96px; height: 96px; border-radius: 50%; pointer-events: none;
  border: 1px solid rgba(255,255,255,.18); box-shadow: 0 0 0 14px rgba(255,255,255,.04); }
.hm-card > .card-header > * { position: relative; z-index: 1; }
.hm-card > .card-header > div { flex: 1; min-width: 0; }
.hm-card-ic { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; color: #3b2a02;
  background: linear-gradient(145deg, #f6e3b0, #e0b04a); box-shadow: 0 8px 14px -8px rgba(0,0,0,.6); }
.hm-card-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hm-card > .card-header .card-title { padding-left: 0; font-size: 1.05rem; font-weight: 800; color: #fff; }
.hm-card > .card-header .card-title::before { content: none; }
.hm-card > .card-header .card-subtitle { margin-top: 1px; font-size: .78rem; color: #cfe8da; }
.hm-card > .card-header .btn-outline { flex: none; color: #fff; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.42); }
.hm-card > .card-header .btn-outline:hover { background: rgba(255,255,255,.22); border-color: #fff; }
.quick-actions.hm-roll { margin: 0 calc(var(--cp) * -1); padding: 4px var(--cp) 8px; }
@media (min-width: 900px) { .quick-actions.hm-roll { margin: 0; padding: 0; } }

/* ---- Everything tappable gets a hand, a press and a chevron ---- */
.hm-tap { cursor: pointer; transition: transform .12s, box-shadow .18s; -webkit-tap-highlight-color: rgba(224,176,74,.25); }
.hm-tap:active { transform: scale(.98); }
.hm-tap:focus-visible { outline: 3px solid rgba(224,176,74,.7); outline-offset: 2px; }
.hm-stat { position: relative; }
.hm-stat::after { content: "\203A"; position: absolute; right: 12px; top: 10px; font-size: 1.2rem; line-height: 1; color: var(--text-muted); opacity: .6; }
.hero-mini.hm-tap:hover, .hero-main.hm-tap:hover { filter: brightness(1.08); }
#homeObligations .obl-item[data-go], #recentActivity .ma-row[data-pid], #homeLoanOverview .loan-card[data-loan-id] { cursor: pointer; position: relative; transition: transform .12s, box-shadow .18s; }
#homeObligations .obl-item[data-go]:active, #recentActivity .ma-row[data-pid]:active, #homeLoanOverview .loan-card[data-loan-id]:active { transform: scale(.985); }
#homeObligations .obl-item[data-go] .obl-row { padding-right: 16px; }
#homeObligations .obl-item[data-go]::after, #recentActivity .ma-row[data-pid]::after { content: "\203A"; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 1.2rem; color: var(--text-muted); opacity: .55; pointer-events: none; }
#recentActivity .ma-row[data-pid] { padding-right: 26px; }

/* The place a tap lands on pulses gold for a moment (same idea as the admin home). */
@keyframes hmFlash {
  0%   { box-shadow: 0 0 0 4px rgba(224,176,74,.95), 0 0 0 10px rgba(224,176,74,.35); }
  60%  { box-shadow: 0 0 0 4px rgba(224,176,74,.7),  0 0 0 12px rgba(224,176,74,.15); }
  100% { box-shadow: 0 0 0 0 rgba(224,176,74,0), 0 0 0 0 rgba(224,176,74,0); }
}
.hm-flash { animation: hmFlash 3.4s ease-out 1; border-radius: 14px; }
@media (prefers-reduced-motion: reduce) { .hm-flash { animation: none; outline: 3px solid #e0b04a; outline-offset: 2px; } }

/* small fixes after the first look */
.hm-hero-art { top: 10px; right: 14px; width: 104px; }
.hm-stat .stat-label { padding-right: 14px; }


/* ====================================================================
   5 Nov, FIFTH PASS (revised): green card headings are back, now with a drawing
   blended into each one (see the <svg class="hm-art"> in each heading) plus texture.
   ==================================================================== */
.hm-card > .card-header {
  background:
    radial-gradient(rgba(255,255,255,.09) 1px, transparent 1.4px) 0 0 / 14px 14px,
    radial-gradient(150px 110px at 100% 0, rgba(224,176,74,.42), transparent 70%),
    radial-gradient(160px 90px at 0% 120%, rgba(43,138,98,.55), transparent 70%),
    linear-gradient(100deg, #12402c 0%, #1c6a49 70%, #2b8a62 100%);
}
.hm-card > .card-header::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(224,176,74,0), #e0b04a 30%, #f6e3b0 55%, #e0b04a 80%, rgba(224,176,74,0)); }
.hm-card > .card-header > svg.hm-art { position: absolute; z-index: 0; right: 4px; top: 0; height: 100%; width: auto; max-width: 70%; pointer-events: none; opacity: .9; }
.hm-art * { vector-effect: non-scaling-stroke; }
.hm-card > .card-header .btn-outline { backdrop-filter: blur(3px); }
.hm-hero { box-shadow: 0 16px 34px -20px rgba(20, 67, 47, .6); }


/* ====================================================================
   5 Nov, SIXTH PASS: the CONTENT under the headings gets design.
   Home only (#homeObligations, #homeLoanOverview, See all button); the Loans page is untouched.
   ==================================================================== */

/* See all / View Loans: solid gold so it is easy to see on the green band */
.hm-card > .card-header .btn-outline { color: #3b2a02; font-weight: 800; background: linear-gradient(145deg, #f6e3b0, #e0b04a); border: 0; box-shadow: 0 8px 14px -8px rgba(0,0,0,.55); backdrop-filter: none; }
.hm-card > .card-header .btn-outline:hover { background: linear-gradient(145deg, #fff0c6, #ecbc57); border: 0; }

/* ---- Obligations: a card per item, coloured by kind, with a round icon ---- */
#homeObligations .obl-list { gap: 10px; }
#homeObligations .obl-item { --k: #1f6b4a; position: relative; overflow: hidden; border: 1px solid color-mix(in srgb, var(--k) 22%, #fff); border-radius: 18px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--k) 9%, #fff) 0%, #fff 62%); box-shadow: 0 8px 16px -14px var(--k); }
#homeObligations .obl-item::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: linear-gradient(180deg, var(--k), color-mix(in srgb, var(--k) 55%, #fff)); }
#homeObligations .obl-row { gap: 12px; padding: 13px 28px 13px 18px; }
#homeObligations .obl-row::before { content: ""; flex: none; width: 40px; height: 40px; border-radius: 14px; background-color: var(--k); background-repeat: no-repeat; background-position: center; background-size: 22px;
  box-shadow: 0 10px 16px -10px var(--k); background-image: var(--ico); }
#homeObligations .obl-main { flex: 1; min-width: 0; }
#homeObligations .obl-title { font-size: .92rem; font-weight: 800; line-height: 1.25; color: var(--text-main); }
#homeObligations .obl-sub { margin-top: 3px; font-size: .74rem; }
#homeObligations .obl-side { gap: 5px; }
#homeObligations .obl-amount { font-size: 1rem; font-weight: 850; color: var(--k); font-variant-numeric: tabular-nums; white-space: nowrap; }
#homeObligations .obl-item[data-go^="savings"] { --k: #1f6b4a; --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 11a7 6 0 0 1 12.5-3.8L21 7v4l-2 1.3V16h-3v-1.5H9V16H6v-3.2A6 6 0 0 1 5 11z'/%3E%3Ccircle cx='15.5' cy='10' r='.6' fill='white'/%3E%3C/svg%3E"); }
#homeObligations .obl-item[data-go^="renewal"] { --k: #1f6fb5; --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12a8 8 0 1 1-2.6-5.9M20 4v4.5h-4.5'/%3E%3C/svg%3E"); }
#homeObligations .obl-item[data-go^="fine"] { --k: #c0392b; --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 2.5 20h19z'/%3E%3Cpath d='M12 10v4.5M12 17.4v.1'/%3E%3C/svg%3E"); }
#homeObligations .obl-item[data-go^="interest"] { --k: #c98f1a; --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 19 19 5'/%3E%3Ccircle cx='7' cy='7' r='2.4'/%3E%3Ccircle cx='17' cy='17' r='2.4'/%3E%3C/svg%3E"); }
#homeObligations .obl-item[data-go^="principal"] { --k: #6b4bb8; --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10 12 4l9 6M5.5 10v7M10 10v7M14 10v7M18.5 10v7M3 20h18'/%3E%3C/svg%3E"); }
#homeObligations .obl-item { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 11a7 6 0 0 1 12.5-3.8L21 7v4l-2 1.3V16h-3v-1.5H9V16H6v-3.2A6 6 0 0 1 5 11z'/%3E%3Ccircle cx='15.5' cy='10' r='.6' fill='white'/%3E%3C/svg%3E"); }
#homeObligations .obl-item[data-go]::after { right: 12px; color: var(--k); opacity: .7; }

/* ---- Loan Overview: a proper loan card ---- */
#homeLoanOverview .loan-card { position: relative; overflow: hidden; margin-bottom: 12px; padding: 16px; border: 1px solid #cfe3d7; border-radius: 20px;
  background: radial-gradient(180px 120px at 100% 0, rgba(224,176,74,.16), transparent 70%), linear-gradient(160deg, #f4faf6 0%, #fff 55%); box-shadow: 0 12px 22px -16px rgba(20,67,47,.55); }
#homeLoanOverview .loan-card:last-child { margin-bottom: 0; }
#homeLoanOverview .loan-header { align-items: center; gap: 12px; }
#homeLoanOverview .loan-header::before { content: ""; flex: none; width: 42px; height: 42px; border-radius: 14px; order: -1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10 12 4l9 6M5.5 10v7M10 10v7M14 10v7M18.5 10v7M3 20h18'/%3E%3C/svg%3E") center / 24px 24px no-repeat, linear-gradient(145deg, #1c6a49, #0f3825); box-shadow: 0 10px 16px -10px #14432f; }
#homeLoanOverview .loan-header > div { flex: 1; min-width: 0; }
#homeLoanOverview .loan-title { font-size: 1.02rem; font-weight: 850; letter-spacing: -.01em; }
#homeLoanOverview .loan-header .badge { flex: none; font-weight: 800; }
#homeLoanOverview .loan-steps { margin-top: 14px; padding: 12px 10px 10px; border-radius: 16px; background: #fff; border: 1px dashed #bcd6c5; }
#homeLoanOverview .loan-next { margin-top: 12px; padding: 11px 13px; border-radius: 14px; background: #fff8e6; border: 1px solid #f0dca3; color: #5c4306; font-size: .82rem; line-height: 1.4; }
#homeLoanOverview .loan-next-warn { background: #fdecea; border-color: #f3b9b2; color: #8a1a10; }
#homeLoanOverview .loan-summary { gap: 9px; margin-top: 14px; }
#homeLoanOverview .loan-summary-item { --a: #1f6b4a; position: relative; overflow: hidden; padding: 11px 12px 11px 15px; border-radius: 15px; background: #fff; border: 1px solid #e0ece5; box-shadow: 0 6px 12px -10px rgba(20,67,47,.6); }
#homeLoanOverview .loan-summary-item::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--a); }
#homeLoanOverview .loan-summary-item:nth-child(4n+2) { --a: #e0b04a; }
#homeLoanOverview .loan-summary-item:nth-child(4n+3) { --a: #1f6fb5; }
#homeLoanOverview .loan-summary-item:nth-child(4n+4) { --a: #6b4bb8; }
#homeLoanOverview .loan-summary-label { font-size: .68rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: var(--text-muted); }
#homeLoanOverview .loan-summary-value { margin-top: 1px; font-size: 1rem; font-weight: 850; color: var(--text-main); }

/* Help Centre: leave room under the sticky top bar when a tap scrolls to it */
#helpCentreCard { scroll-margin-top: 62px; }
