/* Filing Insights report list. Builds on the tokens in fmp_dashboard.css. */

/* Brand */
.fir-brand { display: flex; align-items: center; gap: .7rem; color: #fff; }
.fir-brand:hover { color: #fff; }
.fir-mark { width: 34px; height: 34px; flex-shrink: 0; }
.fir-mark rect { fill: #3b82f6; }
.fir-mark rect:nth-child(2) { fill: #60a5fa; }
.fir-mark rect:nth-child(3) { fill: #93c5fd; }
.fir-mark path { stroke: #fbbf24; }
.fir-title { display: block; font-size: 1.45rem; font-weight: 700; letter-spacing: .01em; line-height: 1.1; }
.fir-subtitle { display: block; font-size: .8rem; color: #94a3b8; }

/* Toolbar */
.fir-toolbar { background: #fff; border-bottom: 1px solid var(--fhd-border); z-index: 1020; }
.fir-search { min-width: 220px; max-width: 420px; }
.fir-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--fhd-muted); }
.fir-toolbar .btn-group .btn.active { background: #334155; border-color: #334155; color: #fff; }
.fir-toolbar .form-select-sm { width: auto; }

/* Summary strip */
.fir-summary { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; background: #fff;
               border: 1px solid var(--fhd-border); border-radius: .6rem; padding: .75rem 1rem; }
.fir-stat-value { font-size: 1.3rem; font-weight: 700; line-height: 1.1; }
.fir-stat-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--fhd-muted); }
.fir-dist { display: flex; height: 10px; border-radius: 5px; overflow: hidden; min-width: 180px; background: #e2e8f0; }
.fir-dist span { display: block; height: 100%; }
.fir-dist-legend { font-size: .72rem; color: var(--fhd-muted); }
.fir-dist-legend b { font-weight: 600; color: #334155; }
.fir-grade-chip { cursor: pointer; user-select: none; font-size: .74rem; padding: .3em .55em; }
.fir-grade-chip.off { opacity: .35; }

/* Groups */
.fir-group { margin-bottom: 1.75rem; scroll-margin-top: 4rem; }
.fir-group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem; margin-bottom: .6rem;
                  border-bottom: 1px solid var(--fhd-border); padding-bottom: .4rem; }
.fir-group-title { font-size: 1.05rem; font-weight: 700; color: #0f172a; margin: 0; }
.fir-group-count { font-size: .8rem; color: var(--fhd-muted); }
.fir-group-desc { font-size: .82rem; color: var(--fhd-muted); flex-basis: 100%; margin: 0; }

/* Report cards */
.fir-card { display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--fhd-border);
            border-radius: .6rem; padding: .85rem .95rem; color: inherit; text-decoration: none;
            transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease; }
a.fir-card:hover, a.fir-card:focus-visible { border-color: #93c5fd; box-shadow: 0 4px 14px rgba(15, 23, 42, .08);
                                            transform: translateY(-1px); color: inherit; }
a.fir-card:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.fir-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; }
.fir-ticker { font-size: 1.15rem; font-weight: 800; letter-spacing: .02em; color: #0f172a; line-height: 1.1; }
.fir-name { font-size: .88rem; font-weight: 600; color: #1e293b; margin-top: .1rem; }
.fir-industry { font-size: .75rem; color: var(--fhd-muted); }
.fir-grade { display: flex; align-items: baseline; gap: .25rem; border-radius: .4rem; padding: .15rem .45rem; color: #fff; flex-shrink: 0; }
.fir-grade b { font-size: 1.05rem; font-weight: 800; }
.fir-grade span { font-size: .78rem; font-weight: 600; opacity: .95; }

.fir-health { margin-top: .7rem; }
.fir-health-row { display: flex; justify-content: space-between; font-size: .72rem; color: var(--fhd-muted); margin-bottom: .2rem; }
.fir-health-row b { color: #0f172a; font-size: .8rem; }
.fir-bar { height: 6px; background: #e2e8f0; border-radius: 3px; overflow: hidden; }
.fir-bar > span { display: block; height: 100%; border-radius: 3px; }

.fir-cats-label { font-size: .66rem; text-transform: uppercase; letter-spacing: .05em; color: #94a3b8; margin-top: .55rem; }
.fir-cats { display: flex; align-items: flex-end; gap: 3px; height: 26px; margin-top: .15rem; }
.fir-cats span { flex: 1; border-radius: 2px 2px 0 0; min-height: 3px; }

.fir-meta { display: flex; flex-wrap: wrap; gap: .25rem .75rem; font-size: .75rem; color: var(--fhd-muted); margin-top: .6rem; }
.fir-quadrant { font-size: .76rem; color: #334155; margin-top: .45rem; }
.fir-flags-high { color: var(--fhd-concern); font-weight: 600; }
.fir-foot { margin-top: auto; padding-top: .55rem; display: flex; justify-content: space-between; align-items: center;
            font-size: .72rem; color: var(--fhd-muted); }
.fir-open { font-weight: 600; color: #2563eb; }

.fir-card.pending { background: #f8fafc; border-style: dashed; }
.fir-card.pending .fir-ticker, .fir-card.pending .fir-name { color: #64748b; }
.fir-pending-note { margin-top: .7rem; font-size: .78rem; color: var(--fhd-muted); }

/* List view */
.fir-table { font-size: .84rem; background: #fff; }
.fir-table td, .fir-table th { vertical-align: middle; }
.fir-table tr.pending td { color: #94a3b8; }
.fir-table .fir-bar { width: 80px; display: inline-block; vertical-align: middle; margin-left: .4rem; }
.fir-table tbody tr[data-href] { cursor: pointer; }

.fir-empty { text-align: center; color: var(--fhd-muted); padding: 3rem 1rem; background: #fff;
             border: 1px dashed var(--fhd-border); border-radius: .6rem; }

@media (max-width: 575.98px) {
  .fir-title { font-size: 1.2rem; }
  .fir-search { max-width: none; flex-basis: 100%; }
}

/* Pending companies, compact */
.fir-pending-line { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; padding: .5rem .75rem;
                    background: #f8fafc; border: 1px dashed var(--fhd-border); border-radius: .5rem; }
.fir-pending-chip { font-size: .76rem; font-weight: 600; color: #64748b; background: #fff; border: 1px solid var(--fhd-border);
                    border-radius: 1rem; padding: .1rem .55rem; cursor: default; }

/* Financial period on cards and in the list */
.fir-period { font-size: .72rem; color: var(--fhd-muted); margin-top: .2rem; }
.fir-period-tag { display: inline-block; font-weight: 600; color: #334155; background: #eef2f7; border-radius: .25rem; padding: 0 .35rem; }
.fir-stale { display: inline-block; font-weight: 600; color: #92400e; background: #fef3c7; border-radius: .25rem; padding: 0 .35rem; cursor: help; }
