﻿.three-panel-container {
    display: grid;
    grid-template-columns: 0.7fr 1.5fr 0.6fr; /* Proportional sizing - more flexible */
    grid-template-rows: 100vh; /* full height */
    height: 100vh;
    overflow: hidden;
}

/* Shared Panel Styles */
.panel {
    border-right: 1px solid #ddd;
    padding: 10px;
    overflow-y: auto;
    background-color: #fff;
}

    /* Remove border on last panel */
    .panel:last-child {
        border-right: none;
    }

/* Make sure child panels stretch full height */
.panel-tree, .panel-detail, .panel-documents {
    height: 100%;
}

/* Optional: nice scrollbars */
.panel::-webkit-scrollbar {
    width: 8px;
}

.panel::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 4px;
}

/* Collapsed panels shrink */
.panel.collapsed {
    width: 30px !important;
    min-width: 30px;
    flex: 0 0 30px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f5f5f5;
    padding: 5px 8px;
    border-bottom: 1px solid #ddd;
    font-weight: 500;
}

.collapse-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 2px 4px;
    font-size: 1rem;
    color: #555;
    transition: color 0.2s ease;
}

    .collapse-btn:hover {
        color: #000;
    }

/* Scrollable content area */
.panel:not(.collapsed) > *:not(.panel-header) {
    overflow-y: auto;
    flex-grow: 1;
}

/* ========== TREE NODE STYLES ========== */
.tree-container {
    font-family: Arial, sans-serif;
    font-size: 14px;
    padding: 5px 0;
}

.tree-node {
    display: flex !important;
    align-items: center !important;
    padding: 4px 0 !important;
    cursor: pointer !important;
    user-select: none !important;
}

    .tree-node:hover {
        background-color: #f0f0f0;
    }

    .tree-node.selected {
        background-color: #e3f2fd;
        font-weight: 600;
    }

.tree-arrow {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
    height: 20px !important;
    cursor: pointer !important;
    font-size: 12px !important;
    flex-shrink: 0 !important;
    transition: background-color 0.15s ease;
}

    .tree-arrow:hover {
        background-color: #f5f5f5;
        border-radius: 3px;
    }

.tree-label {
    flex: 1;
    margin-left: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tree-status-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-left: 8px;
}

/* Responsive */
@media (max-width: 900px) {
    .three-panel-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        height: auto;
    }

    .panel {
        border-right: none;
        border-bottom: 1px solid #ddd;
    }
}

/* Importing Blazor CSS */
@import url('_framework/blazor.web.css');



/* ============================================
   Homepage – System Resources Tree Menu START
   ============================================ */

.homepage-tree {
    width: 100%;
}

.homepage-tree summary {
    list-style: none;
    cursor: pointer;
}

.homepage-tree summary::-webkit-details-marker {
    display: none;
}

.homepage-tree-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

/* Large, obvious expand / collapse arrow */
.homepage-tree-arrow {
    font-size: 20px;
    font-weight: 800;
    width: 20px;
    text-align: center;
    line-height: 1;
    color: #1a4480;
}

/* Closed state */
.homepage-tree .homepage-tree-arrow::before {
    content: "▶";
}

/* Open state */
.homepage-tree[open] .homepage-tree-arrow::before {
    content: "▼";
}

/* Child list */
.homepage-tree-children {
    margin: 8px 0 0 36px;
    padding: 0;
    list-style: none;
}

    .homepage-tree-children li {
        margin: 6px 0;
    }

/* Child links */
.homepage-tree-child-link {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ============================================
   Homepage – System Resources Tree Menu END
   ============================================ */