/* ════════════════════════════════════════════════════════════════
   FP Presentation & Executive Reports — premium design system
   Inspired by Fairmas / Oracle EPM / SAP Analytics Cloud for hospitality
   ════════════════════════════════════════════════════════════════ */

.fpr-shell {
    /* Palette — financial professional */
    --fpr-good: #16a34a;
    --fpr-good-bg: #ecfdf5;
    --fpr-good-soft: #d1fae5;
    --fpr-bad: #dc2626;
    --fpr-bad-bg: #fef2f2;
    --fpr-bad-soft: #fee2e2;
    --fpr-warn: #d97706;
    --fpr-warn-bg: #fffbeb;
    --fpr-warn-soft: #fef3c7;
    --fpr-info: #1d4ed8;
    --fpr-info-bg: #eff6ff;
    --fpr-info-soft: #dbeafe;
    --fpr-accent: #7c3aed;
    --fpr-accent-bg: #f5f3ff;
    --fpr-teal: #0d9488;
    --fpr-teal-bg: #ccfbf1;
    --fpr-gold: #ca8a04;
    --fpr-gold-bg: #fef9c3;
    --fpr-ink: #0b1220;
    --fpr-ink-soft: #1f2937;
    --fpr-dim: #64748b;
    --fpr-line: #e5e7eb;
    --fpr-line-soft: #f1f5f9;
    --fpr-bg: #f6f8fb;
    --fpr-surface: #ffffff;
    --fpr-shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .06);
    --fpr-shadow-md: 0 2px 4px rgba(15, 23, 42, .04), 0 4px 12px rgba(15, 23, 42, .06);
    --fpr-shadow-lg: 0 8px 24px -12px rgba(15, 23, 42, .18);
    --fpr-radius: 12px;
    --fpr-radius-sm: 8px;

    display: flex;
    flex-direction: column;
    gap: 0.95rem;
    padding: 0.35rem 0.25rem 1.5rem;
    color: var(--fpr-ink);
    font-feature-settings: "ss01", "cv11", "tnum";
}

/* ─── Hero toolbar (clean white premium header) ─── */
.fpr-toolbar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    background: var(--fpr-surface);
    color: var(--fpr-ink);
    border: 1px solid var(--fpr-line);
    border-radius: var(--fpr-radius);
    padding: 0.95rem 1.2rem;
    box-shadow: var(--fpr-shadow-sm);
    overflow: hidden;
}
.fpr-toolbar::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
    background: linear-gradient(180deg, #2563eb 0%, #7c3aed 50%, #0d9488 100%);
}
.fpr-toolbar > * { position: relative; z-index: 1; }

.fpr-title { display: flex; align-items: center; gap: 0.85rem; min-width: 0; padding-left: 0.35rem; }
.fpr-title .ic {
    width: 44px; height: 44px; border-radius: 11px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #38bdf8, #2563eb 55%, #7c3aed);
    color: #fff; font-size: 1.15rem;
    box-shadow: 0 6px 14px -6px rgba(37, 99, 235, .35), inset 0 1px 0 rgba(255,255,255,.25);
}
.fpr-title h2 {
    margin: 0; font-size: 1.22rem; font-weight: 800; line-height: 1.15;
    color: var(--fpr-ink); letter-spacing: -0.015em;
}
.fpr-title p {
    margin: 0.1rem 0 0; font-size: 0.78rem; color: var(--fpr-dim); font-weight: 600;
    letter-spacing: 0.005em;
}
.fpr-toolbar-end { display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; }

.fpr-seg {
    display: inline-flex; background: var(--fpr-bg);
    border: 1px solid var(--fpr-line); border-radius: 9px; padding: 3px;
}
.fpr-seg button {
    border: 0; background: transparent; color: var(--fpr-dim);
    font-size: 0.73rem; font-weight: 700; padding: 0.36rem 0.78rem; border-radius: 6px; cursor: pointer;
    transition: all .15s ease;
}
.fpr-seg button:hover { color: var(--fpr-ink); }
.fpr-seg button.on {
    background: var(--fpr-surface);
    color: var(--fpr-info);
    box-shadow: 0 1px 2px rgba(15,23,42,.08), inset 0 0 0 1px rgba(37,99,235,.18);
}

.fpr-chip {
    display: inline-flex; align-items: center; gap: 0.4rem;
    background: var(--fpr-bg); border: 1px solid var(--fpr-line);
    border-radius: 999px; padding: 0.34rem 0.78rem; font-size: 0.72rem; font-weight: 700;
    color: var(--fpr-ink-soft);
}
.fpr-chip i { color: var(--fpr-info); }

