/* OrgChart Container Layout */
.orgchart-container {
    display: grid;
    grid-template-columns: 300px 1fr 350px;
    gap: 20px;
    height: calc(100vh - 120px);
    padding: 20px;
}

/* Left Panel - Employee List */
.left-panel {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background: #f8f9fa;
    overflow-y: auto;
}

.left-panel h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.search-box {
    margin-bottom: 15px;
}

.filter-box {
    margin-bottom: 15px;
}

.employee-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.employee-item {
    padding: 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.employee-item:hover {
    background: #e9ecef;
    border-color: #0d6efd;
}

.employee-item.selected {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

.employee-name {
    font-weight: bold;
    margin-bottom: 4px;
}

.employee-position {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 2px;
}

.employee-item.selected .employee-position,
.employee-item.selected .employee-department {
    color: rgba(255, 255, 255, 0.9);
}

.employee-department {
    font-size: 0.85em;
    color: #888;
}

/* Center Panel - Chart View */
.center-panel {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background: white;
    overflow: auto;
    display: flex;
    flex-direction: column;
}

.center-panel h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.chart-controls {
    display: flex;
    gap: 10px;
}

.chart-view {
    flex: 1;
    overflow: auto;
    padding: 20px;
    background: #fafafa;
    border-radius: 6px;
}

.hierarchy-view {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
    min-width: max-content;
}

.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    font-size: 1.1em;
}

/* Employee Node Visualization */
.employee-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.node-card {
    background: white;
    border: 2px solid #0d6efd;
    border-radius: 8px;
    padding: 15px 20px;
    min-width: 200px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.node-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border-color: #0b5ed7;
}

.node-name {
    font-weight: bold;
    font-size: 1.1em;
    color: #333;
    margin-bottom: 5px;
}

.node-position {
    color: #666;
    font-size: 0.95em;
    margin-bottom: 3px;
}

.node-department {
    color: #888;
    font-size: 0.85em;
    font-style: italic;
}

.subordinates {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    justify-content: center;
}

.subordinate-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.connection-line {
    width: 2px;
    height: 30px;
    background: #0d6efd;
    margin-bottom: 0;
}

.subordinate-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 10px;
    height: 10px;
    background: #0d6efd;
    border-radius: 50%;
    transform: translate(-50%, -5px);
}

/* Right Panel - Details/Editor */
.right-panel {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background: #f8f9fa;
    overflow-y: auto;
}

.right-panel h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.employee-details {
    background: white;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.employee-details p {
    margin-bottom: 8px;
}

.employee-form {
    background: white;
    padding: 15px;
    border-radius: 6px;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.button-group button {
    flex: 1;
}

.template-editor textarea {
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.report-output {
    background: white;
    padding: 15px;
    border-radius: 6px;
    max-height: 300px;
    overflow-y: auto;
}

.report-output pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
    font-size: 0.9em;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .orgchart-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .left-panel,
    .center-panel,
    .right-panel {
        max-height: 500px;
    }
}
