/* ===== Blackyy BSP Theme ===== */

:root {
    --primary:        #e31b1b;
    --primary-dark:   #b40000;
    --primary-light:  #ffe6e6;
    --bg-white:       #ffffff;
    --bg-light:       #f5f5f5;
    --text-primary:   #1b1b1b;
    --text-secondary: #666666;
    --border:         #e6e6e6;
    --maxw:           1280px;
}

html[data-theme="dark"] {
    --primary:        #ff4444;
    --primary-dark:   #e31b1b;
    --primary-light:  #3a1c1c;
    --bg-white:       #16181c;
    --bg-light:       #0f1114;
    --text-primary:   #e5f4ec;
    --text-secondary: #93a0ae;
    --border:         #2a3d34;
}

/* ── Seitenränder (Circuit links, 3D-Draht rechts) ─────────── */
body {
    background: #f6f6f6;
}

body::before,
body::after {
    content: "";
    position: fixed;
    top: 0;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    background-repeat: no-repeat;
    background-size: cover;
}

body::before {
    left: 0;
    width: calc((100vw - var(--maxw)) / 2);
    background-image: url('/uploads/themes/gebaeudereinigung-meyer/side-left.jpg');
    background-position: left center;
}

body::after {
    right: 0;
    width: calc((100vw - var(--maxw)) / 2);
    background-image: url('/uploads/themes/gebaeudereinigung-meyer/side-right.jpg');
    background-position: right center;
}

@media (max-width: 1280px) {
    body::before,
    body::after { display: none; }
}

/* ── Zentrierter Haupt-Content-Bereich ──────────────────────── */
.layout-wrapper {
    position: relative;
    z-index: 1;
    background: #ffffff;
    max-width: var(--maxw);
    margin: 0 auto;
    min-height: 100vh;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.12);
}

/* ── Header ─────────────────────────────────────────────────── */
.header-wrapper {
    min-height: 150px;
    background: url('/uploads/themes/gebaeudereinigung-meyer/header-bg.svg') center / cover no-repeat #ffffff;
    display: flex;
    align-items: center;
    border-bottom: 2px solid #e31b1b;
}

.header-content {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 14px;
}

/* Logo überschreiben */
.header-logo,
.header-logo[src] {
    content: url('/uploads/themes/gebaeudereinigung-meyer/logo.jpg');
    height: 130px !important;
    width: auto !important;
    max-width: 160px !important;
    object-fit: contain;
    object-position: left center;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.header-title {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #1b1b1b !important;
    line-height: 1.2;
}

@media (max-width: 720px) {
    .header-wrapper  { min-height: auto; padding: 12px 0; }
    .header-logo,
    .header-logo[src] { height: 72px !important; max-width: 96px !important; }
    .header-title    { font-size: 20px !important; }
}

/* ── Darkmode-Toggle ausblenden ──────────────────────────────── */
.theme-toggle { display: none !important; }

/* ── Sidebar als Overlay (verschiebt Inhalt nicht) ──────────── */
.sidebar {
    background: linear-gradient(180deg, rgba(22,24,28,0.5) 0%, rgba(15,17,20,0.5) 100%);
    border-right: 2px solid #e31b1b;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.layout-content {
    margin-left: 0 !important;
    width: 100% !important;
}

@media (max-width: 1340px) {
    .layout-content,
    .sidebar.collapsed ~ .layout-content {
        margin-left: 64px !important;
        width: calc(100% - 64px) !important;
    }
}

.sidebar-brand {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-title { color: #f5f7fb; }

.sidebar .cat-toggle:hover,
.sidebar .nav-links a:hover {
    background: rgba(227, 27, 27, 0.85);
    color: #ffffff;
}

/* ── Content ─────────────────────────────────────────────────── */
.v2-container,
.content-wrapper,
.content-box {
    background: #ffffff;
}

.content-box {
    border: 1px solid #e6e6e6;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

.content-nav a.active {
    background: #e31b1b;
    border-color: #e31b1b;
    color: #ffffff;
}

.content-nav a:hover {
    border-color: #e31b1b;
    background: rgba(227, 27, 27, 0.08);
}

.table tr:hover td { background: #fff6f6; }

/* ── Footer ─────────────────────────────────────────────────── */
.app-footer {
    min-height: 120px; 
    background: url('/uploads/themes/gebaeudereinigung-meyer/footer-bg.svg') center / cover no-repeat #ffffff;
    border-top: 1px solid #e6e6e6;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
}

.app-footer .footer-content,
.app-footer .footer-user,
.app-footer .footer-links,
.app-footer p {
    margin-bottom: 0 !important;
}

.app-footer .footer-content {
    padding-top: 8px;
    color: #000;
}

/* db overrides */

/* custom theme css */
{}

/* content nav safety */
.content-nav { display: flex !important; max-width: 100% !important; overflow-x: auto !important; flex-wrap: wrap !important; }
.content-nav a { white-space: nowrap !important; flex: 0 0 auto !important; }