.fpr-btn {
    display: inline-flex; align-items: center; gap: 0.45rem; cursor: pointer;
    border: 1px solid var(--fpr-line); background: var(--fpr-surface); color: var(--fpr-ink);
    border-radius: 9px; padding: 0.45rem 0.85rem; font-size: 0.75rem; font-weight: 700;
    transition: all .15s ease;
    box-shadow: var(--fpr-shadow-sm);
}
.fpr-btn:hover { border-color: #93c5fd; background: var(--fpr-info-bg); color: var(--fpr-info); transform: translateY(-1px); }
.fpr-btn:active { transform: translateY(0); }
.fpr-btn.primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-color: #1d4ed8;
    color: #fff;
    box-shadow: 0 4px 12px -4px rgba(37, 99, 235, .45);
}
.fpr-btn.primary:hover { background: linear-gradient(135deg, #1d4ed8, #1e40af); color: #fff; border-color: #1e40af; }

/* ─── Filter bar (light) ─── */
.fpr-filterbar {
    display: grid;
    grid-template-columns: minmax(190px, 1.25fr) minmax(170px, 1fr) minmax(170px, 1fr)
        minmax(170px, 1fr) 88px 88px 100px auto;
    gap: 0.55rem;
    align-items: end;
    background: var(--fpr-surface);
    border: 1px solid var(--fpr-line);
    border-radius: var(--fpr-radius);
    padding: 0.75rem 0.85rem;
    box-shadow: var(--fpr-shadow-sm);
}
.fpr-filter,
.fpr-filter-period {
    display: flex; flex-direction: column; gap: 0.24rem; min-width: 0;
}
.fpr-filter > span,
.fpr-filter-period > span {
    color: var(--fpr-dim);
    font-size: 0.62rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: .06em;
}
.fpr-filter select {
    width: 100%; min-width: 0; height: 36px;
    border: 1px solid #d1d5db; border-radius: 8px;
    background: #fff;
    color: var(--fpr-ink);
    padding: 0 1.8rem 0 0.6rem;
    font-size: 0.78rem; font-weight: 650;
    transition: all .12s ease;
}
.fpr-filter select:hover { border-color: #9ca3af; }
.fpr-filter select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
    outline: 0;
}
@media (max-width: 1450px) { .fpr-filterbar { grid-template-columns: repeat(4, minmax(150px, 1fr)); } }
@media (max-width: 760px) {
    .fpr-filterbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fpr-filter-period { grid-column: 1 / -1; }
}

.fpr-context {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.6rem;
    background: var(--fpr-surface);
    border: 1px solid var(--fpr-line);
    border-radius: var(--fpr-radius);
    padding: 0.65rem 0.8rem;
    box-shadow: var(--fpr-shadow-sm);
}
.fpr-context-item { display: flex; flex-direction: column; min-width: 0; gap: 0.1rem; }
.fpr-context-item b {
    font-size: 0.6rem; text-transform: uppercase; letter-spacing: .06em; color: var(--fpr-dim);
}
.fpr-context-item span {
    font-size: 0.8rem; font-weight: 750; color: var(--fpr-ink);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ─── KPI strips (legacy + executive) ─── */
.fpr-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(195px, 1fr)); gap: 0.75rem; }
.fpr-kpi {
    position: relative;
    background: var(--fpr-surface);
    border: 1px solid var(--fpr-line);
    border-radius: var(--fpr-radius);
    padding: 0.95rem 1rem 0.85rem;
    display: flex; flex-direction: column; gap: 0.3rem;
    box-shadow: var(--fpr-shadow-sm);
    overflow: hidden;
    transition: box-shadow .15s ease, transform .15s ease;
}
.fpr-kpi::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
    background: linear-gradient(180deg, var(--fpr-info), #60a5fa);
}
.fpr-kpi:hover { box-shadow: var(--fpr-shadow-md); transform: translateY(-1px); }
.fpr-kpi.good::before { background: linear-gradient(180deg, var(--fpr-good), #4ade80); }
.fpr-kpi.bad::before  { background: linear-gradient(180deg, var(--fpr-bad), #f87171); }
.fpr-kpi.warn::before { background: linear-gradient(180deg, var(--fpr-warn), #fbbf24); }

.fpr-kpi-head { display: flex; align-items: center; justify-content: space-between; gap: 0.4rem; }
.fpr-kpi-label {
    font-size: 0.66rem; text-transform: uppercase; letter-spacing: .07em;
    font-weight: 800; color: var(--fpr-dim);
}
.fpr-kpi-ic {
    width: 28px; height: 28px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem;
    background: var(--fpr-info-bg); color: var(--fpr-info);
}
.fpr-kpi-val {
    display: block;
    font-size: 1.7rem; font-weight: 800; line-height: 1.05; letter-spacing: -0.025em;
    color: var(--fpr-ink);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.fpr-kpi-sub {
    display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap;
    font-size: 0.72rem; color: var(--fpr-dim); font-weight: 600;
}
.fpr-delta {
    font-weight: 800; padding: 0.1rem 0.45rem; border-radius: 999px; font-size: 0.7rem;
    display: inline-flex; align-items: center; gap: 0.25rem;
}
.fpr-delta.good { color: var(--fpr-good); background: var(--fpr-good-soft); }
.fpr-delta.bad  { color: var(--fpr-bad);  background: var(--fpr-bad-soft); }
.fpr-delta.warn { color: var(--fpr-warn); background: var(--fpr-warn-soft); }
.fpr-delta.info { color: var(--fpr-info); background: var(--fpr-info-soft); }
.fpr-delta.good::before { content: "▲"; font-size: 0.6rem; }
.fpr-delta.bad::before  { content: "▼"; font-size: 0.6rem; }
.fpr-delta.warn::before { content: "◆"; font-size: 0.55rem; }
.fpr-delta.info::before { content: "•"; }

/* ─── Note banner ─── */
.fpr-data-note {
    display: flex; align-items: center; gap: 0.55rem;
    padding: 0.6rem 0.85rem;
    border: 1px solid #bfdbfe;
    border-left: 4px solid var(--fpr-info);
    border-radius: var(--fpr-radius-sm);
    background: var(--fpr-info-bg);
    color: #1e3a8a;
    font-size: 0.78rem; font-weight: 600;
    box-shadow: var(--fpr-shadow-sm);
}
.fpr-data-note i { color: var(--fpr-info); }

/* ─── Report health strip + section rhythm helpers ─── */
.fpr-report-health {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .7rem;
    flex-wrap: wrap;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    padding: .45rem .6rem;
    margin: .55rem 0 .15rem;
}

.fpr-report-health-main {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .72rem;
    color: #334155;
}

.fpr-report-health-main > i {
    color: #16a34a;
}

.fpr-report-health-label,
.fpr-report-health-count {
    color: #64748b;
}

.fpr-report-health-value {
    font-weight: 800;
}

.fpr-report-health-value.ok {
    color: #166534;
}

.fpr-report-health-value.warn {
    color: #b45309;
}

.fpr-report-health-link {
    font-size: .68rem;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid #fdba74;
    background: #fff7ed;
    color: #9a3412;
    border-radius: 7px;
    padding: .22rem .5rem;
    transition: all .15s ease;
}

.fpr-report-health-link:hover {
    background: #ffedd5;
    border-color: #fb923c;
    color: #7c2d12;
}

.fpr-stack {
    display: grid;
    gap: .75rem;
}

.fpr-section-gap-sm {
    margin-top: .75rem;
}

.fpr-row-gap-top {
    margin-top: .75rem;
}

/* ─── Executive KPIs (8-up) with colored top tabs ─── */
.fpr-exec-kpis {
    display: grid;
    grid-template-columns: repeat(8, minmax(150px, 1fr));
    gap: 0.65rem;
}
.fpr-exec-kpi {
    position: relative;
    min-width: 0;
    padding: 0.85rem 0.9rem 0.75rem;
    border: 1px solid var(--fpr-line);
    border-radius: var(--fpr-radius);
    background: var(--fpr-surface);
    box-shadow: var(--fpr-shadow-sm);
    transition: box-shadow .15s ease, transform .15s ease;
    overflow: hidden;
}
.fpr-exec-kpi:hover { box-shadow: var(--fpr-shadow-md); transform: translateY(-1px); }
.fpr-exec-kpi::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}
.fpr-exec-kpi:nth-child(1)::before { background: linear-gradient(90deg, #7c3aed, #a78bfa); }
.fpr-exec-kpi:nth-child(2)::before { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.fpr-exec-kpi:nth-child(3)::before { background: linear-gradient(90deg, #0d9488, #2dd4bf); }
.fpr-exec-kpi:nth-child(4)::before { background: linear-gradient(90deg, #ca8a04, #fbbf24); }
.fpr-exec-kpi:nth-child(5)::before { background: linear-gradient(90deg, #ea580c, #fb923c); }
.fpr-exec-kpi:nth-child(6)::before { background: linear-gradient(90deg, #db2777, #f472b6); }
.fpr-exec-kpi:nth-child(7)::before { background: linear-gradient(90deg, #16a34a, #4ade80); }
.fpr-exec-kpi:nth-child(8)::before { background: linear-gradient(90deg, #475569, #94a3b8); }
.fpr-exec-kpi.good::before { background: linear-gradient(90deg, #16a34a, #4ade80) !important; }
.fpr-exec-kpi.bad::before  { background: linear-gradient(90deg, #dc2626, #f87171) !important; }
.fpr-exec-kpi.info::before { background: linear-gradient(90deg, #2563eb, #60a5fa) !important; }

.fpr-exec-kpi-title {
    display: flex; align-items: center; justify-content: space-between; gap: 0.35rem;
    color: var(--fpr-dim);
    font-size: 0.66rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: .06em;
}
.fpr-exec-kpi-title i { color: #cbd5e1; font-size: 0.68rem; cursor: help; transition: color .15s; }
.fpr-exec-kpi-title i:hover { color: var(--fpr-info); }
.fpr-exec-kpi > strong {
    display: block; margin: 0.4rem 0 0.45rem;
    color: var(--fpr-ink);
    font-size: 1.4rem; font-weight: 800; line-height: 1;
    white-space: nowrap; letter-spacing: -0.025em;
    font-variant-numeric: tabular-nums;
}
.fpr-exec-kpi-lines { display: grid; gap: 0.18rem; color: var(--fpr-dim); font-size: 0.66rem; }
.fpr-exec-kpi-lines span { display: flex; justify-content: space-between; gap: 0.3rem; }
.fpr-exec-kpi-lines b { color: var(--fpr-ink-soft); font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fpr-exec-kpi-lines b.good { color: var(--fpr-good); }
.fpr-exec-kpi-lines b.bad  { color: var(--fpr-bad); }
.fpr-exec-kpi-lines b.info { color: var(--fpr-info); }
.fpr-spark-bars {
    display: flex; align-items: end; gap: 2px;
    height: 32px; margin-top: 0.55rem;
    border-bottom: 1px dashed var(--fpr-line);
    padding-bottom: 2px;
}
.fpr-spark-bars span {
    flex: 1; min-width: 2px; max-height: 100%;
    border-radius: 2px 2px 0 0;
    background: linear-gradient(180deg, #93c5fd, #3b82f6);
    transition: opacity .15s;
}
.fpr-exec-kpi.good .fpr-spark-bars span { background: linear-gradient(180deg, #6ee7b7, #16a34a); }
.fpr-exec-kpi.bad  .fpr-spark-bars span { background: linear-gradient(180deg, #fca5a5, #dc2626); }
.fpr-exec-kpi.info .fpr-spark-bars span { background: linear-gradient(180deg, #93c5fd, #2563eb); }

.fpr-exec-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, .95fr);
    gap: 0.8rem;
}
.fpr-exec-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 0.8rem;
    align-items: start;
}
.fpr-exec-table thead tr:first-child th { text-align: center; }
.fpr-exec-table thead tr:first-child th:first-child { text-align: left; }

/* ─── Insight / alerts ─── */
.fpr-alert-list { display: grid; gap: 0.55rem; }
.fpr-alert {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 0.65rem;
    align-items: start;
    padding: 0.7rem 0.75rem;
    border: 1px solid var(--fpr-line);
    border-radius: var(--fpr-radius-sm);
    background: var(--fpr-surface);
    transition: background .15s, border-color .15s, transform .15s;
}
.fpr-alert:hover { border-color: #cbd5e1; transform: translateX(2px); }
.fpr-alert-icon {
    display: grid; place-items: center;
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--fpr-info-bg); color: var(--fpr-info);
    font-size: 0.85rem;
}
.fpr-alert.good { background: linear-gradient(90deg, var(--fpr-good-bg), #fff 60%); border-color: #bbf7d0; }
.fpr-alert.good .fpr-alert-icon { background: var(--fpr-good-soft); color: var(--fpr-good); }
.fpr-alert.bad  { background: linear-gradient(90deg, var(--fpr-bad-bg), #fff 60%); border-color: #fecaca; }
.fpr-alert.bad  .fpr-alert-icon { background: var(--fpr-bad-soft); color: var(--fpr-bad); }
.fpr-alert.warn { background: linear-gradient(90deg, var(--fpr-warn-bg), #fff 60%); border-color: #fde68a; }
.fpr-alert.warn .fpr-alert-icon { background: var(--fpr-warn-soft); color: var(--fpr-warn); }
.fpr-alert b { display: block; margin-bottom: 0.18rem; font-size: 0.76rem; color: var(--fpr-ink); }
.fpr-alert p { margin: 0; color: var(--fpr-dim); font-size: 0.7rem; line-height: 1.45; }
.fpr-alert-empty,
.fpr-chart-empty {
    display: flex; align-items: center; justify-content: center; gap: 0.6rem;
    min-height: 330px; color: #94a3b8;
    font-size: 0.78rem; font-weight: 650; text-align: center;
}
.fpr-chart-empty i { font-size: 1.5rem; color: #cbd5e1; }
.fpr-alert-empty {
    min-height: 130px; flex-direction: column;
    border: 1px dashed #cbd5e1; border-radius: var(--fpr-radius-sm);
    background: #fafbfc;
}
.fpr-alert-empty i { color: #22c55e; font-size: 1.35rem; }

@media (max-width: 1700px) {
    .fpr-exec-kpis { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
}
@media (max-width: 1450px) {
    .fpr-exec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fpr-exec-trend { grid-column: 1 / -1; }
}
@media (max-width: 1050px) {
    .fpr-exec-bottom, .fpr-exec-grid { grid-template-columns: 1fr; }
    .fpr-exec-trend { grid-column: auto; }
}
@media (max-width: 650px) {
    .fpr-exec-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fpr-report-health { align-items: flex-start; }
}

/* ─── Layout grid ─── */
.fpr-row { display: grid; gap: 0.8rem; }
.fpr-row.c2  { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.fpr-row.c2e { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.fpr-row.c3  { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fpr-row.main{ grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
@media (max-width: 1100px) {
    .fpr-row.c2, .fpr-row.c2e, .fpr-row.c3, .fpr-row.main { grid-template-columns: 1fr; }
}

/* ─── Panels (the workhorse) ─── */
.fpr-panel {
    background: var(--fpr-surface);
    border: 1px solid var(--fpr-line);
    border-radius: var(--fpr-radius);
    padding: 0.95rem 1rem;
    box-shadow: var(--fpr-shadow-sm);
    min-width: 0;
    transition: box-shadow .15s ease;
}
.fpr-panel:hover { box-shadow: var(--fpr-shadow-md); }
.fpr-panel-head {
    display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
    margin-bottom: 0.65rem; padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--fpr-line-soft);
}
.fpr-panel-head h3 {
    margin: 0; font-size: 0.95rem; font-weight: 800;
    display: flex; align-items: center; gap: 0.55rem;
    color: var(--fpr-ink); letter-spacing: -0.01em;
}
.fpr-panel-head h3::before {
    content: ""; display: inline-block; width: 3px; height: 18px; border-radius: 2px;
    background: linear-gradient(180deg, var(--fpr-info), var(--fpr-accent));
    flex-shrink: 0;
}
.fpr-panel-head h3 > i {
    width: 26px; height: 26px; border-radius: 7px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.82rem;
    background: var(--fpr-info-bg); color: var(--fpr-info);
    flex-shrink: 0;
}
.fpr-panel-head .hint {
    font-size: 0.7rem; color: var(--fpr-dim); font-weight: 600;
    padding: 0.18rem 0.55rem; border-radius: 999px;
    background: var(--fpr-bg); border: 1px solid var(--fpr-line);
}

/* Accent variants for special panels */
.fpr-panel.fpr-exec-trend .fpr-panel-head h3::before { background: linear-gradient(180deg, #2563eb, #38bdf8); }
.fpr-panel.fpr-alert-panel .fpr-panel-head h3::before { background: linear-gradient(180deg, #d97706, #fbbf24); }
.fpr-panel.fpr-exec-summary .fpr-panel-head h3::before { background: linear-gradient(180deg, #0d9488, #2dd4bf); }

/* ─── P&L matrix ─── */
.fpr-matrix {
    width: 100%; border-collapse: collapse;
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
}
.fpr-matrix th, .fpr-matrix td {
    padding: 0.5rem 0.65rem; text-align: right; white-space: nowrap;
}
.fpr-matrix th:first-child, .fpr-matrix td:first-child { text-align: left; }
.fpr-matrix th:first-child {
    position: sticky; left: 0; z-index: 3;
    background: #f1f5f9;
}
.fpr-matrix tbody td:first-child {
    position: sticky; left: 0; z-index: 2;
    background: inherit;
}
.fpr-matrix thead th {
    position: sticky; top: 0;
    background: #f8fafc;
    color: var(--fpr-dim);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    border-bottom: 2px solid #cbd5e1;
    z-index: 1;
    font-weight: 800;
}
.fpr-matrix tbody tr { border-bottom: 1px solid var(--fpr-line-soft); transition: background .12s; }
.fpr-matrix tbody tr:hover { background: #fafbfc; }
.fpr-matrix tbody tr.grp { background: #f8fafc; font-weight: 800; }
.fpr-matrix tbody tr.grp td { border-top: 1px solid var(--fpr-line); }
/* ── GroupType CSS classes ── */
.fpr-matrix tbody tr.grp.dept {
    background: linear-gradient(90deg, #1e3a5f 0%, #1e40af 100%);
    color: #ffffff; font-size: 0.82rem; font-weight: 900;
    letter-spacing: 0.03em; cursor: default;
}
.fpr-matrix tbody tr.grp.dept td { border-top: 3px solid #1e3a5f; color: #ffffff; }
.fpr-matrix tbody tr.grp.dept td:first-child {
    background: #1e3a5f; color: #e0e7ff;
    position: sticky; left: 0; z-index: 2;
}
.fpr-matrix tbody tr.grp.stat { background: linear-gradient(90deg, #ecfeff, #f0fdfa 60%); color: #155e75; }
.fpr-matrix tbody tr.grp.stat td { border-top: 2px solid #a5f3fc; }
.fpr-matrix tbody tr.grp.kpi { background: linear-gradient(90deg, #ecfeff, #f0fdfa 60%); color: #155e75; }
.fpr-matrix tbody tr.grp.kpi td { border-top: 1px solid #a5f3fc; }
.fpr-matrix tbody tr.grp.revenue { background: linear-gradient(90deg, #f0fdf4, #f7fee7 60%); color: #166534; }
.fpr-matrix tbody tr.grp.revenue td { border-top: 2px solid #86efac; }
.fpr-matrix tbody tr.grp.expense { background: linear-gradient(90deg, #fff7ed, #fef3c7 60%); color: #9a3412; }
.fpr-matrix tbody tr.grp.expense td { border-top: 1px solid #fde68a; }
.fpr-matrix tbody tr.grp.payroll { background: linear-gradient(90deg, #fff3e0, #fef9c3 60%); color: #92400e; }
.fpr-matrix tbody tr.grp.payroll td { border-top: 1px solid #fcd34d; }
.fpr-matrix tbody tr.grp.profit {
    background: linear-gradient(90deg, #eff6ff, #dbeafe 60%);
    color: #1e40af; font-weight: 900;
}
.fpr-matrix tbody tr.grp.profit td { border-top: 2px solid #93c5fd; }
.fpr-matrix tfoot tr.fpr-margin-row { background: #f8fafc; }
.fpr-matrix tfoot tr.fpr-margin-row td { border-top: none; padding-top: 0.3rem; padding-bottom: 0.3rem; }
.fpr-matrix tbody tr.grp.summary { background: linear-gradient(90deg, #eff6ff, #ede9fe 60%); color: #1e40af; }
.fpr-matrix tbody tr.line.stat { background: #f8feff; }
.fpr-matrix tbody tr.line.stat td:first-child { color: #155e75; }
.fpr-matrix tbody tr.total {
    background: linear-gradient(90deg, #eff6ff, #dbeafe 60%);
    font-weight: 800; color: var(--fpr-info);
    border-top: 2px solid #93c5fd;
}
.fpr-matrix tbody tr.line td:first-child { padding-left: 1.4rem; color: var(--fpr-ink); font-weight: 600; }
.fpr-matrix .num { font-variant-numeric: tabular-nums; }
.fpr-group-index {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; margin-right: 0.3rem;
    border-radius: 5px;
    background: rgba(255,255,255,.85);
    border: 1px solid currentColor;
    font-size: 0.64rem; font-weight: 800;
}
.fpr-tree-toggle {
    width: 24px; height: 24px; border: 0; background: transparent;
    color: inherit; padding: 0; cursor: pointer; border-radius: 4px;
    transition: background .12s;
}
.fpr-tree-toggle:hover { background: rgba(15, 23, 42, .08); }
.fpr-group-code,
.fpr-line-code {
    display: inline-block; min-width: 72px; margin-right: 0.5rem;
    color: var(--fpr-dim);
    font-size: 0.66rem; font-weight: 700;
    font-family: "JetBrains Mono", "Cascadia Code", "Consolas", ui-monospace, monospace;
    font-variant-numeric: tabular-nums;
}
.fpr-pos { color: var(--fpr-good); font-weight: 800; }
.fpr-neg { color: var(--fpr-bad);  font-weight: 800; }
.fpr-scroll {
    max-height: 580px; overflow: auto;
    border-radius: 8px;
    scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent;
}
.fpr-scroll::-webkit-scrollbar { width: 10px; height: 10px; }
.fpr-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
.fpr-scroll::-webkit-scrollbar-thumb:hover { background: #94a3b8; background-clip: padding-box; border: 2px solid transparent; }

/* ─── Insights pills ─── */
.fpr-insights { display: flex; flex-direction: column; gap: 0.55rem; }
.fpr-insight {
    display: flex; gap: 0.6rem;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    font-size: 0.78rem; line-height: 1.4;
    border: 1px solid transparent;
    transition: transform .15s;
}
.fpr-insight:hover { transform: translateX(2px); }
.fpr-insight .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 0.4rem; flex-shrink: 0; }
.fpr-insight.good { background: var(--fpr-good-bg); border-color: #bbf7d0; color: #14532d; }
.fpr-insight.good .dot { background: var(--fpr-good); box-shadow: 0 0 0 3px rgba(22,163,74,.18); }
.fpr-insight.bad  { background: var(--fpr-bad-bg);  border-color: #fecaca; color: #7f1d1d; }
.fpr-insight.bad .dot { background: var(--fpr-bad); box-shadow: 0 0 0 3px rgba(220,38,38,.18); }
.fpr-insight.warn { background: var(--fpr-warn-bg); border-color: #fde68a; color: #78350f; }
.fpr-insight.warn .dot { background: var(--fpr-warn); box-shadow: 0 0 0 3px rgba(217,119,6,.18); }
.fpr-insight.info { background: var(--fpr-info-bg); border-color: #bfdbfe; color: #1e3a8a; }
.fpr-insight.info .dot { background: var(--fpr-info); box-shadow: 0 0 0 3px rgba(29,78,216,.18); }

.fpr-mini-summary {
    width: 100%; border-collapse: collapse;
    font-size: 0.76rem;
    font-variant-numeric: tabular-nums;
    margin-bottom: 0.75rem;
}
.fpr-mini-summary th,
.fpr-mini-summary td {
    padding: 0.4rem 0.5rem;
    border-bottom: 1px solid var(--fpr-line-soft);
    text-align: right;
}
.fpr-mini-summary th:first-child,
.fpr-mini-summary td:first-child { text-align: left; }
.fpr-mini-summary thead th {
    color: var(--fpr-dim); font-size: 0.64rem;
    text-transform: uppercase; letter-spacing: .06em; font-weight: 800;
    background: var(--fpr-bg);
}

/* ─── Ranking / list ─── */
.fpr-rank {
    width: 100%; border-collapse: collapse;
    font-size: 0.78rem; font-variant-numeric: tabular-nums;
}
.fpr-rank th, .fpr-rank td { padding: 0.5rem 0.65rem; text-align: right; }
.fpr-rank th:first-child, .fpr-rank td:first-child { text-align: left; }
.fpr-rank thead th {
    color: var(--fpr-dim); font-size: 0.68rem;
    text-transform: uppercase; letter-spacing: .06em; font-weight: 800;
    border-bottom: 2px solid var(--fpr-line);
    background: var(--fpr-bg);
    padding-top: 0.55rem; padding-bottom: 0.55rem;
}
.fpr-rank tbody tr { border-bottom: 1px solid var(--fpr-line-soft); transition: background .12s; }
.fpr-rank tbody tr:hover { background: #fafbfc; }
.fpr-rank tbody tr.total {
    background: linear-gradient(90deg, #eff6ff, #dbeafe 70%);
    font-weight: 800; color: var(--fpr-info);
    border-top: 2px solid #93c5fd;
}
.fpr-rank tbody tr.total td { padding-top: 0.65rem; padding-bottom: 0.65rem; }
.fpr-rank tbody tr.section td {
    background: linear-gradient(90deg, #eef2ff, #ede9fe 70%);
    color: #3730a3;
    text-align: left;
    font-weight: 800;
    border-top: 2px solid #c7d2fe;
    letter-spacing: .01em;
}
.fpr-dept-child { padding-left: 1.4rem !important; }
.fpr-dept-parent { font-weight: 800; }
.fpr-bar-cell { min-width: 130px; }
.fpr-bar {
    position: relative; height: 9px; border-radius: 99px;
    background: #e2e8f0; overflow: hidden;
}
.fpr-bar > span {
    display: block; height: 100%; border-radius: 99px;
    background: linear-gradient(90deg, #3b82f6, #14b8a6, #22c55e);
    box-shadow: inset 0 -1px 0 rgba(0,0,0,.08);
}

/* ─── Heatmap ─── */
.fpr-heat { width: 100%; border-collapse: separate; border-spacing: 5px; font-size: 0.76rem; }
.fpr-heat th {
    color: var(--fpr-dim); font-size: 0.66rem;
    text-transform: uppercase; letter-spacing: .06em; font-weight: 800; padding: 0.25rem;
}
.fpr-heat td {
    text-align: center; padding: 0.55rem 0.45rem;
    border-radius: 8px; font-weight: 800; color: #fff;
    box-shadow: var(--fpr-shadow-sm);
    transition: transform .15s;
}
.fpr-heat td:not(.lbl):hover { transform: scale(1.04); }
.fpr-heat td.lbl {
    background: transparent !important; color: var(--fpr-ink);
    text-align: left; font-weight: 700; box-shadow: none;
}
.fpr-heat .h-good { background: linear-gradient(135deg, #15803d, #16a34a); }
.fpr-heat .h-ok   { background: linear-gradient(135deg, #65a30d, #84cc16); }
.fpr-heat .h-warn { background: linear-gradient(135deg, #b45309, #d97706); }
.fpr-heat .h-bad  { background: linear-gradient(135deg, #b91c1c, #dc2626); }
.fpr-heat .h-na   { background: #e2e8f0; color: #64748b; }

/* ─── Status pills ─── */
.fpr-pill {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.12rem 0.55rem; border-radius: 999px;
    font-size: 0.68rem; font-weight: 800; letter-spacing: .02em;
}
.fpr-pill.good { color: var(--fpr-good); background: var(--fpr-good-soft); }
.fpr-pill.bad  { color: var(--fpr-bad);  background: var(--fpr-bad-soft); }
.fpr-pill.warn { color: var(--fpr-warn); background: var(--fpr-warn-soft); }
.fpr-pill.info { color: var(--fpr-info); background: var(--fpr-info-soft); }

/* ─── States ─── */
.fpr-empty, .fpr-loading {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 0.7rem; padding: 3.5rem 1rem;
    color: var(--fpr-dim); text-align: center;
    background: var(--fpr-surface);
    border: 1px dashed var(--fpr-line);
    border-radius: var(--fpr-radius);
}
.fpr-empty i { font-size: 2.4rem; color: #cbd5e1; }
.fpr-empty h3 { margin: 0; font-size: 1rem; color: var(--fpr-ink); }
.fpr-empty p { margin: 0; max-width: 480px; font-size: 0.82rem; }
.fpr-spinner {
    width: 38px; height: 38px;
    border: 3px solid #e2e8f0; border-top-color: var(--fpr-info);
    border-radius: 50%; animation: fpr-spin 0.8s linear infinite;
}
@keyframes fpr-spin { to { transform: rotate(360deg); } }

.fpr-chart { width: 100%; }
.fpr-foot {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 0.72rem; color: var(--fpr-dim); padding: 0.5rem 0.35rem 0.1rem;
    border-top: 1px dashed var(--fpr-line-soft); margin-top: 0.6rem;
}

/* Utility spacers — replaces inline margin-top */
.fpr-mt-sm { margin-top: 0.8rem; }
.fpr-mt-md { margin-top: 1.1rem; }
.fpr-mt-lg { margin-top: 1.5rem; }

/* ─── Actual / Forecast column highlights ─── */
.fpr-matrix th.col-actual,
.fpr-matrix td.col-actual {
    background: rgba(13, 148, 136, 0.05);
    border-left: 2px solid rgba(13, 148, 136, 0.25);
    font-weight: 700;
}
.fpr-matrix th.col-forecast,
.fpr-matrix td.col-forecast {
    background: rgba(245, 158, 11, 0.05);
    border-left: 2px solid rgba(245, 158, 11, 0.2);
    color: #92400e;
}

/* ─── Insights section headers (risk/warn/good groupings) ─── */
.fpr-insight-section-head {
    display: flex; align-items: center; gap: 0.4rem;
    font-size: 0.65rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: .07em;
    padding: 0.35rem 0.6rem; border-radius: 6px;
    margin: 0.55rem 0 0.25rem;
}
.fpr-insight-section-head:first-child { margin-top: 0; }
.fpr-insight-section-head.bad  { color: var(--fpr-bad);  background: var(--fpr-bad-bg); }
.fpr-insight-section-head.warn { color: var(--fpr-warn); background: var(--fpr-warn-bg); }
.fpr-insight-section-head.good { color: var(--fpr-good); background: var(--fpr-good-bg); }
.fpr-insight-section-head.info { color: var(--fpr-info); background: var(--fpr-info-bg); }

/* ─── Presentation (slide) mode ─── */
.fpr-slide {
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    border: 1px solid var(--fpr-line);
    border-radius: var(--fpr-radius);
    padding: 1.4rem 1.6rem;
    min-height: 480px;
    box-shadow: var(--fpr-shadow-lg);
    position: relative;
}
.fpr-slide::before {
    content: ""; position: absolute; left: 0; top: 0; right: 0; height: 5px;
    border-radius: var(--fpr-radius) var(--fpr-radius) 0 0;
    background: linear-gradient(90deg, #2563eb, #7c3aed, #0d9488);
}
.fpr-slide-head {
    display: flex; align-items: baseline; justify-content: space-between;
    border-bottom: 2px solid var(--fpr-line); padding-bottom: 0.75rem; margin-bottom: 1rem;
}
.fpr-slide-head h2 { margin: 0; font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; }
.fpr-slide-no {
    font-size: 0.78rem; color: var(--fpr-dim); font-weight: 700;
    padding: 0.25rem 0.7rem; border-radius: 999px;
    background: var(--fpr-bg); border: 1px solid var(--fpr-line);
}
.fpr-slide-nav { display: flex; align-items: center; justify-content: center; gap: 0.9rem; margin-top: 0.5rem; }
.fpr-dots { display: flex; gap: 0.4rem; }
.fpr-dots span {
    width: 8px; height: 8px; border-radius: 50%;
    background: #cbd5e1; cursor: pointer;
    transition: all .2s;
}
.fpr-dots span:hover { background: #94a3b8; }
.fpr-dots span.on {
    background: linear-gradient(90deg, var(--fpr-info), var(--fpr-accent));
    width: 24px; border-radius: 99px;
    box-shadow: 0 2px 6px -2px rgba(29,78,216,.5);
}

/* ─── Dark mode adjustments ─── */
[data-theme="dark"] .fpr-shell,
.dark-mode .fpr-shell {
    --fpr-ink: #f1f5f9;
    --fpr-ink-soft: #e2e8f0;
    --fpr-dim: #94a3b8;
    --fpr-line: #334155;
    --fpr-line-soft: #1e293b;
    --fpr-bg: #0f172a;
    --fpr-surface: #1e293b;
    --fpr-good-bg: rgba(34,197,94,.12);
    --fpr-bad-bg: rgba(239,68,68,.12);
    --fpr-warn-bg: rgba(217,119,6,.12);
    --fpr-info-bg: rgba(59,130,246,.14);
}
[data-theme="dark"] .fpr-matrix thead th,
.dark-mode .fpr-matrix thead th { background: #0f172a; color: #94a3b8; }
[data-theme="dark"] .fpr-rank thead th,
.dark-mode .fpr-rank thead th { background: #0f172a; color: #94a3b8; }

/* ─── P&L şablon tablosu: Actual/Budget/Forecast sütun renklendirmesi (global, her ekran) ───
   Başlıklar belirgin renk; hücreler çok hafif ton. Şablon satır renkleri inline geldiği için
   (QueryCellInfo AddStyle) özet/başlık satırlarında bu hücre tonunu EZER — yalnız sade kalem
   satırları ince sütun tonunu alır. */
.e-grid .e-headercell.fpr-col-actual,
.e-grid .e-headercell.fpr-col-actual .e-headertext { color: #2563eb; }
.e-grid .e-headercell.fpr-col-budget,
.e-grid .e-headercell.fpr-col-budget .e-headertext { color: #dc2626; }
.e-grid .e-headercell.fpr-col-forecast,
.e-grid .e-headercell.fpr-col-forecast .e-headertext { color: #16a34a; }
.e-grid .e-headercell.fpr-col-ly,
.e-grid .e-headercell.fpr-col-ly .e-headertext { color: #64748b; }

.e-grid .e-headercell.fpr-col-actual { border-top: 2px solid #2563eb; background: #eff6ff; }
.e-grid .e-headercell.fpr-col-budget { border-top: 2px solid #dc2626; background: #fef2f2; }
.e-grid .e-headercell.fpr-col-forecast { border-top: 2px solid #16a34a; background: #ecfdf5; }
.e-grid .e-headercell.fpr-col-ly { border-top: 2px solid #94a3b8; background: #f8fafc; }

.e-grid td.e-rowcell.fpr-col-actual { background: #eff6ff; }
.e-grid td.e-rowcell.fpr-col-budget { background: #fef2f2; }
.e-grid td.e-rowcell.fpr-col-forecast { background: #ecfdf5; }
.e-grid td.e-rowcell.fpr-col-ly { background: #f8fafc; }

/* Template-backed USALI TreeGrid: dense, audit-friendly financial statement treatment. */
.fpr-shell .e-treegrid {
    border: 1px solid var(--fpr-line);
    border-radius: 10px;
    overflow: hidden;
    background: var(--fpr-surface);
}
.fpr-shell .e-treegrid .e-gridheader {
    position: sticky;
    top: 0;
    z-index: 5;
    border-bottom: 1px solid #cbd5e1;
    box-shadow: 0 2px 5px rgba(15, 23, 42, .06);
}
.fpr-shell .e-treegrid .e-headercell {
    height: 34px;
    background: #f8fafc;
    color: #334155;
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .035em;
    text-transform: uppercase;
}
.fpr-shell .e-treegrid .e-rowcell {
    height: 32px;
    padding-top: .34rem;
    padding-bottom: .34rem;
    color: #1e293b;
    font-size: .72rem;
    font-variant-numeric: tabular-nums;
}
.fpr-shell .e-treegrid .e-row:hover .e-rowcell {
    background-color: #f8fbff;
}
.fpr-shell .e-treegrid .e-frozen-left-content,
.fpr-shell .e-treegrid .e-frozenheader {
    box-shadow: 5px 0 10px -9px rgba(15, 23, 42, .65);
}
.fpr-shell .e-treegrid .e-treecolumn-container {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    font-weight: 650;
}
.fpr-shell .e-treegrid .e-treegridexpand,
.fpr-shell .e-treegrid .e-treegridcollapse {
    color: #2563eb;
}
.fpr-shell .e-treegrid .e-focused:not(.e-menu-item) {
    box-shadow: inset 0 0 0 2px rgba(37, 99, 235, .35);
}

@media (max-width: 760px) {
    .fpr-shell .e-treegrid { min-width: 1120px; }
    .fpr-shell .e-treegrid .e-rowcell { font-size: .68rem; }
}

/* Sütun grubu ayırıcı sol kenarlık (ilk alt sütunda) */
.e-grid .e-headercell.fpr-col-actual,
.e-grid .e-headercell.fpr-col-budget,
.e-grid .e-headercell.fpr-col-forecast,
.e-grid .e-headercell.fpr-col-ly { font-weight: 600; }

[data-theme="dark"] .e-grid td.e-rowcell.fpr-col-actual,
.dark-mode .e-grid td.e-rowcell.fpr-col-actual { background: rgba(37,99,235,.12); }
[data-theme="dark"] .e-grid td.e-rowcell.fpr-col-budget,
.dark-mode .e-grid td.e-rowcell.fpr-col-budget { background: rgba(220,38,38,.12); }
[data-theme="dark"] .e-grid td.e-rowcell.fpr-col-forecast,
.dark-mode .e-grid td.e-rowcell.fpr-col-forecast { background: rgba(22,163,74,.12); }
[data-theme="dark"] .e-grid td.e-rowcell.fpr-col-ly,
.dark-mode .e-grid td.e-rowcell.fpr-col-ly { background: rgba(148,163,184,.10); }
[data-theme="dark"] .e-grid .e-headercell.fpr-col-actual,
.dark-mode .e-grid .e-headercell.fpr-col-actual { background: rgba(37,99,235,.18); }
[data-theme="dark"] .e-grid .e-headercell.fpr-col-budget,
.dark-mode .e-grid .e-headercell.fpr-col-budget { background: rgba(220,38,38,.18); }
[data-theme="dark"] .e-grid .e-headercell.fpr-col-forecast,
.dark-mode .e-grid .e-headercell.fpr-col-forecast { background: rgba(22,163,74,.18); }
[data-theme="dark"] .e-grid .e-headercell.fpr-col-ly,
.dark-mode .e-grid .e-headercell.fpr-col-ly { background: rgba(148,163,184,.14); }

/* ─── Insights Sidebar (sticky right panel in .fpr-row.main) ─── */
.fpr-insights-sidebar {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
.fpr-insights-sidebar::-webkit-scrollbar { width: 5px; }
.fpr-insights-sidebar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }

/* ─── Department Selector Tabs ─── */
.fpr-dept-tabs {
    display: flex; gap: 0.35rem; flex-wrap: wrap;
    background: var(--fpr-surface);
    border: 1px solid var(--fpr-line);
    border-radius: var(--fpr-radius);
    padding: 0.55rem 0.7rem;
    box-shadow: var(--fpr-shadow-sm);
}
.fpr-dept-tab {
    display: inline-flex; align-items: center; gap: 0.45rem;
    border: 1px solid var(--fpr-line);
    border-radius: 8px;
    background: var(--fpr-bg);
    color: var(--fpr-dim);
    padding: 0.42rem 0.85rem;
    font-size: 0.76rem; font-weight: 700; cursor: pointer;
    transition: all .15s ease;
    white-space: nowrap;
}
.fpr-dept-tab i { font-size: 0.72rem; }
.fpr-dept-tab:hover { background: var(--fpr-info-bg); color: var(--fpr-info); border-color: #bfdbfe; }
.fpr-dept-tab.on {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff; border-color: #1d4ed8;
    box-shadow: 0 3px 10px -4px rgba(37,99,235,.5);
}
.fpr-dept-tab.on i { color: #bfdbfe; }

/* ─── Variance KPI summary bar ─── */
.fpr-var-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(175px,1fr));
    gap: 0.6rem;
    background: var(--fpr-surface);
    border: 1px solid var(--fpr-line);
    border-radius: var(--fpr-radius);
    padding: 0.75rem 0.9rem;
    box-shadow: var(--fpr-shadow-sm);
}
.fpr-var-item { display: flex; flex-direction: column; gap: 0.18rem; min-width: 0; }
.fpr-var-item > span { font-size: 0.62rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; color: var(--fpr-dim); }
.fpr-var-item > b   { font-size: 1.18rem; font-weight: 800; color: var(--fpr-ink); font-variant-numeric: tabular-nums; }
.fpr-var-item > em  { font-size: 0.7rem; font-style: normal; font-weight: 700; padding: 0.1rem 0.42rem; border-radius: 999px; align-self: start; }
.fpr-var-item > em.good { color: var(--fpr-good); background: var(--fpr-good-soft); }
.fpr-var-item > em.bad  { color: var(--fpr-bad);  background: var(--fpr-bad-soft); }
.fpr-var-item > em.warn { color: var(--fpr-warn); background: var(--fpr-warn-soft); }

/* ─── Forecast Rolling specific styles ─── */
.fpr-fcst-header {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.6rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
    border-radius: var(--fpr-radius);
    padding: 1rem 1.2rem;
    box-shadow: var(--fpr-shadow-lg);
}
.fpr-fcst-kpi { display: flex; flex-direction: column; gap: 0.2rem; }
.fpr-fcst-kpi > span { font-size: 0.62rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 800; color: #94a3b8; }
.fpr-fcst-kpi > b    { font-size: 1.3rem; font-weight: 800; color: #f8fafc; font-variant-numeric: tabular-nums; }
.fpr-fcst-kpi > em   { font-size: 0.7rem; font-style: normal; color: #7dd3fc; font-weight: 700; }
.fpr-fcst-kpi.good > b { color: #4ade80; }
.fpr-fcst-kpi.warn > b { color: #fbbf24; }
.fpr-fcst-kpi.bad  > b { color: #f87171; }

/* ─── Monthly matrix column highlight ─── */
.fpr-matrix th.col-current,
.fpr-matrix td.col-current {
    background: rgba(37,99,235,.07);
    border-left: 2px solid rgba(37,99,235,.3);
    font-weight: 700;
}
.fpr-matrix th.col-ytd,
.fpr-matrix td.col-ytd {
    background: rgba(13,148,136,.07);
    border-left: 2px solid rgba(13,148,136,.3);
    font-weight: 700;
}
.fpr-matrix th.col-var,
.fpr-matrix td.col-var { font-size: 0.72rem; color: var(--fpr-dim); }

/* ─── Dept summary quick table ─── */
.fpr-dept-summary {
    width: 100%; border-collapse: collapse; font-size: 0.77rem;
    font-variant-numeric: tabular-nums;
}
.fpr-dept-summary th, .fpr-dept-summary td { padding: 0.42rem 0.6rem; text-align: right; }
.fpr-dept-summary th:first-child, .fpr-dept-summary td:first-child { text-align: left; }
.fpr-dept-summary thead th {
    background: #f8fafc; color: var(--fpr-dim);
    font-size: 0.64rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 800;
    border-bottom: 2px solid var(--fpr-line);
}
.fpr-dept-summary tbody tr { border-bottom: 1px solid var(--fpr-line-soft); transition: background .12s; }
.fpr-dept-summary tbody tr:hover { background: #f8fbff; }
.fpr-dept-summary tbody tr.dept-total {
    background: linear-gradient(90deg,#eff6ff,#dbeafe 60%);
    color: var(--fpr-info); font-weight: 800;
    border-top: 2px solid #93c5fd;
}
.fpr-dept-summary .bar-wrap { display: flex; align-items: center; gap: 0.4rem; justify-content: flex-end; }
.fpr-dept-summary .bar-mini {
    width: 60px; height: 7px; border-radius: 99px; background: #e2e8f0; overflow: hidden; flex-shrink: 0;
}
.fpr-dept-summary .bar-mini > span {
    display: block; height: 100%; border-radius: 99px;
    background: linear-gradient(90deg, #3b82f6, #0d9488);
}
.fpr-dept-summary .bar-mini.bad > span { background: linear-gradient(90deg,#ef4444,#dc2626); }

/* ─── Print ─── */
@media print {
    .fpr-toolbar { background: #fff !important; color: #0b1220 !important; border-color: #cbd5e1 !important; box-shadow: none !important; }
    .fpr-toolbar::after { display: none; }
    .fpr-title h2, .fpr-title p { color: #0b1220 !important; }
    .fpr-btn, .fpr-seg, .fpr-chip { display: none !important; }
    .fpr-panel { break-inside: avoid; box-shadow: none !important; }
    .fpr-exec-kpi { break-inside: avoid; box-shadow: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════════════
   FPB — BANDED P&L TABLE (Bütçe / Actual / Last Year bantları + birim sütunları)
   Referans: screenshots/FP NEW/Genel Faaliyet Raporu
   ═══════════════════════════════════════════════════════════════════════════════════ */

.fpb-wrap {
    overflow-x: auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 6px 18px -14px rgba(15, 23, 42, .35);
}

.fpb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .74rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.fpb-table th, .fpb-table td { padding: .32rem .55rem; }
.fpb-table .num { text-align: right; }
.fpb-table .dim { color: #64748b; font-size: .68rem; }
.fpb-table .strong { font-weight: 700; color: #0f172a; }
.fpb-name-col { text-align: left; min-width: 210px; position: sticky; left: 0; background: inherit; }

/* Band headers */
.fpb-bands th {
    text-align: center;
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .1em;
    color: #fff;
    padding: .3rem .5rem;
}
.fpb-bands .fpb-name-col { background: #fff; }
.fpb-band-budget { background: #2563eb; }
.fpb-band-actual { background: #16a34a; }
.fpb-band-ly     { background: #7c3aed; }
.fpb-band-var    { background: #fff; }

.fpb-cols th {
    background: #f8fafc;
    color: #475569;
    font-size: .64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    border-bottom: 2px solid #e2e8f0;
    position: sticky;
    top: 0;
}
.fpb-cols .fpb-name-col { background: #f8fafc; z-index: 2; }

/* Section rows */
.fpb-section {
    cursor: pointer;
    user-select: none;
    font-weight: 800;
    font-size: .72rem;
}
.fpb-section td { border-top: 1px solid #e2e8f0; padding: .4rem .55rem; }
.fpb-section i { font-size: .58rem; margin-right: .45rem; color: #94a3b8; width: 10px; }
.fpb-section-mini { font-weight: 600; color: #64748b; font-size: .66rem; }
.fpb-section.stat td     { background: #ecfdf5; color: #065f46; }
.fpb-section.summary td  { background: #eff6ff; color: #1e40af; }
.fpb-section.revenue td  { background: #eff6ff; color: #1d4ed8; }
.fpb-section.dept td     { background: #f5f3ff; color: #6d28d9; }
.fpb-section.payroll td  { background: #fff7ed; color: #c2410c; }
.fpb-section.expense td  { background: #fef2f2; color: #b91c1c; }
.fpb-section.profit td   { background: #f0fdf4; color: #15803d; }

/* Data lines */
.fpb-line td { border-top: 1px solid #f1f5f9; background: #fff; color: #334155; }
.fpb-line:hover td { background: #f8fafc; }
.fpb-line .fpb-name-col { padding-left: 1.5rem; font-weight: 500; color: #1e293b; }
.fpb-line.fpb-em td { font-weight: 800; color: #0f172a; background: #fbfdff; }
.fpb-line.fpb-em .fpb-name-col { padding-left: 1rem; }
.fpb-line.fpb-exp .strong { color: #9f1239; }

/* Variance cells */
.fpb-var { font-weight: 800; }
.fpb-var.pos { color: #15803d; }
.fpb-var.neg { color: #b91c1c; }
.fpb-var.neutral { color: #94a3b8; font-weight: 600; }
.fpb-var-col { border-left: 2px solid #e2e8f0; }

/* ── Bütçe / Actual Fark Analizi (olumlu ↔ olumsuz iki sütun) ── */
.fpr-var-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}
@media (max-width: 900px) { .fpr-var-split { grid-template-columns: 1fr; } }

.fpr-var-col-head {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .74rem;
    font-weight: 800;
    margin-bottom: .5rem;
    padding-bottom: .35rem;
    border-bottom: 2px solid #e2e8f0;
}
.fpr-var-col-head.good { color: #15803d; border-color: #bbf7d0; }
.fpr-var-col-head.bad { color: #b91c1c; border-color: #fecaca; }
.fpr-var-col-head span { font-weight: 600; color: #94a3b8; font-size: .64rem; }

.fpr-var-row {
    display: grid;
    grid-template-columns: minmax(90px, 160px) 1fr 64px;
    align-items: center;
    gap: .6rem;
    padding: .22rem 0;
    font-size: .72rem;
}
.fpr-var-label { color: #334155; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fpr-var-bar { height: 8px; background: #f1f5f9; border-radius: 99px; overflow: hidden; }
.fpr-var-bar > span { display: block; height: 100%; border-radius: 99px; }
.fpr-var-bar > span.good { background: linear-gradient(90deg, #22c55e, #15803d); }
.fpr-var-bar > span.bad { background: linear-gradient(90deg, #f87171, #dc2626); }
.fpr-var-row b { text-align: right; font-variant-numeric: tabular-nums; }

.fpr-var-net {
    margin-top: .75rem;
    padding: .5rem .8rem;
    border-radius: 8px;
    font-size: .78rem;
    font-weight: 700;
    text-align: right;
}
.fpr-var-net.good { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.fpr-var-net.bad { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* ─── Operasyonel istatistik bandı (FP NEW referansı — Genel Faaliyet üst şeridi) ─── */
.fpr-stat-band {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
    gap: .55rem;
    margin-bottom: .75rem;
}
.fpr-stat-tile {
    background: #fff;
    border: 1px solid var(--fpr-border, #e2e8f0);
    border-radius: 10px;
    padding: .55rem .7rem .5rem;
    box-shadow: var(--fpr-shadow-sm, 0 1px 2px rgba(15,23,42,.05));
    transition: box-shadow .15s ease, transform .15s ease;
    min-width: 0;
}
.fpr-stat-tile:hover { box-shadow: var(--fpr-shadow-md, 0 4px 12px rgba(15,23,42,.08)); transform: translateY(-1px); }
.fpr-stat-tile-head {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .64rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fpr-stat-tile-head i { color: #2563eb; font-size: .7rem; flex: 0 0 auto; }
.fpr-stat-tile > strong {
    display: block;
    font-size: 1.06rem;
    font-weight: 800;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
    margin: .18rem 0 .22rem;
    white-space: nowrap;
}
.fpr-stat-tile-foot { display: flex; flex-direction: column; gap: .1rem; }
.fpr-stat-delta {
    display: inline-block;
    font-size: .64rem;
    font-weight: 700;
    color: #64748b;
    white-space: nowrap;
}
.fpr-stat-delta.good { color: #0d9488; }
.fpr-stat-delta.bad { color: #dc2626; }
.fpr-stat-sub { font-size: .62rem; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ─── FY Forecast hero bandı (FP NEW referansı — 4 büyük özet kartı) ─── */
.fpr-hero-band {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: .6rem;
    margin-bottom: .75rem;
}
.fpr-hero-tile {
    display: flex;
    align-items: center;
    gap: .8rem;
    background: linear-gradient(135deg, #f8fafc 0%, #fff 60%);
    border: 1px solid var(--fpr-border, #e2e8f0);
    border-radius: 12px;
    padding: .75rem 1rem;
    box-shadow: var(--fpr-shadow-sm, 0 1px 2px rgba(15,23,42,.05));
}
.fpr-hero-tile > i {
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px;
    background: #eff6ff; color: #2563eb;
    font-size: .95rem;
    flex: 0 0 auto;
}
.fpr-hero-tile span { display: block; font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #64748b; }
.fpr-hero-tile strong { display: block; font-size: 1.25rem; font-weight: 800; color: #0f172a; font-variant-numeric: tabular-nums; line-height: 1.25; }
.fpr-hero-tile em { display: block; font-style: normal; font-size: .68rem; font-weight: 700; color: #64748b; }
.fpr-hero-tile em.good { color: #0d9488; }
.fpr-hero-tile em.bad { color: #dc2626; }

/* ═══════════════════════════════════════════════════════════════════════════════════
   FPM — MANAGEMENT P&L TABLE (Actual/Budget/Forecast/Last Year, MTD+YTD+FY tek tabloda)
   Referans: "Management P&L — Actual / Budget / Forecast" mockup.
   ═══════════════════════════════════════════════════════════════════════════════════ */

.fpm-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    margin-bottom: .5rem;
    flex-wrap: wrap;
}
.fpm-toolbar-group { display: flex; gap: .35rem; }
.fpm-btn {
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    border-radius: 8px;
    font-size: .7rem;
    font-weight: 700;
    padding: .32rem .6rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}
.fpm-btn:hover { background: #f8fafc; }
.fpm-btn.on { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }

.fpm-wrap {
    overflow-x: auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 6px 18px -14px rgba(15, 23, 42, .35);
}

.fpm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .74rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.fpm-table.compact th, .fpm-table.compact td { padding: .18rem .5rem; }

.fpm-table th, .fpm-table td { padding: .34rem .55rem; }
.fpm-table .num { text-align: right; }
.fpm-table .dim { color: #64748b; font-size: .68rem; }
.fpm-table .strong { font-weight: 700; color: #0f172a; }
.fpm-name-col { text-align: left; min-width: 220px; position: sticky; left: 0; background: inherit; z-index: 1; }
.fpm-spark-col { width: 72px; padding: .2rem .35rem !important; }
.fpm-spark { width: 68px; height: 22px; }

.fpm-bands th {
    text-align: center;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .08em;
    color: #fff;
    padding: .28rem .4rem;
}
.fpm-bands .fpm-name-col { background: #fff; }
.fpm-band-mtd { background: #2563eb; }
.fpm-band-ytd { background: #7c3aed; }
.fpm-band-fy  { background: #0d9488; }

.fpm-cols th {
    background: #f8fafc;
    color: #475569;
    font-size: .62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    border-bottom: 2px solid #e2e8f0;
    position: sticky;
    top: 0;
}
.fpm-cols .fpm-name-col { background: #f8fafc; z-index: 2; }

.fpm-section {
    cursor: pointer;
    user-select: none;
    font-weight: 800;
    font-size: .72rem;
}
.fpm-section td { border-top: 1px solid #e2e8f0; background: #f1f5f9; color: #334155; padding: .4rem .55rem; }
.fpm-section i { font-size: .58rem; margin-right: .45rem; color: #94a3b8; width: 10px; }

.fpm-row td { border-top: 1px solid #f1f5f9; background: #fff; color: #334155; }
.fpm-row:hover td { background: #f8fafc; }
.fpm-row .fpm-name-col { padding-left: 1.5rem; font-weight: 500; color: #1e293b; }

.fpm-subtotal td { font-weight: 800; color: #0f172a; background: #f0fdf4; }
.fpm-subtotal .fpm-name-col { padding-left: 1rem; color: #15803d; }

.fpm-table .pos { color: #15803d; font-weight: 800; }
.fpm-table .neg { color: #b91c1c; font-weight: 800; }
.fpm-table .neutral { color: #94a3b8; font-weight: 600; }
