/* aconis Finanzplanung – Farben aus dem Logo */
:root {
    --fp-blue: #004A91;
    --fp-cyan: #13B9ED;
    --fp-sky: #A3D8F4;
    --fp-steel: #ACBDD1;
    --fp-grey: #929497;
    --fp-lightgrey: #D1CFCF;
    --fp-bg-year: #EEF4FA;
}

/* ---------- Anmeldung ---------- */
.fi-simple-layout { background: linear-gradient(135deg, #ffffff 0%, #EEF4FA 55%, #DCEBF7 100%); }
.fi-simple-main { border-top: 4px solid var(--fp-blue); }

/* ---------- Topbar / Sidebar ---------- */
.fi-topbar nav, .fi-topbar { border-bottom: 3px solid var(--fp-cyan); }
.fi-sidebar-item-active .fi-sidebar-item-label { color: var(--fp-blue); }

/* ---------- Auswertung ---------- */
.fp-toolbar { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: center; }
.fp-tabs { display: inline-flex; border: 1px solid var(--fp-lightgrey); border-radius: .5rem; overflow: hidden; background: #fff; }
.fp-tab { padding: .4rem .95rem; font-size: .875rem; color: #334155; border-right: 1px solid var(--fp-lightgrey); }
.fp-tab:last-child { border-right: 0; }
.fp-tab:hover { background: #F1F5F9; }
.fp-tab-active, .fp-tab-active:hover { background: var(--fp-blue); color: #fff; font-weight: 600; }
.fp-check { font-size: .875rem; display: inline-flex; gap: .4rem; align-items: center; color: #475569; }
.fp-loading { font-size: .8rem; color: var(--fp-cyan); }
.fp-tree-actions { display: flex; gap: .75rem; margin-bottom: .4rem; }
.fp-tree-actions button { font-size: .78rem; color: var(--fp-blue); text-decoration: underline; text-underline-offset: 2px; }
.fp-warning { background: #FEF3C7; border-left: 4px solid #D97706; padding: .6rem .9rem; border-radius: .375rem; font-size: .875rem; color: #78350F; }

.fp-table-wrap { overflow: auto; max-height: calc(100vh - 16rem); border: 1px solid #E2E8F0; border-radius: .5rem; background: #fff; }
.fp-report { border-collapse: separate; border-spacing: 0; font-size: .8125rem; font-variant-numeric: tabular-nums; width: max-content; min-width: 100%; }
.fp-report th, .fp-report td { padding: .32rem .7rem; white-space: nowrap; border-bottom: 1px solid #F1F5F9; text-align: right; }
.fp-report thead th { position: sticky; top: 0; z-index: 2; background: var(--fp-blue); color: #fff; font-weight: 600; }
.fp-report thead th.fp-col-year { background: #003A73; }
.fp-report .fp-sticky { position: sticky; left: 0; z-index: 1; background: #fff; text-align: left; min-width: 24rem; max-width: 34rem; overflow: hidden; text-overflow: ellipsis; border-right: 1px solid #E2E8F0; }
.fp-report thead .fp-sticky { z-index: 3; background: var(--fp-blue); }
.fp-report td.fp-col-year { background: var(--fp-bg-year); font-weight: 600; }
.fp-row-group td, .fp-row-group .fp-sticky { font-weight: 600; }
.fp-row-detail td { color: #64748B; font-size: .78rem; }
.fp-row-subtotal td, .fp-row-subtotal .fp-sticky { font-weight: 700; background: #F8FAFC; border-top: 1px solid var(--fp-steel); }
.fp-row-subtotal td.fp-col-year { background: #E3EDF7; }
.fp-row-total td, .fp-row-total .fp-sticky { font-weight: 700; background: #E6F6FD; border-top: 2px solid var(--fp-cyan); border-bottom: 2px solid var(--fp-cyan); }
.fp-row-heading td, .fp-row-heading .fp-sticky { background: #F1F5F9; color: var(--fp-blue); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: .75rem; }
.fp-row-check td, .fp-row-check .fp-sticky { font-size: .75rem; color: #64748B; }
.fp-lvl-0.fp-row-group .fp-sticky { color: var(--fp-blue); }
.fp-neg { color: #B91C1C; }
.fp-ok { color: #15803D !important; }
.fp-bad { color: #B91C1C !important; font-weight: 700; }
.fp-toggle { width: 1.1rem; display: inline-block; color: var(--fp-blue); font-size: .8rem; }
.fp-toggle-space { width: 1.1rem; display: inline-block; }
.fp-footnote { font-size: .75rem; color: var(--fp-grey); }

/* ---------- Eingaberaster ---------- */
.fp-grid-wrap { overflow-x: auto; }
.fp-grid { border-collapse: collapse; font-size: .8rem; width: 100%; font-variant-numeric: tabular-nums; }
.fp-grid th { background: #F1F5F9; color: #334155; font-weight: 600; padding: .3rem .25rem; text-align: center; border: 1px solid #E2E8F0; }
.fp-grid td { border: 1px solid #E2E8F0; padding: 0; text-align: right; }
.fp-grid .fp-grid-year { text-align: left; padding: .3rem .5rem; white-space: nowrap; font-weight: 600; background: #F8FAFC; width: 7.5rem; }
.fp-grid .fp-grid-sum { padding: .3rem .5rem; background: var(--fp-bg-year); font-weight: 600; min-width: 7rem; }
.fp-grid-input { width: 100%; min-width: 4.6rem; border: 0; padding: .32rem .35rem; text-align: right; background: transparent; font-size: .8rem; }
.fp-grid-input:focus { outline: 2px solid var(--fp-cyan); background: #fff; }
.fp-grid-input-wide { max-width: 12rem; border: 1px solid #CBD5E1; border-radius: .25rem; }
.fp-grid-annual { display: table-cell; padding: .25rem .5rem !important; text-align: left !important; }
.fp-grid-annual span { color: #64748B; margin-right: .75rem; font-size: .75rem; }
.fp-grid-off { color: #CBD5E1; display: block; text-align: center; }
.fp-grid-fill { margin-left: .3rem; color: var(--fp-cyan); font-size: .85rem; }

/* ---------- Vorschau / Mini-Tabellen ---------- */
.fp-preview { display: grid; gap: .5rem; }
.fp-mini { border-collapse: collapse; font-size: .8rem; font-variant-numeric: tabular-nums; }
.fp-mini th, .fp-mini td { border: 1px solid #E2E8F0; padding: .3rem .6rem; text-align: right; white-space: nowrap; }
.fp-mini thead th { background: var(--fp-blue); color: #fff; }
.fp-mini .fp-left { text-align: left; background: #F8FAFC; }
.fp-wide { width: 100%; }
.fp-note { font-size: .75rem; color: var(--fp-grey); margin-top: .5rem; }

/* ---------- Eröffnungsbilanz ---------- */
.fp-ob-sums { display: flex; flex-wrap: wrap; gap: 1.5rem; font-size: .95rem; }
.fp-ob-sums b { font-variant-numeric: tabular-nums; }
.fp-ob-label { font-size: .875rem; color: #334155; margin-right: .75rem; }
.fp-ob-derived { font-variant-numeric: tabular-nums; font-weight: 600; }
.fp-ob-derived em { font-weight: 400; color: var(--fp-grey); font-size: .75rem; margin-left: .35rem; }

/* ---------- Integrierte Ansicht ---------- */
.fp-integrated { max-height: calc(100vh - 14rem); }
.fp-row-section td, .fp-row-section .fp-sticky { background: var(--fp-blue); color: #fff; font-weight: 700; font-size: .8rem; letter-spacing: .03em; text-transform: uppercase; }
.fp-report td.fp-edit { cursor: cell; }
.fp-report td.fp-edit:hover { outline: 1px solid var(--fp-cyan); outline-offset: -1px; background: #F0FAFE; }
.fp-report td.fp-over { background: #FEF3C7 !important; box-shadow: inset 3px 0 0 #D97706; }
.fp-legend { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; color: #475569; }
.fp-legend-edit { width: .9rem; height: .9rem; border: 1px solid var(--fp-cyan); background: #F0FAFE; display: inline-block; }
.fp-legend-over { width: .9rem; height: .9rem; background: #FEF3C7; box-shadow: inset 3px 0 0 #D97706; display: inline-block; }
.fp-link-btn { font-size: .8rem; color: #B45309; text-decoration: underline; text-underline-offset: 2px; }
.fp-cell-editor { position: absolute; z-index: 20; background: #fff; border: 2px solid var(--fp-cyan); border-radius: .375rem; padding: .4rem; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.fp-cell-editor-label { font-size: .7rem; color: #64748B; margin-bottom: .25rem; max-width: 22rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-cell-editor input { width: 100%; min-width: 10rem; border: 1px solid #CBD5E1; border-radius: .25rem; padding: .3rem .45rem; text-align: right; font-variant-numeric: tabular-nums; font-size: .85rem; }
.fp-cell-editor input:focus { outline: 2px solid var(--fp-cyan); }
.fp-cell-editor-actions { display: flex; gap: .5rem; margin-top: .35rem; font-size: .72rem; }
.fp-cell-editor-actions button { color: var(--fp-blue); }
.fp-cell-editor-actions .fp-btn-primary { background: var(--fp-blue); color: #fff; border-radius: .25rem; padding: .1rem .5rem; }
[x-cloak] { display: none !important; }
