/* ============================================================
   app.css — Rentensimulation von Ah Webapp
   Bootstrap 5.3 dark theme + custom styles
   ============================================================ */

/* --- Layout ------------------------------------------------- */
#app-wrapper {
    min-height: 100vh;
}

/* --- Sidebar ------------------------------------------------- */
#sidebar {
    width: 220px;
    min-width: 220px;
    background-color: var(--bs-dark-bg-subtle);
    border-right: 1px solid var(--bs-border-color);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

#sidebar .nav-link {
    color: var(--bs-secondary-color);
    border-radius: 6px;
    margin-bottom: 2px;
    font-size: 0.9rem;
}

#sidebar .nav-link:hover {
    color: var(--bs-body-color);
    background-color: var(--bs-tertiary-bg);
}

#sidebar .nav-link.active {
    color: #fff;
    background-color: var(--bs-primary);
}

/* --- KPI Cards ---------------------------------------------- */
.kpi-card {
    border: 1px solid var(--bs-border-color);
}

.kpi-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.kpi-value {
    font-size: 1.4rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* --- Charts ------------------------------------------------- */
.chart-container {
    position: relative;
    height: 280px;
}

/* --- Jahresansicht: horizontales Scrolling + Sticky-Spalte -- */
.table-wrapper-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.jahrestabelle {
    min-width: 900px;
    font-size: 0.82rem;
    white-space: nowrap;
}

.jahrestabelle .sticky-col {
    position: sticky;
    left: 0;
    background-color: var(--bs-body-bg);
    z-index: 2;
    min-width: 200px;
    max-width: 200px;
    white-space: normal;
    word-break: break-word;
    border-right: 2px solid var(--bs-border-color);
}

.jahrestabelle thead .sticky-col {
    background-color: var(--bs-dark-bg-subtle);
}

.jahrestabelle th {
    background-color: var(--bs-dark-bg-subtle);
    font-weight: 600;
}

.separator-row td {
    padding: 2px 0 !important;
    background-color: var(--bs-tertiary-bg);
    height: 4px;
}

.font-mono {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

/* --- Budget-Accordion --------------------------------------- */
.accordion-button:not(.collapsed) {
    background-color: var(--bs-tertiary-bg);
}

/* --- Toast -------------------------------------------------- */
.toast {
    min-width: 280px;
}

/* --- Verifikations-Banner ----------------------------------- */
#verif-banner {
    font-size: 0.875rem;
}

/* --- Responsive -------------------------------------------- */
@media (max-width: 768px) {
    #sidebar {
        display: none;
    }

    .kpi-value {
        font-size: 1.1rem;
    }
}

/* --- Admin-Verwaltungs-Kacheln ------------------------------ */
.admin-tile {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}
.admin-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.admin-tile-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* --- Utility ----------------------------------------------- */
.cursor-pointer {
    cursor: pointer;
}

/* Zahlen in Tabellen rechtsbündig, Tausenderformatierung */
.text-end {
    font-variant-numeric: tabular-nums;
}
