/* /Components/Layout/MainLayout.razor.rz.scp.css */
/* ===== App Root ===== */

.app-root[b-drneh9rmis] {
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 0;
}

/* ===== Header ===== */

.main-header[b-drneh9rmis] {
    height: 68px;
    z-index: 20;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
    flex-shrink: 0;
    position: relative;
}

.header-logo[b-drneh9rmis] {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.header-logo-img[b-drneh9rmis] {
    height: 60px;
    width: auto;
    image-rendering: optimizeQuality;
    -webkit-font-smoothing: antialiased;
    shape-rendering: geometricPrecision;
}

.header-title[b-drneh9rmis] {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    white-space: nowrap;
}

.header-spacer[b-drneh9rmis] {
    flex: 1;
}

.header-user[b-drneh9rmis] {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.375rem 0.5rem;
    border-radius: var(--radius);
    position: relative;
    user-select: none;
}

.header-user:hover[b-drneh9rmis] {
    background-color: var(--muted);
}

.header-user-name[b-drneh9rmis] {
    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
}

.dropdown-overlay[b-drneh9rmis] {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 49;
}

.header-dropdown[b-drneh9rmis] {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.375rem;
    padding: 0.375rem 0;
    background-color: var(--popover);
    color: var(--popover-foreground);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 240px;
    z-index: 50;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
}

.header-dropdown-item[b-drneh9rmis] {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    color: var(--foreground);
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.header-dropdown-item:hover[b-drneh9rmis] {
    background-color: var(--muted);
    text-decoration: none;
}

.header-dropdown-separator[b-drneh9rmis] {
    height: 1px;
    background-color: var(--border);
    margin: 0.25rem 0;
}

.header-dropdown-item-danger[b-drneh9rmis] {
    color: var(--destructive);
}

.header-dropdown-item-danger:hover[b-drneh9rmis] {
    background-color: #fee2e2;
    color: var(--destructive);
}

/* ===== Layout with sidebar ===== */

[b-drneh9rmis] .layout {
    display: flex;
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
}

[b-drneh9rmis] .sidebar {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.14);
}

.sidebar-header[b-drneh9rmis] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background-color: #ffffff;
    border-bottom: 1px solid var(--sidebar-border);
    height: 48px;
    min-height: 48px;
    max-height: 48px;
    flex-shrink: 0;
    box-sizing: border-box;
    overflow: hidden;
}

.sidebar-header-collapsed[b-drneh9rmis] {
    justify-content: center;
    padding: 1rem 0.5rem;
}

.sidebar-header-collapsed .sidebar-header-label[b-drneh9rmis] {
    display: none;
}

.sidebar-header-label[b-drneh9rmis] {
    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
    color: var(--foreground);
}

.sidebar-toggle-btn[b-drneh9rmis] {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: none;
    color: var(--muted-foreground);
    cursor: pointer;
    border-radius: var(--radius);
    transition: background-color 0.15s ease;
    flex-shrink: 0;
}

.sidebar-toggle-btn:hover[b-drneh9rmis] {
    background-color: var(--muted);
    color: var(--foreground);
}

.sidebar-nav[b-drneh9rmis] {
    flex: 1;
    overflow-y: auto;
}

/* ===== Sidebar App Info ===== */

.sidebar-app-info[b-drneh9rmis] {
    padding: 1rem 1.5rem;
    background-color: var(--card);
    border-top: 1px solid var(--border);
    font-size: 0.6875rem;
    color: var(--muted-foreground);
    line-height: 1.6;
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-text[b-drneh9rmis] {
    white-space: nowrap;
    overflow: hidden;
    transition: opacity 0.1s ease;
}

.sidebar-version[b-drneh9rmis] {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
}

/* ===== Sidebar Resize Handle ===== */

.sidebar-resize-handle[b-drneh9rmis] {
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    cursor: col-resize;
    z-index: 15;
    transition: background-color 0.15s ease;
}

.sidebar-resize-handle:hover[b-drneh9rmis] {
    background-color: rgba(12, 93, 166, 0.5);
}

/* ===== Main Content ===== */

.main-content[b-drneh9rmis] {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    min-height: 0;
}

[b-drneh9rmis] .action-bar {
    z-index: 5;
    flex-shrink: 0;
}

.action-bar-spacer[b-drneh9rmis] {
    flex: 1;
}

[b-drneh9rmis] .ablage-title {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    justify-content: center;
    align-items: flex-start;
    min-width: 0;
    min-height: 2.5rem;
    flex: 0 1 auto;
    overflow: hidden;
}

[b-drneh9rmis] .ablage-title-name {
    font-size: 1.125rem;
    font-weight: var(--font-weight-medium);
    margin: 0;
    padding: 0;
    line-height: 1.2;
    border: none;
    outline: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

[b-drneh9rmis] .ablage-title-pfad {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.6875rem;
    color: var(--muted-foreground);
    line-height: 1;
    height: 0.6875rem;
    min-width: 0;
}

[b-drneh9rmis] .ablage-title-pfad-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: monospace;
}

[b-drneh9rmis] .ablage-pfad-copy {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted-foreground);
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    flex-shrink: 0;
    height: 0.6875rem;
    min-height: 0;
    overflow: visible;
    line-height: 0;
    transition: color 0.15s ease;
}

