/* ============================================================
   Verwaltungs-Dashboard – App-Styles
   ============================================================ */

/* Grundlayout */
body { background-color: #f8f9fa; }

/* SPA-Seiten */
.page         { display: none; }
.page.active  { display: block; }

/* Dashboard-Karten */
#home-page .card {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
#home-page .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,.1);
}

/* Detail-Formular */
.list-group-item-action { cursor: pointer; }
.detail-card { max-width: 800px; margin: auto; }

/* ── Listen-Tabelle ───────────────────────────────────────── */
#item-table thead th { white-space: nowrap; }

.sortable-th {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.sortable-th:hover               { background-color: #e9ecef; }
.sortable-th .sort-icon          { opacity: .35; margin-left: 4px; }
.sortable-th.sort-asc  .sort-icon,
.sortable-th.sort-desc .sort-icon { opacity: 1; }

/* Filter-Bar */
#list-filter-input:focus { box-shadow: none; }

/* Aktionsbuttons in der Liste */
.btn-row-action { padding: .15rem .4rem; font-size: .8rem; }

/* ── Gantt-Chart ──────────────────────────────────────────── */
.gantt-wrapper {
    overflow-x: auto;
    border: 1px solid #dee2e6;
}
.gantt-table {
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    min-width: 2500px;
}
.gantt-table th,
.gantt-table td {
    border-bottom: 1px solid #dee2e6;
    border-right:  1px solid #dee2e6;
    padding: .5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gantt-table th { background-color: #f8f9fa; }

/* Sticky-Spalten */
.gantt-table th:nth-child(1), .gantt-table td:nth-child(1),
.gantt-table th:nth-child(2), .gantt-table td:nth-child(2),
.gantt-table th:nth-child(3), .gantt-table td:nth-child(3) {
    position: sticky;
    background-color: #fff;
    z-index: 1;
}
.gantt-table th:nth-child(1), .gantt-table td:nth-child(1) { left: 0;     width: 200px; border-left: none; }
.gantt-table th:nth-child(2), .gantt-table td:nth-child(2) { left: 200px; width: 120px; }
.gantt-table th:nth-child(3), .gantt-table td:nth-child(3) { left: 320px; width: 120px; }

.gantt-table .day-header { min-width: 60px; text-align: center; }

.gantt-bar-cell {
    position: relative;
    padding: 0 !important;
    height: 40px;
}
.gantt-bar {
    position: absolute;
    height: 70%; top: 15%;
    background-color: #0d6efd;
    border-radius: 4px;
    opacity: .7;
    color: #fff;
    font-size: .8em;
    padding-left: 5px;
    line-height: 28px;
    overflow: hidden;
}
.gantt-bar:hover { opacity: 1; }

/* ── Druck ────────────────────────────────────────────────── */
@media print {
    .no-print { display: none !important; }
    body.print-mode .page:not(.active),
    body.print-mode .modal,
    body.print-mode .back-btn,
    body.print-mode .btn-close { display: none !important; }
    body.print-mode #detail-page { display: block !important; }
}
