/* ==========================================================================
   FinMinion.UI components: page header (PageHeader) and empty state (EmptyState).
   Uses only the tokens from nv-tokens.css.
   ========================================================================== */

/* ---------- page header ---------- */
.fm-ph {
    display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px;
    margin: 20px var(--nv-page-gutter) 10px; padding: 0;
    background: transparent; border: 0; box-shadow: none; color: var(--nv-ink);
}
.fm-ph__lead { display: flex; align-items: center; gap: 14px; min-width: 0; }
.fm-ph__main { min-width: 0; }
.fm-ph__icon {
    position: relative; flex: none; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 15px;
    font-size: 25px; color: var(--nv-primary);
    background: linear-gradient(140deg, var(--nv-primary-soft), color-mix(in srgb, var(--nv-gold) 22%, var(--nv-surface)));
    border: 1px solid color-mix(in srgb, var(--nv-primary) 14%, transparent);
    box-shadow: var(--nv-hi), var(--nv-shadow-1);
}
.fm-ph__icon::after {   /* soft halo, pulses once on entry */
    content: ""; position: absolute; inset: -5px; border-radius: 19px; pointer-events: none;
    border: 2px solid color-mix(in srgb, var(--nv-gold) 45%, transparent); opacity: 0;
}
.fm-ph__crumb { font: 500 12.5px var(--nv-font-ui); color: var(--nv-muted); margin-bottom: 4px; }
.fm-ph__crumb a { color: var(--nv-muted); text-decoration: none; transition: color var(--nv-d-fast); }
.fm-ph__crumb a:hover { color: var(--nv-primary); }
.fm-ph__crumb b { font-weight: 600; color: var(--nv-ink); }
.fm-ph__title {
    position: relative; display: inline-block; margin: 0; padding-bottom: 12px;   /* room for the accent bar (a template rule zeroes h1 margins) */
    font: 800 27px/1.15 var(--nv-font-display); letter-spacing: -.015em; color: var(--nv-ink);
}
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
    .fm-ph__title {
        background: linear-gradient(100deg, var(--nv-ink) 0%, var(--nv-ink) 45%, var(--nv-primary) 100%);
        -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
    }
}
.fm-ph__title::after {   /* accent bar under the title: primary to gold, with a light sweep */
    content: ""; position: absolute; left: 0; bottom: 2px; width: 56px; height: 4px; border-radius: 4px;
    background: linear-gradient(90deg, var(--nv-primary), var(--nv-gold) 55%, var(--nv-primary) 100%);
    background-size: 220% 100%; background-position: 0 0;
}
.fm-ph__sub { margin: 2px 0 0; font-size: 14px; color: var(--nv-muted); max-width: 70ch; }
.fm-ph__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.fm-ph__actions .rz-dropdown, .fm-ph__actions .rz-datepicker, .fm-ph__actions .rz-autocomplete { min-height: 38px; }
@media (max-width: 700px) {
    .fm-ph { margin-top: 14px; }
    .fm-ph__icon { width: 42px; height: 42px; font-size: 21px; border-radius: 13px; }
    .fm-ph__title { font-size: 22px; }
    .fm-ph__actions { width: 100%; }
    .fm-ph__actions > * { flex: 1 1 140px; }
}

/* entrance: each part arrives in turn; nothing moves for people who ask for reduced motion */
@media (prefers-reduced-motion: no-preference) {
    .fm-ph__crumb { animation: fmPhFade 420ms var(--nv-ease) both; }
    .fm-ph__icon { animation: fmPhPop 640ms cubic-bezier(.34, 1.56, .64, 1) 60ms both; }
    .fm-ph__icon::after { animation: fmPhHalo 1200ms ease-out 420ms 1; }
    .fm-ph__icon i { display: inline-block; transition: transform 320ms cubic-bezier(.34, 1.56, .64, 1); }
    .fm-ph__icon:hover i { transform: rotate(-8deg) scale(1.08); }
    .fm-ph__title { animation: fmPhRise 620ms var(--nv-ease) 90ms both; }
    .fm-ph__title::after { animation: fmPhBar 700ms var(--nv-ease) 380ms both, fmPhShine 1800ms ease-in-out 1150ms 1; }
    .fm-ph__sub { animation: fmPhFade 520ms var(--nv-ease) 200ms both; }
    .fm-ph__actions { animation: fmPhSlide 520ms var(--nv-ease) 160ms both; }
}
@keyframes fmPhFade { from { opacity: 0; } }
@keyframes fmPhRise { from { opacity: 0; transform: translateY(.45em); filter: blur(6px); } }
@keyframes fmPhPop { from { opacity: 0; transform: scale(.55) rotate(-12deg); } }
@keyframes fmPhHalo { 0% { opacity: .9; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.25); } }
@keyframes fmPhBar { from { width: 0; opacity: 0; } }
@keyframes fmPhShine { from { background-position: 0 0; } to { background-position: 100% 0; } }
@keyframes fmPhSlide { from { opacity: 0; transform: translateX(14px); } }

/* ---------- empty state ---------- */
.fm-empty { display: grid; justify-items: center; gap: .25rem; padding: 3rem 1rem; text-align: center; color: var(--nv-muted); }
.fm-empty strong { color: var(--nv-ink); font-weight: 700; }
.fm-empty__icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: .5rem; border-radius: 16px; font-size: 1.6rem; color: var(--nv-primary); background: var(--nv-primary-soft); }