[b-drneh9rmis] .ablage-pfad-copy:hover {
    color: var(--primary);
}

[b-drneh9rmis] .ablage-pfad-copy svg {
    width: 13px;
    height: 13px;
    overflow: visible;
}

[b-drneh9rmis] .content-area {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
}
/* /Components/Layout/NavMenu.razor.rz.scp.css */
.nav-menu[b-qs4eiw9dm4] {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    padding: 0.5rem 0;
    min-height: 100%;
}

/* Bereichs-Nav (§3.18): schiebt Exit-Link ans untere Ende */
.nav-bottom[b-qs4eiw9dm4] {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

[b-qs4eiw9dm4] .nav-link-exit {
    color: var(--sidebar-foreground);
    opacity: 0.75;
}

[b-qs4eiw9dm4] .nav-link-exit:hover {
    opacity: 1;
}

/* Icon darf nicht schrumpfen */
[b-qs4eiw9dm4] .nav-icon {
    flex-shrink: 0;
}

/* Text wird per overflow hidden abgeschnitten wenn Sidebar schrumpft.
   ::deep, damit auch NavLinks in Unterkomponenten (NavSubMenu, NavTreeNode)
   erfasst werden. */
[b-qs4eiw9dm4] .nav-link-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 1;
    transition: opacity 0.15s ease;
}

/* Collapsed: Text unsichtbar, Icons zentriert */
.nav-collapsed[b-qs4eiw9dm4]  .nav-link-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.nav-collapsed[b-qs4eiw9dm4]  .nav-link {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
    gap: 0;
}

/* Separator between Ablagen and admin links */
.nav-separator[b-qs4eiw9dm4] {
    height: 1px;
    background-color: var(--sidebar-border);
    margin: 0.5rem 1rem;
}

/* ===== Nav-SubMenu (flache Untermenue-Gruppe) ===== */

[b-qs4eiw9dm4] .nav-submenu {
    display: flex;
    flex-direction: column;
}

/* Toggle-only Header (ohne Href) — ganze Zeile klappt auf/zu */
[b-qs4eiw9dm4] .nav-submenu-header {
    cursor: pointer;
    user-select: none;
}

/* Split-Header (mit Href): Link links + Chevron-Button rechts in einer Zeile */
[b-qs4eiw9dm4] .nav-submenu-header-row {
    display: flex;
    align-items: stretch;
}

[b-qs4eiw9dm4] .nav-submenu-header-link {
    flex: 1;
    min-width: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

[b-qs4eiw9dm4] .nav-submenu-toggle {
    background: none;
    border: none;
    color: var(--sidebar-foreground);
    cursor: pointer;
    padding: 0 0.75rem;
    display: flex;
    align-items: center;
    border-radius: 0 var(--radius) var(--radius) 0;
    transition: background-color 0.15s ease;
    flex-shrink: 0;
}

[b-qs4eiw9dm4] .nav-submenu-toggle:hover {
    background-color: var(--sidebar-accent);
    color: var(--sidebar-accent-foreground);
}

[b-qs4eiw9dm4] .nav-submenu-chevron {
    margin-left: auto;
    transition: transform 0.15s ease;
    flex-shrink: 0;
}

[b-qs4eiw9dm4] .nav-submenu-chevron-open {
    transform: rotate(90deg);
}

/* Aufgeklappter Kinder-Block — dunklerer Hintergrund unterstreicht die Gruppe */
[b-qs4eiw9dm4] .nav-submenu-children {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    padding: 0.25rem 0;
    background-color: var(--sidebar-submenu);
    border-top: 1px solid var(--sidebar-border);
    border-bottom: 1px solid var(--sidebar-border);
}

/* Kinder eingerueckt — Abstand passt zur Icon-Breite im Header */
[b-qs4eiw9dm4] .nav-submenu-children .nav-link {
    padding-left: 2.75rem;
    border-radius: 0;
}

/* Collapsed Sidebar: Kinder, Chevron, Toggle-Button ausblenden; Header bleibt als Icon */
.nav-collapsed[b-qs4eiw9dm4]  .nav-submenu-children,
.nav-collapsed[b-qs4eiw9dm4]  .nav-submenu-chevron,
.nav-collapsed[b-qs4eiw9dm4]  .nav-submenu-toggle {
    display: none;
}

.nav-collapsed[b-qs4eiw9dm4]  .nav-submenu-header-link {
    border-radius: var(--radius);
}

/* /Components/Layout/NavTreeNode.razor.rz.scp.css */
/* Tree-spezifische Klassen sind global in app.css.
   Diese Datei bleibt als Scope-Marker fuer kuenftige Node-lokale Tweaks. */
/* /Components/Pages/Uebersicht.razor.rz.scp.css */
.dashboard[b-qgpdemw4oy] {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.dashboard-cards[b-qgpdemw4oy] {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.dashboard-card[b-qgpdemw4oy] {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.dashboard-card:hover[b-qgpdemw4oy] {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.dashboard-card-icon[b-qgpdemw4oy] {
    color: var(--primary);
}

.dashboard-card-body[b-qgpdemw4oy] {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.dashboard-card-value[b-qgpdemw4oy] {
    font-size: 2rem;
    font-weight: 500;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.dashboard-card-label[b-qgpdemw4oy] {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.dashboard-card-detail[b-qgpdemw4oy] {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
