/* ============================================================
   GLOBALS
============================================================ */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: #f3f4f6;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

a {
    text-decoration: none;
}

/* ============================================================
   LAYOUT WRAPPER
============================================================ */
.layout-wrapper {
    position: relative;
    min-height: 100vh;
    display: block;
}

/* ============================================================
   CONTENT BEREICH
============================================================ */
.content-wrapper {
    padding: 24px;
    /* Platz für fixierte Sidebar */
    margin-right: 260px !important;
}

/* ============================================================
   SIDEBAR RECHTS (FINAL FIX)
============================================================ */
.sidebar-right {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    width: 260px !important;
    height: 100vh !important;
    background-color: #0b1220 !important;
    border-left: 1px solid #111827 !important;
    color: #e5e7eb !important;
    display: flex;
    flex-direction: column;
    overflow-y: auto !important;
    z-index: 3000 !important;
}

.sidebar-inner {
    padding: 18px;
}

.sidebar-header {
    margin-bottom: 16px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

.sidebar-user {
    font-size: 0.78rem;
    color: #cbd5e1;
}

/* ============================================================
   NAVIGATION
============================================================ */
.sidebar-nav {
    margin-top: 12px;
    flex: 1;
}

.sidebar-section-label {
    font-size: 0.7rem;
    color: #6b7280;
    text-transform: uppercase;
    margin: 16px 0 8px;
    letter-spacing: 0.07em;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 999px;
    font-size: 0.9rem;
    color: #d1d5db;
    margin-bottom: 6px;
    transition: 0.18s ease;
}

.sidebar-link i {
    margin-right: 10px;
    font-size: 1.1rem;
}

.sidebar-link:hover {
    background-color: #1f2937;
    color: #fff !important;
}

.sidebar-link.active {
    background-color: #2563eb !important;
    color: #fff !important;
}

/* Separator */
.sidebar-separator {
    border-color: #1f2937;
    margin: 12px 0;
}

/* ============================================================
   CARDS
============================================================ */
.card-elevated {
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 991.98px) {

    .content-wrapper {
        margin-right: 0 !important;
        padding: 16px;
    }

    .sidebar-right {
        position: fixed;
        width: 220px !important;
        height: 100vh !important;
    }
}


/* Login Hintergrund */
.login-page {
    min-height: 100vh;
    background: url('../img/image01.jpg') no-repeat center center fixed;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}


/* ------------------------------
   Mobile-Fix für Sidebar (max 768px)
   ------------------------------ */
@media (max-width: 768px) {

    /* Sidebar kleiner + nicht über dem Content */
    .sidebar-right {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        top: 0 !important;
        right: 0 !important;
        border-left: none !important;
        box-shadow: none !important;
        margin-top: 1rem;
    }

    /* Content soll 100% Breite nutzen */
    .content-wrapper {
        margin-right: 0 !important;
    }
}
