/* fdf-ui.css - Frenzon member portal: the FDF page.
   Uses the tokens in theme.css. No inline styles are used (CSP: style-src 'self'). */
.fdf-card { overflow: hidden; }
.fdf-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.fdf-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }

/* Hero: the member's shares are the one big thing on the page */
.fdf-hero { position: relative; overflow: hidden; margin-bottom: 14px; padding: 20px 18px 18px; border-radius: var(--radius-xl, 26px); color: #fff;
  background: radial-gradient(120% 90% at 100% 0%, rgba(224, 176, 74, .28), transparent 55%), linear-gradient(155deg, var(--primary-500, #1f6b4a), var(--primary-900, #082218)); box-shadow: var(--shadow-lg); }
.fdf-hero.is-frozen { background: radial-gradient(120% 90% at 100% 0%, rgba(154, 90, 6, .45), transparent 55%), linear-gradient(155deg, #4a5a52, #1c2823); }
.fdf-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.fdf-hero-who { font-weight: 700; font-size: .95rem; }
.fdf-hero-who small { display: block; margin-top: 2px; font-weight: 400; font-size: .78rem; opacity: .75; }
.fdf-pill { padding: 4px 12px; border-radius: var(--radius-full); font-size: .76rem; font-weight: 700; background: rgba(255, 255, 255, .16); }
.fdf-pill.is-ok { background: rgba(224, 176, 74, .95); color: #3b2a05; }
.fdf-pill.is-warn { background: #fff4dc; color: #7a4803; }
.fdf-hero-main { display: flex; align-items: baseline; gap: 8px; margin-top: 18px; }
.fdf-hero-num { font-size: clamp(2.6rem, 11vw, 3.6rem); font-weight: 800; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.fdf-hero-unit { font-size: 1.05rem; opacity: .8; }
.fdf-hero-sub { margin-top: 6px; font-size: .9rem; opacity: .85; }
.fdf-hero-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.fdf-hero-grid > div { padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, .1); min-width: 0; }
.fdf-hero-grid span { display: block; font-size: .72rem; opacity: .75; }
.fdf-hero-grid b { display: block; margin-top: 2px; font-size: .92rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.fdf-bar { height: 6px; margin-top: 14px; border-radius: var(--radius-full); background: rgba(255, 255, 255, .18); overflow: hidden; }
.fdf-bar i { display: block; height: 100%; min-width: 4px; border-radius: inherit; background: var(--accent, #e0b04a); }

/* Pay panel and month chips */
.fdf-lead { margin: 0 0 12px; font-size: .95rem; line-height: 1.45; }
.fdf-pick-h { margin: 4px 0 8px; font-size: .84rem; font-weight: 600; color: var(--text-muted); }
.fdf-months { display: grid; gap: 6px; max-height: 340px; overflow-y: auto; padding: 2px; }
.fdf-mrow { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 8px 12px; cursor: pointer; border-radius: 14px; border: 1.5px solid var(--border-color); background: var(--surface, #fff); }
.fdf-mrow.is-ahead { border-style: dashed; background: var(--bg-subtle); }
.fdf-mrow.is-late { border-color: #d98a0b; background: var(--warning-light, #fff4dc); }
.fdf-mrow.on { border-color: var(--primary-500); background: var(--primary-light, #dcf0e5); border-style: solid; }
.fdf-mcb { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fdf-mbox { flex: none; width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--border-dark, #b9c7c0); background: var(--surface, #fff); display: grid; place-items: center; }
.fdf-mbox::after { content: ""; width: 10px; height: 6px; border-left: 3px solid #fff; border-bottom: 3px solid #fff; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.fdf-mcb:checked + .fdf-mbox { background: var(--primary-500); border-color: var(--primary-500); }
.fdf-mcb:checked + .fdf-mbox::after { opacity: 1; }
.fdf-mcb:focus-visible + .fdf-mbox { outline: 3px solid rgba(31, 107, 74, .4); outline-offset: 2px; }
.fdf-mname { flex: 1; display: grid; gap: 1px; min-width: 0; }
.fdf-mname b { font-size: .92rem; }
.fdf-mname small { font-size: .74rem; color: var(--text-muted); }
.fdf-mrow.is-late .fdf-mname small { color: var(--warning, #9a5a06); font-weight: 700; }
.fdf-mamt { font-weight: 800; font-size: .88rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fdf-selsum { margin: 8px 0 4px; font-size: .88rem; color: var(--text-muted); }
.fdf-wait { margin: 6px 0 10px; padding: 9px 12px; border-radius: 12px; background: var(--info-light, #e6f0fb); color: #174a85; font-size: .86rem; }
.fdf-cta { width: 100%; margin-top: 10px; min-height: 48px; }
@media (min-width: 700px) { .fdf-cta { width: auto; min-width: 180px; } }

.fdf-points { margin: 6px 0 14px; padding-left: 18px; display: grid; gap: 6px; font-size: .92rem; line-height: 1.45; }
.fdf-accept { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 14px; font-size: .92rem; line-height: 1.4; }
.fdf-accept input { margin-top: 3px; }
.fdf-fee { padding: 12px 14px; border-radius: 14px; background: var(--bg-subtle); font-size: .95rem; }

.fdf-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
@media (min-width: 700px) { .fdf-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fdf-tile { padding: 12px 14px; border-radius: 16px; background: var(--bg-subtle); border: 1px solid var(--border-color); min-width: 0; }
.fdf-tile-l { font-size: .78rem; font-weight: 600; color: var(--text-muted); }
.fdf-tile-v { margin-top: 4px; font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.fdf-tile-s { margin-top: 2px; font-size: .74rem; color: var(--text-muted); overflow-wrap: anywhere; }

.fdf-paid-rows { display: grid; gap: 0; }
.fdf-paid-rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; font-size: .92rem; border-bottom: 1px solid var(--border-color); }
.fdf-paid-rows > div:last-child { border-bottom: 0; }
.fdf-paid-rows > .is-total { font-weight: 800; }
.fdf-paid-rows b { font-variant-numeric: tabular-nums; }

.fdf-sched { display: grid; gap: 8px; margin: 10px 0 14px; }
.fdf-sched-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border-color); font-size: .88rem; }
.fdf-inst { display: grid; gap: 8px; margin: 10px 0 14px; max-width: 360px; }
.fdf-form { margin-top: 14px; }
.fdf-form-btns { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 12px; }


/* width steps for bars (no inline styles) */
.fdf-w0 { width: 0%; }
.fdf-w5 { width: 5%; }
.fdf-w10 { width: 10%; }
.fdf-w15 { width: 15%; }
.fdf-w20 { width: 20%; }
.fdf-w25 { width: 25%; }
.fdf-w30 { width: 30%; }
.fdf-w35 { width: 35%; }
.fdf-w40 { width: 40%; }
.fdf-w45 { width: 45%; }
.fdf-w50 { width: 50%; }
.fdf-w55 { width: 55%; }
.fdf-w60 { width: 60%; }
.fdf-w65 { width: 65%; }
.fdf-w70 { width: 70%; }
.fdf-w75 { width: 75%; }
.fdf-w80 { width: 80%; }
.fdf-w85 { width: 85%; }
.fdf-w90 { width: 90%; }
.fdf-w95 { width: 95%; }
.fdf-w100 { width: 100%; }

/* FDF projects (fdf-projects.js) */
.fdfp-list { display: grid; gap: 12px; margin-top: 14px; }
.fdfp-item { padding: 14px; border-radius: var(--radius-lg, 18px); border: 1px solid var(--border-color); background: var(--surface, #fff); display: grid; gap: 10px; min-width: 0; }
.fdfp-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.fdfp-title { font-weight: 700; font-size: .98rem; line-height: 1.3; overflow-wrap: anywhere; min-width: 0; }
.fdfp-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fdfp-facts > div { padding: 9px 11px; border-radius: 12px; background: var(--bg-subtle, #f4f7f5); min-width: 0; }
.fdfp-facts span { display: block; font-size: .72rem; color: var(--text-muted); }
.fdfp-facts b { display: block; margin-top: 2px; font-size: .92rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.fdfp-desc { font-size: .9rem; line-height: 1.5; white-space: pre-wrap; }
.fdfp-wrap { overflow-wrap: anywhere; }
.fdfp-textarea { min-height: 120px; }
