﻿:root {
    --color-primary: #0d6efd;
    --color-bg-dark: #1a1a2e;
    --color-bg-header: #0f3460;
    --color-bg-sidebar: #16213e;
    --color-text-light: #e0e0e0;
    --color-border: #2a2a4a;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: var(--color-bg-dark);
    color: var(--color-text-light);
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* ── Header ─────────────────────────────────────────────── */
#header {
    display: grid;
    grid-template-areas: "logo title";
    grid-template-columns: auto 1fr;
    align-items: center;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, var(--color-bg-header), var(--color-bg-sidebar));
    border-bottom: 1px solid var(--color-border);
}

#logo {
    grid-area: logo;
    padding-right: 1rem;
}

#title {
    grid-area: title;
    text-align: center;
}

#lblTitle {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
}

/* ── Layout ─────────────────────────────────────────────── */
#container {
    display: flex;
    flex-grow: 1;
    overflow: hidden;
}

/* ── Sidebar (linke Navigation) ─────────────────────────── */
#sidebar {
    width: 450px;
    min-width: 300px;
    max-width: 700px;
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    background-color: var(--color-bg-sidebar);
    color: var(--color-text-light);
}

#sidebar h3 {
    text-align: center;
    background: linear-gradient(135deg, var(--color-bg-header), var(--color-bg-sidebar));
    border-bottom: 1px solid var(--color-border);
    margin: 0;
    padding: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
}

#treeview {
    flex: 1;
    overflow: auto;
    padding: 10px;
}

/* jqGrid soll die volle Breite des Containers nutzen */
#treeview .ui-jqgrid {
    width: 100% !important;
}

#treeview .ui-jqgrid-bdiv,
#treeview .ui-jqgrid-hdiv {
    width: 100% !important;
}

#treeview .ui-jqgrid-btable,
#treeview .ui-jqgrid-htable {
    width: 100% !important;
}

/* jQuery UI Triangle-Icon Override */
.ui-icon-triangle-1-e {
    background-position-x: -16px !important;
    background-position-y: -128px !important;
}

/* ── Leaf-Icons ─────────────────────────────────────────── */

/* Standard-Leaf: kein Icon anzeigen (wird per loadComplete durch das PDF-Icon ersetzt) */
.tree-leaf-hidden {
    display: none !important;
}

/* Container für PDF-Icon: jqGrid-Sprite-Styles zurücksetzen */
div.tree-leaf:has(.tree-leaf-pdf) {
    background-image: none !important;
    width: auto !important;
    height: auto !important;
    text-indent: 0 !important;
    overflow: visible !important;
}

.tree-leaf-pdf {
    color: #000000;
    font-size: 16px;
}

/* ── Splitter ───────────────────────────────────────────── */
#splitter {
    width: 5px;
    cursor: col-resize;
    background: var(--color-border);
    transition: background 0.15s ease;
}

#splitter:hover {
    background: var(--color-primary);
}

/* ── Inhalt (rechte Seite, PDF-Anzeige) ─────────────────── */
#content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 10px;
    position: relative;
}

#pdfEmbed {
    border: 0;
    border-radius: 4px;
}

#pdfHinweis {
    text-align: center;
    max-width: 480px;
    color: var(--color-text-light);
    margin: auto;
}

#pdfHinweis i {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}
