/*
 * Giving Overview (templates/donation/index.html.twig), "gv-". Builds on the shell tokens and
 * "ui-" blocks in shell.css.
 */
.gv-svg { flex: none; display: block; }

/* ---- Header ------------------------------------------------------------------------------ */
.gv-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.gv-heading { display: flex; align-items: center; gap: 16px; min-width: 0; }
.gv-heading-icon { height: 54px; width: 54px; flex: none; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #3b86e8, #2563c7); box-shadow: 0 6px 16px rgba(37, 99, 199, .28); }
.gv-heading h1 { font-size: 26px; font-weight: 700; margin: 0; letter-spacing: -.5px; }
.gv-heading p { margin: 3px 0 0; color: var(--sh-muted); font-size: 14px; }
.gv-header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gv-period { display: flex; align-items: center; gap: 8px; border: 1px solid #b9cdec; border-radius: 9px; background: #fff; padding: 0 10px; color: #3d5a80; }
.gv-period select { border: 0; background: transparent; padding: 9px 2px; font-size: 13px; font-weight: 500; color: var(--sh-text); cursor: pointer; }
.gv-period select:focus { outline: none; }
.gv-period:focus-within { outline: 2px solid #8fb4ee; outline-offset: 1px; }
.gv-btn { padding: 9px 15px; }

/* ---- KPI cards --------------------------------------------------------------------------- */
.gv-kpis { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1.1fr; gap: 16px; margin-bottom: 18px; }
.gv-kpi { position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 14px; min-height: 112px; padding: 18px 18px 26px; border-radius: 12px; color: #fff; text-decoration: none; box-shadow: 0 8px 20px rgba(20, 35, 55, .12); transition: transform .15s, box-shadow .15s; }
.gv-kpi:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 12px 26px rgba(20, 35, 55, .18); }
.gv-kpi:focus-visible { outline: 3px solid #8fb4ee; outline-offset: 2px; }
.gv-kpi.blue { background: linear-gradient(120deg, #173f86, #2365c4); }
.gv-kpi.green { background: linear-gradient(120deg, #0d6a43, #18925f); }
.gv-kpi.purple { background: linear-gradient(120deg, #5a3fc4, #7f63e6); }
.gv-kpi.orange { background: linear-gradient(120deg, #b54a0c, #dc6f1b); }
.gv-kpi-icon { height: 44px; width: 44px; border-radius: 11px; display: grid; place-items: center; background: rgba(255, 255, 255, .18); }
.gv-kpi-body { min-width: 0; position: relative; z-index: 1; }
.gv-kpi-label { font-size: 14px; font-weight: 600; opacity: .95; }
.gv-kpi strong { display: block; font-size: 30px; font-weight: 700; letter-spacing: -.6px; margin-top: 4px; line-height: 1.15; white-space: nowrap; }
.gv-kpi-side { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; max-width: 130px; padding-top: 2px; }
.gv-kpi-side small { font-size: 11.5px; line-height: 1.35; opacity: .92; }
.gv-kpi-badge { display: inline-block; padding: 3px 8px; border-radius: 6px; background: rgba(0, 0, 0, .2); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.gv-kpi-wave { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 34px; pointer-events: none; }
.gv-kpi-wave path { fill: rgba(255, 255, 255, .1); }

/* ---- Panels ------------------------------------------------------------------------------ */
.gv-row { display: grid; gap: 18px; margin-bottom: 18px; }
.gv-row-charts { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.gv-row-lower { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, .9fr); }
.gv-panel { padding: 20px 22px; min-width: 0; }
.gv-panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.gv-panel-head h2 { font-size: 16px; font-weight: 700; margin: 0; }
.gv-panel-head p { font-size: 13px; color: var(--sh-muted); margin: 2px 0 0; }
.gv-panel-icon { color: var(--sh-blue); }
.gv-view-all { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }

.gv-segmented { margin-left: auto; display: inline-flex; background: #f0f3f7; border-radius: 9px; padding: 3px; }
.gv-segmented button { border: 0; background: transparent; color: #44505e; padding: 7px 14px; border-radius: 7px; font-size: 13px; font-weight: 500; cursor: pointer; }
.gv-segmented button:hover { color: var(--sh-text); }
.gv-segmented button.active { background: var(--sh-blue); color: #fff; box-shadow: 0 2px 6px rgba(57, 119, 213, .3); }
.gv-segmented button:focus-visible { outline: 2px solid #8fb4ee; outline-offset: 1px; }
.gv-trend-chart { position: relative; height: 290px; }

.gv-funds { display: flex; align-items: center; gap: 20px; }
.gv-donut { position: relative; flex: none; width: 210px; height: 210px; }
.gv-fund-table { flex: 1; min-width: 0; border-collapse: collapse; font-size: 13.5px; }
.gv-fund-table td { padding: 10px 4px; border-bottom: 1px solid #edf0f4; }
.gv-fund-table tr:last-child td { border-bottom: 0; }
.gv-fund-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.gv-share { color: var(--sh-muted); width: 56px; }
.gv-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 10px; vertical-align: -1px; }

.gv-recent td { padding: 9px 10px; }
.gv-amount { color: var(--sh-green); font-weight: 700; }

.gv-summary { margin: 0; display: grid; gap: 8px; }
.gv-summary > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 9px; background: #f6f8fb; }
.gv-summary dt { display: flex; align-items: center; gap: 12px; font-weight: 500; font-size: 14px; color: var(--sh-text); }
.gv-summary dt .gv-svg { color: var(--sh-blue); }
.gv-summary dt small { display: block; font-size: 11px; font-weight: 400; color: var(--sh-muted); }
.gv-summary dd { margin: 0; font-size: 16px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }

.gv-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gv-action { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 82px; padding: 12px; border-radius: 10px; text-align: center; text-decoration: none; font-size: 13.5px; font-weight: 600; transition: transform .15s, filter .15s; }
.gv-action:hover { transform: translateY(-1px); filter: brightness(.97); }
.gv-action:focus-visible { outline: 2px solid #8fb4ee; outline-offset: 2px; }
.gv-action.blue { background: #e6f0fd; color: #1f5fbf; }
.gv-action.green { background: #e3f5ec; color: #11744b; }
.gv-action.purple { background: #efe9fc; color: #6440bf; }
.gv-action.orange { background: #fdf0e1; color: #a5520f; }

@media (max-width: 1280px) {
    .gv-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gv-row-lower { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .gv-row-lower > :last-child { grid-column: 1 / -1; }
    .gv-row-lower > :last-child .gv-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
    .gv-row-charts { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .gv-kpis, .gv-row-lower { grid-template-columns: 1fr; }
    .gv-row-lower > :last-child .gv-actions { grid-template-columns: 1fr 1fr; }
    .gv-heading h1 { font-size: 22px; }
    .gv-heading-icon { height: 44px; width: 44px; }
    .gv-kpi strong { font-size: 26px; }
    .gv-funds { flex-direction: column; align-items: stretch; }
    .gv-donut { align-self: center; }
    .gv-panel-head { flex-wrap: wrap; }
    .gv-segmented { margin-left: 0; }
    .gv-panel { padding: 16px; }
}
