/* ==========================================================================
   /design/style.css - Zentrales Layout & Custom Components
   ========================================================================== */

/* --- Basis Layout --- */
html, body {
    min-height: 100vh;
    overflow-x: hidden;
    background-color: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Flex-Wrapper für Sidebar + Content */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* --- Sidebar --- */
.sidebar {
    min-height: 100vh;
    background-color: #212529;
    width: 260px;
    flex-shrink: 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.sidebar .brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.75);
    padding: 0.75rem 1rem;
    margin-bottom: 0.2rem;
    border-radius: 6px;
    transition: all 0.2s ease-in-out;
}

.sidebar .nav-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    color: #ffffff;
    background-color: #0d6efd;
    font-weight: 600;
}

.sidebar .nav-link i {
    font-size: 1.1rem;
}

/* User-Profil unten in Sidebar */
.sidebar .user-info {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 1rem;
}

/* --- Hauptbereich (Main Content) --- */
.main-content {
    flex-grow: 1;
    padding: 2rem;
    background-color: #f8f9fa;
    min-width: 0; /* Verhindert Overflow bei großen Tabellen */
}

.main-header {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

/* --- Karten & Module --- */
.card {
    border-radius: 8px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card-header {
    font-weight: 600;
    border-top-left-radius: 8px !important;
    border-top-right-radius: 8px !important;
}

/* Minimal-Schatten für Forms & Tabellen-Container */
.shadow-sm-custom {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.04) !important;
}

/* --- Tabellen Styling --- */
.table-responsive {
    border-radius: 8px;
}

.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.03);
}

/* --- Badges & Hinweise --- */
.bg-outline-dark {
    background-color: #ffffff;
    color: #212529;
    border: 1px solid #ced4da;
}

/* --- Login Page spezifisch --- */
.login-body {
    background-color: #eef2f7;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-card {
    width: 100%;
    max-width: 410px;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    background: #ffffff;
}

/* ==========================================================================
   Responsive / Mobile View (Smartphones & Tablets)
   ========================================================================== */

@media (max-width: 768px) {
    /* 1. Layout untereinander anordnen */
    .app-wrapper {
        flex-direction: column;
    }

    /* 2. Sidebar kompakt oben darstellen */
    .sidebar {
        width: 100% !important;
        min-height: auto !important;
        padding: 0.75rem 1rem !important;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    /* Scrollbalken entfernen & flexibel umbrechen */
    .sidebar .nav {
        flex-direction: column !important;
        flex-wrap: wrap;
        overflow-x: visible !important;
        gap: 0.25rem;
    }

    .sidebar .nav-item {
        width: 100%;
    }

    .sidebar .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.95rem;
    }

    /* 3. Inhaltsbereich anpassen */
    .main-content {
        padding: 1rem !important;
    }

    .main-content h2 {
        font-size: 1.35rem;
    }
}

/* --- Print Styles für Besprechungs-Ausdrucke --- */
@media print {
    /* Hide Navigation & Buttons */
    .sidebar, .btn, form, header, .nav, .no-print {
        display: none !important;
    }

    body, .app-wrapper, .main-content {
        background: #ffffff !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }

    .card {
        border: none !important;
        box-shadow: none !important;
    }

    .table {
        font-size: 11px !important;
        width: 100% !important;
    }

    .table-dark {
        background-color: #f0f0f0 !important;
        color: #000000 !important;
    }

    /* Seitenumbruch erzwingen */
    .page-break {
        page-break-before: always;
    }

    @page {
        size: A4 landscape; /* Querformat für die 12-Monate-Tabelle */
        margin: 1cm;
    }
}